[
  {
    "path": ".dockerignore",
    "content": "node_modules\nnpm-debug.log\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where the package manifests are located.\n# Please see the documentation for all configuration options:\n# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file\n\nversion: 2\nupdates:\n  - package-ecosystem: \"\" # See documentation for possible values\n    directory: \"/\" # Location of package manifests\n    schedule:\n      interval: \"weekly\"\n"
  },
  {
    "path": ".github/workflows/deploy.yml",
    "content": "name: Build and Deploy\non:\n  push:\n    branches: [main]\npermissions:\n  contents: write\njobs:\n  build-and-deploy:\n    concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout 🛎️\n        uses: actions/checkout@v4\n\n      - name: Install pnpm\n        uses: pnpm/action-setup@v4\n        with:\n          version: 10\n\n      - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.\n        run: |\n          pnpm install\n          pnpm xlsx2json\n          pnpm build\n\n      - name: Deploy 🚀\n        uses: JamesIves/github-pages-deploy-action@v4\n        with:\n          folder: template # The folder the action should deploy."
  },
  {
    "path": ".gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.test\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and *not* Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\nutils/xlsxTransform-*\n\n/.idea\n\n__localStorage.json\n\ntemplate/public\npublic/data"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n    // 使用 IntelliSense 了解相关属性。\n    // 悬停以查看现有属性的描述。\n    // 欲了解更多信息，请访问: https://go.microsoft.com/fwlink/?linkid=830387\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"type\": \"node\",\n            \"request\": \"launch\",\n            \"name\": \"test\",\n            \"program\": \"${workspaceFolder}/test\",\n            \"skipFiles\": [\n                \"<node_internals>/**\",\n                \"**/node_modumes/**\"\n            ]\n        },\n    ]\n}"
  },
  {
    "path": "Dockerfile",
    "content": "FROM node:alpine\n\nENV NPM_CONFIG_LOGLEVEL info\n\nWORKDIR /usr/src/app\n\nCOPY package*.json ./\n\nRUN npm install\n\nCOPY . .\n\nEXPOSE 8080\nCMD [\"yarn\", \"dev\"]\n\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2021 神戸小鳥\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README-zh_CN.md",
    "content": "# Life Restart\n\n<a href=\"https://discord.gg/U3qrf49NMQ\"><img src=\"https://img.shields.io/discord/883382868427014255?color=%23FEE75C&label=Discord&logo=discord&logoColor=white&style=for-the-badge\" /></a>\n\n[English](./README.md) | 简体中文\n\n## 简介\n\n- Game Life Restart\n\n## 使用\n\n<details>\n<summary><strong>网页版</strong></summary>\n<br />\n\n```bash\n# 1. 下载项目代码\ngit clone https://github.com/VickScarlet/lifeRestart.git my-project\n\n# 2. 进入目录安装依赖\ncd my-project\npnpm install\n\n# 3. 转换XLSX表\npnpm xlsx2json\n\n# 4. 启动本地开发服务器\npnpm dev\n```\n\n启动完成后打开浏览器访问 [http://localhost:5173](http://localhost:5173)。\n\n</details>\n\n<details>\n<summary><strong>控制台版本</strong></summary>\n<br />\n\n```bash\nnode repl\n```\n\n</details>\n\n## 其他版本\n\n<details>\n<summary><strong>版本列表</strong></summary>\n<br />\n\n- Cocos版：[gameall3d/LifeRestart_Cocos](https://github.com/gameall3d/LifeRestart_Cocos)\n\n</details>\n\n> 更多信息请参考 [官网文档](https://liferestart.syaro.io/)。\n"
  },
  {
    "path": "README.md",
    "content": "# Life Restart\n\n<a href=\"https://discord.gg/U3qrf49NMQ\"><img src=\"https://img.shields.io/discord/883382868427014255?color=%23FEE75C&label=Discord&logo=discord&logoColor=white&style=for-the-badge\" /></a>\n\nEnglish | [简体中文](./README-zh_CN.md)\n\n## Introduction\n\n- Game Life Restart\n\n## Usage\n\n<details>\n<summary><strong>Web Version</strong></summary>\n<br />\n\n\n```bash\n# 1. Clone project code.\ngit clone git@github.com:VickScarlet/lifeRestart.git my-project\ncd my-project\n\n# 2. Installation dependence.\npnpm install\n\n# 3. Transform XLSX\npnpm xlsx2json\n\n# 4. Start local dev server.\npnpm dev\n```\n\nAfter the startup is complete, open a browser and visit [http://localhost:5173](http://localhost:5173).\n</details>\n\n<details>\n<summary><strong>Command Line Version</strong></summary>\n<br />\n\n```bash\nnode repl\n```\n\n</details>\n\n## Other Version\n\n<details>\n<summary><strong>Versions</strong></summary>\n<br />\n\n- Cocos Ver: [gameall3d/LifeRestart_Cocos](https://github.com/gameall3d/LifeRestart_Cocos)\n\n</details>\n\n> More instructions at [documentation](https://liferestart.syaro.io/).\n"
  },
  {
    "path": "index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"UTF-8\">\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n        <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no\">\n        <meta name=\"description\" content=\"やり直すんだ。そして、次はうまくやる。\"/>\n        <meta name=\"keywords\" content=\"人生重开模拟器 liferestart life restart remake 人生重来\"/>\n        <meta name=\"renderer\" content=\"webkit\"/>\n        <meta name=\"apple-mobile-web-app-capable\" content=\"yes\"/>\n        <meta name=\"full-screen\" content=\"true\"/>\n        <meta name=\"x5-fullscreen\" content=\"true\"/>\n        <meta name=\"360-fullscreen\" content=\"true\"/>\n        <meta name=\"theme-color\" content=\"#157878\"/>\n        <meta name=\"laya\" screenorientation =\"landscape\"/>\n        <meta http-equiv=\"expires\" content=\"0\"/>\n        <meta http-equiv=\"Cache-Control\" content=\"no-siteapp\"/>\n        <font-face font-family=\"方正像素12\" src=\"fonts/方正像素12.ttf\"/>\n        <title>Life Restart</title>\n        <!--\n        <script type=\"text/javascript\" src=\"libs/laya/laya.core.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/laya.webgl.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/laya.filter.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/laya.html.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/laya.particle.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/laya.ui.js\"></script>\n        -->\n        <script type=\"text/javascript\" src=\"libs/laya/min/laya.core.min.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/min/laya.webgl.min.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/min/laya.filter.min.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/min/laya.particle.min.js\"></script>\n        <script type=\"text/javascript\" src=\"libs/laya/min/laya.ui.min.js\"></script>\n        <script type=\"module\" src=\"src/index.js\"></script>\n    </head>\n    <body style=\"background:black\"></body>\n</html>"
  },
  {
    "path": "jsconfig.json",
    "content": "{\n    // See http://go.microsoft.com/fwlink/?LinkId=759670\n    // for the documentation about the jsconfig.json format\n    \"compilerOptions\": {\n        \"module\": \"esnext\",\n        \"target\": \"es6\",\n    },\n    \"include\":[\"src\", \"repl\", \"vite.config.js\"],\n    \"exclude\": [\"node_modules\", \"public\", \"view\"]\n}"
  },
  {
    "path": "laya/.laya",
    "content": "<project version=\"0.9.8\">\n   <asynRes>img,temp,sound      </asynRes>\n   <unDealRes>embed      </unDealRes>\n   <resTypes>png,jpg   </resTypes>\n   <resExportPath>public/images/atlas   </resExportPath>\n   <asynResExportPath>public   </asynResExportPath>\n   <codeExportPath>src/ui   </codeExportPath>\n   <codeImports><![CDATA[import laya.ui.*;\nimport laya.display.*; ]]>   </codeImports>\n   <codeImportsJS><![CDATA[var View=laya.ui.View;\nvar Dialog=laya.ui.Dialog;]]>   </codeImportsJS>\n   <uiType>0   </uiType>\n   <uiExportPath>public/ui.json   </uiExportPath>\n   <boxTypes>Box,List,Tab,RadioGroup,ViewStack,Panel,HBox,VBox,Tree,Sprite   </boxTypes>\n   <pageTypes>View,Dialog   </pageTypes>\n   <shareResPath/>\n   <codeType>2   </codeType>\n   <resCanCompress/>\n   <resPublishQuality>80      </resPublishQuality>\n   <langPath/>\n   <defaultFont/>\n   <codeImportsTS><![CDATA[import View=laya.ui.View;\nimport Dialog=laya.ui.Dialog;]]>   </codeImportsTS>\n   <textureWidth>2048   </textureWidth>\n   <textureHeight>2048   </textureHeight>\n   <picWidth>512   </picWidth>\n   <picHeight>512   </picHeight>\n   <power2>false   </power2>\n   <trimempty>false   </trimempty>\n   <codeViewExportPath>src/view   </codeViewExportPath>\n   <picType>0   </picType>\n   <atlasType>1   </atlasType>\n   <atlasScale/>\n   <copyRes>true   </copyRes>\n   <dataCompact>true   </dataCompact>\n   <ver>0.9.9 beta   </ver>\n</project>"
  },
  {
    "path": "laya/pages/particle/fly.part",
    "content": "{\"textureName\":\"images/texture/texture_1.png\",\"positionVariance\":{\"0\":0,\"1\":0,\"2\":0},\"minVerticalVelocity\":-100,\"minVerticalEndRadian\":0,\"minStartSize\":0,\"minStartRadius\":0,\"minRotateSpeed\":0,\"minHorizontalVelocity\":100,\"minHorizontalEndRadian\":0,\"minEndSize\":18.55,\"minEndRadius\":218.75,\"minColor\":{\"0\":0.15,\"1\":0.92,\"2\":0.91,\"3\":0.6000000238418579},\"maxVerticalVelocity\":100,\"maxVerticalEndRadian\":0,\"maxStartSize\":2.04,\"maxStartRadius\":0,\"maxRotateSpeed\":0,\"maxPartices\":400,\"maxHorizontalVelocity\":100,\"maxHorizontalEndRadian\":0,\"maxEndSize\":24.35,\"maxEndRadius\":84.82,\"maxColor\":{\"0\":0.57,\"1\":1,\"2\":0,\"3\":1},\"gravity\":{\"0\":0,\"1\":0,\"2\":0},\"endVelocity\":2,\"emitterVelocitySensitivity\":56.89,\"duration\":9.52,\"colorComponentInter\":true,\"blendState\":0,\"ageAddScale\":10,\"backColor\":\"#ffffff\",\"textureFileName\":\"comp\\\\clip_num.png\",\"textureCount\":1,\"minHorizontalStartRadian\":0,\"maxHorizontalStartRadian\":0,\"minVerticalStartRadian\":0,\"maxVerticalStartRadian\":0,\"emitterType\":\"null\",\"emissionRate\":0,\"sphereEmitterRadius\":1,\"sphereEmitterVelocity\":0,\"sphereEmitterVelocityAddVariance\":0,\"ringEmitterRadius\":30,\"ringEmitterVelocity\":0,\"ringEmitterVelocityAddVariance\":0,\"ringEmitterUp\":2,\"minStartColor\":{\"0\":0.5,\"1\":0.5,\"2\":0.5,\"3\":0.2},\"maxStartColor\":{\"0\":1,\"1\":1,\"2\":1,\"3\":1},\"minEndColor\":{\"0\":0,\"1\":0,\"2\":0,\"3\":0.08},\"maxEndColor\":{\"0\":1,\"1\":1,\"2\":1,\"3\":1},\"pointEmitterPosition\":{\"0\":0,\"1\":0,\"2\":0},\"pointEmitterPositionVariance\":{\"0\":0,\"1\":0,\"2\":0},\"pointEmitterVelocity\":{\"0\":0,\"1\":0,\"2\":0},\"pointEmitterVelocityAddVariance\":{\"0\":0,\"1\":0,\"2\":0},\"boxEmitterCenterPosition\":{\"0\":0,\"1\":0,\"2\":0},\"boxEmitterSize\":{\"0\":0,\"1\":0,\"2\":0},\"boxEmitterVelocity\":{\"0\":0,\"1\":0,\"2\":0},\"boxEmitterVelocityAddVariance\":{\"0\":0,\"1\":0,\"2\":0},\"sphereEmitterCenterPosition\":{\"0\":0,\"1\":0,\"2\":0},\"ringEmitterCenterPosition\":{\"0\":0,\"1\":0,\"2\":0},\"useEndRadian\":true,\"disableColor\":false}"
  },
  {
    "path": "laya/pages/view/CyberTheme/Celebrity.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":83,\n    \"selecteID\":84,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":40,\"right\":0,\"name\":\"title\",\"left\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(title)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":73,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Image\",\n                    \"props\":{\"skin\":\"images/accessories/titlebar@3x.png\",\"right\":0,\"left\":0},\n                    \"nodeParent\":73,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":74,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"HBox\",\n                    \"props\":{\"y\":160,\"x\":563,\"space\":30,\"height\":70,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":73,\n                    \"label\":\"HBox\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":75,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":10,\"x\":1,\"skin\":\"images/accessories/title_left@3x.png\",\"name\":\"left\"},\n                            \"nodeParent\":75,\n                            \"label\":\"Image(left)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":76,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"y\":0,\"x\":2,\"text\":\"UI_Title_Celebrity\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\"},\n                            \"nodeParent\":75,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":77,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":10,\"x\":3,\"skin\":\"images/accessories/title_right@3x.png\",\"name\":\"right\"},\n                            \"nodeParent\":75,\n                            \"label\":\"Image(right)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":78,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Panel\",\n            \"props\":{\"var\":\"panelCharacter\",\"vScrollBarSkin\":\" \",\"top\":300,\"right\":0,\"name\":\"panelCharacter\",\"left\":0,\"bottom\":700},\n            \"nodeParent\":1,\n            \"label\":\"Panel(panelCharacter)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"VBox\",\n                    \"props\":{\"y\":10,\"width\":1000,\"var\":\"vboxCharacter\",\"space\":20,\"name\":\"vboxCharacter\",\"centerX\":0},\n                    \"nodeParent\":2,\n                    \"label\":\"VBox(vboxCharacter)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":8,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"right\":0,\"name\":\"boxCharacter\",\"left\":0},\n                            \"nodeParent\":8,\n                            \"label\":\"Box(boxCharacter)\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":10,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"right\":0,\"name\":\"boxName\",\"left\":0,\"height\":100},\n                                    \"nodeParent\":10,\n                                    \"label\":\"Box(boxName)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":12,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"top\":0,\"skin\":\"images/border/border_1@3x.png\",\"sizeGrid\":\"15,130,15,130\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":12,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":64,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"},\n                                            \"nodeParent\":12,\n                                            \"label\":\"Label(label)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":18,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"VBox\",\n                                    \"props\":{\"top\":100,\"space\":20,\"right\":25,\"name\":\"vboxStates\",\"left\":25},\n                                    \"nodeParent\":10,\n                                    \"label\":\"VBox(vboxStates)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":11,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"height\":100,\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerX\":0,\"align\":\"center\"},\n                                            \"nodeParent\":11,\n                                            \"label\":\"Label(label)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":14,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"right\":25,\"name\":\"boxTalent\",\"left\":25,\"height\":100},\n                            \"nodeParent\":8,\n                            \"label\":\"Box(boxTalent)\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":15,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"y\":-220,\"x\":-25,\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                    \"nodeParent\":15,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":66,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"},\n                                    \"nodeParent\":15,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":17,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"x\":0,\"width\":15,\"visible\":false,\"name\":\"grade1\",\"height\":100},\n                                    \"nodeParent\":15,\n                                    \"label\":\"Box(grade1)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":67,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":100,\"fillColor\":\"#55fffe\"},\n                                            \"nodeParent\":67,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":70,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"x\":0,\"width\":15,\"visible\":false,\"name\":\"grade2\",\"height\":100},\n                                    \"nodeParent\":15,\n                                    \"label\":\"Box(grade2)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":68,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":100,\"fillColor\":\"#b17cff\"},\n                                            \"nodeParent\":68,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":71,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"x\":0,\"width\":15,\"visible\":false,\"name\":\"grade3\",\"height\":100},\n                                    \"nodeParent\":15,\n                                    \"label\":\"Box(grade3)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":69,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":100,\"fillColor\":\"#ffce45\"},\n                                            \"nodeParent\":69,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":72,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":10,\"x\":10,\"right\":0,\"name\":\"boxUniqueUnGenerate\",\"left\":0},\n                            \"nodeParent\":8,\n                            \"label\":\"Box(boxUniqueUnGenerate)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":79,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"right\":0,\"name\":\"boxName\",\"left\":0,\"height\":100},\n                                    \"nodeParent\":79,\n                                    \"label\":\"Box(boxName)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":80,\n                                    \"child\":[\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Image\",\n                                            \"props\":{\"top\":0,\"skin\":\"images/border/border_1@3x.png\",\"sizeGrid\":\"15,130,15,130\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":80,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":81,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Label\",\n                                            \"props\":{\"valign\":\"middle\",\"text\":\"UI_UniqueWaTaShi\",\"name\":\"label\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"},\n                                            \"nodeParent\":80,\n                                            \"label\":\"Label(label)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":82,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"VBox\",\n                                    \"props\":{\"top\":100,\"space\":20,\"right\":25,\"name\":\"vboxStates\",\"left\":25},\n                                    \"nodeParent\":79,\n                                    \"label\":\"VBox(vboxStates)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":83,\n                                    \"child\":[\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Label\",\n                                            \"props\":{\"valign\":\"middle\",\"text\":\"UI_UniqueWaTaShiContent\",\"right\":0,\"name\":\"label\",\"left\":0,\"leading\":30,\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"align\":\"center\"},\n                                            \"nodeParent\":83,\n                                            \"label\":\"Label(label)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":84,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":12,\"x\":10,\"right\":0,\"name\":\"boxBtn\",\"left\":0,\"height\":200},\n                                            \"nodeParent\":83,\n                                            \"label\":\"Box(boxBtn)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":85,\n                                            \"child\":[\n                                                {\n                                                    \"x\":90,\n                                                    \"type\":\"Button\",\n                                                    \"props\":{\"width\":500,\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btn\",\"label\":\"UI_GenerateNow\",\"centerY\":0,\"centerX\":0},\n                                                    \"nodeParent\":85,\n                                                    \"label\":\"Button(btn)\",\n                                                    \"isOpen\":false,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":88,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{},\n                                                            \"nodeParent\":88,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":89,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Animation\",\n                                                                    \"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                                                    \"nodeParent\":89,\n                                                                    \"label\":\"Animation\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":90,\n                                                                    \"child\":[\n                                                                        ]\n                                                                },\n                                                                {\n                                                                    \"type\":\"Box\",\n                                                                    \"props\":{\"renderType\":\"mask\"},\n                                                                    \"nodeParent\":89,\n                                                                    \"label\":\"Box\",\n                                                                    \"isOpen\":false,\n                                                                    \"isDirectory\":true,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":true,\n                                                                    \"compId\":91,\n                                                                    \"child\":[\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":92,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":93,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":94,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":95,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":96,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":97,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":98,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":99,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":100,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":101,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":102,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Rect\",\n                                                                            \"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                                            \"nodeParent\":91,\n                                                                            \"label\":\"Rect\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":103,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        }]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{},\n                                                            \"nodeParent\":88,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":false,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":104,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Box\",\n                                                                    \"props\":{\"renderType\":\"mask\"},\n                                                                    \"nodeParent\":104,\n                                                                    \"label\":\"Box\",\n                                                                    \"isDirectory\":true,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":true,\n                                                                    \"compId\":105,\n                                                                    \"child\":[\n                                                                        {\n                                                                            \"type\":\"Poly\",\n                                                                            \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                                            \"nodeParent\":105,\n                                                                            \"label\":\"Poly\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":106,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Poly\",\n                                                                            \"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                                            \"nodeParent\":105,\n                                                                            \"label\":\"Poly\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":107,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        },\n                                                                        {\n                                                                            \"type\":\"Poly\",\n                                                                            \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                                            \"nodeParent\":105,\n                                                                            \"label\":\"Poly\",\n                                                                            \"isDirectory\":false,\n                                                                            \"isAniNode\":true,\n                                                                            \"hasChild\":false,\n                                                                            \"compId\":108,\n                                                                            \"child\":[\n                                                                                ]\n                                                                        }]\n                                                                },\n                                                                {\n                                                                    \"type\":\"Animation\",\n                                                                    \"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                                                    \"nodeParent\":104,\n                                                                    \"label\":\"Animation\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":109,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":0,\"left\":0,\"height\":0,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":63,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Button\",\n                    \"props\":{\"y\":-450,\"width\":500,\"var\":\"btnRetry\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnRetry\",\"label\":\"UI_AllNot\",\"centerX\":0},\n                    \"nodeParent\":63,\n                    \"label\":\"Button(btnRetry)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":19,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":19,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":20,\n                            \"child\":[\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":20,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":21,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":20,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":22,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":23,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":24,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":25,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":26,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":27,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":28,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":29,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":30,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":31,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":32,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":33,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":22,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":34,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":19,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":35,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":35,\n                                    \"label\":\"Box\",\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":36,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":36,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":37,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":36,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":38,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":36,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":39,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":35,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":40,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Button\",\n                    \"props\":{\"y\":-200,\"width\":500,\"var\":\"btnNext\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnNext\",\"label\":\"UI_Make_New_Life\",\"centerX\":0},\n                    \"nodeParent\":63,\n                    \"label\":\"Button(btnNext)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":41,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":41,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":42,\n                            \"child\":[\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":42,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":43,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":42,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":44,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":45,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":46,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":47,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":48,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":49,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":50,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":51,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":52,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":53,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":54,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":55,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":44,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":56,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":41,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":57,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":57,\n                                    \"label\":\"Box\",\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":58,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":58,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":59,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":58,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":60,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":58,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":61,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":57,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":62,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/CyberAchievement.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":3,\n    \"selecteID\":7,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"sceneBg\":\"laya/views/view/CyberTheme/CyberAchievement.png\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Button\",\n            \"props\":{\"y\":200,\"var\":\"btnBack\",\"skin\":\"images/button/button_back@3x.png\",\"name\":\"btnBack\",\"left\":30},\n            \"nodeParent\":1,\n            \"label\":\"Button(btnBack)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":2,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":1,\"top\":0,\"right\":0,\"height\":1},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":68,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":200,\"x\":-170,\"width\":260,\"var\":\"btnRank\",\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":68,\n                    \"label\":\"Box(btnRank)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":3,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Image\",\n                            \"props\":{\"top\":0,\"skin\":\"images/button/button_small@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                            \"nodeParent\":3,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":4,\n                            \"child\":[\n                                ],\n                            \"$HIDDEN\":false\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":90,\"left\":8,\"height\":90},\n                            \"nodeParent\":3,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":5,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Image\",\n                                    \"props\":{\"skin\":\"images/icons/icon_rank@3x.png\",\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":5,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":6,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Rank\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":40,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":3,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":7,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":310,\"x\":0,\"top\":310,\"right\":0,\"left\":0,\"height\":120},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":16,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"y\":110,\"x\":140,\"var\":\"btnStatistics\",\"text\":\"UI_Statistics\",\"name\":\"btnStatistics\",\"fontSize\":100,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"anchorY\":1,\"anchorX\":0.5},\n                    \"nodeParent\":16,\n                    \"label\":\"Label(btnStatistics)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":18,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"y\":110,\"x\":360,\"var\":\"btnAchievement\",\"text\":\"UI_Achievement\",\"name\":\"btnAchievement\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"anchorY\":1,\"anchorX\":0.5},\n                    \"nodeParent\":16,\n                    \"label\":\"Label(btnAchievement)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":21,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":0,\"width\":2250,\"var\":\"boxPage\",\"top\":450,\"name\":\"boxPage\",\"bottom\":80},\n            \"nodeParent\":1,\n            \"label\":\"Box(boxPage)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":8,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":1125,\"var\":\"boxA\",\"top\":0,\"name\":\"boxA\",\"left\":0,\"bottom\":0},\n                    \"nodeParent\":8,\n                    \"label\":\"Box(boxA)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":66,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":1125,\"top\":0,\"height\":1125,\"centerX\":0},\n                            \"nodeParent\":66,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":25,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"top\":40,\"skin\":\"images/border/border_2@3x.png\",\"right\":30,\"left\":30,\"bottom\":30},\n                                    \"nodeParent\":25,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":26,\n                                    \"child\":[\n                                        ],\n                                    \"$HIDDEN\":false\n                                },\n                                {\n                                    \"type\":\"Sprite\",\n                                    \"props\":{\"y\":150,\"x\":100,\"width\":920,\"height\":380},\n                                    \"nodeParent\":25,\n                                    \"label\":\"Sprite\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":52,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":-1,\"x\":460,\"width\":4,\"lineWidth\":1,\"lineColor\":\"#1a5459\",\"height\":320,\"fillColor\":\"#1a5459\"},\n                                            \"nodeParent\":52,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":50,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":370,\"x\":0,\"width\":920,\"lineWidth\":1,\"lineColor\":\"#1a5459\",\"height\":5,\"fillColor\":\"#1a5459\"},\n                                            \"nodeParent\":52,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":51,\n                                            \"child\":[\n                                                ]\n                                        }],\n                                    \"$HIDDEN\":false\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":400,\"top\":150,\"left\":100,\"height\":320},\n                                    \"nodeParent\":25,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":28,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"HBox\",\n                                            \"props\":{\"y\":130,\"x\":0},\n                                            \"nodeParent\":28,\n                                            \"label\":\"HBox\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":54,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labRemakeTimes\",\"text\":\"1\",\"name\":\"labRemakeTimes\",\"fontSize\":70,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bold\":true,\"anchorY\":1,\"anchorX\":0},\n                                                    \"nodeParent\":54,\n                                                    \"label\":\"Label(labRemakeTimes)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":31,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"text\":\"UI_Times\",\"fontSize\":70,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bold\":true,\"anchorY\":1,\"anchorX\":0},\n                                                    \"nodeParent\":54,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":53,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"y\":210,\"x\":0,\"text\":\"UI_Remake_Times\",\"fontSize\":62,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bold\":false,\"anchorY\":1,\"anchorX\":0},\n                                            \"nodeParent\":28,\n                                            \"label\":\"Label\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":32,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"y\":240,\"var\":\"labRemakeTimesJudge\",\"text\":\"抽到紫色几率不变\",\"name\":\"labRemakeTimesJudge\",\"fontSize\":42,\"font\":\"方正像素12\",\"color\":\"#93aaae\",\"bold\":false,\"anchorY\":0,\"anchorX\":0},\n                                            \"nodeParent\":28,\n                                            \"label\":\"Label(labRemakeTimesJudge)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":33,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":400,\"top\":150,\"right\":100,\"height\":320},\n                                    \"nodeParent\":25,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":29,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"HBox\",\n                                            \"props\":{\"y\":130},\n                                            \"nodeParent\":29,\n                                            \"label\":\"HBox\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":55,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labAchievementCount\",\"text\":\"1\",\"name\":\"labAchievementCount\",\"fontSize\":70,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bold\":true,\"anchorY\":1,\"anchorX\":0},\n                                                    \"nodeParent\":55,\n                                                    \"label\":\"Label(labAchievementCount)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":56,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"text\":\"UI_Count\",\"fontSize\":70,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bold\":true,\"anchorY\":1,\"anchorX\":0},\n                                                    \"nodeParent\":55,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":57,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"y\":210,\"x\":0,\"text\":\"UI_Achievement_Count\",\"fontSize\":62,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bold\":false,\"anchorY\":1,\"anchorX\":0},\n                                            \"nodeParent\":29,\n                                            \"label\":\"Label\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":38,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"y\":240,\"x\":0,\"var\":\"labAchievementCountJudge\",\"text\":\"抽到橙色几率不变\",\"name\":\"labAchievementCountJudge\",\"fontSize\":42,\"font\":\"方正像素12\",\"color\":\"#93aaae\",\"bold\":false,\"anchorY\":0,\"anchorX\":0},\n                                            \"nodeParent\":29,\n                                            \"label\":\"Label(labAchievementCountJudge)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":39,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"right\":100,\"left\":100,\"height\":450,\"bottom\":100},\n                                    \"nodeParent\":25,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":30,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"top\":25,\"right\":0,\"left\":0,\"height\":180},\n                                            \"nodeParent\":30,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":41,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"y\":85,\"x\":0,\"text\":\"UI_Event_Collection_Rate\",\"fontSize\":62,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bold\":false,\"anchorY\":1,\"anchorX\":0},\n                                                    \"nodeParent\":41,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":42,\n                                                    \"child\":[\n                                                        ],\n                                                    \"$HIDDEN\":false\n                                                },\n                                                {\n                                                    \"type\":\"ProgressBar\",\n                                                    \"props\":{\"y\":135,\"var\":\"prgEventRate\",\"value\":1,\"skin\":\"images/progress/progress_1@3x.png\",\"right\":240,\"name\":\"prgEventRate\",\"left\":0,\"anchorY\":0.5,\"anchorX\":0},\n                                                    \"nodeParent\":41,\n                                                    \"label\":\"ProgressBar(prgEventRate)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":43,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labEventRate\",\"text\":\"100%\",\"right\":0,\"name\":\"labEventRate\",\"fontSize\":110,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"bold\":false,\"anchorY\":0.5,\"anchorX\":1},\n                                                    \"nodeParent\":41,\n                                                    \"label\":\"Label(labEventRate)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":44,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"right\":0,\"left\":0,\"height\":180,\"bottom\":30},\n                                            \"nodeParent\":30,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":45,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"y\":85,\"x\":0,\"text\":\"UI_Talent_Collection_Rate\",\"fontSize\":62,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bold\":false,\"anchorY\":1,\"anchorX\":0},\n                                                    \"nodeParent\":45,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":46,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"ProgressBar\",\n                                                    \"props\":{\"y\":135,\"var\":\"prgTalentRate\",\"value\":0.73,\"skin\":\"images/progress/progress_1@3x.png\",\"right\":240,\"name\":\"prgTalentRate\",\"left\":0,\"anchorY\":0.5,\"anchorX\":0},\n                                                    \"nodeParent\":45,\n                                                    \"label\":\"ProgressBar(prgTalentRate)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":47,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labTalentRate\",\"text\":\"73%\",\"right\":0,\"name\":\"labTalentRate\",\"fontSize\":110,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"bold\":false,\"anchorY\":0.5,\"anchorX\":1},\n                                                    \"nodeParent\":45,\n                                                    \"label\":\"Label(labTalentRate)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":48,\n                                                    \"child\":[\n                                                        ]\n                                                }],\n                                            \"$HIDDEN\":false\n                                        }]\n                                }]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":1125,\"var\":\"boxB\",\"top\":0,\"right\":0,\"name\":\"boxB\",\"bottom\":0},\n                    \"nodeParent\":8,\n                    \"label\":\"Box(boxB)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":67,\n                    \"child\":[\n                        {\n                            \"type\":\"List\",\n                            \"props\":{\"y\":35,\"width\":1080,\"var\":\"listAchievements\",\"vScrollBarSkin\":\"images/slider/vslider_1@3x.png\",\"top\":35,\"name\":\"listAchievements\",\"centerX\":0,\"bottom\":35},\n                            \"nodeParent\":67,\n                            \"label\":\"List(listAchievements)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":9,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"x\":0,\"width\":530,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"renderType\":\"render\",\"height\":460},\n                                    \"nodeParent\":9,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":10,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"top\":20,\"skin\":\"images/border/achievement@3x.png\",\"right\":20,\"name\":\"uncomplete\",\"left\":20,\"bottom\":20},\n                                            \"nodeParent\":10,\n                                            \"label\":\"Image(uncomplete)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":11,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"top\":0,\"skin\":\"images/border/achievement_complete@3x.png\",\"right\":0,\"name\":\"completed\",\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":10,\n                                            \"label\":\"Image(completed)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":12,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"text\":\"霹雳霹雳\",\"name\":\"name\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":-30,\"centerX\":0},\n                                            \"nodeParent\":10,\n                                            \"label\":\"Label(name)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":13,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"wordWrap\":true,\"text\":\"被第九重雷劫劈死\",\"right\":40,\"name\":\"description\",\"left\":40,\"height\":95,\"fontSize\":42,\"font\":\"方正像素12\",\"color\":\"#9ca5a9\",\"bottom\":25,\"align\":\"center\"},\n                                            \"nodeParent\":10,\n                                            \"label\":\"Label(description)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":14,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        }]\n                }],\n            \"$HIDDEN\":false\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }],\n    \"$HIDDEN\":false\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/CyberAchievementPopup.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":10,\n    \"props\":{\"y\":50,\"width\":570,\"sceneColor\":\"#000000\",\"mouseThrough\":true,\"mouseEnabled\":false,\"height\":150,\"alpha\":0.75},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"type\":\"Rect\",\n                    \"props\":{\"width\":570,\"lineWidth\":1,\"height\":150,\"fillColor\":\"#55fffe\"},\n                    \"nodeParent\":2,\n                    \"label\":\"Rect\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":4,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":0,\"var\":\"boxBg\",\"name\":\"boxBg\"},\n            \"nodeParent\":1,\n            \"label\":\"Box(boxBg)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":5,\n            \"child\":[\n                {\n                    \"type\":\"Rect\",\n                    \"props\":{\"width\":560,\"lineWidth\":1,\"height\":150,\"fillColor\":\"#272727\"},\n                    \"nodeParent\":5,\n                    \"label\":\"Rect\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":6,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":560,\"height\":150},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":8,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Image\",\n                    \"props\":{\"x\":70,\"skin\":\"images/icons/icon_achievement@3x.png\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":8,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":7,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"x\":150,\"var\":\"labName\",\"text\":\"所有人都是我\",\"name\":\"labName\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#cccccc\",\"centerY\":0},\n                    \"nodeParent\":8,\n                    \"label\":\"Label(labName)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":9,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/CyberMain.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":93,\n    \"selecteID\":94,\n    \"props\":{\"y\":1218,\"x\":562,\"width\":1125,\"sceneColor\":\"#000000\",\"sceneBg\":\"laya/views/view/CyberTheme/CyberMain.png\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436,\"anchorY\":0.5,\"anchorX\":0.5},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Image\",\n            \"props\":{\"var\":\"imgBg\",\"skin\":\"images/background/background_1@3x.png\",\"name\":\"imgBg\",\"centerY\":0,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Image(imgBg)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":67,\n            \"child\":[\n                {\n                    \"type\":\"Animation\",\n                    \"props\":{\"y\":0,\"x\":0,\"width\":1125,\"source\":\"view/CyberTheme/animation/jumpBackground.ani\",\"interval\":80,\"height\":2436,\"blendMode\":\"lighter\",\"autoPlay\":true,\"alpha\":0.3},\n                    \"nodeParent\":67,\n                    \"label\":\"Animation\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":70,\n                    \"child\":[\n                        ]\n                }],\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Image\",\n            \"props\":{\"var\":\"imgTitle\",\"skin\":\"images/accessories/title@3x.png\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"name\":\"imgTitle\",\"centerY\":-350,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Image(imgTitle)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":68,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":0,\"x\":0},\n                    \"nodeParent\":68,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":75,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":8,\"x\":8,\"skin\":\"images/accessories/title_neon@3x.png\",\"renderType\":\"mask\"},\n                            \"nodeParent\":75,\n                            \"label\":\"Image\",\n                            \"isOpen\":true,\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":71,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Animation\",\n                            \"props\":{\"y\":286,\"x\":436,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleY\":1.5,\"scaleX\":5,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                            \"nodeParent\":75,\n                            \"label\":\"Animation\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":77,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Image\",\n            \"props\":{\"skin\":\"images/accessories/insert_coin@3x.png\",\"centerY\":540,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Image\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":7,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"text\":\"UI_Title_Remake\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":-135,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Label\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":8,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"wordWrap\":true,\"text\":\"UI_Title_Subsequent\",\"right\":0,\"left\":0,\"fontSize\":48,\"font\":\"方正像素12\",\"color\":\"#828c95\",\"centerY\":-20,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n            \"nodeParent\":1,\n            \"label\":\"Label\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":11,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"text\":\"UI_Cyber_Theme_Art_Design\",\"right\":50,\"fontSize\":48,\"font\":\"方正像素12\",\"color\":\"#00fffd\",\"bottom\":30,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Label\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":12,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Button\",\n            \"props\":{\"var\":\"btnRemake\",\"skin\":\"images/button/button_main@3x.png\",\"pivotY\":96,\"pivotX\":329,\"name\":\"btnRemake\",\"labelSize\":60,\"label\":\"UI_Remake\",\"centerY\":720,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Button(btnRemake)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":13,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{},\n                    \"nodeParent\":13,\n                    \"label\":\"Box\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":29,\n                    \"child\":[\n                        {\n                            \"type\":\"Animation\",\n                            \"props\":{\"y\":93,\"x\":330,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":5,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                            \"nodeParent\":29,\n                            \"label\":\"Animation\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":26,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"renderType\":\"mask\"},\n                            \"nodeParent\":29,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":44,\n                            \"child\":[\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":45,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":37,\"x\":625,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":46,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":21,\"x\":44,\"width\":569,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":47,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":150,\"x\":171,\"width\":316,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":48,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":49,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":163,\"x\":493,\"width\":120,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":50,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":51,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":150,\"x\":487,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":52,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":53,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":21,\"x\":613,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":54,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":55,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"y\":153,\"x\":632,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                    \"nodeParent\":44,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":56,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{},\n                    \"nodeParent\":13,\n                    \"label\":\"Box\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":57,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"renderType\":\"mask\"},\n                            \"nodeParent\":57,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":58,\n                            \"child\":[\n                                {\n                                    \"type\":\"Poly\",\n                                    \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                    \"nodeParent\":58,\n                                    \"label\":\"Poly\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":62,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Poly\",\n                                    \"props\":{\"y\":41,\"x\":621,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                    \"nodeParent\":58,\n                                    \"label\":\"Poly\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":63,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Poly\",\n                                    \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,305,0,311,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                    \"nodeParent\":58,\n                                    \"label\":\"Poly\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":65,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Animation\",\n                            \"props\":{\"y\":172,\"x\":330,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":4,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                            \"nodeParent\":57,\n                            \"label\":\"Animation\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":66,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":200,\"x\":200,\"width\":225,\"var\":\"btnThanks\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnThanks\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnThanks)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":15,\n            \"child\":[\n                {\n                    \"type\":\"Image\",\n                    \"props\":{\"top\":0,\"skin\":\"images/button/button_small@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                    \"nodeParent\":15,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":16,\n                    \"child\":[\n                        ],\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":90,\"left\":8,\"height\":90},\n                    \"nodeParent\":15,\n                    \"label\":\"Box\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":19,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"skin\":\"images/icons/icon_thanks@3x.png\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":19,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":18,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Thanks\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":40,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":15,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":20,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":0,\"x\":1100,\"width\":1,\"top\":0,\"right\":0,\"height\":1},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":84,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":200,\"x\":-200,\"width\":225,\"var\":\"btnAchievement\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnAchievement\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":84,\n                    \"label\":\"Box(btnAchievement)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":21,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"top\":0,\"skin\":\"images/button/button_small@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                            \"nodeParent\":21,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":22,\n                            \"child\":[\n                                ],\n                            \"$HIDDEN\":false\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":90,\"left\":8,\"height\":90},\n                            \"nodeParent\":21,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":23,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"skin\":\"images/icons/icon_achievement@3x.png\",\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":23,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":24,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Achievement\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":40,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":21,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":25,\n                            \"child\":[\n                                ]\n                        }],\n                    \"$HIDDEN\":false\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":1,\"left\":0,\"height\":1,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":85,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":-175,\"x\":100,\"width\":160,\"var\":\"btnGithub\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnGithub\",\"height\":160,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":85,\n                    \"label\":\"Box(btnGithub)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":82,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"top\":0,\"skin\":\"images/icons/icon_github.png\",\"right\":0,\"left\":0,\"bottom\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":82,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":78,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":-355,\"x\":100,\"width\":160,\"var\":\"btnDiscord\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnDiscord\",\"height\":160,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":85,\n                    \"label\":\"Box(btnDiscord)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":83,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"top\":0,\"skin\":\"images/icons/icon_discord.png\",\"right\":0,\"left\":0,\"bottom\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":83,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":79,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":0,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":88,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":-300,\"x\":-100,\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":88,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":90,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":110,\"var\":\"btnSaveLoad\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":90,\n                            \"label\":\"Box(btnSaveLoad)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":91,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"width\":80,\"skin\":\"images/icons/icon_save.png\",\"height\":80,\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":91,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":92,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":-175,\"x\":-100,\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":88,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":89,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":110,\"var\":\"btnThemes\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnThemes\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":89,\n                            \"label\":\"Box(btnThemes)\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":86,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"width\":90,\"skin\":\"images/icons/icon_themes.png\",\"height\":90,\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":86,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":87,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":572,\"var\":\"banner\",\"centerX\":0,\"bottom\":100,\"anchorY\":1,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(banner)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":93,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Banner\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#00fffd\"},\n                    \"nodeParent\":93,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":94,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/CyberProperty.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":97,\n    \"referenceLines\":null,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"sceneBg\":\"laya/views/view/CyberTheme/CyberProperty.png\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":40,\"right\":0,\"name\":\"title\",\"left\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(title)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"type\":\"Image\",\n                    \"props\":{\"skin\":\"images/accessories/titlebar@3x.png\",\"right\":0,\"left\":0},\n                    \"nodeParent\":2,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":3,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"HBox\",\n                    \"props\":{\"y\":160,\"x\":563,\"space\":30,\"height\":70,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":2,\n                    \"label\":\"HBox\",\n                    \"isOpen\":null,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":4,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":10,\"x\":1,\"skin\":\"images/accessories/title_left@3x.png\",\"name\":\"left\"},\n                            \"nodeParent\":4,\n                            \"label\":\"Image(left)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":5,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"y\":0,\"x\":2,\"text\":\"UI_Title_Property\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\"},\n                            \"nodeParent\":4,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":6,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":10,\"x\":3,\"skin\":\"images/accessories/title_right@3x.png\",\"name\":\"right\"},\n                            \"nodeParent\":4,\n                            \"label\":\"Image(right)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":7,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":340,\"right\":40,\"name\":\"propertyAllocate\",\"left\":40,\"height\":840},\n            \"nodeParent\":1,\n            \"label\":\"Box(propertyAllocate)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":8,\n            \"child\":[\n                {\n                    \"type\":\"Image\",\n                    \"props\":{\"top\":-15,\"skin\":\"images/border/border_2@3x.png\",\"right\":-15,\"left\":-15,\"bottom\":-15},\n                    \"nodeParent\":8,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":55,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"HBox\",\n                    \"props\":{\"top\":680,\"right\":80,\"height\":100},\n                    \"nodeParent\":8,\n                    \"label\":\"HBox\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":50,\n                    \"child\":[\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"x\":0,\"text\":\"UI_Left_Property_Point\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0},\n                            \"nodeParent\":50,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":52,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"x\":1,\"text\":\"UI_Colon\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0},\n                            \"nodeParent\":50,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":54,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"x\":2,\"var\":\"labLeftPropertyPoint\",\"text\":\"0\",\"name\":\"labLeftPropertyPoint\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0},\n                            \"nodeParent\":50,\n                            \"label\":\"Label(labLeftPropertyPoint)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":53,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"VBox\",\n                    \"props\":{\"top\":90,\"space\":22,\"right\":50,\"left\":50,\"height\":600},\n                    \"nodeParent\":8,\n                    \"label\":\"VBox\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":120,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":0,\"var\":\"boxCharm\",\"right\":0,\"name\":\"boxCharm\",\"left\":0,\"height\":130},\n                            \"nodeParent\":120,\n                            \"label\":\"Box(boxCharm)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":10,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":10,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":17,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_chr@3x.png\",\"scaleY\":1.4,\"scaleX\":1.4,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":17,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":18,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":183,\"text\":\"UI_Property_Charm\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":10,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":19,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":590,\"var\":\"boxCharmAllocate\",\"right\":30,\"name\":\"boxCharmAllocate\",\"height\":110,\"centerY\":0},\n                                    \"nodeParent\":10,\n                                    \"label\":\"Box(boxCharmAllocate)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":20,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnCharmReduce\",\"name\":\"btnCharmReduce\",\"left\":0,\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":20,\n                                            \"label\":\"Box(btnCharmReduce)\",\n                                            \"isOpen\":null,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":21,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":21,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":24,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":24,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":26,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":24,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":27,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":24,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":28,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":24,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":30,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":21,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":39,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":39,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":25,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":25,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":23,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\n                                            \"nodeParent\":20,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":false,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":42,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"TextInput\",\n                                                    \"props\":{\"var\":\"inputCharm\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"skin\":\"images/border/up@3x.png\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputCharm\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":42,\n                                                    \"label\":\"TextInput(inputCharm)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":48,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"y\":0,\"x\":0,\"top\":0,\"right\":0,\"mouseThrough\":true,\"mouseEnabled\":false,\"left\":0,\"bottom\":0,\"alpha\":0.2},\n                                                    \"nodeParent\":42,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":43,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":43,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":44,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":43,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":45,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnCharmIncrease\",\"right\":0,\"name\":\"btnCharmIncrease\",\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":20,\n                                            \"label\":\"Box(btnCharmIncrease)\",\n                                            \"isOpen\":null,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":22,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":22,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":31,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":31,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":32,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":31,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":33,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":31,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":34,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":31,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":35,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":22,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":38,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":38,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":36,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":36,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":37,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":38,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":40,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":40,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":41,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":1,\"var\":\"boxIntelligence\",\"right\":0,\"name\":\"boxIntelligence\",\"left\":0,\"height\":130},\n                            \"nodeParent\":120,\n                            \"label\":\"Box(boxIntelligence)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":121,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":121,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":122,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_int@3x.png\",\"scaleY\":1.4,\"scaleX\":1.4,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":122,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":123,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":183,\"text\":\"UI_Property_Intelligence\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":121,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":124,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":590,\"var\":\"boxIntelligenceAllocate\",\"right\":30,\"name\":\"boxIntelligenceAllocate\",\"height\":110,\"centerY\":0},\n                                    \"nodeParent\":121,\n                                    \"label\":\"Box(boxIntelligenceAllocate)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":125,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnIntelligenceReduce\",\"name\":\"btnIntelligenceReduce\",\"left\":0,\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":125,\n                                            \"label\":\"Box(btnIntelligenceReduce)\",\n                                            \"isOpen\":null,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":126,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":126,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":127,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":127,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":128,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":127,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":129,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":127,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":130,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":127,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":131,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":126,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":132,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":132,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":133,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":133,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":134,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\n                                            \"nodeParent\":125,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":135,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"TextInput\",\n                                                    \"props\":{\"var\":\"inputIntelligence\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"skin\":\"images/border/up@3x.png\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputIntelligence\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":135,\n                                                    \"label\":\"TextInput(inputIntelligence)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":136,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"y\":0,\"x\":0,\"top\":0,\"right\":0,\"mouseThrough\":true,\"mouseEnabled\":false,\"left\":0,\"bottom\":0,\"alpha\":0.2},\n                                                    \"nodeParent\":135,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":null,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":137,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":137,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":138,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":137,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":139,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnIntelligenceIncrease\",\"right\":0,\"name\":\"btnIntelligenceIncrease\",\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":125,\n                                            \"label\":\"Box(btnIntelligenceIncrease)\",\n                                            \"isOpen\":null,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":140,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":140,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":141,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":141,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":142,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":141,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":143,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":141,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":144,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":141,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":145,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":140,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":146,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":146,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":147,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":147,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":148,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":146,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":149,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":149,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":150,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":2,\"var\":\"boxStrength\",\"right\":0,\"name\":\"boxStrength\",\"left\":0,\"height\":130},\n                            \"nodeParent\":120,\n                            \"label\":\"Box(boxStrength)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":151,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":151,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":152,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_str@3x.png\",\"scaleY\":1.4,\"scaleX\":1.4,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":152,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":153,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":183,\"text\":\"UI_Property_Strength\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":151,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":154,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":590,\"var\":\"boxStrengthAllocate\",\"right\":30,\"name\":\"boxStrengthAllocate\",\"height\":110,\"centerY\":0},\n                                    \"nodeParent\":151,\n                                    \"label\":\"Box(boxStrengthAllocate)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":155,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnStrengthReduce\",\"name\":\"btnStrengthReduce\",\"left\":0,\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":155,\n                                            \"label\":\"Box(btnStrengthReduce)\",\n                                            \"isOpen\":null,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":156,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":156,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":157,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":157,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":158,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":157,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":159,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":157,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":160,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":157,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":161,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":156,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":162,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":162,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":163,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":163,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":164,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\n                                            \"nodeParent\":155,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":165,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"TextInput\",\n                                                    \"props\":{\"var\":\"inputStrength\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"skin\":\"images/border/up@3x.png\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputStrength\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":165,\n                                                    \"label\":\"TextInput(inputStrength)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":166,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"y\":0,\"x\":0,\"top\":0,\"right\":0,\"mouseThrough\":true,\"mouseEnabled\":false,\"left\":0,\"bottom\":0,\"alpha\":0.2},\n                                                    \"nodeParent\":165,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":null,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":167,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":167,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":168,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":167,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":169,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnStrengthIncrease\",\"right\":0,\"name\":\"btnStrengthIncrease\",\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":155,\n                                            \"label\":\"Box(btnStrengthIncrease)\",\n                                            \"isOpen\":null,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":170,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":170,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":171,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":171,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":172,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":171,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":173,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":171,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":174,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":171,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":175,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":170,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":176,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":176,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":177,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":177,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":178,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":176,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":179,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":179,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":180,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":3,\"var\":\"boxMoney\",\"right\":0,\"name\":\"boxMoney\",\"left\":0,\"height\":130},\n                            \"nodeParent\":120,\n                            \"label\":\"Box(boxMoney)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":181,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":181,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":182,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_mny@3x.png\",\"scaleY\":1.4,\"scaleX\":1.4,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":182,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":183,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":183,\"text\":\"UI_Property_Money\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":181,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":184,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":590,\"var\":\"boxMoneyAllocate\",\"right\":30,\"name\":\"boxMoneyAllocate\",\"height\":110,\"centerY\":0},\n                                    \"nodeParent\":181,\n                                    \"label\":\"Box(boxMoneyAllocate)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":185,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnMoneyReduce\",\"name\":\"btnMoneyReduce\",\"left\":0,\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":185,\n                                            \"label\":\"Box(btnMoneyReduce)\",\n                                            \"isOpen\":false,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":186,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":186,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":187,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":187,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":188,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":187,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":189,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":187,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":190,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":187,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":191,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":186,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":192,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":192,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":193,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":193,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":194,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\n                                            \"nodeParent\":185,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":195,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"TextInput\",\n                                                    \"props\":{\"var\":\"inputMoney\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"skin\":\"images/border/up@3x.png\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputMoney\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":195,\n                                                    \"label\":\"TextInput(inputMoney)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":196,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"y\":0,\"x\":0,\"top\":0,\"right\":0,\"mouseThrough\":true,\"mouseEnabled\":false,\"left\":0,\"bottom\":0,\"alpha\":0.2},\n                                                    \"nodeParent\":195,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":null,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":197,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":197,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":198,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":197,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":199,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnMoneyIncrease\",\"right\":0,\"name\":\"btnMoneyIncrease\",\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":185,\n                                            \"label\":\"Box(btnMoneyIncrease)\",\n                                            \"isOpen\":null,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":200,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":200,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":201,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":201,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":202,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":201,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":203,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":201,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":204,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"},\n                                                            \"nodeParent\":201,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":205,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":200,\n                                                    \"label\":\"Box\",\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":206,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":206,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":207,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":207,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":208,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":206,\n                                                            \"label\":\"Box\",\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":209,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":209,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":210,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":40,\"name\":\"selectedTalents\",\"left\":40,\"height\":700,\"bottom\":500},\n            \"nodeParent\":1,\n            \"label\":\"Box(selectedTalents)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":56,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":20,\"text\":\"UI_Selected_Talent\",\"left\":20,\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\"},\n                    \"nodeParent\":56,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":57,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"List\",\n                    \"props\":{\"var\":\"listSelectedTalents\",\"vScrollBarSkin\":\" \",\"top\":110,\"spaceY\":30,\"right\":10,\"repeatY\":3,\"name\":\"listSelectedTalents\",\"left\":10,\"bottom\":10},\n                    \"nodeParent\":56,\n                    \"label\":\"List(listSelectedTalents)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":58,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":20,\"right\":10,\"renderType\":\"render\",\"left\":10,\"height\":160},\n                            \"nodeParent\":58,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":false,\n                            \"hasChild\":true,\n                            \"compId\":59,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                    \"nodeParent\":59,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":63,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":15,\"name\":\"grade1\",\"height\":160},\n                                    \"nodeParent\":59,\n                                    \"label\":\"Box(grade1)\",\n                                    \"isOpen\":null,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":61,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#55fffe\"},\n                                            \"nodeParent\":61,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":62,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":15,\"name\":\"grade2\",\"height\":160},\n                                    \"nodeParent\":59,\n                                    \"label\":\"Box(grade2)\",\n                                    \"isOpen\":null,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":64,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#b17cff\"},\n                                            \"nodeParent\":64,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":65,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":15,\"name\":\"grade3\",\"height\":160},\n                                    \"nodeParent\":59,\n                                    \"label\":\"Box(grade3)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":66,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#ffce45\"},\n                                            \"nodeParent\":66,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":67,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"text\":\"Title\",\"name\":\"labTitle\",\"left\":52,\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0},\n                                    \"nodeParent\":59,\n                                    \"label\":\"Label(labTitle)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":68,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":10,\"text\":\"descriptipn\",\"right\":33,\"name\":\"labDescription\",\"fontSize\":44,\"font\":\"方正像素12\",\"color\":\"#76979d\",\"centerY\":0},\n                                    \"nodeParent\":59,\n                                    \"label\":\"Label(labDescription)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":69,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":1000,\"name\":\"buttonGroup\",\"height\":200,\"centerX\":0,\"bottom\":90},\n            \"nodeParent\":1,\n            \"label\":\"Box(buttonGroup)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":71,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":500,\"top\":0,\"left\":0,\"bottom\":0},\n                    \"nodeParent\":71,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":72,\n                    \"child\":[\n                        {\n                            \"type\":\"Button\",\n                            \"props\":{\"width\":500,\"var\":\"btnRandomAllocate\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnRandomAllocate\",\"label\":\"UI_Random_Allocate\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":72,\n                            \"label\":\"Button(btnRandomAllocate)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":74,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{},\n                                    \"nodeParent\":74,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":76,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Animation\",\n                                            \"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                            \"nodeParent\":76,\n                                            \"label\":\"Animation\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":78,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"renderType\":\"mask\"},\n                                            \"nodeParent\":76,\n                                            \"label\":\"Box\",\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":79,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":80,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":81,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":82,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":83,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":84,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":85,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":86,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":87,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":88,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":89,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":90,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":91,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{},\n                                    \"nodeParent\":74,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":77,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"renderType\":\"mask\"},\n                                            \"nodeParent\":77,\n                                            \"label\":\"Box\",\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":92,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":92,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":93,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":92,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":94,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":92,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":95,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Animation\",\n                                            \"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                            \"nodeParent\":77,\n                                            \"label\":\"Animation\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":96,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":500,\"top\":0,\"right\":0,\"bottom\":0},\n                    \"nodeParent\":71,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":73,\n                    \"child\":[\n                        {\n                            \"type\":\"Button\",\n                            \"props\":{\"width\":500,\"var\":\"btnNext\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnNext\",\"label\":\"UI_Make_New_Life\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":73,\n                            \"label\":\"Button(btnNext)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":75,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"runtime\":\"Laya.runtime.ColorFilterItem\",\"colorFilter\":\"#ffce45ff\",\"blendMode\":\"lighter\"},\n                                    \"nodeParent\":75,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":99,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Animation\",\n                                            \"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                            \"nodeParent\":99,\n                                            \"label\":\"Animation\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":101,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"renderType\":\"mask\"},\n                                            \"nodeParent\":99,\n                                            \"label\":\"Box\",\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":102,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":103,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":104,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":105,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":106,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":107,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":108,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":109,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":110,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":111,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":112,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":113,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":102,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":114,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"runtime\":\"Laya.runtime.ColorFilterItem\",\"colorFilter\":\"#ffce45ff\",\"blendMode\":\"lighter\"},\n                                    \"nodeParent\":75,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":100,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"renderType\":\"mask\"},\n                                            \"nodeParent\":100,\n                                            \"label\":\"Box\",\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":115,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":115,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":116,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":115,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":117,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":115,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":118,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Animation\",\n                                            \"props\":{\"y\":172,\"x\":250,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":4,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                            \"nodeParent\":100,\n                                            \"label\":\"Animation\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":119,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/CyberSummary.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":8,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"sceneBg\":\"laya/views/view/CyberTheme/CyberSummary.png\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":40,\"right\":0,\"name\":\"title\",\"left\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(title)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Image\",\n                    \"props\":{\"skin\":\"images/accessories/titlebar@3x.png\",\"right\":0,\"left\":0},\n                    \"nodeParent\":2,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":3,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"HBox\",\n                    \"props\":{\"y\":160,\"x\":563,\"space\":30,\"height\":70,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":2,\n                    \"label\":\"HBox\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":4,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":10,\"x\":1,\"skin\":\"images/accessories/title_left@3x.png\",\"name\":\"left\"},\n                            \"nodeParent\":4,\n                            \"label\":\"Image(left)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":5,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"y\":0,\"x\":2,\"text\":\"UI_Title_Summary\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\"},\n                            \"nodeParent\":4,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":6,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":10,\"x\":3,\"skin\":\"images/accessories/title_right@3x.png\",\"name\":\"right\"},\n                            \"nodeParent\":4,\n                            \"label\":\"Image(right)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":7,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":340,\"x\":40,\"top\":340,\"right\":40,\"name\":\"summary\",\"left\":40,\"height\":870},\n            \"nodeParent\":1,\n            \"label\":\"Box(summary)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":8,\n            \"child\":[\n                {\n                    \"type\":\"Image\",\n                    \"props\":{\"top\":-15,\"skin\":\"images/border/border_2@3x.png\",\"right\":-15,\"left\":-15,\"bottom\":-15},\n                    \"nodeParent\":8,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":11,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"top\":60,\"right\":50,\"left\":50,\"height\":220},\n                    \"nodeParent\":8,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":227,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":220,\"left\":20,\"height\":220,\"centerY\":0},\n                            \"nodeParent\":227,\n                            \"label\":\"Box\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":228,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"top\":0,\"right\":0,\"left\":250,\"height\":100},\n                            \"nodeParent\":227,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":229,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":320,\"top\":5,\"left\":5,\"bottom\":5},\n                                    \"nodeParent\":229,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":231,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":231,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":234,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"HBox\",\n                                            \"props\":{\"left\":20,\"centerY\":0},\n                                            \"nodeParent\":231,\n                                            \"label\":\"HBox\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":239,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":0,\"text\":\"UI_Final_Age\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":239,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":237,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":1,\"text\":\"UI_Colon\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":239,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":238,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labAge\",\"text\":\"0\",\"right\":40,\"name\":\"labAge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"align\":\"center\"},\n                                            \"nodeParent\":231,\n                                            \"label\":\"Label(labAge)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":236,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"width\":220,\"var\":\"labAgeJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labAgeJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                    \"nodeParent\":229,\n                                    \"label\":\"Label(labAgeJudge)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":226,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"right\":0,\"left\":250,\"height\":100,\"bottom\":0},\n                            \"nodeParent\":227,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":230,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":320,\"top\":5,\"left\":5,\"bottom\":5},\n                                    \"nodeParent\":230,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":240,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":240,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":241,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"HBox\",\n                                            \"props\":{\"left\":20,\"centerY\":0},\n                                            \"nodeParent\":240,\n                                            \"label\":\"HBox\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":242,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":0,\"text\":\"UI_Total_Judge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":242,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":243,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":1,\"text\":\"UI_Colon\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":242,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":244,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labTotal\",\"text\":\"0\",\"right\":40,\"name\":\"labTotal\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"align\":\"center\"},\n                                            \"nodeParent\":240,\n                                            \"label\":\"Label(labTotal)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":245,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"width\":220,\"var\":\"labTotalJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labTotalJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                    \"nodeParent\":230,\n                                    \"label\":\"Label(labTotalJudge)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":225,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                },\n                {\n                    \"type\":\"VBox\",\n                    \"props\":{\"top\":340,\"space\":5,\"right\":50,\"left\":50},\n                    \"nodeParent\":8,\n                    \"label\":\"VBox\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":16,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":0,\"right\":0,\"name\":\"boxCharm\",\"left\":0,\"height\":90},\n                            \"nodeParent\":16,\n                            \"label\":\"Box(boxCharm)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":17,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":17,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":18,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_chr@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":18,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":19,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":170,\"text\":\"UI_Property_Charm\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":17,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":20,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"var\":\"boxCharmGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxCharmGrade\",\"left\":255,\"bottom\":20},\n                                    \"nodeParent\":17,\n                                    \"label\":\"Box(boxCharmGrade)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":200,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"ProgressBar\",\n                                            \"props\":{\"var\":\"prgCharm\",\"value\":0.91,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgCharm\",\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":200,\n                                            \"label\":\"ProgressBar(prgCharm)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":199,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labCharm\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labCharm\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                            \"nodeParent\":200,\n                                            \"label\":\"Label(labCharm)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":251,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"width\":220,\"var\":\"labCharmJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labCharmJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                    \"nodeParent\":17,\n                                    \"label\":\"Label(labCharmJudge)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":219,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":1,\"right\":0,\"name\":\"boxIntelligence\",\"left\":0,\"height\":90},\n                            \"nodeParent\":16,\n                            \"label\":\"Box(boxIntelligence)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":47,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":47,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":48,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_int@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":48,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":49,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":170,\"text\":\"UI_Property_Intelligence\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":47,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":50,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"var\":\"boxIntelligenceGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxIntelligenceGrade\",\"left\":255,\"bottom\":20},\n                                    \"nodeParent\":47,\n                                    \"label\":\"Box(boxIntelligenceGrade)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":211,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"ProgressBar\",\n                                            \"props\":{\"var\":\"prgIntelligence\",\"value\":0.57,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgIntelligence\",\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":211,\n                                            \"label\":\"ProgressBar(prgIntelligence)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":212,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labIntelligence\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labIntelligence\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                            \"nodeParent\":211,\n                                            \"label\":\"Label(labIntelligence)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":249,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"width\":220,\"var\":\"labIntelligenceJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labIntelligenceJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                    \"nodeParent\":47,\n                                    \"label\":\"Label(labIntelligenceJudge)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":220,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":2,\"right\":0,\"name\":\"boxStrength\",\"left\":0,\"height\":90},\n                            \"nodeParent\":16,\n                            \"label\":\"Box(boxStrength)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":77,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":77,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":78,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_str@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":78,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":79,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":170,\"text\":\"UI_Property_Strength\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":77,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":80,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"var\":\"boxStrengthGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxStrengthGrade\",\"left\":255,\"bottom\":20},\n                                    \"nodeParent\":77,\n                                    \"label\":\"Box(boxStrengthGrade)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":213,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"ProgressBar\",\n                                            \"props\":{\"var\":\"prgStrength\",\"value\":0.235,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgStrength\",\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":213,\n                                            \"label\":\"ProgressBar(prgStrength)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":214,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labStrength\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labStrength\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                            \"nodeParent\":213,\n                                            \"label\":\"Label(labStrength)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":246,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"width\":220,\"var\":\"labStrengthJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labStrengthJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                    \"nodeParent\":77,\n                                    \"label\":\"Label(labStrengthJudge)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":224,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":3,\"right\":0,\"name\":\"boxMoney\",\"left\":0,\"height\":90},\n                            \"nodeParent\":16,\n                            \"label\":\"Box(boxMoney)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":107,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":107,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":108,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_mny@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":108,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":109,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":170,\"text\":\"UI_Property_Money\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":107,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":110,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"var\":\"boxMoneyGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxMoneyGrade\",\"left\":255,\"bottom\":20},\n                                    \"nodeParent\":107,\n                                    \"label\":\"Box(boxMoneyGrade)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":215,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"ProgressBar\",\n                                            \"props\":{\"var\":\"prgMoney\",\"value\":0.8,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgMoney\",\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":215,\n                                            \"label\":\"ProgressBar(prgMoney)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":216,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labMoney\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labMoney\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                            \"nodeParent\":215,\n                                            \"label\":\"Label(labMoney)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":250,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"width\":220,\"var\":\"labMoneyJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labMoneyJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                    \"nodeParent\":107,\n                                    \"label\":\"Label(labMoneyJudge)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":222,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":4,\"right\":0,\"name\":\"boxSpirit\",\"left\":0,\"height\":90},\n                            \"nodeParent\":16,\n                            \"label\":\"Box(boxSpirit)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":195,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\n                                    \"nodeParent\":195,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":196,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"skin\":\"images/icons/icon_spr@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0},\n                                            \"nodeParent\":196,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":197,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":170,\"text\":\"UI_Property_Spirit\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":195,\n                                    \"label\":\"Label\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":198,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"var\":\"boxSpiritGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxSpiritGrade\",\"left\":255,\"bottom\":20},\n                                    \"nodeParent\":195,\n                                    \"label\":\"Box(boxSpiritGrade)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":217,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"ProgressBar\",\n                                            \"props\":{\"var\":\"prgSpirit\",\"value\":0.37,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgSpirit\",\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":217,\n                                            \"label\":\"ProgressBar(prgSpirit)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":218,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labSpirit\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labSpirit\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                            \"nodeParent\":217,\n                                            \"label\":\"Label(labSpirit)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":252,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"width\":220,\"var\":\"labSpiritJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labSpiritJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n                                    \"nodeParent\":195,\n                                    \"label\":\"Label(labSpiritJudge)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":223,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":40,\"name\":\"selectedTalents\",\"left\":40,\"height\":700,\"bottom\":410},\n            \"nodeParent\":1,\n            \"label\":\"Box(selectedTalents)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":9,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":20,\"text\":\"UI_Talent_Extend\",\"left\":20,\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\"},\n                    \"nodeParent\":9,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":137,\n                    \"child\":[\n                        ],\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"List\",\n                    \"props\":{\"var\":\"listSelectedTalents\",\"vScrollBarSkin\":\" \",\"top\":110,\"spaceY\":30,\"right\":10,\"repeatY\":3,\"name\":\"listSelectedTalents\",\"left\":10,\"bottom\":10},\n                    \"nodeParent\":9,\n                    \"label\":\"List(listSelectedTalents)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":138,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":20,\"right\":10,\"renderType\":\"render\",\"left\":10,\"height\":160},\n                            \"nodeParent\":138,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":false,\n                            \"hasChild\":true,\n                            \"compId\":139,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Image\",\n                                    \"props\":{\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"name\":\"unselected\",\"left\":0,\"bottom\":0},\n                                    \"nodeParent\":139,\n                                    \"label\":\"Image(unselected)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":140,\n                                    \"child\":[\n                                        ],\n                                    \"$HIDDEN\":true\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"top\":0,\"right\":0,\"name\":\"selected\",\"left\":0,\"bottom\":0},\n                                    \"nodeParent\":139,\n                                    \"label\":\"Box(selected)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":259,\n                                    \"child\":[\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":-22,\"x\":0,\"renderType\":\"mask\"},\n                                            \"nodeParent\":259,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":true,\n                                            \"compId\":260,\n                                            \"child\":[\n                                                {\n                                                    \"x\":90,\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"width\":1800,\"lineWidth\":1,\"height\":204,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":260,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":false,\n                                                    \"hasChild\":false,\n                                                    \"compId\":261,\n                                                    \"child\":[\n                                                        ]\n                                                }],\n                                            \"$HIDDEN\":true\n                                        },\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Image\",\n                                            \"props\":{\"top\":-19,\"skin\":\"images/border/achievement_complete@3x.png\",\"right\":-19,\"left\":-80,\"bottom\":-19},\n                                            \"nodeParent\":259,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":257,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#55fffe\"},\n                                            \"nodeParent\":259,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":262,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":15,\"name\":\"grade1\",\"height\":160},\n                                    \"nodeParent\":139,\n                                    \"label\":\"Box(grade1)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":141,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#55fffe\"},\n                                            \"nodeParent\":141,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":142,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":15,\"name\":\"grade2\",\"height\":160},\n                                    \"nodeParent\":139,\n                                    \"label\":\"Box(grade2)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":143,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#b17cff\"},\n                                            \"nodeParent\":143,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":144,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":15,\"name\":\"grade3\",\"height\":160},\n                                    \"nodeParent\":139,\n                                    \"label\":\"Box(grade3)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":145,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#ffce45\"},\n                                            \"nodeParent\":145,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":146,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"text\":\"Title\",\"name\":\"labTitle\",\"left\":52,\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0},\n                                    \"nodeParent\":139,\n                                    \"label\":\"Label(labTitle)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":147,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":10,\"text\":\"descriptipn\",\"right\":33,\"name\":\"labDescription\",\"fontSize\":44,\"font\":\"方正像素12\",\"color\":\"#76979d\",\"centerY\":0},\n                                    \"nodeParent\":139,\n                                    \"label\":\"Label(labDescription)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":148,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":10,\"width\":1000,\"name\":\"buttonGroup\",\"height\":200,\"centerX\":0,\"bottom\":70},\n            \"nodeParent\":1,\n            \"label\":\"Box(buttonGroup)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":10,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Button\",\n                    \"props\":{\"y\":100,\"x\":250,\"width\":500,\"var\":\"btnAgain\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnAgain\",\"label\":\"UI_Remake_Again\",\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":10,\n                    \"label\":\"Button(btnAgain)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":150,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":150,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":151,\n                            \"child\":[\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":151,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":152,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":151,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":153,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":154,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":155,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":156,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":157,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":158,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":159,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":160,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":161,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":162,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":163,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":164,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":153,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":165,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":150,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":166,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":166,\n                                    \"label\":\"Box\",\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":167,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":167,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":168,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":167,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":169,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":167,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":170,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":166,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":171,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }],\n    \"$HIDDEN\":true\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/CyberTalent.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":21,\n    \"selecteID\":22,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"sceneBg\":\"laya/views/view/CyberTheme/CyberTalent.png\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"var\":\"pageDrawCard\",\"top\":0,\"right\":0,\"name\":\"pageDrawCard\",\"left\":0,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(pageDrawCard)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":19,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":1117,\"x\":562,\"width\":2,\"height\":2,\"centerY\":-100,\"centerX\":0},\n                    \"nodeParent\":19,\n                    \"label\":\"Box\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":4,\n                    \"child\":[\n                        {\n                            \"type\":\"Animation\",\n                            \"props\":{\"y\":1,\"x\":1,\"width\":100,\"source\":\"view/CyberTheme/animation/lightRotation.ani\",\"height\":100,\"autoPlay\":true},\n                            \"nodeParent\":4,\n                            \"label\":\"Animation\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":3,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":585,\"skin\":\"images/border/card@3x.png\",\"scaleY\":0.9,\"scaleX\":0.9,\"rotation\":15,\"centerY\":-50,\"centerX\":0,\"anchorY\":1.2,\"anchorX\":0.5,\"alpha\":0.8},\n                            \"nodeParent\":4,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":10,\n                            \"child\":[\n                                ],\n                            \"$HIDDEN\":false\n                        },\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":634,\"skin\":\"images/border/card@3x.png\",\"scaleY\":0.9,\"scaleX\":0.9,\"rotation\":-15,\"centerY\":-50,\"centerX\":0,\"anchorY\":1.2,\"anchorX\":0.5,\"alpha\":0.8},\n                            \"nodeParent\":4,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":9,\n                            \"child\":[\n                                ],\n                            \"$HIDDEN\":false\n                        },\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":634,\"skin\":\"images/border/card@3x.png\",\"centerY\":-50,\"centerX\":0,\"anchorY\":1.2,\"anchorX\":0.5,\"alpha\":0.8},\n                            \"nodeParent\":4,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":8,\n                            \"child\":[\n                                ],\n                            \"$HIDDEN\":false\n                        },\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"skin\":\"images/accessories/cardicon@3x.png\",\"centerY\":-30,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":4,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":11,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"Button\",\n                    \"props\":{\"y\":1930,\"x\":563,\"width\":657,\"var\":\"btnDrawCard\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnDrawCard\",\"labelSize\":60,\"label\":\"UI_Talent_Draw\",\"height\":192,\"centerX\":0},\n                    \"nodeParent\":19,\n                    \"label\":\"Button(btnDrawCard)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":5,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":5,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":56,\n                            \"child\":[\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":93,\"x\":330,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":5,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":56,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":58,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":56,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":59,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":60,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":625,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":61,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":44,\"width\":569,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":62,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":171,\"width\":316,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":63,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":64,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":493,\"width\":120,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":65,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":66,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":487,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":67,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":68,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":613,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":69,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":70,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":153,\"x\":632,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":59,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":71,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":5,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":57,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":57,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":72,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":72,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":73,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":621,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":72,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":74,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,305,0,311,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":72,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":75,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":172,\"x\":330,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":4,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":57,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":76,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }],\n                    \"$HIDDEN\":false\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":0,\"x\":0,\"var\":\"pageResult\",\"top\":0,\"right\":0,\"name\":\"pageResult\",\"left\":0,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(pageResult)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":21,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"List\",\n                    \"props\":{\"width\":1085,\"var\":\"listTalents\",\"vScrollBarSkin\":\" \",\"top\":310,\"name\":\"listTalents\",\"centerX\":0,\"bottom\":370},\n                    \"nodeParent\":21,\n                    \"label\":\"List(listTalents)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":22,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":537,\"renderType\":\"render\",\"height\":352},\n                            \"nodeParent\":22,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":false,\n                            \"hasChild\":true,\n                            \"compId\":23,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"top\":0,\"skin\":\"images/border/talent_item@3x.png\",\"right\":0,\"name\":\"unselected\",\"left\":0,\"bottom\":0},\n                                    \"nodeParent\":23,\n                                    \"label\":\"Image(unselected)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":24,\n                                    \"child\":[\n                                        ],\n                                    \"$HIDDEN\":false\n                                },\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"top\":0,\"skin\":\"images/border/talent_item_selected@3x.png\",\"right\":0,\"name\":\"selected\",\"left\":0,\"bottom\":3},\n                                    \"nodeParent\":23,\n                                    \"label\":\"Image(selected)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":25,\n                                    \"child\":[\n                                        ],\n                                    \"$HIDDEN\":false\n                                },\n                                {\n                                    \"type\":\"HBox\",\n                                    \"props\":{\"top\":104,\"space\":15,\"name\":\"hboxTitle\",\"left\":66,\"height\":58},\n                                    \"nodeParent\":23,\n                                    \"label\":\"HBox(hboxTitle)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":true,\n                                    \"compId\":26,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":0,\"width\":15,\"name\":\"grades\",\"height\":58},\n                                            \"nodeParent\":26,\n                                            \"label\":\"Box(grades)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":true,\n                                            \"compId\":108,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":15,\"name\":\"grade1\",\"height\":58},\n                                                    \"nodeParent\":108,\n                                                    \"label\":\"Box(grade1)\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":false,\n                                                    \"hasChild\":true,\n                                                    \"compId\":27,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Sprite\",\n                                                            \"props\":{},\n                                                            \"nodeParent\":27,\n                                                            \"label\":\"Sprite\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":false,\n                                                            \"hasChild\":true,\n                                                            \"compId\":28,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"width\":15,\"lineWidth\":1,\"height\":58,\"fillColor\":\"#55fffe\"},\n                                                                    \"nodeParent\":28,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":false,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":29,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }],\n                                                            \"$HIDDEN\":false\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":15,\"name\":\"grade2\",\"height\":58},\n                                                    \"nodeParent\":108,\n                                                    \"label\":\"Box(grade2)\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":false,\n                                                    \"hasChild\":true,\n                                                    \"compId\":105,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Sprite\",\n                                                            \"props\":{},\n                                                            \"nodeParent\":105,\n                                                            \"label\":\"Sprite\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":false,\n                                                            \"hasChild\":true,\n                                                            \"compId\":106,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"width\":15,\"lineWidth\":1,\"height\":58,\"fillColor\":\"#b17cff\"},\n                                                                    \"nodeParent\":106,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":false,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":107,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }],\n                                                            \"$HIDDEN\":false\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":15,\"name\":\"grade3\",\"height\":58},\n                                                    \"nodeParent\":108,\n                                                    \"label\":\"Box(grade3)\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":false,\n                                                    \"hasChild\":true,\n                                                    \"compId\":102,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Sprite\",\n                                                            \"props\":{},\n                                                            \"nodeParent\":102,\n                                                            \"label\":\"Sprite\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":false,\n                                                            \"hasChild\":true,\n                                                            \"compId\":103,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"width\":15,\"lineWidth\":1,\"height\":58,\"fillColor\":\"#ffce45\"},\n                                                                    \"nodeParent\":103,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":false,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":104,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }],\n                                                            \"$HIDDEN\":false\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"x\":1,\"text\":\"Title\",\"name\":\"labTitle\",\"fontSize\":58,\"font\":\"方正像素12\",\"color\":\"#ffffff\"},\n                                            \"nodeParent\":26,\n                                            \"label\":\"Label(labTitle)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":false,\n                                            \"hasChild\":false,\n                                            \"compId\":30,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":205,\"wordWrap\":true,\"text\":\"description\",\"right\":66,\"name\":\"labDescription\",\"left\":66,\"leading\":8,\"fontSize\":44,\"font\":\"方正像素12\",\"color\":\"#9dacaf\"},\n                                    \"nodeParent\":23,\n                                    \"label\":\"Label(labDescription)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":32,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }],\n                    \"$LOCKED\":true,\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"right\":0,\"left\":0,\"height\":1,\"bottom\":0},\n                    \"nodeParent\":21,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":109,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Button\",\n                            \"props\":{\"width\":1040,\"var\":\"btnNext\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnNext\",\"labelSize\":60,\"label\":\"UI_Next\",\"height\":192,\"centerY\":-180,\"centerX\":0},\n                            \"nodeParent\":109,\n                            \"label\":\"Button(btnNext)\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":33,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{},\n                                    \"nodeParent\":33,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":78,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Animation\",\n                                            \"props\":{\"y\":96,\"x\":520,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":7,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                            \"nodeParent\":78,\n                                            \"label\":\"Animation\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":80,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"renderType\":\"mask\"},\n                                            \"nodeParent\":78,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":false,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":81,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":82,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":37,\"x\":1010,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":83,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":21,\"x\":44,\"width\":954,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":84,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":150,\"x\":171,\"width\":700,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":85,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":86,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":163,\"x\":877,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":87,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":88,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":150,\"x\":871,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":89,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":90,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":21,\"x\":998,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":91,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":92,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":153,\"x\":1017,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                                    \"nodeParent\":81,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":93,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{},\n                                    \"nodeParent\":33,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":79,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"renderType\":\"mask\"},\n                                            \"nodeParent\":79,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":94,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":94,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":95,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":41,\"x\":1004,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":94,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":96,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Poly\",\n                                                    \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,687,0,693,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                                    \"nodeParent\":94,\n                                                    \"label\":\"Poly\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":97,\n                                                    \"child\":[\n                                                        ],\n                                                    \"$HIDDEN\":false\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Animation\",\n                                            \"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                            \"nodeParent\":79,\n                                            \"label\":\"Animation\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":98,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":40,\"right\":0,\"name\":\"title\",\"left\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(title)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":20,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Image\",\n                    \"props\":{\"skin\":\"images/accessories/titlebar@3x.png\",\"right\":0,\"left\":0},\n                    \"nodeParent\":20,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":12,\n                    \"child\":[\n                        ],\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"HBox\",\n                    \"props\":{\"y\":160,\"x\":563,\"space\":30,\"height\":70,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":20,\n                    \"label\":\"HBox\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":13,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":10,\"x\":1,\"skin\":\"images/accessories/title_left@3x.png\",\"name\":\"left\"},\n                            \"nodeParent\":13,\n                            \"label\":\"Image(left)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":14,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"y\":0,\"x\":2,\"text\":\"UI_Title_Talent\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\"},\n                            \"nodeParent\":13,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":17,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"y\":10,\"x\":3,\"skin\":\"images/accessories/title_right@3x.png\",\"name\":\"right\"},\n                            \"nodeParent\":13,\n                            \"label\":\"Image(right)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":15,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }],\n    \"$HIDDEN\":false\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/CyberTrajectory.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":88,\n    \"selecteID\":153,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"sceneBg\":\"laya/views/view/CyberTheme/CyberTrajectory.png\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Sprite\",\n            \"props\":{\"y\":0,\"x\":0},\n            \"nodeParent\":1,\n            \"label\":\"Sprite\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":29,\n            \"child\":[\n                {\n                    \"type\":\"Rect\",\n                    \"props\":{\"width\":1125,\"lineWidth\":1,\"height\":2436,\"fillColor\":\"#04131f\"},\n                    \"nodeParent\":29,\n                    \"label\":\"Rect\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":30,\n                    \"child\":[\n                        ],\n                    \"$HIDDEN\":false\n                }],\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":126,\"right\":20,\"left\":20,\"height\":275},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":31,\n            \"child\":[\n                {\n                    \"type\":\"Image\",\n                    \"props\":{\"top\":-13,\"skin\":\"images/border/border_2@3x.png\",\"right\":-13,\"left\":-13,\"bottom\":-13},\n                    \"nodeParent\":31,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":35,\n                    \"child\":[\n                        ],\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":192,\"left\":36,\"height\":192,\"centerY\":0},\n                    \"nodeParent\":31,\n                    \"label\":\"Box\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":32,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"VBox\",\n                    \"props\":{\"space\":13,\"right\":45,\"left\":242,\"centerY\":0,\"align\":\"left\"},\n                    \"nodeParent\":31,\n                    \"label\":\"VBox\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":72,\n                    \"child\":[\n                        {\n                            \"type\":\"HBox\",\n                            \"props\":{\"y\":1,\"space\":13,\"align\":\"middle\"},\n                            \"nodeParent\":72,\n                            \"label\":\"HBox\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":71,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"x\":1,\"width\":260,\"name\":\"boxCharm\",\"height\":82},\n                                    \"nodeParent\":71,\n                                    \"label\":\"Box(boxCharm)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":34,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":34,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":36,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":82,\"left\":5,\"height\":82},\n                                            \"nodeParent\":34,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":37,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Image\",\n                                                    \"props\":{\"skin\":\"images/icons/icon_chr@3x.png\",\"centerY\":0,\"centerX\":0},\n                                                    \"nodeParent\":37,\n                                                    \"label\":\"Image\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":38,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"text\":\"UI_Property_Charm\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                            \"nodeParent\":34,\n                                            \"label\":\"Label\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":39,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\n                                            \"nodeParent\":34,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":41,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labCharm\",\"text\":\"10\",\"name\":\"labCharm\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                                    \"nodeParent\":41,\n                                                    \"label\":\"Label(labCharm)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":40,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        }],\n                                    \"$HIDDEN\":false\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"x\":2,\"width\":260,\"name\":\"boxMoney\",\"height\":82},\n                                    \"nodeParent\":71,\n                                    \"label\":\"Box(boxMoney)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":43,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":43,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":44,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":82,\"left\":5,\"height\":82},\n                                            \"nodeParent\":43,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":45,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Image\",\n                                                    \"props\":{\"skin\":\"images/icons/icon_mny@3x.png\",\"centerY\":0,\"centerX\":0},\n                                                    \"nodeParent\":45,\n                                                    \"label\":\"Image\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":46,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"text\":\"UI_Property_Money\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                            \"nodeParent\":43,\n                                            \"label\":\"Label\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":47,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\n                                            \"nodeParent\":43,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":48,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labMoney\",\"text\":\"10\",\"name\":\"labMoney\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                                    \"nodeParent\":48,\n                                                    \"label\":\"Label(labMoney)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":49,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"x\":3,\"width\":260,\"name\":\"boxIntelligence\",\"height\":82},\n                                    \"nodeParent\":71,\n                                    \"label\":\"Box(boxIntelligence)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":50,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":50,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":51,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":82,\"left\":5,\"height\":82},\n                                            \"nodeParent\":50,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":52,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Image\",\n                                                    \"props\":{\"skin\":\"images/icons/icon_int@3x.png\",\"centerY\":0,\"centerX\":0},\n                                                    \"nodeParent\":52,\n                                                    \"label\":\"Image\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":53,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"text\":\"UI_Property_Intelligence\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                            \"nodeParent\":50,\n                                            \"label\":\"Label\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":54,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\n                                            \"nodeParent\":50,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":55,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labIntelligence\",\"text\":\"10\",\"name\":\"labIntelligence\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                                    \"nodeParent\":55,\n                                                    \"label\":\"Label(labIntelligence)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":56,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        }],\n                                    \"$HIDDEN\":false\n                                }]\n                        },\n                        {\n                            \"type\":\"HBox\",\n                            \"props\":{\"y\":2,\"space\":13,\"align\":\"middle\"},\n                            \"nodeParent\":72,\n                            \"label\":\"HBox\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":73,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"x\":0,\"width\":260,\"name\":\"boxStrength\",\"height\":82},\n                                    \"nodeParent\":73,\n                                    \"label\":\"Box(boxStrength)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":74,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":74,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":75,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":82,\"left\":5,\"height\":82},\n                                            \"nodeParent\":74,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":76,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Image\",\n                                                    \"props\":{\"skin\":\"images/icons/icon_str@3x.png\",\"centerY\":0,\"centerX\":0},\n                                                    \"nodeParent\":76,\n                                                    \"label\":\"Image\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":77,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"text\":\"UI_Property_Strength\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                            \"nodeParent\":74,\n                                            \"label\":\"Label\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":78,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\n                                            \"nodeParent\":74,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":79,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labStrength\",\"text\":\"10\",\"name\":\"labStrength\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                                    \"nodeParent\":79,\n                                                    \"label\":\"Label(labStrength)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":80,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":260,\"name\":\"boxSpirit\",\"height\":82},\n                                    \"nodeParent\":73,\n                                    \"label\":\"Box(boxSpirit)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":81,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Image\",\n                                            \"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                                            \"nodeParent\":81,\n                                            \"label\":\"Image\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":82,\n                                            \"child\":[\n                                                ],\n                                            \"$HIDDEN\":false\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":82,\"left\":5,\"height\":82},\n                                            \"nodeParent\":81,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":83,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Image\",\n                                                    \"props\":{\"skin\":\"images/icons/icon_spr@3x.png\",\"centerY\":0,\"centerX\":0},\n                                                    \"nodeParent\":83,\n                                                    \"label\":\"Image\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":84,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"text\":\"UI_Property_Spirit\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                            \"nodeParent\":81,\n                                            \"label\":\"Label\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":85,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\n                                            \"nodeParent\":81,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":86,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"var\":\"labSpirit\",\"text\":\"10\",\"name\":\"labSpirit\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5},\n                                                    \"nodeParent\":86,\n                                                    \"label\":\"Label(labSpirit)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":87,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        }]\n                                }],\n                            \"$HIDDEN\":false\n                        }],\n                    \"$HIDDEN\":false\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":0,\"left\":0,\"height\":1,\"bottom\":-1},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":14,\n            \"child\":[\n                {\n                    \"type\":\"Button\",\n                    \"props\":{\"y\":-155,\"width\":500,\"var\":\"btnSummary\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnSummary\",\"label\":\"UI_Goto_Summary\",\"centerX\":0},\n                    \"nodeParent\":14,\n                    \"label\":\"Button(btnSummary)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":13,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":13,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":130,\n                            \"child\":[\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":130,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":132,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":130,\n                                    \"label\":\"Box\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":133,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":134,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":135,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":136,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":137,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":138,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":139,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":140,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":141,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":142,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":143,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":144,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Rect\",\n                                            \"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"},\n                                            \"nodeParent\":133,\n                                            \"label\":\"Rect\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":145,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{},\n                            \"nodeParent\":13,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":131,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"renderType\":\"mask\"},\n                                    \"nodeParent\":131,\n                                    \"label\":\"Box\",\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":146,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":146,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":147,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":146,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":148,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"type\":\"Poly\",\n                                            \"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"},\n                                            \"nodeParent\":146,\n                                            \"label\":\"Poly\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":149,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"Animation\",\n                                    \"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true},\n                                    \"nodeParent\":131,\n                                    \"label\":\"Animation\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":150,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }],\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":-155,\"var\":\"boxSpeed\",\"right\":100,\"name\":\"boxSpeed\",\"left\":100,\"height\":150,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":14,\n                    \"label\":\"Box(boxSpeed)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":104,\n                    \"child\":[\n                        {\n                            \"type\":\"ProgressBar\",\n                            \"props\":{\"var\":\"prgSpeed\",\"skin\":\"images/progress/progress_s.png\",\"right\":0,\"name\":\"prgSpeed\",\"left\":0,\"bottom\":0},\n                            \"nodeParent\":104,\n                            \"label\":\"ProgressBar(prgSpeed)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":105,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"HScrollBar\",\n                            \"props\":{\"var\":\"scbSpeed\",\"skin\":\"images/slider/hslider_s.png\",\"right\":0,\"name\":\"scbSpeed\",\"min\":0,\"max\":1000,\"left\":0,\"height\":60,\"bottom\":0},\n                            \"nodeParent\":104,\n                            \"label\":\"HScrollBar(scbSpeed)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":106,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Manual\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bottom\":70},\n                            \"nodeParent\":104,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":107,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Auto\",\"right\":0,\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bottom\":70},\n                            \"nodeParent\":104,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":108,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":440,\"right\":20,\"left\":20,\"bottom\":250},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":102,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Image\",\n                    \"props\":{\"top\":0,\"skin\":\"images/border/border_1@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                    \"nodeParent\":102,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":6,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Panel\",\n                    \"props\":{\"var\":\"panelTrajectory\",\"vScrollBarSkin\":\"images/slider/vslider_1@3x.png\",\"top\":80,\"right\":20,\"name\":\"panelTrajectory\",\"left\":0,\"bottom\":80},\n                    \"nodeParent\":102,\n                    \"label\":\"Panel(panelTrajectory)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":18,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"VBox\",\n                            \"props\":{\"var\":\"vboxTrajectory\",\"top\":0,\"right\":40,\"name\":\"vboxTrajectory\",\"left\":20},\n                            \"nodeParent\":18,\n                            \"label\":\"VBox(vboxTrajectory)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":17,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"right\":0,\"name\":\"boxTrajectoryItem\",\"left\":0},\n                                    \"nodeParent\":17,\n                                    \"label\":\"Box(boxTrajectoryItem)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":88,\n                                    \"child\":[\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"width\":10,\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"boxGrade\",\"left\":0,\"height\":50},\n                                            \"nodeParent\":88,\n                                            \"label\":\"Box(boxGrade)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":153,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"HBox\",\n                                            \"props\":{\"y\":0,\"x\":220,\"name\":\"hboxAge\",\"anchorX\":1,\"align\":\"middle\"},\n                                            \"nodeParent\":88,\n                                            \"label\":\"HBox(hboxAge)\",\n                                            \"isOpen\":false,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":91,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":0,\"text\":\"3000\",\"name\":\"labAge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#cfea5c\",\"anchorX\":0},\n                                                    \"nodeParent\":91,\n                                                    \"label\":\"Label(labAge)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":90,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":1,\"text\":\"岁\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#cfea5c\",\"anchorX\":0},\n                                                    \"nodeParent\":91,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":94,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":2,\"text\":\"：\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#cfea5c\",\"anchorX\":0},\n                                                    \"nodeParent\":91,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":92,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Label\",\n                                            \"props\":{\"wordWrap\":true,\"text\":\"你的父母开始辅导你数学和英语，智力+1\",\"right\":0,\"name\":\"labContent\",\"left\":240,\"leading\":44,\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\"},\n                                            \"nodeParent\":88,\n                                            \"label\":\"Label(labContent)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":95,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        }],\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":20,\"x\":20,\"var\":\"btnUp\",\"top\":20,\"right\":20,\"name\":\"btnUp\",\"left\":20,\"height\":50},\n                    \"nodeParent\":102,\n                    \"label\":\"Box(btnUp)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":19,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                            \"nodeParent\":19,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":20,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":60,\"height\":60,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":19,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":22,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"skin\":\"images/icons/icon_up@3x.png\",\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":22,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":24,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":1676,\"x\":20,\"var\":\"btnDown\",\"right\":20,\"name\":\"btnDown\",\"left\":20,\"height\":50,\"bottom\":20},\n                    \"nodeParent\":102,\n                    \"label\":\"Box(btnDown)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":25,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"left\":0,\"bottom\":0},\n                            \"nodeParent\":25,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":26,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":60,\"rotation\":180,\"height\":60,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":25,\n                            \"label\":\"Box\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":27,\n                            \"child\":[\n                                {\n                                    \"type\":\"Image\",\n                                    \"props\":{\"skin\":\"images/icons/icon_up@3x.png\",\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":27,\n                                    \"label\":\"Image\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":28,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":10,\"var\":\"boxParticle\",\"name\":\"boxParticle\",\"height\":10,\"centerY\":0,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(boxParticle)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":152,\n            \"child\":[\n                {\n                    \"type\":\"Particle2D\",\n                    \"source\":\"particle/fly.part\",\n                    \"props\":{\"y\":5,\"x\":5,\"url\":\"particle/fly.part\",\"autoPlay\":true},\n                    \"nodeParent\":152,\n                    \"label\":\"Particle2D\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":151,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/Mode.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":8,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":10,\"x\":10,\"width\":600,\"var\":\"btnCustom\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btn\",\"height\":400,\"centerY\":-400,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnCustom)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Image\",\n                    \"props\":{\"top\":-15,\"skin\":\"images/border/achievement_complete@3x.png\",\"right\":-15,\"left\":-15,\"bottom\":-15},\n                    \"nodeParent\":2,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":10,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":50,\"text\":\"UI_CustomMode\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerX\":0,\"bold\":true},\n                    \"nodeParent\":2,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":4,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":200,\"text\":\"UI_CustomModeDescription\",\"right\":0,\"left\":0,\"leading\":20,\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#bcbcbc\",\"bottom\":0,\"align\":\"center\"},\n                    \"nodeParent\":2,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":5,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":10,\"x\":20,\"width\":600,\"var\":\"btnCelebrity\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btn\",\"height\":400,\"centerY\":400,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnCelebrity)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":3,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Image\",\n                    \"props\":{\"y\":-15,\"x\":-15,\"top\":-15,\"skin\":\"images/border/achievement_complete@3x.png\",\"right\":-15,\"left\":-15,\"bottom\":-15},\n                    \"nodeParent\":3,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":11,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":50,\"text\":\"UI_CelebrityMode\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerX\":0,\"bold\":true},\n                    \"nodeParent\":3,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":7,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":200,\"text\":\"UI_CelebrityModeDescription\",\"right\":0,\"left\":0,\"leading\":20,\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#bcbcbc\",\"bottom\":0,\"align\":\"center\"},\n                    \"nodeParent\":3,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":8,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/animation/bottomBreath.ani",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"props\":{\"sceneWidth\":200,\"sceneHeight\":200,\"sceneColor\":\"#000000\"},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isDirectory\":false,\n    \"isAniNode\":true,\n    \"hasChild\":false,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"type\":\"GraphicNode\",\n            \"props\":{},\n            \"nodeParent\":1,\n            \"label\":\"GraphicNode\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":2,\n            \"child\":[\n                ]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                {\n                    \"target\":2,\n                    \"keyframes\":{\n                        \"y\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"y\",\n                                \"index\":0\n                            }],\n                        \"x\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"x\",\n                                \"index\":0\n                            }],\n                        \"skin\":[\n                            {\n                                \"value\":\"images/resource/bottombreath.png\",\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":false,\n                                \"target\":2,\n                                \"key\":\"skin\",\n                                \"index\":0\n                            }],\n                        \"anchorY\":[\n                            {\n                                \"value\":1,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"anchorY\",\n                                \"index\":0\n                            }],\n                        \"anchorX\":[\n                            {\n                                \"value\":0.5,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"anchorX\",\n                                \"index\":0\n                            }],\n                        \"alpha\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"alpha\",\n                                \"index\":0\n                            },\n                            {\n                                \"value\":0.5,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"alpha\",\n                                \"index\":36\n                            },\n                            {\n                                \"value\":1,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"alpha\",\n                                \"index\":48\n                            },\n                            {\n                                \"value\":0.8,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"alpha\",\n                                \"index\":96\n                            },\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"alpha\",\n                                \"index\":120\n                            }]\n                    }\n                }],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/animation/circleFlash.ani",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"props\":{\"sceneWidth\":200,\"sceneHeight\":200,\"sceneColor\":\"#000000\"},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isDirectory\":false,\n    \"isAniNode\":true,\n    \"hasChild\":false,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"type\":\"GraphicNode\",\n            \"props\":{},\n            \"nodeParent\":1,\n            \"label\":\"GraphicNode\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":2,\n            \"child\":[\n                ]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                {\n                    \"target\":2,\n                    \"keyframes\":{\n                        \"y\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"y\",\n                                \"index\":0\n                            }],\n                        \"x\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"x\",\n                                \"index\":0\n                            }],\n                        \"skin\":[\n                            {\n                                \"value\":\"images/resource/circleflash.png\",\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":false,\n                                \"target\":2,\n                                \"key\":\"skin\",\n                                \"index\":0\n                            }],\n                        \"skewX\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"skewX\",\n                                \"index\":0\n                            }],\n                        \"scaleX\":[\n                            {\n                                \"value\":-1,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"scaleX\",\n                                \"index\":0\n                            }],\n                        \"rotation\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":0\n                            },\n                            {\n                                \"value\":-90,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":10\n                            },\n                            {\n                                \"value\":-135,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":15\n                            },\n                            {\n                                \"value\":-270,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":20\n                            },\n                            {\n                                \"value\":-360,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":25\n                            },\n                            {\n                                \"value\":-650,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":35\n                            },\n                            {\n                                \"value\":-680,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":37\n                            },\n                            {\n                                \"value\":-710,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":39\n                            },\n                            {\n                                \"value\":-720,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":41\n                            }],\n                        \"anchorY\":[\n                            {\n                                \"value\":0.5,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"anchorY\",\n                                \"index\":0\n                            }],\n                        \"anchorX\":[\n                            {\n                                \"value\":0.5,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"anchorX\",\n                                \"index\":0\n                            }]\n                    }\n                }],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/animation/jumpBackground.ani",
    "content": "{\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"props\":{\"sceneWidth\":200,\"sceneHeight\":200,\"sceneColor\":\"#000000\"},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"type\":\"GraphicNode\",\n            \"props\":{},\n            \"nodeParent\":1,\n            \"label\":\"GraphicNode\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":3,\n            \"child\":[\n                ]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                {\n                    \"target\":3,\n                    \"keyframes\":{\n                        \"y\":[\n                            {\n                                \"value\":-13,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":0\n                            },\n                            {\n                                \"value\":-13,\n                                \"tweenMethod\":\"strongOut\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":2\n                            },\n                            {\n                                \"value\":-5,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":3\n                            },\n                            {\n                                \"value\":-3,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":5\n                            },\n                            {\n                                \"value\":-15,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":6\n                            },\n                            {\n                                \"value\":-15,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":9\n                            },\n                            {\n                                \"value\":3,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":10\n                            },\n                            {\n                                \"value\":-14,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":11\n                            },\n                            {\n                                \"value\":-14,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":15\n                            },\n                            {\n                                \"value\":-22,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":16\n                            },\n                            {\n                                \"value\":-22,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":19\n                            },\n                            {\n                                \"value\":-13,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"y\",\n                                \"index\":20\n                            }],\n                        \"x\":[\n                            {\n                                \"value\":-18,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":0\n                            },\n                            {\n                                \"value\":-18,\n                                \"tweenMethod\":\"strongOut\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":2\n                            },\n                            {\n                                \"value\":-3,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":3\n                            },\n                            {\n                                \"value\":-5,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":5\n                            },\n                            {\n                                \"value\":-16,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":6\n                            },\n                            {\n                                \"value\":-12,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":9\n                            },\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":10\n                            },\n                            {\n                                \"value\":-8,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":11\n                            },\n                            {\n                                \"value\":-8,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":15\n                            },\n                            {\n                                \"value\":-11,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":16\n                            },\n                            {\n                                \"value\":-11,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":19\n                            },\n                            {\n                                \"value\":-18,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"x\",\n                                \"index\":20\n                            }],\n                        \"skin\":[\n                            {\n                                \"value\":\"images/background/background_1@3x.png\",\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":false,\n                                \"target\":3,\n                                \"key\":\"skin\",\n                                \"index\":0\n                            }],\n                        \"scaleY\":[\n                            {\n                                \"value\":1.01,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"scaleY\",\n                                \"index\":0\n                            }],\n                        \"scaleX\":[\n                            {\n                                \"value\":1.01,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":3,\n                                \"key\":\"scaleX\",\n                                \"index\":0\n                            }]\n                    }\n                }],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/CyberTheme/animation/lightRotation.ani",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"props\":{\"sceneWidth\":600,\"sceneHeight\":400,\"sceneColor\":\"#000000\"},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isDirectory\":false,\n    \"isAniNode\":true,\n    \"hasChild\":false,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"type\":\"GraphicNode\",\n            \"props\":{},\n            \"nodeParent\":1,\n            \"label\":\"GraphicNode\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":2,\n            \"child\":[\n                ]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                {\n                    \"target\":2,\n                    \"keyframes\":{\n                        \"y\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"y\",\n                                \"index\":0\n                            }],\n                        \"x\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"x\",\n                                \"index\":0\n                            }],\n                        \"width\":[\n                            {\n                                \"value\":1715,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"width\",\n                                \"index\":0\n                            }],\n                        \"skin\":[\n                            {\n                                \"value\":\"images/background/background_2@3x.png\",\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":false,\n                                \"target\":2,\n                                \"key\":\"skin\",\n                                \"index\":0\n                            }],\n                        \"rotation\":[\n                            {\n                                \"value\":0,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":0\n                            },\n                            {\n                                \"value\":360,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"rotation\",\n                                \"index\":279\n                            }],\n                        \"pivotY\":[\n                            {\n                                \"value\":862,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"pivotY\",\n                                \"index\":0\n                            }],\n                        \"pivotX\":[\n                            {\n                                \"value\":868,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"pivotX\",\n                                \"index\":0\n                            }],\n                        \"height\":[\n                            {\n                                \"value\":1716,\n                                \"tweenMethod\":\"linearNone\",\n                                \"tween\":true,\n                                \"target\":2,\n                                \"key\":\"height\",\n                                \"index\":0\n                            }]\n                    }\n                }],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Achievement.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":9,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"y\":80,\"text\":\"UI_Statistics\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Label(title)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":86,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":260,\"var\":\"btnBack\",\"top\":50,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnBack\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnBack)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":69,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"y\":1028,\"x\":332,\"text\":\"UI_Back\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":69,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":70,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":33,\"width\":1060,\"top\":230,\"height\":540,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":25,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":500,\"var\":\"boxRemakeTimes\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"boxRemakeTimes\",\"left\":0,\"height\":240},\n                    \"nodeParent\":25,\n                    \"label\":\"Box(boxRemakeTimes)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":28,\n                    \"child\":[\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"var\":\"labRemakeTimes\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-60,\"bold\":true,\"align\":\"center\"},\n                            \"nodeParent\":28,\n                            \"label\":\"Label(labRemakeTimes)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":32,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"var\":\"labRemakeTimesJudge\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":60,\"bold\":false,\"align\":\"center\"},\n                            \"nodeParent\":28,\n                            \"label\":\"Label(labRemakeTimesJudge)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":33,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":500,\"var\":\"boxAchievementCount\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxAchievementCount\",\"height\":240},\n                    \"nodeParent\":25,\n                    \"label\":\"Box(boxAchievementCount)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":29,\n                    \"child\":[\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"var\":\"labAchievementCount\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-60,\"bold\":true,\"align\":\"center\"},\n                            \"nodeParent\":29,\n                            \"label\":\"Label(labAchievementCount)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":38,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"var\":\"labAchievementCountJudge\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":60,\"bold\":false,\"align\":\"center\"},\n                            \"nodeParent\":29,\n                            \"label\":\"Label(labAchievementCountJudge)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":39,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":500,\"var\":\"boxEventRate\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"boxEventRate\",\"left\":0,\"height\":240,\"bottom\":0},\n                    \"nodeParent\":25,\n                    \"label\":\"Box(boxEventRate)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":71,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":0,\"x\":0,\"width\":500,\"var\":\"prgEventRate\",\"height\":240,\"blendMode\":\"lighter\",\"alpha\":0.1},\n                            \"nodeParent\":71,\n                            \"label\":\"Box(prgEventRate)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":82,\n                            \"child\":[\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"width\":500,\"lineWidth\":1,\"height\":240,\"fillColor\":\"#ffffff\"},\n                                    \"nodeParent\":82,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":83,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Event_Collection_Rate\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-60,\"bold\":true,\"align\":\"center\"},\n                            \"nodeParent\":71,\n                            \"label\":\"Label(font_default)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":72,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"var\":\"labEventRate\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":60,\"bold\":false,\"align\":\"center\"},\n                            \"nodeParent\":71,\n                            \"label\":\"Label(labEventRate)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":73,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":500,\"var\":\"boxTalentRate\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxTalentRate\",\"height\":240,\"bottom\":0},\n                    \"nodeParent\":25,\n                    \"label\":\"Box(boxTalentRate)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":74,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":0,\"x\":0,\"width\":500,\"var\":\"prgTalentRate\",\"height\":240,\"blendMode\":\"lighter\",\"alpha\":0.1},\n                            \"nodeParent\":74,\n                            \"label\":\"Box(prgTalentRate)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":84,\n                            \"child\":[\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"width\":500,\"lineWidth\":1,\"height\":240,\"fillColor\":\"#ffffff\"},\n                                    \"nodeParent\":84,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":85,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Talent_Collection_Rate\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-60,\"bold\":true,\"align\":\"center\"},\n                            \"nodeParent\":74,\n                            \"label\":\"Label(font_default)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":75,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"var\":\"labTalentRate\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":60,\"bold\":false,\"align\":\"center\"},\n                            \"nodeParent\":74,\n                            \"label\":\"Label(labTalentRate)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":76,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":1060,\"top\":800,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"hr\",\"height\":10,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(hr)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":91,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"top\":870,\"text\":\"UI_Achievement\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Label(title)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":92,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":945,\"width\":260,\"var\":\"btnRank\",\"top\":870,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnRank\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnRank)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":3,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Rank\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":3,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":7,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"List\",\n            \"props\":{\"width\":1080,\"var\":\"listAchievements\",\"vScrollBarSkin\":\" \",\"top\":1000,\"spaceY\":60,\"spaceX\":60,\"repeatX\":2,\"name\":\"listAchievements\",\"centerX\":0,\"bottom\":35},\n            \"nodeParent\":1,\n            \"label\":\"List(listAchievements)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":9,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":10,\"x\":10,\"width\":500,\"runtime\":\"Laya.runtime.ColorfulBox\",\"renderType\":\"render\",\"height\":320},\n                    \"nodeParent\":9,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":false,\n                    \"hasChild\":true,\n                    \"compId\":77,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"label\",\"right\":0,\"name\":\"name\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-80,\"bold\":true,\"align\":\"center\"},\n                            \"nodeParent\":77,\n                            \"label\":\"Label(name)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":false,\n                            \"hasChild\":false,\n                            \"compId\":78,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"label\",\"right\":0,\"name\":\"description\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":80,\"bold\":false,\"anchorY\":0,\"anchorX\":0,\"align\":\"center\"},\n                            \"nodeParent\":77,\n                            \"label\":\"Label(description)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":false,\n                            \"hasChild\":false,\n                            \"compId\":79,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"width\":500,\"name\":\"boxMask\",\"height\":320,\"alpha\":0.5},\n                            \"nodeParent\":77,\n                            \"label\":\"Box(boxMask)\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":false,\n                            \"hasChild\":true,\n                            \"compId\":80,\n                            \"child\":[\n                                {\n                                    \"type\":\"Rect\",\n                                    \"props\":{\"width\":500,\"lineWidth\":1,\"height\":320,\"fillColor\":\"#000000\"},\n                                    \"nodeParent\":80,\n                                    \"label\":\"Rect\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":81,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }],\n    \"$HIDDEN\":false\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/AchievementPopup.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":13,\n    \"props\":{\"y\":50,\"width\":570,\"sceneColor\":\"#000000\",\"mouseThrough\":true,\"mouseEnabled\":false,\"height\":150,\"alpha\":0.75},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"var\":\"boxBg\",\"top\":0,\"right\":0,\"name\":\"boxBg\",\"left\":0,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(boxBg)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":5,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Rect\",\n                    \"props\":{\"y\":0,\"x\":560,\"width\":10,\"lineWidth\":1,\"height\":150,\"fillColor\":\"#84ff55\"},\n                    \"nodeParent\":5,\n                    \"label\":\"Rect\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":14,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"var\":\"bg1\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":10,\"left\":0,\"bottom\":0},\n                    \"nodeParent\":5,\n                    \"label\":\"Box(bg1)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":15,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"y\":10,\"text\":\"UI_Achievement_Achieve\",\"left\":40,\"fontSize\":40,\"font\":\"SimHei\",\"color\":\"#84ff55\",\"bold\":true},\n            \"nodeParent\":1,\n            \"label\":\"Label\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":12,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"var\":\"labName\",\"text\":\"Achievement\",\"name\":\"labName\",\"left\":40,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#cccccc\",\"centerY\":30},\n            \"nodeParent\":1,\n            \"label\":\"Label(labName)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":13,\n            \"child\":[\n                ]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Celebrity.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":28,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"y\":80,\"text\":\"UI_Title_Celebrity\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Label(title)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":19,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Panel\",\n            \"props\":{\"var\":\"panelCharacter\",\"vScrollBarSkin\":\" \",\"top\":200,\"right\":0,\"name\":\"panelCharacter\",\"left\":0,\"bottom\":700},\n            \"nodeParent\":1,\n            \"label\":\"Panel(panelCharacter)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"VBox\",\n                    \"props\":{\"y\":10,\"width\":1000,\"var\":\"vboxCharacter\",\"space\":20,\"name\":\"vboxCharacter\",\"centerX\":0},\n                    \"nodeParent\":2,\n                    \"label\":\"VBox(vboxCharacter)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":8,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"right\":0,\"name\":\"boxCharacter\",\"left\":0},\n                            \"nodeParent\":8,\n                            \"label\":\"Box(boxCharacter)\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":10,\n                            \"child\":[\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxName\",\"left\":0,\"height\":100},\n                                    \"nodeParent\":10,\n                                    \"label\":\"Box(boxName)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":12,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"},\n                                            \"nodeParent\":12,\n                                            \"label\":\"Label(label)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":18,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"type\":\"VBox\",\n                                    \"props\":{\"top\":100,\"space\":20,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":25,\"name\":\"vboxStates\",\"left\":25},\n                                    \"nodeParent\":10,\n                                    \"label\":\"VBox(vboxStates)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":11,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"height\":100,\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"align\":\"center\"},\n                                            \"nodeParent\":11,\n                                            \"label\":\"Label(label)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":14,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":25,\"name\":\"boxTalent\",\"left\":25,\"height\":100},\n                            \"nodeParent\":8,\n                            \"label\":\"Box(boxTalent)\",\n                            \"isOpen\":false,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":15,\n                            \"child\":[\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"},\n                                    \"nodeParent\":15,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":17,\n                                    \"child\":[\n                                        ]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":10,\"x\":10,\"right\":0,\"name\":\"boxUniqueUnGenerate\",\"left\":0},\n                            \"nodeParent\":8,\n                            \"label\":\"Box(boxUniqueUnGenerate)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":20,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"y\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxName\",\"left\":0,\"height\":100},\n                                    \"nodeParent\":20,\n                                    \"label\":\"Box(boxName)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":21,\n                                    \"child\":[\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Label\",\n                                            \"props\":{\"valign\":\"middle\",\"text\":\"UI_UniqueWaTaShi\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"},\n                                            \"nodeParent\":21,\n                                            \"label\":\"Label(label)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":22,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"VBox\",\n                                    \"props\":{\"top\":100,\"space\":20,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":25,\"name\":\"vboxStates\",\"left\":25},\n                                    \"nodeParent\":20,\n                                    \"label\":\"VBox(vboxStates)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":23,\n                                    \"child\":[\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Label\",\n                                            \"props\":{\"y\":1,\"valign\":\"middle\",\"text\":\"UI_UniqueWaTaShiContent\",\"right\":0,\"name\":\"label\",\"left\":0,\"leading\":30,\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"align\":\"center\"},\n                                            \"nodeParent\":23,\n                                            \"label\":\"Label(label)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":24,\n                                            \"child\":[\n                                                ]\n                                        },\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":2,\"right\":0,\"name\":\"boxBtn\",\"left\":0,\"height\":150},\n                                            \"nodeParent\":23,\n                                            \"label\":\"Box(boxBtn)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":25,\n                                            \"child\":[\n                                                {\n                                                    \"x\":90,\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btn\",\"left\":50,\"height\":120,\"centerY\":0},\n                                                    \"nodeParent\":25,\n                                                    \"label\":\"Box(btn)\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":26,\n                                                    \"child\":[\n                                                        {\n                                                            \"x\":105,\n                                                            \"type\":\"Label\",\n                                                            \"props\":{\"y\":30,\"x\":290,\"text\":\"UI_GenerateNow\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                                                            \"nodeParent\":26,\n                                                            \"label\":\"Label(label)\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":27,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":480,\"var\":\"btnRetry\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnRetry\",\"height\":150,\"centerX\":0,\"bottom\":400},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnRetry)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":4,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_AllNot\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":4,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":5,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":480,\"var\":\"btnNext\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnNext\",\"height\":150,\"centerX\":0,\"bottom\":150},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnNext)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":6,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Make_New_Life\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":6,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":7,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Main.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":101,\n    \"selecteID\":102,\n    \"props\":{\"y\":1218,\"x\":562,\"width\":1125,\"sceneColor\":\"#000000\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436,\"anchorY\":0.5,\"anchorX\":0.5},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"text\":\"UI_Title_Remake\",\"name\":\"title\",\"fontSize\":130,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-260,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Label(title)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":8,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"wordWrap\":true,\"var\":\"labSubTitle\",\"text\":\"UI_Title_Subsequent\",\"right\":0,\"name\":\"title\",\"left\":0,\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#999999\",\"centerY\":-120,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"},\n            \"nodeParent\":1,\n            \"label\":\"Label(labSubTitle)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":11,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":600,\"var\":\"btnRemake\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnRemake\",\"height\":150,\"centerY\":600,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnRemake)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":85,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Remake\",\"name\":\"label\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":85,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":86,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":260,\"var\":\"btnThanks\",\"top\":50,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnSmall\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnThanks)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":15,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Thanks\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":15,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":20,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":260,\"var\":\"btnAchievement\",\"top\":180,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnSmall\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnAchievement)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":21,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Achievement\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":21,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":25,\n                    \"child\":[\n                        ]\n                }],\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":0,\"x\":0,\"width\":160,\"var\":\"btnGithub\",\"runtime\":\"Laya.runtime.ScaleButton\",\"rotation\":-45,\"name\":\"btnGithub\",\"height\":160,\"anchorY\":0,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnGithub)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":82,\n            \"child\":[\n                {\n                    \"type\":\"Rect\",\n                    \"props\":{\"y\":0,\"x\":-70,\"width\":300,\"lineWidth\":1,\"height\":140,\"fillColor\":\"#000000\"},\n                    \"nodeParent\":82,\n                    \"label\":\"Rect\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":88,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"Image\",\n                    \"props\":{\"top\":0,\"skin\":\"images/icons/icon_github.png\",\"rotation\":0,\"right\":0,\"left\":0,\"bottom\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":82,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":78,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"Rect\",\n                    \"props\":{\"y\":0,\"x\":-70,\"width\":300,\"renderType\":\"hit\",\"lineWidth\":1,\"height\":140,\"fillColor\":\"#000000\"},\n                    \"nodeParent\":82,\n                    \"label\":\"Rect\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":89,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":0,\"x\":-70,\"renderType\":\"mask\"},\n                    \"nodeParent\":82,\n                    \"label\":\"Box\",\n                    \"isOpen\":null,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":91,\n                    \"child\":[\n                        {\n                            \"type\":\"Rect\",\n                            \"props\":{\"width\":300,\"lineWidth\":1,\"height\":140,\"fillColor\":\"#000000\"},\n                            \"nodeParent\":91,\n                            \"label\":\"Rect\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":90,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":160,\"left\":50,\"height\":160,\"bottom\":50},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":92,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":160,\"var\":\"btnDiscord\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnDiscord\",\"height\":160,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":92,\n                    \"label\":\"Box(btnDiscord)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":83,\n                    \"child\":[\n                        {\n                            \"type\":\"Image\",\n                            \"props\":{\"top\":0,\"skin\":\"images/icons/icon_discord.png\",\"right\":0,\"left\":0,\"bottom\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                            \"nodeParent\":83,\n                            \"label\":\"Image\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":79,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":2201,\"x\":1020,\"width\":110,\"var\":\"btnSaveLoad\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnSmall\",\"height\":110,\"bottom\":180,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnSaveLoad)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":99,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Image\",\n                    \"props\":{\"width\":80,\"skin\":\"images/icons/icon_save.png\",\"height\":80,\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":99,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":100,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":110,\"var\":\"btnThemes\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnThemes\",\"height\":110,\"bottom\":50,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnThemes)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":96,\n            \"child\":[\n                {\n                    \"type\":\"Image\",\n                    \"props\":{\"width\":90,\"skin\":\"images/icons/icon_themes.png\",\"height\":90,\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":96,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":98,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":562,\"var\":\"banner\",\"centerX\":0,\"bottom\":100,\"anchorY\":1,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(banner)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":101,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Banner\",\"name\":\"title\",\"fontSize\":40,\"font\":\"SimHei\",\"color\":\"#ffffff\"},\n                    \"nodeParent\":101,\n                    \"label\":\"Label(title)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":102,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Mode.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":11,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":600,\"var\":\"btnCustom\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btn\",\"height\":400,\"centerY\":-400,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnCustom)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":50,\"text\":\"UI_CustomMode\",\"name\":\"font_default\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"bold\":true},\n                    \"nodeParent\":2,\n                    \"label\":\"Label(font_default)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":4,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":200,\"text\":\"UI_CustomModeDescription\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"leading\":20,\"fontSize\":40,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                    \"nodeParent\":2,\n                    \"label\":\"Label(font_default)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":5,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"runtime\":\"Laya.runtime.ColorAgentLabel\",\"name\":\"label\"},\n                    \"nodeParent\":2,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":10,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":10,\"width\":600,\"var\":\"btnCelebrity\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btn\",\"height\":400,\"centerY\":400,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnCelebrity)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":3,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":50,\"text\":\"UI_CelebrityMode\",\"name\":\"font_default\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"bold\":true},\n                    \"nodeParent\":3,\n                    \"label\":\"Label(font_default)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":8,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":200,\"text\":\"UI_CelebrityModeDescription\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"leading\":20,\"fontSize\":40,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                    \"nodeParent\":3,\n                    \"label\":\"Label(font_default)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":9,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"y\":10,\"x\":10,\"runtime\":\"Laya.runtime.ColorAgentLabel\",\"name\":\"label\"},\n                    \"nodeParent\":3,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":11,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Property.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":181,\n    \"selecteID\":184,\n    \"referenceLines\":null,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"y\":80,\"var\":\"title\",\"text\":\"UI_Title_Property\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Label(title)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":6,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":230,\"right\":40,\"name\":\"propertyAllocate\",\"left\":40,\"height\":1100},\n            \"nodeParent\":1,\n            \"label\":\"Box(propertyAllocate)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":8,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"HBox\",\n                    \"props\":{\"top\":0,\"height\":100,\"centerX\":0},\n                    \"nodeParent\":8,\n                    \"label\":\"HBox\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":50,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"x\":0,\"text\":\"UI_Left_Property_Point\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0},\n                            \"nodeParent\":50,\n                            \"label\":\"Label(font_default)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":52,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"x\":1,\"text\":\"UI_Colon\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0},\n                            \"nodeParent\":50,\n                            \"label\":\"Label(font_default)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":54,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"x\":2,\"var\":\"labLeftPropertyPoint\",\"text\":\"0\",\"name\":\"font_default\",\"fontSize\":70,\"color\":\"#ffffff\",\"centerY\":0},\n                            \"nodeParent\":50,\n                            \"label\":\"Label(labLeftPropertyPoint)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":53,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"VBox\",\n                    \"props\":{\"top\":200,\"space\":100,\"right\":50,\"left\":50},\n                    \"nodeParent\":8,\n                    \"label\":\"VBox\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":120,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":0,\"var\":\"boxCharm\",\"right\":0,\"left\":0,\"height\":130},\n                            \"nodeParent\":120,\n                            \"label\":\"Box(boxCharm)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":10,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":183,\"text\":\"UI_Property_Charm\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":10,\n                                    \"label\":\"Label(font_default)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":19,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":590,\"var\":\"boxCharmAllocate\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":30,\"name\":\"property\",\"height\":110,\"centerY\":0},\n                                    \"nodeParent\":10,\n                                    \"label\":\"Box(boxCharmAllocate)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":20,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnCharmReduce\",\"name\":\"btnCharmReduce\",\"left\":0,\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":20,\n                                            \"label\":\"Box(btnCharmReduce)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":21,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":21,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":24,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":24,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":26,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":24,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":27,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":24,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":28,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":24,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":30,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":21,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":39,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":39,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":25,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":25,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":23,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\n                                            \"nodeParent\":20,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":42,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"TextInput\",\n                                                    \"props\":{\"var\":\"inputCharm\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputCharm\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":42,\n                                                    \"label\":\"TextInput(inputCharm)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":48,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":0,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                    \"nodeParent\":42,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":223,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                    \"nodeParent\":42,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":224,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnCharmIncrease\",\"right\":0,\"name\":\"btnCharmIncrease\",\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":20,\n                                            \"label\":\"Box(btnCharmIncrease)\",\n                                            \"isOpen\":false,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":22,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":22,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":31,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":31,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":32,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":31,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":33,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":31,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":34,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":31,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":35,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":22,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":38,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":38,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":36,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":36,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":37,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":38,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":40,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":40,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":41,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":1,\"var\":\"boxIntelligence\",\"right\":0,\"left\":0,\"height\":130},\n                            \"nodeParent\":120,\n                            \"label\":\"Box(boxIntelligence)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":121,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":183,\"text\":\"UI_Property_Intelligence\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":121,\n                                    \"label\":\"Label(font_default)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":124,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":590,\"var\":\"boxIntelligenceAllocate\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":30,\"name\":\"property\",\"height\":110,\"centerY\":0},\n                                    \"nodeParent\":121,\n                                    \"label\":\"Box(boxIntelligenceAllocate)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":125,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnIntelligenceReduce\",\"name\":\"btnIntelligenceReduce\",\"left\":0,\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":125,\n                                            \"label\":\"Box(btnIntelligenceReduce)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":126,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":126,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":127,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":127,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":128,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":127,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":129,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":127,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":130,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":127,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":131,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":126,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":132,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":132,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":133,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":133,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":134,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\n                                            \"nodeParent\":125,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":135,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"TextInput\",\n                                                    \"props\":{\"var\":\"inputIntelligence\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputIntelligence\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":135,\n                                                    \"label\":\"TextInput(inputIntelligence)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":136,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":0,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                    \"nodeParent\":135,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":221,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                    \"nodeParent\":135,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":222,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnIntelligenceIncrease\",\"right\":0,\"name\":\"btnIntelligenceIncrease\",\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":125,\n                                            \"label\":\"Box(btnIntelligenceIncrease)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":140,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":140,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":141,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":141,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":142,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":141,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":143,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":141,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":144,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":141,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":145,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":140,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":146,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":146,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":147,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":147,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":148,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":146,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":149,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":149,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":150,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":2,\"var\":\"boxStrength\",\"right\":0,\"left\":0,\"height\":130},\n                            \"nodeParent\":120,\n                            \"label\":\"Box(boxStrength)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":151,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":183,\"text\":\"UI_Property_Strength\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":151,\n                                    \"label\":\"Label(font_default)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":154,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":590,\"var\":\"boxStrengthAllocate\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":30,\"name\":\"property\",\"height\":110,\"centerY\":0},\n                                    \"nodeParent\":151,\n                                    \"label\":\"Box(boxStrengthAllocate)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":155,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnStrengthReduce\",\"name\":\"btnStrengthReduce\",\"left\":0,\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":155,\n                                            \"label\":\"Box(btnStrengthReduce)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":156,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":156,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":157,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":157,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":158,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":157,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":159,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":157,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":160,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":157,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":161,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":156,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":162,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":162,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":163,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":163,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":164,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\n                                            \"nodeParent\":155,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":165,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"TextInput\",\n                                                    \"props\":{\"var\":\"inputStrength\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputStrength\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":165,\n                                                    \"label\":\"TextInput(inputStrength)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":166,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":0,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                    \"nodeParent\":165,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":219,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                    \"nodeParent\":165,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":220,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnStrengthIncrease\",\"right\":0,\"name\":\"btnStrengthIncrease\",\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":155,\n                                            \"label\":\"Box(btnStrengthIncrease)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":170,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":170,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":171,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":171,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":172,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":171,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":173,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":171,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":174,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":171,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":175,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":170,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":176,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":176,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":177,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":177,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":178,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":176,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":179,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":179,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":180,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":3,\"var\":\"boxMoney\",\"right\":0,\"left\":0,\"height\":130},\n                            \"nodeParent\":120,\n                            \"label\":\"Box(boxMoney)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":181,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"x\":183,\"text\":\"UI_Property_Money\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":181,\n                                    \"label\":\"Label(font_default)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":184,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"width\":590,\"var\":\"boxMoneyAllocate\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":30,\"name\":\"property\",\"height\":110,\"centerY\":0},\n                                    \"nodeParent\":181,\n                                    \"label\":\"Box(boxMoneyAllocate)\",\n                                    \"isOpen\":false,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":185,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnMoneyReduce\",\"name\":\"btnMoneyReduce\",\"left\":0,\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":185,\n                                            \"label\":\"Box(btnMoneyReduce)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":186,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":186,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":187,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":187,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":188,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":187,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":189,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":187,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":190,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":187,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":191,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":186,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":192,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":192,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":193,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":193,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":194,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\n                                            \"nodeParent\":185,\n                                            \"label\":\"Box\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":195,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"TextInput\",\n                                                    \"props\":{\"var\":\"inputMoney\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputMoney\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"},\n                                                    \"nodeParent\":195,\n                                                    \"label\":\"TextInput(inputMoney)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":196,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":0,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                    \"nodeParent\":195,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":217,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Rect\",\n                                                    \"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                    \"nodeParent\":195,\n                                                    \"label\":\"Rect\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":218,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"type\":\"Box\",\n                                            \"props\":{\"width\":110,\"var\":\"btnMoneyIncrease\",\"right\":0,\"name\":\"btnMoneyIncrease\",\"height\":110,\"centerY\":0},\n                                            \"nodeParent\":185,\n                                            \"label\":\"Box(btnMoneyIncrease)\",\n                                            \"isOpen\":true,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":200,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":200,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":201,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":201,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":202,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":201,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":203,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":201,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":204,\n                                                            \"child\":[\n                                                                ]\n                                                        },\n                                                        {\n                                                            \"type\":\"Rect\",\n                                                            \"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"},\n                                                            \"nodeParent\":201,\n                                                            \"label\":\"Rect\",\n                                                            \"isDirectory\":false,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":false,\n                                                            \"compId\":205,\n                                                            \"child\":[\n                                                                ]\n                                                        }]\n                                                },\n                                                {\n                                                    \"type\":\"Box\",\n                                                    \"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                    \"nodeParent\":200,\n                                                    \"label\":\"Box\",\n                                                    \"isOpen\":true,\n                                                    \"isDirectory\":true,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":true,\n                                                    \"compId\":206,\n                                                    \"child\":[\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":206,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":207,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":207,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":208,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        },\n                                                        {\n                                                            \"type\":\"Box\",\n                                                            \"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                                            \"nodeParent\":206,\n                                                            \"label\":\"Box\",\n                                                            \"isOpen\":true,\n                                                            \"isDirectory\":true,\n                                                            \"isAniNode\":true,\n                                                            \"hasChild\":true,\n                                                            \"compId\":209,\n                                                            \"child\":[\n                                                                {\n                                                                    \"type\":\"Rect\",\n                                                                    \"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"},\n                                                                    \"nodeParent\":209,\n                                                                    \"label\":\"Rect\",\n                                                                    \"isDirectory\":false,\n                                                                    \"isAniNode\":true,\n                                                                    \"hasChild\":false,\n                                                                    \"compId\":210,\n                                                                    \"child\":[\n                                                                        ]\n                                                                }]\n                                                        }]\n                                                }]\n                                        }]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":40,\"name\":\"selectedTalents\",\"left\":40,\"height\":450,\"bottom\":300},\n            \"nodeParent\":1,\n            \"label\":\"Box(selectedTalents)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":56,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":20,\"text\":\"UI_Selected_Talent\",\"name\":\"font_default\",\"left\":20,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\"},\n                    \"nodeParent\":56,\n                    \"label\":\"Label(font_default)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":57,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"List\",\n                    \"props\":{\"var\":\"listSelectedTalents\",\"vScrollBarSkin\":\" \",\"top\":110,\"spaceY\":20,\"right\":10,\"repeatY\":3,\"repeatX\":1,\"name\":\"listSelectedTalents\",\"left\":10,\"bottom\":10},\n                    \"nodeParent\":56,\n                    \"label\":\"List(listSelectedTalents)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":58,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":15,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":15,\"renderType\":\"render\",\"left\":15,\"height\":80},\n                            \"nodeParent\":58,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":false,\n                            \"hasChild\":true,\n                            \"compId\":215,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":20,\"text\":\"Title\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":215,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":216,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"HBox\",\n            \"props\":{\"space\":40,\"name\":\"buttonGroup\",\"height\":150,\"centerX\":0,\"bottom\":90},\n            \"nodeParent\":1,\n            \"label\":\"HBox(buttonGroup)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":212,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":0,\"x\":0,\"width\":480,\"var\":\"btnRandomAllocate\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnRandomAllocate\",\"bottom\":0},\n                    \"nodeParent\":212,\n                    \"label\":\"Box(btnRandomAllocate)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":72,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Random_Allocate\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":72,\n                            \"label\":\"Label(label)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":213,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"x\":1,\"width\":480,\"var\":\"btnNext\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnNext\",\"bottom\":0},\n                    \"nodeParent\":212,\n                    \"label\":\"Box(btnNext)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":73,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Make_New_Life\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":73,\n                            \"label\":\"Label(label)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":214,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Summary.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":8,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"y\":80,\"var\":\"title\",\"text\":\"UI_Title_Summary\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Label(title)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":6,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":230,\"right\":40,\"name\":\"summary\",\"left\":40,\"bottom\":800},\n            \"nodeParent\":1,\n            \"label\":\"Box(summary)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":8,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"List\",\n                    \"props\":{\"var\":\"listSummary\",\"top\":0,\"spaceY\":20,\"right\":0,\"repeatY\":7,\"repeatX\":1,\"name\":\"listSummary\",\"left\":0,\"bottom\":0},\n                    \"nodeParent\":8,\n                    \"label\":\"List(listSummary)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":265,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":15,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":15,\"renderType\":\"render\",\"left\":15,\"height\":160},\n                            \"nodeParent\":265,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":false,\n                            \"hasChild\":true,\n                            \"compId\":266,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":20,\"text\":\"Title\",\"name\":\"label\",\"left\":100,\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0},\n                                    \"nodeParent\":266,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":267,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":40,\"name\":\"selectedTalents\",\"left\":40,\"height\":450,\"bottom\":300},\n            \"nodeParent\":1,\n            \"label\":\"Box(selectedTalents)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":9,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"top\":20,\"text\":\"UI_Talent_Extend\",\"name\":\"font_default\",\"left\":20,\"fontSize\":50,\"color\":\"#ffffff\"},\n                    \"nodeParent\":9,\n                    \"label\":\"Label(font_default)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":137,\n                    \"child\":[\n                        ],\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"List\",\n                    \"props\":{\"var\":\"listSelectedTalents\",\"vScrollBarSkin\":\" \",\"top\":110,\"spaceY\":20,\"right\":0,\"repeatY\":3,\"repeatX\":1,\"name\":\"listSelectedTalents\",\"left\":0,\"bottom\":10},\n                    \"nodeParent\":9,\n                    \"label\":\"List(listSelectedTalents)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":138,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":15,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":15,\"renderType\":\"render\",\"left\":15,\"height\":80},\n                            \"nodeParent\":138,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":false,\n                            \"hasChild\":true,\n                            \"compId\":263,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":20,\"text\":\"Title\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":263,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":264,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"top\":0,\"runtime\":\"Laya.runtime.BlankBox\",\"right\":0,\"name\":\"blank\",\"left\":0,\"bottom\":0,\"alpha\":0.3},\n                                    \"nodeParent\":263,\n                                    \"label\":\"Box(blank)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":270,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":1,\"name\":\"buttonGroup\",\"left\":1,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(buttonGroup)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":10,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":600,\"var\":\"btnAgain\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnAgain\",\"height\":150,\"centerX\":0,\"bottom\":100},\n                    \"nodeParent\":10,\n                    \"label\":\"Box(btnAgain)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":268,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Remake_Again\",\"name\":\"label\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":268,\n                            \"label\":\"Label(label)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":269,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }],\n    \"$HIDDEN\":false\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Talent.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":21,\n    \"selecteID\":114,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"y\":80,\"var\":\"title\",\"text\":\"UI_Title_Talent\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Label(title)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":17,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"var\":\"pageDrawCard\",\"top\":0,\"right\":0,\"name\":\"pageDrawCard\",\"left\":0,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(pageDrawCard)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":19,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":600,\"var\":\"btnDrawCard\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnDrawCard\",\"height\":150,\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":19,\n                    \"label\":\"Box(btnDrawCard)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":110,\n                    \"child\":[\n                        {\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Talent_Draw\",\"name\":\"label\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":110,\n                            \"label\":\"Label(label)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":111,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":0,\"x\":0,\"var\":\"pageResult\",\"top\":0,\"right\":0,\"name\":\"pageResult\",\"left\":0,\"bottom\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(pageResult)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":21,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"List\",\n                    \"props\":{\"width\":1085,\"var\":\"listTalents\",\"vScrollBarSkin\":\" \",\"top\":230,\"spaceY\":20,\"repeatX\":1,\"name\":\"listTalents\",\"centerX\":0,\"bottom\":250},\n                    \"nodeParent\":21,\n                    \"label\":\"List(listTalents)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":22,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Box\",\n                            \"props\":{\"y\":15,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":15,\"renderType\":\"render\",\"left\":15,\"height\":80},\n                            \"nodeParent\":22,\n                            \"label\":\"Box\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":false,\n                            \"hasChild\":true,\n                            \"compId\":23,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":20,\"text\":\"Title\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                                    \"nodeParent\":23,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":30,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"top\":0,\"runtime\":\"Laya.runtime.BlankBox\",\"right\":0,\"name\":\"blank\",\"left\":0,\"bottom\":0,\"alpha\":0.3},\n                                    \"nodeParent\":23,\n                                    \"label\":\"Box(blank)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":false,\n                                    \"hasChild\":false,\n                                    \"compId\":116,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }],\n                    \"$LOCKED\":true,\n                    \"$HIDDEN\":false\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"x\":263,\"width\":1085,\"var\":\"btnNext\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnNext\",\"height\":150,\"centerX\":0,\"bottom\":30},\n                    \"nodeParent\":21,\n                    \"label\":\"Box(btnNext)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":114,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Next\",\"name\":\"label\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":114,\n                            \"label\":\"Label(label)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":115,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }],\n    \"$HIDDEN\":false\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Thanks.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":161,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#666666\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":95,\"x\":945,\"width\":260,\"var\":\"btnBack\",\"top\":50,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnBack\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnBack)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":153,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"y\":1028,\"x\":332,\"text\":\"UI_Back\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":153,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":154,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Panel\",\n            \"props\":{\"width\":1100,\"var\":\"panelTopSupports\",\"vScrollBarSkin\":\" \",\"top\":170,\"name\":\"panelTopSupports\",\"height\":400,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Panel(panelTopSupports)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":18,\n            \"child\":[\n                {\n                    \"type\":\"VBox\",\n                    \"props\":{\"y\":15,\"var\":\"vboxTopSupports\",\"space\":30,\"right\":-6,\"name\":\"vboxTopSupports\",\"left\":-6},\n                    \"nodeParent\":18,\n                    \"label\":\"VBox(vboxTopSupports)\",\n                    \"isOpen\":false,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":17,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxTopSupport\",\"left\":0},\n                            \"nodeParent\":17,\n                            \"label\":\"Box(boxTopSupport)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":88,\n                            \"child\":[\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":25,\"wordWrap\":true,\"width\":250,\"text\":\"Sombody\",\"name\":\"name\",\"left\":50,\"leading\":25,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#000000\",\"align\":\"center\"},\n                                    \"nodeParent\":88,\n                                    \"label\":\"Label(name)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":155,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":25,\"wordWrap\":true,\"text\":\"This is he say\",\"right\":20,\"name\":\"comment\",\"left\":350,\"leading\":25,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#000000\",\"align\":\"center\"},\n                                    \"nodeParent\":88,\n                                    \"label\":\"Label(comment)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":95,\n                                    \"child\":[\n                                        ]\n                                }]\n                        }]\n                }],\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"List\",\n            \"props\":{\"width\":1100,\"var\":\"listSupports\",\"vScrollBarSkin\":\" \",\"top\":600,\"spaceY\":50,\"spaceX\":50,\"name\":\"listSupports\",\"centerX\":0,\"bottom\":200},\n            \"nodeParent\":1,\n            \"label\":\"List(listSupports)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":161,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"y\":30,\"x\":25,\"width\":500,\"text\":\"label\",\"renderType\":\"render\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"align\":\"center\"},\n                    \"nodeParent\":161,\n                    \"label\":\"Label\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":false,\n                    \"hasChild\":false,\n                    \"compId\":162,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":400,\"var\":\"btnDDF\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnDDF\",\"height\":100,\"centerX\":300,\"bottom\":50,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnDDF)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":163,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"y\":1028,\"x\":332,\"text\":\"UI_Support_Programmer\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":163,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":164,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":400,\"var\":\"btnAFD\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnAFD\",\"height\":100,\"centerX\":-300,\"bottom\":50,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnAFD)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":165,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"y\":1028,\"x\":332,\"text\":\"UI_Support_Designer\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":165,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":166,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/DefaultTheme/Trajectory.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":95,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":80,\"right\":20,\"left\":20,\"height\":120},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":31,\n            \"child\":[\n                {\n                    \"type\":\"HBox\",\n                    \"props\":{\"space\":15,\"centerY\":0,\"centerX\":0,\"align\":\"middle\"},\n                    \"nodeParent\":31,\n                    \"label\":\"HBox\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":71,\n                    \"child\":[\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"x\":0,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\n                            \"nodeParent\":71,\n                            \"label\":\"Box(propertyBox)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":34,\n                            \"child\":[\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":30,\"text\":\"UI_Property_Charm\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":34,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":39,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\n                                    \"nodeParent\":34,\n                                    \"label\":\"Box(propertyValue)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":41,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labCharm\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                            \"nodeParent\":41,\n                                            \"label\":\"Label(labCharm)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":40,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }],\n                            \"$HIDDEN\":false\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"x\":1,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\n                            \"nodeParent\":71,\n                            \"label\":\"Box(propertyBox)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":50,\n                            \"child\":[\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":30,\"text\":\"UI_Property_Intelligence\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":50,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":54,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\n                                    \"nodeParent\":50,\n                                    \"label\":\"Box(propertyValue)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":55,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labIntelligence\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                            \"nodeParent\":55,\n                                            \"label\":\"Label(labIntelligence)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":56,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }],\n                            \"$HIDDEN\":false\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"x\":2,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\n                            \"nodeParent\":71,\n                            \"label\":\"Box(propertyBox)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":74,\n                            \"child\":[\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":30,\"text\":\"UI_Property_Strength\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":74,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":78,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\n                                    \"nodeParent\":74,\n                                    \"label\":\"Box(propertyValue)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":79,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labStrength\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                            \"nodeParent\":79,\n                                            \"label\":\"Label(labStrength)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":80,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"x\":3,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\n                            \"nodeParent\":71,\n                            \"label\":\"Box(propertyBox)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":43,\n                            \"child\":[\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":30,\"text\":\"UI_Property_Money\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":43,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":47,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\n                                    \"nodeParent\":43,\n                                    \"label\":\"Box(propertyValue)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":48,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labMoney\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                            \"nodeParent\":48,\n                                            \"label\":\"Label(labMoney)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":49,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        },\n                        {\n                            \"type\":\"Box\",\n                            \"props\":{\"x\":4,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\n                            \"nodeParent\":71,\n                            \"label\":\"Box(propertyBox)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":81,\n                            \"child\":[\n                                {\n                                    \"type\":\"Label\",\n                                    \"props\":{\"y\":30,\"text\":\"UI_Property_Spirit\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                    \"nodeParent\":81,\n                                    \"label\":\"Label(label)\",\n                                    \"isDirectory\":false,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":false,\n                                    \"compId\":85,\n                                    \"child\":[\n                                        ]\n                                },\n                                {\n                                    \"type\":\"Box\",\n                                    \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\n                                    \"nodeParent\":81,\n                                    \"label\":\"Box(propertyValue)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":86,\n                                    \"child\":[\n                                        {\n                                            \"type\":\"Label\",\n                                            \"props\":{\"var\":\"labSpirit\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\n                                            \"nodeParent\":86,\n                                            \"label\":\"Label(labSpirit)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":87,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":20,\"var\":\"boxTrajectory\",\"top\":240,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":20,\"name\":\"boxTrajectory\",\"left\":20,\"bottom\":250},\n            \"nodeParent\":1,\n            \"label\":\"Box(boxTrajectory)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":102,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Panel\",\n                    \"props\":{\"var\":\"panelTrajectory\",\"vScrollBarSkin\":\" \",\"top\":0,\"right\":0,\"name\":\"panelTrajectory\",\"left\":0,\"bottom\":0},\n                    \"nodeParent\":102,\n                    \"label\":\"Panel(panelTrajectory)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":18,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"VBox\",\n                            \"props\":{\"y\":15,\"var\":\"vboxTrajectory\",\"space\":20,\"right\":-6,\"name\":\"vboxTrajectory\",\"left\":-6},\n                            \"nodeParent\":18,\n                            \"label\":\"VBox(vboxTrajectory)\",\n                            \"isOpen\":true,\n                            \"isDirectory\":true,\n                            \"isAniNode\":true,\n                            \"hasChild\":true,\n                            \"compId\":17,\n                            \"child\":[\n                                {\n                                    \"x\":60,\n                                    \"type\":\"Box\",\n                                    \"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxTrajectoryItem\",\"left\":0},\n                                    \"nodeParent\":17,\n                                    \"label\":\"Box(boxTrajectoryItem)\",\n                                    \"isOpen\":true,\n                                    \"isDirectory\":true,\n                                    \"isAniNode\":true,\n                                    \"hasChild\":true,\n                                    \"compId\":88,\n                                    \"child\":[\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"HBox\",\n                                            \"props\":{\"y\":25,\"x\":200,\"name\":\"hboxAge\",\"anchorX\":1,\"align\":\"middle\"},\n                                            \"nodeParent\":88,\n                                            \"label\":\"HBox(hboxAge)\",\n                                            \"isOpen\":false,\n                                            \"isDirectory\":true,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":true,\n                                            \"compId\":91,\n                                            \"child\":[\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":0,\"text\":\"3000\",\"name\":\"labAge\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#cfea5c\",\"anchorX\":0},\n                                                    \"nodeParent\":91,\n                                                    \"label\":\"Label(labAge)\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":90,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":1,\"text\":\"岁\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#cfea5c\",\"anchorX\":0},\n                                                    \"nodeParent\":91,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":94,\n                                                    \"child\":[\n                                                        ]\n                                                },\n                                                {\n                                                    \"type\":\"Label\",\n                                                    \"props\":{\"x\":2,\"text\":\"：\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#cfea5c\",\"anchorX\":0},\n                                                    \"nodeParent\":91,\n                                                    \"label\":\"Label\",\n                                                    \"isDirectory\":false,\n                                                    \"isAniNode\":true,\n                                                    \"hasChild\":false,\n                                                    \"compId\":92,\n                                                    \"child\":[\n                                                        ]\n                                                }]\n                                        },\n                                        {\n                                            \"x\":75,\n                                            \"type\":\"Label\",\n                                            \"props\":{\"y\":25,\"wordWrap\":true,\"text\":\"你的父母开始辅导你数学和英语，智力+1\",\"right\":0,\"name\":\"labContent\",\"left\":220,\"leading\":25,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\"},\n                                            \"nodeParent\":88,\n                                            \"label\":\"Label(labContent)\",\n                                            \"isDirectory\":false,\n                                            \"isAniNode\":true,\n                                            \"hasChild\":false,\n                                            \"compId\":95,\n                                            \"child\":[\n                                                ]\n                                        }]\n                                }]\n                        }],\n                    \"$HIDDEN\":false\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"right\":0,\"left\":0,\"height\":1,\"bottom\":-1},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":14,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":600,\"var\":\"btnSummary\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSummary\",\"height\":150,\"centerX\":0,\"bottom\":80},\n                    \"nodeParent\":14,\n                    \"label\":\"Box(btnSummary)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":151,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Goto_Summary\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0},\n                            \"nodeParent\":151,\n                            \"label\":\"Label(label)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":152,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"x\":30,\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":-155,\"var\":\"boxSpeed\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":100,\"name\":\"boxSpeed\",\"left\":100,\"height\":150,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":14,\n                    \"label\":\"Box(boxSpeed)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":104,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"ProgressBar\",\n                            \"props\":{\"var\":\"prgSpeed\",\"skin\":\"images/progress/progress_s.png\",\"right\":0,\"name\":\"prgSpeed\",\"left\":0,\"bottom\":0},\n                            \"nodeParent\":104,\n                            \"label\":\"ProgressBar(prgSpeed)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":105,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"HScrollBar\",\n                            \"props\":{\"var\":\"scbSpeed\",\"skin\":\"images/slider/hslider_s.png\",\"right\":0,\"name\":\"scbSpeed\",\"min\":0,\"max\":1000,\"left\":0,\"height\":60,\"bottom\":0},\n                            \"nodeParent\":104,\n                            \"label\":\"HScrollBar(scbSpeed)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":106,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Manual\",\"fontSize\":50,\"color\":\"#ffffff\",\"bottom\":70},\n                            \"nodeParent\":104,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":107,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Label\",\n                            \"props\":{\"text\":\"UI_Auto\",\"right\":0,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":70},\n                            \"nodeParent\":104,\n                            \"label\":\"Label\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":108,\n                            \"child\":[\n                                ]\n                        }]\n                }],\n            \"$LOCKED\":true,\n            \"$HIDDEN\":false\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":10,\"var\":\"boxParticle\",\"name\":\"boxParticle\",\"height\":10,\"centerY\":0,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box(boxParticle)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":153,\n            \"child\":[\n                {\n                    \"type\":\"Particle2D\",\n                    \"source\":\"particle/fly.part\",\n                    \"props\":{\"y\":5,\"x\":5,\"url\":\"particle/fly.part\",\"autoPlay\":true},\n                    \"nodeParent\":153,\n                    \"label\":\"Particle2D\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":154,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/Loading.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":12,\n    \"props\":{\"width\":1125,\"sceneColor\":\"#000000\",\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Sprite\",\n            \"props\":{\"y\":0,\"x\":0,\"alpha\":0.3},\n            \"nodeParent\":1,\n            \"label\":\"Sprite\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":11,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Rect\",\n                    \"props\":{\"width\":2000,\"lineWidth\":1,\"height\":3000,\"fillColor\":\"#000000\"},\n                    \"nodeParent\":11,\n                    \"label\":\"Rect\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":12,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":200,\"scaleY\":2,\"scaleX\":2,\"height\":200,\"centerY\":0,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"type\":\"Animation\",\n                    \"props\":{\"y\":100,\"x\":100,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"autoPlay\":true},\n                    \"nodeParent\":2,\n                    \"label\":\"Animation\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":3,\n                    \"child\":[\n                        ]\n                },\n                {\n                    \"type\":\"Image\",\n                    \"props\":{\"skin\":\"images/resource/circle.png\",\"renderType\":\"mask\"},\n                    \"nodeParent\":2,\n                    \"label\":\"Image\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":9,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"text\":\"UI_Loading\",\"fontSize\":80,\"font\":\"Impact\",\"color\":\"#ffffff\",\"centerY\":400,\"centerX\":0},\n            \"nodeParent\":1,\n            \"label\":\"Label\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":10,\n            \"child\":[\n                ]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/MessagePopup.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"View\",\n    \"selectedBox\":1,\n    \"selecteID\":2,\n    \"props\":{\"width\":1100,\"sceneColor\":\"#000000\",\"mouseThrough\":true,\"mouseEnabled\":false,\"height\":230},\n    \"nodeParent\":-1,\n    \"label\":\"View\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"var\":\"boxBg\",\"top\":10,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":10,\"name\":\"boxBg\",\"left\":10,\"bottom\":10,\"alpha\":0.75},\n            \"nodeParent\":1,\n            \"label\":\"Box(boxBg)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":3,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Label\",\n            \"props\":{\"wordWrap\":true,\"var\":\"message\",\"text\":\"消息\",\"right\":50,\"name\":\"message\",\"left\":50,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"},\n            \"nodeParent\":1,\n            \"label\":\"Label(message)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":2,\n            \"child\":[\n                ]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/SaveLoad.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"Dialog\",\n    \"selectedBox\":1,\n    \"selecteID\":25,\n    \"props\":{\"width\":645,\"sceneColor\":\"#000000\",\"height\":400},\n    \"nodeParent\":-1,\n    \"label\":\"Dialog\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":0,\"right\":0,\"left\":0,\"bottom\":300},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":15,\n            \"child\":[\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"y\":0,\"x\":0,\"width\":645,\"height\":2},\n                    \"nodeParent\":15,\n                    \"label\":\"Box\",\n                    \"isOpen\":null,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":19,\n                    \"child\":[\n                        {\n                            \"type\":\"Rect\",\n                            \"props\":{\"width\":645,\"lineWidth\":1,\"height\":2,\"fillColor\":\"#97ffe6\"},\n                            \"nodeParent\":19,\n                            \"label\":\"Rect\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":17,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":645,\"height\":2,\"centerX\":0,\"bottom\":0},\n                    \"nodeParent\":15,\n                    \"label\":\"Box\",\n                    \"isOpen\":null,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":20,\n                    \"child\":[\n                        {\n                            \"type\":\"Rect\",\n                            \"props\":{\"width\":645,\"lineWidth\":1,\"height\":2,\"fillColor\":\"#97ffe6\"},\n                            \"nodeParent\":20,\n                            \"label\":\"Rect\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":21,\n                            \"child\":[\n                                ]\n                        }]\n                },\n                {\n                    \"type\":\"Box\",\n                    \"props\":{\"width\":645,\"height\":100,\"centerY\":0,\"centerX\":0,\"alpha\":0.2},\n                    \"nodeParent\":15,\n                    \"label\":\"Box\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":22,\n                    \"child\":[\n                        {\n                            \"type\":\"Rect\",\n                            \"props\":{\"width\":645,\"lineWidth\":1,\"height\":100,\"fillColor\":\"#000000\"},\n                            \"nodeParent\":22,\n                            \"label\":\"Rect\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":23,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"TextInput\",\n            \"props\":{\"wordWrap\":false,\"var\":\"input\",\"valign\":\"middle\",\"top\":0,\"text\":\"content\",\"right\":0,\"overflow\":\"scroll\",\"left\":0,\"fontSize\":35,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":300},\n            \"nodeParent\":1,\n            \"label\":\"TextInput(input)\",\n            \"isDirectory\":false,\n            \"isAniNode\":true,\n            \"hasChild\":false,\n            \"compId\":4,\n            \"child\":[\n                ]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":120,\"var\":\"btnSave\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":5,\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnSave)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":5,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Save\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":5,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":7,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":120,\"var\":\"btnLoad\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":130,\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnLoad)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":6,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Load\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":6,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":8,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":120,\"var\":\"btnRead\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":260,\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnRead)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":13,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Read\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":13,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":14,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":120,\"var\":\"btnWrite\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":390,\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnWrite)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":11,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_Write\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":11,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":12,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"x\":10,\"width\":120,\"var\":\"btnClose\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":5,\"name\":\"btnSmall\",\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnClose)\",\n            \"isOpen\":false,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":9,\n            \"child\":[\n                {\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"×\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":9,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":10,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"y\":20,\"var\":\"btnBackup\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":5,\"name\":\"btnBackup\",\"left\":5,\"height\":120,\"bottom\":5,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnBackup)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":25,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"UI_BackupBtn\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":25,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":26,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/pages/view/Themes.ui",
    "content": "{\n    \"x\":0,\n    \"type\":\"Dialog\",\n    \"selectedBox\":1,\n    \"selecteID\":13,\n    \"props\":{\"width\":350,\"sceneColor\":\"#000000\",\"height\":550},\n    \"nodeParent\":-1,\n    \"label\":\"Dialog\",\n    \"isOpen\":true,\n    \"isDirectory\":true,\n    \"isAniNode\":true,\n    \"hasChild\":true,\n    \"compId\":1,\n    \"child\":[\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"top\":20,\"right\":20,\"left\":20,\"bottom\":130},\n            \"nodeParent\":1,\n            \"label\":\"Box\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":6,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"RadioGroup\",\n                    \"props\":{\"var\":\"radioTheme\",\"name\":\"radioTheme\",\"height\":380,\"centerY\":0,\"centerX\":0},\n                    \"nodeParent\":6,\n                    \"label\":\"RadioGroup(radioTheme)\",\n                    \"isOpen\":true,\n                    \"isDirectory\":true,\n                    \"isAniNode\":true,\n                    \"hasChild\":true,\n                    \"compId\":13,\n                    \"child\":[\n                        {\n                            \"x\":45,\n                            \"type\":\"Radio\",\n                            \"props\":{\"width\":300,\"top\":0,\"skin\":\"images/radio/radio_cyber.png\",\"name\":\"item0\",\"height\":100},\n                            \"nodeParent\":13,\n                            \"label\":\"Radio(item0)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":10,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Radio\",\n                            \"props\":{\"width\":300,\"skin\":\"images/radio/radio_dark.png\",\"name\":\"item1\",\"height\":100,\"centerY\":0},\n                            \"nodeParent\":13,\n                            \"label\":\"Radio(item1)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":11,\n                            \"child\":[\n                                ]\n                        },\n                        {\n                            \"x\":45,\n                            \"type\":\"Radio\",\n                            \"props\":{\"width\":300,\"skin\":\"images/radio/radio_light.png\",\"name\":\"item2\",\"height\":100,\"bottom\":0},\n                            \"nodeParent\":13,\n                            \"label\":\"Radio(item2)\",\n                            \"isDirectory\":false,\n                            \"isAniNode\":true,\n                            \"hasChild\":false,\n                            \"compId\":12,\n                            \"child\":[\n                                ]\n                        }]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":90,\"var\":\"btnOK\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":20,\"height\":90,\"bottom\":20,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnOK)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":2,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"√\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":2,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":3,\n                    \"child\":[\n                        ]\n                }]\n        },\n        {\n            \"x\":15,\n            \"type\":\"Box\",\n            \"props\":{\"width\":90,\"var\":\"btnClose\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":20,\"name\":\"btnSmall\",\"height\":90,\"bottom\":20,\"anchorY\":0.5,\"anchorX\":0.5},\n            \"nodeParent\":1,\n            \"label\":\"Box(btnClose)\",\n            \"isOpen\":true,\n            \"isDirectory\":true,\n            \"isAniNode\":true,\n            \"hasChild\":true,\n            \"compId\":14,\n            \"child\":[\n                {\n                    \"x\":30,\n                    \"type\":\"Label\",\n                    \"props\":{\"text\":\"×\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5},\n                    \"nodeParent\":14,\n                    \"label\":\"Label(label)\",\n                    \"isDirectory\":false,\n                    \"isAniNode\":true,\n                    \"hasChild\":false,\n                    \"compId\":15,\n                    \"child\":[\n                        ]\n                }]\n        }],\n    \"animations\":[\n        {\n            \"nodes\":[\n                ],\n            \"name\":\"ani1\",\n            \"id\":1,\n            \"frameRate\":24,\n            \"action\":0\n        }]\n}"
  },
  {
    "path": "laya/styles.xml",
    "content": "<res>\n   <item name=\"images/progress/progress_1.png\" type=\"ProgressBar\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=9,10,11,6,1\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/progress/progress_1@2x.png\" type=\"ProgressBar\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=18,18,18,18,1\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/progress/progress_1@3x.png\" type=\"ProgressBar\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=24,24,24,24,1\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/slider/vslider_1.png\" type=\"VSlider\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=2,2,2,2,1\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/slider/vslider_1@2x.png\" type=\"VSlider\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=4,4,4,4,1\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/slider/vslider_1@3x.png\" type=\"VSlider\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=6,6,6,6,1@@!@@\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/border_1@2x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=170,170,170,170\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/border_1.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=85,85,85,85\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/border_1@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=130,130,130,130\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/button/button_back.png\" type=\"Button\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"stateNum=1@@!@@label=&quot;&quot;@@!@@anchorX=0@@!@@anchorY=0.5\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/button/button_back@2x.png\" type=\"Button\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"stateNum=1@@!@@label=&quot;&quot;@@!@@anchorX=0@@!@@anchorY=0.5\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/button/button_back@3x.png\" type=\"Button\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"stateNum=1@@!@@label= @@!@@anchorX=0@@!@@anchorY=0.5@@!@@runtime=Laya.runtime.ScaleButton\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/button/button_main.png\" type=\"Button\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"stateNum=1@@!@@label=&quot;&quot;@@!@@anchorX=0.5@@!@@anchorY=0.5@@!@@sizeGrid=36,150,36,150@@!@@labelFont=方正像素12@@!@@labelColors=#00fffc,#00fffc,#00fffc@@!@@labelSize=35\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/button/button_main@2x.png\" type=\"Button\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"stateNum=1@@!@@label=&quot;&quot;@@!@@anchorX=0.5@@!@@anchorY=0.5@@!@@sizeGrid=72,300,72,300@@!@@labelFont=方正像素12@@!@@labelColors=#00fffc,#00fffc,#00fffc@@!@@labelSize=70\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/button/button_main@3x.png\" type=\"Button\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"stateNum=1@@!@@label= @@!@@anchorX=0.5@@!@@anchorY=0.5@@!@@sizeGrid=45,200,45,200@@!@@labelFont=方正像素12@@!@@labelColors=#00fffc,#00fffc,#00fffc@@!@@labelSize=50@@!@@runtime=Laya.runtime.ScaleButton\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/up@2x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=4,4,4,4\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/up.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=2,2,2,2\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/talentitem.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=50,100,50,100\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/talentitem@2x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=100,200,100,200\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/talentitem@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=150,300,150,300\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/talentitemselected.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=70,100,50,100\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/talentitemselected@2x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=140,200,100,200\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/talentitemselected@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=210,300,150,300\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/border_2.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=50,100,50,100\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/border_2@2x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=100,200,100,200\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/border_2@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=75,155,75,155\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/property@2x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=20,20,20,20\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/property.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=10,10,10,10\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/property@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=15,15,15,15\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/up@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=4,4,4,4\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/button/button_small@3x.png\" type=\"Button\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=8,8,8,8@@!@@stateNum=1@@!@@label= @@!@@runtime=Laya.runtime.ScaleButton\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/achievement@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=16,16,16,16\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/achievement_complete@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=74,80,74,80\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/resource/circle.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/border/talent_item_selected@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=106,150,74,150\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/accessories/titlebar@3x.png\" type=\"Image\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=0,348,116,348\" picType=\"0\" scale=\"0\"/>\n   <item name=\"images/button/button_001.png\" type=\"Button\" compress=\"0\" pack=\"0\" quality=\"80\" props=\"sizeGrid=4,4,4,4@@!@@labelColors=#000000,#ea6c53,#ea6c53\" picType=\"0\" scale=\"0\"/>\n</res>"
  },
  {
    "path": "lifeRestart.laya",
    "content": "{\"proName\":\"lifeRestart\",\"engineType\":0,\"proType\":2,\"layaProType\":0}"
  },
  {
    "path": "package.json",
    "content": "{\n    \"name\": \"life_restart\",\n    \"type\": \"module\",\n    \"main\": \"repl/index.js\",\n    \"version\": \"2.1.0\",\n    \"author\": \"Vick Scarlet <vick@syaro.io>\",\n    \"scripts\": {\n        \"xlsx2json\": \"vt transform -d public \\\"data/**/*.xlsx\\\"\",\n        \"dev\": \"vite\",\n        \"build\": \"vite build\",\n        \"start\": \"vite preview\",\n        \"test\": \"vitest\"\n    },\n    \"devDependencies\": {\n        \"v-transform\": \"^2.2.0\",\n        \"vite\": \"^7.3.1\",\n        \"vitest\": \"^4.0.18\"\n    }\n}\n"
  },
  {
    "path": "public/condition_test.html",
    "content": "颜值: <input class=\"prop\" name=\"CHR\" style=\"width:300px;\" value=\"5\" >(CHR)<br/>\n智力: <input class=\"prop\" name=\"INT\" style=\"width:300px;\" value=\"5\" >(INT)<br/>\n体质: <input class=\"prop\" name=\"STR\" style=\"width:300px;\" value=\"5\" >(STR)<br/>\n家境: <input class=\"prop\" name=\"MNY\" style=\"width:300px;\" value=\"5\" >(MNY)<br/>\n快乐: <input class=\"prop\" name=\"SPR\" style=\"width:300px;\" value=\"5\" >(SPR)<br/>\n生命: <input class=\"prop\" name=\"LIF\" style=\"width:300px;\" value=\"5\" >(LIF)<br/>\n天赋: <input class=\"prop\" name=\"TLT\" style=\"width:300px;\" value=\"[5]\" >(TLT)<br/>\n事件: <input class=\"prop\" name=\"EVT\" style=\"width:300px;\" value=\"[5]\" >(EVT)<br/>\n<br/><br/>\n表达式：<input id=\"conditions\" style=\"width:500px;\"><br/><br/>\n结果：<span id=\"result\" style=\"color:red;\"></span><br/><br/>\n<button id=\"submit\">&nbsp;测&nbsp;&nbsp;试&nbsp;</button><br/>\n\n<script>\n    const DEFAULT_PROP = {\n        CHR: 5,      // 颜值 charm CHR\n        INT: 5,      // 智力 intelligence INT\n        STR: 5,      // 体质 strength STR\n        MNY: 5,      // 家境 money MNY\n        SPR: 5,      // 快乐 spirit SPR\n        LIF: 5,      // 生命 life LIF\n        TLT: [5],    // 天赋 talent TLT\n        EVT: [5],    // 事件 event EVT\n    };\n    document.querySelector(\"#submit\").onclick = function() {\n        document.querySelectorAll('.prop').forEach(({name, value})=>DEFAULT_PROP[name] = JSON.parse(value));\n        conditions = document.querySelector(\"#conditions\").value;\n        const result = check(conditions);\n        document.querySelector(\"#result\").textContent = result;\n    }\n\n    function getProp(prop) {\n        switch(prop) {\n            case 'CHR':\n            case 'INT':\n            case 'STR':\n            case 'MNY':\n            case 'SPR':\n            case 'LIF':\n            case 'TLT':\n            case 'EVT': return DEFAULT_PROP[prop];\n            default: return null;\n        }\n    }\n\n    function check(condition) {\n        const conditions = parseCondition(condition);\n        return checkParsedCondition(conditions);\n    }\n\n    function checkParsedCondition(conditions) {\n        if(!Array.isArray(conditions)) return checkLogic(conditions);\n        if(conditions.length == 0) return true;\n        if(conditions.length == 1) return checkParsedCondition(conditions[0]);\n\n        let ret = checkParsedCondition(conditions[0]);\n        for(let i=1; i<conditions.length; i+=2) {\n            switch(conditions[i]) {\n                case '&':\n                    if(ret) ret = checkParsedCondition(conditions[i+1]);\n                    break;\n                case '|':\n                    if(ret) return true;\n                    ret = checkParsedCondition(conditions[i+1]);\n                    break;\n                default: return false;\n            }\n        }\n        return ret;\n\n    }\n\n    function checkLogic(condition) {\n        const length = condition.length;\n        let i = condition.search(/[><\\!\\?=]/);\n\n        const prop = condition.substring(0,i);\n        const symbol = condition.substring(i, i+=(condition[i+1]=='='?2:1));\n        const d = condition.substring(i, length);\n\n        const propData = getProp(prop);\n        const conditionData = d[0]=='['? JSON.parse(d): Number(d);\n\n        switch(symbol) {\n            case '>':  return propData >  conditionData;\n            case '<':  return propData <  conditionData;\n            case '>=': return propData >= conditionData;\n            case '<=': return propData <= conditionData;\n            case '=':\n                if(Array.isArray(propData))\n                    return propData.includes(conditionData);\n                return propData == conditionData;\n            case '!=':\n                if(Array.isArray(propData))\n                    return !propData.includes(conditionData);\n                return propData == conditionData;\n            case '?':\n                if(Array.isArray(propData)) {\n                    for(const p of propData)\n                        if(conditionData.includes(p)) return true;\n                    return false;\n                }\n                return conditionData.includes(propData);\n            case '!':\n                if(Array.isArray(propData)) {\n                    for(const p of propData)\n                        if(conditionData.includes(p)) return false;\n                    return true;\n                }\n                return !conditionData.includes(propData);\n\n            default: return false;\n        }\n    }\n\n    function parseCondition(condition) {\n        const conditions = [];\n        const length = condition.length;\n        const stack = [];\n        stack.unshift(conditions);\n        let cursor = 0;\n        const catchString = i => {\n            const str = condition.substring(cursor, i).trim();\n            cursor = i;\n            if(str) stack[0].push(str);\n        };\n\n        for(let i=0; i<length; i++) {\n            switch(condition[i]) {\n                case ' ': continue;\n\n                case '(':\n                    catchString(i);\n                    cursor ++;\n                    const sub = [];\n                    stack[0].push(sub);\n                    stack.unshift(sub);\n                    break;\n\n                case ')':\n                    catchString(i);\n                    cursor ++;\n                    stack.shift();\n                    break;\n\n                case '|':\n                case '&':\n                    catchString(i);\n                    catchString(i+1);\n                    break;\n                default: continue;\n            }\n        }\n\n        catchString(length);\n\n        return conditions;\n    }\n\n    // function debug(...conditions) {\n    //     for(const condition of conditions)\n    //         console.debug(check(condition), '\\t', condition);\n    // }\n    //\n    // debug(\n    //     '(STR<2&MNY>3)|(MNY<2&CHR<2)',\n    //     '(STR<2&MNY>3)',\n    //     '(STR>2&MNY>3)',\n    //     '((((STR>2&MNY>2))))',\n    //     '((((STR>2&MNY>2)|(MNY<2&CHR<2))))',\n    //     '((((STR>2&MNY>2)|(MNY<2&CHR<2)&(STR>2&MNY>3))))',\n    //     '((((STR>2&MNY>2)|(MNY<2&CHR<2))&(STR>2&MNY>3)))',\n    //     'EVT![1,2,3]',\n    //     'EVT![1,2]',\n    //     'EVT?[1,2,3]',\n    //     'EVT?[1,2]',\n    // );\n</script>\n\n\n"
  },
  {
    "path": "public/images/atlas/.rec",
    "content": "D .\nD fonts\nR 39B4F491 方正像素12.ttf\nD images\nD images/accessories\nP ADDDCB66 cardicon@3x.png\nR 0E2F6E7F insert_coin@3x.png\nR B45325FC title@3x.png\nP 074FEF52 title_left@3x.png\nR 97E72B92 title_neon@3x.png\nP 2BA0101A title_right@3x.png\nR E1602E15 titlebar@3x.png\nD images/background\nR 9343F3BB background_1@3x.png\nR 0B49B27D background_2@3x.png\nD images/border\nP A2B33396 achievement@3x.png\nR 45A1A604 achievement_complete@3x.png\nR 6CF3EE8E border_1@3x.png\nR AAEA6308 border_2@3x.png\nR A57A026E card@3x.png\nP C1EDDBED property@3x.png\nR A8C7A5A5 talent_item@3x.png\nR DCE4E73A talent_item_selected@3x.png\nR 373CDF45 up@3x.png\nD images/button\nP 69FF5572 button_back@3x.png\nR 441BFE78 button_main@3x.png\nP F2B85B54 button_small@3x.png\nD images/icons\nP C677F3AE icon_achievement@3x.png\nP 3D072134 icon_chr@3x.png\nP C663FAF5 icon_discord.png\nP 3FA91C13 icon_github.png\nP AB934AEA icon_int@3x.png\nP F1A0724B icon_mny@3x.png\nP D5AADAC9 icon_rank@3x.png\nP 0806E5F3 icon_save.png\nP 2DB0325D icon_spr@3x.png\nP 2EFA541B icon_str@3x.png\nP 804842C9 icon_thanks@3x.png\nP 96DD5D94 icon_themes.png\nP 6ECB5FEC icon_up@3x.png\nD images/progress\nP E2BF0C93 progress_1@3x$bar.png\nP B86E1D0F progress_1@3x.png\nP E7F15BA7 progress_2$bar.png\nP 641A22BF progress_2.png\nP AF80A9AF progress_s$bar.png\nP 41417E8D progress_s.png\nD images/radio\nP CCF63014 radio_cyber.png\nP 040DE73C radio_dark.png\nP BA975F5A radio_light.png\nD images/resource\nP F3659301 bottombreath.png\nP 496D6FB9 circle.png\nP B5087365 circleflash.png\nD images/slider\nP 9682C590 hslider_s$bar.png\nP F6238BD4 hslider_s$down.png\nP F4198287 hslider_s$up.png\nP 2A785866 hslider_s.png\nR 8B95E6D3 vslider_1@3x$bar.png\nP 6581FBA8 vslider_1@3x$down.png\nP 6581FBA8 vslider_1@3x$up.png\nR C9587878 vslider_1@3x.png\nD images/texture\nP FD231754 texture_1.png\n"
  },
  {
    "path": "public/images/atlas/images/accessories.atlas",
    "content": "{\"frames\":{\"cardicon@3x.png\":{\"frame\":{\"h\":466,\"idx\":0,\"w\":455,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":466,\"w\":455},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"title_left@3x.png\":{\"frame\":{\"h\":27,\"idx\":0,\"w\":48,\"x\":456,\"y\":0},\"sourceSize\":{\"h\":27,\"w\":48},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"title_right@3x.png\":{\"frame\":{\"h\":27,\"idx\":0,\"w\":48,\"x\":456,\"y\":28},\"sourceSize\":{\"h\":27,\"w\":48},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"accessories.png\",\"prefix\":\"images/accessories/\"}}"
  },
  {
    "path": "public/images/atlas/images/border.atlas",
    "content": "{\"frames\":{\"achievement@3x.png\":{\"frame\":{\"h\":412,\"idx\":0,\"w\":486,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":412,\"w\":486},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"property@3x.png\":{\"frame\":{\"h\":84,\"idx\":0,\"w\":257,\"x\":0,\"y\":413},\"sourceSize\":{\"h\":84,\"w\":257},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"border.png\",\"prefix\":\"images/border/\"}}"
  },
  {
    "path": "public/images/atlas/images/button.atlas",
    "content": "{\"frames\":{\"button_back@3x.png\":{\"frame\":{\"h\":114,\"idx\":0,\"w\":147,\"x\":0,\"y\":91},\"sourceSize\":{\"h\":114,\"w\":147},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"button_small@3x.png\":{\"frame\":{\"h\":90,\"idx\":0,\"w\":225,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":90,\"w\":225},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"button.png\",\"prefix\":\"images/button/\"}}"
  },
  {
    "path": "public/images/atlas/images/icons.atlas",
    "content": "{\"frames\":{\"icon_achievement@3x.png\":{\"frame\":{\"h\":69,\"idx\":0,\"w\":65,\"x\":188,\"y\":385},\"sourceSize\":{\"h\":69,\"w\":65},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_chr@3x.png\":{\"frame\":{\"h\":61,\"idx\":0,\"w\":57,\"x\":320,\"y\":448},\"sourceSize\":{\"h\":61,\"w\":57},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_discord.png\":{\"frame\":{\"h\":384,\"idx\":0,\"w\":384,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":384,\"w\":384},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_github.png\":{\"frame\":{\"h\":384,\"idx\":0,\"w\":384,\"x\":385,\"y\":0},\"sourceSize\":{\"h\":384,\"w\":384},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_int@3x.png\":{\"frame\":{\"h\":57,\"idx\":0,\"w\":54,\"x\":188,\"y\":455},\"sourceSize\":{\"h\":57,\"w\":54},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_mny@3x.png\":{\"frame\":{\"h\":57,\"idx\":0,\"w\":54,\"x\":243,\"y\":455},\"sourceSize\":{\"h\":57,\"w\":54},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_rank@3x.png\":{\"frame\":{\"h\":62,\"idx\":0,\"w\":72,\"x\":320,\"y\":385},\"sourceSize\":{\"h\":62,\"w\":72},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_save.png\":{\"frame\":{\"h\":90,\"idx\":0,\"w\":90,\"x\":97,\"y\":385},\"sourceSize\":{\"h\":90,\"w\":90},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_spr@3x.png\":{\"frame\":{\"h\":60,\"idx\":0,\"w\":57,\"x\":378,\"y\":448},\"sourceSize\":{\"h\":60,\"w\":57},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_str@3x.png\":{\"frame\":{\"h\":57,\"idx\":0,\"w\":54,\"x\":393,\"y\":385},\"sourceSize\":{\"h\":57,\"w\":54},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_thanks@3x.png\":{\"frame\":{\"h\":69,\"idx\":0,\"w\":65,\"x\":254,\"y\":385},\"sourceSize\":{\"h\":69,\"w\":65},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_themes.png\":{\"frame\":{\"h\":96,\"idx\":0,\"w\":96,\"x\":0,\"y\":385},\"sourceSize\":{\"h\":96,\"w\":96},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"icon_up@3x.png\":{\"frame\":{\"h\":18,\"idx\":0,\"w\":33,\"x\":97,\"y\":476},\"sourceSize\":{\"h\":18,\"w\":33},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"icons.png\",\"prefix\":\"images/icons/\"}}"
  },
  {
    "path": "public/images/atlas/images/progress.atlas",
    "content": "{\"frames\":{\"progress_1@3x$bar.png\":{\"frame\":{\"h\":36,\"idx\":0,\"w\":203,\"x\":0,\"y\":262},\"sourceSize\":{\"h\":36,\"w\":203},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"progress_1@3x.png\":{\"frame\":{\"h\":36,\"idx\":0,\"w\":203,\"x\":204,\"y\":262},\"sourceSize\":{\"h\":36,\"w\":203},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"progress_2$bar.png\":{\"frame\":{\"h\":200,\"idx\":0,\"w\":200,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":200,\"w\":200},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"progress_2.png\":{\"frame\":{\"h\":200,\"idx\":0,\"w\":200,\"x\":201,\"y\":0},\"sourceSize\":{\"h\":200,\"w\":200},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"progress_s$bar.png\":{\"frame\":{\"h\":60,\"idx\":0,\"w\":226,\"x\":0,\"y\":201},\"sourceSize\":{\"h\":60,\"w\":226},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"progress_s.png\":{\"frame\":{\"h\":60,\"idx\":0,\"w\":226,\"x\":227,\"y\":201},\"sourceSize\":{\"h\":60,\"w\":226},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"progress.png\",\"prefix\":\"images/progress/\"}}"
  },
  {
    "path": "public/images/atlas/images/radio.atlas",
    "content": "{\"frames\":{\"radio_cyber.png\":{\"frame\":{\"h\":300,\"idx\":0,\"w\":300,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":300,\"w\":300},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"radio_dark.png\":{\"frame\":{\"h\":300,\"idx\":0,\"w\":300,\"x\":0,\"y\":301},\"sourceSize\":{\"h\":300,\"w\":300},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"radio_light.png\":{\"frame\":{\"h\":300,\"idx\":0,\"w\":300,\"x\":301,\"y\":0},\"sourceSize\":{\"h\":300,\"w\":300},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"radio.png\",\"prefix\":\"images/radio/\"}}"
  },
  {
    "path": "public/images/atlas/images/resource.atlas",
    "content": "{\"frames\":{\"bottombreath.png\":{\"frame\":{\"h\":200,\"idx\":0,\"w\":200,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":200,\"w\":200},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"circle.png\":{\"frame\":{\"h\":200,\"idx\":0,\"w\":200,\"x\":0,\"y\":201},\"sourceSize\":{\"h\":200,\"w\":200},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"circleflash.png\":{\"frame\":{\"h\":200,\"idx\":0,\"w\":200,\"x\":201,\"y\":0},\"sourceSize\":{\"h\":200,\"w\":200},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"resource.png\",\"prefix\":\"images/resource/\"}}"
  },
  {
    "path": "public/images/atlas/images/slider.atlas",
    "content": "{\"frames\":{\"hslider_s$bar.png\":{\"frame\":{\"h\":180,\"idx\":0,\"w\":47,\"x\":0,\"y\":61},\"sourceSize\":{\"h\":180,\"w\":47},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"hslider_s$down.png\":{\"frame\":{\"h\":1,\"idx\":0,\"w\":1,\"x\":0,\"y\":242},\"sourceSize\":{\"h\":1,\"w\":1},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"hslider_s$up.png\":{\"frame\":{\"h\":1,\"idx\":0,\"w\":1,\"x\":0,\"y\":244},\"sourceSize\":{\"h\":1,\"w\":1},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"hslider_s.png\":{\"frame\":{\"h\":60,\"idx\":0,\"w\":226,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":60,\"w\":226},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"vslider_1@3x$down.png\":{\"frame\":{\"h\":1,\"idx\":0,\"w\":1,\"x\":0,\"y\":246},\"sourceSize\":{\"h\":1,\"w\":1},\"spriteSourceSize\":{\"x\":0,\"y\":0}},\"vslider_1@3x$up.png\":{\"frame\":{\"h\":1,\"idx\":0,\"w\":1,\"x\":0,\"y\":248},\"sourceSize\":{\"h\":1,\"w\":1},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"slider.png\",\"prefix\":\"images/slider/\"}}"
  },
  {
    "path": "public/images/atlas/images/texture.atlas",
    "content": "{\"frames\":{\"texture_1.png\":{\"frame\":{\"h\":400,\"idx\":0,\"w\":400,\"x\":0,\"y\":0},\"sourceSize\":{\"h\":400,\"w\":400},\"spriteSourceSize\":{\"x\":0,\"y\":0}}},\"meta\":{\"image\":\"texture.png\",\"prefix\":\"images/texture/\"}}"
  },
  {
    "path": "public/libs/laya/LayaRender.js",
    "content": "/**\n * Matter.js 渲染器在 LayaAir 的实现。\n */\n(function()\n{\n\tvar LayaRender = {};\n\n\tvar Common = Matter.Common;\n\tvar Composite = Matter.Composite;\n\tvar Bounds = Matter.Bounds;\n\tvar Events = Matter.Events;\n\tvar Grid = Matter.Grid;\n\tvar Vector = Matter.Vector;\n\n\t/**\n\t * 创建新的渲染器。\n\t * @param  {object} options 所有属性都有默认值，options中的属性会覆盖默认属性。\n\t * @return {render}         返回创建的旋绕器\n\t */\n\tLayaRender.create = function(options)\n\t{\n\t\tvar defaults = {\n\t\t\tcontroller: LayaRender,\n\t\t\tengine: null,\n\t\t\telement: null,\n\t\t\tcanvas: null,\n\t\t\tmouse: null,\n\t\t\tframeRequestId: null,\n\t\t\toptions:\n\t\t\t{\n\t\t\t\twidth: 800,\n\t\t\t\theight: 600,\n\t\t\t\tpixelRatio: 1,\n\t\t\t\tbackground: '#fafafa',\n\t\t\t\twireframeBackground: '#222222',\n\t\t\t\thasBounds: !!options.bounds,\n\t\t\t\tenabled: true,\n\t\t\t\twireframes: true,\n\t\t\t\tshowSleeping: true,\n\t\t\t\tshowDebug: false,\n\t\t\t\tshowBroadphase: false,\n\t\t\t\tshowBounds: false,\n\t\t\t\tshowVelocity: false,\n\t\t\t\tshowCollisions: false,\n\t\t\t\tshowSeparations: false,\n\t\t\t\tshowAxes: false,\n\t\t\t\tshowPositions: false,\n\t\t\t\tshowAngleIndicator: false,\n\t\t\t\tshowIds: false,\n\t\t\t\tshowShadows: false,\n\t\t\t\tshowVertexNumbers: false,\n\t\t\t\tshowConvexHulls: false,\n\t\t\t\tshowInternalEdges: false,\n\t\t\t\tshowMousePosition: false\n\t\t\t}\n\t\t};\n\t\tvar render = Common.extend(defaults, options);\n\t\trender.mouse = options.mouse;\n\t\trender.engine = options.engine;\n\t\t// 如果用户没有指定contaienr，默认使用stage\n\t\trender.container = render.container || Laya.stage;\n\t\trender.bounds = render.bounds ||\n\t\t{\n\t\t\tmin:\n\t\t\t{\n\t\t\t\tx: 0,\n\t\t\t\ty: 0\n\t\t\t},\n\t\t\tmax:\n\t\t\t{\n\t\t\t\tx: render.width,\n\t\t\t\ty: render.height\n\t\t\t}\n\t\t};\n\n\t\treturn render;\n\t}\n\n\t/**\n\t * 运行渲染器。\n\t * @param  {render} render 渲染的目标是LayaRender.create()返回的对象\n\t * @return {void}\n\t */\n\tLayaRender.run = function(render)\n\t{\n\t\tLaya.timer.frameLoop(1, this, LayaRender.world, [render]);\n\t\tEvents.on(render.engine.world, 'afterRemove', LayaRender.onRemoveSprite);\n\t};\n\n\t/**\n\t * 停止渲染器。\n\t * @param  {render} LayaRender.create()返回的对象\n\t * @return {void}\n\t */\n\tLayaRender.stop = function(render)\n\t{\n\t\tLaya.timer.clear(this, LayaRender.world);\n\t\tEvents.off(render.engine.world, 'afterRemove', LayaRender.onRemoveSprite);\n\t}\n\n\tLayaRender.onRemoveSprite = function(args)\n\t{\n\t\tvar sprite = args.object.layaSprite;\n\t\tif (sprite && sprite.parent)\n\t\t\tsprite.parent.removeChild(sprite);\n\t}\n\n\t/**\n\t * 渲染给定的 engine 的 Matter.World 对象。\n\t * 这是渲染的入口，每次场景改变时都应该被调用。\n\t * @param  {render} render\n\t * @return {void}\n\t */\n\tLayaRender.world = function(render)\n\t{\n\t\tvar engine = render.engine,\n\t\t\tworld = engine.world,\n\t\t\trenderer = render.renderer,\n\t\t\tcontainer = render.container,\n\t\t\toptions = render.options,\n\t\t\tbodies = Composite.allBodies(world),\n\t\t\tallConstraints = Composite.allConstraints(world),\n\t\t\tconstraints = [],\n\t\t\ti;\n\n\t\tif (options.wireframes)\n\t\t{\n\t\t\tLayaRender.setBackground(render, options.wireframeBackground);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tLayaRender.setBackground(render, options.background);\n\t\t}\n\n\t\t// 处理 bounds\n\t\tvar boundsWidth = render.bounds.max.x - render.bounds.min.x,\n\t\t\tboundsHeight = render.bounds.max.y - render.bounds.min.y,\n\t\t\tboundsScaleX = boundsWidth / render.options.width,\n\t\t\tboundsScaleY = boundsHeight / render.options.height;\n\n\t\tif (options.hasBounds)\n\t\t{\n\t\t\t// 隐藏不在视口内的bodies\n\t\t\tfor (i = 0; i < bodies.length; i++)\n\t\t\t{\n\t\t\t\tvar body = bodies[i];\n\t\t\t\tbody.render.sprite.visible = Bounds.overlaps(body.bounds, render.bounds);\n\t\t\t}\n\n\t\t\t// 过滤掉不在视口内的 constraints\n\t\t\tfor (i = 0; i < allConstraints.length; i++)\n\t\t\t{\n\t\t\t\tvar constraint = allConstraints[i],\n\t\t\t\t\tbodyA = constraint.bodyA,\n\t\t\t\t\tbodyB = constraint.bodyB,\n\t\t\t\t\tpointAWorld = constraint.pointA,\n\t\t\t\t\tpointBWorld = constraint.pointB;\n\n\t\t\t\tif (bodyA) pointAWorld = Vector.add(bodyA.position, constraint.pointA);\n\t\t\t\tif (bodyB) pointBWorld = Vector.add(bodyB.position, constraint.pointB);\n\n\t\t\t\tif (!pointAWorld || !pointBWorld)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif (Bounds.contains(render.bounds, pointAWorld) || Bounds.contains(render.bounds, pointBWorld))\n\t\t\t\t\tconstraints.push(constraint);\n\t\t\t}\n\n\t\t\t// 改变视口\n\t\t\tcontainer.scale(1 / boundsScaleX, 1 / boundsScaleY);\n\t\t\tcontainer.pos(-render.bounds.min.x * (1 / boundsScaleX), -render.bounds.min.y * (1 / boundsScaleY));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconstraints = allConstraints;\n\t\t}\n\n\t\tfor (i = 0; i < bodies.length; i++)\n\t\t\tLayaRender.body(render, bodies[i]);\n\n\t\tfor (i = 0; i < constraints.length; i++)\n\t\t\tLayaRender.constraint(render, constraints[i]);\n\t};\n\n\t/**\n\t * 设置背景色或者背景图片。\n\t * @param {render} render\n\t * @param {string} background 16进制颜色字符串或者图片路径\n\t */\n\tLayaRender.setBackground = function(render, background)\n\t{\n\t\tif (render.currentBackground !== background)\n\t\t{\n\t\t\tvar isColor = background.indexOf && background.indexOf('#') !== -1;\n\n\t\t\trender.container.graphics.clear();\n\n\t\t\tif (isColor)\n\t\t\t{\n\t\t\t\t// 使用纯色背景\n\t\t\t\trender.container.bgColor = background;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\trender.container.loadImage(background);\n\t\t\t\t// 使用背景图片时把背景色设置为白色\n\t\t\t\trender.container.bgColor = \"#FFFFFF\";\n\t\t\t}\n\n\t\t\trender.currentBackground = background;\n\t\t}\n\t}\n\n\t/**\n\t * 渲染 body\n\t * @param  {render} render\n\t * @param  {body} body\n\t * @return {void}\n\t */\n\tLayaRender.body = function(render, body)\n\t{\n\t\tvar engine = render.engine,\n\t\t\tbodyRender = body.render;\n\n\t\tif (!bodyRender.visible)\n\t\t\treturn;\n\n\t\t// 有纹理的body\n\t\tif (bodyRender.sprite && bodyRender.sprite.texture)\n\t\t{\n\t\t\tvar spriteId = 'b-' + body.id,\n\t\t\t\tsprite = body.layaSprite,\n\t\t\t\tcontainer = render.container;\n\n\t\t\t// 如果sprite不存在，则初始化一个\n\t\t\tif (!sprite)\n\t\t\t\tsprite = body.layaSprite = _createBodySprite(render, body);\n\n\t\t\t// 如果sprite未在显示列表，则添加至显示列表\n\t\t\tif (!container.contains(sprite))\n\t\t\t\tcontainer.addChild(sprite);\n\n\t\t\t// 更新sprite位置\n\t\t\tsprite.x = body.position.x;\n\t\t\tsprite.y = body.position.y;\n\t\t\tsprite.rotation = body.angle * 180 / Math.PI;\n\t\t\tsprite.scaleX = bodyRender.sprite.xScale || 1;\n\t\t\tsprite.scaleY = bodyRender.sprite.yScale || 1;\n\t\t}\n\t\telse // 没有纹理的body\n\t\t{\n\t\t\tvar primitiveId = 'b-' + body.id,\n\t\t\t\tsprite = body.layaSprite,\n\t\t\t\tcontainer = render.container;\n\n\t\t\t// 如果sprite不存在，则初始化一个\n\t\t\tif (!sprite)\n\t\t\t{\n\t\t\t\tsprite = body.layaSprite = _createBodyPrimitive(render, body);\n\t\t\t\tsprite.initialAngle = body.angle;\n\t\t\t}\n\n\t\t\t// 如果sprite未在显示列表，则添加至显示列表\n\t\t\tif (!container.contains(sprite))\n\t\t\t\tcontainer.addChild(sprite);\n\t\t\t// 更新sprite位置\n\t\t\tsprite.x = body.position.x;\n\t\t\tsprite.y = body.position.y;\n\t\t\tsprite.rotation = (body.angle - sprite.initialAngle) * 180 / Math.PI;\n\t\t}\n\t};\n\n\t/**\n\t * 创建使用纹理的Sprite对象。\n\t * @param  {render} render\n\t * @param  {body} body\n\t * @return {void}\n\t */\n\tvar _createBodySprite = function(render, body)\n\t{\n\t\tvar bodyRender = body.render,\n\t\t\ttexturePath = bodyRender.sprite.texture,\n\t\t\tsprite = new Laya.Sprite();\n\n\t\tsprite.loadImage(texturePath);\n\t\tsprite.pivotX = body.render.sprite.xOffset;\n\t\tsprite.pivotY = body.render.sprite.yOffset;\n\n\t\treturn sprite;\n\t};\n\n\t/**\n\t * 创建使用矢量绘图的Sprite对象。\n\t * @param  {render} render\n\t * @param  {body} body\n\t * @return {void}\n\t */\n\tvar _createBodyPrimitive = function(render, body)\n\t{\n\t\tvar bodyRender = body.render,\n\t\t\toptions = render.options,\n\t\t\tsprite = new Laya.Sprite(),\n\t\t\tfillStyle, strokeStyle, lineWidth,\n\t\t\tpart, points = [];\n\n\t\tvar primitive = sprite.graphics;\n\t\tprimitive.clear();\n\n\t\t// 处理 compound parts\n\t\tfor (var k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++)\n\t\t{\n\t\t\tpart = body.parts[k];\n\n\t\t\tif (!options.wireframes)\n\t\t\t{\n\t\t\t\tfillStyle = bodyRender.fillStyle;\n\t\t\t\tstrokeStyle = bodyRender.strokeStyle;\n\t\t\t\tlineWidth = bodyRender.lineWidth;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfillStyle = null;\n\t\t\t\tstrokeStyle = '#bbbbbb';\n\t\t\t\tlineWidth = 1;\n\t\t\t}\n\n\t\t\tpoints.push(part.vertices[0].x - body.position.x, part.vertices[0].y - body.position.y);\n\n\t\t\tfor (var j = 1; j < part.vertices.length; j++)\n\t\t\t{\n\t\t\t\tpoints.push(part.vertices[j].x - body.position.x, part.vertices[j].y - body.position.y);\n\t\t\t}\n\n\t\t\tpoints.push(part.vertices[0].x - body.position.x, part.vertices[0].y - body.position.y);\n\n\t\t\tprimitive.drawPoly(0, 0, points, fillStyle, strokeStyle, lineWidth);\n\n\t\t\t// 角度指示器\n\t\t\tif (options.showAngleIndicator || options.showAxes)\n\t\t\t{\n\t\t\t\tlineWidth = 1;\n\t\t\t\tif (options.wireframes)\n\t\t\t\t{\n\t\t\t\t\tstrokeStyle = '#CD5C5C';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstrokeStyle = bodyRender.strokeStyle;\n\t\t\t\t}\n\n\t\t\t\tprimitive.drawLine(part.position.x - body.position.x, part.position.y - body.position.y,\n\t\t\t\t\t((part.vertices[0].x + part.vertices[part.vertices.length - 1].x) / 2 - body.position.x),\n\t\t\t\t\t((part.vertices[0].y + part.vertices[part.vertices.length - 1].y) / 2 - body.position.y));\n\t\t\t}\n\t\t}\n\n\t\treturn sprite;\n\t};\n\n\t/**\n\t * 绘制 constraint。\n\t * @param  {render} render\n\t * @param  {constraint} constraint\n\t * @return {void}\n\t */\n\tLayaRender.constraint = function(render, constraint)\n\t{\n\t\tvar engine = render.engine,\n\t\t\tbodyA = constraint.bodyA,\n\t\t\tbodyB = constraint.bodyB,\n\t\t\tpointA = constraint.pointA,\n\t\t\tpointB = constraint.pointB,\n\t\t\tcontainer = render.container,\n\t\t\tconstraintRender = constraint.render,\n\t\t\tprimitiveId = 'c-' + constraint.id,\n\t\t\tsprite = constraint.layaSprite;\n\n\t\t// 如果sprite不存在，则初始化一个\n\t\tif (!sprite)\n\t\t\tsprite = constraint.layaSprite = new Laya.Sprite();\n\n\t\tvar primitive = sprite.graphics;\n\n\t\t// constraint 没有两个终点时不渲染\n\t\tif (!constraintRender.visible || !constraint.pointA || !constraint.pointB)\n\t\t{\n\t\t\tprimitive.clear();\n\t\t\treturn;\n\t\t}\n\n\t\t// 如果sprite未在显示列表，则添加至显示列表\n\t\tif (!container.contains(sprite))\n\t\t\tcontainer.addChild(sprite);\n\n\t\t// 渲染 constraint\n\t\tprimitive.clear();\n\n\t\tvar fromX, fromY, toX, toY;\n\t\tif (bodyA)\n\t\t{\n\t\t\tfromX = bodyA.position.x + pointA.x;\n\t\t\tfromY = bodyA.position.y + pointA.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfromX = pointA.x;\n\t\t\tfromY = pointA.y;\n\t\t}\n\n\t\tif (bodyB)\n\t\t{\n\t\t\ttoX = bodyB.position.x + pointB.x;\n\t\t\ttoY = bodyB.position.y + pointB.y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttoX = pointB.x;\n\t\t\ttoY = pointB.y;\n\t\t}\n\n\t\tprimitive.drawLine(fromX, fromY, toX, toY, constraintRender.strokeStyle, constraintRender.lineWidth);\n\t};\n\n\twindow.LayaRender = LayaRender;\n})();"
  },
  {
    "path": "public/libs/laya/bytebuffer.js",
    "content": "/*\n Copyright 2013-2014 Daniel Wirtz <dcode@dcode.io>\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n */\n\n/**\n * @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>\n * Backing buffer: ArrayBuffer, Accessor: Uint8Array\n * Released under the Apache License, Version 2.0\n * see: https://github.com/dcodeIO/bytebuffer.js for details\n */\n(function(global, factory) {\n\n    /* AMD */ if (typeof define === 'function' && define[\"amd\"])\n        define([\"long\"], factory);\n    /* CommonJS */ else if (typeof require === 'function' && typeof module === \"object\" && module && module[\"exports\"])\n        module['exports'] = (function() {\n            var Long; try { Long = require(\"long\"); } catch (e) {}\n            return factory(Long);\n        })();\n    /* Global */ else\n        (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"ByteBuffer\"] = factory(global[\"dcodeIO\"][\"Long\"]);\n\n})(this, function(Long) {\n    \"use strict\";\n\n    /**\n     * Constructs a new ByteBuffer.\n     * @class The swiss army knife for binary data in JavaScript.\n     * @exports ByteBuffer\n     * @constructor\n     * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\n     * @expose\n     */\n    var ByteBuffer = function(capacity, littleEndian, noAssert) {\n        if (typeof capacity === 'undefined')\n            capacity = ByteBuffer.DEFAULT_CAPACITY;\n        if (typeof littleEndian === 'undefined')\n            littleEndian = ByteBuffer.DEFAULT_ENDIAN;\n        if (typeof noAssert === 'undefined')\n            noAssert = ByteBuffer.DEFAULT_NOASSERT;\n        if (!noAssert) {\n            capacity = capacity | 0;\n            if (capacity < 0)\n                throw RangeError(\"Illegal capacity\");\n            littleEndian = !!littleEndian;\n            noAssert = !!noAssert;\n        }\n\n        /**\n         * Backing ArrayBuffer.\n         * @type {!ArrayBuffer}\n         * @expose\n         */\n        this.buffer = capacity === 0 ? EMPTY_BUFFER : new ArrayBuffer(capacity);\n\n        /**\n         * Uint8Array utilized to manipulate the backing buffer. Becomes `null` if the backing buffer has a capacity of `0`.\n         * @type {?Uint8Array}\n         * @expose\n         */\n        this.view = capacity === 0 ? null : new Uint8Array(this.buffer);\n\n        /**\n         * Absolute read/write offset.\n         * @type {number}\n         * @expose\n         * @see ByteBuffer#flip\n         * @see ByteBuffer#clear\n         */\n        this.offset = 0;\n\n        /**\n         * Marked offset.\n         * @type {number}\n         * @expose\n         * @see ByteBuffer#mark\n         * @see ByteBuffer#reset\n         */\n        this.markedOffset = -1;\n\n        /**\n         * Absolute limit of the contained data. Set to the backing buffer's capacity upon allocation.\n         * @type {number}\n         * @expose\n         * @see ByteBuffer#flip\n         * @see ByteBuffer#clear\n         */\n        this.limit = capacity;\n\n        /**\n         * Whether to use little endian byte order, defaults to `false` for big endian.\n         * @type {boolean}\n         * @expose\n         */\n        this.littleEndian = littleEndian;\n\n        /**\n         * Whether to skip assertions of offsets and values, defaults to `false`.\n         * @type {boolean}\n         * @expose\n         */\n        this.noAssert = noAssert;\n    };\n\n    /**\n     * ByteBuffer version.\n     * @type {string}\n     * @const\n     * @expose\n     */\n    ByteBuffer.VERSION = \"5.0.1\";\n\n    /**\n     * Little endian constant that can be used instead of its boolean value. Evaluates to `true`.\n     * @type {boolean}\n     * @const\n     * @expose\n     */\n    ByteBuffer.LITTLE_ENDIAN = true;\n\n    /**\n     * Big endian constant that can be used instead of its boolean value. Evaluates to `false`.\n     * @type {boolean}\n     * @const\n     * @expose\n     */\n    ByteBuffer.BIG_ENDIAN = false;\n\n    /**\n     * Default initial capacity of `16`.\n     * @type {number}\n     * @expose\n     */\n    ByteBuffer.DEFAULT_CAPACITY = 16;\n\n    /**\n     * Default endianess of `false` for big endian.\n     * @type {boolean}\n     * @expose\n     */\n    ByteBuffer.DEFAULT_ENDIAN = ByteBuffer.BIG_ENDIAN;\n\n    /**\n     * Default no assertions flag of `false`.\n     * @type {boolean}\n     * @expose\n     */\n    ByteBuffer.DEFAULT_NOASSERT = false;\n\n    /**\n     * A `Long` class for representing a 64-bit two's-complement integer value. May be `null` if Long.js has not been loaded\n     *  and int64 support is not available.\n     * @type {?Long}\n     * @const\n     * @see https://github.com/dcodeIO/long.js\n     * @expose\n     */\n    ByteBuffer.Long = Long || null;\n\n    /**\n     * @alias ByteBuffer.prototype\n     * @inner\n     */\n    var ByteBufferPrototype = ByteBuffer.prototype;\n\n    /**\n     * An indicator used to reliably determine if an object is a ByteBuffer or not.\n     * @type {boolean}\n     * @const\n     * @expose\n     * @private\n     */\n    ByteBufferPrototype.__isByteBuffer__;\n\n    Object.defineProperty(ByteBufferPrototype, \"__isByteBuffer__\", {\n        value: true,\n        enumerable: false,\n        configurable: false\n    });\n\n    // helpers\n\n    /**\n     * @type {!ArrayBuffer}\n     * @inner\n     */\n    var EMPTY_BUFFER = new ArrayBuffer(0);\n\n    /**\n     * String.fromCharCode reference for compile-time renaming.\n     * @type {function(...number):string}\n     * @inner\n     */\n    var stringFromCharCode = String.fromCharCode;\n\n    /**\n     * Creates a source function for a string.\n     * @param {string} s String to read from\n     * @returns {function():number|null} Source function returning the next char code respectively `null` if there are\n     *  no more characters left.\n     * @throws {TypeError} If the argument is invalid\n     * @inner\n     */\n    function stringSource(s) {\n        var i=0; return function() {\n            return i < s.length ? s.charCodeAt(i++) : null;\n        };\n    }\n\n    /**\n     * Creates a destination function for a string.\n     * @returns {function(number=):undefined|string} Destination function successively called with the next char code.\n     *  Returns the final string when called without arguments.\n     * @inner\n     */\n    function stringDestination() {\n        var cs = [], ps = []; return function() {\n            if (arguments.length === 0)\n                return ps.join('')+stringFromCharCode.apply(String, cs);\n            if (cs.length + arguments.length > 1024)\n                ps.push(stringFromCharCode.apply(String, cs)),\n                    cs.length = 0;\n            Array.prototype.push.apply(cs, arguments);\n        };\n    }\n\n    /**\n     * Gets the accessor type.\n     * @returns {Function} `Buffer` under node.js, `Uint8Array` respectively `DataView` in the browser (classes)\n     * @expose\n     */\n    ByteBuffer.accessor = function() {\n        return Uint8Array;\n    };\n    /**\n     * Allocates a new ByteBuffer backed by a buffer of the specified capacity.\n     * @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\n     * @returns {!ByteBuffer}\n     * @expose\n     */\n    ByteBuffer.allocate = function(capacity, littleEndian, noAssert) {\n        return new ByteBuffer(capacity, littleEndian, noAssert);\n    };\n\n    /**\n     * Concatenates multiple ByteBuffers into one.\n     * @param {!Array.<!ByteBuffer|!ArrayBuffer|!Uint8Array|string>} buffers Buffers to concatenate\n     * @param {(string|boolean)=} encoding String encoding if `buffers` contains a string (\"base64\", \"hex\", \"binary\",\n     *  defaults to \"utf8\")\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order for the resulting ByteBuffer. Defaults\n     *  to {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values for the resulting ByteBuffer. Defaults to\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\n     * @returns {!ByteBuffer} Concatenated ByteBuffer\n     * @expose\n     */\n    ByteBuffer.concat = function(buffers, encoding, littleEndian, noAssert) {\n        if (typeof encoding === 'boolean' || typeof encoding !== 'string') {\n            noAssert = littleEndian;\n            littleEndian = encoding;\n            encoding = undefined;\n        }\n        var capacity = 0;\n        for (var i=0, k=buffers.length, length; i<k; ++i) {\n            if (!ByteBuffer.isByteBuffer(buffers[i]))\n                buffers[i] = ByteBuffer.wrap(buffers[i], encoding);\n            length = buffers[i].limit - buffers[i].offset;\n            if (length > 0) capacity += length;\n        }\n        if (capacity === 0)\n            return new ByteBuffer(0, littleEndian, noAssert);\n        var bb = new ByteBuffer(capacity, littleEndian, noAssert),\n            bi;\n        i=0; while (i<k) {\n            bi = buffers[i++];\n            length = bi.limit - bi.offset;\n            if (length <= 0) continue;\n            bb.view.set(bi.view.subarray(bi.offset, bi.limit), bb.offset);\n            bb.offset += length;\n        }\n        bb.limit = bb.offset;\n        bb.offset = 0;\n        return bb;\n    };\n\n    /**\n     * Tests if the specified type is a ByteBuffer.\n     * @param {*} bb ByteBuffer to test\n     * @returns {boolean} `true` if it is a ByteBuffer, otherwise `false`\n     * @expose\n     */\n    ByteBuffer.isByteBuffer = function(bb) {\n        return (bb && bb[\"__isByteBuffer__\"]) === true;\n    };\n    /**\n     * Gets the backing buffer type.\n     * @returns {Function} `Buffer` under node.js, `ArrayBuffer` in the browser (classes)\n     * @expose\n     */\n    ByteBuffer.type = function() {\n        return ArrayBuffer;\n    };\n    /**\n     * Wraps a buffer or a string. Sets the allocated ByteBuffer's {@link ByteBuffer#offset} to `0` and its\n     *  {@link ByteBuffer#limit} to the length of the wrapped data.\n     * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string|!Array.<number>} buffer Anything that can be wrapped\n     * @param {(string|boolean)=} encoding String encoding if `buffer` is a string (\"base64\", \"hex\", \"binary\", defaults to\n     *  \"utf8\")\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\n     * @returns {!ByteBuffer} A ByteBuffer wrapping `buffer`\n     * @expose\n     */\n    ByteBuffer.wrap = function(buffer, encoding, littleEndian, noAssert) {\n        if (typeof encoding !== 'string') {\n            noAssert = littleEndian;\n            littleEndian = encoding;\n            encoding = undefined;\n        }\n        if (typeof buffer === 'string') {\n            if (typeof encoding === 'undefined')\n                encoding = \"utf8\";\n            switch (encoding) {\n                case \"base64\":\n                    return ByteBuffer.fromBase64(buffer, littleEndian);\n                case \"hex\":\n                    return ByteBuffer.fromHex(buffer, littleEndian);\n                case \"binary\":\n                    return ByteBuffer.fromBinary(buffer, littleEndian);\n                case \"utf8\":\n                    return ByteBuffer.fromUTF8(buffer, littleEndian);\n                case \"debug\":\n                    return ByteBuffer.fromDebug(buffer, littleEndian);\n                default:\n                    throw Error(\"Unsupported encoding: \"+encoding);\n            }\n        }\n        if (buffer === null || typeof buffer !== 'object')\n            throw TypeError(\"Illegal buffer\");\n        var bb;\n        if (ByteBuffer.isByteBuffer(buffer)) {\n            bb = ByteBufferPrototype.clone.call(buffer);\n            bb.markedOffset = -1;\n            return bb;\n        }\n        if (buffer instanceof Uint8Array) { // Extract ArrayBuffer from Uint8Array\n            bb = new ByteBuffer(0, littleEndian, noAssert);\n            if (buffer.length > 0) { // Avoid references to more than one EMPTY_BUFFER\n                bb.buffer = buffer.buffer;\n                bb.offset = buffer.byteOffset;\n                bb.limit = buffer.byteOffset + buffer.byteLength;\n                bb.view = new Uint8Array(buffer.buffer);\n            }\n        } else if (buffer instanceof ArrayBuffer) { // Reuse ArrayBuffer\n            bb = new ByteBuffer(0, littleEndian, noAssert);\n            if (buffer.byteLength > 0) {\n                bb.buffer = buffer;\n                bb.offset = 0;\n                bb.limit = buffer.byteLength;\n                bb.view = buffer.byteLength > 0 ? new Uint8Array(buffer) : null;\n            }\n        } else if (Object.prototype.toString.call(buffer) === \"[object Array]\") { // Create from octets\n            bb = new ByteBuffer(buffer.length, littleEndian, noAssert);\n            bb.limit = buffer.length;\n            for (var i=0; i<buffer.length; ++i)\n                bb.view[i] = buffer[i];\n        } else\n            throw TypeError(\"Illegal buffer\"); // Otherwise fail\n        return bb;\n    };\n\n    /**\n     * Writes the array as a bitset.\n     * @param {Array<boolean>} value Array of booleans to write\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\n     * @returns {!ByteBuffer}\n     * @expose\n     */\n    ByteBufferPrototype.writeBitSet = function(value, offset) {\n      var relative = typeof offset === 'undefined';\n      if (relative) offset = this.offset;\n      if (!this.noAssert) {\n        if (!(value instanceof Array))\n          throw TypeError(\"Illegal BitSet: Not an array\");\n        if (typeof offset !== 'number' || offset % 1 !== 0)\n            throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n        offset >>>= 0;\n        if (offset < 0 || offset + 0 > this.buffer.byteLength)\n            throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n      }\n\n      var start = offset,\n          bits = value.length,\n          bytes = (bits >> 3),\n          bit = 0,\n          k;\n\n      offset += this.writeVarint32(bits,offset);\n\n      while(bytes--) {\n        k = (!!value[bit++] & 1) |\n            ((!!value[bit++] & 1) << 1) |\n            ((!!value[bit++] & 1) << 2) |\n            ((!!value[bit++] & 1) << 3) |\n            ((!!value[bit++] & 1) << 4) |\n            ((!!value[bit++] & 1) << 5) |\n            ((!!value[bit++] & 1) << 6) |\n            ((!!value[bit++] & 1) << 7);\n        this.writeByte(k,offset++);\n      }\n\n      if(bit < bits) {\n        var m = 0; k = 0;\n        while(bit < bits) k = k | ((!!value[bit++] & 1) << (m++));\n        this.writeByte(k,offset++);\n      }\n\n      if (relative) {\n        this.offset = offset;\n        return this;\n      }\n      return offset - start;\n    }\n\n    /**\n     * Reads a BitSet as an array of booleans.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\n     * @returns {Array<boolean>\n     * @expose\n     */\n    ByteBufferPrototype.readBitSet = function(offset) {\n      var relative = typeof offset === 'undefined';\n      if (relative) offset = this.offset;\n\n      var ret = this.readVarint32(offset),\n          bits = ret.value,\n          bytes = (bits >> 3),\n          bit = 0,\n          value = [],\n          k;\n\n      offset += ret.length;\n\n      while(bytes--) {\n        k = this.readByte(offset++);\n        value[bit++] = !!(k & 0x01);\n        value[bit++] = !!(k & 0x02);\n        value[bit++] = !!(k & 0x04);\n        value[bit++] = !!(k & 0x08);\n        value[bit++] = !!(k & 0x10);\n        value[bit++] = !!(k & 0x20);\n        value[bit++] = !!(k & 0x40);\n        value[bit++] = !!(k & 0x80);\n      }\n\n      if(bit < bits) {\n        var m = 0;\n        k = this.readByte(offset++);\n        while(bit < bits) value[bit++] = !!((k >> (m++)) & 1);\n      }\n\n      if (relative) {\n        this.offset = offset;\n      }\n      return value;\n    }\n    /**\n     * Reads the specified number of bytes.\n     * @param {number} length Number of bytes to read\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `length` if omitted.\n     * @returns {!ByteBuffer}\n     * @expose\n     */\n    ByteBufferPrototype.readBytes = function(length, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + length > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+length+\") <= \"+this.buffer.byteLength);\n        }\n        var slice = this.slice(offset, offset + length);\n        if (relative) this.offset += length;\n        return slice;\n    };\n\n    /**\n     * Writes a payload of bytes. This is an alias of {@link ByteBuffer#append}.\n     * @function\n     * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to write. If `source` is a ByteBuffer, its offsets\n     *  will be modified according to the performed read operation.\n     * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeBytes = ByteBufferPrototype.append;\n\n    // types/ints/int8\n\n    /**\n     * Writes an 8bit signed integer.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeInt8 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        offset += 1;\n        var capacity0 = this.buffer.byteLength;\n        if (offset > capacity0)\n            this.resize((capacity0 *= 2) > offset ? capacity0 : offset);\n        offset -= 1;\n        this.view[offset] = value;\n        if (relative) this.offset += 1;\n        return this;\n    };\n\n    /**\n     * Writes an 8bit signed integer. This is an alias of {@link ByteBuffer#writeInt8}.\n     * @function\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeByte = ByteBufferPrototype.writeInt8;\n\n    /**\n     * Reads an 8bit signed integer.\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\n     * @returns {number} Value read\n     * @expose\n     */\n    ByteBufferPrototype.readInt8 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\n        var value = this.view[offset];\n        if ((value & 0x80) === 0x80) value = -(0xFF - value + 1); // Cast to signed\n        if (relative) this.offset += 1;\n        return value;\n    };\n\n    /**\n     * Reads an 8bit signed integer. This is an alias of {@link ByteBuffer#readInt8}.\n     * @function\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\n     * @returns {number} Value read\n     * @expose\n     */\n    ByteBufferPrototype.readByte = ByteBufferPrototype.readInt8;\n\n    /**\n     * Writes an 8bit unsigned integer.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeUint8 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value >>>= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        offset += 1;\n        var capacity1 = this.buffer.byteLength;\n        if (offset > capacity1)\n            this.resize((capacity1 *= 2) > offset ? capacity1 : offset);\n        offset -= 1;\n        this.view[offset] = value;\n        if (relative) this.offset += 1;\n        return this;\n    };\n\n    /**\n     * Writes an 8bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint8}.\n     * @function\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeUInt8 = ByteBufferPrototype.writeUint8;\n\n    /**\n     * Reads an 8bit unsigned integer.\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\n     * @returns {number} Value read\n     * @expose\n     */\n    ByteBufferPrototype.readUint8 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\n        var value = this.view[offset];\n        if (relative) this.offset += 1;\n        return value;\n    };\n\n    /**\n     * Reads an 8bit unsigned integer. This is an alias of {@link ByteBuffer#readUint8}.\n     * @function\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `1` if omitted.\n     * @returns {number} Value read\n     * @expose\n     */\n    ByteBufferPrototype.readUInt8 = ByteBufferPrototype.readUint8;\n\n    // types/ints/int16\n\n    /**\n     * Writes a 16bit signed integer.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\n     * @throws {TypeError} If `offset` or `value` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.writeInt16 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        offset += 2;\n        var capacity2 = this.buffer.byteLength;\n        if (offset > capacity2)\n            this.resize((capacity2 *= 2) > offset ? capacity2 : offset);\n        offset -= 2;\n        if (this.littleEndian) {\n            this.view[offset+1] = (value & 0xFF00) >>> 8;\n            this.view[offset  ] =  value & 0x00FF;\n        } else {\n            this.view[offset]   = (value & 0xFF00) >>> 8;\n            this.view[offset+1] =  value & 0x00FF;\n        }\n        if (relative) this.offset += 2;\n        return this;\n    };\n\n    /**\n     * Writes a 16bit signed integer. This is an alias of {@link ByteBuffer#writeInt16}.\n     * @function\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\n     * @throws {TypeError} If `offset` or `value` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.writeShort = ByteBufferPrototype.writeInt16;\n\n    /**\n     * Reads a 16bit signed integer.\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\n     * @returns {number} Value read\n     * @throws {TypeError} If `offset` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.readInt16 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 2 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+2+\") <= \"+this.buffer.byteLength);\n        }\n        var value = 0;\n        if (this.littleEndian) {\n            value  = this.view[offset  ];\n            value |= this.view[offset+1] << 8;\n        } else {\n            value  = this.view[offset  ] << 8;\n            value |= this.view[offset+1];\n        }\n        if ((value & 0x8000) === 0x8000) value = -(0xFFFF - value + 1); // Cast to signed\n        if (relative) this.offset += 2;\n        return value;\n    };\n\n    /**\n     * Reads a 16bit signed integer. This is an alias of {@link ByteBuffer#readInt16}.\n     * @function\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\n     * @returns {number} Value read\n     * @throws {TypeError} If `offset` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.readShort = ByteBufferPrototype.readInt16;\n\n    /**\n     * Writes a 16bit unsigned integer.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\n     * @throws {TypeError} If `offset` or `value` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.writeUint16 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value >>>= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        offset += 2;\n        var capacity3 = this.buffer.byteLength;\n        if (offset > capacity3)\n            this.resize((capacity3 *= 2) > offset ? capacity3 : offset);\n        offset -= 2;\n        if (this.littleEndian) {\n            this.view[offset+1] = (value & 0xFF00) >>> 8;\n            this.view[offset  ] =  value & 0x00FF;\n        } else {\n            this.view[offset]   = (value & 0xFF00) >>> 8;\n            this.view[offset+1] =  value & 0x00FF;\n        }\n        if (relative) this.offset += 2;\n        return this;\n    };\n\n    /**\n     * Writes a 16bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint16}.\n     * @function\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\n     * @throws {TypeError} If `offset` or `value` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.writeUInt16 = ByteBufferPrototype.writeUint16;\n\n    /**\n     * Reads a 16bit unsigned integer.\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\n     * @returns {number} Value read\n     * @throws {TypeError} If `offset` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.readUint16 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 2 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+2+\") <= \"+this.buffer.byteLength);\n        }\n        var value = 0;\n        if (this.littleEndian) {\n            value  = this.view[offset  ];\n            value |= this.view[offset+1] << 8;\n        } else {\n            value  = this.view[offset  ] << 8;\n            value |= this.view[offset+1];\n        }\n        if (relative) this.offset += 2;\n        return value;\n    };\n\n    /**\n     * Reads a 16bit unsigned integer. This is an alias of {@link ByteBuffer#readUint16}.\n     * @function\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `2` if omitted.\n     * @returns {number} Value read\n     * @throws {TypeError} If `offset` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.readUInt16 = ByteBufferPrototype.readUint16;\n\n    // types/ints/int32\n\n    /**\n     * Writes a 32bit signed integer.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @expose\n     */\n    ByteBufferPrototype.writeInt32 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        offset += 4;\n        var capacity4 = this.buffer.byteLength;\n        if (offset > capacity4)\n            this.resize((capacity4 *= 2) > offset ? capacity4 : offset);\n        offset -= 4;\n        if (this.littleEndian) {\n            this.view[offset+3] = (value >>> 24) & 0xFF;\n            this.view[offset+2] = (value >>> 16) & 0xFF;\n            this.view[offset+1] = (value >>>  8) & 0xFF;\n            this.view[offset  ] =  value         & 0xFF;\n        } else {\n            this.view[offset  ] = (value >>> 24) & 0xFF;\n            this.view[offset+1] = (value >>> 16) & 0xFF;\n            this.view[offset+2] = (value >>>  8) & 0xFF;\n            this.view[offset+3] =  value         & 0xFF;\n        }\n        if (relative) this.offset += 4;\n        return this;\n    };\n\n    /**\n     * Writes a 32bit signed integer. This is an alias of {@link ByteBuffer#writeInt32}.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @expose\n     */\n    ByteBufferPrototype.writeInt = ByteBufferPrototype.writeInt32;\n\n    /**\n     * Reads a 32bit signed integer.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @returns {number} Value read\n     * @expose\n     */\n    ByteBufferPrototype.readInt32 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 4 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n        }\n        var value = 0;\n        if (this.littleEndian) {\n            value  = this.view[offset+2] << 16;\n            value |= this.view[offset+1] <<  8;\n            value |= this.view[offset  ];\n            value += this.view[offset+3] << 24 >>> 0;\n        } else {\n            value  = this.view[offset+1] << 16;\n            value |= this.view[offset+2] <<  8;\n            value |= this.view[offset+3];\n            value += this.view[offset  ] << 24 >>> 0;\n        }\n        value |= 0; // Cast to signed\n        if (relative) this.offset += 4;\n        return value;\n    };\n\n    /**\n     * Reads a 32bit signed integer. This is an alias of {@link ByteBuffer#readInt32}.\n     * @param {number=} offset Offset to read from. Will use and advance {@link ByteBuffer#offset} by `4` if omitted.\n     * @returns {number} Value read\n     * @expose\n     */\n    ByteBufferPrototype.readInt = ByteBufferPrototype.readInt32;\n\n    /**\n     * Writes a 32bit unsigned integer.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @expose\n     */\n    ByteBufferPrototype.writeUint32 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value >>>= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        offset += 4;\n        var capacity5 = this.buffer.byteLength;\n        if (offset > capacity5)\n            this.resize((capacity5 *= 2) > offset ? capacity5 : offset);\n        offset -= 4;\n        if (this.littleEndian) {\n            this.view[offset+3] = (value >>> 24) & 0xFF;\n            this.view[offset+2] = (value >>> 16) & 0xFF;\n            this.view[offset+1] = (value >>>  8) & 0xFF;\n            this.view[offset  ] =  value         & 0xFF;\n        } else {\n            this.view[offset  ] = (value >>> 24) & 0xFF;\n            this.view[offset+1] = (value >>> 16) & 0xFF;\n            this.view[offset+2] = (value >>>  8) & 0xFF;\n            this.view[offset+3] =  value         & 0xFF;\n        }\n        if (relative) this.offset += 4;\n        return this;\n    };\n\n    /**\n     * Writes a 32bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint32}.\n     * @function\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @expose\n     */\n    ByteBufferPrototype.writeUInt32 = ByteBufferPrototype.writeUint32;\n\n    /**\n     * Reads a 32bit unsigned integer.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @returns {number} Value read\n     * @expose\n     */\n    ByteBufferPrototype.readUint32 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 4 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n        }\n        var value = 0;\n        if (this.littleEndian) {\n            value  = this.view[offset+2] << 16;\n            value |= this.view[offset+1] <<  8;\n            value |= this.view[offset  ];\n            value += this.view[offset+3] << 24 >>> 0;\n        } else {\n            value  = this.view[offset+1] << 16;\n            value |= this.view[offset+2] <<  8;\n            value |= this.view[offset+3];\n            value += this.view[offset  ] << 24 >>> 0;\n        }\n        if (relative) this.offset += 4;\n        return value;\n    };\n\n    /**\n     * Reads a 32bit unsigned integer. This is an alias of {@link ByteBuffer#readUint32}.\n     * @function\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @returns {number} Value read\n     * @expose\n     */\n    ByteBufferPrototype.readUInt32 = ByteBufferPrototype.readUint32;\n\n    // types/ints/int64\n\n    if (Long) {\n\n        /**\n         * Writes a 64bit signed integer.\n         * @param {number|!Long} value Value to write\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n         * @returns {!ByteBuffer} this\n         * @expose\n         */\n        ByteBufferPrototype.writeInt64 = function(value, offset) {\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\n                if (typeof value === 'number')\n                    value = Long.fromNumber(value);\n                else if (typeof value === 'string')\n                    value = Long.fromString(value);\n                else if (!(value && value instanceof Long))\n                    throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n            }\n            if (typeof value === 'number')\n                value = Long.fromNumber(value);\n            else if (typeof value === 'string')\n                value = Long.fromString(value);\n            offset += 8;\n            var capacity6 = this.buffer.byteLength;\n            if (offset > capacity6)\n                this.resize((capacity6 *= 2) > offset ? capacity6 : offset);\n            offset -= 8;\n            var lo = value.low,\n                hi = value.high;\n            if (this.littleEndian) {\n                this.view[offset+3] = (lo >>> 24) & 0xFF;\n                this.view[offset+2] = (lo >>> 16) & 0xFF;\n                this.view[offset+1] = (lo >>>  8) & 0xFF;\n                this.view[offset  ] =  lo         & 0xFF;\n                offset += 4;\n                this.view[offset+3] = (hi >>> 24) & 0xFF;\n                this.view[offset+2] = (hi >>> 16) & 0xFF;\n                this.view[offset+1] = (hi >>>  8) & 0xFF;\n                this.view[offset  ] =  hi         & 0xFF;\n            } else {\n                this.view[offset  ] = (hi >>> 24) & 0xFF;\n                this.view[offset+1] = (hi >>> 16) & 0xFF;\n                this.view[offset+2] = (hi >>>  8) & 0xFF;\n                this.view[offset+3] =  hi         & 0xFF;\n                offset += 4;\n                this.view[offset  ] = (lo >>> 24) & 0xFF;\n                this.view[offset+1] = (lo >>> 16) & 0xFF;\n                this.view[offset+2] = (lo >>>  8) & 0xFF;\n                this.view[offset+3] =  lo         & 0xFF;\n            }\n            if (relative) this.offset += 8;\n            return this;\n        };\n\n        /**\n         * Writes a 64bit signed integer. This is an alias of {@link ByteBuffer#writeInt64}.\n         * @param {number|!Long} value Value to write\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n         * @returns {!ByteBuffer} this\n         * @expose\n         */\n        ByteBufferPrototype.writeLong = ByteBufferPrototype.writeInt64;\n\n        /**\n         * Reads a 64bit signed integer.\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n         * @returns {!Long}\n         * @expose\n         */\n        ByteBufferPrototype.readInt64 = function(offset) {\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 8 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n            }\n            var lo = 0,\n                hi = 0;\n            if (this.littleEndian) {\n                lo  = this.view[offset+2] << 16;\n                lo |= this.view[offset+1] <<  8;\n                lo |= this.view[offset  ];\n                lo += this.view[offset+3] << 24 >>> 0;\n                offset += 4;\n                hi  = this.view[offset+2] << 16;\n                hi |= this.view[offset+1] <<  8;\n                hi |= this.view[offset  ];\n                hi += this.view[offset+3] << 24 >>> 0;\n            } else {\n                hi  = this.view[offset+1] << 16;\n                hi |= this.view[offset+2] <<  8;\n                hi |= this.view[offset+3];\n                hi += this.view[offset  ] << 24 >>> 0;\n                offset += 4;\n                lo  = this.view[offset+1] << 16;\n                lo |= this.view[offset+2] <<  8;\n                lo |= this.view[offset+3];\n                lo += this.view[offset  ] << 24 >>> 0;\n            }\n            var value = new Long(lo, hi, false);\n            if (relative) this.offset += 8;\n            return value;\n        };\n\n        /**\n         * Reads a 64bit signed integer. This is an alias of {@link ByteBuffer#readInt64}.\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n         * @returns {!Long}\n         * @expose\n         */\n        ByteBufferPrototype.readLong = ByteBufferPrototype.readInt64;\n\n        /**\n         * Writes a 64bit unsigned integer.\n         * @param {number|!Long} value Value to write\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n         * @returns {!ByteBuffer} this\n         * @expose\n         */\n        ByteBufferPrototype.writeUint64 = function(value, offset) {\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\n                if (typeof value === 'number')\n                    value = Long.fromNumber(value);\n                else if (typeof value === 'string')\n                    value = Long.fromString(value);\n                else if (!(value && value instanceof Long))\n                    throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n            }\n            if (typeof value === 'number')\n                value = Long.fromNumber(value);\n            else if (typeof value === 'string')\n                value = Long.fromString(value);\n            offset += 8;\n            var capacity7 = this.buffer.byteLength;\n            if (offset > capacity7)\n                this.resize((capacity7 *= 2) > offset ? capacity7 : offset);\n            offset -= 8;\n            var lo = value.low,\n                hi = value.high;\n            if (this.littleEndian) {\n                this.view[offset+3] = (lo >>> 24) & 0xFF;\n                this.view[offset+2] = (lo >>> 16) & 0xFF;\n                this.view[offset+1] = (lo >>>  8) & 0xFF;\n                this.view[offset  ] =  lo         & 0xFF;\n                offset += 4;\n                this.view[offset+3] = (hi >>> 24) & 0xFF;\n                this.view[offset+2] = (hi >>> 16) & 0xFF;\n                this.view[offset+1] = (hi >>>  8) & 0xFF;\n                this.view[offset  ] =  hi         & 0xFF;\n            } else {\n                this.view[offset  ] = (hi >>> 24) & 0xFF;\n                this.view[offset+1] = (hi >>> 16) & 0xFF;\n                this.view[offset+2] = (hi >>>  8) & 0xFF;\n                this.view[offset+3] =  hi         & 0xFF;\n                offset += 4;\n                this.view[offset  ] = (lo >>> 24) & 0xFF;\n                this.view[offset+1] = (lo >>> 16) & 0xFF;\n                this.view[offset+2] = (lo >>>  8) & 0xFF;\n                this.view[offset+3] =  lo         & 0xFF;\n            }\n            if (relative) this.offset += 8;\n            return this;\n        };\n\n        /**\n         * Writes a 64bit unsigned integer. This is an alias of {@link ByteBuffer#writeUint64}.\n         * @function\n         * @param {number|!Long} value Value to write\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n         * @returns {!ByteBuffer} this\n         * @expose\n         */\n        ByteBufferPrototype.writeUInt64 = ByteBufferPrototype.writeUint64;\n\n        /**\n         * Reads a 64bit unsigned integer.\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n         * @returns {!Long}\n         * @expose\n         */\n        ByteBufferPrototype.readUint64 = function(offset) {\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 8 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n            }\n            var lo = 0,\n                hi = 0;\n            if (this.littleEndian) {\n                lo  = this.view[offset+2] << 16;\n                lo |= this.view[offset+1] <<  8;\n                lo |= this.view[offset  ];\n                lo += this.view[offset+3] << 24 >>> 0;\n                offset += 4;\n                hi  = this.view[offset+2] << 16;\n                hi |= this.view[offset+1] <<  8;\n                hi |= this.view[offset  ];\n                hi += this.view[offset+3] << 24 >>> 0;\n            } else {\n                hi  = this.view[offset+1] << 16;\n                hi |= this.view[offset+2] <<  8;\n                hi |= this.view[offset+3];\n                hi += this.view[offset  ] << 24 >>> 0;\n                offset += 4;\n                lo  = this.view[offset+1] << 16;\n                lo |= this.view[offset+2] <<  8;\n                lo |= this.view[offset+3];\n                lo += this.view[offset  ] << 24 >>> 0;\n            }\n            var value = new Long(lo, hi, true);\n            if (relative) this.offset += 8;\n            return value;\n        };\n\n        /**\n         * Reads a 64bit unsigned integer. This is an alias of {@link ByteBuffer#readUint64}.\n         * @function\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n         * @returns {!Long}\n         * @expose\n         */\n        ByteBufferPrototype.readUInt64 = ByteBufferPrototype.readUint64;\n\n    } // Long\n\n\n    // types/floats/float32\n\n    /*\n     ieee754 - https://github.com/feross/ieee754\n\n     The MIT License (MIT)\n\n     Copyright (c) Feross Aboukhadijeh\n\n     Permission is hereby granted, free of charge, to any person obtaining a copy\n     of this software and associated documentation files (the \"Software\"), to deal\n     in the Software without restriction, including without limitation the rights\n     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n     copies of the Software, and to permit persons to whom the Software is\n     furnished to do so, subject to the following conditions:\n\n     The above copyright notice and this permission notice shall be included in\n     all copies or substantial portions of the Software.\n\n     THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n     THE SOFTWARE.\n    */\n\n    /**\n     * Reads an IEEE754 float from a byte array.\n     * @param {!Array} buffer\n     * @param {number} offset\n     * @param {boolean} isLE\n     * @param {number} mLen\n     * @param {number} nBytes\n     * @returns {number}\n     * @inner\n     */\n    function ieee754_read(buffer, offset, isLE, mLen, nBytes) {\n        var e, m,\n            eLen = nBytes * 8 - mLen - 1,\n            eMax = (1 << eLen) - 1,\n            eBias = eMax >> 1,\n            nBits = -7,\n            i = isLE ? (nBytes - 1) : 0,\n            d = isLE ? -1 : 1,\n            s = buffer[offset + i];\n\n        i += d;\n\n        e = s & ((1 << (-nBits)) - 1);\n        s >>= (-nBits);\n        nBits += eLen;\n        for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n        m = e & ((1 << (-nBits)) - 1);\n        e >>= (-nBits);\n        nBits += mLen;\n        for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n        if (e === 0) {\n            e = 1 - eBias;\n        } else if (e === eMax) {\n            return m ? NaN : ((s ? -1 : 1) * Infinity);\n        } else {\n            m = m + Math.pow(2, mLen);\n            e = e - eBias;\n        }\n        return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n    }\n\n    /**\n     * Writes an IEEE754 float to a byte array.\n     * @param {!Array} buffer\n     * @param {number} value\n     * @param {number} offset\n     * @param {boolean} isLE\n     * @param {number} mLen\n     * @param {number} nBytes\n     * @inner\n     */\n    function ieee754_write(buffer, value, offset, isLE, mLen, nBytes) {\n        var e, m, c,\n            eLen = nBytes * 8 - mLen - 1,\n            eMax = (1 << eLen) - 1,\n            eBias = eMax >> 1,\n            rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),\n            i = isLE ? 0 : (nBytes - 1),\n            d = isLE ? 1 : -1,\n            s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n        value = Math.abs(value);\n\n        if (isNaN(value) || value === Infinity) {\n            m = isNaN(value) ? 1 : 0;\n            e = eMax;\n        } else {\n            e = Math.floor(Math.log(value) / Math.LN2);\n            if (value * (c = Math.pow(2, -e)) < 1) {\n                e--;\n                c *= 2;\n            }\n            if (e + eBias >= 1) {\n                value += rt / c;\n            } else {\n                value += rt * Math.pow(2, 1 - eBias);\n            }\n            if (value * c >= 2) {\n                e++;\n                c /= 2;\n            }\n\n            if (e + eBias >= eMax) {\n                m = 0;\n                e = eMax;\n            } else if (e + eBias >= 1) {\n                m = (value * c - 1) * Math.pow(2, mLen);\n                e = e + eBias;\n            } else {\n                m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n                e = 0;\n            }\n        }\n\n        for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n        e = (e << mLen) | m;\n        eLen += mLen;\n        for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n        buffer[offset + i - d] |= s * 128;\n    }\n\n    /**\n     * Writes a 32bit float.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeFloat32 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number')\n                throw TypeError(\"Illegal value: \"+value+\" (not a number)\");\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        offset += 4;\n        var capacity8 = this.buffer.byteLength;\n        if (offset > capacity8)\n            this.resize((capacity8 *= 2) > offset ? capacity8 : offset);\n        offset -= 4;\n        ieee754_write(this.view, value, offset, this.littleEndian, 23, 4);\n        if (relative) this.offset += 4;\n        return this;\n    };\n\n    /**\n     * Writes a 32bit float. This is an alias of {@link ByteBuffer#writeFloat32}.\n     * @function\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeFloat = ByteBufferPrototype.writeFloat32;\n\n    /**\n     * Reads a 32bit float.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @returns {number}\n     * @expose\n     */\n    ByteBufferPrototype.readFloat32 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 4 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n        }\n        var value = ieee754_read(this.view, offset, this.littleEndian, 23, 4);\n        if (relative) this.offset += 4;\n        return value;\n    };\n\n    /**\n     * Reads a 32bit float. This is an alias of {@link ByteBuffer#readFloat32}.\n     * @function\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `4` if omitted.\n     * @returns {number}\n     * @expose\n     */\n    ByteBufferPrototype.readFloat = ByteBufferPrototype.readFloat32;\n\n    // types/floats/float64\n\n    /**\n     * Writes a 64bit float.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeFloat64 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number')\n                throw TypeError(\"Illegal value: \"+value+\" (not a number)\");\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        offset += 8;\n        var capacity9 = this.buffer.byteLength;\n        if (offset > capacity9)\n            this.resize((capacity9 *= 2) > offset ? capacity9 : offset);\n        offset -= 8;\n        ieee754_write(this.view, value, offset, this.littleEndian, 52, 8);\n        if (relative) this.offset += 8;\n        return this;\n    };\n\n    /**\n     * Writes a 64bit float. This is an alias of {@link ByteBuffer#writeFloat64}.\n     * @function\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.writeDouble = ByteBufferPrototype.writeFloat64;\n\n    /**\n     * Reads a 64bit float.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n     * @returns {number}\n     * @expose\n     */\n    ByteBufferPrototype.readFloat64 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 8 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+8+\") <= \"+this.buffer.byteLength);\n        }\n        var value = ieee754_read(this.view, offset, this.littleEndian, 52, 8);\n        if (relative) this.offset += 8;\n        return value;\n    };\n\n    /**\n     * Reads a 64bit float. This is an alias of {@link ByteBuffer#readFloat64}.\n     * @function\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by `8` if omitted.\n     * @returns {number}\n     * @expose\n     */\n    ByteBufferPrototype.readDouble = ByteBufferPrototype.readFloat64;\n\n\n    // types/varints/varint32\n\n    /**\n     * Maximum number of bytes required to store a 32bit base 128 variable-length integer.\n     * @type {number}\n     * @const\n     * @expose\n     */\n    ByteBuffer.MAX_VARINT32_BYTES = 5;\n\n    /**\n     * Calculates the actual number of bytes required to store a 32bit base 128 variable-length integer.\n     * @param {number} value Value to encode\n     * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT32_BYTES}\n     * @expose\n     */\n    ByteBuffer.calculateVarint32 = function(value) {\n        // ref: src/google/protobuf/io/coded_stream.cc\n        value = value >>> 0;\n             if (value < 1 << 7 ) return 1;\n        else if (value < 1 << 14) return 2;\n        else if (value < 1 << 21) return 3;\n        else if (value < 1 << 28) return 4;\n        else                      return 5;\n    };\n\n    /**\n     * Zigzag encodes a signed 32bit integer so that it can be effectively used with varint encoding.\n     * @param {number} n Signed 32bit integer\n     * @returns {number} Unsigned zigzag encoded 32bit integer\n     * @expose\n     */\n    ByteBuffer.zigZagEncode32 = function(n) {\n        return (((n |= 0) << 1) ^ (n >> 31)) >>> 0; // ref: src/google/protobuf/wire_format_lite.h\n    };\n\n    /**\n     * Decodes a zigzag encoded signed 32bit integer.\n     * @param {number} n Unsigned zigzag encoded 32bit integer\n     * @returns {number} Signed 32bit integer\n     * @expose\n     */\n    ByteBuffer.zigZagDecode32 = function(n) {\n        return ((n >>> 1) ^ -(n & 1)) | 0; // // ref: src/google/protobuf/wire_format_lite.h\n    };\n\n    /**\n     * Writes a 32bit base 128 variable-length integer.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted.\n     * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written\n     * @expose\n     */\n    ByteBufferPrototype.writeVarint32 = function(value, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        var size = ByteBuffer.calculateVarint32(value),\n            b;\n        offset += size;\n        var capacity10 = this.buffer.byteLength;\n        if (offset > capacity10)\n            this.resize((capacity10 *= 2) > offset ? capacity10 : offset);\n        offset -= size;\n        value >>>= 0;\n        while (value >= 0x80) {\n            b = (value & 0x7f) | 0x80;\n            this.view[offset++] = b;\n            value >>>= 7;\n        }\n        this.view[offset++] = value;\n        if (relative) {\n            this.offset = offset;\n            return this;\n        }\n        return size;\n    };\n\n    /**\n     * Writes a zig-zag encoded (signed) 32bit base 128 variable-length integer.\n     * @param {number} value Value to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted.\n     * @returns {!ByteBuffer|number} this if `offset` is omitted, else the actual number of bytes written\n     * @expose\n     */\n    ByteBufferPrototype.writeVarint32ZigZag = function(value, offset) {\n        return this.writeVarint32(ByteBuffer.zigZagEncode32(value), offset);\n    };\n\n    /**\n     * Reads a 32bit base 128 variable-length integer.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted.\n     * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read\n     *  and the actual number of bytes read.\n     * @throws {Error} If it's not a valid varint. Has a property `truncated = true` if there is not enough data available\n     *  to fully decode the varint.\n     * @expose\n     */\n    ByteBufferPrototype.readVarint32 = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\n        var c = 0,\n            value = 0 >>> 0,\n            b;\n        do {\n            if (!this.noAssert && offset > this.limit) {\n                var err = Error(\"Truncated\");\n                err['truncated'] = true;\n                throw err;\n            }\n            b = this.view[offset++];\n            if (c < 5)\n                value |= (b & 0x7f) << (7*c);\n            ++c;\n        } while ((b & 0x80) !== 0);\n        value |= 0;\n        if (relative) {\n            this.offset = offset;\n            return value;\n        }\n        return {\n            \"value\": value,\n            \"length\": c\n        };\n    };\n\n    /**\n     * Reads a zig-zag encoded (signed) 32bit base 128 variable-length integer.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted.\n     * @returns {number|!{value: number, length: number}} The value read if offset is omitted, else the value read\n     *  and the actual number of bytes read.\n     * @throws {Error} If it's not a valid varint\n     * @expose\n     */\n    ByteBufferPrototype.readVarint32ZigZag = function(offset) {\n        var val = this.readVarint32(offset);\n        if (typeof val === 'object')\n            val[\"value\"] = ByteBuffer.zigZagDecode32(val[\"value\"]);\n        else\n            val = ByteBuffer.zigZagDecode32(val);\n        return val;\n    };\n\n    // types/varints/varint64\n\n    if (Long) {\n\n        /**\n         * Maximum number of bytes required to store a 64bit base 128 variable-length integer.\n         * @type {number}\n         * @const\n         * @expose\n         */\n        ByteBuffer.MAX_VARINT64_BYTES = 10;\n\n        /**\n         * Calculates the actual number of bytes required to store a 64bit base 128 variable-length integer.\n         * @param {number|!Long} value Value to encode\n         * @returns {number} Number of bytes required. Capped to {@link ByteBuffer.MAX_VARINT64_BYTES}\n         * @expose\n         */\n        ByteBuffer.calculateVarint64 = function(value) {\n            if (typeof value === 'number')\n                value = Long.fromNumber(value);\n            else if (typeof value === 'string')\n                value = Long.fromString(value);\n            // ref: src/google/protobuf/io/coded_stream.cc\n            var part0 = value.toInt() >>> 0,\n                part1 = value.shiftRightUnsigned(28).toInt() >>> 0,\n                part2 = value.shiftRightUnsigned(56).toInt() >>> 0;\n            if (part2 == 0) {\n                if (part1 == 0) {\n                    if (part0 < 1 << 14)\n                        return part0 < 1 << 7 ? 1 : 2;\n                    else\n                        return part0 < 1 << 21 ? 3 : 4;\n                } else {\n                    if (part1 < 1 << 14)\n                        return part1 < 1 << 7 ? 5 : 6;\n                    else\n                        return part1 < 1 << 21 ? 7 : 8;\n                }\n            } else\n                return part2 < 1 << 7 ? 9 : 10;\n        };\n\n        /**\n         * Zigzag encodes a signed 64bit integer so that it can be effectively used with varint encoding.\n         * @param {number|!Long} value Signed long\n         * @returns {!Long} Unsigned zigzag encoded long\n         * @expose\n         */\n        ByteBuffer.zigZagEncode64 = function(value) {\n            if (typeof value === 'number')\n                value = Long.fromNumber(value, false);\n            else if (typeof value === 'string')\n                value = Long.fromString(value, false);\n            else if (value.unsigned !== false) value = value.toSigned();\n            // ref: src/google/protobuf/wire_format_lite.h\n            return value.shiftLeft(1).xor(value.shiftRight(63)).toUnsigned();\n        };\n\n        /**\n         * Decodes a zigzag encoded signed 64bit integer.\n         * @param {!Long|number} value Unsigned zigzag encoded long or JavaScript number\n         * @returns {!Long} Signed long\n         * @expose\n         */\n        ByteBuffer.zigZagDecode64 = function(value) {\n            if (typeof value === 'number')\n                value = Long.fromNumber(value, false);\n            else if (typeof value === 'string')\n                value = Long.fromString(value, false);\n            else if (value.unsigned !== false) value = value.toSigned();\n            // ref: src/google/protobuf/wire_format_lite.h\n            return value.shiftRightUnsigned(1).xor(value.and(Long.ONE).toSigned().negate()).toSigned();\n        };\n\n        /**\n         * Writes a 64bit base 128 variable-length integer.\n         * @param {number|Long} value Value to write\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n         *  written if omitted.\n         * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written.\n         * @expose\n         */\n        ByteBufferPrototype.writeVarint64 = function(value, offset) {\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\n                if (typeof value === 'number')\n                    value = Long.fromNumber(value);\n                else if (typeof value === 'string')\n                    value = Long.fromString(value);\n                else if (!(value && value instanceof Long))\n                    throw TypeError(\"Illegal value: \"+value+\" (not an integer or Long)\");\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n            }\n            if (typeof value === 'number')\n                value = Long.fromNumber(value, false);\n            else if (typeof value === 'string')\n                value = Long.fromString(value, false);\n            else if (value.unsigned !== false) value = value.toSigned();\n            var size = ByteBuffer.calculateVarint64(value),\n                part0 = value.toInt() >>> 0,\n                part1 = value.shiftRightUnsigned(28).toInt() >>> 0,\n                part2 = value.shiftRightUnsigned(56).toInt() >>> 0;\n            offset += size;\n            var capacity11 = this.buffer.byteLength;\n            if (offset > capacity11)\n                this.resize((capacity11 *= 2) > offset ? capacity11 : offset);\n            offset -= size;\n            switch (size) {\n                case 10: this.view[offset+9] = (part2 >>>  7) & 0x01;\n                case 9 : this.view[offset+8] = size !== 9 ? (part2       ) | 0x80 : (part2       ) & 0x7F;\n                case 8 : this.view[offset+7] = size !== 8 ? (part1 >>> 21) | 0x80 : (part1 >>> 21) & 0x7F;\n                case 7 : this.view[offset+6] = size !== 7 ? (part1 >>> 14) | 0x80 : (part1 >>> 14) & 0x7F;\n                case 6 : this.view[offset+5] = size !== 6 ? (part1 >>>  7) | 0x80 : (part1 >>>  7) & 0x7F;\n                case 5 : this.view[offset+4] = size !== 5 ? (part1       ) | 0x80 : (part1       ) & 0x7F;\n                case 4 : this.view[offset+3] = size !== 4 ? (part0 >>> 21) | 0x80 : (part0 >>> 21) & 0x7F;\n                case 3 : this.view[offset+2] = size !== 3 ? (part0 >>> 14) | 0x80 : (part0 >>> 14) & 0x7F;\n                case 2 : this.view[offset+1] = size !== 2 ? (part0 >>>  7) | 0x80 : (part0 >>>  7) & 0x7F;\n                case 1 : this.view[offset  ] = size !== 1 ? (part0       ) | 0x80 : (part0       ) & 0x7F;\n            }\n            if (relative) {\n                this.offset += size;\n                return this;\n            } else {\n                return size;\n            }\n        };\n\n        /**\n         * Writes a zig-zag encoded 64bit base 128 variable-length integer.\n         * @param {number|Long} value Value to write\n         * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n         *  written if omitted.\n         * @returns {!ByteBuffer|number} `this` if offset is omitted, else the actual number of bytes written.\n         * @expose\n         */\n        ByteBufferPrototype.writeVarint64ZigZag = function(value, offset) {\n            return this.writeVarint64(ByteBuffer.zigZagEncode64(value), offset);\n        };\n\n        /**\n         * Reads a 64bit base 128 variable-length integer. Requires Long.js.\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n         *  read if omitted.\n         * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and\n         *  the actual number of bytes read.\n         * @throws {Error} If it's not a valid varint\n         * @expose\n         */\n        ByteBufferPrototype.readVarint64 = function(offset) {\n            var relative = typeof offset === 'undefined';\n            if (relative) offset = this.offset;\n            if (!this.noAssert) {\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n            }\n            // ref: src/google/protobuf/io/coded_stream.cc\n            var start = offset,\n                part0 = 0,\n                part1 = 0,\n                part2 = 0,\n                b  = 0;\n            b = this.view[offset++]; part0  = (b & 0x7F)      ; if ( b & 0x80                                                   ) {\n            b = this.view[offset++]; part0 |= (b & 0x7F) <<  7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            b = this.view[offset++]; part0 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            b = this.view[offset++]; part0 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            b = this.view[offset++]; part1  = (b & 0x7F)      ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            b = this.view[offset++]; part1 |= (b & 0x7F) <<  7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            b = this.view[offset++]; part1 |= (b & 0x7F) << 14; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            b = this.view[offset++]; part1 |= (b & 0x7F) << 21; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            b = this.view[offset++]; part2  = (b & 0x7F)      ; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            b = this.view[offset++]; part2 |= (b & 0x7F) <<  7; if ((b & 0x80) || (this.noAssert && typeof b === 'undefined')) {\n            throw Error(\"Buffer overrun\"); }}}}}}}}}}\n            var value = Long.fromBits(part0 | (part1 << 28), (part1 >>> 4) | (part2) << 24, false);\n            if (relative) {\n                this.offset = offset;\n                return value;\n            } else {\n                return {\n                    'value': value,\n                    'length': offset-start\n                };\n            }\n        };\n\n        /**\n         * Reads a zig-zag encoded 64bit base 128 variable-length integer. Requires Long.js.\n         * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n         *  read if omitted.\n         * @returns {!Long|!{value: Long, length: number}} The value read if offset is omitted, else the value read and\n         *  the actual number of bytes read.\n         * @throws {Error} If it's not a valid varint\n         * @expose\n         */\n        ByteBufferPrototype.readVarint64ZigZag = function(offset) {\n            var val = this.readVarint64(offset);\n            if (val && val['value'] instanceof Long)\n                val[\"value\"] = ByteBuffer.zigZagDecode64(val[\"value\"]);\n            else\n                val = ByteBuffer.zigZagDecode64(val);\n            return val;\n        };\n\n    } // Long\n\n\n    // types/strings/cstring\n\n    /**\n     * Writes a NULL-terminated UTF8 encoded string. For this to work the specified string must not contain any NULL\n     *  characters itself.\n     * @param {string} str String to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  contained in `str` + 1 if omitted.\n     * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written\n     * @expose\n     */\n    ByteBufferPrototype.writeCString = function(str, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        var i,\n            k = str.length;\n        if (!this.noAssert) {\n            if (typeof str !== 'string')\n                throw TypeError(\"Illegal str: Not a string\");\n            for (i=0; i<k; ++i) {\n                if (str.charCodeAt(i) === 0)\n                    throw RangeError(\"Illegal str: Contains NULL-characters\");\n            }\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        // UTF8 strings do not contain zero bytes in between except for the zero character, so:\n        k = utfx.calculateUTF16asUTF8(stringSource(str))[1];\n        offset += k+1;\n        var capacity12 = this.buffer.byteLength;\n        if (offset > capacity12)\n            this.resize((capacity12 *= 2) > offset ? capacity12 : offset);\n        offset -= k+1;\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\n            this.view[offset++] = b;\n        }.bind(this));\n        this.view[offset++] = 0;\n        if (relative) {\n            this.offset = offset;\n            return this;\n        }\n        return k;\n    };\n\n    /**\n     * Reads a NULL-terminated UTF8 encoded string. For this to work the string read must not contain any NULL characters\n     *  itself.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  read if omitted.\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\n     *  read and the actual number of bytes read.\n     * @expose\n     */\n    ByteBufferPrototype.readCString = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\n        var start = offset,\n            temp;\n        // UTF8 strings do not contain zero bytes in between except for the zero character itself, so:\n        var sd, b = -1;\n        utfx.decodeUTF8toUTF16(function() {\n            if (b === 0) return null;\n            if (offset >= this.limit)\n                throw RangeError(\"Illegal range: Truncated data, \"+offset+\" < \"+this.limit);\n            b = this.view[offset++];\n            return b === 0 ? null : b;\n        }.bind(this), sd = stringDestination(), true);\n        if (relative) {\n            this.offset = offset;\n            return sd();\n        } else {\n            return {\n                \"string\": sd(),\n                \"length\": offset - start\n            };\n        }\n    };\n\n    // types/strings/istring\n\n    /**\n     * Writes a length as uint32 prefixed UTF8 encoded string.\n     * @param {string} str String to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted.\n     * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written\n     * @expose\n     * @see ByteBuffer#writeVarint32\n     */\n    ByteBufferPrototype.writeIString = function(str, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof str !== 'string')\n                throw TypeError(\"Illegal str: Not a string\");\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        var start = offset,\n            k;\n        k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1];\n        offset += 4+k;\n        var capacity13 = this.buffer.byteLength;\n        if (offset > capacity13)\n            this.resize((capacity13 *= 2) > offset ? capacity13 : offset);\n        offset -= 4+k;\n        if (this.littleEndian) {\n            this.view[offset+3] = (k >>> 24) & 0xFF;\n            this.view[offset+2] = (k >>> 16) & 0xFF;\n            this.view[offset+1] = (k >>>  8) & 0xFF;\n            this.view[offset  ] =  k         & 0xFF;\n        } else {\n            this.view[offset  ] = (k >>> 24) & 0xFF;\n            this.view[offset+1] = (k >>> 16) & 0xFF;\n            this.view[offset+2] = (k >>>  8) & 0xFF;\n            this.view[offset+3] =  k         & 0xFF;\n        }\n        offset += 4;\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\n            this.view[offset++] = b;\n        }.bind(this));\n        if (offset !== start + 4 + k)\n            throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+(offset+4+k));\n        if (relative) {\n            this.offset = offset;\n            return this;\n        }\n        return offset - start;\n    };\n\n    /**\n     * Reads a length as uint32 prefixed UTF8 encoded string.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  read if omitted.\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\n     *  read and the actual number of bytes read.\n     * @expose\n     * @see ByteBuffer#readVarint32\n     */\n    ByteBufferPrototype.readIString = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 4 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+4+\") <= \"+this.buffer.byteLength);\n        }\n        var start = offset;\n        var len = this.readUint32(offset);\n        var str = this.readUTF8String(len, ByteBuffer.METRICS_BYTES, offset += 4);\n        offset += str['length'];\n        if (relative) {\n            this.offset = offset;\n            return str['string'];\n        } else {\n            return {\n                'string': str['string'],\n                'length': offset - start\n            };\n        }\n    };\n\n    // types/strings/utf8string\n\n    /**\n     * Metrics representing number of UTF8 characters. Evaluates to `c`.\n     * @type {string}\n     * @const\n     * @expose\n     */\n    ByteBuffer.METRICS_CHARS = 'c';\n\n    /**\n     * Metrics representing number of bytes. Evaluates to `b`.\n     * @type {string}\n     * @const\n     * @expose\n     */\n    ByteBuffer.METRICS_BYTES = 'b';\n\n    /**\n     * Writes an UTF8 encoded string.\n     * @param {string} str String to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted.\n     * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written.\n     * @expose\n     */\n    ByteBufferPrototype.writeUTF8String = function(str, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        var k;\n        var start = offset;\n        k = utfx.calculateUTF16asUTF8(stringSource(str))[1];\n        offset += k;\n        var capacity14 = this.buffer.byteLength;\n        if (offset > capacity14)\n            this.resize((capacity14 *= 2) > offset ? capacity14 : offset);\n        offset -= k;\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\n            this.view[offset++] = b;\n        }.bind(this));\n        if (relative) {\n            this.offset = offset;\n            return this;\n        }\n        return offset - start;\n    };\n\n    /**\n     * Writes an UTF8 encoded string. This is an alias of {@link ByteBuffer#writeUTF8String}.\n     * @function\n     * @param {string} str String to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} if omitted.\n     * @returns {!ByteBuffer|number} this if offset is omitted, else the actual number of bytes written.\n     * @expose\n     */\n    ByteBufferPrototype.writeString = ByteBufferPrototype.writeUTF8String;\n\n    /**\n     * Calculates the number of UTF8 characters of a string. JavaScript itself uses UTF-16, so that a string's\n     *  `length` property does not reflect its actual UTF8 size if it contains code points larger than 0xFFFF.\n     * @param {string} str String to calculate\n     * @returns {number} Number of UTF8 characters\n     * @expose\n     */\n    ByteBuffer.calculateUTF8Chars = function(str) {\n        return utfx.calculateUTF16asUTF8(stringSource(str))[0];\n    };\n\n    /**\n     * Calculates the number of UTF8 bytes of a string.\n     * @param {string} str String to calculate\n     * @returns {number} Number of UTF8 bytes\n     * @expose\n     */\n    ByteBuffer.calculateUTF8Bytes = function(str) {\n        return utfx.calculateUTF16asUTF8(stringSource(str))[1];\n    };\n\n    /**\n     * Calculates the number of UTF8 bytes of a string. This is an alias of {@link ByteBuffer.calculateUTF8Bytes}.\n     * @function\n     * @param {string} str String to calculate\n     * @returns {number} Number of UTF8 bytes\n     * @expose\n     */\n    ByteBuffer.calculateString = ByteBuffer.calculateUTF8Bytes;\n\n    /**\n     * Reads an UTF8 encoded string.\n     * @param {number} length Number of characters or bytes to read.\n     * @param {string=} metrics Metrics specifying what `length` is meant to count. Defaults to\n     *  {@link ByteBuffer.METRICS_CHARS}.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  read if omitted.\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\n     *  read and the actual number of bytes read.\n     * @expose\n     */\n    ByteBufferPrototype.readUTF8String = function(length, metrics, offset) {\n        if (typeof metrics === 'number') {\n            offset = metrics;\n            metrics = undefined;\n        }\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (typeof metrics === 'undefined') metrics = ByteBuffer.METRICS_CHARS;\n        if (!this.noAssert) {\n            if (typeof length !== 'number' || length % 1 !== 0)\n                throw TypeError(\"Illegal length: \"+length+\" (not an integer)\");\n            length |= 0;\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        var i = 0,\n            start = offset,\n            sd;\n        if (metrics === ByteBuffer.METRICS_CHARS) { // The same for node and the browser\n            sd = stringDestination();\n            utfx.decodeUTF8(function() {\n                return i < length && offset < this.limit ? this.view[offset++] : null;\n            }.bind(this), function(cp) {\n                ++i; utfx.UTF8toUTF16(cp, sd);\n            });\n            if (i !== length)\n                throw RangeError(\"Illegal range: Truncated data, \"+i+\" == \"+length);\n            if (relative) {\n                this.offset = offset;\n                return sd();\n            } else {\n                return {\n                    \"string\": sd(),\n                    \"length\": offset - start\n                };\n            }\n        } else if (metrics === ByteBuffer.METRICS_BYTES) {\n            if (!this.noAssert) {\n                if (typeof offset !== 'number' || offset % 1 !== 0)\n                    throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n                offset >>>= 0;\n                if (offset < 0 || offset + length > this.buffer.byteLength)\n                    throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+length+\") <= \"+this.buffer.byteLength);\n            }\n            var k = offset + length;\n            utfx.decodeUTF8toUTF16(function() {\n                return offset < k ? this.view[offset++] : null;\n            }.bind(this), sd = stringDestination(), this.noAssert);\n            if (offset !== k)\n                throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+k);\n            if (relative) {\n                this.offset = offset;\n                return sd();\n            } else {\n                return {\n                    'string': sd(),\n                    'length': offset - start\n                };\n            }\n        } else\n            throw TypeError(\"Unsupported metrics: \"+metrics);\n    };\n\n    /**\n     * Reads an UTF8 encoded string. This is an alias of {@link ByteBuffer#readUTF8String}.\n     * @function\n     * @param {number} length Number of characters or bytes to read\n     * @param {number=} metrics Metrics specifying what `n` is meant to count. Defaults to\n     *  {@link ByteBuffer.METRICS_CHARS}.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  read if omitted.\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\n     *  read and the actual number of bytes read.\n     * @expose\n     */\n    ByteBufferPrototype.readString = ByteBufferPrototype.readUTF8String;\n\n    // types/strings/vstring\n\n    /**\n     * Writes a length as varint32 prefixed UTF8 encoded string.\n     * @param {string} str String to write\n     * @param {number=} offset Offset to write to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted.\n     * @returns {!ByteBuffer|number} `this` if `offset` is omitted, else the actual number of bytes written\n     * @expose\n     * @see ByteBuffer#writeVarint32\n     */\n    ByteBufferPrototype.writeVString = function(str, offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof str !== 'string')\n                throw TypeError(\"Illegal str: Not a string\");\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        var start = offset,\n            k, l;\n        k = utfx.calculateUTF16asUTF8(stringSource(str), this.noAssert)[1];\n        l = ByteBuffer.calculateVarint32(k);\n        offset += l+k;\n        var capacity15 = this.buffer.byteLength;\n        if (offset > capacity15)\n            this.resize((capacity15 *= 2) > offset ? capacity15 : offset);\n        offset -= l+k;\n        offset += this.writeVarint32(k, offset);\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\n            this.view[offset++] = b;\n        }.bind(this));\n        if (offset !== start+k+l)\n            throw RangeError(\"Illegal range: Truncated data, \"+offset+\" == \"+(offset+k+l));\n        if (relative) {\n            this.offset = offset;\n            return this;\n        }\n        return offset - start;\n    };\n\n    /**\n     * Reads a length as varint32 prefixed UTF8 encoded string.\n     * @param {number=} offset Offset to read from. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  read if omitted.\n     * @returns {string|!{string: string, length: number}} The string read if offset is omitted, else the string\n     *  read and the actual number of bytes read.\n     * @expose\n     * @see ByteBuffer#readVarint32\n     */\n    ByteBufferPrototype.readVString = function(offset) {\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 1 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+1+\") <= \"+this.buffer.byteLength);\n        }\n        var start = offset;\n        var len = this.readVarint32(offset);\n        var str = this.readUTF8String(len['value'], ByteBuffer.METRICS_BYTES, offset += len['length']);\n        offset += str['length'];\n        if (relative) {\n            this.offset = offset;\n            return str['string'];\n        } else {\n            return {\n                'string': str['string'],\n                'length': offset - start\n            };\n        }\n    };\n\n\n    /**\n     * Appends some data to this ByteBuffer. This will overwrite any contents behind the specified offset up to the appended\n     *  data's length.\n     * @param {!ByteBuffer|!ArrayBuffer|!Uint8Array|string} source Data to append. If `source` is a ByteBuffer, its offsets\n     *  will be modified according to the performed read operation.\n     * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\n     * @param {number=} offset Offset to append at. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     * @example A relative `<01 02>03.append(<04 05>)` will result in `<01 02 04 05>, 04 05|`\n     * @example An absolute `<01 02>03.append(04 05>, 1)` will result in `<01 04>05, 04 05|`\n     */\n    ByteBufferPrototype.append = function(source, encoding, offset) {\n        if (typeof encoding === 'number' || typeof encoding !== 'string') {\n            offset = encoding;\n            encoding = undefined;\n        }\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        if (!(source instanceof ByteBuffer))\n            source = ByteBuffer.wrap(source, encoding);\n        var length = source.limit - source.offset;\n        if (length <= 0) return this; // Nothing to append\n        offset += length;\n        var capacity16 = this.buffer.byteLength;\n        if (offset > capacity16)\n            this.resize((capacity16 *= 2) > offset ? capacity16 : offset);\n        offset -= length;\n        this.view.set(source.view.subarray(source.offset, source.limit), offset);\n        source.offset += length;\n        if (relative) this.offset += length;\n        return this;\n    };\n\n    /**\n     * Appends this ByteBuffer's contents to another ByteBuffer. This will overwrite any contents at and after the\n        specified offset up to the length of this ByteBuffer's data.\n     * @param {!ByteBuffer} target Target ByteBuffer\n     * @param {number=} offset Offset to append to. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  read if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     * @see ByteBuffer#append\n     */\n    ByteBufferPrototype.appendTo = function(target, offset) {\n        target.append(this, offset);\n        return this;\n    };\n\n    /**\n     * Enables or disables assertions of argument types and offsets. Assertions are enabled by default but you can opt to\n     *  disable them if your code already makes sure that everything is valid.\n     * @param {boolean} assert `true` to enable assertions, otherwise `false`\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.assert = function(assert) {\n        this.noAssert = !assert;\n        return this;\n    };\n\n    /**\n     * Gets the capacity of this ByteBuffer's backing buffer.\n     * @returns {number} Capacity of the backing buffer\n     * @expose\n     */\n    ByteBufferPrototype.capacity = function() {\n        return this.buffer.byteLength;\n    };\n    /**\n     * Clears this ByteBuffer's offsets by setting {@link ByteBuffer#offset} to `0` and {@link ByteBuffer#limit} to the\n     *  backing buffer's capacity. Discards {@link ByteBuffer#markedOffset}.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.clear = function() {\n        this.offset = 0;\n        this.limit = this.buffer.byteLength;\n        this.markedOffset = -1;\n        return this;\n    };\n\n    /**\n     * Creates a cloned instance of this ByteBuffer, preset with this ByteBuffer's values for {@link ByteBuffer#offset},\n     *  {@link ByteBuffer#markedOffset} and {@link ByteBuffer#limit}.\n     * @param {boolean=} copy Whether to copy the backing buffer or to return another view on the same, defaults to `false`\n     * @returns {!ByteBuffer} Cloned instance\n     * @expose\n     */\n    ByteBufferPrototype.clone = function(copy) {\n        var bb = new ByteBuffer(0, this.littleEndian, this.noAssert);\n        if (copy) {\n            bb.buffer = new ArrayBuffer(this.buffer.byteLength);\n            bb.view = new Uint8Array(bb.buffer);\n        } else {\n            bb.buffer = this.buffer;\n            bb.view = this.view;\n        }\n        bb.offset = this.offset;\n        bb.markedOffset = this.markedOffset;\n        bb.limit = this.limit;\n        return bb;\n    };\n\n    /**\n     * Compacts this ByteBuffer to be backed by a {@link ByteBuffer#buffer} of its contents' length. Contents are the bytes\n     *  between {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. Will set `offset = 0` and `limit = capacity` and\n     *  adapt {@link ByteBuffer#markedOffset} to the same relative position if set.\n     * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset}\n     * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.compact = function(begin, end) {\n        if (typeof begin === 'undefined') begin = this.offset;\n        if (typeof end === 'undefined') end = this.limit;\n        if (!this.noAssert) {\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\n        if (begin === 0 && end === this.buffer.byteLength)\n            return this; // Already compacted\n        var len = end - begin;\n        if (len === 0) {\n            this.buffer = EMPTY_BUFFER;\n            this.view = null;\n            if (this.markedOffset >= 0) this.markedOffset -= begin;\n            this.offset = 0;\n            this.limit = 0;\n            return this;\n        }\n        var buffer = new ArrayBuffer(len);\n        var view = new Uint8Array(buffer);\n        view.set(this.view.subarray(begin, end));\n        this.buffer = buffer;\n        this.view = view;\n        if (this.markedOffset >= 0) this.markedOffset -= begin;\n        this.offset = 0;\n        this.limit = len;\n        return this;\n    };\n\n    /**\n     * Creates a copy of this ByteBuffer's contents. Contents are the bytes between {@link ByteBuffer#offset} and\n     *  {@link ByteBuffer#limit}.\n     * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}.\n     * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\n     * @returns {!ByteBuffer} Copy\n     * @expose\n     */\n    ByteBufferPrototype.copy = function(begin, end) {\n        if (typeof begin === 'undefined') begin = this.offset;\n        if (typeof end === 'undefined') end = this.limit;\n        if (!this.noAssert) {\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\n        if (begin === end)\n            return new ByteBuffer(0, this.littleEndian, this.noAssert);\n        var capacity = end - begin,\n            bb = new ByteBuffer(capacity, this.littleEndian, this.noAssert);\n        bb.offset = 0;\n        bb.limit = capacity;\n        if (bb.markedOffset >= 0) bb.markedOffset -= begin;\n        this.copyTo(bb, 0, begin, end);\n        return bb;\n    };\n\n    /**\n     * Copies this ByteBuffer's contents to another ByteBuffer. Contents are the bytes between {@link ByteBuffer#offset} and\n     *  {@link ByteBuffer#limit}.\n     * @param {!ByteBuffer} target Target ByteBuffer\n     * @param {number=} targetOffset Offset to copy to. Will use and increase the target's {@link ByteBuffer#offset}\n     *  by the number of bytes copied if omitted.\n     * @param {number=} sourceOffset Offset to start copying from. Will use and increase {@link ByteBuffer#offset} by the\n     *  number of bytes copied if omitted.\n     * @param {number=} sourceLimit Offset to end copying from, defaults to {@link ByteBuffer#limit}\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.copyTo = function(target, targetOffset, sourceOffset, sourceLimit) {\n        var relative,\n            targetRelative;\n        if (!this.noAssert) {\n            if (!ByteBuffer.isByteBuffer(target))\n                throw TypeError(\"Illegal target: Not a ByteBuffer\");\n        }\n        targetOffset = (targetRelative = typeof targetOffset === 'undefined') ? target.offset : targetOffset | 0;\n        sourceOffset = (relative = typeof sourceOffset === 'undefined') ? this.offset : sourceOffset | 0;\n        sourceLimit = typeof sourceLimit === 'undefined' ? this.limit : sourceLimit | 0;\n\n        if (targetOffset < 0 || targetOffset > target.buffer.byteLength)\n            throw RangeError(\"Illegal target range: 0 <= \"+targetOffset+\" <= \"+target.buffer.byteLength);\n        if (sourceOffset < 0 || sourceLimit > this.buffer.byteLength)\n            throw RangeError(\"Illegal source range: 0 <= \"+sourceOffset+\" <= \"+this.buffer.byteLength);\n\n        var len = sourceLimit - sourceOffset;\n        if (len === 0)\n            return target; // Nothing to copy\n\n        target.ensureCapacity(targetOffset + len);\n\n        target.view.set(this.view.subarray(sourceOffset, sourceLimit), targetOffset);\n\n        if (relative) this.offset += len;\n        if (targetRelative) target.offset += len;\n\n        return this;\n    };\n\n    /**\n     * Makes sure that this ByteBuffer is backed by a {@link ByteBuffer#buffer} of at least the specified capacity. If the\n     *  current capacity is exceeded, it will be doubled. If double the current capacity is less than the required capacity,\n     *  the required capacity will be used instead.\n     * @param {number} capacity Required capacity\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.ensureCapacity = function(capacity) {\n        var current = this.buffer.byteLength;\n        if (current < capacity)\n            return this.resize((current *= 2) > capacity ? current : capacity);\n        return this;\n    };\n\n    /**\n     * Overwrites this ByteBuffer's contents with the specified value. Contents are the bytes between\n     *  {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.\n     * @param {number|string} value Byte value to fill with. If given as a string, the first character is used.\n     * @param {number=} begin Begin offset. Will use and increase {@link ByteBuffer#offset} by the number of bytes\n     *  written if omitted. defaults to {@link ByteBuffer#offset}.\n     * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\n     * @returns {!ByteBuffer} this\n     * @expose\n     * @example `someByteBuffer.clear().fill(0)` fills the entire backing buffer with zeroes\n     */\n    ByteBufferPrototype.fill = function(value, begin, end) {\n        var relative = typeof begin === 'undefined';\n        if (relative) begin = this.offset;\n        if (typeof value === 'string' && value.length > 0)\n            value = value.charCodeAt(0);\n        if (typeof begin === 'undefined') begin = this.offset;\n        if (typeof end === 'undefined') end = this.limit;\n        if (!this.noAssert) {\n            if (typeof value !== 'number' || value % 1 !== 0)\n                throw TypeError(\"Illegal value: \"+value+\" (not an integer)\");\n            value |= 0;\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\n        if (begin >= end)\n            return this; // Nothing to fill\n        while (begin < end) this.view[begin++] = value;\n        if (relative) this.offset = begin;\n        return this;\n    };\n\n    /**\n     * Makes this ByteBuffer ready for a new sequence of write or relative read operations. Sets `limit = offset` and\n     *  `offset = 0`. Make sure always to flip a ByteBuffer when all relative read or write operations are complete.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.flip = function() {\n        this.limit = this.offset;\n        this.offset = 0;\n        return this;\n    };\n    /**\n     * Marks an offset on this ByteBuffer to be used later.\n     * @param {number=} offset Offset to mark. Defaults to {@link ByteBuffer#offset}.\n     * @returns {!ByteBuffer} this\n     * @throws {TypeError} If `offset` is not a valid number\n     * @throws {RangeError} If `offset` is out of bounds\n     * @see ByteBuffer#reset\n     * @expose\n     */\n    ByteBufferPrototype.mark = function(offset) {\n        offset = typeof offset === 'undefined' ? this.offset : offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        this.markedOffset = offset;\n        return this;\n    };\n    /**\n     * Sets the byte order.\n     * @param {boolean} littleEndian `true` for little endian byte order, `false` for big endian\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.order = function(littleEndian) {\n        if (!this.noAssert) {\n            if (typeof littleEndian !== 'boolean')\n                throw TypeError(\"Illegal littleEndian: Not a boolean\");\n        }\n        this.littleEndian = !!littleEndian;\n        return this;\n    };\n\n    /**\n     * Switches (to) little endian byte order.\n     * @param {boolean=} littleEndian Defaults to `true`, otherwise uses big endian\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.LE = function(littleEndian) {\n        this.littleEndian = typeof littleEndian !== 'undefined' ? !!littleEndian : true;\n        return this;\n    };\n\n    /**\n     * Switches (to) big endian byte order.\n     * @param {boolean=} bigEndian Defaults to `true`, otherwise uses little endian\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.BE = function(bigEndian) {\n        this.littleEndian = typeof bigEndian !== 'undefined' ? !bigEndian : false;\n        return this;\n    };\n    /**\n     * Prepends some data to this ByteBuffer. This will overwrite any contents before the specified offset up to the\n     *  prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer\n     *  will be resized and its contents moved accordingly.\n     * @param {!ByteBuffer|string|!ArrayBuffer} source Data to prepend. If `source` is a ByteBuffer, its offset will be\n     *  modified according to the performed read operation.\n     * @param {(string|number)=} encoding Encoding if `data` is a string (\"base64\", \"hex\", \"binary\", defaults to \"utf8\")\n     * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes\n     *  prepended if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     * @example A relative `00<01 02 03>.prepend(<04 05>)` results in `<04 05 01 02 03>, 04 05|`\n     * @example An absolute `00<01 02 03>.prepend(<04 05>, 2)` results in `04<05 02 03>, 04 05|`\n     */\n    ByteBufferPrototype.prepend = function(source, encoding, offset) {\n        if (typeof encoding === 'number' || typeof encoding !== 'string') {\n            offset = encoding;\n            encoding = undefined;\n        }\n        var relative = typeof offset === 'undefined';\n        if (relative) offset = this.offset;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: \"+offset+\" (not an integer)\");\n            offset >>>= 0;\n            if (offset < 0 || offset + 0 > this.buffer.byteLength)\n                throw RangeError(\"Illegal offset: 0 <= \"+offset+\" (+\"+0+\") <= \"+this.buffer.byteLength);\n        }\n        if (!(source instanceof ByteBuffer))\n            source = ByteBuffer.wrap(source, encoding);\n        var len = source.limit - source.offset;\n        if (len <= 0) return this; // Nothing to prepend\n        var diff = len - offset;\n        if (diff > 0) { // Not enough space before offset, so resize + move\n            var buffer = new ArrayBuffer(this.buffer.byteLength + diff);\n            var view = new Uint8Array(buffer);\n            view.set(this.view.subarray(offset, this.buffer.byteLength), len);\n            this.buffer = buffer;\n            this.view = view;\n            this.offset += diff;\n            if (this.markedOffset >= 0) this.markedOffset += diff;\n            this.limit += diff;\n            offset += diff;\n        } else {\n            var arrayView = new Uint8Array(this.buffer);\n        }\n        this.view.set(source.view.subarray(source.offset, source.limit), offset - len);\n\n        source.offset = source.limit;\n        if (relative)\n            this.offset -= len;\n        return this;\n    };\n\n    /**\n     * Prepends this ByteBuffer to another ByteBuffer. This will overwrite any contents before the specified offset up to the\n     *  prepended data's length. If there is not enough space available before the specified `offset`, the backing buffer\n     *  will be resized and its contents moved accordingly.\n     * @param {!ByteBuffer} target Target ByteBuffer\n     * @param {number=} offset Offset to prepend at. Will use and decrease {@link ByteBuffer#offset} by the number of bytes\n     *  prepended if omitted.\n     * @returns {!ByteBuffer} this\n     * @expose\n     * @see ByteBuffer#prepend\n     */\n    ByteBufferPrototype.prependTo = function(target, offset) {\n        target.prepend(this, offset);\n        return this;\n    };\n    /**\n     * Prints debug information about this ByteBuffer's contents.\n     * @param {function(string)=} out Output function to call, defaults to console.log\n     * @expose\n     */\n    ByteBufferPrototype.printDebug = function(out) {\n        if (typeof out !== 'function') out = console.log.bind(console);\n        out(\n            this.toString()+\"\\n\"+\n            \"-------------------------------------------------------------------\\n\"+\n            this.toDebug(/* columns */ true)\n        );\n    };\n\n    /**\n     * Gets the number of remaining readable bytes. Contents are the bytes between {@link ByteBuffer#offset} and\n     *  {@link ByteBuffer#limit}, so this returns `limit - offset`.\n     * @returns {number} Remaining readable bytes. May be negative if `offset > limit`.\n     * @expose\n     */\n    ByteBufferPrototype.remaining = function() {\n        return this.limit - this.offset;\n    };\n    /**\n     * Resets this ByteBuffer's {@link ByteBuffer#offset}. If an offset has been marked through {@link ByteBuffer#mark}\n     *  before, `offset` will be set to {@link ByteBuffer#markedOffset}, which will then be discarded. If no offset has been\n     *  marked, sets `offset = 0`.\n     * @returns {!ByteBuffer} this\n     * @see ByteBuffer#mark\n     * @expose\n     */\n    ByteBufferPrototype.reset = function() {\n        if (this.markedOffset >= 0) {\n            this.offset = this.markedOffset;\n            this.markedOffset = -1;\n        } else {\n            this.offset = 0;\n        }\n        return this;\n    };\n    /**\n     * Resizes this ByteBuffer to be backed by a buffer of at least the given capacity. Will do nothing if already that\n     *  large or larger.\n     * @param {number} capacity Capacity required\n     * @returns {!ByteBuffer} this\n     * @throws {TypeError} If `capacity` is not a number\n     * @throws {RangeError} If `capacity < 0`\n     * @expose\n     */\n    ByteBufferPrototype.resize = function(capacity) {\n        if (!this.noAssert) {\n            if (typeof capacity !== 'number' || capacity % 1 !== 0)\n                throw TypeError(\"Illegal capacity: \"+capacity+\" (not an integer)\");\n            capacity |= 0;\n            if (capacity < 0)\n                throw RangeError(\"Illegal capacity: 0 <= \"+capacity);\n        }\n        if (this.buffer.byteLength < capacity) {\n            var buffer = new ArrayBuffer(capacity);\n            var view = new Uint8Array(buffer);\n            view.set(this.view);\n            this.buffer = buffer;\n            this.view = view;\n        }\n        return this;\n    };\n    /**\n     * Reverses this ByteBuffer's contents.\n     * @param {number=} begin Offset to start at, defaults to {@link ByteBuffer#offset}\n     * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.reverse = function(begin, end) {\n        if (typeof begin === 'undefined') begin = this.offset;\n        if (typeof end === 'undefined') end = this.limit;\n        if (!this.noAssert) {\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\n        if (begin === end)\n            return this; // Nothing to reverse\n        Array.prototype.reverse.call(this.view.subarray(begin, end));\n        return this;\n    };\n    /**\n     * Skips the next `length` bytes. This will just advance\n     * @param {number} length Number of bytes to skip. May also be negative to move the offset back.\n     * @returns {!ByteBuffer} this\n     * @expose\n     */\n    ByteBufferPrototype.skip = function(length) {\n        if (!this.noAssert) {\n            if (typeof length !== 'number' || length % 1 !== 0)\n                throw TypeError(\"Illegal length: \"+length+\" (not an integer)\");\n            length |= 0;\n        }\n        var offset = this.offset + length;\n        if (!this.noAssert) {\n            if (offset < 0 || offset > this.buffer.byteLength)\n                throw RangeError(\"Illegal length: 0 <= \"+this.offset+\" + \"+length+\" <= \"+this.buffer.byteLength);\n        }\n        this.offset = offset;\n        return this;\n    };\n\n    /**\n     * Slices this ByteBuffer by creating a cloned instance with `offset = begin` and `limit = end`.\n     * @param {number=} begin Begin offset, defaults to {@link ByteBuffer#offset}.\n     * @param {number=} end End offset, defaults to {@link ByteBuffer#limit}.\n     * @returns {!ByteBuffer} Clone of this ByteBuffer with slicing applied, backed by the same {@link ByteBuffer#buffer}\n     * @expose\n     */\n    ByteBufferPrototype.slice = function(begin, end) {\n        if (typeof begin === 'undefined') begin = this.offset;\n        if (typeof end === 'undefined') end = this.limit;\n        if (!this.noAssert) {\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\n        var bb = this.clone();\n        bb.offset = begin;\n        bb.limit = end;\n        return bb;\n    };\n    /**\n     * Returns a copy of the backing buffer that contains this ByteBuffer's contents. Contents are the bytes between\n     *  {@link ByteBuffer#offset} and {@link ByteBuffer#limit}.\n     * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory if\n     *  possible. Defaults to `false`\n     * @returns {!ArrayBuffer} Contents as an ArrayBuffer\n     * @expose\n     */\n    ByteBufferPrototype.toBuffer = function(forceCopy) {\n        var offset = this.offset,\n            limit = this.limit;\n        if (!this.noAssert) {\n            if (typeof offset !== 'number' || offset % 1 !== 0)\n                throw TypeError(\"Illegal offset: Not an integer\");\n            offset >>>= 0;\n            if (typeof limit !== 'number' || limit % 1 !== 0)\n                throw TypeError(\"Illegal limit: Not an integer\");\n            limit >>>= 0;\n            if (offset < 0 || offset > limit || limit > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+offset+\" <= \"+limit+\" <= \"+this.buffer.byteLength);\n        }\n        // NOTE: It's not possible to have another ArrayBuffer reference the same memory as the backing buffer. This is\n        // possible with Uint8Array#subarray only, but we have to return an ArrayBuffer by contract. So:\n        if (!forceCopy && offset === 0 && limit === this.buffer.byteLength)\n            return this.buffer;\n        if (offset === limit)\n            return EMPTY_BUFFER;\n        var buffer = new ArrayBuffer(limit - offset);\n        new Uint8Array(buffer).set(new Uint8Array(this.buffer).subarray(offset, limit), 0);\n        return buffer;\n    };\n\n    /**\n     * Returns a raw buffer compacted to contain this ByteBuffer's contents. Contents are the bytes between\n     *  {@link ByteBuffer#offset} and {@link ByteBuffer#limit}. This is an alias of {@link ByteBuffer#toBuffer}.\n     * @function\n     * @param {boolean=} forceCopy If `true` returns a copy, otherwise returns a view referencing the same memory.\n     *  Defaults to `false`\n     * @returns {!ArrayBuffer} Contents as an ArrayBuffer\n     * @expose\n     */\n    ByteBufferPrototype.toArrayBuffer = ByteBufferPrototype.toBuffer;\n\n    /**\n     * Converts the ByteBuffer's contents to a string.\n     * @param {string=} encoding Output encoding. Returns an informative string representation if omitted but also allows\n     *  direct conversion to \"utf8\", \"hex\", \"base64\" and \"binary\" encoding. \"debug\" returns a hex representation with\n     *  highlighted offsets.\n     * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}\n     * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}\n     * @returns {string} String representation\n     * @throws {Error} If `encoding` is invalid\n     * @expose\n     */\n    ByteBufferPrototype.toString = function(encoding, begin, end) {\n        if (typeof encoding === 'undefined')\n            return \"ByteBufferAB(offset=\"+this.offset+\",markedOffset=\"+this.markedOffset+\",limit=\"+this.limit+\",capacity=\"+this.capacity()+\")\";\n        if (typeof encoding === 'number')\n            encoding = \"utf8\",\n            begin = encoding,\n            end = begin;\n        switch (encoding) {\n            case \"utf8\":\n                return this.toUTF8(begin, end);\n            case \"base64\":\n                return this.toBase64(begin, end);\n            case \"hex\":\n                return this.toHex(begin, end);\n            case \"binary\":\n                return this.toBinary(begin, end);\n            case \"debug\":\n                return this.toDebug();\n            case \"columns\":\n                return this.toColumns();\n            default:\n                throw Error(\"Unsupported encoding: \"+encoding);\n        }\n    };\n\n    // lxiv-embeddable\n\n    /**\n     * lxiv-embeddable (c) 2014 Daniel Wirtz <dcode@dcode.io>\n     * Released under the Apache License, Version 2.0\n     * see: https://github.com/dcodeIO/lxiv for details\n     */\n    var lxiv = function() {\n        \"use strict\";\n\n        /**\n         * lxiv namespace.\n         * @type {!Object.<string,*>}\n         * @exports lxiv\n         */\n        var lxiv = {};\n\n        /**\n         * Character codes for output.\n         * @type {!Array.<number>}\n         * @inner\n         */\n        var aout = [\n            65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,\n            81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102,\n            103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,\n            119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47\n        ];\n\n        /**\n         * Character codes for input.\n         * @type {!Array.<number>}\n         * @inner\n         */\n        var ain = [];\n        for (var i=0, k=aout.length; i<k; ++i)\n            ain[aout[i]] = i;\n\n        /**\n         * Encodes bytes to base64 char codes.\n         * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if\n         *  there are no more bytes left.\n         * @param {!function(number)} dst Characters destination as a function successively called with each encoded char\n         *  code.\n         */\n        lxiv.encode = function(src, dst) {\n            var b, t;\n            while ((b = src()) !== null) {\n                dst(aout[(b>>2)&0x3f]);\n                t = (b&0x3)<<4;\n                if ((b = src()) !== null) {\n                    t |= (b>>4)&0xf;\n                    dst(aout[(t|((b>>4)&0xf))&0x3f]);\n                    t = (b&0xf)<<2;\n                    if ((b = src()) !== null)\n                        dst(aout[(t|((b>>6)&0x3))&0x3f]),\n                        dst(aout[b&0x3f]);\n                    else\n                        dst(aout[t&0x3f]),\n                        dst(61);\n                } else\n                    dst(aout[t&0x3f]),\n                    dst(61),\n                    dst(61);\n            }\n        };\n\n        /**\n         * Decodes base64 char codes to bytes.\n         * @param {!function():number|null} src Characters source as a function returning the next char code respectively\n         *  `null` if there are no more characters left.\n         * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.\n         * @throws {Error} If a character code is invalid\n         */\n        lxiv.decode = function(src, dst) {\n            var c, t1, t2;\n            function fail(c) {\n                throw Error(\"Illegal character code: \"+c);\n            }\n            while ((c = src()) !== null) {\n                t1 = ain[c];\n                if (typeof t1 === 'undefined') fail(c);\n                if ((c = src()) !== null) {\n                    t2 = ain[c];\n                    if (typeof t2 === 'undefined') fail(c);\n                    dst((t1<<2)>>>0|(t2&0x30)>>4);\n                    if ((c = src()) !== null) {\n                        t1 = ain[c];\n                        if (typeof t1 === 'undefined')\n                            if (c === 61) break; else fail(c);\n                        dst(((t2&0xf)<<4)>>>0|(t1&0x3c)>>2);\n                        if ((c = src()) !== null) {\n                            t2 = ain[c];\n                            if (typeof t2 === 'undefined')\n                                if (c === 61) break; else fail(c);\n                            dst(((t1&0x3)<<6)>>>0|t2);\n                        }\n                    }\n                }\n            }\n        };\n\n        /**\n         * Tests if a string is valid base64.\n         * @param {string} str String to test\n         * @returns {boolean} `true` if valid, otherwise `false`\n         */\n        lxiv.test = function(str) {\n            return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(str);\n        };\n\n        return lxiv;\n    }();\n\n    // encodings/base64\n\n    /**\n     * Encodes this ByteBuffer's contents to a base64 encoded string.\n     * @param {number=} begin Offset to begin at, defaults to {@link ByteBuffer#offset}.\n     * @param {number=} end Offset to end at, defaults to {@link ByteBuffer#limit}.\n     * @returns {string} Base64 encoded string\n     * @throws {RangeError} If `begin` or `end` is out of bounds\n     * @expose\n     */\n    ByteBufferPrototype.toBase64 = function(begin, end) {\n        if (typeof begin === 'undefined')\n            begin = this.offset;\n        if (typeof end === 'undefined')\n            end = this.limit;\n        begin = begin | 0; end = end | 0;\n        if (begin < 0 || end > this.capacity || begin > end)\n            throw RangeError(\"begin, end\");\n        var sd; lxiv.encode(function() {\n            return begin < end ? this.view[begin++] : null;\n        }.bind(this), sd = stringDestination());\n        return sd();\n    };\n\n    /**\n     * Decodes a base64 encoded string to a ByteBuffer.\n     * @param {string} str String to decode\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @returns {!ByteBuffer} ByteBuffer\n     * @expose\n     */\n    ByteBuffer.fromBase64 = function(str, littleEndian) {\n        if (typeof str !== 'string')\n            throw TypeError(\"str\");\n        var bb = new ByteBuffer(str.length/4*3, littleEndian),\n            i = 0;\n        lxiv.decode(stringSource(str), function(b) {\n            bb.view[i++] = b;\n        });\n        bb.limit = i;\n        return bb;\n    };\n\n    /**\n     * Encodes a binary string to base64 like `window.btoa` does.\n     * @param {string} str Binary string\n     * @returns {string} Base64 encoded string\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa\n     * @expose\n     */\n    ByteBuffer.btoa = function(str) {\n        return ByteBuffer.fromBinary(str).toBase64();\n    };\n\n    /**\n     * Decodes a base64 encoded string to binary like `window.atob` does.\n     * @param {string} b64 Base64 encoded string\n     * @returns {string} Binary string\n     * @see https://developer.mozilla.org/en-US/docs/Web/API/Window.atob\n     * @expose\n     */\n    ByteBuffer.atob = function(b64) {\n        return ByteBuffer.fromBase64(b64).toBinary();\n    };\n\n    // encodings/binary\n\n    /**\n     * Encodes this ByteBuffer to a binary encoded string, that is using only characters 0x00-0xFF as bytes.\n     * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}.\n     * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}.\n     * @returns {string} Binary encoded string\n     * @throws {RangeError} If `offset > limit`\n     * @expose\n     */\n    ByteBufferPrototype.toBinary = function(begin, end) {\n        if (typeof begin === 'undefined')\n            begin = this.offset;\n        if (typeof end === 'undefined')\n            end = this.limit;\n        begin |= 0; end |= 0;\n        if (begin < 0 || end > this.capacity() || begin > end)\n            throw RangeError(\"begin, end\");\n        if (begin === end)\n            return \"\";\n        var chars = [],\n            parts = [];\n        while (begin < end) {\n            chars.push(this.view[begin++]);\n            if (chars.length >= 1024)\n                parts.push(String.fromCharCode.apply(String, chars)),\n                chars = [];\n        }\n        return parts.join('') + String.fromCharCode.apply(String, chars);\n    };\n\n    /**\n     * Decodes a binary encoded string, that is using only characters 0x00-0xFF as bytes, to a ByteBuffer.\n     * @param {string} str String to decode\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @returns {!ByteBuffer} ByteBuffer\n     * @expose\n     */\n    ByteBuffer.fromBinary = function(str, littleEndian) {\n        if (typeof str !== 'string')\n            throw TypeError(\"str\");\n        var i = 0,\n            k = str.length,\n            charCode,\n            bb = new ByteBuffer(k, littleEndian);\n        while (i<k) {\n            charCode = str.charCodeAt(i);\n            if (charCode > 0xff)\n                throw RangeError(\"illegal char code: \"+charCode);\n            bb.view[i++] = charCode;\n        }\n        bb.limit = k;\n        return bb;\n    };\n\n    // encodings/debug\n\n    /**\n     * Encodes this ByteBuffer to a hex encoded string with marked offsets. Offset symbols are:\n     * * `<` : offset,\n     * * `'` : markedOffset,\n     * * `>` : limit,\n     * * `|` : offset and limit,\n     * * `[` : offset and markedOffset,\n     * * `]` : markedOffset and limit,\n     * * `!` : offset, markedOffset and limit\n     * @param {boolean=} columns If `true` returns two columns hex + ascii, defaults to `false`\n     * @returns {string|!Array.<string>} Debug string or array of lines if `asArray = true`\n     * @expose\n     * @example `>00'01 02<03` contains four bytes with `limit=0, markedOffset=1, offset=3`\n     * @example `00[01 02 03>` contains four bytes with `offset=markedOffset=1, limit=4`\n     * @example `00|01 02 03` contains four bytes with `offset=limit=1, markedOffset=-1`\n     * @example `|` contains zero bytes with `offset=limit=0, markedOffset=-1`\n     */\n    ByteBufferPrototype.toDebug = function(columns) {\n        var i = -1,\n            k = this.buffer.byteLength,\n            b,\n            hex = \"\",\n            asc = \"\",\n            out = \"\";\n        while (i<k) {\n            if (i !== -1) {\n                b = this.view[i];\n                if (b < 0x10) hex += \"0\"+b.toString(16).toUpperCase();\n                else hex += b.toString(16).toUpperCase();\n                if (columns)\n                    asc += b > 32 && b < 127 ? String.fromCharCode(b) : '.';\n            }\n            ++i;\n            if (columns) {\n                if (i > 0 && i % 16 === 0 && i !== k) {\n                    while (hex.length < 3*16+3) hex += \" \";\n                    out += hex+asc+\"\\n\";\n                    hex = asc = \"\";\n                }\n            }\n            if (i === this.offset && i === this.limit)\n                hex += i === this.markedOffset ? \"!\" : \"|\";\n            else if (i === this.offset)\n                hex += i === this.markedOffset ? \"[\" : \"<\";\n            else if (i === this.limit)\n                hex += i === this.markedOffset ? \"]\" : \">\";\n            else\n                hex += i === this.markedOffset ? \"'\" : (columns || (i !== 0 && i !== k) ? \" \" : \"\");\n        }\n        if (columns && hex !== \" \") {\n            while (hex.length < 3*16+3)\n                hex += \" \";\n            out += hex + asc + \"\\n\";\n        }\n        return columns ? out : hex;\n    };\n\n    /**\n     * Decodes a hex encoded string with marked offsets to a ByteBuffer.\n     * @param {string} str Debug string to decode (not be generated with `columns = true`)\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\n     * @returns {!ByteBuffer} ByteBuffer\n     * @expose\n     * @see ByteBuffer#toDebug\n     */\n    ByteBuffer.fromDebug = function(str, littleEndian, noAssert) {\n        var k = str.length,\n            bb = new ByteBuffer(((k+1)/3)|0, littleEndian, noAssert);\n        var i = 0, j = 0, ch, b,\n            rs = false, // Require symbol next\n            ho = false, hm = false, hl = false, // Already has offset (ho), markedOffset (hm), limit (hl)?\n            fail = false;\n        while (i<k) {\n            switch (ch = str.charAt(i++)) {\n                case '!':\n                    if (!noAssert) {\n                        if (ho || hm || hl) {\n                            fail = true;\n                            break;\n                        }\n                        ho = hm = hl = true;\n                    }\n                    bb.offset = bb.markedOffset = bb.limit = j;\n                    rs = false;\n                    break;\n                case '|':\n                    if (!noAssert) {\n                        if (ho || hl) {\n                            fail = true;\n                            break;\n                        }\n                        ho = hl = true;\n                    }\n                    bb.offset = bb.limit = j;\n                    rs = false;\n                    break;\n                case '[':\n                    if (!noAssert) {\n                        if (ho || hm) {\n                            fail = true;\n                            break;\n                        }\n                        ho = hm = true;\n                    }\n                    bb.offset = bb.markedOffset = j;\n                    rs = false;\n                    break;\n                case '<':\n                    if (!noAssert) {\n                        if (ho) {\n                            fail = true;\n                            break;\n                        }\n                        ho = true;\n                    }\n                    bb.offset = j;\n                    rs = false;\n                    break;\n                case ']':\n                    if (!noAssert) {\n                        if (hl || hm) {\n                            fail = true;\n                            break;\n                        }\n                        hl = hm = true;\n                    }\n                    bb.limit = bb.markedOffset = j;\n                    rs = false;\n                    break;\n                case '>':\n                    if (!noAssert) {\n                        if (hl) {\n                            fail = true;\n                            break;\n                        }\n                        hl = true;\n                    }\n                    bb.limit = j;\n                    rs = false;\n                    break;\n                case \"'\":\n                    if (!noAssert) {\n                        if (hm) {\n                            fail = true;\n                            break;\n                        }\n                        hm = true;\n                    }\n                    bb.markedOffset = j;\n                    rs = false;\n                    break;\n                case ' ':\n                    rs = false;\n                    break;\n                default:\n                    if (!noAssert) {\n                        if (rs) {\n                            fail = true;\n                            break;\n                        }\n                    }\n                    b = parseInt(ch+str.charAt(i++), 16);\n                    if (!noAssert) {\n                        if (isNaN(b) || b < 0 || b > 255)\n                            throw TypeError(\"Illegal str: Not a debug encoded string\");\n                    }\n                    bb.view[j++] = b;\n                    rs = true;\n            }\n            if (fail)\n                throw TypeError(\"Illegal str: Invalid symbol at \"+i);\n        }\n        if (!noAssert) {\n            if (!ho || !hl)\n                throw TypeError(\"Illegal str: Missing offset or limit\");\n            if (j<bb.buffer.byteLength)\n                throw TypeError(\"Illegal str: Not a debug encoded string (is it hex?) \"+j+\" < \"+k);\n        }\n        return bb;\n    };\n\n    // encodings/hex\n\n    /**\n     * Encodes this ByteBuffer's contents to a hex encoded string.\n     * @param {number=} begin Offset to begin at. Defaults to {@link ByteBuffer#offset}.\n     * @param {number=} end Offset to end at. Defaults to {@link ByteBuffer#limit}.\n     * @returns {string} Hex encoded string\n     * @expose\n     */\n    ByteBufferPrototype.toHex = function(begin, end) {\n        begin = typeof begin === 'undefined' ? this.offset : begin;\n        end = typeof end === 'undefined' ? this.limit : end;\n        if (!this.noAssert) {\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\n        var out = new Array(end - begin),\n            b;\n        while (begin < end) {\n            b = this.view[begin++];\n            if (b < 0x10)\n                out.push(\"0\", b.toString(16));\n            else out.push(b.toString(16));\n        }\n        return out.join('');\n    };\n\n    /**\n     * Decodes a hex encoded string to a ByteBuffer.\n     * @param {string} str String to decode\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\n     * @returns {!ByteBuffer} ByteBuffer\n     * @expose\n     */\n    ByteBuffer.fromHex = function(str, littleEndian, noAssert) {\n        if (!noAssert) {\n            if (typeof str !== 'string')\n                throw TypeError(\"Illegal str: Not a string\");\n            if (str.length % 2 !== 0)\n                throw TypeError(\"Illegal str: Length not a multiple of 2\");\n        }\n        var k = str.length,\n            bb = new ByteBuffer((k / 2) | 0, littleEndian),\n            b;\n        for (var i=0, j=0; i<k; i+=2) {\n            b = parseInt(str.substring(i, i+2), 16);\n            if (!noAssert)\n                if (!isFinite(b) || b < 0 || b > 255)\n                    throw TypeError(\"Illegal str: Contains non-hex characters\");\n            bb.view[j++] = b;\n        }\n        bb.limit = j;\n        return bb;\n    };\n\n    // utfx-embeddable\n\n    /**\n     * utfx-embeddable (c) 2014 Daniel Wirtz <dcode@dcode.io>\n     * Released under the Apache License, Version 2.0\n     * see: https://github.com/dcodeIO/utfx for details\n     */\n    var utfx = function() {\n        \"use strict\";\n\n        /**\n         * utfx namespace.\n         * @inner\n         * @type {!Object.<string,*>}\n         */\n        var utfx = {};\n\n        /**\n         * Maximum valid code point.\n         * @type {number}\n         * @const\n         */\n        utfx.MAX_CODEPOINT = 0x10FFFF;\n\n        /**\n         * Encodes UTF8 code points to UTF8 bytes.\n         * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point\n         *  respectively `null` if there are no more code points left or a single numeric code point.\n         * @param {!function(number)} dst Bytes destination as a function successively called with the next byte\n         */\n        utfx.encodeUTF8 = function(src, dst) {\n            var cp = null;\n            if (typeof src === 'number')\n                cp = src,\n                src = function() { return null; };\n            while (cp !== null || (cp = src()) !== null) {\n                if (cp < 0x80)\n                    dst(cp&0x7F);\n                else if (cp < 0x800)\n                    dst(((cp>>6)&0x1F)|0xC0),\n                    dst((cp&0x3F)|0x80);\n                else if (cp < 0x10000)\n                    dst(((cp>>12)&0x0F)|0xE0),\n                    dst(((cp>>6)&0x3F)|0x80),\n                    dst((cp&0x3F)|0x80);\n                else\n                    dst(((cp>>18)&0x07)|0xF0),\n                    dst(((cp>>12)&0x3F)|0x80),\n                    dst(((cp>>6)&0x3F)|0x80),\n                    dst((cp&0x3F)|0x80);\n                cp = null;\n            }\n        };\n\n        /**\n         * Decodes UTF8 bytes to UTF8 code points.\n         * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there\n         *  are no more bytes left.\n         * @param {!function(number)} dst Code points destination as a function successively called with each decoded code point.\n         * @throws {RangeError} If a starting byte is invalid in UTF8\n         * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the\n         *  remaining bytes.\n         */\n        utfx.decodeUTF8 = function(src, dst) {\n            var a, b, c, d, fail = function(b) {\n                b = b.slice(0, b.indexOf(null));\n                var err = Error(b.toString());\n                err.name = \"TruncatedError\";\n                err['bytes'] = b;\n                throw err;\n            };\n            while ((a = src()) !== null) {\n                if ((a&0x80) === 0)\n                    dst(a);\n                else if ((a&0xE0) === 0xC0)\n                    ((b = src()) === null) && fail([a, b]),\n                    dst(((a&0x1F)<<6) | (b&0x3F));\n                else if ((a&0xF0) === 0xE0)\n                    ((b=src()) === null || (c=src()) === null) && fail([a, b, c]),\n                    dst(((a&0x0F)<<12) | ((b&0x3F)<<6) | (c&0x3F));\n                else if ((a&0xF8) === 0xF0)\n                    ((b=src()) === null || (c=src()) === null || (d=src()) === null) && fail([a, b, c ,d]),\n                    dst(((a&0x07)<<18) | ((b&0x3F)<<12) | ((c&0x3F)<<6) | (d&0x3F));\n                else throw RangeError(\"Illegal starting byte: \"+a);\n            }\n        };\n\n        /**\n         * Converts UTF16 characters to UTF8 code points.\n         * @param {!function():number|null} src Characters source as a function returning the next char code respectively\n         *  `null` if there are no more characters left.\n         * @param {!function(number)} dst Code points destination as a function successively called with each converted code\n         *  point.\n         */\n        utfx.UTF16toUTF8 = function(src, dst) {\n            var c1, c2 = null;\n            while (true) {\n                if ((c1 = c2 !== null ? c2 : src()) === null)\n                    break;\n                if (c1 >= 0xD800 && c1 <= 0xDFFF) {\n                    if ((c2 = src()) !== null) {\n                        if (c2 >= 0xDC00 && c2 <= 0xDFFF) {\n                            dst((c1-0xD800)*0x400+c2-0xDC00+0x10000);\n                            c2 = null; continue;\n                        }\n                    }\n                }\n                dst(c1);\n            }\n            if (c2 !== null) dst(c2);\n        };\n\n        /**\n         * Converts UTF8 code points to UTF16 characters.\n         * @param {(!function():number|null) | number} src Code points source, either as a function returning the next code point\n         *  respectively `null` if there are no more code points left or a single numeric code point.\n         * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.\n         * @throws {RangeError} If a code point is out of range\n         */\n        utfx.UTF8toUTF16 = function(src, dst) {\n            var cp = null;\n            if (typeof src === 'number')\n                cp = src, src = function() { return null; };\n            while (cp !== null || (cp = src()) !== null) {\n                if (cp <= 0xFFFF)\n                    dst(cp);\n                else\n                    cp -= 0x10000,\n                    dst((cp>>10)+0xD800),\n                    dst((cp%0x400)+0xDC00);\n                cp = null;\n            }\n        };\n\n        /**\n         * Converts and encodes UTF16 characters to UTF8 bytes.\n         * @param {!function():number|null} src Characters source as a function returning the next char code respectively `null`\n         *  if there are no more characters left.\n         * @param {!function(number)} dst Bytes destination as a function successively called with the next byte.\n         */\n        utfx.encodeUTF16toUTF8 = function(src, dst) {\n            utfx.UTF16toUTF8(src, function(cp) {\n                utfx.encodeUTF8(cp, dst);\n            });\n        };\n\n        /**\n         * Decodes and converts UTF8 bytes to UTF16 characters.\n         * @param {!function():number|null} src Bytes source as a function returning the next byte respectively `null` if there\n         *  are no more bytes left.\n         * @param {!function(number)} dst Characters destination as a function successively called with each converted char code.\n         * @throws {RangeError} If a starting byte is invalid in UTF8\n         * @throws {Error} If the last sequence is truncated. Has an array property `bytes` holding the remaining bytes.\n         */\n        utfx.decodeUTF8toUTF16 = function(src, dst) {\n            utfx.decodeUTF8(src, function(cp) {\n                utfx.UTF8toUTF16(cp, dst);\n            });\n        };\n\n        /**\n         * Calculates the byte length of an UTF8 code point.\n         * @param {number} cp UTF8 code point\n         * @returns {number} Byte length\n         */\n        utfx.calculateCodePoint = function(cp) {\n            return (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\n        };\n\n        /**\n         * Calculates the number of UTF8 bytes required to store UTF8 code points.\n         * @param {(!function():number|null)} src Code points source as a function returning the next code point respectively\n         *  `null` if there are no more code points left.\n         * @returns {number} The number of UTF8 bytes required\n         */\n        utfx.calculateUTF8 = function(src) {\n            var cp, l=0;\n            while ((cp = src()) !== null)\n                l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\n            return l;\n        };\n\n        /**\n         * Calculates the number of UTF8 code points respectively UTF8 bytes required to store UTF16 char codes.\n         * @param {(!function():number|null)} src Characters source as a function returning the next char code respectively\n         *  `null` if there are no more characters left.\n         * @returns {!Array.<number>} The number of UTF8 code points at index 0 and the number of UTF8 bytes required at index 1.\n         */\n        utfx.calculateUTF16asUTF8 = function(src) {\n            var n=0, l=0;\n            utfx.UTF16toUTF8(src, function(cp) {\n                ++n; l += (cp < 0x80) ? 1 : (cp < 0x800) ? 2 : (cp < 0x10000) ? 3 : 4;\n            });\n            return [n,l];\n        };\n\n        return utfx;\n    }();\n\n    // encodings/utf8\n\n    /**\n     * Encodes this ByteBuffer's contents between {@link ByteBuffer#offset} and {@link ByteBuffer#limit} to an UTF8 encoded\n     *  string.\n     * @returns {string} Hex encoded string\n     * @throws {RangeError} If `offset > limit`\n     * @expose\n     */\n    ByteBufferPrototype.toUTF8 = function(begin, end) {\n        if (typeof begin === 'undefined') begin = this.offset;\n        if (typeof end === 'undefined') end = this.limit;\n        if (!this.noAssert) {\n            if (typeof begin !== 'number' || begin % 1 !== 0)\n                throw TypeError(\"Illegal begin: Not an integer\");\n            begin >>>= 0;\n            if (typeof end !== 'number' || end % 1 !== 0)\n                throw TypeError(\"Illegal end: Not an integer\");\n            end >>>= 0;\n            if (begin < 0 || begin > end || end > this.buffer.byteLength)\n                throw RangeError(\"Illegal range: 0 <= \"+begin+\" <= \"+end+\" <= \"+this.buffer.byteLength);\n        }\n        var sd; try {\n            utfx.decodeUTF8toUTF16(function() {\n                return begin < end ? this.view[begin++] : null;\n            }.bind(this), sd = stringDestination());\n        } catch (e) {\n            if (begin !== end)\n                throw RangeError(\"Illegal range: Truncated data, \"+begin+\" != \"+end);\n        }\n        return sd();\n    };\n\n    /**\n     * Decodes an UTF8 encoded string to a ByteBuffer.\n     * @param {string} str String to decode\n     * @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to\n     *  {@link ByteBuffer.DEFAULT_ENDIAN}.\n     * @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to\n     *  {@link ByteBuffer.DEFAULT_NOASSERT}.\n     * @returns {!ByteBuffer} ByteBuffer\n     * @expose\n     */\n    ByteBuffer.fromUTF8 = function(str, littleEndian, noAssert) {\n        if (!noAssert)\n            if (typeof str !== 'string')\n                throw TypeError(\"Illegal str: Not a string\");\n        var bb = new ByteBuffer(utfx.calculateUTF16asUTF8(stringSource(str), true)[1], littleEndian, noAssert),\n            i = 0;\n        utfx.encodeUTF16toUTF8(stringSource(str), function(b) {\n            bb.view[i++] = b;\n        });\n        bb.limit = i;\n        return bb;\n    };\n\n    return ByteBuffer;\n});\n"
  },
  {
    "path": "public/libs/laya/domparserinone.js",
    "content": "var entityMap = {\n       lt: '<',\n       gt: '>',\n       amp: '&',\n       quot: '\"',\n       apos: \"'\",\n       Agrave: \"À\",\n       Aacute: \"Á\",\n       Acirc: \"Â\",\n       Atilde: \"Ã\",\n       Auml: \"Ä\",\n       Aring: \"Å\",\n       AElig: \"Æ\",\n       Ccedil: \"Ç\",\n       Egrave: \"È\",\n       Eacute: \"É\",\n       Ecirc: \"Ê\",\n       Euml: \"Ë\",\n       Igrave: \"Ì\",\n       Iacute: \"Í\",\n       Icirc: \"Î\",\n       Iuml: \"Ï\",\n       ETH: \"Ð\",\n       Ntilde: \"Ñ\",\n       Ograve: \"Ò\",\n       Oacute: \"Ó\",\n       Ocirc: \"Ô\",\n       Otilde: \"Õ\",\n       Ouml: \"Ö\",\n       Oslash: \"Ø\",\n       Ugrave: \"Ù\",\n       Uacute: \"Ú\",\n       Ucirc: \"Û\",\n       Uuml: \"Ü\",\n       Yacute: \"Ý\",\n       THORN: \"Þ\",\n       szlig: \"ß\",\n       agrave: \"à\",\n       aacute: \"á\",\n       acirc: \"â\",\n       atilde: \"ã\",\n       auml: \"ä\",\n       aring: \"å\",\n       aelig: \"æ\",\n       ccedil: \"ç\",\n       egrave: \"è\",\n       eacute: \"é\",\n       ecirc: \"ê\",\n       euml: \"ë\",\n       igrave: \"ì\",\n       iacute: \"í\",\n       icirc: \"î\",\n       iuml: \"ï\",\n       eth: \"ð\",\n       ntilde: \"ñ\",\n       ograve: \"ò\",\n       oacute: \"ó\",\n       ocirc: \"ô\",\n       otilde: \"õ\",\n       ouml: \"ö\",\n       oslash: \"ø\",\n       ugrave: \"ù\",\n       uacute: \"ú\",\n       ucirc: \"û\",\n       uuml: \"ü\",\n       yacute: \"ý\",\n       thorn: \"þ\",\n       yuml: \"ÿ\",\n       nbsp: \" \",\n       iexcl: \"¡\",\n       cent: \"¢\",\n       pound: \"£\",\n       curren: \"¤\",\n       yen: \"¥\",\n       brvbar: \"¦\",\n       sect: \"§\",\n       uml: \"¨\",\n       copy: \"©\",\n       ordf: \"ª\",\n       laquo: \"«\",\n       not: \"¬\",\n       shy: \"­­\",\n       reg: \"®\",\n       macr: \"¯\",\n       deg: \"°\",\n       plusmn: \"±\",\n       sup2: \"²\",\n       sup3: \"³\",\n       acute: \"´\",\n       micro: \"µ\",\n       para: \"¶\",\n       middot: \"·\",\n       cedil: \"¸\",\n       sup1: \"¹\",\n       ordm: \"º\",\n       raquo: \"»\",\n       frac14: \"¼\",\n       frac12: \"½\",\n       frac34: \"¾\",\n       iquest: \"¿\",\n       times: \"×\",\n       divide: \"÷\",\n       forall: \"∀\",\n       part: \"∂\",\n       exist: \"∃\",\n       empty: \"∅\",\n       nabla: \"∇\",\n       isin: \"∈\",\n       notin: \"∉\",\n       ni: \"∋\",\n       prod: \"∏\",\n       sum: \"∑\",\n       minus: \"−\",\n       lowast: \"∗\",\n       radic: \"√\",\n       prop: \"∝\",\n       infin: \"∞\",\n       ang: \"∠\",\n       and: \"∧\",\n       or: \"∨\",\n       cap: \"∩\",\n       cup: \"∪\",\n       'int': \"∫\",\n       there4: \"∴\",\n       sim: \"∼\",\n       cong: \"≅\",\n       asymp: \"≈\",\n       ne: \"≠\",\n       equiv: \"≡\",\n       le: \"≤\",\n       ge: \"≥\",\n       sub: \"⊂\",\n       sup: \"⊃\",\n       nsub: \"⊄\",\n       sube: \"⊆\",\n       supe: \"⊇\",\n       oplus: \"⊕\",\n       otimes: \"⊗\",\n       perp: \"⊥\",\n       sdot: \"⋅\",\n       Alpha: \"Α\",\n       Beta: \"Β\",\n       Gamma: \"Γ\",\n       Delta: \"Δ\",\n       Epsilon: \"Ε\",\n       Zeta: \"Ζ\",\n       Eta: \"Η\",\n       Theta: \"Θ\",\n       Iota: \"Ι\",\n       Kappa: \"Κ\",\n       Lambda: \"Λ\",\n       Mu: \"Μ\",\n       Nu: \"Ν\",\n       Xi: \"Ξ\",\n       Omicron: \"Ο\",\n       Pi: \"Π\",\n       Rho: \"Ρ\",\n       Sigma: \"Σ\",\n       Tau: \"Τ\",\n       Upsilon: \"Υ\",\n       Phi: \"Φ\",\n       Chi: \"Χ\",\n       Psi: \"Ψ\",\n       Omega: \"Ω\",\n       alpha: \"α\",\n       beta: \"β\",\n       gamma: \"γ\",\n       delta: \"δ\",\n       epsilon: \"ε\",\n       zeta: \"ζ\",\n       eta: \"η\",\n       theta: \"θ\",\n       iota: \"ι\",\n       kappa: \"κ\",\n       lambda: \"λ\",\n       mu: \"μ\",\n       nu: \"ν\",\n       xi: \"ξ\",\n       omicron: \"ο\",\n       pi: \"π\",\n       rho: \"ρ\",\n       sigmaf: \"ς\",\n       sigma: \"σ\",\n       tau: \"τ\",\n       upsilon: \"υ\",\n       phi: \"φ\",\n       chi: \"χ\",\n       psi: \"ψ\",\n       omega: \"ω\",\n       thetasym: \"ϑ\",\n       upsih: \"ϒ\",\n       piv: \"ϖ\",\n       OElig: \"Œ\",\n       oelig: \"œ\",\n       Scaron: \"Š\",\n       scaron: \"š\",\n       Yuml: \"Ÿ\",\n       fnof: \"ƒ\",\n       circ: \"ˆ\",\n       tilde: \"˜\",\n       ensp: \" \",\n       emsp: \" \",\n       thinsp: \" \",\n       zwnj: \"‌\",\n       zwj: \"‍\",\n       lrm: \"‎\",\n       rlm: \"‏\",\n       ndash: \"–\",\n       mdash: \"—\",\n       lsquo: \"‘\",\n       rsquo: \"’\",\n       sbquo: \"‚\",\n       ldquo: \"“\",\n       rdquo: \"”\",\n       bdquo: \"„\",\n       dagger: \"†\",\n       Dagger: \"‡\",\n       bull: \"•\",\n       hellip: \"…\",\n       permil: \"‰\",\n       prime: \"′\",\n       Prime: \"″\",\n       lsaquo: \"‹\",\n       rsaquo: \"›\",\n       oline: \"‾\",\n       euro: \"€\",\n       trade: \"™\",\n       larr: \"←\",\n       uarr: \"↑\",\n       rarr: \"→\",\n       darr: \"↓\",\n       harr: \"↔\",\n       crarr: \"↵\",\n       lceil: \"⌈\",\n       rceil: \"⌉\",\n       lfloor: \"⌊\",\n       rfloor: \"⌋\",\n       loz: \"◊\",\n       spades: \"♠\",\n       clubs: \"♣\",\n       hearts: \"♥\",\n       diams: \"♦\"\n};\n//for(var  n in exports.entityMap){console.log(exports.entityMap[n].charCodeAt())}\n\n//[4]   \tNameStartChar\t   ::=   \t\":\" | [A-Z] | \"_\" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n//[4a]   \tNameChar\t   ::=   \tNameStartChar | \"-\" | \".\" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]\n//[5]   \tName\t   ::=   \tNameStartChar (NameChar)*\nvar nameStartChar = /[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]///\\u10000-\\uEFFFF\nvar nameChar = new RegExp(\"[\\\\-\\\\.0-9\"+nameStartChar.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\");\nvar tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\\:'+nameStartChar.source+nameChar.source+'*)?$');\n//var tagNamePattern = /^[a-zA-Z_][\\w\\-\\.]*(?:\\:[a-zA-Z_][\\w\\-\\.]*)?$/\n//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')\n\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\nvar S_TAG = 0;//tag name offerring\nvar S_ATTR = 1;//attr name offerring \nvar S_ATTR_SPACE=2;//attr name end and space offer\nvar S_EQ = 3;//=space?\nvar S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only)\nvar S_ATTR_END = 5;//attr value end and no space(quot end)\nvar S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer)\nvar S_TAG_CLOSE = 7;//closed el<el />\n\nSaxO={};\nfunction XMLReader(){\n\t\n}\n\nXMLReader.prototype = {\n\tparse:function(source,defaultNSMap,entityMap){\n\t\tvar domBuilder = this.domBuilder;\n\t\tdomBuilder.startDocument();\n\t\t_copy(defaultNSMap ,defaultNSMap = {})\n\t\tparse(source,defaultNSMap,entityMap,\n\t\t\t\tdomBuilder,this.errorHandler);\n\t\tdomBuilder.endDocument();\n\t}\n}\nfunction parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){\n\tfunction fixedFromCharCode(code) {\n\t\t// String.prototype.fromCharCode does not supports\n\t\t// > 2 bytes unicode chars directly\n\t\tif (code > 0xffff) {\n\t\t\tcode -= 0x10000;\n\t\t\tvar surrogate1 = 0xd800 + (code >> 10)\n\t\t\t\t, surrogate2 = 0xdc00 + (code & 0x3ff);\n\n\t\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t\t} else {\n\t\t\treturn String.fromCharCode(code);\n\t\t}\n\t}\n\tfunction entityReplacer(a){\n\t\tvar k = a.slice(1,-1);\n\t\tif(k in entityMap){\n\t\t\treturn entityMap[k]; \n\t\t}else if(k.charAt(0) === '#'){\n\t\t\treturn fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))\n\t\t}else{\n\t\t\terrorHandler.error('entity not found:'+a);\n\t\t\treturn a;\n\t\t}\n\t}\n\tfunction appendText(end){//has some bugs\n\t\tif(end>start){\n\t\t\tvar xt = source.substring(start,end).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\tlocator&&position(start);\n\t\t\tdomBuilder.characters(xt,0,end-start);\n\t\t\tstart = end\n\t\t}\n\t}\n\tfunction position(p,m){\n\t\twhile(p>=lineEnd && (m = linePattern.exec(source))){\n\t\t\tlineStart = m.index;\n\t\t\tlineEnd = lineStart + m[0].length;\n\t\t\tlocator.lineNumber++;\n\t\t\t//console.log('line++:',locator,startPos,endPos)\n\t\t}\n\t\tlocator.columnNumber = p-lineStart+1;\n\t}\n\tvar lineStart = 0;\n\tvar lineEnd = 0;\n\tvar linePattern = /.*(?:\\r\\n?|\\n)|.*$/g\n\tvar locator = domBuilder.locator;\n\t\n\tvar parseStack = [{currentNSMap:defaultNSMapCopy}]\n\tvar closeMap = {};\n\tvar start = 0;\n\twhile(true){\n\t\ttry{\n\t\t\tvar tagStart = source.indexOf('<',start);\n\t\t\tif(tagStart<0){\n\t\t\t\tif(!source.substr(start).match(/^\\s*$/)){\n\t\t\t\t\tvar doc = domBuilder.doc;\n\t    \t\t\tvar text = doc.createTextNode(source.substr(start));\n\t    \t\t\tdoc.appendChild(text);\n\t    \t\t\tdomBuilder.currentElement = text;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(tagStart>start){\n\t\t\t\tappendText(tagStart);\n\t\t\t}\n\t\t\tswitch(source.charAt(tagStart+1)){\n\t\t\tcase '/':\n\t\t\t\tvar end = source.indexOf('>',tagStart+3);\n\t\t\t\tvar tagName = source.substring(tagStart+2,end);\n\t\t\t\tvar config = parseStack.pop();\n\t\t\t\tif(end<0){\n\t\t\t\t\t\n\t        \t\ttagName = source.substring(tagStart+2).replace(/[\\s<].*/,'');\n\t        \t\t//console.error('#@@@@@@'+tagName)\n\t        \t\terrorHandler.error(\"end tag name: \"+tagName+' is not complete:'+config.tagName);\n\t        \t\tend = tagStart+1+tagName.length;\n\t        \t}else if(tagName.match(/\\s</)){\n\t        \t\ttagName = tagName.replace(/[\\s<].*/,'');\n\t        \t\terrorHandler.error(\"end tag name: \"+tagName+' maybe not complete');\n\t        \t\tend = tagStart+1+tagName.length;\n\t\t\t\t}\n\t\t\t\t//console.error(parseStack.length,parseStack)\n\t\t\t\t//console.error(config);\n\t\t\t\tvar localNSMap = config.localNSMap;\n\t\t\t\tvar endMatch = config.tagName == tagName;\n\t\t\t\tvar endIgnoreCaseMach = endMatch || config.tagName&&config.tagName.toLowerCase() == tagName.toLowerCase()\n\t\t        if(endIgnoreCaseMach){\n\t\t        \tdomBuilder.endElement(config.uri,config.localName,tagName);\n\t\t\t\t\tif(localNSMap){\n\t\t\t\t\t\tfor(var prefix in localNSMap){\n\t\t\t\t\t\t\tdomBuilder.endPrefixMapping(prefix) ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!endMatch){\n\t\t            \terrorHandler.fatalError(\"end tag name: \"+tagName+' is not match the current start tagName:'+config.tagName );\n\t\t\t\t\t}\n\t\t        }else{\n\t\t        \tparseStack.push(config)\n\t\t        }\n\t\t\t\t\n\t\t\t\tend++;\n\t\t\t\tbreak;\n\t\t\t\t// end elment\n\t\t\tcase '?':// <?...?>\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseInstruction(source,tagStart,domBuilder);\n\t\t\t\tbreak;\n\t\t\tcase '!':// <!doctype,<![CDATA,<!--\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tend = parseDCC(source,tagStart,domBuilder,errorHandler);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlocator&&position(tagStart);\n\t\t\t\tvar el = new ElementAttributes();\n\t\t\t\tvar currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\t\t\t\t//elStartEnd\n\t\t\t\tvar end = parseElementStartPart(source,tagStart,el,currentNSMap,entityReplacer,errorHandler);\n\t\t\t\tvar len = el.length;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){\n\t\t\t\t\tel.closed = true;\n\t\t\t\t\tif(!entityMap.nbsp){\n\t\t\t\t\t\terrorHandler.warning('unclosed xml attribute');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(locator && len){\n\t\t\t\t\tvar locator2 = copyLocator(locator,{});\n\t\t\t\t\t//try{//attribute position fixed\n\t\t\t\t\tfor(var i = 0;i<len;i++){\n\t\t\t\t\t\tvar a = el[i];\n\t\t\t\t\t\tposition(a.offset);\n\t\t\t\t\t\ta.locator = copyLocator(locator,{});\n\t\t\t\t\t}\n\t\t\t\t\t//}catch(e){console.error('@@@@@'+e)}\n\t\t\t\t\tdomBuilder.locator = locator2\n\t\t\t\t\tif(SaxO.appendElement(el,domBuilder,currentNSMap)){\n\t\t\t\t\t\tparseStack.push(el)\n\t\t\t\t\t}\n\t\t\t\t\tdomBuilder.locator = locator;\n\t\t\t\t}else{\n\t\t\t\t\tif(SaxO.appendElement(el,domBuilder,currentNSMap)){\n\t\t\t\t\t\tparseStack.push(el)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){\n\t\t\t\t\tend = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)\n\t\t\t\t}else{\n\t\t\t\t\tend++;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(e){\n\t\t\terrorHandler.error('element parse error: '+e)\n\t\t\t//errorHandler.error('element parse error: '+e);\n\t\t\tend = -1;\n\t\t\t//throw e;\n\t\t}\n\t\tif(end>start){\n\t\t\tstart = end;\n\t\t}else{\n\t\t\t//TODO: 这里有可能sax回退，有位置错误风险\n\t\t\tappendText(Math.max(tagStart,start)+1);\n\t\t}\n\t}\n}\nfunction copyLocator(f,t){\n\tt.lineNumber = f.lineNumber;\n\tt.columnNumber = f.columnNumber;\n\treturn t;\n}\n\n/**\n * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);\n * @return end of the elementStartPart(end of elementEndPart for selfClosed el)\n */\nfunction parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){\n\tvar attrName;\n\tvar value;\n\tvar p = ++start;\n\tvar s = S_TAG;//status\n\twhile(true){\n\t\tvar c = source.charAt(p);\n\t\tswitch(c){\n\t\tcase '=':\n\t\t\tif(s === S_ATTR){//attrName\n\t\t\t\tattrName = source.slice(start,p);\n\t\t\t\ts = S_EQ;\n\t\t\t}else if(s === S_ATTR_SPACE){\n\t\t\t\ts = S_EQ;\n\t\t\t}else{\n\t\t\t\t//fatalError: equal must after attrName or space after attrName\n\t\t\t\tthrow new Error('attribute equal must after attrName');\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '\\'':\n\t\tcase '\"':\n\t\t\tif(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE\n\t\t\t\t){//equal\n\t\t\t\tif(s === S_ATTR){\n\t\t\t\t\terrorHandler.warning('attribute value must after \"=\"')\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t}\n\t\t\t\tstart = p+1;\n\t\t\t\tp = source.indexOf(c,start)\n\t\t\t\tif(p>0){\n\t\t\t\t\tvalue = source.slice(start,p).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\t\tel.add(attrName,value,start-1);\n\t\t\t\t\ts = S_ATTR_END;\n\t\t\t\t}else{\n\t\t\t\t\t//fatalError: no end quot match\n\t\t\t\t\tthrow new Error('attribute value no end \\''+c+'\\' match');\n\t\t\t\t}\n\t\t\t}else if(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\tvalue = source.slice(start,p).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\t//console.log(attrName,value,start,p)\n\t\t\t\tel.add(attrName,value,start);\n\t\t\t\t//console.dir(el)\n\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed start quot('+c+')!!');\n\t\t\t\tstart = p+1;\n\t\t\t\ts = S_ATTR_END\n\t\t\t}else{\n\t\t\t\t//fatalError: no equal before\n\t\t\t\tthrow new Error('attribute value must after \"=\"');\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\ts =S_TAG_CLOSE;\n\t\t\t\tel.closed = true;\n\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\tcase S_ATTR:\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tbreak;\n\t\t\t//case S_EQ:\n\t\t\tdefault:\n\t\t\t\tthrow new Error(\"attribute invalid close char('/')\")\n\t\t\t}\n\t\t\tbreak;\n\t\tcase ''://end document\n\t\t\t//throw new Error('unexpected end of input')\n\t\t\terrorHandler.error('unexpected end of input');\n\t\t\tif(s == S_TAG){\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\t}\n\t\t\treturn p;\n\t\tcase '>':\n\t\t\tswitch(s){\n\t\t\tcase S_TAG:\n\t\t\t\tel.setTagName(source.slice(start,p));\n\t\t\tcase S_ATTR_END:\n\t\t\tcase S_TAG_SPACE:\n\t\t\tcase S_TAG_CLOSE:\n\t\t\t\tbreak;//normal\n\t\t\tcase S_ATTR_NOQUOT_VALUE://Compatible state\n\t\t\tcase S_ATTR:\n\t\t\t\tvalue = source.slice(start,p);\n\t\t\t\tif(value.slice(-1) === '/'){\n\t\t\t\t\tel.closed  = true;\n\t\t\t\t\tvalue = value.slice(0,-1)\n\t\t\t\t}\n\t\t\tcase S_ATTR_SPACE:\n\t\t\t\tif(s === S_ATTR_SPACE){\n\t\t\t\t\tvalue = attrName;\n\t\t\t\t}\n\t\t\t\tif(s == S_ATTR_NOQUOT_VALUE){\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\tel.add(attrName,value.replace(/&#?\\w+;/g,entityReplacer),start)\n\t\t\t\t}else{\n\t\t\t\t\tif(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed value!! \"'+value+'\" instead!!')\n\t\t\t\t\t}\n\t\t\t\t\tel.add(value,value,start)\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase S_EQ:\n\t\t\t\tthrow new Error('attribute value missed!!');\n\t\t\t}\n//\t\t\tconsole.log(tagName,tagNamePattern,tagNamePattern.test(tagName))\n\t\t\treturn p;\n\t\t/*xml space '\\x20' | #x9 | #xD | #xA; */\n\t\tcase '\\u0080':\n\t\t\tc = ' ';\n\t\tdefault:\n\t\t\tif(c<= ' '){//space\n\t\t\t\tswitch(s){\n\t\t\t\tcase S_TAG:\n\t\t\t\t\tel.setTagName(source.slice(start,p));//tagName\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR:\n\t\t\t\t\tattrName = source.slice(start,p)\n\t\t\t\t\ts = S_ATTR_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_NOQUOT_VALUE:\n\t\t\t\t\tvar value = source.slice(start,p).replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\t\terrorHandler.warning('attribute \"'+value+'\" missed quot(\")!!');\n\t\t\t\t\tel.add(attrName,value,start)\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\ts = S_TAG_SPACE;\n\t\t\t\t\tbreak;\n\t\t\t\t//case S_TAG_SPACE:\n\t\t\t\t//case S_EQ:\n\t\t\t\t//case S_ATTR_SPACE:\n\t\t\t\t//\tvoid();break;\n\t\t\t\t//case S_TAG_CLOSE:\n\t\t\t\t\t//ignore warning\n\t\t\t\t}\n\t\t\t}else{//not space\n//S_TAG,\tS_ATTR,\tS_EQ,\tS_ATTR_NOQUOT_VALUE\n//S_ATTR_SPACE,\tS_ATTR_END,\tS_TAG_SPACE, S_TAG_CLOSE\n\t\t\t\tswitch(s){\n\t\t\t\t//case S_TAG:void();break;\n\t\t\t\t//case S_ATTR:void();break;\n\t\t\t\t//case S_ATTR_NOQUOT_VALUE:void();break;\n\t\t\t\tcase S_ATTR_SPACE:\n\t\t\t\t\tvar tagName =  el.tagName;\n\t\t\t\t\tif(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)){\n\t\t\t\t\t\terrorHandler.warning('attribute \"'+attrName+'\" missed value!! \"'+attrName+'\" instead2!!')\n\t\t\t\t\t}\n\t\t\t\t\tel.add(attrName,attrName,start);\n\t\t\t\t\tstart = p;\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_ATTR_END:\n\t\t\t\t\terrorHandler.warning('attribute space is required\"'+attrName+'\"!!')\n\t\t\t\tcase S_TAG_SPACE:\n\t\t\t\t\ts = S_ATTR;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_EQ:\n\t\t\t\t\ts = S_ATTR_NOQUOT_VALUE;\n\t\t\t\t\tstart = p;\n\t\t\t\t\tbreak;\n\t\t\t\tcase S_TAG_CLOSE:\n\t\t\t\t\tthrow new Error(\"elements closed character '/' and '>' must be connected to\");\n\t\t\t\t}\n\t\t\t}\n\t\t}//end outer switch\n\t\t//console.log('p++',p)\n\t\tp++;\n\t}\n}\n/**\n * @return true if has new namespace define\n */\nSaxO.appendElement=function appendElement(el,domBuilder,currentNSMap){\n\tvar tagName = el.tagName;\n\tvar localNSMap = null;\n\t//var currentNSMap = parseStack[parseStack.length-1].currentNSMap;\n\tvar i = el.length;\n\twhile(i--){\n\t\tvar a = el[i];\n\t\tvar qName = a.qName;\n\t\tvar value = a.value;\n\t\tvar nsp = qName.indexOf(':');\n\t\tif(nsp>0){\n\t\t\tvar prefix = a.prefix = qName.slice(0,nsp);\n\t\t\tvar localName = qName.slice(nsp+1);\n\t\t\tvar nsPrefix = prefix === 'xmlns' && localName\n\t\t}else{\n\t\t\tlocalName = qName;\n\t\t\tprefix = null\n\t\t\tnsPrefix = qName === 'xmlns' && ''\n\t\t}\n\t\t//can not set prefix,because prefix !== ''\n\t\ta.localName = localName ;\n\t\t//prefix == null for no ns prefix attribute \n\t\tif(nsPrefix !== false){//hack!!\n\t\t\tif(localNSMap == null){\n\t\t\t\tlocalNSMap = {}\n\t\t\t\t//console.log(currentNSMap,0)\n\t\t\t\t_copy(currentNSMap,currentNSMap={})\n\t\t\t\t//console.log(currentNSMap,1)\n\t\t\t}\n\t\t\tcurrentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;\n\t\t\ta.uri = 'http://www.w3.org/2000/xmlns/'\n\t\t\tdomBuilder.startPrefixMapping(nsPrefix, value) \n\t\t}\n\t}\n\tvar i = el.length;\n\twhile(i--){\n\t\ta = el[i];\n\t\tvar prefix = a.prefix;\n\t\tif(prefix){//no prefix attribute has no namespace\n\t\t\tif(prefix === 'xml'){\n\t\t\t\ta.uri = 'http://www.w3.org/XML/1998/namespace';\n\t\t\t}if(prefix !== 'xmlns'){\n\t\t\t\ta.uri = currentNSMap[prefix || '']\n\t\t\t\t\n\t\t\t\t//{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)}\n\t\t\t}\n\t\t}\n\t}\n\tvar nsp = tagName.indexOf(':');\n\tif(nsp>0){\n\t\tprefix = el.prefix = tagName.slice(0,nsp);\n\t\tlocalName = el.localName = tagName.slice(nsp+1);\n\t}else{\n\t\tprefix = null;//important!!\n\t\tlocalName = el.localName = tagName;\n\t}\n\t//no prefix element has default namespace\n\tvar ns = el.uri = currentNSMap[prefix || ''];\n\tdomBuilder.startElement(ns,localName,tagName,el);\n\t//endPrefixMapping and startPrefixMapping have not any help for dom builder\n\t//localNSMap = null\n\tif(el.closed){\n\t\tdomBuilder.endElement(ns,localName,tagName);\n\t\tif(localNSMap){\n\t\t\tfor(prefix in localNSMap){\n\t\t\t\tdomBuilder.endPrefixMapping(prefix) \n\t\t\t}\n\t\t}\n\t}else{\n\t\tel.currentNSMap = currentNSMap;\n\t\tel.localNSMap = localNSMap;\n\t\t//parseStack.push(el);\n\t\treturn true;\n\t}\n}\nfunction parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){\n\tif(/^(?:script|textarea)$/i.test(tagName)){\n\t\tvar elEndStart =  source.indexOf('</'+tagName+'>',elStartEnd);\n\t\tvar text = source.substring(elStartEnd+1,elEndStart);\n\t\tif(/[&<]/.test(text)){\n\t\t\tif(/^script$/i.test(tagName)){\n\t\t\t\t//if(!/\\]\\]>/.test(text)){\n\t\t\t\t\t//lexHandler.startCDATA();\n\t\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\t\t//lexHandler.endCDATA();\n\t\t\t\t\treturn elEndStart;\n\t\t\t\t//}\n\t\t\t}//}else{//text area\n\t\t\t\ttext = text.replace(/&#?\\w+;/g,entityReplacer);\n\t\t\t\tdomBuilder.characters(text,0,text.length);\n\t\t\t\treturn elEndStart;\n\t\t\t//}\n\t\t\t\n\t\t}\n\t}\n\treturn elStartEnd+1;\n}\nfunction fixSelfClosed(source,elStartEnd,tagName,closeMap){\n\t//if(tagName in closeMap){\n\tvar pos = closeMap[tagName];\n\tif(pos == null){\n\t\t//console.log(tagName)\n\t\tpos =  source.lastIndexOf('</'+tagName+'>')\n\t\tif(pos<elStartEnd){//忘记闭合\n\t\t\tpos = source.lastIndexOf('</'+tagName)\n\t\t}\n\t\tcloseMap[tagName] =pos\n\t}\n\treturn pos<elStartEnd;\n\t//} \n}\nfunction _copy(source,target){\n\tfor(var n in source){target[n] = source[n]}\n}\nfunction parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'\n\tvar next= source.charAt(start+2)\n\tswitch(next){\n\tcase '-':\n\t\tif(source.charAt(start + 3) === '-'){\n\t\t\tvar end = source.indexOf('-->',start+4);\n\t\t\t//append comment source.substring(4,end)//<!--\n\t\t\tif(end>start){\n\t\t\t\tdomBuilder.comment(source,start+4,end-start-4);\n\t\t\t\treturn end+3;\n\t\t\t}else{\n\t\t\t\terrorHandler.error(\"Unclosed comment\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}else{\n\t\t\t//error\n\t\t\treturn -1;\n\t\t}\n\tdefault:\n\t\tif(source.substr(start+3,6) == 'CDATA['){\n\t\t\tvar end = source.indexOf(']]>',start+9);\n\t\t\tdomBuilder.startCDATA();\n\t\t\tdomBuilder.characters(source,start+9,end-start-9);\n\t\t\tdomBuilder.endCDATA() \n\t\t\treturn end+3;\n\t\t}\n\t\t//<!DOCTYPE\n\t\t//startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId) \n\t\tvar matchs = split(source,start);\n\t\tvar len = matchs.length;\n\t\tif(len>1 && /!doctype/i.test(matchs[0][0])){\n\t\t\tvar name = matchs[1][0];\n\t\t\tvar pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]\n\t\t\tvar sysid = len>4 && matchs[4][0];\n\t\t\tvar lastMatch = matchs[len-1]\n\t\t\tdomBuilder.startDTD(name,pubid && pubid.replace(/^(['\"])(.*?)\\1$/,'$2'),\n\t\t\t\t\tsysid && sysid.replace(/^(['\"])(.*?)\\1$/,'$2'));\n\t\t\tdomBuilder.endDTD();\n\t\t\t\n\t\t\treturn lastMatch.index+lastMatch[0].length\n\t\t}\n\t}\n\treturn -1;\n}\n\n\n\nfunction parseInstruction(source,start,domBuilder){\n\tvar end = source.indexOf('?>',start);\n\tif(end){\n\t\tvar match = source.substring(start,end).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);\n\t\tif(match){\n\t\t\tvar len = match[0].length;\n\t\t\tdomBuilder.processingInstruction(match[1], match[2]) ;\n\t\t\treturn end+2;\n\t\t}else{//error\n\t\t\treturn -1;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * @param source\n */\nfunction ElementAttributes(source){\n\t\n}\nElementAttributes.prototype = {\n\tsetTagName:function(tagName){\n\t\tif(!tagNamePattern.test(tagName)){\n\t\t\tthrow new Error('invalid tagName:'+tagName)\n\t\t}\n\t\tthis.tagName = tagName\n\t},\n\tadd:function(qName,value,offset){\n\t\tif(!tagNamePattern.test(qName)){\n\t\t\tthrow new Error('invalid attribute:'+qName)\n\t\t}\n\t\tthis[this.length++] = {qName:qName,value:value,offset:offset}\n\t},\n\tlength:0,\n\tgetLocalName:function(i){return this[i].localName},\n\tgetLocator:function(i){return this[i].locator},\n\tgetQName:function(i){return this[i].qName},\n\tgetURI:function(i){return this[i].uri},\n\tgetValue:function(i){return this[i].value}\n//\t,getIndex:function(uri, localName)){\n//\t\tif(localName){\n//\t\t\t\n//\t\t}else{\n//\t\t\tvar qName = uri\n//\t\t}\n//\t},\n//\tgetValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},\n//\tgetType:function(uri,localName){}\n//\tgetType:function(i){},\n}\n\n\n\nfunction split(source,start){\n\tvar match;\n\tvar buf = [];\n\tvar reg = /'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;\n\treg.lastIndex = start;\n\treg.exec(source);//skip <\n\twhile(match = reg.exec(source)){\n\t\tbuf.push(match);\n\t\tif(match[1])return buf;\n\t}\n}\nif(typeof require == 'function')\n{\n\texports.XMLReader = XMLReader;\n}\n\n/*\n * DOM Level 2\n * Object DOMException\n * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html\n */\n\nfunction copy(src,dest){\n\tfor(var p in src){\n\t\tdest[p] = src[p];\n\t}\n}\n/**\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*((?:.*\\{\\s*?[\\r\\n][\\s\\S]*?^})|\\S.*?(?=[;\\r\\n]));?\n^\\w+\\.prototype\\.([_\\w]+)\\s*=\\s*(\\S.*?(?=[;\\r\\n]));?\n */\nfunction _extends(Class,Super){\n\tvar pt = Class.prototype;\n\tif(!(pt instanceof Super)){\n\t\tfunction t(){};\n\t\tt.prototype = Super.prototype;\n\t\tt = new t();\n\t\tcopy(pt,t);\n\t\tClass.prototype = pt = t;\n\t}\n\tif(pt.constructor != Class){\n\t\tif(typeof Class != 'function'){\n\t\t\tconsole.error(\"unknow Class:\"+Class)\n\t\t}\n\t\tpt.constructor = Class\n\t}\n}\nvar htmlns = 'http://www.w3.org/1999/xhtml' ;\n// Node Types\nvar NodeType = {}\nvar ELEMENT_NODE                = NodeType.ELEMENT_NODE                = 1;\nvar ATTRIBUTE_NODE              = NodeType.ATTRIBUTE_NODE              = 2;\nvar TEXT_NODE                   = NodeType.TEXT_NODE                   = 3;\nvar CDATA_SECTION_NODE          = NodeType.CDATA_SECTION_NODE          = 4;\nvar ENTITY_REFERENCE_NODE       = NodeType.ENTITY_REFERENCE_NODE       = 5;\nvar ENTITY_NODE                 = NodeType.ENTITY_NODE                 = 6;\nvar PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;\nvar COMMENT_NODE                = NodeType.COMMENT_NODE                = 8;\nvar DOCUMENT_NODE               = NodeType.DOCUMENT_NODE               = 9;\nvar DOCUMENT_TYPE_NODE          = NodeType.DOCUMENT_TYPE_NODE          = 10;\nvar DOCUMENT_FRAGMENT_NODE      = NodeType.DOCUMENT_FRAGMENT_NODE      = 11;\nvar NOTATION_NODE               = NodeType.NOTATION_NODE               = 12;\n\n// ExceptionCode\nvar ExceptionCode = {}\nvar ExceptionMessage = {};\nvar INDEX_SIZE_ERR              = ExceptionCode.INDEX_SIZE_ERR              = ((ExceptionMessage[1]=\"Index size error\"),1);\nvar DOMSTRING_SIZE_ERR          = ExceptionCode.DOMSTRING_SIZE_ERR          = ((ExceptionMessage[2]=\"DOMString size error\"),2);\nvar HIERARCHY_REQUEST_ERR       = ExceptionCode.HIERARCHY_REQUEST_ERR       = ((ExceptionMessage[3]=\"Hierarchy request error\"),3);\nvar WRONG_DOCUMENT_ERR          = ExceptionCode.WRONG_DOCUMENT_ERR          = ((ExceptionMessage[4]=\"Wrong document\"),4);\nvar INVALID_CHARACTER_ERR       = ExceptionCode.INVALID_CHARACTER_ERR       = ((ExceptionMessage[5]=\"Invalid character\"),5);\nvar NO_DATA_ALLOWED_ERR         = ExceptionCode.NO_DATA_ALLOWED_ERR         = ((ExceptionMessage[6]=\"No data allowed\"),6);\nvar NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]=\"No modification allowed\"),7);\nvar NOT_FOUND_ERR               = ExceptionCode.NOT_FOUND_ERR               = ((ExceptionMessage[8]=\"Not found\"),8);\nvar NOT_SUPPORTED_ERR           = ExceptionCode.NOT_SUPPORTED_ERR           = ((ExceptionMessage[9]=\"Not supported\"),9);\nvar INUSE_ATTRIBUTE_ERR         = ExceptionCode.INUSE_ATTRIBUTE_ERR         = ((ExceptionMessage[10]=\"Attribute in use\"),10);\n//level2\nvar INVALID_STATE_ERR        \t= ExceptionCode.INVALID_STATE_ERR        \t= ((ExceptionMessage[11]=\"Invalid state\"),11);\nvar SYNTAX_ERR               \t= ExceptionCode.SYNTAX_ERR               \t= ((ExceptionMessage[12]=\"Syntax error\"),12);\nvar INVALID_MODIFICATION_ERR \t= ExceptionCode.INVALID_MODIFICATION_ERR \t= ((ExceptionMessage[13]=\"Invalid modification\"),13);\nvar NAMESPACE_ERR            \t= ExceptionCode.NAMESPACE_ERR           \t= ((ExceptionMessage[14]=\"Invalid namespace\"),14);\nvar INVALID_ACCESS_ERR       \t= ExceptionCode.INVALID_ACCESS_ERR      \t= ((ExceptionMessage[15]=\"Invalid access\"),15);\n\n\nfunction DOMException(code, message) {\n\tif(message instanceof Error){\n\t\tvar error = message;\n\t}else{\n\t\terror = this;\n\t\tError.call(this, ExceptionMessage[code]);\n\t\tthis.message = ExceptionMessage[code];\n\t\tif(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);\n\t}\n\terror.code = code;\n\tif(message) this.message = this.message + \": \" + message;\n\treturn error;\n};\nDOMException.prototype = Error.prototype;\ncopy(ExceptionCode,DOMException)\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177\n * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.\n * The items in the NodeList are accessible via an integral index, starting from 0.\n */\nfunction NodeList() {\n};\nNodeList.prototype = {\n\t/**\n\t * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.\n\t * @standard level1\n\t */\n\tlength:0, \n\t/**\n\t * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.\n\t * @standard level1\n\t * @param index  unsigned long \n\t *   Index into the collection.\n\t * @return Node\n\t * \tThe node at the indexth position in the NodeList, or null if that is not a valid index. \n\t */\n\titem: function(index) {\n\t\treturn this[index] || null;\n\t},\n\ttoString:function(isHTML,nodeFilter){\n\t\tfor(var buf = [], i = 0;i<this.length;i++){\n\t\t\tserializeToString(this[i],buf,isHTML,nodeFilter);\n\t\t}\n\t\treturn buf.join('');\n\t}\n};\nfunction LiveNodeList(node,refresh){\n\tthis._node = node;\n\tthis._refresh = refresh\n\t_updateLiveList(this);\n}\nfunction _updateLiveList(list){\n\tvar inc = list._node._inc || list._node.ownerDocument._inc;\n\tif(list._inc != inc){\n\t\tvar ls = list._refresh(list._node);\n\t\t//console.log(ls.length)\n\t\t__set__(list,'length',ls.length);\n\t\tcopy(ls,list);\n\t\tlist._inc = inc;\n\t}\n}\nLiveNodeList.prototype.item = function(i){\n\t_updateLiveList(this);\n\treturn this[i];\n}\n\n_extends(LiveNodeList,NodeList);\n/**\n * \n * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.\n * NamedNodeMap objects in the DOM are live.\n * used for attributes or DocumentType entities \n */\nfunction NamedNodeMap() {\n};\n\nfunction _findNodeIndex(list,node){\n\tvar i = list.length;\n\twhile(i--){\n\t\tif(list[i] === node){return i}\n\t}\n}\n\nfunction _addNamedNode(el,list,newAttr,oldAttr){\n\tif(oldAttr){\n\t\tlist[_findNodeIndex(list,oldAttr)] = newAttr;\n\t}else{\n\t\tlist[list.length++] = newAttr;\n\t}\n\tif(el){\n\t\tnewAttr.ownerElement = el;\n\t\tvar doc = el.ownerDocument;\n\t\tif(doc){\n\t\t\toldAttr && _onRemoveAttribute(doc,el,oldAttr);\n\t\t\t_onAddAttribute(doc,el,newAttr);\n\t\t}\n\t}\n}\nfunction _removeNamedNode(el,list,attr){\n\t//console.log('remove attr:'+attr)\n\tvar i = _findNodeIndex(list,attr);\n\tif(i>=0){\n\t\tvar lastIndex = list.length-1\n\t\twhile(i<lastIndex){\n\t\t\tlist[i] = list[++i]\n\t\t}\n\t\tlist.length = lastIndex;\n\t\tif(el){\n\t\t\tvar doc = el.ownerDocument;\n\t\t\tif(doc){\n\t\t\t\t_onRemoveAttribute(doc,el,attr);\n\t\t\t\tattr.ownerElement = null;\n\t\t\t}\n\t\t}\n\t}else{\n\t\tthrow DOMException(NOT_FOUND_ERR,new Error(el.tagName+'@'+attr))\n\t}\n}\nNamedNodeMap.prototype = {\n\tlength:0,\n\titem:NodeList.prototype.item,\n\tgetNamedItem: function(key) {\n//\t\tif(key.indexOf(':')>0 || key == 'xmlns'){\n//\t\t\treturn null;\n//\t\t}\n\t\t//console.log()\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar attr = this[i];\n\t\t\t//console.log(attr.nodeName,key)\n\t\t\tif(attr.nodeName == key){\n\t\t\t\treturn attr;\n\t\t\t}\n\t\t}\n\t},\n\tsetNamedItem: function(attr) {\n\t\tvar el = attr.ownerElement;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\tvar oldAttr = this.getNamedItem(attr.nodeName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\t/* returns Node */\n\tsetNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR\n\t\tvar el = attr.ownerElement, oldAttr;\n\t\tif(el && el!=this._ownerElement){\n\t\t\tthrow new DOMException(INUSE_ATTRIBUTE_ERR);\n\t\t}\n\t\toldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);\n\t\t_addNamedNode(this._ownerElement,this,attr,oldAttr);\n\t\treturn oldAttr;\n\t},\n\n\t/* returns Node */\n\tremoveNamedItem: function(key) {\n\t\tvar attr = this.getNamedItem(key);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t\t\n\t\t\n\t},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR\n\t\n\t//for level2\n\tremoveNamedItemNS:function(namespaceURI,localName){\n\t\tvar attr = this.getNamedItemNS(namespaceURI,localName);\n\t\t_removeNamedNode(this._ownerElement,this,attr);\n\t\treturn attr;\n\t},\n\tgetNamedItemNS: function(namespaceURI, localName) {\n\t\tvar i = this.length;\n\t\twhile(i--){\n\t\t\tvar node = this[i];\n\t\t\tif(node.localName == localName && node.namespaceURI == namespaceURI){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n};\n/**\n * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490\n */\nfunction DOMImplementation(/* Object */ features) {\n\tthis._features = {};\n\tif (features) {\n\t\tfor (var feature in features) {\n\t\t\t this._features = features[feature];\n\t\t}\n\t}\n};\n\nDOMImplementation.prototype = {\n\thasFeature: function(/* string */ feature, /* string */ version) {\n\t\tvar versions = this._features[feature.toLowerCase()];\n\t\tif (versions && (!version || version in versions)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateDocument:function(namespaceURI,  qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR\n\t\tvar doc = new Document();\n\t\tdoc.implementation = this;\n\t\tdoc.childNodes = new NodeList();\n\t\tdoc.doctype = doctype;\n\t\tif(doctype){\n\t\t\tdoc.appendChild(doctype);\n\t\t}\n\t\tif(qualifiedName){\n\t\t\tvar root = doc.createElementNS(namespaceURI,qualifiedName);\n\t\t\tdoc.appendChild(root);\n\t\t}\n\t\treturn doc;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR\n\t\tvar node = new DocumentType();\n\t\tnode.name = qualifiedName;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.publicId = publicId;\n\t\tnode.systemId = systemId;\n\t\t// Introduced in DOM Level 2:\n\t\t//readonly attribute DOMString        internalSubset;\n\t\t\n\t\t//TODO:..\n\t\t//  readonly attribute NamedNodeMap     entities;\n\t\t//  readonly attribute NamedNodeMap     notations;\n\t\treturn node;\n\t}\n};\n\n\n/**\n * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247\n */\n\nfunction Node() {\n};\n\nNode.prototype = {\n\tfirstChild : null,\n\tlastChild : null,\n\tpreviousSibling : null,\n\tnextSibling : null,\n\tattributes : null,\n\tparentNode : null,\n\tchildNodes : null,\n\townerDocument : null,\n\tnodeValue : null,\n\tnamespaceURI : null,\n\tprefix : null,\n\tlocalName : null,\n\t// Modified in DOM Level 2:\n\tinsertBefore:function(newChild, refChild){//raises \n\t\treturn _insertBefore(this,newChild,refChild);\n\t},\n\treplaceChild:function(newChild, oldChild){//raises \n\t\tthis.insertBefore(newChild,oldChild);\n\t\tif(oldChild){\n\t\t\tthis.removeChild(oldChild);\n\t\t}\n\t},\n\tremoveChild:function(oldChild){\n\t\treturn _removeChild(this,oldChild);\n\t},\n\tappendChild:function(newChild){\n\t\treturn this.insertBefore(newChild,null);\n\t},\n\thasChildNodes:function(){\n\t\treturn this.firstChild != null;\n\t},\n\tcloneNode:function(deep){\n\t\treturn cloneNode(this.ownerDocument||this,this,deep);\n\t},\n\t// Modified in DOM Level 2:\n\tnormalize:function(){\n\t\tvar child = this.firstChild;\n\t\twhile(child){\n\t\t\tvar next = child.nextSibling;\n\t\t\tif(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){\n\t\t\t\tthis.removeChild(next);\n\t\t\t\tchild.appendData(next.data);\n\t\t\t}else{\n\t\t\t\tchild.normalize();\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t}\n\t},\n  \t// Introduced in DOM Level 2:\n\tisSupported:function(feature, version){\n\t\treturn this.ownerDocument.implementation.hasFeature(feature,version);\n\t},\n    // Introduced in DOM Level 2:\n    hasAttributes:function(){\n    \treturn this.attributes.length>0;\n    },\n    lookupPrefix:function(namespaceURI){\n    \tvar el = this;\n    \twhile(el){\n    \t\tvar map = el._nsMap;\n    \t\t//console.dir(map)\n    \t\tif(map){\n    \t\t\tfor(var n in map){\n    \t\t\t\tif(map[n] == namespaceURI){\n    \t\t\t\t\treturn n;\n    \t\t\t\t}\n    \t\t\t}\n    \t\t}\n    \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n    \t}\n    \treturn null;\n    },\n    // Introduced in DOM Level 3:\n    lookupNamespaceURI:function(prefix){\n    \tvar el = this;\n    \twhile(el){\n    \t\tvar map = el._nsMap;\n    \t\t//console.dir(map)\n    \t\tif(map){\n    \t\t\tif(prefix in map){\n    \t\t\t\treturn map[prefix] ;\n    \t\t\t}\n    \t\t}\n    \t\tel = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;\n    \t}\n    \treturn null;\n    },\n    // Introduced in DOM Level 3:\n    isDefaultNamespace:function(namespaceURI){\n    \tvar prefix = this.lookupPrefix(namespaceURI);\n    \treturn prefix == null;\n    }\n};\n\n\nfunction _xmlEncoder(c){\n\treturn c == '<' && '&lt;' ||\n         c == '>' && '&gt;' ||\n         c == '&' && '&amp;' ||\n         c == '\"' && '&quot;' ||\n         '&#'+c.charCodeAt()+';'\n}\n\n\ncopy(NodeType,Node);\ncopy(NodeType,Node.prototype);\n\n/**\n * @param callback return true for continue,false for break\n * @return boolean true: break visit;\n */\nfunction _visitNode(node,callback){\n\tif(callback(node)){\n\t\treturn true;\n\t}\n\tif(node = node.firstChild){\n\t\tdo{\n\t\t\tif(_visitNode(node,callback)){return true}\n        }while(node=node.nextSibling)\n    }\n}\n\n\n\nfunction Document(){\n}\nfunction _onAddAttribute(doc,el,newAttr){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns == 'http://www.w3.org/2000/xmlns/'){\n\t\t//update namespace\n\t\tel._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value\n\t}\n}\nfunction _onRemoveAttribute(doc,el,newAttr,remove){\n\tdoc && doc._inc++;\n\tvar ns = newAttr.namespaceURI ;\n\tif(ns == 'http://www.w3.org/2000/xmlns/'){\n\t\t//update namespace\n\t\tdelete el._nsMap[newAttr.prefix?newAttr.localName:'']\n\t}\n}\nfunction _onUpdateChild(doc,el,newChild){\n\tif(doc && doc._inc){\n\t\tdoc._inc++;\n\t\t//update childNodes\n\t\tvar cs = el.childNodes;\n\t\tif(newChild){\n\t\t\tcs[cs.length++] = newChild;\n\t\t}else{\n\t\t\t//console.log(1)\n\t\t\tvar child = el.firstChild;\n\t\t\tvar i = 0;\n\t\t\twhile(child){\n\t\t\t\tcs[i++] = child;\n\t\t\t\tchild =child.nextSibling;\n\t\t\t}\n\t\t\tcs.length = i;\n\t\t}\n\t}\n}\n\n/**\n * attributes;\n * children;\n * \n * writeable properties:\n * nodeValue,Attr:value,CharacterData:data\n * prefix\n */\nfunction _removeChild(parentNode,child){\n\tvar previous = child.previousSibling;\n\tvar next = child.nextSibling;\n\tif(previous){\n\t\tprevious.nextSibling = next;\n\t}else{\n\t\tparentNode.firstChild = next\n\t}\n\tif(next){\n\t\tnext.previousSibling = previous;\n\t}else{\n\t\tparentNode.lastChild = previous;\n\t}\n\t_onUpdateChild(parentNode.ownerDocument,parentNode);\n\treturn child;\n}\n/**\n * preformance key(refChild == null)\n */\nfunction _insertBefore(parentNode,newChild,nextChild){\n\tvar cp = newChild.parentNode;\n\tif(cp){\n\t\tcp.removeChild(newChild);//remove and update\n\t}\n\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\tvar newFirst = newChild.firstChild;\n\t\tif (newFirst == null) {\n\t\t\treturn newChild;\n\t\t}\n\t\tvar newLast = newChild.lastChild;\n\t}else{\n\t\tnewFirst = newLast = newChild;\n\t}\n\tvar pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;\n\n\tnewFirst.previousSibling = pre;\n\tnewLast.nextSibling = nextChild;\n\t\n\t\n\tif(pre){\n\t\tpre.nextSibling = newFirst;\n\t}else{\n\t\tparentNode.firstChild = newFirst;\n\t}\n\tif(nextChild == null){\n\t\tparentNode.lastChild = newLast;\n\t}else{\n\t\tnextChild.previousSibling = newLast;\n\t}\n\tdo{\n\t\tnewFirst.parentNode = parentNode;\n\t}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))\n\t_onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);\n\t//console.log(parentNode.lastChild.nextSibling == null)\n\tif (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {\n\t\tnewChild.firstChild = newChild.lastChild = null;\n\t}\n\treturn newChild;\n}\nfunction _appendSingleChild(parentNode,newChild){\n\tvar cp = newChild.parentNode;\n\tif(cp){\n\t\tvar pre = parentNode.lastChild;\n\t\tcp.removeChild(newChild);//remove and update\n\t\tvar pre = parentNode.lastChild;\n\t}\n\tvar pre = parentNode.lastChild;\n\tnewChild.parentNode = parentNode;\n\tnewChild.previousSibling = pre;\n\tnewChild.nextSibling = null;\n\tif(pre){\n\t\tpre.nextSibling = newChild;\n\t}else{\n\t\tparentNode.firstChild = newChild;\n\t}\n\tparentNode.lastChild = newChild;\n\t_onUpdateChild(parentNode.ownerDocument,parentNode,newChild);\n\treturn newChild;\n\t//console.log(\"__aa\",parentNode.lastChild.nextSibling == null)\n}\nDocument.prototype = {\n\t//implementation : null,\n\tnodeName :  '#document',\n\tnodeType :  DOCUMENT_NODE,\n\tdoctype :  null,\n\tdocumentElement :  null,\n\t_inc : 1,\n\t\n\tinsertBefore :  function(newChild, refChild){//raises \n\t\tif(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){\n\t\t\tvar child = newChild.firstChild;\n\t\t\twhile(child){\n\t\t\t\tvar next = child.nextSibling;\n\t\t\t\tthis.insertBefore(child,refChild);\n\t\t\t\tchild = next;\n\t\t\t}\n\t\t\treturn newChild;\n\t\t}\n\t\tif(this.documentElement == null && newChild.nodeType == ELEMENT_NODE){\n\t\t\tthis.documentElement = newChild;\n\t\t}\n\t\t\n\t\treturn _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;\n\t},\n\tremoveChild :  function(oldChild){\n\t\tif(this.documentElement == oldChild){\n\t\t\tthis.documentElement = null;\n\t\t}\n\t\treturn _removeChild(this,oldChild);\n\t},\n\t// Introduced in DOM Level 2:\n\timportNode : function(importedNode,deep){\n\t\treturn importNode(this,importedNode,deep);\n\t},\n\t// Introduced in DOM Level 2:\n\tgetElementById :\tfunction(id){\n\t\tvar rtv = null;\n\t\t_visitNode(this.documentElement,function(node){\n\t\t\tif(node.nodeType == ELEMENT_NODE){\n\t\t\t\tif(node.getAttribute('id') == id){\n\t\t\t\t\trtv = node;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\treturn rtv;\n\t},\n\t\n\t//document factory method:\n\tcreateElement :\tfunction(tagName){\n\t\tvar node = new Element();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = tagName;\n\t\tnode.tagName = tagName;\n\t\tnode.childNodes = new NodeList();\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\tcreateDocumentFragment :\tfunction(){\n\t\tvar node = new DocumentFragment();\n\t\tnode.ownerDocument = this;\n\t\tnode.childNodes = new NodeList();\n\t\treturn node;\n\t},\n\tcreateTextNode :\tfunction(data){\n\t\tvar node = new Text();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateComment :\tfunction(data){\n\t\tvar node = new Comment();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateCDATASection :\tfunction(data){\n\t\tvar node = new CDATASection();\n\t\tnode.ownerDocument = this;\n\t\tnode.appendData(data)\n\t\treturn node;\n\t},\n\tcreateProcessingInstruction :\tfunction(target,data){\n\t\tvar node = new ProcessingInstruction();\n\t\tnode.ownerDocument = this;\n\t\tnode.tagName = node.target = target;\n\t\tnode.nodeValue= node.data = data;\n\t\treturn node;\n\t},\n\tcreateAttribute :\tfunction(name){\n\t\tvar node = new Attr();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.name = name;\n\t\tnode.nodeName\t= name;\n\t\tnode.localName = name;\n\t\tnode.specified = true;\n\t\treturn node;\n\t},\n\tcreateEntityReference :\tfunction(name){\n\t\tvar node = new EntityReference();\n\t\tnode.ownerDocument\t= this;\n\t\tnode.nodeName\t= name;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateElementNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Element();\n\t\tvar pl = qualifiedName.split(':');\n\t\tvar attrs\t= node.attributes = new NamedNodeMap();\n\t\tnode.childNodes = new NodeList();\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.tagName = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\tattrs._ownerElement = node;\n\t\treturn node;\n\t},\n\t// Introduced in DOM Level 2:\n\tcreateAttributeNS :\tfunction(namespaceURI,qualifiedName){\n\t\tvar node = new Attr();\n\t\tvar pl = qualifiedName.split(':');\n\t\tnode.ownerDocument = this;\n\t\tnode.nodeName = qualifiedName;\n\t\tnode.name = qualifiedName;\n\t\tnode.namespaceURI = namespaceURI;\n\t\tnode.specified = true;\n\t\tif(pl.length == 2){\n\t\t\tnode.prefix = pl[0];\n\t\t\tnode.localName = pl[1];\n\t\t}else{\n\t\t\t//el.prefix = null;\n\t\t\tnode.localName = qualifiedName;\n\t\t}\n\t\treturn node;\n\t}\n};\n_extends(Document,Node);\n\n\nfunction Element() {\n\tthis._nsMap = {};\n};\nElement.prototype = {\n\tnodeType : ELEMENT_NODE,\n\thasAttribute : function(name){\n\t\treturn this.getAttributeNode(name)!=null;\n\t},\n\tgetAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name);\n\t\treturn attr && attr.value || '';\n\t},\n\tgetAttributeNode : function(name){\n\t\treturn this.attributes.getNamedItem(name);\n\t},\n\tsetAttribute : function(name, value){\n\t\tvar attr = this.ownerDocument.createAttribute(name);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tremoveAttribute : function(name){\n\t\tvar attr = this.getAttributeNode(name)\n\t\tattr && this.removeAttributeNode(attr);\n\t},\n\t\n\t//four real opeartion method\n\tappendChild:function(newChild){\n\t\tif(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){\n\t\t\treturn this.insertBefore(newChild,null);\n\t\t}else{\n\t\t\treturn _appendSingleChild(this,newChild);\n\t\t}\n\t},\n\tsetAttributeNode : function(newAttr){\n\t\treturn this.attributes.setNamedItem(newAttr);\n\t},\n\tsetAttributeNodeNS : function(newAttr){\n\t\treturn this.attributes.setNamedItemNS(newAttr);\n\t},\n\tremoveAttributeNode : function(oldAttr){\n\t\t//console.log(this == oldAttr.ownerElement)\n\t\treturn this.attributes.removeNamedItem(oldAttr.nodeName);\n\t},\n\t//get real attribute name,and remove it by removeAttributeNode\n\tremoveAttributeNS : function(namespaceURI, localName){\n\t\tvar old = this.getAttributeNodeNS(namespaceURI, localName);\n\t\told && this.removeAttributeNode(old);\n\t},\n\t\n\thasAttributeNS : function(namespaceURI, localName){\n\t\treturn this.getAttributeNodeNS(namespaceURI, localName)!=null;\n\t},\n\tgetAttributeNS : function(namespaceURI, localName){\n\t\tvar attr = this.getAttributeNodeNS(namespaceURI, localName);\n\t\treturn attr && attr.value || '';\n\t},\n\tsetAttributeNS : function(namespaceURI, qualifiedName, value){\n\t\tvar attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);\n\t\tattr.value = attr.nodeValue = \"\" + value;\n\t\tthis.setAttributeNode(attr)\n\t},\n\tgetAttributeNodeNS : function(namespaceURI, localName){\n\t\treturn this.attributes.getNamedItemNS(namespaceURI, localName);\n\t},\n\t\n\tgetElementsByTagName : function(tagName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t});\n\t},\n\tgetElementsByTagNameNS : function(namespaceURI, localName){\n\t\treturn new LiveNodeList(this,function(base){\n\t\t\tvar ls = [];\n\t\t\t_visitNode(base,function(node){\n\t\t\t\tif(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){\n\t\t\t\t\tls.push(node);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn ls;\n\t\t\t\n\t\t});\n\t}\n};\nDocument.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;\nDocument.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;\n\n\n_extends(Element,Node);\nfunction Attr() {\n};\nAttr.prototype.nodeType = ATTRIBUTE_NODE;\n_extends(Attr,Node);\n\n\nfunction CharacterData() {\n};\nCharacterData.prototype = {\n\tdata : '',\n\tsubstringData : function(offset, count) {\n\t\treturn this.data.substring(offset, offset+count);\n\t},\n\tappendData: function(text) {\n\t\ttext = this.data+text;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t},\n\tinsertData: function(offset,text) {\n\t\tthis.replaceData(offset,0,text);\n\t\n\t},\n\tappendChild:function(newChild){\n\t\tthrow new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR])\n\t},\n\tdeleteData: function(offset, count) {\n\t\tthis.replaceData(offset,count,\"\");\n\t},\n\treplaceData: function(offset, count, text) {\n\t\tvar start = this.data.substring(0,offset);\n\t\tvar end = this.data.substring(offset+count);\n\t\ttext = start + text + end;\n\t\tthis.nodeValue = this.data = text;\n\t\tthis.length = text.length;\n\t}\n}\n_extends(CharacterData,Node);\nfunction Text() {\n};\nText.prototype = {\n\tnodeName : \"#text\",\n\tnodeType : TEXT_NODE,\n\tsplitText : function(offset) {\n\t\tvar text = this.data;\n\t\tvar newText = text.substring(offset);\n\t\ttext = text.substring(0, offset);\n\t\tthis.data = this.nodeValue = text;\n\t\tthis.length = text.length;\n\t\tvar newNode = this.ownerDocument.createTextNode(newText);\n\t\tif(this.parentNode){\n\t\t\tthis.parentNode.insertBefore(newNode, this.nextSibling);\n\t\t}\n\t\treturn newNode;\n\t}\n}\n_extends(Text,CharacterData);\nfunction Comment() {\n};\nComment.prototype = {\n\tnodeName : \"#comment\",\n\tnodeType : COMMENT_NODE\n}\n_extends(Comment,CharacterData);\n\nfunction CDATASection() {\n};\nCDATASection.prototype = {\n\tnodeName : \"#cdata-section\",\n\tnodeType : CDATA_SECTION_NODE\n}\n_extends(CDATASection,CharacterData);\n\n\nfunction DocumentType() {\n};\nDocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;\n_extends(DocumentType,Node);\n\nfunction Notation() {\n};\nNotation.prototype.nodeType = NOTATION_NODE;\n_extends(Notation,Node);\n\nfunction Entity() {\n};\nEntity.prototype.nodeType = ENTITY_NODE;\n_extends(Entity,Node);\n\nfunction EntityReference() {\n};\nEntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;\n_extends(EntityReference,Node);\n\nfunction DocumentFragment() {\n};\nDocumentFragment.prototype.nodeName =\t\"#document-fragment\";\nDocumentFragment.prototype.nodeType =\tDOCUMENT_FRAGMENT_NODE;\n_extends(DocumentFragment,Node);\n\n\nfunction ProcessingInstruction() {\n}\nProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;\n_extends(ProcessingInstruction,Node);\nfunction XMLSerializer(){}\nXMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){\n\treturn nodeSerializeToString.call(node,isHtml,nodeFilter);\n}\nNode.prototype.toString = nodeSerializeToString;\nfunction nodeSerializeToString(isHtml,nodeFilter){\n\tvar buf = [];\n\tvar refNode = this.nodeType == 9 && this.documentElement || this;\n\tvar prefix = refNode.prefix;\n\tvar uri = refNode.namespaceURI;\n\t\n\tif(uri && prefix == null){\n\t\t//console.log(prefix)\n\t\tvar prefix = refNode.lookupPrefix(uri);\n\t\tif(prefix == null){\n\t\t\t//isHTML = true;\n\t\t\tvar visibleNamespaces=[\n\t\t\t{namespace:uri,prefix:null}\n\t\t\t//{namespace:uri,prefix:''}\n\t\t\t]\n\t\t}\n\t}\n\tserializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces);\n\t//console.log('###',this.nodeType,uri,prefix,buf.join(''))\n\treturn buf.join('');\n}\nfunction needNamespaceDefine(node,isHTML, visibleNamespaces) {\n\tvar prefix = node.prefix||'';\n\tvar uri = node.namespaceURI;\n\tif (!prefix && !uri){\n\t\treturn false;\n\t}\n\tif (prefix === \"xml\" && uri === \"http://www.w3.org/XML/1998/namespace\" \n\t\t|| uri == 'http://www.w3.org/2000/xmlns/'){\n\t\treturn false;\n\t}\n\t\n\tvar i = visibleNamespaces.length \n\t//console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces)\n\twhile (i--) {\n\t\tvar ns = visibleNamespaces[i];\n\t\t// get namespace prefix\n\t\t//console.log(node.nodeType,node.tagName,ns.prefix,prefix)\n\t\tif (ns.prefix == prefix){\n\t\t\treturn ns.namespace != uri;\n\t\t}\n\t}\n\t//console.log(isHTML,uri,prefix=='')\n\t//if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){\n\t//\treturn false;\n\t//}\n\t//node.flag = '11111'\n\t//console.error(3,true,node.flag,node.prefix,node.namespaceURI)\n\treturn true;\n}\nfunction serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){\n\tif(nodeFilter){\n\t\tnode = nodeFilter(node);\n\t\tif(node){\n\t\t\tif(typeof node == 'string'){\n\t\t\t\tbuf.push(node);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}else{\n\t\t\treturn;\n\t\t}\n\t\t//buf.sort.apply(attrs, attributeSorter);\n\t}\n\tswitch(node.nodeType){\n\tcase ELEMENT_NODE:\n\t\tif (!visibleNamespaces) visibleNamespaces = [];\n\t\tvar startVisibleNamespaces = visibleNamespaces.length;\n\t\tvar attrs = node.attributes;\n\t\tvar len = attrs.length;\n\t\tvar child = node.firstChild;\n\t\tvar nodeName = node.tagName;\n\t\t\n\t\tisHTML =  (htmlns === node.namespaceURI) ||isHTML \n\t\tbuf.push('<',nodeName);\n\t\t\n\t\t\n\t\t\n\t\tfor(var i=0;i<len;i++){\n\t\t\t// add namespaces for attributes\n\t\t\tvar attr = attrs.item(i);\n\t\t\tif (attr.prefix == 'xmlns') {\n\t\t\t\tvisibleNamespaces.push({ prefix: attr.localName, namespace: attr.value });\n\t\t\t}else if(attr.nodeName == 'xmlns'){\n\t\t\t\tvisibleNamespaces.push({ prefix: '', namespace: attr.value });\n\t\t\t}\n\t\t}\n\t\tfor(var i=0;i<len;i++){\n\t\t\tvar attr = attrs.item(i);\n\t\t\tif (needNamespaceDefine(attr,isHTML, visibleNamespaces)) {\n\t\t\t\tvar prefix = attr.prefix||'';\n\t\t\t\tvar uri = attr.namespaceURI;\n\t\t\t\tvar ns = prefix ? ' xmlns:' + prefix : \" xmlns\";\n\t\t\t\tbuf.push(ns, '=\"' , uri , '\"');\n\t\t\t\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\n\t\t\t}\n\t\t\tserializeToString(attr,buf,isHTML,nodeFilter,visibleNamespaces);\n\t\t}\n\t\t// add namespace for current node\t\t\n\t\tif (needNamespaceDefine(node,isHTML, visibleNamespaces)) {\n\t\t\tvar prefix = node.prefix||'';\n\t\t\tvar uri = node.namespaceURI;\n\t\t\tvar ns = prefix ? ' xmlns:' + prefix : \" xmlns\";\n\t\t\tbuf.push(ns, '=\"' , uri , '\"');\n\t\t\tvisibleNamespaces.push({ prefix: prefix, namespace:uri });\n\t\t}\n\t\t\n\t\tif(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){\n\t\t\tbuf.push('>');\n\t\t\t//if is cdata child node\n\t\t\tif(isHTML && /^script$/i.test(nodeName)){\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.data){\n\t\t\t\t\t\tbuf.push(child.data);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\n\t\t\t\t\t}\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{\n\t\t\t\twhile(child){\n\t\t\t\t\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\n\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuf.push('</',nodeName,'>');\n\t\t}else{\n\t\t\tbuf.push('/>');\n\t\t}\n\t\t// remove added visible namespaces\n\t\t//visibleNamespaces.length = startVisibleNamespaces;\n\t\treturn;\n\tcase DOCUMENT_NODE:\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tserializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces);\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t\treturn;\n\tcase ATTRIBUTE_NODE:\n\t\treturn buf.push(' ',node.name,'=\"',node.value.replace(/[<&\"]/g,_xmlEncoder),'\"');\n\tcase TEXT_NODE:\n\t\treturn buf.push(node.data.replace(/[<&]/g,_xmlEncoder));\n\tcase CDATA_SECTION_NODE:\n\t\treturn buf.push( '<![CDATA[',node.data,']]>');\n\tcase COMMENT_NODE:\n\t\treturn buf.push( \"<!--\",node.data,\"-->\");\n\tcase DOCUMENT_TYPE_NODE:\n\t\tvar pubid = node.publicId;\n\t\tvar sysid = node.systemId;\n\t\tbuf.push('<!DOCTYPE ',node.name);\n\t\tif(pubid){\n\t\t\tbuf.push(' PUBLIC \"',pubid);\n\t\t\tif (sysid && sysid!='.') {\n\t\t\t\tbuf.push( '\" \"',sysid);\n\t\t\t}\n\t\t\tbuf.push('\">');\n\t\t}else if(sysid && sysid!='.'){\n\t\t\tbuf.push(' SYSTEM \"',sysid,'\">');\n\t\t}else{\n\t\t\tvar sub = node.internalSubset;\n\t\t\tif(sub){\n\t\t\t\tbuf.push(\" [\",sub,\"]\");\n\t\t\t}\n\t\t\tbuf.push(\">\");\n\t\t}\n\t\treturn;\n\tcase PROCESSING_INSTRUCTION_NODE:\n\t\treturn buf.push( \"<?\",node.target,\" \",node.data,\"?>\");\n\tcase ENTITY_REFERENCE_NODE:\n\t\treturn buf.push( '&',node.nodeName,';');\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE:\n\tdefault:\n\t\tbuf.push('??',node.nodeName);\n\t}\n}\nfunction importNode(doc,node,deep){\n\tvar node2;\n\tswitch (node.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tnode2 = node.cloneNode(false);\n\t\tnode2.ownerDocument = doc;\n\t\t//var attrs = node2.attributes;\n\t\t//var len = attrs.length;\n\t\t//for(var i=0;i<len;i++){\n\t\t\t//node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));\n\t\t//}\n\tcase DOCUMENT_FRAGMENT_NODE:\n\t\tbreak;\n\tcase ATTRIBUTE_NODE:\n\t\tdeep = true;\n\t\tbreak;\n\t//case ENTITY_REFERENCE_NODE:\n\t//case PROCESSING_INSTRUCTION_NODE:\n\t////case TEXT_NODE:\n\t//case CDATA_SECTION_NODE:\n\t//case COMMENT_NODE:\n\t//\tdeep = false;\n\t//\tbreak;\n\t//case DOCUMENT_NODE:\n\t//case DOCUMENT_TYPE_NODE:\n\t//cannot be imported.\n\t//case ENTITY_NODE:\n\t//case NOTATION_NODE：\n\t//can not hit in level3\n\t//default:throw e;\n\t}\n\tif(!node2){\n\t\tnode2 = node.cloneNode(false);//false\n\t}\n\tnode2.ownerDocument = doc;\n\tnode2.parentNode = null;\n\tif(deep){\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tnode2.appendChild(importNode(doc,child,deep));\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t}\n\treturn node2;\n}\n//\n//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,\n//\t\t\t\t\tattributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};\nfunction cloneNode(doc,node,deep){\n\tvar node2 = new node.constructor();\n\tfor(var n in node){\n\t\tvar v = node[n];\n\t\tif(typeof v != 'object' ){\n\t\t\tif(v != node2[n]){\n\t\t\t\tnode2[n] = v;\n\t\t\t}\n\t\t}\n\t}\n\tif(node.childNodes){\n\t\tnode2.childNodes = new NodeList();\n\t}\n\tnode2.ownerDocument = doc;\n\tswitch (node2.nodeType) {\n\tcase ELEMENT_NODE:\n\t\tvar attrs\t= node.attributes;\n\t\tvar attrs2\t= node2.attributes = new NamedNodeMap();\n\t\tvar len = attrs.length\n\t\tattrs2._ownerElement = node2;\n\t\tfor(var i=0;i<len;i++){\n\t\t\tnode2.setAttributeNode(cloneNode(doc,attrs.item(i),true));\n\t\t}\n\t\tbreak;;\n\tcase ATTRIBUTE_NODE:\n\t\tdeep = true;\n\t}\n\tif(deep){\n\t\tvar child = node.firstChild;\n\t\twhile(child){\n\t\t\tnode2.appendChild(cloneNode(doc,child,deep));\n\t\t\tchild = child.nextSibling;\n\t\t}\n\t}\n\treturn node2;\n}\n\nfunction __set__(object,key,value){\n\tobject[key] = value\n}\n//do dynamic\ntry{\n\tif(Object.defineProperty){\n\t\tObject.defineProperty(LiveNodeList.prototype,'length',{\n\t\t\tget:function(){\n\t\t\t\t_updateLiveList(this);\n\t\t\t\treturn this.$$length;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(Node.prototype,'textContent',{\n\t\t\tget:function(){\n\t\t\t\treturn getTextContent(this);\n\t\t\t},\n\t\t\tset:function(data){\n\t\t\t\tswitch(this.nodeType){\n\t\t\t\tcase ELEMENT_NODE:\n\t\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\t\t\twhile(this.firstChild){\n\t\t\t\t\t\tthis.removeChild(this.firstChild);\n\t\t\t\t\t}\n\t\t\t\t\tif(data || String(data)){\n\t\t\t\t\t\tthis.appendChild(this.ownerDocument.createTextNode(data));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t//TODO:\n\t\t\t\t\tthis.data = data;\n\t\t\t\t\tthis.value = data;\n\t\t\t\t\tthis.nodeValue = data;\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\t\n\t\tfunction getTextContent(node){\n\t\t\tswitch(node.nodeType){\n\t\t\tcase ELEMENT_NODE:\n\t\t\tcase DOCUMENT_FRAGMENT_NODE:\n\t\t\t\tvar buf = [];\n\t\t\t\tnode = node.firstChild;\n\t\t\t\twhile(node){\n\t\t\t\t\tif(node.nodeType!==7 && node.nodeType !==8){\n\t\t\t\t\t\tbuf.push(getTextContent(node));\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t}\n\t\t\t\treturn buf.join('');\n\t\t\tdefault:\n\t\t\t\treturn node.nodeValue;\n\t\t\t}\n\t\t}\n\t\t__set__ = function(object,key,value){\n\t\t\t//console.log(value)\n\t\t\tobject['$$'+key] = value\n\t\t}\n\t}\n}catch(e){//ie8\n}\n\nif(typeof require == 'function'){\n\texports.DOMImplementation = DOMImplementation;\n\texports.XMLSerializer = XMLSerializer;\n}\n\nfunction DOMParser(options){\n\tthis.options = options ||{locator:{}};\n\t\n}\n\nDOMParser.prototype.parseFromString = function(source,mimeType){\n\tvar options = this.options;\n\tvar sax =  new XMLReader();\n\tvar domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler\n\tvar errorHandler = options.errorHandler;\n\tvar locator = options.locator;\n\tvar defaultNSMap = options.xmlns||{};\n\tvar isHTML = /\\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1;\n  \tvar entityMap = isHTML?htmlEntity.entityMap:{'lt':'<','gt':'>','amp':'&','quot':'\"','apos':\"'\"};\n\tif(locator){\n\t\tdomBuilder.setDocumentLocator(locator)\n\t}\n\t\n\tsax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);\n\tsax.domBuilder = options.domBuilder || domBuilder;\n\tif(isHTML){\n\t\tdefaultNSMap['']= 'http://www.w3.org/1999/xhtml';\n\t}\n\tdefaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace';\n\tif(source){\n\t\tsax.parse(source,defaultNSMap,entityMap);\n\t}else{\n\t\tsax.errorHandler.error(\"invalid doc source\");\n\t}\n\treturn domBuilder.doc;\n}\nfunction buildErrorHandler(errorImpl,domBuilder,locator){\n\tif(!errorImpl){\n\t\tif(domBuilder instanceof DOMHandler){\n\t\t\treturn domBuilder;\n\t\t}\n\t\terrorImpl = domBuilder ;\n\t}\n\tvar errorHandler = {}\n\tvar isCallback = errorImpl instanceof Function;\n\tlocator = locator||{}\n\tfunction build(key){\n\t\tvar fn = errorImpl[key];\n\t\tif(!fn && isCallback){\n\t\t\tfn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;\n\t\t}\n\t\terrorHandler[key] = fn && function(msg){\n\t\t\tfn('[xmldom '+key+']\\t'+msg+_locator(locator));\n\t\t}||function(){};\n\t}\n\tbuild('warning');\n\tbuild('error');\n\tbuild('fatalError');\n\treturn errorHandler;\n}\n\n//console.log('#\\n\\n\\n\\n\\n\\n\\n####')\n/**\n * +ContentHandler+ErrorHandler\n * +LexicalHandler+EntityResolver2\n * -DeclHandler-DTDHandler \n * \n * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler\n * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2\n * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html\n */\nfunction DOMHandler() {\n    this.cdata = false;\n}\nfunction position(locator,node){\n\tnode.lineNumber = locator.lineNumber;\n\tnode.columnNumber = locator.columnNumber;\n}\n/**\n * @see org.xml.sax.ContentHandler#startDocument\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html\n */ \nDOMHandler.prototype = {\n\tstartDocument : function() {\n    \tthis.doc = new DOMImplementation().createDocument(null, null, null);\n    \tif (this.locator) {\n        \tthis.doc.documentURI = this.locator.systemId;\n    \t}\n\t},\n\tstartElement:function(namespaceURI, localName, qName, attrs) {\n\t\tvar doc = this.doc;\n\t    var el = doc.createElementNS(namespaceURI, qName||localName);\n\t    var len = attrs.length;\n\t    appendElement(this, el);\n\t    this.currentElement = el;\n\t    \n\t\tthis.locator && position(this.locator,el)\n\t    for (var i = 0 ; i < len; i++) {\n\t        var namespaceURI = attrs.getURI(i);\n\t        var value = attrs.getValue(i);\n\t        var qName = attrs.getQName(i);\n\t\t\tvar attr = doc.createAttributeNS(namespaceURI, qName);\n\t\t\tthis.locator &&position(attrs.getLocator(i),attr);\n\t\t\tattr.value = attr.nodeValue = value;\n\t\t\tel.setAttributeNode(attr)\n\t    }\n\t},\n\tendElement:function(namespaceURI, localName, qName) {\n\t\tvar current = this.currentElement\n\t\tvar tagName = current.tagName;\n\t\tthis.currentElement = current.parentNode;\n\t},\n\tstartPrefixMapping:function(prefix, uri) {\n\t},\n\tendPrefixMapping:function(prefix) {\n\t},\n\tprocessingInstruction:function(target, data) {\n\t    var ins = this.doc.createProcessingInstruction(target, data);\n\t    this.locator && position(this.locator,ins)\n\t    appendElement(this, ins);\n\t},\n\tignorableWhitespace:function(ch, start, length) {\n\t},\n\tcharacters:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t\t//console.log(chars)\n\t\tif(chars){\n\t\t\tif (this.cdata) {\n\t\t\t\tvar charNode = this.doc.createCDATASection(chars);\n\t\t\t} else {\n\t\t\t\tvar charNode = this.doc.createTextNode(chars);\n\t\t\t}\n\t\t\tif(this.currentElement){\n\t\t\t\tthis.currentElement.appendChild(charNode);\n\t\t\t}else if(/^\\s*$/.test(chars)){\n\t\t\t\tthis.doc.appendChild(charNode);\n\t\t\t\t//process xml\n\t\t\t}\n\t\t\tthis.locator && position(this.locator,charNode)\n\t\t}\n\t},\n\tskippedEntity:function(name) {\n\t},\n\tendDocument:function() {\n\t\tthis.doc.normalize();\n\t},\n\tsetDocumentLocator:function (locator) {\n\t    if(this.locator = locator){// && !('lineNumber' in locator)){\n\t    \tlocator.lineNumber = 0;\n\t    }\n\t},\n\t//LexicalHandler\n\tcomment:function(chars, start, length) {\n\t\tchars = _toString.apply(this,arguments)\n\t    var comm = this.doc.createComment(chars);\n\t    this.locator && position(this.locator,comm)\n\t    appendElement(this, comm);\n\t},\n\t\n\tstartCDATA:function() {\n\t    //used in characters() methods\n\t    this.cdata = true;\n\t},\n\tendCDATA:function() {\n\t    this.cdata = false;\n\t},\n\t\n\tstartDTD:function(name, publicId, systemId) {\n\t\tvar impl = this.doc.implementation;\n\t    if (impl && impl.createDocumentType) {\n\t        var dt = impl.createDocumentType(name, publicId, systemId);\n\t        this.locator && position(this.locator,dt)\n\t        appendElement(this, dt);\n\t    }\n\t},\n\t/**\n\t * @see org.xml.sax.ErrorHandler\n\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t */\n\twarning:function(error) {\n\t\tconsole.warn('[xmldom warning]\\t'+error,_locator(this.locator));\n\t},\n\terror:function(error) {\n\t\tconsole.error('[xmldom error]\\t'+error,_locator(this.locator));\n\t},\n\tfatalError:function(error) {\n\t\tconsole.error('[xmldom fatalError]\\t'+error,_locator(this.locator));\n\t    throw error;\n\t}\n}\nfunction _locator(l){\n\tif(l){\n\t\treturn '\\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'\n\t}\n}\nfunction _toString(chars,start,length){\n\tif(typeof chars == 'string'){\n\t\treturn chars.substr(start,length)\n\t}else{//java sax connect width xmldom on rhino(what about: \"? && !(chars instanceof String)\")\n\t\tif(chars.length >= start+length || start){\n\t\t\treturn new java.lang.String(chars,start,length)+'';\n\t\t}\n\t\treturn chars;\n\t}\n}\n\n/*\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html\n * used method of org.xml.sax.ext.LexicalHandler:\n *  #comment(chars, start, length)\n *  #startCDATA()\n *  #endCDATA()\n *  #startDTD(name, publicId, systemId)\n *\n *\n * IGNORED method of org.xml.sax.ext.LexicalHandler:\n *  #endDTD()\n *  #startEntity(name)\n *  #endEntity(name)\n *\n *\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html\n * IGNORED method of org.xml.sax.ext.DeclHandler\n * \t#attributeDecl(eName, aName, type, mode, value)\n *  #elementDecl(name, model)\n *  #externalEntityDecl(name, publicId, systemId)\n *  #internalEntityDecl(name, value)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html\n * IGNORED method of org.xml.sax.EntityResolver2\n *  #resolveEntity(String name,String publicId,String baseURI,String systemId)\n *  #resolveEntity(publicId, systemId)\n *  #getExternalSubset(name, baseURI)\n * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html\n * IGNORED method of org.xml.sax.DTDHandler\n *  #notationDecl(name, publicId, systemId) {};\n *  #unparsedEntityDecl(name, publicId, systemId, notationName) {};\n */\n\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,function(key){\n\tDOMHandler.prototype[key] = function(){return null}\n})\n\n/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */\nfunction appendElement (hander,node) {\n    if (!hander.currentElement) {\n        hander.doc.appendChild(node);\n    } else {\n        hander.currentElement.appendChild(node);\n    }\n}//appendChild and setAttributeNS are preformance key\n\n\n\thtmlEntity={};\n\thtmlEntity.entityMap=entityMap;\n\n\n\nwindow.Parser = { DOMParser :DOMParser};"
  },
  {
    "path": "public/libs/laya/laya.Alipaymini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,URL=laya.net.URL,Utils=laya.utils.Utils;\n//class laya.ali.mini.ALIMiniAdapter\nvar ALIMiniAdapter=(function(){\n\tfunction ALIMiniAdapter(){}\n\t__class(ALIMiniAdapter,'laya.ali.mini.ALIMiniAdapter');\n\tALIMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tALIMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (ALIMiniAdapter._inited)return;\n\t\tALIMiniAdapter._inited=true;\n\t\tALIMiniAdapter.window=/*__JS__ */window;\n\t\tif(!ALIMiniAdapter.window.hasOwnProperty(\"my\"))\n\t\t\treturn;\n\t\tif(ALIMiniAdapter.window.navigator.userAgent.indexOf('AlipayMiniGame')<0)return;\n\t\tALIMiniAdapter.isZiYu=isSon;\n\t\tALIMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tALIMiniAdapter.EnvConfig={};\n\t\tif(!ALIMiniAdapter.isZiYu){\n\t\t\tMiniFileMgr$6.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$6.existDir(MiniFileMgr$6.fileNativeDir,Handler.create(ALIMiniAdapter,ALIMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tALIMiniAdapter.systemInfo=ALIMiniAdapter.window.my.getSystemInfoSync();\n\t\tALIMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tALIMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tALIMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tALIMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tALIMiniAdapter.window.CanvasRenderingContext2D=function (){};\n\t\tALIMiniAdapter.window.CanvasRenderingContext2D.prototype=ALIMiniAdapter.window.my.createCanvas().getContext('2d').__proto__;\n\t\tALIMiniAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tALIMiniAdapter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=ALIMiniAdapter.pixelRatio;\n\t\tALIMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=ALIMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=ALIMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=ALIMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$6['_createInputElement'];\n\t\tALIMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$6.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$6.prototype._loadImage;\n\t\tLocalStorage._baseClass=MiniLocalStorage$6;\n\t\tMiniLocalStorage$6.__init__();\n\t\tALIMiniAdapter.onReciveData();\n\t\tConfig.useRetinalCanvas=true;\n\t}\n\n\tALIMiniAdapter.onReciveData=function(){\n\t\tif(laya.ali.mini.ALIMiniAdapter.isZiYu){\n\t\t\tALIMiniAdapter.window.my.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$6.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr$6.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$6.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr$6.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tALIMiniAdapter.measureText=function(str){\n\t\tvar tempObj=ALIMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tALIMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tALIMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$6.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$6.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tALIMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$6.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tALIMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$6.deleteAll();\n\t}\n\n\tALIMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$6.isLocalNativeFile(fileUrl);\n\t}\n\n\tALIMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$6.getFileInfo(fileUrl);\n\t}\n\n\tALIMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$6.filesListObj;\n\t}\n\n\tALIMiniAdapter.exitMiniProgram=function(){\n\t\tALIMiniAdapter.window.my.exitMiniProgram();\n\t}\n\n\tALIMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr$6.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr$6.fakeObj=JSON.parse(data.data);\n\t\t}\n\t}\n\n\tALIMiniAdapter.pixelRatio=function(){\n\t\tif (!ALIMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tALIMiniAdapter.EnvConfig.pixelRatioInt=ALIMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn ALIMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn ALIMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tALIMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (ALIMiniAdapter.idx==1){\n\t\t\t\tif(ALIMiniAdapter.isZiYu){\n\t\t\t\t\t_source=ALIMiniAdapter.window.sharedCanvas;\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=ALIMiniAdapter.window.canvas;\n\t\t\t\t\t_source.style={};\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=ALIMiniAdapter.window.my.createCanvas();\n\t\t\t\t_source.style={};\n\t\t\t}\n\t\t\tALIMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn ALIMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=ALIMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn ALIMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tALIMiniAdapter.onCreateInput=function(type){\n\t\tvar node=ALIMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$6.wxinputFocus;\n\t\tnode.blur=MiniInput$6.wxinputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tALIMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tALIMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.ali.mini.ALIMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tALIMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tALIMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$6.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$6.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tALIMiniAdapter.window.my.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tALIMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$6.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$6.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tALIMiniAdapter.window.my.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tALIMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.ali.mini.ALIMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tALIMiniAdapter.window.my.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tALIMiniAdapter.EnvConfig=null;\n\tALIMiniAdapter.window=null;\n\tALIMiniAdapter._preCreateElement=null;\n\tALIMiniAdapter._inited=false;\n\tALIMiniAdapter.systemInfo=null;\n\tALIMiniAdapter.isZiYu=false;\n\tALIMiniAdapter.isPosMsgYu=false;\n\tALIMiniAdapter.autoCacheFile=true;\n\tALIMiniAdapter.minClearSize=(5 *1024 *1024);\n\tALIMiniAdapter.subNativeFiles=null;\n\tALIMiniAdapter.subNativeheads=[];\n\tALIMiniAdapter.subMaps=[];\n\tALIMiniAdapter.AutoCacheDownFile=false;\n\tALIMiniAdapter._measureText=null;\n\tALIMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tALIMiniAdapter.idx=1;\n\t__static(ALIMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\"];}\n\t]);\n\treturn ALIMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.ali.mini.MiniFileMgr\nvar MiniFileMgr$6=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.ali.mini.MiniFileMgr',null,'MiniFileMgr$6');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=ALIMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(ALIMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif(!data.hasOwnProperty(\"statusCode\")){\n\t\t\t\t\tdata.statusCode=200;\n\t\t\t\t}\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(ALIMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif(!data.hasOwnProperty(\"statusCode\")){\n\t\t\t\t\tdata.statusCode=200;\n\t\t\t\t}\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((ALIMiniAdapter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.apFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.apFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.apFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tif(ALIMiniAdapter.window.navigator.userAgent.indexOf('AlipayMiniGame')<0){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > ALIMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tALIMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > ALIMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tALIMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=ALIMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.ali.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.ali.mini.MiniFileMgr.filesListObj && laya.ali.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.ali.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.ali.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.filesListObj[fileurlkey].md5==MiniFileMgr.fakeObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!ALIMiniAdapter.isZiYu &&ALIMiniAdapter.isPosMsgYu && ALIMiniAdapter.window.my.postMessage){\n\t\t\tALIMiniAdapter.window.my.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.error==10025)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tMiniFileMgr.fs.readFile({\n\t\t\t\tfilePath:fileUrl,\n\t\t\t\tencoding:encoding,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tfilesListStr=data.data;\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t\t\t},\n\t\t\t\tfail:function (){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=ALIMiniAdapter.window.my.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=ALIMiniAdapter.window.my.getFileSystemManager();},'wxdown',function(){return this.wxdown=ALIMiniAdapter.window.my.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.ali.mini.MiniImage\nvar MiniImage$6=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.ali.mini.MiniImage',null,'MiniImage$6');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (ALIMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$6.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$6.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$6.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ALIMiniAdapter.subNativeFiles && ALIMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in ALIMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=ALIMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tALIMiniAdapter.subNativeheads=ALIMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tALIMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(ALIMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && ALIMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=ALIMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$6.getFileInfo(url)){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(ALIMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$6.downOtherFiles(encodeURI(url),new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(ALIMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$6.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$6.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(ALIMiniAdapter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr$6.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$6.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tdelete MiniFileMgr$6.filesListObj[sourceUrl];\n\t\t\tdelete MiniFileMgr$6.fakeObj[sourceUrl];\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.ali.mini.MiniInput\nvar MiniInput$6=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.ali.mini.MiniInput',null,'MiniInput$6');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\tALIMiniAdapter.window.my.onWindowResize && ALIMiniAdapter.window.my.onWindowResize(function(res){\n\t\t\tALIMiniAdapter.window.dispatchEvent && ALIMiniAdapter.window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$6;\n\t\tSoundManager._musicClass=MiniSound$6;\n\t\tvar model=ALIMiniAdapter.systemInfo.model;\n\t\tvar system=ALIMiniAdapter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tALIMiniAdapter.window.my.offKeyboardConfirm();\n\t\tALIMiniAdapter.window.my.offKeyboardInput();\n\t\tALIMiniAdapter.window.my.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tALIMiniAdapter.window.my.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.ali.mini.MiniInput.inputEnter(true);\n\t\t})\n\t\tALIMiniAdapter.window.my.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.ali.mini.MiniInput.inputEnter(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(isBool){\n\t\tif(isBool){\n\t\t\tMiniInput.hideKeyboard();\n\t\t}\n\t\tif(!Input['inputElement'].target)\n\t\t\treturn;\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){}\n\tMiniInput.hideKeyboard=function(){\n\t\tALIMiniAdapter.window.my.offKeyboardConfirm();\n\t\tALIMiniAdapter.window.my.offKeyboardInput();\n\t\tALIMiniAdapter.window.my.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.ali.mini.MiniLocalStorage\nvar MiniLocalStorage$6=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.ali.mini.MiniLocalStorage',null,'MiniLocalStorage$6');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\ttry{\n\t\t\tALIMiniAdapter.window.my.setStorageSync({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t\tcatch(error){\n\t\t\tALIMiniAdapter.window.my.setStorage({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\tvar data=ALIMiniAdapter.window.my.getStorageSync({\"key\":key});\n\t\tif (data.success)\n\t\t\treturn data.data;\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,value);\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\treturn MiniLocalStorage.getItem(key);\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\tALIMiniAdapter.window.my.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\tALIMiniAdapter.window.my.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=ALIMiniAdapter.window.my.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.ali.mini.MiniLocation\nvar MiniLocation$6=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.ali.mini.MiniLocation',null,'MiniLocation$6');\n\tMiniLocation.__init__=function(){\n\t\tALIMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tALIMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tALIMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tALIMiniAdapter.window.my.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.ali.mini.MiniVideo\nvar MiniVideo$4=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=ALIMiniAdapter.window.my.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.ali.mini.MiniVideo',null,'MiniVideo$4');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n/**@private **/\n//class laya.ali.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$6=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.ali.mini.MiniAccelerator',_super,'MiniAccelerator$6');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tALIMiniAdapter.window.my.onAccelerometerChange(laya.ali.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tALIMiniAdapter.window.my.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.ali.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$6=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.ali.mini.MiniLoader',_super,'MiniLoader$6');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=ALIMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tALIMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(ALIMiniAdapter.isZiYu && !MiniFileMgr$6.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(ALIMiniAdapter.isZiYu && MiniFileMgr$6.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$6.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$6.getFileInfo(url)){\n\t\t\t\tif (MiniFileMgr$6.isLocalNativeFile(url)){\n\t\t\t\t\tif (ALIMiniAdapter.subNativeFiles && ALIMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in ALIMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=ALIMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tALIMiniAdapter.subNativeheads=ALIMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tALIMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(ALIMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && ALIMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=ALIMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr$6.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(ALIMiniAdapter.window.my.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !ALIMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tALIMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$6.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$6.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tALIMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$6.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$6.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$6.downFiles(encodeURI(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$6.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$6.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$6.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=ALIMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!ALIMiniAdapter.isZiYu &&ALIMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\" && ALIMiniAdapter.window.wx){\n\t\t\t\tALIMiniAdapter.window.my.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tconsole.log(\"-----------本地加载失败，尝试外网加载----\");\n\t\t\tALIMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.ali.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$6=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.ali.mini.MiniSound',_super,'MiniSound$6');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$6.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$6.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$6.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(ALIMiniAdapter.autoCacheFile&&MiniFileMgr$6.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!ALIMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$6.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (ALIMiniAdapter.subNativeFiles && ALIMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in ALIMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=ALIMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tALIMiniAdapter.subNativeheads=ALIMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tALIMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(ALIMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && ALIMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=ALIMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$6.downOtherFiles(url,Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(ALIMiniAdapter.autoCacheFile){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$6.getFileInfo(sourceUrl);\n\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$6.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\tthis._sound.onCanPlay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\tthis._sound.onError(MiniSound.bindToThis(this.onError,this));\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\ttry{\n\t\t\tconsole.log(\"sound error:\"+error);\n\t\t}\n\t\tcatch(error){\n\t\t}\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tthis._sound.offError(null);\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis._sound.offCanPlay(null);\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(ALIMiniAdapter.autoCacheFile&&MiniFileMgr$6.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr$6.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr$6.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=this.url;\n\t\t};\n\t\tvar channel=new MiniSoundChannel$6(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn ALIMiniAdapter.window.my.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.ali.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$6=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onEnded(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.ali.mini.MiniSoundChannel',_super,'MiniSoundChannel$6');\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tthis._audio.offEnded(null);\n\t\tthis._miniSound.dispose();\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',null,function(time){\n\t\tif(this._audio){\n\t\t\tthis._audio.startTime=time;\n\t\t}\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.ani.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Bezier=laya.maths.Bezier,Browser=laya.utils.Browser,Byte=laya.utils.Byte,Event=laya.events.Event;\n\tvar EventDispatcher=laya.events.EventDispatcher,Graphics=laya.display.Graphics,HTMLCanvas=laya.resource.HTMLCanvas;\n\tvar Handler=laya.utils.Handler,Loader=laya.net.Loader,MathUtil=laya.maths.MathUtil,Matrix=laya.maths.Matrix;\n\tvar Node=laya.display.Node,Point=laya.maths.Point,Rectangle=laya.maths.Rectangle,Render=laya.renders.Render;\n\tvar RenderContext=laya.renders.RenderContext,Resource=laya.resource.Resource,RunDriver=laya.utils.RunDriver;\n\tvar SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,Sprite=laya.display.Sprite;\n\tvar Stat=laya.utils.Stat,Texture=laya.resource.Texture,URL=laya.net.URL,Utils=laya.utils.Utils;\n/**\n*@private\n*@author ...\n*/\n//class laya.ani.AnimationContent\nvar AnimationContent=(function(){\n\tfunction AnimationContent(){\n\t\tthis.nodes=null;\n\t\tthis.name=null;\n\t\tthis.playTime=NaN;\n\t\tthis.bone3DMap=null;\n\t\tthis.totalKeyframeDatasLength=0;\n\t}\n\n\t__class(AnimationContent,'laya.ani.AnimationContent');\n\treturn AnimationContent;\n})()\n\n\n/**\n*@private\n*@author ...\n*/\n//class laya.ani.AnimationNodeContent\nvar AnimationNodeContent=(function(){\n\tfunction AnimationNodeContent(){\n\t\tthis.name=null;\n\t\tthis.parentIndex=0;\n\t\tthis.parent=null;\n\t\tthis.keyframeWidth=0;\n\t\tthis.lerpType=0;\n\t\tthis.interpolationMethod=null;\n\t\tthis.childs=null;\n\t\tthis.keyFrame=null;\n\t\t//=new Vector.<KeyFramesContent>;\n\t\tthis.playTime=NaN;\n\t\tthis.extenData=null;\n\t\tthis.dataOffset=0;\n\t}\n\n\t__class(AnimationNodeContent,'laya.ani.AnimationNodeContent');\n\treturn AnimationNodeContent;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.AnimationParser01\nvar AnimationParser01=(function(){\n\tfunction AnimationParser01(){}\n\t__class(AnimationParser01,'laya.ani.AnimationParser01');\n\tAnimationParser01.parse=function(templet,reader){\n\t\tvar data=reader.__getBuffer();\n\t\tvar i=0,j=0,k=0,n=0,l=0,m=0,o=0;\n\t\tvar aniClassName=reader.readUTFString();\n\t\ttemplet._aniClassName=aniClassName;\n\t\tvar strList=reader.readUTFString().split(\"\\n\");\n\t\tvar aniCount=reader.getUint8();\n\t\tvar publicDataPos=reader.getUint32();\n\t\tvar publicExtDataPos=reader.getUint32();\n\t\tvar publicData;\n\t\tif (publicDataPos > 0)\n\t\t\tpublicData=data.slice(publicDataPos,publicExtDataPos);\n\t\tvar publicRead=new Byte(publicData);\n\t\tif (publicExtDataPos > 0)\n\t\t\ttemplet._publicExtData=data.slice(publicExtDataPos,data.byteLength);\n\t\ttemplet._useParent=!!reader.getUint8();\n\t\ttemplet._anis.length=aniCount;\n\t\tfor (i=0;i < aniCount;i++){\n\t\t\tvar ani=templet._anis[i]=new AnimationContent();\n\t\t\t{};\n\t\t\tani.nodes=new Array;\n\t\t\tvar name=ani.name=strList[reader.getUint16()];\n\t\t\ttemplet._aniMap[name]=i;\n\t\t\tani.bone3DMap={};\n\t\t\tani.playTime=reader.getFloat32();\n\t\t\tvar boneCount=ani.nodes.length=reader.getUint8();\n\t\t\tani.totalKeyframeDatasLength=0;\n\t\t\tfor (j=0;j < boneCount;j++){\n\t\t\t\tvar node=ani.nodes[j]=new AnimationNodeContent();\n\t\t\t\t{};\n\t\t\t\tnode.childs=[];\n\t\t\t\tvar nameIndex=reader.getInt16();\n\t\t\t\tif (nameIndex >=0){\n\t\t\t\t\tnode.name=strList[nameIndex];\n\t\t\t\t\tani.bone3DMap[node.name]=j;\n\t\t\t\t}\n\t\t\t\tnode.keyFrame=new Array;\n\t\t\t\tnode.parentIndex=reader.getInt16();\n\t\t\t\tnode.parentIndex==-1 ? node.parent=null :node.parent=ani.nodes[node.parentIndex]\n\t\t\t\tnode.lerpType=reader.getUint8();\n\t\t\t\tvar keyframeParamsOffset=reader.getUint32();\n\t\t\t\tpublicRead.pos=keyframeParamsOffset;\n\t\t\t\tvar keyframeDataCount=node.keyframeWidth=publicRead.getUint16();\n\t\t\t\tani.totalKeyframeDatasLength+=keyframeDataCount;\n\t\t\t\tif (node.lerpType===0 || node.lerpType===1){\n\t\t\t\t\tnode.interpolationMethod=[];\n\t\t\t\t\tnode.interpolationMethod.length=keyframeDataCount;\n\t\t\t\t\tfor (k=0;k < keyframeDataCount;k++)\n\t\t\t\t\tnode.interpolationMethod[k]=AnimationTemplet.interpolation[publicRead.getUint8()];\n\t\t\t\t}\n\t\t\t\tif (node.parent !=null)\n\t\t\t\t\tnode.parent.childs.push(node);\n\t\t\t\tvar privateDataLen=reader.getUint16();\n\t\t\t\tif (privateDataLen > 0){\n\t\t\t\t\tnode.extenData=data.slice(reader.pos,reader.pos+privateDataLen);\n\t\t\t\t\treader.pos+=privateDataLen;\n\t\t\t\t};\n\t\t\t\tvar keyframeCount=reader.getUint16();\n\t\t\t\tnode.keyFrame.length=keyframeCount;\n\t\t\t\tvar startTime=0;\n\t\t\t\tvar keyFrame;\n\t\t\t\tfor (k=0,n=keyframeCount;k < n;k++){\n\t\t\t\t\tkeyFrame=node.keyFrame[k]=new KeyFramesContent();\n\t\t\t\t\t{};\n\t\t\t\t\tkeyFrame.duration=reader.getFloat32();\n\t\t\t\t\tkeyFrame.startTime=startTime;\n\t\t\t\t\tif (node.lerpType===2){\n\t\t\t\t\t\tkeyFrame.interpolationData=[];\n\t\t\t\t\t\tvar interDataLength=reader.getUint8();\n\t\t\t\t\t\tvar lerpType=0;\n\t\t\t\t\t\tlerpType=reader.getFloat32();\n\t\t\t\t\t\tswitch (lerpType){\n\t\t\t\t\t\t\tcase 254:\n\t\t\t\t\t\t\t\tkeyFrame.interpolationData.length=keyframeDataCount;\n\t\t\t\t\t\t\t\tfor (o=0;o < keyframeDataCount;o++)\n\t\t\t\t\t\t\t\tkeyFrame.interpolationData[o]=0;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase 255:\n\t\t\t\t\t\t\t\tkeyFrame.interpolationData.length=keyframeDataCount;\n\t\t\t\t\t\t\t\tfor (o=0;o < keyframeDataCount;o++)\n\t\t\t\t\t\t\t\tkeyFrame.interpolationData[o]=5;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tkeyFrame.interpolationData.push(lerpType);\n\t\t\t\t\t\t\t\tfor (m=1;m < interDataLength;m++){\n\t\t\t\t\t\t\t\t\tkeyFrame.interpolationData.push(reader.getFloat32());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tkeyFrame.data=new Float32Array(keyframeDataCount);\n\t\t\t\t\tfor (l=0;l < keyframeDataCount;l++){\n\t\t\t\t\t\tkeyFrame.data[l]=reader.getFloat32();\n\t\t\t\t\t\tif (keyFrame.data[l] >-0.00000001 && keyFrame.data[l] < 0.00000001)keyFrame.data[l]=0;\n\t\t\t\t\t}\n\t\t\t\t\tstartTime+=keyFrame.duration;\n\t\t\t\t}\n\t\t\t\tkeyFrame.startTime=ani.playTime;\n\t\t\t\tnode.playTime=ani.playTime;\n\t\t\t\ttemplet._calculateKeyFrame(node,keyframeCount,keyframeDataCount);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn AnimationParser01;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.AnimationParser02\nvar AnimationParser02=(function(){\n\tfunction AnimationParser02(){}\n\t__class(AnimationParser02,'laya.ani.AnimationParser02');\n\tAnimationParser02.READ_DATA=function(){\n\t\tAnimationParser02._DATA.offset=AnimationParser02._reader.getUint32();\n\t\tAnimationParser02._DATA.size=AnimationParser02._reader.getUint32();\n\t}\n\n\tAnimationParser02.READ_BLOCK=function(){\n\t\tvar count=AnimationParser02._BLOCK.count=AnimationParser02._reader.getUint16();\n\t\tvar blockStarts=AnimationParser02._BLOCK.blockStarts=[];\n\t\tvar blockLengths=AnimationParser02._BLOCK.blockLengths=[];\n\t\tfor (var i=0;i < count;i++){\n\t\t\tblockStarts.push(AnimationParser02._reader.getUint32());\n\t\t\tblockLengths.push(AnimationParser02._reader.getUint32());\n\t\t}\n\t}\n\n\tAnimationParser02.READ_STRINGS=function(){\n\t\tvar offset=AnimationParser02._reader.getUint32();\n\t\tvar count=AnimationParser02._reader.getUint16();\n\t\tvar prePos=AnimationParser02._reader.pos;\n\t\tAnimationParser02._reader.pos=offset+AnimationParser02._DATA.offset;\n\t\tfor (var i=0;i < count;i++)\n\t\tAnimationParser02._strings[i]=AnimationParser02._reader.readUTFString();\n\t\tAnimationParser02._reader.pos=prePos;\n\t}\n\n\tAnimationParser02.parse=function(templet,reader){\n\t\tAnimationParser02._templet=templet;\n\t\tAnimationParser02._reader=reader;\n\t\tvar arrayBuffer=reader.__getBuffer();\n\t\tAnimationParser02.READ_DATA();\n\t\tAnimationParser02.READ_BLOCK();\n\t\tAnimationParser02.READ_STRINGS();\n\t\tfor (var i=0,n=AnimationParser02._BLOCK.count;i < n;i++){\n\t\t\tvar index=reader.getUint16();\n\t\t\tvar blockName=AnimationParser02._strings[index];\n\t\t\tvar fn=AnimationParser02[\"READ_\"+blockName];\n\t\t\tif (fn==null)\n\t\t\t\tthrow new Error(\"model file err,no this function:\"+index+\" \"+blockName);\n\t\t\telse\n\t\t\tfn.call();\n\t\t}\n\t}\n\n\tAnimationParser02.READ_ANIMATIONS=function(){\n\t\tvar reader=AnimationParser02._reader;\n\t\tvar arrayBuffer=reader.__getBuffer();\n\t\tvar i=0,j=0,k=0,n=0,l=0;\n\t\tvar keyframeWidth=reader.getUint16();\n\t\tvar interpolationMethod=[];\n\t\tinterpolationMethod.length=keyframeWidth;\n\t\tfor (i=0;i < keyframeWidth;i++)\n\t\tinterpolationMethod[i]=AnimationTemplet.interpolation[reader.getByte()];\n\t\tvar aniCount=reader.getUint8();\n\t\tAnimationParser02._templet._anis.length=aniCount;\n\t\tfor (i=0;i < aniCount;i++){\n\t\t\tvar ani=AnimationParser02._templet._anis[i]=\n\t\t\t{};\n\t\t\tani.nodes=new Array;\n\t\t\tvar aniName=ani.name=AnimationParser02._strings[reader.getUint16()];\n\t\t\tAnimationParser02._templet._aniMap[aniName]=i;\n\t\t\tani.bone3DMap={};\n\t\t\tani.playTime=reader.getFloat32();\n\t\t\tvar boneCount=ani.nodes.length=reader.getInt16();\n\t\t\tani.totalKeyframeDatasLength=0;\n\t\t\tfor (j=0;j < boneCount;j++){\n\t\t\t\tvar node=ani.nodes[j]=\n\t\t\t\t{};\n\t\t\t\tnode.keyframeWidth=keyframeWidth;\n\t\t\t\tnode.childs=[];\n\t\t\t\tvar nameIndex=reader.getUint16();\n\t\t\t\tif (nameIndex >=0){\n\t\t\t\t\tnode.name=AnimationParser02._strings[nameIndex];\n\t\t\t\t\tani.bone3DMap[node.name]=j;\n\t\t\t\t}\n\t\t\t\tnode.keyFrame=new Array;\n\t\t\t\tnode.parentIndex=reader.getInt16();\n\t\t\t\tnode.parentIndex==-1 ? node.parent=null :node.parent=ani.nodes[node.parentIndex]\n\t\t\t\tani.totalKeyframeDatasLength+=keyframeWidth;\n\t\t\t\tnode.interpolationMethod=interpolationMethod;\n\t\t\t\tif (node.parent !=null)\n\t\t\t\t\tnode.parent.childs.push(node);\n\t\t\t\tvar keyframeCount=reader.getUint16();\n\t\t\t\tnode.keyFrame.length=keyframeCount;\n\t\t\t\tvar keyFrame=null,lastKeyFrame=null;\n\t\t\t\tfor (k=0,n=keyframeCount;k < n;k++){\n\t\t\t\t\tkeyFrame=node.keyFrame[k]=\n\t\t\t\t\t{};\n\t\t\t\t\tkeyFrame.startTime=reader.getFloat32();\n\t\t\t\t\t(lastKeyFrame)&& (lastKeyFrame.duration=keyFrame.startTime-lastKeyFrame.startTime);\n\t\t\t\t\tvar offset=AnimationParser02._DATA.offset;\n\t\t\t\t\tvar keyframeDataOffset=reader.getUint32();\n\t\t\t\t\tvar keyframeDataLength=keyframeWidth *4;\n\t\t\t\t\tvar keyframeArrayBuffer=arrayBuffer.slice(offset+keyframeDataOffset,offset+keyframeDataOffset+keyframeDataLength);\n\t\t\t\t\tkeyFrame.data=new Float32Array(keyframeArrayBuffer);\n\t\t\t\t\tlastKeyFrame=keyFrame;\n\t\t\t\t}\n\t\t\t\tkeyFrame.duration=0;\n\t\t\t\tnode.playTime=ani.playTime;\n\t\t\t\tAnimationParser02._templet._calculateKeyFrame(node,keyframeCount,keyframeWidth);\n\t\t\t}\n\t\t}\n\t}\n\n\tAnimationParser02._templet=null;\n\tAnimationParser02._reader=null;\n\tAnimationParser02._strings=[];\n\t__static(AnimationParser02,\n\t['_BLOCK',function(){return this._BLOCK={count:0};},'_DATA',function(){return this._DATA={offset:0,size:0};}\n\t]);\n\treturn AnimationParser02;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.AnimationState\nvar AnimationState=(function(){\n\tfunction AnimationState(){}\n\t__class(AnimationState,'laya.ani.AnimationState');\n\tAnimationState.stopped=0;\n\tAnimationState.paused=1;\n\tAnimationState.playing=2;\n\treturn AnimationState;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.Bone\nvar Bone=(function(){\n\tfunction Bone(){\n\t\tthis.name=null;\n\t\tthis.root=null;\n\t\tthis.parentBone=null;\n\t\tthis.length=10;\n\t\tthis.transform=null;\n\t\tthis.inheritScale=true;\n\t\tthis.inheritRotation=true;\n\t\tthis.rotation=NaN;\n\t\tthis.resultRotation=NaN;\n\t\tthis.d=-1;\n\t\tthis._tempMatrix=null;\n\t\tthis._sprite=null;\n\t\tthis.resultTransform=new Transform();\n\t\tthis.resultMatrix=new Matrix();\n\t\tthis._children=[];\n\t}\n\n\t__class(Bone,'laya.ani.bone.Bone');\n\tvar __proto=Bone.prototype;\n\t__proto.setTempMatrix=function(matrix){\n\t\tthis._tempMatrix=matrix;\n\t\tvar i=0,n=0;\n\t\tvar tBone;\n\t\tfor (i=0,n=this._children.length;i < n;i++){\n\t\t\ttBone=this._children[i];\n\t\t\ttBone.setTempMatrix(this._tempMatrix);\n\t\t}\n\t}\n\n\t__proto.update=function(pMatrix){\n\t\tthis.rotation=this.transform.skX;\n\t\tvar tResultMatrix;\n\t\tif (pMatrix){\n\t\t\ttResultMatrix=this.resultTransform.getMatrix();\n\t\t\tMatrix.mul(tResultMatrix,pMatrix,this.resultMatrix);\n\t\t\tthis.resultRotation=this.rotation;\n\t\t}\n\t\telse {\n\t\t\tthis.resultRotation=this.rotation+this.parentBone.resultRotation;\n\t\t\tif (this.parentBone){\n\t\t\t\tif (this.inheritRotation && this.inheritScale){\n\t\t\t\t\ttResultMatrix=this.resultTransform.getMatrix();\n\t\t\t\t\tMatrix.mul(tResultMatrix,this.parentBone.resultMatrix,this.resultMatrix);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvar temp=0;\n\t\t\t\t\tvar parent=this.parentBone;\n\t\t\t\t\tvar tAngle=NaN;\n\t\t\t\t\tvar cos=NaN;\n\t\t\t\t\tvar sin=NaN;\n\t\t\t\t\tvar tParentMatrix=this.parentBone.resultMatrix;\n\t\t\t\t\ttResultMatrix=this.resultTransform.getMatrix();\n\t\t\t\t\tvar worldX=tParentMatrix.a *tResultMatrix.tx+tParentMatrix.c *tResultMatrix.ty+tParentMatrix.tx;\n\t\t\t\t\tvar worldY=tParentMatrix.b *tResultMatrix.tx+tParentMatrix.d *tResultMatrix.ty+tParentMatrix.ty;\n\t\t\t\t\tvar tTestMatrix=new Matrix();\n\t\t\t\t\tif (this.inheritRotation){\n\t\t\t\t\t\ttAngle=Math.atan2(parent.resultMatrix.b,parent.resultMatrix.a);\n\t\t\t\t\t\tcos=Math.cos(tAngle),sin=Math.sin(tAngle);\n\t\t\t\t\t\ttTestMatrix.setTo(cos,sin,-sin,cos,0,0);\n\t\t\t\t\t\tMatrix.mul(this._tempMatrix,tTestMatrix,Matrix.TEMP);\n\t\t\t\t\t\tMatrix.TEMP.copyTo(tTestMatrix);\n\t\t\t\t\t\ttResultMatrix=this.resultTransform.getMatrix();\n\t\t\t\t\t\tMatrix.mul(tResultMatrix,tTestMatrix,this.resultMatrix);\n\t\t\t\t\t\tif (this.resultTransform.scX *this.resultTransform.scY < 0){\n\t\t\t\t\t\t\tthis.resultMatrix.rotate(Math.PI*0.5);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.resultMatrix.tx=worldX;\n\t\t\t\t\t\tthis.resultMatrix.ty=worldY;\n\t\t\t\t\t}\n\t\t\t\t\telse if (this.inheritScale){\n\t\t\t\t\t\ttResultMatrix=this.resultTransform.getMatrix();\n\t\t\t\t\t\tMatrix.TEMP.identity();\n\t\t\t\t\t\tMatrix.TEMP.d=this.d;\n\t\t\t\t\t\tMatrix.mul(tResultMatrix,Matrix.TEMP,this.resultMatrix);\n\t\t\t\t\t\tthis.resultMatrix.tx=worldX;\n\t\t\t\t\t\tthis.resultMatrix.ty=worldY;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttResultMatrix=this.resultTransform.getMatrix();\n\t\t\t\t\t\tMatrix.TEMP.identity();\n\t\t\t\t\t\tMatrix.TEMP.d=this.d;\n\t\t\t\t\t\tMatrix.mul(tResultMatrix,Matrix.TEMP,this.resultMatrix);\n\t\t\t\t\t\tthis.resultMatrix.tx=worldX;\n\t\t\t\t\t\tthis.resultMatrix.ty=worldY;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttResultMatrix=this.resultTransform.getMatrix();\n\t\t\t\ttResultMatrix.copyTo(this.resultMatrix);\n\t\t\t}\n\t\t};\n\t\tvar i=0,n=0;\n\t\tvar tBone;\n\t\tfor (i=0,n=this._children.length;i < n;i++){\n\t\t\ttBone=this._children[i];\n\t\t\ttBone.update();\n\t\t}\n\t}\n\n\t__proto.updateChild=function(){\n\t\tvar i=0,n=0;\n\t\tvar tBone;\n\t\tfor (i=0,n=this._children.length;i < n;i++){\n\t\t\ttBone=this._children[i];\n\t\t\ttBone.update();\n\t\t}\n\t}\n\n\t__proto.setRotation=function(rd){\n\t\tif (this._sprite){\n\t\t\tthis._sprite.rotation=rd *180 / Math.PI;\n\t\t}\n\t}\n\n\t__proto.updateDraw=function(x,y){\n\t\tif (!Bone.ShowBones || Bone.ShowBones[this.name]){\n\t\t\tif (this._sprite){\n\t\t\t\tthis._sprite.x=x+this.resultMatrix.tx;\n\t\t\t\tthis._sprite.y=y+this.resultMatrix.ty;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._sprite=new Sprite();\n\t\t\t\tthis._sprite.graphics.drawCircle(0,0,5,\"#ff0000\");\n\t\t\t\tthis._sprite.graphics.drawLine(0,0,this.length,0,\"#00ff00\");\n\t\t\t\tthis._sprite.graphics.fillText(this.name,0,0,\"20px Arial\",\"#00ff00\",\"center\");\n\t\t\t\tLaya.stage.addChild(this._sprite);\n\t\t\t\tthis._sprite.x=x+this.resultMatrix.tx;\n\t\t\t\tthis._sprite.y=y+this.resultMatrix.ty;\n\t\t\t}\n\t\t};\n\t\tvar i=0,n=0;\n\t\tvar tBone;\n\t\tfor (i=0,n=this._children.length;i < n;i++){\n\t\t\ttBone=this._children[i];\n\t\t\ttBone.updateDraw(x,y);\n\t\t}\n\t}\n\n\t__proto.addChild=function(bone){\n\t\tthis._children.push(bone);\n\t\tbone.parentBone=this;\n\t}\n\n\t__proto.findBone=function(boneName){\n\t\tif (this.name==boneName){\n\t\t\treturn this;\n\t\t}\n\t\telse {\n\t\t\tvar i=0,n=0;\n\t\t\tvar tBone;\n\t\t\tvar tResult;\n\t\t\tfor (i=0,n=this._children.length;i < n;i++){\n\t\t\t\ttBone=this._children[i];\n\t\t\t\ttResult=tBone.findBone(boneName);\n\t\t\t\tif (tResult){\n\t\t\t\t\treturn tResult;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t__proto.localToWorld=function(local){\n\t\tvar localX=local[0];\n\t\tvar localY=local[1];\n\t\tlocal[0]=localX *this.resultMatrix.a+localY *this.resultMatrix.c+this.resultMatrix.tx;\n\t\tlocal[1]=localX *this.resultMatrix.b+localY *this.resultMatrix.d+this.resultMatrix.ty;\n\t}\n\n\tBone.ShowBones={};\n\treturn Bone;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.BoneSlot\nvar BoneSlot=(function(){\n\tfunction BoneSlot(){\n\t\t/**插槽名称 */\n\t\tthis.name=null;\n\t\t/**插槽绑定的骨骼名称 */\n\t\tthis.parent=null;\n\t\t/**插糟显示数据数据的名称 */\n\t\tthis.attachmentName=null;\n\t\t/**原始数据的索引 */\n\t\tthis.srcDisplayIndex=-1;\n\t\t/**判断对象是否是原对象 */\n\t\tthis.type=\"src\";\n\t\t/**模板的指针 */\n\t\tthis.templet=null;\n\t\t/**当前插槽对应的数据 */\n\t\tthis.currSlotData=null;\n\t\t/**当前插槽显示的纹理 */\n\t\tthis.currTexture=null;\n\t\t/**显示对象对应的数据 */\n\t\tthis.currDisplayData=null;\n\t\t/**显示皮肤的索引 */\n\t\tthis.displayIndex=-1;\n\t\t/**@private */\n\t\tthis.originalIndex=-1;\n\t\t/**用户自定义的皮肤 */\n\t\tthis._diyTexture=null;\n\t\tthis._parentMatrix=null;\n\t\tthis._resultMatrix=null;\n\t\t/**索引替换表 */\n\t\tthis._replaceDic={};\n\t\t/**当前diyTexture的动画纹理 */\n\t\tthis._curDiyUV=null;\n\t\tthis._curDiyVS=null;\n\t\t/**实时模式下，复用使用 */\n\t\tthis._skinSprite=null;\n\t\t/**@private 变形动画数据 */\n\t\tthis.deformData=null;\n\t\tthis._mVerticleArr=null;\n\t}\n\n\t__class(BoneSlot,'laya.ani.bone.BoneSlot');\n\tvar __proto=BoneSlot.prototype;\n\t/**\n\t*设置要显示的插槽数据\n\t*@param slotData\n\t*@param disIndex\n\t*@param freshIndex 是否重置纹理\n\t*/\n\t__proto.showSlotData=function(slotData,freshIndex){\n\t\t(freshIndex===void 0)&& (freshIndex=true);\n\t\tthis.currSlotData=slotData;\n\t\tif(freshIndex)\n\t\t\tthis.displayIndex=this.srcDisplayIndex;\n\t\tthis.currDisplayData=null;\n\t\tthis.currTexture=null;\n\t}\n\n\t/**\n\t*通过名字显示指定对象\n\t*@param name\n\t*/\n\t__proto.showDisplayByName=function(name){\n\t\tif (this.currSlotData){\n\t\t\tthis.showDisplayByIndex(this.currSlotData.getDisplayByName(name));\n\t\t}\n\t}\n\n\t/**\n\t*替换贴图名\n\t*@param tarName 要替换的贴图名\n\t*@param newName 替换后的贴图名\n\t*/\n\t__proto.replaceDisplayByName=function(tarName,newName){\n\t\tif (!this.currSlotData)return;\n\t\tvar preIndex=0;\n\t\tpreIndex=this.currSlotData.getDisplayByName(tarName);\n\t\tvar newIndex=0;\n\t\tnewIndex=this.currSlotData.getDisplayByName(newName);\n\t\tthis.replaceDisplayByIndex(preIndex,newIndex);\n\t}\n\n\t/**\n\t*替换贴图索引\n\t*@param tarIndex 要替换的索引\n\t*@param newIndex 替换后的索引\n\t*/\n\t__proto.replaceDisplayByIndex=function(tarIndex,newIndex){\n\t\tif (!this.currSlotData)return;\n\t\tthis._replaceDic[tarIndex]=newIndex;\n\t\tif (this.originalIndex==tarIndex){\n\t\t\tthis.showDisplayByIndex(tarIndex);\n\t\t}\n\t}\n\n\t/**\n\t*指定显示对象\n\t*@param index\n\t*/\n\t__proto.showDisplayByIndex=function(index){\n\t\tthis.originalIndex=index;\n\t\tif (this._replaceDic[index]!=null)index=this._replaceDic[index];\n\t\tif (this.currSlotData && index >-1 && index < this.currSlotData.displayArr.length){\n\t\t\tthis.displayIndex=index;\n\t\t\tthis.currDisplayData=this.currSlotData.displayArr[index];\n\t\t\tif (this.currDisplayData){\n\t\t\t\tvar tName=this.currDisplayData.name;\n\t\t\t\tthis.currTexture=this.templet.getTexture(tName);\n\t\t\t\tif (this.currTexture && this.currDisplayData.type==0 && this.currDisplayData.uvs && (!Render.isConchApp || (Render.isConchApp && Sprite.RUNTIMEVERION > \"0.9.15\"))){\n\t\t\t\t\tthis.currTexture=this.currDisplayData.createTexture(this.currTexture);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis.displayIndex=-1;\n\t\t\tthis.currDisplayData=null;\n\t\t\tthis.currTexture=null;\n\t\t}\n\t}\n\n\t/**\n\t*替换皮肤\n\t*@param _texture\n\t*/\n\t__proto.replaceSkin=function(_texture){\n\t\tthis._diyTexture=_texture;\n\t\tif (this._curDiyUV)this._curDiyUV.length=0;\n\t\tif (this.currDisplayData&&this._diyTexture==this.currDisplayData.texture){\n\t\t\tthis._diyTexture=null;\n\t\t}\n\t}\n\n\t/**\n\t*保存父矩阵的索引\n\t*@param parentMatrix\n\t*/\n\t__proto.setParentMatrix=function(parentMatrix){\n\t\tthis._parentMatrix=parentMatrix;\n\t}\n\n\t/**\n\t*把纹理画到Graphics上\n\t*@param graphics\n\t*@param noUseSave\n\t*/\n\t__proto.draw=function(graphics,boneMatrixArray,noUseSave,alpha){\n\t\t(noUseSave===void 0)&& (noUseSave=false);\n\t\t(alpha===void 0)&& (alpha=1);\n\t\tif ((this._diyTexture==null && this.currTexture==null)|| this.currDisplayData==null){\n\t\t\tif (!(this.currDisplayData && this.currDisplayData.type==3)){\n\t\t\t\treturn;\n\t\t\t}\n\t\t};\n\t\tvar tTexture=this.currTexture;\n\t\tif (this._diyTexture)tTexture=this._diyTexture;\n\t\tvar tSkinSprite;\n\t\tswitch (this.currDisplayData.type){\n\t\t\tcase 0:\n\t\t\t\tif (graphics){\n\t\t\t\t\tvar tCurrentMatrix=this.getDisplayMatrix();\n\t\t\t\t\tif (this._parentMatrix){\n\t\t\t\t\t\tvar tRotateKey=false;\n\t\t\t\t\t\tif (tCurrentMatrix){\n\t\t\t\t\t\t\tMatrix.mul(tCurrentMatrix,this._parentMatrix,Matrix.TEMP);\n\t\t\t\t\t\t\tvar tResultMatrix;\n\t\t\t\t\t\t\tif (noUseSave){\n\t\t\t\t\t\t\t\tif (this._resultMatrix==null)this._resultMatrix=new Matrix();\n\t\t\t\t\t\t\t\ttResultMatrix=this._resultMatrix;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\ttResultMatrix=new Matrix();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ((!Render.isWebGL && this.currDisplayData.uvs)|| (Render.isWebGL && this._diyTexture && this.currDisplayData.uvs)){\n\t\t\t\t\t\t\t\tvar tTestMatrix=BoneSlot._tempMatrix;\n\t\t\t\t\t\t\t\ttTestMatrix.identity();\n\t\t\t\t\t\t\t\tif (this.currDisplayData.uvs[1] > this.currDisplayData.uvs[5]){\n\t\t\t\t\t\t\t\t\ttTestMatrix.d=-1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (this.currDisplayData.uvs[0] > this.currDisplayData.uvs[4]\n\t\t\t\t\t\t\t\t\t&& this.currDisplayData.uvs[1] > this.currDisplayData.uvs[5]){\n\t\t\t\t\t\t\t\t\ttRotateKey=true;\n\t\t\t\t\t\t\t\t\ttTestMatrix.rotate(-Math.PI/2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tMatrix.mul(tTestMatrix,Matrix.TEMP,tResultMatrix);\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tMatrix.TEMP.copyTo(tResultMatrix);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (tRotateKey){\n\t\t\t\t\t\t\t\tgraphics.drawTexture(tTexture,-this.currDisplayData.height / 2,-this.currDisplayData.width / 2,this.currDisplayData.height,this.currDisplayData.width,tResultMatrix);\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tgraphics.drawTexture(tTexture,-this.currDisplayData.width / 2,-this.currDisplayData.height / 2,this.currDisplayData.width,this.currDisplayData.height,tResultMatrix);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tif (noUseSave){\n\t\t\t\t\tif (this._skinSprite==null){\n\t\t\t\t\t\tthis._skinSprite=BoneSlot.createSkinMesh();\n\t\t\t\t\t}\n\t\t\t\t\ttSkinSprite=this._skinSprite;\n\t\t\t\t\t}else {\n\t\t\t\t\ttSkinSprite=BoneSlot.createSkinMesh();\n\t\t\t\t}\n\t\t\t\tif (tSkinSprite==null){\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tIBArray;\n\t\t\t\tvar tRed=1;\n\t\t\t\tvar tGreed=1;\n\t\t\t\tvar tBlue=1;\n\t\t\t\tvar tAlpha=1;\n\t\t\t\tif (this.currDisplayData.bones==null){\n\t\t\t\t\tvar tVertices=this.currDisplayData.weights;\n\t\t\t\t\tif (this.deformData){\n\t\t\t\t\t\ttVertices=this.deformData;\n\t\t\t\t\t};\n\t\t\t\t\tvar tUVs;\n\t\t\t\t\tif (this._diyTexture){\n\t\t\t\t\t\tif (!this._curDiyUV){\n\t\t\t\t\t\t\tthis._curDiyUV=[];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this._curDiyUV.length==0){\n\t\t\t\t\t\t\tthis._curDiyUV=UVTools.getRelativeUV(this.currTexture.uv,this.currDisplayData.uvs,this._curDiyUV);\n\t\t\t\t\t\t\tthis._curDiyUV=UVTools.getAbsoluteUV(this._diyTexture.uv,this._curDiyUV,this._curDiyUV);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttUVs=this._curDiyUV;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\ttUVs=this.currDisplayData.uvs;\n\t\t\t\t\t}\n\t\t\t\t\tthis._mVerticleArr=tVertices;\n\t\t\t\t\tvar tTriangleNum=this.currDisplayData.triangles.length / 3;\n\t\t\t\t\ttIBArray=this.currDisplayData.triangles;\n\t\t\t\t\ttSkinSprite.init2(tTexture,null ,tIBArray,this._mVerticleArr,tUVs);\n\t\t\t\t\tvar tCurrentMatrix2=this.getDisplayMatrix();\n\t\t\t\t\tif (this._parentMatrix){\n\t\t\t\t\t\tif (tCurrentMatrix2){\n\t\t\t\t\t\t\tMatrix.mul(tCurrentMatrix2,this._parentMatrix,Matrix.TEMP);\n\t\t\t\t\t\t\tvar tResultMatrix2;\n\t\t\t\t\t\t\tif (noUseSave){\n\t\t\t\t\t\t\t\tif (this._resultMatrix==null)this._resultMatrix=new Matrix();\n\t\t\t\t\t\t\t\ttResultMatrix2=this._resultMatrix;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\ttResultMatrix2=new Matrix();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tMatrix.TEMP.copyTo(tResultMatrix2);\n\t\t\t\t\t\t\ttSkinSprite.transform=tResultMatrix2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tthis.skinMesh(boneMatrixArray,tSkinSprite,alpha);\n\t\t\t\t}\n\t\t\t\tgraphics.drawSkin(tSkinSprite);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (noUseSave){\n\t\t\t\t\tif (this._skinSprite==null){\n\t\t\t\t\t\tthis._skinSprite=BoneSlot.createSkinMesh();\n\t\t\t\t\t}\n\t\t\t\t\ttSkinSprite=this._skinSprite;\n\t\t\t\t\t}else {\n\t\t\t\t\ttSkinSprite=BoneSlot.createSkinMesh();\n\t\t\t\t}\n\t\t\t\tif (tSkinSprite==null){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.skinMesh(boneMatrixArray,tSkinSprite,alpha);\n\t\t\t\tgraphics.drawSkin(tSkinSprite);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t/**\n\t*显示蒙皮动画\n\t*@param boneMatrixArray 当前帧的骨骼矩阵\n\t*/\n\t__proto.skinMesh=function(boneMatrixArray,skinSprite,alpha){\n\t\tvar tTexture=this.currTexture;\n\t\tvar tBones=this.currDisplayData.bones;\n\t\tvar tUvs;\n\t\tif (this._diyTexture){\n\t\t\ttTexture=this._diyTexture;\n\t\t\tif (!this._curDiyUV){\n\t\t\t\tthis._curDiyUV=[];\n\t\t\t}\n\t\t\tif (this._curDiyUV.length==0){\n\t\t\t\tthis._curDiyUV=UVTools.getRelativeUV(this.currTexture.uv,this.currDisplayData.uvs,this._curDiyUV);\n\t\t\t\tthis._curDiyUV=UVTools.getAbsoluteUV(this._diyTexture.uv,this._curDiyUV,this._curDiyUV);\n\t\t\t}\n\t\t\ttUvs=this._curDiyUV;\n\t\t\t}else{\n\t\t\ttUvs=this.currDisplayData.uvs;\n\t\t};\n\t\tvar tWeights=this.currDisplayData.weights;\n\t\tvar tTriangles=this.currDisplayData.triangles;\n\t\tvar tIBArray;\n\t\tvar tRx=0;\n\t\tvar tRy=0;\n\t\tvar nn=0;\n\t\tvar tMatrix;\n\t\tvar tX=NaN;\n\t\tvar tY=NaN;\n\t\tvar tB=0;\n\t\tvar tWeight=0;\n\t\tvar tVertices=[];\n\t\tvar i=0,j=0,n=0;\n\t\tvar tRed=1;\n\t\tvar tGreed=1;\n\t\tvar tBlue=1;\n\t\tvar tAlpha=alpha;\n\t\tif (this.deformData && this.deformData.length > 0){\n\t\t\tvar f=0;\n\t\t\tfor (i=0,n=tBones.length;i < n;){\n\t\t\t\tnn=tBones[i++]+i;\n\t\t\t\ttRx=0,tRy=0;\n\t\t\t\tfor (;i < nn;i++){\n\t\t\t\t\ttMatrix=boneMatrixArray[tBones[i]]\n\t\t\t\t\ttX=tWeights[tB]+this.deformData[f++];\n\t\t\t\t\ttY=tWeights[tB+1]+this.deformData[f++];\n\t\t\t\t\ttWeight=tWeights[tB+2];\n\t\t\t\t\ttRx+=(tX *tMatrix.a+tY *tMatrix.c+tMatrix.tx)*tWeight;\n\t\t\t\t\ttRy+=(tX *tMatrix.b+tY *tMatrix.d+tMatrix.ty)*tWeight;\n\t\t\t\t\ttB+=3;\n\t\t\t\t}\n\t\t\t\ttVertices.push(tRx,tRy);\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (i=0,n=tBones.length;i < n;){\n\t\t\t\tnn=tBones[i++]+i;\n\t\t\t\ttRx=0,tRy=0;\n\t\t\t\tfor (;i < nn;i++){\n\t\t\t\t\ttMatrix=boneMatrixArray[tBones[i]]\n\t\t\t\t\ttX=tWeights[tB];\n\t\t\t\t\ttY=tWeights[tB+1];\n\t\t\t\t\ttWeight=tWeights[tB+2];\n\t\t\t\t\ttRx+=(tX *tMatrix.a+tY *tMatrix.c+tMatrix.tx)*tWeight;\n\t\t\t\t\ttRy+=(tX *tMatrix.b+tY *tMatrix.d+tMatrix.ty)*tWeight;\n\t\t\t\t\ttB+=3;\n\t\t\t\t}\n\t\t\t\ttVertices.push(tRx,tRy);\n\t\t\t}\n\t\t}\n\t\tthis._mVerticleArr=tVertices;\n\t\ttIBArray=tTriangles;\n\t\tskinSprite.init2(tTexture,null,tIBArray,this._mVerticleArr,tUvs);\n\t}\n\n\t/**\n\t*画骨骼的起始点，方便调试\n\t*@param graphics\n\t*/\n\t__proto.drawBonePoint=function(graphics){\n\t\tif (graphics && this._parentMatrix){\n\t\t\tgraphics.drawCircle(this._parentMatrix.tx,this._parentMatrix.ty,5,\"#ff0000\");\n\t\t}\n\t}\n\n\t/**\n\t*得到显示对象的矩阵\n\t*@return\n\t*/\n\t__proto.getDisplayMatrix=function(){\n\t\tif (this.currDisplayData){\n\t\t\treturn this.currDisplayData.transform.getMatrix();\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*得到插糟的矩阵\n\t*@return\n\t*/\n\t__proto.getMatrix=function(){\n\t\treturn this._resultMatrix;\n\t}\n\n\t/**\n\t*用原始数据拷贝出一个\n\t*@return\n\t*/\n\t__proto.copy=function(){\n\t\tvar tBoneSlot=new BoneSlot();\n\t\ttBoneSlot.type=\"copy\";\n\t\ttBoneSlot.name=this.name;\n\t\ttBoneSlot.attachmentName=this.attachmentName;\n\t\ttBoneSlot.srcDisplayIndex=this.srcDisplayIndex;\n\t\ttBoneSlot.parent=this.parent;\n\t\ttBoneSlot.displayIndex=this.displayIndex;\n\t\ttBoneSlot.templet=this.templet;\n\t\ttBoneSlot.currSlotData=this.currSlotData;\n\t\ttBoneSlot.currTexture=this.currTexture;\n\t\ttBoneSlot.currDisplayData=this.currDisplayData;\n\t\treturn tBoneSlot;\n\t}\n\n\tBoneSlot.createSkinMesh=function(){\n\t\tif (Render.isWebGL || Render.isConchApp){\n\t\t\treturn RunDriver.skinAniSprite();\n\t\t\t}else{\n\t\t\tif (!Render.isWebGL){\n\t\t\t\tif (Skeleton.useSimpleMeshInCanvas){\n\t\t\t\t\treturn new SimpleSkinMeshCanvas();\n\t\t\t\t\t}else{\n\t\t\t\t\treturn new SkinMeshCanvas();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t__static(BoneSlot,\n\t['_tempMatrix',function(){return this._tempMatrix=new Matrix();}\n\t]);\n\treturn BoneSlot;\n})()\n\n\n/**\n*@private\n*canvas mesh渲染器\n*/\n//class laya.ani.bone.canvasmesh.CanvasMeshRender\nvar CanvasMeshRender=(function(){\n\tfunction CanvasMeshRender(){\n\t\t/**\n\t\t*mesh数据\n\t\t*/\n\t\tthis.mesh=null;\n\t\t/**\n\t\t*矩阵\n\t\t*/\n\t\tthis.transform=null;\n\t\t/**\n\t\t*绘图环境\n\t\t*/\n\t\tthis.context=null;\n\t\t/**\n\t\t*绘制mesh的模式 0:顶点索引模式 1：无顶点索引模式\n\t\t*/\n\t\tthis.mode=0;\n\t}\n\n\t__class(CanvasMeshRender,'laya.ani.bone.canvasmesh.CanvasMeshRender');\n\tvar __proto=CanvasMeshRender.prototype;\n\t/**\n\t*将mesh数据渲染到context上面\n\t*@param context\n\t*\n\t*/\n\t__proto.renderToContext=function(context){\n\t\tthis.context=context.ctx||context;\n\t\tif (this.mesh){\n\t\t\tif (this.mode==0){\n\t\t\t\tthis._renderWithIndexes(this.mesh);\n\t\t\t\t}else{\n\t\t\t\tthis._renderNoIndexes(this.mesh);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*无顶点索引的模式\n\t*@param mesh\n\t*\n\t*/\n\t__proto._renderNoIndexes=function(mesh){\n\t\tvar i=0,len=mesh.vertices.length / 2;\n\t\tvar index=0;\n\t\tfor (i=0;i < len-2;i++){\n\t\t\tindex=i *2;\n\t\t\tthis._renderDrawTriangle(mesh,index,(index+2),(index+4));\n\t\t}\n\t}\n\n\t/**\n\t*使用顶点索引模式绘制\n\t*@param mesh\n\t*\n\t*/\n\t__proto._renderWithIndexes=function(mesh){\n\t\tvar indexes=mesh.indexes;\n\t\tvar i=0,len=indexes.length;\n\t\tfor (i=0;i < len;i+=3){\n\t\t\tvar index0=indexes[i] *2;\n\t\t\tvar index1=indexes[i+1] *2;\n\t\t\tvar index2=indexes[i+2] *2;\n\t\t\tthis._renderDrawTriangle(mesh,index0,index1,index2);\n\t\t}\n\t}\n\n\t/**\n\t*绘制三角形\n\t*@param mesh mesh\n\t*@param index0 顶点0\n\t*@param index1 顶点1\n\t*@param index2 顶点2\n\t*\n\t*/\n\t__proto._renderDrawTriangle=function(mesh,index0,index1,index2){\n\t\tvar context=this.context;\n\t\tvar uvs=mesh.uvs;\n\t\tvar vertices=mesh.vertices;\n\t\tvar texture=mesh.texture;\n\t\tvar source=texture.bitmap;\n\t\tvar textureSource=source.source;\n\t\tvar textureWidth=texture.width;\n\t\tvar textureHeight=texture.height;\n\t\tvar sourceWidth=source.width;\n\t\tvar sourceHeight=source.height;\n\t\tvar u0=NaN;\n\t\tvar u1=NaN;\n\t\tvar u2=NaN;\n\t\tvar v0=NaN;\n\t\tvar v1=NaN;\n\t\tvar v2=NaN;\n\t\tif (mesh.useUvTransform){\n\t\t\tvar ut=mesh.uvTransform;\n\t\t\tu0=((uvs[index0] *ut.a)+(uvs[index0+1] *ut.c)+ut.tx)*sourceWidth;\n\t\t\tu1=((uvs[index1] *ut.a)+(uvs[index1+1] *ut.c)+ut.tx)*sourceWidth;\n\t\t\tu2=((uvs[index2] *ut.a)+(uvs[index2+1] *ut.c)+ut.tx)*sourceWidth;\n\t\t\tv0=((uvs[index0] *ut.b)+(uvs[index0+1] *ut.d)+ut.ty)*sourceHeight;\n\t\t\tv1=((uvs[index1] *ut.b)+(uvs[index1+1] *ut.d)+ut.ty)*sourceHeight;\n\t\t\tv2=((uvs[index2] *ut.b)+(uvs[index2+1] *ut.d)+ut.ty)*sourceHeight;\n\t\t}\n\t\telse {\n\t\t\tu0=uvs[index0] *sourceWidth;\n\t\t\tu1=uvs[index1] *sourceWidth;\n\t\t\tu2=uvs[index2] *sourceWidth;\n\t\t\tv0=uvs[index0+1] *sourceHeight;\n\t\t\tv1=uvs[index1+1] *sourceHeight;\n\t\t\tv2=uvs[index2+1] *sourceHeight;\n\t\t};\n\t\tvar x0=vertices[index0];\n\t\tvar x1=vertices[index1];\n\t\tvar x2=vertices[index2];\n\t\tvar y0=vertices[index0+1];\n\t\tvar y1=vertices[index1+1];\n\t\tvar y2=vertices[index2+1];\n\t\tif (mesh.canvasPadding > 0){\n\t\t\tvar paddingX=mesh.canvasPadding;\n\t\t\tvar paddingY=mesh.canvasPadding;\n\t\t\tvar centerX=(x0+x1+x2)/ 3;\n\t\t\tvar centerY=(y0+y1+y2)/ 3;\n\t\t\tvar normX=x0-centerX;\n\t\t\tvar normY=y0-centerY;\n\t\t\tvar dist=Math.sqrt((normX *normX)+(normY *normY));\n\t\t\tx0=centerX+((normX / dist)*(dist+paddingX));\n\t\t\ty0=centerY+((normY / dist)*(dist+paddingY));\n\t\t\tnormX=x1-centerX;\n\t\t\tnormY=y1-centerY;\n\t\t\tdist=Math.sqrt((normX *normX)+(normY *normY));\n\t\t\tx1=centerX+((normX / dist)*(dist+paddingX));\n\t\t\ty1=centerY+((normY / dist)*(dist+paddingY));\n\t\t\tnormX=x2-centerX;\n\t\t\tnormY=y2-centerY;\n\t\t\tdist=Math.sqrt((normX *normX)+(normY *normY));\n\t\t\tx2=centerX+((normX / dist)*(dist+paddingX));\n\t\t\ty2=centerY+((normY / dist)*(dist+paddingY));\n\t\t}\n\t\tcontext.save();\n\t\tif (this.transform){\n\t\t\tvar mt=this.transform;\n\t\t\tcontext.transform(mt.a,mt.b,mt.c,mt.d,mt.tx,mt.ty);\n\t\t}\n\t\tcontext.beginPath();\n\t\tcontext.moveTo(x0,y0);\n\t\tcontext.lineTo(x1,y1);\n\t\tcontext.lineTo(x2,y2);\n\t\tcontext.closePath();\n\t\tcontext.clip();\n\t\tvar delta=(u0 *v1)+(v0 *u2)+(u1 *v2)-(v1 *u2)-(v0 *u1)-(u0 *v2);\n\t\tvar dDelta=1 / delta;\n\t\tvar deltaA=(x0 *v1)+(v0 *x2)+(x1 *v2)-(v1 *x2)-(v0 *x1)-(x0 *v2);\n\t\tvar deltaB=(u0 *x1)+(x0 *u2)+(u1 *x2)-(x1 *u2)-(x0 *u1)-(u0 *x2);\n\t\tvar deltaC=(u0 *v1 *x2)+(v0 *x1 *u2)+(x0 *u1 *v2)-(x0 *v1 *u2)-(v0 *u1 *x2)-(u0 *x1 *v2);\n\t\tvar deltaD=(y0 *v1)+(v0 *y2)+(y1 *v2)-(v1 *y2)-(v0 *y1)-(y0 *v2);\n\t\tvar deltaE=(u0 *y1)+(y0 *u2)+(u1 *y2)-(y1 *u2)-(y0 *u1)-(u0 *y2);\n\t\tvar deltaF=(u0 *v1 *y2)+(v0 *y1 *u2)+(y0 *u1 *v2)-(y0 *v1 *u2)-(v0 *u1 *y2)-(u0 *y1 *v2);\n\t\tcontext.transform(deltaA *dDelta,deltaD *dDelta,deltaB *dDelta,deltaE*dDelta,deltaC *dDelta,deltaF *dDelta);\n\t\tcontext.drawImage(textureSource,texture.uv[0]*sourceWidth,texture.uv[1]*sourceHeight,textureWidth,textureHeight,texture.uv[0]*sourceWidth,texture.uv[1]*sourceHeight,textureWidth,textureHeight);\n\t\tcontext.restore();\n\t}\n\n\treturn CanvasMeshRender;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.canvasmesh.MeshData\nvar MeshData=(function(){\n\tfunction MeshData(){\n\t\t/**\n\t\t*纹理\n\t\t*/\n\t\tthis.texture=null;\n\t\t/**\n\t\t*uv数据\n\t\t*/\n\t\tthis.uvs=[0,0,1,0,1,1,0,1];\n\t\t/**\n\t\t*顶点数据\n\t\t*/\n\t\tthis.vertices=[0,0,100,0,100,100,0,100];\n\t\t/**\n\t\t*顶点索引\n\t\t*/\n\t\tthis.indexes=[0,1,3,3,1,2];\n\t\t/**\n\t\t*uv变换矩阵\n\t\t*/\n\t\tthis.uvTransform=null;\n\t\t/**\n\t\t*是否有uv变化矩阵\n\t\t*/\n\t\tthis.useUvTransform=false;\n\t\t/**\n\t\t*扩展像素,用来去除黑边\n\t\t*/\n\t\tthis.canvasPadding=1;\n\t}\n\n\t__class(MeshData,'laya.ani.bone.canvasmesh.MeshData');\n\tvar __proto=MeshData.prototype;\n\t/**\n\t*计算mesh的Bounds\n\t*@return\n\t*\n\t*/\n\t__proto.getBounds=function(){\n\t\treturn Rectangle._getWrapRec(this.vertices);\n\t}\n\n\treturn MeshData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.DeformAniData\nvar DeformAniData=(function(){\n\tfunction DeformAniData(){\n\t\tthis.skinName=null;\n\t\tthis.deformSlotDataList=[];\n\t}\n\n\t__class(DeformAniData,'laya.ani.bone.DeformAniData');\n\treturn DeformAniData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.DeformSlotData\nvar DeformSlotData=(function(){\n\tfunction DeformSlotData(){\n\t\tthis.deformSlotDisplayList=[];\n\t}\n\n\t__class(DeformSlotData,'laya.ani.bone.DeformSlotData');\n\treturn DeformSlotData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.DeformSlotDisplayData\nvar DeformSlotDisplayData=(function(){\n\tfunction DeformSlotDisplayData(){\n\t\tthis.boneSlot=null;\n\t\tthis.slotIndex=-1;\n\t\tthis.attachment=null;\n\t\tthis.deformData=null;\n\t\tthis.frameIndex=0;\n\t\tthis.timeList=[];\n\t\tthis.vectices=[];\n\t\tthis.tweenKeyList=[];\n\t}\n\n\t__class(DeformSlotDisplayData,'laya.ani.bone.DeformSlotDisplayData');\n\tvar __proto=DeformSlotDisplayData.prototype;\n\t__proto.binarySearch1=function(values,target){\n\t\tvar low=0;\n\t\tvar high=values.length-2;\n\t\tif (high==0)\n\t\t\treturn 1;\n\t\tvar current=high >>> 1;\n\t\twhile (true){\n\t\t\tif (values[Math.floor(current+1)] <=target)\n\t\t\t\tlow=current+1;\n\t\t\telse\n\t\t\thigh=current;\n\t\t\tif (low==high)\n\t\t\t\treturn low+1;\n\t\t\tcurrent=(low+high)>>> 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t// Can't happen.\n\t__proto.apply=function(time,boneSlot,alpha){\n\t\t(alpha===void 0)&& (alpha=1);\n\t\ttime+=0.05;\n\t\tif (this.timeList.length <=0){\n\t\t\treturn;\n\t\t};\n\t\tvar i=0;\n\t\tvar n=0;\n\t\tvar tTime=this.timeList[0];\n\t\tif (time < tTime){\n\t\t\treturn;\n\t\t};\n\t\tvar tVertexCount=this.vectices[0].length;\n\t\tvar tVertices=[];\n\t\tvar tFrameIndex=this.binarySearch1(this.timeList,time);\n\t\tthis.frameIndex=tFrameIndex;\n\t\tif (time >=this.timeList[this.timeList.length-1]){\n\t\t\tvar lastVertices=this.vectices[this.vectices.length-1];\n\t\t\tif (alpha < 1){\n\t\t\t\tfor (i=0;i < tVertexCount;i++){\n\t\t\t\t\ttVertices[i]+=(lastVertices[i]-tVertices[i])*alpha;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tfor (i=0;i < tVertexCount;i++){\n\t\t\t\t\ttVertices[i]=lastVertices[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.deformData=tVertices;\n\t\t\treturn;\n\t\t};\n\t\tvar tTweenKey=this.tweenKeyList[this.frameIndex];\n\t\tvar tPrevVertices=this.vectices[this.frameIndex-1];\n\t\tvar tNextVertices=this.vectices[this.frameIndex];\n\t\tvar tPreFrameTime=this.timeList[this.frameIndex-1];\n\t\tvar tFrameTime=this.timeList[this.frameIndex];\n\t\tif (this.tweenKeyList[tFrameIndex-1]){\n\t\t\talpha=(time-tPreFrameTime)/ (tFrameTime-tPreFrameTime);\n\t\t\t}else {\n\t\t\talpha=0;\n\t\t};\n\t\tvar tPrev=NaN;\n\t\tfor (i=0;i < tVertexCount;i++){\n\t\t\ttPrev=tPrevVertices[i];\n\t\t\ttVertices[i]=tPrev+(tNextVertices[i]-tPrev)*alpha;\n\t\t}\n\t\tthis.deformData=tVertices;\n\t}\n\n\treturn DeformSlotDisplayData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.DrawOrderData\nvar DrawOrderData=(function(){\n\tfunction DrawOrderData(){\n\t\tthis.time=NaN;\n\t\tthis.drawOrder=[];\n\t}\n\n\t__class(DrawOrderData,'laya.ani.bone.DrawOrderData');\n\treturn DrawOrderData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.EventData\nvar EventData=(function(){\n\tfunction EventData(){\n\t\tthis.name=null;\n\t\tthis.intValue=0;\n\t\tthis.floatValue=NaN;\n\t\tthis.stringValue=null;\n\t\tthis.audioValue=null;\n\t\tthis.time=NaN;\n\t}\n\n\t__class(EventData,'laya.ani.bone.EventData');\n\treturn EventData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.IkConstraint\nvar IkConstraint=(function(){\n\tfunction IkConstraint(data,bones){\n\t\tthis._targetBone=null;\n\t\tthis._bones=null;\n\t\tthis._data=null;\n\t\tthis.name=null;\n\t\tthis.mix=NaN;\n\t\tthis.bendDirection=NaN;\n\t\tthis.isSpine=true;\n\t\t//debug相关代码\n\t\tthis._sp=null;\n\t\tthis.isDebug=false;\n\t\tthis._data=data;\n\t\tthis._targetBone=bones[data.targetBoneIndex];\n\t\tthis.isSpine=data.isSpine;\n\t\tif (this._bones==null)this._bones=[];\n\t\tthis._bones.length=0;\n\t\tfor (var i=0,n=data.boneIndexs.length;i < n;i++){\n\t\t\tthis._bones.push(bones[data.boneIndexs[i]]);\n\t\t}\n\t\tthis.name=data.name;\n\t\tthis.mix=data.mix;\n\t\tthis.bendDirection=data.bendDirection;\n\t}\n\n\t__class(IkConstraint,'laya.ani.bone.IkConstraint');\n\tvar __proto=IkConstraint.prototype;\n\t__proto.apply=function(){\n\t\tswitch (this._bones.length){\n\t\t\tcase 1:\n\t\t\t\tthis._applyIk1(this._bones[0],this._targetBone.resultMatrix.tx,this._targetBone.resultMatrix.ty,this.mix);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (this.isSpine){\n\t\t\t\t\tthis._applyIk2(this._bones[0],this._bones[1],this._targetBone.resultMatrix.tx,this._targetBone.resultMatrix.ty,this.bendDirection,this.mix);\n\t\t\t\t\t}else{\n\t\t\t\t\tthis._applyIk3(this._bones[0],this._bones[1],this._targetBone.resultMatrix.tx,this._targetBone.resultMatrix.ty,this.bendDirection,this.mix);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t__proto._applyIk1=function(bone,targetX,targetY,alpha){\n\t\tvar pp=bone.parentBone;\n\t\tvar id=1 / (pp.resultMatrix.a *pp.resultMatrix.d-pp.resultMatrix.b *pp.resultMatrix.c);\n\t\tvar x=targetX-pp.resultMatrix.tx;\n\t\tvar y=targetY-pp.resultMatrix.ty;\n\t\tvar tx=(x *pp.resultMatrix.d-y *pp.resultMatrix.c)*id-bone.transform.x;\n\t\tvar ty=(y *pp.resultMatrix.a-x *pp.resultMatrix.b)*id-bone.transform.y;\n\t\tvar rotationIK=Math.atan2(ty,tx)*IkConstraint.radDeg-0-bone.transform.skX;\n\t\tif (bone.transform.scX < 0)rotationIK+=180;\n\t\tif (rotationIK > 180)\n\t\t\trotationIK-=360;\n\t\telse if (rotationIK <-180)rotationIK+=360;\n\t\tbone.transform.skX=bone.transform.skY=bone.transform.skX+rotationIK *alpha;\n\t\tbone.update();\n\t}\n\n\t__proto.updatePos=function(x,y){\n\t\tif (this._sp){\n\t\t\tthis._sp.pos(x,y);\n\t\t}\n\t}\n\n\t__proto._applyIk2=function(parent,child,targetX,targetY,bendDir,alpha){\n\t\tif (alpha==0){\n\t\t\treturn;\n\t\t};\n\t\tvar px=parent.resultTransform.x,py=parent.resultTransform.y;\n\t\tvar psx=parent.transform.scX,psy=parent.transform.scY;\n\t\tvar csx=child.transform.scX;\n\t\tvar os1=0,os2=0,s2=0;\n\t\tif (psx < 0){\n\t\t\tpsx=-psx;\n\t\t\tos1=180;\n\t\t\ts2=-1;\n\t\t\t}else {\n\t\t\tos1=0;\n\t\t\ts2=1;\n\t\t}\n\t\tif (psy < 0){\n\t\t\tpsy=-psy;\n\t\t\ts2=-s2;\n\t\t}\n\t\tif (csx < 0){\n\t\t\tcsx=-csx;\n\t\t\tos2=180;\n\t\t\t}else {\n\t\t\tos2=0\n\t\t};\n\t\tvar cx=child.resultTransform.x,cy=NaN,cwx=NaN,cwy=NaN;\n\t\tvar a=parent.resultMatrix.a,b=parent.resultMatrix.c;\n\t\tvar c=parent.resultMatrix.b,d=parent.resultMatrix.d;\n\t\tvar u=Math.abs(psx-psy)<=0.0001;\n\t\tif (!u){\n\t\t\tcy=0;\n\t\t\tcwx=a *cx+parent.resultMatrix.tx;\n\t\t\tcwy=c *cx+parent.resultMatrix.ty;\n\t\t\t}else {\n\t\t\tcy=child.resultTransform.y;\n\t\t\tcwx=a *cx+b *cy+parent.resultMatrix.tx;\n\t\t\tcwy=c *cx+d *cy+parent.resultMatrix.ty;\n\t\t}\n\t\tif (this.isDebug){\n\t\t\tif (!this._sp){\n\t\t\t\tthis._sp=new Sprite();\n\t\t\t\tLaya.stage.addChild(this._sp);\n\t\t\t}\n\t\t\tthis._sp.graphics.clear();\n\t\t\tthis._sp.graphics.drawCircle(targetX,targetY,15,\"#ffff00\");\n\t\t\tthis._sp.graphics.drawCircle(cwx,cwy,15,\"#ff00ff\");\n\t\t}\n\t\tparent.setRotation(Math.atan2(cwy-parent.resultMatrix.ty,cwx-parent.resultMatrix.tx));\n\t\tvar pp=parent.parentBone;\n\t\ta=pp.resultMatrix.a;\n\t\tb=pp.resultMatrix.c;\n\t\tc=pp.resultMatrix.b;\n\t\td=pp.resultMatrix.d;\n\t\tvar id=1 / (a *d-b *c);\n\t\tvar x=targetX-pp.resultMatrix.tx,y=targetY-pp.resultMatrix.ty;\n\t\tvar tx=(x *d-y *b)*id-px;\n\t\tvar ty=(y *a-x *c)*id-py;\n\t\tx=cwx-pp.resultMatrix.tx;\n\t\ty=cwy-pp.resultMatrix.ty;\n\t\tvar dx=(x *d-y *b)*id-px;\n\t\tvar dy=(y *a-x *c)*id-py;\n\t\tvar l1=Math.sqrt(dx *dx+dy *dy);\n\t\tvar l2=child.length *csx;\n\t\tvar a1=NaN,a2=NaN;\n\t\tif (u){\n\t\t\tl2 *=psx;\n\t\t\tvar cos=(tx *tx+ty *ty-l1 *l1-l2 *l2)/ (2 *l1 *l2);\n\t\t\tif (cos <-1)\n\t\t\t\tcos=-1;\n\t\t\telse if (cos > 1)cos=1;\n\t\t\ta2=Math.acos(cos)*bendDir;\n\t\t\ta=l1+l2 *cos;\n\t\t\tb=l2 *Math.sin(a2);\n\t\t\ta1=Math.atan2(ty *a-tx *b,tx *a+ty *b);\n\t\t\t}else {\n\t\t\ta=psx *l2;\n\t\t\tb=psy *l2;\n\t\t\tvar aa=a *a,bb=b *b,dd=tx *tx+ty *ty,ta=Math.atan2(ty,tx);\n\t\t\tc=bb *l1 *l1+aa *dd-aa *bb;\n\t\t\tvar c1=-2 *bb *l1,c2=bb-aa;\n\t\t\td=c1 *c1-4 *c2 *c;\n\t\t\tif (d > 0){\n\t\t\t\tvar q=Math.sqrt(d);\n\t\t\t\tif (c1 < 0)q=-q;\n\t\t\t\tq=-(c1+q)/ 2;\n\t\t\t\tvar r0=q / c2,r1=c / q;\n\t\t\t\tvar r=Math.abs(r0)< Math.abs(r1)? r0 :r1;\n\t\t\t\tif (r *r <=dd){\n\t\t\t\t\ty=Math.sqrt(dd-r *r)*bendDir;\n\t\t\t\t\ta1=ta-Math.atan2(y,r);\n\t\t\t\t\ta2=Math.atan2(y / psy,(r-l1)/ psx);\n\t\t\t\t}\n\t\t\t};\n\t\t\tvar minAngle=0,minDist=Number.MAX_VALUE,minX=0,minY=0;\n\t\t\tvar maxAngle=0,maxDist=0,maxX=0,maxY=0;\n\t\t\tx=l1+a;\n\t\t\td=x *x;\n\t\t\tif (d > maxDist){\n\t\t\t\tmaxAngle=0;\n\t\t\t\tmaxDist=d;\n\t\t\t\tmaxX=x;\n\t\t\t}\n\t\t\tx=l1-a;\n\t\t\td=x *x;\n\t\t\tif (d < minDist){\n\t\t\t\tminAngle=Math.PI;\n\t\t\t\tminDist=d;\n\t\t\t\tminX=x;\n\t\t\t};\n\t\t\tvar angle=Math.acos(-a *l1 / (aa-bb));\n\t\t\tx=a *Math.cos(angle)+l1;\n\t\t\ty=b *Math.sin(angle);\n\t\t\td=x *x+y *y;\n\t\t\tif (d < minDist){\n\t\t\t\tminAngle=angle;\n\t\t\t\tminDist=d;\n\t\t\t\tminX=x;\n\t\t\t\tminY=y;\n\t\t\t}\n\t\t\tif (d > maxDist){\n\t\t\t\tmaxAngle=angle;\n\t\t\t\tmaxDist=d;\n\t\t\t\tmaxX=x;\n\t\t\t\tmaxY=y;\n\t\t\t}\n\t\t\tif (dd <=(minDist+maxDist)/ 2){\n\t\t\t\ta1=ta-Math.atan2(minY *bendDir,minX);\n\t\t\t\ta2=minAngle *bendDir;\n\t\t\t\t}else {\n\t\t\t\ta1=ta-Math.atan2(maxY *bendDir,maxX);\n\t\t\t\ta2=maxAngle *bendDir;\n\t\t\t}\n\t\t};\n\t\tvar os=Math.atan2(cy,cx)*s2;\n\t\tvar rotation=parent.resultTransform.skX;\n\t\ta1=(a1-os)*IkConstraint.radDeg+os1-rotation;\n\t\tif (a1 > 180)\n\t\t\ta1-=360;\n\t\telse if (a1 <-180)a1+=360;\n\t\tparent.resultTransform.x=px;\n\t\tparent.resultTransform.y=py;\n\t\tparent.resultTransform.skX=parent.resultTransform.skY=rotation+a1 *alpha;\n\t\trotation=child.resultTransform.skX;\n\t\trotation=rotation % 360;\n\t\ta2=((a2+os)*IkConstraint.radDeg-0)*s2+os2-rotation;\n\t\tif (a2 > 180)\n\t\t\ta2-=360;\n\t\telse if (a2 <-180)a2+=360;\n\t\tchild.resultTransform.x=cx;\n\t\tchild.resultTransform.y=cy;\n\t\tchild.resultTransform.skX=child.resultTransform.skY=child.resultTransform.skY+a2 *alpha;\n\t\tparent.update();\n\t}\n\n\t__proto._applyIk3=function(parent,child,targetX,targetY,bendDir,alpha){\n\t\tif (alpha==0){\n\t\t\treturn;\n\t\t};\n\t\tvar cwx=NaN,cwy=NaN;\n\t\tvar x=child.resultMatrix.a *child.length;\n\t\tvar y=child.resultMatrix.b *child.length;\n\t\tvar lLL=x *x+y *y;\n\t\tvar lL=Math.sqrt(lLL);\n\t\tvar parentX=parent.resultMatrix.tx;\n\t\tvar parentY=parent.resultMatrix.ty;\n\t\tvar childX=child.resultMatrix.tx;\n\t\tvar childY=child.resultMatrix.ty;\n\t\tvar dX=childX-parentX;\n\t\tvar dY=childY-parentY;\n\t\tvar lPP=dX *dX+dY *dY;\n\t\tvar lP=Math.sqrt(lPP);\n\t\tdX=targetX-parent.resultMatrix.tx;\n\t\tdY=targetY-parent.resultMatrix.ty;\n\t\tvar lTT=dX *dX+dY *dY;\n\t\tvar lT=Math.sqrt(lTT);\n\t\tvar ikRadianA=0;\n\t\tif (lL+lP <=lT || lT+lL <=lP || lT+lP <=lL){\n\t\t\tvar rate=NaN;\n\t\t\tif (lL+lP <=lT){\n\t\t\t\trate=1;\n\t\t\t\t}else{\n\t\t\t\trate=-1;\n\t\t\t}\n\t\t\tchildX=parentX+rate*(targetX-parentX)*lP / lT;\n\t\t\tchildY=parentY+rate*(targetY-parentY)*lP / lT;\n\t\t}\n\t\telse{\n\t\t\tvar h=(lPP-lLL+lTT)/ (2 *lTT);\n\t\t\tvar r=Math.sqrt(lPP-h *h *lTT)/ lT;\n\t\t\tvar hX=parentX+(dX *h);\n\t\t\tvar hY=parentY+(dY *h);\n\t\t\tvar rX=-dY *r;\n\t\t\tvar rY=dX *r;\n\t\t\tif (bendDir>0){\n\t\t\t\tchildX=hX-rX;\n\t\t\t\tchildY=hY-rY;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tchildX=hX+rX;\n\t\t\t\tchildY=hY+rY;\n\t\t\t}\n\t\t}\n\t\tcwx=childX;\n\t\tcwy=childY;\n\t\tif (this.isDebug){\n\t\t\tif (!this._sp){\n\t\t\t\tthis._sp=new Sprite();\n\t\t\t\tLaya.stage.addChild(this._sp);\n\t\t\t}\n\t\t\tthis._sp.graphics.clear();\n\t\t\tthis._sp.graphics.drawCircle(parentX,parentY,15,\"#ff00ff\");\n\t\t\tthis._sp.graphics.drawCircle(targetX,targetY,15,\"#ffff00\");\n\t\t\tthis._sp.graphics.drawCircle(cwx,cwy,15,\"#ff00ff\");\n\t\t};\n\t\tvar pRotation=NaN;\n\t\tpRotation=Math.atan2(cwy-parent.resultMatrix.ty,cwx-parent.resultMatrix.tx);\n\t\tparent.setRotation(pRotation);\n\t\tvar pTarMatrix;\n\t\tpTarMatrix=IkConstraint._tempMatrix;\n\t\tpTarMatrix.identity();\n\t\tpTarMatrix.rotate(pRotation);\n\t\tpTarMatrix.scale(parent.resultMatrix.getScaleX(),parent.resultMatrix.getScaleY());\n\t\tpTarMatrix.translate(parent.resultMatrix.tx,parent.resultMatrix.ty);\n\t\tpTarMatrix.copyTo(parent.resultMatrix);\n\t\tparent.updateChild();\n\t\tvar childRotation=NaN;\n\t\tchildRotation=Math.atan2(targetY-cwy,targetX-cwx);\n\t\tchild.setRotation(childRotation);\n\t\tvar childTarMatrix;\n\t\tchildTarMatrix=IkConstraint._tempMatrix;\n\t\tchildTarMatrix.identity();\n\t\tchildTarMatrix.rotate(childRotation);\n\t\tchildTarMatrix.scale(child.resultMatrix.getScaleX(),child.resultMatrix.getScaleY());\n\t\tchildTarMatrix.translate(cwx,cwy);\n\t\tpTarMatrix.copyTo(child.resultMatrix);\n\t\tchild.updateChild();\n\t}\n\n\t__static(IkConstraint,\n\t['radDeg',function(){return this.radDeg=180 / Math.PI;},'degRad',function(){return this.degRad=Math.PI / 180;},'_tempMatrix',function(){return this._tempMatrix=new Matrix();}\n\t]);\n\treturn IkConstraint;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.IkConstraintData\nvar IkConstraintData=(function(){\n\tfunction IkConstraintData(){\n\t\tthis.name=null;\n\t\tthis.targetBoneName=null;\n\t\tthis.bendDirection=1;\n\t\tthis.mix=1;\n\t\tthis.isSpine=true;\n\t\tthis.targetBoneIndex=-1;\n\t\tthis.boneNames=[];\n\t\tthis.boneIndexs=[];\n\t}\n\n\t__class(IkConstraintData,'laya.ani.bone.IkConstraintData');\n\treturn IkConstraintData;\n})()\n\n\n/**\n*@private\n*Mesh数据处理工具\n*@version 1.0\n*\n*@created 2017-4-28 下午2:46:23\n*/\n//class laya.ani.bone.MeshTools\nvar MeshTools=(function(){\n\tfunction MeshTools(){}\n\t__class(MeshTools,'laya.ani.bone.MeshTools');\n\tMeshTools.findEdge=function(verticles,offI,min){\n\t\t(offI===void 0)&& (offI=0);\n\t\t(min===void 0)&& (min=true);\n\t\tvar i=0,len=0;\n\t\tvar tIndex=0;\n\t\tlen=verticles.length;\n\t\ttIndex=-1;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\tif (tIndex < 0 || (min==(verticles[tIndex+offI] < verticles[i+offI]))){\n\t\t\t\ttIndex=i;\n\t\t\t}\n\t\t}\n\t\treturn tIndex;\n\t}\n\n\tMeshTools.findBestTriangle=function(verticles){\n\t\tvar topI=0;\n\t\ttopI=MeshTools.findEdge(verticles,1,true);\n\t\tvar bottomI=0;\n\t\tbottomI=MeshTools.findEdge(verticles,1,false);\n\t\tvar leftI=0;\n\t\tleftI=MeshTools.findEdge(verticles,0,true);\n\t\tvar rightI=0;\n\t\trightI=MeshTools.findEdge(verticles,0,false);\n\t\tvar rst;\n\t\trst=MeshTools._bestTriangle;\n\t\trst.length=0;\n\t\trst.push(leftI,rightI);\n\t\tif (rst.indexOf(topI)< 0)rst.push(topI);\n\t\tif (rst.indexOf(bottomI)< 0)rst.push(bottomI);\n\t\treturn rst;\n\t}\n\n\tMeshTools.solveMesh=function(mesh,rst){\n\t\trst=rst||[];\n\t\trst.length=0;\n\t\tvar mUv;\n\t\tmUv=mesh.uvs;\n\t\tvar mVer;\n\t\tmVer=mesh.vertices;\n\t\tvar uvAbs;\n\t\tvar indexs;\n\t\tindexs=MeshTools.findBestTriangle(mUv);\n\t\tvar index0=0;\n\t\tvar index1=0;\n\t\tvar index2=0;\n\t\tindex0=indexs[0];\n\t\tindex1=indexs[1];\n\t\tindex2=indexs[2];\n\t\tMeshTools._absArr.length=0;\n\t\tvar newVerticles;\n\t\tif (MeshTools.isNormalUV(mesh.texture.uv)){\n\t\t\tMeshTools.adptTexture(mesh);\n\t\t}\n\t\tuvAbs=MeshTools.solvePoints(mesh.texture.uv,mUv[index0],mUv[index0+1],mUv[index1]-mUv[index0],mUv[index1+1]-mUv[index0+1],mUv[index2]-mUv[index0],mUv[index2+1]-mUv[index0+1],MeshTools._absArr);\n\t\tnewVerticles=MeshTools.transPoints(uvAbs,mVer[index0],mVer[index0+1],mVer[index1]-mVer[index0],mVer[index1+1]-mVer[index0+1],mVer[index2]-mVer[index0],mVer[index2+1]-mVer[index0+1],rst);\n\t\treturn newVerticles;\n\t}\n\n\tMeshTools.findWrapRect=function(verticles){\n\t\tvar topI=0;\n\t\ttopI=MeshTools.findEdge(verticles,1,true);\n\t\tvar bottomI=0;\n\t\tbottomI=MeshTools.findEdge(verticles,1,false);\n\t\tvar leftI=0;\n\t\tleftI=MeshTools.findEdge(verticles,0,true);\n\t\tvar rightI=0;\n\t\trightI=MeshTools.findEdge(verticles,0,false);\n\t\tvar left=NaN;\n\t\tleft=verticles[leftI];\n\t\tvar right=NaN;\n\t\tright=verticles[rightI];\n\t\tvar top=NaN;\n\t\ttop=verticles[topI+1];\n\t\tvar bottom=NaN;\n\t\tbottom=verticles[bottomI+1];\n\t\tvar rst;\n\t\treturn [right,bottom,left-right,top-bottom];\n\t}\n\n\tMeshTools.adptTexture=function(mesh){\n\t\tvar rec;\n\t\trec=MeshTools.findWrapRect(mesh.uvs);\n\t\tvar oTex;\n\t\tvar nTex;\n\t\toTex=mesh.texture;\n\t\tvar oWidth=oTex.width;\n\t\tvar oHeight=oTex.height;\n\t\tnTex=Texture.create(oTex,rec[0] *oWidth,rec[1] *oHeight,rec[2] *oWidth,rec[3] *oHeight);\n\t\tmesh.texture=nTex;\n\t}\n\n\tMeshTools.isNormalUV=function(uv){\n\t\treturn uv[0]==0 && uv[1]==0 && uv[4]==1 && uv[5]==1;\n\t}\n\n\tMeshTools.solvePoints=function(pointList,oX,oY,v1x,v1y,v2x,v2y,rst){\n\t\trst=rst||[];\n\t\tvar i=0,len=0;\n\t\tlen=pointList.length;\n\t\tvar tRst;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\ttRst=MeshTools.solve2(pointList[i],pointList[i+1],oX,oY,v1x,v1y,v2x,v2y);\n\t\t\trst.push(tRst[0],tRst[1]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tMeshTools.transPoints=function(abs,oX,oY,v1x,v1y,v2x,v2y,rst){\n\t\trst=rst|| [];\n\t\tvar i=0,len=0;\n\t\tlen=abs.length;\n\t\tvar tRst;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\ttRst=MeshTools.transPoint(abs[i],abs[i+1],oX,oY,v1x,v1y,v2x,v2y,rst);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tMeshTools.transPoint=function(a,b,oX,oY,v1x,v1y,v2x,v2y,rst){\n\t\trst=rst|| [];\n\t\tvar nX=NaN;\n\t\tvar nY=NaN;\n\t\tnX=oX+v1x *a+v2x *b;\n\t\tnY=oY+v1y *a+v2y *b;\n\t\trst.push(nX,nY)\n\t\treturn rst;\n\t}\n\n\tMeshTools.solve2=function(rx,ry,oX,oY,v1x,v1y,v2x,v2y,rv,rst){\n\t\t(rv===void 0)&& (rv=false);\n\t\trst=rst||[];\n\t\tvar a=NaN,b=NaN;\n\t\tif (v1x==0){\n\t\t\treturn MeshTools.solve2(rx,ry,oX,oY,v2x,v2y,v1x,v1y,true,rst);\n\t\t};\n\t\tvar dX=NaN;\n\t\tvar dY=NaN;\n\t\tdX=rx-oX;\n\t\tdY=ry-oY;\n\t\tb=(dY-dX *v1y / v1x)/ (v2y-v2x *v1y / v1x);\n\t\ta=(dX-b *v2x)/ v1x;\n\t\tif(rv){\n\t\t\trst.push(b,a);\n\t\t\t}else{\n\t\t\trst.push(a,b);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tMeshTools.solve=function(pointC,point0,v1,v2){\n\t\treturn MeshTools.solve2(pointC.x,pointC.y,point0.x,point0.y,v1.x,v1.y,v2.x,v2.y);\n\t}\n\n\tMeshTools._bestTriangle=[];\n\tMeshTools._absArr=[];\n\treturn MeshTools;\n})()\n\n\n/**\n*@private\n*路径作用器\n*1，生成根据骨骼计算控制点\n*2，根据控制点生成路径，并计算路径上的节点\n*3，根据节点，重新调整骨骼位置\n*/\n//class laya.ani.bone.PathConstraint\nvar PathConstraint=(function(){\n\tfunction PathConstraint(data,bones){\n\t\tthis.target=null;\n\t\tthis.data=null;\n\t\tthis.bones=null;\n\t\tthis.position=NaN;\n\t\tthis.spacing=NaN;\n\t\tthis.rotateMix=NaN;\n\t\tthis.translateMix=NaN;\n\t\tthis._debugKey=false;\n\t\tthis._spaces=null;\n\t\tthis._segments=[];\n\t\tthis._curves=[];\n\t\tthis.data=data;\n\t\tthis.position=data.position;\n\t\tthis.spacing=data.spacing;\n\t\tthis.rotateMix=data.rotateMix;\n\t\tthis.translateMix=data.translateMix;\n\t\tthis.bones=[];\n\t\tvar tBoneIds=this.data.bones;\n\t\tfor (var i=0,n=tBoneIds.length;i < n;i++){\n\t\t\tthis.bones.push(bones[tBoneIds[i]]);\n\t\t}\n\t}\n\n\t__class(PathConstraint,'laya.ani.bone.PathConstraint');\n\tvar __proto=PathConstraint.prototype;\n\t/**\n\t*计算骨骼在路径上的节点\n\t*@param boneSlot\n\t*@param boneMatrixArray\n\t*@param graphics\n\t*/\n\t__proto.apply=function(boneList,graphics){\n\t\tif (!this.target)\n\t\t\treturn;\n\t\tvar tTranslateMix=this.translateMix;\n\t\tvar tRotateMix=this.translateMix;\n\t\tvar tTranslate=tTranslateMix > 0;\n\t\tvar tRotate=tRotateMix > 0;\n\t\tvar tSpacingMode=this.data.spacingMode;\n\t\tvar tLengthSpacing=tSpacingMode==\"length\";\n\t\tvar tRotateMode=this.data.rotateMode;\n\t\tvar tTangents=tRotateMode==\"tangent\";\n\t\tvar tScale=tRotateMode==\"chainScale\";\n\t\tvar lengths=[];\n\t\tvar boneCount=this.bones.length;\n\t\tvar spacesCount=tTangents ? boneCount :boneCount+1;\n\t\tvar spaces=[];\n\t\tthis._spaces=spaces;\n\t\tspaces[0]=this.position;\n\t\tvar spacing=this.spacing;\n\t\tif (tScale || tLengthSpacing){\n\t\t\tfor (var i=0,n=spacesCount-1;i < n;){\n\t\t\t\tvar bone=this.bones[i];\n\t\t\t\tvar length=bone.length;\n\t\t\t\tvar x=length *bone.resultMatrix.a;\n\t\t\t\tvar y=length *bone.resultMatrix.b;\n\t\t\t\tlength=Math.sqrt(x *x+y *y);\n\t\t\t\tif (tScale)\n\t\t\t\t\tlengths[i]=length;\n\t\t\t\tspaces[++i]=tLengthSpacing ? Math.max(0,length+spacing):spacing;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (i=1;i < spacesCount;i++){\n\t\t\t\tspaces[i]=spacing;\n\t\t\t}\n\t\t};\n\t\tvar positions=this.computeWorldPositions(this.target,boneList,graphics,spacesCount,tTangents,this.data.positionMode==\"percent\",tSpacingMode==\"percent\");\n\t\tif (this._debugKey){\n\t\t\tfor (i=0;i < positions.length;i++){\n\t\t\t\tgraphics.drawCircle(positions[i++],positions[i++],5,\"#00ff00\");\n\t\t\t};\n\t\t\tvar tLinePos=[];\n\t\t\tfor (i=0;i < positions.length;i++){\n\t\t\t\ttLinePos.push(positions[i++],positions[i++]);\n\t\t\t}\n\t\t\tgraphics.drawLines(0,0,tLinePos,\"#ff0000\");\n\t\t};\n\t\tvar skeletonX=NaN;\n\t\tvar skeletonY=NaN;\n\t\tvar boneX=positions[0];\n\t\tvar boneY=positions[1];\n\t\tvar offsetRotation=this.data.offsetRotation;\n\t\tvar tip=tRotateMode==\"chain\" && offsetRotation==0;\n\t\tvar p=NaN;\n\t\tfor (i=0,p=3;i < boneCount;i++,p+=3){\n\t\t\tbone=this.bones[i];\n\t\t\tbone.resultMatrix.tx+=(boneX-bone.resultMatrix.tx)*tTranslateMix;\n\t\t\tbone.resultMatrix.ty+=(boneY-bone.resultMatrix.ty)*tTranslateMix;\n\t\t\tx=positions[p];\n\t\t\ty=positions[p+1];\n\t\t\tvar dx=x-boneX,dy=y-boneY;\n\t\t\tif (tScale){\n\t\t\t\tlength=lengths[i];\n\t\t\t\tif (length !=0){\n\t\t\t\t\tvar s=(Math.sqrt(dx *dx+dy *dy)/ length-1)*tRotateMix+1;\n\t\t\t\t\tbone.resultMatrix.a *=s;\n\t\t\t\t\tbone.resultMatrix.c *=s;\n\t\t\t\t}\n\t\t\t}\n\t\t\tboneX=x;\n\t\t\tboneY=y;\n\t\t\tif (tRotate){\n\t\t\t\tvar a=bone.resultMatrix.a;\n\t\t\t\tvar b=bone.resultMatrix.c;\n\t\t\t\tvar c=bone.resultMatrix.b;\n\t\t\t\tvar d=bone.resultMatrix.d;\n\t\t\t\tvar r=NaN;\n\t\t\t\tvar cos=NaN;\n\t\t\t\tvar sin=NaN;\n\t\t\t\tif (tTangents){\n\t\t\t\t\tr=positions[p-1];\n\t\t\t\t}\n\t\t\t\telse if (spaces[i+1]==0){\n\t\t\t\t\tr=positions[p+2];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tr=Math.atan2(dy,dx);\n\t\t\t\t}\n\t\t\t\tr-=Math.atan2(c,a)-offsetRotation / 180 *Math.PI;\n\t\t\t\tif (tip){\n\t\t\t\t\tcos=Math.cos(r);\n\t\t\t\t\tsin=Math.sin(r);\n\t\t\t\t\tlength=bone.length;\n\t\t\t\t\tboneX+=(length *(cos *a-sin *c)-dx)*tRotateMix;\n\t\t\t\t\tboneY+=(length *(sin *a+cos *c)-dy)*tRotateMix;\n\t\t\t\t}\n\t\t\t\tif (r > Math.PI){\n\t\t\t\t\tr-=(Math.PI *2);\n\t\t\t\t}\n\t\t\t\telse if (r <-Math.PI){\n\t\t\t\t\tr+=(Math.PI *2);\n\t\t\t\t}\n\t\t\t\tr *=tRotateMix;\n\t\t\t\tcos=Math.cos(r);\n\t\t\t\tsin=Math.sin(r);\n\t\t\t\tbone.resultMatrix.a=cos *a-sin *c;\n\t\t\t\tbone.resultMatrix.c=cos *b-sin *d;\n\t\t\t\tbone.resultMatrix.b=sin *a+cos *c;\n\t\t\t\tbone.resultMatrix.d=sin *b+cos *d;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*计算顶点的世界坐标\n\t*@param boneSlot\n\t*@param boneList\n\t*@param start\n\t*@param count\n\t*@param worldVertices\n\t*@param offset\n\t*/\n\t__proto.computeWorldVertices2=function(boneSlot,boneList,start,count,worldVertices,offset){\n\t\tvar tBones=boneSlot.currDisplayData.bones;\n\t\tvar tWeights=boneSlot.currDisplayData.weights;\n\t\tvar tTriangles=boneSlot.currDisplayData.triangles;\n\t\tvar tMatrix;\n\t\tvar i=0;\n\t\tvar v=0;\n\t\tvar skip=0;\n\t\tvar n=0;\n\t\tvar w=0;\n\t\tvar b=0;\n\t\tvar wx=0;\n\t\tvar wy=0;\n\t\tvar vx=0;\n\t\tvar vy=0;\n\t\tvar bone;\n\t\tvar len=0;\n\t\tif (tBones==null){\n\t\t\tif (!tTriangles)tTriangles=tWeights;\n\t\t\tif (boneSlot.deformData)\n\t\t\t\ttTriangles=boneSlot.deformData;\n\t\t\tvar parentName;\n\t\t\tparentName=boneSlot.parent;\n\t\t\tif (boneList){\n\t\t\t\tlen=boneList.length;\n\t\t\t\tfor (i=0;i < len;i++){\n\t\t\t\t\tif (boneList[i].name==parentName){\n\t\t\t\t\t\tbone=boneList[i];\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tvar tBoneMt;\n\t\t\tif (bone){\n\t\t\t\ttBoneMt=bone.resultMatrix;\n\t\t\t}\n\t\t\tif (!tBoneMt)tBoneMt=PathConstraint._tempMt;\n\t\t\tvar x=tBoneMt.tx;\n\t\t\tvar y=tBoneMt.ty;\n\t\t\tvar a=tBoneMt.a,bb=tBoneMt.b,c=tBoneMt.c,d=tBoneMt.d;\n\t\t\tif(bone)d*=bone.d;\n\t\t\tfor (v=start,w=offset;w < count;v+=2,w+=2){\n\t\t\t\tvx=tTriangles[v],vy=tTriangles[v+1];\n\t\t\t\tworldVertices[w]=vx *a+vy *bb+x;\n\t\t\t\tworldVertices[w+1]=-(vx *c+vy *d+y);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tfor (i=0;i < start;i+=2){\n\t\t\tn=tBones[v];\n\t\t\tv+=n+1;\n\t\t\tskip+=n;\n\t\t};\n\t\tvar skeletonBones=boneList;\n\t\tfor (w=offset,b=skip *3;w < count;w+=2){\n\t\t\twx=0,wy=0;\n\t\t\tn=tBones[v++];\n\t\t\tn+=v;\n\t\t\tfor (;v < n;v++,b+=3){\n\t\t\t\ttMatrix=skeletonBones[tBones[v]].resultMatrix;\n\t\t\t\tvx=tWeights[b];\n\t\t\t\tvy=tWeights[b+1];\n\t\t\t\tvar weight=tWeights[b+2];\n\t\t\t\twx+=(vx *tMatrix.a+vy *tMatrix.c+tMatrix.tx)*weight;\n\t\t\t\twy+=(vx *tMatrix.b+vy *tMatrix.d+tMatrix.ty)*weight;\n\t\t\t}\n\t\t\tworldVertices[w]=wx;\n\t\t\tworldVertices[w+1]=wy;\n\t\t}\n\t}\n\n\t/**\n\t*计算路径上的节点\n\t*@param boneSlot\n\t*@param boneList\n\t*@param graphics\n\t*@param spacesCount\n\t*@param tangents\n\t*@param percentPosition\n\t*@param percentSpacing\n\t*@return\n\t*/\n\t__proto.computeWorldPositions=function(boneSlot,boneList,graphics,spacesCount,tangents,percentPosition,percentSpacing){\n\t\tvar tBones=boneSlot.currDisplayData.bones;\n\t\tvar tWeights=boneSlot.currDisplayData.weights;\n\t\tvar tTriangles=boneSlot.currDisplayData.triangles;\n\t\tvar tRx=0;\n\t\tvar tRy=0;\n\t\tvar nn=0;\n\t\tvar tMatrix;\n\t\tvar tX=NaN;\n\t\tvar tY=NaN;\n\t\tvar tB=0;\n\t\tvar tWeight=0;\n\t\tvar tVertices=[];\n\t\tvar i=0,j=0,n=0;\n\t\tvar verticesLength=boneSlot.currDisplayData.verLen;\n\t\tvar target=boneSlot;\n\t\tvar position=this.position;\n\t\tvar spaces=this._spaces;\n\t\tvar world=[];\n\t\tvar out=[];\n\t\tvar closed=false;\n\t\tvar curveCount=verticesLength / 6;\n\t\tvar prevCurve=-1;\n\t\tvar pathLength=NaN;\n\t\tvar o=0,curve=0;\n\t\tvar p=NaN;\n\t\tvar space=NaN;\n\t\tvar prev=NaN;\n\t\tvar length=NaN;\n\t\tif (!true){\n\t\t\tvar lengths=boneSlot.currDisplayData.lengths;\n\t\t\tcurveCount-=closed ? 1 :2;\n\t\t\tpathLength=lengths[curveCount];\n\t\t\tif (percentPosition)\n\t\t\t\tposition *=pathLength;\n\t\t\tif (percentSpacing){\n\t\t\t\tfor (i=0;i < spacesCount;i++)\n\t\t\t\tspaces[i] *=pathLength;\n\t\t\t}\n\t\t\tworld.length=8;\n\t\t\tfor (i=0,o=0,curve=0;i < spacesCount;i++,o+=3){\n\t\t\t\tspace=spaces[i];\n\t\t\t\tposition+=space;\n\t\t\t\tp=position;\n\t\t\t\tif (closed){\n\t\t\t\t\tp %=pathLength;\n\t\t\t\t\tif (p < 0)\n\t\t\t\t\t\tp+=pathLength;\n\t\t\t\t\tcurve=0;\n\t\t\t\t}\n\t\t\t\telse if (p < 0){\n\t\t\t\t\tif (prevCurve !=PathConstraint.BEFORE){\n\t\t\t\t\t\tprevCurve=PathConstraint.BEFORE;\n\t\t\t\t\t\tthis.computeWorldVertices2(target,boneList,2,4,world,0);\n\t\t\t\t\t}\n\t\t\t\t\tthis.addBeforePosition(p,world,0,out,o);\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\telse if (p > pathLength){\n\t\t\t\t\tif (prevCurve !=PathConstraint.AFTER){\n\t\t\t\t\t\tprevCurve=PathConstraint.AFTER;\n\t\t\t\t\t\tthis.computeWorldVertices2(target,boneList,verticesLength-6,4,world,0);\n\t\t\t\t\t}\n\t\t\t\t\tthis.addAfterPosition(p-pathLength,world,0,out,o);\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tfor (;;curve++){\n\t\t\t\t\tlength=lengths[curve];\n\t\t\t\t\tif (p > length)\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\tif (curve==0)\n\t\t\t\t\t\tp /=length;\n\t\t\t\t\telse {\n\t\t\t\t\t\tprev=lengths[curve-1];\n\t\t\t\t\t\tp=(p-prev)/ (length-prev);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t\tif (curve !=prevCurve){\n\t\t\t\t\tprevCurve=curve;\n\t\t\t\t\tif (closed && curve==curveCount){\n\t\t\t\t\t\tthis.computeWorldVertices2(target,boneList,verticesLength-4,4,world,0);\n\t\t\t\t\t\tthis.computeWorldVertices2(target,boneList,0,4,world,4);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tthis.computeWorldVertices2(target,boneList,curve *6+2,8,world,0);\n\t\t\t\t}\n\t\t\t\tthis.addCurvePosition(p,world[0],world[1],world[2],world[3],world[4],world[5],world[6],world[7],out,o,tangents || (i > 0 && space==0));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\tif (closed){\n\t\t\tverticesLength+=2;\n\t\t\tworld[verticesLength-2]=world[0];\n\t\t\tworld[verticesLength-1]=world[1];\n\t\t}\n\t\telse {\n\t\t\tcurveCount--;\n\t\t\tverticesLength-=4;\n\t\t\tthis.computeWorldVertices2(boneSlot,boneList,2,verticesLength,tVertices,0);\n\t\t\tif (this._debugKey){\n\t\t\t\tfor (i=0;i < tVertices.length;){\n\t\t\t\t\tgraphics.drawCircle(tVertices[i++],tVertices[i++],10,\"#ff0000\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tworld=tVertices;\n\t\t}\n\t\tthis._curves.length=curveCount;\n\t\tvar curves=this._curves;\n\t\tpathLength=0;\n\t\tvar x1=world[0],y1=world[1],cx1=0,cy1=0,cx2=0,cy2=0,x2=0,y2=0;\n\t\tvar tmpx=NaN,tmpy=NaN,dddfx=NaN,dddfy=NaN,ddfx=NaN,ddfy=NaN,dfx=NaN,dfy=NaN;\n\t\tvar w=0;\n\t\tfor (i=0,w=2;i < curveCount;i++,w+=6){\n\t\t\tcx1=world[w];\n\t\t\tcy1=world[w+1];\n\t\t\tcx2=world[w+2];\n\t\t\tcy2=world[w+3];\n\t\t\tx2=world[w+4];\n\t\t\ty2=world[w+5];\n\t\t\ttmpx=(x1-cx1 *2+cx2)*0.1875;\n\t\t\ttmpy=(y1-cy1 *2+cy2)*0.1875;\n\t\t\tdddfx=((cx1-cx2)*3-x1+x2)*0.09375;\n\t\t\tdddfy=((cy1-cy2)*3-y1+y2)*0.09375;\n\t\t\tddfx=tmpx *2+dddfx;\n\t\t\tddfy=tmpy *2+dddfy;\n\t\t\tdfx=(cx1-x1)*0.75+tmpx+dddfx *0.16666667;\n\t\t\tdfy=(cy1-y1)*0.75+tmpy+dddfy *0.16666667;\n\t\t\tpathLength+=Math.sqrt(dfx *dfx+dfy *dfy);\n\t\t\tdfx+=ddfx;\n\t\t\tdfy+=ddfy;\n\t\t\tddfx+=dddfx;\n\t\t\tddfy+=dddfy;\n\t\t\tpathLength+=Math.sqrt(dfx *dfx+dfy *dfy);\n\t\t\tdfx+=ddfx;\n\t\t\tdfy+=ddfy;\n\t\t\tpathLength+=Math.sqrt(dfx *dfx+dfy *dfy);\n\t\t\tdfx+=ddfx+dddfx;\n\t\t\tdfy+=ddfy+dddfy;\n\t\t\tpathLength+=Math.sqrt(dfx *dfx+dfy *dfy);\n\t\t\tcurves[i]=pathLength;\n\t\t\tx1=x2;\n\t\t\ty1=y2;\n\t\t}\n\t\tif (percentPosition)\n\t\t\tposition *=pathLength;\n\t\tif (percentSpacing){\n\t\t\tfor (i=0;i < spacesCount;i++)\n\t\t\tspaces[i] *=pathLength;\n\t\t};\n\t\tvar segments=this._segments;\n\t\tvar curveLength=0;\n\t\tvar segment=0;\n\t\tfor (i=0,o=0,curve=0,segment=0;i < spacesCount;i++,o+=3){\n\t\t\tspace=spaces[i];\n\t\t\tposition+=space;\n\t\t\tp=position;\n\t\t\tif (closed){\n\t\t\t\tp %=pathLength;\n\t\t\t\tif (p < 0)\n\t\t\t\t\tp+=pathLength;\n\t\t\t\tcurve=0;\n\t\t\t}\n\t\t\telse if (p < 0){\n\t\t\t\tthis.addBeforePosition(p,world,0,out,o);\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\telse if (p > pathLength){\n\t\t\t\tthis.addAfterPosition(p-pathLength,world,verticesLength-4,out,o);\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tfor (;;curve++){\n\t\t\t\tlength=curves[curve];\n\t\t\t\tif (p > length)\n\t\t\t\t\tcontinue ;\n\t\t\t\tif (curve==0)\n\t\t\t\t\tp /=length;\n\t\t\t\telse {\n\t\t\t\t\tprev=curves[curve-1];\n\t\t\t\t\tp=(p-prev)/ (length-prev);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tif (curve !=prevCurve){\n\t\t\t\tprevCurve=curve;\n\t\t\t\tvar ii=curve *6;\n\t\t\t\tx1=world[ii];\n\t\t\t\ty1=world[ii+1];\n\t\t\t\tcx1=world[ii+2];\n\t\t\t\tcy1=world[ii+3];\n\t\t\t\tcx2=world[ii+4];\n\t\t\t\tcy2=world[ii+5];\n\t\t\t\tx2=world[ii+6];\n\t\t\t\ty2=world[ii+7];\n\t\t\t\ttmpx=(x1-cx1 *2+cx2)*0.03;\n\t\t\t\ttmpy=(y1-cy1 *2+cy2)*0.03;\n\t\t\t\tdddfx=((cx1-cx2)*3-x1+x2)*0.006;\n\t\t\t\tdddfy=((cy1-cy2)*3-y1+y2)*0.006;\n\t\t\t\tddfx=tmpx *2+dddfx;\n\t\t\t\tddfy=tmpy *2+dddfy;\n\t\t\t\tdfx=(cx1-x1)*0.3+tmpx+dddfx *0.16666667;\n\t\t\t\tdfy=(cy1-y1)*0.3+tmpy+dddfy *0.16666667;\n\t\t\t\tcurveLength=Math.sqrt(dfx *dfx+dfy *dfy);\n\t\t\t\tsegments[0]=curveLength;\n\t\t\t\tfor (ii=1;ii < 8;ii++){\n\t\t\t\t\tdfx+=ddfx;\n\t\t\t\t\tdfy+=ddfy;\n\t\t\t\t\tddfx+=dddfx;\n\t\t\t\t\tddfy+=dddfy;\n\t\t\t\t\tcurveLength+=Math.sqrt(dfx *dfx+dfy *dfy);\n\t\t\t\t\tsegments[ii]=curveLength;\n\t\t\t\t}\n\t\t\t\tdfx+=ddfx;\n\t\t\t\tdfy+=ddfy;\n\t\t\t\tcurveLength+=Math.sqrt(dfx *dfx+dfy *dfy);\n\t\t\t\tsegments[8]=curveLength;\n\t\t\t\tdfx+=ddfx+dddfx;\n\t\t\t\tdfy+=ddfy+dddfy;\n\t\t\t\tcurveLength+=Math.sqrt(dfx *dfx+dfy *dfy);\n\t\t\t\tsegments[9]=curveLength;\n\t\t\t\tsegment=0;\n\t\t\t}\n\t\t\tp *=curveLength;\n\t\t\tfor (;;segment++){\n\t\t\t\tlength=segments[segment];\n\t\t\t\tif (p > length)\n\t\t\t\t\tcontinue ;\n\t\t\t\tif (segment==0)\n\t\t\t\t\tp /=length;\n\t\t\t\telse {\n\t\t\t\t\tprev=segments[segment-1];\n\t\t\t\t\tp=segment+(p-prev)/ (length-prev);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tthis.addCurvePosition(p *0.1,x1,y1,cx1,cy1,cx2,cy2,x2,y2,out,o,tangents || (i > 0 && space==0));\n\t\t}\n\t\treturn out;\n\t}\n\n\t__proto.addBeforePosition=function(p,temp,i,out,o){\n\t\tvar x1=temp[i],y1=temp[i+1],dx=temp[i+2]-x1,dy=temp[i+3]-y1,r=Math.atan2(dy,dx);\n\t\tout[o]=x1+p *Math.cos(r);\n\t\tout[o+1]=y1+p *Math.sin(r);\n\t\tout[o+2]=r;\n\t}\n\n\t__proto.addAfterPosition=function(p,temp,i,out,o){\n\t\tvar x1=temp[i+2],y1=temp[i+3],dx=x1-temp[i],dy=y1-temp[i+1],r=Math.atan2(dy,dx);\n\t\tout[o]=x1+p *Math.cos(r);\n\t\tout[o+1]=y1+p *Math.sin(r);\n\t\tout[o+2]=r;\n\t}\n\n\t__proto.addCurvePosition=function(p,x1,y1,cx1,cy1,cx2,cy2,x2,y2,out,o,tangents){\n\t\tif (p==0)\n\t\t\tp=0.0001;\n\t\tvar tt=p *p,ttt=tt *p,u=1-p,uu=u *u,uuu=uu *u;\n\t\tvar ut=u *p,ut3=ut *3,uut3=u *ut3,utt3=ut3 *p;\n\t\tvar x=x1 *uuu+cx1 *uut3+cx2 *utt3+x2 *ttt,y=y1 *uuu+cy1 *uut3+cy2 *utt3+y2 *ttt;\n\t\tout[o]=x;\n\t\tout[o+1]=y;\n\t\tif (tangents){\n\t\t\tout[o+2]=Math.atan2(y-(y1 *uu+cy1 *ut *2+cy2 *tt),x-(x1 *uu+cx1 *ut *2+cx2 *tt));\n\t\t}\n\t\telse {\n\t\t\tout[o+2]=0;\n\t\t}\n\t}\n\n\tPathConstraint.NONE=-1;\n\tPathConstraint.BEFORE=-2;\n\tPathConstraint.AFTER=-3;\n\t__static(PathConstraint,\n\t['_tempMt',function(){return this._tempMt=new Matrix();}\n\t]);\n\treturn PathConstraint;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.PathConstraintData\nvar PathConstraintData=(function(){\n\tfunction PathConstraintData(){\n\t\tthis.name=null;\n\t\tthis.target=null;\n\t\tthis.positionMode=null;\n\t\tthis.spacingMode=null;\n\t\tthis.rotateMode=null;\n\t\tthis.offsetRotation=NaN;\n\t\tthis.position=NaN;\n\t\tthis.spacing=NaN;\n\t\tthis.rotateMix=NaN;\n\t\tthis.translateMix=NaN;\n\t\tthis.bones=[];\n\t}\n\n\t__class(PathConstraintData,'laya.ani.bone.PathConstraintData');\n\treturn PathConstraintData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.SkinData\nvar SkinData=(function(){\n\tfunction SkinData(){\n\t\tthis.name=null;\n\t\tthis.slotArr=[];\n\t}\n\n\t__class(SkinData,'laya.ani.bone.SkinData');\n\treturn SkinData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.SkinSlotDisplayData\nvar SkinSlotDisplayData=(function(){\n\tfunction SkinSlotDisplayData(){\n\t\tthis.name=null;\n\t\tthis.attachmentName=null;\n\t\tthis.type=0;\n\t\tthis.transform=null;\n\t\tthis.width=NaN;\n\t\tthis.height=NaN;\n\t\tthis.texture=null;\n\t\tthis.bones=null;\n\t\tthis.uvs=null;\n\t\tthis.weights=null;\n\t\tthis.triangles=null;\n\t\tthis.vertices=null;\n\t\tthis.lengths=null;\n\t\tthis.verLen=0;\n\t}\n\n\t__class(SkinSlotDisplayData,'laya.ani.bone.SkinSlotDisplayData');\n\tvar __proto=SkinSlotDisplayData.prototype;\n\t__proto.createTexture=function(currTexture){\n\t\tif (this.texture)return this.texture;\n\t\tthis.texture=new Texture(currTexture.bitmap,this.uvs);\n\t\tif (this.uvs[0] > this.uvs[4]\n\t\t\t&& this.uvs[1] > this.uvs[5]){\n\t\t\tthis.texture.width=currTexture.height;\n\t\t\tthis.texture.height=currTexture.width;\n\t\t\tthis.texture.offsetX=-currTexture.offsetX;\n\t\t\tthis.texture.offsetY=-currTexture.offsetY;\n\t\t\tthis.texture.sourceWidth=currTexture.sourceHeight;\n\t\t\tthis.texture.sourceHeight=currTexture.sourceWidth;\n\t\t\t}else {\n\t\t\tthis.texture.width=currTexture.width;\n\t\t\tthis.texture.height=currTexture.height;\n\t\t\tthis.texture.offsetX=-currTexture.offsetX;\n\t\t\tthis.texture.offsetY=-currTexture.offsetY;\n\t\t\tthis.texture.sourceWidth=currTexture.sourceWidth;\n\t\t\tthis.texture.sourceHeight=currTexture.sourceHeight;\n\t\t}\n\t\tif (!Render.isWebGL){\n\t\t\tif (this.uvs[1] > this.uvs[5]){\n\t\t\t\tthis.texture.offsetY=this.texture.sourceHeight-this.texture.height-this.texture.offsetY;\n\t\t\t}\n\t\t}\n\t\treturn this.texture;\n\t}\n\n\t__proto.destory=function(){\n\t\tif (this.texture)this.texture.destroy();\n\t}\n\n\treturn SkinSlotDisplayData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.SlotData\nvar SlotData=(function(){\n\tfunction SlotData(){\n\t\tthis.name=null;\n\t\tthis.displayArr=[];\n\t}\n\n\t__class(SlotData,'laya.ani.bone.SlotData');\n\tvar __proto=SlotData.prototype;\n\t__proto.getDisplayByName=function(name){\n\t\tvar tDisplay;\n\t\tfor (var i=0,n=this.displayArr.length;i < n;i++){\n\t\t\ttDisplay=this.displayArr[i];\n\t\t\tif (tDisplay.attachmentName==name){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn-1;\n\t}\n\n\treturn SlotData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.TfConstraint\nvar TfConstraint=(function(){\n\tfunction TfConstraint(data,bones){\n\t\tthis._data=null;\n\t\tthis._bones=null;\n\t\tthis.target=null;\n\t\tthis.rotateMix=NaN;\n\t\tthis.translateMix=NaN;\n\t\tthis.scaleMix=NaN;\n\t\tthis.shearMix=NaN;\n\t\tthis._temp=__newvec(2,0);\n\t\tthis._data=data;\n\t\tif (this._bones==null){\n\t\t\tthis._bones=[];\n\t\t}\n\t\tthis.target=bones[data.targetIndex];\n\t\tvar j=0,n=0;\n\t\tfor (j=0,n=data.boneIndexs.length;j < n;j++){\n\t\t\tthis._bones.push(bones[data.boneIndexs[j]]);\n\t\t}\n\t\tthis.rotateMix=data.rotateMix;\n\t\tthis.translateMix=data.translateMix;\n\t\tthis.scaleMix=data.scaleMix;\n\t\tthis.shearMix=data.shearMix;\n\t}\n\n\t__class(TfConstraint,'laya.ani.bone.TfConstraint');\n\tvar __proto=TfConstraint.prototype;\n\t__proto.apply=function(){\n\t\tvar tTfBone;\n\t\tvar ta=this.target.resultMatrix.a,tb=this.target.resultMatrix.b,tc=this.target.resultMatrix.c,td=this.target.resultMatrix.d;\n\t\tfor (var j=0,n=this._bones.length;j < n;j++){\n\t\t\ttTfBone=this._bones[j];\n\t\t\tif (this.rotateMix > 0){\n\t\t\t\tvar a=tTfBone.resultMatrix.a,b=tTfBone.resultMatrix.b,c=tTfBone.resultMatrix.c,d=tTfBone.resultMatrix.d;\n\t\t\t\tvar r=Math.atan2(tc,ta)-Math.atan2(c,a)+this._data.offsetRotation *Math.PI / 180;\n\t\t\t\tif (r > Math.PI)\n\t\t\t\t\tr-=Math.PI *2;\n\t\t\t\telse if (r <-Math.PI)r+=Math.PI *2;\n\t\t\t\tr *=this.rotateMix;\n\t\t\t\tvar cos=Math.cos(r),sin=Math.sin(r);\n\t\t\t\ttTfBone.resultMatrix.a=cos *a-sin *c;\n\t\t\t\ttTfBone.resultMatrix.b=cos *b-sin *d;\n\t\t\t\ttTfBone.resultMatrix.c=sin *a+cos *c;\n\t\t\t\ttTfBone.resultMatrix.d=sin *b+cos *d;\n\t\t\t}\n\t\t\tif (this.translateMix){\n\t\t\t\tthis._temp[0]=this._data.offsetX;\n\t\t\t\tthis._temp[1]=this._data.offsetY;\n\t\t\t\tthis.target.localToWorld(this._temp);\n\t\t\t\ttTfBone.resultMatrix.tx+=(this._temp[0]-tTfBone.resultMatrix.tx)*this.translateMix;\n\t\t\t\ttTfBone.resultMatrix.ty+=(this._temp[1]-tTfBone.resultMatrix.ty)*this.translateMix;\n\t\t\t\ttTfBone.updateChild();\n\t\t\t}\n\t\t\tif (this.scaleMix > 0){\n\t\t\t\tvar bs=Math.sqrt(tTfBone.resultMatrix.a *tTfBone.resultMatrix.a+tTfBone.resultMatrix.c *tTfBone.resultMatrix.c);\n\t\t\t\tvar ts=Math.sqrt(ta *ta+tc *tc);\n\t\t\t\tvar s=bs > 0.00001 ? (bs+(ts-bs+this._data.offsetScaleX)*this.scaleMix)/ bs :0;\n\t\t\t\ttTfBone.resultMatrix.a *=s;\n\t\t\t\ttTfBone.resultMatrix.c *=s;\n\t\t\t\tbs=Math.sqrt(tTfBone.resultMatrix.b *tTfBone.resultMatrix.b+tTfBone.resultMatrix.d *tTfBone.resultMatrix.d);\n\t\t\t\tts=Math.sqrt(tb *tb+td *td);\n\t\t\t\ts=bs > 0.00001 ? (bs+(ts-bs+this._data.offsetScaleY)*this.scaleMix)/ bs :0;\n\t\t\t\ttTfBone.resultMatrix.b *=s;\n\t\t\t\ttTfBone.resultMatrix.d *=s;\n\t\t\t}\n\t\t\tif (this.shearMix > 0){\n\t\t\t\tb=tTfBone.resultMatrix.b,d=tTfBone.resultMatrix.d;\n\t\t\t\tvar by=Math.atan2(d,b);\n\t\t\t\tr=Math.atan2(td,tb)-Math.atan2(tc,ta)-(by-Math.atan2(tTfBone.resultMatrix.c,tTfBone.resultMatrix.a));\n\t\t\t\tif (r > Math.PI)\n\t\t\t\t\tr-=Math.PI *2;\n\t\t\t\telse if (r <-Math.PI)r+=Math.PI *2;\n\t\t\t\tr=by+(r+this._data.offsetShearY *Math.PI / 180)*this.shearMix;\n\t\t\t\ts=Math.sqrt(b *b+d *d);\n\t\t\t\ttTfBone.resultMatrix.b=Math.cos(r)*s;\n\t\t\t\ttTfBone.resultMatrix.d=Math.sin(r)*s;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn TfConstraint;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.TfConstraintData\nvar TfConstraintData=(function(){\n\tfunction TfConstraintData(){\n\t\tthis.name=null;\n\t\tthis.targetIndex=0;\n\t\tthis.rotateMix=NaN;\n\t\tthis.translateMix=NaN;\n\t\tthis.scaleMix=NaN;\n\t\tthis.shearMix=NaN;\n\t\tthis.offsetRotation=NaN;\n\t\tthis.offsetX=NaN;\n\t\tthis.offsetY=NaN;\n\t\tthis.offsetScaleX=NaN;\n\t\tthis.offsetScaleY=NaN;\n\t\tthis.offsetShearY=NaN;\n\t\tthis.boneIndexs=[];\n\t}\n\n\t__class(TfConstraintData,'laya.ani.bone.TfConstraintData');\n\treturn TfConstraintData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.ani.bone.Transform\nvar Transform=(function(){\n\tfunction Transform(){\n\t\tthis.skX=0;\n\t\tthis.skY=0;\n\t\tthis.scX=1;\n\t\tthis.scY=1;\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tthis.skewX=0;\n\t\tthis.skewY=0;\n\t\tthis.mMatrix=null;\n\t}\n\n\t__class(Transform,'laya.ani.bone.Transform');\n\tvar __proto=Transform.prototype;\n\t__proto.initData=function(data){\n\t\tif (data.x !=undefined){\n\t\t\tthis.x=data.x;\n\t\t}\n\t\tif (data.y !=undefined){\n\t\t\tthis.y=data.y;\n\t\t}\n\t\tif (data.skX !=undefined){\n\t\t\tthis.skX=data.skX;\n\t\t}\n\t\tif (data.skY !=undefined){\n\t\t\tthis.skY=data.skY;\n\t\t}\n\t\tif (data.scX !=undefined){\n\t\t\tthis.scX=data.scX;\n\t\t}\n\t\tif (data.scY !=undefined){\n\t\t\tthis.scY=data.scY;\n\t\t}\n\t}\n\n\t__proto.getMatrix=function(){\n\t\tvar tMatrix;\n\t\tif (this.mMatrix){\n\t\t\ttMatrix=this.mMatrix;\n\t\t\t}else {\n\t\t\ttMatrix=this.mMatrix=new Matrix();\n\t\t}\n\t\ttMatrix.identity();\n\t\ttMatrix.scale(this.scX,this.scY);\n\t\tif (this.skewX || this.skewY){\n\t\t\tthis.skew(tMatrix,this.skewX *Math.PI / 180,this.skewY *Math.PI / 180);\n\t\t}\n\t\ttMatrix.rotate(this.skX *Math.PI / 180);\n\t\ttMatrix.translate(this.x,this.y);\n\t\treturn tMatrix;\n\t}\n\n\t__proto.skew=function(m,x,y){\n\t\tvar sinX=Math.sin(y);\n\t\tvar cosX=Math.cos(y);\n\t\tvar sinY=Math.sin(x);\n\t\tvar cosY=Math.cos(x);\n\t\tm.setTo(m.a *cosY-m.b *sinX,\n\t\tm.a *sinY+m.b *cosX,\n\t\tm.c *cosY-m.d *sinX,\n\t\tm.c *sinY+m.d *cosX,\n\t\tm.tx *cosY-m.ty *sinX,\n\t\tm.tx *sinY+m.ty *cosX);\n\t\treturn m;\n\t}\n\n\treturn Transform;\n})()\n\n\n/**\n*用于UV转换的工具类\n*@private\n*/\n//class laya.ani.bone.UVTools\nvar UVTools=(function(){\n\tfunction UVTools(){}\n\t__class(UVTools,'laya.ani.bone.UVTools');\n\tUVTools.getRelativeUV=function(bigUV,smallUV,rst){\n\t\tvar startX=bigUV[0];\n\t\tvar width=bigUV[2]-bigUV[0];\n\t\tvar startY=bigUV[1];\n\t\tvar height=bigUV[5]-bigUV[1];\n\t\tif(!rst)rst=[];\n\t\trst.length=smallUV.length;\n\t\tvar i=0,len=0;\n\t\tlen=rst.length;\n\t\tvar dWidth=1 / width;\n\t\tvar dHeight=1 / height;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\trst[i]=(smallUV[i]-startX)*dWidth;\n\t\t\trst[i+1]=(smallUV[i+1]-startY)*dHeight;\n\t\t}\n\t\treturn rst;\n\t}\n\n\tUVTools.getAbsoluteUV=function(bigUV,smallUV,rst){\n\t\tif (bigUV[0]==0 && bigUV[1]==0 && bigUV[4]==1 && bigUV[5]==1){\n\t\t\tif (rst){\n\t\t\t\tUtils.copyArray(rst,smallUV);\n\t\t\t\treturn rst;\n\t\t\t\t}else{\n\t\t\t\treturn smallUV;\n\t\t\t}\n\t\t};\n\t\tvar startX=bigUV[0];\n\t\tvar width=bigUV[2]-bigUV[0];\n\t\tvar startY=bigUV[1];\n\t\tvar height=bigUV[5]-bigUV[1];\n\t\tif(!rst)rst=[];\n\t\trst.length=smallUV.length;\n\t\tvar i=0,len=0;\n\t\tlen=rst.length;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\trst[i]=smallUV[i]*width+startX;\n\t\t\trst[i+1]=smallUV[i+1]*height+startY;\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn UVTools;\n})()\n\n\n/**\n*@private\n*@author ...\n*/\n//class laya.ani.KeyFramesContent\nvar KeyFramesContent=(function(){\n\tfunction KeyFramesContent(){\n\t\tthis.startTime=NaN;\n\t\tthis.duration=NaN;\n\t\tthis.interpolationData=null;\n\t\t//私有插值方式 [type0(插值类型),Data0(插值数据,可为空)，type1(插值类型),Data1(插值数据,可为空)] 注意：254全线性插值，255全不插值\n\t\tthis.data=null;\n\t\t//=new Float32Array();\n\t\tthis.nextData=null;\n\t}\n\n\t__class(KeyFramesContent,'laya.ani.KeyFramesContent');\n\treturn KeyFramesContent;\n})()\n\n\n/**\n*@private\n*...\n*@author ww\n*/\n//class laya.ani.math.BezierLerp\nvar BezierLerp=(function(){\n\tfunction BezierLerp(){}\n\t__class(BezierLerp,'laya.ani.math.BezierLerp');\n\tBezierLerp.getBezierRate=function(t,px0,py0,px1,py1){\n\t\tvar key=BezierLerp._getBezierParamKey(px0,py0,px1,py1);\n\t\tvar vKey=key *100+t;\n\t\tif (BezierLerp._bezierResultCache[vKey])return BezierLerp._bezierResultCache[vKey];\n\t\tvar points=BezierLerp._getBezierPoints(px0,py0,px1,py1,key);\n\t\tvar i=0,len=0;\n\t\tlen=points.length;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\tif (t <=points[i]){\n\t\t\t\tBezierLerp._bezierResultCache[vKey]=points[i+1];\n\t\t\t\treturn points[i+1];\n\t\t\t}\n\t\t}\n\t\tBezierLerp._bezierResultCache[vKey]=1;\n\t\treturn 1;\n\t}\n\n\tBezierLerp._getBezierParamKey=function(px0,py0,px1,py1){\n\t\treturn (((px0 *100+py0)*100+px1)*100+py1)*100;\n\t}\n\n\tBezierLerp._getBezierPoints=function(px0,py0,px1,py1,key){\n\t\tif (BezierLerp._bezierPointsCache[key])return BezierLerp._bezierPointsCache[key];\n\t\tvar controlPoints;\n\t\tcontrolPoints=[0,0,px0,py0,px1,py1,1,1];\n\t\tvar bz;\n\t\tbz=new Bezier();\n\t\tvar points;\n\t\tpoints=bz.getBezierPoints(controlPoints,100,3);\n\t\tBezierLerp._bezierPointsCache[key]=points;\n\t\treturn points;\n\t}\n\n\tBezierLerp._bezierResultCache={};\n\tBezierLerp._bezierPointsCache={};\n\treturn BezierLerp;\n})()\n\n\n/**\n*<code>AnimationPlayer</code> 类用于动画播放器。\n*/\n//class laya.ani.AnimationPlayer extends laya.events.EventDispatcher\nvar AnimationPlayer=(function(_super){\n\tfunction AnimationPlayer(){\n\t\t/**@private */\n\t\tthis._destroyed=false;\n\t\t/**数据模板*/\n\t\tthis._templet=null;\n\t\t/**当前精确时间，不包括重播时间*/\n\t\tthis._currentTime=NaN;\n\t\t/**当前帧时间，不包括重播时间*/\n\t\tthis._currentFrameTime=NaN;\n\t\t/**动画播放的起始时间位置*/\n\t\tthis._playStart=NaN;\n\t\t/**动画播放的结束时间位置*/\n\t\tthis._playEnd=NaN;\n\t\t/**动画播放一次的总时间*/\n\t\tthis._playDuration=NaN;\n\t\t/**动画播放总时间*/\n\t\tthis._overallDuration=NaN;\n\t\t/**是否在一帧结束时停止*/\n\t\tthis._stopWhenCircleFinish=false;\n\t\t/**已播放时间，包括重播时间*/\n\t\tthis._elapsedPlaybackTime=NaN;\n\t\t/**播放时帧数*/\n\t\tthis._startUpdateLoopCount=NaN;\n\t\t/**当前动画索引*/\n\t\tthis._currentAnimationClipIndex=0;\n\t\t/**当前帧数*/\n\t\tthis._currentKeyframeIndex=0;\n\t\t/**是否暂停*/\n\t\tthis._paused=false;\n\t\t/**默认帧率,必须大于0*/\n\t\tthis._cacheFrameRate=0;\n\t\t/**帧率间隔时间*/\n\t\tthis._cacheFrameRateInterval=NaN;\n\t\t/**缓存播放速率*/\n\t\tthis._cachePlayRate=NaN;\n\t\tthis._fullFrames=null;\n\t\t/**是否缓存*/\n\t\tthis.isCache=true;\n\t\t/**播放速率*/\n\t\tthis.playbackRate=1.0;\n\t\t/**停止时是否归零*/\n\t\tthis.returnToZeroStopped=false;\n\t\tAnimationPlayer.__super.call(this);\n\t\tthis._destroyed=false;\n\t\tthis._currentAnimationClipIndex=-1;\n\t\tthis._currentKeyframeIndex=-1;\n\t\tthis._currentTime=0.0;\n\t\tthis._overallDuration=Number.MAX_VALUE;\n\t\tthis._stopWhenCircleFinish=false;\n\t\tthis._elapsedPlaybackTime=0;\n\t\tthis._startUpdateLoopCount=-1;\n\t\tthis._cachePlayRate=1.0;\n\t\tthis.cacheFrameRate=60;\n\t\tthis.returnToZeroStopped=false;\n\t}\n\n\t__class(AnimationPlayer,'laya.ani.AnimationPlayer',_super);\n\tvar __proto=AnimationPlayer.prototype;\n\tLaya.imps(__proto,{\"laya.resource.IDestroy\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._onTempletLoadedComputeFullKeyframeIndices=function(cachePlayRate,cacheFrameRate,templet){\n\t\tif (this._templet===templet && this._cachePlayRate===cachePlayRate && this._cacheFrameRate===cacheFrameRate)\n\t\t\tthis._computeFullKeyframeIndices();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._computeFullKeyframeIndices=function(){\n\t\tvar anifullFrames=this._fullFrames=[];\n\t\tvar templet=this._templet;\n\t\tvar cacheFrameInterval=this._cacheFrameRateInterval *this._cachePlayRate;\n\t\tfor (var i=0,iNum=templet.getAnimationCount();i < iNum;i++){\n\t\t\tvar aniFullFrame=[];\n\t\t\tfor (var j=0,jNum=templet.getAnimation(i).nodes.length;j < jNum;j++){\n\t\t\t\tvar node=templet.getAnimation(i).nodes[j];\n\t\t\t\tvar frameCount=Math.floor(node.playTime / cacheFrameInterval+0.01);\n\t\t\t\tvar nodeFullFrames=new Uint16Array(frameCount+1);\n\t\t\t\tvar lastFrameIndex=-1;\n\t\t\t\tfor (var n=0,nNum=node.keyFrame.length;n < nNum;n++){\n\t\t\t\t\tvar keyFrame=node.keyFrame[n];\n\t\t\t\t\tvar tm=keyFrame.startTime;\n\t\t\t\t\tvar endTm=tm+keyFrame.duration+cacheFrameInterval;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tvar frameIndex=Math.floor(tm / cacheFrameInterval+0.5);\n\t\t\t\t\t\tfor (var k=lastFrameIndex+1;k < frameIndex;k++)\n\t\t\t\t\t\tnodeFullFrames[k]=n;\n\t\t\t\t\t\tlastFrameIndex=frameIndex;\n\t\t\t\t\t\tnodeFullFrames[frameIndex]=n;\n\t\t\t\t\t\ttm+=cacheFrameInterval;\n\t\t\t\t\t}while (tm <=endTm);\n\t\t\t\t}\n\t\t\t\taniFullFrame.push(nodeFullFrames);\n\t\t\t}\n\t\t\tanifullFrames.push(aniFullFrame);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onAnimationTempletLoaded=function(){\n\t\t(this.destroyed)|| (this._calculatePlayDuration());\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculatePlayDuration=function(){\n\t\tif (this.state!==/*laya.ani.AnimationState.stopped*/0){\n\t\t\tvar oriDuration=this._templet.getAniDuration(this._currentAnimationClipIndex);\n\t\t\t(this._playEnd===0)&& (this._playEnd=oriDuration);\n\t\t\tif (this._playEnd > oriDuration)\n\t\t\t\tthis._playEnd=oriDuration;\n\t\t\tthis._playDuration=this._playEnd-this._playStart;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setPlayParams=function(time,cacheFrameInterval){\n\t\tthis._currentTime=time;\n\t\tthis._currentKeyframeIndex=Math.max(Math.floor((this.currentPlayTime)/ cacheFrameInterval+0.01),0);\n\t\tthis._currentFrameTime=this._currentKeyframeIndex *cacheFrameInterval;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setPlayParamsWhenStop=function(currentAniClipPlayDuration,cacheFrameInterval,playEnd){\n\t\t(playEnd===void 0)&& (playEnd=-1);\n\t\tthis._currentTime=currentAniClipPlayDuration;\n\t\tvar endTime=playEnd > 0 ? playEnd :currentAniClipPlayDuration;\n\t\tthis._currentKeyframeIndex=Math.max(Math.floor(endTime / cacheFrameInterval+0.01),0);\n\t\tthis._currentFrameTime=this._currentKeyframeIndex *cacheFrameInterval;\n\t\tthis._currentAnimationClipIndex=-1;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._update=function(elapsedTime){\n\t\tif (this._currentAnimationClipIndex===-1 || this._paused || !this._templet || !this._templet.loaded)\n\t\t\treturn;\n\t\tvar cacheFrameInterval=this._cacheFrameRateInterval *this._cachePlayRate;\n\t\tvar time=0;\n\t\t(this._startUpdateLoopCount!==Stat.loopCount)&& (time=elapsedTime *this.playbackRate,this._elapsedPlaybackTime+=time);\n\t\tvar currentAniClipPlayDuration=this.playDuration;\n\t\ttime+=this._currentTime;\n\t\tif ((this._overallDuration!==0 && this._elapsedPlaybackTime >=this._overallDuration)|| (this._overallDuration===0 && this._elapsedPlaybackTime >=currentAniClipPlayDuration)\n\t\t\t|| (this._overallDuration===0 && time >=this.playEnd)){\n\t\t\tthis._setPlayParamsWhenStop(currentAniClipPlayDuration,cacheFrameInterval,this.playEnd);\n\t\t\tthis.event(/*laya.events.Event.STOPPED*/\"stopped\");\n\t\t\treturn;\n\t\t}\n\t\tif (currentAniClipPlayDuration > 0){\n\t\t\tif (time >=currentAniClipPlayDuration){\n\t\t\t\tdo {\n\t\t\t\t\ttime-=currentAniClipPlayDuration;\n\t\t\t\t\tif (this._stopWhenCircleFinish){\n\t\t\t\t\t\tthis._setPlayParamsWhenStop(currentAniClipPlayDuration,cacheFrameInterval);\n\t\t\t\t\t\tthis._stopWhenCircleFinish=false;\n\t\t\t\t\t\tthis.event(/*laya.events.Event.STOPPED*/\"stopped\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (time < currentAniClipPlayDuration){\n\t\t\t\t\t\tthis._setPlayParams(time,cacheFrameInterval);\n\t\t\t\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\t\t}\n\t\t\t\t}while (time >=currentAniClipPlayDuration)\n\t\t\t\t}else {\n\t\t\t\tthis._setPlayParams(time,cacheFrameInterval);\n\t\t\t}\n\t\t\t}else {\n\t\t\tif (this._stopWhenCircleFinish){\n\t\t\t\tthis._setPlayParamsWhenStop(currentAniClipPlayDuration,cacheFrameInterval);\n\t\t\t\tthis._stopWhenCircleFinish=false;\n\t\t\t\tthis.event(/*laya.events.Event.STOPPED*/\"stopped\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._currentTime=this._currentFrameTime=this._currentKeyframeIndex=0;\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\tthis.offAll();\n\t\tthis._templet=null;\n\t\tthis._fullFrames=null;\n\t\tthis._destroyed=true;\n\t}\n\n\t/**\n\t*播放动画。\n\t*@param index 动画索引。\n\t*@param playbackRate 播放速率。\n\t*@param duration 播放时长（0为1次,Number.MAX_VALUE为循环播放）。\n\t*@param playStart 播放的起始时间位置。\n\t*@param playEnd 播放的结束时间位置。（0为动画一次循环的最长结束时间位置）。\n\t*/\n\t__proto.play=function(index,playbackRate,overallDuration,playStart,playEnd){\n\t\t(index===void 0)&& (index=0);\n\t\t(playbackRate===void 0)&& (playbackRate=1.0);\n\t\t(overallDuration===void 0)&& (overallDuration=2147483647);\n\t\t(playStart===void 0)&& (playStart=0);\n\t\t(playEnd===void 0)&& (playEnd=0);\n\t\tif (!this._templet)\n\t\t\tthrow new Error(\"AnimationPlayer:templet must not be null,maybe you need to set url.\");\n\t\tif (overallDuration < 0 || playStart < 0 || playEnd < 0)\n\t\t\tthrow new Error(\"AnimationPlayer:overallDuration,playStart and playEnd must large than zero.\");\n\t\tif ((playEnd!==0)&& (playStart > playEnd))\n\t\t\tthrow new Error(\"AnimationPlayer:start must less than end.\");\n\t\tthis._currentTime=0;\n\t\tthis._currentFrameTime=0;\n\t\tthis._elapsedPlaybackTime=0;\n\t\tthis.playbackRate=playbackRate;\n\t\tthis._overallDuration=overallDuration;\n\t\tthis._playStart=playStart;\n\t\tthis._playEnd=playEnd;\n\t\tthis._paused=false;\n\t\tthis._currentAnimationClipIndex=index;\n\t\tthis._currentKeyframeIndex=0;\n\t\tthis._startUpdateLoopCount=Stat.loopCount;\n\t\tthis.event(/*laya.events.Event.PLAYED*/\"played\");\n\t\tif (this._templet.loaded)\n\t\t\tthis._calculatePlayDuration();\n\t\telse\n\t\tthis._templet.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._onAnimationTempletLoaded);\n\t\tthis._update(0);\n\t}\n\n\t/**\n\t*播放动画。\n\t*@param index 动画索引。\n\t*@param playbackRate 播放速率。\n\t*@param duration 播放时长（0为1次,Number.MAX_VALUE为循环播放）。\n\t*@param playStartFrame 播放的原始起始帧率位置。\n\t*@param playEndFrame 播放的原始结束帧率位置。（0为动画一次循环的最长结束时间位置）。\n\t*/\n\t__proto.playByFrame=function(index,playbackRate,overallDuration,playStartFrame,playEndFrame,fpsIn3DBuilder){\n\t\t(index===void 0)&& (index=0);\n\t\t(playbackRate===void 0)&& (playbackRate=1.0);\n\t\t(overallDuration===void 0)&& (overallDuration=2147483647);\n\t\t(playStartFrame===void 0)&& (playStartFrame=0);\n\t\t(playEndFrame===void 0)&& (playEndFrame=0);\n\t\t(fpsIn3DBuilder===void 0)&& (fpsIn3DBuilder=30);\n\t\tvar interval=1000.0 / fpsIn3DBuilder;\n\t\tthis.play(index,playbackRate,overallDuration,playStartFrame *interval,playEndFrame *interval);\n\t}\n\n\t/**\n\t*停止播放当前动画\n\t*@param immediate 是否立即停止\n\t*/\n\t__proto.stop=function(immediate){\n\t\t(immediate===void 0)&& (immediate=true);\n\t\tif (immediate){\n\t\t\tthis._currentTime=this._currentFrameTime=this._currentKeyframeIndex=0;\n\t\t\tthis._currentAnimationClipIndex=-1;\n\t\t\tthis.event(/*laya.events.Event.STOPPED*/\"stopped\");\n\t\t\t}else {\n\t\t\tthis._stopWhenCircleFinish=true;\n\t\t}\n\t}\n\n\t/**\n\t*动画播放的结束时间位置。\n\t*@return 结束时间位置。\n\t*/\n\t__getset(0,__proto,'playEnd',function(){\n\t\treturn this._playEnd;\n\t});\n\n\t/**\n\t*设置动画数据模板,注意：修改此值会有计算开销。\n\t*@param value 动画数据模板\n\t*/\n\t/**\n\t*获取动画数据模板\n\t*@param value 动画数据模板\n\t*/\n\t__getset(0,__proto,'templet',function(){\n\t\treturn this._templet;\n\t\t},function(value){\n\t\tif (!this.state===/*laya.ani.AnimationState.stopped*/0)\n\t\t\tthis.stop(true);\n\t\tif (this._templet!==value){\n\t\t\tthis._templet=value;\n\t\t\tif (value.loaded)\n\t\t\t\tthis._computeFullKeyframeIndices();\n\t\t\telse\n\t\t\tvalue.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._onTempletLoadedComputeFullKeyframeIndices,[this._cachePlayRate,this._cacheFrameRate]);\n\t\t}\n\t});\n\n\t/**\n\t*动画播放的起始时间位置。\n\t*@return 起始时间位置。\n\t*/\n\t__getset(0,__proto,'playStart',function(){\n\t\treturn this._playStart;\n\t});\n\n\t/**\n\t*获取动画播放一次的总时间\n\t*@return 动画播放一次的总时间\n\t*/\n\t__getset(0,__proto,'playDuration',function(){\n\t\treturn this._playDuration;\n\t});\n\n\t/**\n\t*获取当前播放状态\n\t*@return 当前播放状态\n\t*/\n\t__getset(0,__proto,'state',function(){\n\t\tif (this._currentAnimationClipIndex===-1)\n\t\t\treturn /*laya.ani.AnimationState.stopped*/0;\n\t\tif (this._paused)\n\t\t\treturn /*laya.ani.AnimationState.paused*/1;\n\t\treturn /*laya.ani.AnimationState.playing*/2;\n\t});\n\n\t/**\n\t*获取当前帧数\n\t*@return 当前帧数\n\t*/\n\t__getset(0,__proto,'currentKeyframeIndex',function(){\n\t\treturn this._currentKeyframeIndex;\n\t});\n\n\t/**\n\t*获取动画播放的总总时间\n\t*@return 动画播放的总时间\n\t*/\n\t__getset(0,__proto,'overallDuration',function(){\n\t\treturn this._overallDuration;\n\t});\n\n\t/**\n\t*获取当前帧时间，不包括重播时间\n\t*@return value 当前时间\n\t*/\n\t__getset(0,__proto,'currentFrameTime',function(){\n\t\treturn this._currentFrameTime;\n\t});\n\n\t/**\n\t*获取当前动画索引\n\t*@return value 当前动画索引\n\t*/\n\t__getset(0,__proto,'currentAnimationClipIndex',function(){\n\t\treturn this._currentAnimationClipIndex;\n\t});\n\n\t/**\n\t*获取当前精确时间，不包括重播时间\n\t*@return value 当前时间\n\t*/\n\t__getset(0,__proto,'currentPlayTime',function(){\n\t\treturn this._currentTime+this._playStart;\n\t});\n\n\t/**\n\t*设置缓存播放速率,默认值为1.0,注意：修改此值会有计算开销。*\n\t*@return value 缓存播放速率。\n\t*/\n\t/**\n\t*获取缓存播放速率。*\n\t*@return 缓存播放速率。\n\t*/\n\t__getset(0,__proto,'cachePlayRate',function(){\n\t\treturn this._cachePlayRate;\n\t\t},function(value){\n\t\tif (this._cachePlayRate!==value){\n\t\t\tthis._cachePlayRate=value;\n\t\t\tif (this._templet)\n\t\t\t\tif (this._templet.loaded)\n\t\t\tthis._computeFullKeyframeIndices();\n\t\t\telse\n\t\t\tthis._templet.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._onTempletLoadedComputeFullKeyframeIndices,[value,this._cacheFrameRate]);\n\t\t}\n\t});\n\n\t/**\n\t*设置默认帧率,每秒60帧,注意：修改此值会有计算开销。*\n\t*@return value 缓存帧率\n\t*/\n\t/**\n\t*获取默认帧率*\n\t*@return value 默认帧率\n\t*/\n\t__getset(0,__proto,'cacheFrameRate',function(){\n\t\treturn this._cacheFrameRate;\n\t\t},function(value){\n\t\tif (this._cacheFrameRate!==value){\n\t\t\tthis._cacheFrameRate=value;\n\t\t\tthis._cacheFrameRateInterval=1000.0 / this._cacheFrameRate;\n\t\t\tif (this._templet)\n\t\t\t\tif (this._templet.loaded)\n\t\t\tthis._computeFullKeyframeIndices();\n\t\t\telse\n\t\t\tthis._templet.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._onTempletLoadedComputeFullKeyframeIndices,[this._cachePlayRate,value]);\n\t\t}\n\t});\n\n\t/**\n\t*设置当前播放位置\n\t*@param value 当前时间\n\t*/\n\t__getset(0,__proto,'currentTime',null,function(value){\n\t\tif (this._currentAnimationClipIndex===-1 || !this._templet || !this._templet.loaded)\n\t\t\treturn;\n\t\tif (value < this._playStart || value > this._playEnd)\n\t\t\tthrow new Error(\"AnimationPlayer:value must large than playStartTime,small than playEndTime.\");\n\t\tthis._startUpdateLoopCount=Stat.loopCount;\n\t\tvar cacheFrameInterval=this._cacheFrameRateInterval *this._cachePlayRate;\n\t\tthis._currentTime=value;\n\t\tthis._currentKeyframeIndex=Math.max(Math.floor(this.currentPlayTime / cacheFrameInterval),0);\n\t\tthis._currentFrameTime=this._currentKeyframeIndex *cacheFrameInterval;\n\t});\n\n\t/**\n\t*设置是否暂停\n\t*@param value 是否暂停\n\t*/\n\t/**\n\t*获取当前是否暂停\n\t*@return 是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\treturn this._paused;\n\t\t},function(value){\n\t\tthis._paused=value;\n\t\tvalue && this.event(/*laya.events.Event.PAUSED*/\"paused\");\n\t});\n\n\t/**\n\t*获取缓存帧率间隔时间\n\t*@return 缓存帧率间隔时间\n\t*/\n\t__getset(0,__proto,'cacheFrameRateInterval',function(){\n\t\treturn this._cacheFrameRateInterval;\n\t});\n\n\t/**\n\t*获取是否已销毁。\n\t*@return 是否已销毁。\n\t*/\n\t__getset(0,__proto,'destroyed',function(){\n\t\treturn this._destroyed;\n\t});\n\n\treturn AnimationPlayer;\n})(EventDispatcher)\n\n\n/**\n*@private\n*/\n//class laya.ani.GraphicsAni extends laya.display.Graphics\nvar GraphicsAni=(function(_super){\n\tfunction GraphicsAni(){\n\t\tGraphicsAni.__super.call(this);\n\t\tif (Render.isConchNode){\n\t\t\tthis[\"drawSkin\"]=function (skin){\n\t\t\t\tskin.transform || (skin.transform=Matrix.EMPTY);\n\t\t\t\t/*__JS__ */this._addCmd([skin]);\n\t\t\t\tthis.setSkinMesh&&this.setSkinMesh(skin._ps,skin.mVBData,skin.mEleNum,0,skin.mTexture,skin.transform);\n\t\t\t};\n\t\t}\n\t}\n\n\t__class(GraphicsAni,'laya.ani.GraphicsAni',_super);\n\tvar __proto=GraphicsAni.prototype;\n\t/**\n\t*@private\n\t*画自定义蒙皮动画\n\t*@param skin\n\t*/\n\t__proto.drawSkin=function(skin){\n\t\tvar arr=[skin];\n\t\tthis._saveToCmd(Render._context._drawSkin,arr);\n\t}\n\n\tGraphicsAni.create=function(){\n\t\tvar rs=GraphicsAni._caches.pop();\n\t\treturn rs||new GraphicsAni();\n\t}\n\n\tGraphicsAni.recycle=function(graphics){\n\t\tgraphics.clear();\n\t\tGraphicsAni._caches.push(graphics);\n\t}\n\n\tGraphicsAni._caches=[];\n\treturn GraphicsAni;\n})(Graphics)\n\n\n/**\n*@private\n*Canvas版本的SkinMesh\n*/\n//class laya.ani.bone.canvasmesh.SkinMeshCanvas extends laya.ani.bone.canvasmesh.CanvasMeshRender\nvar SkinMeshCanvas=(function(_super){\n\tfunction SkinMeshCanvas(){\n\t\tSkinMeshCanvas.__super.call(this);\n\t\tthis.mesh=new MeshData();\n\t}\n\n\t__class(SkinMeshCanvas,'laya.ani.bone.canvasmesh.SkinMeshCanvas',_super);\n\tvar __proto=SkinMeshCanvas.prototype;\n\t__proto.init2=function(texture,vs,ps,verticles,uvs){\n\t\tif (this.transform){\n\t\t\tthis.transform=null;\n\t\t};\n\t\tvar _ps;\n\t\tif (ps){\n\t\t\t_ps=ps;\n\t\t\t}else {\n\t\t\t_ps=[];\n\t\t\t_ps.push(0,1,3,3,1,2);\n\t\t}\n\t\tthis.mesh.texture=texture;\n\t\tthis.mesh.indexes=_ps;\n\t\tthis.mesh.vertices=verticles;\n\t\tthis.mesh.uvs=uvs;\n\t}\n\n\t__proto.render=function(context,x,y){\n\t\tif(!this.mesh.texture)return;\n\t\tif(!this.transform){\n\t\t\tthis.transform=SkinMeshCanvas._tempMatrix;\n\t\t\tthis.transform.identity();\n\t\t\tthis.transform.translate(x,y);\n\t\t\tthis.renderToContext(context);\n\t\t\tthis.transform.translate(-x,-y);\n\t\t\tthis.transform=null;\n\t\t\t}else{\n\t\t\tthis.transform.translate(x,y);\n\t\t\tthis.renderToContext(context);\n\t\t\tthis.transform.translate(-x,-y);\n\t\t}\n\t}\n\n\t__static(SkinMeshCanvas,\n\t['_tempMatrix',function(){return this._tempMatrix=new Matrix();}\n\t]);\n\treturn SkinMeshCanvas;\n})(CanvasMeshRender)\n\n\n/**\n*<code>AnimationTemplet</code> 类用于动画模板资源。\n*/\n//class laya.ani.AnimationTemplet extends laya.resource.Resource\nvar AnimationTemplet=(function(_super){\n\tfunction AnimationTemplet(){\n\t\t/**@private */\n\t\t//this._aniVersion=null;\n\t\t/**@private */\n\t\tthis._aniMap={};\n\t\t/**@private */\n\t\t//this._publicExtData=null;\n\t\t/**@private */\n\t\t//this._useParent=false;\n\t\t/**@private */\n\t\t//this.unfixedCurrentFrameIndexes=null;\n\t\t/**@private */\n\t\t//this.unfixedCurrentTimes=null;\n\t\t/**@private */\n\t\t//this.unfixedKeyframes=null;\n\t\t/**@private */\n\t\tthis.unfixedLastAniIndex=-1;\n\t\t/**@private */\n\t\t//this._aniClassName=null;\n\t\t/**@private */\n\t\t//this._animationDatasCache=null;\n\t\tAnimationTemplet.__super.call(this);\n\t\tthis._anis=new Array;\n\t}\n\n\t__class(AnimationTemplet,'laya.ani.AnimationTemplet',_super);\n\tvar __proto=AnimationTemplet.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto.parse=function(data){\n\t\tvar reader=new Byte(data);\n\t\tthis._aniVersion=reader.readUTFString();\n\t\tAnimationParser01.parse(this,reader);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculateKeyFrame=function(node,keyframeCount,keyframeDataCount){\n\t\tvar keyFrames=node.keyFrame;\n\t\tkeyFrames[keyframeCount]=keyFrames[0];\n\t\tfor (var i=0;i < keyframeCount;i++){\n\t\t\tvar keyFrame=keyFrames[i];\n\t\t\tkeyFrame.nextData=(keyFrame.duration===0)? keyFrame.data :keyFrames[i+1].data;\n\t\t}\n\t\tkeyFrames.length--;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar reader=new Byte(data);\n\t\tthis._aniVersion=reader.readUTFString();\n\t\tswitch (this._aniVersion){\n\t\t\tcase \"LAYAANIMATION:02\":\n\t\t\t\tAnimationParser02.parse(this,reader);\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tAnimationParser01.parse(this,reader);\n\t\t\t}\n\t\tthis._endLoaded();\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.disposeResource=function(){\n\t\tthis._aniVersion=null;\n\t\tthis._anis=null;\n\t\tthis._aniMap=null;\n\t\tthis._publicExtData=null;\n\t\tthis.unfixedCurrentFrameIndexes=null;\n\t\tthis.unfixedCurrentTimes=null;\n\t\tthis.unfixedKeyframes=null;\n\t\tthis._aniClassName=null;\n\t\tthis._animationDatasCache=null;\n\t}\n\n\t__proto.getAnimationCount=function(){\n\t\treturn this._anis.length;\n\t}\n\n\t__proto.getAnimation=function(aniIndex){\n\t\treturn this._anis[aniIndex];\n\t}\n\n\t__proto.getAniDuration=function(aniIndex){\n\t\treturn this._anis[aniIndex].playTime;\n\t}\n\n\t__proto.getNodes=function(aniIndex){\n\t\treturn this._anis[aniIndex].nodes;\n\t}\n\n\t__proto.getNodeIndexWithName=function(aniIndex,name){\n\t\treturn this._anis[aniIndex].bone3DMap[name];\n\t}\n\n\t__proto.getNodeCount=function(aniIndex){\n\t\treturn this._anis[aniIndex].nodes.length;\n\t}\n\n\t__proto.getTotalkeyframesLength=function(aniIndex){\n\t\treturn this._anis[aniIndex].totalKeyframeDatasLength;\n\t}\n\n\t__proto.getPublicExtData=function(){\n\t\treturn this._publicExtData;\n\t}\n\n\t__proto.getAnimationDataWithCache=function(key,cacheDatas,aniIndex,frameIndex){\n\t\tvar aniDatas=cacheDatas[aniIndex];\n\t\tif (!aniDatas){\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tvar keyDatas=aniDatas[key];\n\t\t\tif (!keyDatas)\n\t\t\t\treturn null;\n\t\t\telse {\n\t\t\t\treturn keyDatas[frameIndex];\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.setAnimationDataWithCache=function(key,cacheDatas,aniIndex,frameIndex,data){\n\t\tvar aniDatas=(cacheDatas[aniIndex])|| (cacheDatas[aniIndex]={});\n\t\tvar aniDatasCache=(aniDatas[key])|| (aniDatas[key]=[]);\n\t\taniDatasCache[frameIndex]=data;\n\t}\n\n\t__proto.getOriginalData=function(aniIndex,originalData,nodesFrameIndices,frameIndex,playCurTime){\n\t\tvar oneAni=this._anis[aniIndex];\n\t\tvar nodes=oneAni.nodes;\n\t\tvar j=0;\n\t\tfor (var i=0,n=nodes.length,outOfs=0;i < n;i++){\n\t\t\tvar node=nodes[i];\n\t\t\tvar key;\n\t\t\tkey=node.keyFrame[nodesFrameIndices[i][frameIndex]];\n\t\t\tnode.dataOffset=outOfs;\n\t\t\tvar dt=playCurTime-key.startTime;\n\t\t\tvar lerpType=node.lerpType;\n\t\t\tif (lerpType){\n\t\t\t\tswitch (lerpType){\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tfor (j=0;j < node.keyframeWidth;)\n\t\t\t\t\t\tj+=node.interpolationMethod[j](node,j,originalData,outOfs+j,key.data,dt,null,key.duration,key.nextData);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 2:;\n\t\t\t\t\t\tvar interpolationData=key.interpolationData;\n\t\t\t\t\t\tvar interDataLen=interpolationData.length;\n\t\t\t\t\t\tvar dataIndex=0;\n\t\t\t\t\t\tfor (j=0;j < interDataLen;){\n\t\t\t\t\t\t\tvar type=interpolationData[j];\n\t\t\t\t\t\tswitch (type){\n\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\tj+=AnimationTemplet.interpolation[type](node,dataIndex,originalData,outOfs+dataIndex,key.data,dt,null,key.duration,key.nextData,interpolationData,j+1);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\tj+=AnimationTemplet.interpolation[type](node,dataIndex,originalData,outOfs+dataIndex,key.data,dt,null,key.duration,key.nextData,interpolationData,j+1);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tj+=AnimationTemplet.interpolation[type](node,dataIndex,originalData,outOfs+dataIndex,key.data,dt,null,key.duration,key.nextData);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tdataIndex++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tfor (j=0;j < node.keyframeWidth;)\n\t\t\t\tj+=node.interpolationMethod[j](node,j,originalData,outOfs+j,key.data,dt,null,key.duration,key.nextData);\n\t\t\t}\n\t\t\toutOfs+=node.keyframeWidth;\n\t\t}\n\t}\n\n\t__proto.getNodesCurrentFrameIndex=function(aniIndex,playCurTime){\n\t\tvar ani=this._anis[aniIndex];\n\t\tvar nodes=ani.nodes;\n\t\tif (aniIndex!==this.unfixedLastAniIndex){\n\t\t\tthis.unfixedCurrentFrameIndexes=new Uint32Array(nodes.length);\n\t\t\tthis.unfixedCurrentTimes=new Float32Array(nodes.length);\n\t\t\tthis.unfixedLastAniIndex=aniIndex;\n\t\t}\n\t\tfor (var i=0,n=nodes.length,outOfs=0;i < n;i++){\n\t\t\tvar node=nodes[i];\n\t\t\tif (playCurTime < this.unfixedCurrentTimes[i])\n\t\t\t\tthis.unfixedCurrentFrameIndexes[i]=0;\n\t\t\tthis.unfixedCurrentTimes[i]=playCurTime;\n\t\t\twhile ((this.unfixedCurrentFrameIndexes[i] < node.keyFrame.length)){\n\t\t\t\tif (node.keyFrame[this.unfixedCurrentFrameIndexes[i]].startTime > this.unfixedCurrentTimes[i])\n\t\t\t\t\tbreak ;\n\t\t\t\tthis.unfixedCurrentFrameIndexes[i]++;\n\t\t\t}\n\t\t\tthis.unfixedCurrentFrameIndexes[i]--;\n\t\t}\n\t\treturn this.unfixedCurrentFrameIndexes;\n\t}\n\n\t__proto.getOriginalDataUnfixedRate=function(aniIndex,originalData,playCurTime){\n\t\tvar oneAni=this._anis[aniIndex];\n\t\tvar nodes=oneAni.nodes;\n\t\tif (aniIndex!==this.unfixedLastAniIndex){\n\t\t\tthis.unfixedCurrentFrameIndexes=new Uint32Array(nodes.length);\n\t\t\tthis.unfixedCurrentTimes=new Float32Array(nodes.length);\n\t\t\tthis.unfixedKeyframes=__newvec(nodes.length);\n\t\t\tthis.unfixedLastAniIndex=aniIndex;\n\t\t};\n\t\tvar j=0;\n\t\tfor (var i=0,n=nodes.length,outOfs=0;i < n;i++){\n\t\t\tvar node=nodes[i];\n\t\t\tif (playCurTime < this.unfixedCurrentTimes[i])\n\t\t\t\tthis.unfixedCurrentFrameIndexes[i]=0;\n\t\t\tthis.unfixedCurrentTimes[i]=playCurTime;\n\t\t\twhile (this.unfixedCurrentFrameIndexes[i] < node.keyFrame.length){\n\t\t\t\tif (node.keyFrame[this.unfixedCurrentFrameIndexes[i]].startTime > this.unfixedCurrentTimes[i])\n\t\t\t\t\tbreak ;\n\t\t\t\tthis.unfixedKeyframes[i]=node.keyFrame[this.unfixedCurrentFrameIndexes[i]];\n\t\t\t\tthis.unfixedCurrentFrameIndexes[i]++;\n\t\t\t};\n\t\t\tvar key=this.unfixedKeyframes[i];\n\t\t\tnode.dataOffset=outOfs;\n\t\t\tvar dt=playCurTime-key.startTime;\n\t\t\tvar lerpType=node.lerpType;\n\t\t\tif (lerpType){\n\t\t\t\tswitch (node.lerpType){\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tfor (j=0;j < node.keyframeWidth;)\n\t\t\t\t\t\tj+=node.interpolationMethod[j](node,j,originalData,outOfs+j,key.data,dt,null,key.duration,key.nextData);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 2:;\n\t\t\t\t\t\tvar interpolationData=key.interpolationData;\n\t\t\t\t\t\tvar interDataLen=interpolationData.length;\n\t\t\t\t\t\tvar dataIndex=0;\n\t\t\t\t\t\tfor (j=0;j < interDataLen;){\n\t\t\t\t\t\t\tvar type=interpolationData[j];\n\t\t\t\t\t\tswitch (type){\n\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\tj+=AnimationTemplet.interpolation[type](node,dataIndex,originalData,outOfs+dataIndex,key.data,dt,null,key.duration,key.nextData,interpolationData,j+1);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\tj+=AnimationTemplet.interpolation[type](node,dataIndex,originalData,outOfs+dataIndex,key.data,dt,null,key.duration,key.nextData,interpolationData,j+1);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tj+=AnimationTemplet.interpolation[type](node,dataIndex,originalData,outOfs+dataIndex,key.data,dt,null,key.duration,key.nextData);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tdataIndex++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tfor (j=0;j < node.keyframeWidth;)\n\t\t\t\tj+=node.interpolationMethod[j](node,j,originalData,outOfs+j,key.data,dt,null,key.duration,key.nextData);\n\t\t\t}\n\t\t\toutOfs+=node.keyframeWidth;\n\t\t}\n\t}\n\n\tAnimationTemplet._LinearInterpolation_0=function(bone,index,out,outOfs,data,dt,dData,duration,nextData,interData){\n\t\tvar amount=duration===0 ? 0 :dt / duration;\n\t\tout[outOfs]=(1.0-amount)*data[index]+amount *nextData[index];\n\t\treturn 1;\n\t}\n\n\tAnimationTemplet._QuaternionInterpolation_1=function(bone,index,out,outOfs,data,dt,dData,duration,nextData,interData){\n\t\tvar amount=duration===0 ? 0 :dt / duration;\n\t\tMathUtil.slerpQuaternionArray(data,index,nextData,index,amount,out,outOfs);\n\t\treturn 4;\n\t}\n\n\tAnimationTemplet._AngleInterpolation_2=function(bone,index,out,outOfs,data,dt,dData,duration,nextData,interData){\n\t\treturn 0;\n\t}\n\n\tAnimationTemplet._RadiansInterpolation_3=function(bone,index,out,outOfs,data,dt,dData,duration,nextData,interData){\n\t\treturn 0;\n\t}\n\n\tAnimationTemplet._Matrix4x4Interpolation_4=function(bone,index,out,outOfs,data,dt,dData,duration,nextData,interData){\n\t\tfor (var i=0;i < 16;i++,index++)\n\t\tout[outOfs+i]=data[index]+dt *dData[index];\n\t\treturn 16;\n\t}\n\n\tAnimationTemplet._NoInterpolation_5=function(bone,index,out,outOfs,data,dt,dData,duration,nextData,interData){\n\t\tout[outOfs]=data[index];\n\t\treturn 1;\n\t}\n\n\tAnimationTemplet._BezierInterpolation_6=function(bone,index,out,outOfs,data,dt,dData,duration,nextData,interData,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\tout[outOfs]=data[index]+(nextData[index]-data[index])*BezierLerp.getBezierRate(dt / duration,interData[offset],interData[offset+1],interData[offset+2],interData[offset+3]);\n\t\treturn 5;\n\t}\n\n\tAnimationTemplet._BezierInterpolation_7=function(bone,index,out,outOfs,data,dt,dData,duration,nextData,interData,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\tout[outOfs]=interData[offset+4]+interData[offset+5] *BezierLerp.getBezierRate((dt *0.001+interData[offset+6])/ interData[offset+7],interData[offset],interData[offset+1],interData[offset+2],interData[offset+3]);\n\t\treturn 9;\n\t}\n\n\tAnimationTemplet.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,AnimationTemplet);\n\t}\n\n\tAnimationTemplet.interpolation=[AnimationTemplet._LinearInterpolation_0,AnimationTemplet._QuaternionInterpolation_1,AnimationTemplet._AngleInterpolation_2,AnimationTemplet._RadiansInterpolation_3,AnimationTemplet._Matrix4x4Interpolation_4,AnimationTemplet._NoInterpolation_5,AnimationTemplet._BezierInterpolation_6,AnimationTemplet._BezierInterpolation_7];\n\treturn AnimationTemplet;\n})(Resource)\n\n\n/**\n*@private\n*将mesh元素缓存到canvas中并进行绘制\n*/\n//class laya.ani.bone.canvasmesh.CacheAbleSkinMesh extends laya.ani.bone.canvasmesh.SkinMeshCanvas\nvar CacheAbleSkinMesh=(function(_super){\n\tfunction CacheAbleSkinMesh(){\n\t\tthis.isCached=false;\n\t\tthis.canvas=null;\n\t\tthis.tex=null;\n\t\tthis.rec=null;\n\t\tCacheAbleSkinMesh.__super.call(this);\n\t}\n\n\t__class(CacheAbleSkinMesh,'laya.ani.bone.canvasmesh.CacheAbleSkinMesh',_super);\n\tvar __proto=CacheAbleSkinMesh.prototype;\n\t__proto.getCanvasPic=function(){\n\t\tvar canvas=new HTMLCanvas(\"2D\");\n\t\tvar ctx=canvas.getContext('2d');\n\t\tthis.rec=this.mesh.getBounds();\n\t\tdebugger;\n\t\tcanvas.size(this.rec.width,this.rec.height);\n\t\tvar preTransform;\n\t\tpreTransform=this.transform;\n\t\tthis.transform=CacheAbleSkinMesh.tempMt;\n\t\tthis.transform.identity();\n\t\tthis.transform.translate(-this.rec.x,-this.rec.y);\n\t\tthis.renderToContext(ctx);\n\t\tthis.transform.translate(+this.rec.x,+this.rec.y);\n\t\tthis.transform=preTransform;\n\t\treturn new Texture(canvas);\n\t}\n\n\t__proto.render=function(context,x,y){\n\t\tif (!this.mesh.texture)return;\n\t\tif (!this.isCached){\n\t\t\tthis.isCached=true;\n\t\t\tthis.tex=this.getCanvasPic();\n\t\t}\n\t\tif(!this.transform){\n\t\t\tthis.transform=SkinMeshCanvas._tempMatrix;\n\t\t\tthis.transform.identity();\n\t\t\tthis.transform.translate(x,y);\n\t\t\tthis._renderTextureToContext(context);\n\t\t\tthis.transform.translate(-x,-y);\n\t\t\tthis.transform=null;\n\t\t\t}else{\n\t\t\tthis.transform.translate(x,y);\n\t\t\tthis._renderTextureToContext(context);\n\t\t\tthis.transform.translate(-x,-y);\n\t\t}\n\t}\n\n\t__proto._renderTextureToContext=function(context){\n\t\tthis.context=context.ctx || context;\n\t\tcontext.save();\n\t\tvar texture;\n\t\ttexture=this.tex;\n\t\tif (this.transform){\n\t\t\tvar mt=this.transform;\n\t\t\tcontext.transform(mt.a,mt.b,mt.c,mt.d,mt.tx,mt.ty);\n\t\t}\n\t\tthis.rec=this.mesh.getBounds();\n\t\tcontext.translate(this.rec.x,this.rec.y);\n\t\tcontext.drawTexture(texture,0,0,texture.width,texture.height,0,0);\n\t\tcontext.restore();\n\t}\n\n\t__static(CacheAbleSkinMesh,\n\t['tempMt',function(){return this.tempMt=new Matrix();}\n\t]);\n\treturn CacheAbleSkinMesh;\n})(SkinMeshCanvas)\n\n\n/**\n*@private\n*简化mesh绘制，多顶点mesh改为四顶点mesh，只绘制矩形不绘制三角形\n*/\n//class laya.ani.bone.canvasmesh.SimpleSkinMeshCanvas extends laya.ani.bone.canvasmesh.SkinMeshCanvas\nvar SimpleSkinMeshCanvas=(function(_super){\n\tfunction SimpleSkinMeshCanvas(){\n\t\t/**\n\t\t*当前mesh数据是否可用\n\t\t*/\n\t\tthis.cacheOK=false;\n\t\t/**\n\t\t*当前渲染数据是否可用\n\t\t*/\n\t\tthis.cacheCmdOK=false;\n\t\t/**\n\t\t*transform参数缓存\n\t\t*/\n\t\tthis.transformCmds=[];\n\t\t/**\n\t\t*drawImage参数缓存\n\t\t*/\n\t\tthis.drawCmds=[]\n\t\tSimpleSkinMeshCanvas.__super.call(this);\n\t\tthis.tempMesh=new MeshData();\n\t}\n\n\t__class(SimpleSkinMeshCanvas,'laya.ani.bone.canvasmesh.SimpleSkinMeshCanvas',_super);\n\tvar __proto=SimpleSkinMeshCanvas.prototype;\n\t__proto.init2=function(texture,vs,ps,verticles,uvs){\n\t\t_super.prototype.init2.call(this,texture,vs,ps,verticles,uvs);\n\t\tthis.cacheOK=false;\n\t\tthis.cacheCmdOK=false;\n\t\tthis.transformCmds.length=6;\n\t\tthis.drawCmds.length=9;\n\t}\n\n\t__proto.renderToContext=function(context){\n\t\tthis.context=context.ctx || context;\n\t\tif (this.mesh){\n\t\t\tif (this.mesh.uvs.length <=8){\n\t\t\t\tif (this.mode==0){\n\t\t\t\t\tthis._renderWithIndexes(this.mesh);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis._renderNoIndexes(this.mesh);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this.cacheOK){\n\t\t\t\tthis.tempMesh.texture=this.mesh.texture;\n\t\t\t\tthis.tempMesh.uvs=this.mesh.texture.uv;\n\t\t\t\tthis.tempMesh.vertices=MeshTools.solveMesh(this.mesh,this.tempMesh.vertices);\n\t\t\t\tthis.cacheOK=true;\n\t\t\t}\n\t\t\tif (this.mode==0){\n\t\t\t\tthis._renderWithIndexes(this.tempMesh);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._renderNoIndexes(this.tempMesh);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._renderWithIndexes=function(mesh){\n\t\tif(this.cacheCmdOK){\n\t\t\tthis.renderByCache(mesh);\n\t\t\treturn;\n\t\t};\n\t\tvar indexes=mesh.indexes;\n\t\tvar i=0,len=indexes.length;\n\t\tif (len > 1)\n\t\t\tlen=1;\n\t\tfor (i=0;i < len;i+=3){\n\t\t\tvar index0=indexes[i] *2;\n\t\t\tvar index1=indexes[i+1] *2;\n\t\t\tvar index2=indexes[i+2] *2;\n\t\t\tthis._renderDrawTriangle(mesh,index0,index1,index2);\n\t\t}\n\t\tthis.cacheCmdOK=true;\n\t}\n\n\t__proto._renderDrawTriangle=function(mesh,index0,index1,index2){\n\t\tvar context=this.context;\n\t\tvar uvs=mesh.uvs;\n\t\tvar vertices=mesh.vertices;\n\t\tvar texture=mesh.texture;\n\t\tvar source=texture.bitmap;\n\t\tvar textureSource=source.source;\n\t\tvar textureWidth=texture.width;\n\t\tvar textureHeight=texture.height;\n\t\tvar sourceWidth=source.width;\n\t\tvar sourceHeight=source.height;\n\t\tvar u0=NaN;\n\t\tvar u1=NaN;\n\t\tvar u2=NaN;\n\t\tvar v0=NaN;\n\t\tvar v1=NaN;\n\t\tvar v2=NaN;\n\t\tif (mesh.useUvTransform){\n\t\t\tvar ut=mesh.uvTransform;\n\t\t\tu0=((uvs[index0] *ut.a)+(uvs[index0+1] *ut.c)+ut.tx)*sourceWidth;\n\t\t\tu1=((uvs[index1] *ut.a)+(uvs[index1+1] *ut.c)+ut.tx)*sourceWidth;\n\t\t\tu2=((uvs[index2] *ut.a)+(uvs[index2+1] *ut.c)+ut.tx)*sourceWidth;\n\t\t\tv0=((uvs[index0] *ut.b)+(uvs[index0+1] *ut.d)+ut.ty)*sourceHeight;\n\t\t\tv1=((uvs[index1] *ut.b)+(uvs[index1+1] *ut.d)+ut.ty)*sourceHeight;\n\t\t\tv2=((uvs[index2] *ut.b)+(uvs[index2+1] *ut.d)+ut.ty)*sourceHeight;\n\t\t}\n\t\telse {\n\t\t\tu0=uvs[index0] *sourceWidth;\n\t\t\tu1=uvs[index1] *sourceWidth;\n\t\t\tu2=uvs[index2] *sourceWidth;\n\t\t\tv0=uvs[index0+1] *sourceHeight;\n\t\t\tv1=uvs[index1+1] *sourceHeight;\n\t\t\tv2=uvs[index2+1] *sourceHeight;\n\t\t};\n\t\tvar x0=vertices[index0];\n\t\tvar x1=vertices[index1];\n\t\tvar x2=vertices[index2];\n\t\tvar y0=vertices[index0+1];\n\t\tvar y1=vertices[index1+1];\n\t\tvar y2=vertices[index2+1];\n\t\tvar delta=(u0 *v1)+(v0 *u2)+(u1 *v2)-(v1 *u2)-(v0 *u1)-(u0 *v2);\n\t\tvar dDelta=1 / delta;\n\t\tvar deltaA=(x0 *v1)+(v0 *x2)+(x1 *v2)-(v1 *x2)-(v0 *x1)-(x0 *v2);\n\t\tvar deltaB=(u0 *x1)+(x0 *u2)+(u1 *x2)-(x1 *u2)-(x0 *u1)-(u0 *x2);\n\t\tvar deltaC=(u0 *v1 *x2)+(v0 *x1 *u2)+(x0 *u1 *v2)-(x0 *v1 *u2)-(v0 *u1 *x2)-(u0 *x1 *v2);\n\t\tvar deltaD=(y0 *v1)+(v0 *y2)+(y1 *v2)-(v1 *y2)-(v0 *y1)-(y0 *v2);\n\t\tvar deltaE=(u0 *y1)+(y0 *u2)+(u1 *y2)-(y1 *u2)-(y0 *u1)-(u0 *y2);\n\t\tvar deltaF=(u0 *v1 *y2)+(v0 *y1 *u2)+(y0 *u1 *v2)-(y0 *v1 *u2)-(v0 *u1 *y2)-(u0 *y1 *v2);\n\t\tthis.transformCmds[0]=deltaA *dDelta;\n\t\tthis.transformCmds[1]=deltaD *dDelta;\n\t\tthis.transformCmds[2]=deltaB *dDelta;\n\t\tthis.transformCmds[3]=deltaE *dDelta;\n\t\tthis.transformCmds[4]=deltaC *dDelta;\n\t\tthis.transformCmds[5]=deltaF *dDelta;\n\t\tthis.drawCmds[0]=textureSource;\n\t\tthis.drawCmds[1]=texture.uv[0] *sourceWidth;\n\t\tthis.drawCmds[2]=texture.uv[1] *sourceHeight;\n\t\tthis.drawCmds[3]=textureWidth;\n\t\tthis.drawCmds[4]=textureHeight;\n\t\tthis.drawCmds[5]=texture.uv[0] *sourceWidth;\n\t\tthis.drawCmds[6]=texture.uv[1] *sourceHeight;\n\t\tthis.drawCmds[7]=textureWidth;\n\t\tthis.drawCmds[8]=textureHeight;\n\t\tcontext.save();\n\t\tif (this.transform){\n\t\t\tvar mt=this.transform;\n\t\t\tcontext.transform(mt.a,mt.b,mt.c,mt.d,mt.tx,mt.ty);\n\t\t}\n\t\tcontext.transform.apply(context,this.transformCmds);\n\t\tcontext.drawImage.apply(context,this.drawCmds);\n\t\tcontext.restore();\n\t}\n\n\t/**\n\t*绘制缓存的命令\n\t*@param mesh\n\t*\n\t*/\n\t__proto.renderByCache=function(mesh){\n\t\tvar context=this.context;\n\t\tcontext.save();\n\t\tif (this.transform){\n\t\t\tvar mt=this.transform;\n\t\t\tcontext.transform(mt.a,mt.b,mt.c,mt.d,mt.tx,mt.ty);\n\t\t}\n\t\tcontext.transform.apply(context,this.transformCmds);\n\t\tcontext.drawImage.apply(context,this.drawCmds);\n\t\tcontext.restore();\n\t}\n\n\treturn SimpleSkinMeshCanvas;\n})(SkinMeshCanvas)\n\n\n/**\n*骨骼动画由<code>Templet</code>，<code>AnimationPlayer</code>，<code>Skeleton</code>三部分组成。\n*/\n//class laya.ani.bone.Skeleton extends laya.display.Sprite\nvar Skeleton=(function(_super){\n\tfunction Skeleton(templet,aniMode){\n\t\tthis._templet=null;\n\t\t/**@private */\n\t\tthis._player=null;\n\t\t/**@private */\n\t\tthis._curOriginalData=null;\n\t\t//当前骨骼的偏移数据\n\t\tthis._boneMatrixArray=[];\n\t\t//当前骨骼动画的最终结果数据\n\t\tthis._lastTime=0;\n\t\t//上次的帧时间\n\t\tthis._currAniName=null;\n\t\tthis._currAniIndex=-1;\n\t\tthis._pause=true;\n\t\t/**@private */\n\t\tthis._aniClipIndex=-1;\n\t\t/**@private */\n\t\tthis._clipIndex=-1;\n\t\tthis._skinIndex=0;\n\t\tthis._skinName=\"default\";\n\t\tthis._aniMode=0;\n\t\t//当前动画自己的缓冲区\n\t\tthis._graphicsCache=null;\n\t\tthis._boneSlotDic=null;\n\t\tthis._bindBoneBoneSlotDic=null;\n\t\tthis._boneSlotArray=null;\n\t\tthis._index=-1;\n\t\tthis._total=-1;\n\t\tthis._indexControl=false;\n\t\t//加载路径\n\t\tthis._aniPath=null;\n\t\tthis._texturePath=null;\n\t\tthis._complete=null;\n\t\tthis._loadAniMode=0;\n\t\tthis._yReverseMatrix=null;\n\t\tthis._ikArr=null;\n\t\tthis._tfArr=null;\n\t\tthis._pathDic=null;\n\t\tthis._rootBone=null;\n\t\t/**@private */\n\t\tthis._boneList=null;\n\t\t/**@private */\n\t\tthis._aniSectionDic=null;\n\t\tthis._eventIndex=0;\n\t\tthis._drawOrderIndex=0;\n\t\tthis._drawOrder=null;\n\t\tthis._lastAniClipIndex=-1;\n\t\tthis._lastUpdateAniClipIndex=-1;\n\t\tthis._playAudio=true;\n\t\tthis._soundChannelArr=[];\n\t\tSkeleton.__super.call(this);\n\t\t(aniMode===void 0)&& (aniMode=0);\n\t\tif (templet)this.init(templet,aniMode);\n\t}\n\n\t__class(Skeleton,'laya.ani.bone.Skeleton',_super);\n\tvar __proto=Skeleton.prototype;\n\t/**\n\t*初始化动画\n\t*@param templet 模板\n\t*@param aniMode 动画模式\n\t*<table>\n\t*<tr><th>模式</th><th>描述</th></tr>\n\t*<tr>\n\t*<td>0</td> <td>使用模板缓冲的数据，模板缓冲的数据，不允许修改（内存开销小，计算开销小，不支持换装）</td>\n\t*</tr>\n\t*<tr>\n\t*<td>1</td> <td>使用动画自己的缓冲区，每个动画都会有自己的缓冲区，相当耗费内存 （内存开销大，计算开销小，支持换装）</td>\n\t*</tr>\n\t*<tr>\n\t*<td>2</td> <td>使用动态方式，去实时去画（内存开销小，计算开销大，支持换装,不建议使用）</td>\n\t*</tr>\n\t*</table>\n\t*/\n\t__proto.init=function(templet,aniMode){\n\t\t(aniMode===void 0)&& (aniMode=0);\n\t\tvar i=0,n=0;\n\t\tif (aniMode==1){\n\t\t\tthis._graphicsCache=[];\n\t\t\tfor (i=0,n=templet.getAnimationCount();i < n;i++){\n\t\t\t\tthis._graphicsCache.push([]);\n\t\t\t}\n\t\t}\n\t\tthis._yReverseMatrix=templet.yReverseMatrix;\n\t\tthis._aniMode=aniMode;\n\t\tthis._templet=templet;\n\t\tthis._player=new AnimationPlayer();\n\t\tthis._player.cacheFrameRate=templet.rate;\n\t\tthis._player.templet=templet;\n\t\tthis._player.play();\n\t\tthis._parseSrcBoneMatrix();\n\t\tthis._boneList=templet.mBoneArr;\n\t\tthis._rootBone=templet.mRootBone;\n\t\tthis._aniSectionDic=templet.aniSectionDic;\n\t\tif (templet.ikArr.length > 0){\n\t\t\tthis._ikArr=[];\n\t\t\tfor (i=0,n=templet.ikArr.length;i < n;i++){\n\t\t\t\tthis._ikArr.push(new IkConstraint(templet.ikArr[i],this._boneList));\n\t\t\t}\n\t\t}\n\t\tif (templet.pathArr.length > 0){\n\t\t\tvar tPathData;\n\t\t\tvar tPathConstraint;\n\t\t\tif (this._pathDic==null)this._pathDic={};\n\t\t\tvar tBoneSlot;\n\t\t\tfor (i=0,n=templet.pathArr.length;i < n;i++){\n\t\t\t\ttPathData=templet.pathArr[i];\n\t\t\t\ttPathConstraint=new PathConstraint(tPathData,this._boneList);\n\t\t\t\ttBoneSlot=this._boneSlotDic[tPathData.name];\n\t\t\t\tif (tBoneSlot){\n\t\t\t\t\ttPathConstraint=new PathConstraint(tPathData,this._boneList);\n\t\t\t\t\ttPathConstraint.target=tBoneSlot;\n\t\t\t\t}\n\t\t\t\tthis._pathDic[tPathData.name]=tPathConstraint;\n\t\t\t}\n\t\t}\n\t\tif (templet.tfArr.length > 0){\n\t\t\tthis._tfArr=[];\n\t\t\tfor (i=0,n=templet.tfArr.length;i < n;i++){\n\t\t\t\tthis._tfArr.push(new TfConstraint(templet.tfArr[i],this._boneList));\n\t\t\t}\n\t\t}\n\t\tif (templet.skinDataArray.length > 0){\n\t\t\tvar tSkinData=this._templet.skinDataArray[this._skinIndex];\n\t\t\tthis._skinName=tSkinData.name;\n\t\t}\n\t\tthis._player.on(/*laya.events.Event.PLAYED*/\"played\",this,this._onPlay);\n\t\tthis._player.on(/*laya.events.Event.STOPPED*/\"stopped\",this,this._onStop);\n\t\tthis._player.on(/*laya.events.Event.PAUSED*/\"paused\",this,this._onPause);\n\t}\n\n\t/**\n\t*通过加载直接创建动画\n\t*@param path 要加载的动画文件路径\n\t*@param complete 加载完成的回调函数\n\t*@param aniMode 与<code>Skeleton.init</code>的<code>aniMode</code>作用一致\n\t*/\n\t__proto.load=function(path,complete,aniMode){\n\t\t(aniMode===void 0)&& (aniMode=0);\n\t\tthis._aniPath=path;\n\t\tthis._complete=complete;\n\t\tthis._loadAniMode=aniMode;\n\t\tLaya.loader.load([{url:path,type:/*laya.net.Loader.BUFFER*/\"arraybuffer\"}],Handler.create(this,this._onLoaded));\n\t}\n\n\t/**\n\t*加载完成\n\t*/\n\t__proto._onLoaded=function(){\n\t\tvar arraybuffer=Loader.getRes(this._aniPath);\n\t\tif (arraybuffer==null)return;\n\t\tif (Templet.TEMPLET_DICTIONARY==null){\n\t\t\tTemplet.TEMPLET_DICTIONARY={};\n\t\t};\n\t\tvar tFactory;\n\t\ttFactory=Templet.TEMPLET_DICTIONARY[this._aniPath];\n\t\tif (tFactory){\n\t\t\tif (tFactory.isParseFail){\n\t\t\t\tthis._parseFail();\n\t\t\t\t}else {\n\t\t\t\tif (tFactory.isParserComplete){\n\t\t\t\t\tthis._parseComplete();\n\t\t\t\t\t}else {\n\t\t\t\t\ttFactory.on(/*laya.events.Event.COMPLETE*/\"complete\",this,this._parseComplete);\n\t\t\t\t\ttFactory.on(/*laya.events.Event.ERROR*/\"error\",this,this._parseFail);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\ttFactory=new Templet();\n\t\t\ttFactory._setUrl(this._aniPath);\n\t\t\tTemplet.TEMPLET_DICTIONARY[this._aniPath]=tFactory;\n\t\t\ttFactory.on(/*laya.events.Event.COMPLETE*/\"complete\",this,this._parseComplete);\n\t\t\ttFactory.on(/*laya.events.Event.ERROR*/\"error\",this,this._parseFail);\n\t\t\ttFactory.isParserComplete=false;\n\t\t\ttFactory.parseData(null,arraybuffer);\n\t\t}\n\t}\n\n\t/**\n\t*解析完成\n\t*/\n\t__proto._parseComplete=function(){\n\t\tvar tTemple=Templet.TEMPLET_DICTIONARY[this._aniPath];\n\t\tif (tTemple){\n\t\t\tthis.init(tTemple,this._loadAniMode);\n\t\t\tthis.play(0,true);\n\t\t}\n\t\tthis._complete && this._complete.runWith(this);\n\t}\n\n\t/**\n\t*解析失败\n\t*/\n\t__proto._parseFail=function(){\n\t\tconsole.log(\"[Error]:\"+this._aniPath+\"解析失败\");\n\t}\n\n\t/**\n\t*传递PLAY事件\n\t*/\n\t__proto._onPlay=function(){\n\t\tthis.event(/*laya.events.Event.PLAYED*/\"played\");\n\t}\n\n\t/**\n\t*传递STOP事件\n\t*/\n\t__proto._onStop=function(){\n\t\tvar tEventData;\n\t\tvar tEventAniArr=this._templet.eventAniArr;\n\t\tvar tEventArr=tEventAniArr[this._aniClipIndex];\n\t\tif (tEventArr && this._eventIndex < tEventArr.length){\n\t\t\tfor (;this._eventIndex < tEventArr.length;this._eventIndex++){\n\t\t\t\ttEventData=tEventArr[this._eventIndex];\n\t\t\t\tif (tEventData.time >=this._player.playStart && tEventData.time <=this._player.playEnd){\n\t\t\t\t\tthis.event(/*laya.events.Event.LABEL*/\"label\",tEventData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._drawOrder=null;\n\t\tthis.event(/*laya.events.Event.STOPPED*/\"stopped\");\n\t}\n\n\t/**\n\t*传递PAUSE事件\n\t*/\n\t__proto._onPause=function(){\n\t\tthis.event(/*laya.events.Event.PAUSED*/\"paused\");\n\t}\n\n\t/**\n\t*创建骨骼的矩阵，保存每次计算的最终结果\n\t*/\n\t__proto._parseSrcBoneMatrix=function(){\n\t\tvar i=0,n=0;\n\t\tn=this._templet.srcBoneMatrixArr.length;\n\t\tfor (i=0;i < n;i++){\n\t\t\tthis._boneMatrixArray.push(new Matrix());\n\t\t}\n\t\tif (this._aniMode==0){\n\t\t\tthis._boneSlotDic=this._templet.boneSlotDic;\n\t\t\tthis._bindBoneBoneSlotDic=this._templet.bindBoneBoneSlotDic;\n\t\t\tthis._boneSlotArray=this._templet.boneSlotArray;\n\t\t\t}else {\n\t\t\tif (this._boneSlotDic==null)this._boneSlotDic={};\n\t\t\tif (this._bindBoneBoneSlotDic==null)this._bindBoneBoneSlotDic={};\n\t\t\tif (this._boneSlotArray==null)this._boneSlotArray=[];\n\t\t\tvar tArr=this._templet.boneSlotArray;\n\t\t\tvar tBS;\n\t\t\tvar tBSArr;\n\t\t\tfor (i=0,n=tArr.length;i < n;i++){\n\t\t\t\ttBS=tArr[i];\n\t\t\t\ttBSArr=this._bindBoneBoneSlotDic[tBS.parent];\n\t\t\t\tif (tBSArr==null){\n\t\t\t\t\tthis._bindBoneBoneSlotDic[tBS.parent]=tBSArr=[];\n\t\t\t\t}\n\t\t\t\tthis._boneSlotDic[tBS.name]=tBS=tBS.copy();\n\t\t\t\ttBSArr.push(tBS);\n\t\t\t\tthis._boneSlotArray.push(tBS);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._emitMissedEvents=function(startTime,endTime,startIndex){\n\t\t(startIndex===void 0)&& (startIndex=0);\n\t\tvar tEventAniArr=this._templet.eventAniArr;\n\t\tvar tEventArr=tEventAniArr[this._player.currentAnimationClipIndex];\n\t\tif (tEventArr){\n\t\t\tvar i=0,len=0;\n\t\t\tvar tEventData;\n\t\t\tlen=tEventArr.length;\n\t\t\tfor (i=startIndex;i < len;i++){\n\t\t\t\ttEventData=tEventArr[i];\n\t\t\t\tif (tEventData.time >=this._player.playStart && tEventData.time <=this._player.playEnd){\n\t\t\t\t\tthis.event(/*laya.events.Event.LABEL*/\"label\",tEventData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*更新动画\n\t*@param autoKey true为正常更新，false为index手动更新\n\t*/\n\t__proto._update=function(autoKey){\n\t\t(autoKey===void 0)&& (autoKey=true);\n\t\tif (this._pause)return;\n\t\tif (autoKey && this._indexControl){\n\t\t\treturn;\n\t\t};\n\t\tvar tCurrTime=this.timer.currTimer;\n\t\tvar preIndex=this._player.currentKeyframeIndex;\n\t\tvar dTime=tCurrTime-this._lastTime;\n\t\tif (autoKey){\n\t\t\tthis._player._update(dTime);\n\t\t\t}else {\n\t\t\tpreIndex=-1;\n\t\t}\n\t\tthis._lastTime=tCurrTime;\n\t\tif (!this._player)return;\n\t\tthis._index=this._clipIndex=this._player.currentKeyframeIndex;\n\t\tif (this._index < 0)return;\n\t\tif (dTime > 0 && this._clipIndex==preIndex && this._lastUpdateAniClipIndex==this._aniClipIndex){\n\t\t\treturn;\n\t\t}\n\t\tthis._lastUpdateAniClipIndex=this._aniClipIndex;\n\t\tif (preIndex > this._clipIndex && this._eventIndex !=0){\n\t\t\tthis._emitMissedEvents(this._player.playStart,this._player.playEnd,this._eventIndex);\n\t\t\tthis._eventIndex=0;\n\t\t};\n\t\tvar tEventData;\n\t\tvar tEventAniArr=this._templet.eventAniArr;\n\t\tvar tEventArr=tEventAniArr[this._aniClipIndex];\n\t\tvar _soundChannel;\n\t\tif (tEventArr && this._eventIndex < tEventArr.length){\n\t\t\ttEventData=tEventArr[this._eventIndex];\n\t\t\tif (tEventData.time >=this._player.playStart && tEventData.time <=this._player.playEnd){\n\t\t\t\tif (this._player.currentPlayTime >=tEventData.time){\n\t\t\t\t\tthis.event(/*laya.events.Event.LABEL*/\"label\",tEventData);\n\t\t\t\t\tthis._eventIndex++;\n\t\t\t\t\tif (this._playAudio && tEventData.audioValue && tEventData.audioValue!==\"null\"){\n\t\t\t\t\t\t_soundChannel=SoundManager.playSound(this._player.templet._path+tEventData.audioValue,1,Handler.create(this,this._onAniSoundStoped));\n\t\t\t\t\t\tSoundManager.playbackRate=this._player.playbackRate;\n\t\t\t\t\t\t_soundChannel && this._soundChannelArr.push(_soundChannel);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else if (tEventData.time < this._player.playStart && this._playAudio && tEventData.audioValue && tEventData.audioValue!==\"null\"){\n\t\t\t\tthis._eventIndex++;\n\t\t\t\t_soundChannel=SoundManager.playSound(this._player.templet._path+tEventData.audioValue,1,Handler.create(this,this._onAniSoundStoped),null,(this._player.currentPlayTime-tEventData.time)/ 1000);\n\t\t\t\tSoundManager.playbackRate=this._player.playbackRate;\n\t\t\t\t_soundChannel && this._soundChannelArr.push(_soundChannel);\n\t\t\t\t}else {\n\t\t\t\tthis._eventIndex++;\n\t\t\t}\n\t\t};\n\t\tvar tGraphics;\n\t\tif (this._aniMode==0){\n\t\t\ttGraphics=this._templet.getGrahicsDataWithCache(this._aniClipIndex,this._clipIndex);\n\t\t\tif (tGraphics){\n\t\t\t\tif (this.graphics !=tGraphics){\n\t\t\t\t\tthis.graphics=tGraphics;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t\t}else {\n\t\t\t\tvar i=0,minIndex=0;\n\t\t\t\tminIndex=this._clipIndex;\n\t\t\t\twhile ((!this._templet.getGrahicsDataWithCache(this._aniClipIndex,minIndex-1))&& (minIndex > 0)){\n\t\t\t\t\tminIndex--;\n\t\t\t\t}\n\t\t\t\tif (minIndex < this._clipIndex){\n\t\t\t\t\tfor (i=minIndex;i < this._clipIndex;i++){\n\t\t\t\t\t\tthis._createGraphics(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else if (this._aniMode==1){\n\t\t\ttGraphics=this._getGrahicsDataWithCache(this._aniClipIndex,this._clipIndex);\n\t\t\tif (tGraphics){\n\t\t\t\tif (this.graphics !=tGraphics){\n\t\t\t\t\tthis.graphics=tGraphics;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t\t}else {\n\t\t\t\tminIndex=this._clipIndex;\n\t\t\t\twhile ((!this._getGrahicsDataWithCache(this._aniClipIndex,minIndex-1))&& (minIndex > 0)){\n\t\t\t\t\tminIndex--;\n\t\t\t\t}\n\t\t\t\tif (minIndex < this._clipIndex){\n\t\t\t\t\tfor (i=minIndex;i < this._clipIndex;i++){\n\t\t\t\t\t\tthis._createGraphics(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._createGraphics();\n\t}\n\n\t/**\n\t*@private\n\t*清掉播放完成的音频\n\t*@param force 是否强制删掉所有的声音channel\n\t*/\n\t__proto._onAniSoundStoped=function(force){\n\t\tvar _channel;\n\t\tfor (var len=this._soundChannelArr.length,i=0;i < len;i++){\n\t\t\t_channel=this._soundChannelArr[i];\n\t\t\tif (_channel.isStopped || force){\n\t\t\t\t!_channel.isStopped && _channel.stop();\n\t\t\t\tthis._soundChannelArr.splice(i,1);\n\t\t\t\tlen--;i--;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*创建grahics图像\n\t*/\n\t__proto._createGraphics=function(_clipIndex){\n\t\t(_clipIndex===void 0)&& (_clipIndex=-1);\n\t\tif (_clipIndex==-1)_clipIndex=this._clipIndex;\n\t\tvar curTime=_clipIndex *this._player.cacheFrameRateInterval;\n\t\tvar tDrawOrderData;\n\t\tvar tDrawOrderAniArr=this._templet.drawOrderAniArr;\n\t\tvar tDrawOrderArr=tDrawOrderAniArr[this._aniClipIndex];\n\t\tif (tDrawOrderArr && tDrawOrderArr.length > 0){\n\t\t\tthis._drawOrderIndex=0;\n\t\t\ttDrawOrderData=tDrawOrderArr[this._drawOrderIndex];\n\t\t\twhile (curTime >=tDrawOrderData.time){\n\t\t\t\tthis._drawOrder=tDrawOrderData.drawOrder;\n\t\t\t\tthis._drawOrderIndex++;\n\t\t\t\tif (this._drawOrderIndex >=tDrawOrderArr.length){\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t\ttDrawOrderData=tDrawOrderArr[this._drawOrderIndex];\n\t\t\t}\n\t\t};\n\t\tvar tGraphics;\n\t\tif (this._aniMode==0 || this._aniMode==1){\n\t\t\tthis.graphics=GraphicsAni.create();\n\t\t\t}else {\n\t\t\tif ((this.graphics instanceof laya.ani.GraphicsAni )){\n\t\t\t\tthis.graphics.clear();\n\t\t\t\t}else {\n\t\t\t\tthis.graphics=GraphicsAni.create();\n\t\t\t}\n\t\t}\n\t\ttGraphics=this.graphics;\n\t\tvar bones=this._templet.getNodes(this._aniClipIndex);\n\t\tthis._templet.getOriginalData(this._aniClipIndex,this._curOriginalData,this._player._fullFrames[this._aniClipIndex],_clipIndex,curTime);\n\t\tvar tSectionArr=this._aniSectionDic[this._aniClipIndex];\n\t\tvar tParentMatrix;\n\t\tvar tStartIndex=0;\n\t\tvar i=0,j=0,k=0,n=0;\n\t\tvar tDBBoneSlot;\n\t\tvar tDBBoneSlotArr;\n\t\tvar tParentTransform;\n\t\tvar tSrcBone;\n\t\tvar boneCount=this._templet.srcBoneMatrixArr.length;\n\t\tfor (i=0,n=tSectionArr[0];i < boneCount;i++){\n\t\t\ttSrcBone=this._boneList[i];\n\t\t\ttParentTransform=this._templet.srcBoneMatrixArr[i];\n\t\t\ttSrcBone.resultTransform.scX=tParentTransform.scX *this._curOriginalData[tStartIndex++];\n\t\t\ttSrcBone.resultTransform.skX=tParentTransform.skX+this._curOriginalData[tStartIndex++];\n\t\t\ttSrcBone.resultTransform.skY=tParentTransform.skY+this._curOriginalData[tStartIndex++];\n\t\t\ttSrcBone.resultTransform.scY=tParentTransform.scY *this._curOriginalData[tStartIndex++];\n\t\t\ttSrcBone.resultTransform.x=tParentTransform.x+this._curOriginalData[tStartIndex++];\n\t\t\ttSrcBone.resultTransform.y=tParentTransform.y+this._curOriginalData[tStartIndex++];\n\t\t\tif (this._templet.tMatrixDataLen===8){\n\t\t\t\ttSrcBone.resultTransform.skewX=tParentTransform.skewX+this._curOriginalData[tStartIndex++];\n\t\t\t\ttSrcBone.resultTransform.skewY=tParentTransform.skewY+this._curOriginalData[tStartIndex++];\n\t\t\t}\n\t\t};\n\t\tvar tSlotDic={};\n\t\tvar tSlotAlphaDic={};\n\t\tvar tBoneData;\n\t\tfor (n+=tSectionArr[1];i < n;i++){\n\t\t\ttBoneData=bones[i];\n\t\t\ttSlotDic[tBoneData.name]=this._curOriginalData[tStartIndex++];\n\t\t\ttSlotAlphaDic[tBoneData.name]=this._curOriginalData[tStartIndex++];\n\t\t\tthis._curOriginalData[tStartIndex++];\n\t\t\tthis._curOriginalData[tStartIndex++];\n\t\t\tthis._curOriginalData[tStartIndex++];\n\t\t\tthis._curOriginalData[tStartIndex++];\n\t\t};\n\t\tvar tBendDirectionDic={};\n\t\tvar tMixDic={};\n\t\tfor (n+=tSectionArr[2];i < n;i++){\n\t\t\ttBoneData=bones[i];\n\t\t\ttBendDirectionDic[tBoneData.name]=this._curOriginalData[tStartIndex++];\n\t\t\ttMixDic[tBoneData.name]=this._curOriginalData[tStartIndex++];\n\t\t\tthis._curOriginalData[tStartIndex++];\n\t\t\tthis._curOriginalData[tStartIndex++];\n\t\t\tthis._curOriginalData[tStartIndex++];\n\t\t\tthis._curOriginalData[tStartIndex++];\n\t\t}\n\t\tif (this._pathDic){\n\t\t\tvar tPathConstraint;\n\t\t\tfor (n+=tSectionArr[3];i < n;i++){\n\t\t\t\ttBoneData=bones[i];\n\t\t\t\ttPathConstraint=this._pathDic[tBoneData.name];\n\t\t\t\tif (tPathConstraint){\n\t\t\t\t\tvar tByte=new Byte(tBoneData.extenData);\n\t\t\t\t\tswitch (tByte.getByte()){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\ttPathConstraint.position=this._curOriginalData[tStartIndex++];\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\ttPathConstraint.spacing=this._curOriginalData[tStartIndex++];\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\ttPathConstraint.rotateMix=this._curOriginalData[tStartIndex++];\n\t\t\t\t\t\t\ttPathConstraint.translateMix=this._curOriginalData[tStartIndex++];\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._yReverseMatrix){\n\t\t\tthis._rootBone.update(this._yReverseMatrix);\n\t\t\t}else {\n\t\t\tthis._rootBone.update(Matrix.TEMP.identity());\n\t\t}\n\t\tif (this._ikArr){\n\t\t\tvar tIkConstraint;\n\t\t\tfor (i=0,n=this._ikArr.length;i < n;i++){\n\t\t\t\ttIkConstraint=this._ikArr[i];\n\t\t\t\tif (tBendDirectionDic.hasOwnProperty(tIkConstraint.name)){\n\t\t\t\t\ttIkConstraint.bendDirection=tBendDirectionDic[tIkConstraint.name];\n\t\t\t\t}\n\t\t\t\tif (tMixDic.hasOwnProperty(tIkConstraint.name)){\n\t\t\t\t\ttIkConstraint.mix=tMixDic[tIkConstraint.name]\n\t\t\t\t}\n\t\t\t\ttIkConstraint.apply();\n\t\t\t}\n\t\t}\n\t\tif (this._pathDic){\n\t\t\tfor (var tPathStr in this._pathDic){\n\t\t\t\ttPathConstraint=this._pathDic[tPathStr];\n\t\t\t\ttPathConstraint.apply(this._boneList,tGraphics);\n\t\t\t}\n\t\t}\n\t\tif (this._tfArr){\n\t\t\tvar tTfConstraint;\n\t\t\tfor (i=0,k=this._tfArr.length;i < k;i++){\n\t\t\t\ttTfConstraint=this._tfArr[i];\n\t\t\t\ttTfConstraint.apply();\n\t\t\t}\n\t\t}\n\t\tfor (i=0,k=this._boneList.length;i < k;i++){\n\t\t\ttSrcBone=this._boneList[i];\n\t\t\ttDBBoneSlotArr=this._bindBoneBoneSlotDic[tSrcBone.name];\n\t\t\ttSrcBone.resultMatrix.copyTo(this._boneMatrixArray[i]);\n\t\t\tif (tDBBoneSlotArr){\n\t\t\t\tfor (j=0,n=tDBBoneSlotArr.length;j < n;j++){\n\t\t\t\t\ttDBBoneSlot=tDBBoneSlotArr[j];\n\t\t\t\t\tif (tDBBoneSlot){\n\t\t\t\t\t\ttDBBoneSlot.setParentMatrix(tSrcBone.resultMatrix);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar tDeformDic={};\n\t\tvar tDeformAniArr=this._templet.deformAniArr;\n\t\tvar tDeformAniData;\n\t\tvar tDeformSlotData;\n\t\tvar tDeformSlotDisplayData;\n\t\tif (tDeformAniArr && tDeformAniArr.length > 0){\n\t\t\tif (this._lastAniClipIndex !=this._aniClipIndex){\n\t\t\t\tthis._lastAniClipIndex=this._aniClipIndex;\n\t\t\t\tfor (i=0,n=this._boneSlotArray.length;i < n;i++){\n\t\t\t\t\ttDBBoneSlot=this._boneSlotArray[i];\n\t\t\t\t\ttDBBoneSlot.deformData=null;\n\t\t\t\t}\n\t\t\t};\n\t\t\tvar tSkinDeformAni=tDeformAniArr[this._aniClipIndex];\n\t\t\ttDeformAniData=(tSkinDeformAni[\"default\"]);\n\t\t\tthis._setDeform(tDeformAniData,tDeformDic,this._boneSlotArray,curTime);\n\t\t\tvar tSkin;\n\t\t\tfor (tSkin in tSkinDeformAni){\n\t\t\t\tif (tSkin !=\"default\" && tSkin !=this._skinName){\n\t\t\t\t\ttDeformAniData=tSkinDeformAni [tSkin];\n\t\t\t\t\tthis._setDeform(tDeformAniData,tDeformDic,this._boneSlotArray,curTime);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttDeformAniData=(tSkinDeformAni[this._skinName]);\n\t\t\tthis._setDeform(tDeformAniData,tDeformDic,this._boneSlotArray,curTime);\n\t\t};\n\t\tvar tSlotData2;\n\t\tvar tSlotData3;\n\t\tvar tObject;\n\t\tif (this._drawOrder){\n\t\t\tfor (i=0,n=this._drawOrder.length;i < n;i++){\n\t\t\t\ttDBBoneSlot=this._boneSlotArray[this._drawOrder[i]];\n\t\t\t\ttSlotData2=tSlotDic[tDBBoneSlot.name];\n\t\t\t\ttSlotData3=tSlotAlphaDic[tDBBoneSlot.name];\n\t\t\t\tif (!isNaN(tSlotData3)){\n\t\t\t\t\ttGraphics.save();\n\t\t\t\t\ttGraphics.alpha(tSlotData3);\n\t\t\t\t}\n\t\t\t\tif (!isNaN(tSlotData2)&& tSlotData2 !=-2){\n\t\t\t\t\tif (this._templet.attachmentNames){\n\t\t\t\t\t\ttDBBoneSlot.showDisplayByName(this._templet.attachmentNames[tSlotData2]);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttDBBoneSlot.showDisplayByIndex(tSlotData2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tDeformDic[this._drawOrder[i]]){\n\t\t\t\t\ttObject=tDeformDic[this._drawOrder[i]];\n\t\t\t\t\tif (tDBBoneSlot.currDisplayData && tObject[tDBBoneSlot.currDisplayData.attachmentName]){\n\t\t\t\t\t\ttDBBoneSlot.deformData=tObject[tDBBoneSlot.currDisplayData.attachmentName];\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttDBBoneSlot.deformData=null;\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttDBBoneSlot.deformData=null;\n\t\t\t\t}\n\t\t\t\tif (!isNaN(tSlotData3)){\n\t\t\t\t\ttDBBoneSlot.draw(tGraphics,this._boneMatrixArray,this._aniMode==2,tSlotData3);\n\t\t\t\t\t}else {\n\t\t\t\t\ttDBBoneSlot.draw(tGraphics,this._boneMatrixArray,this._aniMode==2);\n\t\t\t\t}\n\t\t\t\tif (!isNaN(tSlotData3)){\n\t\t\t\t\ttGraphics.restore();\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (i=0,n=this._boneSlotArray.length;i < n;i++){\n\t\t\t\ttDBBoneSlot=this._boneSlotArray[i];\n\t\t\t\ttSlotData2=tSlotDic[tDBBoneSlot.name];\n\t\t\t\ttSlotData3=tSlotAlphaDic[tDBBoneSlot.name];\n\t\t\t\tif (!isNaN(tSlotData3)){\n\t\t\t\t\ttGraphics.save();\n\t\t\t\t\ttGraphics.alpha(tSlotData3);\n\t\t\t\t}\n\t\t\t\tif (!isNaN(tSlotData2)&& tSlotData2 !=-2){\n\t\t\t\t\tif (this._templet.attachmentNames){\n\t\t\t\t\t\ttDBBoneSlot.showDisplayByName(this._templet.attachmentNames[tSlotData2]);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttDBBoneSlot.showDisplayByIndex(tSlotData2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tDeformDic[i]){\n\t\t\t\t\ttObject=tDeformDic[i];\n\t\t\t\t\tif (tDBBoneSlot.currDisplayData && tObject[tDBBoneSlot.currDisplayData.attachmentName]){\n\t\t\t\t\t\ttDBBoneSlot.deformData=tObject[tDBBoneSlot.currDisplayData.attachmentName];\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttDBBoneSlot.deformData=null;\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttDBBoneSlot.deformData=null;\n\t\t\t\t}\n\t\t\t\tif (!isNaN(tSlotData3)){\n\t\t\t\t\ttDBBoneSlot.draw(tGraphics,this._boneMatrixArray,this._aniMode==2,tSlotData3);\n\t\t\t\t\t}else {\n\t\t\t\t\ttDBBoneSlot.draw(tGraphics,this._boneMatrixArray,this._aniMode==2);\n\t\t\t\t}\n\t\t\t\tif (!isNaN(tSlotData3)){\n\t\t\t\t\ttGraphics.restore();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._aniMode==0){\n\t\t\tthis._templet.setGrahicsDataWithCache(this._aniClipIndex,_clipIndex,tGraphics);\n\t\t\t}else if (this._aniMode==1){\n\t\t\tthis._setGrahicsDataWithCache(this._aniClipIndex,_clipIndex,tGraphics);\n\t\t}\n\t}\n\n\t/**\n\t*设置deform数据\n\t*@param tDeformAniData\n\t*@param tDeformDic\n\t*@param _boneSlotArray\n\t*@param curTime\n\t*/\n\t__proto._setDeform=function(tDeformAniData,tDeformDic,_boneSlotArray,curTime){\n\t\tif (!tDeformAniData)return;\n\t\tvar tDeformSlotData;\n\t\tvar tDeformSlotDisplayData;\n\t\tvar tDBBoneSlot;\n\t\tvar i=0,n=0,j=0;\n\t\tif (tDeformAniData){\n\t\t\tfor (i=0,n=tDeformAniData.deformSlotDataList.length;i < n;i++){\n\t\t\t\ttDeformSlotData=tDeformAniData.deformSlotDataList[i];\n\t\t\t\tfor (j=0;j < tDeformSlotData.deformSlotDisplayList.length;j++){\n\t\t\t\t\ttDeformSlotDisplayData=tDeformSlotData.deformSlotDisplayList[j];\n\t\t\t\t\ttDBBoneSlot=_boneSlotArray[tDeformSlotDisplayData.slotIndex];\n\t\t\t\t\ttDeformSlotDisplayData.apply(curTime,tDBBoneSlot);\n\t\t\t\t\tif (!tDeformDic[tDeformSlotDisplayData.slotIndex]){\n\t\t\t\t\t\ttDeformDic[tDeformSlotDisplayData.slotIndex]={};\n\t\t\t\t\t}\n\t\t\t\t\ttDeformDic[tDeformSlotDisplayData.slotIndex][tDeformSlotDisplayData.attachment]=tDeformSlotDisplayData.deformData;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*得到当前动画的数量\n\t*@return 当前动画的数量\n\t*/\n\t__proto.getAnimNum=function(){\n\t\treturn this._templet.getAnimationCount();\n\t}\n\n\t/**\n\t*得到指定动画的名字\n\t*@param index 动画的索引\n\t*/\n\t__proto.getAniNameByIndex=function(index){\n\t\treturn this._templet.getAniNameByIndex(index);\n\t}\n\n\t/**\n\t*通过名字得到插槽的引用\n\t*@param name 动画的名字\n\t*@return 插槽的引用\n\t*/\n\t__proto.getSlotByName=function(name){\n\t\treturn this._boneSlotDic[name];\n\t}\n\n\t/**\n\t*通过名字显示一套皮肤\n\t*@param name 皮肤的名字\n\t*@param freshSlotIndex 是否将插槽纹理重置到初始化状态\n\t*/\n\t__proto.showSkinByName=function(name,freshSlotIndex){\n\t\t(freshSlotIndex===void 0)&& (freshSlotIndex=true);\n\t\tthis.showSkinByIndex(this._templet.getSkinIndexByName(name),freshSlotIndex);\n\t}\n\n\t/**\n\t*通过索引显示一套皮肤\n\t*@param skinIndex 皮肤索引\n\t*@param freshSlotIndex 是否将插槽纹理重置到初始化状态\n\t*/\n\t__proto.showSkinByIndex=function(skinIndex,freshSlotIndex){\n\t\t(freshSlotIndex===void 0)&& (freshSlotIndex=true);\n\t\tfor (var i=0;i < this._boneSlotArray.length;i++){\n\t\t\t(this._boneSlotArray [i]).showSlotData(null,freshSlotIndex);\n\t\t}\n\t\tif (this._templet.showSkinByIndex(this._boneSlotDic,skinIndex,freshSlotIndex)){\n\t\t\tvar tSkinData=this._templet.skinDataArray[skinIndex];\n\t\t\tthis._skinIndex=skinIndex;\n\t\t\tthis._skinName=tSkinData.name;\n\t\t}\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t*设置某插槽的皮肤\n\t*@param slotName 插槽名称\n\t*@param index 插糟皮肤的索引\n\t*/\n\t__proto.showSlotSkinByIndex=function(slotName,index){\n\t\tif (this._aniMode==0)return;\n\t\tvar tBoneSlot=this.getSlotByName(slotName);\n\t\tif (tBoneSlot){\n\t\t\ttBoneSlot.showDisplayByIndex(index);\n\t\t}\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t*设置某插槽的皮肤\n\t*@param slotName 插槽名称\n\t*@param name 皮肤名称\n\t*/\n\t__proto.showSlotSkinByName=function(slotName,name){\n\t\tif (this._aniMode==0)return;\n\t\tvar tBoneSlot=this.getSlotByName(slotName);\n\t\tif (tBoneSlot){\n\t\t\ttBoneSlot.showDisplayByName(name);\n\t\t}\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t*替换插槽贴图名\n\t*@param slotName 插槽名称\n\t*@param oldName 要替换的贴图名\n\t*@param newName 替换后的贴图名\n\t*/\n\t__proto.replaceSlotSkinName=function(slotName,oldName,newName){\n\t\tif (this._aniMode==0)return;\n\t\tvar tBoneSlot=this.getSlotByName(slotName);\n\t\tif (tBoneSlot){\n\t\t\ttBoneSlot.replaceDisplayByName(oldName,newName);\n\t\t}\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t*替换插槽的贴图索引\n\t*@param slotName 插槽名称\n\t*@param oldIndex 要替换的索引\n\t*@param newIndex 替换后的索引\n\t*/\n\t__proto.replaceSlotSkinByIndex=function(slotName,oldIndex,newIndex){\n\t\tif (this._aniMode==0)return;\n\t\tvar tBoneSlot=this.getSlotByName(slotName);\n\t\tif (tBoneSlot){\n\t\t\ttBoneSlot.replaceDisplayByIndex(oldIndex,newIndex);\n\t\t}\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t*设置自定义皮肤\n\t*@param name 插糟的名字\n\t*@param texture 自定义的纹理\n\t*/\n\t__proto.setSlotSkin=function(slotName,texture){\n\t\tif (this._aniMode==0)return;\n\t\tvar tBoneSlot=this.getSlotByName(slotName);\n\t\tif (tBoneSlot){\n\t\t\ttBoneSlot.replaceSkin(texture);\n\t\t}\n\t\tthis._clearCache();\n\t}\n\n\t/**\n\t*换装的时候，需要清一下缓冲区\n\t*/\n\t__proto._clearCache=function(){\n\t\tif (this._aniMode==1){\n\t\t\tfor (var i=0,n=this._graphicsCache.length;i < n;i++){\n\t\t\t\tfor (var j=0,len=this._graphicsCache[i].length;j < len;j++){\n\t\t\t\t\tvar gp=this._graphicsCache[i][j];\n\t\t\t\t\tif (gp !=this.graphics){\n\t\t\t\t\t\tGraphicsAni.recycle(gp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._graphicsCache[i].length=0;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*播放动画\n\t*\n\t*@param nameOrIndex 动画名字或者索引\n\t*@param loop 是否循环播放\n\t*@param force false,如果要播的动画跟上一个相同就不生效,true,强制生效\n\t*@param start 起始时间\n\t*@param end 结束时间\n\t*@param freshSkin 是否刷新皮肤数据\n\t*@param playAudio 是否播放音频\n\t*/\n\t__proto.play=function(nameOrIndex,loop,force,start,end,freshSkin,playAudio){\n\t\t(force===void 0)&& (force=true);\n\t\t(start===void 0)&& (start=0);\n\t\t(end===void 0)&& (end=0);\n\t\t(freshSkin===void 0)&& (freshSkin=true);\n\t\t(playAudio===void 0)&& (playAudio=true);\n\t\tthis._playAudio=playAudio;\n\t\tthis._indexControl=false;\n\t\tvar index=-1;\n\t\tvar duration=NaN;\n\t\tif (loop){\n\t\t\tduration=2147483647;\n\t\t\t}else {\n\t\t\tduration=0;\n\t\t}\n\t\tif ((typeof nameOrIndex=='string')){\n\t\t\tfor (var i=0,n=this._templet.getAnimationCount();i < n;i++){\n\t\t\t\tvar animation=this._templet.getAnimation(i);\n\t\t\t\tif (animation && nameOrIndex==animation.name){\n\t\t\t\t\tindex=i;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tindex=nameOrIndex;\n\t\t}\n\t\tif (index >-1 && index < this.getAnimNum()){\n\t\t\tthis._aniClipIndex=index;\n\t\t\tif (force || this._pause || this._currAniIndex !=index){\n\t\t\t\tthis._currAniIndex=index;\n\t\t\t\tthis._curOriginalData=new Float32Array(this._templet.getTotalkeyframesLength(index));\n\t\t\t\tthis._drawOrder=null;\n\t\t\t\tthis._eventIndex=0;\n\t\t\t\tthis._player.play(index,this._player.playbackRate,duration,start,end);\n\t\t\t\tif (freshSkin)\n\t\t\t\t\tthis._templet.showSkinByIndex(this._boneSlotDic,this._skinIndex);\n\t\t\t\tif (this._pause){\n\t\t\t\t\tthis._pause=false;\n\t\t\t\t\tthis._lastTime=Browser.now();\n\t\t\t\t\tthis.timer.frameLoop(1,this,this._update,null,true);\n\t\t\t\t}\n\t\t\t\tthis._update();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*停止动画\n\t*/\n\t__proto.stop=function(){\n\t\tif (!this._pause){\n\t\t\tthis._pause=true;\n\t\t\tif (this._player){\n\t\t\t\tthis._player.stop(true);\n\t\t\t}\n\t\t\tif (this._soundChannelArr.length > 0){\n\t\t\t\tthis._onAniSoundStoped(true);\n\t\t\t}\n\t\t\tthis.timer.clear(this,this._update);\n\t\t}\n\t}\n\n\t/**\n\t*设置动画播放速率\n\t*@param value 1为标准速率\n\t*/\n\t__proto.playbackRate=function(value){\n\t\tif (this._player){\n\t\t\tthis._player.playbackRate=value;\n\t\t}\n\t}\n\n\t/**\n\t*暂停动画的播放\n\t*/\n\t__proto.paused=function(){\n\t\tif (!this._pause){\n\t\t\tthis._pause=true;\n\t\t\tif (this._player){\n\t\t\t\tthis._player.paused=true;\n\t\t\t}\n\t\t\tif (this._soundChannelArr.length > 0){\n\t\t\t\tvar _soundChannel;\n\t\t\t\tfor (var len=this._soundChannelArr.length,i=0;i < len;i++){\n\t\t\t\t\t_soundChannel=this._soundChannelArr[i];\n\t\t\t\t\tif (!_soundChannel.isStopped){\n\t\t\t\t\t\t_soundChannel.pause();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.timer.clear(this,this._update);\n\t\t}\n\t}\n\n\t/**\n\t*恢复动画的播放\n\t*/\n\t__proto.resume=function(){\n\t\tthis._indexControl=false;\n\t\tif (this._pause){\n\t\t\tthis._pause=false;\n\t\t\tif (this._player){\n\t\t\t\tthis._player.paused=false;\n\t\t\t}\n\t\t\tif (this._soundChannelArr.length > 0){\n\t\t\t\tvar _soundChannel;\n\t\t\t\tfor (var len=this._soundChannelArr.length,i=0;i < len;i++){\n\t\t\t\t\t_soundChannel=this._soundChannelArr[i];\n\t\t\t\t\tif (_soundChannel.audioBuffer){\n\t\t\t\t\t\t_soundChannel.resume();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._lastTime=Browser.now();\n\t\t\tthis.timer.frameLoop(1,this,this._update,null,true);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*得到缓冲数据\n\t*@param aniIndex\n\t*@param frameIndex\n\t*@return\n\t*/\n\t__proto._getGrahicsDataWithCache=function(aniIndex,frameIndex){\n\t\treturn this._graphicsCache[aniIndex][frameIndex];\n\t}\n\n\t/**\n\t*@private\n\t*保存缓冲grahpics\n\t*@param aniIndex\n\t*@param frameIndex\n\t*@param graphics\n\t*/\n\t__proto._setGrahicsDataWithCache=function(aniIndex,frameIndex,graphics){\n\t\tthis._graphicsCache[aniIndex][frameIndex]=graphics;\n\t}\n\n\t/**\n\t*销毁当前动画\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._templet=null;\n\t\tif (this._player)this._player.offAll();\n\t\tthis._player=null;\n\t\tthis._curOriginalData=null;\n\t\tthis._boneMatrixArray.length=0;\n\t\tthis._lastTime=0;\n\t\tthis.timer.clear(this,this._update);\n\t\tif (this._soundChannelArr.length > 0){\n\t\t\tthis._onAniSoundStoped(true);\n\t\t}\n\t}\n\n\t/**\n\t*设置动画路径\n\t*/\n\t/**\n\t*得到资源的URL\n\t*/\n\t__getset(0,__proto,'url',function(){\n\t\treturn this._aniPath;\n\t\t},function(path){\n\t\tthis.load(path);\n\t});\n\n\t/**\n\t*@private\n\t*设置帧索引\n\t*/\n\t/**\n\t*@private\n\t*得到帧索引\n\t*/\n\t__getset(0,__proto,'index',function(){\n\t\treturn this._index;\n\t\t},function(value){\n\t\tif (this.player){\n\t\t\tthis._index=value;\n\t\t\tthis._player.currentTime=this._index *1000 / this._player.cacheFrameRate;\n\t\t\tthis._indexControl=true;\n\t\t\tthis._update(false);\n\t\t}\n\t});\n\n\t/**\n\t*得到总帧数据\n\t*/\n\t__getset(0,__proto,'total',function(){\n\t\tif (this._templet && this._player){\n\t\t\tthis._total=Math.floor(this._templet.getAniDuration(this._player.currentAnimationClipIndex)/ 1000 *this._player.cacheFrameRate);\n\t\t\t}else {\n\t\t\tthis._total=-1;\n\t\t}\n\t\treturn this._total;\n\t});\n\n\t/**\n\t*得到动画模板的引用\n\t*/\n\t__getset(0,__proto,'templet',function(){\n\t\treturn this._templet;\n\t});\n\n\t/**\n\t*得到播放器的引用\n\t*/\n\t__getset(0,__proto,'player',function(){\n\t\treturn this._player;\n\t});\n\n\tSkeleton.useSimpleMeshInCanvas=false;\n\treturn Skeleton;\n})(Sprite)\n\n\n/**\n*<p> <code>MovieClip</code> 用于播放经过工具处理后的 swf 动画。</p>\n*/\n//class laya.ani.swf.MovieClip extends laya.display.Sprite\nvar MovieClip=(function(_super){\n\tfunction MovieClip(parentMovieClip){\n\t\t/**@private 数据起始位置。*/\n\t\tthis._start=0;\n\t\t/**@private 当前位置。*/\n\t\tthis._Pos=0;\n\t\t/**@private 数据。*/\n\t\tthis._data=null;\n\t\t/**@private */\n\t\tthis._curIndex=0;\n\t\t/**@private */\n\t\tthis._preIndex=0;\n\t\t/**@private */\n\t\tthis._playIndex=0;\n\t\t/**@private */\n\t\tthis._playing=false;\n\t\t/**@private */\n\t\tthis._ended=true;\n\t\t/**@private 总帧数。*/\n\t\tthis._count=0;\n\t\t/**@private id_data起始位置表*/\n\t\tthis._ids=null;\n\t\t/**@private */\n\t\tthis._loadedImage={};\n\t\t/**@private id_实例表*/\n\t\tthis._idOfSprite=null;\n\t\t/**@private 父mc*/\n\t\tthis._parentMovieClip=null;\n\t\t/**@private 需要更新的movieClip表*/\n\t\tthis._movieClipList=null;\n\t\t/**@private */\n\t\tthis._labels=null;\n\t\t/**资源根目录。*/\n\t\tthis.basePath=null;\n\t\t/**@private */\n\t\tthis._atlasPath=null;\n\t\t/**@private */\n\t\tthis._url=null;\n\t\t/**@private */\n\t\tthis._isRoot=false;\n\t\t/**@private */\n\t\tthis._completeHandler=null;\n\t\t/**@private */\n\t\tthis._endFrame=-1;\n\t\t/**播放间隔(单位：毫秒)。*/\n\t\tthis.interval=30;\n\t\t/**是否循环播放 */\n\t\tthis.loop=false;\n\t\tMovieClip.__super.call(this);\n\t\tthis._ids={};\n\t\tthis._idOfSprite=[];\n\t\tthis._reset();\n\t\tthis._playing=false;\n\t\tthis._parentMovieClip=parentMovieClip;\n\t\tif (!parentMovieClip){\n\t\t\tthis._movieClipList=[this];\n\t\t\tthis._isRoot=true;\n\t\t\tthis._setUpNoticeType(/*laya.display.Node.NOTICE_DISPLAY*/0x1);\n\t\t\t}else {\n\t\t\tthis._isRoot=false;\n\t\t\tthis._movieClipList=parentMovieClip._movieClipList;\n\t\t\tthis._movieClipList.push(this);\n\t\t}\n\t}\n\n\t__class(MovieClip,'laya.ani.swf.MovieClip',_super);\n\tvar __proto=MovieClip.prototype;\n\t/**\n\t*<p>销毁此对象。以及销毁引用的Texture</p>\n\t*@param destroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tthis._clear();\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t}\n\n\t/**@private */\n\t__proto._setDisplay=function(value){\n\t\t_super.prototype._setDisplay.call(this,value);\n\t\tif (this._isRoot){\n\t\t\tthis._$3__onDisplay(value);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._$3__onDisplay=function(value){\n\t\tif (value)this.timer.loop(this.interval,this,this.updates,null,true);\n\t\telse this.timer.clear(this,this.updates);\n\t}\n\n\t/**@private 更新时间轴*/\n\t__proto.updates=function(){\n\t\tif (this._parentMovieClip)return;\n\t\tvar i=0,len=0;\n\t\tlen=this._movieClipList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tthis._movieClipList[i]&&this._movieClipList[i]._update();\n\t\t}\n\t}\n\n\t/**\n\t*增加一个标签到index帧上，播放到此index后会派发label事件\n\t*@param label 标签名称\n\t*@param index 索引位置\n\t*/\n\t__proto.addLabel=function(label,index){\n\t\tif (!this._labels)this._labels={};\n\t\tthis._labels[index]=label;\n\t}\n\n\t/**\n\t*删除某个标签\n\t*@param label 标签名字，如果label为空，则删除所有Label\n\t*/\n\t__proto.removeLabel=function(label){\n\t\tif (!label)this._labels=null;\n\t\telse if (!this._labels){\n\t\t\tfor (var name in this._labels){\n\t\t\t\tif (this._labels[name]===label){\n\t\t\t\t\tdelete this._labels[name];\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*动画的帧更新处理函数。\n\t*/\n\t__proto._update=function(){\n\t\tif (!this._data)return;\n\t\tif (!this._playing)return;\n\t\tthis._playIndex++;\n\t\tif (this._playIndex >=this._count){\n\t\t\tif (!this.loop){\n\t\t\t\tthis._playIndex--;\n\t\t\t\tthis.stop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._playIndex=0;\n\t\t}\n\t\tthis._parse(this._playIndex);\n\t\tif (this._labels && this._labels[this._playIndex])this.event(/*laya.events.Event.LABEL*/\"label\",this._labels[this._playIndex]);\n\t\tif (this._endFrame!=-1&&this._endFrame==this._playIndex){\n\t\t\tthis._endFrame=-1;\n\t\t\tif (this._completeHandler !=null){\n\t\t\t\tvar handler=this._completeHandler;\n\t\t\t\tthis._completeHandler=null;\n\t\t\t\thandler.run();\n\t\t\t}\n\t\t\tthis.stop();\n\t\t}\n\t}\n\n\t/**\n\t*停止播放动画。\n\t*/\n\t__proto.stop=function(){\n\t\tthis._playing=false;\n\t}\n\n\t/**\n\t*跳到某帧并停止播放动画。\n\t*@param frame 要跳到的帧\n\t*/\n\t__proto.gotoAndStop=function(index){\n\t\tthis.index=index;\n\t\tthis.stop();\n\t}\n\n\t/**\n\t*@private\n\t*清理。\n\t*/\n\t__proto._clear=function(){\n\t\tthis.stop();\n\t\tthis._idOfSprite.length=0;\n\t\tif (!this._parentMovieClip){\n\t\t\tthis.timer.clear(this,this.updates);\n\t\t\tvar i=0,len=0;\n\t\t\tlen=this._movieClipList.length;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\tif (this._movieClipList[i] !=this)\n\t\t\t\t\tthis._movieClipList[i]._clear();\n\t\t\t}\n\t\t\tthis._movieClipList.length=0;\n\t\t}\n\t\tif (this._atlasPath){\n\t\t\tLoader.clearRes(this._atlasPath);\n\t\t};\n\t\tvar key;\n\t\tfor (key in this._loadedImage){\n\t\t\tif (this._loadedImage[key]){\n\t\t\t\tLoader.clearRes(key);\n\t\t\t\tthis._loadedImage[key]=false;\n\t\t\t}\n\t\t}\n\t\tthis.removeChildren();\n\t\tthis.graphics=null;\n\t\tthis._parentMovieClip=null;\n\t}\n\n\t/**\n\t*播放动画。\n\t*@param index 帧索引。\n\t*/\n\t__proto.play=function(index,loop){\n\t\t(index===void 0)&& (index=0);\n\t\t(loop===void 0)&& (loop=true);\n\t\tthis.loop=loop;\n\t\tthis._playing=true;\n\t\tif (this._data)\n\t\t\tthis._displayFrame(index);\n\t}\n\n\t/**@private */\n\t__proto._displayFrame=function(frameIndex){\n\t\t(frameIndex===void 0)&& (frameIndex=-1);\n\t\tif (frameIndex !=-1){\n\t\t\tif (this._curIndex > frameIndex)this._reset();\n\t\t\tthis._parse(frameIndex);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._reset=function(rm){\n\t\t(rm===void 0)&& (rm=true);\n\t\tif (rm && this._curIndex !=1)this.removeChildren();\n\t\tthis._preIndex=this._curIndex=-1;\n\t\tthis._Pos=this._start;\n\t}\n\n\t/**@private */\n\t__proto._parse=function(frameIndex){\n\t\tvar curChild=this;\n\t\tvar mc,sp,key=0,type=0,tPos=0,ttype=0,ifAdd=false;\n\t\tvar _idOfSprite=this._idOfSprite,_data=this._data,eStr;\n\t\tif (this._ended)this._reset();\n\t\t_data.pos=this._Pos;\n\t\tthis._ended=false;\n\t\tthis._playIndex=frameIndex;\n\t\tif (this._curIndex > frameIndex&&frameIndex<this._preIndex){\n\t\t\tthis._reset(true);\n\t\t\t_data.pos=this._Pos;\n\t\t}\n\t\twhile ((this._curIndex <=frameIndex)&& (!this._ended)){\n\t\t\ttype=_data.getUint16();\n\t\t\tswitch (type){\n\t\t\t\tcase 12:\n\t\t\t\t\tkey=_data.getUint16();\n\t\t\t\t\ttPos=this._ids[_data.getUint16()];\n\t\t\t\t\tthis._Pos=_data.pos;\n\t\t\t\t\t_data.pos=tPos;\n\t\t\t\t\tif ((ttype=_data.getUint8())==0){\n\t\t\t\t\t\tvar pid=_data.getUint16();\n\t\t\t\t\t\tsp=_idOfSprite[key]\n\t\t\t\t\t\tif (!sp){\n\t\t\t\t\t\t\tsp=_idOfSprite[key]=new Sprite();\n\t\t\t\t\t\t\tvar spp=new Sprite();\n\t\t\t\t\t\t\tspp.loadImage(this.basePath+pid+\".png\");\n\t\t\t\t\t\t\tthis._loadedImage[this.basePath+pid+\".png\"]=true;\n\t\t\t\t\t\t\tsp.addChild(spp);\n\t\t\t\t\t\t\tspp.size(_data.getFloat32(),_data.getFloat32());\n\t\t\t\t\t\t\tvar mat=_data._getMatrix();\n\t\t\t\t\t\t\tspp.transform=mat;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsp.alpha=1;\n\t\t\t\t\t\t}else if (ttype==1){\n\t\t\t\t\t\tmc=_idOfSprite[key]\n\t\t\t\t\t\tif (!mc){\n\t\t\t\t\t\t\t_idOfSprite[key]=mc=new MovieClip(this);\n\t\t\t\t\t\t\tmc.interval=this.interval;\n\t\t\t\t\t\t\tmc._ids=this._ids;\n\t\t\t\t\t\t\tmc.basePath=this.basePath;\n\t\t\t\t\t\t\tmc._setData(_data,tPos);\n\t\t\t\t\t\t\tmc._initState();\n\t\t\t\t\t\t\tmc.play(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmc.alpha=1;\n\t\t\t\t\t}\n\t\t\t\t\t_data.pos=this._Pos;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:;\n\t\t\t\t\tvar node=_idOfSprite[ _data.getUint16()];\n\t\t\t\t\tif (node){\n\t\t\t\t\t\tthis.addChild(node);\n\t\t\t\t\t\tnode.zOrder=_data.getUint16();\n\t\t\t\t\t\tifAdd=true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 4:\n\t\t\t\t\tnode=_idOfSprite[ _data.getUint16()];\n\t\t\t\t\tnode && node.removeSelf();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 5:\n\t\t\t\t\t_idOfSprite[_data.getUint16()][MovieClip._ValueList[_data.getUint16()]]=(_data.getFloat32());\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 6:\n\t\t\t\t\t_idOfSprite[_data.getUint16()].visible=(_data.getUint8()> 0);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 7:\n\t\t\t\t\tsp=_idOfSprite[ _data.getUint16()];\n\t\t\t\t\tvar mt=sp.transform || Matrix.create();\n\t\t\t\t\tmt.setTo(_data.getFloat32(),_data.getFloat32(),_data.getFloat32(),_data.getFloat32(),_data.getFloat32(),_data.getFloat32());\n\t\t\t\t\tsp.transform=mt;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 8:\n\t\t\t\t\t_idOfSprite[_data.getUint16()].setPos(_data.getFloat32(),_data.getFloat32());\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 9:\n\t\t\t\t\t_idOfSprite[_data.getUint16()].setSize(_data.getFloat32(),_data.getFloat32());\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 10:\n\t\t\t\t\t_idOfSprite[ _data.getUint16()].alpha=_data.getFloat32();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 11:\n\t\t\t\t\t_idOfSprite[_data.getUint16()].setScale(_data.getFloat32(),_data.getFloat32());\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 98:\n\t\t\t\t\teStr=_data.getString();\n\t\t\t\t\tthis.event(eStr);\n\t\t\t\t\tif (eStr==\"stop\")this.stop();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 99:\n\t\t\t\t\tthis._curIndex=_data.getUint16();\n\t\t\t\t\tifAdd && this.updateZOrder();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 100:\n\t\t\t\t\tthis._count=this._curIndex+1;\n\t\t\t\t\tthis._ended=true;\n\t\t\t\t\tif (this._playing){\n\t\t\t\t\t\tthis.event(/*laya.events.Event.FRAME*/\"enterframe\");\n\t\t\t\t\t\tthis.event(/*laya.events.Event.END*/\"end\");\n\t\t\t\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\t\t}\n\t\t\t\t\tthis._reset(false);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\tif (this._playing&&!this._ended)this.event(/*laya.events.Event.FRAME*/\"enterframe\");\n\t\tthis._Pos=_data.pos;\n\t}\n\n\t/**@private */\n\t__proto._setData=function(data,start){\n\t\tthis._data=data;\n\t\tthis._start=start+3;\n\t}\n\n\t/**\n\t*加载资源。\n\t*@param url swf 资源地址。\n\t*@param atlas 是否使用图集资源\n\t*@param atlasPath 图集路径，默认使用与swf同名的图集\n\t*/\n\t__proto.load=function(url,atlas,atlasPath){\n\t\t(atlas===void 0)&& (atlas=false);\n\t\tthis._url=url;\n\t\tif(atlas)this._atlasPath=atlasPath?atlasPath:url.split(\".swf\")[0]+\".json\";\n\t\tthis.stop();\n\t\tthis._clear();\n\t\tthis._movieClipList=[this];\n\t\tvar urls;\n\t\turls=[ {url:url,type:/*laya.net.Loader.BUFFER*/\"arraybuffer\" }];\n\t\tif (this._atlasPath){\n\t\t\turls.push({url:this._atlasPath,type:/*laya.net.Loader.ATLAS*/\"atlas\" });\n\t\t}\n\t\tLaya.loader.load(urls,Handler.create(this,this._onLoaded));\n\t}\n\n\t/**@private */\n\t__proto._onLoaded=function(){\n\t\tvar data;\n\t\tdata=Loader.getRes(this._url);\n\t\tif (!data){\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",\"file not find\");\n\t\t\treturn;\n\t\t}\n\t\tif (this._atlasPath && !Loader.getAtlas(this._atlasPath)){\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",\"Atlas not find\");\n\t\t\treturn;\n\t\t}\n\t\tthis.basePath=this._atlasPath?Loader.getAtlas(this._atlasPath).dir:this._url.split(\".swf\")[0]+\"/image/\";\n\t\tthis._initData(data);\n\t}\n\n\t/**@private */\n\t__proto._initState=function(){\n\t\tthis._reset();\n\t\tthis._ended=false;\n\t\tvar preState=this._playing;\n\t\tthis._playing=false;\n\t\tthis._curIndex=0;\n\t\twhile (!this._ended)this._parse(++this._curIndex);\n\t\tthis._playing=preState;\n\t}\n\n\t/**@private */\n\t__proto._initData=function(data){\n\t\tthis._data=new Byte(data);\n\t\tvar i=0,len=this._data.getUint16();\n\t\tfor (i=0;i < len;i++)this._ids[this._data.getInt16()]=this._data.getInt32();\n\t\tthis.interval=1000 / this._data.getUint16();\n\t\tthis._setData(this._data,this._ids[32767]);\n\t\tthis._initState();\n\t\tthis.play(0);\n\t\tthis.event(/*laya.events.Event.LOADED*/\"loaded\");\n\t\tif (!this._parentMovieClip)this.timer.loop(this.interval,this,this.updates,null,true);\n\t}\n\n\t/**\n\t*从开始索引播放到结束索引，结束之后出发complete回调\n\t*@param start 开始索引\n\t*@param end 结束索引\n\t*@param complete 结束回调\n\t*/\n\t__proto.playTo=function(start,end,complete){\n\t\tthis._completeHandler=complete;\n\t\tthis._endFrame=end;\n\t\tthis.play(start,false);\n\t}\n\n\t/**当前播放索引。*/\n\t__getset(0,__proto,'index',function(){\n\t\treturn this._playIndex;\n\t\t},function(value){\n\t\tthis._playIndex=value;\n\t\tif (this._data)\n\t\t\tthis._displayFrame(this._playIndex);\n\t\tif (this._labels && this._labels[value])this.event(/*laya.events.Event.LABEL*/\"label\",this._labels[value]);\n\t});\n\n\t/**\n\t*帧总数。\n\t*/\n\t__getset(0,__proto,'count',function(){\n\t\treturn this._count;\n\t});\n\n\t/**\n\t*是否在播放中\n\t*/\n\t__getset(0,__proto,'playing',function(){\n\t\treturn this._playing;\n\t});\n\n\t/**\n\t*资源地址。\n\t*/\n\t__getset(0,__proto,'url',null,function(path){\n\t\tthis.load(path);\n\t});\n\n\tMovieClip._ValueList=[\"x\",\"y\",\"width\",\"height\",\"scaleX\",\"scaleY\",\"rotation\",\"alpha\"];\n\treturn MovieClip;\n})(Sprite)\n\n\n/**\n*动画模板类\n*/\n//class laya.ani.bone.Templet extends laya.ani.AnimationTemplet\nvar Templet=(function(_super){\n\tfunction Templet(){\n\t\tthis._mainTexture=null;\n\t\tthis._textureJson=null;\n\t\tthis._graphicsCache=[];\n\t\t/**存放原始骨骼信息 */\n\t\tthis.srcBoneMatrixArr=[];\n\t\t/**IK数据 */\n\t\tthis.ikArr=[];\n\t\t/**transform数据 */\n\t\tthis.tfArr=[];\n\t\t/**path数据 */\n\t\tthis.pathArr=[];\n\t\t/**存放插槽数据的字典 */\n\t\tthis.boneSlotDic={};\n\t\t/**绑定插槽数据的字典 */\n\t\tthis.bindBoneBoneSlotDic={};\n\t\t/**存放插糟数据的数组 */\n\t\tthis.boneSlotArray=[];\n\t\t/**皮肤数据 */\n\t\tthis.skinDataArray=[];\n\t\t/**皮肤的字典数据 */\n\t\tthis.skinDic={};\n\t\t/**存放纹理数据 */\n\t\tthis.subTextureDic={};\n\t\t/**是否解析失败 */\n\t\tthis.isParseFail=false;\n\t\t/**反转矩阵，有些骨骼动画要反转才能显示 */\n\t\tthis.yReverseMatrix=null;\n\t\t/**渲染顺序动画数据 */\n\t\tthis.drawOrderAniArr=[];\n\t\t/**事件动画数据 */\n\t\tthis.eventAniArr=[];\n\t\t/**@private 索引对应的名称 */\n\t\tthis.attachmentNames=null;\n\t\t/**顶点动画数据 */\n\t\tthis.deformAniArr=[];\n\t\t/**是否需要解析audio数据 */\n\t\tthis._isParseAudio=false;\n\t\tthis._isDestroyed=false;\n\t\tthis._rate=30;\n\t\tthis.isParserComplete=false;\n\t\tthis.aniSectionDic={};\n\t\tthis._skBufferUrl=null;\n\t\tthis._textureDic={};\n\t\tthis._loadList=null;\n\t\tthis._path=null;\n\t\t/**@private */\n\t\tthis.tMatrixDataLen=0;\n\t\tthis.mRootBone=null;\n\t\tTemplet.__super.call(this);\n\t\tthis.skinSlotDisplayDataArr=[];\n\t\tthis.mBoneArr=[];\n\t}\n\n\t__class(Templet,'laya.ani.bone.Templet',_super);\n\tvar __proto=Templet.prototype;\n\t__proto.loadAni=function(url){\n\t\tthis._skBufferUrl=url;\n\t\tLaya.loader.load(url,Handler.create(this,this.onComplete),null,/*laya.net.Loader.BUFFER*/\"arraybuffer\");\n\t}\n\n\t__proto.onComplete=function(content){\n\t\tif (this._isDestroyed){\n\t\t\tthis.destroy();\n\t\t\treturn;\n\t\t};\n\t\tvar tSkBuffer=Loader.getRes(this._skBufferUrl);\n\t\tif (!tSkBuffer){\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",\"load failed:\"+this._skBufferUrl);\n\t\t\treturn;\n\t\t}\n\t\tthis._path=this._skBufferUrl.slice(0,this._skBufferUrl.lastIndexOf(\"/\"))+\"/\";\n\t\tthis.parseData(null,tSkBuffer);\n\t}\n\n\t/**\n\t*解析骨骼动画数据\n\t*@param texture 骨骼动画用到的纹理\n\t*@param skeletonData 骨骼动画信息及纹理分块信息\n\t*@param playbackRate 缓冲的帧率数据（会根据帧率去分帧）\n\t*/\n\t__proto.parseData=function(texture,skeletonData,playbackRate){\n\t\t(playbackRate===void 0)&& (playbackRate=30);\n\t\tif(!this._path&&this.url)this._path=this.url.slice(0,this.url.lastIndexOf(\"/\"))+\"/\";\n\t\tthis._mainTexture=texture;\n\t\tif (this._mainTexture){\n\t\t\tif (Render.isWebGL && texture.bitmap){\n\t\t\t\ttexture.bitmap.enableMerageInAtlas=false;\n\t\t\t}\n\t\t}\n\t\tthis._rate=playbackRate;\n\t\tthis.parse(skeletonData);\n\t}\n\n\t/**\n\t*创建动画\n\t*0,使用模板缓冲的数据，模板缓冲的数据，不允许修改 （内存开销小，计算开销小，不支持换装）\n\t*1,使用动画自己的缓冲区，每个动画都会有自己的缓冲区，相当耗费内存 （内存开销大，计算开销小，支持换装）\n\t*2,使用动态方式，去实时去画 （内存开销小，计算开销大，支持换装,不建议使用）\n\t*@param aniMode 0 动画模式，0:不支持换装,1,2支持换装\n\t*@return\n\t*/\n\t__proto.buildArmature=function(aniMode){\n\t\t(aniMode===void 0)&& (aniMode=0);\n\t\treturn new Skeleton(this,aniMode);\n\t}\n\n\t/**\n\t*@private\n\t*解析动画\n\t*@param data 解析的二进制数据\n\t*@param playbackRate 帧率\n\t*/\n\t__proto.parse=function(data){\n\t\t_super.prototype.parse.call(this,data);\n\t\tthis._endLoaded();\n\t\tif (this._aniVersion===Templet.LAYA_ANIMATION_VISION){\n\t\t\tthis._isParseAudio=true;\n\t\t\t}else if (this._aniVersion !=Templet.LAYA_ANIMATION_160_VISION){\n\t\t\tconsole.log(\"[Error] 版本不一致，请使用IDE版本配套的重新导出\"+this._aniVersion+\"->\"+Templet.LAYA_ANIMATION_VISION);\n\t\t\tthis._loaded=false;\n\t\t}\n\t\tif (this.loaded){\n\t\t\tif (this._mainTexture){\n\t\t\t\tthis._parsePublicExtData();\n\t\t\t\t}else {\n\t\t\t\tthis._parseTexturePath();\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",this);\n\t\t\tthis.isParseFail=true;\n\t\t}\n\t}\n\n\t__proto._parseTexturePath=function(){\n\t\tif (this._isDestroyed){\n\t\t\tthis.destroy();\n\t\t\treturn;\n\t\t};\n\t\tvar i=0;\n\t\tthis._loadList=[];\n\t\tvar tByte=new Byte(this.getPublicExtData());\n\t\tvar tX=0,tY=0,tWidth=0,tHeight=0;\n\t\tvar tFrameX=0,tFrameY=0,tFrameWidth=0,tFrameHeight=0;\n\t\tvar tTempleData=0;\n\t\tvar tTextureLen=tByte.getInt32();\n\t\tvar tTextureName=tByte.readUTFString();\n\t\tvar tTextureNameArr=tTextureName.split(\"\\n\");\n\t\tvar tTexture;\n\t\tvar tSrcTexturePath;\n\t\tfor (i=0;i < tTextureLen;i++){\n\t\t\ttSrcTexturePath=this._path+tTextureNameArr[i *2];\n\t\t\ttTextureName=tTextureNameArr[i *2+1];\n\t\t\ttX=tByte.getFloat32();\n\t\t\ttY=tByte.getFloat32();\n\t\t\ttWidth=tByte.getFloat32();\n\t\t\ttHeight=tByte.getFloat32();\n\t\t\ttTempleData=tByte.getFloat32();\n\t\t\ttFrameX=isNaN(tTempleData)? 0 :tTempleData;\n\t\t\ttTempleData=tByte.getFloat32();\n\t\t\ttFrameY=isNaN(tTempleData)? 0 :tTempleData;\n\t\t\ttTempleData=tByte.getFloat32();\n\t\t\ttFrameWidth=isNaN(tTempleData)? tWidth :tTempleData;\n\t\t\ttTempleData=tByte.getFloat32();\n\t\t\ttFrameHeight=isNaN(tTempleData)? tHeight :tTempleData;\n\t\t\tif (this._loadList.indexOf(tSrcTexturePath)==-1){\n\t\t\t\tthis._loadList.push(tSrcTexturePath);\n\t\t\t}\n\t\t}\n\t\tLaya.loader.load(this._loadList,Handler.create(this,this._textureComplete));\n\t}\n\n\t/**\n\t*纹理加载完成\n\t*/\n\t__proto._textureComplete=function(){\n\t\tvar tTexture;\n\t\tvar tTextureName;\n\t\tfor (var i=0,n=this._loadList.length;i < n;i++){\n\t\t\ttTextureName=this._loadList[i];\n\t\t\ttTexture=this._textureDic[tTextureName]=Loader.getRes(tTextureName);\n\t\t\tif (Render.isWebGL && tTexture && tTexture.bitmap){\n\t\t\t\ttTexture.bitmap.enableMerageInAtlas=false;\n\t\t\t}\n\t\t}\n\t\tthis._parsePublicExtData();\n\t}\n\n\t/**\n\t*解析自定义数据\n\t*/\n\t__proto._parsePublicExtData=function(){\n\t\tvar i=0,j=0,k=0,l=0,n=0;\n\t\tfor (i=0,n=this.getAnimationCount();i < n;i++){\n\t\t\tthis._graphicsCache.push([]);\n\t\t};\n\t\tvar isSpine=false;\n\t\tisSpine=this._aniClassName !=\"Dragon\";\n\t\tvar tByte=new Byte(this.getPublicExtData());\n\t\tvar tX=0,tY=0,tWidth=0,tHeight=0;\n\t\tvar tFrameX=0,tFrameY=0,tFrameWidth=0,tFrameHeight=0;\n\t\tvar tTempleData=0;\n\t\tvar tTextureLen=tByte.getInt32();\n\t\tvar tTextureName=tByte.readUTFString();\n\t\tvar tTextureNameArr=tTextureName.split(\"\\n\");\n\t\tvar tTexture;\n\t\tvar tSrcTexturePath;\n\t\tfor (i=0;i < tTextureLen;i++){\n\t\t\ttTexture=this._mainTexture;\n\t\t\ttSrcTexturePath=this._path+tTextureNameArr[i *2];\n\t\t\ttTextureName=tTextureNameArr[i *2+1];\n\t\t\tif (this._mainTexture==null){\n\t\t\t\ttTexture=this._textureDic[tSrcTexturePath];\n\t\t\t}\n\t\t\tif (!tTexture){\n\t\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",this);\n\t\t\t\tthis.isParseFail=true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttX=tByte.getFloat32();\n\t\t\ttY=tByte.getFloat32();\n\t\t\ttWidth=tByte.getFloat32();\n\t\t\ttHeight=tByte.getFloat32();\n\t\t\ttTempleData=tByte.getFloat32();\n\t\t\ttFrameX=isNaN(tTempleData)? 0 :tTempleData;\n\t\t\ttTempleData=tByte.getFloat32();\n\t\t\ttFrameY=isNaN(tTempleData)? 0 :tTempleData;\n\t\t\ttTempleData=tByte.getFloat32();\n\t\t\ttFrameWidth=isNaN(tTempleData)? tWidth :tTempleData;\n\t\t\ttTempleData=tByte.getFloat32();\n\t\t\ttFrameHeight=isNaN(tTempleData)? tHeight :tTempleData;\n\t\t\tthis.subTextureDic[tTextureName]=Texture.create(tTexture,tX,tY,tWidth,tHeight,-tFrameX,-tFrameY,tFrameWidth,tFrameHeight);\n\t\t}\n\t\tthis._mainTexture=tTexture;\n\t\tvar tAniCount=tByte.getUint16();\n\t\tvar tSectionArr;\n\t\tfor (i=0;i < tAniCount;i++){\n\t\t\ttSectionArr=[];\n\t\t\ttSectionArr.push(tByte.getUint16());\n\t\t\ttSectionArr.push(tByte.getUint16());\n\t\t\ttSectionArr.push(tByte.getUint16());\n\t\t\ttSectionArr.push(tByte.getUint16());\n\t\t\tthis.aniSectionDic[i]=tSectionArr;\n\t\t};\n\t\tvar tBone;\n\t\tvar tParentBone;\n\t\tvar tName;\n\t\tvar tParentName;\n\t\tvar tBoneLen=tByte.getInt16();\n\t\tvar tBoneDic={};\n\t\tvar tRootBone;\n\t\tfor (i=0;i < tBoneLen;i++){\n\t\t\ttBone=new Bone();\n\t\t\tif (i==0){\n\t\t\t\ttRootBone=tBone;\n\t\t\t\t}else {\n\t\t\t\ttBone.root=tRootBone;\n\t\t\t}\n\t\t\ttBone.d=isSpine?-1:1;\n\t\t\ttName=tByte.readUTFString();\n\t\t\ttParentName=tByte.readUTFString();\n\t\t\ttBone.length=tByte.getFloat32();\n\t\t\tif (tByte.getByte()==1){\n\t\t\t\ttBone.inheritRotation=false;\n\t\t\t}\n\t\t\tif (tByte.getByte()==1){\n\t\t\t\ttBone.inheritScale=false;\n\t\t\t}\n\t\t\ttBone.name=tName;\n\t\t\tif (tParentName){\n\t\t\t\ttParentBone=tBoneDic[tParentName];\n\t\t\t\tif (tParentBone){\n\t\t\t\t\ttParentBone.addChild(tBone);\n\t\t\t\t\t}else {\n\t\t\t\t\tthis.mRootBone=tBone;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttBoneDic[tName]=tBone;\n\t\t\tthis.mBoneArr.push(tBone);\n\t\t}\n\t\tthis.tMatrixDataLen=tByte.getUint16();\n\t\tvar tLen=tByte.getUint16();\n\t\tvar parentIndex=0;\n\t\tvar boneLength=Math.floor(tLen / this.tMatrixDataLen);\n\t\tvar tResultTransform;\n\t\tvar tMatrixArray=this.srcBoneMatrixArr;\n\t\tfor (i=0;i < boneLength;i++){\n\t\t\ttResultTransform=new Transform();\n\t\t\ttResultTransform.scX=tByte.getFloat32();\n\t\t\ttResultTransform.skX=tByte.getFloat32();\n\t\t\ttResultTransform.skY=tByte.getFloat32();\n\t\t\ttResultTransform.scY=tByte.getFloat32();\n\t\t\ttResultTransform.x=tByte.getFloat32();\n\t\t\ttResultTransform.y=tByte.getFloat32();\n\t\t\tif (this.tMatrixDataLen===8){\n\t\t\t\ttResultTransform.skewX=tByte.getFloat32();\n\t\t\t\ttResultTransform.skewY=tByte.getFloat32();\n\t\t\t}\n\t\t\ttMatrixArray.push(tResultTransform);\n\t\t\ttBone=this.mBoneArr[i];\n\t\t\ttBone.transform=tResultTransform;\n\t\t};\n\t\tvar tIkConstraintData;\n\t\tvar tIkLen=tByte.getUint16();\n\t\tvar tIkBoneLen=0;\n\t\tfor (i=0;i < tIkLen;i++){\n\t\t\ttIkConstraintData=new IkConstraintData();\n\t\t\ttIkBoneLen=tByte.getUint16();\n\t\t\tfor (j=0;j < tIkBoneLen;j++){\n\t\t\t\ttIkConstraintData.boneNames.push(tByte.readUTFString());\n\t\t\t\ttIkConstraintData.boneIndexs.push(tByte.getInt16());\n\t\t\t}\n\t\t\ttIkConstraintData.name=tByte.readUTFString();\n\t\t\ttIkConstraintData.targetBoneName=tByte.readUTFString();\n\t\t\ttIkConstraintData.targetBoneIndex=tByte.getInt16();\n\t\t\ttIkConstraintData.bendDirection=tByte.getFloat32();\n\t\t\ttIkConstraintData.mix=tByte.getFloat32();\n\t\t\ttIkConstraintData.isSpine=isSpine;\n\t\t\tthis.ikArr.push(tIkConstraintData);\n\t\t};\n\t\tvar tTfConstraintData;\n\t\tvar tTfLen=tByte.getUint16();\n\t\tvar tTfBoneLen=0;\n\t\tfor (i=0;i < tTfLen;i++){\n\t\t\ttTfConstraintData=new TfConstraintData();\n\t\t\ttTfBoneLen=tByte.getUint16();\n\t\t\tfor (j=0;j < tTfBoneLen;j++){\n\t\t\t\ttTfConstraintData.boneIndexs.push(tByte.getInt16());\n\t\t\t}\n\t\t\ttTfConstraintData.name=tByte.getUTFString();\n\t\t\ttTfConstraintData.targetIndex=tByte.getInt16();\n\t\t\ttTfConstraintData.rotateMix=tByte.getFloat32();\n\t\t\ttTfConstraintData.translateMix=tByte.getFloat32();\n\t\t\ttTfConstraintData.scaleMix=tByte.getFloat32();\n\t\t\ttTfConstraintData.shearMix=tByte.getFloat32();\n\t\t\ttTfConstraintData.offsetRotation=tByte.getFloat32();\n\t\t\ttTfConstraintData.offsetX=tByte.getFloat32();\n\t\t\ttTfConstraintData.offsetY=tByte.getFloat32();\n\t\t\ttTfConstraintData.offsetScaleX=tByte.getFloat32();\n\t\t\ttTfConstraintData.offsetScaleY=tByte.getFloat32();\n\t\t\ttTfConstraintData.offsetShearY=tByte.getFloat32();\n\t\t\tthis.tfArr.push(tTfConstraintData);\n\t\t};\n\t\tvar tPathConstraintData;\n\t\tvar tPathLen=tByte.getUint16();\n\t\tvar tPathBoneLen=0;\n\t\tfor (i=0;i < tPathLen;i++){\n\t\t\ttPathConstraintData=new PathConstraintData();\n\t\t\ttPathConstraintData.name=tByte.readUTFString();\n\t\t\ttPathBoneLen=tByte.getUint16();\n\t\t\tfor (j=0;j < tPathBoneLen;j++){\n\t\t\t\ttPathConstraintData.bones.push(tByte.getInt16());\n\t\t\t}\n\t\t\ttPathConstraintData.target=tByte.readUTFString();\n\t\t\ttPathConstraintData.positionMode=tByte.readUTFString();\n\t\t\ttPathConstraintData.spacingMode=tByte.readUTFString();\n\t\t\ttPathConstraintData.rotateMode=tByte.readUTFString();\n\t\t\ttPathConstraintData.offsetRotation=tByte.getFloat32();\n\t\t\ttPathConstraintData.position=tByte.getFloat32();\n\t\t\ttPathConstraintData.spacing=tByte.getFloat32();\n\t\t\ttPathConstraintData.rotateMix=tByte.getFloat32();\n\t\t\ttPathConstraintData.translateMix=tByte.getFloat32();\n\t\t\tthis.pathArr.push(tPathConstraintData);\n\t\t};\n\t\tvar tDeformSlotLen=0;\n\t\tvar tDeformSlotDisplayLen=0;\n\t\tvar tDSlotIndex=0;\n\t\tvar tDAttachment;\n\t\tvar tDeformTimeLen=0;\n\t\tvar tDTime=NaN;\n\t\tvar tDeformVecticesLen=0;\n\t\tvar tDeformAniData;\n\t\tvar tDeformSlotData;\n\t\tvar tDeformSlotDisplayData;\n\t\tvar tDeformVectices;\n\t\tvar tDeformAniLen=tByte.getInt16();\n\t\tfor (i=0;i < tDeformAniLen;i++){\n\t\t\tvar tDeformSkinLen=tByte.getUint8();\n\t\t\tvar tSkinDic={};\n\t\t\tthis.deformAniArr.push(tSkinDic);\n\t\t\tfor (var f=0;f < tDeformSkinLen;f++){\n\t\t\t\ttDeformAniData=new DeformAniData();\n\t\t\t\ttDeformAniData.skinName=tByte.getUTFString();\n\t\t\t\ttSkinDic[tDeformAniData.skinName]=tDeformAniData;\n\t\t\t\ttDeformSlotLen=tByte.getInt16();\n\t\t\t\tfor (j=0;j < tDeformSlotLen;j++){\n\t\t\t\t\ttDeformSlotData=new DeformSlotData();\n\t\t\t\t\ttDeformAniData.deformSlotDataList.push(tDeformSlotData);\n\t\t\t\t\ttDeformSlotDisplayLen=tByte.getInt16();\n\t\t\t\t\tfor (k=0;k < tDeformSlotDisplayLen;k++){\n\t\t\t\t\t\ttDeformSlotDisplayData=new DeformSlotDisplayData();\n\t\t\t\t\t\ttDeformSlotData.deformSlotDisplayList.push(tDeformSlotDisplayData);\n\t\t\t\t\t\ttDeformSlotDisplayData.slotIndex=tDSlotIndex=tByte.getInt16();\n\t\t\t\t\t\ttDeformSlotDisplayData.attachment=tDAttachment=tByte.getUTFString();\n\t\t\t\t\t\ttDeformTimeLen=tByte.getInt16();\n\t\t\t\t\t\tfor (l=0;l < tDeformTimeLen;l++){\n\t\t\t\t\t\t\tif (tByte.getByte()==1){\n\t\t\t\t\t\t\t\ttDeformSlotDisplayData.tweenKeyList.push(true);\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\ttDeformSlotDisplayData.tweenKeyList.push(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttDTime=tByte.getFloat32();\n\t\t\t\t\t\t\ttDeformSlotDisplayData.timeList.push(tDTime);\n\t\t\t\t\t\t\ttDeformVectices=[];\n\t\t\t\t\t\t\ttDeformSlotDisplayData.vectices.push(tDeformVectices);\n\t\t\t\t\t\t\ttDeformVecticesLen=tByte.getInt16();\n\t\t\t\t\t\t\tfor (n=0;n < tDeformVecticesLen;n++){\n\t\t\t\t\t\t\t\ttDeformVectices.push(tByte.getFloat32());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar tDrawOrderArr;\n\t\tvar tDrawOrderAniLen=tByte.getInt16();\n\t\tvar tDrawOrderLen=0;\n\t\tvar tDrawOrderData;\n\t\tvar tDoLen=0;\n\t\tfor (i=0;i < tDrawOrderAniLen;i++){\n\t\t\ttDrawOrderLen=tByte.getInt16();\n\t\t\ttDrawOrderArr=[];\n\t\t\tfor (j=0;j < tDrawOrderLen;j++){\n\t\t\t\ttDrawOrderData=new DrawOrderData();\n\t\t\t\ttDrawOrderData.time=tByte.getFloat32();\n\t\t\t\ttDoLen=tByte.getInt16();\n\t\t\t\tfor (k=0;k < tDoLen;k++){\n\t\t\t\t\ttDrawOrderData.drawOrder.push(tByte.getInt16());\n\t\t\t\t}\n\t\t\t\ttDrawOrderArr.push(tDrawOrderData);\n\t\t\t}\n\t\t\tthis.drawOrderAniArr.push(tDrawOrderArr);\n\t\t};\n\t\tvar tEventArr;\n\t\tvar tEventAniLen=tByte.getInt16();\n\t\tvar tEventLen=0;\n\t\tvar tEventData;\n\t\tfor (i=0;i < tEventAniLen;i++){\n\t\t\ttEventLen=tByte.getInt16();\n\t\t\ttEventArr=[];\n\t\t\tfor (j=0;j < tEventLen;j++){\n\t\t\t\ttEventData=new EventData();\n\t\t\t\ttEventData.name=tByte.getUTFString();\n\t\t\t\tif (this._isParseAudio)tEventData.audioValue=tByte.getUTFString();\n\t\t\t\ttEventData.intValue=tByte.getInt32();\n\t\t\t\ttEventData.floatValue=tByte.getFloat32();\n\t\t\t\ttEventData.stringValue=tByte.getUTFString();\n\t\t\t\ttEventData.time=tByte.getFloat32();\n\t\t\t\ttEventArr.push(tEventData);\n\t\t\t}\n\t\t\tthis.eventAniArr.push(tEventArr);\n\t\t};\n\t\tvar tAttachmentLen=tByte.getInt16();\n\t\tif (tAttachmentLen > 0){\n\t\t\tthis.attachmentNames=[];\n\t\t\tfor (i=0;i < tAttachmentLen;i++){\n\t\t\t\tthis.attachmentNames.push(tByte.getUTFString());\n\t\t\t}\n\t\t};\n\t\tvar tBoneSlotLen=tByte.getInt16();\n\t\tvar tDBBoneSlot;\n\t\tvar tDBBoneSlotArr;\n\t\tfor (i=0;i < tBoneSlotLen;i++){\n\t\t\ttDBBoneSlot=new BoneSlot();\n\t\t\ttDBBoneSlot.name=tByte.readUTFString();\n\t\t\ttDBBoneSlot.parent=tByte.readUTFString();\n\t\t\ttDBBoneSlot.attachmentName=tByte.readUTFString();\n\t\t\ttDBBoneSlot.srcDisplayIndex=tDBBoneSlot.displayIndex=tByte.getInt16();\n\t\t\ttDBBoneSlot.templet=this;\n\t\t\tthis.boneSlotDic[tDBBoneSlot.name]=tDBBoneSlot;\n\t\t\ttDBBoneSlotArr=this.bindBoneBoneSlotDic[tDBBoneSlot.parent];\n\t\t\tif (tDBBoneSlotArr==null){\n\t\t\t\tthis.bindBoneBoneSlotDic[tDBBoneSlot.parent]=tDBBoneSlotArr=[];\n\t\t\t}\n\t\t\ttDBBoneSlotArr.push(tDBBoneSlot);\n\t\t\tthis.boneSlotArray.push(tDBBoneSlot);\n\t\t};\n\t\tvar tNameString=tByte.readUTFString();\n\t\tvar tNameArray=tNameString.split(\"\\n\");\n\t\tvar tNameStartIndex=0;\n\t\tvar tSkinDataLen=tByte.getUint8();\n\t\tvar tSkinData,tSlotData,tDisplayData;\n\t\tvar tSlotDataLen=0,tDisplayDataLen=0;\n\t\tvar tUvLen=0,tWeightLen=0,tTriangleLen=0,tVerticeLen=0,tLengthLen=0;\n\t\tfor (i=0;i < tSkinDataLen;i++){\n\t\t\ttSkinData=new SkinData();\n\t\t\ttSkinData.name=tNameArray[tNameStartIndex++];\n\t\t\ttSlotDataLen=tByte.getUint8();\n\t\t\tfor (j=0;j < tSlotDataLen;j++){\n\t\t\t\ttSlotData=new SlotData();\n\t\t\t\ttSlotData.name=tNameArray[tNameStartIndex++];\n\t\t\t\ttDBBoneSlot=this.boneSlotDic[tSlotData.name];\n\t\t\t\ttDisplayDataLen=tByte.getUint8();\n\t\t\t\tfor (k=0;k < tDisplayDataLen;k++){\n\t\t\t\t\ttDisplayData=new SkinSlotDisplayData();\n\t\t\t\t\tthis.skinSlotDisplayDataArr.push(tDisplayData);\n\t\t\t\t\ttDisplayData.name=tNameArray[tNameStartIndex++];\n\t\t\t\t\ttDisplayData.attachmentName=tNameArray[tNameStartIndex++];\n\t\t\t\t\ttDisplayData.transform=new Transform();\n\t\t\t\t\ttDisplayData.transform.scX=tByte.getFloat32();\n\t\t\t\t\ttDisplayData.transform.skX=tByte.getFloat32();\n\t\t\t\t\ttDisplayData.transform.skY=tByte.getFloat32();\n\t\t\t\t\ttDisplayData.transform.scY=tByte.getFloat32();\n\t\t\t\t\ttDisplayData.transform.x=tByte.getFloat32();\n\t\t\t\t\ttDisplayData.transform.y=tByte.getFloat32();\n\t\t\t\t\ttSlotData.displayArr.push(tDisplayData);\n\t\t\t\t\ttDisplayData.width=tByte.getFloat32();\n\t\t\t\t\ttDisplayData.height=tByte.getFloat32();\n\t\t\t\t\ttDisplayData.type=tByte.getUint8();\n\t\t\t\t\ttDisplayData.verLen=tByte.getUint16();\n\t\t\t\t\ttBoneLen=tByte.getUint16();\n\t\t\t\t\tif (tBoneLen > 0){\n\t\t\t\t\t\ttDisplayData.bones=[];\n\t\t\t\t\t\tfor (l=0;l < tBoneLen;l++){\n\t\t\t\t\t\t\tvar tBoneId=tByte.getUint16();\n\t\t\t\t\t\t\ttDisplayData.bones.push(tBoneId);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttUvLen=tByte.getUint16();\n\t\t\t\t\tif (tUvLen > 0){\n\t\t\t\t\t\ttDisplayData.uvs=[];\n\t\t\t\t\t\tfor (l=0;l < tUvLen;l++){\n\t\t\t\t\t\t\ttDisplayData.uvs.push(tByte.getFloat32());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttWeightLen=tByte.getUint16();\n\t\t\t\t\tif (tWeightLen > 0){\n\t\t\t\t\t\ttDisplayData.weights=[];\n\t\t\t\t\t\tfor (l=0;l < tWeightLen;l++){\n\t\t\t\t\t\t\ttDisplayData.weights.push(tByte.getFloat32());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttTriangleLen=tByte.getUint16();\n\t\t\t\t\tif (tTriangleLen > 0){\n\t\t\t\t\t\ttDisplayData.triangles=[];\n\t\t\t\t\t\tfor (l=0;l < tTriangleLen;l++){\n\t\t\t\t\t\t\ttDisplayData.triangles.push(tByte.getUint16());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttVerticeLen=tByte.getUint16();\n\t\t\t\t\tif (tVerticeLen > 0){\n\t\t\t\t\t\ttDisplayData.vertices=[];\n\t\t\t\t\t\tfor (l=0;l < tVerticeLen;l++){\n\t\t\t\t\t\t\ttDisplayData.vertices.push(tByte.getFloat32());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttLengthLen=tByte.getUint16();\n\t\t\t\t\tif (tLengthLen > 0){\n\t\t\t\t\t\ttDisplayData.lengths=[];\n\t\t\t\t\t\tfor (l=0;l < tLengthLen;l++){\n\t\t\t\t\t\t\ttDisplayData.lengths.push(tByte.getFloat32());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttSkinData.slotArr.push(tSlotData);\n\t\t\t}\n\t\t\tthis.skinDic[tSkinData.name]=tSkinData;\n\t\t\tthis.skinDataArray.push(tSkinData);\n\t\t};\n\t\tvar tReverse=tByte.getUint8();\n\t\tif (tReverse==1){\n\t\t\tthis.yReverseMatrix=new Matrix(1,0,0,-1,0,0);\n\t\t\tif (tRootBone){\n\t\t\t\ttRootBone.setTempMatrix(this.yReverseMatrix);\n\t\t\t}\n\t\t\t}else {\n\t\t\tif (tRootBone){\n\t\t\t\ttRootBone.setTempMatrix(new Matrix());\n\t\t\t}\n\t\t}\n\t\tthis.showSkinByIndex(this.boneSlotDic,0);\n\t\tthis.isParserComplete=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",this);\n\t}\n\n\t/**\n\t*得到指定的纹理\n\t*@param name 纹理的名字\n\t*@return\n\t*/\n\t__proto.getTexture=function(name){\n\t\tvar tTexture=this.subTextureDic[name];\n\t\tif (!tTexture){\n\t\t\ttTexture=this.subTextureDic[name.substr(0,name.length-1)];\n\t\t}\n\t\tif (tTexture==null){\n\t\t\treturn this._mainTexture;\n\t\t}\n\t\treturn tTexture;\n\t}\n\n\t/**\n\t*@private\n\t*显示指定的皮肤\n\t*@param boneSlotDic 插糟字典的引用\n\t*@param skinIndex 皮肤的索引\n\t*@param freshDisplayIndex 是否重置插槽纹理\n\t*/\n\t__proto.showSkinByIndex=function(boneSlotDic,skinIndex,freshDisplayIndex){\n\t\t(freshDisplayIndex===void 0)&& (freshDisplayIndex=true);\n\t\tif (skinIndex < 0 && skinIndex >=this.skinDataArray.length)return false;\n\t\tvar i=0,n=0;\n\t\tvar tBoneSlot;\n\t\tvar tSlotData;\n\t\tvar tSkinData=this.skinDataArray[skinIndex];\n\t\tif (tSkinData){\n\t\t\tfor (i=0,n=tSkinData.slotArr.length;i < n;i++){\n\t\t\t\ttSlotData=tSkinData.slotArr[i];\n\t\t\t\tif (tSlotData){\n\t\t\t\t\ttBoneSlot=boneSlotDic[tSlotData.name];\n\t\t\t\t\tif (tBoneSlot){\n\t\t\t\t\t\ttBoneSlot.showSlotData(tSlotData,freshDisplayIndex);\n\t\t\t\t\t\tif (freshDisplayIndex&&tBoneSlot.attachmentName !=\"undefined\" && tBoneSlot.attachmentName !=\"null\"){\n\t\t\t\t\t\t\ttBoneSlot.showDisplayByName(tBoneSlot.attachmentName);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\ttBoneSlot.showDisplayByIndex(tBoneSlot.displayIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*通过皮肤名字得到皮肤索引\n\t*@param skinName 皮肤名称\n\t*@return\n\t*/\n\t__proto.getSkinIndexByName=function(skinName){\n\t\tvar tSkinData;\n\t\tfor (var i=0,n=this.skinDataArray.length;i < n;i++){\n\t\t\ttSkinData=this.skinDataArray[i];\n\t\t\tif (tSkinData.name==skinName){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn-1;\n\t}\n\n\t/**\n\t*@private\n\t*得到缓冲数据\n\t*@param aniIndex 动画索引\n\t*@param frameIndex 帧索引\n\t*@return\n\t*/\n\t__proto.getGrahicsDataWithCache=function(aniIndex,frameIndex){\n\t\tif (this._graphicsCache[aniIndex] && this._graphicsCache[aniIndex][frameIndex]){\n\t\t\treturn this._graphicsCache[aniIndex][frameIndex];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*@private\n\t*保存缓冲grahpics\n\t*@param aniIndex 动画索引\n\t*@param frameIndex 帧索引\n\t*@param graphics 要保存的数据\n\t*/\n\t__proto.setGrahicsDataWithCache=function(aniIndex,frameIndex,graphics){\n\t\tthis._graphicsCache[aniIndex][frameIndex]=graphics;\n\t}\n\n\t/**\n\t*释放纹理\n\t*/\n\t__proto.destroy=function(){\n\t\tthis._isDestroyed=true;\n\t\tvar tTexture;\n\t\t/*for each*/for(var $each_tTexture in this.subTextureDic){\n\t\t\ttTexture=this.subTextureDic[$each_tTexture];\n\t\t\tif(tTexture)\n\t\t\t\ttTexture.destroy();\n\t\t}\n\t\tvar $each_tTexture;\n\t\t/*for each*/for($each_tTexture in this._textureDic){\n\t\t\ttTexture=this._textureDic[$each_tTexture];\n\t\t\tif(tTexture)\n\t\t\t\ttTexture.destroy();\n\t\t};\n\t\tvar tSkinSlotDisplayData;\n\t\tfor (var i=0,n=this.skinSlotDisplayDataArr.length;i < n;i++){\n\t\t\ttSkinSlotDisplayData=this.skinSlotDisplayDataArr[i];\n\t\t\ttSkinSlotDisplayData.destory();\n\t\t}\n\t\tthis.skinSlotDisplayDataArr.length=0;\n\t\tif (this.url){\n\t\t\tdelete Templet.TEMPLET_DICTIONARY[this.url];\n\t\t}\n\t\tlaya.resource.Resource.prototype.destroy.call(this);\n\t}\n\n\t/**\n\t*通过索引得动画名称\n\t*@param index\n\t*@return\n\t*/\n\t__proto.getAniNameByIndex=function(index){\n\t\tvar tAni=this.getAnimation(index);\n\t\tif (tAni)return tAni.name;\n\t\treturn null;\n\t}\n\n\t__getset(0,__proto,'rate',function(){\n\t\treturn this._rate;\n\t\t},function(v){\n\t\tthis._rate=v;\n\t});\n\n\tTemplet.LAYA_ANIMATION_160_VISION=\"LAYAANIMATION:1.6.0\";\n\tTemplet.LAYA_ANIMATION_VISION=\"LAYAANIMATION:1.7.0\";\n\tTemplet.TEMPLET_DICTIONARY=null;\n\treturn Templet;\n})(AnimationTemplet)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.bdmini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,URL=laya.net.URL,Utils=laya.utils.Utils;\n//class laya.bd.mini.BMiniAdapter\nvar BMiniAdapter=(function(){\n\tfunction BMiniAdapter(){}\n\t__class(BMiniAdapter,'laya.bd.mini.BMiniAdapter');\n\tBMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tBMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (BMiniAdapter._inited)return;\n\t\tBMiniAdapter._inited=true;\n\t\tBMiniAdapter.window=/*__JS__ */window;\n\t\tif(BMiniAdapter.window.navigator.userAgent.indexOf('SwanGame')<0)return;\n\t\tBMiniAdapter.isZiYu=isSon;\n\t\tBMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tBMiniAdapter.EnvConfig={};\n\t\ttry{\n\t\t\t/*__JS__ */laya.webgl.resource.WebGLCanvas.premulAlpha=true;\n\t\t\t}catch(e){\n\t\t}\n\t\tif(!BMiniAdapter.isZiYu){\n\t\t\tMiniFileMgr$1.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$1.existDir(MiniFileMgr$1.fileNativeDir,Handler.create(BMiniAdapter,BMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tif(!BMiniAdapter.isZiYu){\n\t\t\tBMiniAdapter.systemInfo=BMiniAdapter.window.swan.getSystemInfoSync();\n\t\t}\n\t\tBMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tBMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tBMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tBMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tBMiniAdapter.window.CanvasRenderingContext2D=function (){\n\t\t};\n\t\tBMiniAdapter.window.CanvasRenderingContext2D.prototype=BMiniAdapter.window.swan.createCanvas().getContext('2d').__proto__;\n\t\tBMiniAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tBMiniAdapter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=BMiniAdapter.pixelRatio;\n\t\tBMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=BMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=BMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=BMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$1['_createInputElement'];\n\t\tBMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$1.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$1.prototype._loadImage;\n\t\tLocalStorage._baseClass=MiniLocalStorage$1;\n\t\tMiniLocalStorage$1.__init__();\n\t\tBMiniAdapter.onReciveData();\n\t}\n\n\tBMiniAdapter.onReciveData=function(){\n\t\tif(laya.bd.mini.BMiniAdapter.isZiYu){\n\t\t\tBMiniAdapter.window.swan.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$1.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr$1.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$1.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr$1.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tBMiniAdapter.measureText=function(str){\n\t\tvar tempObj=BMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tBMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tBMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$1.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$1.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tBMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$1.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tBMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$1.deleteAll();\n\t}\n\n\tBMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$1.isLocalNativeFile(fileUrl);\n\t}\n\n\tBMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$1.getFileInfo(fileUrl);\n\t}\n\n\tBMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$1.filesListObj;\n\t}\n\n\tBMiniAdapter.exitMiniProgram=function(){\n\t\tBMiniAdapter.window.swan.exitMiniProgram();\n\t}\n\n\tBMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr$1.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr$1.fakeObj=JSON.parse(data.data);\n\t\t}\n\t\tBMiniAdapter.onChuLiYuJiaZai();\n\t}\n\n\tBMiniAdapter.onChuLiYuJiaZai=function(){\n\t\tif(BMiniAdapter.window.preloadResources){\n\t\t\tvar preloadResources=BMiniAdapter.window.preloadResources;\n\t\t\tfor(var i=0,sz=preloadResources.length;i<sz;i++){\n\t\t\t\tvar resObj=preloadResources[i];\n\t\t\t\tvar isExsit=false;\n\t\t\t\ttry{\n\t\t\t\t\tMiniFileMgr$1.fs.accessSync(resObj.filePath);\n\t\t\t\t\tisExsit=true;\n\t\t\t\t}\n\t\t\t\tcatch(error){};\n\t\t\t\tif(isExsit && resObj.filePath){\n\t\t\t\t\tconsole.log(\"获取预加载的资源路径 url:\"+resObj.url);\n\t\t\t\t\tvar tempFileName=resObj.filePath.split(MiniFileMgr$1.fileNativeDir+\"/\")[1];\n\t\t\t\t\tMiniFileMgr$1.fakeObj[resObj.url]={md5:tempFileName,readyUrl:resObj.url,size:0,times:Browser.now(),encoding:\"utf8\"};\n\t\t\t\t\tBMiniAdapter.nativefiles.push(resObj.url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tBMiniAdapter.pixelRatio=function(){\n\t\tif (!BMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tBMiniAdapter.EnvConfig.pixelRatioInt=BMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn BMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn BMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tBMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (BMiniAdapter.idx==1){\n\t\t\t\tif(BMiniAdapter.isZiYu){\n\t\t\t\t\t_source=/*__JS__ */sharedCanvas;\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=BMiniAdapter.window.canvas;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=BMiniAdapter.window.swan.createCanvas();\n\t\t\t}\n\t\t\tBMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn BMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=BMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t\t}else {\n\t\t\treturn BMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tBMiniAdapter.onCreateInput=function(type){\n\t\tvar node=BMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$1.wxinputFocus;\n\t\tnode.blur=MiniInput$1.wxinputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tBMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tBMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.bd.mini.BMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tBMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tBMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$1.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$1.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tvar openDataContext=BMiniAdapter.window.swan.getOpenDataContext();\n\t\t\topenDataContext.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tBMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$1.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$1.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tBMiniAdapter.window.swan.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tBMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.bd.mini.BMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tBMiniAdapter.window.swan.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tBMiniAdapter.EnvConfig=null;\n\tBMiniAdapter.window=null;\n\tBMiniAdapter._preCreateElement=null;\n\tBMiniAdapter._inited=false;\n\tBMiniAdapter.systemInfo={};\n\tBMiniAdapter.isZiYu=false;\n\tBMiniAdapter.isPosMsgYu=false;\n\tBMiniAdapter.autoCacheFile=true;\n\tBMiniAdapter.minClearSize=(5 *1024 *1024);\n\tBMiniAdapter.subNativeFiles=null;\n\tBMiniAdapter.subNativeheads=[];\n\tBMiniAdapter.subMaps=[];\n\tBMiniAdapter.AutoCacheDownFile=false;\n\tBMiniAdapter._measureText=null;\n\tBMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tBMiniAdapter.idx=1;\n\t__static(BMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"wxlocal\"];}\n\t]);\n\treturn BMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.bd.mini.MiniFileMgr\nvar MiniFileMgr$1=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.bd.mini.MiniFileMgr',null,'MiniFileMgr$1');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=BMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(BMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl.split(\"?\")[0];\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(BMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((BMiniAdapter.autoCacheFile || isSaveFile)){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,null);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true);\n\t\telse\n\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType);\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl.split(\"?\")[0];\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((fileUseSize+chaSize+data.size)>=totalSize){\n\t\t\t\t\t\t\tif(data.size > BMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tBMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((fileUseSize+chaSize+data.size)>=totalSize){\n\t\t\t\t\t\tif(data.size > BMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tBMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=BMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.bd.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tif(!fileObj)\n\t\t\treturn;\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\tlaya.bd.mini.MiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.bd.mini.MiniFileMgr.filesListObj && laya.bd.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.bd.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.bd.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl.split(\"?\")[0];\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.filesListObj[fileurlkey].md5==MiniFileMgr.fakeObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!BMiniAdapter.isZiYu &&BMiniAdapter.isPosMsgYu){\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tfilesListStr=MiniFileMgr.fs.readFileSync(fileUrl,encoding);\n\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=/*__JS__ */swan.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=/*__JS__ */swan.getFileSystemManager();},'wxdown',function(){return this.wxdown=/*__JS__ */swan.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.bd.mini.MiniImage\nvar MiniImage$1=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.bd.mini.MiniImage',null,'MiniImage$1');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (BMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$1.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$1.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$1.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$1.getFileInfo(URL.formatURL(url))){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(BMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$1.downOtherFiles(encodeURI(url),new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(BMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$1.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$1.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\ttry{\n\t\t\t\tdelete MiniFileMgr$1.fakeObj[sourceUrl];\n\t\t\t\tdelete MiniFileMgr$1.filesListObj[sourceUrl];\n\t\t\t}\n\t\t\tcatch(error){}\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.bd.mini.MiniInput\nvar MiniInput$1=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.bd.mini.MiniInput',null,'MiniInput$1');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\t/*__JS__ */swan.onWindowResize && /*__JS__ */swan.onWindowResize(function(res){\n\t\t\t/*__JS__ */window.dispatchEvent && /*__JS__ */window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$1;\n\t\tSoundManager._musicClass=MiniSound$1;\n\t\tvar model=BMiniAdapter.systemInfo.model;\n\t\tvar system=BMiniAdapter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tBMiniAdapter.window.swan.offKeyboardConfirm();\n\t\tBMiniAdapter.window.swan.offKeyboardInput();\n\t\tBMiniAdapter.window.swan.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tBMiniAdapter.window.swan.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.bd.mini.MiniInput.inputEnter();\n\t\t})\n\t\tBMiniAdapter.window.swan.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.bd.mini.MiniInput.inputEnter();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(){\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){\n\t\tMiniInput.hideKeyboard();\n\t}\n\n\tMiniInput.hideKeyboard=function(){\n\t\tBMiniAdapter.window.swan.offKeyboardConfirm();\n\t\tBMiniAdapter.window.swan.offKeyboardInput();\n\t\tBMiniAdapter.window.swan.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.bd.mini.MiniLocalStorage\nvar MiniLocalStorage$1=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.bd.mini.MiniLocalStorage',null,'MiniLocalStorage$1');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\t/*__JS__ */swan.setStorageSync(key,value);\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\treturn /*__JS__ */swan.getStorageSync(key);\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,value);\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\treturn MiniLocalStorage.getItem(key);\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\t/*__JS__ */swan.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\t/*__JS__ */swan.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=/*__JS__ */swan.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.bd.mini.MiniLocation\nvar MiniLocation$1=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.bd.mini.MiniLocation',null,'MiniLocation$1');\n\tMiniLocation.__init__=function(){\n\t\tBMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tBMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tBMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tBMiniAdapter.window.wx.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**@private **/\n//class laya.bd.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$1=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.bd.mini.MiniAccelerator',_super,'MiniAccelerator$1');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\t/*__JS__ */wx.onAccelerometerChange(MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\t/*__JS__ */wx.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.bd.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$1=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.bd.mini.MiniLoader',_super,'MiniLoader$1');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=BMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tBMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(BMiniAdapter.isZiYu && MiniFileMgr$1.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$1.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$1.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr$1.isLocalNativeFile(url)){\n\t\t\t\t\tif (BMiniAdapter.subNativeFiles && BMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in BMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=BMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tBMiniAdapter.subNativeheads=BMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tBMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(BMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && BMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=BMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr$1.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(BMiniAdapter.window.swan.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !BMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tBMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$1.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$1.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tBMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$1.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$1.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$1.downFiles(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,cache);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$1.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$1.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$1.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=BMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!BMiniAdapter.isZiYu &&BMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\"){\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tBMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.bd.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$1=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.bd.mini.MiniSound',_super,'MiniSound$1');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\turl=URL.formatURL(url);\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(BMiniAdapter.autoCacheFile&&MiniFileMgr$1.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!BMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tMiniFileMgr$1.downOtherFiles(url,Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(BMiniAdapter.autoCacheFile){\n\t\t\t\tvar fileObj=MiniFileMgr$1.getFileInfo(sourceUrl);\n\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\tfileNativeUrl=MiniFileMgr$1.getFileNativePath(fileMd5Name);\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\tthis._sound.onCanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\tthis._sound.onError(MiniSound.bindToThis(this.onError,this));\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\ttry{\n\t\t\tconsole.log(\"-----1---------------minisound-----id:\"+MiniSound._id);\n\t\t\tconsole.log(error);\n\t\t}\n\t\tcatch(error){\n\t\t\tconsole.log(\"-----2---------------minisound-----id:\"+MiniSound._id);\n\t\t\tconsole.log(error);\n\t\t}\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tthis._sound.offError(null);\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis._sound.offCanplay(null);\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(BMiniAdapter.autoCacheFile&&MiniFileMgr$1.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr$1.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr$1.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=this.url;\n\t\t};\n\t\tvar channel=new MiniSoundChannel$1(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn BMiniAdapter.window.swan.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.bd.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$1=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onEnded(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.bd.mini.MiniSoundChannel',_super,'MiniSoundChannel$1');\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.pause();\n\t\tthis._audio.offEnded(null);\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.bilimini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,HttpRequest=laya.net.HttpRequest,Input=laya.display.Input;\n\tvar Loader=laya.net.Loader,LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render;\n\tvar RunDriver=laya.utils.RunDriver,SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager;\n\tvar URL=laya.net.URL,Utils=laya.utils.Utils;\n//class laya.bili.mini.BLMiniAdapter\nvar BLMiniAdapter=(function(){\n\tfunction BLMiniAdapter(){}\n\t__class(BLMiniAdapter,'laya.bili.mini.BLMiniAdapter');\n\tBLMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tBLMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (BLMiniAdapter._inited)return;\n\t\tBLMiniAdapter._inited=true;\n\t\tBLMiniAdapter.window=/*__JS__ */window;\n\t\tif(!BLMiniAdapter.window.hasOwnProperty(\"bl\"))\n\t\t\treturn;\n\t\tif(BLMiniAdapter.window.navigator.userAgent.indexOf('MiniGame')<0)return;\n\t\tBLMiniAdapter.isZiYu=isSon;\n\t\tBLMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tBLMiniAdapter.EnvConfig={};\n\t\ttry{\n\t\t\t/*__JS__ */laya.webgl.resource.WebGLCanvas.premulAlpha=true;\n\t\t\t}catch(e){\n\t\t}\n\t\tif(!BLMiniAdapter.isZiYu){\n\t\t\tMiniFileMgr$5.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$5.existDir(MiniFileMgr$5.fileNativeDir,Handler.create(BLMiniAdapter,BLMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tBLMiniAdapter.systemInfo=BLMiniAdapter.window.bl.getSystemInfoSync();\n\t\tif (BLMiniAdapter.systemInfo.system.toLowerCase()==='ios 10.1.1'){\n\t\t\ttry{\n\t\t\t\t/*__JS__ */laya.webgl.resource.WebGLCharImage.canUseCanvas=false;\n\t\t\t\t}catch(e){\n\t\t\t}\n\t\t}\n\t\tBLMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tBLMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tBLMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tBLMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tBLMiniAdapter.window.CanvasRenderingContext2D=function (){\n\t\t};\n\t\tHttpRequest._urlEncode=function (str){\n\t\t\tvar strTemp=\"\";\n\t\t\tvar length=str.length;\n\t\t\tfor (var i=0;i < length;i++){\n\t\t\t\tvar word=str[i];\n\t\t\t\tif (BLMiniAdapter.IGNORE.test(word)){\n\t\t\t\t\tstrTemp+=word;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstrTemp+=encodeURI(word);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e){\n\t\t\t\t\t\tconsole.log(\"errorInfo\",\">>>\"+word,null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn strTemp;\n\t\t}\n\t\tBLMiniAdapter.window.CanvasRenderingContext2D.prototype=BLMiniAdapter.window.bl.createCanvas().getContext('2d').__proto__;\n\t\tBLMiniAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tBLMiniAdapter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=BLMiniAdapter.pixelRatio;\n\t\tBLMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=BLMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=BLMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=BLMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$5['_createInputElement'];\n\t\tBLMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$5.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$5.prototype._loadImage;\n\t\tLocalStorage._baseClass=MiniLocalStorage$5;\n\t\tMiniLocalStorage$5.__init__();\n\t\tConfig.useRetinalCanvas=true;\n\t\tBLMiniAdapter.onReciveData();\n\t}\n\n\tBLMiniAdapter.onReciveData=function(){\n\t\tif(laya.bili.mini.BLMiniAdapter.isZiYu){\n\t\t\tBLMiniAdapter.window.bl.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$5.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr$5.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$5.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr$5.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tBLMiniAdapter.measureText=function(str){\n\t\tvar tempObj=BLMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tBLMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tBLMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$5.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$5.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tBLMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$5.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tBLMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$5.deleteAll();\n\t}\n\n\tBLMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$5.isLocalNativeFile(fileUrl);\n\t}\n\n\tBLMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$5.getFileInfo(fileUrl);\n\t}\n\n\tBLMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$5.filesListObj;\n\t}\n\n\tBLMiniAdapter.exitMiniProgram=function(){\n\t\tBLMiniAdapter.window.bl.exitMiniProgram();\n\t}\n\n\tBLMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr$5.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr$5.fakeObj=JSON.parse(data.data);\n\t\t}\n\t}\n\n\tBLMiniAdapter.pixelRatio=function(){\n\t\tif (!BLMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tBLMiniAdapter.EnvConfig.pixelRatioInt=BLMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn BLMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn BLMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tBLMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (BLMiniAdapter.idx==1){\n\t\t\t\tif(BLMiniAdapter.isZiYu){\n\t\t\t\t\t_source=BLMiniAdapter.window.sharedCanvas;\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=BLMiniAdapter.window.canvas;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=BLMiniAdapter.window.document.createElement(\"canvas\");\n\t\t\t}\n\t\t\tBLMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn BLMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=BLMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn BLMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tBLMiniAdapter.onCreateInput=function(type){\n\t\tvar node=BLMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$5.wxinputFocus;\n\t\tnode.blur=MiniInput$5.wxinputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tBLMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tBLMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.bili.mini.BLMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tBLMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tBLMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$5.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$5.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tBLMiniAdapter.window.bl.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tBLMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$5.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$5.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tBLMiniAdapter.window.bl.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tBLMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.bili.mini.BLMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tBLMiniAdapter.window.bl.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tBLMiniAdapter.EnvConfig=null;\n\tBLMiniAdapter.window=null;\n\tBLMiniAdapter._preCreateElement=null;\n\tBLMiniAdapter._inited=false;\n\tBLMiniAdapter.systemInfo=null;\n\tBLMiniAdapter.isZiYu=false;\n\tBLMiniAdapter.isPosMsgYu=false;\n\tBLMiniAdapter.autoCacheFile=true;\n\tBLMiniAdapter.minClearSize=(5 *1024 *1024);\n\tBLMiniAdapter.subNativeFiles=null;\n\tBLMiniAdapter.subNativeheads=[];\n\tBLMiniAdapter.subMaps=[];\n\tBLMiniAdapter.AutoCacheDownFile=false;\n\tBLMiniAdapter._measureText=null;\n\tBLMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tBLMiniAdapter.idx=1;\n\t__static(BLMiniAdapter,\n\t['IGNORE',function(){return this.IGNORE=new RegExp(\"[-_.!~*'();/?:@&=+$,#%]|[0-9|A-Z|a-z]\");},'nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"wxlocal\"];}\n\t]);\n\treturn BLMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.bili.mini.MiniFileMgr\nvar MiniFileMgr$5=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.bili.mini.MiniFileMgr',null,'MiniFileMgr$5');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=BLMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(BLMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(BLMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((BLMiniAdapter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\"wx.qlogo.cn\")==-1 && readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\tif(BLMiniAdapter.window.navigator.userAgent.indexOf('MiniGame')<0){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > BLMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tBLMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > BLMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tBLMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=BLMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.bili.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.bili.mini.MiniFileMgr.filesListObj && laya.bili.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.bili.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.bili.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.filesListObj[fileurlkey].md5==MiniFileMgr.fakeObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!BLMiniAdapter.isZiYu &&BLMiniAdapter.isPosMsgYu && BLMiniAdapter.window.bl.postMessage){\n\t\t\tBLMiniAdapter.window.bl.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tfilesListStr=MiniFileMgr.fs.readFileSync(fileUrl,encoding);\n\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=BLMiniAdapter.window.bl.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=BLMiniAdapter.window.bl.getFileSystemManager();},'wxdown',function(){return this.wxdown=BLMiniAdapter.window.bl.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.bili.mini.MiniImage\nvar MiniImage$5=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.bili.mini.MiniImage',null,'MiniImage$5');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (BLMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$5.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$5.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$5.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (BLMiniAdapter.subNativeFiles && BLMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in BLMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=BLMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tBLMiniAdapter.subNativeheads=BLMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tBLMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(BLMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && BLMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=BLMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$5.getFileInfo(url)){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(BLMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$5.downOtherFiles(url,new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(BLMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$5.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$5.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(BLMiniAdapter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr$5.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$5.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tdelete MiniFileMgr$5.fakeObj[sourceUrl];\n\t\t\tdelete MiniFileMgr$5.filesListObj[sourceUrl];\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.bili.mini.MiniInput\nvar MiniInput$5=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.bili.mini.MiniInput',null,'MiniInput$5');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\t/*__JS__ */bl.onWindowResize && /*__JS__ */bl.onWindowResize(function(res){\n\t\t\t/*__JS__ */window.dispatchEvent && /*__JS__ */window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$5;\n\t\tSoundManager._musicClass=MiniSound$5;\n\t\tvar model=BLMiniAdapter.systemInfo.model;\n\t\tvar system=BLMiniAdapter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tBLMiniAdapter.window.bl.offKeyboardConfirm();\n\t\tBLMiniAdapter.window.bl.offKeyboardInput();\n\t\tBLMiniAdapter.window.bl.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tBLMiniAdapter.window.bl.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.bili.mini.MiniInput.inputEnter();\n\t\t})\n\t\tBLMiniAdapter.window.bl.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.bili.mini.MiniInput.inputEnter();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(){\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){\n\t\tMiniInput.hideKeyboard();\n\t}\n\n\tMiniInput.hideKeyboard=function(){\n\t\tBLMiniAdapter.window.bl.offKeyboardConfirm();\n\t\tBLMiniAdapter.window.bl.offKeyboardInput();\n\t\tBLMiniAdapter.window.bl.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.bili.mini.MiniLocalStorage\nvar MiniLocalStorage$5=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.bili.mini.MiniLocalStorage',null,'MiniLocalStorage$5');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\ttry{\n\t\t\t/*__JS__ */bl.setStorageSync(key,value);\n\t\t}\n\t\tcatch(error){\n\t\t\t/*__JS__ */bl.setStorage({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\treturn /*__JS__ */bl.getStorageSync(key);\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,value);\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\treturn MiniLocalStorage.getItem(key);\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\t/*__JS__ */bl.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\t/*__JS__ */bl.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=/*__JS__ */bl.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.bili.mini.MiniLocation\nvar MiniLocation$5=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.bili.mini.MiniLocation',null,'MiniLocation$5');\n\tMiniLocation.__init__=function(){\n\t\tBLMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tBLMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tBLMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tBLMiniAdapter.window.bl.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.bili.mini.MiniVideo\nvar MiniVideo$3=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=BLMiniAdapter.window.bl.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.bili.mini.MiniVideo',null,'MiniVideo$3');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n/**@private **/\n//class laya.bili.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$5=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.bili.mini.MiniAccelerator',_super,'MiniAccelerator$5');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tBLMiniAdapter.window.bl.onAccelerometerChange(laya.bili.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tBLMiniAdapter.window.bl.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.bili.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$5=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.bili.mini.MiniLoader',_super,'MiniLoader$5');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=BLMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tBLMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(BLMiniAdapter.isZiYu && !MiniFileMgr$5.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(BLMiniAdapter.isZiYu && MiniFileMgr$5.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$5.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$5.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr$5.isLocalNativeFile(url)){\n\t\t\t\t\tif (BLMiniAdapter.subNativeFiles && BLMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in BLMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=BLMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tBLMiniAdapter.subNativeheads=BLMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tBLMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(BLMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && BLMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=BLMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr$5.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(BLMiniAdapter.window.bl.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !BLMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tBLMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$5.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$5.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tBLMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$5.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$5.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$5.downFiles(encodeURI(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,cache);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$5.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$5.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$5.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),URL.formatURL(url));\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=BLMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!BLMiniAdapter.isZiYu &&BLMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\" && BLMiniAdapter.window.bl){\n\t\t\t\tBLMiniAdapter.window.bl.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tconsole.log(\"-----------本地加载失败，尝试外网加载----\");\n\t\t\tBLMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.bili.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$5=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.bili.mini.MiniSound',_super,'MiniSound$5');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$5.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$5.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$5.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(BLMiniAdapter.autoCacheFile&&MiniFileMgr$5.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!BLMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$5.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (BLMiniAdapter.subNativeFiles && BLMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in BLMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=BLMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tBLMiniAdapter.subNativeheads=BLMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tBLMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(BLMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && BLMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=BLMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$5.downOtherFiles(url,Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(BLMiniAdapter.autoCacheFile){\n\t\t\t\tvar fileObj=MiniFileMgr$5.getFileInfo(sourceUrl);\n\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$5.getFileNativePath(fileMd5Name);\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t}\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\tthis._sound.onCanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\tthis._sound.onError(MiniSound.bindToThis(this.onError,this));\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\ttry{\n\t\t\tconsole.log(\"-----1---------------minisound-----id:\"+MiniSound._id);\n\t\t\tconsole.log(error);\n\t\t}\n\t\tcatch(error){\n\t\t\tconsole.log(\"-----2---------------minisound-----id:\"+MiniSound._id);\n\t\t\tconsole.log(error);\n\t\t}\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tthis._sound.offError(MiniSound.bindToThis(this.onError,this));\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis._sound.offCanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(BLMiniAdapter.autoCacheFile&&MiniFileMgr$5.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr$5.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr$5.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=this.url;\n\t\t};\n\t\tvar channel=new MiniSoundChannel$5(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn BLMiniAdapter.window.bl.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.bili.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$5=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onEnded(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.bili.mini.MiniSoundChannel',_super,'MiniSoundChannel$5');\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.pause();\n\t\tthis._audio.offEnded(null);\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',null,function(time){\n\t\tif(this._audio){\n\t\t\tthis._audio.startTime=time;\n\t\t}\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.core.js",
    "content": "\n/***********************************/\n/*http://www.layabox.com  2017/12/12*/\n/***********************************/\nvar Laya=window.Laya=(function(window,document){\n\tvar Laya={\n\t\t__internals:[],\n\t\t__packages:{},\n\t\t__classmap:{'Object':Object,'Function':Function,'Array':Array,'String':String},\n\t\t__sysClass:{'object':'Object','array':'Array','string':'String','dictionary':'Dictionary'},\n\t\t__propun:{writable: true,enumerable: false,configurable: true},\n\t\t__presubstr:String.prototype.substr,\n\t\t__substr:function(ofs,sz){return arguments.length==1?Laya.__presubstr.call(this,ofs):Laya.__presubstr.call(this,ofs,sz>0?sz:(this.length+sz));},\n\t\t__init:function(_classs){_classs.forEach(function(o){o.__init$ && o.__init$();});},\n\t\t__isClass:function(o){return o && (o.__isclass || o==Object || o==String || o==Array);},\n\t\t__newvec:function(sz,value){\n\t\t\tvar d=[];\n\t\t\td.length=sz;\n\t\t\tfor(var i=0;i<sz;i++) d[i]=value;\n\t\t\treturn d;\n\t\t},\n\t\t__extend:function(d,b){\n\t\t\tfor (var p in b){\n\t\t\t\tif (!b.hasOwnProperty(p)) continue;\n\t\t\t\tvar gs=Object.getOwnPropertyDescriptor(b, p);\n\t\t\t\tvar g = gs.get, s = gs.set; \n\t\t\t\tif ( g || s ) {\n\t\t\t\t\tif ( g && s)\n\t\t\t\t\t\tObject.defineProperty(d,p,gs);\n\t\t\t\t\telse{\n\t\t\t\t\t\tg && Object.defineProperty(d, p, g);\n\t\t\t\t\t\ts && Object.defineProperty(d, p, s);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse d[p] = b[p];\n\t\t\t}\n\t\t\tfunction __() { Laya.un(this,'constructor',d); }__.prototype=b.prototype;d.prototype=new __();Laya.un(d.prototype,'__imps',Laya.__copy({},b.prototype.__imps));\n\t\t},\n\t\t__copy:function(dec,src){\n\t\t\tif(!src) return null;\n\t\t\tdec=dec||{};\n\t\t\tfor(var i in src) dec[i]=src[i];\n\t\t\treturn dec;\n\t\t},\n\t\t__package:function(name,o){\n\t\t\tif(Laya.__packages[name]) return;\n\t\t\tLaya.__packages[name]=true;\n\t\t\tvar p=window,strs=name.split('.');\n\t\t\tif(strs.length>1){\n\t\t\t\tfor(var i=0,sz=strs.length-1;i<sz;i++){\n\t\t\t\t\tvar c=p[strs[i]];\n\t\t\t\t\tp=c?c:(p[strs[i]]={});\n\t\t\t\t}\n\t\t\t}\n\t\t\tp[strs[strs.length-1]] || (p[strs[strs.length-1]]=o||{});\n\t\t},\n\t\t__hasOwnProperty:function(name,o){\n\t\t\to=o ||this;\n\t\t    function classHas(name,o){\n\t\t\t\tif(Object.hasOwnProperty.call(o.prototype,name)) return true;\n\t\t\t\tvar s=o.prototype.__super;\n\t\t\t\treturn s==null?null:classHas(name,s);\n\t\t\t}\n\t\t\treturn (Object.hasOwnProperty.call(o,name)) || classHas(name,o.__class);\n\t\t},\n\t\t__typeof:function(o,value){\n\t\t\tif(!o || !value) return false;\n\t\t\tif(value===String) return (typeof o==='string');\n\t\t\tif(value===Number) return (typeof o==='number');\n\t\t\tif(value.__interface__) value=value.__interface__;\n\t\t\telse if(typeof value!='string')  return (o instanceof value);\n\t\t\treturn (o.__imps && o.__imps[value]) || (o.__class==value);\n\t\t},\n\t\t__as:function(value,type){\n\t\t\treturn (this.__typeof(value,type))?value:null;\n\t\t},\n        __int:function(value){\n            return value?parseInt(value):0;\n        },\n\t\tinterface:function(name,_super){\n\t\t\tLaya.__package(name,{});\n\t\t\tvar ins=Laya.__internals;\n\t\t\tvar a=ins[name]=ins[name] || {self:name};\n\t\t\tif(_super)\n\t\t\t{\n\t\t\t\tvar supers=_super.split(',');\n\t\t\t\ta.extend=[];\n\t\t\t\tfor(var i=0;i<supers.length;i++){\n\t\t\t\t\tvar nm=supers[i];\n\t\t\t\t\tins[nm]=ins[nm] || {self:nm};\n\t\t\t\t\ta.extend.push(ins[nm]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar o=window,words=name.split('.');\n\t\t\tfor(var i=0;i<words.length-1;i++) o=o[words[i]];\n\t\t\to[words[words.length-1]]={__interface__:name};\n\t\t},\n\t\tclass:function(o,fullName,_super,miniName){\n\t\t\t_super && Laya.__extend(o,_super);\n\t\t\tif(fullName){\n\t\t\t\tLaya.__package(fullName,o);\n\t\t\t\tLaya.__classmap[fullName]=o;\n\t\t\t\tif(fullName.indexOf('.')>0){\n\t\t\t\t\tif(fullName.indexOf('laya.')==0){\n\t\t\t\t\t\tvar paths=fullName.split('.');\n\t\t\t\t\t\tminiName=miniName || paths[paths.length-1];\n\t\t\t\t\t\tif(Laya[miniName]) console.log(\"Warning!,this class[\"+miniName+\"] already exist:\",Laya[miniName]);\n\t\t\t\t\t\tLaya[miniName]=o;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(fullName==\"Main\")\n\t\t\t\t\t\twindow.Main=o;\n\t\t\t\t\telse{\n\t\t\t\t\t\tif(Laya[fullName]){\n\t\t\t\t\t\t\tconsole.log(\"Error!,this class[\"+fullName+\"] already exist:\",Laya[fullName]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLaya[fullName]=o;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar un=Laya.un,p=o.prototype;\n\t\t\tun(p,'hasOwnProperty',Laya.__hasOwnProperty);\n\t\t\tun(p,'__class',o);\n\t\t\tun(p,'__super',_super);\n\t\t\tun(p,'__className',fullName);\n\t\t\tun(o,'__super',_super);\n\t\t\tun(o,'__className',fullName);\n\t\t\tun(o,'__isclass',true);\n\t\t\tun(o,'super',function(o){this.__super.call(o);});\n\t\t},\n\t\timps:function(dec,src){\n\t\t\tif(!src) return null;\n\t\t\tvar d=dec.__imps|| Laya.un(dec,'__imps',{});\n\t\t\tfunction __(name){\n\t\t\t\tvar c,exs;\n\t\t\t\tif(! (c=Laya.__internals[name]) ) return;\n\t\t\t\td[name]=true;\n\t\t\t\tif(!(exs=c.extend)) return;\n\t\t\t\tfor(var i=0;i<exs.length;i++){\n\t\t\t\t\t__(exs[i].self);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(var i in src) __(i);\n\t\t},\n        superSet:function(clas,o,prop,value){\n            var fun = clas.prototype[\"_$set_\"+prop];\n            fun && fun.call(o,value);\n        },\n        superGet:function(clas,o,prop){\n            var fun = clas.prototype[\"_$get_\"+prop];\n           \treturn fun?fun.call(o):null;\n        },\n\t\tgetset:function(isStatic,o,name,getfn,setfn){\n\t\t\tif(!isStatic){\n\t\t\t\tgetfn && Laya.un(o,'_$get_'+name,getfn);\n\t\t\t\tsetfn && Laya.un(o,'_$set_'+name,setfn);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tgetfn && (o['_$GET_'+name]=getfn);\n\t\t\t\tsetfn && (o['_$SET_'+name]=setfn);\n\t\t\t}\n\t\t\tif(getfn && setfn) \n\t\t\t\tObject.defineProperty(o,name,{get:getfn,set:setfn,enumerable:false,configurable:true});\n\t\t\telse{\n\t\t\t\tgetfn && Object.defineProperty(o,name,{get:getfn,enumerable:false,configurable:true});\n\t\t\t\tsetfn && Object.defineProperty(o,name,{set:setfn,enumerable:false,configurable:true});\n\t\t\t}\n\t\t},\n\t\tstatic:function(_class,def){\n\t\t\t\tfor(var i=0,sz=def.length;i<sz;i+=2){\n\t\t\t\t\tif(def[i]=='length') \n\t\t\t\t\t\t_class.length=def[i+1].call(_class);\n\t\t\t\t\telse{\n\t\t\t\t\t\tfunction tmp(){\n\t\t\t\t\t\t\tvar name=def[i];\n\t\t\t\t\t\t\tvar getfn=def[i+1];\n\t\t\t\t\t\t\tObject.defineProperty(_class,name,{\n\t\t\t\t\t\t\t\tget:function(){delete this[name];return this[name]=getfn.call(this);},\n\t\t\t\t\t\t\t\tset:function(v){delete this[name];this[name]=v;},enumerable: true,configurable: true});\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttmp();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t},\t\t\n\t\tun:function(obj,name,value){\n\t\t\tvalue || (value=obj[name]);\n\t\t\tLaya.__propun.value=value;\n\t\t\tObject.defineProperty(obj, name, Laya.__propun);\n\t\t\treturn value;\n\t\t},\n\t\tuns:function(obj,names){\n\t\t\tnames.forEach(function(o){Laya.un(obj,o)});\n\t\t}\n\t};\n\n    window.console=window.console || ({log:function(){}});\n\twindow.trace=window.console.log;\n\tError.prototype.throwError=function(){throw arguments;};\n\t//String.prototype.substr=Laya.__substr;\n\tObject.defineProperty(Array.prototype,'fixed',{enumerable: false});\n\n\treturn Laya;\n})(window,document);\n\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n})(window,document,Laya);\n\n\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\nLaya.interface('laya.runtime.IMarket');\nLaya.interface('laya.filters.IFilter');\nLaya.interface('laya.display.ILayout');\nLaya.interface('laya.resource.IDispose');\nLaya.interface('laya.runtime.IPlatform');\nLaya.interface('laya.resource.IDestroy');\nLaya.interface('laya.runtime.IConchNode');\nLaya.interface('laya.filters.IFilterAction');\nLaya.interface('laya.runtime.ICPlatformClass');\nLaya.interface('laya.resource.ICreateResource');\nLaya.interface('laya.runtime.IConchRenderObject');\nLaya.interface('laya.runtime.IPlatformClass','laya.runtime.IPlatform');\n/**\n*@private\n*/\n//class laya.utils.RunDriver\nvar RunDriver=(function(){\n\tfunction RunDriver(){}\n\t__class(RunDriver,'laya.utils.RunDriver');\n\tRunDriver.FILTER_ACTIONS=[];\n\tRunDriver.pixelRatio=-1;\n\tRunDriver._charSizeTestDiv=null;\n\tRunDriver.now=function(){\n\t\treturn /*__JS__ */Date.now();\n\t}\n\n\tRunDriver.getWindow=function(){\n\t\treturn /*__JS__ */window;\n\t}\n\n\tRunDriver.getPixelRatio=function(){\n\t\tif (RunDriver.pixelRatio < 0){\n\t\t\tvar ctx=Browser.context;\n\t\t\tvar backingStore=ctx.backingStorePixelRatio || ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;\n\t\t\tRunDriver.pixelRatio=(Browser.window.devicePixelRatio || 1)/ backingStore;\n\t\t\tif (RunDriver.pixelRatio < 1)RunDriver.pixelRatio=1;\n\t\t}\n\t\treturn RunDriver.pixelRatio;\n\t}\n\n\tRunDriver.getIncludeStr=function(name){\n\t\treturn null;\n\t}\n\n\tRunDriver.createShaderCondition=function(conditionScript){\n\t\tvar fn=\"(function() {return \"+conditionScript+\";})\";\n\t\treturn Laya._runScript(fn);\n\t}\n\n\tRunDriver.fontMap=[];\n\tRunDriver.measureText=function(txt,font){\n\t\tvar isChinese=RunDriver.hanzi.test(txt);\n\t\tif (isChinese && RunDriver.fontMap[font]){\n\t\t\treturn RunDriver.fontMap[font];\n\t\t};\n\t\tvar ctx=Browser.context;\n\t\tctx.font=font;\n\t\tvar r=ctx.measureText(txt);\n\t\tif (isChinese)RunDriver.fontMap[font]=r;\n\t\treturn r;\n\t}\n\n\tRunDriver.getWebGLContext=function(canvas){\n\t};\n\n\tRunDriver.beginFlush=function(){\n\t};\n\n\tRunDriver.endFinish=function(){\n\t};\n\n\tRunDriver.addToAtlas=null;\n\tRunDriver.flashFlushImage=function(atlasWebGLCanvas){\n\t};\n\n\tRunDriver.drawToCanvas=function(sprite,_renderType,canvasWidth,canvasHeight,offsetX,offsetY){\n\t\tvar canvas=HTMLCanvas.create(\"2D\");\n\t\tvar context=new RenderContext(canvasWidth,canvasHeight,canvas);\n\t\tRenderSprite.renders[_renderType]._fun(sprite,context,offsetX,offsetY);\n\t\treturn canvas;\n\t}\n\n\tRunDriver.createParticleTemplate2D=null;\n\tRunDriver.createGLTextur=null;\n\tRunDriver.createWebGLContext2D=null;\n\tRunDriver.changeWebGLSize=function(w,h){\n\t};\n\n\tRunDriver.createRenderSprite=function(type,next){\n\t\treturn new RenderSprite(type,next);\n\t}\n\n\tRunDriver.createFilterAction=function(type){\n\t\treturn new ColorFilterAction();\n\t}\n\n\tRunDriver.createGraphics=function(){\n\t\treturn new Graphics();\n\t}\n\n\tRunDriver.clear=function(value){\n\t\tRender._context.ctx.clear();\n\t}\n\n\tRunDriver.cancelLoadByUrl=function(url){\n\t};\n\n\tRunDriver.clearAtlas=function(value){\n\t};\n\n\tRunDriver.isAtlas=function(bitmap){\n\t\treturn false;\n\t}\n\n\tRunDriver.addTextureToAtlas=function(value){\n\t};\n\n\tRunDriver.getTexturePixels=function(value,x,y,width,height){\n\t\treturn null;\n\t}\n\n\tRunDriver.skinAniSprite=function(){\n\t\treturn null;\n\t}\n\n\tRunDriver.update3DLoop=function(){\n\t};\n\n\t__static(RunDriver,\n\t['hanzi',function(){return this.hanzi=new RegExp(\"^[\\u4E00-\\u9FA5]$\");}\n\t]);\n\treturn RunDriver;\n})()\n\n\n/**\n*<code>Laya</code> 是全局对象的引用入口集。\n*Laya类引用了一些常用的全局对象，比如Laya.stage：舞台，Laya.timer：时间管理器，Laya.loader：加载管理器，使用时注意大小写。\n*/\n//class Laya\nvar ___Laya=(function(){\n\t//function Laya(){}\n\t/**\n\t*表示是否捕获全局错误并弹出提示。默认为false。\n\t*适用于移动设备等不方便调试的时候，设置为true后，如有未知错误，可以弹窗抛出详细错误堆栈。\n\t*/\n\t__getset(1,Laya,'alertGlobalError',null,function(value){\n\t\tvar erralert=0;\n\t\tif (value){\n\t\t\tBrowser.window.onerror=function (msg,url,line,column,detail){\n\t\t\t\tif (erralert++< 5 && detail)\n\t\t\t\t\talert(\"出错啦，请把此信息截图给研发商\\n\"+msg+\"\\n\"+detail.stack || detail);\n\t\t\t}\n\t\t\t}else {\n\t\t\tBrowser.window.onerror=null;\n\t\t}\n\t});\n\n\tLaya.init=function(width,height,__plugins){\n\t\tvar plugins=[];for(var i=2,sz=arguments.length;i<sz;i++)plugins.push(arguments[i]);\n\t\tif (Laya._isinit)return;\n\t\tArrayBuffer.prototype.slice || (ArrayBuffer.prototype.slice=Laya._arrayBufferSlice);\n\t\tLaya._isinit=true;\n\t\tBrowser.__init__();\n\t\tContext.__init__();\n\t\tGraphics.__init__();\n\t\tLaya.timer=new Timer();\n\t\tLaya.scaleTimer=new Timer();\n\t\tLaya.loader=new LoaderManager();\n\t\tWeakObject.__init__();\n\t\tfor (var i=0,n=plugins.length;i < n;i++){\n\t\t\tif (plugins[i].enable)plugins[i].enable();\n\t\t}\n\t\tFont.__init__();\n\t\tStyle.__init__();\n\t\tResourceManager.__init__();\n\t\tCacheManager.beginCheck();\n\t\tLaya._currentStage=Laya.stage=new Stage();\n\t\tLaya.stage.conchModel && Laya.stage.conchModel.setRootNode();\n\t\tLaya._getUrlPath();\n\t\tLaya.render=new Render(0,0);\n\t\tLaya.stage.size(width,height);\n\t\tRenderSprite.__init__();\n\t\tKeyBoardManager.__init__();\n\t\tMouseManager.instance.__init__(Laya.stage,Render.canvas);\n\t\tInput.__init__();\n\t\tSoundManager.autoStopMusic=true;\n\t\tLocalStorage.__init__();\n\t\treturn Render.canvas;\n\t}\n\n\tLaya._getUrlPath=function(){\n\t\tvar location=Browser.window.location;\n\t\tvar pathName=location.pathname;\n\t\tpathName=pathName.charAt(2)==':' ? pathName.substring(1):pathName;\n\t\tURL.rootPath=URL.basePath=URL.getPath(location.protocol==\"file:\" ? pathName :location.protocol+\"//\"+location.host+location.pathname);\n\t}\n\n\tLaya._arrayBufferSlice=function(start,end){\n\t\tvar arr=/*__JS__ */this;\n\t\tvar arrU8List=new Uint8Array(arr,start,end-start);\n\t\tvar newU8List=new Uint8Array(arrU8List.length);\n\t\tnewU8List.set(arrU8List);\n\t\treturn newU8List.buffer;\n\t}\n\n\tLaya._runScript=function(script){\n\t\treturn Browser.window[Laya._evcode](script);\n\t}\n\n\tLaya.stage=null;\n\tLaya.timer=null;\n\tLaya.scaleTimer=null;\n\tLaya.loader=null;\n\tLaya.version=\"1.8.14\";\n\tLaya.render=null;\n\tLaya._currentStage=null;\n\tLaya._isinit=false;\n\tLaya.MiniAdpter=/*__JS__ */{init:function(){if (window.navigator && window.navigator.userAgent && window.navigator.userAgent.indexOf(\"MiniGame\")>-1)console.error(\"请先引用小游戏适配库laya.wxmini.js,详细教程：https://ldc.layabox.com/doc/?nav=zh-ts-5-0-0\")}};\n\t__static(Laya,\n\t['conchMarket',function(){return this.conchMarket=/*__JS__ */window.conch?conchMarket:null;},'PlatformClass',function(){return this.PlatformClass=/*__JS__ */window.PlatformClass;},'_evcode',function(){return this._evcode=\"e\"+String.fromCharCode(100+10+8)+\"a\"+\"l\";}\n\t]);\n\treturn Laya;\n})()\n\n\n/**\n*Config 用于配置一些全局参数。如需更改，请在初始化引擎之前设置。\n*/\n//class Config\nvar Config=(function(){\n\tfunction Config(){}\n\t__class(Config,'Config');\n\tConfig.WebGLTextCacheCount=500;\n\tConfig.atlasEnable=false;\n\tConfig.showCanvasMark=false;\n\tConfig.animationInterval=50;\n\tConfig.isAntialias=false;\n\tConfig.isAlpha=false;\n\tConfig.premultipliedAlpha=true;\n\tConfig.isStencil=true;\n\tConfig.preserveDrawingBuffer=false;\n\tConfig.useRetinalCanvas=false;\n\tConfig.CborderSize=12;\n\treturn Config;\n})()\n\n\n/**\n*<code>EventDispatcher</code> 类是可调度事件的所有类的基类。\n*/\n//class laya.events.EventDispatcher\nvar EventDispatcher=(function(){\n\tvar EventHandler;\n\tfunction EventDispatcher(){\n\t\t/**@private */\n\t\tthis._events=null;\n\t}\n\n\t__class(EventDispatcher,'laya.events.EventDispatcher');\n\tvar __proto=EventDispatcher.prototype;\n\t/**\n\t*检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。\n\t*@param type 事件的类型。\n\t*@return 如果指定类型的侦听器已注册，则值为 true；否则，值为 false。\n\t*/\n\t__proto.hasListener=function(type){\n\t\tvar listener=this._events && this._events[type];\n\t\treturn !!listener;\n\t}\n\n\t/**\n\t*派发事件。\n\t*@param type 事件类型。\n\t*@param data （可选）回调数据。<b>注意：</b>如果是需要传递多个参数 p1,p2,p3,...可以使用数组结构如：[p1,p2,p3,...] ；如果需要回调单个参数 p ，且 p 是一个数组，则需要使用结构如：[p]，其他的单个参数 p ，可以直接传入参数 p。\n\t*@return 此事件类型是否有侦听者，如果有侦听者则值为 true，否则值为 false。\n\t*/\n\t__proto.event=function(type,data){\n\t\tif (!this._events || !this._events[type])return false;\n\t\tvar listeners=this._events[type];\n\t\tif (listeners.run){\n\t\t\tif (listeners.once)delete this._events[type];\n\t\t\tdata !=null ? listeners.runWith(data):listeners.run();\n\t\t\t}else {\n\t\t\tfor (var i=0,n=listeners.length;i < n;i++){\n\t\t\t\tvar listener=listeners[i];\n\t\t\t\tif (listener){\n\t\t\t\t\t(data !=null)? listener.runWith(data):listener.run();\n\t\t\t\t}\n\t\t\t\tif (!listener || listener.once){\n\t\t\t\t\tlisteners.splice(i,1);\n\t\t\t\t\ti--;\n\t\t\t\t\tn--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (listeners.length===0 && this._events)delete this._events[type];\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t*使用 EventDispatcher 对象注册指定类型的事件侦听器对象，以使侦听器能够接收事件通知。\n\t*@param type 事件的类型。\n\t*@param caller 事件侦听函数的执行域。\n\t*@param listener 事件侦听函数。\n\t*@param args （可选）事件侦听函数的回调参数。\n\t*@return 此 EventDispatcher 对象。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\treturn this._createListener(type,caller,listener,args,false);\n\t}\n\n\t/**\n\t*使用 EventDispatcher 对象注册指定类型的事件侦听器对象，以使侦听器能够接收事件通知，此侦听事件响应一次后自动移除。\n\t*@param type 事件的类型。\n\t*@param caller 事件侦听函数的执行域。\n\t*@param listener 事件侦听函数。\n\t*@param args （可选）事件侦听函数的回调参数。\n\t*@return 此 EventDispatcher 对象。\n\t*/\n\t__proto.once=function(type,caller,listener,args){\n\t\treturn this._createListener(type,caller,listener,args,true);\n\t}\n\n\t/**@private */\n\t__proto._createListener=function(type,caller,listener,args,once,offBefore){\n\t\t(offBefore===void 0)&& (offBefore=true);\n\t\toffBefore && this.off(type,caller,listener,once);\n\t\tvar handler=EventHandler.create(caller || this,listener,args,once);\n\t\tthis._events || (this._events={});\n\t\tvar events=this._events;\n\t\tif (!events[type])events[type]=handler;\n\t\telse {\n\t\t\tif (!events[type].run)events[type].push(handler);\n\t\t\telse events[type]=[events[type],handler];\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*从 EventDispatcher 对象中删除侦听器。\n\t*@param type 事件的类型。\n\t*@param caller 事件侦听函数的执行域。\n\t*@param listener 事件侦听函数。\n\t*@param onceOnly （可选）如果值为 true ,则只移除通过 once 方法添加的侦听器。\n\t*@return 此 EventDispatcher 对象。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this._events || !this._events[type])return this;\n\t\tvar listeners=this._events[type];\n\t\tif (listeners !=null){\n\t\t\tif (listeners.run){\n\t\t\t\tif ((!caller || listeners.caller===caller)&& listeners.method===listener && (!onceOnly || listeners.once)){\n\t\t\t\t\tdelete this._events[type];\n\t\t\t\t\tlisteners.recover();\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar count=0;\n\t\t\t\tfor (var i=0,n=listeners.length;i < n;i++){\n\t\t\t\t\tvar item=listeners[i];\n\t\t\t\t\tif (!item){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t}\n\t\t\t\t\tif (item && (!caller || item.caller===caller)&& item.method===listener && (!onceOnly || item.once)){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tlisteners[i]=null;\n\t\t\t\t\t\titem.recover();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count===n)delete this._events[type];\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*从 EventDispatcher 对象中删除指定事件类型的所有侦听器。\n\t*@param type （可选）事件类型，如果值为 null，则移除本对象所有类型的侦听器。\n\t*@return 此 EventDispatcher 对象。\n\t*/\n\t__proto.offAll=function(type){\n\t\tvar events=this._events;\n\t\tif (!events)return this;\n\t\tif (type){\n\t\t\tthis._recoverHandlers(events[type]);\n\t\t\tdelete events[type];\n\t\t\t}else {\n\t\t\tfor (var name in events){\n\t\t\t\tthis._recoverHandlers(events[name]);\n\t\t\t}\n\t\t\tthis._events=null;\n\t\t}\n\t\treturn this;\n\t}\n\n\t__proto._recoverHandlers=function(arr){\n\t\tif (!arr)return;\n\t\tif (arr.run){\n\t\t\tarr.recover();\n\t\t\t}else {\n\t\t\tfor (var i=arr.length-1;i >-1;i--){\n\t\t\t\tif (arr[i]){\n\t\t\t\t\tarr[i].recover();\n\t\t\t\t\tarr[i]=null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*检测指定事件类型是否是鼠标事件。\n\t*@param type 事件的类型。\n\t*@return 如果是鼠标事件，则值为 true;否则，值为 false。\n\t*/\n\t__proto.isMouseEvent=function(type){\n\t\treturn EventDispatcher.MOUSE_EVENTS[type];\n\t}\n\n\tEventDispatcher.MOUSE_EVENTS={\"rightmousedown\":true,\"rightmouseup\":true,\"rightclick\":true,\"mousedown\":true,\"mouseup\":true,\"mousemove\":true,\"mouseover\":true,\"mouseout\":true,\"click\":true,\"doubleclick\":true};\n\tEventDispatcher.__init$=function(){\n\t\tObject.defineProperty(laya.events.EventDispatcher.prototype,\"_events\",{enumerable:false,writable:true});\n\t\t/**@private */\n\t\t//class EventHandler extends laya.utils.Handler\n\t\tEventHandler=(function(_super){\n\t\t\tfunction EventHandler(caller,method,args,once){\n\t\t\t\tEventHandler.__super.call(this,caller,method,args,once);\n\t\t\t}\n\t\t\t__class(EventHandler,'',_super);\n\t\t\tvar __proto=EventHandler.prototype;\n\t\t\t__proto.recover=function(){\n\t\t\t\tif (this._id > 0){\n\t\t\t\t\tthis._id=0;\n\t\t\t\t\tEventHandler._pool.push(this.clear());\n\t\t\t\t}\n\t\t\t}\n\t\t\tEventHandler.create=function(caller,method,args,once){\n\t\t\t\t(once===void 0)&& (once=true);\n\t\t\t\tif (EventHandler._pool.length)return EventHandler._pool.pop().setTo(caller,method,args,once);\n\t\t\t\treturn new EventHandler(caller,method,args,once);\n\t\t\t}\n\t\t\tEventHandler._pool=[];\n\t\t\treturn EventHandler;\n\t\t})(Handler)\n\t}\n\n\treturn EventDispatcher;\n})()\n\n\n/**\n*<p><code>Handler</code> 是事件处理器类。</p>\n*<p>推荐使用 Handler.create()方法从对象池创建，减少对象创建消耗。创建的 Handler 对象不再使用后，可以使用 Handler.recover()将其回收到对象池，回收后不要再使用此对象，否则会导致不可预料的错误。</p>\n*<p><b>注意：</b>由于鼠标事件也用本对象池，不正确的回收及调用，可能会影响鼠标事件的执行。</p>\n*/\n//class laya.utils.Handler\nvar Handler=(function(){\n\tfunction Handler(caller,method,args,once){\n\t\t/**执行域(this)。*/\n\t\t//this.caller=null;\n\t\t/**处理方法。*/\n\t\t//this.method=null;\n\t\t/**参数。*/\n\t\t//this.args=null;\n\t\t/**表示是否只执行一次。如果为true，回调后执行recover()进行回收，回收后会被再利用，默认为false 。*/\n\t\tthis.once=false;\n\t\t/**@private */\n\t\tthis._id=0;\n\t\t(once===void 0)&& (once=false);\n\t\tthis.setTo(caller,method,args,once);\n\t}\n\n\t__class(Handler,'laya.utils.Handler');\n\tvar __proto=Handler.prototype;\n\t/**\n\t*设置此对象的指定属性值。\n\t*@param caller 执行域(this)。\n\t*@param method 回调方法。\n\t*@param args 携带的参数。\n\t*@param once 是否只执行一次，如果为true，执行后执行recover()进行回收。\n\t*@return 返回 handler 本身。\n\t*/\n\t__proto.setTo=function(caller,method,args,once){\n\t\tthis._id=Handler._gid++;\n\t\tthis.caller=caller;\n\t\tthis.method=method;\n\t\tthis.args=args;\n\t\tthis.once=once;\n\t\treturn this;\n\t}\n\n\t/**\n\t*执行处理器。\n\t*/\n\t__proto.run=function(){\n\t\tif (this.method==null)return null;\n\t\tvar id=this._id;\n\t\tvar result=this.method.apply(this.caller,this.args);\n\t\tthis._id===id && this.once && this.recover();\n\t\treturn result;\n\t}\n\n\t/**\n\t*执行处理器，携带额外数据。\n\t*@param data 附加的回调数据，可以是单数据或者Array(作为多参)。\n\t*/\n\t__proto.runWith=function(data){\n\t\tif (this.method==null)return null;\n\t\tvar id=this._id;\n\t\tif (data==null)\n\t\t\tvar result=this.method.apply(this.caller,this.args);\n\t\telse if (!this.args && !data.unshift)result=this.method.call(this.caller,data);\n\t\telse if (this.args)result=this.method.apply(this.caller,this.args.concat(data));\n\t\telse result=this.method.apply(this.caller,data);\n\t\tthis._id===id && this.once && this.recover();\n\t\treturn result;\n\t}\n\n\t/**\n\t*清理对象引用。\n\t*/\n\t__proto.clear=function(){\n\t\tthis.caller=null;\n\t\tthis.method=null;\n\t\tthis.args=null;\n\t\treturn this;\n\t}\n\n\t/**\n\t*清理并回收到 Handler 对象池内。\n\t*/\n\t__proto.recover=function(){\n\t\tif (this._id > 0){\n\t\t\tthis._id=0;\n\t\t\tHandler._pool.push(this.clear());\n\t\t}\n\t}\n\n\tHandler.create=function(caller,method,args,once){\n\t\t(once===void 0)&& (once=true);\n\t\tif (Handler._pool.length)return Handler._pool.pop().setTo(caller,method,args,once);\n\t\treturn new Handler(caller,method,args,once);\n\t}\n\n\tHandler._pool=[];\n\tHandler._gid=1;\n\treturn Handler;\n})()\n\n\n/**\n*<code>BitmapFont</code> 是位图字体类，用于定义位图字体信息。\n*/\n//class laya.display.BitmapFont\nvar BitmapFont=(function(){\n\tfunction BitmapFont(){\n\t\tthis._texture=null;\n\t\tthis._fontCharDic={};\n\t\tthis._fontWidthMap={};\n\t\tthis._complete=null;\n\t\tthis._path=null;\n\t\tthis._maxWidth=0;\n\t\tthis._spaceWidth=10;\n\t\tthis._padding=null;\n\t\t/**当前位图字体字号。*/\n\t\tthis.fontSize=12;\n\t\t/**表示是否根据实际使用的字体大小缩放位图字体大小。*/\n\t\tthis.autoScaleSize=false;\n\t\t/**字符间距（以像素为单位）。*/\n\t\tthis.letterSpacing=0;\n\t}\n\n\t__class(BitmapFont,'laya.display.BitmapFont');\n\tvar __proto=BitmapFont.prototype;\n\t/**\n\t*通过指定位图字体文件路径，加载位图字体文件，加载完成后会自动解析。\n\t*@param path 位图字体文件的路径。\n\t*@param complete 加载并解析完成的回调。如果成功返回this,如果失败返回null\n\t*/\n\t__proto.loadFont=function(path,complete){\n\t\tthis._path=path;\n\t\tthis._complete=complete;\n\t\tLaya.loader.load([{url:this._path,type:/*laya.net.Loader.XML*/\"xml\"},{url:this._path.replace(\".fnt\",\".png\"),type:/*laya.net.Loader.IMAGE*/\"image\"}],Handler.create(this,this.onLoaded));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onLoaded=function(){\n\t\tthis.parseFont(Loader.getRes(this._path),Loader.getRes(this._path.replace(\".fnt\",\".png\")));\n\t\tthis._complete && this._complete.runWith(this._texture?this:null);\n\t}\n\n\t/**\n\t*解析字体文件。\n\t*@param xml 字体文件XML。\n\t*@param texture 字体的纹理。\n\t*/\n\t__proto.parseFont=function(xml,texture){\n\t\tif (xml==null || texture==null)return;\n\t\tthis._texture=texture;\n\t\tvar tX=0;\n\t\tvar tScale=1;\n\t\tvar tInfo=xml.getElementsByTagName(\"info\");\n\t\tif (!tInfo[0].getAttributeNode){\n\t\t\treturn this.parseFont2(xml,texture);\n\t\t}\n\t\tthis.fontSize=parseInt(tInfo[0].getAttributeNode(\"size\").nodeValue);\n\t\tvar tPadding=tInfo[0].getAttributeNode(\"padding\").nodeValue;\n\t\tvar tPaddingArray=tPadding.split(\",\");\n\t\tthis._padding=[parseInt(tPaddingArray[0]),parseInt(tPaddingArray[1]),parseInt(tPaddingArray[2]),parseInt(tPaddingArray[3])];\n\t\tvar chars;\n\t\tchars=xml.getElementsByTagName(\"char\");\n\t\tvar i=0;\n\t\tfor (i=0;i < chars.length;i++){\n\t\t\tvar tAttribute=chars[i];\n\t\t\tvar tId=parseInt(tAttribute.getAttributeNode(\"id\").nodeValue);\n\t\t\tvar xOffset=parseInt(tAttribute.getAttributeNode(\"xoffset\").nodeValue)/ tScale;\n\t\t\tvar yOffset=parseInt(tAttribute.getAttributeNode(\"yoffset\").nodeValue)/ tScale;\n\t\t\tvar xAdvance=parseInt(tAttribute.getAttributeNode(\"xadvance\").nodeValue)/ tScale;\n\t\t\tvar region=new Rectangle();\n\t\t\tregion.x=parseInt(tAttribute.getAttributeNode(\"x\").nodeValue);\n\t\t\tregion.y=parseInt(tAttribute.getAttributeNode(\"y\").nodeValue);\n\t\t\tregion.width=parseInt(tAttribute.getAttributeNode(\"width\").nodeValue);\n\t\t\tregion.height=parseInt(tAttribute.getAttributeNode(\"height\").nodeValue);\n\t\t\tvar tTexture=Texture.create(texture,region.x,region.y,region.width,region.height,xOffset,yOffset);\n\t\t\tthis._maxWidth=Math.max(this._maxWidth,xAdvance+this.letterSpacing);\n\t\t\tthis._fontCharDic[tId]=tTexture;\n\t\t\tthis._fontWidthMap[tId]=xAdvance;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*解析字体文件。\n\t*@param xml 字体文件XML。\n\t*@param texture 字体的纹理。\n\t*/\n\t__proto.parseFont2=function(xml,texture){\n\t\tif (xml==null || texture==null)return;\n\t\tthis._texture=texture;\n\t\tvar tX=0;\n\t\tvar tScale=1;\n\t\tvar tInfo=xml.getElementsByTagName(\"info\");\n\t\tthis.fontSize=parseInt(tInfo[0].attributes[\"size\"].nodeValue);\n\t\tvar tPadding=tInfo[0].attributes[\"padding\"].nodeValue;\n\t\tvar tPaddingArray=tPadding.split(\",\");\n\t\tthis._padding=[parseInt(tPaddingArray[0]),parseInt(tPaddingArray[1]),parseInt(tPaddingArray[2]),parseInt(tPaddingArray[3])];\n\t\tvar chars=xml.getElementsByTagName(\"char\");\n\t\tvar i=0;\n\t\tfor (i=0;i < chars.length;i++){\n\t\t\tvar tAttribute=chars[i].attributes;\n\t\t\tvar tId=parseInt(tAttribute[\"id\"].nodeValue);\n\t\t\tvar xOffset=parseInt(tAttribute[\"xoffset\"].nodeValue)/ tScale;\n\t\t\tvar yOffset=parseInt(tAttribute[\"yoffset\"].nodeValue)/ tScale;\n\t\t\tvar xAdvance=parseInt(tAttribute[\"xadvance\"].nodeValue)/ tScale;\n\t\t\tvar region=new Rectangle();\n\t\t\tregion.x=parseInt(tAttribute[\"x\"].nodeValue);\n\t\t\tregion.y=parseInt(tAttribute[\"y\"].nodeValue);\n\t\t\tregion.width=parseInt(tAttribute[\"width\"].nodeValue);\n\t\t\tregion.height=parseInt(tAttribute[\"height\"].nodeValue);\n\t\t\tvar tTexture=Texture.create(texture,region.x,region.y,region.width,region.height,xOffset,yOffset);\n\t\t\tthis._maxWidth=Math.max(this._maxWidth,xAdvance+this.letterSpacing);\n\t\t\tthis._fontCharDic[tId]=tTexture;\n\t\t\tthis._fontWidthMap[tId]=xAdvance;\n\t\t}\n\t}\n\n\t/**\n\t*获取指定字符的字体纹理对象。\n\t*@param char 字符。\n\t*@return 指定的字体纹理对象。\n\t*/\n\t__proto.getCharTexture=function(char){\n\t\treturn this._fontCharDic[char.charCodeAt(0)];\n\t}\n\n\t/**\n\t*销毁位图字体，调用Text.unregisterBitmapFont 时，默认会销毁。\n\t*/\n\t__proto.destroy=function(){\n\t\tif (this._texture){\n\t\t\tfor (var p in this._fontCharDic){\n\t\t\t\tvar tTexture=this._fontCharDic[p];\n\t\t\t\tif (tTexture)tTexture.destroy();\n\t\t\t}\n\t\t\tthis._texture.destroy();\n\t\t\tthis._fontCharDic=null;\n\t\t\tthis._fontWidthMap=null;\n\t\t\tthis._texture=null;\n\t\t}\n\t}\n\n\t/**\n\t*设置空格的宽（如果字体库有空格，这里就可以不用设置了）。\n\t*@param spaceWidth 宽度，单位为像素。\n\t*/\n\t__proto.setSpaceWidth=function(spaceWidth){\n\t\tthis._spaceWidth=spaceWidth;\n\t}\n\n\t/**\n\t*获取指定字符的宽度。\n\t*@param char 字符。\n\t*@return 宽度。\n\t*/\n\t__proto.getCharWidth=function(char){\n\t\tvar code=char.charCodeAt(0);\n\t\tif (this._fontWidthMap[code])return this._fontWidthMap[code]+this.letterSpacing;\n\t\tif (char==\" \")return this._spaceWidth+this.letterSpacing;\n\t\treturn 0;\n\t}\n\n\t/**\n\t*获取指定文本内容的宽度。\n\t*@param text 文本内容。\n\t*@return 宽度。\n\t*/\n\t__proto.getTextWidth=function(text){\n\t\tvar tWidth=0;\n\t\tfor (var i=0,n=text.length;i < n;i++){\n\t\t\ttWidth+=this.getCharWidth(text.charAt(i));\n\t\t}\n\t\treturn tWidth;\n\t}\n\n\t/**\n\t*获取最大字符宽度。\n\t*/\n\t__proto.getMaxWidth=function(){\n\t\treturn this._maxWidth;\n\t}\n\n\t/**\n\t*获取最大字符高度。\n\t*/\n\t__proto.getMaxHeight=function(){\n\t\treturn this.fontSize;\n\t}\n\n\t/**\n\t*@private\n\t*将指定的文本绘制到指定的显示对象上。\n\t*/\n\t__proto.drawText=function(text,sprite,drawX,drawY,align,width){\n\t\tvar tWidth=this.getTextWidth(text);\n\t\tvar tTexture;\n\t\tvar dx=0;\n\t\talign===\"center\" && (dx=(width-tWidth)/ 2);\n\t\talign===\"right\" && (dx=(width-tWidth));\n\t\tvar tX=0;\n\t\tfor (var i=0,n=text.length;i < n;i++){\n\t\t\ttTexture=this.getCharTexture(text.charAt(i));\n\t\t\tif (tTexture){\n\t\t\t\tsprite.graphics.drawTexture(tTexture,drawX+tX+dx,drawY);\n\t\t\t\ttX+=this.getCharWidth(text.charAt(i));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn BitmapFont;\n})()\n\n\n/**\n*@private\n*<code>Style</code> 类是元素样式定义类。\n*/\n//class laya.display.css.Style\nvar Style=(function(){\n\tfunction Style(){\n\t\t/**透明度。*/\n\t\tthis.alpha=1;\n\t\t/**表示是否显示。*/\n\t\tthis.visible=true;\n\t\t/**表示滚动区域。*/\n\t\tthis.scrollRect=null;\n\t\t/**混合模式。*/\n\t\tthis.blendMode=null;\n\t\t/**@private */\n\t\tthis._type=0;\n\t\tthis.direction=\"ltr\";\n\t\tthis._tf=Style._TF_EMPTY;\n\t}\n\n\t__class(Style,'laya.display.css.Style');\n\tvar __proto=Style.prototype;\n\t__proto.getTransform=function(){\n\t\treturn this._tf;\n\t}\n\n\t__proto.setTransform=function(value){\n\t\tthis._tf=value==='none' || !value ? Style._TF_EMPTY :value;\n\t}\n\n\t__proto.setTranslateX=function(value){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.translateX=value;\n\t}\n\n\t__proto.setTranslateY=function(value){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.translateY=value;\n\t}\n\n\t__proto.setScaleX=function(value){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.scaleX=value;\n\t}\n\n\t__proto.setScale=function(x,y){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.scaleX=x;\n\t\tthis._tf.scaleY=y;\n\t}\n\n\t__proto.setScaleY=function(value){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.scaleY=value;\n\t}\n\n\t__proto.setRotate=function(value){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.rotate=value;\n\t}\n\n\t__proto.setSkewX=function(value){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.skewX=value;\n\t}\n\n\t__proto.setSkewY=function(value){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.skewY=value;\n\t}\n\n\t/**销毁此对象。*/\n\t__proto.destroy=function(){\n\t\tthis.scrollRect=null;\n\t}\n\n\t/**@private */\n\t__proto.render=function(sprite,context,x,y){}\n\t/**@private */\n\t__proto.getCSSStyle=function(){\n\t\treturn CSSStyle.EMPTY;\n\t}\n\n\t/**@private */\n\t__proto._enableLayout=function(){\n\t\treturn false;\n\t}\n\n\t/**X 轴缩放值。*/\n\t__getset(0,__proto,'scaleX',function(){\n\t\treturn this._tf.scaleX;\n\t\t},function(value){\n\t\tthis.setScaleX(value);\n\t});\n\n\t/**元素应用的 2D 或 3D 转换的值。该属性允许我们对元素进行旋转、缩放、移动或倾斜。*/\n\t__getset(0,__proto,'transform',function(){\n\t\treturn this.getTransform();\n\t\t},function(value){\n\t\tthis.setTransform(value);\n\t});\n\n\t/**定义转换，只是用 X 轴的值。*/\n\t__getset(0,__proto,'translateX',function(){\n\t\treturn this._tf.translateX;\n\t\t},function(value){\n\t\tthis.setTranslateX(value);\n\t});\n\n\t/**定义转换，只是用 Y 轴的值。*/\n\t__getset(0,__proto,'translateY',function(){\n\t\treturn this._tf.translateY;\n\t\t},function(value){\n\t\tthis.setTranslateY(value);\n\t});\n\n\t/**Y 轴缩放值。*/\n\t__getset(0,__proto,'scaleY',function(){\n\t\treturn this._tf.scaleY;\n\t\t},function(value){\n\t\tthis.setScaleY(value);\n\t});\n\n\t/**表示元素是否显示为块级元素。*/\n\t__getset(0,__proto,'block',function(){\n\t\treturn (this._type & 0x1)!=0;\n\t});\n\n\t/**定义沿着 Y 轴的 2D 倾斜转换。*/\n\t__getset(0,__proto,'skewY',function(){\n\t\treturn this._tf.skewY;\n\t\t},function(value){\n\t\tthis.setSkewY(value);\n\t});\n\n\t/**定义旋转角度。*/\n\t__getset(0,__proto,'rotate',function(){\n\t\treturn this._tf.rotate;\n\t\t},function(value){\n\t\tthis.setRotate(value);\n\t});\n\n\t/**定义沿着 X 轴的 2D 倾斜转换。*/\n\t__getset(0,__proto,'skewX',function(){\n\t\treturn this._tf.skewX;\n\t\t},function(value){\n\t\tthis.setSkewX(value);\n\t});\n\n\t/**表示元素的左内边距。*/\n\t__getset(0,__proto,'paddingLeft',function(){\n\t\treturn 0;\n\t});\n\n\t/**表示元素的上内边距。*/\n\t__getset(0,__proto,'paddingTop',function(){\n\t\treturn 0;\n\t});\n\n\t/**是否为绝对定位。*/\n\t__getset(0,__proto,'absolute',function(){\n\t\treturn true;\n\t});\n\n\tStyle.__init__=function(){\n\t\tStyle._TF_EMPTY=new TransformInfo();\n\t\tStyle.EMPTY=new Style();\n\t}\n\n\tStyle.EMPTY=null;\n\tStyle._TF_EMPTY=null;\n\treturn Style;\n})()\n\n\n/**\n*@private\n*<code>Font</code> 类是字体显示定义类。\n*/\n//class laya.display.css.Font\nvar Font=(function(){\n\tfunction Font(src){\n\t\tthis._type=0;\n\t\tthis._weight=0;\n\t\tthis._decoration=null;\n\t\tthis._text=null;\n\t\t/**\n\t\t*首行缩进 （以像素为单位）。\n\t\t*/\n\t\tthis.indent=0;\n\t\tthis._color=Color.create(Font.defaultColor);\n\t\tthis.family=Font.defaultFamily;\n\t\tthis.stroke=Font._STROKE;\n\t\tthis.size=Font.defaultSize;\n\t\tsrc && src!==Font.EMPTY && src.copyTo(this);\n\t}\n\n\t__class(Font,'laya.display.css.Font');\n\tvar __proto=Font.prototype;\n\t/**\n\t*字体样式字符串。\n\t*/\n\t__proto.set=function(value){\n\t\tthis._text=null;\n\t\tvar strs=value.split(' ');\n\t\tfor (var i=0,n=strs.length;i < n;i++){\n\t\t\tvar str=strs[i];\n\t\t\tswitch (str){\n\t\t\t\tcase 'italic':\n\t\t\t\t\tthis.italic=true;\n\t\t\t\t\tcontinue ;\n\t\t\t\tcase 'bold':\n\t\t\t\t\tthis.bold=true;\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\tif (str.indexOf('px')> 0){\n\t\t\t\tthis.size=parseInt(str);\n\t\t\t\tthis.family=strs[i+1];\n\t\t\t\ti++;\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*返回字体样式字符串。\n\t*@return 字体样式字符串。\n\t*/\n\t__proto.toString=function(){\n\t\tthis._text=\"\"\n\t\tthis.italic && (this._text+=\"italic \");\n\t\tthis.bold && (this._text+=\"bold \");\n\t\treturn this._text+=this.size+\"px \"+this.family;\n\t}\n\n\t/**\n\t*将当前的属性值复制到传入的 <code>Font</code> 对象。\n\t*@param dec 一个 Font 对象。\n\t*/\n\t__proto.copyTo=function(dec){\n\t\tdec._type=this._type;\n\t\tdec._text=this._text;\n\t\tdec._weight=this._weight;\n\t\tdec._color=this._color;\n\t\tdec.family=this.family;\n\t\tdec.stroke=this.stroke !=Font._STROKE ? this.stroke.slice():Font._STROKE;\n\t\tdec.indent=this.indent;\n\t\tdec.size=this.size;\n\t}\n\n\t/**\n\t*表示是否为密码格式。\n\t*/\n\t__getset(0,__proto,'password',function(){\n\t\treturn (this._type & 0x400)!==0;\n\t\t},function(value){\n\t\tvalue ? (this._type |=0x400):(this._type &=~0x400);\n\t});\n\n\t/**\n\t*表示颜色字符串。\n\t*/\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color.strColor;\n\t\t},function(value){\n\t\tthis._color=Color.create(value);\n\t});\n\n\t/**\n\t*表示是否为斜体。\n\t*/\n\t__getset(0,__proto,'italic',function(){\n\t\treturn (this._type & 0x200)!==0;\n\t\t},function(value){\n\t\tvalue ? (this._type |=0x200):(this._type &=~0x200);\n\t});\n\n\t/**\n\t*表示是否为粗体。\n\t*/\n\t__getset(0,__proto,'bold',function(){\n\t\treturn (this._type & 0x800)!==0;\n\t\t},function(value){\n\t\tvalue ? (this._type |=0x800):(this._type &=~0x800);\n\t});\n\n\t/**\n\t*文本的粗细。\n\t*/\n\t__getset(0,__proto,'weight',function(){\n\t\treturn \"\"+this._weight;\n\t\t},function(value){\n\t\tvar weight=0;\n\t\tswitch (value){\n\t\t\tcase 'normal':\n\t\t\t\tbreak ;\n\t\t\tcase 'bold':\n\t\t\t\tthis.bold=true;\n\t\t\t\tweight=700;\n\t\t\t\tbreak ;\n\t\t\tcase 'bolder':\n\t\t\t\tweight=800;\n\t\t\t\tbreak ;\n\t\t\tcase 'lighter':\n\t\t\t\tweight=100;\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tweight=parseInt(value);\n\t\t\t}\n\t\tthis._weight=weight;\n\t\tthis._text=null;\n\t});\n\n\t/**\n\t*规定添加到文本的修饰。\n\t*/\n\t__getset(0,__proto,'decoration',function(){\n\t\treturn this._decoration ? this._decoration.value :null;\n\t\t},function(value){\n\t\tvar strs=value.split(' ');\n\t\tthis._decoration || (this._decoration={});\n\t\tswitch (strs[0]){\n\t\t\tcase '_':\n\t\t\t\tthis._decoration.type='underline'\n\t\t\t\tbreak ;\n\t\t\tcase '-':\n\t\t\t\tthis._decoration.type='line-through'\n\t\t\t\tbreak ;\n\t\t\tcase 'overline':\n\t\t\t\tthis._decoration.type='overline'\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthis._decoration.type=strs[0];\n\t\t\t}\n\t\tstrs[1] && (this._decoration.color=Color.create(strs));\n\t\tthis._decoration.value=value;\n\t});\n\n\tFont.__init__=function(){\n\t\tFont.EMPTY=new Font(null);\n\t}\n\n\tFont.EMPTY=null;\n\tFont.defaultColor=\"#000000\";\n\tFont.defaultSize=12;\n\tFont.defaultFamily=\"Arial\";\n\tFont.defaultFont=\"12px Arial\";\n\tFont._STROKE=[0,\"#000000\"];\n\tFont._ITALIC=0x200;\n\tFont._PASSWORD=0x400;\n\tFont._BOLD=0x800;\n\treturn Font;\n})()\n\n\n/**\n*@private\n*/\n//class laya.display.css.TransformInfo\nvar TransformInfo=(function(){\n\tfunction TransformInfo(){\n\t\tthis.translateX=0;\n\t\tthis.translateY=0;\n\t\tthis.scaleX=1;\n\t\tthis.scaleY=1;\n\t\tthis.rotate=0;\n\t\tthis.skewX=0;\n\t\tthis.skewY=0;\n\t}\n\n\t__class(TransformInfo,'laya.display.css.TransformInfo');\n\treturn TransformInfo;\n})()\n\n\n/**\n*<code>Graphics</code> 类用于创建绘图显示对象。Graphics可以同时绘制多个位图或者矢量图，还可以结合save，restore，transform，scale，rotate，translate，alpha等指令对绘图效果进行变化。\n*Graphics以命令流方式存储，可以通过cmds属性访问所有命令流。Graphics是比Sprite更轻量级的对象，合理使用能提高应用性能(比如把大量的节点绘图改为一个节点的Graphics命令集合，能减少大量节点创建消耗)。\n*@see laya.display.Sprite#graphics\n*/\n//class laya.display.Graphics\nvar Graphics=(function(){\n\tfunction Graphics(){\n\t\t/**@private */\n\t\t//this._sp=null;\n\t\t/**@private */\n\t\tthis._one=null;\n\t\t/**@private */\n\t\tthis._cmds=null;\n\t\t/**@private */\n\t\t//this._vectorgraphArray=null;\n\t\t/**@private */\n\t\t//this._graphicBounds=null;\n\t\tthis._render=this._renderEmpty;\n\t\tif (Render.isConchNode){\n\t\t\tvar _this_=this;\n\t\t\t_this_._nativeObj=new (window)._conchGraphics();\n\t\t\t_this_.id=_this_._nativeObj.conchID;\n\t\t}\n\t}\n\n\t__class(Graphics,'laya.display.Graphics');\n\tvar __proto=Graphics.prototype;\n\t/**\n\t*<p>销毁此对象。</p>\n\t*/\n\t__proto.destroy=function(){\n\t\tthis.clear();\n\t\tif (this._graphicBounds)this._graphicBounds.destroy();\n\t\tthis._graphicBounds=null;\n\t\tthis._vectorgraphArray=null;\n\t\tthis._sp && (this._sp._renderType=0);\n\t\tthis._sp=null;\n\t}\n\n\t/**\n\t*<p>清空绘制命令。</p>\n\t*@param recoverCmds 是否回收绘图指令\n\t*/\n\t__proto.clear=function(recoverCmds){\n\t\t(recoverCmds===void 0)&& (recoverCmds=false);\n\t\tvar i=0,len=0;\n\t\tif (recoverCmds){\n\t\t\tvar tCmd=this._one;\n\t\t\tif (this._cmds){\n\t\t\t\tlen=this._cmds.length;\n\t\t\t\tfor (i=0;i < len;i++){\n\t\t\t\t\ttCmd=this._cmds[i];\n\t\t\t\t\tif (tCmd && (tCmd.callee===Render._context._drawTexture || tCmd.callee===Render._context._drawTextureWithTransform)){\n\t\t\t\t\t\ttCmd[0]=null;\n\t\t\t\t\t\tGraphics._cache.push(tCmd);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._cmds.length=0;\n\t\t\t\t}else if (tCmd){\n\t\t\t\tif (tCmd && (tCmd.callee===Render._context._drawTexture || tCmd.callee===Render._context._drawTextureWithTransform)){\n\t\t\t\t\ttCmd[0]=null;\n\t\t\t\t\tGraphics._cache.push(tCmd);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis._cmds=null;\n\t\t}\n\t\tthis._one=null;\n\t\tthis._render=this._renderEmpty;\n\t\tthis._sp && (this._sp._renderType &=~ /*laya.renders.RenderSprite.IMAGE*/0x01 & ~ /*laya.renders.RenderSprite.GRAPHICS*/0x200);\n\t\tthis._repaint();\n\t\tif (this._vectorgraphArray){\n\t\t\tfor (i=0,len=this._vectorgraphArray.length;i < len;i++){\n\t\t\t\tVectorGraphManager.getInstance().deleteShape(this._vectorgraphArray[i]);\n\t\t\t}\n\t\t\tthis._vectorgraphArray.length=0;\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._clearBoundsCache=function(){\n\t\tif (this._graphicBounds)this._graphicBounds.reset();\n\t}\n\n\t/**@private */\n\t__proto._initGraphicBounds=function(){\n\t\tif (!this._graphicBounds){\n\t\t\tthis._graphicBounds=new GraphicsBounds();\n\t\t\tthis._graphicBounds._graphics=this;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*重绘此对象。\n\t*/\n\t__proto._repaint=function(){\n\t\tthis._clearBoundsCache();\n\t\tthis._sp && this._sp.repaint();\n\t}\n\n\t/**@private */\n\t__proto._isOnlyOne=function(){\n\t\treturn !this._cmds || this._cmds.length===0;\n\t}\n\n\t/**\n\t*获取位置及宽高信息矩阵(比较耗CPU，频繁使用会造成卡顿，尽量少用)。\n\t*@param realSize （可选）使用图片的真实大小，默认为false\n\t*@return 位置与宽高组成的 一个 Rectangle 对象。\n\t*/\n\t__proto.getBounds=function(realSize){\n\t\t(realSize===void 0)&& (realSize=false);\n\t\tthis._initGraphicBounds();\n\t\treturn this._graphicBounds.getBounds(realSize);\n\t}\n\n\t/**\n\t*@private\n\t*@param realSize （可选）使用图片的真实大小，默认为false\n\t*获取端点列表。\n\t*/\n\t__proto.getBoundPoints=function(realSize){\n\t\t(realSize===void 0)&& (realSize=false);\n\t\tthis._initGraphicBounds();\n\t\treturn this._graphicBounds.getBoundPoints(realSize);\n\t}\n\n\t__proto._addCmd=function(a){\n\t\tthis._cmds=this._cmds || [];\n\t\ta.callee=a.shift();\n\t\tthis._cmds.push(a);\n\t}\n\n\t__proto.setFilters=function(fs){\n\t\tthis._saveToCmd(Render._context._setFilters,fs);\n\t}\n\n\t/**\n\t*绘制纹理。\n\t*@param tex 纹理。\n\t*@param x （可选）X轴偏移量。\n\t*@param y （可选）Y轴偏移量。\n\t*@param width （可选）宽度。\n\t*@param height （可选）高度。\n\t*@param m （可选）矩阵信息。\n\t*@param alpha （可选）透明度。\n\t*/\n\t__proto.drawTexture=function(tex,x,y,width,height,m,alpha){\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\t(alpha===void 0)&& (alpha=1);\n\t\tif (!tex || alpha < 0.01)return null;\n\t\tif (!width)width=tex.sourceWidth;\n\t\tif (!height)height=tex.sourceHeight;\n\t\talpha=alpha < 0 ? 0 :(alpha > 1 ? 1 :alpha);\n\t\tvar offset=(!Render.isWebGL && (Browser.onFirefox || Browser.onEdge||Browser.onIE||Browser.onSafari))? 0.5 :0;\n\t\tvar wRate=width / tex.sourceWidth;\n\t\tvar hRate=height / tex.sourceHeight;\n\t\twidth=tex.width *wRate;\n\t\theight=tex.height *hRate;\n\t\tif (tex.loaded && (width <=0 || height <=0))return null;\n\t\tx+=tex.offsetX *wRate;\n\t\ty+=tex.offsetY *hRate;\n\t\tthis._sp && (this._sp._renderType |=/*laya.renders.RenderSprite.GRAPHICS*/0x200);\n\t\tvar args;\n\t\tx-=offset;\n\t\ty-=offset;\n\t\twidth+=2 *offset;\n\t\theight+=2 *offset;\n\t\tif (Graphics._cache.length){\n\t\t\targs=Graphics._cache.pop();\n\t\t\targs[0]=tex;\n\t\t\targs[1]=x;\n\t\t\targs[2]=y;\n\t\t\targs[3]=width;\n\t\t\targs[4]=height;\n\t\t\targs[5]=m;\n\t\t\targs[6]=alpha;\n\t\t\t}else {\n\t\t\targs=[tex,x,y,width,height,m,alpha];\n\t\t}\n\t\targs.callee=(m || alpha !=1)? Render._context._drawTextureWithTransform :Render._context._drawTexture;\n\t\tif (this._one==null && !m && alpha==1){\n\t\t\tthis._one=args;\n\t\t\tthis._render=this._renderOneImg;\n\t\t\t}else {\n\t\t\tthis._saveToCmd(args.callee,args);\n\t\t}\n\t\tif (!tex.loaded){\n\t\t\ttex.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._textureLoaded,[tex,args]);\n\t\t}\n\t\tthis._repaint();\n\t\treturn args;\n\t}\n\n\t/**\n\t*@private 清理贴图并替换为最新的\n\t*@param tex\n\t*/\n\t__proto.cleanByTexture=function(tex,x,y,width,height){\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\tif (!tex)return this.clear();\n\t\tif (this._one && this._render===this._renderOneImg){\n\t\t\tif (!width)width=tex.sourceWidth;\n\t\t\tif (!height)height=tex.sourceHeight;\n\t\t\tvar wRate=width / tex.sourceWidth;\n\t\t\tvar hRate=height / tex.sourceHeight;\n\t\t\twidth=tex.width *wRate;\n\t\t\theight=tex.height *hRate;\n\t\t\tx+=tex.offsetX *wRate;\n\t\t\ty+=tex.offsetY *hRate;\n\t\t\tthis._one[0]=tex;\n\t\t\tthis._one[1]=x;\n\t\t\tthis._one[2]=y;\n\t\t\tthis._one[3]=width;\n\t\t\tthis._one[4]=height;\n\t\t\tthis._repaint();\n\t\t\t}else {\n\t\t\tthis.clear();\n\t\t\ttex && this.drawTexture(tex,x,y,width,height);\n\t\t}\n\t}\n\n\t/**\n\t*批量绘制同样纹理。\n\t*@param tex 纹理。\n\t*@param pos 绘制坐标。\n\t*/\n\t__proto.drawTextures=function(tex,pos){\n\t\tif (!tex)return;\n\t\tthis._saveToCmd(Render._context._drawTextures,[tex,pos]);\n\t}\n\n\t/**\n\t*用texture填充。\n\t*@param tex 纹理。\n\t*@param x X轴偏移量。\n\t*@param y Y轴偏移量。\n\t*@param width （可选）宽度。\n\t*@param height （可选）高度。\n\t*@param type （可选）填充类型 repeat|repeat-x|repeat-y|no-repeat\n\t*@param offset （可选）贴图纹理偏移\n\t*/\n\t__proto.fillTexture=function(tex,x,y,width,height,type,offset){\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\t(type===void 0)&& (type=\"repeat\");\n\t\tif (!tex)return;\n\t\tvar args=[tex,x,y,width,height,type,offset || Point.EMPTY,{}];\n\t\tif (!tex.loaded){\n\t\t\ttex.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._textureLoaded,[tex,args]);\n\t\t}\n\t\tthis._saveToCmd(Render._context._fillTexture,args);\n\t}\n\n\t__proto._textureLoaded=function(tex,param){\n\t\tparam[3]=param[3] || tex.width;\n\t\tparam[4]=param[4] || tex.height;\n\t\tthis._repaint();\n\t}\n\n\t/**\n\t*填充一个圆形。这是一个临时函数，以后会删除，建议用户自己实现。\n\t*@param x\n\t*@param y\n\t*@param tex\n\t*@param cx 圆心位置。\n\t*@param cy\n\t*@param radius\n\t*@param segNum 分段数，越大越平滑。\n\t*/\n\t__proto.fillCircle=function(x,y,tex,cx,cy,radius,segNum){\n\t\ttex.bitmap.enableMerageInAtlas=false;\n\t\tvar verts=new Float32Array((segNum+1)*2);\n\t\tvar uvs=new Float32Array((segNum+1)*2);\n\t\tvar indices=new Uint16Array(segNum*3);\n\t\tvar dang=2 *Math.PI / segNum;\n\t\tvar cang=0;\n\t\tverts[0]=cx;\n\t\tverts[1]=cy;\n\t\tuvs[0]=cx / tex.width;\n\t\tuvs[1]=cy / tex.height;\n\t\tvar idx=2;\n\t\tfor (var i=0;i < segNum;i++){\n\t\t\tvar px=radius *Math.cos(cang)+cx;\n\t\t\tvar py=radius *Math.sin(cang)+cy;\n\t\t\tverts[idx]=px;\n\t\t\tverts[idx+1]=py;\n\t\t\tuvs[idx]=px / tex.width;\n\t\t\tuvs[idx+1]=py / tex.height;\n\t\t\tcang+=dang;\n\t\t\tidx+=2;\n\t\t}\n\t\tidx=0;\n\t\tfor (i=0;i < segNum;i++){\n\t\t\tindices[idx++]=0;\n\t\t\tindices[idx++]=i+1;\n\t\t\tindices[idx++]=(i+2 >=segNum+1)?1:(i+2);\n\t\t}\n\t\tthis.drawTriangles(tex,x,y,verts,uvs,indices);\n\t}\n\n\t/**\n\t*绘制一组三角形\n\t*@param texture 纹理。\n\t*@param x X轴偏移量。\n\t*@param y Y轴偏移量。\n\t*@param vertices 顶点数组。\n\t*@param indices 顶点索引。\n\t*@param uvData UV数据。\n\t*@param matrix 缩放矩阵。\n\t*@param alpha alpha\n\t*@param color 颜色变换\n\t*@param blendMode blend模式\n\t*/\n\t__proto.drawTriangles=function(texture,x,y,vertices,uvs,indices,matrix,alpha,color,blendMode){\n\t\t(alpha===void 0)&& (alpha=1);\n\t\tthis._saveToCmd(Render._context.drawTriangles,[texture,x,y,vertices,uvs,indices,matrix,alpha,color,blendMode]);\n\t}\n\n\t/**\n\t*@private\n\t*保存到命令流。\n\t*/\n\t__proto._saveToCmd=function(fun,args){\n\t\tthis._sp && (this._sp._renderType |=/*laya.renders.RenderSprite.GRAPHICS*/0x200);\n\t\tif (this._one==null){\n\t\t\tthis._one=args;\n\t\t\tthis._render=this._renderOne;\n\t\t\t}else {\n\t\t\tthis._sp && (this._sp._renderType &=~ /*laya.renders.RenderSprite.IMAGE*/0x01);\n\t\t\tthis._render=this._renderAll;\n\t\t\t(this._cmds || (this._cmds=[])).length===0 && this._cmds.push(this._one);\n\t\t\tthis._cmds.push(args);\n\t\t}\n\t\targs.callee=fun;\n\t\tthis._repaint();\n\t\treturn args;\n\t}\n\n\t/**\n\t*设置剪裁区域，超出剪裁区域的坐标不显示。\n\t*@param x X 轴偏移量。\n\t*@param y Y 轴偏移量。\n\t*@param width 宽度。\n\t*@param height 高度。\n\t*/\n\t__proto.clipRect=function(x,y,width,height){\n\t\tthis._saveToCmd(Render._context._clipRect,[x,y,width,height]);\n\t}\n\n\t/**\n\t*在画布上绘制文本。\n\t*@param text 在画布上输出的文本。\n\t*@param x 开始绘制文本的 x 坐标位置（相对于画布）。\n\t*@param y 开始绘制文本的 y 坐标位置（相对于画布）。\n\t*@param font 定义字号和字体，比如\"20px Arial\"。\n\t*@param color 定义文本颜色，比如\"#ff0000\"。\n\t*@param textAlign 文本对齐方式，可选值：\"left\"，\"center\"，\"right\"。\n\t*/\n\t__proto.fillText=function(text,x,y,font,color,textAlign,underLine){\n\t\t(underLine===void 0)&& (underLine=0);\n\t\tthis._saveToCmd(Render._context._fillText,[text,x,y,font || Font.defaultFont,color,textAlign]);\n\t}\n\n\t/**\n\t*在画布上绘制“被填充且镶边的”文本。\n\t*@param text 在画布上输出的文本。\n\t*@param x 开始绘制文本的 x 坐标位置（相对于画布）。\n\t*@param y 开始绘制文本的 y 坐标位置（相对于画布）。\n\t*@param font 定义字体和字号，比如\"20px Arial\"。\n\t*@param fillColor 定义文本颜色，比如\"#ff0000\"。\n\t*@param borderColor 定义镶边文本颜色。\n\t*@param lineWidth 镶边线条宽度。\n\t*@param textAlign 文本对齐方式，可选值：\"left\"，\"center\"，\"right\"。\n\t*/\n\t__proto.fillBorderText=function(text,x,y,font,fillColor,borderColor,lineWidth,textAlign){\n\t\tthis._saveToCmd(Render._context._fillBorderText,[text,x,y,font || Font.defaultFont,fillColor,borderColor,lineWidth,textAlign]);\n\t}\n\n\t/**\n\t*在画布上绘制文本（没有填色）。文本的默认颜色是黑色。\n\t*@param text 在画布上输出的文本。\n\t*@param x 开始绘制文本的 x 坐标位置（相对于画布）。\n\t*@param y 开始绘制文本的 y 坐标位置（相对于画布）。\n\t*@param font 定义字体和字号，比如\"20px Arial\"。\n\t*@param color 定义文本颜色，比如\"#ff0000\"。\n\t*@param lineWidth 线条宽度。\n\t*@param textAlign 文本对齐方式，可选值：\"left\"，\"center\"，\"right\"。\n\t*/\n\t__proto.strokeText=function(text,x,y,font,color,lineWidth,textAlign){\n\t\tthis._saveToCmd(Render._context._strokeText,[text,x,y,font || Font.defaultFont,color,lineWidth,textAlign]);\n\t}\n\n\t/**\n\t*设置透明度。\n\t*@param value 透明度。\n\t*/\n\t__proto.alpha=function(value){\n\t\tvalue=value < 0 ? 0 :(value > 1 ? 1 :value);\n\t\tthis._saveToCmd(Render._context._alpha,[value]);\n\t}\n\n\t/**\n\t*设置当前透明度。\n\t*@param value 透明度。\n\t*/\n\t__proto.setAlpha=function(value){\n\t\tvalue=value < 0 ? 0 :(value > 1 ? 1 :value);\n\t\tthis._saveToCmd(Render._context._setAlpha,[value]);\n\t}\n\n\t/**\n\t*替换绘图的当前转换矩阵。\n\t*@param mat 矩阵。\n\t*@param pivotX （可选）水平方向轴心点坐标。\n\t*@param pivotY （可选）垂直方向轴心点坐标。\n\t*/\n\t__proto.transform=function(matrix,pivotX,pivotY){\n\t\t(pivotX===void 0)&& (pivotX=0);\n\t\t(pivotY===void 0)&& (pivotY=0);\n\t\tthis._saveToCmd(Render._context._transform,[matrix,pivotX,pivotY]);\n\t}\n\n\t/**\n\t*旋转当前绘图。(推荐使用transform，性能更高)\n\t*@param angle 旋转角度，以弧度计。\n\t*@param pivotX （可选）水平方向轴心点坐标。\n\t*@param pivotY （可选）垂直方向轴心点坐标。\n\t*/\n\t__proto.rotate=function(angle,pivotX,pivotY){\n\t\t(pivotX===void 0)&& (pivotX=0);\n\t\t(pivotY===void 0)&& (pivotY=0);\n\t\tthis._saveToCmd(Render._context._rotate,[angle,pivotX,pivotY]);\n\t}\n\n\t/**\n\t*缩放当前绘图至更大或更小。(推荐使用transform，性能更高)\n\t*@param scaleX 水平方向缩放值。\n\t*@param scaleY 垂直方向缩放值。\n\t*@param pivotX （可选）水平方向轴心点坐标。\n\t*@param pivotY （可选）垂直方向轴心点坐标。\n\t*/\n\t__proto.scale=function(scaleX,scaleY,pivotX,pivotY){\n\t\t(pivotX===void 0)&& (pivotX=0);\n\t\t(pivotY===void 0)&& (pivotY=0);\n\t\tthis._saveToCmd(Render._context._scale,[scaleX,scaleY,pivotX,pivotY]);\n\t}\n\n\t/**\n\t*重新映射画布上的 (0,0)位置。\n\t*@param x 添加到水平坐标（x）上的值。\n\t*@param y 添加到垂直坐标（y）上的值。\n\t*/\n\t__proto.translate=function(x,y){\n\t\tthis._saveToCmd(Render._context._translate,[x,y]);\n\t}\n\n\t/**\n\t*保存当前环境的状态。\n\t*/\n\t__proto.save=function(){\n\t\tthis._saveToCmd(Render._context._save,[]);\n\t}\n\n\t/**\n\t*返回之前保存过的路径状态和属性。\n\t*/\n\t__proto.restore=function(){\n\t\tthis._saveToCmd(Render._context._restore,[]);\n\t}\n\n\t/**\n\t*@private\n\t*替换文本内容。\n\t*@param text 文本内容。\n\t*@return 替换成功则值为true，否则值为flase。\n\t*/\n\t__proto.replaceText=function(text){\n\t\tthis._repaint();\n\t\tvar cmds=this._cmds;\n\t\tif (!cmds){\n\t\t\tif (this._one && this._isTextCmd(this._one.callee)){\n\t\t\t\tif (this._one[0].toUpperCase)this._one[0]=text;\n\t\t\t\telse this._one[0].setText(text);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (var i=cmds.length-1;i >-1;i--){\n\t\t\t\tif (this._isTextCmd(cmds[i].callee)){\n\t\t\t\t\tif (cmds[i][0].toUpperCase)cmds[i][0]=text;\n\t\t\t\t\telse cmds[i][0].setText(text);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**@private */\n\t__proto._isTextCmd=function(fun){\n\t\treturn fun===Render._context._fillText || fun===Render._context._fillBorderText || fun===Render._context._strokeText;\n\t}\n\n\t/**\n\t*@private\n\t*替换文本颜色。\n\t*@param color 颜色。\n\t*/\n\t__proto.replaceTextColor=function(color){\n\t\tthis._repaint();\n\t\tvar cmds=this._cmds;\n\t\tif (!cmds){\n\t\t\tif (this._one && this._isTextCmd(this._one.callee)){\n\t\t\t\tthis._one[4]=color;\n\t\t\t\tif (!this._one[0].toUpperCase)this._one[0].changed=true;\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (var i=cmds.length-1;i >-1;i--){\n\t\t\t\tif (this._isTextCmd(cmds[i].callee)){\n\t\t\t\t\tcmds[i][4]=color;\n\t\t\t\t\tif (!cmds[i][0].toUpperCase)cmds[i][0].changed=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*加载并显示一个图片。\n\t*@param url 图片地址。\n\t*@param x （可选）显示图片的x位置。\n\t*@param y （可选）显示图片的y位置。\n\t*@param width （可选）显示图片的宽度，设置为0表示使用图片默认宽度。\n\t*@param height （可选）显示图片的高度，设置为0表示使用图片默认高度。\n\t*@param complete （可选）加载完成回调。\n\t*/\n\t__proto.loadImage=function(url,x,y,width,height,complete){\n\t\tvar _$this=this;\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\tvar tex=Loader.getRes(url);\n\t\tif (tex)onloaded(tex);\n\t\telse Laya.loader.load(url,Handler.create(null,onloaded),null,/*laya.net.Loader.IMAGE*/\"image\");\n\t\tfunction onloaded (tex){\n\t\t\tif (tex){\n\t\t\t\t_$this.drawTexture(tex,x,y,width,height);\n\t\t\t\tif (complete !=null)complete.call(_$this._sp,tex);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderEmpty=function(sprite,context,x,y){}\n\t/**\n\t*@private\n\t*/\n\t__proto._renderAll=function(sprite,context,x,y){\n\t\tvar cmds=this._cmds,cmd;\n\t\tfor (var i=0,n=cmds.length;i < n;i++){\n\t\t\t(cmd=cmds[i]).callee.call(context,x,y,cmd);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderOne=function(sprite,context,x,y){\n\t\tthis._one.callee.call(context,x,y,this._one);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderOneImg=function(sprite,context,x,y){\n\t\tthis._one.callee.call(context,x,y,this._one);\n\t\tif (sprite._renderType!==2305){\n\t\t\tsprite._renderType |=/*laya.renders.RenderSprite.IMAGE*/0x01;\n\t\t}\n\t}\n\n\t/**\n\t*绘制一条线。\n\t*@param fromX X轴开始位置。\n\t*@param fromY Y轴开始位置。\n\t*@param toX X轴结束位置。\n\t*@param toY Y轴结束位置。\n\t*@param lineColor 颜色。\n\t*@param lineWidth （可选）线条宽度。\n\t*/\n\t__proto.drawLine=function(fromX,fromY,toX,toY,lineColor,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar tId=0;\n\t\tif (Render.isWebGL){\n\t\t\ttId=VectorGraphManager.getInstance().getId();\n\t\t\tif (this._vectorgraphArray==null)this._vectorgraphArray=[];\n\t\t\tthis._vectorgraphArray.push(tId);\n\t\t};\n\t\tvar offset=lineWidth % 2===0 ? 0 :0.5;\n\t\tvar arr=[fromX+offset,fromY+offset,toX+offset,toY+offset,lineColor,lineWidth,tId];\n\t\tthis._saveToCmd(Render._context._drawLine,arr);\n\t}\n\n\t/**\n\t*绘制一系列线段。\n\t*@param x 开始绘制的X轴位置。\n\t*@param y 开始绘制的Y轴位置。\n\t*@param points 线段的点集合。格式:[x1,y1,x2,y2,x3,y3...]。\n\t*@param lineColor 线段颜色，或者填充绘图的渐变对象。\n\t*@param lineWidth （可选）线段宽度。\n\t*/\n\t__proto.drawLines=function(x,y,points,lineColor,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar tId=0;\n\t\tif (!points || points.length < 4)return;\n\t\tif (Render.isWebGL){\n\t\t\ttId=VectorGraphManager.getInstance().getId();\n\t\t\tif (this._vectorgraphArray==null)this._vectorgraphArray=[];\n\t\t\tthis._vectorgraphArray.push(tId);\n\t\t};\n\t\tvar offset=lineWidth % 2===0 ? 0 :0.5;\n\t\tvar arr=[x+offset,y+offset,points,lineColor,lineWidth,tId];\n\t\tthis._saveToCmd(Render._context._drawLines,arr);\n\t}\n\n\t/**\n\t*绘制一系列曲线。\n\t*@param x 开始绘制的 X 轴位置。\n\t*@param y 开始绘制的 Y 轴位置。\n\t*@param points 线段的点集合，格式[startx,starty,ctrx,ctry,startx,starty...]。\n\t*@param lineColor 线段颜色，或者填充绘图的渐变对象。\n\t*@param lineWidth （可选）线段宽度。\n\t*/\n\t__proto.drawCurves=function(x,y,points,lineColor,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar arr=[x,y,points,lineColor,lineWidth];\n\t\tthis._saveToCmd(Render._context._drawCurves,arr);\n\t}\n\n\t/**\n\t*绘制矩形。\n\t*@param x 开始绘制的 X 轴位置。\n\t*@param y 开始绘制的 Y 轴位置。\n\t*@param width 矩形宽度。\n\t*@param height 矩形高度。\n\t*@param fillColor 填充颜色，或者填充绘图的渐变对象。\n\t*@param lineColor （可选）边框颜色，或者填充绘图的渐变对象。\n\t*@param lineWidth （可选）边框宽度。\n\t*/\n\t__proto.drawRect=function(x,y,width,height,fillColor,lineColor,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar offset=lineColor ? lineWidth / 2 :0;\n\t\tvar lineOffset=lineColor ? lineWidth :0;\n\t\tvar arr=[x+offset,y+offset,width-lineOffset,height-lineOffset,fillColor,lineColor,lineWidth];\n\t\tthis._saveToCmd(Render._context._drawRect,arr);\n\t}\n\n\t/**\n\t*绘制圆形。\n\t*@param x 圆点X 轴位置。\n\t*@param y 圆点Y 轴位置。\n\t*@param radius 半径。\n\t*@param fillColor 填充颜色，或者填充绘图的渐变对象。\n\t*@param lineColor （可选）边框颜色，或者填充绘图的渐变对象。\n\t*@param lineWidth （可选）边框宽度。\n\t*/\n\t__proto.drawCircle=function(x,y,radius,fillColor,lineColor,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar offset=lineColor ? lineWidth / 2 :0;\n\t\tvar tId=0;\n\t\tif (Render.isWebGL){\n\t\t\ttId=VectorGraphManager.getInstance().getId();\n\t\t\tif (this._vectorgraphArray==null)this._vectorgraphArray=[];\n\t\t\tthis._vectorgraphArray.push(tId);\n\t\t};\n\t\tvar arr=[x,y,radius-offset,fillColor,lineColor,lineWidth,tId];\n\t\tthis._saveToCmd(Render._context._drawCircle,arr);\n\t}\n\n\t/**\n\t*绘制扇形。\n\t*@param x 开始绘制的 X 轴位置。\n\t*@param y 开始绘制的 Y 轴位置。\n\t*@param radius 扇形半径。\n\t*@param startAngle 开始角度。\n\t*@param endAngle 结束角度。\n\t*@param fillColor 填充颜色，或者填充绘图的渐变对象。\n\t*@param lineColor （可选）边框颜色，或者填充绘图的渐变对象。\n\t*@param lineWidth （可选）边框宽度。\n\t*/\n\t__proto.drawPie=function(x,y,radius,startAngle,endAngle,fillColor,lineColor,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar offset=lineColor ? lineWidth / 2 :0;\n\t\tvar lineOffset=lineColor ? lineWidth :0;\n\t\tvar tId=0;\n\t\tif (Render.isWebGL){\n\t\t\ttId=VectorGraphManager.getInstance().getId();\n\t\t\tif (this._vectorgraphArray==null)this._vectorgraphArray=[];\n\t\t\tthis._vectorgraphArray.push(tId);\n\t\t};\n\t\tvar arr=[x+offset,y+offset,radius-lineOffset,startAngle,endAngle,fillColor,lineColor,lineWidth,tId];\n\t\tarr[3]=Utils.toRadian(startAngle);\n\t\tarr[4]=Utils.toRadian(endAngle);\n\t\tthis._saveToCmd(Render._context._drawPie,arr);\n\t}\n\n\t/**\n\t*绘制多边形。\n\t*@param x 开始绘制的 X 轴位置。\n\t*@param y 开始绘制的 Y 轴位置。\n\t*@param points 多边形的点集合。\n\t*@param fillColor 填充颜色，或者填充绘图的渐变对象。\n\t*@param lineColor （可选）边框颜色，或者填充绘图的渐变对象。\n\t*@param lineWidth （可选）边框宽度。\n\t*/\n\t__proto.drawPoly=function(x,y,points,fillColor,lineColor,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar tId=0;\n\t\tvar tIsConvexPolygon=false;\n\t\tif (Render.isWebGL){\n\t\t\ttId=VectorGraphManager.getInstance().getId();\n\t\t\tif (this._vectorgraphArray==null)this._vectorgraphArray=[];\n\t\t\tthis._vectorgraphArray.push(tId);\n\t\t\tif (points.length > 6){\n\t\t\t\ttIsConvexPolygon=false;\n\t\t\t\t}else {\n\t\t\t\ttIsConvexPolygon=true;\n\t\t\t}\n\t\t};\n\t\tvar offset=lineColor ? (lineWidth % 2===0 ? 0 :0.5):0;\n\t\tvar arr=[x+offset,y+offset,points,fillColor,lineColor,lineWidth,tId,tIsConvexPolygon];\n\t\tthis._saveToCmd(Render._context._drawPoly,arr);\n\t}\n\n\t/**\n\t*绘制路径。\n\t*@param x 开始绘制的 X 轴位置。\n\t*@param y 开始绘制的 Y 轴位置。\n\t*@param paths 路径集合，路径支持以下格式：[[\"moveTo\",x,y],[\"lineTo\",x,y,x,y,x,y],[\"arcTo\",x1,y1,x2,y2,r],[\"closePath\"]]。\n\t*@param brush （可选）刷子定义，支持以下设置{fillStyle}。\n\t*@param pen （可选）画笔定义，支持以下设置{strokeStyle,lineWidth,lineJoin,lineCap,miterLimit}。\n\t*/\n\t__proto.drawPath=function(x,y,paths,brush,pen){\n\t\tvar arr=[x,y,paths,brush,pen];\n\t\tthis._saveToCmd(Render._context._drawPath,arr);\n\t}\n\n\t__proto.setDirection=function(dir){}\n\t/**\n\t*@private\n\t*命令流。存储了所有绘制命令。\n\t*/\n\t__getset(0,__proto,'cmds',function(){\n\t\treturn this._cmds;\n\t\t},function(value){\n\t\tthis._sp && (this._sp._renderType |=/*laya.renders.RenderSprite.GRAPHICS*/0x200);\n\t\tthis._cmds=value;\n\t\tthis._render=this._renderAll;\n\t\tthis._repaint();\n\t});\n\n\tGraphics.__init__=function(){\n\t\tif (Render.isConchNode){\n\t\t\tvar from=laya.display.Graphics.prototype;\n\t\t\tvar to=Browser.window.ConchGraphics.prototype;\n\t\t\tvar list=[\"setDirection\",\"clear\",\"destroy\",\"alpha\",\"rotate\",\"transform\",\"scale\",\"translate\",\"save\",\"restore\",\"clipRect\",\"blendMode\",\"fillText\",\"fillBorderText\",\"_fands\",\"drawRect\",\"drawCircle\",\"drawPie\",\"drawPoly\",\"drawPath\",\"drawImageM\",\"drawLine\",\"drawLines\",\"_drawPs\",\"drawCurves\",\"replaceText\",\"replaceTextColor\",\"_fillImage\",\"fillTexture\",\"setSkinMesh\",\"drawParticle\",\"drawImageS\"];\n\t\t\tfor (var i=0,len=list.length;i <=len;i++){\n\t\t\t\tvar temp=list[i];\n\t\t\t\tfrom[temp]=to[temp];\n\t\t\t}\n\t\t\tfrom._saveToCmd=null;\n\t\t\tif (to.drawImageS){\n\t\t\t\tfrom.drawTextures=function (tex,pos){\n\t\t\t\t\tif (!tex)return;\n\t\t\t\t\tif (!(tex.loaded && tex.bitmap && tex.source)){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t};\n\t\t\t\t\tvar uv=tex.uv,w=tex.bitmap.width,h=tex.bitmap.height;\n\t\t\t\t\tthis.drawImageS(tex.bitmap.source,uv[0] *w,uv[1] *h,(uv[2]-uv[0])*w,(uv[5]-uv[3])*h,tex.offsetX,tex.offsetY,tex.width,tex.height,pos);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfrom.drawTexture=function (tex,x,y,width,height,m,alpha){\n\t\t\t\t(x===void 0)&& (x=0);\n\t\t\t\t(y===void 0)&& (y=0);\n\t\t\t\t(width===void 0)&& (width=0);\n\t\t\t\t(height===void 0)&& (height=0);\n\t\t\t\t(alpha===void 0)&& (alpha=1);\n\t\t\t\tif (!tex)return;\n\t\t\t\tif (!tex.loaded){\n\t\t\t\t\ttex.once(/*laya.events.Event.LOADED*/\"loaded\",this,function(){\n\t\t\t\t\t\tthis.drawTexture(tex,x,y,width,height,m);\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!(tex.loaded && tex.bitmap && tex.source)){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!width)width=tex.sourceWidth;\n\t\t\t\tif (!height)height=tex.sourceHeight;\n\t\t\t\talpha=alpha < 0 ? 0 :(alpha > 1 ? 1 :alpha);\n\t\t\t\twidth=width-tex.sourceWidth+tex.width;\n\t\t\t\theight=height-tex.sourceHeight+tex.height;\n\t\t\t\tif (width <=0 || height <=0)return;\n\t\t\t\tx+=tex.offsetX;\n\t\t\t\ty+=tex.offsetY;\n\t\t\t\tvar uv=tex.uv,w=tex.bitmap.width,h=tex.bitmap.height;\n\t\t\t\tif (uv[4] < uv[0] && uv[5] < uv[1]){\n\t\t\t\t\tthis.drawImageM(tex.bitmap.source,uv[4] *w,uv[5] *h,(uv[0]-uv[4])*w,(uv[1]-uv[5])*h,x,y,width,height,m,alpha);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.drawImageM(tex.bitmap.source,uv[0] *w,uv[1] *h,(uv[2]-uv[0])*w,(uv[5]-uv[3])*h,x,y,width,height,m,alpha);\n\t\t\t\t}\n\t\t\t\tthis._repaint();\n\t\t\t}\n\t\t\tfrom.fillTexture=function (tex,x,y,width,height,type,offset){\n\t\t\t\t(width===void 0)&& (width=0);\n\t\t\t\t(height===void 0)&& (height=0);\n\t\t\t\t(type===void 0)&& (type=\"repeat\");\n\t\t\t\tif (!tex)return;\n\t\t\t\tif (tex.loaded){\n\t\t\t\t\tvar ctxi=Render._context.ctx;\n\t\t\t\t\tvar w=tex.bitmap.width,h=tex.bitmap.height,uv=tex.uv;\n\t\t\t\t\tvar pat;\n\t\t\t\t\tif (tex.uv !=Texture.DEF_UV){\n\t\t\t\t\t\tpat=ctxi.createPattern(tex.bitmap.source,type,uv[0] *w,uv[1] *h,(uv[2]-uv[0])*w,(uv[5]-uv[3])*h);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tpat=ctxi.createPattern(tex.bitmap.source,type);\n\t\t\t\t\t};\n\t\t\t\t\tvar sX=0,sY=0;\n\t\t\t\t\tif (offset){\n\t\t\t\t\t\tx+=offset.x % tex.width;\n\t\t\t\t\t\ty+=offset.y % tex.height;\n\t\t\t\t\t\tsX-=offset.x % tex.width;\n\t\t\t\t\t\tsY-=offset.y % tex.height;\n\t\t\t\t\t}\n\t\t\t\t\tthis._fillImage(pat,x,y,sX,sY,width,height);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tGraphics._cache=[];\n\treturn Graphics;\n})()\n\n\n/**\n*@private\n*Graphic bounds数据类\n*/\n//class laya.display.GraphicsBounds\nvar GraphicsBounds=(function(){\n\tfunction GraphicsBounds(){\n\t\t/**@private */\n\t\t//this._temp=null;\n\t\t/**@private */\n\t\t//this._bounds=null;\n\t\t/**@private */\n\t\t//this._rstBoundPoints=null;\n\t\t/**@private */\n\t\tthis._cacheBoundsType=false;\n\t\t/**@private */\n\t\t//this._graphics=null;\n\t}\n\n\t__class(GraphicsBounds,'laya.display.GraphicsBounds');\n\tvar __proto=GraphicsBounds.prototype;\n\t/**\n\t*销毁\n\t*/\n\t__proto.destroy=function(){\n\t\tthis._graphics=null;\n\t\tthis._temp=null;\n\t\tthis._rstBoundPoints=null;\n\t\tthis._bounds=null;\n\t}\n\n\t/**\n\t*重置数据\n\t*/\n\t__proto.reset=function(){\n\t\tthis._temp && (this._temp.length=0);\n\t}\n\n\t/**\n\t*获取位置及宽高信息矩阵(比较耗CPU，频繁使用会造成卡顿，尽量少用)。\n\t*@param realSize （可选）使用图片的真实大小，默认为false\n\t*@return 位置与宽高组成的 一个 Rectangle 对象。\n\t*/\n\t__proto.getBounds=function(realSize){\n\t\t(realSize===void 0)&& (realSize=false);\n\t\tif (!this._bounds || !this._temp || this._temp.length < 1 || realSize !=this._cacheBoundsType){\n\t\t\tthis._bounds=Rectangle._getWrapRec(this.getBoundPoints(realSize),this._bounds)\n\t\t}\n\t\tthis._cacheBoundsType=realSize;\n\t\treturn this._bounds;\n\t}\n\n\t/**\n\t*@private\n\t*@param realSize （可选）使用图片的真实大小，默认为false\n\t*获取端点列表。\n\t*/\n\t__proto.getBoundPoints=function(realSize){\n\t\t(realSize===void 0)&& (realSize=false);\n\t\tif (!this._temp || this._temp.length < 1 || realSize !=this._cacheBoundsType)\n\t\t\tthis._temp=this._getCmdPoints(realSize);\n\t\tthis._cacheBoundsType=realSize;\n\t\treturn this._rstBoundPoints=Utils.copyArray(this._rstBoundPoints,this._temp);\n\t}\n\n\t__proto._getCmdPoints=function(realSize){\n\t\t(realSize===void 0)&& (realSize=false);\n\t\tvar context=Render._context;\n\t\tvar cmds=this._graphics.cmds;\n\t\tvar rst;\n\t\trst=this._temp || (this._temp=[]);\n\t\trst.length=0;\n\t\tif (!cmds && this._graphics._one !=null){\n\t\t\tGraphicsBounds._tempCmds.length=0;\n\t\t\tGraphicsBounds._tempCmds.push(this._graphics._one);\n\t\t\tcmds=GraphicsBounds._tempCmds;\n\t\t}\n\t\tif (!cmds)\n\t\t\treturn rst;\n\t\tvar matrixs;\n\t\tmatrixs=GraphicsBounds._tempMatrixArrays;\n\t\tmatrixs.length=0;\n\t\tvar tMatrix=GraphicsBounds._initMatrix;\n\t\ttMatrix.identity();\n\t\tvar tempMatrix=GraphicsBounds._tempMatrix;\n\t\tvar cmd;\n\t\tvar tex;\n\t\tvar wRate=NaN;\n\t\tvar hRate=NaN;\n\t\tvar oWidth=NaN;\n\t\tvar oHeight=NaN;\n\t\tvar offX=NaN;\n\t\tvar offY=NaN;\n\t\tfor (var i=0,n=cmds.length;i < n;i++){\n\t\t\tcmd=cmds[i];\n\t\t\tif (!cmd.callee)continue ;\n\t\t\tswitch (cmd.callee){\n\t\t\t\tcase context._save:\n\t\t\t\tcase 7:\n\t\t\t\t\tmatrixs.push(tMatrix);\n\t\t\t\t\ttMatrix=tMatrix.clone();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._restore:\n\t\t\t\tcase 8:\n\t\t\t\t\ttMatrix=matrixs.pop();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._scale:\n\t\t\t\tcase 5:\n\t\t\t\t\ttempMatrix.identity();\n\t\t\t\t\ttempMatrix.translate(-cmd[2],-cmd[3]);\n\t\t\t\t\ttempMatrix.scale(cmd[0],cmd[1]);\n\t\t\t\t\ttempMatrix.translate(cmd[2],cmd[3]);\n\t\t\t\t\tthis._switchMatrix(tMatrix,tempMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._rotate:\n\t\t\t\tcase 3:\n\t\t\t\t\ttempMatrix.identity();\n\t\t\t\t\ttempMatrix.translate(-cmd[1],-cmd[2]);\n\t\t\t\t\ttempMatrix.rotate(cmd[0]);\n\t\t\t\t\ttempMatrix.translate(cmd[1],cmd[2]);\n\t\t\t\t\tthis._switchMatrix(tMatrix,tempMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._translate:\n\t\t\t\tcase 6:\n\t\t\t\t\ttempMatrix.identity();\n\t\t\t\t\ttempMatrix.translate(cmd[0],cmd[1]);\n\t\t\t\t\tthis._switchMatrix(tMatrix,tempMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._transform:\n\t\t\t\tcase 4:\n\t\t\t\t\ttempMatrix.identity();\n\t\t\t\t\ttempMatrix.translate(-cmd[1],-cmd[2]);\n\t\t\t\t\ttempMatrix.concat(cmd[0]);\n\t\t\t\t\ttempMatrix.translate(cmd[1],cmd[2]);\n\t\t\t\t\tthis._switchMatrix(tMatrix,tempMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 16:\n\t\t\t\tcase 24:\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[0],cmd[1],cmd[2],cmd[3]),tMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 17:\n\t\t\t\t\ttMatrix.copyTo(tempMatrix);\n\t\t\t\t\ttempMatrix.concat(cmd[4]);\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[0],cmd[1],cmd[2],cmd[3]),tempMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawTexture:\n\t\t\t\t\ttex=cmd[0];\n\t\t\t\t\tif (realSize){\n\t\t\t\t\t\tif (cmd[3] && cmd[4]){\n\t\t\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[1],cmd[2],cmd[3],cmd[4]),tMatrix);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\ttex=cmd[0];\n\t\t\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[1],cmd[2],tex.width,tex.height),tMatrix);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\twRate=(cmd[3] || tex.sourceWidth)/ tex.width;\n\t\t\t\t\t\thRate=(cmd[4] || tex.sourceHeight)/ tex.height;\n\t\t\t\t\t\toWidth=wRate *tex.sourceWidth;\n\t\t\t\t\t\toHeight=hRate *tex.sourceHeight;\n\t\t\t\t\t\toffX=tex.offsetX > 0 ? tex.offsetX :0;\n\t\t\t\t\t\toffY=tex.offsetY > 0 ? tex.offsetY :0;\n\t\t\t\t\t\toffX *=wRate;\n\t\t\t\t\t\toffY *=hRate;\n\t\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[1]-offX,cmd[2]-offY,oWidth,oHeight),tMatrix);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._fillTexture:\n\t\t\t\t\tif (cmd[3] && cmd[4]){\n\t\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[1],cmd[2],cmd[3],cmd[4]),tMatrix);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttex=cmd[0];\n\t\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[1],cmd[2],tex.width,tex.height),tMatrix);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawTextureWithTransform:;\n\t\t\t\t\tvar drawMatrix;\n\t\t\t\t\tif (cmd[5]){\n\t\t\t\t\t\ttMatrix.copyTo(tempMatrix);\n\t\t\t\t\t\ttempMatrix.concat(cmd[5]);\n\t\t\t\t\t\tdrawMatrix=tempMatrix;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tdrawMatrix=tMatrix;\n\t\t\t\t\t}\n\t\t\t\t\tif (realSize){\n\t\t\t\t\t\tif (cmd[3] && cmd[4]){\n\t\t\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[1],cmd[2],cmd[3],cmd[4]),drawMatrix);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\ttex=cmd[0];\n\t\t\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[1],cmd[2],tex.width,tex.height),drawMatrix);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttex=cmd[0];\n\t\t\t\t\t\twRate=(cmd[3] || tex.sourceWidth)/ tex.width;\n\t\t\t\t\t\thRate=(cmd[4] || tex.sourceHeight)/ tex.height;\n\t\t\t\t\t\toWidth=wRate *tex.sourceWidth;\n\t\t\t\t\t\toHeight=hRate *tex.sourceHeight;\n\t\t\t\t\t\toffX=tex.offsetX > 0 ? tex.offsetX :0;\n\t\t\t\t\t\toffY=tex.offsetY > 0 ? tex.offsetY :0;\n\t\t\t\t\t\toffX *=wRate;\n\t\t\t\t\t\toffY *=hRate;\n\t\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[1]-offX,cmd[2]-offY,oWidth,oHeight),drawMatrix);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawRect:\n\t\t\t\tcase 13:\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[0],cmd[1],cmd[2],cmd[3]),tMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawCircle:\n\t\t\t\tcase context._fillCircle:\n\t\t\t\tcase 14:\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Rectangle._getBoundPointS(cmd[0]-cmd[2],cmd[1]-cmd[2],cmd[2]+cmd[2],cmd[2]+cmd[2]),tMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawLine:\n\t\t\t\tcase 20:\n\t\t\t\t\tGraphicsBounds._tempPoints.length=0;\n\t\t\t\t\tvar lineWidth=NaN;\n\t\t\t\t\tlineWidth=cmd[5] *0.5;\n\t\t\t\t\tif (cmd[0]==cmd[2]){\n\t\t\t\t\t\tGraphicsBounds._tempPoints.push(cmd[0]+lineWidth,cmd[1],cmd[2]+lineWidth,cmd[3],cmd[0]-lineWidth,cmd[1],cmd[2]-lineWidth,cmd[3]);\n\t\t\t\t\t\t}else if (cmd[1]==cmd[3]){\n\t\t\t\t\t\tGraphicsBounds._tempPoints.push(cmd[0],cmd[1]+lineWidth,cmd[2],cmd[3]+lineWidth,cmd[0],cmd[1]-lineWidth,cmd[2],cmd[3]-lineWidth);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tGraphicsBounds._tempPoints.push(cmd[0],cmd[1],cmd[2],cmd[3]);\n\t\t\t\t\t}\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,GraphicsBounds._tempPoints,tMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawCurves:\n\t\t\t\tcase 22:\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,Bezier.I.getBezierPoints(cmd[2]),tMatrix,cmd[0],cmd[1]);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawPoly:\n\t\t\t\tcase context._drawLines:\n\t\t\t\tcase 18:\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,cmd[2],tMatrix,cmd[0],cmd[1]);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawPath:\n\t\t\t\tcase 19:\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,this._getPathPoints(cmd[2]),tMatrix,cmd[0],cmd[1]);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase context._drawPie:\n\t\t\t\tcase 15:\n\t\t\t\t\tGraphicsBounds._addPointArrToRst(rst,this._getPiePoints(cmd[0],cmd[1],cmd[2],cmd[3],cmd[4]),tMatrix);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\tif (rst.length > 200){\n\t\t\trst=Utils.copyArray(rst,Rectangle._getWrapRec(rst)._getBoundPoints());\n\t\t}else if (rst.length > 8)\n\t\trst=GrahamScan.scanPList(rst);\n\t\treturn rst;\n\t}\n\n\t__proto._switchMatrix=function(tMatix,tempMatrix){\n\t\ttempMatrix.concat(tMatix);\n\t\ttempMatrix.copyTo(tMatix);\n\t}\n\n\t__proto._getPiePoints=function(x,y,radius,startAngle,endAngle){\n\t\tvar rst=GraphicsBounds._tempPoints;\n\t\tGraphicsBounds._tempPoints.length=0;\n\t\trst.push(x,y);\n\t\tvar delta=(endAngle-startAngle)% (2 *Math.PI);\n\t\tvar segnum=10;\n\t\tvar step=delta / segnum;\n\t\tvar i=NaN;\n\t\tvar angle=startAngle;\n\t\tfor (i=0;i <=segnum;i++){\n\t\t\trst.push(x+radius *Math.cos(angle),y+radius *Math.sin(angle));\n\t\t\tangle+=step;\n\t\t}\n\t\treturn rst;\n\t}\n\n\t__proto._getPathPoints=function(paths){\n\t\tvar i=0,len=0;\n\t\tvar rst=GraphicsBounds._tempPoints;\n\t\trst.length=0;\n\t\tlen=paths.length;\n\t\tvar tCMD;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttCMD=paths[i];\n\t\t\tif (tCMD.length > 1){\n\t\t\t\trst.push(tCMD[1],tCMD[2]);\n\t\t\t\tif (tCMD.length > 3){\n\t\t\t\t\trst.push(tCMD[3],tCMD[4]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tGraphicsBounds._addPointArrToRst=function(rst,points,matrix,dx,dy){\n\t\t(dx===void 0)&& (dx=0);\n\t\t(dy===void 0)&& (dy=0);\n\t\tvar i=0,len=0;\n\t\tlen=points.length;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\tGraphicsBounds._addPointToRst(rst,points[i]+dx,points[i+1]+dy,matrix);\n\t\t}\n\t}\n\n\tGraphicsBounds._addPointToRst=function(rst,x,y,matrix){\n\t\tvar _tempPoint=Point.TEMP;\n\t\t_tempPoint.setTo(x ? x :0,y ? y :0);\n\t\tmatrix.transformPoint(_tempPoint);\n\t\trst.push(_tempPoint.x,_tempPoint.y);\n\t}\n\n\tGraphicsBounds._tempPoints=[];\n\tGraphicsBounds._tempMatrixArrays=[];\n\tGraphicsBounds._tempCmds=[];\n\t__static(GraphicsBounds,\n\t['_tempMatrix',function(){return this._tempMatrix=new Matrix();},'_initMatrix',function(){return this._initMatrix=new Matrix();}\n\t]);\n\treturn GraphicsBounds;\n})()\n\n\n/**\n*<code>Event</code> 是事件类型的集合。一般当发生事件时，<code>Event</code> 对象将作为参数传递给事件侦听器。\n*/\n//class laya.events.Event\nvar Event=(function(){\n\tfunction Event(){\n\t\t/**事件类型。*/\n\t\t//this.type=null;\n\t\t/**原生浏览器事件。*/\n\t\t//this.nativeEvent=null;\n\t\t/**事件目标触发对象。*/\n\t\t//this.target=null;\n\t\t/**事件当前冒泡对象。*/\n\t\t//this.currentTarget=null;\n\t\t/**@private */\n\t\t//this._stoped=false;\n\t\t/**分配给触摸点的唯一标识号（作为 int）。*/\n\t\t//this.touchId=0;\n\t\t/**键盘值*/\n\t\t//this.keyCode=0;\n\t\t/**滚轮滑动增量*/\n\t\t//this.delta=0;\n\t}\n\n\t__class(Event,'laya.events.Event');\n\tvar __proto=Event.prototype;\n\t/**\n\t*设置事件数据。\n\t*@param type 事件类型。\n\t*@param currentTarget 事件目标触发对象。\n\t*@param target 事件当前冒泡对象。\n\t*@return 返回当前 Event 对象。\n\t*/\n\t__proto.setTo=function(type,currentTarget,target){\n\t\tthis.type=type;\n\t\tthis.currentTarget=currentTarget;\n\t\tthis.target=target;\n\t\treturn this;\n\t}\n\n\t/**\n\t*阻止对事件流中当前节点的后续节点中的所有事件侦听器进行处理。此方法不会影响当前节点 (currentTarget)中的任何事件侦听器。\n\t*/\n\t__proto.stopPropagation=function(){\n\t\tthis._stoped=true;\n\t}\n\n\t/**鼠标在 Stage 上的 Y 轴坐标*/\n\t__getset(0,__proto,'stageY',function(){\n\t\treturn Laya.stage.mouseY;\n\t});\n\n\t/**\n\t*包含按下或释放的键的字符代码值。字符代码值为英文键盘值。\n\t*/\n\t__getset(0,__proto,'charCode',function(){\n\t\treturn this.nativeEvent.charCode;\n\t});\n\n\t/**\n\t*触摸点列表。\n\t*/\n\t__getset(0,__proto,'touches',function(){\n\t\tvar arr=this.nativeEvent.touches;\n\t\tif (arr){\n\t\t\tvar stage=Laya.stage;\n\t\t\tfor (var i=0,n=arr.length;i < n;i++){\n\t\t\t\tvar e=arr[i];\n\t\t\t\tvar point=Point.TEMP;\n\t\t\t\tpoint.setTo(e.clientX,e.clientY);\n\t\t\t\tstage._canvasTransform.invertTransformPoint(point);\n\t\t\t\tstage.transform.invertTransformPoint(point);\n\t\t\t\te.stageX=point.x;\n\t\t\t\te.stageY=point.y;\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t});\n\n\t/**\n\t*表示键在键盘上的位置。这对于区分在键盘上多次出现的键非常有用。<br>\n\t*例如，您可以根据此属性的值来区分左 Shift 键和右 Shift 键：左 Shift 键的值为 KeyLocation.LEFT，右 Shift 键的值为 KeyLocation.RIGHT。另一个示例是区分标准键盘 (KeyLocation.STANDARD)与数字键盘 (KeyLocation.NUM_PAD)上按下的数字键。\n\t*/\n\t__getset(0,__proto,'keyLocation',function(){\n\t\treturn this.nativeEvent.keyLocation;\n\t});\n\n\t/**\n\t*表示 Ctrl 键是处于活动状态 (true)还是非活动状态 (false)。\n\t*/\n\t__getset(0,__proto,'ctrlKey',function(){\n\t\treturn this.nativeEvent.ctrlKey;\n\t});\n\n\t/**\n\t*表示 Alt 键是处于活动状态 (true)还是非活动状态 (false)。\n\t*/\n\t__getset(0,__proto,'altKey',function(){\n\t\treturn this.nativeEvent.altKey;\n\t});\n\n\t/**\n\t*表示 Shift 键是处于活动状态 (true)还是非活动状态 (false)。\n\t*/\n\t__getset(0,__proto,'shiftKey',function(){\n\t\treturn this.nativeEvent.shiftKey;\n\t});\n\n\t/**鼠标在 Stage 上的 X 轴坐标*/\n\t__getset(0,__proto,'stageX',function(){\n\t\treturn Laya.stage.mouseX;\n\t});\n\n\tEvent.EMPTY=new Event();\n\tEvent.MOUSE_DOWN=\"mousedown\";\n\tEvent.MOUSE_UP=\"mouseup\";\n\tEvent.CLICK=\"click\";\n\tEvent.RIGHT_MOUSE_DOWN=\"rightmousedown\";\n\tEvent.RIGHT_MOUSE_UP=\"rightmouseup\";\n\tEvent.RIGHT_CLICK=\"rightclick\";\n\tEvent.MOUSE_MOVE=\"mousemove\";\n\tEvent.MOUSE_OVER=\"mouseover\";\n\tEvent.MOUSE_OUT=\"mouseout\";\n\tEvent.MOUSE_WHEEL=\"mousewheel\";\n\tEvent.ROLL_OVER=\"mouseover\";\n\tEvent.ROLL_OUT=\"mouseout\";\n\tEvent.DOUBLE_CLICK=\"doubleclick\";\n\tEvent.CHANGE=\"change\";\n\tEvent.CHANGED=\"changed\";\n\tEvent.RESIZE=\"resize\";\n\tEvent.ADDED=\"added\";\n\tEvent.REMOVED=\"removed\";\n\tEvent.DISPLAY=\"display\";\n\tEvent.UNDISPLAY=\"undisplay\";\n\tEvent.ERROR=\"error\";\n\tEvent.COMPLETE=\"complete\";\n\tEvent.LOADED=\"loaded\";\n\tEvent.PROGRESS=\"progress\";\n\tEvent.INPUT=\"input\";\n\tEvent.RENDER=\"render\";\n\tEvent.OPEN=\"open\";\n\tEvent.MESSAGE=\"message\";\n\tEvent.CLOSE=\"close\";\n\tEvent.KEY_DOWN=\"keydown\";\n\tEvent.KEY_PRESS=\"keypress\";\n\tEvent.KEY_UP=\"keyup\";\n\tEvent.FRAME=\"enterframe\";\n\tEvent.DRAG_START=\"dragstart\";\n\tEvent.DRAG_MOVE=\"dragmove\";\n\tEvent.DRAG_END=\"dragend\";\n\tEvent.ENTER=\"enter\";\n\tEvent.SELECT=\"select\";\n\tEvent.BLUR=\"blur\";\n\tEvent.FOCUS=\"focus\";\n\tEvent.VISIBILITY_CHANGE=\"visibilitychange\";\n\tEvent.FOCUS_CHANGE=\"focuschange\";\n\tEvent.PLAYED=\"played\";\n\tEvent.PAUSED=\"paused\";\n\tEvent.STOPPED=\"stopped\";\n\tEvent.START=\"start\";\n\tEvent.END=\"end\";\n\tEvent.ENABLE_CHANGED=\"enablechanged\";\n\tEvent.ACTIVE_IN_HIERARCHY_CHANGED=\"activeinhierarchychanged\";\n\tEvent.COMPONENT_ADDED=\"componentadded\";\n\tEvent.COMPONENT_REMOVED=\"componentremoved\";\n\tEvent.LAYER_CHANGED=\"layerchanged\";\n\tEvent.HIERARCHY_LOADED=\"hierarchyloaded\";\n\tEvent.RECOVERED=\"recovered\";\n\tEvent.RELEASED=\"released\";\n\tEvent.LINK=\"link\";\n\tEvent.LABEL=\"label\";\n\tEvent.FULL_SCREEN_CHANGE=\"fullscreenchange\";\n\tEvent.DEVICE_LOST=\"devicelost\";\n\tEvent.MESH_CHANGED=\"meshchanged\";\n\tEvent.MATERIAL_CHANGED=\"materialchanged\";\n\tEvent.WORLDMATRIX_NEEDCHANGE=\"worldmatrixneedchanged\";\n\tEvent.ANIMATION_CHANGED=\"animationchanged\";\n\tEvent.TRIGGER_ENTER=\"triggerenter\";\n\tEvent.TRIGGER_STAY=\"triggerstay\";\n\tEvent.TRIGGER_EXIT=\"triggerexit\";\n\tEvent.TRAIL_FILTER_CHANGE=\"trailfilterchange\";\n\tEvent.DOMINO_FILTER_CHANGE=\"dominofilterchange\";\n\treturn Event;\n})()\n\n\n/**\n*<code>Keyboard</code> 类的属性是一些常数，这些常数表示控制游戏时最常用的键。\n*/\n//class laya.events.Keyboard\nvar Keyboard=(function(){\n\tfunction Keyboard(){}\n\t__class(Keyboard,'laya.events.Keyboard');\n\tKeyboard.NUMBER_0=48;\n\tKeyboard.NUMBER_1=49;\n\tKeyboard.NUMBER_2=50;\n\tKeyboard.NUMBER_3=51;\n\tKeyboard.NUMBER_4=52;\n\tKeyboard.NUMBER_5=53;\n\tKeyboard.NUMBER_6=54;\n\tKeyboard.NUMBER_7=55;\n\tKeyboard.NUMBER_8=56;\n\tKeyboard.NUMBER_9=57;\n\tKeyboard.A=65;\n\tKeyboard.B=66;\n\tKeyboard.C=67;\n\tKeyboard.D=68;\n\tKeyboard.E=69;\n\tKeyboard.F=70;\n\tKeyboard.G=71;\n\tKeyboard.H=72;\n\tKeyboard.I=73;\n\tKeyboard.J=74;\n\tKeyboard.K=75;\n\tKeyboard.L=76;\n\tKeyboard.M=77;\n\tKeyboard.N=78;\n\tKeyboard.O=79;\n\tKeyboard.P=80;\n\tKeyboard.Q=81;\n\tKeyboard.R=82;\n\tKeyboard.S=83;\n\tKeyboard.T=84;\n\tKeyboard.U=85;\n\tKeyboard.V=86;\n\tKeyboard.W=87;\n\tKeyboard.X=88;\n\tKeyboard.Y=89;\n\tKeyboard.Z=90;\n\tKeyboard.F1=112;\n\tKeyboard.F2=113;\n\tKeyboard.F3=114;\n\tKeyboard.F4=115;\n\tKeyboard.F5=116;\n\tKeyboard.F6=117;\n\tKeyboard.F7=118;\n\tKeyboard.F8=119;\n\tKeyboard.F9=120;\n\tKeyboard.F10=121;\n\tKeyboard.F11=122;\n\tKeyboard.F12=123;\n\tKeyboard.F13=124;\n\tKeyboard.F14=125;\n\tKeyboard.F15=126;\n\tKeyboard.NUMPAD=21;\n\tKeyboard.NUMPAD_0=96;\n\tKeyboard.NUMPAD_1=97;\n\tKeyboard.NUMPAD_2=98;\n\tKeyboard.NUMPAD_3=99;\n\tKeyboard.NUMPAD_4=100;\n\tKeyboard.NUMPAD_5=101;\n\tKeyboard.NUMPAD_6=102;\n\tKeyboard.NUMPAD_7=103;\n\tKeyboard.NUMPAD_8=104;\n\tKeyboard.NUMPAD_9=105;\n\tKeyboard.NUMPAD_ADD=107;\n\tKeyboard.NUMPAD_DECIMAL=110;\n\tKeyboard.NUMPAD_DIVIDE=111;\n\tKeyboard.NUMPAD_ENTER=108;\n\tKeyboard.NUMPAD_MULTIPLY=106;\n\tKeyboard.NUMPAD_SUBTRACT=109;\n\tKeyboard.SEMICOLON=186;\n\tKeyboard.EQUAL=187;\n\tKeyboard.COMMA=188;\n\tKeyboard.MINUS=189;\n\tKeyboard.PERIOD=190;\n\tKeyboard.SLASH=191;\n\tKeyboard.BACKQUOTE=192;\n\tKeyboard.LEFTBRACKET=219;\n\tKeyboard.BACKSLASH=220;\n\tKeyboard.RIGHTBRACKET=221;\n\tKeyboard.QUOTE=222;\n\tKeyboard.ALTERNATE=18;\n\tKeyboard.BACKSPACE=8;\n\tKeyboard.CAPS_LOCK=20;\n\tKeyboard.COMMAND=15;\n\tKeyboard.CONTROL=17;\n\tKeyboard.DELETE=46;\n\tKeyboard.ENTER=13;\n\tKeyboard.ESCAPE=27;\n\tKeyboard.PAGE_UP=33;\n\tKeyboard.PAGE_DOWN=34;\n\tKeyboard.END=35;\n\tKeyboard.HOME=36;\n\tKeyboard.LEFT=37;\n\tKeyboard.UP=38;\n\tKeyboard.RIGHT=39;\n\tKeyboard.DOWN=40;\n\tKeyboard.SHIFT=16;\n\tKeyboard.SPACE=32;\n\tKeyboard.TAB=9;\n\tKeyboard.INSERT=45;\n\treturn Keyboard;\n})()\n\n\n/**\n*<p><code>KeyBoardManager</code> 是键盘事件管理类。该类从浏览器中接收键盘事件，并派发该事件。</p>\n*<p>派发事件时若 Stage.focus 为空则只从 Stage 上派发该事件，否则将从 Stage.focus 对象开始一直冒泡派发该事件。所以在 Laya.stage 上监听键盘事件一定能够收到，如果在其他地方监听，则必须处在Stage.focus的冒泡链上才能收到该事件。</p>\n*<p>用户可以通过代码 Laya.stage.focus=someNode 的方式来设置focus对象。</p>\n*<p>用户可统一的根据事件对象中 e.keyCode 来判断按键类型，该属性兼容了不同浏览器的实现。</p>\n*/\n//class laya.events.KeyBoardManager\nvar KeyBoardManager=(function(){\n\tfunction KeyBoardManager(){}\n\t__class(KeyBoardManager,'laya.events.KeyBoardManager');\n\tKeyBoardManager.__init__=function(){\n\t\tKeyBoardManager._addEvent(\"keydown\");\n\t\tKeyBoardManager._addEvent(\"keypress\");\n\t\tKeyBoardManager._addEvent(\"keyup\");\n\t}\n\n\tKeyBoardManager._addEvent=function(type){\n\t\tBrowser.document.addEventListener(type,function(e){\n\t\t\tlaya.events.KeyBoardManager._dispatch(e,type);\n\t\t},true);\n\t}\n\n\tKeyBoardManager._dispatch=function(e,type){\n\t\tif (!KeyBoardManager.enabled)return;\n\t\tKeyBoardManager._event._stoped=false;\n\t\tKeyBoardManager._event.nativeEvent=e;\n\t\tKeyBoardManager._event.keyCode=e.keyCode || e.which || e.charCode;\n\t\tif (type===\"keydown\")KeyBoardManager._pressKeys[KeyBoardManager._event.keyCode]=true;\n\t\telse if (type===\"keyup\")KeyBoardManager._pressKeys[KeyBoardManager._event.keyCode]=null;\n\t\tvar target=(Laya.stage.focus && (Laya.stage.focus.event !=null)&& Laya.stage.focus.displayedInStage)? Laya.stage.focus :Laya.stage;\n\t\tvar ct=target;\n\t\twhile (ct){\n\t\t\tct.event(type,KeyBoardManager._event.setTo(type,ct,target));\n\t\t\tct=ct.parent;\n\t\t}\n\t}\n\n\tKeyBoardManager.hasKeyDown=function(key){\n\t\treturn KeyBoardManager._pressKeys[key];\n\t}\n\n\tKeyBoardManager._pressKeys={};\n\tKeyBoardManager.enabled=true;\n\t__static(KeyBoardManager,\n\t['_event',function(){return this._event=new Event();}\n\t]);\n\treturn KeyBoardManager;\n})()\n\n\n/**\n*<p><code>KeyLocation</code> 类包含表示在键盘或类似键盘的输入设备上按键位置的常量。</p>\n*<p><code>KeyLocation</code> 常数用在键盘事件对象的 <code>keyLocation </code>属性中。</p>\n*/\n//class laya.events.KeyLocation\nvar KeyLocation=(function(){\n\tfunction KeyLocation(){}\n\t__class(KeyLocation,'laya.events.KeyLocation');\n\tKeyLocation.STANDARD=0;\n\tKeyLocation.LEFT=1;\n\tKeyLocation.RIGHT=2;\n\tKeyLocation.NUM_PAD=3;\n\treturn KeyLocation;\n})()\n\n\n/**\n*<p><code>MouseManager</code> 是鼠标、触摸交互管理器。</p>\n*<p>鼠标事件流包括捕获阶段、目标阶段、冒泡阶段。<br/>\n*捕获阶段：此阶段引擎会从stage开始递归检测stage及其子对象，直到找到命中的目标对象或者未命中任何对象；<br/>\n*目标阶段：找到命中的目标对象；<br/>\n*冒泡阶段：事件离开目标对象，按节点层级向上逐层通知，直到到达舞台的过程。</p>\n*/\n//class laya.events.MouseManager\nvar MouseManager=(function(){\n\tfunction MouseManager(){\n\t\t/**canvas 上的鼠标X坐标。*/\n\t\tthis.mouseX=0;\n\t\t/**canvas 上的鼠标Y坐标。*/\n\t\tthis.mouseY=0;\n\t\t/**是否禁用除 stage 以外的鼠标事件检测。*/\n\t\tthis.disableMouseEvent=false;\n\t\t/**鼠标按下的时间。单位为毫秒。*/\n\t\tthis.mouseDownTime=0;\n\t\t/**鼠标移动精度。*/\n\t\tthis.mouseMoveAccuracy=2;\n\t\tthis._stage=null;\n\t\tthis._target=null;\n\t\tthis._lastMoveTimer=0;\n\t\tthis._isLeftMouse=false;\n\t\tthis._eventList=[];\n\t\tthis._touchIDs={};\n\t\tthis._id=1;\n\t\tthis._tTouchID=0;\n\t\tthis._event=new Event();\n\t\tthis._matrix=new Matrix();\n\t\tthis._point=new Point();\n\t\tthis._rect=new Rectangle();\n\t\tthis._prePoint=new Point();\n\t\tthis._curTouchID=NaN;\n\t}\n\n\t__class(MouseManager,'laya.events.MouseManager');\n\tvar __proto=MouseManager.prototype;\n\t/**\n\t*@private\n\t*初始化。\n\t*/\n\t__proto.__init__=function(stage,canvas){\n\t\tvar _$this=this;\n\t\tthis._stage=stage;\n\t\tvar _this=this;\n\t\tvar list=this._eventList;\n\t\tcanvas.oncontextmenu=function (e){\n\t\t\tif (MouseManager.enabled)return false;\n\t\t}\n\t\tcanvas.addEventListener('mousedown',function(e){\n\t\t\tif (MouseManager.enabled){\n\t\t\t\tif(!Browser.onIE)e.preventDefault();\n\t\t\t\tlist.push(e);\n\t\t\t\t_this.mouseDownTime=Browser.now();\n\t\t\t}\n\t\t});\n\t\tcanvas.addEventListener('mouseup',function(e){\n\t\t\tif (MouseManager.enabled){\n\t\t\t\te.preventDefault();\n\t\t\t\tlist.push(e);\n\t\t\t\t_this.mouseDownTime=-Browser.now();\n\t\t\t}\n\t\t},true);\n\t\tcanvas.addEventListener('mousemove',function(e){\n\t\t\tif (MouseManager.enabled){\n\t\t\t\te.preventDefault();\n\t\t\t\tvar now=Browser.now();\n\t\t\t\tif (now-_this._lastMoveTimer < 10)return;\n\t\t\t\t_this._lastMoveTimer=now;\n\t\t\t\tlist.push(e);\n\t\t\t}\n\t\t},true);\n\t\tcanvas.addEventListener(\"mouseout\",function(e){\n\t\t\tif (MouseManager.enabled)list.push(e);\n\t\t})\n\t\tcanvas.addEventListener(\"mouseover\",function(e){\n\t\t\tif (MouseManager.enabled)list.push(e);\n\t\t})\n\t\tcanvas.addEventListener(\"touchstart\",function(e){\n\t\t\tif (MouseManager.enabled){\n\t\t\t\tlist.push(e);\n\t\t\t\tif (!MouseManager._isFirstTouch&&!Input.isInputting)e.preventDefault();\n\t\t\t\t_this.mouseDownTime=Browser.now();\n\t\t\t}\n\t\t});\n\t\tcanvas.addEventListener(\"touchend\",function(e){\n\t\t\tif (MouseManager.enabled){\n\t\t\t\tif (!MouseManager._isFirstTouch&&!Input.isInputting)e.preventDefault();\n\t\t\t\tMouseManager._isFirstTouch=false;\n\t\t\t\tlist.push(e);\n\t\t\t\t_this.mouseDownTime=-Browser.now();\n\t\t\t\t}else {\n\t\t\t\t_$this._curTouchID=NaN;\n\t\t\t}\n\t\t},true);\n\t\tcanvas.addEventListener(\"touchmove\",function(e){\n\t\t\tif (MouseManager.enabled){\n\t\t\t\te.preventDefault();\n\t\t\t\tlist.push(e);\n\t\t\t}\n\t\t},true);\n\t\tcanvas.addEventListener(\"touchcancel\",function(e){\n\t\t\tif (MouseManager.enabled){\n\t\t\t\te.preventDefault();\n\t\t\t\tlist.push(e);\n\t\t\t\t}else {\n\t\t\t\t_$this._curTouchID=NaN;\n\t\t\t}\n\t\t},true);\n\t\tcanvas.addEventListener('mousewheel',function(e){\n\t\t\tif (MouseManager.enabled)list.push(e);\n\t\t});\n\t\tcanvas.addEventListener('DOMMouseScroll',function(e){\n\t\t\tif (MouseManager.enabled)list.push(e);\n\t\t});\n\t}\n\n\t__proto.initEvent=function(e,nativeEvent){\n\t\tvar _this=this;\n\t\t_this._event._stoped=false;\n\t\t_this._event.nativeEvent=nativeEvent || e;\n\t\t_this._target=null;\n\t\tthis._point.setTo(e.pageX || e.clientX,e.pageY || e.clientY);\n\t\tthis._stage._canvasTransform.invertTransformPoint(this._point);\n\t\t_this.mouseX=this._point.x;\n\t\t_this.mouseY=this._point.y;\n\t\t_this._event.touchId=e.identifier || 0;\n\t\tthis._tTouchID=_this._event.touchId;\n\t\tvar evt;\n\t\tevt=TouchManager.I._event;\n\t\tevt._stoped=false;\n\t\tevt.nativeEvent=_this._event.nativeEvent;\n\t\tevt.touchId=_this._event.touchId;\n\t}\n\n\t__proto.checkMouseWheel=function(e){\n\t\tthis._event.delta=e.wheelDelta ? e.wheelDelta *0.025 :-e.detail;\n\t\tvar _lastOvers=TouchManager.I.getLastOvers();\n\t\tfor (var i=0,n=_lastOvers.length;i < n;i++){\n\t\t\tvar ele=_lastOvers[i];\n\t\t\tele.event(/*laya.events.Event.MOUSE_WHEEL*/\"mousewheel\",this._event.setTo(/*laya.events.Event.MOUSE_WHEEL*/\"mousewheel\",ele,this._target));\n\t\t}\n\t}\n\n\t// _stage.event(Event.MOUSE_WHEEL,_event.setTo(Event.MOUSE_WHEEL,_stage,_target));\n\t__proto.onMouseMove=function(ele){\n\t\tTouchManager.I.onMouseMove(ele,this._tTouchID);\n\t}\n\n\t__proto.onMouseDown=function(ele){\n\t\tif (Input.isInputting && Laya.stage.focus && Laya.stage.focus[\"focus\"] && !Laya.stage.focus.contains(this._target)){\n\t\t\tvar pre_input=Laya.stage.focus['_tf'] || Laya.stage.focus;\n\t\t\tvar new_input=ele['_tf'] || ele;\n\t\t\tif ((new_input instanceof laya.display.Input )&& new_input.multiline==pre_input.multiline)\n\t\t\t\tpre_input['_focusOut']();\n\t\t\telse\n\t\t\tpre_input.focus=false;\n\t\t}\n\t\tTouchManager.I.onMouseDown(ele,this._tTouchID,this._isLeftMouse);\n\t}\n\n\t__proto.onMouseUp=function(ele){\n\t\tTouchManager.I.onMouseUp(ele,this._tTouchID,this._isLeftMouse);\n\t}\n\n\t__proto.check=function(sp,mouseX,mouseY,callBack){\n\t\tthis._point.setTo(mouseX,mouseY);\n\t\tsp.fromParentPoint(this._point);\n\t\tmouseX=this._point.x;\n\t\tmouseY=this._point.y;\n\t\tvar scrollRect=sp.scrollRect;\n\t\tif (scrollRect){\n\t\t\tthis._rect.setTo(scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);\n\t\t\tif (!this._rect.contains(mouseX,mouseY))return false;\n\t\t}\n\t\tif (!this.disableMouseEvent){\n\t\t\tif (sp.hitTestPrior && !sp.mouseThrough && !this.hitTest(sp,mouseX,mouseY)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (var i=sp._childs.length-1;i >-1;i--){\n\t\t\t\tvar child=sp._childs[i];\n\t\t\t\tif (!child.destroyed && child.mouseEnabled && child.visible){\n\t\t\t\t\tif (this.check(child,mouseX,mouseY,callBack))return true;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar isHit=(sp.hitTestPrior && !sp.mouseThrough && !this.disableMouseEvent)? true :this.hitTest(sp,mouseX,mouseY);\n\t\tif (isHit){\n\t\t\tthis._target=sp;\n\t\t\tcallBack.call(this,sp);\n\t\t\t}else if (callBack===this.onMouseUp && sp===this._stage){\n\t\t\tthis._target=this._stage;\n\t\t\tcallBack.call(this,this._target);\n\t\t}\n\t\treturn isHit;\n\t}\n\n\t__proto.hitTest=function(sp,mouseX,mouseY){\n\t\tvar isHit=false;\n\t\tif (sp.scrollRect){\n\t\t\tmouseX-=sp.scrollRect.x;\n\t\t\tmouseY-=sp.scrollRect.y;\n\t\t}\n\t\tif ((sp.hitArea instanceof laya.utils.HitArea )){\n\t\t\treturn sp.hitArea.isHit(mouseX,mouseY);\n\t\t}\n\t\tif (sp.width > 0 && sp.height > 0 || sp.mouseThrough || sp.hitArea){\n\t\t\tif (!sp.mouseThrough){\n\t\t\t\tvar hitRect=this._rect;\n\t\t\t\tif (sp.hitArea)hitRect=sp.hitArea;\n\t\t\t\telse hitRect.setTo(0,0,sp.width,sp.height);\n\t\t\t\tisHit=hitRect.contains(mouseX,mouseY);\n\t\t\t\t}else {\n\t\t\t\tisHit=sp.getGraphicBounds().contains(mouseX,mouseY);\n\t\t\t}\n\t\t}\n\t\treturn isHit;\n\t}\n\n\t/**\n\t*执行事件处理。\n\t*/\n\t__proto.runEvent=function(){\n\t\tvar len=this._eventList.length;\n\t\tif (!len)return;\n\t\tvar _this=this;\n\t\tvar i=0,j=0,n=0,touch;\n\t\twhile (i < len){\n\t\t\tvar evt=this._eventList[i];\n\t\t\tif (evt.type!=='mousemove')this._prePoint.x=this._prePoint.y=-1000000;\n\t\t\tswitch (evt.type){\n\t\t\t\tcase 'mousedown':\n\t\t\t\t\tthis._touchIDs[0]=this._id++;\n\t\t\t\t\tif (!MouseManager._isTouchRespond){\n\t\t\t\t\t\t_this._isLeftMouse=evt.button===0;\n\t\t\t\t\t\t_this.initEvent(evt);\n\t\t\t\t\t\t_this.check(_this._stage,_this.mouseX,_this.mouseY,_this.onMouseDown);\n\t\t\t\t\t}else\n\t\t\t\t\tMouseManager._isTouchRespond=false;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 'mouseup':\n\t\t\t\t\t_this._isLeftMouse=evt.button===0;\n\t\t\t\t\t_this.initEvent(evt);\n\t\t\t\t\t_this.check(_this._stage,_this.mouseX,_this.mouseY,_this.onMouseUp);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 'mousemove':\n\t\t\t\t\tif ((Math.abs(this._prePoint.x-evt.clientX)+Math.abs(this._prePoint.y-evt.clientY))>=this.mouseMoveAccuracy){\n\t\t\t\t\t\tthis._prePoint.x=evt.clientX;\n\t\t\t\t\t\tthis._prePoint.y=evt.clientY;\n\t\t\t\t\t\t_this.initEvent(evt);\n\t\t\t\t\t\t_this.check(_this._stage,_this.mouseX,_this.mouseY,_this.onMouseMove);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"touchstart\":\n\t\t\t\t\tMouseManager._isTouchRespond=true;\n\t\t\t\t\t_this._isLeftMouse=true;\n\t\t\t\t\tvar touches=evt.changedTouches;\n\t\t\t\t\tfor (j=0,n=touches.length;j < n;j++){\n\t\t\t\t\t\ttouch=touches[j];\n\t\t\t\t\t\tif (MouseManager.multiTouchEnabled || isNaN(this._curTouchID)){\n\t\t\t\t\t\t\tthis._curTouchID=touch.identifier;\n\t\t\t\t\t\t\tif (this._id % 200===0)this._touchIDs={};\n\t\t\t\t\t\t\tthis._touchIDs[touch.identifier]=this._id++;\n\t\t\t\t\t\t\t_this.initEvent(touch,evt);\n\t\t\t\t\t\t\t_this.check(_this._stage,_this.mouseX,_this.mouseY,_this.onMouseDown);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"touchend\":\n\t\t\t\tcase \"touchcancel\":\n\t\t\t\t\tMouseManager._isTouchRespond=true;\n\t\t\t\t\t_this._isLeftMouse=true;\n\t\t\t\t\tvar touchends=evt.changedTouches;\n\t\t\t\t\tfor (j=0,n=touchends.length;j < n;j++){\n\t\t\t\t\t\ttouch=touchends[j];\n\t\t\t\t\t\tif (MouseManager.multiTouchEnabled || touch.identifier==this._curTouchID){\n\t\t\t\t\t\t\tthis._curTouchID=NaN;\n\t\t\t\t\t\t\t_this.initEvent(touch,evt);\n\t\t\t\t\t\t\tvar isChecked=false;\n\t\t\t\t\t\t\tisChecked=_this.check(_this._stage,_this.mouseX,_this.mouseY,_this.onMouseUp);\n\t\t\t\t\t\t\tif (!isChecked){\n\t\t\t\t\t\t\t\t_this.onMouseUp(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"touchmove\":;\n\t\t\t\t\tvar touchemoves=evt.changedTouches;\n\t\t\t\t\tfor (j=0,n=touchemoves.length;j < n;j++){\n\t\t\t\t\t\ttouch=touchemoves[j];\n\t\t\t\t\t\tif (MouseManager.multiTouchEnabled || touch.identifier==this._curTouchID){\n\t\t\t\t\t\t\t_this.initEvent(touch,evt);\n\t\t\t\t\t\t\t_this.check(_this._stage,_this.mouseX,_this.mouseY,_this.onMouseMove);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"wheel\":\n\t\t\t\tcase \"mousewheel\":\n\t\t\t\tcase \"DOMMouseScroll\":\n\t\t\t\t\t_this.checkMouseWheel(evt);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"mouseout\":\n\t\t\t\t\tTouchManager.I.stageMouseOut();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"mouseover\":\n\t\t\t\t\t_this._stage.event(/*laya.events.Event.MOUSE_OVER*/\"mouseover\",_this._event.setTo(/*laya.events.Event.MOUSE_OVER*/\"mouseover\",_this._stage,_this._stage));\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tthis._eventList.length=0;\n\t}\n\n\tMouseManager.enabled=true;\n\tMouseManager.multiTouchEnabled=true;\n\tMouseManager._isTouchRespond=false;\n\tMouseManager._isFirstTouch=true;\n\t__static(MouseManager,\n\t['instance',function(){return this.instance=new MouseManager();}\n\t]);\n\treturn MouseManager;\n})()\n\n\n/**\n*@private\n*Touch事件管理类，处理多点触控下的鼠标事件\n*/\n//class laya.events.TouchManager\nvar TouchManager=(function(){\n\tfunction TouchManager(){\n\t\t/**\n\t\t*当前over的touch表\n\t\t*/\n\t\tthis.preOvers=[];\n\t\t/**\n\t\t*当前down的touch表\n\t\t*/\n\t\tthis.preDowns=[];\n\t\tthis.preRightDowns=[];\n\t\t/**\n\t\t*是否启用\n\t\t*/\n\t\tthis.enable=true;\n\t\tthis._lastClickTime=0;\n\t\tthis._event=new Event();\n\t}\n\n\t__class(TouchManager,'laya.events.TouchManager');\n\tvar __proto=TouchManager.prototype;\n\t__proto._clearTempArrs=function(){\n\t\tTouchManager._oldArr.length=0;\n\t\tTouchManager._newArr.length=0;\n\t\tTouchManager._tEleArr.length=0;\n\t}\n\n\t/**\n\t*从touch表里查找对应touchID的数据\n\t*@param touchID touch ID\n\t*@param arr touch表\n\t*@return\n\t*\n\t*/\n\t__proto.getTouchFromArr=function(touchID,arr){\n\t\tvar i=0,len=0;\n\t\tlen=arr.length;\n\t\tvar tTouchO;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttTouchO=arr[i];\n\t\t\tif (tTouchO.id==touchID){\n\t\t\t\treturn tTouchO;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*从touch表里移除一个元素\n\t*@param touchID touch ID\n\t*@param arr touch表\n\t*\n\t*/\n\t__proto.removeTouchFromArr=function(touchID,arr){\n\t\tvar i=0;\n\t\tfor (i=arr.length-1;i >=0;i--){\n\t\t\tif (arr[i].id==touchID){\n\t\t\t\tarr.splice(i,1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*创建一个touch数据\n\t*@param ele 当前的根节点\n\t*@param touchID touchID\n\t*@return\n\t*\n\t*/\n\t__proto.createTouchO=function(ele,touchID){\n\t\tvar rst;\n\t\trst=Pool.getItem(\"TouchData\")|| {};\n\t\trst.id=touchID;\n\t\trst.tar=ele;\n\t\treturn rst;\n\t}\n\n\t/**\n\t*处理touchStart\n\t*@param ele 根节点\n\t*@param touchID touchID\n\t*@param isLeft （可选）是否为左键\n\t*/\n\t__proto.onMouseDown=function(ele,touchID,isLeft){\n\t\t(isLeft===void 0)&& (isLeft=false);\n\t\tif (!this.enable)\n\t\t\treturn;\n\t\tvar preO;\n\t\tvar tO;\n\t\tvar arrs;\n\t\tpreO=this.getTouchFromArr(touchID,this.preOvers);\n\t\tarrs=this.getEles(ele,null,TouchManager._tEleArr);\n\t\tif (!preO){\n\t\t\ttO=this.createTouchO(ele,touchID);\n\t\t\tthis.preOvers.push(tO);\n\t\t\t}else {\n\t\t\tpreO.tar=ele;\n\t\t}\n\t\tif (Browser.onMobile)\n\t\t\tthis.sendEvents(arrs,/*laya.events.Event.MOUSE_OVER*/\"mouseover\");\n\t\tvar preDowns;\n\t\tpreDowns=isLeft ? this.preDowns :this.preRightDowns;\n\t\tpreO=this.getTouchFromArr(touchID,preDowns);\n\t\tif (!preO){\n\t\t\ttO=this.createTouchO(ele,touchID);\n\t\t\tpreDowns.push(tO);\n\t\t\t}else {\n\t\t\tpreO.tar=ele;\n\t\t}\n\t\tthis.sendEvents(arrs,isLeft ? /*laya.events.Event.MOUSE_DOWN*/\"mousedown\" :/*laya.events.Event.RIGHT_MOUSE_DOWN*/\"rightmousedown\");\n\t\tthis._clearTempArrs();\n\t}\n\n\t/**\n\t*派发事件。\n\t*@param eles 对象列表。\n\t*@param type 事件类型。\n\t*/\n\t__proto.sendEvents=function(eles,type){\n\t\tvar i=0,len=0;\n\t\tlen=eles.length;\n\t\tthis._event._stoped=false;\n\t\tvar _target;\n\t\t_target=eles[0];\n\t\tvar tE;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttE=eles[i];\n\t\t\tif (tE.destroyed)return;\n\t\t\ttE.event(type,this._event.setTo(type,tE,_target));\n\t\t\tif (this._event._stoped)\n\t\t\t\tbreak ;\n\t\t}\n\t}\n\n\t/**\n\t*获取对象列表。\n\t*@param start 起始节点。\n\t*@param end 结束节点。\n\t*@param rst 返回值。如果此值不为空，则将其赋值为计算结果，从而避免创建新数组；如果此值为空，则创建新数组返回。\n\t*@return Array 返回节点列表。\n\t*/\n\t__proto.getEles=function(start,end,rst){\n\t\tif (!rst){\n\t\t\trst=[];\n\t\t\t}else {\n\t\t\trst.length=0;\n\t\t}\n\t\twhile (start && start !=end){\n\t\t\trst.push(start);\n\t\t\tstart=start.parent;\n\t\t}\n\t\treturn rst;\n\t}\n\n\t/**\n\t*touchMove时处理out事件和over时间。\n\t*@param eleNew 新的根节点。\n\t*@param elePre 旧的根节点。\n\t*@param touchID （可选）touchID，默认为0。\n\t*/\n\t__proto.checkMouseOutAndOverOfMove=function(eleNew,elePre,touchID){\n\t\t(touchID===void 0)&& (touchID=0);\n\t\tif (elePre==eleNew)\n\t\t\treturn;\n\t\tvar tar;\n\t\tvar arrs;\n\t\tvar i=0,len=0;\n\t\tif (elePre.contains(eleNew)){\n\t\t\tarrs=this.getEles(eleNew,elePre,TouchManager._tEleArr);\n\t\t\tthis.sendEvents(arrs,/*laya.events.Event.MOUSE_OVER*/\"mouseover\");\n\t\t\t}else if (eleNew.contains(elePre)){\n\t\t\tarrs=this.getEles(elePre,eleNew,TouchManager._tEleArr);\n\t\t\tthis.sendEvents(arrs,/*laya.events.Event.MOUSE_OUT*/\"mouseout\");\n\t\t\t}else {\n\t\t\tarrs=TouchManager._tEleArr;\n\t\t\tarrs.length=0;\n\t\t\tvar oldArr;\n\t\t\toldArr=this.getEles(elePre,null,TouchManager._oldArr);\n\t\t\tvar newArr;\n\t\t\tnewArr=this.getEles(eleNew,null,TouchManager._newArr);\n\t\t\tlen=oldArr.length;\n\t\t\tvar tIndex=0;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\ttar=oldArr[i];\n\t\t\t\ttIndex=newArr.indexOf(tar);\n\t\t\t\tif (tIndex >=0){\n\t\t\t\t\tnewArr.splice(tIndex,newArr.length-tIndex);\n\t\t\t\t\tbreak ;\n\t\t\t\t\t}else {\n\t\t\t\t\tarrs.push(tar);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (arrs.length > 0){\n\t\t\t\tthis.sendEvents(arrs,/*laya.events.Event.MOUSE_OUT*/\"mouseout\");\n\t\t\t}\n\t\t\tif (newArr.length > 0){\n\t\t\t\tthis.sendEvents(newArr,/*laya.events.Event.MOUSE_OVER*/\"mouseover\");\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*处理TouchMove事件\n\t*@param ele 根节点\n\t*@param touchID touchID\n\t*\n\t*/\n\t__proto.onMouseMove=function(ele,touchID){\n\t\tif (!this.enable)\n\t\t\treturn;\n\t\tvar preO;\n\t\tpreO=this.getTouchFromArr(touchID,this.preOvers);\n\t\tvar arrs;\n\t\tvar tO;\n\t\tif (!preO){\n\t\t\tarrs=this.getEles(ele,null,TouchManager._tEleArr);\n\t\t\tthis.sendEvents(arrs,/*laya.events.Event.MOUSE_OVER*/\"mouseover\");\n\t\t\tthis.preOvers.push(this.createTouchO(ele,touchID));\n\t\t\t}else {\n\t\t\tthis.checkMouseOutAndOverOfMove(ele,preO.tar);\n\t\t\tpreO.tar=ele;\n\t\t\tarrs=this.getEles(ele,null,TouchManager._tEleArr);\n\t\t}\n\t\tthis.sendEvents(arrs,/*laya.events.Event.MOUSE_MOVE*/\"mousemove\");\n\t\tthis._clearTempArrs();\n\t}\n\n\t__proto.getLastOvers=function(){\n\t\tTouchManager._tEleArr.length=0;\n\t\tif (this.preOvers.length > 0 && this.preOvers[0].tar){\n\t\t\treturn this.getEles(this.preOvers[0].tar,null,TouchManager._tEleArr);\n\t\t}\n\t\tTouchManager._tEleArr.push(Laya.stage);\n\t\treturn TouchManager._tEleArr;\n\t}\n\n\t__proto.stageMouseOut=function(){\n\t\tvar lastOvers;\n\t\tlastOvers=this.getLastOvers();\n\t\tthis.preOvers.length=0;\n\t\tthis.sendEvents(lastOvers,/*laya.events.Event.MOUSE_OUT*/\"mouseout\");\n\t}\n\n\t/**\n\t*处理TouchEnd事件\n\t*@param ele 根节点\n\t*@param touchID touchID\n\t*@param isLeft 是否为左键\n\t*/\n\t__proto.onMouseUp=function(ele,touchID,isLeft){\n\t\t(isLeft===void 0)&& (isLeft=false);\n\t\tif (!this.enable)\n\t\t\treturn;\n\t\tvar preO;\n\t\tvar tO;\n\t\tvar arrs;\n\t\tvar oldArr;\n\t\tvar i=0,len=0;\n\t\tvar tar;\n\t\tvar sendArr;\n\t\tvar onMobile=Browser.onMobile;\n\t\tarrs=this.getEles(ele,null,TouchManager._tEleArr);\n\t\tthis.sendEvents(arrs,isLeft ? /*laya.events.Event.MOUSE_UP*/\"mouseup\" :/*laya.events.Event.RIGHT_MOUSE_UP*/\"rightmouseup\");\n\t\tvar preDowns;\n\t\tpreDowns=isLeft ? this.preDowns :this.preRightDowns;\n\t\tpreO=this.getTouchFromArr(touchID,preDowns);\n\t\tif (!preO){\n\t\t\t}else {\n\t\t\tvar isDouble=false;\n\t\t\tvar now=Browser.now();\n\t\t\tisDouble=now-this._lastClickTime < 300;\n\t\t\tthis._lastClickTime=now;\n\t\t\tif (ele==preO.tar){\n\t\t\t\tsendArr=arrs;\n\t\t\t\t}else {\n\t\t\t\toldArr=this.getEles(preO.tar,null,TouchManager._oldArr);\n\t\t\t\tsendArr=TouchManager._newArr;\n\t\t\t\tsendArr.length=0;\n\t\t\t\tlen=oldArr.length;\n\t\t\t\tfor (i=0;i < len;i++){\n\t\t\t\t\ttar=oldArr[i];\n\t\t\t\t\tif (arrs.indexOf(tar)>=0){\n\t\t\t\t\t\tsendArr.push(tar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sendArr.length > 0){\n\t\t\t\tthis.sendEvents(sendArr,isLeft ? /*laya.events.Event.CLICK*/\"click\" :/*laya.events.Event.RIGHT_CLICK*/\"rightclick\");\n\t\t\t}\n\t\t\tif (isLeft && isDouble){\n\t\t\t\tthis.sendEvents(sendArr,/*laya.events.Event.DOUBLE_CLICK*/\"doubleclick\");\n\t\t\t}\n\t\t\tthis.removeTouchFromArr(touchID,preDowns);\n\t\t\tpreO.tar=null;\n\t\t\tPool.recover(\"TouchData\",preO);\n\t\t}\n\t\tpreO=this.getTouchFromArr(touchID,this.preOvers);\n\t\tif (!preO){\n\t\t\t}else {\n\t\t\tif (onMobile){\n\t\t\t\tsendArr=this.getEles(preO.tar,null,sendArr);\n\t\t\t\tif (sendArr && sendArr.length > 0){\n\t\t\t\t\tthis.sendEvents(sendArr,/*laya.events.Event.MOUSE_OUT*/\"mouseout\");\n\t\t\t\t}\n\t\t\t\tthis.removeTouchFromArr(touchID,this.preOvers);\n\t\t\t\tpreO.tar=null;\n\t\t\t\tPool.recover(\"TouchData\",preO);\n\t\t\t}\n\t\t}\n\t\tthis._clearTempArrs();\n\t}\n\n\tTouchManager._oldArr=[];\n\tTouchManager._newArr=[];\n\tTouchManager._tEleArr=[];\n\t__static(TouchManager,\n\t['I',function(){return this.I=new TouchManager();}\n\t]);\n\treturn TouchManager;\n})()\n\n\n/**\n*<code>Filter</code> 是滤镜基类。\n*/\n//class laya.filters.Filter\nvar Filter=(function(){\n\tfunction Filter(){\n\t\t/**@private */\n\t\tthis._action=null;\n\t}\n\n\t__class(Filter,'laya.filters.Filter');\n\tvar __proto=Filter.prototype;\n\tLaya.imps(__proto,{\"laya.filters.IFilter\":true})\n\t/**@private */\n\t__proto.callNative=function(sp){}\n\t/**@private 滤镜类型。*/\n\t__getset(0,__proto,'type',function(){return-1});\n\t/**@private 滤镜动作。*/\n\t__getset(0,__proto,'action',function(){return this._action });\n\tFilter.BLUR=0x10;\n\tFilter.COLOR=0x20;\n\tFilter.GLOW=0x08;\n\tFilter._filterStart=null;\n\tFilter._filterEnd=null;\n\tFilter._EndTarget=null;\n\tFilter._recycleScope=null;\n\tFilter._filter=null;\n\tFilter._useSrc=null;\n\tFilter._endSrc=null;\n\tFilter._useOut=null;\n\tFilter._endOut=null;\n\treturn Filter;\n})()\n\n\n/**\n*@private\n*<code>ColorFilterAction</code> 是一个颜色滤镜应用类。\n*/\n//class laya.filters.ColorFilterAction\nvar ColorFilterAction=(function(){\n\tfunction ColorFilterAction(){\n\t\tthis.data=null;\n\t}\n\n\t__class(ColorFilterAction,'laya.filters.ColorFilterAction');\n\tvar __proto=ColorFilterAction.prototype;\n\tLaya.imps(__proto,{\"laya.filters.IFilterAction\":true})\n\t/**\n\t*给指定的对象应用颜色滤镜。\n\t*@param srcCanvas 需要应用画布对象。\n\t*@return 应用了滤镜后的画布对象。\n\t*/\n\t__proto.apply=function(srcCanvas){\n\t\tvar ctx=srcCanvas.ctx.ctx;\n\t\tvar canvas=srcCanvas.ctx.ctx.canvas;\n\t\tif (canvas.width==0 || canvas.height==0)return canvas;\n\t\tvar imgdata=ctx.getImageData(0,0,canvas.width,canvas.height);\n\t\tvar data=imgdata.data;\n\t\tvar nData;\n\t\tfor (var i=0,n=data.length;i < n;i+=4){\n\t\t\tnData=this.getColor(data[i],data[i+1],data[i+2],data[i+3]);\n\t\t\tif (data[i+3]==0)continue ;\n\t\t\tdata[i]=nData[0];\n\t\t\tdata[i+1]=nData[1];\n\t\t\tdata[i+2]=nData[2];\n\t\t\tdata[i+3]=nData[3];\n\t\t}\n\t\tctx.putImageData(imgdata,0,0);\n\t\treturn srcCanvas;\n\t}\n\n\t__proto.getColor=function(red,green,blue,alpha){\n\t\tvar rst=[];\n\t\tif (this.data._mat && this.data._alpha){\n\t\t\tvar mat=this.data._mat;\n\t\t\tvar tempAlpha=this.data._alpha;\n\t\t\trst[0]=mat[0] *red+mat[1] *green+mat[2] *blue+mat[3] *alpha+tempAlpha[0];\n\t\t\trst[1]=mat[4] *red+mat[5] *green+mat[6] *blue+mat[7] *alpha+tempAlpha[1];\n\t\t\trst[2]=mat[8] *red+mat[9] *green+mat[10] *blue+mat[11] *alpha+tempAlpha[2];\n\t\t\trst[3]=mat[12] *red+mat[13] *green+mat[14] *blue+mat[15] *alpha+tempAlpha[3];\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn ColorFilterAction;\n})()\n\n\n/**\n*@private\n*/\n//class laya.maths.Arith\nvar Arith=(function(){\n\tfunction Arith(){}\n\t__class(Arith,'laya.maths.Arith');\n\tArith.formatR=function(r){\n\t\tif (r > Math.PI)r-=Math.PI *2;\n\t\tif (r <-Math.PI)r+=Math.PI *2;\n\t\treturn r;\n\t}\n\n\tArith.isPOT=function(w,h){\n\t\treturn (w > 0 && (w & (w-1))===0 && h > 0 && (h & (h-1))===0);\n\t}\n\n\tArith.setMatToArray=function(mat,array){\n\t\tmat.a,mat.b,0,0,mat.c,mat.d,0,0,0,0,1,0,mat.tx+20,mat.ty+20,0,1\n\t\tarray[0]=mat.a;\n\t\tarray[1]=mat.b;\n\t\tarray[4]=mat.c;\n\t\tarray[5]=mat.d;\n\t\tarray[12]=mat.tx;\n\t\tarray[13]=mat.ty;\n\t}\n\n\treturn Arith;\n})()\n\n\n/**\n*@private\n*计算贝塞尔曲线的工具类。\n*/\n//class laya.maths.Bezier\nvar Bezier=(function(){\n\tfunction Bezier(){\n\t\t/**@private */\n\t\tthis._controlPoints=[new Point(),new Point(),new Point()];\n\t\tthis._calFun=this.getPoint2;\n\t}\n\n\t__class(Bezier,'laya.maths.Bezier');\n\tvar __proto=Bezier.prototype;\n\t/**@private */\n\t__proto._switchPoint=function(x,y){\n\t\tvar tPoint=this._controlPoints.shift();\n\t\ttPoint.setTo(x,y);\n\t\tthis._controlPoints.push(tPoint);\n\t}\n\n\t/**\n\t*计算二次贝塞尔点。\n\t*@param t\n\t*@param rst\n\t*\n\t*/\n\t__proto.getPoint2=function(t,rst){\n\t\tvar p1=this._controlPoints[0];\n\t\tvar p2=this._controlPoints[1];\n\t\tvar p3=this._controlPoints[2];\n\t\tvar lineX=Math.pow((1-t),2)*p1.x+2 *t *(1-t)*p2.x+Math.pow(t,2)*p3.x;\n\t\tvar lineY=Math.pow((1-t),2)*p1.y+2 *t *(1-t)*p2.y+Math.pow(t,2)*p3.y;\n\t\trst.push(lineX,lineY);\n\t}\n\n\t/**\n\t*计算三次贝塞尔点\n\t*@param t\n\t*@param rst\n\t*\n\t*/\n\t__proto.getPoint3=function(t,rst){\n\t\tvar p1=this._controlPoints[0];\n\t\tvar p2=this._controlPoints[1];\n\t\tvar p3=this._controlPoints[2];\n\t\tvar p4=this._controlPoints[3];\n\t\tvar lineX=Math.pow((1-t),3)*p1.x+3 *p2.x *t *(1-t)*(1-t)+3 *p3.x *t *t *(1-t)+p4.x *Math.pow(t,3);\n\t\tvar lineY=Math.pow((1-t),3)*p1.y+3 *p2.y *t *(1-t)*(1-t)+3 *p3.y *t *t *(1-t)+p4.y *Math.pow(t,3);\n\t\trst.push(lineX,lineY);\n\t}\n\n\t/**\n\t*计算贝塞尔点序列\n\t*@param count\n\t*@param rst\n\t*\n\t*/\n\t__proto.insertPoints=function(count,rst){\n\t\tvar i=NaN;\n\t\tcount=count > 0 ? count :5;\n\t\tvar dLen=NaN;\n\t\tdLen=1 / count;\n\t\tfor (i=0;i <=1;i+=dLen){\n\t\t\tthis._calFun(i,rst);\n\t\t}\n\t}\n\n\t/**\n\t*获取贝塞尔曲线上的点。\n\t*@param pList 控制点[x0,y0,x1,y1...]\n\t*@param inSertCount 每次曲线的插值数量\n\t*@return\n\t*\n\t*/\n\t__proto.getBezierPoints=function(pList,inSertCount,count){\n\t\t(inSertCount===void 0)&& (inSertCount=5);\n\t\t(count===void 0)&& (count=2);\n\t\tvar i=0,len=0;\n\t\tlen=pList.length;\n\t\tif (len < (count+1)*2)return [];\n\t\tvar rst;\n\t\trst=[];\n\t\tswitch (count){\n\t\t\tcase 2:\n\t\t\t\tthis._calFun=this.getPoint2;\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis._calFun=this.getPoint3;\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\treturn [];\n\t\t\t}\n\t\twhile (this._controlPoints.length <=count){\n\t\t\tthis._controlPoints.push(new Point());\n\t\t}\n\t\tfor (i=0;i < count *2;i+=2){\n\t\t\tthis._switchPoint(pList[i],pList[i+1]);\n\t\t}\n\t\tfor (i=count *2;i < len;i+=2){\n\t\t\tthis._switchPoint(pList[i],pList[i+1]);\n\t\t\tif ((i / 2)% count==0)\n\t\t\t\tthis.insertPoints(inSertCount,rst);\n\t\t}\n\t\treturn rst;\n\t}\n\n\t__static(Bezier,\n\t['I',function(){return this.I=new Bezier();}\n\t]);\n\treturn Bezier;\n})()\n\n\n/**\n*@private\n*凸包算法。\n*/\n//class laya.maths.GrahamScan\nvar GrahamScan=(function(){\n\tfunction GrahamScan(){}\n\t__class(GrahamScan,'laya.maths.GrahamScan');\n\tGrahamScan.multiply=function(p1,p2,p0){\n\t\treturn ((p1.x-p0.x)*(p2.y-p0.y)-(p2.x-p0.x)*(p1.y-p0.y));\n\t}\n\n\tGrahamScan.dis=function(p1,p2){\n\t\treturn (p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y);\n\t}\n\n\tGrahamScan._getPoints=function(count,tempUse,rst){\n\t\t(tempUse===void 0)&& (tempUse=false);\n\t\tif (!GrahamScan._mPointList)GrahamScan._mPointList=[];\n\t\twhile (GrahamScan._mPointList.length < count)GrahamScan._mPointList.push(new Point());\n\t\tif (!rst)rst=[];\n\t\trst.length=0;\n\t\tif (tempUse){\n\t\t\tGrahamScan.getFrom(rst,GrahamScan._mPointList,count);\n\t\t\t}else {\n\t\t\tGrahamScan.getFromR(rst,GrahamScan._mPointList,count);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tGrahamScan.getFrom=function(rst,src,count){\n\t\tvar i=0;\n\t\tfor (i=0;i < count;i++){\n\t\t\trst.push(src[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tGrahamScan.getFromR=function(rst,src,count){\n\t\tvar i=0;\n\t\tfor (i=0;i < count;i++){\n\t\t\trst.push(src.pop());\n\t\t}\n\t\treturn rst;\n\t}\n\n\tGrahamScan.pListToPointList=function(pList,tempUse){\n\t\t(tempUse===void 0)&& (tempUse=false);\n\t\tvar i=0,len=pList.length / 2,rst=GrahamScan._getPoints(len,tempUse,GrahamScan._tempPointList);\n\t\tfor (i=0;i < len;i++){\n\t\t\trst[i].setTo(pList[i+i],pList[i+i+1]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tGrahamScan.pointListToPlist=function(pointList){\n\t\tvar i=0,len=pointList.length,rst=GrahamScan._temPList,tPoint;\n\t\trst.length=0;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttPoint=pointList[i];\n\t\t\trst.push(tPoint.x,tPoint.y);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tGrahamScan.scanPList=function(pList){\n\t\treturn Utils.copyArray(pList,GrahamScan.pointListToPlist(GrahamScan.scan(GrahamScan.pListToPointList(pList,true))));\n\t}\n\n\tGrahamScan.scan=function(PointSet){\n\t\tvar i=0,j=0,k=0,top=2,tmp,n=PointSet.length,ch;\n\t\tvar _tmpDic={};\n\t\tvar key;\n\t\tch=GrahamScan._temArr;\n\t\tch.length=0;\n\t\tn=PointSet.length;\n\t\tfor (i=n-1;i >=0;i--){\n\t\t\ttmp=PointSet[i];\n\t\t\tkey=tmp.x+\"_\"+tmp.y;\n\t\t\tif (!_tmpDic.hasOwnProperty(key)){\n\t\t\t\t_tmpDic[key]=true;\n\t\t\t\tch.push(tmp);\n\t\t\t}\n\t\t}\n\t\tn=ch.length;\n\t\tUtils.copyArray(PointSet,ch);\n\t\tfor (i=1;i < n;i++)\n\t\tif ((PointSet[i].y < PointSet[k].y)|| ((PointSet[i].y==PointSet[k].y)&& (PointSet[i].x < PointSet[k].x)))\n\t\t\tk=i;\n\t\ttmp=PointSet[0];\n\t\tPointSet[0]=PointSet[k];\n\t\tPointSet[k]=tmp;\n\t\tfor (i=1;i < n-1;i++){\n\t\t\tk=i;\n\t\t\tfor (j=i+1;j < n;j++)\n\t\t\tif ((GrahamScan.multiply(PointSet[j],PointSet[k],PointSet[0])> 0)|| ((GrahamScan.multiply(PointSet[j],PointSet[k],PointSet[0])==0)&& (GrahamScan.dis(PointSet[0],PointSet[j])< GrahamScan.dis(PointSet[0],PointSet[k]))))\n\t\t\t\tk=j;\n\t\t\ttmp=PointSet[i];\n\t\t\tPointSet[i]=PointSet[k];\n\t\t\tPointSet[k]=tmp;\n\t\t}\n\t\tch=GrahamScan._temArr;\n\t\tch.length=0;\n\t\tif (PointSet.length < 3){\n\t\t\treturn Utils.copyArray(ch,PointSet);\n\t\t}\n\t\tch.push(PointSet[0],PointSet[1],PointSet[2]);\n\t\tfor (i=3;i < n;i++){\n\t\t\twhile (ch.length >=2 && GrahamScan.multiply(PointSet[i],ch[ch.length-1],ch[ch.length-2])>=0)ch.pop();\n\t\t\tPointSet[i] && ch.push(PointSet[i]);\n\t\t}\n\t\treturn ch;\n\t}\n\n\tGrahamScan._mPointList=null;\n\tGrahamScan._tempPointList=[];\n\tGrahamScan._temPList=[];\n\tGrahamScan._temArr=[];\n\treturn GrahamScan;\n})()\n\n\n/**\n*@private\n*<code>MathUtil</code> 是一个数据处理工具类。\n*/\n//class laya.maths.MathUtil\nvar MathUtil=(function(){\n\tfunction MathUtil(){}\n\t__class(MathUtil,'laya.maths.MathUtil');\n\tMathUtil.subtractVector3=function(l,r,o){\n\t\to[0]=l[0]-r[0];\n\t\to[1]=l[1]-r[1];\n\t\to[2]=l[2]-r[2];\n\t}\n\n\tMathUtil.lerp=function(left,right,amount){\n\t\treturn left *(1-amount)+right *amount;\n\t}\n\n\tMathUtil.scaleVector3=function(f,b,e){\n\t\te[0]=f[0] *b;\n\t\te[1]=f[1] *b;\n\t\te[2]=f[2] *b;\n\t}\n\n\tMathUtil.lerpVector3=function(l,r,t,o){\n\t\tvar ax=l[0],ay=l[1],az=l[2];\n\t\to[0]=ax+t *(r[0]-ax);\n\t\to[1]=ay+t *(r[1]-ay);\n\t\to[2]=az+t *(r[2]-az);\n\t}\n\n\tMathUtil.lerpVector4=function(l,r,t,o){\n\t\tvar ax=l[0],ay=l[1],az=l[2],aw=l[3];\n\t\to[0]=ax+t *(r[0]-ax);\n\t\to[1]=ay+t *(r[1]-ay);\n\t\to[2]=az+t *(r[2]-az);\n\t\to[3]=aw+t *(r[3]-aw);\n\t}\n\n\tMathUtil.slerpQuaternionArray=function(a,Offset1,b,Offset2,t,out,Offset3){\n\t\tvar ax=a[Offset1+0],ay=a[Offset1+1],az=a[Offset1+2],aw=a[Offset1+3],bx=b[Offset2+0],by=b[Offset2+1],bz=b[Offset2+2],bw=b[Offset2+3];\n\t\tvar omega,cosom,sinom,scale0,scale1;\n\t\tcosom=ax *bx+ay *by+az *bz+aw *bw;\n\t\tif (cosom < 0.0){\n\t\t\tcosom=-cosom;\n\t\t\tbx=-bx;\n\t\t\tby=-by;\n\t\t\tbz=-bz;\n\t\t\tbw=-bw;\n\t\t}\n\t\tif ((1.0-cosom)> 0.000001){\n\t\t\tomega=Math.acos(cosom);\n\t\t\tsinom=Math.sin(omega);\n\t\t\tscale0=Math.sin((1.0-t)*omega)/ sinom;\n\t\t\tscale1=Math.sin(t *omega)/ sinom;\n\t\t\t}else {\n\t\t\tscale0=1.0-t;\n\t\t\tscale1=t;\n\t\t}\n\t\tout[Offset3+0]=scale0 *ax+scale1 *bx;\n\t\tout[Offset3+1]=scale0 *ay+scale1 *by;\n\t\tout[Offset3+2]=scale0 *az+scale1 *bz;\n\t\tout[Offset3+3]=scale0 *aw+scale1 *bw;\n\t\treturn out;\n\t}\n\n\tMathUtil.getRotation=function(x0,y0,x1,y1){\n\t\treturn Math.atan2(y1-y0,x1-x0)/ Math.PI *180;\n\t}\n\n\tMathUtil.sortBigFirst=function(a,b){\n\t\tif (a==b)\n\t\t\treturn 0;\n\t\treturn b > a ? 1 :-1;\n\t}\n\n\tMathUtil.sortSmallFirst=function(a,b){\n\t\tif (a==b)\n\t\t\treturn 0;\n\t\treturn b > a ?-1 :1;\n\t}\n\n\tMathUtil.sortNumBigFirst=function(a,b){\n\t\treturn parseFloat(b)-parseFloat(a);\n\t}\n\n\tMathUtil.sortNumSmallFirst=function(a,b){\n\t\treturn parseFloat(a)-parseFloat(b);\n\t}\n\n\tMathUtil.sortByKey=function(key,bigFirst,forceNum){\n\t\t(bigFirst===void 0)&& (bigFirst=false);\n\t\t(forceNum===void 0)&& (forceNum=true);\n\t\tvar _sortFun;\n\t\tif (bigFirst){\n\t\t\t_sortFun=forceNum ? MathUtil.sortNumBigFirst :MathUtil.sortBigFirst;\n\t\t\t}else {\n\t\t\t_sortFun=forceNum ? MathUtil.sortNumSmallFirst :MathUtil.sortSmallFirst;\n\t\t}\n\t\treturn function (a,b){\n\t\t\treturn _sortFun(a[key],b[key]);\n\t\t}\n\t}\n\n\treturn MathUtil;\n})()\n\n\n/**\n*<p> <code>Matrix</code> 类表示一个转换矩阵，它确定如何将点从一个坐标空间映射到另一个坐标空间。</p>\n*<p>您可以对一个显示对象执行不同的图形转换，方法是设置 Matrix 对象的属性，将该 Matrix 对象应用于 Transform 对象的 matrix 属性，然后应用该 Transform 对象作为显示对象的 transform 属性。这些转换函数包括平移（x 和 y 重新定位）、旋转、缩放和倾斜。</p>\n*/\n//class laya.maths.Matrix\nvar Matrix=(function(){\n\tfunction Matrix(a,b,c,d,tx,ty){\n\t\t/**缩放或旋转图像时影响像素沿 x 轴定位的值。*/\n\t\t//this.a=NaN;\n\t\t/**旋转或倾斜图像时影响像素沿 y 轴定位的值。*/\n\t\t//this.b=NaN;\n\t\t/**旋转或倾斜图像时影响像素沿 x 轴定位的值。*/\n\t\t//this.c=NaN;\n\t\t/**缩放或旋转图像时影响像素沿 y 轴定位的值。*/\n\t\t//this.d=NaN;\n\t\t/**沿 x 轴平移每个点的距离。*/\n\t\t//this.tx=NaN;\n\t\t/**沿 y 轴平移每个点的距离。*/\n\t\t//this.ty=NaN;\n\t\t/**@private 表示此对象是否在对象池中。*/\n\t\tthis.inPool=false;\n\t\t/**@private 是否有改变矩阵的值。*/\n\t\tthis.bTransform=false;\n\t\t(a===void 0)&& (a=1);\n\t\t(b===void 0)&& (b=0);\n\t\t(c===void 0)&& (c=0);\n\t\t(d===void 0)&& (d=1);\n\t\t(tx===void 0)&& (tx=0);\n\t\t(ty===void 0)&& (ty=0);\n\t\tthis.a=a;\n\t\tthis.b=b;\n\t\tthis.c=c;\n\t\tthis.d=d;\n\t\tthis.tx=tx;\n\t\tthis.ty=ty;\n\t\tthis._checkTransform();\n\t}\n\n\t__class(Matrix,'laya.maths.Matrix');\n\tvar __proto=Matrix.prototype;\n\t/**\n\t*将本矩阵设置为单位矩阵。\n\t*@return 返回当前矩形。\n\t*/\n\t__proto.identity=function(){\n\t\tthis.a=this.d=1;\n\t\tthis.b=this.tx=this.ty=this.c=0;\n\t\tthis.bTransform=false;\n\t\treturn this;\n\t}\n\n\t/**@private */\n\t__proto._checkTransform=function(){\n\t\treturn this.bTransform=(this.a!==1 || this.b!==0 || this.c!==0 || this.d!==1);\n\t}\n\n\t/**\n\t*设置沿 x 、y 轴平移每个点的距离。\n\t*@param x 沿 x 轴平移每个点的距离。\n\t*@param y 沿 y 轴平移每个点的距离。\n\t*@return 返回对象本身\n\t*/\n\t__proto.setTranslate=function(x,y){\n\t\tthis.tx=x;\n\t\tthis.ty=y;\n\t\treturn this;\n\t}\n\n\t/**\n\t*沿 x 和 y 轴平移矩阵，平移的变化量由 x 和 y 参数指定。\n\t*@param x 沿 x 轴向右移动的量（以像素为单位）。\n\t*@param y 沿 y 轴向下移动的量（以像素为单位）。\n\t*@return 返回此矩形对象。\n\t*/\n\t__proto.translate=function(x,y){\n\t\tthis.tx+=x;\n\t\tthis.ty+=y;\n\t\treturn this;\n\t}\n\n\t/**\n\t*对矩阵应用缩放转换。\n\t*@param x 用于沿 x 轴缩放对象的乘数。\n\t*@param y 用于沿 y 轴缩放对象的乘数。\n\t*/\n\t__proto.scale=function(x,y){\n\t\tthis.a *=x;\n\t\tthis.d *=y;\n\t\tthis.c *=x;\n\t\tthis.b *=y;\n\t\tthis.tx *=x;\n\t\tthis.ty *=y;\n\t\tthis.bTransform=true;\n\t}\n\n\t/**\n\t*对 Matrix 对象应用旋转转换。\n\t*@param angle 以弧度为单位的旋转角度。\n\t*/\n\t__proto.rotate=function(angle){\n\t\tvar cos=Math.cos(angle);\n\t\tvar sin=Math.sin(angle);\n\t\tvar a1=this.a;\n\t\tvar c1=this.c;\n\t\tvar tx1=this.tx;\n\t\tthis.a=a1 *cos-this.b *sin;\n\t\tthis.b=a1 *sin+this.b *cos;\n\t\tthis.c=c1 *cos-this.d *sin;\n\t\tthis.d=c1 *sin+this.d *cos;\n\t\tthis.tx=tx1 *cos-this.ty *sin;\n\t\tthis.ty=tx1 *sin+this.ty *cos;\n\t\tthis.bTransform=true;\n\t}\n\n\t/**\n\t*对 Matrix 对象应用倾斜转换。\n\t*@param x 沿着 X 轴的 2D 倾斜弧度。\n\t*@param y 沿着 Y 轴的 2D 倾斜弧度。\n\t*@return 当前 Matrix 对象。\n\t*/\n\t__proto.skew=function(x,y){\n\t\tvar tanX=Math.tan(x);\n\t\tvar tanY=Math.tan(y);\n\t\tvar a1=this.a;\n\t\tvar b1=this.b;\n\t\tthis.a+=tanY *this.c;\n\t\tthis.b+=tanY *this.d;\n\t\tthis.c+=tanX *a1;\n\t\tthis.d+=tanX *b1;\n\t\treturn this;\n\t}\n\n\t/**\n\t*对指定的点应用当前矩阵的逆转化并返回此点。\n\t*@param out 待转化的点 Point 对象。\n\t*@return 返回out\n\t*/\n\t__proto.invertTransformPoint=function(out){\n\t\tvar a1=this.a;\n\t\tvar b1=this.b;\n\t\tvar c1=this.c;\n\t\tvar d1=this.d;\n\t\tvar tx1=this.tx;\n\t\tvar n=a1 *d1-b1 *c1;\n\t\tvar a2=d1 / n;\n\t\tvar b2=-b1 / n;\n\t\tvar c2=-c1 / n;\n\t\tvar d2=a1 / n;\n\t\tvar tx2=(c1 *this.ty-d1 *tx1)/ n;\n\t\tvar ty2=-(a1 *this.ty-b1 *tx1)/ n;\n\t\treturn out.setTo(a2 *out.x+c2 *out.y+tx2,b2 *out.x+d2 *out.y+ty2);\n\t}\n\n\t/**\n\t*将 Matrix 对象表示的几何转换应用于指定点。\n\t*@param out 用来设定输出结果的点。\n\t*@return 返回out\n\t*/\n\t__proto.transformPoint=function(out){\n\t\treturn out.setTo(this.a *out.x+this.c *out.y+this.tx,this.b *out.x+this.d *out.y+this.ty);\n\t}\n\n\t/**\n\t*将 Matrix 对象表示的几何转换应用于指定点，忽略tx、ty。\n\t*@param out 用来设定输出结果的点。\n\t*@return 返回out\n\t*/\n\t__proto.transformPointN=function(out){\n\t\treturn out.setTo(this.a *out.x+this.c *out.y ,this.b *out.x+this.d *out.y);\n\t}\n\n\t/**\n\t*@private\n\t*将 Matrix 对象表示的几何转换应用于指定点。\n\t*@param data 点集合。\n\t*@param out 存储应用转化的点的列表。\n\t*@return 返回out数组\n\t*/\n\t__proto.transformPointArray=function(data,out){\n\t\tvar len=data.length;\n\t\tfor (var i=0;i < len;i+=2){\n\t\t\tvar x=data[i],y=data[i+1];\n\t\t\tout[i]=this.a *x+this.c *y+this.tx;\n\t\t\tout[i+1]=this.b *x+this.d *y+this.ty;\n\t\t}\n\t\treturn out;\n\t}\n\n\t/**\n\t*@private\n\t*将 Matrix 对象表示的几何缩放转换应用于指定点。\n\t*@param data 点集合。\n\t*@param out 存储应用转化的点的列表。\n\t*@return 返回out数组\n\t*/\n\t__proto.transformPointArrayScale=function(data,out){\n\t\tvar len=data.length;\n\t\tfor (var i=0;i < len;i+=2){\n\t\t\tvar x=data[i],y=data[i+1];\n\t\t\tout[i]=this.a *x+this.c *y;\n\t\t\tout[i+1]=this.b *x+this.d *y;\n\t\t}\n\t\treturn out;\n\t}\n\n\t/**\n\t*获取 X 轴缩放值。\n\t*@return X 轴缩放值。\n\t*/\n\t__proto.getScaleX=function(){\n\t\treturn this.b===0 ? this.a :Math.sqrt(this.a *this.a+this.b *this.b);\n\t}\n\n\t/**\n\t*获取 Y 轴缩放值。\n\t*@return Y 轴缩放值。\n\t*/\n\t__proto.getScaleY=function(){\n\t\treturn this.c===0 ? this.d :Math.sqrt(this.c *this.c+this.d *this.d);\n\t}\n\n\t/**\n\t*执行原始矩阵的逆转换。\n\t*@return 当前矩阵对象。\n\t*/\n\t__proto.invert=function(){\n\t\tvar a1=this.a;\n\t\tvar b1=this.b;\n\t\tvar c1=this.c;\n\t\tvar d1=this.d;\n\t\tvar tx1=this.tx;\n\t\tvar n=a1 *d1-b1 *c1;\n\t\tthis.a=d1 / n;\n\t\tthis.b=-b1 / n;\n\t\tthis.c=-c1 / n;\n\t\tthis.d=a1 / n;\n\t\tthis.tx=(c1 *this.ty-d1 *tx1)/ n;\n\t\tthis.ty=-(a1 *this.ty-b1 *tx1)/ n;\n\t\treturn this;\n\t}\n\n\t/**\n\t*将 Matrix 的成员设置为指定值。\n\t*@param a 缩放或旋转图像时影响像素沿 x 轴定位的值。\n\t*@param b 旋转或倾斜图像时影响像素沿 y 轴定位的值。\n\t*@param c 旋转或倾斜图像时影响像素沿 x 轴定位的值。\n\t*@param d 缩放或旋转图像时影响像素沿 y 轴定位的值。\n\t*@param tx 沿 x 轴平移每个点的距离。\n\t*@param ty 沿 y 轴平移每个点的距离。\n\t*@return 当前矩阵对象。\n\t*/\n\t__proto.setTo=function(a,b,c,d,tx,ty){\n\t\tthis.a=a,this.b=b,this.c=c,this.d=d,this.tx=tx,this.ty=ty;\n\t\treturn this;\n\t}\n\n\t/**\n\t*将指定矩阵与当前矩阵连接，从而将这两个矩阵的几何效果有效地结合在一起。\n\t*@param matrix 要连接到源矩阵的矩阵。\n\t*@return 当前矩阵。\n\t*/\n\t__proto.concat=function(matrix){\n\t\tvar a=this.a;\n\t\tvar c=this.c;\n\t\tvar tx=this.tx;\n\t\tthis.a=a *matrix.a+this.b *matrix.c;\n\t\tthis.b=a *matrix.b+this.b *matrix.d;\n\t\tthis.c=c *matrix.a+this.d *matrix.c;\n\t\tthis.d=c *matrix.b+this.d *matrix.d;\n\t\tthis.tx=tx *matrix.a+this.ty *matrix.c+matrix.tx;\n\t\tthis.ty=tx *matrix.b+this.ty *matrix.d+matrix.ty;\n\t\treturn this;\n\t}\n\n\t/**\n\t*@private\n\t*对矩阵应用缩放转换。反向相乘\n\t*@param x 用于沿 x 轴缩放对象的乘数。\n\t*@param y 用于沿 y 轴缩放对象的乘数。\n\t*/\n\t__proto.scaleEx=function(x,y){\n\t\tvar ba=this.a,bb=this.b,bc=this.c,bd=this.d;\n\t\tif (bb!==0 || bc!==0){\n\t\t\tthis.a=x *ba;\n\t\t\tthis.b=x *bb;\n\t\t\tthis.c=y *bc;\n\t\t\tthis.d=y *bd;\n\t\t\t}else {\n\t\t\tthis.a=x *ba;\n\t\t\tthis.b=0 *bd;\n\t\t\tthis.c=0 *ba;\n\t\t\tthis.d=y *bd;\n\t\t}\n\t\tthis.bTransform=true;\n\t}\n\n\t/**\n\t*@private\n\t*对 Matrix 对象应用旋转转换。反向相乘\n\t*@param angle 以弧度为单位的旋转角度。\n\t*/\n\t__proto.rotateEx=function(angle){\n\t\tvar cos=Math.cos(angle);\n\t\tvar sin=Math.sin(angle);\n\t\tvar ba=this.a,bb=this.b,bc=this.c,bd=this.d;\n\t\tif (bb!==0 || bc!==0){\n\t\t\tthis.a=cos *ba+sin *bc;\n\t\t\tthis.b=cos *bb+sin *bd;\n\t\t\tthis.c=-sin *ba+cos *bc;\n\t\t\tthis.d=-sin *bb+cos *bd;\n\t\t\t}else {\n\t\t\tthis.a=cos *ba;\n\t\t\tthis.b=sin *bd;\n\t\t\tthis.c=-sin *ba;\n\t\t\tthis.d=cos *bd;\n\t\t}\n\t\tthis.bTransform=true;\n\t}\n\n\t/**\n\t*返回此 Matrix 对象的副本。\n\t*@return 与原始实例具有完全相同的属性的新 Matrix 实例。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dec=Matrix.create();\n\t\tdec.a=this.a;\n\t\tdec.b=this.b;\n\t\tdec.c=this.c;\n\t\tdec.d=this.d;\n\t\tdec.tx=this.tx;\n\t\tdec.ty=this.ty;\n\t\tdec.bTransform=this.bTransform;\n\t\treturn dec;\n\t}\n\n\t/**\n\t*将当前 Matrix 对象中的所有矩阵数据复制到指定的 Matrix 对象中。\n\t*@param dec 要复制当前矩阵数据的 Matrix 对象。\n\t*@return 已复制当前矩阵数据的 Matrix 对象。\n\t*/\n\t__proto.copyTo=function(dec){\n\t\tdec.a=this.a;\n\t\tdec.b=this.b;\n\t\tdec.c=this.c;\n\t\tdec.d=this.d;\n\t\tdec.tx=this.tx;\n\t\tdec.ty=this.ty;\n\t\tdec.bTransform=this.bTransform;\n\t\treturn dec;\n\t}\n\n\t/**\n\t*返回列出该 Matrix 对象属性的文本值。\n\t*@return 一个字符串，它包含 Matrix 对象的属性值：a、b、c、d、tx 和 ty。\n\t*/\n\t__proto.toString=function(){\n\t\treturn this.a+\",\"+this.b+\",\"+this.c+\",\"+this.d+\",\"+this.tx+\",\"+this.ty;\n\t}\n\n\t/**\n\t*销毁此对象。\n\t*/\n\t__proto.destroy=function(){\n\t\tif (this.inPool)return;\n\t\tvar cache=Matrix._cache;\n\t\tthis.inPool=true;\n\t\tcache._length || (cache._length=0);\n\t\tcache[cache._length++]=this;\n\t\tthis.a=this.d=1;\n\t\tthis.b=this.c=this.tx=this.ty=0;\n\t\tthis.bTransform=false;\n\t}\n\n\tMatrix.mul=function(m1,m2,out){\n\t\tvar aa=m1.a,ab=m1.b,ac=m1.c,ad=m1.d,atx=m1.tx,aty=m1.ty;\n\t\tvar ba=m2.a,bb=m2.b,bc=m2.c,bd=m2.d,btx=m2.tx,bty=m2.ty;\n\t\tif (bb!==0 || bc!==0){\n\t\t\tout.a=aa *ba+ab *bc;\n\t\t\tout.b=aa *bb+ab *bd;\n\t\t\tout.c=ac *ba+ad *bc;\n\t\t\tout.d=ac *bb+ad *bd;\n\t\t\tout.tx=ba *atx+bc *aty+btx;\n\t\t\tout.ty=bb *atx+bd *aty+bty;\n\t\t\t}else {\n\t\t\tout.a=aa *ba;\n\t\t\tout.b=ab *bd;\n\t\t\tout.c=ac *ba;\n\t\t\tout.d=ad *bd;\n\t\t\tout.tx=ba *atx+btx;\n\t\t\tout.ty=bd *aty+bty;\n\t\t}\n\t\treturn out;\n\t}\n\n\tMatrix.mul16=function(m1,m2,out){\n\t\tvar aa=m1.a,ab=m1.b,ac=m1.c,ad=m1.d,atx=m1.tx,aty=m1.ty;\n\t\tvar ba=m2.a,bb=m2.b,bc=m2.c,bd=m2.d,btx=m2.tx,bty=m2.ty;\n\t\tif (bb!==0 || bc!==0){\n\t\t\tout[0]=aa *ba+ab *bc;\n\t\t\tout[1]=aa *bb+ab *bd;\n\t\t\tout[4]=ac *ba+ad *bc;\n\t\t\tout[5]=ac *bb+ad *bd;\n\t\t\tout[12]=ba *atx+bc *aty+btx;\n\t\t\tout[13]=bb *atx+bd *aty+bty;\n\t\t\t}else {\n\t\t\tout[0]=aa *ba;\n\t\t\tout[1]=ab *bd;\n\t\t\tout[4]=ac *ba;\n\t\t\tout[5]=ad *bd;\n\t\t\tout[12]=ba *atx+btx;\n\t\t\tout[13]=bd *aty+bty;\n\t\t}\n\t\treturn out;\n\t}\n\n\tMatrix.mulPre=function(m1,ba,bb,bc,bd,btx,bty,out){\n\t\tvar aa=m1.a,ab=m1.b,ac=m1.c,ad=m1.d,atx=m1.tx,aty=m1.ty;\n\t\tif (bb!==0 || bc!==0){\n\t\t\tout.a=aa *ba+ab *bc;\n\t\t\tout.b=aa *bb+ab *bd;\n\t\t\tout.c=ac *ba+ad *bc;\n\t\t\tout.d=ac *bb+ad *bd;\n\t\t\tout.tx=ba *atx+bc *aty+btx;\n\t\t\tout.ty=bb *atx+bd *aty+bty;\n\t\t\t}else {\n\t\t\tout.a=aa *ba;\n\t\t\tout.b=ab *bd;\n\t\t\tout.c=ac *ba;\n\t\t\tout.d=ad *bd;\n\t\t\tout.tx=ba *atx+btx;\n\t\t\tout.ty=bd *aty+bty;\n\t\t}\n\t\treturn out;\n\t}\n\n\tMatrix.mulPos=function(m1,aa,ab,ac,ad,atx,aty,out){\n\t\tvar ba=m1.a,bb=m1.b,bc=m1.c,bd=m1.d,btx=m1.tx,bty=m1.ty;\n\t\tif (bb!==0 || bc!==0){\n\t\t\tout.a=aa *ba+ab *bc;\n\t\t\tout.b=aa *bb+ab *bd;\n\t\t\tout.c=ac *ba+ad *bc;\n\t\t\tout.d=ac *bb+ad *bd;\n\t\t\tout.tx=ba *atx+bc *aty+btx;\n\t\t\tout.ty=bb *atx+bd *aty+bty;\n\t\t\t}else {\n\t\t\tout.a=aa *ba;\n\t\t\tout.b=ab *bd;\n\t\t\tout.c=ac *ba;\n\t\t\tout.d=ad *bd;\n\t\t\tout.tx=ba *atx+btx;\n\t\t\tout.ty=bd *aty+bty;\n\t\t}\n\t\treturn out;\n\t}\n\n\tMatrix.preMul=function(parent,self,out){\n\t\tvar pa=parent.a,pb=parent.b,pc=parent.c,pd=parent.d;\n\t\tvar na=self.a,nb=self.b,nc=self.c,nd=self.d,ntx=self.tx,nty=self.ty;\n\t\tout.a=na *pa;\n\t\tout.b=out.c=0;\n\t\tout.d=nd *pd;\n\t\tout.tx=ntx *pa+parent.tx;\n\t\tout.ty=nty *pd+parent.ty;\n\t\tif (nb!==0 || nc!==0 || pb!==0 || pc!==0){\n\t\t\tout.a+=nb *pc;\n\t\t\tout.d+=nc *pb;\n\t\t\tout.b+=na *pb+nb *pd;\n\t\t\tout.c+=nc *pa+nd *pc;\n\t\t\tout.tx+=nty *pc;\n\t\t\tout.ty+=ntx *pb;\n\t\t}\n\t\treturn out;\n\t}\n\n\tMatrix.preMulXY=function(parent,x,y,out){\n\t\tvar pa=parent.a,pb=parent.b,pc=parent.c,pd=parent.d;\n\t\tout.a=pa;\n\t\tout.b=pb;\n\t\tout.c=pc;\n\t\tout.d=pd;\n\t\tout.tx=x *pa+parent.tx+y *pc;\n\t\tout.ty=y *pd+parent.ty+x *pb;\n\t\treturn out;\n\t}\n\n\tMatrix.create=function(){\n\t\tvar cache=Matrix._cache;\n\t\tvar mat=!cache._length ? (new Matrix()):cache[--cache._length];\n\t\tmat.inPool=false;\n\t\treturn mat;\n\t}\n\n\tMatrix.EMPTY=new Matrix();\n\tMatrix.TEMP=new Matrix();\n\tMatrix._cache=[];\n\treturn Matrix;\n})()\n\n\n/**\n*<code>Point</code> 对象表示二维坐标系统中的某个位置，其中 x 表示水平轴，y 表示垂直轴。\n*/\n//class laya.maths.Point\nvar Point=(function(){\n\tfunction Point(x,y){\n\t\t/**该点的水平坐标。*/\n\t\t//this.x=NaN;\n\t\t/**该点的垂直坐标。*/\n\t\t//this.y=NaN;\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t}\n\n\t__class(Point,'laya.maths.Point');\n\tvar __proto=Point.prototype;\n\t/**\n\t*将 <code>Point</code> 的成员设置为指定值。\n\t*@param x 水平坐标。\n\t*@param y 垂直坐标。\n\t*@return 当前 Point 对象。\n\t*/\n\t__proto.setTo=function(x,y){\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\treturn this;\n\t}\n\n\t/**\n\t*计算当前点和目标点(x，y)的距离。\n\t*@param x 水平坐标。\n\t*@param y 垂直坐标。\n\t*@return 返回当前点和目标点之间的距离。\n\t*/\n\t__proto.distance=function(x,y){\n\t\treturn Math.sqrt((this.x-x)*(this.x-x)+(this.y-y)*(this.y-y));\n\t}\n\n\t/**返回包含 x 和 y 坐标的值的字符串。*/\n\t__proto.toString=function(){\n\t\treturn this.x+\",\"+this.y;\n\t}\n\n\t/**\n\t*标准化向量。\n\t*/\n\t__proto.normalize=function(){\n\t\tvar d=Math.sqrt(this.x *this.x+this.y *this.y);\n\t\tif (d > 0){\n\t\t\tvar id=1.0 / d;\n\t\t\tthis.x *=id;\n\t\t\tthis.y *=id;\n\t\t}\n\t}\n\n\tPoint.TEMP=new Point();\n\tPoint.EMPTY=new Point();\n\treturn Point;\n})()\n\n\n/**\n*<p><code>Rectangle</code> 对象是按其位置（由它左上角的点 (x,y)确定）以及宽度和高度定义的区域。</p>\n*<p>Rectangle 类的 x、y、width 和 height 属性相互独立；更改一个属性的值不会影响其他属性。</p>\n*/\n//class laya.maths.Rectangle\nvar Rectangle=(function(){\n\tfunction Rectangle(x,y,width,height){\n\t\t/**矩形左上角的 X 轴坐标。*/\n\t\t//this.x=NaN;\n\t\t/**矩形左上角的 Y 轴坐标。*/\n\t\t//this.y=NaN;\n\t\t/**矩形的宽度。*/\n\t\t//this.width=NaN;\n\t\t/**矩形的高度。*/\n\t\t//this.height=NaN;\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.width=width;\n\t\tthis.height=height;\n\t}\n\n\t__class(Rectangle,'laya.maths.Rectangle');\n\tvar __proto=Rectangle.prototype;\n\t/**\n\t*将 Rectangle 的属性设置为指定值。\n\t*@param x x 矩形左上角的 X 轴坐标。\n\t*@param y x 矩形左上角的 Y 轴坐标。\n\t*@param width 矩形的宽度。\n\t*@param height 矩形的高。\n\t*@return 返回属性值修改后的矩形对象本身。\n\t*/\n\t__proto.setTo=function(x,y,width,height){\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.width=width;\n\t\tthis.height=height;\n\t\treturn this;\n\t}\n\n\t/**\n\t*复制 source 对象的属性值到此矩形对象中。\n\t*@param sourceRect 源 Rectangle 对象。\n\t*@return 返回属性值修改后的矩形对象本身。\n\t*/\n\t__proto.copyFrom=function(source){\n\t\tthis.x=source.x;\n\t\tthis.y=source.y;\n\t\tthis.width=source.width;\n\t\tthis.height=source.height;\n\t\treturn this;\n\t}\n\n\t/**\n\t*确定由此 Rectangle 对象定义的矩形区域内是否包含指定的点。\n\t*@param x 点的 X 轴坐标值（水平位置）。\n\t*@param y 点的 Y 轴坐标值（垂直位置）。\n\t*@return 如果 Rectangle 对象包含指定的点，则值为 true；否则为 false。\n\t*/\n\t__proto.contains=function(x,y){\n\t\tif (this.width <=0 || this.height <=0)return false;\n\t\tif (x >=this.x && x < this.right){\n\t\t\tif (y >=this.y && y < this.bottom){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*确定在 rect 参数中指定的对象是否与此 Rectangle 对象相交。此方法检查指定的 Rectangle 对象的 x、y、width 和 height 属性，以查看它是否与此 Rectangle 对象相交。\n\t*@param rect Rectangle 对象。\n\t*@return 如果传入的矩形对象与此对象相交，则返回 true 值，否则返回 false。\n\t*/\n\t__proto.intersects=function(rect){\n\t\treturn !(rect.x > (this.x+this.width)|| (rect.x+rect.width)< this.x || rect.y > (this.y+this.height)|| (rect.y+rect.height)< this.y);\n\t}\n\n\t/**\n\t*如果在 rect 参数中指定的 Rectangle 对象与此 Rectangle 对象相交，则返回交集区域作为 Rectangle 对象。如果矩形不相交，则此方法返回null。\n\t*@param rect 待比较的矩形区域。\n\t*@param out （可选）待输出的矩形区域。如果为空则创建一个新的。建议：尽量复用对象，减少对象创建消耗。\n\t*@return 返回相交的矩形区域对象。\n\t*/\n\t__proto.intersection=function(rect,out){\n\t\tif (!this.intersects(rect))return null;\n\t\tout || (out=new Rectangle());\n\t\tout.x=Math.max(this.x,rect.x);\n\t\tout.y=Math.max(this.y,rect.y);\n\t\tout.width=Math.min(this.right,rect.right)-out.x;\n\t\tout.height=Math.min(this.bottom,rect.bottom)-out.y;\n\t\treturn out;\n\t}\n\n\t/**\n\t*<p>矩形联合，通过填充两个矩形之间的水平和垂直空间，将这两个矩形组合在一起以创建一个新的 Rectangle 对象。</p>\n\t*<p>注意：union()方法忽略高度或宽度值为 0 的矩形，如：var rect2:Rectangle=new Rectangle(300,300,50,0);</p>\n\t*@param 要添加到此 Rectangle 对象的 Rectangle 对象。\n\t*@param out 用于存储输出结果的矩形对象。如果为空，则创建一个新的。建议：尽量复用对象，减少对象创建消耗。Rectangle.TEMP对象用于对象复用。\n\t*@return 充当两个矩形的联合的新 Rectangle 对象。\n\t*/\n\t__proto.union=function(source,out){\n\t\tout || (out=new Rectangle());\n\t\tthis.clone(out);\n\t\tif (source.width <=0 || source.height <=0)return out;\n\t\tout.addPoint(source.x,source.y);\n\t\tout.addPoint(source.right,source.bottom);\n\t\treturn this;\n\t}\n\n\t/**\n\t*返回一个 Rectangle 对象，其 x、y、width 和 height 属性的值与当前 Rectangle 对象的对应值相同。\n\t*@param out （可选）用于存储结果的矩形对象。如果为空，则创建一个新的。建议：尽量复用对象，减少对象创建消耗。。Rectangle.TEMP对象用于对象复用。\n\t*@return Rectangle 对象，其 x、y、width 和 height 属性的值与当前 Rectangle 对象的对应值相同。\n\t*/\n\t__proto.clone=function(out){\n\t\tout || (out=new Rectangle());\n\t\tout.x=this.x;\n\t\tout.y=this.y;\n\t\tout.width=this.width;\n\t\tout.height=this.height;\n\t\treturn out;\n\t}\n\n\t/**\n\t*当前 Rectangle 对象的水平位置 x 和垂直位置 y 以及高度 width 和宽度 height 以逗号连接成的字符串。\n\t*/\n\t__proto.toString=function(){\n\t\treturn this.x+\",\"+this.y+\",\"+this.width+\",\"+this.height;\n\t}\n\n\t/**\n\t*检测传入的 Rectangle 对象的属性是否与当前 Rectangle 对象的属性 x、y、width、height 属性值都相等。\n\t*@param rect 待比较的 Rectangle 对象。\n\t*@return 如果判断的属性都相等，则返回 true ,否则返回 false。\n\t*/\n\t__proto.equals=function(rect){\n\t\tif (!rect || rect.x!==this.x || rect.y!==this.y || rect.width!==this.width || rect.height!==this.height)return false;\n\t\treturn true;\n\t}\n\n\t/**\n\t*<p>为当前矩形对象加一个点，以使当前矩形扩展为包含当前矩形和此点的最小矩形。</p>\n\t*<p>此方法会修改本对象。</p>\n\t*@param x 点的 X 坐标。\n\t*@param y 点的 Y 坐标。\n\t*@return 返回此 Rectangle 对象。\n\t*/\n\t__proto.addPoint=function(x,y){\n\t\tthis.x > x && (this.width+=this.x-x,this.x=x);\n\t\tthis.y > y && (this.height+=this.y-y,this.y=y);\n\t\tif (this.width < x-this.x)this.width=x-this.x;\n\t\tif (this.height < y-this.y)this.height=y-this.y;\n\t\treturn this;\n\t}\n\n\t/**\n\t*@private\n\t*返回代表当前矩形的顶点数据。\n\t*@return 顶点数据。\n\t*/\n\t__proto._getBoundPoints=function(){\n\t\tvar rst=Rectangle._temB;\n\t\trst.length=0;\n\t\tif (this.width==0 || this.height==0)return rst;\n\t\trst.push(this.x,this.y,this.x+this.width,this.y,this.x,this.y+this.height,this.x+this.width,this.y+this.height);\n\t\treturn rst;\n\t}\n\n\t/**\n\t*确定此 Rectangle 对象是否为空。\n\t*@return 如果 Rectangle 对象的宽度或高度小于等于 0，则返回 true 值，否则返回 false。\n\t*/\n\t__proto.isEmpty=function(){\n\t\tif (this.width <=0 || this.height <=0)return true;\n\t\treturn false;\n\t}\n\n\t/**此矩形右侧的 X 轴坐标。 x 和 width 属性的和。*/\n\t__getset(0,__proto,'right',function(){\n\t\treturn this.x+this.width;\n\t});\n\n\t/**此矩形底端的 Y 轴坐标。y 和 height 属性的和。*/\n\t__getset(0,__proto,'bottom',function(){\n\t\treturn this.y+this.height;\n\t});\n\n\tRectangle._getBoundPointS=function(x,y,width,height){\n\t\tvar rst=Rectangle._temA;\n\t\trst.length=0;\n\t\tif (width==0 || height==0)return rst;\n\t\trst.push(x,y,x+width,y,x,y+height,x+width,y+height);\n\t\treturn rst;\n\t}\n\n\tRectangle._getWrapRec=function(pointList,rst){\n\t\tif (!pointList || pointList.length < 1)return rst ? rst.setTo(0,0,0,0):Rectangle.TEMP.setTo(0,0,0,0);\n\t\trst=rst ? rst :new Rectangle();\n\t\tvar i,len=pointList.length,minX,maxX,minY,maxY,tPoint=Point.TEMP;\n\t\tminX=minY=99999;\n\t\tmaxX=maxY=-minX;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\ttPoint.x=pointList[i];\n\t\t\ttPoint.y=pointList[i+1];\n\t\t\tminX=minX < tPoint.x ? minX :tPoint.x;\n\t\t\tminY=minY < tPoint.y ? minY :tPoint.y;\n\t\t\tmaxX=maxX > tPoint.x ? maxX :tPoint.x;\n\t\t\tmaxY=maxY > tPoint.y ? maxY :tPoint.y;\n\t\t}\n\t\treturn rst.setTo(minX,minY,maxX-minX,maxY-minY);\n\t}\n\n\tRectangle.EMPTY=new Rectangle();\n\tRectangle.TEMP=new Rectangle();\n\tRectangle._temB=[];\n\tRectangle._temA=[];\n\treturn Rectangle;\n})()\n\n\n/**\n*<code>SoundManager</code> 是一个声音管理类。提供了对背景音乐、音效的播放控制方法。\n*引擎默认有两套声音方案：WebAudio和H5Audio\n*播放音效，优先使用WebAudio播放声音，如果WebAudio不可用，则用H5Audio播放，H5Audio在部分机器上有兼容问题（比如不能混音，播放有延迟等）。\n*播放背景音乐，则使用H5Audio播放（使用WebAudio会增加特别大的内存，并且要等加载完毕后才能播放，有延迟）\n*建议背景音乐用mp3类型，音效用wav或者mp3类型（如果打包为app，音效只能用wav格式）。\n*详细教程及声音格式请参考：http://ldc.layabox.com/doc/?nav=ch-as-1-7-0\n*/\n//class laya.media.SoundManager\nvar SoundManager=(function(){\n\tfunction SoundManager(){}\n\t__class(SoundManager,'laya.media.SoundManager');\n\t__getset(1,SoundManager,'useAudioMusic',function(){\n\t\treturn SoundManager._useAudioMusic;\n\t\t},function(value){\n\t\tSoundManager._useAudioMusic=value;\n\t\tif (value){\n\t\t\tSoundManager._musicClass=AudioSound;\n\t\t\t}else{\n\t\t\tSoundManager._musicClass=null;\n\t\t}\n\t});\n\n\t/**\n\t*失去焦点后是否自动停止背景音乐。\n\t*@param v Boolean 失去焦点后是否自动停止背景音乐。\n\t*\n\t*/\n\t/**\n\t*失去焦点后是否自动停止背景音乐。\n\t*/\n\t__getset(1,SoundManager,'autoStopMusic',function(){\n\t\treturn SoundManager._autoStopMusic;\n\t\t},function(v){\n\t\tLaya.stage.off(/*laya.events.Event.BLUR*/\"blur\",null,SoundManager._stageOnBlur);\n\t\tLaya.stage.off(/*laya.events.Event.FOCUS*/\"focus\",null,SoundManager._stageOnFocus);\n\t\tLaya.stage.off(/*laya.events.Event.VISIBILITY_CHANGE*/\"visibilitychange\",null,SoundManager._visibilityChange);\n\t\tSoundManager._autoStopMusic=v;\n\t\tif (v){\n\t\t\tLaya.stage.on(/*laya.events.Event.BLUR*/\"blur\",null,SoundManager._stageOnBlur);\n\t\t\tLaya.stage.on(/*laya.events.Event.FOCUS*/\"focus\",null,SoundManager._stageOnFocus);\n\t\t\tLaya.stage.on(/*laya.events.Event.VISIBILITY_CHANGE*/\"visibilitychange\",null,SoundManager._visibilityChange);\n\t\t}\n\t});\n\n\t/**\n\t*背景音乐和所有音效是否静音。\n\t*/\n\t__getset(1,SoundManager,'muted',function(){\n\t\treturn SoundManager._muted;\n\t\t},function(value){\n\t\tif (value==SoundManager._muted)return;\n\t\tif (value){\n\t\t\tSoundManager.stopAllSound();\n\t\t}\n\t\tSoundManager.musicMuted=value;\n\t\tSoundManager._muted=value;\n\t});\n\n\t/**\n\t*背景音乐（不包括音效）是否静音。\n\t*/\n\t__getset(1,SoundManager,'musicMuted',function(){\n\t\treturn SoundManager._musicMuted;\n\t\t},function(value){\n\t\tif (value==SoundManager._musicMuted)return;\n\t\tif (value){\n\t\t\tif (SoundManager._tMusic){\n\t\t\t\tif (SoundManager._musicChannel&&!SoundManager._musicChannel.isStopped){\n\t\t\t\t\tif (Render.isConchApp){\n\t\t\t\t\t\t/*__JS__ */if (SoundManager._musicChannel._audio)SoundManager._musicChannel._audio.muted=true;;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSoundManager._musicChannel.pause();\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tSoundManager._musicChannel=null;\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tSoundManager._musicChannel=null;\n\t\t\t}\n\t\t\tSoundManager._musicMuted=value;\n\t\t\t}else {\n\t\t\tSoundManager._musicMuted=value;\n\t\t\tif (SoundManager._tMusic){\n\t\t\t\tif (SoundManager._musicChannel){\n\t\t\t\t\tif (Render.isConchApp){\n\t\t\t\t\t\t/*__JS__ */if (SoundManager._musicChannel._audio)SoundManager._musicChannel._audio.muted=false;;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSoundManager._musicChannel.resume();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*所有音效（不包括背景音乐）是否静音。\n\t*/\n\t__getset(1,SoundManager,'soundMuted',function(){\n\t\treturn SoundManager._soundMuted;\n\t\t},function(value){\n\t\tSoundManager._soundMuted=value;\n\t});\n\n\tSoundManager.addChannel=function(channel){\n\t\tif (SoundManager._channels.indexOf(channel)>=0)return;\n\t\tSoundManager._channels.push(channel);\n\t}\n\n\tSoundManager.removeChannel=function(channel){\n\t\tvar i=0;\n\t\tfor (i=SoundManager._channels.length-1;i >=0;i--){\n\t\t\tif (SoundManager._channels[i]==channel){\n\t\t\t\tSoundManager._channels.splice(i,1);\n\t\t\t}\n\t\t}\n\t}\n\n\tSoundManager.disposeSoundIfNotUsed=function(url){\n\t\tvar i=0;\n\t\tfor (i=SoundManager._channels.length-1;i >=0;i--){\n\t\t\tif (SoundManager._channels[i].url==url){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSoundManager.destroySound(url);\n\t}\n\n\tSoundManager._visibilityChange=function(){\n\t\tif (Laya.stage.isVisibility){\n\t\t\tSoundManager._stageOnFocus();\n\t\t\t}else {\n\t\t\tSoundManager._stageOnBlur();\n\t\t}\n\t}\n\n\tSoundManager._stageOnBlur=function(){\n\t\tSoundManager._isActive=false;\n\t\tif (SoundManager._musicChannel){\n\t\t\tif (!SoundManager._musicChannel.isStopped){\n\t\t\t\tSoundManager._blurPaused=true;\n\t\t\t\tSoundManager._musicChannel.pause();\n\t\t\t}\n\t\t}\n\t\tSoundManager.stopAllSound();\n\t\tLaya.stage.once(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",null,SoundManager._stageOnFocus);\n\t}\n\n\tSoundManager._recoverWebAudio=function(){\n\t\tif(WebAudioSound.ctx&&WebAudioSound.ctx.state!=\"running\"&&WebAudioSound.ctx.resume)\n\t\t\tWebAudioSound.ctx.resume();\n\t}\n\n\tSoundManager._stageOnFocus=function(){\n\t\tSoundManager._isActive=true;\n\t\tSoundManager._recoverWebAudio();\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",null,SoundManager._stageOnFocus);\n\t\tif (SoundManager._blurPaused){\n\t\t\tif (SoundManager._musicChannel && SoundManager._musicChannel.isStopped){\n\t\t\t\tSoundManager._blurPaused=false;\n\t\t\t\tSoundManager._musicChannel.resume();\n\t\t\t}\n\t\t}\n\t}\n\n\tSoundManager.playSound=function(url,loops,complete,soundClass,startTime){\n\t\t(loops===void 0)&& (loops=1);\n\t\t(startTime===void 0)&& (startTime=0);\n\t\tif (!SoundManager._isActive || !url)return null;\n\t\tif (SoundManager._muted)return null;\n\t\tSoundManager._recoverWebAudio();\n\t\turl=URL.formatURL(url);\n\t\tif (url==SoundManager._tMusic){\n\t\t\tif (SoundManager._musicMuted)return null;\n\t\t\t}else {\n\t\t\tif (Render.isConchApp){\n\t\t\t\tvar ext=Utils.getFileExtension(url);\n\t\t\t\tif (ext !=\"wav\" && ext !=\"ogg\"){\n\t\t\t\t\talert(\"The sound only supports wav or ogg format,for optimal performance reason,please refer to the official website document.\");\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (SoundManager._soundMuted)return null;\n\t\t};\n\t\tvar tSound;\n\t\tif (!Browser.onMiniGame && !Browser.onAlipayMiniGame && !Browser.onBDMiniGame && !Browser.onVVMiniGame && !Browser.onKGMiniGame && !Browser.onQGMiniGame && !Browser.onTTMiniGame && !Browser.onHWMiniGame && !Browser.onTBMiniGame){\n\t\t\ttSound=Laya.loader.getRes(url);\n\t\t}\n\t\tif (!soundClass)soundClass=SoundManager._soundClass;\n\t\tif (!tSound){\n\t\t\ttSound=new soundClass();\n\t\t\ttSound.load(url);\n\t\t\tif (!Browser.onMiniGame && !Browser.onAlipayMiniGame && !Browser.onBDMiniGame && !Browser.onVVMiniGame && !Browser.onKGMiniGame && !Browser.onQGMiniGame && !Browser.onTTMiniGame && !Browser.onHWMiniGame && !Browser.onTBMiniGame){\n\t\t\t\tLoader.cacheRes(url,tSound);\n\t\t\t}\n\t\t};\n\t\tvar channel;\n\t\tchannel=tSound.play(startTime,loops);\n\t\tif (!channel)return null;\n\t\tchannel.url=url;\n\t\tchannel.volume=(url==SoundManager._tMusic)? SoundManager.musicVolume :SoundManager.soundVolume;\n\t\tchannel.completeHandler=complete;\n\t\treturn channel;\n\t}\n\n\tSoundManager.destroySound=function(url){\n\t\tvar tSound=Laya.loader.getRes(url);\n\t\tif (tSound){\n\t\t\tLoader.clearRes(url);\n\t\t\ttSound.dispose();\n\t\t}\n\t}\n\n\tSoundManager.playMusic=function(url,loops,complete,startTime){\n\t\t(loops===void 0)&& (loops=0);\n\t\t(startTime===void 0)&& (startTime=0);\n\t\turl=URL.formatURL(url);\n\t\tSoundManager._tMusic=url;\n\t\tif (SoundManager._musicChannel)SoundManager._musicChannel.stop();\n\t\treturn SoundManager._musicChannel=SoundManager.playSound(url,loops,complete,SoundManager._musicClass,startTime);\n\t}\n\n\tSoundManager.stopSound=function(url){\n\t\turl=URL.formatURL(url);\n\t\tvar i=0;\n\t\tvar channel;\n\t\tfor (i=SoundManager._channels.length-1;i >=0;i--){\n\t\t\tchannel=SoundManager._channels[i];\n\t\t\tif (channel.url==url){\n\t\t\t\tchannel.stop();\n\t\t\t}\n\t\t}\n\t}\n\n\tSoundManager.stopAll=function(){\n\t\tSoundManager._tMusic=null;\n\t\tvar i=0;\n\t\tvar channel;\n\t\tfor (i=SoundManager._channels.length-1;i >=0;i--){\n\t\t\tchannel=SoundManager._channels[i];\n\t\t\tchannel.stop();\n\t\t}\n\t}\n\n\tSoundManager.stopAllSound=function(){\n\t\tvar i=0;\n\t\tvar channel;\n\t\tfor (i=SoundManager._channels.length-1;i >=0;i--){\n\t\t\tchannel=SoundManager._channels[i];\n\t\t\tif (channel.url !=SoundManager._tMusic){\n\t\t\t\tchannel.stop();\n\t\t\t}\n\t\t}\n\t}\n\n\tSoundManager.stopMusic=function(){\n\t\tif (SoundManager._musicChannel)SoundManager._musicChannel.stop();\n\t\tSoundManager._tMusic=null;\n\t}\n\n\tSoundManager.setSoundVolume=function(volume,url){\n\t\tif (url){\n\t\t\turl=URL.formatURL(url);\n\t\t\tSoundManager._setVolume(url,volume);\n\t\t\t}else {\n\t\t\tSoundManager.soundVolume=volume;\n\t\t\tvar i=0;\n\t\t\tvar channel;\n\t\t\tfor (i=SoundManager._channels.length-1;i >=0;i--){\n\t\t\t\tchannel=SoundManager._channels[i];\n\t\t\t\tif (channel.url !=SoundManager._tMusic){\n\t\t\t\t\tchannel.volume=volume;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tSoundManager.setMusicVolume=function(volume){\n\t\tSoundManager.musicVolume=volume;\n\t\tSoundManager._setVolume(SoundManager._tMusic,volume);\n\t}\n\n\tSoundManager._setVolume=function(url,volume){\n\t\turl=URL.formatURL(url);\n\t\tvar i=0;\n\t\tvar channel;\n\t\tfor (i=SoundManager._channels.length-1;i >=0;i--){\n\t\t\tchannel=SoundManager._channels[i];\n\t\t\tif (channel.url==url){\n\t\t\t\tchannel.volume=volume;\n\t\t\t}\n\t\t}\n\t}\n\n\tSoundManager.musicVolume=1;\n\tSoundManager.soundVolume=1;\n\tSoundManager.playbackRate=1;\n\tSoundManager._useAudioMusic=true;\n\tSoundManager._muted=false;\n\tSoundManager._soundMuted=false;\n\tSoundManager._musicMuted=false;\n\tSoundManager._tMusic=null;\n\tSoundManager._musicChannel=null;\n\tSoundManager._channels=[];\n\tSoundManager._autoStopMusic=false;\n\tSoundManager._blurPaused=false;\n\tSoundManager._isActive=true;\n\tSoundManager._soundClass=null;\n\tSoundManager._musicClass=null;\n\tSoundManager.autoReleaseSound=true;\n\treturn SoundManager;\n})()\n\n\n/**\n*<p> <code>LocalStorage</code> 类用于没有时间限制的数据存储。</p>\n*/\n//class laya.net.LocalStorage\nvar LocalStorage=(function(){\n\tvar Storage;\n\tfunction LocalStorage(){}\n\t__class(LocalStorage,'laya.net.LocalStorage');\n\tLocalStorage.__init__=function(){\n\t\tif (!LocalStorage._baseClass){\n\t\t\tLocalStorage._baseClass=Storage;\n\t\t\tStorage.init();\n\t\t}\n\t\tLocalStorage.items=LocalStorage._baseClass.items;\n\t\tLocalStorage.support=LocalStorage._baseClass.support;\n\t}\n\n\tLocalStorage.setItem=function(key,value){\n\t\tLocalStorage._baseClass.setItem(key,value);\n\t}\n\n\tLocalStorage.getItem=function(key){\n\t\treturn LocalStorage._baseClass.getItem(key);\n\t}\n\n\tLocalStorage.setJSON=function(key,value){\n\t\tLocalStorage._baseClass.setJSON(key,value);\n\t}\n\n\tLocalStorage.getJSON=function(key){\n\t\treturn LocalStorage._baseClass.getJSON(key);\n\t}\n\n\tLocalStorage.removeItem=function(key){\n\t\tLocalStorage._baseClass.removeItem(key);\n\t}\n\n\tLocalStorage.clear=function(){\n\t\tLocalStorage._baseClass.clear();\n\t}\n\n\tLocalStorage._baseClass=null;\n\tLocalStorage.items=null;\n\tLocalStorage.support=false;\n\tLocalStorage.__init$=function(){\n\t\t//class Storage\n\t\tStorage=(function(){\n\t\t\tfunction Storage(){}\n\t\t\t__class(Storage,'');\n\t\t\tStorage.init=function(){\n\t\t\t\t/*__JS__ */try{Storage.support=true;Storage.items=window.localStorage;Storage.setItem('laya','1');Storage.removeItem('laya');}catch(e){Storage.support=false;}if(!Storage.support)console.log('LocalStorage is not supprot or browser is private mode.');\n\t\t\t}\n\t\t\tStorage.setItem=function(key,value){\n\t\t\t\ttry {\n\t\t\t\t\tStorage.support && Storage.items.setItem(key,value);\n\t\t\t\t\t}catch (e){\n\t\t\t\t\tconsole.warn(\"set localStorage failed\",e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tStorage.getItem=function(key){\n\t\t\t\treturn Storage.support ? Storage.items.getItem(key):null;\n\t\t\t}\n\t\t\tStorage.setJSON=function(key,value){\n\t\t\t\ttry {\n\t\t\t\t\tStorage.support && Storage.items.setItem(key,JSON.stringify(value));\n\t\t\t\t\t}catch (e){\n\t\t\t\t\tconsole.warn(\"set localStorage failed\",e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tStorage.getJSON=function(key){\n\t\t\t\treturn JSON.parse(Storage.support ? Storage.items.getItem(key):null);\n\t\t\t}\n\t\t\tStorage.removeItem=function(key){\n\t\t\t\tStorage.support && Storage.items.removeItem(key);\n\t\t\t}\n\t\t\tStorage.clear=function(){\n\t\t\t\tStorage.support && Storage.items.clear();\n\t\t\t}\n\t\t\tStorage.items=null;\n\t\t\tStorage.support=false;\n\t\t\treturn Storage;\n\t\t})()\n\t}\n\n\treturn LocalStorage;\n})()\n\n\n/**\n*<p>资源版本的生成由layacmd或IDE完成，使用 <code>ResourceVersion</code> 简化使用过程。</p>\n*<p>调用 <code>enable</code> 启用资源版本管理。</p>\n*/\n//class laya.net.ResourceVersion\nvar ResourceVersion=(function(){\n\tfunction ResourceVersion(){}\n\t__class(ResourceVersion,'laya.net.ResourceVersion');\n\tResourceVersion.enable=function(manifestFile,callback,type){\n\t\t(type===void 0)&& (type=2);\n\t\tlaya.net.ResourceVersion.type=type;\n\t\tLaya.loader.load(manifestFile,Handler.create(null,ResourceVersion.onManifestLoaded,[callback]),null,/*laya.net.Loader.JSON*/\"json\");\n\t}\n\n\tResourceVersion.onManifestLoaded=function(callback,data){\n\t\tURL.customFormat=ResourceVersion.addVersionPrefix;\n\t\tResourceVersion.manifest=data;\n\t\tcallback.run();\n\t\tif (!data){\n\t\t\tconsole.warn(\"资源版本清单文件不存在，不使用资源版本管理。忽略ERR_FILE_NOT_FOUND错误。\");\n\t\t}\n\t}\n\n\tResourceVersion.addVersionPrefix=function(originURL){\n\t\tif (ResourceVersion.manifest && ResourceVersion.manifest[originURL]){\n\t\t\tif (ResourceVersion.type==2)return ResourceVersion.manifest[originURL];\n\t\t\treturn ResourceVersion.manifest[originURL]+\"/\"+originURL;\n\t\t}\n\t\treturn originURL;\n\t}\n\n\tResourceVersion.FOLDER_VERSION=1;\n\tResourceVersion.FILENAME_VERSION=2;\n\tResourceVersion.manifest=null;\n\tResourceVersion.type=1;\n\treturn ResourceVersion;\n})()\n\n\n/**\n*@private\n*/\n//class laya.net.TTFLoader\nvar TTFLoader=(function(){\n\tfunction TTFLoader(){\n\t\tthis.fontName=null;\n\t\tthis.complete=null;\n\t\tthis.err=null;\n\t\tthis._fontTxt=null;\n\t\tthis._url=null;\n\t\tthis._div=null;\n\t\tthis._txtWidth=NaN;\n\t\tthis._http=null;\n\t}\n\n\t__class(TTFLoader,'laya.net.TTFLoader');\n\tvar __proto=TTFLoader.prototype;\n\t__proto.load=function(fontPath){\n\t\tthis._url=fontPath;\n\t\tvar tArr=fontPath.split(\".ttf\")[0].split(\"/\");\n\t\tthis.fontName=tArr[tArr.length-1];\n\t\tif (Browser.window.conch){\n\t\t\tthis._loadConch();\n\t\t}else\n\t\tif (Browser.window.FontFace){\n\t\t\tthis._loadWithFontFace()\n\t\t}\n\t\telse {\n\t\t\tthis._loadWithCSS();\n\t\t}\n\t}\n\n\t__proto._loadConch=function(){\n\t\tthis._http=new HttpRequest();\n\t\tthis._http.on(/*laya.events.Event.ERROR*/\"error\",this,this._onErr);\n\t\tthis._http.on(/*laya.events.Event.COMPLETE*/\"complete\",this,this._onHttpLoaded);\n\t\tthis._http.send(this._url,null,\"get\",/*laya.net.Loader.BUFFER*/\"arraybuffer\");\n\t}\n\n\t__proto._onHttpLoaded=function(data){\n\t\tBrowser.window.conch.setFontFaceFromBuffer(this.fontName,data);\n\t\tthis._clearHttp();\n\t\tthis._complete();\n\t}\n\n\t__proto._clearHttp=function(){\n\t\tif (this._http){\n\t\t\tthis._http.off(/*laya.events.Event.ERROR*/\"error\",this,this._onErr);\n\t\t\tthis._http.off(/*laya.events.Event.COMPLETE*/\"complete\",this,this._onHttpLoaded);\n\t\t\tthis._http=null;\n\t\t}\n\t}\n\n\t__proto._onErr=function(){\n\t\tthis._clearHttp();\n\t\tif (this.err){\n\t\t\tthis.err.runWith(\"fail:\"+this._url);\n\t\t\tthis.err=null;\n\t\t}\n\t}\n\n\t__proto._complete=function(){\n\t\tLaya.timer.clear(this,this._complete);\n\t\tLaya.timer.clear(this,this._checkComplete);\n\t\tif (this._div && this._div.parentNode){\n\t\t\tthis._div.parentNode.removeChild(this._div);\n\t\t\tthis._div=null;\n\t\t}\n\t\tif (this.complete){\n\t\t\tthis.complete.runWith(this);\n\t\t\tthis.complete=null;\n\t\t}\n\t}\n\n\t__proto._checkComplete=function(){\n\t\tif (RunDriver.measureText(\"LayaTTFFont\",this._fontTxt).width !=this._txtWidth){\n\t\t\tthis._complete();\n\t\t}\n\t}\n\n\t__proto._loadWithFontFace=function(){\n\t\tvar fontFace=new Browser.window.FontFace(this.fontName,\"url('\"+this._url+\"')\");\n\t\tBrowser.window.document.fonts.add(fontFace);\n\t\tvar self=this;\n\t\tfontFace.loaded.then((function(){\n\t\t\tself._complete()\n\t\t}));\n\t\tfontFace.load();\n\t}\n\n\t__proto._createDiv=function(){\n\t\tthis._div=Browser.createElement(\"div\");\n\t\tthis._div.innerHTML=\"laya\";\n\t\tvar _style=this._div.style;\n\t\t_style.fontFamily=this.fontName;\n\t\t_style.position=\"absolute\";\n\t\t_style.left=\"-100px\";\n\t\t_style.top=\"-100px\";\n\t\tBrowser.document.body.appendChild(this._div);\n\t}\n\n\t__proto._loadWithCSS=function(){\n\t\tvar _$this=this;\n\t\tvar fontStyle=Browser.createElement(\"style\");\n\t\tfontStyle.type=\"text/css\";\n\t\tBrowser.document.body.appendChild(fontStyle);\n\t\tfontStyle.textContent=\"@font-face { font-family:'\"+this.fontName+\"'; src:url('\"+this._url+\"');}\";\n\t\tthis._fontTxt=\"40px \"+this.fontName;\n\t\tthis._txtWidth=RunDriver.measureText(\"LayaTTFFont\",this._fontTxt).width;\n\t\tvar self=this;\n\t\tfontStyle.onload=function (){\n\t\t\tLaya.timer.once(10000,self,_$this._complete);\n\t\t};\n\t\tLaya.timer.loop(20,this,this._checkComplete);\n\t\tthis._createDiv();\n\t}\n\n\tTTFLoader._testString=\"LayaTTFFont\";\n\treturn TTFLoader;\n})()\n\n\n/**\n*<p> <code>URL</code> 类用于定义地址信息。</p>\n*/\n//class laya.net.URL\nvar URL=(function(){\n\tfunction URL(url){\n\t\t/**@private */\n\t\tthis._url=null;\n\t\t/**@private */\n\t\tthis._path=null;\n\t\tthis._url=URL.formatURL(url);\n\t\tthis._path=URL.getPath(url);\n\t}\n\n\t__class(URL,'laya.net.URL');\n\tvar __proto=URL.prototype;\n\t/**地址的路径。*/\n\t__getset(0,__proto,'path',function(){\n\t\treturn this._path;\n\t});\n\n\t/**格式化后的地址。*/\n\t__getset(0,__proto,'url',function(){\n\t\treturn this._url;\n\t});\n\n\tURL.formatURL=function(url,base){\n\t\tif (!url)return \"null path\";\n\t\tif (url.indexOf(\":\")> 0)return url;\n\t\tif (URL.customFormat !=null)url=URL.customFormat(url,base);\n\t\tvar char1=url.charAt(0);\n\t\tif (char1===\".\"){\n\t\t\treturn URL.formatRelativePath((base || URL.basePath)+url);\n\t\t\t}else if (char1==='~'){\n\t\t\treturn URL.rootPath+url.substring(1);\n\t\t\t}else if (char1===\"d\"){\n\t\t\tif (url.indexOf(\"data:image\")===0)return url;\n\t\t\t}else if (char1===\"/\"){\n\t\t\treturn url;\n\t\t}\n\t\treturn (base || URL.basePath)+url;\n\t}\n\n\tURL.formatRelativePath=function(value){\n\t\tvar parts=value.split(\"/\");\n\t\tfor (var i=0,len=parts.length;i < len;i++){\n\t\t\tif (parts[i]=='..'){\n\t\t\t\tparts.splice(i-1,2);\n\t\t\t\ti-=2;\n\t\t\t}\n\t\t}\n\t\treturn parts.join('/');\n\t}\n\n\tURL.isAbsolute=function(url){\n\t\treturn url.indexOf(\":\")> 0 || url.charAt(0)=='/';\n\t}\n\n\tURL.getPath=function(url){\n\t\tvar ofs=url.lastIndexOf('/');\n\t\treturn ofs > 0 ? url.substr(0,ofs+1):\"\";\n\t}\n\n\tURL.getFileName=function(url){\n\t\tvar ofs=url.lastIndexOf('/');\n\t\treturn ofs > 0 ? url.substr(ofs+1):url;\n\t}\n\n\tURL.version={};\n\tURL.basePath=\"\";\n\tURL.rootPath=\"\";\n\tURL.customFormat=function(url){\n\t\tvar newUrl=URL.version[url];\n\t\tif (!Render.isConchApp && newUrl)url+=\"?v=\"+newUrl;\n\t\treturn url;\n\t}\n\n\treturn URL;\n})()\n\n\n/**\n*@private\n*<code>Render</code> 是渲染管理类。它是一个单例，可以使用 Laya.render 访问。\n*/\n//class laya.renders.Render\nvar Render=(function(){\n\tfunction Render(width,height){\n\t\t/**@private */\n\t\tthis._timeId=0;\n\t\tvar style=Render._mainCanvas.source.style;\n\t\tstyle.position='absolute';\n\t\tstyle.top=style.left=\"0px\";\n\t\tstyle.background=\"#000000\";\n\t\tRender._mainCanvas.source.id=\"layaCanvas\";\n\t\tvar isWebGl=laya.renders.Render.isWebGL;\n\t\tRender._mainCanvas.source.width=width;\n\t\tRender._mainCanvas.source.height=height;\n\t\tisWebGl && Render.WebGL.init(Render._mainCanvas,width,height);\n\t\tif(!Browser.onKGMiniGame)\n\t\t\tBrowser.container.appendChild(Render._mainCanvas.source);\n\t\tRender._context=new RenderContext(width,height,isWebGl ? null :Render._mainCanvas);\n\t\tRender._context.ctx.setIsMainContext();\n\t\tBrowser.window.requestAnimationFrame(loop);\n\t\tfunction loop (stamp){\n\t\t\tLaya.stage._loop();\n\t\t\tBrowser.window.requestAnimationFrame(loop);\n\t\t}\n\t\tLaya.stage.on(\"visibilitychange\",this,this._onVisibilitychange);\n\t}\n\n\t__class(Render,'laya.renders.Render');\n\tvar __proto=Render.prototype;\n\t/**@private */\n\t__proto._onVisibilitychange=function(){\n\t\tif (!Laya.stage.isVisibility){\n\t\t\tthis._timeId=Browser.window.setInterval(this._enterFrame,1000);\n\t\t\t}else if (this._timeId !=0){\n\t\t\tBrowser.window.clearInterval(this._timeId);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._enterFrame=function(e){\n\t\tLaya.stage._loop();\n\t}\n\n\t/**目前使用的渲染器。*/\n\t__getset(1,Render,'context',function(){\n\t\treturn Render._context;\n\t});\n\n\t/**渲染使用的原生画布引用。 */\n\t__getset(1,Render,'canvas',function(){\n\t\treturn Render._mainCanvas.source;\n\t});\n\n\tRender._context=null;\n\tRender._mainCanvas=null;\n\tRender.WebGL=null;\n\tRender.isConchNode=false;\n\tRender.isConchApp=false;\n\tRender.isConchWebGL=false;\n\tRender.isWebGL=false;\n\tRender.is3DMode=false;\n\tRender.optimizeTextureMemory=function(url,texture){\n\t\treturn true;\n\t}\n\n\tRender.__init$=function(){\n\t\t/*__JS__ */window.ConchRenderType=window.ConchRenderType||1;\n\t\t/*__JS__ */window.ConchRenderType|=(!window.conch?0:0x04);;{\n\t\t\tRender.isConchNode=/*__JS__ */(window.ConchRenderType & 5)==5;\n\t\t\tRender.isConchApp=/*__JS__ */(window.ConchRenderType & 0x04)==0x04;\n\t\t\tRender.isConchWebGL=/*__JS__ */window.ConchRenderType==6;\n\t\t};;\n\t}\n\n\treturn Render;\n})()\n\n\n/**\n*@private\n*渲染环境\n*/\n//class laya.renders.RenderContext\nvar RenderContext=(function(){\n\tfunction RenderContext(width,height,canvas){\n\t\t/**全局x坐标 */\n\t\tthis.x=0;\n\t\t/**全局y坐标 */\n\t\tthis.y=0;\n\t\t/**当前使用的画布 */\n\t\t//this.canvas=null;\n\t\t/**当前使用的画布上下文 */\n\t\t//this.ctx=null;\n\t\tthis._drawTexture=function(x,y,args){\n\t\t\tif (args[0].loaded)this.ctx.drawTexture(args[0],args[1],args[2],args[3],args[4],x,y);\n\t\t}\n\t\tthis._fillTexture=function(x,y,args){\n\t\t\tif (args[0].loaded)this.ctx.fillTexture(args[0],args[1]+x,args[2]+y,args[3],args[4],args[5],args[6],args[7]);\n\t\t}\n\t\tthis._drawTextureWithTransform=function(x,y,args){\n\t\t\tif (args[0].loaded)this.ctx.drawTextureWithTransform(args[0],args[1],args[2],args[3],args[4],args[5],x,y,args[6]);\n\t\t}\n\t\tthis._fillQuadrangle=function(x,y,args){\n\t\t\tthis.ctx.fillQuadrangle(args[0],args[1],args[2],args[3],args[4]);\n\t\t}\n\t\tthis._drawRect=function(x,y,args){\n\t\t\tvar ctx=this.ctx;\n\t\t\tif (args[4] !=null){\n\t\t\t\tctx.fillStyle=args[4];\n\t\t\t\tctx.fillRect(x+args[0],y+args[1],args[2],args[3],null);\n\t\t\t}\n\t\t\tif (args[5] !=null){\n\t\t\t\tctx.strokeStyle=args[5];\n\t\t\t\tctx.lineWidth=args[6];\n\t\t\t\tctx.strokeRect(x+args[0],y+args[1],args[2],args[3],args[6]);\n\t\t\t}\n\t\t}\n\t\t//矢量方法\n\t\tthis._drawPie=function(x,y,args){\n\t\t\tvar ctx=this.ctx;\n\t\t\tRender.isWebGL && ctx.setPathId(args[8]);\n\t\t\tctx.beginPath();\n\t\t\tif (Render.isWebGL){\n\t\t\t\tctx.movePath(args[0]+x,args[1]+y);\n\t\t\t\tctx.moveTo(0,0);\n\t\t\t\t}else {\n\t\t\t\tctx.moveTo(x+args[0],y+args[1]);\n\t\t\t}\n\t\t\tctx.arc(x+args[0],y+args[1],args[2],args[3],args[4]);\n\t\t\tctx.closePath();\n\t\t\tthis._fillAndStroke(args[5],args[6],args[7],true);\n\t\t}\n\t\tthis._clipRect=function(x,y,args){\n\t\t\tthis.ctx.clipRect(x+args[0],y+args[1],args[2],args[3]);\n\t\t}\n\t\tthis._fillRect=function(x,y,args){\n\t\t\tthis.ctx.fillRect(x+args[0],y+args[1],args[2],args[3],args[4]);\n\t\t}\n\t\tthis._drawCircle=function(x,y,args){\n\t\t\tvar ctx=this.ctx;\n\t\t\tRender.isWebGL && ctx.setPathId(args[6]);\n\t\t\tStat.drawCall++;\n\t\t\tctx.beginPath();\n\t\t\tRender.isWebGL && ctx.movePath(args[0]+x,args[1]+y);\n\t\t\tctx.arc(args[0]+x,args[1]+y,args[2],0,RenderContext.PI2);\n\t\t\tctx.closePath();\n\t\t\tthis._fillAndStroke(args[3],args[4],args[5],true);\n\t\t}\n\t\tthis._fillCircle=function(x,y,args){\n\t\t\tStat.drawCall++;\n\t\t\tvar ctx=this.ctx;\n\t\t\tctx.beginPath();\n\t\t\tctx.fillStyle=args[3];\n\t\t\tctx.arc(args[0]+x,args[1]+y,args[2],0,RenderContext.PI2);\n\t\t\tctx.fill();\n\t\t}\n\t\tthis._setShader=function(x,y,args){\n\t\t\tthis.ctx.setShader(args[0]);\n\t\t}\n\t\tthis._drawLine=function(x,y,args){\n\t\t\tvar ctx=this.ctx;\n\t\t\tRender.isWebGL && ctx.setPathId(args[6]);\n\t\t\tctx.beginPath();\n\t\t\tctx.strokeStyle=args[4];\n\t\t\tctx.lineWidth=args[5];\n\t\t\tif (Render.isWebGL){\n\t\t\t\tctx.movePath(x,y);\n\t\t\t\tctx.moveTo(args[0],args[1]);\n\t\t\t\tctx.lineTo(args[2],args[3]);\n\t\t\t\t}else {\n\t\t\t\tctx.moveTo(x+args[0],y+args[1]);\n\t\t\t\tctx.lineTo(x+args[2],y+args[3]);\n\t\t\t}\n\t\t\tctx.stroke();\n\t\t}\n\t\tthis._drawLines=function(x,y,args){\n\t\t\tvar ctx=this.ctx;\n\t\t\tRender.isWebGL && ctx.setPathId(args[5]);\n\t\t\tctx.beginPath();\n\t\t\tx+=args[0],y+=args[1];\n\t\t\tRender.isWebGL && ctx.movePath(x,y);\n\t\t\tctx.strokeStyle=args[3];\n\t\t\tctx.lineWidth=args[4];\n\t\t\tvar points=args[2];\n\t\t\tvar i=2,n=points.length;\n\t\t\tif (Render.isWebGL){\n\t\t\t\tctx.moveTo(points[0],points[1]);\n\t\t\t\twhile (i < n){\n\t\t\t\t\tctx.lineTo(points[i++],points[i++]);\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tctx.moveTo(x+points[0],y+points[1]);\n\t\t\t\twhile (i < n){\n\t\t\t\t\tctx.lineTo(x+points[i++],y+points[i++]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tctx.stroke();\n\t\t}\n\t\tthis._drawLinesWebGL=function(x,y,args){\n\t\t\tthis.ctx.drawLines(x+this.x+args[0],y+this.y+args[1],args[2],args[3],args[4]);\n\t\t}\n\t\t//x:Number,y:Number,points:Array,lineColor:String,lineWidth:Number=1\n\t\tthis._drawCurves=function(x,y,args){\n\t\t\tthis.ctx.drawCurves(x,y,args);\n\t\t}\n\t\tthis._draw=function(x,y,args){\n\t\t\targs[0].call(null,this,x,y);\n\t\t}\n\t\tthis._transformByMatrix=function(x,y,args){\n\t\t\tthis.ctx.transformByMatrix(args[0]);\n\t\t}\n\t\tthis._setTransform=function(x,y,args){\n\t\t\tthis.ctx.setTransform(args[0],args[1],args[2],args[3],args[4],args[5]);\n\t\t}\n\t\tthis._setTransformByMatrix=function(x,y,args){\n\t\t\tthis.ctx.setTransformByMatrix(args[0]);\n\t\t}\n\t\tthis._save=function(x,y,args){\n\t\t\tthis.ctx.save();\n\t\t}\n\t\tthis._restore=function(x,y,args){\n\t\t\tthis.ctx.restore();\n\t\t}\n\t\tthis._translate=function(x,y,args){\n\t\t\tthis.ctx.translate(args[0],args[1]);\n\t\t}\n\t\tthis._transform=function(x,y,args){\n\t\t\tthis.ctx.translate(args[1]+x,args[2]+y);\n\t\t\tvar mat=args[0];\n\t\t\tthis.ctx.transform(mat.a,mat.b,mat.c,mat.d,mat.tx,mat.ty);\n\t\t\tthis.ctx.translate(-x-args[1],-y-args[2]);\n\t\t}\n\t\tthis._rotate=function(x,y,args){\n\t\t\tthis.ctx.translate(args[1]+x,args[2]+y);\n\t\t\tthis.ctx.rotate(args[0]);\n\t\t\tthis.ctx.translate(-x-args[1],-y-args[2]);\n\t\t}\n\t\tthis._scale=function(x,y,args){\n\t\t\tthis.ctx.translate(args[2]+x,args[3]+y);\n\t\t\tthis.ctx.scale(args[0],args[1]);\n\t\t\tthis.ctx.translate(-x-args[2],-y-args[3]);\n\t\t}\n\t\tthis._alpha=function(x,y,args){\n\t\t\tthis.ctx.globalAlpha *=args[0];\n\t\t}\n\t\tthis._setAlpha=function(x,y,args){\n\t\t\tthis.ctx.globalAlpha=args[0];\n\t\t}\n\t\tthis._fillText=function(x,y,args){\n\t\t\tthis.ctx.fillText(args[0],args[1]+x,args[2]+y,args[3],args[4],args[5]);\n\t\t}\n\t\tthis._strokeText=function(x,y,args){\n\t\t\tthis.ctx.strokeText(args[0],args[1]+x,args[2]+y,args[3],args[4],args[5],args[6]);\n\t\t}\n\t\tthis._fillBorderText=function(x,y,args){\n\t\t\tthis.ctx.fillBorderText(args[0],args[1]+x,args[2]+y,args[3],args[4],args[5],args[6],args[7]);\n\t\t}\n\t\tthis._blendMode=function(x,y,args){\n\t\t\tthis.ctx.globalCompositeOperation=args[0];\n\t\t}\n\t\tthis._beginClip=function(x,y,args){\n\t\t\tthis.ctx.beginClip && this.ctx.beginClip(x+args[0],y+args[1],args[2],args[3]);\n\t\t}\n\t\tthis._setIBVB=function(x,y,args){\n\t\t\tthis.ctx.setIBVB(args[0]+x,args[1]+y,args[2],args[3],args[4],args[5],args[6],args[7]);\n\t\t}\n\t\tthis._fillTrangles=function(x,y,args){\n\t\t\tthis.ctx.fillTrangles(args[0],args[1]+x,args[2]+y,args[3],args[4]);\n\t\t}\n\t\t//x:Number,y:Number,paths:Array,brush:Object=null,pen:Object=null\n\t\tthis._drawPath=function(x,y,args){\n\t\t\tvar ctx=this.ctx;\n\t\t\tRender.isWebGL && ctx.setPathId(-1);\n\t\t\tctx.beginPath();\n\t\t\tx+=args[0],y+=args[1];\n\t\t\tRender.isWebGL && ctx.movePath(x,y);\n\t\t\tvar paths=args[2];\n\t\t\tfor (var i=0,n=paths.length;i < n;i++){\n\t\t\t\tvar path=paths[i];\n\t\t\t\tswitch (path[0]){\n\t\t\t\t\tcase \"moveTo\":\n\t\t\t\t\t\tRender.isWebGL ? ctx.moveTo(path[1],path[2]):ctx.moveTo(x+path[1],y+path[2]);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"lineTo\":\n\t\t\t\t\t\tRender.isWebGL ? ctx.lineTo(path[1],path[2]):ctx.lineTo(x+path[1],y+path[2]);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"arcTo\":\n\t\t\t\t\t\tRender.isWebGL ? ctx.arcTo(path[1],path[2],path[3],path[4],path[5]):ctx.arcTo(x+path[1],y+path[2],x+path[3],y+path[4],path[5]);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"closePath\":\n\t\t\t\t\t\tctx.closePath();\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t};\n\t\t\tvar brush=args[3];\n\t\t\tif (brush !=null){\n\t\t\t\tctx.fillStyle=brush.fillStyle;\n\t\t\t\tctx.fill();\n\t\t\t};\n\t\t\tvar pen=args[4];\n\t\t\tif (pen !=null){\n\t\t\t\tctx.strokeStyle=pen.strokeStyle;\n\t\t\t\tctx.lineWidth=pen.lineWidth || 1;\n\t\t\t\tctx.lineJoin=pen.lineJoin;\n\t\t\t\tctx.lineCap=pen.lineCap;\n\t\t\t\tctx.miterLimit=pen.miterLimit;\n\t\t\t\tctx.stroke();\n\t\t\t}\n\t\t}\n\t\t// polygon(x:Number,y:Number,r:Number,edges:Number,color:uint,borderWidth:int=2,borderColor:uint=0)\n\t\tthis.drawPoly=function(x,y,args){\n\t\t\tthis.ctx.drawPoly(x+this.x+args[0],y+this.y+args[1],args[2],args[3],args[4],args[5],args[6]);\n\t\t}\n\t\t//x:Number,y:Number,points:Array,fillColor:String,lineColor:String=null,lineWidth:Number=1\n\t\tthis._drawPoly=function(x,y,args){\n\t\t\tvar ctx=this.ctx;\n\t\t\tvar points=args[2];\n\t\t\tvar i=2,n=points.length;\n\t\t\tif (Render.isWebGL){\n\t\t\t\tctx.setPathId(args[6]);\n\t\t\t\tctx.beginPath();\n\t\t\t\tx+=args[0],y+=args[1];\n\t\t\t\tctx.movePath(x,y);\n\t\t\t\tctx.moveTo(points[0],points[1]);\n\t\t\t\twhile (i < n){\n\t\t\t\t\tctx.lineTo(points[i++],points[i++]);\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tctx.beginPath();\n\t\t\t\tx+=args[0],y+=args[1];\n\t\t\t\tctx.moveTo(x+points[0],y+points[1]);\n\t\t\t\twhile (i < n){\n\t\t\t\t\tctx.lineTo(x+points[i++],y+points[i++]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tctx.closePath();\n\t\t\tthis._fillAndStroke(args[3],args[4],args[5],args[7]);\n\t\t}\n\t\tthis._drawSkin=function(x,y,args){\n\t\t\tvar tSprite=args[0];\n\t\t\tif (tSprite){\n\t\t\t\tvar ctx=this.ctx;\n\t\t\t\ttSprite.render(ctx,x,y);\n\t\t\t}\n\t\t}\n\t\tthis._drawParticle=function(x,y,args){\n\t\t\tthis.ctx.drawParticle(x+this.x,y+this.y,args[0]);\n\t\t}\n\t\tthis._setFilters=function(x,y,args){\n\t\t\tthis.ctx.setFilters(args);\n\t\t}\n\t\tif (canvas){\n\t\t\tthis.ctx=canvas.getContext('2d');\n\t\t\t}else {\n\t\t\tcanvas=HTMLCanvas.create(\"3D\");\n\t\t\tthis.ctx=RunDriver.createWebGLContext2D(canvas);\n\t\t\tcanvas._setContext(this.ctx);\n\t\t}\n\t\tcanvas.size(width,height);\n\t\tthis.canvas=canvas;\n\t}\n\n\t__class(RenderContext,'laya.renders.RenderContext');\n\tvar __proto=RenderContext.prototype;\n\t/**销毁当前渲染环境*/\n\t__proto.destroy=function(){\n\t\tif (this.canvas){\n\t\t\tthis.canvas.destroy();\n\t\t\tthis.canvas=null;\n\t\t\tthis.ctx=null;\n\t\t}\n\t\tif (this.ctx){\n\t\t\tthis.ctx.destroy();\n\t\t\tthis.ctx=null;\n\t\t}\n\t}\n\n\t__proto.drawTexture=function(tex,x,y,width,height){\n\t\tif (tex.loaded)this.ctx.drawTexture(tex,x,y,width,height,this.x,this.y);\n\t}\n\n\t__proto._drawTextures=function(x,y,args){\n\t\tif (args[0].loaded)this.ctx.drawTextures(args[0],args[1],x+this.x,y+this.y);\n\t}\n\n\t__proto.drawTextureWithTransform=function(tex,x,y,width,height,m,alpha){\n\t\tif (tex.loaded)this.ctx.drawTextureWithTransform(tex,x,y,width,height,m,this.x,this.y,alpha);\n\t}\n\n\t__proto.fillQuadrangle=function(tex,x,y,point4,m){\n\t\tthis.ctx.fillQuadrangle(tex,x,y,point4,m);\n\t}\n\n\t__proto.drawCanvas=function(canvas,x,y,width,height){\n\t\tthis.ctx.drawCanvas(canvas,x+this.x,y+this.y,width,height);\n\t}\n\n\t__proto.drawRect=function(x,y,width,height,color,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar ctx=this.ctx;\n\t\tctx.strokeStyle=color;\n\t\tctx.lineWidth=lineWidth;\n\t\tctx.strokeRect(x+this.x,y+this.y,width,height,lineWidth);\n\t}\n\n\t__proto._fillAndStroke=function(fillColor,strokeColor,lineWidth,isConvexPolygon){\n\t\t(isConvexPolygon===void 0)&& (isConvexPolygon=false);\n\t\tvar ctx=this.ctx;\n\t\tif (fillColor !=null){\n\t\t\tctx.fillStyle=fillColor;\n\t\t\tif (Render.isWebGL){\n\t\t\t\tctx.fill(isConvexPolygon);\n\t\t\t\t}else {\n\t\t\t\tctx.fill();\n\t\t\t}\n\t\t}\n\t\tif (strokeColor !=null && lineWidth > 0){\n\t\t\tctx.strokeStyle=strokeColor;\n\t\t\tctx.lineWidth=lineWidth;\n\t\t\tctx.stroke();\n\t\t}\n\t}\n\n\t//ctx.translate(-x-args[0],-y-args[1]);\n\t__proto.clipRect=function(x,y,width,height){\n\t\tthis.ctx.clipRect(x+this.x,y+this.y,width,height);\n\t}\n\n\t__proto.fillRect=function(x,y,width,height,fillStyle){\n\t\tthis.ctx.fillRect(x+this.x,y+this.y,width,height,fillStyle);\n\t}\n\n\t__proto.drawCircle=function(x,y,radius,color,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tStat.drawCall++;\n\t\tvar ctx=this.ctx;\n\t\tctx.beginPath();\n\t\tctx.strokeStyle=color;\n\t\tctx.lineWidth=lineWidth;\n\t\tctx.arc(x+this.x,y+this.y,radius,0,RenderContext.PI2);\n\t\tctx.stroke();\n\t}\n\n\t/**\n\t*绘制三角形\n\t*@param x\n\t*@param y\n\t*@param tex\n\t*@param args [x,y,texture,vertices,indices,uvs,matrix]\n\t*/\n\t__proto.drawTriangles=function(x,y,args){\n\t\tif (Render.isWebGL){\n\t\t\tthis.ctx.drawTriangles(args[0],x+args[1],y+args[2],args[3],args[4],args[5],args[6],args[7],args[8],args[9]);\n\t\t\t}else {\n\t\t\tvar indices=args[5];\n\t\t\tvar i=0,len=indices.length;\n\t\t\tvar ctx=this.ctx;\n\t\t\tfor (i=0;i < len;i+=3){\n\t\t\t\tvar index0=indices[i] *2;\n\t\t\t\tvar index1=indices[i+1] *2;\n\t\t\t\tvar index2=indices[i+2] *2;\n\t\t\t\tctx.drawTriangle(args[0],args[3],args[4],index0,index1,index2,args[6],true);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.fillCircle=function(x,y,radius,color){\n\t\tStat.drawCall++;\n\t\tvar ctx=this.ctx;\n\t\tctx.beginPath();\n\t\tctx.fillStyle=color;\n\t\tctx.arc(x+this.x,y+this.y,radius,0,RenderContext.PI2);\n\t\tctx.fill();\n\t}\n\n\t__proto.setShader=function(shader){\n\t\tthis.ctx.setShader(shader);\n\t}\n\n\t__proto.drawLine=function(fromX,fromY,toX,toY,color,lineWidth){\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar ctx=this.ctx;\n\t\tctx.beginPath();\n\t\tctx.strokeStyle=color;\n\t\tctx.lineWidth=lineWidth;\n\t\tctx.moveTo(this.x+fromX,this.y+fromY);\n\t\tctx.lineTo(this.x+toX,this.y+toY);\n\t\tctx.stroke();\n\t}\n\n\t__proto.clear=function(){\n\t\tthis.ctx.clear();\n\t}\n\n\t__proto.transformByMatrix=function(value){\n\t\tthis.ctx.transformByMatrix(value);\n\t}\n\n\t__proto.setTransform=function(a,b,c,d,tx,ty){\n\t\tthis.ctx.setTransform(a,b,c,d,tx,ty);\n\t}\n\n\t__proto.setTransformByMatrix=function(value){\n\t\tthis.ctx.setTransformByMatrix(value);\n\t}\n\n\t__proto.save=function(){\n\t\tthis.ctx.save();\n\t}\n\n\t__proto.restore=function(){\n\t\tthis.ctx.restore();\n\t}\n\n\t__proto.translate=function(x,y){\n\t\tthis.ctx.translate(x,y);\n\t}\n\n\t__proto.transform=function(a,b,c,d,tx,ty){\n\t\tthis.ctx.transform(a,b,c,d,tx,ty);\n\t}\n\n\t__proto.rotate=function(angle){\n\t\tthis.ctx.rotate(angle);\n\t}\n\n\t__proto.scale=function(scaleX,scaleY){\n\t\tthis.ctx.scale(scaleX,scaleY);\n\t}\n\n\t__proto.alpha=function(value){\n\t\tthis.ctx.globalAlpha *=value;\n\t}\n\n\t__proto.setAlpha=function(value){\n\t\tthis.ctx.globalAlpha=value;\n\t}\n\n\t__proto.fillWords=function(words,x,y,font,color,underLine){\n\t\t(underLine===void 0)&& (underLine=0);\n\t\tthis.ctx.fillWords(words,x,y,font,color,underLine);\n\t}\n\n\t/***@private */\n\t__proto.fillBorderWords=function(words,x,y,font,fillColor,borderColor,lineWidth){\n\t\tthis.ctx.fillBorderWords(words,x,y,font,fillColor,borderColor,lineWidth);\n\t}\n\n\t__proto.fillText=function(text,x,y,font,color,textAlign){\n\t\tthis.ctx.fillText(text,x+this.x,y+this.y,font,color,textAlign);\n\t}\n\n\t__proto.strokeText=function(text,x,y,font,color,lineWidth,textAlign){\n\t\tthis.ctx.strokeText(text,x+this.x,y+this.y,font,color,lineWidth,textAlign);\n\t}\n\n\t__proto.blendMode=function(type){\n\t\tthis.ctx.globalCompositeOperation=type;\n\t}\n\n\t__proto.flush=function(){\n\t\tthis.ctx.flush && this.ctx.flush();\n\t}\n\n\t__proto.addRenderObject=function(o){\n\t\tthis.ctx.addRenderObject(o);\n\t}\n\n\t__proto.beginClip=function(x,y,w,h){\n\t\tthis.ctx.beginClip && this.ctx.beginClip(x,y,w,h);\n\t}\n\n\t__proto.endClip=function(){\n\t\tthis.ctx.endClip && this.ctx.endClip();\n\t}\n\n\t__proto.fillTrangles=function(x,y,args){\n\t\tthis.ctx.fillTrangles(args[0],args[1],args[2],args[3],args.length > 4 ? args[4] :null);\n\t}\n\n\tRenderContext.PI2=2 *Math.PI;\n\treturn RenderContext;\n})()\n\n\n/**\n*@private\n*精灵渲染器\n*/\n//class laya.renders.RenderSprite\nvar RenderSprite=(function(){\n\tfunction RenderSprite(type,next){\n\t\t/**@private */\n\t\t//this._next=null;\n\t\t/**@private */\n\t\t//this._fun=null;\n\t\tthis._next=next || RenderSprite.NORENDER;\n\t\tswitch (type){\n\t\t\tcase 0:\n\t\t\t\tthis._fun=this._no;\n\t\t\t\treturn;\n\t\t\tcase 0x01:\n\t\t\t\tthis._fun=this._image;\n\t\t\t\treturn;\n\t\t\tcase 0x02:\n\t\t\t\tthis._fun=this._alpha;\n\t\t\t\treturn;\n\t\t\tcase 0x04:\n\t\t\t\tthis._fun=this._transform;\n\t\t\t\treturn;\n\t\t\tcase 0x08:\n\t\t\t\tthis._fun=this._blend;\n\t\t\t\treturn;\n\t\t\tcase 0x10:\n\t\t\t\tthis._fun=this._canvas;\n\t\t\t\treturn;\n\t\t\tcase 0x40:\n\t\t\t\tthis._fun=this._mask;\n\t\t\t\treturn;\n\t\t\tcase 0x80:\n\t\t\t\tthis._fun=this._clip;\n\t\t\t\treturn;\n\t\t\tcase 0x100:\n\t\t\t\tthis._fun=this._style;\n\t\t\t\treturn;\n\t\t\tcase 0x200:\n\t\t\t\tthis._fun=this._graphics;\n\t\t\t\treturn;\n\t\t\tcase 0x800:\n\t\t\t\tthis._fun=this._childs;\n\t\t\t\treturn;\n\t\t\tcase 0x400:\n\t\t\t\tthis._fun=this._custom;\n\t\t\t\treturn;\n\t\t\tcase 0x01 | 0x200:\n\t\t\t\tthis._fun=this._image2;\n\t\t\t\treturn;\n\t\t\tcase 0x01 | 0x04 | 0x200:\n\t\t\t\tthis._fun=this._image2;\n\t\t\t\treturn;\n\t\t\tcase 0x20:\n\t\t\t\tthis._fun=Filter._filter;\n\t\t\t\treturn;\n\t\t\tcase 0x11111:\n\t\t\t\tthis._fun=RenderSprite._initRenderFun;\n\t\t\t\treturn;\n\t\t\t}\n\t\tthis.onCreate(type);\n\t}\n\n\t__class(RenderSprite,'laya.renders.RenderSprite');\n\tvar __proto=RenderSprite.prototype;\n\t__proto.onCreate=function(type){}\n\t__proto._style=function(sprite,context,x,y){\n\t\tsprite._style.render(sprite,context,x,y);\n\t\tvar next=this._next;\n\t\tnext._fun.call(next,sprite,context,x,y);\n\t}\n\n\t__proto._no=function(sprite,context,x,y){}\n\t__proto._custom=function(sprite,context,x,y){\n\t\tsprite.customRender(context,x,y);\n\t\tvar tf=sprite._style._tf;\n\t\tthis._next._fun.call(this._next,sprite,context,x-tf.translateX,y-tf.translateY);\n\t}\n\n\t__proto._clip=function(sprite,context,x,y){\n\t\tvar next=this._next;\n\t\tif (next==RenderSprite.NORENDER)return;\n\t\tvar r=sprite._style.scrollRect;\n\t\tcontext.ctx.save();\n\t\tcontext.ctx.clipRect(x,y,r.width,r.height);\n\t\tnext._fun.call(next,sprite,context,x-r.x,y-r.y);\n\t\tcontext.ctx.restore();\n\t}\n\n\t__proto._blend=function(sprite,context,x,y){\n\t\tvar style=sprite._style;\n\t\tif (style.blendMode){\n\t\t\tcontext.ctx.globalCompositeOperation=style.blendMode;\n\t\t};\n\t\tvar next=this._next;\n\t\tnext._fun.call(next,sprite,context,x,y);\n\t\tcontext.ctx.globalCompositeOperation=\"source-over\";\n\t}\n\n\t__proto._mask=function(sprite,context,x,y){\n\t\tvar next=this._next;\n\t\tnext._fun.call(next,sprite,context,x,y);\n\t\tvar mask=sprite.mask;\n\t\tif (mask){\n\t\t\tcontext.ctx.globalCompositeOperation=\"destination-in\";\n\t\t\tif (mask.numChildren > 0 || !mask.graphics._isOnlyOne()){\n\t\t\t\tmask.cacheAsBitmap=true;\n\t\t\t}\n\t\t\tmask.render(context,x-sprite.pivotX,y-sprite.pivotY);\n\t\t}\n\t\tcontext.ctx.globalCompositeOperation=\"source-over\";\n\t}\n\n\t__proto._graphics=function(sprite,context,x,y){\n\t\tvar tf=sprite._style._tf;\n\t\tsprite._graphics && sprite._graphics._render(sprite,context,x-tf.translateX,y-tf.translateY);\n\t\tvar next=this._next;\n\t\tnext._fun.call(next,sprite,context,x,y);\n\t}\n\n\t__proto._image=function(sprite,context,x,y){\n\t\tvar style=sprite._style;\n\t\tcontext.ctx.drawTexture2(x,y,style._tf.translateX,style._tf.translateY,sprite.transform,style.alpha,style.blendMode,sprite._graphics._one);\n\t}\n\n\t__proto._image2=function(sprite,context,x,y){\n\t\tvar tf=sprite._style._tf;\n\t\tcontext.ctx.drawTexture2(x,y,tf.translateX,tf.translateY,sprite.transform,1,null,sprite._graphics._one);\n\t}\n\n\t__proto._alpha=function(sprite,context,x,y){\n\t\tvar style=sprite._style;\n\t\tvar alpha;\n\t\tif ((alpha=style.alpha)> 0.01 || sprite._needRepaint()){\n\t\t\tvar temp=context.ctx.globalAlpha;\n\t\t\tcontext.ctx.globalAlpha *=alpha;\n\t\t\tvar next=this._next;\n\t\t\tnext._fun.call(next,sprite,context,x,y);\n\t\t\tcontext.ctx.globalAlpha=temp;\n\t\t}\n\t}\n\n\t__proto._transform=function(sprite,context,x,y){\n\t\tvar transform=sprite.transform,_next=this._next;\n\t\tif (transform && _next !=RenderSprite.NORENDER){\n\t\t\tcontext.save();\n\t\t\tcontext.transform(transform.a,transform.b,transform.c,transform.d,transform.tx+x,transform.ty+y);\n\t\t\t_next._fun.call(_next,sprite,context,0,0);\n\t\t\tcontext.restore();\n\t\t}else\n\t\t_next._fun.call(_next,sprite,context,x,y);\n\t}\n\n\t__proto._childs=function(sprite,context,x,y){\n\t\tvar style=sprite._style;\n\t\tvar tf=style._tf;\n\t\tx=x-tf.translateX+style.paddingLeft;\n\t\ty=y-tf.translateY+style.paddingTop;\n\t\tif (style._calculation){\n\t\t\tvar words=sprite._getWords();\n\t\t\tif (words){\n\t\t\t\tvar tStyle=style;\n\t\t\t\tif (tStyle){\n\t\t\t\t\tif (tStyle.stroke){\n\t\t\t\t\t\tcontext.fillBorderWords(words,x,y,tStyle.font,tStyle.color,tStyle.strokeColor,tStyle.stroke);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tcontext.fillWords(words,x,y,tStyle.font,tStyle.color,(tStyle.textDecoration!=\"none\"&&tStyle.underLine)?1:0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar childs=sprite._childs,n=childs.length,ele;\n\t\tif (sprite.viewport || (sprite.optimizeScrollRect && sprite._style.scrollRect)){\n\t\t\tvar rect=sprite.viewport || sprite._style.scrollRect;\n\t\t\tvar left=rect.x;\n\t\t\tvar top=rect.y;\n\t\t\tvar right=rect.right;\n\t\t\tvar bottom=rect.bottom;\n\t\t\tvar _x=NaN,_y=NaN;\n\t\t\tfor (i=0;i < n;++i){\n\t\t\t\tif ((ele=childs [i]).visible && ((_x=ele._x)< right && (_x+ele.width)> left && (_y=ele._y)< bottom && (_y+ele.height)> top)){\n\t\t\t\t\tele.render(context,x,y);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (var i=0;i < n;++i)\n\t\t\t(ele=(childs [i]))._style.visible && ele.render(context,x,y);\n\t\t}\n\t}\n\n\t//}\n\t__proto._canvas=function(sprite,context,x,y){\n\t\tvar _cacheCanvas=sprite._$P.cacheCanvas;\n\t\tif (!_cacheCanvas){\n\t\t\tthis._next._fun.call(this._next,sprite,context,x,y);\n\t\t\treturn;\n\t\t}\n\t\t_cacheCanvas.type==='bitmap' ? (Stat.canvasBitmap++):(Stat.canvasNormal++);\n\t\tvar tx=_cacheCanvas.ctx;\n\t\tif (sprite._needRepaint()|| !tx){\n\t\t\tthis._canvas_repaint(sprite,context,x,y);\n\t\t}\n\t\telse{\n\t\t\tvar tRec=_cacheCanvas._cacheRec;\n\t\t\tcontext.drawCanvas(tx.canvas,x+tRec.x,y+tRec.y,tRec.width,tRec.height);\n\t\t}\n\t}\n\n\t__proto._canvas_repaint=function(sprite,context,x,y){\n\t\tvar _cacheCanvas=sprite._$P.cacheCanvas;\n\t\tvar _next=this._next;\n\t\tif (!_cacheCanvas){\n\t\t\t_next._fun.call(_next,sprite,tx,x,y);\n\t\t\treturn;\n\t\t};\n\t\tvar tx=_cacheCanvas.ctx;\n\t\tvar _repaint=sprite._needRepaint()|| (!tx);\n\t\tvar canvas;\n\t\tvar left;\n\t\tvar top;\n\t\tvar tRec;\n\t\tvar tCacheType=_cacheCanvas.type;\n\t\ttCacheType==='bitmap' ? (Stat.canvasBitmap++):(Stat.canvasNormal++);\n\t\tif (_repaint){\n\t\t\tif (!_cacheCanvas._cacheRec)\n\t\t\t\t_cacheCanvas._cacheRec=new Rectangle();\n\t\t\tvar w,h;\n\t\t\tif (!Render.isWebGL || tCacheType===\"bitmap\"){\n\t\t\t\ttRec=sprite.getSelfBounds();\n\t\t\t\ttRec.x=tRec.x-sprite.pivotX;\n\t\t\t\ttRec.y=tRec.y-sprite.pivotY;\n\t\t\t\ttRec.x=tRec.x-16;\n\t\t\t\ttRec.y=tRec.y-16;\n\t\t\t\ttRec.width=tRec.width+32;\n\t\t\t\ttRec.height=tRec.height+32;\n\t\t\t\ttRec.x=Math.floor(tRec.x+x)-x;\n\t\t\t\ttRec.y=Math.floor(tRec.y+y)-y;\n\t\t\t\ttRec.width=Math.floor(tRec.width);\n\t\t\t\ttRec.height=Math.floor(tRec.height);\n\t\t\t\t_cacheCanvas._cacheRec.copyFrom(tRec);\n\t\t\t\t}else{\n\t\t\t\t_cacheCanvas._cacheRec.setTo(-sprite.pivotX,-sprite.pivotY,1,1);\n\t\t\t}\n\t\t\ttRec=_cacheCanvas._cacheRec;\n\t\t\tvar scaleX=Render.isWebGL ? 1 :Browser.pixelRatio *Laya.stage.clientScaleX;\n\t\t\tvar scaleY=Render.isWebGL ? 1 :Browser.pixelRatio *Laya.stage.clientScaleY;\n\t\t\tif (!Render.isWebGL){\n\t\t\t\tvar chainScaleX=1;\n\t\t\t\tvar chainScaleY=1;\n\t\t\t\tvar tar;\n\t\t\t\ttar=sprite;\n\t\t\t\twhile (tar && tar !=Laya.stage){\n\t\t\t\t\tchainScaleX *=tar.scaleX;\n\t\t\t\t\tchainScaleY *=tar.scaleY;\n\t\t\t\t\ttar=tar.parent;\n\t\t\t\t}\n\t\t\t\tif (Render.isWebGL){\n\t\t\t\t\tif (chainScaleX < 1)scaleX *=chainScaleX;\n\t\t\t\t\tif (chainScaleY < 1)scaleY *=chainScaleY;\n\t\t\t\t\t}else {\n\t\t\t\t\tif (chainScaleX > 1)scaleX *=chainScaleX;\n\t\t\t\t\tif (chainScaleY > 1)scaleY *=chainScaleY;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (sprite.scrollRect){\n\t\t\t\tvar scrollRect=sprite.scrollRect;\n\t\t\t\ttRec.x-=scrollRect.x;\n\t\t\t\ttRec.y-=scrollRect.y;\n\t\t\t}\n\t\t\tw=tRec.width *scaleX;\n\t\t\th=tRec.height *scaleY;\n\t\t\tleft=tRec.x;\n\t\t\ttop=tRec.y;\n\t\t\tif (Render.isWebGL && tCacheType==='bitmap' && (w > 2048 || h > 2048)){\n\t\t\t\tconsole.warn(\"cache bitmap size larger than 2048,cache ignored\");\n\t\t\t\tif (_cacheCanvas.ctx){\n\t\t\t\t\tPool.recover(\"RenderContext\",_cacheCanvas.ctx);\n\t\t\t\t\t_cacheCanvas.ctx.canvas.size(0,0);\n\t\t\t\t\t_cacheCanvas.ctx=null;\n\t\t\t\t}\n\t\t\t\t_next._fun.call(_next,sprite,context,x,y);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!tx){\n\t\t\t\ttx=_cacheCanvas.ctx=Pool.getItem(\"RenderContext\")|| new RenderContext(w,h,HTMLCanvas.create(/*laya.resource.HTMLCanvas.TYPEAUTO*/\"AUTO\"));\n\t\t\t}\n\t\t\ttx.ctx.sprite=sprite;\n\t\t\tcanvas=tx.canvas;\n\t\t\tcanvas.clear();\n\t\t\t(canvas.width !=w || canvas.height !=h)&& canvas.size(w,h);\n\t\t\tif (tCacheType==='bitmap')canvas.context.asBitmap=true;\n\t\t\telse if(tCacheType==='normal')canvas.context.asBitmap=false;\n\t\t\tvar t;\n\t\t\tif (scaleX !=1 || scaleY !=1){\n\t\t\t\tvar ctx=(tx).ctx;\n\t\t\t\tctx.save();\n\t\t\t\tctx.scale(scaleX,scaleY);\n\t\t\t\tif (!Render.isConchWebGL && Render.isConchApp){\n\t\t\t\t\tt=sprite._$P.cf;\n\t\t\t\t\tt && ctx.setFilterMatrix && ctx.setFilterMatrix(t._mat,t._alpha);\n\t\t\t\t}\n\t\t\t\t_next._fun.call(_next,sprite,tx,-left,-top);\n\t\t\t\tctx.restore();\n\t\t\t\tif (!Render.isConchApp || Render.isConchWebGL)sprite._applyFilters();\n\t\t\t\t}else {\n\t\t\t\tctx=(tx).ctx;\n\t\t\t\tif (!Render.isConchWebGL && Render.isConchApp){\n\t\t\t\t\tt=sprite._$P.cf;\n\t\t\t\t\tt && ctx.setFilterMatrix && ctx.setFilterMatrix(t._mat,t._alpha);\n\t\t\t\t}\n\t\t\t\t_next._fun.call(_next,sprite,tx,-left,-top);\n\t\t\t\tif (!Render.isConchApp || Render.isConchWebGL)sprite._applyFilters();\n\t\t\t}\n\t\t\tif (sprite._$P.staticCache)_cacheCanvas.reCache=false;\n\t\t\tStat.canvasReCache++;\n\t\t\t}else {\n\t\t\ttRec=_cacheCanvas._cacheRec;\n\t\t\tleft=tRec.x;\n\t\t\ttop=tRec.y;\n\t\t\tcanvas=tx.canvas;\n\t\t}\n\t\tcontext.drawCanvas(canvas,x+left,y+top,tRec.width,tRec.height);\n\t}\n\n\tRenderSprite.__init__=function(){\n\t\tvar i=0,len=0;\n\t\tvar initRender;\n\t\tinitRender=RunDriver.createRenderSprite(0x11111,null);\n\t\tlen=RenderSprite.renders.length=0x800 *2;\n\t\tfor (i=0;i < len;i++)\n\t\tRenderSprite.renders[i]=initRender;\n\t\tRenderSprite.renders[0]=RunDriver.createRenderSprite(0,null);\n\t\tfunction _initSame (value,o){\n\t\t\tvar n=0;\n\t\t\tfor (var i=0;i < value.length;i++){\n\t\t\t\tn |=value[i];\n\t\t\t\tRenderSprite.renders[n]=o;\n\t\t\t}\n\t\t}\n\t\t_initSame([0x01,0x200,0x04,0x02],new RenderSprite(0x01,null));\n\t\tRenderSprite.renders[0x01 | 0x200]=RunDriver.createRenderSprite(0x01 | 0x200,null);\n\t\tRenderSprite.renders[0x01 | 0x04 | 0x200]=new RenderSprite(0x01 | 0x04 | 0x200,null);\n\t}\n\n\tRenderSprite._initRenderFun=function(sprite,context,x,y){\n\t\tvar type=sprite._renderType;\n\t\tvar r=RenderSprite.renders[type]=RenderSprite._getTypeRender(type);\n\t\tr._fun(sprite,context,x,y);\n\t}\n\n\tRenderSprite._getTypeRender=function(type){\n\t\tvar rst=null;\n\t\tvar tType=0x800;\n\t\twhile (tType > 1){\n\t\t\tif (tType & type)\n\t\t\t\trst=RunDriver.createRenderSprite(tType,rst);\n\t\t\ttType=tType >> 1;\n\t\t}\n\t\treturn rst;\n\t}\n\n\tRenderSprite.IMAGE=0x01;\n\tRenderSprite.ALPHA=0x02;\n\tRenderSprite.TRANSFORM=0x04;\n\tRenderSprite.BLEND=0x08;\n\tRenderSprite.CANVAS=0x10;\n\tRenderSprite.FILTERS=0x20;\n\tRenderSprite.MASK=0x40;\n\tRenderSprite.CLIP=0x80;\n\tRenderSprite.STYLE=0x100;\n\tRenderSprite.GRAPHICS=0x200;\n\tRenderSprite.CUSTOM=0x400;\n\tRenderSprite.CHILDS=0x800;\n\tRenderSprite.INIT=0x11111;\n\tRenderSprite.renders=[];\n\tRenderSprite.NORENDER=new RenderSprite(0,null);\n\treturn RenderSprite;\n})()\n\n\n/**\n*@private\n*Context扩展类\n*/\n//class laya.resource.Context\nvar Context=(function(){\n\tfunction Context(){\n\t\t/***@private */\n\t\t//this._canvas=null;\n\t\tthis._repaint=false;\n\t}\n\n\t__class(Context,'laya.resource.Context');\n\tvar __proto=Context.prototype;\n\t__proto.replaceReset=function(){\n\t\tvar i=0,len=0;\n\t\tlen=Context.replaceKeys.length;\n\t\tvar key;\n\t\tfor (i=0;i < len;i++){\n\t\t\tkey=Context.replaceKeys[i];\n\t\t\tthis[Context.newKeys[i]]=this[key];\n\t\t}\n\t}\n\n\t__proto.replaceResotre=function(){\n\t\t/*__JS__ */this.__restore();\n\t\t/*__JS__ */this.__reset();\n\t}\n\n\t__proto.setIsMainContext=function(){}\n\t__proto.drawTextures=function(tex,pos,tx,ty){\n\t\tStat.drawCall+=pos.length / 2;\n\t\tvar w=tex.width;\n\t\tvar h=tex.height;\n\t\tfor (var i=0,sz=pos.length;i < sz;i+=2){\n\t\t\tthis.drawTexture(tex,pos[i],pos[i+1],w,h,tx,ty);\n\t\t}\n\t}\n\n\t/***@private */\n\t__proto.drawCanvas=function(canvas,x,y,width,height){\n\t\tStat.drawCall++;\n\t\tthis.drawImage(canvas.source,x,y,width,height);\n\t}\n\n\t/***@private */\n\t__proto.fillRect=function(x,y,width,height,style){\n\t\tStat.drawCall++;\n\t\tstyle && (this.fillStyle=style);\n\t\t/*__JS__ */this.__fillRect(x,y,width,height);\n\t}\n\n\t/***@private */\n\t__proto.fillText=function(text,x,y,font,color,textAlign){\n\t\tStat.drawCall++;\n\t\tif (arguments.length > 3 && (typeof font=='string')){\n\t\t\tthis.font=font;\n\t\t\tthis.fillStyle=color;\n\t\t\t/*__JS__ */this.textAlign=textAlign;\n\t\t\tthis.textBaseline=\"top\";\n\t\t}\n\t\tif ((typeof font=='number')){\n\t\t\t/*__JS__ */this.__fillText(text,x,y,font);\n\t\t\t}else{\n\t\t\t/*__JS__ */this.__fillText(text,x,y);\n\t\t}\n\t}\n\n\t/***@private */\n\t__proto.fillBorderText=function(text,x,y,font,fillColor,borderColor,lineWidth,textAlign){\n\t\tStat.drawCall++;\n\t\tthis.font=font;\n\t\tthis.fillStyle=fillColor;\n\t\tthis.textBaseline=\"top\";\n\t\t/*__JS__ */this.strokeStyle=borderColor;\n\t\t/*__JS__ */this.lineWidth=lineWidth;\n\t\t/*__JS__ */this.textAlign=textAlign;\n\t\t/*__JS__ */this.__strokeText(text,x,y);\n\t\t/*__JS__ */this.__fillText(text,x,y);\n\t}\n\n\t/***@private */\n\t__proto.strokeText=function(text,x,y,font,color,lineWidth,textAlign){\n\t\tStat.drawCall++;\n\t\tif (arguments.length > 3 && (typeof font=='string')){\n\t\t\tthis.font=font;\n\t\t\t/*__JS__ */this.strokeStyle=color;\n\t\t\t/*__JS__ */this.lineWidth=lineWidth;\n\t\t\t/*__JS__ */this.textAlign=textAlign;\n\t\t\tthis.textBaseline=\"top\";\n\t\t}\n\t\tif ((typeof font=='number')){\n\t\t\t/*__JS__ */this.__strokeText(text,x,y,font);\n\t\t}else\n\t\t/*__JS__ */this.__strokeText(text,x,y);\n\t}\n\n\t/***@private */\n\t__proto.transformByMatrix=function(value){\n\t\tthis.transform(value.a,value.b,value.c,value.d,value.tx,value.ty);\n\t}\n\n\t/***@private */\n\t__proto.setTransformByMatrix=function(value){\n\t\tthis.setTransform(value.a,value.b,value.c,value.d,value.tx,value.ty);\n\t}\n\n\t/***@private */\n\t__proto.clipRect=function(x,y,width,height){\n\t\tStat.drawCall++;\n\t\tthis.beginPath();\n\t\tthis.rect(x,y,width,height);\n\t\tthis.clip();\n\t}\n\n\t/***@private */\n\t__proto.drawTexture=function(tex,x,y,width,height,tx,ty){\n\t\tStat.drawCall++;\n\t\tvar uv=tex.uv,w=tex.bitmap.width,h=tex.bitmap.height;\n\t\tthis.drawImage(tex.source,uv[0] *w,uv[1] *h,(uv[2]-uv[0])*w,(uv[5]-uv[3])*h,x+tx,y+ty,width,height);\n\t}\n\n\t/***@private */\n\t__proto.drawTextureWithTransform=function(tex,x,y,width,height,m,tx,ty,alpha){\n\t\tStat.drawCall++;\n\t\tvar uv=tex.uv,w=tex.bitmap.width,h=tex.bitmap.height;\n\t\tthis.save();\n\t\talpha !=1 && (this.globalAlpha *=alpha);\n\t\tif (m){\n\t\t\tthis.transform(m.a,m.b,m.c,m.d,m.tx+tx,m.ty+ty);\n\t\t\tthis.drawImage(tex.source,uv[0] *w,uv[1] *h,(uv[2]-uv[0])*w,(uv[5]-uv[3])*h,x ,y,width,height);\n\t\t\t}else {\n\t\t\tthis.drawImage(tex.source,uv[0] *w,uv[1] *h,(uv[2]-uv[0])*w,(uv[5]-uv[3])*h,x+tx ,y+ty,width,height);\n\t\t}\n\t\tthis.restore();\n\t}\n\n\t/***@private */\n\t__proto.drawTexture2=function(x,y,pivotX,pivotY,m,alpha,blendMode,args2){\n\t\tvar tex=args2[0];\n\t\tif (!(tex.loaded && tex.bitmap && tex.source)){\n\t\t\treturn;\n\t\t}\n\t\tStat.drawCall++;\n\t\tvar alphaChanged=alpha!==1;\n\t\tif (alphaChanged){\n\t\t\tvar temp=this.globalAlpha;\n\t\t\tthis.globalAlpha *=alpha;\n\t\t};\n\t\tvar uv=tex.uv,w=tex.bitmap.width,h=tex.bitmap.height;\n\t\tif (m){\n\t\t\tthis.save();\n\t\t\tthis.transform(m.a,m.b,m.c,m.d,m.tx+x,m.ty+y);\n\t\t\tthis.drawImage(tex.source,uv[0] *w,uv[1] *h,(uv[2]-uv[0])*w,(uv[5]-uv[3])*h,args2[1]-pivotX ,args2[2]-pivotY,args2[3],args2[4]);\n\t\t\tthis.restore();\n\t\t\t}else {\n\t\t\tthis.drawImage(tex.source,uv[0] *w,uv[1] *h,(uv[2]-uv[0])*w,(uv[5]-uv[3])*h,args2[1]-pivotX+x ,args2[2]-pivotY+y,args2[3],args2[4]);\n\t\t}\n\t\tif (alphaChanged)this.globalAlpha=temp;\n\t}\n\n\t__proto.fillTexture=function(texture,x,y,width,height,type,offset,other){\n\t\tif (!other.pat){\n\t\t\tif (texture.uv !=Texture.DEF_UV){\n\t\t\t\tvar canvas=new HTMLCanvas(\"2D\");\n\t\t\t\tcanvas.getContext('2d');\n\t\t\t\tcanvas.size(texture.width,texture.height);\n\t\t\t\tcanvas.context.drawTexture(texture,0,0,texture.width,texture.height,0,0);\n\t\t\t\ttexture=new Texture(canvas);\n\t\t\t}\n\t\t\tother.pat=this.createPattern(texture.bitmap.source,type);\n\t\t};\n\t\tvar oX=x,oY=y;\n\t\tvar sX=0,sY=0;\n\t\tif (offset){\n\t\t\toX+=offset.x % texture.width;\n\t\t\toY+=offset.y % texture.height;\n\t\t\tsX-=offset.x % texture.width;\n\t\t\tsY-=offset.y % texture.height;\n\t\t}\n\t\tthis.translate(oX,oY);\n\t\tthis.fillRect(sX,sY,width,height,other.pat);\n\t\tthis.translate(-oX,-oY);\n\t}\n\n\t__proto.drawTriangle=function(texture,vertices,uvs,index0,index1,index2,matrix,canvasPadding){\n\t\tvar source=texture.bitmap;\n\t\tvar textureSource=source.source;\n\t\tvar textureWidth=texture.width;\n\t\tvar textureHeight=texture.height;\n\t\tvar sourceWidth=source.width;\n\t\tvar sourceHeight=source.height;\n\t\tvar u0=uvs[index0] *sourceWidth;\n\t\tvar u1=uvs[index1] *sourceWidth;\n\t\tvar u2=uvs[index2] *sourceWidth;\n\t\tvar v0=uvs[index0+1] *sourceHeight;\n\t\tvar v1=uvs[index1+1] *sourceHeight;\n\t\tvar v2=uvs[index2+1] *sourceHeight;\n\t\tvar x0=vertices[index0];\n\t\tvar x1=vertices[index1];\n\t\tvar x2=vertices[index2];\n\t\tvar y0=vertices[index0+1];\n\t\tvar y1=vertices[index1+1];\n\t\tvar y2=vertices[index2+1];\n\t\tif (canvasPadding){\n\t\t\tvar paddingX=1;\n\t\t\tvar paddingY=1;\n\t\t\tvar centerX=(x0+x1+x2)/ 3;\n\t\t\tvar centerY=(y0+y1+y2)/ 3;\n\t\t\tvar normX=x0-centerX;\n\t\t\tvar normY=y0-centerY;\n\t\t\tvar dist=Math.sqrt((normX *normX)+(normY *normY));\n\t\t\tx0=centerX+((normX / dist)*(dist+paddingX));\n\t\t\ty0=centerY+((normY / dist)*(dist+paddingY));\n\t\t\tnormX=x1-centerX;\n\t\t\tnormY=y1-centerY;\n\t\t\tdist=Math.sqrt((normX *normX)+(normY *normY));\n\t\t\tx1=centerX+((normX / dist)*(dist+paddingX));\n\t\t\ty1=centerY+((normY / dist)*(dist+paddingY));\n\t\t\tnormX=x2-centerX;\n\t\t\tnormY=y2-centerY;\n\t\t\tdist=Math.sqrt((normX *normX)+(normY *normY));\n\t\t\tx2=centerX+((normX / dist)*(dist+paddingX));\n\t\t\ty2=centerY+((normY / dist)*(dist+paddingY));\n\t\t}\n\t\tthis.save();\n\t\tif (matrix)\n\t\t\tthis.transform(matrix.a,matrix.b,matrix.c,matrix.d,matrix.tx,matrix.ty);\n\t\tthis.beginPath();\n\t\tthis.moveTo(x0,y0);\n\t\tthis.lineTo(x1,y1);\n\t\tthis.lineTo(x2,y2);\n\t\tthis.closePath();\n\t\tthis.clip();\n\t\tvar delta=(u0 *v1)+(v0 *u2)+(u1 *v2)-(v1 *u2)-(v0 *u1)-(u0 *v2);\n\t\tvar dDelta=1 / delta;\n\t\tvar deltaA=(x0 *v1)+(v0 *x2)+(x1 *v2)-(v1 *x2)-(v0 *x1)-(x0 *v2);\n\t\tvar deltaB=(u0 *x1)+(x0 *u2)+(u1 *x2)-(x1 *u2)-(x0 *u1)-(u0 *x2);\n\t\tvar deltaC=(u0 *v1 *x2)+(v0 *x1 *u2)+(x0 *u1 *v2)-(x0 *v1 *u2)-(v0 *u1 *x2)-(u0 *x1 *v2);\n\t\tvar deltaD=(y0 *v1)+(v0 *y2)+(y1 *v2)-(v1 *y2)-(v0 *y1)-(y0 *v2);\n\t\tvar deltaE=(u0 *y1)+(y0 *u2)+(u1 *y2)-(y1 *u2)-(y0 *u1)-(u0 *y2);\n\t\tvar deltaF=(u0 *v1 *y2)+(v0 *y1 *u2)+(y0 *u1 *v2)-(y0 *v1 *u2)-(v0 *u1 *y2)-(u0 *y1 *v2);\n\t\tthis.transform(deltaA *dDelta,deltaD *dDelta,deltaB *dDelta,deltaE *dDelta,deltaC *dDelta,deltaF *dDelta);\n\t\tthis.drawImage(textureSource,texture.uv[0] *sourceWidth,texture.uv[1] *sourceHeight,textureWidth,textureHeight,texture.uv[0] *sourceWidth,texture.uv[1] *sourceHeight,textureWidth,textureHeight);\n\t\tthis.restore();\n\t}\n\n\t/***@private */\n\t__proto.flush=function(){\n\t\treturn 0;\n\t}\n\n\t/***@private */\n\t__proto.fillWords=function(words,x,y,font,color,underLine){\n\t\tfont && (this.font=font);\n\t\tcolor && (this.fillStyle=color);\n\t\tvar _this=this;\n\t\tthis.textBaseline=\"top\";\n\t\t/*__JS__ */this.textAlign='left';\n\t\tfor (var i=0,n=words.length;i < n;i++){\n\t\t\tvar a=words[i];\n\t\t\t/*__JS__ */this.__fillText(a.char,a.x+x,a.y+y);\n\t\t\tif (underLine===1){\n\t\t\t\tvar tHeight=a.height;\n\t\t\t\tvar dX=a.style.letterSpacing*0.5;\n\t\t\t\tif (!dX)dX=0;\n\t\t\t\tthis.beginPath();\n\t\t\t\tthis.strokeStyle=color;\n\t\t\t\tthis.lineWidth=1;\n\t\t\t\tthis.moveTo(x+a.x-dX+0.5,y+a.y+tHeight+0.5);\n\t\t\t\tthis.lineTo(x+a.x+a.width+dX+0.5,y+a.y+tHeight+0.5);\n\t\t\t\tthis.stroke();\n\t\t\t}\n\t\t}\n\t}\n\n\t/***@private */\n\t__proto.fillBorderWords=function(words,x,y,font,color,borderColor,lineWidth){\n\t\tfont && (this.font=font);\n\t\tcolor && (this.fillStyle=color);\n\t\tthis.textBaseline=\"top\";\n\t\t/*__JS__ */this.lineWidth=lineWidth;\n\t\t/*__JS__ */this.textAlign='left';\n\t\t/*__JS__ */this.strokeStyle=borderColor;\n\t\tfor (var i=0,n=words.length;i < n;i++){\n\t\t\tvar a=words[i];\n\t\t\t/*__JS__ */this.__strokeText(a.char,a.x+x,a.y+y);\n\t\t\t/*__JS__ */this.__fillText(a.char,a.x+x,a.y+y);\n\t\t}\n\t}\n\n\t/***@private */\n\t__proto.destroy=function(){\n\t\t/*__JS__ */this.canvas.width=this.canvas.height=0;\n\t}\n\n\t/***@private */\n\t__proto.clear=function(){\n\t\tthis.clearRect(0,0,this._canvas.width,this._canvas.height);\n\t\tthis._repaint=false;\n\t}\n\n\t__proto.drawCurves=function(x,y,args){\n\t\tthis.beginPath();\n\t\tthis.strokeStyle=args[3];\n\t\tthis.lineWidth=args[4];\n\t\tvar points=args[2];\n\t\tx+=args[0],y+=args[1];\n\t\tthis.moveTo(x+points[0],y+points[1]);\n\t\tvar i=2,n=points.length;\n\t\twhile (i < n){\n\t\t\tthis.quadraticCurveTo(x+points[i++],y+points[i++],x+points[i++],y+points[i++]);\n\t\t}\n\t\tthis.stroke();\n\t}\n\n\tContext.__init__=function(to){\n\t\tvar from=laya.resource.Context.prototype;\n\t\tto=to || /*__JS__ */window.CanvasRenderingContext2D.prototype;\n\t\tif (to.inited)return;\n\t\tto.inited=true;\n\t\tto.__fillText=to.fillText;\n\t\tto.__fillRect=to.fillRect;\n\t\tto.__strokeText=to.strokeText;\n\t\tvar funs=['drawTextures',\"drawTriangle\",'fillWords','fillBorderWords','setIsMainContext','fillRect','strokeText','fillTexture','fillText','transformByMatrix','setTransformByMatrix','clipRect','drawTexture','drawTexture2','drawTextureWithTransform','flush','clear','destroy','drawCanvas','fillBorderText','drawCurves'];\n\t\tfuns.forEach(function(i){\n\t\t\tto[i]=from[i];\n\t\t});\n\t}\n\n\tContext.replaceCanvasGetSet=function(tar,key){\n\t\tvar oldO=/*__JS__ */Object.getOwnPropertyDescriptor(tar,key);\n\t\tif (!oldO||!oldO.configurable)return false;\n\t\tvar newO={};\n\t\tvar tkey;\n\t\tfor (tkey in oldO){\n\t\t\tif (tkey !=\"set\"){\n\t\t\t\tnewO[tkey]=oldO[tkey];\n\t\t\t}\n\t\t};\n\t\tvar preFun=oldO[\"set\"];\n\t\tnewO[\"set\"]=function (v){\n\t\t\tvar _self=/*__JS__ */this;\n\t\t\tpreFun.call(_self,v);\n\t\t\tvar _ct=_self.getContext(\"2d\");\n\t\t\tif (_ct && \"__reset\" in _ct){\n\t\t\t\t_ct.__reset();\n\t\t\t}\n\t\t}\n\t\t/*__JS__ */Object.defineProperty(tar,key,newO);\n\t\treturn true;\n\t}\n\n\tContext.replaceGetSet=function(tar,key){\n\t\tvar oldO=/*__JS__ */Object.getOwnPropertyDescriptor(tar,key);\n\t\tif (!oldO||!oldO.configurable)return false;\n\t\tvar newO={};\n\t\tvar tkey;\n\t\tfor (tkey in oldO){\n\t\t\tif (tkey !=\"set\"){\n\t\t\t\tnewO[tkey]=oldO[tkey];\n\t\t\t}\n\t\t};\n\t\tvar preFun=oldO[\"set\"];\n\t\tvar dataKey=\"___\"+key+\"__\";\n\t\tContext.newKeys.push(dataKey);\n\t\tnewO[\"set\"]=function (v){\n\t\t\tvar _self=/*__JS__ */this;\n\t\t\tif (v !=_self[dataKey]){\n\t\t\t\t_self[dataKey]=v;\n\t\t\t\tpreFun.call(_self,v);\n\t\t\t}\n\t\t}\n\t\t/*__JS__ */Object.defineProperty(tar,key,newO);\n\t\treturn true;\n\t}\n\n\tContext._default=new Context();\n\tContext.newKeys=[];\n\t__static(Context,\n\t['replaceKeys',function(){return this.replaceKeys=[\"font\",\"fillStyle\",\"textBaseline\"];}\n\t]);\n\treturn Context;\n})()\n\n\n/**\n*@private\n*<code>ResourceManager</code> 是资源管理类。它用于资源的载入、获取、销毁。\n*/\n//class laya.resource.ResourceManager\nvar ResourceManager=(function(){\n\tfunction ResourceManager(name){\n\t\t/**唯一标识ID。*/\n\t\tthis._id=0;\n\t\t/**名字。*/\n\t\tthis._name=null;\n\t\t/**所管理资源。*/\n\t\tthis._resources=null;\n\t\t/**所管理资源的累计内存,以字节为单位。*/\n\t\tthis._memorySize=0;\n\t\t/**垃圾回收比例，范围是0到1。*/\n\t\tthis._garbageCollectionRate=NaN;\n\t\t/**自动释放机制中内存是否溢出。*/\n\t\tthis._isOverflow=false;\n\t\t/**是否启用自动释放机制。*/\n\t\tthis.autoRelease=false;\n\t\t/**自动释放机制的内存触发上限,以字节为单位。*/\n\t\tthis.autoReleaseMaxSize=0;\n\t\tthis._id=++ResourceManager._uniqueIDCounter;\n\t\tthis._name=name ? name :\"Content Manager\";\n\t\tResourceManager._isResourceManagersSorted=false;\n\t\tthis._memorySize=0;\n\t\tthis._isOverflow=false;\n\t\tthis.autoRelease=false;\n\t\tthis.autoReleaseMaxSize=1024 *1024 *512;\n\t\tthis._garbageCollectionRate=0.2;\n\t\tResourceManager._resourceManagers.push(this);\n\t\tthis._resources=[];\n\t}\n\n\t__class(ResourceManager,'laya.resource.ResourceManager');\n\tvar __proto=ResourceManager.prototype;\n\tLaya.imps(__proto,{\"laya.resource.IDispose\":true})\n\t/**\n\t*获取指定索引的资源 Resource 对象。\n\t*@param 索引。\n\t*@return 资源 Resource 对象。\n\t*/\n\t__proto.getResourceByIndex=function(index){\n\t\treturn this._resources[index];\n\t}\n\n\t/**\n\t*获取此管理器所管理的资源个数。\n\t*@return 资源个数。\n\t*/\n\t__proto.getResourcesLength=function(){\n\t\treturn this._resources.length;\n\t}\n\n\t/**\n\t*添加指定资源。\n\t*@param resource 需要添加的资源 Resource 对象。\n\t*@return 是否添加成功。\n\t*/\n\t__proto.addResource=function(resource){\n\t\tif (resource.resourceManager)\n\t\t\tresource.resourceManager.removeResource(resource);\n\t\tvar index=this._resources.indexOf(resource);\n\t\tif (index===-1){\n\t\t\tresource._resourceManager=this;\n\t\t\tthis._resources.push(resource);\n\t\t\tthis.addSize(resource.memorySize);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*移除指定资源。\n\t*@param resource 需要移除的资源 Resource 对象\n\t*@return 是否移除成功。\n\t*/\n\t__proto.removeResource=function(resource){\n\t\tvar index=this._resources.indexOf(resource);\n\t\tif (index!==-1){\n\t\t\tthis._resources.splice(index,1);\n\t\t\tresource._resourceManager=null;\n\t\t\tthis._memorySize-=resource.memorySize;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*卸载此资源管理器载入的资源。\n\t*/\n\t__proto.unload=function(){\n\t\tvar tempResources=this._resources.slice(0,this._resources.length);\n\t\tfor (var i=0;i < tempResources.length;i++){\n\t\t\tvar resource=tempResources[i];\n\t\t\tresource.destroy();\n\t\t}\n\t\ttempResources.length=0;\n\t}\n\n\t/**释放资源。*/\n\t__proto.dispose=function(){\n\t\tif (this===ResourceManager._systemResourceManager)\n\t\t\tthrow new Error(\"systemResourceManager不能被释放！\");\n\t\tResourceManager._resourceManagers.splice(ResourceManager._resourceManagers.indexOf(this),1);\n\t\tResourceManager._isResourceManagersSorted=false;\n\t\tvar tempResources=this._resources.slice(0,this._resources.length);\n\t\tfor (var i=0;i < tempResources.length;i++){\n\t\t\tvar resource=tempResources[i];\n\t\t\tresource.resourceManager.removeResource(resource);\n\t\t\tresource.destroy();\n\t\t}\n\t\ttempResources.length=0;\n\t}\n\n\t/**\n\t*增加内存。\n\t*@param add 需要增加的内存大小。\n\t*/\n\t__proto.addSize=function(add){\n\t\tif (add){\n\t\t\tif (this.autoRelease && add > 0)\n\t\t\t\t((this._memorySize+add)> this.autoReleaseMaxSize)&& (this.garbageCollection((1-this._garbageCollectionRate)*this.autoReleaseMaxSize));\n\t\t\tthis._memorySize+=add;\n\t\t}\n\t}\n\n\t/**\n\t*垃圾回收。\n\t*@param reserveSize 保留尺寸。\n\t*/\n\t__proto.garbageCollection=function(reserveSize){\n\t\tvar all=this._resources;\n\t\tall=all.slice();\n\t\tall.sort(function(a,b){\n\t\t\tif (!a || !b)\n\t\t\t\tthrow new Error(\"a或b不能为空！\");\n\t\t\tif (a.released && b.released)\n\t\t\t\treturn 0;\n\t\t\telse if (a.released)\n\t\t\treturn 1;\n\t\t\telse if (b.released)\n\t\t\treturn-1;\n\t\t\treturn a._lastUseFrameCount-b._lastUseFrameCount;\n\t\t});\n\t\tvar currentFrameCount=Stat.loopCount;\n\t\tfor (var i=0,n=all.length;i < n;i++){\n\t\t\tvar resou=all[i];\n\t\t\tif (currentFrameCount-resou._lastUseFrameCount > 1){\n\t\t\t\tresou.releaseResource();\n\t\t\t\t}else {\n\t\t\t\tif (this._memorySize >=reserveSize)\n\t\t\t\t\tthis._isOverflow=true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._memorySize < reserveSize){\n\t\t\t\tthis._isOverflow=false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*唯一标识 ID 。\n\t*/\n\t__getset(0,__proto,'id',function(){\n\t\treturn this._id;\n\t});\n\n\t/**\n\t*名字。\n\t*/\n\t__getset(0,__proto,'name',function(){\n\t\treturn this._name;\n\t\t},function(value){\n\t\tif ((value || value!==\"\")&& this._name!==value){\n\t\t\tthis._name=value;\n\t\t\tResourceManager._isResourceManagersSorted=false;\n\t\t}\n\t});\n\n\t/**\n\t*此管理器所管理资源的累计内存，以字节为单位。\n\t*/\n\t__getset(0,__proto,'memorySize',function(){\n\t\treturn this._memorySize;\n\t});\n\n\t/**\n\t*系统资源管理器。\n\t*/\n\t__getset(1,ResourceManager,'systemResourceManager',function(){\n\t\treturn ResourceManager._systemResourceManager;\n\t});\n\n\tResourceManager.__init__=function(){\n\t\tResourceManager.currentResourceManager=ResourceManager.systemResourceManager;\n\t}\n\n\tResourceManager.getLoadedResourceManagerByIndex=function(index){\n\t\treturn ResourceManager._resourceManagers[index];\n\t}\n\n\tResourceManager.getLoadedResourceManagersCount=function(){\n\t\treturn ResourceManager._resourceManagers.length;\n\t}\n\n\tResourceManager.recreateContentManagers=function(force){\n\t\t(force===void 0)&& (force=false);\n\t\tvar temp=ResourceManager.currentResourceManager;\n\t\tfor (var i=0;i < ResourceManager._resourceManagers.length;i++){\n\t\t\tResourceManager.currentResourceManager=ResourceManager._resourceManagers[i];\n\t\t\tfor (var j=0;j < ResourceManager.currentResourceManager._resources.length;j++){\n\t\t\t\tResourceManager.currentResourceManager._resources[j].releaseResource(force);\n\t\t\t\tResourceManager.currentResourceManager._resources[j].activeResource(force);\n\t\t\t}\n\t\t}\n\t\tResourceManager.currentResourceManager=temp;\n\t}\n\n\tResourceManager.releaseContentManagers=function(force){\n\t\t(force===void 0)&& (force=false);\n\t\tvar temp=ResourceManager.currentResourceManager;\n\t\tfor (var i=0;i < ResourceManager._resourceManagers.length;i++){\n\t\t\tResourceManager.currentResourceManager=ResourceManager._resourceManagers[i];\n\t\t\tfor (var j=0;j < ResourceManager.currentResourceManager._resources.length;j++){\n\t\t\t\tvar resource=ResourceManager.currentResourceManager._resources[j];\n\t\t\t\t(!resource.released)&& (resource.releaseResource(force));\n\t\t\t}\n\t\t}\n\t\tResourceManager.currentResourceManager=temp;\n\t}\n\n\tResourceManager._uniqueIDCounter=0;\n\tResourceManager._isResourceManagersSorted=false;\n\tResourceManager._resourceManagers=[];\n\t__static(ResourceManager,\n\t['_systemResourceManager',function(){return this._systemResourceManager=new ResourceManager(\"System Resource Manager\");},'currentResourceManager',function(){return this.currentResourceManager=ResourceManager._systemResourceManager;}\n\t]);\n\treturn ResourceManager;\n})()\n\n\n/**\n*@private\n*/\n//class laya.system.System\nvar System=(function(){\n\tfunction System(){}\n\t__class(System,'laya.system.System');\n\tSystem.changeDefinition=function(name,classObj){\n\t\tLaya[name]=classObj;\n\t\tvar str=name+\"=classObj\";\n\t\tLaya._runScript(str);\n\t}\n\n\tSystem.__init__=function(){\n\t\tif (Render.isConchApp){\n\t\t\t/*__JS__ */conch.disableConchResManager();\n\t\t\t/*__JS__ */conch.disableConchAutoRestoreLostedDevice();\n\t\t}\n\t}\n\n\treturn System;\n})()\n\n\nSoundManager;\n/**\n*<code>Browser</code> 是浏览器代理类。封装浏览器及原生 js 提供的一些功能。\n*/\n//class laya.utils.Browser\nvar Browser=(function(){\n\tfunction Browser(){}\n\t__class(Browser,'laya.utils.Browser');\n\t/**设备像素比。*/\n\t__getset(1,Browser,'pixelRatio',function(){\n\t\tBrowser.__init__();\n\t\tif (Browser.userAgent.indexOf(\"Mozilla/6.0(Linux; Android 6.0; HUAWEI NXT-AL10 Build/HUAWEINXT-AL10)\")>-1)return 2;\n\t\treturn RunDriver.getPixelRatio();\n\t});\n\n\t/**浏览器窗口物理高度，其值等于clientHeight *pixelRatio，并且浏览器发生反转之后，宽高会互换。*/\n\t__getset(1,Browser,'height',function(){\n\t\tBrowser.__init__();\n\t\treturn ((Laya.stage && Laya.stage.canvasRotation)? Browser.clientWidth :Browser.clientHeight)*Browser.pixelRatio;\n\t});\n\n\t/**\n\t*浏览器窗口可视宽度。\n\t*通过分析浏览器信息获得。浏览器多个属性值优先级为：window.innerWidth(包含滚动条宽度)> document.body.clientWidth(不包含滚动条宽度)，如果前者为0或为空，则选择后者。\n\t*/\n\t__getset(1,Browser,'clientWidth',function(){\n\t\tBrowser.__init__();\n\t\treturn Browser.window.innerWidth || Browser.document.body.clientWidth;\n\t});\n\n\t/**浏览器原生 window 对象的引用。*/\n\t__getset(1,Browser,'window',function(){\n\t\tBrowser.__init__();\n\t\treturn Browser._window;\n\t});\n\n\t/**\n\t*浏览器窗口可视高度。\n\t*通过分析浏览器信息获得。浏览器多个属性值优先级为：window.innerHeight(包含滚动条高度)> document.body.clientHeight(不包含滚动条高度)> document.documentElement.clientHeight(不包含滚动条高度)，如果前者为0或为空，则选择后者。\n\t*/\n\t__getset(1,Browser,'clientHeight',function(){\n\t\tBrowser.__init__();\n\t\treturn Browser.window.innerHeight || Browser.document.body.clientHeight || Browser.document.documentElement.clientHeight;\n\t});\n\n\t/**浏览器窗口物理宽度，其值等于clientWidth *pixelRatio，并且浏览器发生反转之后，宽高会互换。*/\n\t__getset(1,Browser,'width',function(){\n\t\tBrowser.__init__();\n\t\treturn ((Laya.stage && Laya.stage.canvasRotation)? Browser.clientHeight :Browser.clientWidth)*Browser.pixelRatio;\n\t});\n\n\t/**画布容器，用来盛放画布的容器。方便对画布进行控制*/\n\t__getset(1,Browser,'container',function(){\n\t\tBrowser.__init__();\n\t\tif (!Browser._container){\n\t\t\tBrowser._container=Browser.createElement(\"div\");\n\t\t\tBrowser._container.id=\"layaContainer\";\n\t\t\tBrowser.document.body.appendChild(Browser._container);\n\t\t}\n\t\treturn Browser._container;\n\t\t},function(value){\n\t\tBrowser._container=value;\n\t});\n\n\t/**浏览器原生 document 对象的引用。*/\n\t__getset(1,Browser,'document',function(){\n\t\tBrowser.__init__();\n\t\treturn Browser._document;\n\t});\n\n\tBrowser.__init__=function(){\n\t\tSoundManager;\n\t\tif (Browser._window)return;\n\t\tBrowser._window=RunDriver.getWindow();\n\t\tBrowser._document=Browser.window.document;\n\t\tBrowser._window.addEventListener('message',function(e){\n\t\t\tlaya.utils.Browser._onMessage(e);\n\t\t},false);\n\t\t/*__JS__ */Browser.document.__createElement=Browser.document.createElement;\n\t\t/*__JS__ */window.requestAnimationFrame=window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (c){return window.setTimeout(c,1000 / 60);};;\n\t\t/*__JS__ */var $BS=window.document.body.style;$BS['-webkit-user-select']='none';$BS['-webkit-tap-highlight-color']='rgba(200,200,200,0)';;\n\t\tBrowser.userAgent=/*[SAFE]*/ Browser.window.navigator.userAgent;\n\t\tBrowser.u=/*[SAFE]*/ Browser.userAgent;\n\t\tBrowser.onIOS=/*[SAFE]*/ !!Browser.u.match(/\\(i[^;]+;(U;)? CPU.+Mac OS X/);\n\t\tBrowser.onMobile=/*[SAFE]*/ Browser.u.indexOf(\"Mobile\")>-1;\n\t\tBrowser.onIPhone=/*[SAFE]*/ Browser.u.indexOf(\"iPhone\")>-1;\n\t\tBrowser.onMac=/*[SAFE]*/ Browser.u.indexOf(\"Mac OS X\")>-1;\n\t\tBrowser.onIPad=/*[SAFE]*/ Browser.u.indexOf(\"iPad\")>-1;\n\t\tBrowser.onAndroid=/*[SAFE]*/ Browser.u.indexOf('Android')>-1 || Browser.u.indexOf('Adr')>-1;\n\t\tBrowser.onWP=/*[SAFE]*/ Browser.u.indexOf(\"Windows Phone\")>-1;\n\t\tBrowser.onQQBrowser=/*[SAFE]*/ Browser.u.indexOf(\"QQBrowser\")>-1;\n\t\tBrowser.onMQQBrowser=/*[SAFE]*/ Browser.u.indexOf(\"MQQBrowser\")>-1 || (Browser.u.indexOf(\"Mobile\")>-1 && Browser.u.indexOf(\"QQ\")>-1);\n\t\tBrowser.onIE=/*[SAFE]*/ !!Browser.window.ActiveXObject || \"ActiveXObject\" in Browser.window;\n\t\tBrowser.onWeiXin=/*[SAFE]*/ Browser.u.indexOf('MicroMessenger')>-1;\n\t\tBrowser.onPC=/*[SAFE]*/ !Browser.onMobile;\n\t\tBrowser.onSafari=/*[SAFE]*/ Browser.u.indexOf(\"Safari\")>-1;\n\t\tBrowser.onFirefox=/*[SAFE]*/ Browser.u.indexOf('Firefox')>-1;\n\t\tBrowser.onEdge=/*[SAFE]*/ Browser.u.indexOf('Edge')>-1;\n\t\tBrowser.onMiniGame=/*[SAFE]*/ Browser.u.indexOf('MiniGame')>-1;\n\t\tBrowser.onBDMiniGame=/*[SAFE]*/ Browser.u.indexOf('SwanGame')>-1;\n\t\tBrowser.onHWMiniGame=/*[SAFE]*/ laya.utils.Browser.window.hasOwnProperty(\"hbs\");\n\t\tif(Browser.u.indexOf('OPPO')>-1 && Browser.u.indexOf('MiniGame')>-1){\n\t\t\tBrowser.onQGMiniGame=true;\n\t\t\tBrowser.onMiniGame=false;\n\t\t}\n\t\tif (laya.utils.Browser.window.hasOwnProperty(\"bl\")&& Browser.u.indexOf('MiniGame')>-1){\n\t\t\tBrowser.onBLMiniGame=true;\n\t\t\tBrowser.onMiniGame=false;\n\t\t}\n\t\tif (laya.utils.Browser.window.hasOwnProperty(\"qq\")&& Browser.u.indexOf('MiniGame')>-1){\n\t\t\tBrowser.onQQMiniGame=true;\n\t\t\tBrowser.onMiniGame=false;\n\t\t}\n\t\tif (laya.utils.Browser.window.hasOwnProperty(\"tt\")&& Browser.u.indexOf('MiniGame')>-1){\n\t\t\tBrowser.onTTMiniGame=true;\n\t\t\tBrowser.onMiniGame=false;\n\t\t}\n\t\tif(Browser.u.indexOf(\"VVGame\")>-1)\n\t\t\tBrowser.onVVMiniGame=true;\n\t\tBrowser.onKGMiniGame=/*[SAFE]*/ Browser.u.indexOf('QuickGame')>-1;\n\t\tBrowser.onLimixiu=/*[SAFE]*/ Browser.u.indexOf('limixiu')>-1;\n\t\tBrowser.onIPhoneX=/iPhone/gi.test(Browser.window.navigator.userAgent)&& (Math.min(Browser.clientHeight,Browser.clientWidth)==375 && Math.max(Browser.clientHeight,Browser.clientWidth)==812);\n\t\tBrowser.httpProtocol=/*[SAFE]*/ Browser.window.location.protocol==\"http:\";\n\t\tif(Browser.u.indexOf('AlipayMiniGame')>-1){\n\t\t\tBrowser.onAlipayMiniGame=true;\n\t\t\tBrowser.onMiniGame=false;\n\t\t}\n\t\tif ((Browser.u.indexOf('TB')>-1 || Browser.u.indexOf('Taobao')>-1 || Browser.u.indexOf('TM/')>-1)&& laya.utils.Browser.window.hasOwnProperty('my')){\n\t\t\tBrowser.onTBMiniGame=true;\n\t\t}\n\t\tif (Browser.onMiniGame && Browser.window.focus==null){\n\t\t\tconsole.error(\"请先初始化小游戏适配库，详细教程https://ldc.layabox.com/doc/?nav=zh-ts-5-0-0\");\n\t\t}\n\t\tBrowser.webAudioEnabled=/*[SAFE]*/ Browser.window[\"AudioContext\"] || Browser.window[\"webkitAudioContext\"] || Browser.window[\"mozAudioContext\"] ? true :false;\n\t\tBrowser.soundType=/*[SAFE]*/ Browser.webAudioEnabled ? \"WEBAUDIOSOUND\" :\"AUDIOSOUND\";\n\t\t/*__JS__ */Sound=Browser.webAudioEnabled?WebAudioSound:AudioSound;;\n\t\t/*__JS__ */if (Browser.webAudioEnabled)WebAudioSound.initWebAudio();;\n\t\tif (!Browser.onTBMiniGame){\n\t\t\tAudioSound._initMusicAudio();\n\t\t}\n\t\t/*__JS__ */Browser.enableTouch=(('ontouchstart' in window)|| window.DocumentTouch && document instanceof DocumentTouch);\n\t\t/*__JS__ */window.focus();\n\t\t/*__JS__ */SoundManager._soundClass=Sound;;\n\t\tSoundManager._musicClass=AudioSound;\n\t\tRender._mainCanvas=Render._mainCanvas || HTMLCanvas.create('2D');\n\t\tif (Browser.canvas)return;\n\t\tBrowser.canvas=HTMLCanvas.create('2D');\n\t\tBrowser.context=Browser.canvas.getContext('2d');\n\t}\n\n\tBrowser._onMessage=function(e){\n\t\tif (!e.data)return;\n\t\tif (e.data.name==\"size\"){\n\t\t\tBrowser.window.innerWidth=e.data.width;\n\t\t\tBrowser.window.innerHeight=e.data.height;\n\t\t\tBrowser.window.__innerHeight=e.data.clientHeight;\n\t\t\tif (!Browser.document.createEvent){\n\t\t\t\tconsole.warn(\"no document.createEvent\");\n\t\t\t\treturn;\n\t\t\t};\n\t\t\tvar evt=Browser.document.createEvent(\"HTMLEvents\");\n\t\t\tevt.initEvent(\"resize\",false,false);\n\t\t\tBrowser.window.dispatchEvent(evt);\n\t\t\treturn;\n\t\t}\n\t}\n\n\tBrowser.createElement=function(type){\n\t\tBrowser.__init__();\n\t\treturn Browser.document.__createElement(type);\n\t}\n\n\tBrowser.getElementById=function(type){\n\t\tBrowser.__init__();\n\t\treturn Browser.document.getElementById(type);\n\t}\n\n\tBrowser.removeElement=function(ele){\n\t\tif (ele && ele.parentNode)ele.parentNode.removeChild(ele);\n\t}\n\n\tBrowser.now=function(){\n\t\treturn RunDriver.now();\n\t}\n\n\tBrowser._window=null;\n\tBrowser._document=null;\n\tBrowser._container=null;\n\tBrowser.userAgent=null;\n\tBrowser.u=null;\n\tBrowser.onIOS=false;\n\tBrowser.onMac=false;\n\tBrowser.onMobile=false;\n\tBrowser.onIPhone=false;\n\tBrowser.onIPad=false;\n\tBrowser.onAndroid=false;\n\tBrowser.onWP=false;\n\tBrowser.onQQBrowser=false;\n\tBrowser.onMQQBrowser=false;\n\tBrowser.onSafari=false;\n\tBrowser.onFirefox=false;\n\tBrowser.onEdge=false;\n\tBrowser.onIE=false;\n\tBrowser.onWeiXin=false;\n\tBrowser.onMiniGame=false;\n\tBrowser.onTTMiniGame=false;\n\tBrowser.onBDMiniGame=false;\n\tBrowser.onKGMiniGame=false;\n\tBrowser.onQGMiniGame=false;\n\tBrowser.onVVMiniGame=false;\n\tBrowser.onQQMiniGame=false;\n\tBrowser.onLimixiu=false;\n\tBrowser.onBLMiniGame=false;\n\tBrowser.onAlipayMiniGame=false;\n\tBrowser.onTTMiniGame=false;\n\tBrowser.onHWMiniGame=false;\n\tBrowser.onTBMiniGame=false;\n\tBrowser.onPC=false;\n\tBrowser.httpProtocol=false;\n\tBrowser.webAudioEnabled=false;\n\tBrowser.soundType=null;\n\tBrowser.enableTouch=false;\n\tBrowser.canvas=null;\n\tBrowser.context=null;\n\tBrowser.onIPhoneX=false;\n\tBrowser.__init$=function(){\n\t\tAudioSound;\n\t\tWebAudioSound;\n\t}\n\n\treturn Browser;\n})()\n\n\n/**\n*<p> <code>Byte</code> 类提供用于优化读取、写入以及处理二进制数据的方法和属性。</p>\n*<p><b>注意：</b> <code>Byte</code> 类适用于需要在字节层访问数据的高级开发人员。</p>\n*/\n//class laya.utils.Byte\nvar Byte=(function(){\n\tfunction Byte(data){\n\t\t/**\n\t\t*@private\n\t\t*是否为小端数据。\n\t\t*/\n\t\tthis._xd_=true;\n\t\tthis._allocated_=8;\n\t\t/**\n\t\t*@private\n\t\t*原始数据。\n\t\t*/\n\t\t//this._d_=null;\n\t\t/**\n\t\t*@private\n\t\t*DataView\n\t\t*/\n\t\t//this._u8d_=null;\n\t\t/**@private */\n\t\tthis._pos_=0;\n\t\t/**@private */\n\t\tthis._length=0;\n\t\tif (data){\n\t\t\tthis._u8d_=new Uint8Array(data);\n\t\t\tthis._d_=new DataView(this._u8d_.buffer);\n\t\t\tthis._length=this._d_.byteLength;\n\t\t\t}else {\n\t\t\tthis.___resizeBuffer(this._allocated_);\n\t\t}\n\t}\n\n\t__class(Byte,'laya.utils.Byte');\n\tvar __proto=Byte.prototype;\n\t/**@private */\n\t__proto.___resizeBuffer=function(len){\n\t\ttry {\n\t\t\tvar newByteView=new Uint8Array(len);\n\t\t\tif (this._u8d_ !=null){\n\t\t\t\tif (this._u8d_.length <=len)newByteView.set(this._u8d_);\n\t\t\t\telse newByteView.set(this._u8d_.subarray(0,len));\n\t\t\t}\n\t\t\tthis._u8d_=newByteView;\n\t\t\tthis._d_=new DataView(newByteView.buffer);\n\t\t\t}catch (err){\n\t\t\tthrow \"___resizeBuffer err:\"+len;\n\t\t}\n\t}\n\n\t/**\n\t*<p>常用于解析固定格式的字节流。</p>\n\t*<p>先从字节流的当前字节偏移位置处读取一个 <code>Uint16</code> 值，然后以此值为长度，读取此长度的字符串。</p>\n\t*@return 读取的字符串。\n\t*/\n\t__proto.getString=function(){\n\t\treturn this.rUTF(this.getUint16());\n\t}\n\n\t/**\n\t*从字节流中 <code>start</code> 参数指定的位置开始，读取 <code>len</code> 参数指定的字节数的数据，用于创建一个 <code>Float32Array</code> 对象并返回此对象。\n\t*@param start 开始位置。\n\t*@param len 需要读取的字节长度。如果要读取的长度超过可读取范围，则只返回可读范围内的值。\n\t*@return 读取的 Float32Array 对象。\n\t*/\n\t__proto.getFloat32Array=function(start,len){\n\t\tvar end=start+len;\n\t\tend=(end > this._length)? this._length :end;\n\t\tvar v=new Float32Array(this._d_.buffer.slice(start,end));\n\t\tthis._pos_=end;\n\t\treturn v;\n\t}\n\n\t/**\n\t*从字节流中 <code>start</code> 参数指定的位置开始，读取 <code>len</code> 参数指定的字节数的数据，用于创建一个 <code>Uint8Array</code> 对象并返回此对象。\n\t*@param start 开始位置。\n\t*@param len 需要读取的字节长度。如果要读取的长度超过可读取范围，则只返回可读范围内的值。\n\t*@return 读取的 Uint8Array 对象。\n\t*/\n\t__proto.getUint8Array=function(start,len){\n\t\tvar end=start+len;\n\t\tend=(end > this._length)? this._length :end;\n\t\tvar v=new Uint8Array(this._d_.buffer.slice(start,end));\n\t\tthis._pos_=end;\n\t\treturn v;\n\t}\n\n\t/**\n\t*从字节流中 <code>start</code> 参数指定的位置开始，读取 <code>len</code> 参数指定的字节数的数据，用于创建一个 <code>Int16Array</code> 对象并返回此对象。\n\t*@param start 开始读取的字节偏移量位置。\n\t*@param len 需要读取的字节长度。如果要读取的长度超过可读取范围，则只返回可读范围内的值。\n\t*@return 读取的 Uint8Array 对象。\n\t*/\n\t__proto.getInt16Array=function(start,len){\n\t\tvar end=start+len;\n\t\tend=(end > this._length)? this._length :end;\n\t\tvar v=new Int16Array(this._d_.buffer.slice(start,end));\n\t\tthis._pos_=end;\n\t\treturn v;\n\t}\n\n\t/**\n\t*从字节流的当前字节偏移位置处读取一个 IEEE 754 单精度（32 位）浮点数。\n\t*@return 单精度（32 位）浮点数。\n\t*/\n\t__proto.getFloat32=function(){\n\t\tif (this._pos_+4 > this._length)throw \"getFloat32 error - Out of bounds\";\n\t\tvar v=this._d_.getFloat32(this._pos_,this._xd_);\n\t\tthis._pos_+=4;\n\t\treturn v;\n\t}\n\n\t/**\n\t*从字节流的当前字节偏移量位置处读取一个 IEEE 754 双精度（64 位）浮点数。\n\t*@return 双精度（64 位）浮点数。\n\t*/\n\t__proto.getFloat64=function(){\n\t\tif (this._pos_+8 > this._length)throw \"getFloat64 error - Out of bounds\";\n\t\tvar v=this._d_.getFloat64(this._pos_,this._xd_);\n\t\tthis._pos_+=8;\n\t\treturn v;\n\t}\n\n\t/**\n\t*在字节流的当前字节偏移量位置处写入一个 IEEE 754 单精度（32 位）浮点数。\n\t*@param value 单精度（32 位）浮点数。\n\t*/\n\t__proto.writeFloat32=function(value){\n\t\tthis.ensureWrite(this._pos_+4);\n\t\tthis._d_.setFloat32(this._pos_,value,this._xd_);\n\t\tthis._pos_+=4;\n\t}\n\n\t/**\n\t*在字节流的当前字节偏移量位置处写入一个 IEEE 754 双精度（64 位）浮点数。\n\t*@param value 双精度（64 位）浮点数。\n\t*/\n\t__proto.writeFloat64=function(value){\n\t\tthis.ensureWrite(this._pos_+8);\n\t\tthis._d_.setFloat64(this._pos_,value,this._xd_);\n\t\tthis._pos_+=8;\n\t}\n\n\t/**\n\t*从字节流的当前字节偏移量位置处读取一个 Int32 值。\n\t*@return Int32 值。\n\t*/\n\t__proto.getInt32=function(){\n\t\tif (this._pos_+4 > this._length)throw \"getInt32 error - Out of bounds\";\n\t\tvar float=this._d_.getInt32(this._pos_,this._xd_);\n\t\tthis._pos_+=4;\n\t\treturn float;\n\t}\n\n\t/**\n\t*从字节流的当前字节偏移量位置处读取一个 Uint32 值。\n\t*@return Uint32 值。\n\t*/\n\t__proto.getUint32=function(){\n\t\tif (this._pos_+4 > this._length)throw \"getUint32 error - Out of bounds\";\n\t\tvar v=this._d_.getUint32(this._pos_,this._xd_);\n\t\tthis._pos_+=4;\n\t\treturn v;\n\t}\n\n\t/**\n\t*在字节流的当前字节偏移量位置处写入指定的 Int32 值。\n\t*@param value 需要写入的 Int32 值。\n\t*/\n\t__proto.writeInt32=function(value){\n\t\tthis.ensureWrite(this._pos_+4);\n\t\tthis._d_.setInt32(this._pos_,value,this._xd_);\n\t\tthis._pos_+=4;\n\t}\n\n\t/**\n\t*在字节流的当前字节偏移量位置处写入 Uint32 值。\n\t*@param value 需要写入的 Uint32 值。\n\t*/\n\t__proto.writeUint32=function(value){\n\t\tthis.ensureWrite(this._pos_+4);\n\t\tthis._d_.setUint32(this._pos_,value,this._xd_);\n\t\tthis._pos_+=4;\n\t}\n\n\t/**\n\t*从字节流的当前字节偏移量位置处读取一个 Int16 值。\n\t*@return Int16 值。\n\t*/\n\t__proto.getInt16=function(){\n\t\tif (this._pos_+2 > this._length)throw \"getInt16 error - Out of bounds\";\n\t\tvar us=this._d_.getInt16(this._pos_,this._xd_);\n\t\tthis._pos_+=2;\n\t\treturn us;\n\t}\n\n\t/**\n\t*从字节流的当前字节偏移量位置处读取一个 Uint16 值。\n\t*@return Uint16 值。\n\t*/\n\t__proto.getUint16=function(){\n\t\tif (this._pos_+2 > this._length)throw \"getUint16 error - Out of bounds\";\n\t\tvar us=this._d_.getUint16(this._pos_,this._xd_);\n\t\tthis._pos_+=2;\n\t\treturn us;\n\t}\n\n\t/**\n\t*在字节流的当前字节偏移量位置处写入指定的 Uint16 值。\n\t*@param value 需要写入的Uint16 值。\n\t*/\n\t__proto.writeUint16=function(value){\n\t\tthis.ensureWrite(this._pos_+2);\n\t\tthis._d_.setUint16(this._pos_,value,this._xd_);\n\t\tthis._pos_+=2;\n\t}\n\n\t/**\n\t*在字节流的当前字节偏移量位置处写入指定的 Int16 值。\n\t*@param value 需要写入的 Int16 值。\n\t*/\n\t__proto.writeInt16=function(value){\n\t\tthis.ensureWrite(this._pos_+2);\n\t\tthis._d_.setInt16(this._pos_,value,this._xd_);\n\t\tthis._pos_+=2;\n\t}\n\n\t/**\n\t*从字节流的当前字节偏移量位置处读取一个 Uint8 值。\n\t*@return Uint8 值。\n\t*/\n\t__proto.getUint8=function(){\n\t\tif (this._pos_+1 > this._length)throw \"getUint8 error - Out of bounds\";\n\t\treturn this._d_.getUint8(this._pos_++);\n\t}\n\n\t/**\n\t*在字节流的当前字节偏移量位置处写入指定的 Uint8 值。\n\t*@param value 需要写入的 Uint8 值。\n\t*/\n\t__proto.writeUint8=function(value){\n\t\tthis.ensureWrite(this._pos_+1);\n\t\tthis._d_.setUint8(this._pos_,value);\n\t\tthis._pos_++;\n\t}\n\n\t/**\n\t*@private\n\t*从字节流的指定字节偏移量位置处读取一个 Uint8 值。\n\t*@param pos 字节读取位置。\n\t*@return Uint8 值。\n\t*/\n\t__proto._getUInt8=function(pos){\n\t\treturn this._d_.getUint8(pos);\n\t}\n\n\t/**\n\t*@private\n\t*从字节流的指定字节偏移量位置处读取一个 Uint16 值。\n\t*@param pos 字节读取位置。\n\t*@return Uint16 值。\n\t*/\n\t__proto._getUint16=function(pos){\n\t\treturn this._d_.getUint16(pos,this._xd_);\n\t}\n\n\t/**\n\t*@private\n\t*使用 getFloat32()读取6个值，用于创建并返回一个 Matrix 对象。\n\t*@return Matrix 对象。\n\t*/\n\t__proto._getMatrix=function(){\n\t\tvar rst=new Matrix(this.getFloat32(),this.getFloat32(),this.getFloat32(),this.getFloat32(),this.getFloat32(),this.getFloat32());\n\t\treturn rst;\n\t}\n\n\t/**\n\t*@private\n\t*读取指定长度的 UTF 型字符串。\n\t*@param len 需要读取的长度。\n\t*@return 读取的字符串。\n\t*/\n\t__proto.rUTF=function(len){\n\t\tvar v=\"\",max=this._pos_+len,c=0,c2=0,c3=0,f=String.fromCharCode;\n\t\tvar u=this._u8d_,i=0;\n\t\twhile (this._pos_ < max){\n\t\t\tc=u[this._pos_++];\n\t\t\tif (c < 0x80){\n\t\t\t\tif (c !=0){\n\t\t\t\t\tv+=f(c);\n\t\t\t\t}\n\t\t\t\t}else if (c < 0xE0){\n\t\t\t\tv+=f(((c & 0x3F)<< 6)| (u[this._pos_++] & 0x7F));\n\t\t\t\t}else if (c < 0xF0){\n\t\t\t\tc2=u[this._pos_++];\n\t\t\t\tv+=f(((c & 0x1F)<< 12)| ((c2 & 0x7F)<< 6)| (u[this._pos_++] & 0x7F));\n\t\t\t\t}else {\n\t\t\t\tc2=u[this._pos_++];\n\t\t\t\tc3=u[this._pos_++];\n\t\t\t\tv+=f(((c & 0x0F)<< 18)| ((c2 & 0x7F)<< 12)| ((c3 << 6)& 0x7F)| (u[this._pos_++] & 0x7F));\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn v;\n\t}\n\n\t/**\n\t*@private\n\t*读取 <code>len</code> 参数指定的长度的字符串。\n\t*@param len 要读取的字符串的长度。\n\t*@return 指定长度的字符串。\n\t*/\n\t__proto.getCustomString=function(len){\n\t\tvar v=\"\",ulen=0,c=0,c2=0,f=String.fromCharCode;\n\t\tvar u=this._u8d_,i=0;\n\t\twhile (len > 0){\n\t\t\tc=u[this._pos_];\n\t\t\tif (c < 0x80){\n\t\t\t\tv+=f(c);\n\t\t\t\tthis._pos_++;\n\t\t\t\tlen--;\n\t\t\t\t}else {\n\t\t\t\tulen=c-0x80;\n\t\t\t\tthis._pos_++;\n\t\t\t\tlen-=ulen;\n\t\t\t\twhile (ulen > 0){\n\t\t\t\t\tc=u[this._pos_++];\n\t\t\t\t\tc2=u[this._pos_++];\n\t\t\t\t\tv+=f((c2 << 8)| c);\n\t\t\t\t\tulen--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn v;\n\t}\n\n\t/**\n\t*清除字节数组的内容，并将 length 和 pos 属性重置为 0。调用此方法将释放 Byte 实例占用的内存。\n\t*/\n\t__proto.clear=function(){\n\t\tthis._pos_=0;\n\t\tthis.length=0;\n\t}\n\n\t/**\n\t*@private\n\t*获取此对象的 ArrayBuffer 引用。\n\t*@return\n\t*/\n\t__proto.__getBuffer=function(){\n\t\treturn this._d_.buffer;\n\t}\n\n\t/**\n\t*<p>将 UTF-8 字符串写入字节流。类似于 writeUTF()方法，但 writeUTFBytes()不使用 16 位长度的字为字符串添加前缀。</p>\n\t*<p>对应的读取方法为： getUTFBytes 。</p>\n\t*@param value 要写入的字符串。\n\t*/\n\t__proto.writeUTFBytes=function(value){\n\t\tvalue=value+\"\";\n\t\tfor (var i=0,sz=value.length;i < sz;i++){\n\t\t\tvar c=value.charCodeAt(i);\n\t\t\tif (c <=0x7F){\n\t\t\t\tthis.writeByte(c);\n\t\t\t\t}else if (c <=0x7FF){\n\t\t\t\tthis.ensureWrite(this._pos_+2);\n\t\t\t\tthis._u8d_.set([0xC0 | (c >> 6),0x80 | (c & 0x3F)],this._pos_);\n\t\t\t\tthis._pos_+=2;\n\t\t\t\t}else if (c <=0xFFFF){\n\t\t\t\tthis.ensureWrite(this._pos_+3);\n\t\t\t\tthis._u8d_.set([0xE0 | (c >> 12),0x80 | ((c >> 6)& 0x3F),0x80 | (c & 0x3F)],this._pos_);\n\t\t\t\tthis._pos_+=3;\n\t\t\t\t}else {\n\t\t\t\tthis.ensureWrite(this._pos_+4);\n\t\t\t\tthis._u8d_.set([0xF0 | (c >> 18),0x80 | ((c >> 12)& 0x3F),0x80 | ((c >> 6)& 0x3F),0x80 | (c & 0x3F)],this._pos_);\n\t\t\t\tthis._pos_+=4;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*<p>将 UTF-8 字符串写入字节流。先写入以字节表示的 UTF-8 字符串长度（作为 16 位整数），然后写入表示字符串字符的字节。</p>\n\t*<p>对应的读取方法为： getUTFString 。</p>\n\t*@param value 要写入的字符串值。\n\t*/\n\t__proto.writeUTFString=function(value){\n\t\tvar tPos=this.pos;\n\t\tthis.writeUint16(1);\n\t\tthis.writeUTFBytes(value);\n\t\tvar dPos=this.pos-tPos-2;\n\t\tif (dPos >=65536){\n\t\t\tthrow \"writeUTFString byte len more than 65536\";\n\t\t}\n\t\tthis._d_.setUint16(tPos,dPos,this._xd_);\n\t}\n\n\t/**\n\t*@private\n\t*读取 UTF-8 字符串。\n\t*@return 读取的字符串。\n\t*/\n\t__proto.readUTFString=function(){\n\t\treturn this.readUTFBytes(this.getUint16());\n\t}\n\n\t/**\n\t*<p>从字节流中读取一个 UTF-8 字符串。假定字符串的前缀是一个无符号的短整型（以此字节表示要读取的长度）。</p>\n\t*<p>对应的写入方法为： writeUTFString 。</p>\n\t*@return 读取的字符串。\n\t*/\n\t__proto.getUTFString=function(){\n\t\treturn this.readUTFString();\n\t}\n\n\t/**\n\t*@private\n\t*读字符串，必须是 writeUTFBytes 方法写入的字符串。\n\t*@param len 要读的buffer长度，默认将读取缓冲区全部数据。\n\t*@return 读取的字符串。\n\t*/\n\t__proto.readUTFBytes=function(len){\n\t\t(len===void 0)&& (len=-1);\n\t\tif (len==0)return \"\";\n\t\tvar lastBytes=this.bytesAvailable;\n\t\tif (len > lastBytes)throw \"readUTFBytes error - Out of bounds\";\n\t\tlen=len > 0 ? len :lastBytes;\n\t\treturn this.rUTF(len);\n\t}\n\n\t/**\n\t*<p>从字节流中读取一个由 length 参数指定的长度的 UTF-8 字节序列，并返回一个字符串。</p>\n\t*<p>一般读取的是由 writeUTFBytes 方法写入的字符串。</p>\n\t*@param len 要读的buffer长度，默认将读取缓冲区全部数据。\n\t*@return 读取的字符串。\n\t*/\n\t__proto.getUTFBytes=function(len){\n\t\t(len===void 0)&& (len=-1);\n\t\treturn this.readUTFBytes(len);\n\t}\n\n\t/**\n\t*<p>在字节流中写入一个字节。</p>\n\t*<p>使用参数的低 8 位。忽略高 24 位。</p>\n\t*@param value\n\t*/\n\t__proto.writeByte=function(value){\n\t\tthis.ensureWrite(this._pos_+1);\n\t\tthis._d_.setInt8(this._pos_,value);\n\t\tthis._pos_+=1;\n\t}\n\n\t/**\n\t*@private\n\t*从字节流中读取带符号的字节。\n\t*/\n\t__proto.readByte=function(){\n\t\tif (this._pos_+1 > this._length)throw \"readByte error - Out of bounds\";\n\t\treturn this._d_.getInt8(this._pos_++);\n\t}\n\n\t/**\n\t*<p>从字节流中读取带符号的字节。</p>\n\t*<p>返回值的范围是从-128 到 127。</p>\n\t*@return 介于-128 和 127 之间的整数。\n\t*/\n\t__proto.getByte=function(){\n\t\treturn this.readByte();\n\t}\n\n\t/**\n\t*<p>保证该字节流的可用长度不小于 <code>lengthToEnsure</code> 参数指定的值。</p>\n\t*@param lengthToEnsure 指定的长度。\n\t*/\n\t__proto.ensureWrite=function(lengthToEnsure){\n\t\tif (this._length < lengthToEnsure)this._length=lengthToEnsure;\n\t\tif (this._allocated_ < lengthToEnsure)this.length=lengthToEnsure;\n\t}\n\n\t/**\n\t*<p>将指定 arraybuffer 对象中的以 offset 为起始偏移量， length 为长度的字节序列写入字节流。</p>\n\t*<p>如果省略 length 参数，则使用默认长度 0，该方法将从 offset 开始写入整个缓冲区；如果还省略了 offset 参数，则写入整个缓冲区。</p>\n\t*<p>如果 offset 或 length 小于0，本函数将抛出异常。</p>\n\t*$NEXTBIG 由于没有判断length和arraybuffer的合法性，当开发者填写了错误的length值时，会导致写入多余的空白数据甚至内存溢出，为了避免影响开发者正在使用此方法的功能，下个重大版本会修复这些问题。\n\t*@param arraybuffer 需要写入的 Arraybuffer 对象。\n\t*@param offset Arraybuffer 对象的索引的偏移量（以字节为单位）\n\t*@param length 从 Arraybuffer 对象写入到 Byte 对象的长度（以字节为单位）\n\t*/\n\t__proto.writeArrayBuffer=function(arraybuffer,offset,length){\n\t\t(offset===void 0)&& (offset=0);\n\t\t(length===void 0)&& (length=0);\n\t\tif (offset < 0 || length < 0)throw \"writeArrayBuffer error - Out of bounds\";\n\t\tif (length==0)length=arraybuffer.byteLength-offset;\n\t\tthis.ensureWrite(this._pos_+length);\n\t\tvar uint8array=new Uint8Array(arraybuffer);\n\t\tthis._u8d_.set(uint8array.subarray(offset,offset+length),this._pos_);\n\t\tthis._pos_+=length;\n\t}\n\n\t/**\n\t*读取ArrayBuffer数据\n\t*@param length\n\t*@return\n\t*/\n\t__proto.readArrayBuffer=function(length){\n\t\tvar rst;\n\t\trst=this._u8d_.buffer.slice(this._pos_,this._pos_+length);\n\t\tthis._pos_=this._pos_+length\n\t\treturn rst;\n\t}\n\n\t/**\n\t*获取此对象的 ArrayBuffer 数据，数据只包含有效数据部分。\n\t*/\n\t__getset(0,__proto,'buffer',function(){\n\t\tvar rstBuffer=this._d_.buffer;\n\t\tif (rstBuffer.byteLength==this.length)return rstBuffer;\n\t\treturn rstBuffer.slice(0,this.length);\n\t});\n\n\t/**\n\t*<p> <code>Byte</code> 实例的字节序。取值为：<code>BIG_ENDIAN</code> 或 <code>BIG_ENDIAN</code> 。</p>\n\t*<p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。通过 <code>getSystemEndian</code> 可以获取当前系统的字节序。</p>\n\t*<p> <code>BIG_ENDIAN</code> ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。有时也称之为网络字节序。<br/>\n\t*<code>LITTLE_ENDIAN</code> ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。</p>\n\t*/\n\t__getset(0,__proto,'endian',function(){\n\t\treturn this._xd_ ? \"littleEndian\" :\"bigEndian\";\n\t\t},function(endianStr){\n\t\tthis._xd_=(endianStr==\"littleEndian\");\n\t});\n\n\t/**\n\t*<p> <code>Byte</code> 对象的长度（以字节为单位）。</p>\n\t*<p>如果将长度设置为大于当前长度的值，则用零填充字节数组的右侧；如果将长度设置为小于当前长度的值，将会截断该字节数组。</p>\n\t*<p>如果要设置的长度大于当前已分配的内存空间的字节长度，则重新分配内存空间，大小为以下两者较大者：要设置的长度、当前已分配的长度的2倍，并将原有数据拷贝到新的内存空间中；如果要设置的长度小于当前已分配的内存空间的字节长度，也会重新分配内存空间，大小为要设置的长度，并将原有数据从头截断为要设置的长度存入新的内存空间中。</p>\n\t*/\n\t__getset(0,__proto,'length',function(){\n\t\treturn this._length;\n\t\t},function(value){\n\t\tif (this._allocated_ < value)\n\t\t\tthis.___resizeBuffer(this._allocated_=Math.floor(Math.max(value,this._allocated_ *2)));\n\t\telse if (this._allocated_ > value)\n\t\tthis.___resizeBuffer(this._allocated_=value);\n\t\tthis._length=value;\n\t});\n\n\t/**\n\t*移动或返回 Byte 对象的读写指针的当前位置（以字节为单位）。下一次调用读取方法时将在此位置开始读取，或者下一次调用写入方法时将在此位置开始写入。\n\t*/\n\t__getset(0,__proto,'pos',function(){\n\t\treturn this._pos_;\n\t\t},function(value){\n\t\tthis._pos_=value;\n\t});\n\n\t/**\n\t*可从字节流的当前位置到末尾读取的数据的字节数。\n\t*/\n\t__getset(0,__proto,'bytesAvailable',function(){\n\t\treturn this._length-this._pos_;\n\t});\n\n\tByte.getSystemEndian=function(){\n\t\tif (!Byte._sysEndian){\n\t\t\tvar buffer=new ArrayBuffer(2);\n\t\t\tnew DataView(buffer).setInt16(0,256,true);\n\t\t\tByte._sysEndian=(new Int16Array(buffer))[0]===256 ? /*CLASS CONST:laya.utils.Byte.LITTLE_ENDIAN*/\"littleEndian\" :/*CLASS CONST:laya.utils.Byte.BIG_ENDIAN*/\"bigEndian\";\n\t\t}\n\t\treturn Byte._sysEndian;\n\t}\n\n\tByte.BIG_ENDIAN=\"bigEndian\";\n\tByte.LITTLE_ENDIAN=\"littleEndian\";\n\tByte._sysEndian=null;\n\treturn Byte;\n})()\n\n\n/**\n*@private\n*对象缓存统一管理类\n*/\n//class laya.utils.CacheManager\nvar CacheManager=(function(){\n\tfunction CacheManager(){}\n\t__class(CacheManager,'laya.utils.CacheManager');\n\tCacheManager.regCacheByFunction=function(disposeFunction,getCacheListFunction){\n\t\tCacheManager.unRegCacheByFunction(disposeFunction,getCacheListFunction);\n\t\tvar cache;\n\t\tcache={tryDispose:disposeFunction,getCacheList:getCacheListFunction};\n\t\tCacheManager._cacheList.push(cache);\n\t}\n\n\tCacheManager.unRegCacheByFunction=function(disposeFunction,getCacheListFunction){\n\t\tvar i=0,len=0;\n\t\tlen=CacheManager._cacheList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tif (CacheManager._cacheList[i].tryDispose==disposeFunction && CacheManager._cacheList[i].getCacheList==getCacheListFunction){\n\t\t\t\tCacheManager._cacheList.splice(i,1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tCacheManager.forceDispose=function(){\n\t\tvar i=0,len=CacheManager._cacheList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tCacheManager._cacheList[i].tryDispose(true);\n\t\t}\n\t}\n\n\tCacheManager.beginCheck=function(waitTime){\n\t\t(waitTime===void 0)&& (waitTime=15000);\n\t\tLaya.timer.loop(waitTime,null,CacheManager._checkLoop);\n\t}\n\n\tCacheManager.stopCheck=function(){\n\t\tLaya.timer.clear(null,CacheManager._checkLoop);\n\t}\n\n\tCacheManager._checkLoop=function(){\n\t\tvar cacheList=CacheManager._cacheList;\n\t\tif (cacheList.length < 1)return;\n\t\tvar tTime=Browser.now();\n\t\tvar count=0;\n\t\tvar len=0;\n\t\tlen=count=cacheList.length;\n\t\twhile (count > 0){\n\t\t\tCacheManager._index++;\n\t\t\tCacheManager._index=CacheManager._index % len;\n\t\t\tcacheList[CacheManager._index].tryDispose(false);\n\t\t\tif (Browser.now()-tTime > CacheManager.loopTimeLimit)break ;\n\t\t\tcount--;\n\t\t}\n\t}\n\n\tCacheManager.loopTimeLimit=2;\n\tCacheManager._cacheList=[];\n\tCacheManager._index=0;\n\treturn CacheManager;\n})()\n\n\n/**\n*<code>ClassUtils</code> 是一个类工具类。\n*/\n//class laya.utils.ClassUtils\nvar ClassUtils=(function(){\n\tfunction ClassUtils(){}\n\t__class(ClassUtils,'laya.utils.ClassUtils');\n\tClassUtils.regClass=function(className,classDef){\n\t\tClassUtils._classMap[className]=classDef;\n\t}\n\n\tClassUtils.getRegClass=function(className){\n\t\treturn ClassUtils._classMap[className];\n\t}\n\n\tClassUtils.getInstance=function(className){\n\t\tvar compClass=ClassUtils.getClass(className);\n\t\tif (compClass)\n\t\t\treturn new compClass();\n\t\telse\n\t\tconsole.warn(\"[error] Undefined class:\",className);\n\t\treturn null;\n\t}\n\n\tClassUtils.createByJson=function(json,node,root,customHandler,instanceHandler){\n\t\tif ((typeof json=='string'))\n\t\t\tjson=JSON.parse(json);\n\t\tvar props=json.props;\n\t\tif (!node){\n\t\t\tnode=instanceHandler ? instanceHandler.runWith(json):ClassUtils.getInstance(props.runtime || json.type);\n\t\t\tif (!node)\n\t\t\t\treturn null;\n\t\t};\n\t\tvar child=json.child;\n\t\tif (child){\n\t\t\tfor (var i=0,n=child.length;i < n;i++){\n\t\t\t\tvar data=child[i];\n\t\t\t\tif ((data.props.name===\"render\" || data.props.renderType===\"render\")&& node[\"_$set_itemRender\"])\n\t\t\t\t\tnode.itemRender=data;\n\t\t\t\telse {\n\t\t\t\t\tif (data.type==\"Graphic\"){\n\t\t\t\t\t\tClassUtils.addGraphicsToSprite(data,node);\n\t\t\t\t\t\t}else if (ClassUtils.isDrawType(data.type)){\n\t\t\t\t\t\tClassUtils.addGraphicToSprite(data,node,true);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvar tChild=ClassUtils.createByJson(data,null,root,customHandler,instanceHandler)\n\t\t\t\t\t\tif (data.type==\"Script\"){\n\t\t\t\t\t\t\tif (tChild.hasOwnProperty(\"owner\")){\n\t\t\t\t\t\t\t\ttChild[\"owner\"]=node;\n\t\t\t\t\t\t\t\t}else if (tChild.hasOwnProperty(\"target\")){\n\t\t\t\t\t\t\t\ttChild[\"target\"]=node;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if (data.props.renderType==\"mask\"){\n\t\t\t\t\t\t\tnode.mask=tChild;\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tnode.addChild(tChild);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (props){\n\t\t\tfor (var prop in props){\n\t\t\t\tvar value=props[prop];\n\t\t\t\tif (prop===\"var\" && root){\n\t\t\t\t\troot[value]=node;\n\t\t\t\t\t}else if ((value instanceof Array)&& (typeof (node[prop])=='function')){\n\t\t\t\t\tnode[prop].apply(node,value);\n\t\t\t\t\t}else {\n\t\t\t\t\tnode[prop]=value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (customHandler && json.customProps){\n\t\t\tcustomHandler.runWith([node,json]);\n\t\t}\n\t\tif (node[\"created\"])\n\t\t\tnode.created();\n\t\treturn node;\n\t}\n\n\tClassUtils.addGraphicsToSprite=function(graphicO,sprite){\n\t\tvar graphics;\n\t\tgraphics=graphicO.child;\n\t\tif (!graphics || graphics.length < 1)\n\t\t\treturn;\n\t\tvar g;\n\t\tg=ClassUtils._getGraphicsFromSprite(graphicO,sprite);\n\t\tvar ox=0;\n\t\tvar oy=0;\n\t\tif (graphicO.props){\n\t\t\tox=ClassUtils._getObjVar(graphicO.props,\"x\",0);\n\t\t\toy=ClassUtils._getObjVar(graphicO.props,\"y\",0);\n\t\t}\n\t\tif (ox !=0 && oy !=0){\n\t\t\tg.translate(ox,oy);\n\t\t};\n\t\tvar i=0,len=0;\n\t\tlen=graphics.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tClassUtils._addGraphicToGraphics(graphics[i],g);\n\t\t}\n\t\tif (ox !=0 && oy !=0){\n\t\t\tg.translate(-ox,-oy);\n\t\t}\n\t}\n\n\tClassUtils.addGraphicToSprite=function(graphicO,sprite,isChild){\n\t\t(isChild===void 0)&& (isChild=false);\n\t\tvar g;\n\t\tg=isChild ? ClassUtils._getGraphicsFromSprite(graphicO,sprite):sprite.graphics;\n\t\tClassUtils._addGraphicToGraphics(graphicO,g);\n\t}\n\n\tClassUtils._getGraphicsFromSprite=function(dataO,sprite){\n\t\tvar g;\n\t\tif (!dataO || !dataO.props)\n\t\t\treturn sprite.graphics;\n\t\tvar propsName;\n\t\tpropsName=dataO.props.renderType;\n\t\tswitch (propsName){\n\t\t\tcase \"hit\":\n\t\t\tcase \"unHit\":;\n\t\t\t\tvar hitArea;\n\t\t\t\tif (!sprite.hitArea){\n\t\t\t\t\tsprite.hitArea=new HitArea();\n\t\t\t\t}\n\t\t\t\thitArea=sprite.hitArea;\n\t\t\t\tif (!hitArea[propsName]){\n\t\t\t\t\thitArea[propsName]=new Graphics();\n\t\t\t\t}\n\t\t\t\tg=hitArea[propsName];\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t}\n\t\tif (!g)\n\t\t\tg=sprite.graphics;\n\t\treturn g;\n\t}\n\n\tClassUtils._getTransformData=function(propsO){\n\t\tvar m;\n\t\tif (propsO.hasOwnProperty(\"pivotX\")|| propsO.hasOwnProperty(\"pivotY\")){\n\t\t\tm=m || new Matrix();\n\t\t\tm.translate(-ClassUtils._getObjVar(propsO,\"pivotX\",0),-ClassUtils._getObjVar(propsO,\"pivotY\",0));\n\t\t};\n\t\tvar sx=ClassUtils._getObjVar(propsO,\"scaleX\",1),sy=ClassUtils._getObjVar(propsO,\"scaleY\",1);\n\t\tvar rotate=ClassUtils._getObjVar(propsO,\"rotation\",0);\n\t\tvar skewX=ClassUtils._getObjVar(propsO,\"skewX\",0);\n\t\tvar skewY=ClassUtils._getObjVar(propsO,\"skewY\",0);\n\t\tif (sx !=1 || sy !=1 || rotate !=0){\n\t\t\tm=m || new Matrix();\n\t\t\tm.scale(sx,sy);\n\t\t\tm.rotate(rotate *0.0174532922222222);\n\t\t}\n\t\treturn m;\n\t}\n\n\tClassUtils._addGraphicToGraphics=function(graphicO,graphic){\n\t\tvar propsO;\n\t\tpropsO=graphicO.props;\n\t\tif (!propsO)\n\t\t\treturn;\n\t\tvar drawConfig;\n\t\tdrawConfig=ClassUtils.DrawTypeDic[graphicO.type];\n\t\tif (!drawConfig)\n\t\t\treturn;\n\t\tvar g;\n\t\tg=graphic;\n\t\tvar m;\n\t\tvar params=ClassUtils._getParams(propsO,drawConfig[1],drawConfig[2],drawConfig[3]);\n\t\tm=ClassUtils._tM;\n\t\tif (m || ClassUtils._alpha !=1){\n\t\t\tg.save();\n\t\t\tif (m)\n\t\t\t\tg.transform(m);\n\t\t\tif (ClassUtils._alpha !=1)\n\t\t\t\tg.alpha(ClassUtils._alpha);\n\t\t}\n\t\tg[drawConfig[0]].apply(g,params);\n\t\tif (m || ClassUtils._alpha !=1){\n\t\t\tg.restore();\n\t\t}\n\t}\n\n\tClassUtils._adptLineData=function(params){\n\t\tparams[2]=parseFloat(params[0])+parseFloat(params[2]);\n\t\tparams[3]=parseFloat(params[1])+parseFloat(params[3]);\n\t\treturn params;\n\t}\n\n\tClassUtils._adptTextureData=function(params){\n\t\tparams[0]=Loader.getRes(params[0]);\n\t\treturn params;\n\t}\n\n\tClassUtils._adptLinesData=function(params){\n\t\tparams[2]=ClassUtils._getPointListByStr(params[2]);\n\t\treturn params;\n\t}\n\n\tClassUtils.isDrawType=function(type){\n\t\tif (type==\"Image\")\n\t\t\treturn false;\n\t\treturn ClassUtils.DrawTypeDic.hasOwnProperty(type);\n\t}\n\n\tClassUtils._getParams=function(obj,params,xPos,adptFun){\n\t\t(xPos===void 0)&& (xPos=0);\n\t\tvar rst;\n\t\trst=ClassUtils._temParam;\n\t\trst.length=params.length;\n\t\tvar i=0,len=0;\n\t\tlen=params.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\trst[i]=ClassUtils._getObjVar(obj,params[i][0],params[i][1]);\n\t\t}\n\t\tClassUtils._alpha=ClassUtils._getObjVar(obj,\"alpha\",1);\n\t\tvar m;\n\t\tm=ClassUtils._getTransformData(obj);\n\t\tif (m){\n\t\t\tif (!xPos)xPos=0;\n\t\t\tm.translate(rst[xPos],rst[xPos+1]);\n\t\t\trst[xPos]=rst[xPos+1]=0;\n\t\t\tClassUtils._tM=m;\n\t\t\t}else {\n\t\t\tClassUtils._tM=null;\n\t\t}\n\t\tif (adptFun && ClassUtils[adptFun]){\n\t\t\trst=ClassUtils[adptFun](rst);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tClassUtils._getPointListByStr=function(str){\n\t\tvar pointArr;\n\t\tpointArr=str.split(\",\");\n\t\tvar i=0,len=0;\n\t\tlen=pointArr.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tpointArr[i]=parseFloat(pointArr[i]);\n\t\t}\n\t\treturn pointArr;\n\t}\n\n\tClassUtils._getObjVar=function(obj,key,noValue){\n\t\tif (obj.hasOwnProperty(key)){\n\t\t\treturn obj[key];\n\t\t}\n\t\treturn noValue;\n\t}\n\n\tClassUtils._temParam=[];\n\tClassUtils._classMap={'Sprite':'laya.display.Sprite','Text':'laya.display.Text','Animation':'laya.display.Animation','Skeleton':'laya.ani.bone.Skeleton','Particle2D':'laya.particle.Particle2D','div':'laya.html.dom.HTMLDivElement','p':'laya.html.dom.HTMLElement','img':'laya.html.dom.HTMLImageElement','span':'laya.html.dom.HTMLElement','br':'laya.html.dom.HTMLBrElement','style':'laya.html.dom.HTMLStyleElement','font':'laya.html.dom.HTMLElement','a':'laya.html.dom.HTMLElement','#text':'laya.html.dom.HTMLElement'};\n\tClassUtils.getClass=function(className){\n\t\tvar classObject=ClassUtils._classMap[className] || className;\n\t\tif ((typeof classObject=='string'))\n\t\t\treturn Laya[\"__classmap\"][classObject];\n\t\treturn classObject;\n\t}\n\n\tClassUtils._tM=null;\n\tClassUtils._alpha=NaN;\n\t__static(ClassUtils,\n\t['DrawTypeDic',function(){return this.DrawTypeDic={\"Rect\":[\"drawRect\",[[\"x\",0],[\"y\",0],[\"width\",0],[\"height\",0],[\"fillColor\",null],[\"lineColor\",null],[\"lineWidth\",1]]],\"Circle\":[\"drawCircle\",[[\"x\",0],[\"y\",0],[\"radius\",0],[\"fillColor\",null],[\"lineColor\",null],[\"lineWidth\",1]]],\"Pie\":[\"drawPie\",[[\"x\",0],[\"y\",0],[\"radius\",0],[\"startAngle\",0],[\"endAngle\",0],[\"fillColor\",null],[\"lineColor\",null],[\"lineWidth\",1]]],\"Image\":[\"drawTexture\",[[\"x\",0],[\"y\",0],[\"width\",0],[\"height\",0]]],\"Texture\":[\"drawTexture\",[[\"skin\",null],[\"x\",0],[\"y\",0],[\"width\",0],[\"height\",0]],1,\"_adptTextureData\"],\"FillTexture\":[\"fillTexture\",[[\"skin\",null],[\"x\",0],[\"y\",0],[\"width\",0],[\"height\",0],[\"repeat\",null]],1,\"_adptTextureData\"],\"FillText\":[\"fillText\",[[\"text\",\"\"],[\"x\",0],[\"y\",0],[\"font\",null],[\"color\",null],[\"textAlign\",null]],1],\"Line\":[\"drawLine\",[[\"x\",0],[\"y\",0],[\"toX\",0],[\"toY\",0],[\"lineColor\",null],[\"lineWidth\",0]],0,\"_adptLineData\"],\"Lines\":[\"drawLines\",[[\"x\",0],[\"y\",0],[\"points\",\"\"],[\"lineColor\",null],[\"lineWidth\",0]],0,\"_adptLinesData\"],\"Curves\":[\"drawCurves\",[[\"x\",0],[\"y\",0],[\"points\",\"\"],[\"lineColor\",null],[\"lineWidth\",0]],0,\"_adptLinesData\"],\"Poly\":[\"drawPoly\",[[\"x\",0],[\"y\",0],[\"points\",\"\"],[\"fillColor\",null],[\"lineColor\",null],[\"lineWidth\",1]],0,\"_adptLinesData\"]};}\n\t]);\n\treturn ClassUtils;\n})()\n\n\n/**\n*@private\n*<code>Color</code> 是一个颜色值处理类。\n*/\n//class laya.utils.Color\nvar Color=(function(){\n\tfunction Color(str){\n\t\t/**@private */\n\t\tthis._color=[];\n\t\t/**字符串型颜色值。*/\n\t\t//this.strColor=null;\n\t\t/**uint 型颜色值。*/\n\t\t//this.numColor=0;\n\t\t//this._drawStyle=null;\n\t\tif ((typeof str=='string')){\n\t\t\tthis.strColor=str;\n\t\t\tif (str===null)str=\"#000000\";\n\t\t\tstr.charAt(0)=='#' && (str=str.substr(1));\n\t\t\tvar len=str.length;\n\t\t\tif (len==3 || len==4){\n\t\t\t\tvar temp=\"\";\n\t\t\t\tfor (var i=0;i < len;i++){\n\t\t\t\t\ttemp+=(str[i]+str[i]);\n\t\t\t\t}\n\t\t\t\tstr=temp;\n\t\t\t};\n\t\t\tvar color=this.numColor=parseInt(str,16);\n\t\t\tvar flag=(str.length==8);\n\t\t\tif (flag){\n\t\t\t\tthis._color=[parseInt(str.substr(0,2),16)/ 255,((0x00FF0000 & color)>> 16)/ 255,((0x0000FF00 & color)>> 8)/ 255,(0x000000FF & color)/ 255];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t}else {\n\t\t\tcolor=this.numColor=str;\n\t\t\tthis.strColor=Utils.toHexColor(color);\n\t\t}\n\t\tthis._color=[((0xFF0000 & color)>> 16)/ 255,((0xFF00 & color)>> 8)/ 255,(0xFF & color)/ 255,1];\n\t\t(this._color).__id=++Color._COLODID;\n\t}\n\n\t__class(Color,'laya.utils.Color');\n\tColor._initDefault=function(){\n\t\tColor._DEFAULT={};\n\t\tfor (var i in Color._COLOR_MAP)Color._SAVE[i]=Color._DEFAULT[i]=new Color(Color._COLOR_MAP[i]);\n\t\treturn Color._DEFAULT;\n\t}\n\n\tColor._initSaveMap=function(){\n\t\tColor._SAVE_SIZE=0;\n\t\tColor._SAVE={};\n\t\tfor (var i in Color._DEFAULT)Color._SAVE[i]=Color._DEFAULT[i];\n\t}\n\n\tColor.create=function(str){\n\t\tvar color=Color._SAVE[str+\"\"];\n\t\tif (color !=null)return color;\n\t\t(Color._SAVE_SIZE < 1000)|| Color._initSaveMap();\n\t\treturn Color._SAVE[str+\"\"]=new Color(str);\n\t}\n\n\tColor._SAVE={};\n\tColor._SAVE_SIZE=0;\n\tColor._COLOR_MAP={\"white\":'#FFFFFF',\"red\":'#FF0000',\"green\":'#00FF00',\"blue\":'#0000FF',\"black\":'#000000',\"yellow\":'#FFFF00','gray':'#AAAAAA'};\n\tColor._DEFAULT=Color._initDefault();\n\tColor._COLODID=1;\n\treturn Color;\n})()\n\n\n/**\n*<code>Dictionary</code> 是一个字典型的数据存取类。\n*/\n//class laya.utils.Dictionary\nvar Dictionary=(function(){\n\tfunction Dictionary(){\n\t\tthis._values=[];\n\t\tthis._keys=[];\n\t}\n\n\t__class(Dictionary,'laya.utils.Dictionary');\n\tvar __proto=Dictionary.prototype;\n\t/**\n\t*给指定的键名设置值。\n\t*@param key 键名。\n\t*@param value 值。\n\t*/\n\t__proto.set=function(key,value){\n\t\tvar index=this.indexOf(key);\n\t\tif (index >=0){\n\t\t\tthis._values[index]=value;\n\t\t\treturn;\n\t\t}\n\t\tthis._keys.push(key);\n\t\tthis._values.push(value);\n\t}\n\n\t/**\n\t*获取指定对象的键名索引。\n\t*@param key 键名对象。\n\t*@return 键名索引。\n\t*/\n\t__proto.indexOf=function(key){\n\t\tvar index=this._keys.indexOf(key);\n\t\tif (index >=0)return index;\n\t\tkey=((typeof key=='string'))? Number(key):(((typeof key=='number'))? key.toString():key);\n\t\treturn this._keys.indexOf(key);\n\t}\n\n\t/**\n\t*返回指定键名的值。\n\t*@param key 键名对象。\n\t*@return 指定键名的值。\n\t*/\n\t__proto.get=function(key){\n\t\tvar index=this.indexOf(key);\n\t\treturn index < 0 ? null :this._values[index];\n\t}\n\n\t/**\n\t*移除指定键名的值。\n\t*@param key 键名对象。\n\t*@return 是否成功移除。\n\t*/\n\t__proto.remove=function(key){\n\t\tvar index=this.indexOf(key);\n\t\tif (index >=0){\n\t\t\tthis._keys.splice(index,1);\n\t\t\tthis._values.splice(index,1);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*清除此对象的键名列表和键值列表。\n\t*/\n\t__proto.clear=function(){\n\t\tthis._values.length=0;\n\t\tthis._keys.length=0;\n\t}\n\n\t/**\n\t*获取所有的子元素列表。\n\t*/\n\t__getset(0,__proto,'values',function(){\n\t\treturn this._values;\n\t});\n\n\t/**\n\t*获取所有的子元素键名列表。\n\t*/\n\t__getset(0,__proto,'keys',function(){\n\t\treturn this._keys;\n\t});\n\n\treturn Dictionary;\n})()\n\n\n/**\n*@private\n*<code>Dragging</code> 类是触摸滑动控件。\n*/\n//class laya.utils.Dragging\nvar Dragging=(function(){\n\tfunction Dragging(){\n\t\t/**被拖动的对象。*/\n\t\t//this.target=null;\n\t\t/**缓动衰减系数。*/\n\t\tthis.ratio=0.92;\n\t\t/**单帧最大偏移量。*/\n\t\tthis.maxOffset=60;\n\t\t/**滑动范围。*/\n\t\t//this.area=null;\n\t\t/**表示拖动是否有惯性。*/\n\t\t//this.hasInertia=false;\n\t\t/**橡皮筋最大值。*/\n\t\t//this.elasticDistance=NaN;\n\t\t/**橡皮筋回弹时间，单位为毫秒。*/\n\t\t//this.elasticBackTime=NaN;\n\t\t/**事件携带数据。*/\n\t\t//this.data=null;\n\t\tthis._dragging=false;\n\t\tthis._clickOnly=true;\n\t\t//this._elasticRateX=NaN;\n\t\t//this._elasticRateY=NaN;\n\t\t//this._lastX=NaN;\n\t\t//this._lastY=NaN;\n\t\t//this._offsetX=NaN;\n\t\t//this._offsetY=NaN;\n\t\t//this._offsets=null;\n\t\t//this._disableMouseEvent=false;\n\t\t//this._tween=null;\n\t\t//this._parent=null;\n\t}\n\n\t__class(Dragging,'laya.utils.Dragging');\n\tvar __proto=Dragging.prototype;\n\t/**\n\t*开始拖拽。\n\t*@param target 待拖拽的 <code>Sprite</code> 对象。\n\t*@param area 滑动范围。\n\t*@param hasInertia 拖动是否有惯性。\n\t*@param elasticDistance 橡皮筋最大值。\n\t*@param elasticBackTime 橡皮筋回弹时间，单位为毫秒。\n\t*@param data 事件携带数据。\n\t*@param disableMouseEvent 鼠标事件是否有效。\n\t*@param ratio 惯性阻尼系数\n\t*/\n\t__proto.start=function(target,area,hasInertia,elasticDistance,elasticBackTime,data,disableMouseEvent,ratio){\n\t\t(ratio===void 0)&& (ratio=0.92);\n\t\tthis.clearTimer();\n\t\tthis.target=target;\n\t\tthis.area=area;\n\t\tthis.hasInertia=hasInertia;\n\t\tthis.elasticDistance=area ? elasticDistance :0;\n\t\tthis.elasticBackTime=elasticBackTime;\n\t\tthis.data=data;\n\t\tthis._disableMouseEvent=disableMouseEvent;\n\t\tthis.ratio=ratio;\n\t\tthis._parent=target.parent;\n\t\tthis._clickOnly=true;\n\t\tthis._dragging=true;\n\t\tthis._elasticRateX=this._elasticRateY=1;\n\t\tthis._lastX=this._parent.mouseX;\n\t\tthis._lastY=this._parent.mouseY;\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onStageMouseUp);\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onStageMouseUp);\n\t\tLaya.timer.frameLoop(1,this,this.loop);\n\t}\n\n\t/**\n\t*清除计时器。\n\t*/\n\t__proto.clearTimer=function(){\n\t\tLaya.timer.clear(this,this.loop);\n\t\tLaya.timer.clear(this,this.tweenMove);\n\t\tif (this._tween){\n\t\t\tthis._tween.recover();\n\t\t\tthis._tween=null;\n\t\t}\n\t}\n\n\t/**\n\t*停止拖拽。\n\t*/\n\t__proto.stop=function(){\n\t\tif (this._dragging){\n\t\t\tMouseManager.instance.disableMouseEvent=false;\n\t\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onStageMouseUp);\n\t\t\tLaya.stage.off(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onStageMouseUp);\n\t\t\tthis._dragging=false;\n\t\t\tthis.target && this.area && this.backToArea();\n\t\t\tthis.clear();\n\t\t}\n\t}\n\n\t/**\n\t*拖拽的循环处理函数。\n\t*/\n\t__proto.loop=function(){\n\t\tvar point=this._parent.getMousePoint();\n\t\tvar mouseX=point.x;\n\t\tvar mouseY=point.y;\n\t\tvar offsetX=mouseX-this._lastX;\n\t\tvar offsetY=mouseY-this._lastY;\n\t\tif (this._clickOnly){\n\t\t\tif (Math.abs(offsetX *Laya.stage._canvasTransform.getScaleX())> 1 || Math.abs(offsetY *Laya.stage._canvasTransform.getScaleY())> 1){\n\t\t\t\tthis._clickOnly=false;\n\t\t\t\tthis._offsets || (this._offsets=[]);\n\t\t\t\tthis._offsets.length=0;\n\t\t\t\tthis.target.event(/*laya.events.Event.DRAG_START*/\"dragstart\",this.data);\n\t\t\t\tMouseManager.instance.disableMouseEvent=this._disableMouseEvent;\n\t\t\t\tthis.target._set$P(\"$_MOUSEDOWN\",false);\n\t\t\t}else return;\n\t\t\t}else {\n\t\t\tthis._offsets.push(offsetX,offsetY);\n\t\t}\n\t\tif (offsetX===0 && offsetY===0)return;\n\t\tthis._lastX=mouseX;\n\t\tthis._lastY=mouseY;\n\t\tthis.target.x+=offsetX *this._elasticRateX;\n\t\tthis.target.y+=offsetY *this._elasticRateY;\n\t\tthis.area && this.checkArea();\n\t\tthis.target.event(/*laya.events.Event.DRAG_MOVE*/\"dragmove\",this.data);\n\t}\n\n\t/**\n\t*拖拽区域检测。\n\t*/\n\t__proto.checkArea=function(){\n\t\tif (this.elasticDistance <=0){\n\t\t\tthis.backToArea();\n\t\t\t}else {\n\t\t\tif (this.target.x < this.area.x){\n\t\t\t\tvar offsetX=this.area.x-this.target.x;\n\t\t\t\t}else if (this.target.x > this.area.x+this.area.width){\n\t\t\t\toffsetX=this.target.x-this.area.x-this.area.width;\n\t\t\t\t}else {\n\t\t\t\toffsetX=0;\n\t\t\t}\n\t\t\tthis._elasticRateX=Math.max(0,1-(offsetX / this.elasticDistance));\n\t\t\tif (this.target.y < this.area.y){\n\t\t\t\tvar offsetY=this.area.y-this.target.y;\n\t\t\t\t}else if (this.target.y > this.area.y+this.area.height){\n\t\t\t\toffsetY=this.target.y-this.area.y-this.area.height;\n\t\t\t\t}else {\n\t\t\t\toffsetY=0;\n\t\t\t}\n\t\t\tthis._elasticRateY=Math.max(0,1-(offsetY / this.elasticDistance));\n\t\t}\n\t}\n\n\t/**\n\t*移动至设定的拖拽区域。\n\t*/\n\t__proto.backToArea=function(){\n\t\tthis.target.x=Math.min(Math.max(this.target.x,this.area.x),this.area.x+this.area.width);\n\t\tthis.target.y=Math.min(Math.max(this.target.y,this.area.y),this.area.y+this.area.height);\n\t}\n\n\t/**\n\t*舞台的抬起事件侦听函数。\n\t*@param e Event 对象。\n\t*/\n\t__proto.onStageMouseUp=function(e){\n\t\tMouseManager.instance.disableMouseEvent=false;\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onStageMouseUp);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onStageMouseUp);\n\t\tLaya.timer.clear(this,this.loop);\n\t\tif (this._clickOnly || !this.target)return;\n\t\tif (this.hasInertia){\n\t\t\tif (this._offsets.length < 1){\n\t\t\t\tthis._offsets.push(this._parent.mouseX-this._lastX,this._parent.mouseY-this._lastY);\n\t\t\t}\n\t\t\tthis._offsetX=this._offsetY=0;\n\t\t\tvar len=this._offsets.length;\n\t\t\tvar n=Math.min(len,6);\n\t\t\tvar m=this._offsets.length-n;\n\t\t\tfor (var i=len-1;i > m;i--){\n\t\t\t\tthis._offsetY+=this._offsets[i--];\n\t\t\t\tthis._offsetX+=this._offsets[i];\n\t\t\t}\n\t\t\tthis._offsetX=this._offsetX / n *2;\n\t\t\tthis._offsetY=this._offsetY / n *2;\n\t\t\tif (Math.abs(this._offsetX)> this.maxOffset)this._offsetX=this._offsetX > 0 ? this.maxOffset :-this.maxOffset;\n\t\t\tif (Math.abs(this._offsetY)> this.maxOffset)this._offsetY=this._offsetY > 0 ? this.maxOffset :-this.maxOffset;\n\t\t\tLaya.timer.frameLoop(1,this,this.tweenMove);\n\t\t\t}else if (this.elasticDistance > 0){\n\t\t\tthis.checkElastic();\n\t\t\t}else {\n\t\t\tthis.clear();\n\t\t}\n\t}\n\n\t/**\n\t*橡皮筋效果检测。\n\t*/\n\t__proto.checkElastic=function(){\n\t\tvar tx=NaN;\n\t\tvar ty=NaN;\n\t\tif (this.target.x < this.area.x)tx=this.area.x;\n\t\telse if (this.target.x > this.area.x+this.area.width)tx=this.area.x+this.area.width;\n\t\tif (this.target.y < this.area.y)ty=this.area.y;\n\t\telse if (this.target.y > this.area.y+this.area.height)ty=this.area.y+this.area.height;\n\t\tif (!isNaN(tx)|| !isNaN(ty)){\n\t\t\tvar obj={};\n\t\t\tif (!isNaN(tx))obj.x=tx;\n\t\t\tif (!isNaN(ty))obj.y=ty;\n\t\t\tthis._tween=Tween.to(this.target,obj,this.elasticBackTime,Ease.sineOut,Handler.create(this,this.clear),0,false,false);\n\t\t\t}else {\n\t\t\tthis.clear();\n\t\t}\n\t}\n\n\t/**\n\t*移动。\n\t*/\n\t__proto.tweenMove=function(){\n\t\tthis._offsetX *=this.ratio *this._elasticRateX;\n\t\tthis._offsetY *=this.ratio *this._elasticRateY;\n\t\tthis.target.x+=this._offsetX;\n\t\tthis.target.y+=this._offsetY;\n\t\tthis.area && this.checkArea();\n\t\tthis.target.event(/*laya.events.Event.DRAG_MOVE*/\"dragmove\",this.data);\n\t\tif ((Math.abs(this._offsetX)< 1 && Math.abs(this._offsetY)< 1)|| this._elasticRateX < 0.5 || this._elasticRateY < 0.5){\n\t\t\tLaya.timer.clear(this,this.tweenMove);\n\t\t\tif (this.elasticDistance > 0)this.checkElastic();\n\t\t\telse this.clear();\n\t\t}\n\t}\n\n\t/**\n\t*结束拖拽。\n\t*/\n\t__proto.clear=function(){\n\t\tif (this.target){\n\t\t\tthis.clearTimer();\n\t\t\tvar sp=this.target;\n\t\t\tthis.target=null;\n\t\t\tthis._parent=null;\n\t\t\tsp.event(/*laya.events.Event.DRAG_END*/\"dragend\",this.data);\n\t\t}\n\t}\n\n\treturn Dragging;\n})()\n\n\n/**\n*<code>Ease</code> 类定义了缓动函数，以便实现 <code>Tween</code> 动画的缓动效果。\n*/\n//class laya.utils.Ease\nvar Ease=(function(){\n\tfunction Ease(){}\n\t__class(Ease,'laya.utils.Ease');\n\tEase.linearNone=function(t,b,c,d){\n\t\treturn c *t / d+b;\n\t}\n\n\tEase.linearIn=function(t,b,c,d){\n\t\treturn c *t / d+b;\n\t}\n\n\tEase.linearInOut=function(t,b,c,d){\n\t\treturn c *t / d+b;\n\t}\n\n\tEase.linearOut=function(t,b,c,d){\n\t\treturn c *t / d+b;\n\t}\n\n\tEase.bounceIn=function(t,b,c,d){\n\t\treturn c-Ease.bounceOut(d-t,0,c,d)+b;\n\t}\n\n\tEase.bounceInOut=function(t,b,c,d){\n\t\tif (t < d *0.5)return Ease.bounceIn(t *2,0,c,d)*.5+b;\n\t\telse return Ease.bounceOut(t *2-d,0,c,d)*.5+c *.5+b;\n\t}\n\n\tEase.bounceOut=function(t,b,c,d){\n\t\tif ((t /=d)< (1 / 2.75))return c *(7.5625 *t *t)+b;\n\t\telse if (t < (2 / 2.75))return c *(7.5625 *(t-=(1.5 / 2.75))*t+.75)+b;\n\t\telse if (t < (2.5 / 2.75))return c *(7.5625 *(t-=(2.25 / 2.75))*t+.9375)+b;\n\t\telse return c *(7.5625 *(t-=(2.625 / 2.75))*t+.984375)+b;\n\t}\n\n\tEase.backIn=function(t,b,c,d,s){\n\t\t(s===void 0)&& (s=1.70158);\n\t\treturn c *(t /=d)*t *((s+1)*t-s)+b;\n\t}\n\n\tEase.backInOut=function(t,b,c,d,s){\n\t\t(s===void 0)&& (s=1.70158);\n\t\tif ((t /=d *0.5)< 1)return c *0.5 *(t *t *(((s *=(1.525))+1)*t-s))+b;\n\t\treturn c / 2 *((t-=2)*t *(((s *=(1.525))+1)*t+s)+2)+b;\n\t}\n\n\tEase.backOut=function(t,b,c,d,s){\n\t\t(s===void 0)&& (s=1.70158);\n\t\treturn c *((t=t / d-1)*t *((s+1)*t+s)+1)+b;\n\t}\n\n\tEase.elasticIn=function(t,b,c,d,a,p){\n\t\t(a===void 0)&& (a=0);\n\t\t(p===void 0)&& (p=0);\n\t\tvar s;\n\t\tif (t==0)return b;\n\t\tif ((t /=d)==1)return b+c;\n\t\tif (!p)p=d *.3;\n\t\tif (!a || (c > 0 && a < c)|| (c < 0 && a <-c)){\n\t\t\ta=c;\n\t\t\ts=p / 4;\n\t\t}else s=p / Ease.PI2 *Math.asin(c / a);\n\t\treturn-(a *Math.pow(2,10 *(t-=1))*Math.sin((t *d-s)*Ease.PI2 / p))+b;\n\t}\n\n\tEase.elasticInOut=function(t,b,c,d,a,p){\n\t\t(a===void 0)&& (a=0);\n\t\t(p===void 0)&& (p=0);\n\t\tvar s;\n\t\tif (t==0)return b;\n\t\tif ((t /=d *0.5)==2)return b+c;\n\t\tif (!p)p=d *(.3 *1.5);\n\t\tif (!a || (c > 0 && a < c)|| (c < 0 && a <-c)){\n\t\t\ta=c;\n\t\t\ts=p / 4;\n\t\t}else s=p / Ease.PI2 *Math.asin(c / a);\n\t\tif (t < 1)return-.5 *(a *Math.pow(2,10 *(t-=1))*Math.sin((t *d-s)*Ease.PI2 / p))+b;\n\t\treturn a *Math.pow(2,-10 *(t-=1))*Math.sin((t *d-s)*Ease.PI2 / p)*.5+c+b;\n\t}\n\n\tEase.elasticOut=function(t,b,c,d,a,p){\n\t\t(a===void 0)&& (a=0);\n\t\t(p===void 0)&& (p=0);\n\t\tvar s;\n\t\tif (t==0)return b;\n\t\tif ((t /=d)==1)return b+c;\n\t\tif (!p)p=d *.3;\n\t\tif (!a || (c > 0 && a < c)|| (c < 0 && a <-c)){\n\t\t\ta=c;\n\t\t\ts=p / 4;\n\t\t}else s=p / Ease.PI2 *Math.asin(c / a);\n\t\treturn (a *Math.pow(2,-10 *t)*Math.sin((t *d-s)*Ease.PI2 / p)+c+b);\n\t}\n\n\tEase.strongIn=function(t,b,c,d){\n\t\treturn c *(t /=d)*t *t *t *t+b;\n\t}\n\n\tEase.strongInOut=function(t,b,c,d){\n\t\tif ((t /=d *0.5)< 1)return c *0.5 *t *t *t *t *t+b;\n\t\treturn c *0.5 *((t-=2)*t *t *t *t+2)+b;\n\t}\n\n\tEase.strongOut=function(t,b,c,d){\n\t\treturn c *((t=t / d-1)*t *t *t *t+1)+b;\n\t}\n\n\tEase.sineInOut=function(t,b,c,d){\n\t\treturn-c *0.5 *(Math.cos(Math.PI *t / d)-1)+b;\n\t}\n\n\tEase.sineIn=function(t,b,c,d){\n\t\treturn-c *Math.cos(t / d *Ease.HALF_PI)+c+b;\n\t}\n\n\tEase.sineOut=function(t,b,c,d){\n\t\treturn c *Math.sin(t / d *Ease.HALF_PI)+b;\n\t}\n\n\tEase.quintIn=function(t,b,c,d){\n\t\treturn c *(t /=d)*t *t *t *t+b;\n\t}\n\n\tEase.quintInOut=function(t,b,c,d){\n\t\tif ((t /=d *0.5)< 1)return c *0.5 *t *t *t *t *t+b;\n\t\treturn c *0.5 *((t-=2)*t *t *t *t+2)+b;\n\t}\n\n\tEase.quintOut=function(t,b,c,d){\n\t\treturn c *((t=t / d-1)*t *t *t *t+1)+b;\n\t}\n\n\tEase.quartIn=function(t,b,c,d){\n\t\treturn c *(t /=d)*t *t *t+b;\n\t}\n\n\tEase.quartInOut=function(t,b,c,d){\n\t\tif ((t /=d *0.5)< 1)return c *0.5 *t *t *t *t+b;\n\t\treturn-c *0.5 *((t-=2)*t *t *t-2)+b;\n\t}\n\n\tEase.quartOut=function(t,b,c,d){\n\t\treturn-c *((t=t / d-1)*t *t *t-1)+b;\n\t}\n\n\tEase.cubicIn=function(t,b,c,d){\n\t\treturn c *(t /=d)*t *t+b;\n\t}\n\n\tEase.cubicInOut=function(t,b,c,d){\n\t\tif ((t /=d *0.5)< 1)return c *0.5 *t *t *t+b;\n\t\treturn c *0.5 *((t-=2)*t *t+2)+b;\n\t}\n\n\tEase.cubicOut=function(t,b,c,d){\n\t\treturn c *((t=t / d-1)*t *t+1)+b;\n\t}\n\n\tEase.quadIn=function(t,b,c,d){\n\t\treturn c *(t /=d)*t+b;\n\t}\n\n\tEase.quadInOut=function(t,b,c,d){\n\t\tif ((t /=d *0.5)< 1)return c *0.5 *t *t+b;\n\t\treturn-c *0.5 *((--t)*(t-2)-1)+b;\n\t}\n\n\tEase.quadOut=function(t,b,c,d){\n\t\treturn-c *(t /=d)*(t-2)+b;\n\t}\n\n\tEase.expoIn=function(t,b,c,d){\n\t\treturn (t==0)? b :c *Math.pow(2,10 *(t / d-1))+b-c *0.001;\n\t}\n\n\tEase.expoInOut=function(t,b,c,d){\n\t\tif (t==0)return b;\n\t\tif (t==d)return b+c;\n\t\tif ((t /=d *0.5)< 1)return c *0.5 *Math.pow(2,10 *(t-1))+b;\n\t\treturn c *0.5 *(-Math.pow(2,-10 *--t)+2)+b;\n\t}\n\n\tEase.expoOut=function(t,b,c,d){\n\t\treturn (t==d)? b+c :c *(-Math.pow(2,-10 *t / d)+1)+b;\n\t}\n\n\tEase.circIn=function(t,b,c,d){\n\t\treturn-c *(Math.sqrt(1-(t /=d)*t)-1)+b;\n\t}\n\n\tEase.circInOut=function(t,b,c,d){\n\t\tif ((t /=d *0.5)< 1)return-c *0.5 *(Math.sqrt(1-t *t)-1)+b;\n\t\treturn c *0.5 *(Math.sqrt(1-(t-=2)*t)+1)+b;\n\t}\n\n\tEase.circOut=function(t,b,c,d){\n\t\treturn c *Math.sqrt(1-(t=t / d-1)*t)+b;\n\t}\n\n\tEase.HALF_PI=Math.PI *0.5;\n\tEase.PI2=Math.PI *2;\n\treturn Ease;\n})()\n\n\n/**\n*鼠标点击区域，可以设置绘制一系列矢量图作为点击区域和非点击区域（目前只支持圆形，矩形，多边形）\n*/\n//class laya.utils.HitArea\nvar HitArea=(function(){\n\tfunction HitArea(){\n\t\t/**@private */\n\t\tthis._hit=null;\n\t\t/**@private */\n\t\tthis._unHit=null;\n\t}\n\n\t__class(HitArea,'laya.utils.HitArea');\n\tvar __proto=HitArea.prototype;\n\t/**\n\t*是否包含某个点\n\t*@param x x坐标\n\t*@param y y坐标\n\t*@return 是否点击到\n\t*/\n\t__proto.isHit=function(x,y){\n\t\tif (!HitArea.isHitGraphic(x,y,this.hit))return false;\n\t\treturn !HitArea.isHitGraphic(x,y,this.unHit);\n\t}\n\n\t/**\n\t*检测对象是否包含指定的点。\n\t*@param x 点的 X 轴坐标值（水平位置）。\n\t*@param y 点的 Y 轴坐标值（垂直位置）。\n\t*@return 如果包含指定的点，则值为 true；否则为 false。\n\t*/\n\t__proto.contains=function(x,y){\n\t\treturn this.isHit(x,y);\n\t}\n\n\t/**\n\t*可点击区域，可以设置绘制一系列矢量图作为点击区域（目前只支持圆形，矩形，多边形）\n\t*/\n\t__getset(0,__proto,'hit',function(){\n\t\tif (!this._hit)this._hit=new Graphics();\n\t\treturn this._hit;\n\t\t},function(value){\n\t\tthis._hit=value;\n\t});\n\n\t/**\n\t*不可点击区域，可以设置绘制一系列矢量图作为非点击区域（目前只支持圆形，矩形，多边形）\n\t*/\n\t__getset(0,__proto,'unHit',function(){\n\t\tif (!this._unHit)this._unHit=new Graphics();\n\t\treturn this._unHit;\n\t\t},function(value){\n\t\tthis._unHit=value;\n\t});\n\n\tHitArea.isHitGraphic=function(x,y,graphic){\n\t\tif (!graphic)return false;\n\t\tvar cmds;\n\t\tcmds=graphic.cmds;\n\t\tif (!cmds && graphic._one){\n\t\t\tcmds=HitArea._cmds;\n\t\t\tcmds.length=1;\n\t\t\tcmds[0]=graphic._one;\n\t\t}\n\t\tif (!cmds)return false;\n\t\tvar i=0,len=0;\n\t\tlen=cmds.length;\n\t\tvar cmd;\n\t\tfor (i=0;i < len;i++){\n\t\t\tcmd=cmds[i];\n\t\t\tif (!cmd)continue ;\n\t\t\tvar context=Render._context;\n\t\t\tswitch (cmd.callee){\n\t\t\t\tcase context._translate:\n\t\t\t\tcase 6:\n\t\t\t\t\tx-=cmd[0];\n\t\t\t\t\ty-=cmd[1];\n\t\t\t\tdefault :\n\t\t\t\t}\n\t\t\tif (HitArea.isHitCmd(x,y,cmd))return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tHitArea.isHitCmd=function(x,y,cmd){\n\t\tif (!cmd)return false;\n\t\tvar context=Render._context;\n\t\tvar rst=false;\n\t\tswitch (cmd[\"callee\"]){\n\t\t\tcase context._drawRect:\n\t\t\tcase 13:\n\t\t\t\tHitArea._rec.setTo(cmd[0],cmd[1],cmd[2],cmd[3]);\n\t\t\t\trst=HitArea._rec.contains(x,y);\n\t\t\t\tbreak ;\n\t\t\tcase context._drawCircle:\n\t\t\tcase context._fillCircle:\n\t\t\tcase 14:;\n\t\t\t\tvar d=NaN;\n\t\t\t\tx-=cmd[0];\n\t\t\t\ty-=cmd[1];\n\t\t\t\td=x *x+y *y;\n\t\t\t\trst=d < cmd[2] *cmd[2];\n\t\t\t\tbreak ;\n\t\t\tcase context._drawPoly:\n\t\t\tcase 18:\n\t\t\t\tx-=cmd[0];\n\t\t\t\ty-=cmd[1];\n\t\t\t\trst=HitArea.ptInPolygon(x,y,cmd[2]);\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tbreak ;\n\t\t\t}\n\t\treturn rst;\n\t}\n\n\tHitArea.ptInPolygon=function(x,y,areaPoints){\n\t\tvar p;\n\t\tp=HitArea._ptPoint;\n\t\tp.setTo(x,y);\n\t\tvar nCross=0;\n\t\tvar p1x=NaN,p1y=NaN,p2x=NaN,p2y=NaN;\n\t\tvar len=0;\n\t\tlen=areaPoints.length;\n\t\tfor (var i=0;i < len;i+=2){\n\t\t\tp1x=areaPoints[i];\n\t\t\tp1y=areaPoints[i+1];\n\t\t\tp2x=areaPoints[(i+2)% len];\n\t\t\tp2y=areaPoints[(i+3)% len];\n\t\t\tif (p1y==p2y)\n\t\t\t\tcontinue ;\n\t\t\tif (p.y < Math.min(p1y,p2y))\n\t\t\t\tcontinue ;\n\t\t\tif (p.y >=Math.max(p1y,p2y))\n\t\t\t\tcontinue ;\n\t\t\tvar tx=(p.y-p1y)*(p2x-p1x)/ (p2y-p1y)+p1x;\n\t\t\tif (tx > p.x){\n\t\t\t\tnCross++;\n\t\t\t}\n\t\t}\n\t\treturn (nCross % 2==1);\n\t}\n\n\tHitArea._cmds=[];\n\t__static(HitArea,\n\t['_rec',function(){return this._rec=new Rectangle();},'_ptPoint',function(){return this._ptPoint=new Point();}\n\t]);\n\treturn HitArea;\n})()\n\n\n/**\n*@private\n*<code>HTMLChar</code> 是一个 HTML 字符类。\n*/\n//class laya.utils.HTMLChar\nvar HTMLChar=(function(){\n\tfunction HTMLChar(char,w,h,style){\n\t\t//this._sprite=null;\n\t\t//this._x=NaN;\n\t\t//this._y=NaN;\n\t\t//this._w=NaN;\n\t\t//this._h=NaN;\n\t\t/**表示是否是正常单词(英文|.|数字)。*/\n\t\t//this.isWord=false;\n\t\t/**字符。*/\n\t\t//this.char=null;\n\t\t/**字符数量。*/\n\t\t//this.charNum=NaN;\n\t\t/**CSS 样式。*/\n\t\t//this.style=null;\n\t\tthis.char=char;\n\t\tthis.charNum=char.charCodeAt(0);\n\t\tthis._x=this._y=0;\n\t\tthis.width=w;\n\t\tthis.height=h;\n\t\tthis.style=style;\n\t\tthis.isWord=!HTMLChar._isWordRegExp.test(char);\n\t}\n\n\t__class(HTMLChar,'laya.utils.HTMLChar');\n\tvar __proto=HTMLChar.prototype;\n\tLaya.imps(__proto,{\"laya.display.ILayout\":true})\n\t/**\n\t*设置与此对象绑定的显示对象 <code>Sprite</code> 。\n\t*@param sprite 显示对象 <code>Sprite</code> 。\n\t*/\n\t__proto.setSprite=function(sprite){\n\t\tthis._sprite=sprite;\n\t}\n\n\t/**\n\t*获取与此对象绑定的显示对象 <code>Sprite</code>。\n\t*@return\n\t*/\n\t__proto.getSprite=function(){\n\t\treturn this._sprite;\n\t}\n\n\t/**@private */\n\t__proto._isChar=function(){\n\t\treturn true;\n\t}\n\n\t/**@private */\n\t__proto._getCSSStyle=function(){\n\t\treturn this.style;\n\t}\n\n\t/**\n\t*宽度。\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._w;\n\t\t},function(value){\n\t\tthis._w=value;\n\t});\n\n\t/**\n\t*此对象存储的 X 轴坐标值。\n\t*当设置此值时，如果此对象有绑定的 Sprite 对象，则改变 Sprite 对象的属性 x 的值。\n\t*/\n\t__getset(0,__proto,'x',function(){\n\t\treturn this._x;\n\t\t},function(value){\n\t\tif (this._sprite){\n\t\t\tthis._sprite.x=value;\n\t\t}\n\t\tthis._x=value;\n\t});\n\n\t/**\n\t*此对象存储的 Y 轴坐标值。\n\t*当设置此值时，如果此对象有绑定的 Sprite 对象，则改变 Sprite 对象的属性 y 的值。\n\t*/\n\t__getset(0,__proto,'y',function(){\n\t\treturn this._y;\n\t\t},function(value){\n\t\tif (this._sprite){\n\t\t\tthis._sprite.y=value;\n\t\t}\n\t\tthis._y=value;\n\t});\n\n\t/**\n\t*高度。\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\treturn this._h;\n\t\t},function(value){\n\t\tthis._h=value;\n\t});\n\n\tHTMLChar._isWordRegExp=new RegExp(\"[\\\\w\\.]\",\"\");\n\treturn HTMLChar;\n})()\n\n\n/**\n*<code>Log</code> 类用于在界面内显示日志记录信息。\n*/\n//class laya.utils.Log\nvar Log=(function(){\n\tfunction Log(){}\n\t__class(Log,'laya.utils.Log');\n\tLog.enable=function(){\n\t\tif (!Log._logdiv){\n\t\t\tLog._logdiv=Browser.window.document.createElement('div');\n\t\t\tBrowser.window.document.body.appendChild(Log._logdiv);\n\t\t\tLog._logdiv.style.cssText=\"pointer-events:none;border:white;overflow:hidden;z-index:1000000;background:rgba(100,100,100,0.6);color:white;position: absolute;left:0px;top:0px;width:50%;height:50%;\";\n\t\t}\n\t}\n\n\tLog.toggle=function(){\n\t\tvar style=Log._logdiv.style;\n\t\tif (style.width==\"1px\"){\n\t\t\tstyle.width=style.height=\"50%\";\n\t\t\t}else {\n\t\t\tstyle.width=style.height=\"1px\";\n\t\t}\n\t}\n\n\tLog.print=function(value){\n\t\tif (Log._logdiv){\n\t\t\tif (Log._count >=Log.maxCount)Log.clear();\n\t\t\tLog._count++;\n\t\t\tLog._logdiv.innerText+=value+\"\\n\";\n\t\t\tLog._logdiv.scrollTop=Log._logdiv.scrollHeight;\n\t\t}\n\t}\n\n\tLog.clear=function(){\n\t\tLog._logdiv.innerText=\"\";\n\t\tLog._count=0;\n\t}\n\n\tLog._logdiv=null;\n\tLog._count=0;\n\tLog.maxCount=20;\n\treturn Log;\n})()\n\n\n/**\n*<code>Mouse</code> 类用于控制鼠标光标。\n*/\n//class laya.utils.Mouse\nvar Mouse=(function(){\n\tfunction Mouse(){}\n\t__class(Mouse,'laya.utils.Mouse');\n\t/**\n\t*设置鼠标样式\n\t*@param cursorStr\n\t*例如auto move no-drop col-resize\n\t*all-scroll pointer not-allowed row-resize\n\t*crosshair progress e-resize ne-resize\n\t*default text n-resize nw-resize\n\t*help vertical-text s-resize se-resize\n\t*inherit wait w-resize sw-resize\n\t*\n\t*/\n\t__getset(1,Mouse,'cursor',function(){\n\t\treturn Mouse._style.cursor;\n\t\t},function(cursorStr){\n\t\tMouse._style.cursor=cursorStr;\n\t});\n\n\tMouse.hide=function(){\n\t\tif (Mouse.cursor !=\"none\"){\n\t\t\tMouse._preCursor=Mouse.cursor;\n\t\t\tMouse.cursor=\"none\";\n\t\t}\n\t}\n\n\tMouse.show=function(){\n\t\tif (Mouse.cursor==\"none\"){\n\t\t\tif (Mouse._preCursor){\n\t\t\t\tMouse.cursor=Mouse._preCursor;\n\t\t\t\t}else {\n\t\t\t\tMouse.cursor=\"auto\";\n\t\t\t}\n\t\t}\n\t}\n\n\tMouse._preCursor=null;\n\t__static(Mouse,\n\t['_style',function(){return this._style=Browser.document.body.style;}\n\t]);\n\treturn Mouse;\n})()\n\n\n/**\n*<p> <code>Pool</code> 是对象池类，用于对象的存贮、重复使用。</p>\n*<p>合理使用对象池，可以有效减少对象创建的开销，避免频繁的垃圾回收，从而优化游戏流畅度。</p>\n*/\n//class laya.utils.Pool\nvar Pool=(function(){\n\tfunction Pool(){}\n\t__class(Pool,'laya.utils.Pool');\n\tPool.getPoolBySign=function(sign){\n\t\treturn Pool._poolDic[sign] || (Pool._poolDic[sign]=[]);\n\t}\n\n\tPool.clearBySign=function(sign){\n\t\tif (Pool._poolDic[sign])Pool._poolDic[sign].length=0;\n\t}\n\n\tPool.recover=function(sign,item){\n\t\tif (item[\"__InPool\"])return;\n\t\titem[\"__InPool\"]=true;\n\t\tPool.getPoolBySign(sign).push(item);\n\t}\n\n\tPool.getItemByClass=function(sign,cls){\n\t\tvar pool=Pool.getPoolBySign(sign);\n\t\tvar rst=pool.length ? pool.pop():new cls();\n\t\trst[\"__InPool\"]=false;\n\t\treturn rst;\n\t}\n\n\tPool.getItemByCreateFun=function(sign,createFun,caller){\n\t\tvar pool=Pool.getPoolBySign(sign);\n\t\tvar rst=pool.length ? pool.pop():createFun.call(caller);\n\t\trst[\"__InPool\"]=false;\n\t\treturn rst;\n\t}\n\n\tPool.getItem=function(sign){\n\t\tvar pool=Pool.getPoolBySign(sign);\n\t\tvar rst=pool.length ? pool.pop():null;\n\t\tif (rst){\n\t\t\trst[\"__InPool\"]=false;\n\t\t}\n\t\treturn rst;\n\t}\n\n\tPool._poolDic={};\n\tPool.InPoolSign=\"__InPool\";\n\treturn Pool;\n})()\n\n\n/**\n*@private\n*基于个数的对象缓存管理器\n*/\n//class laya.utils.PoolCache\nvar PoolCache=(function(){\n\tfunction PoolCache(){\n\t\t/**\n\t\t*对象在Pool中的标识\n\t\t*/\n\t\tthis.sign=null;\n\t\t/**\n\t\t*允许缓存的最大数量\n\t\t*/\n\t\tthis.maxCount=1000;\n\t}\n\n\t__class(PoolCache,'laya.utils.PoolCache');\n\tvar __proto=PoolCache.prototype;\n\t/**\n\t*获取缓存的对象列表\n\t*@return\n\t*\n\t*/\n\t__proto.getCacheList=function(){\n\t\treturn Pool.getPoolBySign(this.sign);\n\t}\n\n\t/**\n\t*尝试清理缓存\n\t*@param force 是否强制清理\n\t*\n\t*/\n\t__proto.tryDispose=function(force){\n\t\tvar list;\n\t\tlist=Pool.getPoolBySign(this.sign);\n\t\tif (list.length > this.maxCount){\n\t\t\tlist.splice(this.maxCount,list.length-this.maxCount);\n\t\t}\n\t}\n\n\tPoolCache.addPoolCacheManager=function(sign,maxCount){\n\t\t(maxCount===void 0)&& (maxCount=100);\n\t\tvar cache;\n\t\tcache=new PoolCache();\n\t\tcache.sign=sign;\n\t\tcache.maxCount=maxCount;\n\t\tCacheManager.regCacheByFunction(Utils.bind(cache.tryDispose,cache),Utils.bind(cache.getCacheList,cache));\n\t}\n\n\treturn PoolCache;\n})()\n\n\n/**\n*<p> <code>Stat</code> 是一个性能统计面板，可以实时更新相关的性能参数。</p>\n*<p>参与统计的性能参数如下（所有参数都是每大约1秒进行更新）：<br/>\n*FPS(Canvas)/FPS(WebGL)：Canvas 模式或者 WebGL 模式下的帧频，也就是每秒显示的帧数，值越高、越稳定，感觉越流畅；<br/>\n*Sprite：统计所有渲染节点（包括容器）数量，它的大小会影响引擎进行节点遍历、数据组织和渲染的效率。其值越小，游戏运行效率越高；<br/>\n*DrawCall：此值是决定性能的重要指标，其值越小，游戏运行效率越高。Canvas模式下表示每大约1秒的图像绘制次数；WebGL模式下表示每大约1秒的渲染提交批次，每次准备数据并通知GPU渲染绘制的过程称为1次DrawCall，在每次DrawCall中除了在通知GPU的渲染上比较耗时之外，切换材质与shader也是非常耗时的操作；<br/>\n*CurMem：Canvas模式下，表示内存占用大小，值越小越好，过高会导致游戏闪退；WebGL模式下，表示内存与显存的占用，值越小越好；<br/>\n*Shader：是 WebGL 模式独有的性能指标，表示每大约1秒 Shader 提交次数，值越小越好；<br/>\n*Canvas：由三个数值组成，只有设置 CacheAs 后才会有值，默认为0/0/0。从左到右数值的意义分别为：每帧重绘的画布数量 / 缓存类型为\"normal\"类型的画布数量 / 缓存类型为\"bitmap\"类型的画布数量。</p>\n*/\n//class laya.utils.Stat\nvar Stat=(function(){\n\tfunction Stat(){}\n\t__class(Stat,'laya.utils.Stat');\n\t/**\n\t*点击性能统计显示区域的处理函数。\n\t*/\n\t__getset(1,Stat,'onclick',null,function(fn){\n\t\tif (Stat._sp){\n\t\t\tStat._sp.on(\"click\",Stat._sp,fn);\n\t\t}\n\t\tif (Stat._canvas){\n\t\t\tStat._canvas.source.onclick=fn;\n\t\t\tStat._canvas.source.style.pointerEvents='';\n\t\t}\n\t});\n\n\tStat.show=function(x,y){\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\tif (Render.isConchApp && !Render.isConchWebGL){\n\t\t\tBrowser.window.conch.showFPS && Browser.window.conch.showFPS(x,y);\n\t\t\treturn;\n\t\t}\n\t\tif (!Render.isConchWebGL && !Browser.onMiniGame &&! Browser.onLimixiu && !Browser.onKGMiniGame && !Browser.onBDMiniGame&& !Browser.onTTMiniGame && !Browser.onQGMiniGame && !Browser.onVVMiniGame && !Browser.onBLMiniGame && !Browser.onAlipayMiniGame && !Browser.onQQMiniGame && !Browser.onTTMiniGame && !Browser.onHWMiniGame && !Browser.onTBMiniGame)Stat._useCanvas=true;\n\t\tStat._show=true;\n\t\tStat._fpsData.length=60;\n\t\tStat._view[0]={title:\"FPS(Canvas)\",value:\"_fpsStr\",color:\"yellow\",units:\"int\"};\n\t\tStat._view[1]={title:\"Sprite\",value:\"_spriteStr\",color:\"white\",units:\"int\"};\n\t\tStat._view[2]={title:\"DrawCall\",value:\"drawCall\",color:\"white\",units:\"int\"};\n\t\tStat._view[3]={title:\"CurMem\",value:\"currentMemorySize\",color:\"yellow\",units:\"M\"};\n\t\tif (Render.isWebGL){\n\t\t\tStat._view[4]={title:\"Shader\",value:\"shaderCall\",color:\"white\",units:\"int\"};\n\t\t\tif (!Render.is3DMode){\n\t\t\t\tStat._view[0].title=\"FPS(WebGL)\";\n\t\t\t\tStat._view[5]={title:\"Canvas\",value:\"_canvasStr\",color:\"white\",units:\"int\"};\n\t\t\t\t}else {\n\t\t\t\tStat._view[0].title=\"FPS(3D)\";\n\t\t\t\tStat._view[5]={title:\"TriFaces\",value:\"trianglesFaces\",color:\"white\",units:\"int\"};\n\t\t\t\tStat._view[6]={title:\"treeNodeColl\",value:\"treeNodeCollision\",color:\"white\",units:\"int\"};\n\t\t\t\tStat._view[7]={title:\"treeSpriteColl\",value:\"treeSpriteCollision\",color:\"white\",units:\"int\"};\n\t\t\t}\n\t\t\t}else {\n\t\t\tStat._view[4]={title:\"Canvas\",value:\"_canvasStr\",color:\"white\",units:\"int\"};\n\t\t}\n\t\tif (Stat._useCanvas){\n\t\t\tStat.createUIPre(x,y);\n\t\t}else\n\t\tStat.createUI(x,y);\n\t\tStat.enable();\n\t}\n\n\tStat.createUIPre=function(x,y){\n\t\tvar pixel=Browser.pixelRatio;\n\t\tif(Laya.stage.useRetinalCanvas){\n\t\t\tpixel=3;\n\t\t}\n\t\tStat._width=pixel *130;\n\t\tStat._vx=pixel *75;\n\t\tStat._height=pixel *(Stat._view.length *12+3 *pixel)+4;\n\t\tStat._fontSize=12 *pixel;\n\t\tfor (var i=0;i < Stat._view.length;i++){\n\t\t\tStat._view[i].x=4;\n\t\t\tStat._view[i].y=i *Stat._fontSize+2 *pixel;\n\t\t}\n\t\tif (!Stat._canvas){\n\t\t\tStat._canvas=new HTMLCanvas('2D');\n\t\t\tStat._canvas.size(Stat._width,Stat._height);\n\t\t\tStat._ctx=Stat._canvas.getContext('2d');\n\t\t\tStat._ctx.textBaseline=\"top\";\n\t\t\tStat._ctx.font=Stat._fontSize+\"px Sans-serif\";\n\t\t\tStat._canvas.source.style.cssText=\"pointer-events:none;background:rgba(150,150,150,0.8);z-index:100000;position: absolute;direction:ltr;left:\"+x+\"px;top:\"+y+\"px;width:\"+(Stat._width / pixel)+\"px;height:\"+(Stat._height / pixel)+\"px;\";\n\t\t}\n\t\tStat._first=true;\n\t\tStat.loop();\n\t\tStat._first=false;\n\t\tif(!Browser.onKGMiniGame){\n\t\t\tBrowser.container.appendChild(Stat._canvas.source);\n\t\t}\n\t}\n\n\tStat.createUI=function(x,y){\n\t\tvar stat=Stat._sp;\n\t\tvar pixel=Browser.pixelRatio;\n\t\tif(Laya.stage.useRetinalCanvas){\n\t\t\tpixel=3;\n\t\t}\n\t\tif (!stat){\n\t\t\tstat=new Sprite();\n\t\t\tStat._leftText=new Text();\n\t\t\tStat._leftText.pos(5,5);\n\t\t\tStat._leftText.color=\"#ffffff\";\n\t\t\tstat.addChild(Stat._leftText);\n\t\t\tStat._txt=new Text();\n\t\t\tStat._txt.pos(80*pixel,5);\n\t\t\tStat._txt.color=\"#ffffff\";\n\t\t\tstat.addChild(Stat._txt);\n\t\t\tStat._sp=stat;\n\t\t}\n\t\tstat.pos(x,y);\n\t\tvar text=\"\";\n\t\tfor (var i=0;i < Stat._view.length;i++){\n\t\t\tvar one=Stat._view[i];\n\t\t\ttext+=one.title+\"\\n\";\n\t\t}\n\t\tStat._leftText.text=text;\n\t\tvar width=pixel *138;\n\t\tvar height=pixel *(Stat._view.length *12+3 *pixel)+4;\n\t\tStat._txt.fontSize=Stat._fontSize *pixel;\n\t\tStat._leftText.fontSize=Stat._fontSize *pixel;\n\t\tstat.size(width,height);\n\t\tstat.graphics.clear();\n\t\tstat.graphics.setAlpha(0.5);\n\t\tstat.graphics.drawRect(0,0,width,height,\"#999999\");\n\t\tstat.graphics.setAlpha(1);\n\t\tStat.loop();\n\t}\n\n\tStat.enable=function(){\n\t\tLaya.timer.frameLoop(1,Stat,Stat.loop);\n\t}\n\n\tStat.hide=function(){\n\t\tStat._show=false;\n\t\tLaya.timer.clear(Stat,Stat.loop);\n\t\tif (Stat._canvas){\n\t\t\tBrowser.removeElement(Stat._canvas.source);\n\t\t}\n\t}\n\n\tStat.clear=function(){\n\t\tStat.trianglesFaces=Stat.drawCall=Stat.shaderCall=Stat.spriteCount=Stat.spriteRenderUseCacheCount=Stat.treeNodeCollision=Stat.treeSpriteCollision=Stat.canvasNormal=Stat.canvasBitmap=Stat.canvasReCache=0;\n\t}\n\n\tStat.loop=function(){\n\t\tStat._count++;\n\t\tvar timer=Browser.now();\n\t\tif (timer-Stat._timer < 1000)return;\n\t\tvar count=Stat._count;\n\t\tStat.FPS=Math.round((count *1000)/ (timer-Stat._timer));\n\t\tif (Stat._show){\n\t\t\tStat.trianglesFaces=Math.round(Stat.trianglesFaces / count);\n\t\t\tif (!Stat._useCanvas){\n\t\t\t\tStat.drawCall=Math.round(Stat.drawCall / count)-2;\n\t\t\t\tStat.shaderCall=Math.round(Stat.shaderCall / count)-4;\n\t\t\t\tStat.spriteCount=Math.round(Stat.spriteCount / count)-4;\n\t\t\t\t}else{\n\t\t\t\tStat.drawCall=Math.round(Stat.drawCall / count)-2;\n\t\t\t\tStat.shaderCall=Math.round(Stat.shaderCall / count);\n\t\t\t\tStat.spriteCount=Math.round(Stat.spriteCount / count)-1;\n\t\t\t}\n\t\t\tStat.spriteRenderUseCacheCount=Math.round(Stat.spriteRenderUseCacheCount / count);\n\t\t\tStat.canvasNormal=Math.round(Stat.canvasNormal / count);\n\t\t\tStat.canvasBitmap=Math.round(Stat.canvasBitmap / count);\n\t\t\tStat.canvasReCache=Math.ceil(Stat.canvasReCache / count);\n\t\t\tStat.treeNodeCollision=Math.round(Stat.treeNodeCollision / count);\n\t\t\tStat.treeSpriteCollision=Math.round(Stat.treeSpriteCollision / count);\n\t\t\tvar delay=Stat.FPS > 0 ? Math.floor(1000 / Stat.FPS).toString():\" \";\n\t\t\tStat._fpsStr=Stat.FPS+(Stat.renderSlow ? \" slow\" :\"\")+\" \"+delay;\n\t\t\tStat._spriteStr=Stat.spriteCount+(Stat.spriteRenderUseCacheCount ? (\"/\"+Stat.spriteRenderUseCacheCount):'');\n\t\t\tStat._canvasStr=Stat.canvasReCache+\"/\"+Stat.canvasNormal+\"/\"+Stat.canvasBitmap;\n\t\t\tStat.currentMemorySize=ResourceManager.systemResourceManager.memorySize;\n\t\t\tif (Stat._useCanvas){\n\t\t\t\tStat.renderInfoPre();\n\t\t\t}else\n\t\t\tStat.renderInfo();\n\t\t\tStat.clear();\n\t\t}\n\t\tStat._count=0;\n\t\tStat._timer=timer;\n\t}\n\n\tStat.renderInfoPre=function(){\n\t\tif (Stat._canvas){\n\t\t\tvar ctx=Stat._ctx;\n\t\t\tctx.clearRect(Stat._first ? 0 :Stat._vx,0,Stat._width,Stat._height);\n\t\t\tfor (var i=0;i < Stat._view.length;i++){\n\t\t\t\tvar one=Stat._view[i];\n\t\t\t\tif (Stat._first){\n\t\t\t\t\tctx.fillStyle=\"white\";\n\t\t\t\t\tctx.fillText(one.title,one.x,one.y,null,null,null);\n\t\t\t\t}\n\t\t\t\tctx.fillStyle=one.color;\n\t\t\t\tvar value=Stat[one.value];\n\t\t\t\t(one.units==\"M\")&& (value=Math.floor(value / (1024 *1024)*100)/ 100+\" M\");\n\t\t\t\tctx.fillText(value+\"\",one.x+Stat._vx,one.y,null,null,null);\n\t\t\t}\n\t\t}\n\t}\n\n\tStat.renderInfo=function(){\n\t\tvar text=\"\";\n\t\tfor (var i=0;i < Stat._view.length;i++){\n\t\t\tvar one=Stat._view[i];\n\t\t\tvar value=Stat[one.value];\n\t\t\t(one.units==\"M\")&& (value=Math.floor(value / (1024 *1024)*100)/ 100+\" M\");\n\t\t\t(one.units==\"K\")&& (value=Math.floor(value / (1024)*100)/ 100+\" K\");\n\t\t\ttext+=value+\"\\n\";\n\t\t}\n\t\tStat._txt.text=text;\n\t}\n\n\tStat.FPS=0;\n\tStat.loopCount=0;\n\tStat.shaderCall=0;\n\tStat.drawCall=0;\n\tStat.trianglesFaces=0;\n\tStat.spriteCount=0;\n\tStat.spriteRenderUseCacheCount=0;\n\tStat.treeNodeCollision=0;\n\tStat.treeSpriteCollision=0;\n\tStat.canvasNormal=0;\n\tStat.canvasBitmap=0;\n\tStat.canvasReCache=0;\n\tStat.renderSlow=false;\n\tStat.currentMemorySize=0;\n\tStat._fpsStr=null;\n\tStat._canvasStr=null;\n\tStat._spriteStr=null;\n\tStat._fpsData=[];\n\tStat._timer=0;\n\tStat._count=0;\n\tStat._view=[];\n\tStat._fontSize=12;\n\tStat._txt=null;\n\tStat._leftText=null;\n\tStat._sp=null;\n\tStat._show=false;\n\tStat._useCanvas=false;\n\tStat._canvas=null;\n\tStat._ctx=null;\n\tStat._first=false;\n\tStat._vx=NaN;\n\tStat._width=0;\n\tStat._height=100;\n\treturn Stat;\n})()\n\n\n/**\n*@private\n*<code>StringKey</code> 类用于存取字符串对应的数字。\n*/\n//class laya.utils.StringKey\nvar StringKey=(function(){\n\tfunction StringKey(){\n\t\tthis._strsToID={};\n\t\tthis._idToStrs=[];\n\t\tthis._length=0;\n\t}\n\n\t__class(StringKey,'laya.utils.StringKey');\n\tvar __proto=StringKey.prototype;\n\t/**\n\t*添加一个字符。\n\t*@param str 字符，将作为key 存储相应生成的数字。\n\t*@return 此字符对应的数字。\n\t*/\n\t__proto.add=function(str){\n\t\tvar index=this._strsToID[str];\n\t\tif (index !=null)return index;\n\t\tthis._idToStrs[this._length]=str;\n\t\treturn this._strsToID[str]=this._length++;\n\t}\n\n\t/**\n\t*获取指定字符对应的ID。\n\t*@param str 字符。\n\t*@return 此字符对应的ID。\n\t*/\n\t__proto.getID=function(str){\n\t\tvar index=this._strsToID[str];\n\t\treturn index==null ?-1 :index;\n\t}\n\n\t/**\n\t*根据指定ID获取对应字符。\n\t*@param id ID。\n\t*@return 此id对应的字符。\n\t*/\n\t__proto.getName=function(id){\n\t\tvar str=this._idToStrs[id];\n\t\treturn str==null ? undefined :str;\n\t}\n\n\treturn StringKey;\n})()\n\n\n/**\n*<code>Timer</code> 是时钟管理类。它是一个单例，不要手动实例化此类，应该通过 Laya.timer 访问。\n*/\n//class laya.utils.Timer\nvar Timer=(function(){\n\tvar TimerHandler;\n\tfunction Timer(){\n\t\t/**两帧之间的时间间隔,单位毫秒。*/\n\t\tthis._delta=0;\n\t\t/**时针缩放。*/\n\t\tthis.scale=1;\n\t\t/**当前的帧数。*/\n\t\tthis.currFrame=0;\n\t\t/**@private */\n\t\tthis._mid=1;\n\t\t/**@private */\n\t\tthis._map=[];\n\t\t/**@private */\n\t\tthis._laters=[];\n\t\t/**@private */\n\t\tthis._handlers=[];\n\t\t/**@private */\n\t\tthis._temp=[];\n\t\t/**@private */\n\t\tthis._count=0;\n\t\tthis.currTimer=this._now();\n\t\tthis._lastTimer=this._now();\n\t\tthis._init();\n\t}\n\n\t__class(Timer,'laya.utils.Timer');\n\tvar __proto=Timer.prototype;\n\t/**@private */\n\t__proto._init=function(){\n\t\tLaya.timer && Laya.timer.frameLoop(1,this,this._update);\n\t}\n\n\t/**@private */\n\t__proto._now=function(){\n\t\treturn /*__JS__ */Date.now();\n\t}\n\n\t/**\n\t*@private\n\t*帧循环处理函数。\n\t*/\n\t__proto._update=function(){\n\t\tif (this.scale <=0){\n\t\t\tthis._lastTimer=this._now();\n\t\t\treturn;\n\t\t};\n\t\tvar frame=this.currFrame=this.currFrame+this.scale;\n\t\tvar now=this._now();\n\t\tthis._delta=(now-this._lastTimer)*this.scale;\n\t\tvar timer=this.currTimer=this.currTimer+this._delta;\n\t\tthis._lastTimer=now;\n\t\tvar handlers=this._handlers;\n\t\tthis._count=0;\n\t\tfor (i=0,n=handlers.length;i < n;i++){\n\t\t\thandler=handlers[i];\n\t\t\tif (handler.method!==null){\n\t\t\t\tvar t=handler.userFrame ? frame :timer;\n\t\t\t\tif (t >=handler.exeTime){\n\t\t\t\t\tif (handler.repeat){\n\t\t\t\t\t\tif (!handler.jumpFrame){\n\t\t\t\t\t\t\thandler.exeTime+=handler.delay;\n\t\t\t\t\t\t\thandler.run(false);\n\t\t\t\t\t\t\tif (t > handler.exeTime){\n\t\t\t\t\t\t\t\thandler.exeTime+=Math.ceil((t-handler.exeTime)/ handler.delay)*handler.delay;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\twhile (t >=handler.exeTime){\n\t\t\t\t\t\t\t\thandler.exeTime+=handler.delay;\n\t\t\t\t\t\t\t\thandler.run(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\thandler.run(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tthis._count++;\n\t\t\t}\n\t\t}\n\t\tif (this._count > 30 || frame % 200===0)this._clearHandlers();\n\t\tvar laters=this._laters;\n\t\tfor (var i=0,n=laters.length-1;i <=n;i++){\n\t\t\tvar handler=laters[i];\n\t\t\tif (handler.method!==null){\n\t\t\t\tthis._map[handler.key]=null;\n\t\t\t\thandler.run(false);\n\t\t\t}\n\t\t\tthis._recoverHandler(handler);\n\t\t\ti===n && (n=laters.length-1);\n\t\t}\n\t\tlaters.length=0;\n\t}\n\n\t/**@private */\n\t__proto._clearHandlers=function(){\n\t\tvar handlers=this._handlers;\n\t\tfor (var i=0,n=handlers.length;i < n;i++){\n\t\t\tvar handler=handlers[i];\n\t\t\tif (handler.method!==null)this._temp.push(handler);\n\t\t\telse this._recoverHandler(handler);\n\t\t}\n\t\tthis._handlers=this._temp;\n\t\tthis._temp=handlers;\n\t\tthis._temp.length=0;\n\t}\n\n\t/**@private */\n\t__proto._recoverHandler=function(handler){\n\t\tif(this._map[handler.key]==handler)this._map[handler.key]=null;\n\t\thandler.clear();\n\t\tTimer._pool.push(handler);\n\t}\n\n\t/**@private */\n\t__proto._create=function(useFrame,repeat,delay,caller,method,args,coverBefore){\n\t\tif (!delay){\n\t\t\tmethod.apply(caller,args);\n\t\t\treturn null;\n\t\t}\n\t\tif (coverBefore){\n\t\t\tvar handler=this._getHandler(caller,method);\n\t\t\tif (handler){\n\t\t\t\thandler.repeat=repeat;\n\t\t\t\thandler.userFrame=useFrame;\n\t\t\t\thandler.delay=delay;\n\t\t\t\thandler.caller=caller;\n\t\t\t\thandler.method=method;\n\t\t\t\thandler.args=args;\n\t\t\t\thandler.exeTime=delay+(useFrame ? this.currFrame :this.currTimer+this._now()-this._lastTimer);\n\t\t\t\treturn handler;\n\t\t\t}\n\t\t}\n\t\thandler=Timer._pool.length > 0 ? Timer._pool.pop():new TimerHandler();\n\t\thandler.repeat=repeat;\n\t\thandler.userFrame=useFrame;\n\t\thandler.delay=delay;\n\t\thandler.caller=caller;\n\t\thandler.method=method;\n\t\thandler.args=args;\n\t\thandler.exeTime=delay+(useFrame ? this.currFrame :this.currTimer+this._now()-this._lastTimer)+1;\n\t\tthis._indexHandler(handler);\n\t\tthis._handlers.push(handler);\n\t\treturn handler;\n\t}\n\n\t/**@private */\n\t__proto._indexHandler=function(handler){\n\t\tvar caller=handler.caller;\n\t\tvar method=handler.method;\n\t\tvar cid=caller ? caller.$_GID || (caller.$_GID=Utils.getGID()):0;\n\t\tvar mid=method.$_TID || (method.$_TID=(this._mid++)*100000);\n\t\thandler.key=cid+mid;\n\t\tthis._map[handler.key]=handler;\n\t}\n\n\t/**\n\t*定时执行一次。\n\t*@param delay 延迟时间(单位为毫秒)。\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*@param args 回调参数。\n\t*@param coverBefore 是否覆盖之前的延迟执行，默认为 true 。\n\t*/\n\t__proto.once=function(delay,caller,method,args,coverBefore){\n\t\t(coverBefore===void 0)&& (coverBefore=true);\n\t\tthis._create(false,false,delay,caller,method,args,coverBefore);\n\t}\n\n\t/**\n\t*定时重复执行。\n\t*@param delay 间隔时间(单位毫秒)。\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*@param args 回调参数。\n\t*@param coverBefore 是否覆盖之前的延迟执行，默认为 true 。\n\t*@param jumpFrame 时钟是否跳帧。基于时间的循环回调，单位时间间隔内，如能执行多次回调，出于性能考虑，引擎默认只执行一次，设置jumpFrame=true后，则回调会连续执行多次\n\t*/\n\t__proto.loop=function(delay,caller,method,args,coverBefore,jumpFrame){\n\t\t(coverBefore===void 0)&& (coverBefore=true);\n\t\t(jumpFrame===void 0)&& (jumpFrame=false);\n\t\tvar handler=this._create(false,true,delay,caller,method,args,coverBefore);\n\t\tif (handler)handler.jumpFrame=jumpFrame;\n\t}\n\n\t/**\n\t*定时执行一次(基于帧率)。\n\t*@param delay 延迟几帧(单位为帧)。\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*@param args 回调参数。\n\t*@param coverBefore 是否覆盖之前的延迟执行，默认为 true 。\n\t*/\n\t__proto.frameOnce=function(delay,caller,method,args,coverBefore){\n\t\t(coverBefore===void 0)&& (coverBefore=true);\n\t\tthis._create(true,false,delay,caller,method,args,coverBefore);\n\t}\n\n\t/**\n\t*定时重复执行(基于帧率)。\n\t*@param delay 间隔几帧(单位为帧)。\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*@param args 回调参数。\n\t*@param coverBefore 是否覆盖之前的延迟执行，默认为 true 。\n\t*/\n\t__proto.frameLoop=function(delay,caller,method,args,coverBefore){\n\t\t(coverBefore===void 0)&& (coverBefore=true);\n\t\tthis._create(true,true,delay,caller,method,args,coverBefore);\n\t}\n\n\t/**返回统计信息。*/\n\t__proto.toString=function(){\n\t\treturn \"callLater:\"+this._laters.length+\" handlers:\"+this._handlers.length+\" pool:\"+Timer._pool.length;\n\t}\n\n\t/**\n\t*清理定时器。\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*/\n\t__proto.clear=function(caller,method){\n\t\tvar handler=this._getHandler(caller,method);\n\t\tif (handler){\n\t\t\tthis._map[handler.key]=null;handler.key=0;\n\t\t\thandler.clear();\n\t\t}\n\t}\n\n\t/**\n\t*清理对象身上的所有定时器。\n\t*@param caller 执行域(this)。\n\t*/\n\t__proto.clearAll=function(caller){\n\t\tif (!caller)return;\n\t\tfor (var i=0,n=this._handlers.length;i < n;i++){\n\t\t\tvar handler=this._handlers[i];\n\t\t\tif (handler.caller===caller){\n\t\t\t\tthis._map[handler.key]=null;handler.key=0;\n\t\t\t\thandler.clear();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._getHandler=function(caller,method){\n\t\tvar cid=caller ? caller.$_GID || (caller.$_GID=Utils.getGID()):0;\n\t\tvar mid=method.$_TID || (method.$_TID=(this._mid++)*100000);\n\t\treturn this._map[cid+mid];\n\t}\n\n\t/**\n\t*延迟执行。\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*@param args 回调参数。\n\t*/\n\t__proto.callLater=function(caller,method,args){\n\t\tif (this._getHandler(caller,method)==null){\n\t\t\tif (Timer._pool.length)\n\t\t\t\tvar handler=Timer._pool.pop();\n\t\t\telse handler=new TimerHandler();\n\t\t\thandler.caller=caller;\n\t\t\thandler.method=method;\n\t\t\thandler.args=args;\n\t\t\tthis._indexHandler(handler);\n\t\t\tthis._laters.push(handler);\n\t\t}\n\t}\n\n\t/**\n\t*立即执行 callLater 。\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*/\n\t__proto.runCallLater=function(caller,method){\n\t\tvar handler=this._getHandler(caller,method);\n\t\tif (handler && handler.method !=null){\n\t\t\tthis._map[handler.key]=null;\n\t\t\thandler.run(true);\n\t\t}\n\t}\n\n\t/**\n\t*立即提前执行定时器，执行之后从队列中删除\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*/\n\t__proto.runTimer=function(caller,method){\n\t\tthis.runCallLater(caller,method);\n\t}\n\n\t/**\n\t*两帧之间的时间间隔,单位毫秒。\n\t*/\n\t__getset(0,__proto,'delta',function(){\n\t\treturn this._delta;\n\t});\n\n\tTimer._pool=[];\n\tTimer.__init$=function(){\n\t\t/**@private */\n\t\t//class TimerHandler\n\t\tTimerHandler=(function(){\n\t\t\tfunction TimerHandler(){\n\t\t\t\tthis.key=0;\n\t\t\t\tthis.repeat=false;\n\t\t\t\tthis.delay=0;\n\t\t\t\tthis.userFrame=false;\n\t\t\t\tthis.exeTime=0;\n\t\t\t\tthis.caller=null;\n\t\t\t\tthis.method=null;\n\t\t\t\tthis.args=null;\n\t\t\t\tthis.jumpFrame=false;\n\t\t\t}\n\t\t\t__class(TimerHandler,'');\n\t\t\tvar __proto=TimerHandler.prototype;\n\t\t\t__proto.clear=function(){\n\t\t\t\tthis.caller=null;\n\t\t\t\tthis.method=null;\n\t\t\t\tthis.args=null;\n\t\t\t}\n\t\t\t__proto.run=function(withClear){\n\t\t\t\tvar caller=this.caller;\n\t\t\t\tif (caller && caller.destroyed)return this.clear();\n\t\t\t\tvar method=this.method;\n\t\t\t\tvar args=this.args;\n\t\t\t\twithClear && this.clear();\n\t\t\t\tif (method==null)return;\n\t\t\t\targs ? method.apply(caller,args):method.call(caller);\n\t\t\t}\n\t\t\treturn TimerHandler;\n\t\t})()\n\t}\n\n\treturn Timer;\n})()\n\n\n/**\n*<code>Tween</code> 是一个缓动类。使用此类能够实现对目标对象属性的渐变。\n*/\n//class laya.utils.Tween\nvar Tween=(function(){\n\tfunction Tween(){\n\t\t/**@private */\n\t\t//this._complete=null;\n\t\t/**@private */\n\t\t//this._target=null;\n\t\t/**@private */\n\t\t//this._ease=null;\n\t\t/**@private */\n\t\t//this._props=null;\n\t\t/**@private */\n\t\t//this._duration=0;\n\t\t/**@private */\n\t\t//this._delay=0;\n\t\t/**@private */\n\t\t//this._startTimer=0;\n\t\t/**@private */\n\t\t//this._usedTimer=0;\n\t\t/**@private */\n\t\t//this._usedPool=false;\n\t\t/**@private */\n\t\t//this._delayParam=null;\n\t\t/**@private 唯一标识，TimeLintLite用到*/\n\t\tthis.gid=0;\n\t\t/**更新回调，缓动数值发生变化时，回调变化的值*/\n\t\t//this.update=null;\n\t}\n\n\t__class(Tween,'laya.utils.Tween');\n\tvar __proto=Tween.prototype;\n\t/**\n\t*缓动对象的props属性到目标值。\n\t*@param target 目标对象(即将更改属性值的对象)。\n\t*@param props 变化的属性列表，比如{x:100,y:20,ease:Ease.backOut,complete:Handler.create(this,onComplete),update:new Handler(this,onComplete)}。\n\t*@param duration 花费的时间，单位毫秒。\n\t*@param ease 缓动类型，默认为匀速运动。\n\t*@param complete 结束回调函数。\n\t*@param delay 延迟执行时间。\n\t*@param coverBefore 是否覆盖之前的缓动。\n\t*@return 返回Tween对象。\n\t*/\n\t__proto.to=function(target,props,duration,ease,complete,delay,coverBefore){\n\t\t(delay===void 0)&& (delay=0);\n\t\t(coverBefore===void 0)&& (coverBefore=false);\n\t\treturn this._create(target,props,duration,ease,complete,delay,coverBefore,true,false,true);\n\t}\n\n\t/**\n\t*从props属性，缓动到当前状态。\n\t*@param target 目标对象(即将更改属性值的对象)。\n\t*@param props 变化的属性列表，比如{x:100,y:20,ease:Ease.backOut,complete:Handler.create(this,onComplete),update:new Handler(this,onComplete)}。\n\t*@param duration 花费的时间，单位毫秒。\n\t*@param ease 缓动类型，默认为匀速运动。\n\t*@param complete 结束回调函数。\n\t*@param delay 延迟执行时间。\n\t*@param coverBefore 是否覆盖之前的缓动。\n\t*@return 返回Tween对象。\n\t*/\n\t__proto.from=function(target,props,duration,ease,complete,delay,coverBefore){\n\t\t(delay===void 0)&& (delay=0);\n\t\t(coverBefore===void 0)&& (coverBefore=false);\n\t\treturn this._create(target,props,duration,ease,complete,delay,coverBefore,false,false,true);\n\t}\n\n\t/**@private */\n\t__proto._create=function(target,props,duration,ease,complete,delay,coverBefore,isTo,usePool,runNow){\n\t\tif (!target)throw new Error(\"Tween:target is null\");\n\t\tthis._target=target;\n\t\tthis._duration=duration;\n\t\tthis._ease=ease || props.ease || Tween.easeNone;\n\t\tthis._complete=complete || props.complete;\n\t\tthis._delay=delay;\n\t\tthis._props=[];\n\t\tthis._usedTimer=0;\n\t\tthis._startTimer=Browser.now();\n\t\tthis._usedPool=usePool;\n\t\tthis._delayParam=null;\n\t\tthis.update=props.update;\n\t\tvar gid=(target.$_GID || (target.$_GID=Utils.getGID()));\n\t\tif (!Tween.tweenMap[gid]){\n\t\t\tTween.tweenMap[gid]=[this];\n\t\t\t}else {\n\t\t\tif (coverBefore)Tween.clearTween(target);\n\t\t\tTween.tweenMap[gid].push(this);\n\t\t}\n\t\tif (runNow){\n\t\t\tif (delay <=0)this.firstStart(target,props,isTo);\n\t\t\telse{\n\t\t\t\tthis._delayParam=[target,props,isTo];\n\t\t\t\tLaya.scaleTimer.once(delay,this,this.firstStart,this._delayParam);\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis._initProps(target,props,isTo);\n\t\t}\n\t\treturn this;\n\t}\n\n\t__proto.firstStart=function(target,props,isTo){\n\t\tthis._delayParam=null;\n\t\tif (target.destroyed){\n\t\t\tthis.clear();\n\t\t\treturn;\n\t\t}\n\t\tthis._initProps(target,props,isTo);\n\t\tthis._beginLoop();\n\t}\n\n\t__proto._initProps=function(target,props,isTo){\n\t\tfor (var p in props){\n\t\t\tif ((typeof (target[p])=='number')){\n\t\t\t\tvar start=isTo ? target[p] :props[p];\n\t\t\t\tvar end=isTo ? props[p] :target[p];\n\t\t\t\tthis._props.push([p,start,end-start]);\n\t\t\t\tif (!isTo)target[p]=start;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._beginLoop=function(){\n\t\tLaya.scaleTimer.frameLoop(1,this,this._doEase);\n\t}\n\n\t/**执行缓动**/\n\t__proto._doEase=function(){\n\t\tthis._updateEase(Browser.now());\n\t}\n\n\t/**@private */\n\t__proto._updateEase=function(time){\n\t\tvar target=this._target;\n\t\tif (!target)return;\n\t\tif (target.destroyed)return Tween.clearTween(target);\n\t\tvar usedTimer=this._usedTimer=time-this._startTimer-this._delay;\n\t\tif (usedTimer < 0)return;\n\t\tif (usedTimer >=this._duration)return this.complete();\n\t\tvar ratio=usedTimer > 0 ? this._ease(usedTimer,0,1,this._duration):0;\n\t\tvar props=this._props;\n\t\tfor (var i=0,n=props.length;i < n;i++){\n\t\t\tvar prop=props[i];\n\t\t\ttarget[prop[0]]=prop[1]+(ratio *prop[2]);\n\t\t}\n\t\tif (this.update)this.update.run();\n\t}\n\n\t/**\n\t*立即结束缓动并到终点。\n\t*/\n\t__proto.complete=function(){\n\t\tif (!this._target)return;\n\t\tLaya.scaleTimer.runTimer(this,this.firstStart);\n\t\tvar target=this._target;\n\t\tvar props=this._props;\n\t\tvar handler=this._complete;\n\t\tfor (var i=0,n=props.length;i < n;i++){\n\t\t\tvar prop=props[i];\n\t\t\ttarget[prop[0]]=prop[1]+prop[2];\n\t\t}\n\t\tif (this.update)this.update.run();\n\t\tthis.clear();\n\t\thandler && handler.run();\n\t}\n\n\t/**\n\t*暂停缓动，可以通过resume或restart重新开始。\n\t*/\n\t__proto.pause=function(){\n\t\tLaya.scaleTimer.clear(this,this._beginLoop);\n\t\tLaya.scaleTimer.clear(this,this._doEase);\n\t\tLaya.scaleTimer.clear(this,this.firstStart);\n\t\tvar time=Browser.now();\n\t\tvar dTime=NaN;\n\t\tdTime=time-this._startTimer-this._delay;\n\t\tif (dTime < 0){\n\t\t\tthis._usedTimer=dTime;\n\t\t}\n\t}\n\n\t/**\n\t*设置开始时间。\n\t*@param startTime 开始时间。\n\t*/\n\t__proto.setStartTime=function(startTime){\n\t\tthis._startTimer=startTime;\n\t}\n\n\t/**\n\t*停止并清理当前缓动。\n\t*/\n\t__proto.clear=function(){\n\t\tif (this._target){\n\t\t\tthis._remove();\n\t\t\tthis._clear();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._clear=function(){\n\t\tthis.pause();\n\t\tLaya.scaleTimer.clear(this,this.firstStart);\n\t\tthis._complete=null;\n\t\tthis._target=null;\n\t\tthis._ease=null;\n\t\tthis._props=null;\n\t\tthis._delayParam=null;\n\t\tif (this._usedPool){\n\t\t\tthis.update=null;\n\t\t\tPool.recover(\"tween\",this);\n\t\t}\n\t}\n\n\t/**回收到对象池。*/\n\t__proto.recover=function(){\n\t\tthis._usedPool=true;\n\t\tthis._clear();\n\t}\n\n\t__proto._remove=function(){\n\t\tvar tweens=Tween.tweenMap[this._target.$_GID];\n\t\tif (tweens){\n\t\t\tfor (var i=0,n=tweens.length;i < n;i++){\n\t\t\t\tif (tweens[i]===this){\n\t\t\t\t\ttweens.splice(i,1);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*重新开始暂停的缓动。\n\t*/\n\t__proto.restart=function(){\n\t\tthis.pause();\n\t\tthis._usedTimer=0;\n\t\tthis._startTimer=Browser.now();\n\t\tif (this._delayParam){\n\t\t\tLaya.scaleTimer.once(this._delay,this,this.firstStart,this._delayParam);\n\t\t\treturn;\n\t\t};\n\t\tvar props=this._props;\n\t\tfor (var i=0,n=props.length;i < n;i++){\n\t\t\tvar prop=props[i];\n\t\t\tthis._target[prop[0]]=prop[1];\n\t\t}\n\t\tLaya.scaleTimer.once(this._delay,this,this._beginLoop);\n\t}\n\n\t/**\n\t*恢复暂停的缓动。\n\t*/\n\t__proto.resume=function(){\n\t\tif (this._usedTimer >=this._duration)return;\n\t\tthis._startTimer=Browser.now()-this._usedTimer-this._delay;\n\t\tif (this._delayParam){\n\t\t\tif (this._usedTimer < 0){\n\t\t\t\tLaya.scaleTimer.once(-this._usedTimer,this,this.firstStart,this._delayParam);\n\t\t\t\t}else{\n\t\t\t\tthis.firstStart.apply(this,this._delayParam);\n\t\t\t}\n\t\t\t}else{\n\t\t\tthis._beginLoop();\n\t\t}\n\t}\n\n\t/**设置当前执行比例**/\n\t__getset(0,__proto,'progress',null,function(v){\n\t\tvar uTime=v *this._duration;\n\t\tthis._startTimer=Browser.now()-this._delay-uTime;\n\t});\n\n\tTween.to=function(target,props,duration,ease,complete,delay,coverBefore,autoRecover){\n\t\t(delay===void 0)&& (delay=0);\n\t\t(coverBefore===void 0)&& (coverBefore=false);\n\t\t(autoRecover===void 0)&& (autoRecover=true);\n\t\treturn Pool.getItemByClass(\"tween\",Tween)._create(target,props,duration,ease,complete,delay,coverBefore,true,autoRecover,true);\n\t}\n\n\tTween.from=function(target,props,duration,ease,complete,delay,coverBefore,autoRecover){\n\t\t(delay===void 0)&& (delay=0);\n\t\t(coverBefore===void 0)&& (coverBefore=false);\n\t\t(autoRecover===void 0)&& (autoRecover=true);\n\t\treturn Pool.getItemByClass(\"tween\",Tween)._create(target,props,duration,ease,complete,delay,coverBefore,false,autoRecover,true);\n\t}\n\n\tTween.clearAll=function(target){\n\t\tif (!target || !target.$_GID)return;\n\t\tvar tweens=Tween.tweenMap[target.$_GID];\n\t\tif (tweens){\n\t\t\tfor (var i=0,n=tweens.length;i < n;i++){\n\t\t\t\ttweens[i]._clear();\n\t\t\t}\n\t\t\ttweens.length=0;\n\t\t}\n\t}\n\n\tTween.clear=function(tween){\n\t\ttween.clear();\n\t}\n\n\tTween.clearTween=function(target){\n\t\tTween.clearAll(target);\n\t}\n\n\tTween.easeNone=function(t,b,c,d){\n\t\treturn c *t / d+b;\n\t}\n\n\tTween.tweenMap={};\n\treturn Tween;\n})()\n\n\n/**\n*<code>Utils</code> 是工具类。\n*/\n//class laya.utils.Utils\nvar Utils=(function(){\n\tfunction Utils(){}\n\t__class(Utils,'laya.utils.Utils');\n\tUtils.toRadian=function(angle){\n\t\treturn angle *Utils._pi2;\n\t}\n\n\tUtils.toAngle=function(radian){\n\t\treturn radian *Utils._pi;\n\t}\n\n\tUtils.toHexColor=function(color){\n\t\tif (color < 0 || isNaN(color))return null;\n\t\tvar str=color.toString(16);\n\t\twhile (str.length < 6)str=\"0\"+str;\n\t\treturn \"#\"+str;\n\t}\n\n\tUtils.getGID=function(){\n\t\treturn Utils._gid++;\n\t}\n\n\tUtils.concatArray=function(source,array){\n\t\tif (!array)return source;\n\t\tif (!source)return array;\n\t\tvar i=0,len=array.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tsource.push(array[i]);\n\t\t}\n\t\treturn source;\n\t}\n\n\tUtils.clearArray=function(array){\n\t\tif (!array)return array;\n\t\tarray.length=0;\n\t\treturn array;\n\t}\n\n\tUtils.copyArray=function(source,array){\n\t\tsource || (source=[]);\n\t\tif (!array)return source;\n\t\tsource.length=array.length;\n\t\tvar i=0,len=array.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tsource[i]=array[i];\n\t\t}\n\t\treturn source;\n\t}\n\n\tUtils.getGlobalRecByPoints=function(sprite,x0,y0,x1,y1){\n\t\tvar newLTPoint;\n\t\tnewLTPoint=new Point(x0,y0);\n\t\tnewLTPoint=sprite.localToGlobal(newLTPoint);\n\t\tvar newRBPoint;\n\t\tnewRBPoint=new Point(x1,y1);\n\t\tnewRBPoint=sprite.localToGlobal(newRBPoint);\n\t\treturn Rectangle._getWrapRec([newLTPoint.x,newLTPoint.y,newRBPoint.x,newRBPoint.y]);\n\t}\n\n\tUtils.getGlobalPosAndScale=function(sprite){\n\t\treturn Utils.getGlobalRecByPoints(sprite,0,0,1,1);\n\t}\n\n\tUtils.bind=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tUtils.measureText=function(txt,font){\n\t\treturn RunDriver.measureText(txt,font);\n\t}\n\n\tUtils.updateOrder=function(array){\n\t\tif (!array || array.length < 2)return false;\n\t\tvar i=1,j=0,len=array.length,key=NaN,c;\n\t\twhile (i < len){\n\t\t\tj=i;\n\t\t\tc=array[j];\n\t\t\tkey=array[j]._zOrder;\n\t\t\twhile (--j >-1){\n\t\t\t\tif (array[j]._zOrder > key)array[j+1]=array[j];\n\t\t\t\telse break ;\n\t\t\t}\n\t\t\tarray[j+1]=c;\n\t\t\ti++;\n\t\t};\n\t\tvar model=c.parent.conchModel;\n\t\tif (model){\n\t\t\tif (model.updateZOrder !=null){\n\t\t\t\tmodel.updateZOrder();\n\t\t\t\t}else {\n\t\t\t\tfor (i=0;i < len;i++){\n\t\t\t\t\tmodel.removeChild(array[i].conchModel);\n\t\t\t\t}\n\t\t\t\tfor (i=0;i < len;i++){\n\t\t\t\t\tmodel.addChildAt(array[i].conchModel,i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tUtils.transPointList=function(points,x,y){\n\t\tvar i=0,len=points.length;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\tpoints[i]+=x;\n\t\t\tpoints[i+1]+=y;\n\t\t}\n\t}\n\n\tUtils.parseInt=function(str,radix){\n\t\t(radix===void 0)&& (radix=0);\n\t\tvar result=Browser.window.parseInt(str,radix);\n\t\tif (isNaN(result))return 0;\n\t\treturn result;\n\t}\n\n\tUtils.getFileExtension=function(path){\n\t\tUtils._extReg.lastIndex=path.lastIndexOf(\".\");\n\t\tvar result=Utils._extReg.exec(path);\n\t\tif (result && result.length > 1){\n\t\t\treturn result[1].toLowerCase();\n\t\t}\n\t\treturn null;\n\t}\n\n\tUtils.getTransformRelativeToWindow=function(coordinateSpace,x,y){\n\t\tvar stage=Laya.stage;\n\t\tvar globalTransform=laya.utils.Utils.getGlobalPosAndScale(coordinateSpace);\n\t\tvar canvasMatrix=stage._canvasTransform.clone();\n\t\tvar canvasLeft=canvasMatrix.tx;\n\t\tvar canvasTop=canvasMatrix.ty;\n\t\tcanvasMatrix.rotate(-Math.PI / 180 *Laya.stage.canvasDegree);\n\t\tcanvasMatrix.scale(Laya.stage.clientScaleX,Laya.stage.clientScaleY);\n\t\tvar perpendicular=(Laya.stage.canvasDegree % 180 !=0);\n\t\tvar tx=NaN,ty=NaN;\n\t\tif (perpendicular){\n\t\t\ttx=y+globalTransform.y;\n\t\t\tty=x+globalTransform.x;\n\t\t\ttx *=canvasMatrix.d;\n\t\t\tty *=canvasMatrix.a;\n\t\t\tif (Laya.stage.canvasDegree==90){\n\t\t\t\ttx=canvasLeft-tx;\n\t\t\t\tty+=canvasTop;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttx+=canvasLeft;\n\t\t\t\tty=canvasTop-ty;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttx=x+globalTransform.x;\n\t\t\tty=y+globalTransform.y;\n\t\t\ttx *=canvasMatrix.a;\n\t\t\tty *=canvasMatrix.d;\n\t\t\ttx+=canvasLeft;\n\t\t\tty+=canvasTop;\n\t\t};\n\t\tvar domScaleX=NaN,domScaleY=NaN;\n\t\tif (perpendicular){\n\t\t\tdomScaleX=canvasMatrix.d *globalTransform.height;\n\t\t\tdomScaleY=canvasMatrix.a *globalTransform.width;\n\t\t\t}else {\n\t\t\tdomScaleX=canvasMatrix.a *globalTransform.width;\n\t\t\tdomScaleY=canvasMatrix.d *globalTransform.height;\n\t\t}\n\t\treturn {x:tx,y:ty,scaleX:domScaleX,scaleY:domScaleY};\n\t}\n\n\tUtils.fitDOMElementInArea=function(dom,coordinateSpace,x,y,width,height){\n\t\tif (!dom._fitLayaAirInitialized){\n\t\t\tdom._fitLayaAirInitialized=true;\n\t\t\tdom.style.transformOrigin=dom.style.webKittransformOrigin=\"left top\";\n\t\t\tdom.style.position=\"absolute\"\n\t\t};\n\t\tvar transform=Utils.getTransformRelativeToWindow(coordinateSpace,x,y);\n\t\tdom.style.transform=dom.style.webkitTransform=\"scale(\"+transform.scaleX+\",\"+transform.scaleY+\") rotate(\"+(Laya.stage.canvasDegree)+\"deg)\";\n\t\tdom.style.width=width+'px';\n\t\tdom.style.height=height+'px';\n\t\tdom.style.left=transform.x+'px';\n\t\tdom.style.top=transform.y+'px';\n\t}\n\n\tUtils.isOkTextureList=function(textureList){\n\t\tif (!textureList)return false;\n\t\tvar i=0,len=textureList.length;\n\t\tvar tTexture;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttTexture=textureList[i];\n\t\t\tif (!tTexture||!tTexture.source)return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tUtils.isOKCmdList=function(cmds){\n\t\tif (!cmds)return false;\n\t\tvar i=0,len=cmds.length;\n\t\tvar context=Render._context;\n\t\tvar cmd;\n\t\tvar tex;\n\t\tfor (i=0;i < len;i++){\n\t\t\tcmd=cmds[i];\n\t\t\tswitch(cmd.callee){\n\t\t\t\tcase context._drawTexture:\n\t\t\t\tcase context._fillTexture:\n\t\t\t\tcase context._drawTextureWithTransform:\n\t\t\t\t\ttex=cmd[0];\n\t\t\t\t\tif (!tex || !tex.source)return false;\n\t\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tUtils._gid=1;\n\tUtils._pi=180 / Math.PI;\n\tUtils._pi2=Math.PI / 180;\n\tUtils._extReg=/\\.(\\w+)\\??/g;\n\tUtils.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\t/*__JS__ */rst=(new DOMParser()).parseFromString(value,'text/xml');\n\t\tif (rst.firstChild.textContent.indexOf(\"This page contains the following errors\")>-1){\n\t\t\tthrow new Error(rst.firstChild.firstChild.textContent);\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn Utils;\n})()\n\n\n/**\n*@private\n*/\n//class laya.utils.VectorGraphManager\nvar VectorGraphManager=(function(){\n\tfunction VectorGraphManager(){\n\t\tthis.useDic={};\n\t\tthis.shapeDic={};\n\t\tthis.shapeLineDic={};\n\t\tthis._id=0;\n\t\tthis._checkKey=false;\n\t\tthis._freeIdArray=[];\n\t\tif (Render.isWebGL){\n\t\t\tCacheManager.regCacheByFunction(Utils.bind(this.startDispose,this),Utils.bind(this.getCacheList,this));\n\t\t}\n\t}\n\n\t__class(VectorGraphManager,'laya.utils.VectorGraphManager');\n\tvar __proto=VectorGraphManager.prototype;\n\t/**\n\t*得到个空闲的ID\n\t*@return\n\t*/\n\t__proto.getId=function(){\n\t\treturn this._id++;\n\t}\n\n\t/**\n\t*添加一个图形到列表中\n\t*@param id\n\t*@param shape\n\t*/\n\t__proto.addShape=function(id,shape){\n\t\tthis.shapeDic[id]=shape;\n\t\tif (!this.useDic[id]){\n\t\t\tthis.useDic[id]=true;\n\t\t}\n\t}\n\n\t/**\n\t*添加一个线图形到列表中\n\t*@param id\n\t*@param Line\n\t*/\n\t__proto.addLine=function(id,Line){\n\t\tthis.shapeLineDic[id]=Line;\n\t\tif (!this.shapeLineDic[id]){\n\t\t\tthis.shapeLineDic[id]=true;\n\t\t}\n\t}\n\n\t/**\n\t*检测一个对象是否在使用中\n\t*@param id\n\t*/\n\t__proto.getShape=function(id){\n\t\tif (this._checkKey){\n\t\t\tif (this.useDic[id] !=null){\n\t\t\t\tthis.useDic[id]=true;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*删除一个图形对象\n\t*@param id\n\t*/\n\t__proto.deleteShape=function(id){\n\t\tif (this.shapeDic[id]){\n\t\t\tthis.shapeDic[id]=null;\n\t\t\tdelete this.shapeDic[id];\n\t\t}\n\t\tif (this.shapeLineDic[id]){\n\t\t\tthis.shapeLineDic[id]=null;\n\t\t\tdelete this.shapeLineDic[id];\n\t\t}\n\t\tif (this.useDic[id] !=null){\n\t\t\tdelete this.useDic[id];\n\t\t}\n\t}\n\n\t/**\n\t*得到缓存列表\n\t*@return\n\t*/\n\t__proto.getCacheList=function(){\n\t\tvar str;\n\t\tvar list=[];\n\t\tfor (str in this.shapeDic){\n\t\t\tlist.push(this.shapeDic[str]);\n\t\t}\n\t\tfor (str in this.shapeLineDic){\n\t\t\tlist.push(this.shapeLineDic[str]);\n\t\t}\n\t\treturn list;\n\t}\n\n\t/**\n\t*开始清理状态，准备销毁\n\t*/\n\t__proto.startDispose=function(key){\n\t\tvar str;\n\t\tfor (str in this.useDic){\n\t\t\tthis.useDic[str]=false;\n\t\t}\n\t\tthis._checkKey=true;\n\t}\n\n\t/**\n\t*确认销毁\n\t*/\n\t__proto.endDispose=function(){\n\t\tif (this._checkKey){\n\t\t\tvar str;\n\t\t\tfor (str in this.useDic){\n\t\t\t\tif (!this.useDic[str]){\n\t\t\t\t\tthis.deleteShape(str);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._checkKey=false;\n\t\t}\n\t}\n\n\tVectorGraphManager.getInstance=function(){\n\t\treturn VectorGraphManager.instance=VectorGraphManager.instance|| new VectorGraphManager();\n\t}\n\n\tVectorGraphManager.instance=null;\n\treturn VectorGraphManager;\n})()\n\n\n/**\n*封装弱引用WeakMap\n*如果支持WeakMap，则使用WeakMap，如果不支持，则用Object代替\n*注意：如果采用Object，为了防止内存泄漏，则采用定时清理缓存策略\n*/\n//class laya.utils.WeakObject\nvar WeakObject=(function(){\n\tfunction WeakObject(){\n\t\t/**@private */\n\t\tthis._obj=null;\n\t\tthis._obj=WeakObject.supportWeakMap ? new Browser.window.WeakMap():{};\n\t\tif (!WeakObject.supportWeakMap)WeakObject._maps.push(this);\n\t}\n\n\t__class(WeakObject,'laya.utils.WeakObject');\n\tvar __proto=WeakObject.prototype;\n\t/**\n\t*设置缓存\n\t*@param key kye对象，可被回收\n\t*@param value object对象，可被回收\n\t*/\n\t__proto.set=function(key,value){\n\t\tif (key==null)return;\n\t\tif (WeakObject.supportWeakMap){\n\t\t\tvar objKey=key;\n\t\t\tif ((typeof key=='string')|| (typeof key=='number')){\n\t\t\t\tobjKey=WeakObject._keys[key];\n\t\t\t\tif (!objKey)objKey=WeakObject._keys[key]={k:key};\n\t\t\t}\n\t\t\tthis._obj.set(objKey,value);\n\t\t\t}else {\n\t\t\tif ((typeof key=='string')|| (typeof key=='number')){\n\t\t\t\tthis._obj[key]=value;\n\t\t\t\t}else {\n\t\t\t\tkey.$_GID || (key.$_GID=Utils.getGID());\n\t\t\t\tthis._obj[key.$_GID]=value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*获取缓存\n\t*@param key kye对象，可被回收\n\t*/\n\t__proto.get=function(key){\n\t\tif (key==null)return null;\n\t\tif (WeakObject.supportWeakMap){\n\t\t\tvar objKey=((typeof key=='string')|| (typeof key=='number'))? WeakObject._keys[key] :key;\n\t\t\tif (!objKey)return null;\n\t\t\treturn this._obj.get(objKey);\n\t\t\t}else {\n\t\t\tif ((typeof key=='string')|| (typeof key=='number'))return this._obj[key];\n\t\t\treturn this._obj[key.$_GID];\n\t\t}\n\t}\n\n\t/**\n\t*删除缓存\n\t*/\n\t__proto.del=function(key){\n\t\tif (key==null)return;\n\t\tif (WeakObject.supportWeakMap){\n\t\t\tvar objKey=((typeof key=='string')|| (typeof key=='number'))? WeakObject._keys[key] :key;\n\t\t\tif (!objKey)return;\n\t\t\t/*__JS__ */this._obj.delete(objKey);\n\t\t\t}else {\n\t\t\tif ((typeof key=='string')|| (typeof key=='number'))delete this._obj[key];\n\t\t\telse delete this._obj[this._obj.$_GID];\n\t\t}\n\t}\n\n\t/**\n\t*是否有缓存\n\t*/\n\t__proto.has=function(key){\n\t\tif (key==null)return false;\n\t\tif (WeakObject.supportWeakMap){\n\t\t\tvar objKey=((typeof key=='string')|| (typeof key=='number'))? WeakObject._keys[key] :key;\n\t\t\treturn this._obj.has(objKey);\n\t\t\t}else {\n\t\t\tif ((typeof key=='string')|| (typeof key=='number'))return this._obj[key] !=null;\n\t\t\treturn this._obj[this._obj.$_GID] !=null;\n\t\t}\n\t}\n\n\tWeakObject.__init__=function(){\n\t\tWeakObject.supportWeakMap=Browser.window.WeakMap !=null;\n\t\tif (!WeakObject.supportWeakMap)Laya.timer.loop(WeakObject.delInterval,null,WeakObject.clearCache);\n\t}\n\n\tWeakObject.clearCache=function(){\n\t\tfor (var i=0,n=WeakObject._maps.length;i < n;i++){\n\t\t\tvar obj=WeakObject._maps[i];\n\t\t\tobj._obj={};\n\t\t}\n\t}\n\n\tWeakObject.supportWeakMap=false;\n\tWeakObject.delInterval=5 *60 *1000;\n\tWeakObject._keys={};\n\tWeakObject._maps=[];\n\t__static(WeakObject,\n\t['I',function(){return this.I=new WeakObject();}\n\t]);\n\treturn WeakObject;\n})()\n\n\n/**\n*@private\n*/\n//class laya.utils.WordText\nvar WordText=(function(){\n\tfunction WordText(){\n\t\tthis.id=NaN;\n\t\tthis.save=[];\n\t\tthis.toUpperCase=null;\n\t\tthis.changed=false;\n\t\tthis._text=null;\n\t}\n\n\t__class(WordText,'laya.utils.WordText');\n\tvar __proto=WordText.prototype;\n\t__proto.setText=function(txt){\n\t\tthis.changed=true;\n\t\tthis._text=txt;\n\t}\n\n\t__proto.toString=function(){\n\t\treturn this._text;\n\t}\n\n\t__proto.charCodeAt=function(i){\n\t\treturn this._text ? this._text.charCodeAt(i):NaN;\n\t}\n\n\t__proto.charAt=function(i){\n\t\treturn this._text ? this._text.charAt(i):null;\n\t}\n\n\t__getset(0,__proto,'length',function(){\n\t\treturn this._text ? this._text.length :0;\n\t});\n\n\treturn WordText;\n})()\n\n\n/**\n*<code>Node</code> 类是可放在显示列表中的所有对象的基类。该显示列表管理 Laya 运行时中显示的所有对象。使用 Node 类排列显示列表中的显示对象。Node 对象可以有子显示对象。\n*/\n//class laya.display.Node extends laya.events.EventDispatcher\nvar Node=(function(_super){\n\tfunction Node(){\n\t\t/**@private */\n\t\tthis._bits=0;\n\t\t/**@private 是否在显示列表中显示*/\n\t\tthis._displayedInStage=false;\n\t\t/**@private 父节点对象*/\n\t\tthis._parent=null;\n\t\t/**@private */\n\t\tthis.conchModel=null;\n\t\t/**节点名称。*/\n\t\tthis.name=\"\";\n\t\t/**[只读]是否已经销毁。对象销毁后不能再使用。*/\n\t\tthis._destroyed=false;\n\t\tNode.__super.call(this);\n\t\tthis._childs=Node.ARRAY_EMPTY;\n\t\tthis._$P=Node.PROP_EMPTY;\n\t\tthis.timer=Laya.scaleTimer;\n\t\tthis.conchModel=Render.isConchNode ? this.createConchModel():null;\n\t}\n\n\t__class(Node,'laya.display.Node',_super);\n\tvar __proto=Node.prototype;\n\t/**@private */\n\t__proto._setBit=function(type,value){\n\t\tif (type==0x1){\n\t\t\tvar preValue=this._getBit(type);\n\t\t\tif (preValue !=value){\n\t\t\t\tthis._updateDisplayedInstage();\n\t\t\t}\n\t\t}\n\t\tif (value){\n\t\t\tthis._bits |=type;\n\t\t\t}else {\n\t\t\tthis._bits &=~type;\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._getBit=function(type){\n\t\treturn (this._bits & type)!=0;\n\t}\n\n\t/**@private */\n\t__proto._setUpNoticeChain=function(){\n\t\tif (this._getBit(0x1)){\n\t\t\tthis._setUpNoticeType(0x1);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._setUpNoticeType=function(type){\n\t\tvar ele=this;\n\t\tele._setBit(type,true);\n\t\tele=ele.parent;\n\t\twhile (ele){\n\t\t\tif (ele._getBit(type))return;\n\t\t\tele._setBit(type,true);\n\t\t\tele=ele.parent;\n\t\t}\n\t}\n\n\t/**\n\t*<p>增加事件侦听器，以使侦听器能够接收事件通知。</p>\n\t*<p>如果侦听鼠标事件，则会自动设置自己和父亲节点的属性 mouseEnabled 的值为 true(如果父节点mouseEnabled=false，则停止设置父节点mouseEnabled属性)。</p>\n\t*@param type 事件的类型。\n\t*@param caller 事件侦听函数的执行域。\n\t*@param listener 事件侦听函数。\n\t*@param args （可选）事件侦听函数的回调参数。\n\t*@return 此 EventDispatcher 对象。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\tif (type===/*laya.events.Event.DISPLAY*/\"display\" || type===/*laya.events.Event.UNDISPLAY*/\"undisplay\"){\n\t\t\tif (!this._getBit(0x1)){\n\t\t\t\tthis._setUpNoticeType(0x1);\n\t\t\t}\n\t\t}\n\t\treturn this._createListener(type,caller,listener,args,false);\n\t}\n\n\t/**\n\t*<p>增加事件侦听器，以使侦听器能够接收事件通知，此侦听事件响应一次后则自动移除侦听。</p>\n\t*<p>如果侦听鼠标事件，则会自动设置自己和父亲节点的属性 mouseEnabled 的值为 true(如果父节点mouseEnabled=false，则停止设置父节点mouseEnabled属性)。</p>\n\t*@param type 事件的类型。\n\t*@param caller 事件侦听函数的执行域。\n\t*@param listener 事件侦听函数。\n\t*@param args （可选）事件侦听函数的回调参数。\n\t*@return 此 EventDispatcher 对象。\n\t*/\n\t__proto.once=function(type,caller,listener,args){\n\t\tif (type===/*laya.events.Event.DISPLAY*/\"display\" || type===/*laya.events.Event.UNDISPLAY*/\"undisplay\"){\n\t\t\tif (!this._getBit(0x1)){\n\t\t\t\tthis._setUpNoticeType(0x1);\n\t\t\t}\n\t\t}\n\t\treturn this._createListener(type,caller,listener,args,true);\n\t}\n\n\t/**@private */\n\t__proto.createConchModel=function(){\n\t\treturn null;\n\t}\n\n\t/**\n\t*<p>销毁此对象。destroy对象默认会把自己从父节点移除，并且清理自身引用关系，等待js自动垃圾回收机制回收。destroy后不能再使用。</p>\n\t*<p>destroy时会移除自身的事情监听，自身的timer监听，移除子对象及从父节点移除自己。</p>\n\t*@param destroyChild （可选）是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tthis._destroyed=true;\n\t\tthis._parent && this._parent.removeChild(this);\n\t\tif (this._childs){\n\t\t\tif (destroyChild)this.destroyChildren();\n\t\t\telse this.removeChildren();\n\t\t}\n\t\tthis._childs=null;\n\t\tthis._$P=null;\n\t\tthis.offAll();\n\t\tthis.timer.clearAll(this);\n\t}\n\n\t/**\n\t*销毁所有子对象，不销毁自己本身。\n\t*/\n\t__proto.destroyChildren=function(){\n\t\tif (this._childs){\n\t\t\tfor (var i=this._childs.length-1;i >-1;i--){\n\t\t\t\tthis._childs[i].destroy(true);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*添加子节点。\n\t*@param node 节点对象\n\t*@return 返回添加的节点\n\t*/\n\t__proto.addChild=function(node){\n\t\tif (!node || this.destroyed || node===this)return node;\n\t\tif ((node).zOrder)this._set$P(\"hasZorder\",true);\n\t\tif (node._parent===this){\n\t\t\tvar index=this.getChildIndex(node);\n\t\t\tif (index!==this._childs.length-1){\n\t\t\t\tthis._childs.splice(index,1);\n\t\t\t\tthis._childs.push(node);\n\t\t\t\tif (this.conchModel){\n\t\t\t\t\tthis.conchModel.removeChild(node.conchModel);\n\t\t\t\t\tthis.conchModel.addChildAt(node.conchModel,this._childs.length-1);\n\t\t\t\t}\n\t\t\t\tthis._childChanged();\n\t\t\t}\n\t\t\t}else {\n\t\t\tnode.parent && node.parent.removeChild(node);\n\t\t\tthis._childs===Node.ARRAY_EMPTY && (this._childs=[]);\n\t\t\tthis._childs.push(node);\n\t\t\tthis.conchModel && this.conchModel.addChildAt(node.conchModel,this._childs.length-1);\n\t\t\tnode.parent=this;\n\t\t\tthis._childChanged();\n\t\t}\n\t\treturn node;\n\t}\n\n\t/**\n\t*批量增加子节点\n\t*@param ...args 无数子节点。\n\t*/\n\t__proto.addChildren=function(__args){\n\t\tvar args=arguments;\n\t\tvar i=0,n=args.length;\n\t\twhile (i < n){\n\t\t\tthis.addChild(args[i++]);\n\t\t}\n\t}\n\n\t/**\n\t*添加子节点到指定的索引位置。\n\t*@param node 节点对象。\n\t*@param index 索引位置。\n\t*@return 返回添加的节点。\n\t*/\n\t__proto.addChildAt=function(node,index){\n\t\tif (!node || this.destroyed || node===this)return node;\n\t\tif ((node).zOrder)this._set$P(\"hasZorder\",true);\n\t\tif (index >=0 && index <=this._childs.length){\n\t\t\tif (node._parent===this){\n\t\t\t\tvar oldIndex=this.getChildIndex(node);\n\t\t\t\tthis._childs.splice(oldIndex,1);\n\t\t\t\tthis._childs.splice(index,0,node);\n\t\t\t\tif (this.conchModel){\n\t\t\t\t\tthis.conchModel.removeChild(node.conchModel);\n\t\t\t\t\tthis.conchModel.addChildAt(node.conchModel,index);\n\t\t\t\t}\n\t\t\t\tthis._childChanged();\n\t\t\t\t}else {\n\t\t\t\tnode.parent && node.parent.removeChild(node);\n\t\t\t\tthis._childs===Node.ARRAY_EMPTY && (this._childs=[]);\n\t\t\t\tthis._childs.splice(index,0,node);\n\t\t\t\tthis.conchModel && this.conchModel.addChildAt(node.conchModel,index);\n\t\t\t\tnode.parent=this;\n\t\t\t}\n\t\t\treturn node;\n\t\t\t}else {\n\t\t\tthrow new Error(\"appendChildAt:The index is out of bounds\");\n\t\t}\n\t}\n\n\t/**\n\t*根据子节点对象，获取子节点的索引位置。\n\t*@param node 子节点。\n\t*@return 子节点所在的索引位置。\n\t*/\n\t__proto.getChildIndex=function(node){\n\t\treturn this._childs.indexOf(node);\n\t}\n\n\t/**\n\t*根据子节点的名字，获取子节点对象。\n\t*@param name 子节点的名字。\n\t*@return 节点对象。\n\t*/\n\t__proto.getChildByName=function(name){\n\t\tvar nodes=this._childs;\n\t\tif (nodes){\n\t\t\tfor (var i=0,n=nodes.length;i < n;i++){\n\t\t\t\tvar node=nodes[i];\n\t\t\t\tif (node.name===name)return node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**@private */\n\t__proto._get$P=function(key){\n\t\treturn this._$P[key];\n\t}\n\n\t/**@private */\n\t__proto._set$P=function(key,value){\n\t\tif (!this.destroyed){\n\t\t\tthis._$P===Node.PROP_EMPTY && (this._$P={});\n\t\t\tthis._$P[key]=value;\n\t\t}\n\t\treturn value;\n\t}\n\n\t/**\n\t*根据子节点的索引位置，获取子节点对象。\n\t*@param index 索引位置\n\t*@return 子节点\n\t*/\n\t__proto.getChildAt=function(index){\n\t\treturn this._childs[index];\n\t}\n\n\t/**\n\t*设置子节点的索引位置。\n\t*@param node 子节点。\n\t*@param index 新的索引。\n\t*@return 返回子节点本身。\n\t*/\n\t__proto.setChildIndex=function(node,index){\n\t\tvar childs=this._childs;\n\t\tif (index < 0 || index >=childs.length){\n\t\t\tthrow new Error(\"setChildIndex:The index is out of bounds.\");\n\t\t};\n\t\tvar oldIndex=this.getChildIndex(node);\n\t\tif (oldIndex < 0)throw new Error(\"setChildIndex:node is must child of this object.\");\n\t\tchilds.splice(oldIndex,1);\n\t\tchilds.splice(index,0,node);\n\t\tif (this.conchModel){\n\t\t\tthis.conchModel.removeChild(node.conchModel);\n\t\t\tthis.conchModel.addChildAt(node.conchModel,index);\n\t\t}\n\t\tthis._childChanged();\n\t\treturn node;\n\t}\n\n\t/**\n\t*@private\n\t*子节点发生改变。\n\t*@param child 子节点。\n\t*/\n\t__proto._childChanged=function(child){}\n\t/**\n\t*删除子节点。\n\t*@param node 子节点\n\t*@return 被删除的节点\n\t*/\n\t__proto.removeChild=function(node){\n\t\tif (!this._childs)return node;\n\t\tvar index=this._childs.indexOf(node);\n\t\treturn this.removeChildAt(index);\n\t}\n\n\t/**\n\t*从父容器删除自己，如已经被删除不会抛出异常。\n\t*@return 当前节点（ Node ）对象。\n\t*/\n\t__proto.removeSelf=function(){\n\t\tthis._parent && this._parent.removeChild(this);\n\t\treturn this;\n\t}\n\n\t/**\n\t*根据子节点名字删除对应的子节点对象，如果找不到不会抛出异常。\n\t*@param name 对象名字。\n\t*@return 查找到的节点（ Node ）对象。\n\t*/\n\t__proto.removeChildByName=function(name){\n\t\tvar node=this.getChildByName(name);\n\t\tnode && this.removeChild(node);\n\t\treturn node;\n\t}\n\n\t/**\n\t*根据子节点索引位置，删除对应的子节点对象。\n\t*@param index 节点索引位置。\n\t*@return 被删除的节点。\n\t*/\n\t__proto.removeChildAt=function(index){\n\t\tvar node=this.getChildAt(index);\n\t\tif (node){\n\t\t\tthis._childs.splice(index,1);\n\t\t\tthis.conchModel && this.conchModel.removeChild(node.conchModel);\n\t\t\tnode.parent=null;\n\t\t}\n\t\treturn node;\n\t}\n\n\t/**\n\t*删除指定索引区间的所有子对象。\n\t*@param beginIndex 开始索引。\n\t*@param endIndex 结束索引。\n\t*@return 当前节点对象。\n\t*/\n\t__proto.removeChildren=function(beginIndex,endIndex){\n\t\t(beginIndex===void 0)&& (beginIndex=0);\n\t\t(endIndex===void 0)&& (endIndex=0x7fffffff);\n\t\tif (this._childs && this._childs.length > 0){\n\t\t\tvar childs=this._childs;\n\t\t\tif (beginIndex===0 && endIndex >=n){\n\t\t\t\tvar arr=childs;\n\t\t\t\tthis._childs=Node.ARRAY_EMPTY;\n\t\t\t\t}else {\n\t\t\t\tarr=childs.splice(beginIndex,endIndex-beginIndex);\n\t\t\t}\n\t\t\tfor (var i=0,n=arr.length;i < n;i++){\n\t\t\t\tarr[i].parent=null;\n\t\t\t\tthis.conchModel && this.conchModel.removeChild(arr[i].conchModel);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*替换子节点。\n\t*@internal 将传入的新节点对象替换到已有子节点索引位置处。\n\t*@param newNode 新节点。\n\t*@param oldNode 老节点。\n\t*@return 返回新节点。\n\t*/\n\t__proto.replaceChild=function(newNode,oldNode){\n\t\tvar index=this._childs.indexOf(oldNode);\n\t\tif (index >-1){\n\t\t\tthis._childs.splice(index,1,newNode);\n\t\t\tif (this.conchModel){\n\t\t\t\tthis.conchModel.removeChild(oldNode.conchModel);\n\t\t\t\tthis.conchModel.addChildAt(newNode.conchModel,index);\n\t\t\t}\n\t\t\toldNode.parent=null;\n\t\t\tnewNode.parent=this;\n\t\t\treturn newNode;\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**@private */\n\t__proto._updateDisplayedInstage=function(){\n\t\tvar ele;\n\t\tele=this;\n\t\tvar stage=Laya.stage;\n\t\tthis._displayedInStage=false;\n\t\twhile (ele){\n\t\t\tif (ele._getBit(0x1)){\n\t\t\t\tthis._displayedInStage=ele._displayedInStage;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tif (ele==stage || ele._displayedInStage){\n\t\t\t\tthis._displayedInStage=true;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tele=ele.parent;\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._setDisplay=function(value){\n\t\tif (this._displayedInStage!==value){\n\t\t\tthis._displayedInStage=value;\n\t\t\tif (value)this.event(/*laya.events.Event.DISPLAY*/\"display\");\n\t\t\telse this.event(/*laya.events.Event.UNDISPLAY*/\"undisplay\");\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*设置指定节点对象是否可见(是否在渲染列表中)。\n\t*@param node 节点。\n\t*@param display 是否可见。\n\t*/\n\t__proto._displayChild=function(node,display){\n\t\tvar childs=node._childs;\n\t\tif (childs){\n\t\t\tfor (var i=0,n=childs.length;i < n;i++){\n\t\t\t\tvar child=childs[i];\n\t\t\t\tif (!child._getBit(0x1))continue ;\n\t\t\t\tif (child._childs.length > 0){\n\t\t\t\t\tthis._displayChild(child,display);\n\t\t\t\t\t}else {\n\t\t\t\t\tchild._setDisplay(display);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tnode._setDisplay(display);\n\t}\n\n\t/**\n\t*当前容器是否包含指定的 <code>Node</code> 节点对象 。\n\t*@param node 指定的 <code>Node</code> 节点对象 。\n\t*@return 一个布尔值表示是否包含指定的 <code>Node</code> 节点对象 。\n\t*/\n\t__proto.contains=function(node){\n\t\tif (node===this)return true;\n\t\twhile (node){\n\t\t\tif (node.parent===this)return true;\n\t\t\tnode=node.parent;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*定时重复执行某函数。功能同Laya.timer.timerLoop()。\n\t*@param delay 间隔时间(单位毫秒)。\n\t*@param caller 执行域(this)。\n\t*@param method 结束时的回调方法。\n\t*@param args （可选）回调参数。\n\t*@param coverBefore （可选）是否覆盖之前的延迟执行，默认为true。\n\t*@param jumpFrame 时钟是否跳帧。基于时间的循环回调，单位时间间隔内，如能执行多次回调，出于性能考虑，引擎默认只执行一次，设置jumpFrame=true后，则回调会连续执行多次\n\t*/\n\t__proto.timerLoop=function(delay,caller,method,args,coverBefore,jumpFrame){\n\t\t(coverBefore===void 0)&& (coverBefore=true);\n\t\t(jumpFrame===void 0)&& (jumpFrame=false);\n\t\tthis.timer.loop(delay,caller,method,args,coverBefore,jumpFrame);\n\t}\n\n\t/**\n\t*定时执行某函数一次。功能同Laya.timer.timerOnce()。\n\t*@param delay 延迟时间(单位毫秒)。\n\t*@param caller 执行域(this)。\n\t*@param method 结束时的回调方法。\n\t*@param args （可选）回调参数。\n\t*@param coverBefore （可选）是否覆盖之前的延迟执行，默认为true。\n\t*/\n\t__proto.timerOnce=function(delay,caller,method,args,coverBefore){\n\t\t(coverBefore===void 0)&& (coverBefore=true);\n\t\tthis.timer._create(false,false,delay,caller,method,args,coverBefore);\n\t}\n\n\t/**\n\t*定时重复执行某函数(基于帧率)。功能同Laya.timer.frameLoop()。\n\t*@param delay 间隔几帧(单位为帧)。\n\t*@param caller 执行域(this)。\n\t*@param method 结束时的回调方法。\n\t*@param args （可选）回调参数。\n\t*@param coverBefore （可选）是否覆盖之前的延迟执行，默认为true。\n\t*/\n\t__proto.frameLoop=function(delay,caller,method,args,coverBefore){\n\t\t(coverBefore===void 0)&& (coverBefore=true);\n\t\tthis.timer._create(true,true,delay,caller,method,args,coverBefore);\n\t}\n\n\t/**\n\t*定时执行一次某函数(基于帧率)。功能同Laya.timer.frameOnce()。\n\t*@param delay 延迟几帧(单位为帧)。\n\t*@param caller 执行域(this)\n\t*@param method 结束时的回调方法\n\t*@param args （可选）回调参数\n\t*@param coverBefore （可选）是否覆盖之前的延迟执行，默认为true\n\t*/\n\t__proto.frameOnce=function(delay,caller,method,args,coverBefore){\n\t\t(coverBefore===void 0)&& (coverBefore=true);\n\t\tthis.timer._create(true,false,delay,caller,method,args,coverBefore);\n\t}\n\n\t/**\n\t*清理定时器。功能同Laya.timer.clearTimer()。\n\t*@param caller 执行域(this)。\n\t*@param method 结束时的回调方法。\n\t*/\n\t__proto.clearTimer=function(caller,method){\n\t\tthis.timer.clear(caller,method);\n\t}\n\n\t/**\n\t*子对象数量。\n\t*/\n\t__getset(0,__proto,'numChildren',function(){\n\t\treturn this._childs.length;\n\t});\n\n\t/**\n\t*[只读]是否已经销毁。对象销毁后不能再使用。\n\t*@return\n\t*/\n\t__getset(0,__proto,'destroyed',function(){\n\t\treturn this._destroyed;\n\t});\n\n\t/**父节点。*/\n\t__getset(0,__proto,'parent',function(){\n\t\treturn this._parent;\n\t\t},function(value){\n\t\tif (this._parent!==value){\n\t\t\tif (value){\n\t\t\t\tthis._parent=value;\n\t\t\t\tthis.event(/*laya.events.Event.ADDED*/\"added\");\n\t\t\t\tif (this._getBit(0x1)){\n\t\t\t\t\tthis._setUpNoticeChain();\n\t\t\t\t\tvalue.displayedInStage && this._displayChild(this,true);\n\t\t\t\t}\n\t\t\t\tvalue._childChanged(this);\n\t\t\t\t}else {\n\t\t\t\tthis.event(/*laya.events.Event.REMOVED*/\"removed\");\n\t\t\t\tthis._parent._childChanged();\n\t\t\t\tif (this._getBit(0x1))this._displayChild(this,false);\n\t\t\t\tthis._parent=value;\n\t\t\t}\n\t\t}\n\t});\n\n\t/**表示是否在显示列表中显示。*/\n\t__getset(0,__proto,'displayedInStage',function(){\n\t\tif (this._getBit(0x1))return this._displayedInStage;\n\t\tthis._setUpNoticeType(0x1);\n\t\treturn this._displayedInStage;\n\t});\n\n\tNode.ARRAY_EMPTY=[];\n\tNode.PROP_EMPTY={};\n\tNode.NOTICE_DISPLAY=0x1;\n\tNode.MOUSEENABLE=0x2;\n\treturn Node;\n})(EventDispatcher)\n\n\n/**\n*@private\n*<code>CSSStyle</code> 类是元素CSS样式定义类。\n*/\n//class laya.display.css.CSSStyle extends laya.display.css.Style\nvar CSSStyle=(function(_super){\n\tfunction CSSStyle(ower){\n\t\tthis._bgground=null;\n\t\tthis._border=null;\n\t\t//this._ower=null;\n\t\tthis._rect=null;\n\t\t/**@private */\n\t\tthis.underLine=0;\n\t\t/**行高。 */\n\t\tthis.lineHeight=0;\n\t\tCSSStyle.__super.call(this);\n\t\tthis._padding=CSSStyle._PADDING;\n\t\tthis._spacing=CSSStyle._SPACING;\n\t\tthis._aligns=CSSStyle._ALIGNS;\n\t\tthis._font=Font.EMPTY;\n\t\tthis._ower=ower;\n\t}\n\n\t__class(CSSStyle,'laya.display.css.CSSStyle',_super);\n\tvar __proto=CSSStyle.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(){\n\t\tthis._ower=null;\n\t\tthis._font=null;\n\t\tthis._rect=null;\n\t}\n\n\t/**\n\t*复制传入的 CSSStyle 属性值。\n\t*@param src 待复制的 CSSStyle 对象。\n\t*/\n\t__proto.inherit=function(src){\n\t\tthis._font=src._font;\n\t\tthis._spacing=src._spacing===CSSStyle._SPACING ? CSSStyle._SPACING :src._spacing.slice();\n\t\tthis.lineHeight=src.lineHeight;\n\t}\n\n\t/**@private */\n\t__proto._widthAuto=function(){\n\t\treturn (this._type & 0x40000)!==0;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.widthed=function(sprite){\n\t\treturn (this._type & 0x8)!=0;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculation=function(type,value){\n\t\tif (value.indexOf('%')< 0)return false;\n\t\tvar ower=this._ower;\n\t\tvar parent=ower.parent;\n\t\tvar rect=this._rect;\n\t\tfunction getValue (pw,w,nums){\n\t\t\treturn (pw *nums[0]+w *nums[1]+nums[2]);\n\t\t}\n\t\tfunction onParentResize (type){\n\t\t\tvar pw=parent.width,w=ower.width;\n\t\t\trect.width && (ower.width=getValue(pw,w,rect.width));\n\t\t\trect.height && (ower.height=getValue(pw,w,rect.height));\n\t\t\trect.left && (ower.x=getValue(pw,w,rect.left));\n\t\t\trect.top && (ower.y=getValue(pw,w,rect.top));\n\t\t}\n\t\tif (rect===null){\n\t\t\tparent._getCSSStyle()._type |=0x80000;\n\t\t\tparent.on(/*laya.events.Event.RESIZE*/\"resize\",this,onParentResize);\n\t\t\tthis._rect=rect={input:{}};\n\t\t};\n\t\tvar nums=value.split(' ');\n\t\tnums[0]=parseFloat(nums[0])/ 100;\n\t\tif (nums.length==1)\n\t\t\tnums[1]=nums[2]=0;\n\t\telse {\n\t\t\tnums[1]=parseFloat(nums[1])/ 100;\n\t\t\tnums[2]=parseFloat(nums[2]);\n\t\t}\n\t\trect[type]=nums;\n\t\trect.input[type]=value;\n\t\tonParentResize(type);\n\t\treturn true;\n\t}\n\n\t/**\n\t*是否已设置高度。\n\t*@param sprite 显示对象 Sprite。\n\t*@return 一个Boolean 表示是否已设置高度。\n\t*/\n\t__proto.heighted=function(sprite){\n\t\treturn (this._type & 0x2000)!=0;\n\t}\n\n\t/**\n\t*设置宽高。\n\t*@param w 宽度。\n\t*@param h 高度。\n\t*/\n\t__proto.size=function(w,h){\n\t\tvar ower=this._ower;\n\t\tvar resize=false;\n\t\tif (w!==-1 && w !=this._ower.width){\n\t\t\tthis._type |=0x8;\n\t\t\tthis._ower.width=w;\n\t\t\tresize=true;\n\t\t}\n\t\tif (h!==-1 && h !=this._ower.height){\n\t\t\tthis._type |=0x2000;\n\t\t\tthis._ower.height=h;\n\t\t\tresize=true;\n\t\t}\n\t\tif (resize){\n\t\t\tower._layoutLater();\n\t\t\t(this._type & 0x80000)&& ower.event(/*laya.events.Event.RESIZE*/\"resize\",this);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._getAlign=function(){\n\t\treturn this._aligns[0];\n\t}\n\n\t/**@private */\n\t__proto._getValign=function(){\n\t\treturn this._aligns[1];\n\t}\n\n\t/**@private */\n\t__proto._getCssFloat=function(){\n\t\treturn (this._type & 0x8000)!=0 ? 0x8000 :0;\n\t}\n\n\t__proto._createFont=function(){\n\t\treturn (this._type & 0x1000)? this._font :(this._type |=0x1000,this._font=new Font(this._font));\n\t}\n\n\t/**@inheritDoc */\n\t__proto.render=function(sprite,context,x,y){\n\t\tvar w=sprite.width;\n\t\tvar h=sprite.height;\n\t\tx-=sprite.pivotX;\n\t\ty-=sprite.pivotY;\n\t\tthis._bgground && this._bgground.color !=null && context.ctx.fillRect(x,y,w,h,this._bgground.color);\n\t\tthis._border && this._border.color && context.drawRect(x,y,w,h,this._border.color.strColor,this._border.size);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.getCSSStyle=function(){\n\t\treturn this;\n\t}\n\n\t/**\n\t*设置 CSS 样式字符串。\n\t*@param text CSS样式字符串。\n\t*/\n\t__proto.cssText=function(text){\n\t\tthis.attrs(CSSStyle.parseOneCSS(text,';'));\n\t}\n\n\t/**\n\t*根据传入的属性名、属性值列表，设置此对象的属性值。\n\t*@param attrs 属性名与属性值列表。\n\t*/\n\t__proto.attrs=function(attrs){\n\t\tif (attrs){\n\t\t\tfor (var i=0,n=attrs.length;i < n;i++){\n\t\t\t\tvar attr=attrs[i];\n\t\t\t\tthis[attr[0]]=attr[1];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@inheritDoc */\n\t__proto.setTransform=function(value){\n\t\t(value==='none')? (this._tf=Style._TF_EMPTY):this.attrs(CSSStyle.parseOneCSS(value,','));\n\t}\n\n\t/**\n\t*定义 X 轴、Y 轴移动转换。\n\t*@param x X 轴平移量。\n\t*@param y Y 轴平移量。\n\t*/\n\t__proto.translate=function(x,y){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.translateX=x;\n\t\tthis._tf.translateY=y;\n\t}\n\n\t/**\n\t*定义 缩放转换。\n\t*@param x X 轴缩放值。\n\t*@param y Y 轴缩放值。\n\t*/\n\t__proto.scale=function(x,y){\n\t\tthis._tf===Style._TF_EMPTY && (this._tf=new TransformInfo());\n\t\tthis._tf.scaleX=x;\n\t\tthis._tf.scaleY=y;\n\t}\n\n\t/**@private */\n\t__proto._enableLayout=function(){\n\t\treturn (this._type & 0x2)===0 && (this._type & 0x4)===0;\n\t}\n\n\t/**\n\t*是否显示为块级元素。\n\t*/\n\t__getset(0,__proto,'block',_super.prototype._$get_block,function(value){\n\t\tvalue ? (this._type |=0x1):(this._type &=(~0x1));\n\t});\n\n\t/**\n\t*垂直对齐方式。\n\t*/\n\t__getset(0,__proto,'valign',function(){\n\t\treturn CSSStyle._valigndef[this._aligns[1]];\n\t\t},function(value){\n\t\tthis._aligns===CSSStyle._ALIGNS && (this._aligns=[0,0,0]);\n\t\tthis._aligns[1]=CSSStyle._valigndef[value];\n\t});\n\n\t/**\n\t*高度。\n\t*/\n\t__getset(0,__proto,'height',null,function(h){\n\t\tthis._type |=0x2000;\n\t\tif ((typeof h=='string')){\n\t\t\tif (this._calculation(\"height\",h))return;\n\t\t\th=parseInt(h);\n\t\t}\n\t\tthis.size(-1,h);\n\t});\n\n\t/**\n\t*宽度。\n\t*/\n\t__getset(0,__proto,'width',null,function(w){\n\t\tthis._type |=0x8;\n\t\tif ((typeof w=='string')){\n\t\t\tvar offset=w.indexOf('auto');\n\t\t\tif (offset >=0){\n\t\t\t\tthis._type |=0x40000;\n\t\t\t\tw=w.substr(0,offset);\n\t\t\t}\n\t\t\tif (this._calculation(\"width\",w))return;\n\t\t\tw=parseInt(w);\n\t\t}\n\t\tthis.size(w,-1);\n\t});\n\n\t/**\n\t*字体粗细。\n\t*/\n\t__getset(0,__proto,'fontWeight',function(){\n\t\treturn this._font.weight;\n\t\t},function(value){\n\t\tthis._createFont().weight=value;\n\t});\n\n\t/**\n\t*表示左边距。\n\t*/\n\t__getset(0,__proto,'left',null,function(value){\n\t\tvar ower=this._ower;\n\t\tif (((typeof value=='string'))){\n\t\t\tif (value===\"center\")\n\t\t\t\tvalue=\"50% -50% 0\";\n\t\t\telse if (value===\"right\")\n\t\t\tvalue=\"100% -100% 0\";\n\t\t\tif (this._calculation(\"left\",value))return;\n\t\t\tvalue=parseInt(value);\n\t\t}\n\t\tower.x=value;\n\t});\n\n\t__getset(0,__proto,'_translate',null,function(value){\n\t\tthis.translate(value[0],value[1]);\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'absolute',function(){\n\t\treturn (this._type & 0x4)!==0;\n\t});\n\n\t/**\n\t*表示上边距。\n\t*/\n\t__getset(0,__proto,'top',null,function(value){\n\t\tvar ower=this._ower;\n\t\tif (((typeof value=='string'))){\n\t\t\tif (value===\"middle\")\n\t\t\t\tvalue=\"50% -50% 0\";\n\t\t\telse if (value===\"bottom\")\n\t\t\tvalue=\"100% -100% 0\";\n\t\t\tif (this._calculation(\"top\",value))return;\n\t\t\tvalue=parseInt(value);\n\t\t}\n\t\tower.y=value;\n\t});\n\n\t/**\n\t*水平对齐方式。\n\t*/\n\t__getset(0,__proto,'align',function(){\n\t\treturn CSSStyle._aligndef[this._aligns[0]];\n\t\t},function(value){\n\t\tthis._aligns===CSSStyle._ALIGNS && (this._aligns=[0,0,0]);\n\t\tthis._aligns[0]=CSSStyle._aligndef[value];\n\t});\n\n\t/**\n\t*表示是否加粗。\n\t*/\n\t__getset(0,__proto,'bold',function(){\n\t\treturn this._font.bold;\n\t\t},function(value){\n\t\tthis._createFont().bold=value;\n\t});\n\n\t/**\n\t*边距信息。\n\t*/\n\t__getset(0,__proto,'padding',function(){\n\t\treturn this._padding;\n\t\t},function(value){\n\t\tthis._padding=value;\n\t});\n\n\t/**\n\t*行间距。\n\t*/\n\t__getset(0,__proto,'leading',function(){\n\t\treturn this._spacing[1];\n\t\t},function(d){\n\t\t((typeof d=='string'))&& (d=parseInt(d+\"\"));\n\t\tthis._spacing===CSSStyle._SPACING && (this._spacing=[0,0]);\n\t\tthis._spacing[1]=d;\n\t});\n\n\t/**\n\t*是否是行元素。\n\t*/\n\t__getset(0,__proto,'lineElement',function(){\n\t\treturn (this._type & 0x10000)!=0;\n\t\t},function(value){\n\t\tvalue ? (this._type |=0x10000):(this._type &=(~0x10000));\n\t});\n\n\t/**\n\t*浮动方向。\n\t*/\n\t__getset(0,__proto,'cssFloat',function(){\n\t\treturn (this._type & 0x8000)!=0 ? \"right\" :\"left\";\n\t\t},function(value){\n\t\tthis.lineElement=false;\n\t\tvalue===\"right\" ? (this._type |=0x8000):(this._type &=(~0x8000));\n\t});\n\n\t/**\n\t*添加到文本的修饰。\n\t*/\n\t__getset(0,__proto,'textDecoration',function(){\n\t\treturn this._font.decoration;\n\t\t},function(value){\n\t\tthis._createFont().decoration=value;\n\t});\n\n\t/**\n\t*设置如何处理元素内的空白。\n\t*/\n\t__getset(0,__proto,'whiteSpace',function(){\n\t\treturn (this._type & 0x20000)? \"nowrap\" :\"\";\n\t\t},function(type){\n\t\ttype===\"nowrap\" && (this._type |=0x20000);\n\t\ttype===\"none\" && (this._type &=~0x20000);\n\t});\n\n\t__getset(0,__proto,'background',null,function(value){\n\t\tif (!value){\n\t\t\tthis._bgground=null;\n\t\t\treturn;\n\t\t}\n\t\tthis._bgground || (this._bgground={});\n\t\tthis._bgground.color=value;\n\t\tthis._ower.conchModel && this._ower.conchModel.bgColor(value);\n\t\tthis._type |=0x4000;\n\t\tthis._ower._renderType |=/*laya.renders.RenderSprite.STYLE*/0x100;\n\t});\n\n\t/**\n\t*表示是否换行。\n\t*/\n\t__getset(0,__proto,'wordWrap',function(){\n\t\treturn (this._type & 0x20000)===0;\n\t\t},function(value){\n\t\tvalue ? (this._type &=~0x20000):(this._type |=0x20000);\n\t});\n\n\t/**\n\t*字体颜色。\n\t*/\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._font.color;\n\t\t},function(value){\n\t\tthis._createFont().color=value;\n\t});\n\n\t/**\n\t*<p>指定文本字段是否是密码文本字段。</p>\n\t*如果此属性的值为 true，则文本字段被视为密码文本字段，并使用星号而不是实际字符来隐藏输入的字符。如果为 false，则不会将文本字段视为密码文本字段。\n\t*/\n\t__getset(0,__proto,'password',function(){\n\t\treturn this._font.password;\n\t\t},function(value){\n\t\tthis._createFont().password=value;\n\t});\n\n\t/**\n\t*背景颜色。\n\t*/\n\t__getset(0,__proto,'backgroundColor',function(){\n\t\treturn this._bgground ? this._bgground.color :null;\n\t\t},function(value){\n\t\tif (value==='none')this._bgground=null;\n\t\telse (this._bgground || (this._bgground={}),this._bgground.color=value);\n\t\tthis._ower.conchModel && this._ower.conchModel.bgColor(value);\n\t\tthis._ower._renderType |=/*laya.renders.RenderSprite.STYLE*/0x100;\n\t});\n\n\t/**\n\t*字体信息。\n\t*/\n\t__getset(0,__proto,'font',function(){\n\t\treturn this._font.toString();\n\t\t},function(value){\n\t\tthis._createFont().set(value);\n\t});\n\n\t/**\n\t*文本的粗细。\n\t*/\n\t__getset(0,__proto,'weight',null,function(value){\n\t\tthis._createFont().weight=value;\n\t});\n\n\t/**\n\t*间距。\n\t*/\n\t__getset(0,__proto,'letterSpacing',function(){\n\t\treturn this._spacing[0];\n\t\t},function(d){\n\t\t((typeof d=='string'))&& (d=parseInt(d+\"\"));\n\t\tthis._spacing===CSSStyle._SPACING && (this._spacing=[0,0]);\n\t\tthis._spacing[0]=d;\n\t});\n\n\t/**\n\t*字体大小。\n\t*/\n\t__getset(0,__proto,'fontSize',function(){\n\t\treturn this._font.size;\n\t\t},function(value){\n\t\tthis._createFont().size=value;\n\t});\n\n\t/**\n\t*表示是否为斜体。\n\t*/\n\t__getset(0,__proto,'italic',function(){\n\t\treturn this._font.italic;\n\t\t},function(value){\n\t\tthis._createFont().italic=value;\n\t});\n\n\t/**\n\t*字体系列。\n\t*/\n\t__getset(0,__proto,'fontFamily',function(){\n\t\treturn this._font.family;\n\t\t},function(value){\n\t\tthis._createFont().family=value;\n\t});\n\n\t/**\n\t*<p>描边宽度（以像素为单位）。</p>\n\t*默认值0，表示不描边。\n\t*@default 0\n\t*/\n\t__getset(0,__proto,'stroke',function(){\n\t\treturn this._font.stroke[0];\n\t\t},function(value){\n\t\tif (this._createFont().stroke===Font._STROKE)this._font.stroke=[0,\"#000000\"];\n\t\tthis._font.stroke[0]=value;\n\t});\n\n\t/**\n\t*<p>描边颜色，以字符串表示。</p>\n\t*@default \"#000000\";\n\t*/\n\t__getset(0,__proto,'strokeColor',function(){\n\t\treturn this._font.stroke[1];\n\t\t},function(value){\n\t\tif (this._createFont().stroke===Font._STROKE)this._font.stroke=[0,\"#000000\"];\n\t\tthis._font.stroke[1]=value;\n\t});\n\n\t/**\n\t*边框属性，比如border=\"5px solid red\"\n\t*/\n\t__getset(0,__proto,'border',function(){\n\t\treturn this._border ? this._border.value :\"\";\n\t\t},function(value){\n\t\tif (value=='none'){\n\t\t\tthis._border=null;\n\t\t\treturn;\n\t\t}\n\t\tthis._border || (this._border={});\n\t\tthis._border.value=value;\n\t\tvar values=value.split(' ');\n\t\tthis._border.color=Color.create(values[values.length-1]);\n\t\tif (values.length==1){\n\t\t\tthis._border.size=1;\n\t\t\tthis._border.type='solid';\n\t\t\treturn;\n\t\t};\n\t\tvar i=0;\n\t\tif (values[0].indexOf('px')> 0){\n\t\t\tthis._border.size=parseInt(values[0]);\n\t\t\ti++;\n\t\t}else this._border.size=1;\n\t\tthis._border.type=values[i];\n\t\tthis._ower._renderType |=/*laya.renders.RenderSprite.STYLE*/0x100;\n\t});\n\n\t/**\n\t*边框的颜色。\n\t*/\n\t__getset(0,__proto,'borderColor',function(){\n\t\treturn (this._border && this._border.color)? this._border.color.strColor :null;\n\t\t},function(value){\n\t\tif (!value){\n\t\t\tthis._border=null;\n\t\t\treturn;\n\t\t}\n\t\tthis._border || (this._border={size:1,type:'solid'});\n\t\tthis._border.color=(value==null)? null :Color.create(value);\n\t\tthis._ower.conchModel && this._ower.conchModel.border(this._border.color.strColor);\n\t\tthis._ower._renderType |=/*laya.renders.RenderSprite.STYLE*/0x100;\n\t});\n\n\t/**\n\t*元素的定位类型。\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\treturn (this._type & 0x4)? \"absolute\" :\"\";\n\t\t},function(value){\n\t\tvalue==\"absolute\" ? (this._type |=0x4):(this._type &=~0x4);\n\t});\n\n\t/**\n\t*规定元素应该生成的框的类型。\n\t*/\n\t__getset(0,__proto,'display',null,function(value){\n\t\tswitch (value){\n\t\t\tcase '':\n\t\t\t\tthis._type &=~0x2;\n\t\t\t\tthis.visible=true;\n\t\t\t\tbreak ;\n\t\t\tcase 'none':\n\t\t\t\tthis._type |=0x2;\n\t\t\t\tthis.visible=false;\n\t\t\t\tthis._ower._layoutLater();\n\t\t\t\tbreak ;\n\t\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'paddingLeft',function(){\n\t\treturn this.padding[3];\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'paddingTop',function(){\n\t\treturn this.padding[0];\n\t});\n\n\t__getset(0,__proto,'_scale',null,function(value){\n\t\tthis._ower.scale(value[0],value[1]);\n\t});\n\n\t__getset(0,__proto,'_rotate',null,function(value){\n\t\tthis._ower.rotation=value;\n\t});\n\n\tCSSStyle.parseOneCSS=function(text,clipWord){\n\t\tvar out=[];\n\t\tvar attrs=text.split(clipWord);\n\t\tvar valueArray;\n\t\tfor (var i=0,n=attrs.length;i < n;i++){\n\t\t\tvar attr=attrs[i];\n\t\t\tvar ofs=attr.indexOf(':');\n\t\t\tvar name=attr.substr(0,ofs).replace(/^\\s+|\\s+$/g,'');\n\t\t\tif (name.length==0)\n\t\t\t\tcontinue ;\n\t\t\tvar value=attr.substr(ofs+1).replace(/^\\s+|\\s+$/g,'');\n\t\t\tvar one=[name,value];\n\t\t\tswitch (name){\n\t\t\t\tcase 'italic':\n\t\t\t\tcase 'bold':\n\t\t\t\t\tone[1]=value==\"true\";\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 'line-height':\n\t\t\t\t\tone[0]='lineHeight';\n\t\t\t\t\tone[1]=parseInt(value);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 'font-size':\n\t\t\t\t\tone[0]='fontSize';\n\t\t\t\t\tone[1]=parseInt(value);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 'padding':\n\t\t\t\t\tvalueArray=value.split(' ');\n\t\t\t\t\tvalueArray.length > 1 || (valueArray[1]=valueArray[2]=valueArray[3]=valueArray[0]);\n\t\t\t\t\tone[1]=[parseInt(valueArray[0]),parseInt(valueArray[1]),parseInt(valueArray[2]),parseInt(valueArray[3])];\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 'rotate':\n\t\t\t\t\tone[0]=\"_rotate\";\n\t\t\t\t\tone[1]=parseFloat(value);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 'scale':\n\t\t\t\t\tvalueArray=value.split(' ');\n\t\t\t\t\tone[0]=\"_scale\";\n\t\t\t\t\tone[1]=[parseFloat(valueArray[0]),parseFloat(valueArray[1])];\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 'translate':\n\t\t\t\t\tvalueArray=value.split(' ');\n\t\t\t\t\tone[0]=\"_translate\";\n\t\t\t\t\tone[1]=[parseInt(valueArray[0]),parseInt(valueArray[1])];\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\t(one[0]=CSSStyle._CSSTOVALUE[name])|| (one[0]=name);\n\t\t\t\t}\n\t\t\tout.push(one);\n\t\t}\n\t\treturn out;\n\t}\n\n\tCSSStyle.parseCSS=function(text,uri){\n\t\tvar one;\n\t\twhile ((one=CSSStyle._parseCSSRegExp.exec(text))!=null){\n\t\t\tCSSStyle.styleSheets[one[1]]=CSSStyle.parseOneCSS(one[2],';');\n\t\t}\n\t}\n\n\tCSSStyle.EMPTY=new CSSStyle(null);\n\tCSSStyle._CSSTOVALUE={'letter-spacing':'letterSpacing','line-spacing':'lineSpacing','white-space':'whiteSpace','line-height':'lineHeight','scale-x':'scaleX','scale-y':'scaleY','translate-x':'translateX','translate-y':'translateY','font-family':'fontFamily','font-weight':'fontWeight','vertical-align':'valign','text-decoration':'textDecoration','background-color':'backgroundColor','border-color':'borderColor','float':'cssFloat'};\n\tCSSStyle._parseCSSRegExp=new RegExp(\"([\\.\\#]\\\\w+)\\\\s*{([\\\\s\\\\S]*?)}\",\"g\");\n\tCSSStyle._aligndef={'left':0,'center':1,'right':2,0:'left',1:'center',2:'right'};\n\tCSSStyle._valigndef={'top':0,'middle':1,'bottom':2,0:'top',1:'middle',2:'bottom'};\n\tCSSStyle.styleSheets={};\n\tCSSStyle.ALIGN_CENTER=1;\n\tCSSStyle.ALIGN_RIGHT=2;\n\tCSSStyle.VALIGN_MIDDLE=1;\n\tCSSStyle.VALIGN_BOTTOM=2;\n\tCSSStyle._CSS_BLOCK=0x1;\n\tCSSStyle._DISPLAY_NONE=0x2;\n\tCSSStyle._ABSOLUTE=0x4;\n\tCSSStyle._WIDTH_SET=0x8;\n\tCSSStyle._PADDING=[0,0,0,0];\n\tCSSStyle._RECT=[-1,-1,-1,-1];\n\tCSSStyle._SPACING=[0,0];\n\tCSSStyle._ALIGNS=[0,0,0];\n\tCSSStyle.ADDLAYOUTED=0x200;\n\tCSSStyle._NEWFONT=0x1000;\n\tCSSStyle._HEIGHT_SET=0x2000;\n\tCSSStyle._BACKGROUND_SET=0x4000;\n\tCSSStyle._FLOAT_RIGHT=0x8000;\n\tCSSStyle._LINE_ELEMENT=0x10000;\n\tCSSStyle._NOWARP=0x20000;\n\tCSSStyle._WIDTHAUTO=0x40000;\n\tCSSStyle._LISTERRESZIE=0x80000;\n\treturn CSSStyle;\n})(Style)\n\n\n/**\n*@private\n*使用Audio标签播放声音\n*/\n//class laya.media.h5audio.AudioSound extends laya.events.EventDispatcher\nvar AudioSound=(function(_super){\n\tfunction AudioSound(){\n\t\t/**\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*播放用的audio标签\n\t\t*/\n\t\tthis.audio=null;\n\t\t/**\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\tAudioSound.__super.call(this);\n\t}\n\n\t__class(AudioSound,'laya.media.h5audio.AudioSound',_super);\n\tvar __proto=AudioSound.prototype;\n\t/**\n\t*释放声音\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=AudioSound._audioCache[this.url];\n\t\tPool.clearBySign(\"audio:\"+this.url);\n\t\tif (ad){\n\t\t\tif (!Render.isConchApp){\n\t\t\t\tad.src=\"\";\n\t\t\t}\n\t\t\tdelete AudioSound._audioCache[this.url];\n\t\t}\n\t}\n\n\t/**\n\t*加载声音\n\t*@param url\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\turl=URL.formatURL(url);\n\t\tthis.url=url;\n\t\tvar ad;\n\t\tif (url==SoundManager._tMusic){\n\t\t\tAudioSound._initMusicAudio();\n\t\t\tad=AudioSound._musicAudio;\n\t\t\tif (ad.src !=url){\n\t\t\t\tdelete AudioSound._audioCache[ad.src];\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\t}else{\n\t\t\tad=AudioSound._audioCache[url];\n\t\t}\n\t\tif (ad && ad.readyState >=2){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (!ad){\n\t\t\tif (url==SoundManager._tMusic){\n\t\t\t\tAudioSound._initMusicAudio();\n\t\t\t\tad=AudioSound._musicAudio;\n\t\t\t\t}else{\n\t\t\t\tad=Browser.createElement(\"audio\");\n\t\t\t}\n\t\t\tAudioSound._audioCache[url]=ad;\n\t\t\tad.src=url;\n\t\t}\n\t\tad.addEventListener(\"canplaythrough\",onLoaded);\n\t\tad.addEventListener(\"error\",onErr);\n\t\tvar me=this;\n\t\tfunction onLoaded (){\n\t\t\toffs();\n\t\t\tme.loaded=true;\n\t\t\tme.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t}\n\t\tfunction onErr (){\n\t\t\tad.load=null;\n\t\t\toffs();\n\t\t\tme.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t\tfunction offs (){\n\t\t\tad.removeEventListener(\"canplaythrough\",onLoaded);\n\t\t\tad.removeEventListener(\"error\",onErr);\n\t\t}\n\t\tthis.audio=ad;\n\t\tif (ad.load){\n\t\t\tad.load();\n\t\t\t}else {\n\t\t\tonErr();\n\t\t}\n\t}\n\n\t/**\n\t*播放声音\n\t*@param startTime 起始时间\n\t*@param loops 循环次数\n\t*@return\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tif (!this.url)return null;\n\t\tvar ad;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tad=AudioSound._musicAudio;\n\t\t\tif (ad.src !=\"\" && ad.src !=this.url){\n\t\t\t\tdelete AudioSound._audioCache[ad.src];\n\t\t\t\tAudioSound._audioCache[this.url]=ad;\n\t\t\t}\n\t\t\t}else{\n\t\t\tad=AudioSound._audioCache[this.url];\n\t\t}\n\t\tif (!ad)return null;\n\t\tvar tAd;\n\t\ttAd=Pool.getItem(\"audio:\"+this.url);\n\t\tif (Render.isConchApp){\n\t\t\tif (!tAd){\n\t\t\t\ttAd=Browser.createElement(\"audio\");\n\t\t\t\ttAd.src=this.url;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (this.url==SoundManager._tMusic){\n\t\t\t\tAudioSound._initMusicAudio();\n\t\t\t\ttAd=AudioSound._musicAudio;\n\t\t\t\ttAd.src=this.url;\n\t\t\t\t}else{\n\t\t\t\ttAd=tAd ? tAd :ad.cloneNode(true);\n\t\t\t}\n\t\t};\n\t\tvar channel=new AudioSoundChannel(tAd);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tvar ad;\n\t\tad=AudioSound._audioCache[this.url];\n\t\tif (!ad)\n\t\t\treturn 0;\n\t\treturn ad.duration;\n\t});\n\n\tAudioSound._initMusicAudio=function(){\n\t\tif (AudioSound._musicAudio)return;\n\t\tif (!AudioSound._musicAudio)AudioSound._musicAudio=Browser.createElement(\"audio\");\n\t\tif (!Render.isConchApp){\n\t\t\tBrowser.document.addEventListener(\"mousedown\",AudioSound._makeMusicOK);\n\t\t}\n\t}\n\n\tAudioSound._makeMusicOK=function(){\n\t\tBrowser.document.removeEventListener(\"mousedown\",AudioSound._makeMusicOK);\n\t\tif (!AudioSound._musicAudio.src){\n\t\t\tAudioSound._musicAudio.src=\"\";\n\t\t\tAudioSound._musicAudio.load();\n\t\t\t}else{\n\t\t\tAudioSound._musicAudio.play();\n\t\t}\n\t}\n\n\tAudioSound._audioCache={};\n\tAudioSound._musicAudio=null;\n\treturn AudioSound;\n})(EventDispatcher)\n\n\n/**\n*<p> <code>SoundChannel</code> 用来控制程序中的声音。每个声音均分配给一个声道，而且应用程序可以具有混合在一起的多个声道。</p>\n*<p> <code>SoundChannel</code> 类包含控制声音的播放、暂停、停止、音量的方法，以及获取声音的播放状态、总时间、当前播放时间、总循环次数、播放地址等信息的方法。</p>\n*/\n//class laya.media.SoundChannel extends laya.events.EventDispatcher\nvar SoundChannel=(function(_super){\n\tfunction SoundChannel(){\n\t\t/**\n\t\t*声音地址。\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*循环次数。\n\t\t*/\n\t\tthis.loops=0;\n\t\t/**\n\t\t*开始时间。\n\t\t*/\n\t\tthis.startTime=NaN;\n\t\t/**\n\t\t*表示声音是否已暂停。\n\t\t*/\n\t\tthis.isStopped=false;\n\t\t/**\n\t\t*播放完成处理器。\n\t\t*/\n\t\tthis.completeHandler=null;\n\t\tSoundChannel.__super.call(this);\n\t}\n\n\t__class(SoundChannel,'laya.media.SoundChannel',_super);\n\tvar __proto=SoundChannel.prototype;\n\t/**\n\t*播放。\n\t*/\n\t__proto.play=function(){}\n\t/**\n\t*停止。\n\t*/\n\t__proto.stop=function(){\n\t\tif (this.completeHandler)this.completeHandler.run();\n\t}\n\n\t/**\n\t*暂停。\n\t*/\n\t__proto.pause=function(){}\n\t/**\n\t*继续播放。\n\t*/\n\t__proto.resume=function(){}\n\t/**\n\t*private\n\t*/\n\t__proto.__runComplete=function(handler){\n\t\tif (handler){\n\t\t\thandler.run();\n\t\t}\n\t}\n\n\t/**\n\t*音量范围从 0（静音）至 1（最大音量）。\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\treturn 1;\n\t\t},function(v){\n\t});\n\n\t/**\n\t*获取当前播放时间。\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\treturn 0;\n\t});\n\n\t/**\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn 0;\n\t});\n\n\treturn SoundChannel;\n})(EventDispatcher)\n\n\n/**\n*<code>Sound</code> 类是用来播放控制声音的类。\n*/\n//class laya.media.Sound extends laya.events.EventDispatcher\nvar Sound=(function(_super){\n\tfunction Sound(){\n\t\tSound.__super.call(this);;\n\t}\n\n\t__class(Sound,'laya.media.Sound',_super);\n\tvar __proto=Sound.prototype;\n\t/**\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){}\n\t/**\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\treturn null;\n\t}\n\n\t/**\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){}\n\t/**\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn 0;\n\t});\n\n\treturn Sound;\n})(EventDispatcher)\n\n\n/**\n*@private\n*web audio api方式播放声音\n*/\n//class laya.media.webaudio.WebAudioSound extends laya.events.EventDispatcher\nvar WebAudioSound=(function(_super){\n\tfunction WebAudioSound(){\n\t\t/**\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**\n\t\t*声音文件数据\n\t\t*/\n\t\tthis.data=null;\n\t\t/**\n\t\t*声音原始文件数据\n\t\t*/\n\t\tthis.audioBuffer=null;\n\t\t/**\n\t\t*待播放的声音列表\n\t\t*/\n\t\tthis.__toPlays=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._disposed=false;\n\t\tWebAudioSound.__super.call(this);\n\t}\n\n\t__class(WebAudioSound,'laya.media.webaudio.WebAudioSound',_super);\n\tvar __proto=WebAudioSound.prototype;\n\t/**\n\t*加载声音\n\t*@param url\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tvar me=this;\n\t\turl=URL.formatURL(url);\n\t\tthis.url=url;\n\t\tthis.audioBuffer=WebAudioSound._dataCache[url];\n\t\tif (this.audioBuffer){\n\t\t\tthis._loaded(this.audioBuffer);\n\t\t\treturn;\n\t\t}\n\t\tWebAudioSound.e.on(\"loaded:\"+url,this,this._loaded);\n\t\tWebAudioSound.e.on(\"err:\"+url,this,this._err);\n\t\tif (WebAudioSound.__loadingSound[url]){\n\t\t\treturn;\n\t\t}\n\t\tWebAudioSound.__loadingSound[url]=true;\n\t\tvar request=new Browser.window.XMLHttpRequest();\n\t\trequest.open(\"GET\",url,true);\n\t\trequest.responseType=\"arraybuffer\";\n\t\trequest.onload=function (){\n\t\t\tif (me._disposed){\n\t\t\t\tme._removeLoadEvents();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tme.data=request.response;\n\t\t\tWebAudioSound.buffs.push({\"buffer\":me.data,\"url\":me.url});\n\t\t\tWebAudioSound.decode();\n\t\t};\n\t\trequest.onerror=function (e){\n\t\t\tme._err();\n\t\t}\n\t\trequest.send();\n\t}\n\n\t__proto._err=function(){\n\t\tthis._removeLoadEvents();\n\t\tWebAudioSound.__loadingSound[this.url]=false;\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tif (!this.__toPlays)return;\n\t\tvar i=0,len=0;\n\t\tvar toPlays;\n\t\ttoPlays=this.__toPlays;\n\t\tlen=toPlays.length;\n\t\tvar tParams;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttParams=toPlays[i];\n\t\t\tif (tParams[2] && !(tParams [2]).isStopped){\n\t\t\t\t(tParams [2]).event(/*laya.events.Event.ERROR*/\"error\");\n\t\t\t}\n\t\t}\n\t\tthis.__toPlays.length=0;\n\t}\n\n\t__proto._loaded=function(audioBuffer){\n\t\tthis._removeLoadEvents();\n\t\tif (this._disposed){\n\t\t\treturn;\n\t\t}\n\t\tthis.audioBuffer=audioBuffer;\n\t\tWebAudioSound._dataCache[this.url]=this.audioBuffer;\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t}\n\n\t__proto._removeLoadEvents=function(){\n\t\tWebAudioSound.e.off(\"loaded:\"+this.url,this,this._loaded);\n\t\tWebAudioSound.e.off(\"err:\"+this.url,this,this._err);\n\t}\n\n\t__proto.__playAfterLoaded=function(){\n\t\tif (!this.__toPlays)return;\n\t\tvar i=0,len=0;\n\t\tvar toPlays;\n\t\ttoPlays=this.__toPlays;\n\t\tlen=toPlays.length;\n\t\tvar tParams;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttParams=toPlays[i];\n\t\t\tif (tParams[2] && !(tParams [2]).isStopped){\n\t\t\t\tthis.play(tParams[0],tParams[1],tParams[2]);\n\t\t\t}\n\t\t}\n\t\tthis.__toPlays.length=0;\n\t}\n\n\t/**\n\t*播放声音\n\t*@param startTime 起始时间\n\t*@param loops 循环次数\n\t*@return\n\t*\n\t*/\n\t__proto.play=function(startTime,loops,channel){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tchannel=channel ? channel :new WebAudioSoundChannel();\n\t\tif (!this.audioBuffer){\n\t\t\tif (this.url){\n\t\t\t\tif (!this.__toPlays)this.__toPlays=[];\n\t\t\t\tthis.__toPlays.push([startTime,loops,channel]);\n\t\t\t\tthis.once(/*laya.events.Event.COMPLETE*/\"complete\",this,this.__playAfterLoaded);\n\t\t\t\tthis.load(this.url);\n\t\t\t}\n\t\t}\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel[\"audioBuffer\"]=this.audioBuffer;\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t__proto.dispose=function(){\n\t\tthis._disposed=true;\n\t\tdelete WebAudioSound._dataCache[this.url];\n\t\tdelete WebAudioSound.__loadingSound[this.url];\n\t\tthis.audioBuffer=null;\n\t\tthis.data=null;\n\t\tthis.__toPlays=[];\n\t}\n\n\t__getset(0,__proto,'duration',function(){\n\t\tif (this.audioBuffer){\n\t\t\treturn this.audioBuffer.duration;\n\t\t}\n\t\treturn 0;\n\t});\n\n\tWebAudioSound.decode=function(){\n\t\tif (WebAudioSound.buffs.length <=0 || WebAudioSound.isDecoding){\n\t\t\treturn;\n\t\t}\n\t\tWebAudioSound.isDecoding=true;\n\t\tWebAudioSound.tInfo=WebAudioSound.buffs.shift();\n\t\tWebAudioSound.ctx.decodeAudioData(WebAudioSound.tInfo[\"buffer\"],WebAudioSound._done,WebAudioSound._fail);\n\t}\n\n\tWebAudioSound._done=function(audioBuffer){\n\t\tWebAudioSound.e.event(\"loaded:\"+WebAudioSound.tInfo.url,audioBuffer);\n\t\tWebAudioSound.isDecoding=false;\n\t\tWebAudioSound.decode();\n\t}\n\n\tWebAudioSound._fail=function(){\n\t\tWebAudioSound.e.event(\"err:\"+WebAudioSound.tInfo.url,null);\n\t\tWebAudioSound.isDecoding=false;\n\t\tWebAudioSound.decode();\n\t}\n\n\tWebAudioSound._playEmptySound=function(){\n\t\tif (WebAudioSound.ctx==null){\n\t\t\treturn;\n\t\t};\n\t\tvar source=WebAudioSound.ctx.createBufferSource();\n\t\tsource.buffer=WebAudioSound._miniBuffer;\n\t\tsource.connect(WebAudioSound.ctx.destination);\n\t\tsource.start(0,0,0);\n\t}\n\n\tWebAudioSound._unlock=function(){\n\t\tif (WebAudioSound._unlocked){\n\t\t\treturn;\n\t\t}\n\t\tWebAudioSound._playEmptySound();\n\t\tif (WebAudioSound.ctx.state==\"running\"){\n\t\t\tBrowser.document.removeEventListener(\"mousedown\",WebAudioSound._unlock,true);\n\t\t\tBrowser.document.removeEventListener(\"touchend\",WebAudioSound._unlock,true);\n\t\t\tBrowser.document.removeEventListener(\"touchstart\",WebAudioSound._unlock,true);\n\t\t\tWebAudioSound._unlocked=true;\n\t\t}\n\t}\n\n\tWebAudioSound.initWebAudio=function(){\n\t\tif (WebAudioSound.ctx.state !=\"running\"){\n\t\t\tWebAudioSound._unlock();\n\t\t\tBrowser.document.addEventListener(\"mousedown\",WebAudioSound._unlock,true);\n\t\t\tBrowser.document.addEventListener(\"touchend\",WebAudioSound._unlock,true);\n\t\t\tBrowser.document.addEventListener(\"touchstart\",WebAudioSound._unlock,true);\n\t\t}\n\t}\n\n\tWebAudioSound._dataCache={};\n\tWebAudioSound.buffs=[];\n\tWebAudioSound.isDecoding=false;\n\tWebAudioSound._unlocked=false;\n\tWebAudioSound.tInfo=null;\n\tWebAudioSound.__loadingSound={};\n\t__static(WebAudioSound,\n\t['window',function(){return this.window=Browser.window;},'webAudioEnabled',function(){return this.webAudioEnabled=WebAudioSound.window[\"AudioContext\"] || WebAudioSound.window[\"webkitAudioContext\"] || WebAudioSound.window[\"mozAudioContext\"];},'ctx',function(){return this.ctx=WebAudioSound.webAudioEnabled ? new (WebAudioSound.window[\"AudioContext\"] || WebAudioSound.window[\"webkitAudioContext\"] || WebAudioSound.window[\"mozAudioContext\"])():undefined;},'_miniBuffer',function(){return this._miniBuffer=WebAudioSound.ctx.createBuffer(1,1,22050);},'e',function(){return this.e=new EventDispatcher();}\n\t]);\n\treturn WebAudioSound;\n})(EventDispatcher)\n\n\n/**\n*<p> <code>HttpRequest</code> 通过封装 HTML <code>XMLHttpRequest</code> 对象提供了对 HTTP 协议的完全的访问，包括做出 POST 和 HEAD 请求以及普通的 GET 请求的能力。 <code>HttpRequest</code> 只提供以异步的形式返回 Web 服务器的响应，并且能够以文本或者二进制的形式返回内容。</p>\n*<p><b>注意：</b>建议每次请求都使用新的 <code>HttpRequest</code> 对象，因为每次调用该对象的send方法时，都会清空之前设置的数据，并重置 HTTP 请求的状态，这会导致之前还未返回响应的请求被重置，从而得不到之前请求的响应结果。</p>\n*/\n//class laya.net.HttpRequest extends laya.events.EventDispatcher\nvar HttpRequest=(function(_super){\n\tfunction HttpRequest(){\n\t\t/**@private */\n\t\tthis._responseType=null;\n\t\t/**@private */\n\t\tthis._data=null;\n\t\tHttpRequest.__super.call(this);\n\t\tthis._http=new Browser.window.XMLHttpRequest();\n\t}\n\n\t__class(HttpRequest,'laya.net.HttpRequest',_super);\n\tvar __proto=HttpRequest.prototype;\n\t/**\n\t*发送 HTTP 请求。\n\t*@param url 请求的地址。大多数浏览器实施了一个同源安全策略，并且要求这个 URL 与包含脚本的文本具有相同的主机名和端口。\n\t*@param data (default=null)发送的数据。\n\t*@param method (default=\"get\")用于请求的 HTTP 方法。值包括 \"get\"、\"post\"、\"head\"。\n\t*@param responseType (default=\"text\")Web 服务器的响应类型，可设置为 \"text\"、\"json\"、\"xml\"、\"arraybuffer\"。\n\t*@param headers (default=null)HTTP 请求的头部信息。参数形如key-value数组：key是头部的名称，不应该包括空白、冒号或换行；value是头部的值，不应该包括换行。比如[\"Content-Type\",\"application/json\"]。\n\t*/\n\t__proto.send=function(url,data,method,responseType,headers){\n\t\t(method===void 0)&& (method=\"get\");\n\t\t(responseType===void 0)&& (responseType=\"text\");\n\t\tthis._responseType=responseType;\n\t\tthis._data=null;\n\t\tif (Browser.onQGMiniGame || Browser.onVVMiniGame || Browser.onQQMiniGame || Browser.onBDMiniGame || Browser.onBLMiniGame || Browser.onAlipayMiniGame || Browser.onHWMiniGame || Browser.onTTMiniGame || Browser.onTBMiniGame){\n\t\t\turl=HttpRequest._urlEncode(url);\n\t\t};\n\t\tvar _this=this;\n\t\tvar http=this._http;\n\t\thttp.open(method,url,true);\n\t\tif (headers){\n\t\t\tfor (var i=0;i < headers.length;i++){\n\t\t\t\thttp.setRequestHeader(headers[i++],headers[i]);\n\t\t\t}\n\t\t\t}else if (!Render.isConchApp){\n\t\t\tif (!data || (typeof data=='string'))http.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\");\n\t\t\telse http.setRequestHeader(\"Content-Type\",\"application/json\");\n\t\t};\n\t\tvar retType=responseType!==\"arraybuffer\" ? \"text\" :\"arraybuffer\";\n\t\thttp.responseType=retType;\n\t\tif (http.dataType){\n\t\t\thttp.dataType=retType;\n\t\t}\n\t\thttp.onerror=function (e){\n\t\t\t_this._onError(e);\n\t\t}\n\t\thttp.onabort=function (e){\n\t\t\t_this._onAbort(e);\n\t\t}\n\t\thttp.onprogress=function (e){\n\t\t\t_this._onProgress(e);\n\t\t}\n\t\thttp.onload=function (e){\n\t\t\t_this._onLoad(e);\n\t\t}\n\t\tif (Browser.onBLMiniGame && Browser.onAndroid && !data){\n\t\t\tdata={};\n\t\t}\n\t\thttp.send(data);\n\t}\n\n\t/**\n\t*@private\n\t*请求进度的侦听处理函数。\n\t*@param e 事件对象。\n\t*/\n\t__proto._onProgress=function(e){\n\t\tif (e && e.lengthComputable)this.event(/*laya.events.Event.PROGRESS*/\"progress\",e.loaded / e.total);\n\t}\n\n\t/**\n\t*@private\n\t*请求中断的侦听处理函数。\n\t*@param e 事件对象。\n\t*/\n\t__proto._onAbort=function(e){\n\t\tthis.error(\"Request was aborted by user\");\n\t}\n\n\t/**\n\t*@private\n\t*请求出错侦的听处理函数。\n\t*@param e 事件对象。\n\t*/\n\t__proto._onError=function(e){\n\t\tthis.error(\"Request failed Status:\"+this._http.status+\" text:\"+this._http.statusText);\n\t}\n\n\t/**\n\t*@private\n\t*请求消息返回的侦听处理函数。\n\t*@param e 事件对象。\n\t*/\n\t__proto._onLoad=function(e){\n\t\tvar http=this._http;\n\t\tvar status=http.status!==undefined ? http.status :200;\n\t\tif (status===200 || status===204 || status===0){\n\t\t\tthis.complete();\n\t\t\t}else {\n\t\t\tthis.error(\"[\"+http.status+\"]\"+http.statusText+\":\"+http.responseURL);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*请求错误的处理函数。\n\t*@param message 错误信息。\n\t*/\n\t__proto.error=function(message){\n\t\tthis.clear();\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",message);\n\t}\n\n\t/**\n\t*@private\n\t*请求成功完成的处理函数。\n\t*/\n\t__proto.complete=function(){\n\t\tthis.clear();\n\t\tvar flag=true;\n\t\ttry {\n\t\t\tif (this._responseType===\"json\"){\n\t\t\t\tthis._data=JSON.parse(this._http.responseText);\n\t\t\t\t}else if (this._responseType===\"xml\"){\n\t\t\t\tthis._data=Utils.parseXMLFromString(this._http.responseText);\n\t\t\t\t}else {\n\t\t\t\tthis._data=this._http.response || this._http.responseText;\n\t\t\t}\n\t\t\t}catch (e){\n\t\t\tflag=false;\n\t\t\tthis.error(e.message);\n\t\t}\n\t\tflag && this.event(/*laya.events.Event.COMPLETE*/\"complete\",(this._data instanceof Array)? [this._data] :this._data);\n\t}\n\n\t/**\n\t*@private\n\t*清除当前请求。\n\t*/\n\t__proto.clear=function(){\n\t\tvar http=this._http;\n\t\thttp.onerror=http.onabort=http.onprogress=http.onload=null;\n\t}\n\n\t/**请求的地址。*/\n\t__getset(0,__proto,'url',function(){\n\t\treturn this._http.responseURL;\n\t});\n\n\t/**\n\t*本对象所封装的原生 XMLHttpRequest 引用。\n\t*/\n\t__getset(0,__proto,'http',function(){\n\t\treturn this._http;\n\t});\n\n\t/**返回的数据。*/\n\t__getset(0,__proto,'data',function(){\n\t\treturn this._data;\n\t});\n\n\t__static(HttpRequest,\n\t['_urlEncode',function(){return this._urlEncode=encodeURI;}\n\t]);\n\treturn HttpRequest;\n})(EventDispatcher)\n\n\n/**\n*<code>Loader</code> 类可用来加载文本、JSON、XML、二进制、图像等资源。\n*/\n//class laya.net.Loader extends laya.events.EventDispatcher\nvar Loader=(function(_super){\n\tfunction Loader(){\n\t\t/**@private 加载后的数据对象，只读*/\n\t\tthis._data=null;\n\t\t/**@private */\n\t\tthis._class=null;\n\t\t/**@private */\n\t\tthis._url=null;\n\t\t/**@private */\n\t\tthis._type=null;\n\t\t/**@private */\n\t\tthis._cache=false;\n\t\t/**@private */\n\t\tthis._http=null;\n\t\t/**@private 自定义解析不派发complete事件，但会派发loaded事件，手动调用endLoad方法再派发complete事件*/\n\t\tthis._customParse=false;\n\t\tLoader.__super.call(this);\n\t}\n\n\t__class(Loader,'laya.net.Loader',_super);\n\tvar __proto=Loader.prototype;\n\t/**\n\t*加载资源。加载错误会派发 Event.ERROR 事件，参数为错误信息。\n\t*@param url 资源地址。\n\t*@param type (default=null)资源类型。可选值为：Loader.TEXT、Loader.JSON、Loader.XML、Loader.BUFFER、Loader.IMAGE、Loader.SOUND、Loader.ATLAS、Loader.FONT。如果为null，则根据文件后缀分析类型。\n\t*@param cache (default=true)是否缓存数据。\n\t*@param group (default=null)分组名称。\n\t*@param ignoreCache (default=false)是否忽略缓存，强制重新加载。\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tthis._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)this._type=type=\"image\";\n\t\telse {\n\t\t\tthis._type=type || (type=this.getTypeFromUrl(url));\n\t\t\turl=URL.formatURL(url);\n\t\t}\n\t\tthis._cache=cache;\n\t\tthis._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[url]){\n\t\t\tthis._data=Loader.loadedMap[url];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",this._data);\n\t\t\treturn;\n\t\t}\n\t\tif (group)Loader.setGroup(url,group);\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthis._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t}\n\t\tif (type===\"image\" || type===\"htmlimage\" || type===\"nativeimage\")return this._loadImage(url);\n\t\tif (type===\"sound\")return this._loadSound(url);\n\t\tif (type===\"ttf\")return this._loadTTF(url);\n\t\tvar contentType;\n\t\tswitch (type){\n\t\t\tcase \"atlas\":\n\t\t\tcase \"plf\":\n\t\t\t\tcontentType=\"json\";\n\t\t\t\tbreak ;\n\t\t\tcase \"font\":\n\t\t\t\tcontentType=\"xml\";\n\t\t\t\tbreak ;\n\t\t\tcase \"pkm\":\n\t\t\t\tcontentType=\"arraybuffer\";\n\t\t\t\tbreak\n\t\t\tdefault :\n\t\t\t\tcontentType=type;\n\t\t\t}\n\t\tif (Loader.preLoadedMap[url]){\n\t\t\tthis.onLoaded(Loader.preLoadedMap[url]);\n\t\t\t}else{\n\t\t\tif(Browser.onVVMiniGame || Browser.onHWMiniGame){\n\t\t\t\tthis._http=new HttpRequest();\n\t\t\t\t}else{\n\t\t\t\tif (!this._http){\n\t\t\t\t\tthis._http=new HttpRequest();\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._http.on(/*laya.events.Event.PROGRESS*/\"progress\",this,this.onProgress);\n\t\t\tthis._http.on(/*laya.events.Event.ERROR*/\"error\",this,this.onError);\n\t\t\tthis._http.on(/*laya.events.Event.COMPLETE*/\"complete\",this,this.onLoaded);\n\t\t\tthis._http.send(url,null,\"get\",contentType);\n\t\t}\n\t}\n\n\t/**\n\t*获取指定资源地址的数据类型。\n\t*@param url 资源地址。\n\t*@return 数据类型。\n\t*/\n\t__proto.getTypeFromUrl=function(url){\n\t\tvar type=Utils.getFileExtension(url);\n\t\tif (type)return Loader.typeMap[type];\n\t\tconsole.warn(\"Not recognize the resources suffix\",url);\n\t\treturn \"text\";\n\t}\n\n\t/**\n\t*@private\n\t*加载TTF资源。\n\t*@param url 资源地址。\n\t*/\n\t__proto._loadTTF=function(url){\n\t\turl=URL.formatURL(url);\n\t\tvar ttfLoader=new TTFLoader();\n\t\tttfLoader.complete=Handler.create(this,this.onLoaded);\n\t\tttfLoader.load(url);\n\t}\n\n\t/**\n\t*@private\n\t*加载图片资源。\n\t*@param url 资源地址。\n\t*/\n\t__proto._loadImage=function(url){\n\t\turl=URL.formatURL(url);\n\t\tvar _this=this;\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete Loader.imgCache[url]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\t_this.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\t_this.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (this._type===\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=url;\n\t\t\tLoader.imgCache[url]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(url,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tLoader.imgCache[url]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*加载声音资源。\n\t*@param url 资源地址。\n\t*/\n\t__proto._loadSound=function(url){\n\t\tvar sound=(new SoundManager._soundClass());\n\t\tvar _this=this;\n\t\tsound.on(/*laya.events.Event.COMPLETE*/\"complete\",this,soundOnload);\n\t\tsound.on(/*laya.events.Event.ERROR*/\"error\",this,soundOnErr);\n\t\tsound.load(url);\n\t\tfunction soundOnload (){\n\t\t\tclear();\n\t\t\t_this.onLoaded(sound);\n\t\t}\n\t\tfunction soundOnErr (){\n\t\t\tclear();\n\t\t\tsound.dispose();\n\t\t\t_this.event(/*laya.events.Event.ERROR*/\"error\",\"Load sound failed\");\n\t\t}\n\t\tfunction clear (){\n\t\t\tsound.offAll();\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto.onProgress=function(value){\n\t\tif (this._type===\"atlas\")this.event(/*laya.events.Event.PROGRESS*/\"progress\",value *0.3);\n\t\telse this.event(/*laya.events.Event.PROGRESS*/\"progress\",value);\n\t}\n\n\t/**@private */\n\t__proto.onError=function(message){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",message);\n\t}\n\n\t/**\n\t*资源加载完成的处理函数。\n\t*@param data 数据。\n\t*/\n\t__proto.onLoaded=function(data){\n\t\tvar type=this._type;\n\t\tif (type==\"plf\"){\n\t\t\tthis.parsePLFData(data);\n\t\t\tthis.complete(data);\n\t\t\t}else if (type===\"image\"){\n\t\t\tvar tex=new Texture(data);\n\t\t\ttex.url=this._url;\n\t\t\tthis.complete(tex);\n\t\t\t}else if (type===\"sound\" || type===\"htmlimage\" || type===\"nativeimage\"){\n\t\t\tthis.complete(data);\n\t\t\t}else if (type===\"atlas\"){\n\t\t\tif (!data.src && !data._setContext){\n\t\t\t\tif (!this._data){\n\t\t\t\t\tthis._data=data;\n\t\t\t\t\tif (data.meta && data.meta.image){\n\t\t\t\t\t\tvar toloadPics=data.meta.image.split(\",\");\n\t\t\t\t\t\tvar split=this._url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\t\tvar idx=this._url.lastIndexOf(split);\n\t\t\t\t\t\tvar folderPath=idx >=0 ? this._url.substr(0,idx+1):\"\";\n\t\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttoloadPics=[this._url.replace(\".json\",\".png\")];\n\t\t\t\t\t}\n\t\t\t\t\ttoloadPics.reverse();\n\t\t\t\t\tdata.toLoads=toloadPics;\n\t\t\t\t\tdata.pics=[];\n\t\t\t\t}\n\t\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",0.3+1 / toloadPics.length *0.6);\n\t\t\t\treturn this._loadImage(URL.formatURL(toloadPics.pop()));\n\t\t\t\t}else {\n\t\t\t\tthis._data.pics.push(data);\n\t\t\t\tif (this._data.toLoads.length > 0){\n\t\t\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",0.3+1 / this._data.toLoads.length *0.6);\n\t\t\t\t\treturn this._loadImage(this._data.toLoads.pop());\n\t\t\t\t};\n\t\t\t\tvar frames=this._data.frames;\n\t\t\t\tvar cleanUrl=this._url.split(\"?\")[0];\n\t\t\t\tvar directory=(this._data.meta && this._data.meta.prefix)? this._data.meta.prefix :cleanUrl.substring(0,cleanUrl.lastIndexOf(\".\"))+\"/\";\n\t\t\t\tvar pics=this._data.pics;\n\t\t\t\tvar atlasURL=URL.formatURL(this._url);\n\t\t\t\tvar map=Loader.atlasMap[atlasURL] || (Loader.atlasMap[atlasURL]=[]);\n\t\t\t\tmap.dir=directory;\n\t\t\t\tvar scaleRate=1;\n\t\t\t\tif (this._data.meta && this._data.meta.scale && this._data.meta.scale !=1){\n\t\t\t\t\tscaleRate=parseFloat(this._data.meta.scale);\n\t\t\t\t\tfor (var name in frames){\n\t\t\t\t\t\tvar obj=frames[name];\n\t\t\t\t\t\tvar tPic=pics[obj.frame.idx ? obj.frame.idx :0];\n\t\t\t\t\t\tvar url=URL.formatURL(directory+name);\n\t\t\t\t\t\ttPic.scaleRate=scaleRate;\n\t\t\t\t\t\tvar tTexture;\n\t\t\t\t\t\ttTexture=Texture.create(tPic,obj.frame.x,obj.frame.y,obj.frame.w,obj.frame.h,obj.spriteSourceSize.x,obj.spriteSourceSize.y,obj.sourceSize.w,obj.sourceSize.h);\n\t\t\t\t\t\tLoader.cacheRes(url,tTexture);\n\t\t\t\t\t\ttTexture.url=url;\n\t\t\t\t\t\tmap.push(url);\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tfor (name in frames){\n\t\t\t\t\t\tobj=frames[name];\n\t\t\t\t\t\ttPic=pics[obj.frame.idx ? obj.frame.idx :0];\n\t\t\t\t\t\turl=URL.formatURL(directory+name);\n\t\t\t\t\t\tLoader.cacheRes(url,Texture.create(tPic,obj.frame.x,obj.frame.y,obj.frame.w,obj.frame.h,obj.spriteSourceSize.x,obj.spriteSourceSize.y,obj.sourceSize.w,obj.sourceSize.h));\n\t\t\t\t\t\tLoader.loadedMap[url].url=url;\n\t\t\t\t\t\tmap.push(url);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdelete this._data.pics;\n\t\t\t\tthis.complete(this._data);\n\t\t\t}\n\t\t\t}else if (type==\"font\"){\n\t\t\tif (!data.src){\n\t\t\t\tthis._data=data;\n\t\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",0.5);\n\t\t\t\treturn this._loadImage(this._url.replace(\".fnt\",\".png\"));\n\t\t\t\t}else {\n\t\t\t\tvar bFont=new BitmapFont();\n\t\t\t\tbFont.parseFont(this._data,data);\n\t\t\t\tvar tArr=this._url.split(\".fnt\")[0].split(\"/\");\n\t\t\t\tvar fontName=tArr[tArr.length-1];\n\t\t\t\tText.registerBitmapFont(fontName,bFont);\n\t\t\t\tthis._data=bFont;\n\t\t\t\tthis.complete(this._data);\n\t\t\t}\n\t\t\t}else if (type==\"pkm\"){\n\t\t\tvar image=HTMLImage.create(data,this._url);\n\t\t\tvar tex1=new Texture(image);\n\t\t\ttex1.url=this._url;\n\t\t\tthis.complete(tex1);\n\t\t\t}else {\n\t\t\tthis.complete(data);\n\t\t}\n\t}\n\n\t__proto.parsePLFData=function(plfData){\n\t\tvar type;\n\t\tvar filePath;\n\t\tvar fileDic;\n\t\tfor (type in plfData){\n\t\t\tfileDic=plfData[type];\n\t\t\tswitch(type){\n\t\t\t\tcase \"json\":\n\t\t\t\tcase \"text\":\n\t\t\t\t\tfor (filePath in fileDic){\n\t\t\t\t\t\tLoader.preLoadedMap[URL.formatURL(filePath)]=fileDic[filePath]\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tfor (filePath in fileDic){\n\t\t\t\t\t\tLoader.preLoadedMap[URL.formatURL(filePath)]=fileDic[filePath]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*加载完成。\n\t*@param data 加载的数据。\n\t*/\n\t__proto.complete=function(data){\n\t\tthis._data=data;\n\t\tif (this._customParse){\n\t\t\tthis.event(/*laya.events.Event.LOADED*/\"loaded\",(data instanceof Array)? [data] :data);\n\t\t\t}else {\n\t\t\tLoader._loaders.push(this);\n\t\t\tif (!Loader._isWorking)Loader.checkNext();\n\t\t}\n\t}\n\n\t/**\n\t*结束加载，处理是否缓存及派发完成事件 <code>Event.COMPLETE</code> 。\n\t*@param content 加载后的数据\n\t*/\n\t__proto.endLoad=function(content){\n\t\tcontent && (this._data=content);\n\t\tif (this._cache)Loader.cacheRes(this._url,this._data);\n\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",(this.data instanceof Array)? [this.data] :this.data);\n\t}\n\n\t/**加载地址。*/\n\t__getset(0,__proto,'url',function(){\n\t\treturn this._url;\n\t});\n\n\t/**返回的数据。*/\n\t__getset(0,__proto,'data',function(){\n\t\treturn this._data;\n\t});\n\n\t/**是否缓存。*/\n\t__getset(0,__proto,'cache',function(){\n\t\treturn this._cache;\n\t});\n\n\t/**加载类型。*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t});\n\n\tLoader.checkNext=function(){\n\t\tLoader._isWorking=true;\n\t\tvar startTimer=Browser.now();\n\t\tvar thisTimer=startTimer;\n\t\twhile (Loader._startIndex < Loader._loaders.length){\n\t\t\tthisTimer=Browser.now();\n\t\t\tLoader._loaders[Loader._startIndex].endLoad();\n\t\t\tLoader._startIndex++;\n\t\t\tif (Browser.now()-startTimer > Loader.maxTimeOut){\n\t\t\t\tconsole.warn(\"loader callback cost a long time:\"+(Browser.now()-startTimer)+\" url=\"+Loader._loaders[Loader._startIndex-1].url);\n\t\t\t\tLaya.timer.frameOnce(1,null,Loader.checkNext);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tLoader._loaders.length=0;\n\t\tLoader._startIndex=0;\n\t\tLoader._isWorking=false;\n\t}\n\n\tLoader.clearRes=function(url,forceDispose){\n\t\t(forceDispose===void 0)&& (forceDispose=false);\n\t\turl=URL.formatURL(url);\n\t\tvar arr=Loader.getAtlas(url);\n\t\tif (arr){\n\t\t\tfor (var i=0,n=arr.length;i < n;i++){\n\t\t\t\tvar resUrl=arr[i];\n\t\t\t\tvar tex=Loader.getRes(resUrl);\n\t\t\t\tdelete Loader.loadedMap[resUrl];\n\t\t\t\tif (tex)tex.destroy(forceDispose);\n\t\t\t}\n\t\t\tarr.length=0;\n\t\t\tdelete Loader.atlasMap[url];\n\t\t\tdelete Loader.loadedMap[url];\n\t\t\t}else {\n\t\t\tvar res=Loader.loadedMap[url];\n\t\t\tif (res){\n\t\t\t\tdelete Loader.loadedMap[url];\n\t\t\t\tif ((res instanceof laya.resource.Texture )&& res.bitmap)(res).destroy(forceDispose);\n\t\t\t}\n\t\t}\n\t}\n\n\tLoader.clearTextureRes=function(url){\n\t\turl=URL.formatURL(url);\n\t\tvar arr=laya.net.Loader.getAtlas(url);\n\t\tvar res=(arr && arr.length>0)? laya.net.Loader.getRes(arr[0]):laya.net.Loader.getRes(url);\n\t\tif (res && res.bitmap){\n\t\t\tif (Render.isConchApp && !Render.isConchWebGL){\n\t\t\t\tif (res.bitmap.source.releaseTexture){\n\t\t\t\t\tres.bitmap.source.releaseTexture();\n\t\t\t\t}\n\t\t\t\t}else if (res.bitmap._atlaser==null){\n\t\t\t\tres.bitmap.releaseResource(true);\n\t\t\t}\n\t\t}\n\t}\n\n\tLoader.getRes=function(url){\n\t\treturn Loader.loadedMap[URL.formatURL(url)];\n\t}\n\n\tLoader.getAtlas=function(url){\n\t\treturn Loader.atlasMap[URL.formatURL(url)];\n\t}\n\n\tLoader.cacheRes=function(url,data){\n\t\turl=URL.formatURL(url);\n\t\tif (Loader.loadedMap[url] !=null){\n\t\t\tconsole.warn(\"Resources already exist,is repeated loading:\",url);\n\t\t\t}else {\n\t\t\tLoader.loadedMap[url]=data;\n\t\t}\n\t}\n\n\tLoader.setGroup=function(url,group){\n\t\tif (!Loader.groupMap[group])Loader.groupMap[group]=[];\n\t\tLoader.groupMap[group].push(url);\n\t}\n\n\tLoader.clearResByGroup=function(group){\n\t\tif (!Loader.groupMap[group])return;\n\t\tvar arr=Loader.groupMap[group],i=0,len=arr.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tLoader.clearRes(arr[i]);\n\t\t}\n\t\tarr.length=0;\n\t}\n\n\tLoader.TEXT=\"text\";\n\tLoader.JSON=\"json\";\n\tLoader.XML=\"xml\";\n\tLoader.BUFFER=\"arraybuffer\";\n\tLoader.IMAGE=\"image\";\n\tLoader.SOUND=\"sound\";\n\tLoader.ATLAS=\"atlas\";\n\tLoader.FONT=\"font\";\n\tLoader.TTF=\"ttf\";\n\tLoader.PLF=\"plf\";\n\tLoader.PKM=\"pkm\";\n\tLoader.typeMap={\"png\":\"image\",\"jpg\":\"image\",\"jpeg\":\"image\",\"txt\":\"text\",\"json\":\"json\",\"xml\":\"xml\",\"als\":\"atlas\",\"atlas\":\"atlas\",\"mp3\":\"sound\",\"ogg\":\"sound\",\"wav\":\"sound\",\"part\":\"json\",\"fnt\":\"font\",\"pkm\":\"pkm\",\"ttf\":\"ttf\",\"plf\":\"plf\",\"ani\":\"json\",\"sk\":\"arraybuffer\"};\n\tLoader.parserMap={};\n\tLoader.groupMap={};\n\tLoader.maxTimeOut=100;\n\tLoader.loadedMap={};\n\tLoader.preLoadedMap={};\n\tLoader.atlasMap={};\n\tLoader._loaders=[];\n\tLoader._isWorking=false;\n\tLoader._startIndex=0;\n\tLoader.imgCache={};\n\treturn Loader;\n})(EventDispatcher)\n\n\n/**\n*<p> <code>LoaderManager</code> 类用于用于批量加载资源。此类是单例，不要手动实例化此类，请通过Laya.loader访问。</p>\n*<p>全部队列加载完成，会派发 Event.COMPLETE 事件；如果队列中任意一个加载失败，会派发 Event.ERROR 事件，事件回调参数值为加载出错的资源地址。</p>\n*<p> <code>LoaderManager</code> 类提供了以下几种功能：<br/>\n*多线程：默认5个加载线程，可以通过maxLoader属性修改线程数量；<br/>\n*多优先级：有0-4共5个优先级，优先级高的优先加载。0最高，4最低；<br/>\n*重复过滤：自动过滤重复加载（不会有多个相同地址的资源同时加载）以及复用缓存资源，防止重复加载；<br/>\n*错误重试：资源加载失败后，会重试加载（以最低优先级插入加载队列），retryNum设定加载失败后重试次数，retryDelay设定加载重试的时间间隔。</p>\n*@see laya.net.Loader\n*/\n//class laya.net.LoaderManager extends laya.events.EventDispatcher\nvar LoaderManager=(function(_super){\n\tvar ResInfo;\n\tfunction LoaderManager(){\n\t\t/**加载出错后的重试次数，默认重试一次*/\n\t\tthis.retryNum=1;\n\t\t/**延迟时间多久再进行错误重试，默认立即重试*/\n\t\tthis.retryDelay=0;\n\t\t/**最大下载线程，默认为5个*/\n\t\tthis.maxLoader=5;\n\t\t/**@private */\n\t\tthis._loaders=[];\n\t\t/**@private */\n\t\tthis._loaderCount=0;\n\t\t/**@private */\n\t\tthis._resInfos=[];\n\t\t/**@private */\n\t\tthis._infoPool=[];\n\t\t/**@private */\n\t\tthis._maxPriority=5;\n\t\t/**@private */\n\t\tthis._failRes={};\n\t\tLoaderManager.__super.call(this);\n\t\tfor (var i=0;i < this._maxPriority;i++)this._resInfos[i]=[];\n\t}\n\n\t__class(LoaderManager,'laya.net.LoaderManager',_super);\n\tvar __proto=LoaderManager.prototype;\n\t/**\n\t*<p>根据clas类型创建一个未初始化资源的对象，随后进行异步加载，资源加载完成后，初始化对象的资源，并通过此对象派发 Event.LOADED 事件，事件回调参数值为此对象本身。套嵌资源的子资源会保留资源路径\"?\"后的部分。</p>\n\t*<p>如果url为数组，返回true；否则返回指定的资源类对象，可以通过侦听此对象的 Event.LOADED 事件来判断资源是否已经加载完毕。</p>\n\t*<p><b>注意：</b>cache参数只能对文件后缀为atlas的资源进行缓存控制，其他资源会忽略缓存，强制重新加载。</p>\n\t*@param url 资源地址或者数组。如果url和clas同时指定了资源类型，优先使用url指定的资源类型。参数形如：[{url:xx,clas:xx,priority:xx,params:xx},{url:xx,clas:xx,priority:xx,params:xx}]。\n\t*@param complete 加载结束回调。根据url类型不同分为2种情况：1. url为String类型，也就是单个资源地址，如果加载成功，则回调参数值为加载完成的资源，否则为null；2. url为数组类型，指定了一组要加载的资源，如果全部加载成功，则回调参数值为true，否则为false。\n\t*@param progress 资源加载进度回调，回调参数值为当前资源加载的进度信息(0-1)。\n\t*@param clas 资源类名。如果url和clas同时指定了资源类型，优先使用url指定的资源类型。参数形如：Texture。\n\t*@param params 资源构造参数。\n\t*@param priority (default=1)加载的优先级，优先级高的优先加载。有0-4共5个优先级，0最高，4最低。\n\t*@param cache 是否缓存加载的资源。\n\t*@return 如果url为数组，返回true；否则返回指定的资源类对象。\n\t*/\n\t__proto.create=function(url,complete,progress,clas,params,priority,cache,group){\n\t\t(priority===void 0)&& (priority=1);\n\t\t(cache===void 0)&& (cache=true);\n\t\tif ((url instanceof Array)){\n\t\t\tvar items=url;\n\t\t\tvar itemCount=items.length;\n\t\t\tvar loadedCount=0;\n\t\t\tif (progress){\n\t\t\t\tvar progress2=Handler.create(progress.caller,progress.method,progress.args,false);\n\t\t\t}\n\t\t\tfor (var i=0;i < itemCount;i++){\n\t\t\t\tvar item=items[i];\n\t\t\t\tif ((typeof item=='string'))\n\t\t\t\t\titem=items[i]={url:item};\n\t\t\t\titem.progress=0;\n\t\t\t}\n\t\t\tfor (i=0;i < itemCount;i++){\n\t\t\t\titem=items[i];\n\t\t\t\tvar progressHandler=progress ? Handler.create(null,onProgress,[item],false):null;\n\t\t\t\tvar completeHandler=(progress || complete)? Handler.create(null,onComplete,[item]):null;\n\t\t\t\tthis._create(item.url,completeHandler,progressHandler,item.clas || clas,item.params || params,item.priority || priority,cache,item.group || group);\n\t\t\t}\n\t\t\tfunction onComplete (item,content){\n\t\t\t\tloadedCount++;\n\t\t\t\titem.progress=1;\n\t\t\t\tif (loadedCount===itemCount && complete){\n\t\t\t\t\tcomplete.run();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction onProgress (item,value){\n\t\t\t\titem.progress=value;\n\t\t\t\tvar num=0;\n\t\t\t\tfor (var j=0;j < itemCount;j++){\n\t\t\t\t\tvar item1=items[j];\n\t\t\t\t\tnum+=item1.progress;\n\t\t\t\t};\n\t\t\t\tvar v=num / itemCount;\n\t\t\t\tprogress2.runWith(v);\n\t\t\t}\n\t\t\treturn true;\n\t\t}else return this._create(url,complete,progress,clas,params,priority,cache,group);\n\t}\n\n\t__proto._create=function(url,complete,progress,clas,params,priority,cache,group){\n\t\t(priority===void 0)&& (priority=1);\n\t\t(cache===void 0)&& (cache=true);\n\t\tvar formarUrl=URL.formatURL(url);\n\t\tvar item=this.getRes(formarUrl);\n\t\tif (!item){\n\t\t\tvar extension=Utils.getFileExtension(url);\n\t\t\tvar creatItem=LoaderManager.createMap[extension];\n\t\t\tif (!creatItem)\n\t\t\t\tthrow new Error(\"LoaderManager:unknown file(\"+url+\") extension with: \"+extension+\".\");\n\t\t\tif (!clas)clas=creatItem[0];\n\t\t\tvar type=creatItem[1];\n\t\t\tif (extension==\"atlas\"){\n\t\t\t\tthis.load(url,complete,progress,type,priority,cache);\n\t\t\t\t}else {\n\t\t\t\tif (clas===Texture)type=\"htmlimage\";\n\t\t\t\titem=clas ? new clas():null;\n\t\t\t\tif (item.hasOwnProperty(\"_loaded\"))\n\t\t\t\t\titem._loaded=false;\n\t\t\t\titem._setUrl(url);\n\t\t\t\t(group)&& (item._setGroup(group));\n\t\t\t\tthis._createLoad(item,url,Handler.create(null,onLoaded),progress,type,priority,false,group,true);\n\t\t\t\tfunction onLoaded (data){\n\t\t\t\t\t(item && !item.destroyed && data)&& (item.onAsynLoaded.call(item,url,data,params));\n\t\t\t\t\tif (complete)complete.run();\n\t\t\t\t\tLaya.loader.event(url);\n\t\t\t\t}\n\t\t\t\t(cache)&& (this.cacheRes(formarUrl,item));\n\t\t\t}\n\t\t\t}else {\n\t\t\tif (!item.hasOwnProperty(\"loaded\")|| item.loaded){\n\t\t\t\tprogress && progress.runWith(1);\n\t\t\t\tcomplete && complete.run();\n\t\t\t\t}else if (complete){\n\t\t\t\tLaya.loader._createListener(url,complete.caller,complete.method,complete.args,true,false);\n\t\t\t}\n\t\t}\n\t\treturn item;\n\t}\n\n\t/**\n\t*<p>加载资源。资源加载错误时，本对象会派发 Event.ERROR 事件，事件回调参数值为加载出错的资源地址。</p>\n\t*<p>因为返回值为 LoaderManager 对象本身，所以可以使用如下语法：Laya.loader.load(...).load(...);</p>\n\t*@param url 要加载的单个资源地址或资源信息数组。比如：简单数组：[\"a.png\",\"b.png\"]；复杂数组[{url:\"a.png\",type:Loader.IMAGE,size:100,priority:1},{url:\"b.json\",type:Loader.JSON,size:50,priority:1}]。\n\t*@param complete 加载结束回调。根据url类型不同分为2种情况：1. url为String类型，也就是单个资源地址，如果加载成功，则回调参数值为加载完成的资源，否则为null；2. url为数组类型，指定了一组要加载的资源，如果全部加载成功，则回调参数值为true，否则为false。\n\t*@param progress 加载进度回调。回调参数值为当前资源的加载进度信息(0-1)。\n\t*@param type 资源类型。比如：Loader.IMAGE。\n\t*@param priority (default=1)加载的优先级，优先级高的优先加载。有0-4共5个优先级，0最高，4最低。\n\t*@param cache 是否缓存加载结果。\n\t*@param group 分组，方便对资源进行管理。\n\t*@param ignoreCache 是否忽略缓存，强制重新加载。\n\t*@return 此 LoaderManager 对象本身。\n\t*/\n\t__proto.load=function(url,complete,progress,type,priority,cache,group,ignoreCache){\n\t\tvar _$this=this;\n\t\t(priority===void 0)&& (priority=1);\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tif ((url instanceof Array))return this._loadAssets(url,complete,progress,type,priority,cache,group);\n\t\tvar content=Loader.getRes(url);\n\t\tif (content !=null){\n\t\t\tLaya.timer.frameOnce(1,null,function(){\n\t\t\t\tprogress && progress.runWith(1);\n\t\t\t\tcomplete && complete.runWith(content);\n\t\t\t\t_$this._loaderCount || _$this.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t});\n\t\t\t}else {\n\t\t\tvar info=LoaderManager._resMap[url];\n\t\t\tif (!info){\n\t\t\t\tinfo=this._infoPool.length ? this._infoPool.pop():new ResInfo();\n\t\t\t\tinfo.url=url;\n\t\t\t\tinfo.type=type;\n\t\t\t\tinfo.cache=cache;\n\t\t\t\tinfo.group=group;\n\t\t\t\tinfo.ignoreCache=ignoreCache;\n\t\t\t\tcomplete && info.on(/*laya.events.Event.COMPLETE*/\"complete\",complete.caller,complete.method,complete.args);\n\t\t\t\tprogress && info.on(/*laya.events.Event.PROGRESS*/\"progress\",progress.caller,progress.method,progress.args);\n\t\t\t\tLoaderManager._resMap[url]=info;\n\t\t\t\tpriority=priority < this._maxPriority ? priority :this._maxPriority-1;\n\t\t\t\tthis._resInfos[priority].push(info);\n\t\t\t\tthis._next();\n\t\t\t\t}else {\n\t\t\t\tcomplete && info._createListener(/*laya.events.Event.COMPLETE*/\"complete\",complete.caller,complete.method,complete.args,false,false);\n\t\t\t\tprogress && info._createListener(/*laya.events.Event.PROGRESS*/\"progress\",progress.caller,progress.method,progress.args,false,false);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._createLoad=function(item,url,complete,progress,type,priority,cache,group,ignoreCache){\n\t\tvar _$this=this;\n\t\t(priority===void 0)&& (priority=1);\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tif ((url instanceof Array))return this._loadAssets(url,complete,progress,type,priority,cache,group);\n\t\tvar content=Loader.getRes(url);\n\t\tif (content !=null){\n\t\t\tLaya.timer.frameOnce(1,null,function(){\n\t\t\t\tprogress && progress.runWith(1);\n\t\t\t\tcomplete && complete.runWith(content);\n\t\t\t\t_$this._loaderCount || _$this.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t});\n\t\t\t}else {\n\t\t\tvar info=LoaderManager._resMap[url];\n\t\t\tif (!info){\n\t\t\t\tinfo=this._infoPool.length ? this._infoPool.pop():new ResInfo();\n\t\t\t\tinfo.url=url;\n\t\t\t\tinfo.clas=item;\n\t\t\t\tinfo.type=type;\n\t\t\t\tinfo.cache=cache;\n\t\t\t\tinfo.group=group;\n\t\t\t\tinfo.ignoreCache=ignoreCache;\n\t\t\t\tcomplete && info.on(/*laya.events.Event.COMPLETE*/\"complete\",complete.caller,complete.method,complete.args);\n\t\t\t\tprogress && info.on(/*laya.events.Event.PROGRESS*/\"progress\",progress.caller,progress.method,progress.args);\n\t\t\t\tLoaderManager._resMap[url]=info;\n\t\t\t\tpriority=priority < this._maxPriority ? priority :this._maxPriority-1;\n\t\t\t\tthis._resInfos[priority].push(info);\n\t\t\t\tthis._next();\n\t\t\t\t}else {\n\t\t\t\tcomplete && info._createListener(/*laya.events.Event.COMPLETE*/\"complete\",complete.caller,complete.method,complete.args,false,false);\n\t\t\t\tprogress && info._createListener(/*laya.events.Event.PROGRESS*/\"progress\",progress.caller,progress.method,progress.args,false,false);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t__proto._next=function(){\n\t\tif (this._loaderCount >=this.maxLoader)return;\n\t\tfor (var i=0;i < this._maxPriority;i++){\n\t\t\tvar infos=this._resInfos[i];\n\t\t\twhile (infos.length > 0){\n\t\t\t\tvar info=infos.shift();\n\t\t\t\tif (info)return this._doLoad(info);\n\t\t\t}\n\t\t}\n\t\tthis._loaderCount || this.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t}\n\n\t__proto._doLoad=function(resInfo){\n\t\tthis._loaderCount++;\n\t\tvar loader=this._loaders.length ? this._loaders.pop():new Loader();\n\t\tloader.on(/*laya.events.Event.COMPLETE*/\"complete\",null,onLoaded);\n\t\tloader.on(/*laya.events.Event.PROGRESS*/\"progress\",null,function(num){\n\t\t\tresInfo.event(/*laya.events.Event.PROGRESS*/\"progress\",num);\n\t\t});\n\t\tloader.on(/*laya.events.Event.ERROR*/\"error\",null,function(msg){\n\t\t\tonLoaded(null);\n\t\t});\n\t\tvar _this=this;\n\t\tfunction onLoaded (data){\n\t\t\tloader.offAll();\n\t\t\tloader._data=null;\n\t\t\tloader._customParse=false;\n\t\t\t_this._loaders.push(loader);\n\t\t\t_this._endLoad(resInfo,(data instanceof Array)? [data] :data);\n\t\t\t_this._loaderCount--;\n\t\t\t_this._next();\n\t\t}\n\t\tloader._class=resInfo.clas;\n\t\tloader.load(resInfo.url,resInfo.type,resInfo.cache,resInfo.group,resInfo.ignoreCache);\n\t}\n\n\t__proto._endLoad=function(resInfo,content){\n\t\tvar url=resInfo.url;\n\t\tif (content==null){\n\t\t\tvar errorCount=this._failRes[url] || 0;\n\t\t\tif (errorCount < this.retryNum){\n\t\t\t\tconsole.warn(\"[warn]Retry to load:\",url);\n\t\t\t\tthis._failRes[url]=errorCount+1;\n\t\t\t\tLaya.timer.once(this.retryDelay,this,this._addReTry,[resInfo],false);\n\t\t\t\treturn;\n\t\t\t\t}else {\n\t\t\t\tconsole.warn(\"[error]Failed to load:\",url);\n\t\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",url);\n\t\t\t}\n\t\t}\n\t\tif (this._failRes[url])this._failRes[url]=0;\n\t\tdelete LoaderManager._resMap[url];\n\t\tresInfo.event(/*laya.events.Event.COMPLETE*/\"complete\",content);\n\t\tresInfo.offAll();\n\t\tthis._infoPool.push(resInfo);\n\t}\n\n\t__proto._addReTry=function(resInfo){\n\t\tthis._resInfos[this._maxPriority-1].push(resInfo);\n\t\tthis._next();\n\t}\n\n\t/**\n\t*清理指定资源地址缓存。\n\t*@param url 资源地址。\n\t*@param forceDispose 是否强制销毁，有些资源是采用引用计数方式销毁，如果forceDispose=true，则忽略引用计数，直接销毁，比如Texture，默认为false\n\t*/\n\t__proto.clearRes=function(url,forceDispose){\n\t\t(forceDispose===void 0)&& (forceDispose=false);\n\t\tLoader.clearRes(url,forceDispose);\n\t}\n\n\t/**\n\t*获取指定资源地址的资源。\n\t*@param url 资源地址。\n\t*@return 返回资源。\n\t*/\n\t__proto.getRes=function(url){\n\t\treturn Loader.getRes(url);\n\t}\n\n\t/**\n\t*缓存资源。\n\t*@param url 资源地址。\n\t*@param data 要缓存的内容。\n\t*/\n\t__proto.cacheRes=function(url,data){\n\t\tLoader.cacheRes(url,data);\n\t}\n\n\t/**\n\t*销毁Texture使用的图片资源，保留texture壳，如果下次渲染的时候，发现texture使用的图片资源不存在，则会自动恢复\n\t*相比clearRes，clearTextureRes只是清理texture里面使用的图片资源，并不销毁texture，再次使用到的时候会自动恢复图片资源\n\t*而clearRes会彻底销毁texture，导致不能再使用；clearTextureRes能确保立即销毁图片资源，并且不用担心销毁错误，clearRes则采用引用计数方式销毁\n\t*【注意】如果图片本身在自动合集里面（默认图片小于512*512），内存是不能被销毁的，此图片被大图合集管理器管理\n\t*@param url 图集地址或者texture地址，比如 Loader.clearTextureRes(\"res/atlas/comp.atlas\");Loader.clearTextureRes(\"hall/bg.jpg\");\n\t*/\n\t__proto.clearTextureRes=function(url){\n\t\tLoader.clearTextureRes(url);\n\t}\n\n\t/**\n\t*设置资源分组。\n\t*@param url 资源地址。\n\t*@param group 分组名\n\t*/\n\t__proto.setGroup=function(url,group){\n\t\tLoader.setGroup(url,group);\n\t}\n\n\t/**\n\t*根据分组清理资源。\n\t*@param group 分组名\n\t*/\n\t__proto.clearResByGroup=function(group){\n\t\tLoader.clearResByGroup(group);\n\t}\n\n\t/**清理当前未完成的加载，所有未加载的内容全部停止加载。*/\n\t__proto.clearUnLoaded=function(){\n\t\tfor (var i=0;i < this._maxPriority;i++){\n\t\t\tvar infos=this._resInfos[i];\n\t\t\tfor (var j=infos.length-1;j >-1;j--){\n\t\t\t\tvar info=infos[j];\n\t\t\t\tif (info){\n\t\t\t\t\tinfo.offAll();\n\t\t\t\t\tthis._infoPool.push(info);\n\t\t\t\t}\n\t\t\t}\n\t\t\tinfos.length=0;\n\t\t}\n\t\tthis._loaderCount=0;\n\t\tLoaderManager._resMap={};\n\t}\n\n\t/**\n\t*根据地址集合清理掉未加载的内容\n\t*@param urls 资源地址集合\n\t*/\n\t__proto.cancelLoadByUrls=function(urls){\n\t\tif (!urls)return;\n\t\tfor (var i=0,n=urls.length;i < n;i++){\n\t\t\tthis.cancelLoadByUrl(urls[i]);\n\t\t}\n\t}\n\n\t/**\n\t*根据地址清理掉未加载的内容\n\t*@param url 资源地址\n\t*/\n\t__proto.cancelLoadByUrl=function(url){\n\t\tfor (var i=0;i < this._maxPriority;i++){\n\t\t\tvar infos=this._resInfos[i];\n\t\t\tfor (var j=infos.length-1;j >-1;j--){\n\t\t\t\tvar info=infos[j];\n\t\t\t\tif (info && info.url===url){\n\t\t\t\t\tinfos[j]=null;\n\t\t\t\t\tinfo.offAll();\n\t\t\t\t\tthis._infoPool.push(info);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (LoaderManager._resMap[url])delete LoaderManager._resMap[url];\n\t}\n\n\t/**\n\t*@private\n\t*加载数组里面的资源。\n\t*@param arr 简单：[\"a.png\",\"b.png\"]，复杂[{url:\"a.png\",type:Loader.IMAGE,size:100,priority:1},{url:\"b.json\",type:Loader.JSON,size:50,priority:1}]*/\n\t__proto._loadAssets=function(arr,complete,progress,type,priority,cache,group){\n\t\t(priority===void 0)&& (priority=1);\n\t\t(cache===void 0)&& (cache=true);\n\t\tvar itemCount=arr.length;\n\t\tvar loadedCount=0;\n\t\tvar totalSize=0;\n\t\tvar items=[];\n\t\tvar success=true;\n\t\tfor (var i=0;i < itemCount;i++){\n\t\t\tvar item=arr[i];\n\t\t\tif ((typeof item=='string'))item={url:item,type:type,size:1,priority:priority};\n\t\t\tif (!item.size)item.size=1;\n\t\t\titem.progress=0;\n\t\t\ttotalSize+=item.size;\n\t\t\titems.push(item);\n\t\t\tvar progressHandler=progress ? Handler.create(null,loadProgress,[item],false):null;\n\t\t\tvar completeHandler=(complete || progress)? Handler.create(null,loadComplete,[item]):null;\n\t\t\tthis.load(item.url,completeHandler,progressHandler,item.type,item.priority || 1,cache,item.group || group);\n\t\t}\n\t\tfunction loadComplete (item,content){\n\t\t\tloadedCount++;\n\t\t\titem.progress=1;\n\t\t\tif (!content)success=false;\n\t\t\tif (loadedCount===itemCount && complete){\n\t\t\t\tcomplete.runWith(success);\n\t\t\t}\n\t\t}\n\t\tfunction loadProgress (item,value){\n\t\t\tif (progress !=null){\n\t\t\t\titem.progress=value;\n\t\t\t\tvar num=0;\n\t\t\t\tfor (var j=0;j < items.length;j++){\n\t\t\t\t\tvar item1=items[j];\n\t\t\t\t\tnum+=item1.size *item1.progress;\n\t\t\t\t};\n\t\t\t\tvar v=num / totalSize;\n\t\t\t\tprogress.runWith(v);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tLoaderManager.cacheRes=function(url,data){\n\t\tLoader.cacheRes(url,data);\n\t}\n\n\tLoaderManager._resMap={};\n\t__static(LoaderManager,\n\t['createMap',function(){return this.createMap={atlas:[null,/*laya.net.Loader.ATLAS*/\"atlas\"]};}\n\t]);\n\tLoaderManager.__init$=function(){\n\t\t//class ResInfo extends laya.events.EventDispatcher\n\t\tResInfo=(function(_super){\n\t\t\tfunction ResInfo(){\n\t\t\t\tthis.url=null;\n\t\t\t\tthis.type=null;\n\t\t\t\tthis.cache=false;\n\t\t\t\tthis.group=null;\n\t\t\t\tthis.ignoreCache=false;\n\t\t\t\tthis.clas=null;\n\t\t\t\tResInfo.__super.call(this);\n\t\t\t}\n\t\t\t__class(ResInfo,'',_super);\n\t\t\treturn ResInfo;\n\t\t})(EventDispatcher)\n\t}\n\n\treturn LoaderManager;\n})(EventDispatcher)\n\n\n/**\n*<p><code>ColorFilter</code> 是颜色滤镜。使用 ColorFilter 类可以将 4 x 5 矩阵转换应用于输入图像上的每个像素的 RGBA 颜色和 Alpha 值，以生成具有一组新的 RGBA 颜色和 Alpha 值的结果。该类允许饱和度更改、色相旋转、亮度转 Alpha 以及各种其他效果。您可以将滤镜应用于任何显示对象（即，从 Sprite 类继承的对象）。</p>\n*<p>注意：对于 RGBA 值，最高有效字节代表红色通道值，其后的有效字节分别代表绿色、蓝色和 Alpha 通道值。</p>\n*/\n//class laya.filters.ColorFilter extends laya.filters.Filter\nvar ColorFilter=(function(_super){\n\tfunction ColorFilter(mat){\n\t\t/**@private */\n\t\t//this._mat=null;\n\t\t/**@private */\n\t\t//this._alpha=null;\n\t\tColorFilter.__super.call(this);\n\t\tif (!mat){\n\t\t\tmat=[0.3,0.59,0.11,0,0,0.3,0.59,0.11,0,0,0.3,0.59,0.11,0,0,0,0,0,1,0];\n\t\t}\n\t\tthis._mat=new Float32Array(16);\n\t\tthis._alpha=new Float32Array(4);\n\t\tvar j=0;\n\t\tvar z=0;\n\t\tfor (var i=0;i < 20;i++){\n\t\t\tif (i % 5 !=4){\n\t\t\t\tthis._mat[j++]=mat[i];\n\t\t\t\t}else {\n\t\t\t\tthis._alpha[z++]=mat[i];\n\t\t\t}\n\t\t}\n\t\tthis._action=RunDriver.createFilterAction(0x20);\n\t\tthis._action.data=this;\n\t}\n\n\t__class(ColorFilter,'laya.filters.ColorFilter',_super);\n\tvar __proto=ColorFilter.prototype;\n\tLaya.imps(__proto,{\"laya.filters.IFilter\":true})\n\t/**\n\t*@private 通知微端\n\t*/\n\t__proto.callNative=function(sp){\n\t\tvar t=sp._$P.cf=this;\n\t\tsp.conchModel && sp.conchModel.setFilterMatrix && sp.conchModel.setFilterMatrix(this._mat,this._alpha);\n\t}\n\n\t/**@private */\n\t__getset(0,__proto,'type',function(){\n\t\treturn 0x20;\n\t});\n\n\t/**@private */\n\t__getset(0,__proto,'action',function(){\n\t\treturn this._action;\n\t});\n\n\treturn ColorFilter;\n})(Filter)\n\n\n/**\n*<p> <code>Socket</code> 封装了 HTML5 WebSocket ，允许服务器端与客户端进行全双工（full-duplex）的实时通信，并且允许跨域通信。在建立连接后，服务器和 Browser/Client Agent 都能主动的向对方发送或接收文本和二进制数据。</p>\n*<p>要使用 <code>Socket</code> 类的方法，请先使用构造函数 <code>new Socket</code> 创建一个 <code>Socket</code> 对象。 <code>Socket</code> 以异步方式传输和接收数据。</p>\n*/\n//class laya.net.Socket extends laya.events.EventDispatcher\nvar Socket=(function(_super){\n\tfunction Socket(host,port,byteClass){\n\t\t/**@private */\n\t\tthis._endian=null;\n\t\t/**@private */\n\t\tthis._stamp=NaN;\n\t\t/**@private */\n\t\tthis._socket=null;\n\t\t/**@private */\n\t\tthis._connected=false;\n\t\t/**@private */\n\t\tthis._addInputPosition=0;\n\t\t/**@private */\n\t\tthis._input=null;\n\t\t/**@private */\n\t\tthis._output=null;\n\t\t/**\n\t\t*@private\n\t\t*表示建立连接时需等待的毫秒数。\n\t\t*/\n\t\tthis.timeout=0;\n\t\t/**\n\t\t*@private\n\t\t*在写入或读取对象时，控制所使用的 AMF 的版本。\n\t\t*/\n\t\tthis.objectEncoding=0;\n\t\t/**\n\t\t*不再缓存服务端发来的数据。\n\t\t*/\n\t\tthis.disableInput=false;\n\t\t/**\n\t\t*用来发送和接收数据的 <code>Byte</code> 类。\n\t\t*/\n\t\tthis._byteClass=null;\n\t\t/**\n\t\t*<p>子协议名称。子协议名称字符串，或由多个子协议名称字符串构成的数组。必须在调用 connect 或者 connectByUrl 之前进行赋值，否则无效。</p>\n\t\t*<p>指定后，只有当服务器选择了其中的某个子协议，连接才能建立成功，否则建立失败，派发 Event.ERROR 事件。</p>\n\t\t*@see https://html.spec.whatwg.org/multipage/comms.html#dom-websocket\n\t\t*/\n\t\tthis.protocols=[];\n\t\t(port===void 0)&& (port=0);\n\t\tSocket.__super.call(this);\n\t\tthis._byteClass=byteClass ? byteClass :Byte;\n\t\tthis.endian=\"bigEndian\";\n\t\tthis.timeout=20000;\n\t\tthis._addInputPosition=0;\n\t\tif (host && port > 0 && port < 65535)\n\t\t\tthis.connect(host,port);\n\t}\n\n\t__class(Socket,'laya.net.Socket',_super);\n\tvar __proto=Socket.prototype;\n\t/**\n\t*<p>连接到指定的主机和端口。</p>\n\t*<p>连接成功派发 Event.OPEN 事件；连接失败派发 Event.ERROR 事件；连接被关闭派发 Event.CLOSE 事件；接收到数据派发 Event.MESSAGE 事件； 除了 Event.MESSAGE 事件参数为数据内容，其他事件参数都是原生的 HTML DOM Event 对象。</p>\n\t*@param host 服务器地址。\n\t*@param port 服务器端口。\n\t*/\n\t__proto.connect=function(host,port){\n\t\tvar url=\"ws://\"+host+\":\"+port;\n\t\tif (Browser.window.location.protocol==\"https:\"){\n\t\t\turl=\"wss://\"+host+\":\"+port;\n\t\t\t}else {\n\t\t\turl=\"ws://\"+host+\":\"+port;\n\t\t}\n\t\tthis.connectByUrl(url);\n\t}\n\n\t/**\n\t*<p>连接到指定的服务端 WebSocket URL。 URL 类似 ws://yourdomain:port。</p>\n\t*<p>连接成功派发 Event.OPEN 事件；连接失败派发 Event.ERROR 事件；连接被关闭派发 Event.CLOSE 事件；接收到数据派发 Event.MESSAGE 事件； 除了 Event.MESSAGE 事件参数为数据内容，其他事件参数都是原生的 HTML DOM Event 对象。</p>\n\t*@param url 要连接的服务端 WebSocket URL。 URL 类似 ws://yourdomain:port。\n\t*/\n\t__proto.connectByUrl=function(url){\n\t\tvar _$this=this;\n\t\tif (this._socket !=null)\n\t\t\tthis.close();\n\t\tthis._socket && this.cleanSocket();\n\t\tif (!this.protocols || this.protocols.length==0){\n\t\t\tthis._socket=new Browser.window.WebSocket(url);\n\t\t\t}else {\n\t\t\tthis._socket=new Browser.window.WebSocket(url,this.protocols);\n\t\t}\n\t\tthis._socket.binaryType=\"arraybuffer\";\n\t\tthis._output=new this._byteClass();\n\t\tthis._output.endian=this.endian;\n\t\tthis._input=new this._byteClass();\n\t\tthis._input.endian=this.endian;\n\t\tthis._addInputPosition=0;\n\t\tthis._socket.onopen=function (e){\n\t\t\t_$this._onOpen(e);\n\t\t};\n\t\tthis._socket.onmessage=function (msg){\n\t\t\t_$this._onMessage(msg);\n\t\t};\n\t\tthis._socket.onclose=function (e){\n\t\t\t_$this._onClose(e);\n\t\t};\n\t\tthis._socket.onerror=function (e){\n\t\t\t_$this._onError(e);\n\t\t};\n\t}\n\n\t/**\n\t*清理socket。\n\t*/\n\t__proto.cleanSocket=function(){\n\t\ttry {\n\t\t\tthis._socket.close();\n\t\t}catch (e){}\n\t\tthis._connected=false;\n\t\tthis._socket.onopen=null;\n\t\tthis._socket.onmessage=null;\n\t\tthis._socket.onclose=null;\n\t\tthis._socket.onerror=null;\n\t\tthis._socket=null;\n\t}\n\n\t/**\n\t*关闭连接。\n\t*/\n\t__proto.close=function(){\n\t\tif (this._socket !=null){\n\t\t\ttry {\n\t\t\t\tthis._socket.close();\n\t\t\t}catch (e){}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*连接建立成功 。\n\t*/\n\t__proto._onOpen=function(e){\n\t\tthis._connected=true;\n\t\tthis.event(/*laya.events.Event.OPEN*/\"open\",e);\n\t}\n\n\t/**\n\t*@private\n\t*接收到数据处理方法。\n\t*@param msg 数据。\n\t*/\n\t__proto._onMessage=function(msg){\n\t\tif (!msg || !msg.data)return;\n\t\tvar data=msg.data;\n\t\tif (this.disableInput && data){\n\t\t\tthis.event(/*laya.events.Event.MESSAGE*/\"message\",data);\n\t\t\treturn;\n\t\t}\n\t\tif (this._input.length > 0 && this._input.bytesAvailable < 1){\n\t\t\tthis._input.clear();\n\t\t\tthis._addInputPosition=0;\n\t\t};\n\t\tvar pre=this._input.pos;\n\t\t!this._addInputPosition && (this._addInputPosition=0);\n\t\tthis._input.pos=this._addInputPosition;\n\t\tif (data){\n\t\t\tif ((typeof data=='string')){\n\t\t\t\tthis._input.writeUTFBytes(data);\n\t\t\t\t}else {\n\t\t\t\tthis._input.writeArrayBuffer(data);\n\t\t\t}\n\t\t\tthis._addInputPosition=this._input.pos;\n\t\t\tthis._input.pos=pre;\n\t\t}\n\t\tthis.event(/*laya.events.Event.MESSAGE*/\"message\",data);\n\t}\n\n\t/**\n\t*@private\n\t*连接被关闭处理方法。\n\t*/\n\t__proto._onClose=function(e){\n\t\tthis._connected=false;\n\t\tthis.event(/*laya.events.Event.CLOSE*/\"close\",e)\n\t}\n\n\t/**\n\t*@private\n\t*出现异常处理方法。\n\t*/\n\t__proto._onError=function(e){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",e)\n\t}\n\n\t/**\n\t*发送数据到服务器。\n\t*@param data 需要发送的数据，可以是String或者ArrayBuffer。\n\t*/\n\t__proto.send=function(data){\n\t\tthis._socket.send(data);\n\t}\n\n\t/**\n\t*发送缓冲区中的数据到服务器。\n\t*/\n\t__proto.flush=function(){\n\t\tif (this._output && this._output.length > 0){\n\t\t\tvar evt;\n\t\t\ttry {\n\t\t\t\tthis._socket && this._socket.send(this._output.__getBuffer().slice(0,this._output.length));\n\t\t\t\t}catch (e){\n\t\t\t\tevt=e;\n\t\t\t}\n\t\t\tthis._output.endian=this.endian;\n\t\t\tthis._output.clear();\n\t\t\tif (evt)this.event(/*laya.events.Event.ERROR*/\"error\",evt);\n\t\t}\n\t}\n\n\t/**\n\t*缓存的服务端发来的数据。\n\t*/\n\t__getset(0,__proto,'input',function(){\n\t\treturn this._input;\n\t});\n\n\t/**\n\t*表示需要发送至服务端的缓冲区中的数据。\n\t*/\n\t__getset(0,__proto,'output',function(){\n\t\treturn this._output;\n\t});\n\n\t/**\n\t*表示此 Socket 对象目前是否已连接。\n\t*/\n\t__getset(0,__proto,'connected',function(){\n\t\treturn this._connected;\n\t});\n\n\t/**\n\t*<p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。</p>\n\t*<p> LITTLE_ENDIAN ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。</p>\n\t*<p> BIG_ENDIAN ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。</p>\n\t*/\n\t__getset(0,__proto,'endian',function(){\n\t\treturn this._endian;\n\t\t},function(value){\n\t\tthis._endian=value;\n\t\tif (this._input !=null)this._input.endian=value;\n\t\tif (this._output !=null)this._output.endian=value;\n\t});\n\n\tSocket.LITTLE_ENDIAN=\"littleEndian\";\n\tSocket.BIG_ENDIAN=\"bigEndian\";\n\treturn Socket;\n})(EventDispatcher)\n\n\n/**\n*@private\n*Worker Image加载器\n*/\n//class laya.net.WorkerLoader extends laya.events.EventDispatcher\nvar WorkerLoader=(function(_super){\n\tfunction WorkerLoader(){\n\t\t/**\n\t\t*使用的Worker对象。\n\t\t*/\n\t\tthis.worker=null;\n\t\tWorkerLoader.__super.call(this);\n\t\tvar _$this=this;\n\t\tthis.worker=new Browser.window.Worker(WorkerLoader.workerPath);\n\t\tthis.worker.onmessage=function (evt){\n\t\t\t_$this.workerMessage(evt.data);\n\t\t}\n\t}\n\n\t__class(WorkerLoader,'laya.net.WorkerLoader',_super);\n\tvar __proto=WorkerLoader.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto.workerMessage=function(data){\n\t\tif (data){\n\t\t\tswitch(data.type){\n\t\t\t\tcase \"Image\":\n\t\t\t\t\tthis.imageLoaded(data);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"Msg\":\n\t\t\t\t\tthis.event(\"image_msg\",data.msg);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.imageLoaded=function(data){\n\t\tif (data && data.buffer && data.buffer.length < 10){\n\t\t\tWorkerLoader._enable=false;\n\t\t\tthis._myTrace(\"buffer lost when postmessage ,disable workerloader\");\n\t\t\tthis.event(data.url,null);\n\t\t\tthis.event(\"image_err\",data.url+\"\\n\"+data.msg);\n\t\t\treturn;\n\t\t}\n\t\tif (!data.dataType){\n\t\t\tthis.event(data.url,null);\n\t\t\tthis.event(\"image_err\",data.url+\"\\n\"+data.msg);\n\t\t\treturn;\n\t\t};\n\t\tvar canvas,ctx;\n\t\tvar imageData;\n\t\tswitch(data.dataType){\n\t\t\tcase \"buffer\":\n\t\t\t\tcanvas=new HTMLCanvas(\"2D\");\n\t\t\t\tctx=canvas.source.getContext(\"2d\");\n\t\t\t\timageData=ctx.createImageData(data.width,data.height);\n\t\t\t\timageData.data.set(data.buffer);\n\t\t\t\tcanvas.size(imageData.width,imageData.height);\n\t\t\t\tctx.putImageData(imageData,0,0);\n\t\t\t\tcanvas.memorySize=0;\n\t\t\t\tbreak ;\n\t\t\tcase \"imagedata\":\n\t\t\t\tcanvas=new HTMLCanvas(\"2D\");\n\t\t\t\tctx=canvas.source.getContext(\"2d\");\n\t\t\t\timageData=data.imagedata;\n\t\t\t\tcanvas.size(imageData.width,imageData.height);\n\t\t\t\tctx.putImageData(imageData,0,0);\n\t\t\t\timageData=data.imagedata;\n\t\t\t\tcanvas.memorySize=0;\n\t\t\t\tbreak ;\n\t\t\tcase \"imageBitmap\":\n\t\t\t\timageData=data.imageBitmap;\n\t\t\t\tif (!Render.isWebGL){\n\t\t\t\t\tcanvas=new HTMLCanvas(\"2D\");\n\t\t\t\t\tctx=canvas.source.getContext(\"2d\");\n\t\t\t\t\tcanvas.size(imageData.width,imageData.height);\n\t\t\t\t\tctx.drawImage(imageData,0,0);\n\t\t\t\t\tcanvas.src=data.url;\n\t\t\t\t}else\n\t\t\t\tcanvas=imageData;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tif (Render.isWebGL)\n\t\t\t/*__JS__ */canvas=new laya.webgl.resource.WebGLImage(canvas,data.url);;\n\t\tthis.event(data.url,canvas);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._myTrace=function(__arg){\n\t\tvar arg=arguments;\n\t\tvar rst=[];\n\t\tvar i=0,len=arg.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\trst.push(arg[i]);\n\t\t}\n\t\tthis.event(\"image_msg\",rst.join(\" \"));\n\t}\n\n\t/**\n\t*加载图片\n\t*@param url 图片地址\n\t*/\n\t__proto.loadImage=function(url){\n\t\tvar data;\n\t\tdata={};\n\t\tdata.type=\"load\";\n\t\tdata.url=url;\n\t\tthis.worker.postMessage(data);\n\t}\n\n\t/**\n\t*@private\n\t*加载图片资源。\n\t*@param url 资源地址。\n\t*/\n\t__proto._loadImage=function(url){\n\t\tvar _this=this;\n\t\tif (!WorkerLoader._enable||url.toLowerCase().indexOf(\".png\")< 0){\n\t\t\tWorkerLoader._preLoadFun.call(_this,url);\n\t\t\treturn;\n\t\t}\n\t\turl=URL.formatURL(url);\n\t\tfunction clear (){\n\t\t\tlaya.net.WorkerLoader.I.off(url,_this,onload);\n\t\t};\n\t\tvar onload=function (image){\n\t\t\tclear();\n\t\t\tif (image){\n\t\t\t\t_this[\"onLoaded\"](image);\n\t\t\t\t}else{\n\t\t\t\tWorkerLoader._preLoadFun.call(_this,url);\n\t\t\t}\n\t\t};\n\t\tlaya.net.WorkerLoader.I.on(url,_this,onload);\n\t\tlaya.net.WorkerLoader.I.loadImage(url);\n\t}\n\n\t/**\n\t*是否启用。\n\t*/\n\t__getset(1,WorkerLoader,'enable',function(){\n\t\treturn WorkerLoader._enable;\n\t\t},function(v){\n\t\tif (WorkerLoader.disableJSDecode && (!Browser.window.createImageBitmap))return;\n\t\tWorkerLoader._enable=v;\n\t\tif (WorkerLoader._enable && WorkerLoader._preLoadFun==null)WorkerLoader._enable=WorkerLoader.__init__();\n\t});\n\n\tWorkerLoader.__init__=function(){\n\t\tif (WorkerLoader._preLoadFun !=null)return false;\n\t\tif (!Browser.window.Worker)return false;\n\t\tWorkerLoader._preLoadFun=Loader[\"prototype\"][\"_loadImage\"];\n\t\tLoader[\"prototype\"][\"_loadImage\"]=WorkerLoader[\"prototype\"][\"_loadImage\"];\n\t\tif (!WorkerLoader.I)WorkerLoader.I=new WorkerLoader();\n\t\treturn true;\n\t}\n\n\tWorkerLoader.workerSupported=function(){\n\t\treturn Browser.window.Worker?true:false;\n\t}\n\n\tWorkerLoader.IMAGE_LOADED=\"image_loaded\";\n\tWorkerLoader.IMAGE_ERR=\"image_err\";\n\tWorkerLoader.IMAGE_MSG=\"image_msg\";\n\tWorkerLoader.I=null;\n\tWorkerLoader._preLoadFun=null;\n\tWorkerLoader._enable=false;\n\tWorkerLoader.workerPath=\"libs/worker.js\";\n\tWorkerLoader.disableJSDecode=true;\n\treturn WorkerLoader;\n})(EventDispatcher)\n\n\n/**\n*@private\n*<code>Resource</code> 资源存取类。\n*/\n//class laya.resource.Resource extends laya.events.EventDispatcher\nvar Resource=(function(_super){\n\tfunction Resource(){\n\t\t/**@private */\n\t\t//this.__loaded=false;\n\t\t/**@private */\n\t\t//this._id=0;\n\t\t/**@private */\n\t\t//this._memorySize=0;\n\t\t/**@private */\n\t\t//this._released=false;\n\t\t/**@private */\n\t\t//this._destroyed=false;\n\t\t/**@private */\n\t\t//this._referenceCount=0;\n\t\t/**@private */\n\t\t//this._group=null;\n\t\t/**@private */\n\t\t//this._url=null;\n\t\t/**@private */\n\t\t//this._resourceManager=null;\n\t\t/**@private */\n\t\t//this._lastUseFrameCount=0;\n\t\t/**是否加锁，如果true为不能使用自动释放机制。*/\n\t\t//this.lock=false;\n\t\t/**名称。 */\n\t\t//this.name=null;\n\t\tResource.__super.call(this);\n\t\tthis._$1__id=++Resource._uniqueIDCounter;\n\t\tthis.__loaded=true;\n\t\tthis._destroyed=false;\n\t\tthis._referenceCount=0;\n\t\tResource._idResourcesMap[this.id]=this;\n\t\tthis._released=true;\n\t\tthis.lock=false;\n\t\tthis._memorySize=0;\n\t\tthis._lastUseFrameCount=-1;\n\t\t(ResourceManager.currentResourceManager)&& (ResourceManager.currentResourceManager.addResource(this));\n\t}\n\n\t__class(Resource,'laya.resource.Resource',_super);\n\tvar __proto=Resource.prototype;\n\tLaya.imps(__proto,{\"laya.resource.ICreateResource\":true,\"laya.resource.IDispose\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._setUrl=function(url){\n\t\tif (this._url!==url){\n\t\t\tvar resList;\n\t\t\tif (this._url){\n\t\t\t\tresList=Resource._urlResourcesMap[this._url];\n\t\t\t\tresList.splice(resList.indexOf(this),1);\n\t\t\t\t(resList.length===0)&& (delete Resource._urlResourcesMap[this._url]);\n\t\t\t}\n\t\t\tif (url){\n\t\t\t\tresList=Resource._urlResourcesMap[url];\n\t\t\t\t(resList)|| (Resource._urlResourcesMap[url]=resList=[]);\n\t\t\t\tresList.push(this);\n\t\t\t}\n\t\t\tthis._url=url;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getGroup=function(){\n\t\treturn this._group;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setGroup=function(value){\n\t\tif (this._group!==value){\n\t\t\tvar groupList;\n\t\t\tif (this._group){\n\t\t\t\tgroupList=Resource._groupResourcesMap[this._group];\n\t\t\t\tgroupList.splice(groupList.indexOf(this),1);\n\t\t\t\t(groupList.length===0)&& (delete Resource._groupResourcesMap[this._group]);\n\t\t\t}\n\t\t\tif (value){\n\t\t\t\tgroupList=Resource._groupResourcesMap[value];\n\t\t\t\t(groupList)|| (Resource._groupResourcesMap[value]=groupList=[]);\n\t\t\t\tgroupList.push(this);\n\t\t\t}\n\t\t\tthis._group=value;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addReference=function(){\n\t\tthis._referenceCount++;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeReference=function(){\n\t\tthis._referenceCount--;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._clearReference=function(){\n\t\tthis._referenceCount=0;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._endLoaded=function(){\n\t\tthis.__loaded=true;\n\t\tthis.event(/*laya.events.Event.LOADED*/\"loaded\",this);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.recreateResource=function(){\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.disposeResource=function(){}\n\t/**\n\t*激活资源，使用资源前应先调用此函数激活。\n\t*@param force 是否强制创建。\n\t*/\n\t__proto.activeResource=function(force){\n\t\t(force===void 0)&& (force=false);\n\t\tthis._lastUseFrameCount=Stat.loopCount;\n\t\tif (!this._destroyed && this.__loaded && (this._released || force))\n\t\t\tthis.recreateResource();\n\t}\n\n\t/**\n\t*释放资源。\n\t*@param force 是否强制释放。\n\t*@return 是否成功释放。\n\t*/\n\t__proto.releaseResource=function(force){\n\t\t(force===void 0)&& (force=false);\n\t\tif (!force && this.lock)\n\t\t\treturn false;\n\t\tif (!this._released || force){\n\t\t\tthis.disposeResource();\n\t\t\tthis._released=true;\n\t\t\tthis._lastUseFrameCount=-1;\n\t\t\tthis.event(/*laya.events.Event.RELEASED*/\"released\",this);\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tthrow new Error(\"Resource: must override this function!\");\n\t}\n\n\t/**\n\t*<p>彻底处理资源，处理后不能恢复。</p>\n\t*<p><b>注意：</b>会强制解锁清理。</p>\n\t*/\n\t__proto.destroy=function(){\n\t\tif (this._destroyed)\n\t\t\treturn;\n\t\tif (this._resourceManager!==null)\n\t\t\tthis._resourceManager.removeResource(this);\n\t\tthis._destroyed=true;\n\t\tthis.lock=false;\n\t\tthis.releaseResource();\n\t\tdelete Resource._idResourcesMap[this.id];\n\t\tvar resList;\n\t\tif (this._url){\n\t\t\tresList=Resource._urlResourcesMap[this._url];\n\t\t\tif (resList){\n\t\t\t\tresList.splice(resList.indexOf(this),1);\n\t\t\t\t(resList.length===0)&& (delete Resource._urlResourcesMap[this.url]);\n\t\t\t}\n\t\t\tLoader.clearRes(this._url);\n\t\t\t(this.__loaded)||(RunDriver.cancelLoadByUrl(this._url));\n\t\t}\n\t\tif (this._group){\n\t\t\tresList=Resource._groupResourcesMap[this._group];\n\t\t\tresList.splice(resList.indexOf(this),1);\n\t\t\t(resList.length===0)&& (delete Resource._groupResourcesMap[this.url]);\n\t\t}\n\t}\n\n\t/**完成资源激活。*/\n\t__proto.completeCreate=function(){\n\t\tthis._released=false;\n\t\tthis.event(/*laya.events.Event.RECOVERED*/\"recovered\",this);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.dispose=function(){\n\t\tthis.destroy();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t/**\n\t*占用内存尺寸。\n\t*/\n\t__getset(0,__proto,'memorySize',function(){\n\t\treturn this._memorySize;\n\t\t},function(value){\n\t\tvar offsetValue=value-this._memorySize;\n\t\tthis._memorySize=value;\n\t\tthis.resourceManager && this.resourceManager.addSize(offsetValue);\n\t});\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_loaded',null,function(value){\n\t\tthis.__loaded=value;\n\t});\n\n\t/**\n\t*获取是否已加载完成。\n\t*/\n\t__getset(0,__proto,'loaded',function(){\n\t\treturn this.__loaded;\n\t});\n\n\t/**\n\t*获取唯一标识ID,通常用于识别。\n\t*/\n\t__getset(0,__proto,'id',function(){\n\t\treturn this._$1__id;\n\t});\n\n\t/**\n\t*是否已处理。\n\t*/\n\t__getset(0,__proto,'destroyed',function(){\n\t\treturn this._destroyed;\n\t});\n\n\t/**\n\t*设置资源组名。\n\t*/\n\t/**\n\t*获取资源组名。\n\t*/\n\t__getset(0,__proto,'group',function(){\n\t\treturn this._getGroup();\n\t\t},function(value){\n\t\tthis._setGroup(value);\n\t});\n\n\t/**\n\t*资源管理员。\n\t*/\n\t__getset(0,__proto,'resourceManager',function(){\n\t\treturn this._resourceManager;\n\t});\n\n\t/**\n\t*获取资源的URL地址。\n\t*@return URL地址。\n\t*/\n\t__getset(0,__proto,'url',function(){\n\t\treturn this._url;\n\t});\n\n\t/**\n\t*是否已释放。\n\t*/\n\t__getset(0,__proto,'released',function(){\n\t\treturn this._released;\n\t});\n\n\t/**\n\t*获取资源的引用计数。\n\t*/\n\t__getset(0,__proto,'referenceCount',function(){\n\t\treturn this._referenceCount;\n\t});\n\n\tResource.getResourceByID=function(id){\n\t\treturn Resource._idResourcesMap[id];\n\t}\n\n\tResource.getResourceByURL=function(url,index){\n\t\t(index===void 0)&& (index=0);\n\t\treturn Resource._urlResourcesMap[url][index];\n\t}\n\n\tResource.getResourceCountByURL=function(url){\n\t\treturn Resource._urlResourcesMap[url].length;\n\t}\n\n\tResource.destroyUnusedResources=function(group){\n\t\tvar res;\n\t\tif (group){\n\t\t\tvar resouList=Resource._groupResourcesMap[group];\n\t\t\tif (resouList){\n\t\t\t\tvar tempResouList=resouList.slice();\n\t\t\t\tfor (var i=0,n=tempResouList.length;i < n;i++){\n\t\t\t\t\tres=tempResouList[i];\n\t\t\t\t\tif (!res.lock && res._referenceCount===0)\n\t\t\t\t\t\tres.destroy();\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (var k in Resource._idResourcesMap){\n\t\t\t\tres=Resource._idResourcesMap[k];\n\t\t\t\tif (!res.lock && res._referenceCount===0)\n\t\t\t\t\tres.destroy();\n\t\t\t}\n\t\t}\n\t}\n\n\tResource._uniqueIDCounter=0;\n\tResource._idResourcesMap={};\n\tResource._urlResourcesMap={};\n\tResource._groupResourcesMap={};\n\treturn Resource;\n})(EventDispatcher)\n\n\n/**\n*<code>Texture</code> 是一个纹理处理类。\n*/\n//class laya.resource.Texture extends laya.events.EventDispatcher\nvar Texture=(function(_super){\n\tfunction Texture(bitmap,uv){\n\t\t/**图片或者canvas 。*/\n\t\t//this.bitmap=null;\n\t\t/**UV信息。*/\n\t\t//this.uv=null;\n\t\t/**沿 X 轴偏移量。*/\n\t\tthis.offsetX=0;\n\t\t/**沿 Y 轴偏移量。*/\n\t\tthis.offsetY=0;\n\t\t/**原始宽度（包括被裁剪的透明区域）。*/\n\t\tthis.sourceWidth=0;\n\t\t/**原始高度（包括被裁剪的透明区域）。*/\n\t\tthis.sourceHeight=0;\n\t\t/**@private */\n\t\t//this._loaded=false;\n\t\t/**@private */\n\t\tthis._w=0;\n\t\t/**@private */\n\t\tthis._h=0;\n\t\t/**@private 唯一ID*/\n\t\t//this.$_GID=NaN;\n\t\t/**图片地址*/\n\t\t//this.url=null;\n\t\t/**@private */\n\t\tthis._uvID=0;\n\t\tthis._atlasID=-1;\n\t\t/**@private */\n\t\tthis.scaleRate=1;\n\t\tTexture.__super.call(this);\n\t\tif (bitmap && bitmap._addReference!=null){\n\t\t\tbitmap._addReference();\n\t\t}\n\t\tthis.setTo(bitmap,uv);\n\t}\n\n\t__class(Texture,'laya.resource.Texture',_super);\n\tvar __proto=Texture.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._setUrl=function(url){\n\t\tthis.url=url;\n\t}\n\n\t/**\n\t*设置此对象的位图资源、UV数据信息。\n\t*@param bitmap 位图资源\n\t*@param uv UV数据信息\n\t*/\n\t__proto.setTo=function(bitmap,uv){\n\t\tif (/*__JS__ */bitmap instanceof window.HTMLElement){\n\t\t\tvar canvas=HTMLCanvas.create(\"2D\",bitmap);\n\t\t\tthis.bitmap=canvas;\n\t\t\t}else{\n\t\t\tthis.bitmap=bitmap;\n\t\t}\n\t\tthis.uv=uv || Texture.DEF_UV;\n\t\tif (bitmap){\n\t\t\tthis._w=bitmap.width;\n\t\t\tthis._h=bitmap.height;\n\t\t\tthis.sourceWidth=this.sourceWidth || this._w;\n\t\t\tthis.sourceHeight=this.sourceHeight || this._h\n\t\t\tthis._loaded=this._w > 0;\n\t\t\tvar _this=this;\n\t\t\tif (this._loaded){\n\t\t\t\tRunDriver.addToAtlas && RunDriver.addToAtlas(_this);\n\t\t\t\t}else {\n\t\t\t\tvar bm=bitmap;\n\t\t\t\tif ((bm instanceof laya.resource.HTMLImage )&& bm.image)\n\t\t\t\t\tbm.image.addEventListener('load',function(e){\n\t\t\t\t\tRunDriver.addToAtlas && RunDriver.addToAtlas(_this);\n\t\t\t\t},false);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private 激活资源。*/\n\t__proto.active=function(){\n\t\tif (this.bitmap)this.bitmap.activeResource();\n\t}\n\n\t/**\n\t*销毁纹理（分直接销毁，跟计数销毁两种）。\n\t*@param forceDispose (default=false)true为强制销毁主纹理，false是通过计数销毁纹理。\n\t*/\n\t__proto.destroy=function(forceDispose){\n\t\t(forceDispose===void 0)&& (forceDispose=false);\n\t\tif (this.bitmap && (this.bitmap).referenceCount > 0){\n\t\t\tvar temp=this.bitmap;\n\t\t\tif (forceDispose){\n\t\t\t\tif (Render.isConchApp && temp.source && temp.source.conchDestroy){\n\t\t\t\t\tthis.bitmap.source.conchDestroy();\n\t\t\t\t}\n\t\t\t\tthis.bitmap=null;\n\t\t\t\ttemp.dispose();\n\t\t\t\t(temp)._clearReference();\n\t\t\t\t}else {\n\t\t\t\t(temp)._removeReference();\n\t\t\t\tif ((temp).referenceCount==0){\n\t\t\t\t\tif (Render.isConchApp && temp.source && temp.source.conchDestroy){\n\t\t\t\t\t\tthis.bitmap.source.conchDestroy();\n\t\t\t\t\t}\n\t\t\t\t\tthis.bitmap=null;\n\t\t\t\t\ttemp.dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.url && this===Laya.loader.getRes(this.url))Laya.loader.clearRes(this.url,forceDispose);\n\t\t\tthis._loaded=false;\n\t\t}\n\t}\n\n\t/**\n\t*加载指定地址的图片。\n\t*@param url 图片地址。\n\t*/\n\t__proto.load=function(url){\n\t\tvar _$this=this;\n\t\tthis._loaded=false;\n\t\turl=URL.customFormat(url);\n\t\tvar fileBitmap=(this.bitmap || (this.bitmap=HTMLImage.create(url)));\n\t\tif (fileBitmap)fileBitmap._addReference();\n\t\tvar _this=this;\n\t\tfileBitmap.onload=function (){\n\t\t\tfileBitmap.onload=null;\n\t\t\t_this._loaded=true;\n\t\t\t_$this.sourceWidth=_$this._w=fileBitmap.width;\n\t\t\t_$this.sourceHeight=_$this._h=fileBitmap.height;\n\t\t\t_this.event(/*laya.events.Event.LOADED*/\"loaded\",this);\n\t\t\t(RunDriver.addToAtlas)&& (RunDriver.addToAtlas(_this));\n\t\t};\n\t}\n\n\t/**@private */\n\t__proto.addTextureToAtlas=function(e){\n\t\tRunDriver.addTextureToAtlas(this);\n\t}\n\n\t/**\n\t*获取Texture上的某个区域的像素点\n\t*@param x\n\t*@param y\n\t*@param width\n\t*@param height\n\t*@return 返回像素点集合\n\t*/\n\t__proto.getPixels=function(x,y,width,height){\n\t\tif (Render.isConchApp){\n\t\t\tvar temp=this.bitmap;\n\t\t\tif (temp.source && temp.source.getImageData){\n\t\t\t\tvar arraybuffer=temp.source.getImageData(x,y,width,height);\n\t\t\t\tvar tUint8Array=new Uint8Array(arraybuffer);\n\t\t\t\treturn /*__JS__ */Array.from(tUint8Array);\n\t\t\t}\n\t\t\treturn null;\n\t\t\t}else if (Render.isWebGL){\n\t\t\treturn RunDriver.getTexturePixels(this,x,y,width,height);\n\t\t\t}else {\n\t\t\tBrowser.canvas.size(width,height);\n\t\t\tBrowser.canvas.clear();\n\t\t\tBrowser.context.drawTexture(this,-x,-y,this.width,this.height,0,0);\n\t\t\tvar info=Browser.context.getImageData(0,0,width,height);\n\t\t}\n\t\treturn info.data;\n\t}\n\n\t/**@private */\n\t__proto.onAsynLoaded=function(url,bitmap){\n\t\tif (bitmap)bitmap._addReference();\n\t\tthis.setTo(bitmap,this.uv);\n\t}\n\n\t/**激活并获取资源。*/\n\t__getset(0,__proto,'source',function(){\n\t\tif (!this.bitmap)return null;\n\t\tthis.bitmap.activeResource();\n\t\treturn this.bitmap.source;\n\t});\n\n\t/**\n\t*表示是否加载成功，只能表示初次载入成功（通常包含下载和载入）,并不能完全表示资源是否可立即使用（资源管理机制释放影响等）。\n\t*/\n\t__getset(0,__proto,'loaded',function(){\n\t\treturn this._loaded;\n\t});\n\n\t/**\n\t*表示资源是否已释放。\n\t*/\n\t__getset(0,__proto,'released',function(){\n\t\tif (!this.bitmap)return true;\n\t\treturn this.bitmap.released;\n\t});\n\n\t/**实际宽度。*/\n\t__getset(0,__proto,'width',function(){\n\t\tif (this._w)return this._w;\n\t\treturn (this.uv && this.uv!==Texture.DEF_UV)? (this.uv[2]-this.uv[0])*this.bitmap.width :this.bitmap.width;\n\t\t},function(value){\n\t\tthis._w=value;\n\t\tthis.sourceWidth || (this.sourceWidth=value);\n\t});\n\n\t/**\n\t*通过外部设置是否启用纹理平铺(后面要改成在着色器里计算)\n\t*/\n\t/**\n\t*获取当前纹理是否启用了纹理平铺\n\t*/\n\t__getset(0,__proto,'repeat',function(){\n\t\tif (Render.isWebGL && this.bitmap){\n\t\t\treturn this.bitmap.repeat;\n\t\t}\n\t\treturn true;\n\t\t},function(value){\n\t\tif (value){\n\t\t\tif (Render.isWebGL && this.bitmap){\n\t\t\t\tthis.bitmap.repeat=value;\n\t\t\t\tif (value){\n\t\t\t\t\tthis.bitmap.enableMerageInAtlas=false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t/**实际高度。*/\n\t__getset(0,__proto,'height',function(){\n\t\tif (this._h)return this._h;\n\t\treturn (this.uv && this.uv!==Texture.DEF_UV)? (this.uv[5]-this.uv[1])*this.bitmap.height :this.bitmap.height;\n\t\t},function(value){\n\t\tthis._h=value;\n\t\tthis.sourceHeight || (this.sourceHeight=value);\n\t});\n\n\t/**\n\t*设置线性采样的状态（目前只能第一次绘制前设置false生效,来关闭线性采样）。\n\t*/\n\t/**\n\t*获取当前纹理是否启用了线性采样。\n\t*/\n\t__getset(0,__proto,'isLinearSampling',function(){\n\t\treturn Render.isWebGL ? (this.bitmap.minFifter !=0x2600):true;\n\t\t},function(value){\n\t\tif (!value && Render.isWebGL){\n\t\t\tif (!value && (this.bitmap.minFifter==-1)&& (this.bitmap.magFifter==-1)){\n\t\t\t\tthis.bitmap.minFifter=0x2600;\n\t\t\t\tthis.bitmap.magFifter=0x2600;\n\t\t\t\tthis.bitmap.enableMerageInAtlas=false;\n\t\t\t}\n\t\t}\n\t});\n\n\tTexture.moveUV=function(offsetX,offsetY,uv){\n\t\tfor (var i=0;i < 8;i+=2){\n\t\t\tuv[i]+=offsetX;\n\t\t\tuv[i+1]+=offsetY;\n\t\t}\n\t\treturn uv;\n\t}\n\n\tTexture.create=function(source,x,y,width,height,offsetX,offsetY,sourceWidth,sourceHeight){\n\t\t(offsetX===void 0)&& (offsetX=0);\n\t\t(offsetY===void 0)&& (offsetY=0);\n\t\t(sourceWidth===void 0)&& (sourceWidth=0);\n\t\t(sourceHeight===void 0)&& (sourceHeight=0);\n\t\tvar btex=(source instanceof laya.resource.Texture );\n\t\tvar uv=btex ? source.uv :Texture.DEF_UV;\n\t\tvar bitmap=btex ? source.bitmap :source;\n\t\tvar bIsAtlas=RunDriver.isAtlas(bitmap);\n\t\tif (bIsAtlas){\n\t\t\tvar atlaser=bitmap._atlaser;\n\t\t\tvar nAtlasID=(source)._atlasID;\n\t\t\tif (nAtlasID==-1){\n\t\t\t\tthrow new Error(\"create texture error\");\n\t\t\t}\n\t\t\tbitmap=atlaser._inAtlasTextureBitmapValue[nAtlasID];\n\t\t\tuv=atlaser._inAtlasTextureOriUVValue[nAtlasID];\n\t\t};\n\t\tvar tex=new Texture(bitmap,null);\n\t\tif (bitmap.width && (x+width)> bitmap.width)width=bitmap.width-x;\n\t\tif (bitmap.height && (y+height)> bitmap.height)height=bitmap.height-y;\n\t\ttex.width=width;\n\t\ttex.height=height;\n\t\ttex.offsetX=offsetX;\n\t\ttex.offsetY=offsetY;\n\t\ttex.sourceWidth=sourceWidth || width;\n\t\ttex.sourceHeight=sourceHeight || height;\n\t\tvar dwidth=1 / bitmap.width;\n\t\tvar dheight=1 / bitmap.height;\n\t\tx *=dwidth;\n\t\ty *=dheight;\n\t\twidth *=dwidth;\n\t\theight *=dheight;\n\t\tvar u1=tex.uv[0],v1=tex.uv[1],u2=tex.uv[4],v2=tex.uv[5];\n\t\tvar inAltasUVWidth=(u2-u1),inAltasUVHeight=(v2-v1);\n\t\tvar oriUV=Texture.moveUV(uv[0],uv[1],[x,y,x+width,y,x+width,y+height,x,y+height]);\n\t\ttex.uv=[u1+oriUV[0] *inAltasUVWidth,v1+oriUV[1] *inAltasUVHeight,u2-(1-oriUV[2])*inAltasUVWidth,v1+oriUV[3] *inAltasUVHeight,u2-(1-oriUV[4])*inAltasUVWidth,v2-(1-oriUV[5])*inAltasUVHeight,u1+oriUV[6] *inAltasUVWidth,v2-(1-oriUV[7])*inAltasUVHeight];\n\t\tif (bIsAtlas){\n\t\t\ttex.addTextureToAtlas();\n\t\t};\n\t\tvar bitmapScale=bitmap.scaleRate;\n\t\tif (bitmapScale && bitmapScale !=1){\n\t\t\ttex.sourceWidth /=bitmapScale;\n\t\t\ttex.sourceHeight /=bitmapScale;\n\t\t\ttex.width /=bitmapScale;\n\t\t\ttex.height /=bitmapScale;\n\t\t\ttex.scaleRate=bitmapScale;\n\t\t\ttex.offsetX /=bitmapScale;\n\t\t\ttex.offsetY /=bitmapScale;\n\t\t\t}else{\n\t\t\ttex.scaleRate=1;\n\t\t}\n\t\treturn tex;\n\t}\n\n\tTexture.createFromTexture=function(texture,x,y,width,height){\n\t\tvar texScaleRate=texture.scaleRate;\n\t\tif (texScaleRate !=1){\n\t\t\tx *=texScaleRate;\n\t\t\ty *=texScaleRate;\n\t\t\twidth *=texScaleRate;\n\t\t\theight *=texScaleRate;\n\t\t};\n\t\tvar rect=Rectangle.TEMP.setTo(x-texture.offsetX,y-texture.offsetY,width,height);\n\t\tvar result=rect.intersection(Texture._rect1.setTo(0,0,texture.width,texture.height),Texture._rect2);\n\t\tif (result)\n\t\t\tvar tex=Texture.create(texture,result.x,result.y,result.width,result.height,result.x-rect.x,result.y-rect.y,width,height);\n\t\telse return null;\n\t\ttex.bitmap._removeReference();\n\t\treturn tex;\n\t}\n\n\tTexture.DEF_UV=[0,0,1.0,0,1.0,1.0,0,1.0];\n\tTexture.INV_UV=[0,1,1.0,1,1.0,0.0,0,0.0];\n\tTexture._rect1=new Rectangle();\n\tTexture._rect2=new Rectangle();\n\treturn Texture;\n})(EventDispatcher)\n\n\n/**\n*<code>TimeLine</code> 是一个用来创建时间轴动画的类。\n*/\n//class laya.utils.TimeLine extends laya.events.EventDispatcher\nvar TimeLine=(function(_super){\n\tvar tweenData;\n\tfunction TimeLine(){\n\t\tthis._labelDic=null;\n\t\tthis._tweenDic={};\n\t\tthis._tweenDataList=[];\n\t\tthis._endTweenDataList=null;\n\t\t//以结束时间进行排序\n\t\tthis._currTime=0;\n\t\tthis._lastTime=0;\n\t\tthis._startTime=0;\n\t\t/**当前动画数据播放到第几个了*/\n\t\tthis._index=0;\n\t\t/**为TWEEN创建属于自己的唯一标识，方便管理*/\n\t\tthis._gidIndex=0;\n\t\t/**保留所有对象第一次注册动画时的状态（根据时间跳转时，需要把对象的回复，再计算接下来的状态）*/\n\t\tthis._firstTweenDic={};\n\t\t/**是否需要排序*/\n\t\tthis._startTimeSort=false;\n\t\tthis._endTimeSort=false;\n\t\t/**是否循环*/\n\t\tthis._loopKey=false;\n\t\t/**缩放动画播放的速度。*/\n\t\tthis.scale=1;\n\t\tthis._frameRate=60;\n\t\tthis._frameIndex=0;\n\t\tthis._total=0;\n\t\tTimeLine.__super.call(this);\n\t}\n\n\t__class(TimeLine,'laya.utils.TimeLine',_super);\n\tvar __proto=TimeLine.prototype;\n\t/**\n\t*控制一个对象，从当前点移动到目标点。\n\t*@param target 要控制的对象。\n\t*@param props 要控制对象的属性。\n\t*@param duration 对象TWEEN的时间。\n\t*@param ease 缓动类型\n\t*@param offset 相对于上一个对象，偏移多长时间（单位：毫秒）。\n\t*/\n\t__proto.to=function(target,props,duration,ease,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\treturn this._create(target,props,duration,ease,offset,true);\n\t}\n\n\t/**\n\t*从 props 属性，缓动到当前状态。\n\t*@param target target 目标对象(即将更改属性值的对象)\n\t*@param props 要控制对象的属性\n\t*@param duration 对象TWEEN的时间\n\t*@param ease 缓动类型\n\t*@param offset 相对于上一个对象，偏移多长时间（单位：毫秒）\n\t*/\n\t__proto.from=function(target,props,duration,ease,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\treturn this._create(target,props,duration,ease,offset,false);\n\t}\n\n\t/**@private */\n\t__proto._create=function(target,props,duration,ease,offset,isTo){\n\t\tvar tTweenData=Pool.getItemByClass(\"tweenData\",tweenData);\n\t\ttTweenData.isTo=isTo;\n\t\ttTweenData.type=0;\n\t\ttTweenData.target=target;\n\t\ttTweenData.duration=duration;\n\t\ttTweenData.data=props;\n\t\ttTweenData.startTime=this._startTime+offset;\n\t\ttTweenData.endTime=tTweenData.startTime+tTweenData.duration;\n\t\ttTweenData.ease=ease;\n\t\tthis._startTime=Math.max(tTweenData.endTime,this._startTime);\n\t\tthis._tweenDataList.push(tTweenData);\n\t\tthis._startTimeSort=true;\n\t\tthis._endTimeSort=true;\n\t\treturn this;\n\t}\n\n\t/**\n\t*在时间队列中加入一个标签。\n\t*@param label 标签名称。\n\t*@param offset 标签相对于上个动画的偏移时间(单位：毫秒)。\n\t*/\n\t__proto.addLabel=function(label,offset){\n\t\tvar tTweenData=Pool.getItemByClass(\"tweenData\",tweenData);\n\t\ttTweenData.type=1;\n\t\ttTweenData.data=label;\n\t\ttTweenData.endTime=tTweenData.startTime=this._startTime+offset;\n\t\tthis._labelDic || (this._labelDic={});\n\t\tthis._labelDic[label]=tTweenData;\n\t\tthis._tweenDataList.push(tTweenData);\n\t\treturn this;\n\t}\n\n\t/**\n\t*移除指定的标签\n\t*@param label\n\t*/\n\t__proto.removeLabel=function(label){\n\t\tif (this._labelDic && this._labelDic[label]){\n\t\t\tvar tTweenData=this._labelDic[label];\n\t\t\tif (tTweenData){\n\t\t\t\tvar tIndex=this._tweenDataList.indexOf(tTweenData);\n\t\t\t\tif (tIndex >-1){\n\t\t\t\t\tthis._tweenDataList.splice(tIndex,1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete this._labelDic[label];\n\t\t}\n\t}\n\n\t/**\n\t*动画从整个动画的某一时间开始。\n\t*@param time(单位：毫秒)。\n\t*/\n\t__proto.gotoTime=function(time){\n\t\tif (this._tweenDataList==null || this._tweenDataList.length==0)return;\n\t\tvar tTween;\n\t\tvar tObject;\n\t\tfor (var p in this._firstTweenDic){\n\t\t\ttObject=this._firstTweenDic[p];\n\t\t\tif (tObject){\n\t\t\t\tfor (var tDataP in tObject){\n\t\t\t\t\tif (tObject.diyTarget.hasOwnProperty(tDataP)){\n\t\t\t\t\t\ttObject.diyTarget[tDataP]=tObject[tDataP];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (p in this._tweenDic){\n\t\t\ttTween=this._tweenDic[p];\n\t\t\ttTween.clear();\n\t\t\tdelete this._tweenDic[p];\n\t\t}\n\t\tthis._index=0;\n\t\tthis._gidIndex=0;\n\t\tthis._currTime=time;\n\t\tthis._lastTime=Browser.now();\n\t\tvar tTweenDataCopyList;\n\t\tif (this._endTweenDataList==null || this._endTimeSort){\n\t\t\tthis._endTimeSort=false;\n\t\t\tthis._endTweenDataList=tTweenDataCopyList=this._tweenDataList.concat();\n\t\t\tfunction Compare (paraA,paraB){\n\t\t\t\tif (paraA.endTime > paraB.endTime){\n\t\t\t\t\treturn 1;\n\t\t\t\t\t}else if (paraA.endTime < paraB.endTime){\n\t\t\t\t\treturn-1;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttTweenDataCopyList.sort(Compare);\n\t\t\t}else {\n\t\t\ttTweenDataCopyList=this._endTweenDataList\n\t\t};\n\t\tvar tTweenData;\n\t\tfor (var i=0,n=tTweenDataCopyList.length;i < n;i++){\n\t\t\ttTweenData=tTweenDataCopyList[i];\n\t\t\tif (tTweenData.type==0){\n\t\t\t\tif (time >=tTweenData.endTime){\n\t\t\t\t\tthis._index=Math.max(this._index,i+1);\n\t\t\t\t\tvar props=tTweenData.data;\n\t\t\t\t\tif (tTweenData.isTo){\n\t\t\t\t\t\tfor (var tP in props){\n\t\t\t\t\t\t\ttTweenData.target[tP]=props[tP];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i=0,n=this._tweenDataList.length;i < n;i++){\n\t\t\ttTweenData=this._tweenDataList[i];\n\t\t\tif (tTweenData.type==0){\n\t\t\t\tif (time >=tTweenData.startTime && time < tTweenData.endTime){\n\t\t\t\t\tthis._index=Math.max(this._index,i+1);\n\t\t\t\t\tthis._gidIndex++;\n\t\t\t\t\ttTween=Pool.getItemByClass(\"tween\",Tween);\n\t\t\t\t\ttTween._create(tTweenData.target,tTweenData.data,tTweenData.duration,tTweenData.ease,Handler.create(this,this._animComplete,[this._gidIndex]),0,false,tTweenData.isTo,true,false);\n\t\t\t\t\ttTween.setStartTime(this._currTime-(time-tTweenData.startTime));\n\t\t\t\t\ttTween._updateEase(this._currTime);\n\t\t\t\t\ttTween.gid=this._gidIndex;\n\t\t\t\t\tthis._tweenDic[this._gidIndex]=tTween;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*从指定的标签开始播。\n\t*@param Label 标签名。\n\t*/\n\t__proto.gotoLabel=function(Label){\n\t\tif (this._labelDic==null)return;\n\t\tvar tLabelData=this._labelDic[Label];\n\t\tif (tLabelData)this.gotoTime(tLabelData.startTime);\n\t}\n\n\t/**\n\t*暂停整个动画。\n\t*/\n\t__proto.pause=function(){\n\t\tLaya.timer.clear(this,this._update);\n\t}\n\n\t/**\n\t*恢复暂停动画的播放。\n\t*/\n\t__proto.resume=function(){\n\t\tthis.play(this._currTime,this._loopKey);\n\t}\n\n\t/**\n\t*播放动画。\n\t*@param timeOrLabel 开启播放的时间点或标签名。\n\t*@param loop 是否循环播放。\n\t*/\n\t__proto.play=function(timeOrLabel,loop){\n\t\t(timeOrLabel===void 0)&& (timeOrLabel=0);\n\t\t(loop===void 0)&& (loop=false);\n\t\tif (!this._tweenDataList)return;\n\t\tif (this._startTimeSort){\n\t\t\tthis._startTimeSort=false;\n\t\t\tfunction Compare (paraA,paraB){\n\t\t\t\tif (paraA.startTime > paraB.startTime){\n\t\t\t\t\treturn 1;\n\t\t\t\t\t}else if (paraA.startTime < paraB.startTime){\n\t\t\t\t\treturn-1;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._tweenDataList.sort(Compare);\n\t\t\tfor (var i=0,n=this._tweenDataList.length;i < n;i++){\n\t\t\t\tvar tTweenData=this._tweenDataList[i];\n\t\t\t\tif (tTweenData !=null && tTweenData.type==0){\n\t\t\t\t\tvar tTarget=tTweenData.target;\n\t\t\t\t\tvar gid=(tTarget.$_GID || (tTarget.$_GID=Utils.getGID()));\n\t\t\t\t\tvar tSrcData=null;\n\t\t\t\t\tif (this._firstTweenDic[gid]==null){\n\t\t\t\t\t\ttSrcData={};\n\t\t\t\t\t\ttSrcData.diyTarget=tTarget;\n\t\t\t\t\t\tthis._firstTweenDic[gid]=tSrcData;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttSrcData=this._firstTweenDic[gid];\n\t\t\t\t\t}\n\t\t\t\t\tfor (var p in tTweenData.data){\n\t\t\t\t\t\tif (tSrcData[p]==null){\n\t\t\t\t\t\t\ttSrcData[p]=tTarget[p];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ((typeof timeOrLabel=='string')){\n\t\t\tthis.gotoLabel(timeOrLabel);\n\t\t\t}else {\n\t\t\tthis.gotoTime(timeOrLabel);\n\t\t}\n\t\tthis._loopKey=loop;\n\t\tthis._lastTime=Browser.now();\n\t\tLaya.timer.frameLoop(1,this,this._update);\n\t}\n\n\t/**\n\t*更新当前动画。\n\t*/\n\t__proto._update=function(){\n\t\tif (this._currTime >=this._startTime){\n\t\t\tif (this._loopKey){\n\t\t\t\tthis._complete();\n\t\t\t\tif (!this._tweenDataList)return;\n\t\t\t\tthis.gotoTime(0);\n\t\t\t\t}else {\n\t\t\t\tfor (var p in this._tweenDic){\n\t\t\t\t\ttTween=this._tweenDic[p];\n\t\t\t\t\ttTween.complete();\n\t\t\t\t}\n\t\t\t\tthis._complete();\n\t\t\t\tthis.pause();\n\t\t\t\treturn;\n\t\t\t}\n\t\t};\n\t\tvar tNow=Browser.now();\n\t\tvar tFrameTime=tNow-this._lastTime;\n\t\tvar tCurrTime=this._currTime+=tFrameTime *this.scale;\n\t\tthis._lastTime=tNow;\n\t\tfor (p in this._tweenDic){\n\t\t\ttTween=this._tweenDic[p];\n\t\t\ttTween._updateEase(tCurrTime);\n\t\t};\n\t\tvar tTween;\n\t\tif (this._tweenDataList.length !=0 && this._index < this._tweenDataList.length){\n\t\t\tvar tTweenData=this._tweenDataList[this._index];\n\t\t\tif (tCurrTime >=tTweenData.startTime){\n\t\t\t\tthis._index++;\n\t\t\t\tif (tTweenData.type==0){\n\t\t\t\t\tthis._gidIndex++;\n\t\t\t\t\ttTween=Pool.getItemByClass(\"tween\",Tween);\n\t\t\t\t\ttTween._create(tTweenData.target,tTweenData.data,tTweenData.duration,tTweenData.ease,Handler.create(this,this._animComplete,[this._gidIndex]),0,false,tTweenData.isTo,true,false);\n\t\t\t\t\ttTween.setStartTime(tCurrTime);\n\t\t\t\t\ttTween.gid=this._gidIndex;\n\t\t\t\t\tthis._tweenDic[this._gidIndex]=tTween;\n\t\t\t\t\ttTween._updateEase(tCurrTime);\n\t\t\t\t\t}else {\n\t\t\t\t\tthis.event(/*laya.events.Event.LABEL*/\"label\",tTweenData.data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*指定的动画索引处的动画播放完成后，把此动画从列表中删除。\n\t*@param index\n\t*/\n\t__proto._animComplete=function(index){\n\t\tvar tTween=this._tweenDic[index];\n\t\tif (tTween)delete this._tweenDic[index];\n\t}\n\n\t/**@private */\n\t__proto._complete=function(){\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t}\n\n\t/**\n\t*重置所有对象，复用对象的时候使用。\n\t*/\n\t__proto.reset=function(){\n\t\tvar p;\n\t\tif (this._labelDic){\n\t\t\tfor (p in this._labelDic){\n\t\t\t\tdelete this._labelDic[p];\n\t\t\t}\n\t\t};\n\t\tvar tTween;\n\t\tfor (p in this._tweenDic){\n\t\t\ttTween=this._tweenDic[p];\n\t\t\ttTween.clear();\n\t\t\tdelete this._tweenDic[p];\n\t\t}\n\t\tfor (p in this._firstTweenDic){\n\t\t\tdelete this._firstTweenDic[p];\n\t\t}\n\t\tthis._endTweenDataList=null;\n\t\tif (this._tweenDataList && this._tweenDataList.length){\n\t\t\tvar i=0,len=0;\n\t\t\tlen=this._tweenDataList.length;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\tif(this._tweenDataList[i])\n\t\t\t\t\tthis._tweenDataList[i].destroy();\n\t\t\t}\n\t\t}\n\t\tthis._tweenDataList.length=0;\n\t\tthis._currTime=0;\n\t\tthis._lastTime=0;\n\t\tthis._startTime=0;\n\t\tthis._index=0;\n\t\tthis._gidIndex=0;\n\t\tthis.scale=1;\n\t\tLaya.timer.clear(this,this._update);\n\t}\n\n\t/**\n\t*彻底销毁此对象。\n\t*/\n\t__proto.destroy=function(){\n\t\tthis.reset();\n\t\tthis._labelDic=null;\n\t\tthis._tweenDic=null;\n\t\tthis._tweenDataList=null;\n\t\tthis._firstTweenDic=null;\n\t}\n\n\t/**\n\t*@private\n\t*设置帧索引\n\t*/\n\t/**\n\t*@private\n\t*得到帧索引\n\t*/\n\t__getset(0,__proto,'index',function(){\n\t\treturn this._frameIndex;\n\t\t},function(value){\n\t\tthis._frameIndex=value;\n\t\tthis.gotoTime(this._frameIndex / this._frameRate *1000);\n\t});\n\n\t/**\n\t*得到总帧数。\n\t*/\n\t__getset(0,__proto,'total',function(){\n\t\tthis._total=Math.floor(this._startTime / 1000 *this._frameRate);\n\t\treturn this._total;\n\t});\n\n\tTimeLine.to=function(target,props,duration,ease,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\treturn (new TimeLine()).to(target,props,duration,ease,offset);\n\t}\n\n\tTimeLine.from=function(target,props,duration,ease,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\treturn (new TimeLine()).from(target,props,duration,ease,offset);\n\t}\n\n\tTimeLine.__init$=function(){\n\t\t//class tweenData\n\t\ttweenData=(function(){\n\t\t\tfunction tweenData(){\n\t\t\t\tthis.type=0;\n\t\t\t\t//0代表TWEEN,1代表标签\n\t\t\t\tthis.isTo=true;\n\t\t\t\tthis.startTime=NaN;\n\t\t\t\tthis.endTime=NaN;\n\t\t\t\tthis.target=null;\n\t\t\t\tthis.duration=NaN;\n\t\t\t\tthis.ease=null;\n\t\t\t\tthis.data=null;\n\t\t\t}\n\t\t\t__class(tweenData,'');\n\t\t\tvar __proto=tweenData.prototype;\n\t\t\t__proto.destroy=function(){\n\t\t\t\tthis.target=null;\n\t\t\t\tthis.ease=null;\n\t\t\t\tthis.data=null;\n\t\t\t\tthis.isTo=true;\n\t\t\t\tthis.type=0;\n\t\t\t\tPool.recover(\"tweenData\",this);\n\t\t\t}\n\t\t\treturn tweenData;\n\t\t})()\n\t}\n\n\treturn TimeLine;\n})(EventDispatcher)\n\n\n/**\n*<p> <code>Sprite</code> 是基本的显示图形的显示列表节点。 <code>Sprite</code> 默认没有宽高，默认不接受鼠标事件。通过 <code>graphics</code> 可以绘制图片或者矢量图，支持旋转，缩放，位移等操作。<code>Sprite</code>同时也是容器类，可用来添加多个子节点。</p>\n*<p>注意： <code>Sprite</code> 默认没有宽高，可以通过<code>getBounds</code>函数获取；也可手动设置宽高；还可以设置<code>autoSize=true</code>，然后再获取宽高。<code>Sprite</code>的宽高一般用于进行碰撞检测和排版，并不影响显示图像大小，如果需要更改显示图像大小，请使用 <code>scaleX</code> ， <code>scaleY</code> ， <code>scale</code>。</p>\n*<p> <code>Sprite</code> 默认不接受鼠标事件，即<code>mouseEnabled=false</code>，但是只要对其监听任意鼠标事件，会自动打开自己以及所有父对象的<code>mouseEnabled=true</code>。所以一般也无需手动设置<code>mouseEnabled</code>。</p>\n*<p>LayaAir引擎API设计精简巧妙。核心显示类只有一个<code>Sprite</code>。<code>Sprite</code>针对不同的情况做了渲染优化，所以保证一个类实现丰富功能的同时，又达到高性能。</p>\n*\n*@example <caption>创建了一个 <code>Sprite</code> 实例。</caption>\n*package\n*{\n\t*import laya.display.Sprite;\n\t*import laya.events.Event;\n\t*\n\t*public class Sprite_Example\n\t*{\n\t\t*private var sprite:Sprite;\n\t\t*private var shape:Sprite\n\t\t*public function Sprite_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*onInit();\n\t\t\t*}\n\t\t*private function onInit():void\n\t\t*{\n\t\t\t*sprite=new Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n\t\t\t*sprite.loadImage(\"resource/ui/bg.png\");//加载并显示图片。\n\t\t\t*sprite.x=200;//设置 sprite 对象相对于父容器的水平方向坐标值。\n\t\t\t*sprite.y=200;//设置 sprite 对象相对于父容器的垂直方向坐标值。\n\t\t\t*sprite.pivotX=0;//设置 sprite 对象的水平方法轴心点坐标。\n\t\t\t*sprite.pivotY=0;//设置 sprite 对象的垂直方法轴心点坐标。\n\t\t\t*Laya.stage.addChild(sprite);//将此 sprite 对象添加到显示列表。\n\t\t\t*sprite.on(Event.CLICK,this,onClickSprite);//给 sprite 对象添加点击事件侦听。\n\t\t\t*shape=new Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n\t\t\t*shape.graphics.drawRect(0,0,100,100,\"#ccff00\",\"#ff0000\",2);//绘制一个有边框的填充矩形。\n\t\t\t*shape.x=400;//设置 shape 对象相对于父容器的水平方向坐标值。\n\t\t\t*shape.y=200;//设置 shape 对象相对于父容器的垂直方向坐标值。\n\t\t\t*shape.width=100;//设置 shape 对象的宽度。\n\t\t\t*shape.height=100;//设置 shape 对象的高度。\n\t\t\t*shape.pivotX=50;//设置 shape 对象的水平方法轴心点坐标。\n\t\t\t*shape.pivotY=50;//设置 shape 对象的垂直方法轴心点坐标。\n\t\t\t*Laya.stage.addChild(shape);//将此 shape 对象添加到显示列表。\n\t\t\t*shape.on(Event.CLICK,this,onClickShape);//给 shape 对象添加点击事件侦听。\n\t\t\t*}\n\t\t*private function onClickSprite():void\n\t\t*{\n\t\t\t*trace(\"点击 sprite 对象。\");\n\t\t\t*sprite.rotation+=5;//旋转 sprite 对象。\n\t\t\t*}\n\t\t*private function onClickShape():void\n\t\t*{\n\t\t\t*trace(\"点击 shape 对象。\");\n\t\t\t*shape.rotation+=5;//旋转 shape 对象。\n\t\t\t*}\n\t\t*}\n\t*}\n*\n*@example\n*var sprite;\n*var shape;\n*Sprite_Example();\n*function Sprite_Example()\n*{\n\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t*onInit();\n\t*}\n*function onInit()\n*{\n\t*sprite=new laya.display.Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n\t*sprite.loadImage(\"resource/ui/bg.png\");//加载并显示图片。\n\t*sprite.x=200;//设置 sprite 对象相对于父容器的水平方向坐标值。\n\t*sprite.y=200;//设置 sprite 对象相对于父容器的垂直方向坐标值。\n\t*sprite.pivotX=0;//设置 sprite 对象的水平方法轴心点坐标。\n\t*sprite.pivotY=0;//设置 sprite 对象的垂直方法轴心点坐标。\n\t*Laya.stage.addChild(sprite);//将此 sprite 对象添加到显示列表。\n\t*sprite.on(Event.CLICK,this,onClickSprite);//给 sprite 对象添加点击事件侦听。\n\t*shape=new laya.display.Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n\t*shape.graphics.drawRect(0,0,100,100,\"#ccff00\",\"#ff0000\",2);//绘制一个有边框的填充矩形。\n\t*shape.x=400;//设置 shape 对象相对于父容器的水平方向坐标值。\n\t*shape.y=200;//设置 shape 对象相对于父容器的垂直方向坐标值。\n\t*shape.width=100;//设置 shape 对象的宽度。\n\t*shape.height=100;//设置 shape 对象的高度。\n\t*shape.pivotX=50;//设置 shape 对象的水平方法轴心点坐标。\n\t*shape.pivotY=50;//设置 shape 对象的垂直方法轴心点坐标。\n\t*Laya.stage.addChild(shape);//将此 shape 对象添加到显示列表。\n\t*shape.on(laya.events.Event.CLICK,this,onClickShape);//给 shape 对象添加点击事件侦听。\n\t*}\n*function onClickSprite()\n*{\n\t*console.log(\"点击 sprite 对象。\");\n\t*sprite.rotation+=5;//旋转 sprite 对象。\n\t*}\n*function onClickShape()\n*{\n\t*console.log(\"点击 shape 对象。\");\n\t*shape.rotation+=5;//旋转 shape 对象。\n\t*}\n*\n*@example\n*import Sprite=laya.display.Sprite;\n*class Sprite_Example {\n\t*private sprite:Sprite;\n\t*private shape:Sprite\n\t*public Sprite_Example(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*this.onInit();\n\t\t*}\n\t*private onInit():void {\n\t\t*this.sprite=new Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n\t\t*this.sprite.loadImage(\"resource/ui/bg.png\");//加载并显示图片。\n\t\t*this.sprite.x=200;//设置 sprite 对象相对于父容器的水平方向坐标值。\n\t\t*this.sprite.y=200;//设置 sprite 对象相对于父容器的垂直方向坐标值。\n\t\t*this.sprite.pivotX=0;//设置 sprite 对象的水平方法轴心点坐标。\n\t\t*this.sprite.pivotY=0;//设置 sprite 对象的垂直方法轴心点坐标。\n\t\t*Laya.stage.addChild(this.sprite);//将此 sprite 对象添加到显示列表。\n\t\t*this.sprite.on(laya.events.Event.CLICK,this,this.onClickSprite);//给 sprite 对象添加点击事件侦听。\n\t\t*this.shape=new Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n\t\t*this.shape.graphics.drawRect(0,0,100,100,\"#ccff00\",\"#ff0000\",2);//绘制一个有边框的填充矩形。\n\t\t*this.shape.x=400;//设置 shape 对象相对于父容器的水平方向坐标值。\n\t\t*this.shape.y=200;//设置 shape 对象相对于父容器的垂直方向坐标值。\n\t\t*this.shape.width=100;//设置 shape 对象的宽度。\n\t\t*this.shape.height=100;//设置 shape 对象的高度。\n\t\t*this.shape.pivotX=50;//设置 shape 对象的水平方法轴心点坐标。\n\t\t*this.shape.pivotY=50;//设置 shape 对象的垂直方法轴心点坐标。\n\t\t*Laya.stage.addChild(this.shape);//将此 shape 对象添加到显示列表。\n\t\t*this.shape.on(laya.events.Event.CLICK,this,this.onClickShape);//给 shape 对象添加点击事件侦听。\n\t\t*}\n\t*private onClickSprite():void {\n\t\t*console.log(\"点击 sprite 对象。\");\n\t\t*this.sprite.rotation+=5;//旋转 sprite 对象。\n\t\t*}\n\t*private onClickShape():void {\n\t\t*console.log(\"点击 shape 对象。\");\n\t\t*this.shape.rotation+=5;//旋转 shape 对象。\n\t\t*}\n\t*}\n*/\n//class laya.display.Sprite extends laya.display.Node\nvar Sprite=(function(_super){\n\tfunction Sprite(){\n\t\t/**@private 矩阵变换信息。*/\n\t\tthis._transform=null;\n\t\t/**@private */\n\t\tthis._tfChanged=false;\n\t\t/**@private */\n\t\tthis._x=0;\n\t\t/**@private */\n\t\tthis._y=0;\n\t\t/**@private */\n\t\tthis._width=0;\n\t\t/**@private */\n\t\tthis._height=0;\n\t\t/**@private */\n\t\tthis._repaint=1;\n\t\t/**@private 鼠标状态，0:auto,1:mouseEnabled=false,2:mouseEnabled=true。*/\n\t\tthis._mouseEnableState=0;\n\t\t/**@private Z排序，数值越大越靠前。*/\n\t\tthis._zOrder=0;\n\t\t/**@private */\n\t\tthis._graphics=null;\n\t\t/**@private */\n\t\tthis._renderType=0;\n\t\t/**@private */\n\t\tthis._optimizeScrollRect=false;\n\t\t/**@private */\n\t\tthis._texture=null;\n\t\t/**\n\t\t*<p>鼠标事件与此对象的碰撞检测是否可穿透。碰撞检测发生在鼠标事件的捕获阶段，此阶段引擎会从stage开始递归检测stage及其子对象，直到找到命中的目标对象或者未命中任何对象。</p>\n\t\t*<p>穿透表示鼠标事件发生的位置处于本对象绘图区域内时，才算命中，而与对象宽高和值为Rectangle对象的hitArea属性无关。如果sprite.hitArea值是HitArea对象，表示显式声明了此对象的鼠标事件响应区域，而忽略对象的宽高、mouseThrough属性。</p>\n\t\t*<p>影响对象鼠标事件响应区域的属性为：width、height、hitArea，优先级顺序为：hitArea(type:HitArea)>hitArea(type:Rectangle)>width/height。</p>\n\t\t*@default false 不可穿透，此对象的鼠标响应区域由width、height、hitArea属性决定。</p>\n\t\t*/\n\t\tthis.mouseThrough=false;\n\t\t/**\n\t\t*<p>指定是否自动计算宽高数据。默认值为 false 。</p>\n\t\t*<p>Sprite宽高默认为0，并且不会随着绘制内容的变化而变化，如果想根据绘制内容获取宽高，可以设置本属性为true，或者通过getBounds方法获取。设置为true，对性能有一定影响。</p>\n\t\t*/\n\t\tthis.autoSize=false;\n\t\t/**\n\t\t*<p>指定鼠标事件检测是优先检测自身，还是优先检测其子对象。鼠标事件检测发生在鼠标事件的捕获阶段，此阶段引擎会从stage开始递归检测stage及其子对象，直到找到命中的目标对象或者未命中任何对象。</p>\n\t\t*<p>如果为false，优先检测子对象，当有子对象被命中时，中断检测，获得命中目标。如果未命中任何子对象，最后再检测此对象；如果为true，则优先检测本对象，如果本对象没有被命中，直接中断检测，表示没有命中目标；如果本对象被命中，则进一步递归检测其子对象，以确认最终的命中目标。</p>\n\t\t*<p>合理使用本属性，能减少鼠标事件检测的节点，提高性能。可以设置为true的情况：开发者并不关心此节点的子节点的鼠标事件检测结果，也就是以此节点作为其子节点的鼠标事件检测依据。</p>\n\t\t*<p>Stage对象和UI的View组件默认为true。</p>\n\t\t*@default false 优先检测此对象的子对象，当递归检测完所有子对象后，仍然没有找到目标对象，最后再检测此对象。\n\t\t*/\n\t\tthis.hitTestPrior=false;\n\t\t/**\n\t\t*<p>视口大小，视口外的子对象，将不被渲染(如果想实现裁剪效果，请使用srollRect)，合理使用能提高渲染性能。比如由一个个小图片拼成的地图块，viewport外面的小图片将不渲染</p>\n\t\t*<p>srollRect和viewport的区别：<br/>\n\t\t*1. srollRect自带裁剪效果，viewport只影响子对象渲染是否渲染，不具有裁剪效果（性能更高）。<br/>\n\t\t*2. 设置rect的x,y属性均能实现区域滚动效果，但scrollRect会保持0,0点位置不变。</p>\n\t\t*@default null\n\t\t*/\n\t\tthis.viewport=null;\n\t\tSprite.__super.call(this);\n\t\tthis._style=Style.EMPTY;\n\t}\n\n\t__class(Sprite,'laya.display.Sprite',_super);\n\tvar __proto=Sprite.prototype;\n\tLaya.imps(__proto,{\"laya.display.ILayout\":true})\n\t/**@private */\n\t__proto.createConchModel=function(){\n\t\treturn /*__JS__ */new ConchNode();\n\t}\n\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tthis._releaseMem();\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._style && this._style.destroy();\n\t\tthis._transform && this._transform.destroy();\n\t\tthis._transform=null;\n\t\tthis._style=null;\n\t\tthis._graphics=null;\n\t}\n\n\t/**根据zOrder进行重新排序。*/\n\t__proto.updateZOrder=function(){\n\t\tUtils.updateOrder(this._childs)&& this.repaint();\n\t}\n\n\t/**在设置cacheAs的情况下，调用此方法会重新刷新缓存。*/\n\t__proto.reCache=function(){\n\t\tif (this._$P.cacheCanvas)this._$P.cacheCanvas.reCache=true;\n\t\tthis._repaint=1;\n\t}\n\n\t/**\n\t*<p>设置对象在自身坐标系下的边界范围。与 <code>getSelfBounds</code> 对应。当 autoSize==true 时，会影响对象宽高。设置后，当需要获取自身边界范围时，就不再需要计算，合理使用能提高性能。比如 <code>getBounds</code> 会优先使用 <code>setBounds</code> 指定的值，如果没有指定则进行计算，此计算会对性能消耗比较大。</p>\n\t*<p><b>注意：</b> <code>setBounds</code> 与 <code>getBounds</code> 并非对应相等关系， <code>getBounds</code> 获取的是本对象在父容器坐标系下的边界范围，通过设置 <code>setBounds</code> 会影响 <code>getBounds</code> 的结果。</p>\n\t*@param bound bounds矩形区域\n\t*/\n\t__proto.setBounds=function(bound){\n\t\tthis._set$P(\"uBounds\",bound);\n\t}\n\n\t/**\n\t*<p>获取本对象在父容器坐标系的矩形显示区域。</p>\n\t*<p><b>注意：</b> 1.计算量较大，尽量少用，如果需要频繁使用，可以通过手动设置 <code>setBounds</code> 来缓存自身边界信息，从而避免比较消耗性能的计算。2. <code>setBounds</code> 与 <code>getBounds</code> 并非对应相等关系， <code>getBounds</code> 获取的是本对象在父容器坐标系下的边界范围，通过设置 <code>setBounds</code> 会影响 <code>getBounds</code> 的结果。</p>\n\t*@return 矩形区域。\n\t*/\n\t__proto.getBounds=function(){\n\t\tif (!this._$P.mBounds)this._set$P(\"mBounds\",new Rectangle());\n\t\treturn Rectangle._getWrapRec(this._boundPointsToParent(),this._$P.mBounds);\n\t}\n\n\t/**\n\t*获取对象在自身坐标系的边界范围。与 <code>setBounds</code> 对应。\n\t*<p><b>注意：</b>计算量较大，尽量少用，如果需要频繁使用，可以提前手动设置 <code>setBounds</code> 来缓存自身边界信息，从而避免比较消耗性能的计算。</p>\n\t*@return 矩形区域。\n\t*/\n\t__proto.getSelfBounds=function(){\n\t\tif (this._$P.uBounds)return this._$P.uBounds;\n\t\tif (!this._$P.mBounds)this._set$P(\"mBounds\",new Rectangle());\n\t\treturn Rectangle._getWrapRec(this._getBoundPointsM(false),this._$P.mBounds);\n\t}\n\n\t/**\n\t*@private\n\t*获取本对象在父容器坐标系的显示区域多边形顶点列表。\n\t*当显示对象链中有旋转时，返回多边形顶点列表，无旋转时返回矩形的四个顶点。\n\t*@param ifRotate （可选）之前的对象链中是否有旋转。\n\t*@return 顶点列表。结构：[x1,y1,x2,y2,x3,y3,...]。\n\t*/\n\t__proto._boundPointsToParent=function(ifRotate){\n\t\t(ifRotate===void 0)&& (ifRotate=false);\n\t\tvar pX=0,pY=0;\n\t\tif (this._style){\n\t\t\tpX=this._style._tf.translateX;\n\t\t\tpY=this._style._tf.translateY;\n\t\t\tifRotate=ifRotate || (this._style._tf.rotate!==0);\n\t\t\tif (this._style.scrollRect){\n\t\t\t\tpX+=this._style.scrollRect.x;\n\t\t\t\tpY+=this._style.scrollRect.y;\n\t\t\t}\n\t\t};\n\t\tvar pList=this._getBoundPointsM(ifRotate);\n\t\tif (!pList || pList.length < 1)return pList;\n\t\tif (pList.length !=8){\n\t\t\tpList=ifRotate ? GrahamScan.scanPList(pList):Rectangle._getWrapRec(pList,Rectangle.TEMP)._getBoundPoints();\n\t\t}\n\t\tif (!this.transform){\n\t\t\tUtils.transPointList(pList,this._x-pX,this._y-pY);\n\t\t\treturn pList;\n\t\t};\n\t\tvar tPoint=Point.TEMP;\n\t\tvar i=0,len=pList.length;\n\t\tfor (i=0;i < len;i+=2){\n\t\t\ttPoint.x=pList[i];\n\t\t\ttPoint.y=pList[i+1];\n\t\t\tthis.toParentPoint(tPoint);\n\t\t\tpList[i]=tPoint.x;\n\t\t\tpList[i+1]=tPoint.y;\n\t\t}\n\t\treturn pList;\n\t}\n\n\t/**\n\t*返回此实例中的绘图对象（ <code>Graphics</code> ）的显示区域，不包括子对象。\n\t*@param realSize （可选）使用图片的真实大小，默认为false\n\t*@return 一个 Rectangle 对象，表示获取到的显示区域。\n\t*/\n\t__proto.getGraphicBounds=function(realSize){\n\t\t(realSize===void 0)&& (realSize=false);\n\t\tif (!this._graphics)return Rectangle.TEMP.setTo(0,0,0,0);\n\t\treturn this._graphics.getBounds(realSize);\n\t}\n\n\t/**\n\t*@private\n\t*获取自己坐标系的显示区域多边形顶点列表\n\t*@param ifRotate （可选）当前的显示对象链是否由旋转\n\t*@return 顶点列表。结构：[x1,y1,x2,y2,x3,y3,...]。\n\t*/\n\t__proto._getBoundPointsM=function(ifRotate){\n\t\t(ifRotate===void 0)&& (ifRotate=false);\n\t\tif (this._$P.uBounds)return this._$P.uBounds._getBoundPoints();\n\t\tif (!this._$P.temBM)this._set$P(\"temBM\",[]);\n\t\tif (this.scrollRect){\n\t\t\tvar rst=Utils.clearArray(this._$P.temBM);\n\t\t\tvar rec=Rectangle.TEMP;\n\t\t\trec.copyFrom(this.scrollRect);\n\t\t\tUtils.concatArray(rst,rec._getBoundPoints());\n\t\t\treturn rst;\n\t\t};\n\t\tvar pList=this._graphics ? this._graphics.getBoundPoints():Utils.clearArray(this._$P.temBM);\n\t\tvar child;\n\t\tvar cList;\n\t\tvar __childs;\n\t\t__childs=this._childs;\n\t\tfor (var i=0,n=__childs.length;i < n;i++){\n\t\t\tchild=__childs [i];\n\t\t\tif ((child instanceof laya.display.Sprite )&& child.visible==true){\n\t\t\t\tcList=child._boundPointsToParent(ifRotate);\n\t\t\t\tif (cList)\n\t\t\t\t\tpList=pList ? Utils.concatArray(pList,cList):cList;\n\t\t\t}\n\t\t}\n\t\treturn pList;\n\t}\n\n\t/**\n\t*@private\n\t*获取样式。\n\t*@return 样式 Style 。\n\t*/\n\t__proto.getStyle=function(){\n\t\tthis._style===Style.EMPTY && (this._style=new Style());\n\t\treturn this._style;\n\t}\n\n\t/**\n\t*@private\n\t*设置样式。\n\t*@param value 样式。\n\t*/\n\t__proto.setStyle=function(value){\n\t\tthis._style=value;\n\t}\n\n\t/**@private */\n\t__proto._adjustTransform=function(){\n\t\tthis._tfChanged=false;\n\t\tvar style=this._style;\n\t\tvar tf=style._tf;\n\t\tvar sx=tf.scaleX,sy=tf.scaleY;\n\t\tvar m;\n\t\tif (tf.rotate || sx!==1 || sy!==1 || tf.skewX || tf.skewY){\n\t\t\tm=this._transform || (this._transform=Matrix.create());\n\t\t\tm.bTransform=true;\n\t\t\tvar skx=(tf.rotate-tf.skewX)*0.0174532922222222;\n\t\t\tvar sky=(tf.rotate+tf.skewY)*0.0174532922222222;\n\t\t\tvar cx=Math.cos(sky);\n\t\t\tvar ssx=Math.sin(sky);\n\t\t\tvar cy=Math.sin(skx);\n\t\t\tvar ssy=Math.cos(skx);\n\t\t\tm.a=sx *cx;\n\t\t\tm.b=sx *ssx;\n\t\t\tm.c=-sy *cy;\n\t\t\tm.d=sy *ssy;\n\t\t\tm.tx=m.ty=0;\n\t\t\treturn m;\n\t\t\t}else {\n\t\t\tthis._transform && this._transform.destroy();\n\t\t\tthis._transform=null;\n\t\t\tthis._renderType &=~ /*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\t}\n\t\treturn m;\n\t}\n\n\t/**\n\t*<p>设置坐标位置。相当于分别设置x和y属性。</p>\n\t*<p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.pos(...).scale(...);</p>\n\t*@param x X轴坐标。\n\t*@param y Y轴坐标。\n\t*@param speedMode （可选）是否极速模式，正常是调用this.x=value进行赋值，极速模式直接调用内部函数处理，如果未重写x,y属性，建议设置为急速模式性能更高。\n\t*@return 返回对象本身。\n\t*/\n\t__proto.pos=function(x,y,speedMode){\n\t\t(speedMode===void 0)&& (speedMode=false);\n\t\tif (this._x!==x || this._y!==y){\n\t\t\tif (this.destroyed)return this;\n\t\t\tif (speedMode){\n\t\t\t\tthis._x=x;\n\t\t\t\tthis._y=y;\n\t\t\t\tthis.conchModel && this.conchModel.pos(this._x,this._y);\n\t\t\t\tvar p=this._parent;\n\t\t\t\tif (p && p._repaint===0){\n\t\t\t\t\tp._repaint=1;\n\t\t\t\t\tp.parentRepaint();\n\t\t\t\t}\n\t\t\t\tif (this._$P.maskParent && this._$P.maskParent._repaint===0){\n\t\t\t\t\tthis._$P.maskParent._repaint=1;\n\t\t\t\t\tthis._$P.maskParent.parentRepaint();\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tthis.x=x;\n\t\t\t\tthis.y=y;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*<p>设置轴心点。相当于分别设置pivotX和pivotY属性。</p>\n\t*<p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.pivot(...).pos(...);</p>\n\t*@param x X轴心点。\n\t*@param y Y轴心点。\n\t*@return 返回对象本身。\n\t*/\n\t__proto.pivot=function(x,y){\n\t\tthis.pivotX=x;\n\t\tthis.pivotY=y;\n\t\treturn this;\n\t}\n\n\t/**\n\t*<p>设置宽高。相当于分别设置width和height属性。</p>\n\t*<p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.size(...).pos(...);</p>\n\t*@param width 宽度值。\n\t*@param hegiht 高度值。\n\t*@return 返回对象本身。\n\t*/\n\t__proto.size=function(width,height){\n\t\tthis.width=width;\n\t\tthis.height=height;\n\t\treturn this;\n\t}\n\n\t/**\n\t*<p>设置缩放。相当于分别设置scaleX和scaleY属性。</p>\n\t*<p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.scale(...).pos(...);</p>\n\t*@param scaleX X轴缩放比例。\n\t*@param scaleY Y轴缩放比例。\n\t*@param speedMode （可选）是否极速模式，正常是调用this.scaleX=value进行赋值，极速模式直接调用内部函数处理，如果未重写scaleX,scaleY属性，建议设置为急速模式性能更高。\n\t*@return 返回对象本身。\n\t*/\n\t__proto.scale=function(scaleX,scaleY,speedMode){\n\t\t(speedMode===void 0)&& (speedMode=false);\n\t\tvar style=this.getStyle();\n\t\tvar _tf=style._tf;\n\t\tif (_tf.scaleX !=scaleX || _tf.scaleY !=scaleY){\n\t\t\tif (this.destroyed)return this;\n\t\t\tif (speedMode){\n\t\t\t\tstyle.setScale(scaleX,scaleY);\n\t\t\t\tthis._tfChanged=true;\n\t\t\t\tthis.conchModel && this.conchModel.scale(scaleX,scaleY);\n\t\t\t\tthis._renderType |=/*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\t\t\tvar p=this._parent;\n\t\t\t\tif (p && p._repaint===0){\n\t\t\t\t\tp._repaint=1;\n\t\t\t\t\tp.parentRepaint();\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tthis.scaleX=scaleX;\n\t\t\t\tthis.scaleY=scaleY;\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*<p>设置倾斜角度。相当于分别设置skewX和skewY属性。</p>\n\t*<p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.skew(...).pos(...);</p>\n\t*@param skewX 水平倾斜角度。\n\t*@param skewY 垂直倾斜角度。\n\t*@return 返回对象本身\n\t*/\n\t__proto.skew=function(skewX,skewY){\n\t\tthis.skewX=skewX;\n\t\tthis.skewY=skewY;\n\t\treturn this;\n\t}\n\n\t/**\n\t*更新、呈现显示对象。由系统调用。\n\t*@param context 渲染的上下文引用。\n\t*@param x X轴坐标。\n\t*@param y Y轴坐标。\n\t*/\n\t__proto.render=function(context,x,y){\n\t\tStat.spriteCount++;\n\t\tRenderSprite.renders[this._renderType]._fun(this,context,x+this._x,y+this._y);\n\t\tthis._repaint=0;\n\t}\n\n\t/**\n\t*<p>绘制 当前<code>Sprite</code> 到 <code>Canvas</code> 上，并返回一个HtmlCanvas。</p>\n\t*<p>绘制的结果可以当作图片源，再次绘制到其他Sprite里面，示例：</p>\n\t*\n\t*var htmlCanvas:HTMLCanvas=sprite.drawToCanvas(100,100,0,0);//把精灵绘制到canvas上面\n\t*var texture:Texture=new Texture(htmlCanvas);//使用htmlCanvas创建Texture\n\t*var sp:Sprite=new Sprite().pos(0,200);//创建精灵并把它放倒200位置\n\t*sp.graphics.drawTexture(texture);//把截图绘制到精灵上\n\t*Laya.stage.addChild(sp);//把精灵显示到舞台\n\t*\n\t*<p>也可以获取原始图片数据，分享到网上，从而实现截图效果，示例：</p>\n\t*\n\t*var htmlCanvas:HTMLCanvas=sprite.drawToCanvas(100,100,0,0);//把精灵绘制到canvas上面\n\t*\n\t*htmlCanvas.toBase64(\"image/png\",0.92,function(base64){//webgl和canvas模式下为同步方法，加速器下是异步方法\n\t\t*trace(base64);//打印图片base64信息，可以发给服务器或者保存为图片\n\t\t*});\n\t*\n\t*@param canvasWidth 画布宽度。\n\t*@param canvasHeight 画布高度。\n\t*@param x 绘制的 X 轴偏移量。\n\t*@param y 绘制的 Y 轴偏移量。\n\t*@return HTMLCanvas 对象。\n\t*/\n\t__proto.drawToCanvas=function(canvasWidth,canvasHeight,offsetX,offsetY){\n\t\tif (Render.isConchNode){\n\t\t\tvar canvas=HTMLCanvas.create(\"2D\");\n\t\t\tvar context=new RenderContext(canvasWidth,canvasHeight,canvas);\n\t\t\tcontext.ctx.setCanvasType(1);\n\t\t\tthis.conchModel.drawToCanvas(canvas.source,offsetX,offsetY);\n\t\t\treturn canvas;\n\t\t\t}else {\n\t\t\treturn RunDriver.drawToCanvas(this,this._renderType,canvasWidth,canvasHeight,offsetX,offsetY);\n\t\t}\n\t}\n\n\t/**\n\t*<p>自定义更新、呈现显示对象。一般用来扩展渲染模式，请合理使用，可能会导致在加速器上无法渲染。</p>\n\t*<p><b>注意</b>不要在此函数内增加或删除树节点，否则会对树节点遍历造成影响。</p>\n\t*@param context 渲染的上下文引用。\n\t*@param x X轴坐标。\n\t*@param y Y轴坐标。\n\t*/\n\t__proto.customRender=function(context,x,y){\n\t\tthis._renderType |=/*laya.renders.RenderSprite.CUSTOM*/0x400;\n\t}\n\n\t/**\n\t*@private\n\t*应用滤镜。\n\t*/\n\t__proto._applyFilters=function(){\n\t\tif (Render.isWebGL)return;\n\t\tvar _filters;\n\t\t_filters=this._$P.filters;\n\t\tif (!_filters || _filters.length < 1)return;\n\t\tfor (var i=0,n=_filters.length;i < n;i++){\n\t\t\t_filters[i].action.apply(this._$P.cacheCanvas);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*查看当前原件中是否包含发光滤镜。\n\t*@return 一个 Boolean 值，表示当前原件中是否包含发光滤镜。\n\t*/\n\t__proto._isHaveGlowFilter=function(){\n\t\tvar i=0,len=0;\n\t\tif (this.filters){\n\t\t\tfor (i=0;i < this.filters.length;i++){\n\t\t\t\tif (this.filters[i].type==/*laya.filters.Filter.GLOW*/0x08){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i=0,len=this._childs.length;i < len;i++){\n\t\t\tif (this._childs[i]._isHaveGlowFilter()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*把本地坐标转换为相对stage的全局坐标。\n\t*@param point 本地坐标点。\n\t*@param createNewPoint （可选）是否创建一个新的Point对象作为返回值，默认为false，使用输入的point对象返回，减少对象创建开销。\n\t*@return 转换后的坐标的点。\n\t*/\n\t__proto.localToGlobal=function(point,createNewPoint){\n\t\t(createNewPoint===void 0)&& (createNewPoint=false);\n\t\tif (createNewPoint===true){\n\t\t\tpoint=new Point(point.x,point.y);\n\t\t};\n\t\tvar ele=this;\n\t\twhile (ele){\n\t\t\tif (ele==Laya.stage)break ;\n\t\t\tpoint=ele.toParentPoint(point);\n\t\t\tele=ele.parent;\n\t\t}\n\t\treturn point;\n\t}\n\n\t/**\n\t*把stage的全局坐标转换为本地坐标。\n\t*@param point 全局坐标点。\n\t*@param createNewPoint （可选）是否创建一个新的Point对象作为返回值，默认为false，使用输入的point对象返回，减少对象创建开销。\n\t*@return 转换后的坐标的点。\n\t*/\n\t__proto.globalToLocal=function(point,createNewPoint){\n\t\t(createNewPoint===void 0)&& (createNewPoint=false);\n\t\tif (createNewPoint){\n\t\t\tpoint=new Point(point.x,point.y);\n\t\t};\n\t\tvar ele=this;\n\t\tvar list=[];\n\t\twhile (ele){\n\t\t\tif (ele==Laya.stage)break ;\n\t\t\tlist.push(ele);\n\t\t\tele=ele.parent;\n\t\t};\n\t\tvar i=list.length-1;\n\t\twhile (i >=0){\n\t\t\tele=list[i];\n\t\t\tpoint=ele.fromParentPoint(point);\n\t\t\ti--;\n\t\t}\n\t\treturn point;\n\t}\n\n\t/**\n\t*将本地坐标系坐标转转换到父容器坐标系。\n\t*@param point 本地坐标点。\n\t*@return 转换后的点。\n\t*/\n\t__proto.toParentPoint=function(point){\n\t\tif (!point)return point;\n\t\tpoint.x-=this.pivotX;\n\t\tpoint.y-=this.pivotY;\n\t\tif (this.transform){\n\t\t\tthis._transform.transformPoint(point);\n\t\t}\n\t\tpoint.x+=this._x;\n\t\tpoint.y+=this._y;\n\t\tvar scroll=this._style.scrollRect;\n\t\tif (scroll){\n\t\t\tpoint.x-=scroll.x;\n\t\t\tpoint.y-=scroll.y;\n\t\t}\n\t\treturn point;\n\t}\n\n\t/**\n\t*将父容器坐标系坐标转换到本地坐标系。\n\t*@param point 父容器坐标点。\n\t*@return 转换后的点。\n\t*/\n\t__proto.fromParentPoint=function(point){\n\t\tif (!point)return point;\n\t\tpoint.x-=this._x;\n\t\tpoint.y-=this._y;\n\t\tvar scroll=this._style.scrollRect;\n\t\tif (scroll){\n\t\t\tpoint.x+=scroll.x;\n\t\t\tpoint.y+=scroll.y;\n\t\t}\n\t\tif (this.transform){\n\t\t\tthis._transform.invertTransformPoint(point);\n\t\t}\n\t\tpoint.x+=this.pivotX;\n\t\tpoint.y+=this.pivotY;\n\t\treturn point;\n\t}\n\n\t/**\n\t*<p>增加事件侦听器，以使侦听器能够接收事件通知。</p>\n\t*<p>如果侦听鼠标事件，则会自动设置自己和父亲节点的属性 mouseEnabled 的值为 true(如果父节点mouseEnabled=false，则停止设置父节点mouseEnabled属性)。</p>\n\t*@param type 事件的类型。\n\t*@param caller 事件侦听函数的执行域。\n\t*@param listener 事件侦听函数。\n\t*@param args （可选）事件侦听函数的回调参数。\n\t*@return 此 EventDispatcher 对象。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\tif (this._mouseEnableState!==1 && this.isMouseEvent(type)){\n\t\t\tthis.mouseEnabled=true;\n\t\t\tthis._setBit(/*laya.display.Node.MOUSEENABLE*/0x2,true);\n\t\t\tif (this._parent){\n\t\t\t\tthis._$2__onDisplay();\n\t\t\t}\n\t\t\treturn this._createListener(type,caller,listener,args,false);\n\t\t}\n\t\treturn _super.prototype.on.call(this,type,caller,listener,args);\n\t}\n\n\t/**\n\t*<p>增加事件侦听器，以使侦听器能够接收事件通知，此侦听事件响应一次后则自动移除侦听。</p>\n\t*<p>如果侦听鼠标事件，则会自动设置自己和父亲节点的属性 mouseEnabled 的值为 true(如果父节点mouseEnabled=false，则停止设置父节点mouseEnabled属性)。</p>\n\t*@param type 事件的类型。\n\t*@param caller 事件侦听函数的执行域。\n\t*@param listener 事件侦听函数。\n\t*@param args （可选）事件侦听函数的回调参数。\n\t*@return 此 EventDispatcher 对象。\n\t*/\n\t__proto.once=function(type,caller,listener,args){\n\t\tif (this._mouseEnableState!==1 && this.isMouseEvent(type)){\n\t\t\tthis.mouseEnabled=true;\n\t\t\tthis._setBit(/*laya.display.Node.MOUSEENABLE*/0x2,true);\n\t\t\tif (this._parent){\n\t\t\t\tthis._$2__onDisplay();\n\t\t\t}\n\t\t\treturn this._createListener(type,caller,listener,args,true);\n\t\t}\n\t\treturn _super.prototype.once.call(this,type,caller,listener,args);\n\t}\n\n\t/**@private */\n\t__proto._$2__onDisplay=function(){\n\t\tif (this._mouseEnableState!==1){\n\t\t\tvar ele=this;\n\t\t\tele=ele.parent;\n\t\t\twhile (ele && ele._mouseEnableState!==1){\n\t\t\t\tif (ele._getBit(/*laya.display.Node.MOUSEENABLE*/0x2))break ;\n\t\t\t\tele.mouseEnabled=true;\n\t\t\t\tele._setBit(/*laya.display.Node.MOUSEENABLE*/0x2,true);\n\t\t\t\tele=ele.parent;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*<p>加载并显示一个图片。功能等同于graphics.loadImage方法。支持异步加载。</p>\n\t*<p>注意：多次调用loadImage绘制不同的图片，会同时显示。</p>\n\t*@param url 图片地址。\n\t*@param x （可选）显示图片的x位置。\n\t*@param y （可选）显示图片的y位置。\n\t*@param width （可选）显示图片的宽度，设置为0表示使用图片默认宽度。\n\t*@param height （可选）显示图片的高度，设置为0表示使用图片默认高度。\n\t*@param complete （可选）加载完成回调。\n\t*@return 返回精灵对象本身。\n\t*/\n\t__proto.loadImage=function(url,x,y,width,height,complete){\n\t\tvar _$this=this;\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\tfunction loaded (tex){\n\t\t\tif (!_$this.destroyed){\n\t\t\t\t_$this.size(x+(width || tex.width),y+(height || tex.height));\n\t\t\t\t_$this.repaint();\n\t\t\t\tcomplete && complete.runWith(tex);\n\t\t\t}\n\t\t}\n\t\tthis.graphics.loadImage(url,x,y,width,height,loaded);\n\t\treturn this;\n\t}\n\n\t/**cacheAs后，设置自己和父对象缓存失效。*/\n\t__proto.repaint=function(){\n\t\tthis.conchModel && this.conchModel.repaint && this.conchModel.repaint();\n\t\tif (this._repaint===0){\n\t\t\tthis._repaint=1;\n\t\t\tthis.parentRepaint();\n\t\t}\n\t\tif (this._$P && this._$P.maskParent){\n\t\t\tthis._$P.maskParent.repaint();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取是否重新缓存。\n\t*@return 如果重新缓存值为 true，否则值为 false。\n\t*/\n\t__proto._needRepaint=function(){\n\t\treturn (this._repaint!==0)&& this._$P.cacheCanvas && this._$P.cacheCanvas.reCache;\n\t}\n\n\t/**@private */\n\t__proto._childChanged=function(child){\n\t\tif (this._childs.length)this._renderType |=/*laya.renders.RenderSprite.CHILDS*/0x800;\n\t\telse this._renderType &=~ /*laya.renders.RenderSprite.CHILDS*/0x800;\n\t\tif (child && this._get$P(\"hasZorder\"))Laya.timer.callLater(this,this.updateZOrder);\n\t\tthis.repaint();\n\t}\n\n\t/**cacheAs时，设置所有父对象缓存失效。 */\n\t__proto.parentRepaint=function(){\n\t\tvar p=this._parent;\n\t\tif (p && p._repaint===0){\n\t\t\tp._repaint=1;\n\t\t\tp.parentRepaint();\n\t\t}\n\t}\n\n\t/**\n\t*开始拖动此对象。\n\t*@param area （可选）拖动区域，此区域为当前对象注册点活动区域（不包括对象宽高），可选。\n\t*@param hasInertia （可选）鼠标松开后，是否还惯性滑动，默认为false，可选。\n\t*@param elasticDistance （可选）橡皮筋效果的距离值，0为无橡皮筋效果，默认为0，可选。\n\t*@param elasticBackTime （可选）橡皮筋回弹时间，单位为毫秒，默认为300毫秒，可选。\n\t*@param data （可选）拖动事件携带的数据，可选。\n\t*@param disableMouseEvent （可选）禁用其他对象的鼠标检测，默认为false，设置为true能提高性能。\n\t*@param ratio （可选）惯性阻尼系数，影响惯性力度和时长。\n\t*/\n\t__proto.startDrag=function(area,hasInertia,elasticDistance,elasticBackTime,data,disableMouseEvent,ratio){\n\t\t(hasInertia===void 0)&& (hasInertia=false);\n\t\t(elasticDistance===void 0)&& (elasticDistance=0);\n\t\t(elasticBackTime===void 0)&& (elasticBackTime=300);\n\t\t(disableMouseEvent===void 0)&& (disableMouseEvent=false);\n\t\t(ratio===void 0)&& (ratio=0.92);\n\t\tthis._$P.dragging || (this._set$P(\"dragging\",new Dragging()));\n\t\tthis._$P.dragging.start(this,area,hasInertia,elasticDistance,elasticBackTime,data,disableMouseEvent,ratio);\n\t}\n\n\t/**停止拖动此对象。*/\n\t__proto.stopDrag=function(){\n\t\tthis._$P.dragging && this._$P.dragging.stop();\n\t}\n\n\t__proto._releaseMem=function(){\n\t\tif (!this._$P)return;\n\t\tvar cc=this._$P.cacheCanvas;\n\t\tif (cc && cc.ctx){\n\t\t\tPool.recover(\"RenderContext\",cc.ctx);\n\t\t\tcc.ctx.canvas.size(0,0);\n\t\t\tcc.ctx=null;\n\t\t};\n\t\tvar fc=this._$P._filterCache;\n\t\tif (fc){\n\t\t\tfc.destroy();\n\t\t\tfc.recycle();\n\t\t\tthis._set$P('_filterCache',null);\n\t\t}\n\t\tthis._$P._isHaveGlowFilter && this._set$P('_isHaveGlowFilter',false);\n\t\tthis._$P._isHaveGlowFilter=null;\n\t}\n\n\t/**@private */\n\t__proto._setDisplay=function(value){\n\t\tif (!value)this._releaseMem();\n\t\t_super.prototype._setDisplay.call(this,value);\n\t}\n\n\t/**\n\t*检测某个点是否在此对象内。\n\t*@param x 全局x坐标。\n\t*@param y 全局y坐标。\n\t*@return 表示是否在对象内。\n\t*/\n\t__proto.hitTestPoint=function(x,y){\n\t\tvar point=this.globalToLocal(Point.TEMP.setTo(x,y));\n\t\tx=point.x;\n\t\ty=point.y;\n\t\tvar rect=this._$P.hitArea ? this._$P.hitArea :(this._width > 0 && this._height > 0)? Rectangle.TEMP.setTo(0,0,this._width,this._height):this.getSelfBounds();\n\t\treturn rect.contains(x,y);\n\t}\n\n\t/**获得相对于本对象上的鼠标坐标信息。*/\n\t__proto.getMousePoint=function(){\n\t\treturn this.globalToLocal(Point.TEMP.setTo(Laya.stage.mouseX,Laya.stage.mouseY));\n\t}\n\n\t/**@private */\n\t__proto._getWords=function(){\n\t\treturn null;\n\t}\n\n\t/**@private */\n\t__proto._addChildsToLayout=function(out){\n\t\tvar words=this._getWords();\n\t\tif (words==null && this._childs.length==0)return false;\n\t\tif (words){\n\t\t\tfor (var i=0,n=words.length;i < n;i++){\n\t\t\t\tout.push(words[i]);\n\t\t\t}\n\t\t}\n\t\tthis._childs.forEach(function(o,index,array){\n\t\t\to._style._enableLayout()&& o._addToLayout(out);\n\t\t});\n\t\treturn true;\n\t}\n\n\t/**@private */\n\t__proto._addToLayout=function(out){\n\t\tif (this._style.absolute)return;\n\t\tthis._style.block ? out.push(this):(this._addChildsToLayout(out)&& (this.x=this.y=0));\n\t}\n\n\t/**@private */\n\t__proto._isChar=function(){\n\t\treturn false;\n\t}\n\n\t/**@private */\n\t__proto._getCSSStyle=function(){\n\t\treturn this._style.getCSSStyle();\n\t}\n\n\t/**\n\t*@private\n\t*设置指定属性名的属性值。\n\t*@param name 属性名。\n\t*@param value 属性值。\n\t*/\n\t__proto._setAttributes=function(name,value){\n\t\tswitch (name){\n\t\t\tcase 'x':\n\t\t\t\tthis.x=parseFloat(value);\n\t\t\t\tbreak ;\n\t\t\tcase 'y':\n\t\t\t\tthis.y=parseFloat(value);\n\t\t\t\tbreak ;\n\t\t\tcase 'width':\n\t\t\t\tthis.width=parseFloat(value);\n\t\t\t\tbreak ;\n\t\t\tcase 'height':\n\t\t\t\tthis.height=parseFloat(value);\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthis[name]=value;\n\t\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._layoutLater=function(){\n\t\tthis.parent && (this.parent)._layoutLater();\n\t}\n\n\t/**\n\t*<p>指定是否对使用了 scrollRect 的显示对象进行优化处理。默认为false(不优化)。</p>\n\t*<p>当值为ture时：将对此对象使用了scrollRect 设定的显示区域以外的显示内容不进行渲染，以提高性能(如果子对象有旋转缩放或者中心点偏移，则显示筛选会不精确)。</p>\n\t*/\n\t__getset(0,__proto,'optimizeScrollRect',function(){\n\t\treturn this._optimizeScrollRect;\n\t\t},function(b){\n\t\tif (this._optimizeScrollRect !=b){\n\t\t\tthis._optimizeScrollRect=b;\n\t\t\tthis.conchModel && this.conchModel.optimizeScrollRect(b);\n\t\t}\n\t});\n\n\t/**\n\t*设置是否开启自定义渲染，只有开启自定义渲染，才能使用customRender函数渲染。\n\t*/\n\t__getset(0,__proto,'customRenderEnable',null,function(b){\n\t\tif (b){\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.CUSTOM*/0x400;\n\t\t\tif (Render.isConchNode){\n\t\t\t\tSprite.CustomList.push(this);\n\t\t\t\tvar canvas=new HTMLCanvas(\"2d\");\n\t\t\t\tcanvas._setContext(/*__JS__ */new CanvasRenderingContext2D());\n\t\t\t\t/*__JS__ */this.customContext=new RenderContext(0,0,canvas);\n\t\t\t\tcanvas.context.setCanvasType && canvas.context.setCanvasType(2);\n\t\t\t\tthis.conchModel.custom(canvas.context);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*指定显示对象是否缓存为静态图像。功能同cacheAs的normal模式。建议优先使用cacheAs代替。\n\t*/\n\t__getset(0,__proto,'cacheAsBitmap',function(){\n\t\treturn this.cacheAs!==\"none\";\n\t\t},function(value){\n\t\tthis.cacheAs=value ? (this._$P[\"hasFilter\"] ? \"none\" :\"normal\"):\"none\";\n\t});\n\n\t/**\n\t*<p>指定显示对象是否缓存为静态图像，cacheAs时，子对象发生变化，会自动重新缓存，同时也可以手动调用reCache方法更新缓存。</p>\n\t*<p>建议把不经常变化的“复杂内容”缓存为静态图像，能极大提高渲染性能。cacheAs有\"none\"，\"normal\"和\"bitmap\"三个值可选。\n\t*<li>默认为\"none\"，不做任何缓存。</li>\n\t*<li>当值为\"normal\"时，canvas模式下进行画布缓存，webgl模式下进行命令缓存。</li>\n\t*<li>当值为\"bitmap\"时，canvas模式下进行依然是画布缓存，webgl模式下使用renderTarget缓存。</li></p>\n\t*<p>webgl下renderTarget缓存模式缺点：会额外创建renderTarget对象，增加内存开销，缓存面积有最大2048限制，不断重绘时会增加CPU开销。优点：大幅减少drawcall，渲染性能最高。\n\t*webgl下命令缓存模式缺点：只会减少节点遍历及命令组织，不会减少drawcall数，性能中等。优点：没有额外内存开销，无需renderTarget支持。</p>\n\t*/\n\t__getset(0,__proto,'cacheAs',function(){\n\t\treturn this._$P.cacheCanvas==null ? \"none\" :this._$P.cacheCanvas.type;\n\t\t},function(value){\n\t\tvar cacheCanvas=this._$P.cacheCanvas;\n\t\tif (value===(cacheCanvas ? cacheCanvas.type :\"none\"))return;\n\t\tif (value!==\"none\"){\n\t\t\tif (!this._getBit(/*laya.display.Node.NOTICE_DISPLAY*/0x1))this._setUpNoticeType(/*laya.display.Node.NOTICE_DISPLAY*/0x1);\n\t\t\tcacheCanvas || (cacheCanvas=this._set$P(\"cacheCanvas\",Pool.getItemByClass(\"cacheCanvas\",Object)));\n\t\t\tcacheCanvas.type=value;\n\t\t\tcacheCanvas.reCache=true;\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.CANVAS*/0x10;\n\t\t\tif (value==\"bitmap\")this.conchModel && this.conchModel.cacheAs(1);\n\t\t\tthis._set$P(\"cacheForFilters\",false);\n\t\t\t}else {\n\t\t\tif (this._$P[\"_mask\"]){\n\t\t\t}else\n\t\t\tif (this._$P[\"hasFilter\"]){\n\t\t\t\tthis._set$P(\"cacheForFilters\",true);\n\t\t\t\t}else {\n\t\t\t\tif (cacheCanvas){\n\t\t\t\t\tvar cc=cacheCanvas;\n\t\t\t\t\tif (cc && cc.ctx){\n\t\t\t\t\t\tPool.recover(\"RenderContext\",cc.ctx);\n\t\t\t\t\t\tcc.ctx.canvas.size(0,0);\n\t\t\t\t\t\tcc.ctx=null;\n\t\t\t\t\t}\n\t\t\t\t\tPool.recover(\"cacheCanvas\",cacheCanvas);\n\t\t\t\t}\n\t\t\t\tthis._$P.cacheCanvas=null;\n\t\t\t\tthis._renderType &=~ /*laya.renders.RenderSprite.CANVAS*/0x10;\n\t\t\t\tthis.conchModel && this.conchModel.cacheAs(0);\n\t\t\t}\n\t\t}\n\t\tthis.repaint();\n\t});\n\n\t/**z排序，更改此值，则会按照值的大小对同一容器的所有对象重新排序。值越大，越靠上。默认为0，则根据添加顺序排序。*/\n\t__getset(0,__proto,'zOrder',function(){\n\t\treturn this._zOrder;\n\t\t},function(value){\n\t\tif (this._zOrder !=value){\n\t\t\tthis._zOrder=value;\n\t\t\tthis.conchModel && this.conchModel.setZOrder && this.conchModel.setZOrder(value);\n\t\t\tif (this._parent){\n\t\t\t\tvalue && this._parent._set$P(\"hasZorder\",true);\n\t\t\t\tLaya.timer.callLater(this._parent,this.updateZOrder);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**旋转角度，默认值为0。以角度为单位。*/\n\t__getset(0,__proto,'rotation',function(){\n\t\treturn this._style._tf.rotate;\n\t\t},function(value){\n\t\tvar style=this.getStyle();\n\t\tif (style._tf.rotate!==value){\n\t\t\tstyle.setRotate(value);\n\t\t\tthis._tfChanged=true;\n\t\t\tthis.conchModel && this.conchModel.rotate(value);\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\t\tvar p=this._parent;\n\t\t\tif (p && p._repaint===0){\n\t\t\t\tp._repaint=1;\n\t\t\t\tp.parentRepaint();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*<p>显示对象的宽度，单位为像素，默认为0。</p>\n\t*<p>此宽度用于鼠标碰撞检测，并不影响显示对象图像大小。需要对显示对象的图像进行缩放，请使用scale、scaleX、scaleY。</p>\n\t*<p>可以通过getbounds获取显示对象图像的实际宽度。</p>\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\tif (!this.autoSize)return this._width;\n\t\treturn this.getSelfBounds().width;\n\t\t},function(value){\n\t\tif (this._width!==value){\n\t\t\tthis._width=value;\n\t\t\tthis.conchModel && this.conchModel.size(value,this._height)\n\t\t\tthis.repaint();\n\t\t}\n\t});\n\n\t/**表示显示对象相对于父容器的水平方向坐标值。*/\n\t__getset(0,__proto,'x',function(){\n\t\treturn this._x;\n\t\t},function(value){\n\t\tif (this._x!==value){\n\t\t\tif (this.destroyed)return;\n\t\t\tthis._x=value;\n\t\t\tthis.conchModel && this.conchModel.pos(value,this._y);\n\t\t\tvar p=this._parent;\n\t\t\tif (p && p._repaint===0){\n\t\t\t\tp._repaint=1;\n\t\t\t\tp.parentRepaint();\n\t\t\t}\n\t\t\tif (this._$P.maskParent && this._$P.maskParent._repaint===0){\n\t\t\t\tthis._$P.maskParent._repaint=1;\n\t\t\t\tthis._$P.maskParent.parentRepaint();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*获得相对于stage的全局Y轴缩放值（会叠加父亲节点的缩放值）。\n\t*/\n\t__getset(0,__proto,'globalScaleY',function(){\n\t\tvar scale=1;\n\t\tvar ele=this;\n\t\twhile (ele){\n\t\t\tif (ele===Laya.stage)break ;\n\t\t\tscale *=ele.scaleY;\n\t\t\tele=ele.parent;\n\t\t}\n\t\treturn scale;\n\t});\n\n\t/**\n\t*<p>可以设置一个Rectangle区域作为点击区域，或者设置一个<code>HitArea</code>实例作为点击区域，HitArea内可以设置可点击和不可点击区域。</p>\n\t*<p>如果不设置hitArea，则根据宽高形成的区域进行碰撞。</p>\n\t*/\n\t__getset(0,__proto,'hitArea',function(){\n\t\treturn this._$P.hitArea;\n\t\t},function(value){\n\t\tthis._set$P(\"hitArea\",value);\n\t});\n\n\t/**\n\t*是否静态缓存此对象的当前帧的最终属性。为 true 时，子对象变化时不会自动更新缓存，但是可以通过调用 reCache 方法手动刷新。\n\t*<b>注意：</b> 1. 设置 cacheAs 为非空和非\"none\"时才有效。 2. 由于渲染的时机在脚本执行之后，也就是说当前帧渲染的是对象的最终属性，所以如果在当前帧渲染之前、设置静态缓存之后改变对象属性，则最终渲染结果表现的是对象的最终属性。\n\t*/\n\t__getset(0,__proto,'staticCache',function(){\n\t\treturn this._$P.staticCache;\n\t\t},function(value){\n\t\tthis._set$P(\"staticCache\",value);\n\t\tif (!value)this.reCache();\n\t});\n\n\t/**设置一个Texture实例，并显示此图片（如果之前有其他绘制，则会被清除掉）。等同于graphics.clear();graphics.drawTexture()*/\n\t__getset(0,__proto,'texture',function(){\n\t\treturn this._texture;\n\t\t},function(value){\n\t\tif (this._texture !=value){\n\t\t\tthis._texture=value;\n\t\t\tthis.graphics.cleanByTexture(value,0,0);\n\t\t}\n\t});\n\n\t/**表示显示对象相对于父容器的垂直方向坐标值。*/\n\t__getset(0,__proto,'y',function(){\n\t\treturn this._y;\n\t\t},function(value){\n\t\tif (this._y!==value){\n\t\t\tif (this.destroyed)return;\n\t\t\tthis._y=value;\n\t\t\tthis.conchModel && this.conchModel.pos(this._x,value);\n\t\t\tvar p=this._parent;\n\t\t\tif (p && p._repaint===0){\n\t\t\t\tp._repaint=1;\n\t\t\t\tp.parentRepaint();\n\t\t\t}\n\t\t\tif (this._$P.maskParent && this._$P.maskParent._repaint===0){\n\t\t\t\tthis._$P.maskParent._repaint=1;\n\t\t\t\tthis._$P.maskParent.parentRepaint();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*<p>显示对象的高度，单位为像素，默认为0。</p>\n\t*<p>此高度用于鼠标碰撞检测，并不影响显示对象图像大小。需要对显示对象的图像进行缩放，请使用scale、scaleX、scaleY。</p>\n\t*<p>可以通过getbounds获取显示对象图像的实际高度。</p>\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\tif (!this.autoSize)return this._height;\n\t\treturn this.getSelfBounds().height;\n\t\t},function(value){\n\t\tif (this._height!==value){\n\t\t\tthis._height=value;\n\t\t\tthis.conchModel && this.conchModel.size(this._width,value);\n\t\t\tthis.repaint();\n\t\t}\n\t});\n\n\t/**指定要使用的混合模式。目前只支持\"lighter\"。*/\n\t__getset(0,__proto,'blendMode',function(){\n\t\treturn this._style.blendMode;\n\t\t},function(value){\n\t\tthis.getStyle().blendMode=value;\n\t\tthis.conchModel && this.conchModel.blendMode(value);\n\t\tif (value && value !=\"source-over\")this._renderType |=/*laya.renders.RenderSprite.BLEND*/0x08;\n\t\telse this._renderType &=~ /*laya.renders.RenderSprite.BLEND*/0x08;\n\t\tthis.parentRepaint();\n\t});\n\n\t/**X轴缩放值，默认值为1。设置为负数，可以实现水平反转效果，比如scaleX=-1。*/\n\t__getset(0,__proto,'scaleX',function(){\n\t\treturn this._style._tf.scaleX;\n\t\t},function(value){\n\t\tvar style=this.getStyle();\n\t\tif (style._tf.scaleX!==value){\n\t\t\tstyle.setScaleX(value);\n\t\t\tthis._tfChanged=true;\n\t\t\tthis.conchModel && this.conchModel.scale(value,style._tf.scaleY);\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\t\tvar p=this._parent;\n\t\t\tif (p && p._repaint===0){\n\t\t\t\tp._repaint=1;\n\t\t\t\tp.parentRepaint();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**Y轴缩放值，默认值为1。设置为负数，可以实现垂直反转效果，比如scaleX=-1。*/\n\t__getset(0,__proto,'scaleY',function(){\n\t\treturn this._style._tf.scaleY;\n\t\t},function(value){\n\t\tvar style=this.getStyle();\n\t\tif (style._tf.scaleY!==value){\n\t\t\tstyle.setScaleY(value);\n\t\t\tthis._tfChanged=true;\n\t\t\tthis.conchModel && this.conchModel.scale(style._tf.scaleX,value);\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\t\tvar p=this._parent;\n\t\t\tif (p && p._repaint===0){\n\t\t\t\tp._repaint=1;\n\t\t\t\tp.parentRepaint();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**对舞台 <code>stage</code> 的引用。*/\n\t__getset(0,__proto,'stage',function(){\n\t\treturn Laya.stage;\n\t});\n\n\t/**水平倾斜角度，默认值为0。以角度为单位。*/\n\t__getset(0,__proto,'skewX',function(){\n\t\treturn this._style._tf.skewX;\n\t\t},function(value){\n\t\tvar style=this.getStyle();\n\t\tif (style._tf.skewX!==value){\n\t\t\tstyle.setSkewX(value);\n\t\t\tthis._tfChanged=true;\n\t\t\tthis.conchModel && this.conchModel.skew(value,style._tf.skewY);\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\t\tvar p=this._parent;\n\t\t\tif (p && p._repaint===0){\n\t\t\t\tp._repaint=1;\n\t\t\t\tp.parentRepaint();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*<p>显示对象的滚动矩形范围，具有裁剪效果(如果只想限制子对象渲染区域，请使用viewport)，设置optimizeScrollRect=true，可以优化裁剪区域外的内容不进行渲染。</p>\n\t*<p> srollRect和viewport的区别：<br/>\n\t*1.srollRect自带裁剪效果，viewport只影响子对象渲染是否渲染，不具有裁剪效果（性能更高）。<br/>\n\t*2.设置rect的x,y属性均能实现区域滚动效果，但scrollRect会保持0,0点位置不变。</p>\n\t*/\n\t__getset(0,__proto,'scrollRect',function(){\n\t\treturn this._style.scrollRect;\n\t\t},function(value){\n\t\tthis.getStyle().scrollRect=value;\n\t\tthis.repaint();\n\t\tif (value){\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.CLIP*/0x80;\n\t\t\tthis.conchModel && this.conchModel.scrollRect(value.x,value.y,value.width,value.height);\n\t\t\t}else {\n\t\t\tthis._renderType &=~ /*laya.renders.RenderSprite.CLIP*/0x80;\n\t\t\tif (this.conchModel){\n\t\t\t\tif (Sprite.RUNTIMEVERION < \"0.9.1\")\n\t\t\t\t\tthis.conchModel.removeType(0x40);\n\t\t\t\telse\n\t\t\t\tthis.conchModel.removeType(/*laya.renders.RenderSprite.CLIP*/0x80);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**垂直倾斜角度，默认值为0。以角度为单位。*/\n\t__getset(0,__proto,'skewY',function(){\n\t\treturn this._style._tf.skewY;\n\t\t},function(value){\n\t\tvar style=this.getStyle();\n\t\tif (style._tf.skewY!==value){\n\t\t\tstyle.setSkewY(value);\n\t\t\tthis._tfChanged=true;\n\t\t\tthis.conchModel && this.conchModel.skew(style._tf.skewX,value);\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\t\tvar p=this._parent;\n\t\t\tif (p && p._repaint===0){\n\t\t\t\tp._repaint=1;\n\t\t\t\tp.parentRepaint();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*<p>对象的矩阵信息。通过设置矩阵可以实现节点旋转，缩放，位移效果。</p>\n\t*<p>矩阵更多信息请参考 <code>Matrix</code></p>\n\t*/\n\t__getset(0,__proto,'transform',function(){\n\t\treturn this._tfChanged ? this._adjustTransform():this._transform;\n\t\t},function(value){\n\t\tthis._tfChanged=false;\n\t\tthis._transform=value;\n\t\tif (value){\n\t\t\tthis._x=value.tx;\n\t\t\tthis._y=value.ty;\n\t\t\tvalue.tx=value.ty=0;\n\t\t\tthis.conchModel && this.conchModel.transform(value.a,value.b,value.c,value.d,this._x,this._y);\n\t\t}\n\t\tif (value)this._renderType |=/*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\telse {\n\t\t\tthis._renderType &=~ /*laya.renders.RenderSprite.TRANSFORM*/0x04;\n\t\t\tthis.conchModel && this.conchModel.removeType(/*laya.renders.RenderSprite.TRANSFORM*/0x04);\n\t\t}\n\t\tthis.parentRepaint();\n\t});\n\n\t/**X轴 轴心点的位置，单位为像素，默认为0。轴心点会影响对象位置，缩放中心，旋转中心。*/\n\t__getset(0,__proto,'pivotX',function(){\n\t\treturn this._style._tf.translateX;\n\t\t},function(value){\n\t\tthis.getStyle().setTranslateX(value);\n\t\tthis.conchModel && this.conchModel.pivot(value,this._style._tf.translateY);\n\t\tthis.repaint();\n\t});\n\n\t/**Y轴 轴心点的位置，单位为像素，默认为0。轴心点会影响对象位置，缩放中心，旋转中心。*/\n\t__getset(0,__proto,'pivotY',function(){\n\t\treturn this._style._tf.translateY;\n\t\t},function(value){\n\t\tthis.getStyle().setTranslateY(value);\n\t\tthis.conchModel && this.conchModel.pivot(this._style._tf.translateX,value);\n\t\tthis.repaint();\n\t});\n\n\t/**透明度，值为0-1，默认值为1，表示不透明。更改alpha值会影响drawcall。*/\n\t__getset(0,__proto,'alpha',function(){\n\t\treturn this._style.alpha;\n\t\t},function(value){\n\t\tif (this._style && this._style.alpha!==value){\n\t\t\tvalue=value < 0 ? 0 :(value > 1 ? 1 :value);\n\t\t\tthis.getStyle().alpha=value;\n\t\t\tthis.conchModel && this.conchModel.alpha(value);\n\t\t\tif (value!==1)this._renderType |=/*laya.renders.RenderSprite.ALPHA*/0x02;\n\t\t\telse this._renderType &=~ /*laya.renders.RenderSprite.ALPHA*/0x02;\n\t\t\tthis.parentRepaint();\n\t\t}\n\t});\n\n\t/**表示是否可见，默认为true。如果设置不可见，节点将不被渲染。*/\n\t__getset(0,__proto,'visible',function(){\n\t\treturn this._style.visible;\n\t\t},function(value){\n\t\tif (this._style && this._style.visible!==value){\n\t\t\tthis.getStyle().visible=value;\n\t\t\tthis.conchModel && this.conchModel.visible(value);\n\t\t\tthis.parentRepaint();\n\t\t}\n\t});\n\n\t/**绘图对象。封装了绘制位图和矢量图的接口，Sprite所有的绘图操作都通过Graphics来实现的。*/\n\t__getset(0,__proto,'graphics',function(){\n\t\treturn this._graphics || (this.graphics=RunDriver.createGraphics());\n\t\t},function(value){\n\t\tif (this._graphics)this._graphics._sp=null;\n\t\tthis._graphics=value;\n\t\tif (value){\n\t\t\tthis._renderType &=~ /*laya.renders.RenderSprite.IMAGE*/0x01;\n\t\t\tthis._renderType |=/*laya.renders.RenderSprite.GRAPHICS*/0x200;\n\t\t\tvalue._sp=this;\n\t\t\tthis.conchModel && this.conchModel.graphics(this._graphics);\n\t\t\t}else {\n\t\t\tthis._renderType &=~ /*laya.renders.RenderSprite.GRAPHICS*/0x200;\n\t\t\tthis._renderType &=~ /*laya.renders.RenderSprite.IMAGE*/0x01;\n\t\t\tif (this.conchModel){\n\t\t\t\tif (Sprite.RUNTIMEVERION < \"0.9.1\")\n\t\t\t\t\tthis.conchModel.removeType(0x100);\n\t\t\t\telse\n\t\t\t\tthis.conchModel.removeType(/*laya.renders.RenderSprite.GRAPHICS*/0x200);\n\t\t\t}\n\t\t}\n\t\tthis.repaint();\n\t});\n\n\t/**滤镜集合。可以设置多个滤镜组合。*/\n\t__getset(0,__proto,'filters',function(){\n\t\treturn this._$P.filters;\n\t\t},function(value){\n\t\tvalue && value.length===0 && (value=null);\n\t\tif (this._$P.filters==value)return;\n\t\tthis._set$P(\"filters\",value ? value.slice():null);\n\t\tif (Render.isConchApp){\n\t\t\tif (this.conchModel){\n\t\t\t\tif (Sprite.RUNTIMEVERION < \"0.9.1\")\n\t\t\t\t\tthis.conchModel.removeType(0x10);\n\t\t\t\telse\n\t\t\t\tthis.conchModel.removeType(/*laya.renders.RenderSprite.FILTERS*/0x20);\n\t\t\t}\n\t\t\tif (this._$P.filters && this._$P.filters.length==1){\n\t\t\t\tthis._$P.filters[0].callNative(this);\n\t\t\t}\n\t\t}\n\t\tif (Render.isWebGL){\n\t\t\tif (value && value.length){\n\t\t\t\tthis._renderType |=/*laya.renders.RenderSprite.FILTERS*/0x20;\n\t\t\t\t}else {\n\t\t\t\tthis._renderType &=~ /*laya.renders.RenderSprite.FILTERS*/0x20;\n\t\t\t}\n\t\t}\n\t\tif (value && value.length > 0){\n\t\t\tif (!this._getBit(/*laya.display.Node.NOTICE_DISPLAY*/0x1))this._setUpNoticeType(/*laya.display.Node.NOTICE_DISPLAY*/0x1);\n\t\t\tif (!(Render.isWebGL && value.length==1 && (((value[0])instanceof laya.filters.ColorFilter )))){\n\t\t\t\tif (this.cacheAs !=\"bitmap\"){\n\t\t\t\t\tif (!Render.isConchNode)this.cacheAs=\"bitmap\";\n\t\t\t\t\tthis._set$P(\"cacheForFilters\",true);\n\t\t\t\t}\n\t\t\t\tthis._set$P(\"hasFilter\",true);\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis._set$P(\"hasFilter\",false);\n\t\t\tif (this._$P[\"cacheForFilters\"] && this.cacheAs==\"bitmap\"){\n\t\t\t\tthis.cacheAs=\"none\";\n\t\t\t}\n\t\t}\n\t\tthis.repaint();\n\t});\n\n\t__getset(0,__proto,'parent',_super.prototype._$get_parent,function(value){\n\t\tLaya.superSet(Node,this,'parent',value);\n\t\tif (value && this._getBit(/*laya.display.Node.MOUSEENABLE*/0x2)){\n\t\t\tthis._$2__onDisplay();\n\t\t}\n\t});\n\n\t/**\n\t*<p>遮罩，可以设置一个对象(支持位图和矢量图)，根据对象形状进行遮罩显示。</p>\n\t*<p>【注意】遮罩对象坐标系是相对遮罩对象本身的，和Flash机制不同</p>\n\t*/\n\t__getset(0,__proto,'mask',function(){\n\t\treturn this._$P._mask;\n\t\t},function(value){\n\t\tif (value && this.mask && this.mask._$P.maskParent)return;\n\t\tif (value){\n\t\t\tthis.cacheAs=\"bitmap\";\n\t\t\tthis._set$P(\"_mask\",value);\n\t\t\tvalue._set$P(\"maskParent\",this);\n\t\t\t}else {\n\t\t\tthis.mask && this.mask._set$P(\"maskParent\",null);\n\t\t\tthis._set$P(\"_mask\",value);\n\t\t\tthis.cacheAs=\"none\";\n\t\t}\n\t\tthis.conchModel && this.conchModel.mask(value ? value.conchModel :null);\n\t\tthis._renderType |=/*laya.renders.RenderSprite.MASK*/0x40;\n\t\tthis.parentRepaint();\n\t});\n\n\t/**\n\t*是否接受鼠标事件。\n\t*默认为false，如果监听鼠标事件，则会自动设置本对象及父节点的属性 mouseEnable 的值都为 true（如果父节点手动设置为false，则不会更改）。\n\t**/\n\t__getset(0,__proto,'mouseEnabled',function(){\n\t\treturn this._mouseEnableState > 1;\n\t\t},function(value){\n\t\tthis._mouseEnableState=value ? 2 :1;\n\t});\n\n\t/**\n\t*获得相对于stage的全局X轴缩放值（会叠加父亲节点的缩放值）。\n\t*/\n\t__getset(0,__proto,'globalScaleX',function(){\n\t\tvar scale=1;\n\t\tvar ele=this;\n\t\twhile (ele){\n\t\t\tif (ele===Laya.stage)break ;\n\t\t\tscale *=ele.scaleX;\n\t\t\tele=ele.parent;\n\t\t}\n\t\treturn scale;\n\t});\n\n\t/**\n\t*返回鼠标在此对象坐标系上的 X 轴坐标信息。\n\t*/\n\t__getset(0,__proto,'mouseX',function(){\n\t\treturn this.getMousePoint().x;\n\t});\n\n\t/**\n\t*返回鼠标在此对象坐标系上的 Y 轴坐标信息。\n\t*/\n\t__getset(0,__proto,'mouseY',function(){\n\t\treturn this.getMousePoint().y;\n\t});\n\n\tSprite.fromImage=function(url){\n\t\treturn new Sprite().loadImage(url);\n\t}\n\n\tSprite.CustomList=[];\n\t__static(Sprite,\n\t['RUNTIMEVERION',function(){return this.RUNTIMEVERION=/*__JS__ */window.conch?conchConfig.getRuntimeVersion().substr(conchConfig.getRuntimeVersion().lastIndexOf('-')+1):'';}\n\t]);\n\treturn Sprite;\n})(Node)\n\n\n/**\n*@private\n*audio标签播放声音的音轨控制\n*/\n//class laya.media.h5audio.AudioSoundChannel extends laya.media.SoundChannel\nvar AudioSoundChannel=(function(_super){\n\tfunction AudioSoundChannel(audio){\n\t\t/**\n\t\t*播放用的audio标签\n\t\t*/\n\t\tthis._audio=null;\n\t\tthis._onEnd=null;\n\t\tthis._resumePlay=null;\n\t\tAudioSoundChannel.__super.call(this);\n\t\tthis._onEnd=Utils.bind(this.__onEnd,this);\n\t\tthis._resumePlay=Utils.bind(this.__resumePlay,this);\n\t\taudio.addEventListener(\"ended\",this._onEnd);\n\t\tthis._audio=audio;\n\t}\n\n\t__class(AudioSoundChannel,'laya.media.h5audio.AudioSoundChannel',_super);\n\tvar __proto=AudioSoundChannel.prototype;\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t__proto.__resumePlay=function(){\n\t\tif (this._audio)this._audio.removeEventListener(\"canplay\",this._resumePlay);\n\t\tif (this.isStopped)return;\n\t\ttry {\n\t\t\tthis._audio.currentTime=this.startTime;\n\t\t\tBrowser.container.appendChild(this._audio);\n\t\t\tthis._audio.play();\n\t\t\t}catch (e){\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tif (!this._audio)return;\n\t\ttry {\n\t\t\tthis._audio.playbackRate=SoundManager.playbackRate;\n\t\t\tthis._audio.currentTime=this.startTime;\n\t\t\t}catch (e){\n\t\t\tthis._audio.addEventListener(\"canplay\",this._resumePlay);\n\t\t\treturn;\n\t\t}\n\t\tSoundManager.addChannel(this);\n\t\tBrowser.container.appendChild(this._audio);\n\t\tif(\"play\" in this._audio)\n\t\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tif (\"pause\" in this._audio)\n\t\t\tif (Render.isConchApp){\n\t\t\tthis._audio.stop();\n\t\t}\n\t\tthis._audio.pause();\n\t\tthis._audio.removeEventListener(\"ended\",this._onEnd);\n\t\tthis._audio.removeEventListener(\"canplay\",this._resumePlay);\n\t\tif (!Browser.onIE){\n\t\t\tif (this._audio!=AudioSound._musicAudio){\n\t\t\t\tPool.recover(\"audio:\"+this.url,this._audio);\n\t\t\t}\n\t\t}\n\t\tBrowser.removeElement(this._audio);\n\t\tthis._audio=null;\n\t}\n\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tif(\"pause\" in this._audio)\n\t\t\tthis._audio.pause();\n\t}\n\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tif(\"play\" in this._audio)\n\t\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*获取音量\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\treturn AudioSoundChannel;\n})(SoundChannel)\n\n\n/**\n*@private\n*web audio api方式播放声音的音轨控制\n*/\n//class laya.media.webaudio.WebAudioSoundChannel extends laya.media.SoundChannel\nvar WebAudioSoundChannel=(function(_super){\n\tfunction WebAudioSoundChannel(){\n\t\t/**\n\t\t*声音原始文件数据\n\t\t*/\n\t\tthis.audioBuffer=null;\n\t\t/**\n\t\t*gain节点\n\t\t*/\n\t\tthis.gain=null;\n\t\t/**\n\t\t*播放用的数据\n\t\t*/\n\t\tthis.bufferSource=null;\n\t\t/**\n\t\t*当前时间\n\t\t*/\n\t\tthis._currentTime=0;\n\t\t/**\n\t\t*当前音量\n\t\t*/\n\t\tthis._volume=1;\n\t\t/**\n\t\t*播放开始时的时间戳\n\t\t*/\n\t\tthis._startTime=0;\n\t\tthis._pauseTime=0;\n\t\tthis._onPlayEnd=null;\n\t\tthis.context=WebAudioSound.ctx;\n\t\tWebAudioSoundChannel.__super.call(this);\n\t\tthis._onPlayEnd=Utils.bind(this.__onPlayEnd,this);\n\t\tif (this.context[\"createGain\"]){\n\t\t\tthis.gain=this.context[\"createGain\"]();\n\t\t\t}else {\n\t\t\tthis.gain=this.context[\"createGainNode\"]();\n\t\t}\n\t}\n\n\t__class(WebAudioSoundChannel,'laya.media.webaudio.WebAudioSoundChannel',_super);\n\tvar __proto=WebAudioSoundChannel.prototype;\n\t/**\n\t*播放声音\n\t*/\n\t__proto.play=function(){\n\t\tSoundManager.addChannel(this);\n\t\tthis.isStopped=false;\n\t\tthis._clearBufferSource();\n\t\tif (!this.audioBuffer)return;\n\t\tif (this.startTime >=this.duration)return this.stop();\n\t\tvar context=this.context;\n\t\tvar gain=this.gain;\n\t\tvar bufferSource=context.createBufferSource();\n\t\tthis.bufferSource=bufferSource;\n\t\tbufferSource.buffer=this.audioBuffer;\n\t\tbufferSource.connect(gain);\n\t\tif (gain)\n\t\t\tgain.disconnect();\n\t\tgain.connect(context.destination);\n\t\tbufferSource.onended=this._onPlayEnd;\n\t\tthis._startTime=Browser.now();\n\t\tif (this.gain.gain.setTargetAtTime){\n\t\t\tthis.gain.gain.setTargetAtTime(this._volume,this.context.currentTime,0.001);\n\t\t}else\n\t\tthis.gain.gain.value=this._volume;\n\t\tif (this.loops==0){\n\t\t\tbufferSource.loop=true;\n\t\t}\n\t\tif (bufferSource.playbackRate.setTargetAtTime){\n\t\t\tbufferSource.playbackRate.setTargetAtTime(SoundManager.playbackRate,this.context.currentTime,0.001)\n\t\t}else\n\t\tbufferSource.playbackRate.value=SoundManager.playbackRate;\n\t\tbufferSource.start(0,this.startTime);\n\t\tthis._currentTime=0;\n\t}\n\n\t__proto.__onPlayEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t__proto._clearBufferSource=function(){\n\t\tif (this.bufferSource){\n\t\t\tvar sourceNode=this.bufferSource;\n\t\t\tif (sourceNode.stop){\n\t\t\t\tsourceNode.stop(0);\n\t\t\t\t}else {\n\t\t\t\tsourceNode.noteOff(0);\n\t\t\t}\n\t\t\tsourceNode.disconnect(0);\n\t\t\tsourceNode.onended=null;\n\t\t\tif (!WebAudioSoundChannel._tryCleanFailed)this._tryClearBuffer(sourceNode);\n\t\t\tthis.bufferSource=null;\n\t\t}\n\t}\n\n\t__proto._tryClearBuffer=function(sourceNode){\n\t\tif (!Browser.onMac){\n\t\t\ttry{\n\t\t\t\tsourceNode.buffer=null;\n\t\t\t\t}catch (e){\n\t\t\t\tWebAudioSoundChannel._tryCleanFailed=true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\ttry {sourceNode.buffer=WebAudioSound._miniBuffer;}catch (e){WebAudioSoundChannel._tryCleanFailed=true;}\n\t}\n\n\t/**\n\t*停止播放\n\t*/\n\t__proto.stop=function(){\n\t\t_super.prototype.stop.call(this);\n\t\tthis._clearBufferSource();\n\t\tthis.audioBuffer=null;\n\t\tif (this.gain)\n\t\t\tthis.gain.disconnect();\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif(SoundManager.autoReleaseSound)\n\t\t\tLaya.timer.once(5000,null,SoundManager.disposeSoundIfNotUsed,[this.url],false);\n\t}\n\n\t__proto.pause=function(){\n\t\tif (!this.isStopped){\n\t\t\tthis._pauseTime=this.position;\n\t\t}\n\t\tthis._clearBufferSource();\n\t\tif (this.gain)\n\t\t\tthis.gain.disconnect();\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tif(SoundManager.autoReleaseSound)\n\t\t\tLaya.timer.once(5000,null,SoundManager.disposeSoundIfNotUsed,[this.url],false);\n\t}\n\n\t__proto.resume=function(){\n\t\tthis.startTime=this._pauseTime;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*获取当前播放位置\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (this.bufferSource){\n\t\t\treturn (Browser.now()-this._startTime)/ 1000+this.startTime;\n\t\t}\n\t\treturn 0;\n\t});\n\n\t__getset(0,__proto,'duration',function(){\n\t\tif (this.audioBuffer){\n\t\t\treturn this.audioBuffer.duration;\n\t\t}\n\t\treturn 0;\n\t});\n\n\t/**\n\t*设置音量\n\t*/\n\t/**\n\t*获取音量\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\treturn this._volume;\n\t\t},function(v){\n\t\tif (this.isStopped){\n\t\t\treturn;\n\t\t}\n\t\tthis._volume=v;\n\t\tif (this.gain.gain.setTargetAtTime){\n\t\t\tthis.gain.gain.setTargetAtTime(v,this.context.currentTime,0.001);\n\t\t}else\n\t\tthis.gain.gain.value=v;\n\t});\n\n\tWebAudioSoundChannel._tryCleanFailed=false;\n\tWebAudioSoundChannel.SetTargetDelay=0.001;\n\treturn WebAudioSoundChannel;\n})(SoundChannel)\n\n\n/**\n*@private\n*<code>Bitmap</code> 是图片资源类。\n*/\n//class laya.resource.Bitmap extends laya.resource.Resource\nvar Bitmap=(function(_super){\n\tfunction Bitmap(){\n\t\t/**@private\n\t\t*HTML Image或HTML Canvas或WebGL Texture。\n\t\t**/\n\t\t//this._source=null;\n\t\t/**@private 宽度*/\n\t\t//this._w=NaN;\n\t\t/**@private 高度*/\n\t\t//this._h=NaN;\n\t\tBitmap.__super.call(this);\n\t\tthis._w=0;\n\t\tthis._h=0;\n\t}\n\n\t__class(Bitmap,'laya.resource.Bitmap',_super);\n\tvar __proto=Bitmap.prototype;\n\t/***\n\t*宽度。\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._w;\n\t});\n\n\t/***\n\t*高度。\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\treturn this._h;\n\t});\n\n\t/***\n\t*HTML Image 或 HTML Canvas 或 WebGL Texture 。\n\t*/\n\t__getset(0,__proto,'source',function(){\n\t\treturn this._source;\n\t});\n\n\treturn Bitmap;\n})(Resource)\n\n\n/**\n*<p>动画播放基类，提供了基础的动画播放控制方法和帧标签事件相关功能。</p>\n*<p>可以继承此类，但不要直接实例化此类，因为有些方法需要由子类实现。</p>\n*/\n//class laya.display.AnimationPlayerBase extends laya.display.Sprite\nvar AnimationPlayerBase=(function(_super){\n\tfunction AnimationPlayerBase(){\n\t\t/**\n\t\t*是否循环播放，调用play(...)方法时，会将此值设置为指定的参数值。\n\t\t*/\n\t\tthis.loop=false;\n\t\t/**\n\t\t*<p>播放顺序类型：AnimationPlayerBase.WRAP_POSITIVE为正序播放，AnimationPlayerBase.WRAP_REVERSE为倒序播放，AnimationPlayerBase.WRAP_PINGPONG为pingpong播放(当按指定顺序播放完结尾后，如果继续播发，则会改变播放顺序)。</p>\n\t\t*<p>默认为正序播放。</p>\n\t\t*/\n\t\tthis.wrapMode=0;\n\t\t/**@private */\n\t\tthis._index=0;\n\t\t/**@private */\n\t\tthis._count=0;\n\t\t/**@private */\n\t\tthis._isPlaying=false;\n\t\t/**@private */\n\t\tthis._labels=null;\n\t\t/**是否是逆序播放*/\n\t\tthis._isReverse=false;\n\t\t/**@private */\n\t\tthis._frameRateChanged=false;\n\t\t/**@private */\n\t\tthis._controlNode=null;\n\t\t/**@private */\n\t\tthis._actionName=null;\n\t\tAnimationPlayerBase.__super.call(this);\n\t\tthis._interval=Config.animationInterval;\n\t\tthis._setUpNoticeType(/*laya.display.Node.NOTICE_DISPLAY*/0x1);\n\t}\n\n\t__class(AnimationPlayerBase,'laya.display.AnimationPlayerBase',_super);\n\tvar __proto=AnimationPlayerBase.prototype;\n\t/**\n\t*<p>开始播放动画。play(...)方法被设计为在创建实例后的任何时候都可以被调用，当相应的资源加载完毕、调用动画帧填充方法(set frames)或者将实例显示在舞台上时，会判断是否正在播放中，如果是，则进行播放。</p>\n\t*<p>配合wrapMode属性，可设置动画播放顺序类型。</p>\n\t*@param start （可选）指定动画播放开始的索引(int)或帧标签(String)。帧标签可以通过addLabel(...)和removeLabel(...)进行添加和删除。\n\t*@param loop （可选）是否循环播放。\n\t*@param name （可选）动画名称。\n\t*@param showWarn（可选）是否动画不存在时打印警告\n\t*/\n\t__proto.play=function(start,loop,name,showWarn){\n\t\t(start===void 0)&& (start=0);\n\t\t(loop===void 0)&& (loop=true);\n\t\t(name===void 0)&& (name=\"\");\n\t\t(showWarn===void 0)&& (showWarn=true);\n\t\tthis._isPlaying=true;\n\t\tthis.index=((typeof start=='string'))? this._getFrameByLabel(start):start;\n\t\tthis.loop=loop;\n\t\tthis._actionName=name;\n\t\tthis._isReverse=this.wrapMode==1;\n\t\tif (this.interval > 0){\n\t\t\tthis.timerLoop(this.interval,this,this._frameLoop,null,true,true);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._getFrameByLabel=function(label){\n\t\tvar i=0;\n\t\tfor (i=0;i < this._count;i++){\n\t\t\tif (this._labels[i] && (this._labels [i]).indexOf(label)>=0)return i;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**@private */\n\t__proto._frameLoop=function(){\n\t\tif (this._isReverse){\n\t\t\tthis._index--;\n\t\t\tif (this._index < 0){\n\t\t\t\tif (this.loop){\n\t\t\t\t\tif (this.wrapMode==2){\n\t\t\t\t\t\tthis._index=this._count > 0 ? 1 :0;\n\t\t\t\t\t\tthis._isReverse=false;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tthis._index=this._count-1;\n\t\t\t\t\t}\n\t\t\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._index=0;\n\t\t\t\t\tthis.stop();\n\t\t\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis._index++;\n\t\t\tif (this._index >=this._count){\n\t\t\t\tif (this.loop){\n\t\t\t\t\tif (this.wrapMode==2){\n\t\t\t\t\t\tthis._index=this._count-2 >=0 ? this._count-2 :0;\n\t\t\t\t\t\tthis._isReverse=true;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tthis._index=0;\n\t\t\t\t\t}\n\t\t\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._index--;\n\t\t\t\t\tthis.stop();\n\t\t\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.index=this._index;\n\t}\n\n\t/**@private */\n\t__proto._setControlNode=function(node){\n\t\tif (this._controlNode){\n\t\t\tthis._controlNode.off(/*laya.events.Event.DISPLAY*/\"display\",this,this._checkResumePlaying);\n\t\t\tthis._controlNode.off(/*laya.events.Event.UNDISPLAY*/\"undisplay\",this,this._checkResumePlaying);\n\t\t}\n\t\tthis._controlNode=node;\n\t\tif (node && node !=this){\n\t\t\tnode.on(/*laya.events.Event.DISPLAY*/\"display\",this,this._checkResumePlaying);\n\t\t\tnode.on(/*laya.events.Event.UNDISPLAY*/\"undisplay\",this,this._checkResumePlaying);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._setDisplay=function(value){\n\t\t_super.prototype._setDisplay.call(this,value);\n\t\tthis._checkResumePlaying();\n\t}\n\n\t/**@private */\n\t__proto._checkResumePlaying=function(){\n\t\tif (this._isPlaying){\n\t\t\tif (this._controlNode.displayedInStage)this.play(this._index,this.loop,this._actionName);\n\t\t\telse this.clearTimer(this,this._frameLoop);\n\t\t}\n\t}\n\n\t/**\n\t*停止动画播放。\n\t*/\n\t__proto.stop=function(){\n\t\tthis._isPlaying=false;\n\t\tthis.clearTimer(this,this._frameLoop);\n\t}\n\n\t/**\n\t*增加一个帧标签到指定索引的帧上。当动画播放到此索引的帧时会派发Event.LABEL事件，派发事件是在完成当前帧画面更新之后。\n\t*@param label 帧标签名称\n\t*@param index 帧索引\n\t*/\n\t__proto.addLabel=function(label,index){\n\t\tif (!this._labels)this._labels={};\n\t\tif (!this._labels[index])this._labels[index]=[];\n\t\tthis._labels[index].push(label);\n\t}\n\n\t/**\n\t*删除指定的帧标签。\n\t*@param label 帧标签名称。注意：如果为空，则删除所有帧标签！\n\t*/\n\t__proto.removeLabel=function(label){\n\t\tif (!label)this._labels=null;\n\t\telse if (this._labels){\n\t\t\tfor (var name in this._labels){\n\t\t\t\tthis._removeLabelFromLabelList(this._labels[name],label);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._removeLabelFromLabelList=function(list,label){\n\t\tif (!list)return;\n\t\tfor (var i=list.length-1;i >=0;i--){\n\t\t\tif (list[i]==label){\n\t\t\t\tlist.splice(i,1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*将动画切换到指定帧并停在那里。\n\t*@param position 帧索引或帧标签\n\t*/\n\t__proto.gotoAndStop=function(position){\n\t\tthis.index=((typeof position=='string'))? this._getFrameByLabel(position):position;\n\t\tthis.stop();\n\t}\n\n\t/**\n\t*@private\n\t*显示到某帧\n\t*@param value 帧索引\n\t*/\n\t__proto._displayToIndex=function(value){}\n\t/**\n\t*停止动画播放，并清理对象属性。之后可存入对象池，方便对象复用。\n\t*/\n\t__proto.clear=function(){\n\t\tthis.stop();\n\t\tthis._labels=null;\n\t}\n\n\t/**\n\t*<p>动画播放的帧间隔时间(单位：毫秒)。默认值依赖于Config.animationInterval=50，通过Config.animationInterval可以修改默认帧间隔时间。</p>\n\t*<p>要想为某动画设置独立的帧间隔时间，可以使用set interval，注意：如果动画正在播放，设置后会重置帧循环定时器的起始时间为当前时间，也就是说，如果频繁设置interval，会导致动画帧更新的时间间隔会比预想的要慢，甚至不更新。</p>\n\t*/\n\t__getset(0,__proto,'interval',function(){\n\t\treturn this._interval;\n\t\t},function(value){\n\t\tif (this._interval !=value){\n\t\t\tthis._frameRateChanged=true;\n\t\t\tthis._interval=value;\n\t\t\tif (this._isPlaying && value > 0){\n\t\t\t\tthis.timerLoop(value,this,this._frameLoop,null,true,true);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*是否正在播放中。\n\t*/\n\t__getset(0,__proto,'isPlaying',function(){\n\t\treturn this._isPlaying;\n\t});\n\n\t/**\n\t*动画当前帧的索引。\n\t*/\n\t__getset(0,__proto,'index',function(){\n\t\treturn this._index;\n\t\t},function(value){\n\t\tthis._index=value;\n\t\tthis._displayToIndex(value);\n\t\tif (this._labels && this._labels[value]){\n\t\t\tvar tArr=this._labels[value];\n\t\t\tfor (var i=0,len=tArr.length;i < len;i++){\n\t\t\t\tthis.event(/*laya.events.Event.LABEL*/\"label\",tArr[i]);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*当前动画中帧的总数。\n\t*/\n\t__getset(0,__proto,'count',function(){\n\t\treturn this._count;\n\t});\n\n\tAnimationPlayerBase.WRAP_POSITIVE=0;\n\tAnimationPlayerBase.WRAP_REVERSE=1;\n\tAnimationPlayerBase.WRAP_PINGPONG=2;\n\treturn AnimationPlayerBase;\n})(Sprite)\n\n\n/**\n*<p> <code>Text</code> 类用于创建显示对象以显示文本。</p>\n*<p>\n*注意：如果运行时系统找不到设定的字体，则用系统默认的字体渲染文字，从而导致显示异常。(通常电脑上显示正常，在一些移动端因缺少设置的字体而显示异常)。\n*</p>\n*@example\n*package\n*{\n\t*import laya.display.Text;\n\t*public class Text_Example\n\t*{\n\t\t*public function Text_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*onInit();\n\t\t\t*}\n\t\t*private function onInit():void\n\t\t*{\n\t\t\t*var text:Text=new Text();//创建一个 Text 类的实例对象 text 。\n\t\t\t*text.text=\"这个是一个 Text 文本示例。\";\n\t\t\t*text.color=\"#008fff\";//设置 text 的文本颜色。\n\t\t\t*text.font=\"Arial\";//设置 text 的文本字体。\n\t\t\t*text.bold=true;//设置 text 的文本显示为粗体。\n\t\t\t*text.fontSize=30;//设置 text 的字体大小。\n\t\t\t*text.wordWrap=true;//设置 text 的文本自动换行。\n\t\t\t*text.x=100;//设置 text 对象的属性 x 的值，用于控制 text 对象的显示位置。\n\t\t\t*text.y=100;//设置 text 对象的属性 y 的值，用于控制 text 对象的显示位置。\n\t\t\t*text.width=300;//设置 text 的宽度。\n\t\t\t*text.height=200;//设置 text 的高度。\n\t\t\t*text.italic=true;//设置 text 的文本显示为斜体。\n\t\t\t*text.borderColor=\"#fff000\";//设置 text 的文本边框颜色。\n\t\t\t*Laya.stage.addChild(text);//将 text 添加到显示列表。\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Text_Example();\n*function Text_Example()\n*{\n\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t*onInit();\n\t*}\n*function onInit()\n*{\n\t*var text=new laya.display.Text();//创建一个 Text 类的实例对象 text 。\n\t*text.text=\"这个是一个 Text 文本示例。\";\n\t*text.color=\"#008fff\";//设置 text 的文本颜色。\n\t*text.font=\"Arial\";//设置 text 的文本字体。\n\t*text.bold=true;//设置 text 的文本显示为粗体。\n\t*text.fontSize=30;//设置 text 的字体大小。\n\t*text.wordWrap=true;//设置 text 的文本自动换行。\n\t*text.x=100;//设置 text 对象的属性 x 的值，用于控制 text 对象的显示位置。\n\t*text.y=100;//设置 text 对象的属性 y 的值，用于控制 text 对象的显示位置。\n\t*text.width=300;//设置 text 的宽度。\n\t*text.height=200;//设置 text 的高度。\n\t*text.italic=true;//设置 text 的文本显示为斜体。\n\t*text.borderColor=\"#fff000\";//设置 text 的文本边框颜色。\n\t*Laya.stage.addChild(text);//将 text 添加到显示列表。\n\t*}\n*@example\n*class Text_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*this.onInit();\n\t\t*}\n\t*private onInit():void {\n\t\t*var text:laya.display.Text=new laya.display.Text();//创建一个 Text 类的实例对象 text 。\n\t\t*text.text=\"这个是一个 Text 文本示例。\";\n\t\t*text.color=\"#008fff\";//设置 text 的文本颜色。\n\t\t*text.font=\"Arial\";//设置 text 的文本字体。\n\t\t*text.bold=true;//设置 text 的文本显示为粗体。\n\t\t*text.fontSize=30;//设置 text 的字体大小。\n\t\t*text.wordWrap=true;//设置 text 的文本自动换行。\n\t\t*text.x=100;//设置 text 对象的属性 x 的值，用于控制 text 对象的显示位置。\n\t\t*text.y=100;//设置 text 对象的属性 y 的值，用于控制 text 对象的显示位置。\n\t\t*text.width=300;//设置 text 的宽度。\n\t\t*text.height=200;//设置 text 的高度。\n\t\t*text.italic=true;//设置 text 的文本显示为斜体。\n\t\t*text.borderColor=\"#fff000\";//设置 text 的文本边框颜色。\n\t\t*Laya.stage.addChild(text);//将 text 添加到显示列表。\n\t\t*}\n\t*}\n*/\n//class laya.display.Text extends laya.display.Sprite\nvar Text=(function(_super){\n\tfunction Text(){\n\t\t/**@private */\n\t\tthis._clipPoint=null;\n\t\t/**当前使用的位置字体。*/\n\t\tthis._currBitmapFont=null;\n\t\t/**@private 表示文本内容字符串。*/\n\t\tthis._text=null;\n\t\t/**@private 表示文本内容是否发生改变。*/\n\t\tthis._isChanged=false;\n\t\t/**@private 表示文本的宽度，以像素为单位。*/\n\t\tthis._textWidth=0;\n\t\t/**@private 表示文本的高度，以像素为单位。*/\n\t\tthis._textHeight=0;\n\t\t/**@private 存储文字行数信息。*/\n\t\tthis._lines=[];\n\t\t/**@private 保存每行宽度*/\n\t\tthis._lineWidths=[];\n\t\t/**@private 文本的内容位置 X 轴信息。*/\n\t\tthis._startX=NaN;\n\t\t/**@private 文本的内容位置X轴信息。 */\n\t\tthis._startY=NaN;\n\t\t/**@private 当前可视行索引。*/\n\t\tthis._lastVisibleLineIndex=-1;\n\t\t/**@private 当前可视行索引。*/\n\t\tthis._words=null;\n\t\t/**@private */\n\t\tthis._charSize={};\n\t\t/**\n\t\t*是否显示下划线。\n\t\t*/\n\t\tthis.underline=false;\n\t\t/**\n\t\t*下划线的颜色，为null则使用字体颜色。\n\t\t*/\n\t\tthis._underlineColor=null;\n\t\tText.__super.call(this);\n\t\tthis.overflow=Text.VISIBLE;\n\t\tthis._style=new CSSStyle(this);\n\t\t(this._style).wordWrap=false;\n\t}\n\n\t__class(Text,'laya.display.Text',_super);\n\tvar __proto=Text.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._lines=null;\n\t\tif (this._words){\n\t\t\tthis._words.length=0;\n\t\t\tthis._words=null;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*@inheritDoc\n\t*/\n\t__proto._getBoundPointsM=function(ifRotate){\n\t\t(ifRotate===void 0)&& (ifRotate=false);\n\t\tvar rec=Rectangle.TEMP;\n\t\trec.setTo(0,0,this.width,this.height);\n\t\treturn rec._getBoundPoints();\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.getGraphicBounds=function(realSize){\n\t\t(realSize===void 0)&& (realSize=false);\n\t\tvar rec=Rectangle.TEMP;\n\t\trec.setTo(0,0,this.width,this.height);\n\t\treturn rec;\n\t}\n\n\t/**\n\t*@private\n\t*@inheritDoc\n\t*/\n\t__proto._getCSSStyle=function(){\n\t\treturn this._style;\n\t}\n\n\t/**\n\t*<p>根据指定的文本，从语言包中取当前语言的文本内容。并对此文本中的{i}文本进行替换。</p>\n\t*<p>设置Text.langPacks语言包后，即可使用lang获取里面的语言</p>\n\t*<p>例如：\n\t*<li>（1）text 的值为“我的名字”，先取到这个文本对应的当前语言版本里的值“My name”，将“My name”设置为当前文本的内容。</li>\n\t*<li>（2）text 的值为“恭喜你赢得{0}个钻石，{1}经验。”，arg1 的值为100，arg2 的值为200。\n\t*则先取到这个文本对应的当前语言版本里的值“Congratulations on your winning {0}diamonds,{1}experience.”，\n\t*然后将文本里的{0}、{1}，依据括号里的数字从0开始替换为 arg1、arg2 的值。\n\t*将替换处理后的文本“Congratulations on your winning 100 diamonds,200 experience.”设置为当前文本的内容。\n\t*</li>\n\t*</p>\n\t*@param text 文本内容。\n\t*@param ...args 文本替换参数。\n\t*/\n\t__proto.lang=function(text,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10){\n\t\ttext=Text.langPacks && Text.langPacks[text] ? Text.langPacks[text] :text;\n\t\tif (arguments.length < 2){\n\t\t\tthis._text=text;\n\t\t\t}else {\n\t\t\tfor (var i=0,n=arguments.length;i < n;i++){\n\t\t\t\ttext=text.replace(\"{\"+i+\"}\",arguments[i+1]);\n\t\t\t}\n\t\t\tthis._text=text;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._isPassWordMode=function(){\n\t\tvar style=this._style;\n\t\tvar password=style.password;\n\t\tif ((\"prompt\" in this)&& this['prompt']==this._text)\n\t\t\tpassword=false;\n\t\treturn password;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getPassWordTxt=function(txt){\n\t\tvar len=txt.length;\n\t\tvar word;\n\t\tword=\"\";\n\t\tfor (var j=len;j > 0;j--){\n\t\t\tword+=\"●\";\n\t\t}\n\t\treturn word;\n\t}\n\n\t/**\n\t*渲染文字。\n\t*@param begin 开始渲染的行索引。\n\t*@param visibleLineCount 渲染的行数。\n\t*/\n\t__proto.renderText=function(begin,visibleLineCount){\n\t\tvar graphics=this.graphics;\n\t\tgraphics.clear(true);\n\t\tvar ctxFont=(this.italic ? \"italic \" :\"\")+(this.bold ? \"bold \" :\"\")+this.fontSize+\"px \"+(Browser.onIPhone ? (laya.display.Text._fontFamilyMap[this.font] || this.font):this.font);\n\t\tBrowser.context.font=ctxFont;\n\t\tif (Render.isConchNode){\n\t\t\tBrowser.context.direction=this.direction;\n\t\t\tgraphics.setDirection && graphics.setDirection(this.direction);\n\t\t};\n\t\tvar padding=this.padding;\n\t\tvar startX=padding[3];\n\t\tvar textAlgin=\"left\";\n\t\tvar lines=this._lines;\n\t\tvar lineHeight=this.leading+this._charSize.height;\n\t\tvar tCurrBitmapFont=this._currBitmapFont;\n\t\tif (tCurrBitmapFont){\n\t\t\tlineHeight=this.leading+tCurrBitmapFont.getMaxHeight();\n\t\t};\n\t\tvar startY=padding[0];\n\t\tif ((!tCurrBitmapFont)&& this._width > 0 && this._textWidth <=this._width){\n\t\t\tif (this.align==\"right\"){\n\t\t\t\ttextAlgin=\"right\";\n\t\t\t\tstartX=this._width-padding[1];\n\t\t\t\t}else if (this.align==\"center\"){\n\t\t\t\ttextAlgin=\"center\";\n\t\t\t\tstartX=this._width *0.5+padding[3]-padding[1];\n\t\t\t}\n\t\t}\n\t\tif (this._height > 0){\n\t\t\tvar tempVAlign=(this._textHeight > this._height)? \"top\" :this.valign;\n\t\t\tif (tempVAlign===\"middle\")\n\t\t\t\tstartY=(this._height-visibleLineCount *lineHeight)*0.5+padding[0]-padding[2];\n\t\t\telse if (tempVAlign===\"bottom\")\n\t\t\tstartY=this._height-visibleLineCount *lineHeight-padding[2];\n\t\t};\n\t\tvar style=this._style;\n\t\tif (tCurrBitmapFont && tCurrBitmapFont.autoScaleSize){\n\t\t\tvar bitmapScale=tCurrBitmapFont.fontSize / this.fontSize;\n\t\t}\n\t\tif (this._clipPoint){\n\t\t\tgraphics.save();\n\t\t\tif (tCurrBitmapFont && tCurrBitmapFont.autoScaleSize){\n\t\t\t\tvar tClipWidth=0;\n\t\t\t\tvar tClipHeight=0;\n\t\t\t\tthis._width ? tClipWidth=(this._width-padding[3]-padding[1]):tClipWidth=this._textWidth;\n\t\t\t\tthis._height ? tClipHeight=(this._height-padding[0]-padding[2]):tClipHeight=this._textHeight;\n\t\t\t\ttClipWidth *=bitmapScale;\n\t\t\t\ttClipHeight *=bitmapScale;\n\t\t\t\tgraphics.clipRect(padding[3],padding[0],tClipWidth,tClipHeight);\n\t\t\t\t}else {\n\t\t\t\tgraphics.clipRect(padding[3],padding[0],this._width ? (this._width-padding[3]-padding[1]):this._textWidth,this._height ? (this._height-padding[0]-padding[2]):this._textHeight);\n\t\t\t}\n\t\t};\n\t\tvar password=style.password;\n\t\tif ((\"prompt\" in this)&& this['prompt']==this._text)\n\t\t\tpassword=false;\n\t\tvar x=0,y=0;\n\t\tvar end=Math.min(this._lines.length,visibleLineCount+begin)|| 1;\n\t\tfor (var i=begin;i < end;i++){\n\t\t\tvar word=lines[i];\n\t\t\tvar _word;\n\t\t\tif (password){\n\t\t\t\tvar len=word.length;\n\t\t\t\tword=\"\";\n\t\t\t\tfor (var j=len;j > 0;j--){\n\t\t\t\t\tword+=\"●\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (word===undefined)word=\"\";\n\t\t\tx=startX-(this._clipPoint ? this._clipPoint.x :0);\n\t\t\ty=startY+lineHeight *i-(this._clipPoint ? this._clipPoint.y :0);\n\t\t\tthis.underline && this.drawUnderline(textAlgin,x,y,i);\n\t\t\tif (tCurrBitmapFont){\n\t\t\t\tvar tWidth=this.width;\n\t\t\t\tif (tCurrBitmapFont.autoScaleSize){\n\t\t\t\t\ttWidth=this.width *bitmapScale;\n\t\t\t\t}\n\t\t\t\ttCurrBitmapFont.drawText(word,this,x,y,this.align,tWidth);\n\t\t\t\t}else {\n\t\t\t\tif (Render.isWebGL){\n\t\t\t\t\tthis._words || (this._words=[]);\n\t\t\t\t\t_word=this._words.length > (i-begin)? this._words[i-begin] :new WordText();\n\t\t\t\t\t_word.setText(word);\n\t\t\t\t\t}else {\n\t\t\t\t\t_word=word;\n\t\t\t\t}\n\t\t\t\tstyle.stroke ? graphics.fillBorderText(_word,x,y,ctxFont,this.color,style.strokeColor,style.stroke,textAlgin):graphics.fillText(_word,x,y,ctxFont,this.color,textAlgin);\n\t\t\t}\n\t\t}\n\t\tif (tCurrBitmapFont && tCurrBitmapFont.autoScaleSize){\n\t\t\tvar tScale=1 / bitmapScale;\n\t\t\tthis.scale(tScale,tScale);\n\t\t}\n\t\tif (this._clipPoint)\n\t\t\tgraphics.restore();\n\t\tthis._startX=startX;\n\t\tthis._startY=startY;\n\t}\n\n\t/**\n\t*绘制下划线\n\t*@param x 本行坐标\n\t*@param y 本行坐标\n\t*@param lineIndex 本行索引\n\t*/\n\t__proto.drawUnderline=function(align,x,y,lineIndex){\n\t\tvar lineWidth=this._lineWidths[lineIndex];\n\t\tswitch (align){\n\t\t\tcase 'center':\n\t\t\t\tx-=lineWidth / 2;\n\t\t\t\tbreak ;\n\t\t\tcase 'right':\n\t\t\t\tx-=lineWidth;\n\t\t\t\tbreak ;\n\t\t\tcase 'left':\n\t\t\tdefault :\n\t\t\t\tbreak ;\n\t\t\t}\n\t\ty+=this._charSize.height;\n\t\tthis._graphics.drawLine(x,y,x+lineWidth,y,this.underlineColor || this.color,1);\n\t}\n\n\t/**\n\t*<p>排版文本。</p>\n\t*<p>进行宽高计算，渲染、重绘文本。</p>\n\t*/\n\t__proto.typeset=function(){\n\t\tthis._isChanged=false;\n\t\tif (!this._text){\n\t\t\tthis._clipPoint=null;\n\t\t\tthis._textWidth=this._textHeight=0;\n\t\t\tthis.graphics.clear(true);\n\t\t\treturn;\n\t\t}\n\t\tif (Render.isConchApp){\n\t\t\tvar ctxFont=\"\"+this._getCSSStyle().font;\n\t\t\tvar style=this._getCSSStyle();\n\t\t\tif (style.stroke){\n\t\t\t\tif (this._getCSSStyle().strokeColor){\n\t\t\t\t\tctxFont+=\" \"+1+\" \"+this._getCSSStyle().strokeColor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tBrowser.context.font=ctxFont;\n\t\t\tif (Render.isConchNode){\n\t\t\t\tBrowser.context.direction=this.direction;\n\t\t\t\tthis.graphics.setDirection && this.graphics.setDirection(this.direction);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tBrowser.context.font=this._getCSSStyle().font;\n\t\t}\n\t\tthis._lines.length=0;\n\t\tthis._lineWidths.length=0;\n\t\tif (this._isPassWordMode()){\n\t\t\tthis.parseLines(this._getPassWordTxt(this._text));\n\t\t}else\n\t\tthis.parseLines(this._text);\n\t\tthis.evalTextSize();\n\t\tif (this.checkEnabledViewportOrNot())\n\t\t\tthis._clipPoint || (this._clipPoint=new Point(0,0));\n\t\telse\n\t\tthis._clipPoint=null;\n\t\tvar lineCount=this._lines.length;\n\t\tif (this.overflow !=Text.VISIBLE){\n\t\t\tvar func=this.overflow==Text.HIDDEN ? Math.floor :Math.ceil;\n\t\t\tlineCount=Math.min(lineCount,func((this.height-this.padding[0]-this.padding[2])/ (this.leading+this._charSize.height)));\n\t\t};\n\t\tvar startLine=this.scrollY / (this._charSize.height+this.leading)| 0;\n\t\tthis.renderText(startLine,lineCount);\n\t\tthis.repaint();\n\t}\n\n\t__proto.evalTextSize=function(){\n\t\tvar nw=NaN,nh=NaN;\n\t\tnw=Math.max.apply(this,this._lineWidths);\n\t\tif (this._currBitmapFont)\n\t\t\tnh=this._lines.length *(this._currBitmapFont.getMaxHeight()+this.leading)+this.padding[0]+this.padding[2];\n\t\telse\n\t\tnh=this._lines.length *(this._charSize.height+this.leading)+this.padding[0]+this.padding[2];\n\t\tif (nw !=this._textWidth || nh !=this._textHeight){\n\t\t\tthis._textWidth=nw;\n\t\t\tthis._textHeight=nh;\n\t\t\tif (!this._width || !this._height)\n\t\t\t\tthis.conchModel && this.conchModel.size(this._width || this._textWidth,this._height || this._textHeight);\n\t\t}\n\t}\n\n\t__proto.checkEnabledViewportOrNot=function(){\n\t\treturn this.overflow==Text.SCROLL && ((this._width > 0 && this._textWidth > this._width)|| (this._height > 0 && this._textHeight > this._height));\n\t}\n\n\t/**\n\t*<p>快速更改显示文本。不进行排版计算，效率较高。</p>\n\t*<p>如果只更改文字内容，不更改文字样式，建议使用此接口，能提高效率。</p>\n\t*@param text 文本内容。\n\t*/\n\t__proto.changeText=function(text){\n\t\tif (this._text!==text){\n\t\t\tthis.lang(text+\"\");\n\t\t\tif (this._graphics && this._graphics.replaceText(this._text)){\n\t\t\t\t}else {\n\t\t\t\tthis.typeset();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*分析文本换行。\n\t*/\n\t__proto.parseLines=function(text){\n\t\tvar needWordWrapOrTruncate=this.wordWrap || this.overflow==Text.HIDDEN;\n\t\tif (needWordWrapOrTruncate){\n\t\t\tvar wordWrapWidth=this.getWordWrapWidth();\n\t\t}\n\t\tif (this._currBitmapFont){\n\t\t\tthis._charSize.width=this._currBitmapFont.getMaxWidth();\n\t\t\tthis._charSize.height=this._currBitmapFont.getMaxHeight();\n\t\t\t}else {\n\t\t\tvar measureResult=Browser.context.measureText(Text._testWord);\n\t\t\tif (Render.isConchApp && measureResult.width===0 && measureResult.height===0){\n\t\t\t\tmeasureResult=Browser.context.measureText('W');\n\t\t\t}\n\t\t\tthis._charSize.width=measureResult.width;\n\t\t\tthis._charSize.height=(measureResult.height || this.fontSize);\n\t\t};\n\t\tvar lines=text.replace(/\\r\\n/g,\"\\n\").split(\"\\n\");\n\t\tfor (var i=0,n=lines.length;i < n;i++){\n\t\t\tvar line=lines[i];\n\t\t\tif (needWordWrapOrTruncate)\n\t\t\t\tthis.parseLine(line,wordWrapWidth);\n\t\t\telse {\n\t\t\t\tthis._lineWidths.push(this.getTextWidth(line));\n\t\t\t\tthis._lines.push(line);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*解析行文本。\n\t*@param line 某行的文本。\n\t*@param wordWrapWidth 文本的显示宽度。\n\t*/\n\t__proto.parseLine=function(line,wordWrapWidth){\n\t\tvar ctx=Browser.context;\n\t\tvar lines=this._lines;\n\t\tvar maybeIndex=0;\n\t\tvar execResult;\n\t\tvar charsWidth=NaN;\n\t\tvar wordWidth=NaN;\n\t\tvar startIndex=0;\n\t\tcharsWidth=this.getTextWidth(line);\n\t\tif (charsWidth <=wordWrapWidth){\n\t\t\tlines.push(line);\n\t\t\tthis._lineWidths.push(charsWidth);\n\t\t\treturn;\n\t\t}\n\t\tcharsWidth=this._charSize.width;\n\t\tmaybeIndex=Math.floor(wordWrapWidth / charsWidth);\n\t\t(maybeIndex==0)&& (maybeIndex=1);\n\t\tcharsWidth=this.getTextWidth(line.substring(0,maybeIndex));\n\t\twordWidth=charsWidth;\n\t\tfor (var j=maybeIndex,m=line.length;j < m;j++){\n\t\t\tcharsWidth=this.getTextWidth(line.charAt(j));\n\t\t\twordWidth+=charsWidth;\n\t\t\tif (wordWidth > wordWrapWidth){\n\t\t\t\tif (this.wordWrap){\n\t\t\t\t\tvar newLine=line.substring(startIndex,j);\n\t\t\t\t\tif (newLine.charCodeAt(newLine.length-1)< 255){\n\t\t\t\t\t\texecResult=/(?:\\w|-)+$/.exec(newLine);\n\t\t\t\t\t\tif (execResult){\n\t\t\t\t\t\t\tj=execResult.index+startIndex;\n\t\t\t\t\t\t\tif (execResult.index==0)\n\t\t\t\t\t\t\t\tj+=newLine.length;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnewLine=line.substring(startIndex,j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else\n\t\t\t\t\tif (Text.RightToLeft){\n\t\t\t\t\t\texecResult=/([\\u0600-\\u06FF])+$/.exec(newLine);\n\t\t\t\t\t\tif(execResult){\n\t\t\t\t\t\t\tj=execResult.index+startIndex;\n\t\t\t\t\t\t\tif (execResult.index==0)\n\t\t\t\t\t\t\t\tj+=newLine.length;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tnewLine=line.substring(startIndex,j);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlines.push(newLine);\n\t\t\t\t\tthis._lineWidths.push(wordWidth-charsWidth);\n\t\t\t\t\tstartIndex=j;\n\t\t\t\t\tif (j+maybeIndex < m){\n\t\t\t\t\t\tj+=maybeIndex;\n\t\t\t\t\t\tcharsWidth=this.getTextWidth(line.substring(startIndex,j));\n\t\t\t\t\t\twordWidth=charsWidth;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tlines.push(line.substring(startIndex,m));\n\t\t\t\t\t\tthis._lineWidths.push(this.getTextWidth(lines[lines.length-1]));\n\t\t\t\t\t\tstartIndex=-1;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t\t}else if (this.overflow==Text.HIDDEN){\n\t\t\t\t\tlines.push(line.substring(0,j));\n\t\t\t\t\tthis._lineWidths.push(this.getTextWidth(lines[lines.length-1]));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.wordWrap && startIndex !=-1){\n\t\t\tlines.push(line.substring(startIndex,m));\n\t\t\tthis._lineWidths.push(this.getTextWidth(lines[lines.length-1]));\n\t\t}\n\t}\n\n\t__proto.getTextWidth=function(text){\n\t\tif (this._currBitmapFont)\n\t\t\treturn this._currBitmapFont.getTextWidth(text);\n\t\telse\n\t\treturn Browser.context.measureText(text).width;\n\t}\n\n\t/**\n\t*获取换行所需的宽度。\n\t*/\n\t__proto.getWordWrapWidth=function(){\n\t\tvar p=this.padding;\n\t\tvar w=NaN;\n\t\tif (this._currBitmapFont && this._currBitmapFont.autoScaleSize)\n\t\t\tw=this._width *(this._currBitmapFont.fontSize / this.fontSize);\n\t\telse\n\t\tw=this._width;\n\t\tif (w <=0){\n\t\t\tw=this.wordWrap ? 100 :Browser.width;\n\t\t}\n\t\tw <=0 && (w=100);\n\t\treturn w-p[3]-p[1];\n\t}\n\n\t/**\n\t*返回字符在本类实例的父坐标系下的坐标。\n\t*@param charIndex 索引位置。\n\t*@param out （可选）输出的Point引用。\n\t*@return Point 字符在本类实例的父坐标系下的坐标。如果out参数不为空，则将结果赋值给指定的Point对象，否则创建一个新的Point对象返回。建议使用Point.TEMP作为out参数，可以省去Point对象创建和垃圾回收的开销，尤其是在需要频繁执行的逻辑中，比如帧循环和MOUSE_MOVE事件回调函数里面。\n\t*/\n\t__proto.getCharPoint=function(charIndex,out){\n\t\tthis._isChanged && Laya.timer.runCallLater(this,this.typeset);\n\t\tvar len=0,lines=this._lines,startIndex=0;\n\t\tfor (var i=0,n=lines.length;i < n;i++){\n\t\t\tlen+=lines[i].length;\n\t\t\tif (charIndex < len){\n\t\t\t\tvar line=i;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tstartIndex=len;\n\t\t};\n\t\tvar ctxFont=(this.italic ? \"italic \" :\"\")+(this.bold ? \"bold \" :\"\")+this.fontSize+\"px \"+this.font;\n\t\tBrowser.context.font=ctxFont;\n\t\tif (Render.isConchNode){\n\t\t\tBrowser.context.direction=this.direction;\n\t\t\tthis.graphics.setDirection && this.graphics.setDirection(this.direction);\n\t\t};\n\t\tvar width=this.getTextWidth(this._text.substring(startIndex,charIndex));\n\t\tvar point=out || new Point();\n\t\treturn point.setTo(this._startX+width-(this._clipPoint ? this._clipPoint.x :0),this._startY+line *(this._charSize.height+this.leading)-(this._clipPoint ? this._clipPoint.y :0));\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\tif (this._width)\n\t\t\treturn this._width;\n\t\treturn this.textWidth+this.padding[1]+this.padding[3];\n\t\t},function(value){\n\t\tif (value !=this._width){\n\t\t\tLaya.superSet(Sprite,this,'width',value);\n\t\t\tthis.isChanged=true;\n\t\t}\n\t});\n\n\t/**\n\t*表示文本的宽度，以像素为单位。\n\t*/\n\t__getset(0,__proto,'textWidth',function(){\n\t\tthis._isChanged && Laya.timer.runCallLater(this,this.typeset);\n\t\treturn this._textWidth;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\tif (this._height)return this._height;\n\t\treturn this.textHeight;\n\t\t},function(value){\n\t\tif (value !=this._height){\n\t\t\tLaya.superSet(Sprite,this,'height',value);\n\t\t\tthis.isChanged=true;\n\t\t}\n\t});\n\n\t/**\n\t*表示文本的高度，以像素为单位。\n\t*/\n\t__getset(0,__proto,'textHeight',function(){\n\t\tthis._isChanged && Laya.timer.runCallLater(this,this.typeset);\n\t\treturn this._textHeight;\n\t});\n\n\t/**\n\t*<p>边距信息。</p>\n\t*<p>数据格式：[上边距，右边距，下边距，左边距]（边距以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'padding',function(){\n\t\treturn this._getCSSStyle().padding;\n\t\t},function(value){\n\t\tthis._getCSSStyle().padding=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*<p>指定文本是否为粗体字。</p>\n\t*<p>默认值为 false，这意味着不使用粗体字。如果值为 true，则文本为粗体字。</p>\n\t*/\n\t__getset(0,__proto,'bold',function(){\n\t\treturn this._getCSSStyle().bold;\n\t\t},function(value){\n\t\tthis._getCSSStyle().bold=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**当前文本的内容字符串。*/\n\t__getset(0,__proto,'text',function(){\n\t\treturn this._text || \"\";\n\t\t},function(value){\n\t\tif (this._text!==value){\n\t\t\tthis.lang(value+\"\");\n\t\t\tthis.isChanged=true;\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t}\n\t});\n\n\t/**\n\t*<p>表示文本的颜色值。可以通过 <code>Text.defaultColor</code> 设置默认颜色。</p>\n\t*<p>默认值为黑色。</p>\n\t*/\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._getCSSStyle().color;\n\t\t},function(value){\n\t\tif (this._getCSSStyle().color !=value){\n\t\t\tthis._getCSSStyle().color=value;\n\t\t\tif (!this._isChanged && this._graphics){\n\t\t\t\tthis._graphics.replaceTextColor(this.color)\n\t\t\t\t}else {\n\t\t\t\tthis.isChanged=true;\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*<p>文本的字体名称，以字符串形式表示。</p>\n\t*<p>默认值为：\"Arial\"，可以通过Font.defaultFont设置默认字体。</p>\n\t*<p>如果运行时系统找不到设定的字体，则用系统默认的字体渲染文字，从而导致显示异常。(通常电脑上显示正常，在一些移动端因缺少设置的字体而显示异常)。</p>\n\t*@see laya.display.css.Font#defaultFamily\n\t*/\n\t__getset(0,__proto,'font',function(){\n\t\treturn this._getCSSStyle().fontFamily;\n\t\t},function(value){\n\t\tif (this._currBitmapFont){\n\t\t\tthis._currBitmapFont=null;\n\t\t\tthis.scale(1,1);\n\t\t}\n\t\tif (Text._bitmapFonts && Text._bitmapFonts[value]){\n\t\t\tthis._currBitmapFont=Text._bitmapFonts[value];\n\t\t}\n\t\tthis._getCSSStyle().fontFamily=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*<p>指定文本的字体大小（以像素为单位）。</p>\n\t*<p>默认为20像素，可以通过 <code>Text.defaultSize</code> 设置默认大小。</p>\n\t*/\n\t__getset(0,__proto,'fontSize',function(){\n\t\treturn this._getCSSStyle().fontSize;\n\t\t},function(value){\n\t\tthis._getCSSStyle().fontSize=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*<p>表示使用此文本格式的文本是否为斜体。</p>\n\t*<p>默认值为 false，这意味着不使用斜体。如果值为 true，则文本为斜体。</p>\n\t*/\n\t__getset(0,__proto,'italic',function(){\n\t\treturn this._getCSSStyle().italic;\n\t\t},function(value){\n\t\tthis._getCSSStyle().italic=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*<p>表示文本的水平显示方式。</p>\n\t*<p><b>取值：</b>\n\t*<li>\"left\"： 居左对齐显示。</li>\n\t*<li>\"center\"： 居中对齐显示。</li>\n\t*<li>\"right\"： 居右对齐显示。</li>\n\t*</p>\n\t*/\n\t__getset(0,__proto,'align',function(){\n\t\treturn this._getCSSStyle().align;\n\t\t},function(value){\n\t\tthis._getCSSStyle().align=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*<p>表示文本的垂直显示方式。</p>\n\t*<p><b>取值：</b>\n\t*<li>\"top\"： 居顶部对齐显示。</li>\n\t*<li>\"middle\"： 居中对齐显示。</li>\n\t*<li>\"bottom\"： 居底部对齐显示。</li>\n\t*</p>\n\t*/\n\t__getset(0,__proto,'valign',function(){\n\t\treturn this._getCSSStyle().valign;\n\t\t},function(value){\n\t\tthis._getCSSStyle().valign=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*<p>表示文本是否自动换行，默认为false。</p>\n\t*<p>若值为true，则自动换行；否则不自动换行。</p>\n\t*/\n\t__getset(0,__proto,'wordWrap',function(){\n\t\treturn this._getCSSStyle().wordWrap;\n\t\t},function(value){\n\t\tthis._getCSSStyle().wordWrap=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*垂直行间距（以像素为单位）。\n\t*/\n\t__getset(0,__proto,'leading',function(){\n\t\treturn this._getCSSStyle().leading;\n\t\t},function(value){\n\t\tthis._getCSSStyle().leading=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*文本背景颜色，以字符串表示。\n\t*/\n\t__getset(0,__proto,'bgColor',function(){\n\t\treturn this._getCSSStyle().backgroundColor;\n\t\t},function(value){\n\t\tthis._getCSSStyle().backgroundColor=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*文本边框背景颜色，以字符串表示。\n\t*/\n\t__getset(0,__proto,'borderColor',function(){\n\t\treturn this._getCSSStyle().borderColor;\n\t\t},function(value){\n\t\tthis._getCSSStyle().borderColor=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*<p>描边宽度（以像素为单位）。</p>\n\t*<p>默认值0，表示不描边。</p>\n\t*/\n\t__getset(0,__proto,'stroke',function(){\n\t\treturn this._getCSSStyle().stroke;\n\t\t},function(value){\n\t\tthis._getCSSStyle().stroke=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*<p>描边颜色，以字符串表示。</p>\n\t*<p>默认值为 \"#000000\"（黑色）;</p>\n\t*/\n\t__getset(0,__proto,'strokeColor',function(){\n\t\treturn this._getCSSStyle().strokeColor;\n\t\t},function(value){\n\t\tthis._getCSSStyle().strokeColor=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*\n\t*\n\t*/\n\t/**\n\t*\n\t*\n\t*/\n\t__getset(0,__proto,'direction',function(){\n\t\treturn this._getCSSStyle().direction;\n\t\t},function(value){\n\t\tthis._getCSSStyle().direction=value;\n\t\tthis.isChanged=true;\n\t});\n\n\t/**\n\t*一个布尔值，表示文本的属性是否有改变。若为true表示有改变。\n\t*/\n\t__getset(0,__proto,'isChanged',null,function(value){\n\t\tif (this._isChanged!==value){\n\t\t\tthis._isChanged=value;\n\t\t\tvalue && Laya.timer.callLater(this,this.typeset);\n\t\t}\n\t});\n\n\t/**\n\t*<p>设置横向滚动量。</p>\n\t*<p>即使设置超出滚动范围的值，也会被自动限制在可能的最大值处。</p>\n\t*/\n\t/**\n\t*获取横向滚动量。\n\t*/\n\t__getset(0,__proto,'scrollX',function(){\n\t\tif (!this._clipPoint)\n\t\t\treturn 0;\n\t\treturn this._clipPoint.x;\n\t\t},function(value){\n\t\tif (this.overflow !=Text.SCROLL || (this.textWidth < this._width || !this._clipPoint))\n\t\t\treturn;\n\t\tvalue=value < this.padding[3] ? this.padding[3] :value;\n\t\tvar maxScrollX=this._textWidth-this._width;\n\t\tvalue=value > maxScrollX ? maxScrollX :value;\n\t\tvar visibleLineCount=this._height / (this._charSize.height+this.leading)| 0+1;\n\t\tthis._clipPoint.x=value;\n\t\tthis.renderText(this._lastVisibleLineIndex,visibleLineCount);\n\t});\n\n\t/**\n\t*设置纵向滚动量（px)。即使设置超出滚动范围的值，也会被自动限制在可能的最大值处。\n\t*/\n\t/**\n\t*获取纵向滚动量。\n\t*/\n\t__getset(0,__proto,'scrollY',function(){\n\t\tif (!this._clipPoint)\n\t\t\treturn 0;\n\t\treturn this._clipPoint.y;\n\t\t},function(value){\n\t\tif (this.overflow !=Text.SCROLL || (this.textHeight < this._height || !this._clipPoint))\n\t\t\treturn;\n\t\tvalue=value < this.padding[0] ? this.padding[0] :value;\n\t\tvar maxScrollY=this._textHeight-this._height;\n\t\tvalue=value > maxScrollY ? maxScrollY :value;\n\t\tvar startLine=value / (this._charSize.height+this.leading)| 0;\n\t\tthis._lastVisibleLineIndex=startLine;\n\t\tvar visibleLineCount=(this._height / (this._charSize.height+this.leading)| 0)+1;\n\t\tthis._clipPoint.y=value;\n\t\tthis.renderText(startLine,visibleLineCount);\n\t});\n\n\t/**\n\t*获取横向可滚动最大值。\n\t*/\n\t__getset(0,__proto,'maxScrollX',function(){\n\t\treturn (this.textWidth < this._width)? 0 :this._textWidth-this._width;\n\t});\n\n\t/**\n\t*获取纵向可滚动最大值。\n\t*/\n\t__getset(0,__proto,'maxScrollY',function(){\n\t\treturn (this.textHeight < this._height)? 0 :this._textHeight-this._height;\n\t});\n\n\t__getset(0,__proto,'lines',function(){\n\t\tif (this._isChanged)\n\t\t\tthis.typeset();\n\t\treturn this._lines;\n\t});\n\n\t__getset(0,__proto,'underlineColor',function(){\n\t\treturn this._underlineColor;\n\t\t},function(value){\n\t\tthis._underlineColor=value;\n\t\tthis._isChanged=true;\n\t\tthis.typeset();\n\t});\n\n\tText.registerBitmapFont=function(name,bitmapFont){\n\t\tText._bitmapFonts || (Text._bitmapFonts={});\n\t\tText._bitmapFonts[name]=bitmapFont;\n\t}\n\n\tText.unregisterBitmapFont=function(name,destroy){\n\t\t(destroy===void 0)&& (destroy=true);\n\t\tif (Text._bitmapFonts && Text._bitmapFonts[name]){\n\t\t\tvar tBitmapFont=Text._bitmapFonts[name];\n\t\t\tif (destroy){\n\t\t\t\ttBitmapFont.destroy();\n\t\t\t}\n\t\t\tdelete Text._bitmapFonts[name];\n\t\t}\n\t}\n\n\tText.setTextRightToLeft=function(){\n\t\tvar style;\n\t\tstyle=Browser.canvas.source.style;\n\t\tstyle.display=\"none\";\n\t\tstyle.position=\"absolute\";\n\t\tstyle.direction=\"rtl\";\n\t\tRender._mainCanvas.source.style.direction=\"rtl\";\n\t\tlaya.display.Text.RightToLeft=true;\n\t\tBrowser.document.body.appendChild(Browser.canvas.source);\n\t}\n\n\tText.supportFont=function(font){\n\t\tBrowser.context.font=\"10px sans-serif\";\n\t\tvar defaultFontWidth=Browser.context.measureText(\"abcji\").width;\n\t\tBrowser.context.font=\"10px \"+font;\n\t\tvar customFontWidth=Browser.context.measureText(\"abcji\").width;\n\t\tconsole.log(defaultFontWidth,customFontWidth);\n\t\tif (defaultFontWidth===customFontWidth)return false;\n\t\telse return true;\n\t}\n\n\tText._testWord=\"游\";\n\tText.langPacks=null;\n\tText.VISIBLE=\"visible\";\n\tText.SCROLL=\"scroll\";\n\tText.HIDDEN=\"hidden\";\n\tText.CharacterCache=true;\n\tText.RightToLeft=false;\n\tText._bitmapFonts=null;\n\t__static(Text,\n\t['_fontFamilyMap',function(){return this._fontFamilyMap={\"报隶\" :\"报隶-简\",\"黑体\" :\"黑体-简\",\"楷体\" :\"楷体-简\",\"兰亭黑\" :\"兰亭黑-简\",\"隶变\" :\"隶变-简\",\"凌慧体\" :\"凌慧体-简\",\"翩翩体\" :\"翩翩体-简\",\"苹方\" :\"苹方-简\",\"手札体\" :\"手札体-简\",\"宋体\" :\"宋体-简\",\"娃娃体\" :\"娃娃体-简\",\"魏碑\" :\"魏碑-简\",\"行楷\" :\"行楷-简\",\"雅痞\" :\"雅痞-简\",\"圆体\" :\"圆体-简\"};}\n\t]);\n\treturn Text;\n})(Sprite)\n\n\n/**\n*<p> <code>Stage</code> 是舞台类，显示列表的根节点，所有显示对象都在舞台上显示。通过 Laya.stage 单例访问。</p>\n*<p>Stage提供几种适配模式，不同的适配模式会产生不同的画布大小，画布越大，渲染压力越大，所以要选择合适的适配方案。</p>\n*<p>Stage提供不同的帧率模式，帧率越高，渲染压力越大，越费电，合理使用帧率甚至动态更改帧率有利于改进手机耗电。</p>\n*/\n//class laya.display.Stage extends laya.display.Sprite\nvar Stage=(function(_super){\n\tfunction Stage(){\n\t\t/**当前焦点对象，此对象会影响当前键盘事件的派发主体。*/\n\t\tthis.focus=null;\n\t\t/**设计宽度（初始化时设置的宽度Laya.init(width,height)）*/\n\t\tthis.designWidth=0;\n\t\t/**设计高度（初始化时设置的高度Laya.init(width,height)）*/\n\t\tthis.designHeight=0;\n\t\t/**画布是否发生翻转。*/\n\t\tthis.canvasRotation=false;\n\t\t/**画布的旋转角度。*/\n\t\tthis.canvasDegree=0;\n\t\t/**\n\t\t*<p>设置是否渲染，设置为false，可以停止渲染，画面会停留到最后一次渲染上，减少cpu消耗，此设置不影响时钟。</p>\n\t\t*<p>比如非激活状态，可以设置renderingEnabled=false以节省消耗。</p>\n\t\t**/\n\t\tthis.renderingEnabled=true;\n\t\t/**是否启用屏幕适配，可以适配后，在某个时候关闭屏幕适配，防止某些操作导致的屏幕以外改变*/\n\t\tthis.screenAdaptationEnabled=true;\n\t\t/**@private */\n\t\tthis._screenMode=\"none\";\n\t\t/**@private */\n\t\tthis._scaleMode=\"noscale\";\n\t\t/**@private */\n\t\tthis._alignV=\"top\";\n\t\t/**@private */\n\t\tthis._alignH=\"left\";\n\t\t/**@private */\n\t\tthis._bgColor=\"black\";\n\t\t/**@private */\n\t\tthis._mouseMoveTime=0;\n\t\t/**@private */\n\t\tthis._renderCount=0;\n\t\t/**@private */\n\t\tthis._frameStartTime=NaN;\n\t\t/**@private */\n\t\tthis._isFocused=false;\n\t\t/**@private */\n\t\tthis._isVisibility=false;\n\t\t/**@private 3D场景*/\n\t\tthis._scenes=null;\n\t\t/**@private */\n\t\tthis._frameRate=\"fast\";\n\t\t/**使用物理分辨率作为canvas大小，会改进渲染效果，但是会降低性能*/\n\t\tthis.useRetinalCanvas=false;\n\t\tStage.__super.call(this);\n\t\tthis.offset=new Point();\n\t\tthis._canvasTransform=new Matrix();\n\t\tthis._previousOrientation=Browser.window.orientation;\n\t\tvar _$this=this;\n\t\tthis.transform=Matrix.create();\n\t\tthis._scenes=[];\n\t\tthis.mouseEnabled=true;\n\t\tthis.hitTestPrior=true;\n\t\tthis.autoSize=false;\n\t\tthis._displayedInStage=true;\n\t\tthis._isFocused=true;\n\t\tthis._isVisibility=true;\n\t\tthis.useRetinalCanvas=Config.useRetinalCanvas;\n\t\tvar window=Browser.window;\n\t\tvar _this=this;\n\t\twindow.addEventListener(\"focus\",function(){\n\t\t\t_$this._isFocused=true;\n\t\t\t_this.event(/*laya.events.Event.FOCUS*/\"focus\");\n\t\t\t_this.event(/*laya.events.Event.FOCUS_CHANGE*/\"focuschange\");\n\t\t});\n\t\twindow.addEventListener(\"blur\",function(){\n\t\t\t_$this._isFocused=false;\n\t\t\t_this.event(/*laya.events.Event.BLUR*/\"blur\");\n\t\t\t_this.event(/*laya.events.Event.FOCUS_CHANGE*/\"focuschange\");\n\t\t\tif (_this._isInputting())Input[\"inputElement\"].target.focus=false;\n\t\t});\n\t\tvar hidden=\"hidden\",state=\"visibilityState\",visibilityChange=\"visibilitychange\";\n\t\tvar document=window.document;\n\t\tif (typeof document.hidden!==\"undefined\"){\n\t\t\tvisibilityChange=\"visibilitychange\";\n\t\t\tstate=\"visibilityState\";\n\t\t\t}else if (typeof document.mozHidden!==\"undefined\"){\n\t\t\tvisibilityChange=\"mozvisibilitychange\";\n\t\t\tstate=\"mozVisibilityState\";\n\t\t\t}else if (typeof document.msHidden!==\"undefined\"){\n\t\t\tvisibilityChange=\"msvisibilitychange\";\n\t\t\tstate=\"msVisibilityState\";\n\t\t\t}else if (typeof document.webkitHidden!==\"undefined\"){\n\t\t\tvisibilityChange=\"webkitvisibilitychange\";\n\t\t\tstate=\"webkitVisibilityState\";\n\t\t}\n\t\twindow.document.addEventListener(visibilityChange,visibleChangeFun);\n\t\tfunction visibleChangeFun (){\n\t\t\tif (Browser.document[state]==\"hidden\"){\n\t\t\t\t_this._setStageVisible(false);\n\t\t\t\t}else {\n\t\t\t\t_this._setStageVisible(true);\n\t\t\t}\n\t\t}\n\t\twindow.document.addEventListener(\"qbrowserVisibilityChange\",qbroserVisibleChangeFun);\n\t\tfunction qbroserVisibleChangeFun (e){\n\t\t\t_this._setStageVisible(!e.hidden);\n\t\t}\n\t\twindow.addEventListener(\"resize\",function(){\n\t\t\tvar orientation=Browser.window.orientation;\n\t\t\tif (orientation !=null && orientation !=_$this._previousOrientation && _this._isInputting()){\n\t\t\t\tInput[\"inputElement\"].target.focus=false;\n\t\t\t}\n\t\t\t_$this._previousOrientation=orientation;\n\t\t\tif (_this._isInputting())return;\n\t\t\t_this._resetCanvas();\n\t\t});\n\t\twindow.addEventListener(\"orientationchange\",function(e){\n\t\t\t_this._resetCanvas();\n\t\t});\n\t\tthis.on(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this._onmouseMove);\n\t\tif (Browser.onMobile)this.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this._onmouseMove);\n\t}\n\n\t__class(Stage,'laya.display.Stage',_super);\n\tvar __proto=Stage.prototype;\n\t__proto._setStageVisible=function(value){\n\t\tif (this._isVisibility==value)return;\n\t\tthis._isVisibility=value;\n\t\tif (!this._isVisibility)if (this._isInputting())Input[\"inputElement\"].target.focus=false;\n\t\tthis.event(/*laya.events.Event.VISIBILITY_CHANGE*/\"visibilitychange\");\n\t}\n\n\t/**\n\t*@private\n\t*在移动端输入时，输入法弹出期间不进行画布尺寸重置。\n\t*/\n\t__proto._isInputting=function(){\n\t\treturn (Browser.onMobile && Input.isInputting);\n\t}\n\n\t/**@private */\n\t__proto._changeCanvasSize=function(){\n\t\tthis.setScreenSize(Browser.clientWidth *Browser.pixelRatio,Browser.clientHeight *Browser.pixelRatio);\n\t}\n\n\t/**@private */\n\t__proto._resetCanvas=function(){\n\t\tif (!this.screenAdaptationEnabled)return;\n\t\tvar canvas=Render._mainCanvas;\n\t\tvar canvasStyle=canvas.source.style;\n\t\tcanvas.size(1,1);\n\t\tLaya.timer.once(100,this,this._changeCanvasSize);\n\t}\n\n\t/**\n\t*设置屏幕大小，场景会根据屏幕大小进行适配。可以动态调用此方法，来更改游戏显示的大小。\n\t*@param screenWidth 屏幕宽度。\n\t*@param screenHeight 屏幕高度。\n\t*/\n\t__proto.setScreenSize=function(screenWidth,screenHeight){\n\t\tvar rotation=false;\n\t\tif (this._screenMode!==\"none\"){\n\t\t\tvar screenType=screenWidth / screenHeight < 1 ? \"vertical\" :\"horizontal\";\n\t\t\trotation=screenType!==this._screenMode;\n\t\t\tif (rotation){\n\t\t\t\tvar temp=screenHeight;\n\t\t\t\tscreenHeight=screenWidth;\n\t\t\t\tscreenWidth=temp;\n\t\t\t}\n\t\t}\n\t\tthis.canvasRotation=rotation;\n\t\tvar canvas=Render._mainCanvas;\n\t\tvar canvasStyle=canvas.source.style;\n\t\tvar mat=this._canvasTransform.identity();\n\t\tvar scaleMode=this._scaleMode;\n\t\tvar scaleX=screenWidth / this.designWidth;\n\t\tvar scaleY=screenHeight / this.designHeight;\n\t\tvar canvasWidth=Config.useRetinalCanvas?screenWidth:this.designWidth;\n\t\tvar canvasHeight=Config.useRetinalCanvas?screenHeight:this.designHeight;\n\t\tvar realWidth=screenWidth;\n\t\tvar realHeight=screenHeight;\n\t\tvar pixelRatio=Browser.pixelRatio;\n\t\tthis._width=this.designWidth;\n\t\tthis._height=this.designHeight;\n\t\tswitch (scaleMode){\n\t\t\tcase \"noscale\":\n\t\t\t\tscaleX=scaleY=1;\n\t\t\t\trealWidth=this.designWidth;\n\t\t\t\trealHeight=this.designHeight;\n\t\t\t\tbreak ;\n\t\t\tcase \"showall\":\n\t\t\t\tscaleX=scaleY=Math.min(scaleX,scaleY);\n\t\t\t\tcanvasWidth=realWidth=Math.round(this.designWidth *scaleX);\n\t\t\t\tcanvasHeight=realHeight=Math.round(this.designHeight *scaleY);\n\t\t\t\tbreak ;\n\t\t\tcase \"noborder\":\n\t\t\t\tscaleX=scaleY=Math.max(scaleX,scaleY);\n\t\t\t\trealWidth=Math.round(this.designWidth *scaleX);\n\t\t\t\trealHeight=Math.round(this.designHeight *scaleY);\n\t\t\t\tbreak ;\n\t\t\tcase \"full\":\n\t\t\t\tscaleX=scaleY=1;\n\t\t\t\tthis._width=canvasWidth=screenWidth;\n\t\t\t\tthis._height=canvasHeight=screenHeight;\n\t\t\t\tbreak ;\n\t\t\tcase \"fixedwidth\":\n\t\t\t\tscaleY=scaleX;\n\t\t\t\tthis._height=canvasHeight=Math.round(screenHeight / scaleX);\n\t\t\t\tbreak ;\n\t\t\tcase \"fixedheight\":\n\t\t\t\tscaleX=scaleY;\n\t\t\t\tthis._width=canvasWidth=Math.round(screenWidth / scaleY);\n\t\t\t\tbreak ;\n\t\t\tcase \"fixedauto\":\n\t\t\t\tif ((screenWidth / screenHeight)< (this.designWidth / this.designHeight)){\n\t\t\t\t\tscaleY=scaleX;\n\t\t\t\t\tthis._height=canvasHeight=Math.round(screenHeight / scaleX);\n\t\t\t\t\t}else {\n\t\t\t\t\tscaleX=scaleY;\n\t\t\t\t\tthis._width=canvasWidth=Math.round(screenWidth / scaleY);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tif (this.conchModel)this.conchModel.size(this._width,this._height);\n\t\tif (Config.useRetinalCanvas){\n\t\t\trealWidth=canvasWidth=screenWidth;\n\t\t\trealHeight=canvasHeight=screenHeight;\n\t\t}\n\t\tscaleX *=this.scaleX;\n\t\tscaleY *=this.scaleY;\n\t\tif (scaleX===1 && scaleY===1){\n\t\t\tthis.transform.identity();\n\t\t\t}else {\n\t\t\tthis.transform.a=this._formatData(scaleX / (realWidth / canvasWidth));\n\t\t\tthis.transform.d=this._formatData(scaleY / (realHeight / canvasHeight));\n\t\t\tthis.conchModel && this.conchModel.scale(this.transform.a,this.transform.d);\n\t\t}\n\t\tcanvas.size(canvasWidth,canvasHeight);\n\t\tRunDriver.changeWebGLSize(canvasWidth,canvasHeight);\n\t\tmat.scale(realWidth / canvasWidth / pixelRatio,realHeight / canvasHeight / pixelRatio);\n\t\tif (this._alignH===\"left\")this.offset.x=0;\n\t\telse if (this._alignH===\"right\")this.offset.x=(screenWidth-realWidth)/pixelRatio;\n\t\telse this.offset.x=(screenWidth-realWidth)*0.5 / pixelRatio;\n\t\tif (this._alignV===\"top\")this.offset.y=0;\n\t\telse if (this._alignV===\"bottom\")this.offset.y=(screenHeight-realHeight)/pixelRatio;\n\t\telse this.offset.y=(screenHeight-realHeight)*0.5 / pixelRatio;\n\t\tthis.offset.x=Math.round(this.offset.x);\n\t\tthis.offset.y=Math.round(this.offset.y);\n\t\tmat.translate(this.offset.x,this.offset.y);\n\t\tthis.canvasDegree=0;\n\t\tif (rotation){\n\t\t\tif (this._screenMode===\"horizontal\"){\n\t\t\t\tmat.rotate(Math.PI / 2);\n\t\t\t\tmat.translate(screenHeight / pixelRatio,0);\n\t\t\t\tthis.canvasDegree=90;\n\t\t\t\t}else {\n\t\t\t\tmat.rotate(-Math.PI / 2);\n\t\t\t\tmat.translate(0,screenWidth / pixelRatio);\n\t\t\t\tthis.canvasDegree=-90;\n\t\t\t}\n\t\t}\n\t\tmat.a=this._formatData(mat.a);\n\t\tmat.d=this._formatData(mat.d);\n\t\tmat.tx=this._formatData(mat.tx);\n\t\tmat.ty=this._formatData(mat.ty);\n\t\tcanvasStyle.transformOrigin=canvasStyle.webkitTransformOrigin=canvasStyle.msTransformOrigin=canvasStyle.mozTransformOrigin=canvasStyle.oTransformOrigin=\"0px 0px 0px\";\n\t\tcanvasStyle.transform=canvasStyle.webkitTransform=canvasStyle.msTransform=canvasStyle.mozTransform=canvasStyle.oTransform=\"matrix(\"+mat.toString()+\")\";\n\t\tcanvasStyle.width=canvasWidth;\n\t\tcanvasStyle.height=canvasHeight;\n\t\tmat.translate(parseInt(canvasStyle.left)|| 0,parseInt(canvasStyle.top)|| 0);\n\t\tthis.visible=true;\n\t\tthis._repaint=1;\n\t\tthis.event(/*laya.events.Event.RESIZE*/\"resize\");\n\t}\n\n\t/**@private */\n\t__proto._formatData=function(value){\n\t\tif (Math.abs(value)< 0.000001)return 0;\n\t\tif (Math.abs(1-value)< 0.001)return value > 0 ? 1 :-1;\n\t\treturn value;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.getMousePoint=function(){\n\t\treturn Point.TEMP.setTo(this.mouseX,this.mouseY);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.repaint=function(){\n\t\tthis._repaint=1;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.parentRepaint=function(){}\n\t/**@private */\n\t__proto._loop=function(){\n\t\tthis.render(Render.context,0,0);\n\t\treturn true;\n\t}\n\n\t/**@private */\n\t__proto._onmouseMove=function(e){\n\t\tthis._mouseMoveTime=Browser.now();\n\t}\n\n\t/**\n\t*<p>获得距当前帧开始后，过了多少时间，单位为毫秒。</p>\n\t*<p>可以用来判断函数内时间消耗，通过合理控制每帧函数处理消耗时长，避免一帧做事情太多，对复杂计算分帧处理，能有效降低帧率波动。</p>\n\t*/\n\t__proto.getTimeFromFrameStart=function(){\n\t\treturn Browser.now()-this._frameStartTime;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.render=function(context,x,y){\n\t\tif (this._frameRate===\"sleep\" && !Render.isConchApp){\n\t\t\tvar now=Browser.now();\n\t\t\tif (now-this._frameStartTime >=1000)this._frameStartTime=now;\n\t\t\telse return;\n\t\t}\n\t\tthis._renderCount++;\n\t\tRender.isFlash && this.repaint();\n\t\tif (!this._style.visible){\n\t\t\tif (this._renderCount % 5===0){\n\t\t\t\tStat.loopCount++;\n\t\t\t\tMouseManager.instance.runEvent();\n\t\t\t\tLaya.timer._update();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._frameStartTime=Browser.now();\n\t\tvar frameMode=this._frameRate===\"mouse\" ? (((this._frameStartTime-this._mouseMoveTime)< 2000)? \"fast\" :\"slow\"):this._frameRate;\n\t\tvar isFastMode=(frameMode!==\"slow\");\n\t\tvar isDoubleLoop=(this._renderCount % 2===0);\n\t\tStat.renderSlow=!isFastMode;\n\t\tif (isFastMode || isDoubleLoop || Render.isConchApp){\n\t\t\tStat.loopCount++;\n\t\t\tMouseManager.instance.runEvent();\n\t\t\tLaya.timer._update();\n\t\t\tRunDriver.update3DLoop();\n\t\t\tvar scene;\n\t\t\tvar i=0,n=0;\n\t\t\tif (Render.isConchNode){\n\t\t\t\tfor (i=0,n=this._scenes.length;i < n;i++){\n\t\t\t\t\tscene=this._scenes[i];\n\t\t\t\t\t(scene)&& (scene._updateSceneConch());\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tfor (i=0,n=this._scenes.length;i < n;i++){\n\t\t\t\t\tscene=this._scenes[i];\n\t\t\t\t\t(scene)&& (scene._updateScene());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (Render.isConchNode){\n\t\t\t\tvar customList=Sprite[\"CustomList\"];\n\t\t\t\tfor (i=0,n=customList.length;i < n;i++){\n\t\t\t\t\tvar customItem=customList[i];\n\t\t\t\t\tcustomItem.customRender(customItem.customContext,0,0);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (Render.isConchNode)return;\n\t\tif (this.renderingEnabled && (isFastMode || !isDoubleLoop || Render.isConchWebGL)){\n\t\t\tif (Render.isWebGL){\n\t\t\t\tcontext.clear();\n\t\t\t\t_super.prototype.render.call(this,context,x,y);\n\t\t\t\tStat._show&& Stat._sp && Stat._sp.render(context,x,y);\n\t\t\t\tRunDriver.clear(this._bgColor);\n\t\t\t\tRunDriver.beginFlush();\n\t\t\t\tcontext.flush();\n\t\t\t\tRunDriver.endFinish();\n\t\t\t\tVectorGraphManager.instance && VectorGraphManager.getInstance().endDispose();\n\t\t\t\t}else {\n\t\t\t\tRunDriver.clear(this._bgColor);\n\t\t\t\t_super.prototype.render.call(this,context,x,y);\n\t\t\t\tStat._show&& Stat._sp && Stat._sp.render(context,x,y);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._requestFullscreen=function(){\n\t\tvar element=Browser.document.documentElement;\n\t\tif (element.requestFullscreen){\n\t\t\telement.requestFullscreen();\n\t\t\t}else if (element.mozRequestFullScreen){\n\t\t\telement.mozRequestFullScreen();\n\t\t\t}else if (element.webkitRequestFullscreen){\n\t\t\telement.webkitRequestFullscreen();\n\t\t\t}else if (element.msRequestFullscreen){\n\t\t\telement.msRequestFullscreen();\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._fullScreenChanged=function(){\n\t\tLaya.stage.event(/*laya.events.Event.FULL_SCREEN_CHANGE*/\"fullscreenchange\");\n\t}\n\n\t/**退出全屏模式*/\n\t__proto.exitFullscreen=function(){\n\t\tvar document=Browser.document;\n\t\tif (document.exitFullscreen){\n\t\t\tdocument.exitFullscreen();\n\t\t\t}else if (document.mozCancelFullScreen){\n\t\t\tdocument.mozCancelFullScreen();\n\t\t\t}else if (document.webkitExitFullscreen){\n\t\t\tdocument.webkitExitFullscreen();\n\t\t}\n\t}\n\n\t/**当前视窗由缩放模式导致的 X 轴缩放系数。*/\n\t__getset(0,__proto,'clientScaleX',function(){\n\t\treturn this._transform ? this._transform.getScaleX():1;\n\t});\n\n\t//[Deprecated]\n\t__getset(0,__proto,'desginHeight',function(){\n\t\tconsole.debug(\"desginHeight已经弃用，请使用designHeight代替\");\n\t\treturn this.designHeight;\n\t});\n\n\t/**帧率类型，支持三种模式：fast-60帧(默认)，slow-30帧，mouse-30帧（鼠标活动后会自动加速到60，鼠标不动2秒后降低为30帧，以节省消耗），sleep-1帧。*/\n\t__getset(0,__proto,'frameRate',function(){\n\t\treturn this._frameRate;\n\t\t},function(value){\n\t\tthis._frameRate=value;\n\t\tif (Render.isConchApp){\n\t\t\tswitch (this._frameRate){\n\t\t\t\tcase \"slow\":\n\t\t\t\t\tBrowser.window.conch && Browser.window.conchConfig.setSlowFrame && Browser.window.conchConfig.setSlowFrame(true);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"fast\":\n\t\t\t\t\tBrowser.window.conch && Browser.window.conchConfig.setSlowFrame && Browser.window.conchConfig.setSlowFrame(false);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"mouse\":\n\t\t\t\t\tBrowser.window.conch && Browser.window.conchConfig.setMouseFrame && Browser.window.conchConfig.setMouseFrame(2000);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"sleep\":\n\t\t\t\t\tBrowser.window.conch && Browser.window.conchConfig.setLimitFPS && Browser.window.conchConfig.setLimitFPS(1);\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"Stage:frameRate invalid.\");\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t});\n\n\t/**当前视窗由缩放模式导致的 Y 轴缩放系数。*/\n\t__getset(0,__proto,'clientScaleY',function(){\n\t\treturn this._transform ? this._transform.getScaleY():1;\n\t});\n\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tthis.designWidth=value;\n\t\tLaya.superSet(Sprite,this,'width',value);\n\t\tLaya.timer.callLater(this,this._changeCanvasSize);\n\t});\n\n\t/**\n\t*<p>水平对齐方式。默认值为\"left\"。</p>\n\t*<p><ul>取值范围：\n\t*<li>\"left\" ：居左对齐；</li>\n\t*<li>\"center\" ：居中对齐；</li>\n\t*<li>\"right\" ：居右对齐；</li>\n\t*</ul></p>\n\t*/\n\t__getset(0,__proto,'alignH',function(){\n\t\treturn this._alignH;\n\t\t},function(value){\n\t\tthis._alignH=value;\n\t\tLaya.timer.callLater(this,this._changeCanvasSize);\n\t});\n\n\t/**\n\t*舞台是否获得焦点。\n\t*/\n\t__getset(0,__proto,'isFocused',function(){\n\t\treturn this._isFocused;\n\t});\n\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tthis.designHeight=value;\n\t\tLaya.superSet(Sprite,this,'height',value);\n\t\tLaya.timer.callLater(this,this._changeCanvasSize);\n\t});\n\n\t__getset(0,__proto,'transform',function(){\n\t\tif (this._tfChanged)this._adjustTransform();\n\t\treturn this._transform=this._transform|| Matrix.create();\n\t},_super.prototype._$set_transform);\n\n\t/**\n\t*舞台是否处于可见状态(是否进入后台)。\n\t*/\n\t__getset(0,__proto,'isVisibility',function(){\n\t\treturn this._isVisibility;\n\t});\n\n\t//[Deprecated]\n\t__getset(0,__proto,'desginWidth',function(){\n\t\tconsole.debug(\"desginWidth已经弃用，请使用designWidth代替\");\n\t\treturn this.designWidth;\n\t});\n\n\t/**\n\t*<p>缩放模式。默认值为 \"noscale\"。</p>\n\t*<p><ul>取值范围：\n\t*<li>\"noscale\" ：不缩放；</li>\n\t*<li>\"exactfit\" ：全屏不等比缩放；</li>\n\t*<li>\"showall\" ：最小比例缩放；</li>\n\t*<li>\"noborder\" ：最大比例缩放；</li>\n\t*<li>\"full\" ：不缩放，stage的宽高等于屏幕宽高；</li>\n\t*<li>\"fixedwidth\" ：宽度不变，高度根据屏幕比缩放；</li>\n\t*<li>\"fixedheight\" ：高度不变，宽度根据屏幕比缩放；</li>\n\t*<li>\"fixedauto\" ：根据宽高比，自动选择使用fixedwidth或fixedheight；</li>\n\t*</ul></p>\n\t*/\n\t__getset(0,__proto,'scaleMode',function(){\n\t\treturn this._scaleMode;\n\t\t},function(value){\n\t\tthis._scaleMode=value;\n\t\tLaya.timer.callLater(this,this._changeCanvasSize);\n\t});\n\n\t/**\n\t*<p>垂直对齐方式。默认值为\"top\"。</p>\n\t*<p><ul>取值范围：\n\t*<li>\"top\" ：居顶部对齐；</li>\n\t*<li>\"middle\" ：居中对齐；</li>\n\t*<li>\"bottom\" ：居底部对齐；</li>\n\t*</ul></p>\n\t*/\n\t__getset(0,__proto,'alignV',function(){\n\t\treturn this._alignV;\n\t\t},function(value){\n\t\tthis._alignV=value;\n\t\tLaya.timer.callLater(this,this._changeCanvasSize);\n\t});\n\n\t/**舞台的背景颜色，默认为黑色，null为透明。*/\n\t__getset(0,__proto,'bgColor',function(){\n\t\treturn this._bgColor;\n\t\t},function(value){\n\t\tthis._bgColor=value;\n\t\tthis.conchModel && this.conchModel.bgColor(value);\n\t\tif (Render.isWebGL){\n\t\t\tif (value){\n\t\t\t\tStage._wgColor=Color.create(value)._color;\n\t\t\t\t}else {\n\t\t\t\tStage._wgColor=null;\n\t\t\t}\n\t\t}\n\t\tif (Browser.onLimixiu){\n\t\t\tStage._wgColor=Color.create(value)._color;\n\t\t}else\n\t\tif (value){\n\t\t\tRender.canvas.style.background=value;\n\t\t\t}else {\n\t\t\tRender.canvas.style.background=\"none\";\n\t\t}\n\t});\n\n\t/**鼠标在 Stage 上的 X 轴坐标。*/\n\t__getset(0,__proto,'mouseX',function(){\n\t\treturn Math.round(MouseManager.instance.mouseX / this.clientScaleX);\n\t});\n\n\t/**鼠标在 Stage 上的 Y 轴坐标。*/\n\t__getset(0,__proto,'mouseY',function(){\n\t\treturn Math.round(MouseManager.instance.mouseY / this.clientScaleY);\n\t});\n\n\t/**\n\t*<p>场景布局类型。</p>\n\t*<p><ul>取值范围：\n\t*<li>\"none\" ：不更改屏幕</li>\n\t*<li>\"horizontal\" ：自动横屏</li>\n\t*<li>\"vertical\" ：自动竖屏</li>\n\t*</ul></p>\n\t*/\n\t__getset(0,__proto,'screenMode',function(){\n\t\treturn this._screenMode;\n\t\t},function(value){\n\t\tthis._screenMode=value;\n\t});\n\n\t__getset(0,__proto,'visible',_super.prototype._$get_visible,function(value){\n\t\tif (this.visible!==value){\n\t\t\tLaya.superSet(Sprite,this,'visible',value);\n\t\t\tvar style=Render._mainCanvas.source.style;\n\t\t\tstyle.visibility=value ? \"visible\" :\"hidden\";\n\t\t}\n\t});\n\n\t/**\n\t*<p>是否开启全屏，用户点击后进入全屏。</p>\n\t*<p>兼容性提示：部分浏览器不允许点击进入全屏，比如Iphone等。</p>\n\t*/\n\t__getset(0,__proto,'fullScreenEnabled',null,function(value){\n\t\tvar document=Browser.document;\n\t\tvar canvas=Render.canvas;\n\t\tif (value){\n\t\t\tcanvas.addEventListener('mousedown',this._requestFullscreen);\n\t\t\tcanvas.addEventListener('touchstart',this._requestFullscreen);\n\t\t\tdocument.addEventListener(\"fullscreenchange\",this._fullScreenChanged);\n\t\t\tdocument.addEventListener(\"mozfullscreenchange\",this._fullScreenChanged);\n\t\t\tdocument.addEventListener(\"webkitfullscreenchange\",this._fullScreenChanged);\n\t\t\tdocument.addEventListener(\"msfullscreenchange\",this._fullScreenChanged);\n\t\t\t}else {\n\t\t\tcanvas.removeEventListener('mousedown',this._requestFullscreen);\n\t\t\tcanvas.removeEventListener('touchstart',this._requestFullscreen);\n\t\t\tdocument.removeEventListener(\"fullscreenchange\",this._fullScreenChanged);\n\t\t\tdocument.removeEventListener(\"mozfullscreenchange\",this._fullScreenChanged);\n\t\t\tdocument.removeEventListener(\"webkitfullscreenchange\",this._fullScreenChanged);\n\t\t\tdocument.removeEventListener(\"msfullscreenchange\",this._fullScreenChanged);\n\t\t}\n\t});\n\n\tStage.SCALE_NOSCALE=\"noscale\";\n\tStage.SCALE_EXACTFIT=\"exactfit\";\n\tStage.SCALE_SHOWALL=\"showall\";\n\tStage.SCALE_NOBORDER=\"noborder\";\n\tStage.SCALE_FULL=\"full\";\n\tStage.SCALE_FIXED_WIDTH=\"fixedwidth\";\n\tStage.SCALE_FIXED_HEIGHT=\"fixedheight\";\n\tStage.SCALE_FIXED_AUTO=\"fixedauto\";\n\tStage.ALIGN_LEFT=\"left\";\n\tStage.ALIGN_RIGHT=\"right\";\n\tStage.ALIGN_CENTER=\"center\";\n\tStage.ALIGN_TOP=\"top\";\n\tStage.ALIGN_MIDDLE=\"middle\";\n\tStage.ALIGN_BOTTOM=\"bottom\";\n\tStage.SCREEN_NONE=\"none\";\n\tStage.SCREEN_HORIZONTAL=\"horizontal\";\n\tStage.SCREEN_VERTICAL=\"vertical\";\n\tStage.FRAME_FAST=\"fast\";\n\tStage.FRAME_SLOW=\"slow\";\n\tStage.FRAME_MOUSE=\"mouse\";\n\tStage.FRAME_SLEEP=\"sleep\";\n\tStage.FRAME_MOUSE_THREDHOLD=2000;\n\t__static(Stage,\n\t['_wgColor',function(){return this._wgColor=[0,0,0,1];}\n\t]);\n\treturn Stage;\n})(Sprite)\n\n\n/**\n*@private\n*/\n//class laya.media.SoundNode extends laya.display.Sprite\nvar SoundNode=(function(_super){\n\tfunction SoundNode(){\n\t\tthis.url=null;\n\t\tthis._channel=null;\n\t\tthis._tar=null;\n\t\tthis._playEvents=null;\n\t\tthis._stopEvents=null;\n\t\tSoundNode.__super.call(this);\n\t\tthis.visible=false;\n\t\tthis.on(/*laya.events.Event.ADDED*/\"added\",this,this._onParentChange);\n\t\tthis.on(/*laya.events.Event.REMOVED*/\"removed\",this,this._onParentChange);\n\t}\n\n\t__class(SoundNode,'laya.media.SoundNode',_super);\n\tvar __proto=SoundNode.prototype;\n\t/**@private */\n\t__proto._onParentChange=function(){\n\t\tthis.target=this.parent;\n\t}\n\n\t/**\n\t*播放\n\t*@param loops 循环次数\n\t*@param complete 完成回调\n\t*\n\t*/\n\t__proto.play=function(loops,complete){\n\t\t(loops===void 0)&& (loops=1);\n\t\tif (isNaN(loops)){\n\t\t\tloops=1;\n\t\t}\n\t\tif (!this.url)return;\n\t\tthis.stop();\n\t\tthis._channel=SoundManager.playSound(this.url,loops,complete);\n\t}\n\n\t/**\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tif (this._channel && !this._channel.isStopped){\n\t\t\tthis._channel.stop();\n\t\t}\n\t\tthis._channel=null;\n\t}\n\n\t/**@private */\n\t__proto._setPlayAction=function(tar,event,action,add){\n\t\t(add===void 0)&& (add=true);\n\t\tif (!this[action])return;\n\t\tif (!tar)return;\n\t\tif (add){\n\t\t\ttar.on(event,this,this[action]);\n\t\t\t}else {\n\t\t\ttar.off(event,this,this[action]);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._setPlayActions=function(tar,events,action,add){\n\t\t(add===void 0)&& (add=true);\n\t\tif (!tar)return;\n\t\tif (!events)return;\n\t\tvar eventArr=events.split(\",\");\n\t\tvar i=0,len=0;\n\t\tlen=eventArr.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tthis._setPlayAction(tar,eventArr[i],action,add);\n\t\t}\n\t}\n\n\t/**\n\t*设置触发播放的事件\n\t*@param events\n\t*\n\t*/\n\t__getset(0,__proto,'playEvent',null,function(events){\n\t\tthis._playEvents=events;\n\t\tif (!events)return;\n\t\tif (this._tar){\n\t\t\tthis._setPlayActions(this._tar,events,\"play\");\n\t\t}\n\t});\n\n\t/**\n\t*设置控制播放的对象\n\t*@param tar\n\t*\n\t*/\n\t__getset(0,__proto,'target',null,function(tar){\n\t\tif (this._tar){\n\t\t\tthis._setPlayActions(this._tar,this._playEvents,\"play\",false);\n\t\t\tthis._setPlayActions(this._tar,this._stopEvents,\"stop\",false);\n\t\t}\n\t\tthis._tar=tar;\n\t\tif (this._tar){\n\t\t\tthis._setPlayActions(this._tar,this._playEvents,\"play\",true);\n\t\t\tthis._setPlayActions(this._tar,this._stopEvents,\"stop\",true);\n\t\t}\n\t});\n\n\t/**\n\t*设置触发停止的事件\n\t*@param events\n\t*\n\t*/\n\t__getset(0,__proto,'stopEvent',null,function(events){\n\t\tthis._stopEvents=events;\n\t\tif (!events)return;\n\t\tif (this._tar){\n\t\t\tthis._setPlayActions(this._tar,events,\"stop\");\n\t\t}\n\t});\n\n\treturn SoundNode;\n})(Sprite)\n\n\n/**\n*@private\n*<code>FileBitmap</code> 是图片文件资源类。\n*/\n//class laya.resource.FileBitmap extends laya.resource.Bitmap\nvar FileBitmap=(function(_super){\n\tfunction FileBitmap(){\n\t\t/**@private 文件路径全名。*/\n\t\tthis._src=null;\n\t\t/**@private onload触发函数*/\n\t\tthis._onload=null;\n\t\t/**@private onerror触发函数*/\n\t\tthis._onerror=null;\n\t\tFileBitmap.__super.call(this);\n\t}\n\n\t__class(FileBitmap,'laya.resource.FileBitmap',_super);\n\tvar __proto=FileBitmap.prototype;\n\t/**\n\t*文件路径全名。\n\t*/\n\t__getset(0,__proto,'src',function(){\n\t\treturn this._src;\n\t\t},function(value){\n\t\tthis._src=value;\n\t});\n\n\t/**\n\t*载入完成处理函数。\n\t*/\n\t__getset(0,__proto,'onload',null,function(value){\n\t});\n\n\t/**\n\t*错误处理函数。\n\t*/\n\t__getset(0,__proto,'onerror',null,function(value){\n\t});\n\n\treturn FileBitmap;\n})(Bitmap)\n\n\n/**\n*<code>HTMLCanvas</code> 是 Html Canvas 的代理类，封装了 Canvas 的属性和方法。。请不要直接使用 new HTMLCanvas！\n*/\n//class laya.resource.HTMLCanvas extends laya.resource.Bitmap\nvar HTMLCanvas=(function(_super){\n\tfunction HTMLCanvas(type,canvas){\n\t\t//this._ctx=null;\n\t\tthis._is2D=false;\n\t\tHTMLCanvas.__super.call(this);\n\t\tvar _$this=this;\n\t\tthis._source=this;\n\t\tif (type===\"2D\" || (type===\"AUTO\" && !Render.isWebGL)){\n\t\t\tthis._is2D=true;\n\t\t\tthis._source=canvas || Browser.createElement(\"canvas\");\n\t\t\tthis._w=this._source.width;\n\t\t\tthis._h=this._source.height;\n\t\t\tvar o=this;\n\t\t\to.getContext=function (contextID,other){\n\t\t\t\tif (_$this._ctx)return _$this._ctx;\n\t\t\t\tvar ctx=_$this._ctx=_$this._source.getContext(contextID,other);\n\t\t\t\tif (ctx){\n\t\t\t\t\tctx._canvas=o;\n\t\t\t\t\tif(!Render.isFlash&&!Browser.onLimixiu)ctx.size=function (w,h){\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn ctx;\n\t\t\t}\n\t\t}\n\t\tthis.lock=true;\n\t}\n\n\t__class(HTMLCanvas,'laya.resource.HTMLCanvas',_super);\n\tvar __proto=HTMLCanvas.prototype;\n\t/**\n\t*清空画布内容。\n\t*/\n\t__proto.clear=function(){\n\t\tthis._ctx && this._ctx.clear();\n\t}\n\n\t/**\n\t*销毁。\n\t*/\n\t__proto.destroy=function(){\n\t\tthis._ctx && this._ctx.destroy();\n\t\tthis._ctx=null;\n\t\tlaya.resource.Resource.prototype.destroy.call(this);\n\t}\n\n\t/**\n\t*释放。\n\t*/\n\t__proto.release=function(){}\n\t/**\n\t*@private\n\t*设置 Canvas 渲染上下文。\n\t*@param context Canvas 渲染上下文。\n\t*/\n\t__proto._setContext=function(context){\n\t\tthis._ctx=context;\n\t}\n\n\t/**\n\t*获取 Canvas 渲染上下文。\n\t*@param contextID 上下文ID.\n\t*@param other\n\t*@return Canvas 渲染上下文 Context 对象。\n\t*/\n\t__proto.getContext=function(contextID,other){\n\t\treturn this._ctx ? this._ctx :(this._ctx=HTMLCanvas._createContext(this));\n\t}\n\n\t/**\n\t*获取内存大小。\n\t*@return 内存大小。\n\t*/\n\t__proto.getMemSize=function(){\n\t\treturn 0;\n\t}\n\n\t/**\n\t*设置宽高。\n\t*@param w 宽度。\n\t*@param h 高度。\n\t*/\n\t__proto.size=function(w,h){\n\t\tif (this._w !=w || this._h !=h ||(this._source && (this._source.width!=w || this._source.height!=h))){\n\t\t\tthis._w=w;\n\t\t\tthis._h=h;\n\t\t\tthis.memorySize=this._w *this._h *4;\n\t\t\tthis._ctx && this._ctx.size(w,h);\n\t\t\tthis._source && (this._source.height=h,this._source.width=w);\n\t\t}\n\t}\n\n\t__proto.getCanvas=function(){\n\t\treturn this._source;\n\t}\n\n\t__proto.toBase64=function(type,encoderOptions,callBack){\n\t\tif (this._source){\n\t\t\tif (Render.isConchApp && this._source.toBase64){\n\t\t\t\tthis._source.toBase64(type,encoderOptions,callBack);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar base64Data=this._source.toDataURL(type,encoderOptions);\n\t\t\t\tcallBack.call(this,base64Data);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*Canvas 渲染上下文。\n\t*/\n\t__getset(0,__proto,'context',function(){\n\t\treturn this._ctx;\n\t});\n\n\t/**\n\t*是否当作 Bitmap 对象。\n\t*/\n\t__getset(0,__proto,'asBitmap',null,function(value){\n\t});\n\n\tHTMLCanvas.create=function(type,canvas){\n\t\treturn new HTMLCanvas(type,canvas);\n\t}\n\n\tHTMLCanvas.TYPE2D=\"2D\";\n\tHTMLCanvas.TYPE3D=\"3D\";\n\tHTMLCanvas.TYPEAUTO=\"AUTO\";\n\tHTMLCanvas._createContext=null;\n\treturn HTMLCanvas;\n})(Bitmap)\n\n\n/**\n*@private\n*/\n//class laya.resource.HTMLSubImage extends laya.resource.Bitmap\nvar HTMLSubImage=(function(_super){\n\t//请不要直接使用new HTMLSubImage\n\tfunction HTMLSubImage(canvas,offsetX,offsetY,width,height,atlasImage,src,allowMerageInAtlas){\n\t\tHTMLSubImage.__super.call(this);\n\t\tthrow new Error(\"不允许new！\");\n\t}\n\n\t__class(HTMLSubImage,'laya.resource.HTMLSubImage',_super);\n\tHTMLSubImage.create=function(canvas,offsetX,offsetY,width,height,atlasImage,src,allowMerageInAtlas){\n\t\t(allowMerageInAtlas===void 0)&& (allowMerageInAtlas=false);\n\t\treturn new HTMLSubImage(canvas,offsetX,offsetY,width,height,atlasImage,src,allowMerageInAtlas);\n\t}\n\n\treturn HTMLSubImage;\n})(Bitmap)\n\n\n/**\n*<p> <code>Animation</code> 是Graphics动画类。实现了基于Graphics的动画创建、播放、控制接口。</p>\n*<p>本类使用了动画模版缓存池，它以一定的内存开销来节省CPU开销，当相同的动画模版被多次使用时，相比于每次都创建新的动画模版，使用动画模版缓存池，只需创建一次，缓存之后多次复用，从而节省了动画模版创建的开销。</p>\n*<p>动画模版缓存池，以key-value键值对存储，key可以自定义，也可以从指定的配置文件中读取，value为对应的动画模版，是一个Graphics对象数组，每个Graphics对象对应一个帧图像，动画的播放实质就是定时切换Graphics对象。</p>\n*<p>使用set source、loadImages(...)、loadAtlas(...)、loadAnimation(...)方法可以创建动画模版。使用play(...)可以播放指定动画。</p>\n*@example <caption>以下示例代码，创建了一个 <code>Text</code> 实例。</caption>\n*package\n*{\n\t*import laya.display.Animation;\n\t*import laya.net.Loader;\n\t*import laya.utils.Handler;\n\t*public class Animation_Example\n\t*{\n\t\t*public function Animation_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*init();//初始化\n\t\t\t*}\n\t\t*private function init():void\n\t\t*{\n\t\t\t*var animation:Animation=new Animation();//创建一个 Animation 类的实例对象 animation 。\n\t\t\t*animation.loadAtlas(\"resource/ani/fighter.json\");//加载图集并播放\n\t\t\t*animation.x=200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n\t\t\t*animation.y=200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n\t\t\t*animation.interval=50;//设置 animation 对象的动画播放间隔时间，单位：毫秒。\n\t\t\t*animation.play();//播放动画。\n\t\t\t*Laya.stage.addChild(animation);//将 animation 对象添加到显示列表。\n\t\t\t*}\n\t\t*}\n\t*}\n*\n*@example\n*Animation_Example();\n*function Animation_Example(){\n\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t*init();//初始化\n\t*}\n*function init()\n*{\n\t*var animation=new Laya.Animation();//创建一个 Animation 类的实例对象 animation 。\n\t*animation.loadAtlas(\"resource/ani/fighter.json\");//加载图集并播放\n\t*animation.x=200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n\t*animation.y=200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n\t*animation.interval=50;//设置 animation 对象的动画播放间隔时间，单位：毫秒。\n\t*animation.play();//播放动画。\n\t*Laya.stage.addChild(animation);//将 animation 对象添加到显示列表。\n\t*}\n*\n*@example\n*import Animation=laya.display.Animation;\n*class Animation_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*this.init();\n\t\t*}\n\t*private init():void {\n\t\t*var animation:Animation=new Laya.Animation();//创建一个 Animation 类的实例对象 animation 。\n\t\t*animation.loadAtlas(\"resource/ani/fighter.json\");//加载图集并播放\n\t\t*animation.x=200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n\t\t*animation.y=200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n\t\t*animation.interval=50;//设置 animation 对象的动画播放间隔时间，单位：毫秒。\n\t\t*animation.play();//播放动画。\n\t\t*Laya.stage.addChild(animation);//将 animation 对象添加到显示列表。\n\t\t*}\n\t*}\n*new Animation_Example();\n*/\n//class laya.display.Animation extends laya.display.AnimationPlayerBase\nvar Animation=(function(_super){\n\tfunction Animation(){\n\t\t/**@private */\n\t\tthis._frames=null;\n\t\t/**@private */\n\t\tthis._url=null;\n\t\tAnimation.__super.call(this);\n\t\tthis._setControlNode(this);\n\t}\n\n\t__class(Animation,'laya.display.Animation',_super);\n\tvar __proto=Animation.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tthis.stop();\n\t\tlaya.display.Sprite.prototype.destroy.call(this,destroyChild);\n\t\tthis._frames=null;\n\t\tthis._labels=null;\n\t}\n\n\t/**\n\t*<p>开始播放动画。会在动画模版缓存池中查找key值为name的动画模版，存在则用此动画模版初始化当前序列帧， 如果不存在，则使用当前序列帧。</p>\n\t*<p>play(...)方法被设计为在创建实例后的任何时候都可以被调用，调用后就处于播放状态，当相应的资源加载完毕、调用动画帧填充方法(set frames)或者将实例显示在舞台上时，会判断是否处于播放状态，如果是，则开始播放。</p>\n\t*<p>配合wrapMode属性，可设置动画播放顺序类型。</p>\n\t*@param start （可选）指定动画播放开始的索引(int)或帧标签(String)。帧标签可以通过addLabel(...)和removeLabel(...)进行添加和删除。\n\t*@param loop （可选）是否循环播放。\n\t*@param name （可选）动画模板在动画模版缓存池中的key，也可认为是动画名称。如果name为空，则播放当前动画序列帧；如果不为空，则在动画模版缓存池中寻找key值为name的动画模版，如果存在则用此动画模版初始化当前序列帧并播放，如果不存在，则仍然播放当前动画序列帧；如果没有当前动画的帧数据，则不播放，但该实例仍然处于播放状态。\n\t*@param showWarn（可选）是否动画不存在时打印警告\n\t*/\n\t__proto.play=function(start,loop,name,showWarn){\n\t\t(start===void 0)&& (start=0);\n\t\t(loop===void 0)&& (loop=true);\n\t\t(name===void 0)&& (name=\"\");\n\t\t(showWarn===void 0)&& (showWarn=true);\n\t\tif (name)this._setFramesFromCache(name,showWarn);\n\t\tthis._isPlaying=true;\n\t\tthis.index=((typeof start=='string'))? this._getFrameByLabel(start):start;\n\t\tthis.loop=loop;\n\t\tthis._actionName=name;\n\t\tthis._isReverse=this.wrapMode==1;\n\t\tif (this._frames && this.interval > 0){\n\t\t\tthis.timerLoop(this.interval,this,this._frameLoop,null,true,true);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._setFramesFromCache=function(name,showWarn){\n\t\t(showWarn===void 0)&& (showWarn=false);\n\t\tif (this._url)name=this._url+\"#\"+name;\n\t\tif (name && Animation.framesMap[name]){\n\t\t\tvar tAniO;\n\t\t\ttAniO=Animation.framesMap[name];\n\t\t\tif ((tAniO instanceof Array)){\n\t\t\t\tthis._frames=Animation.framesMap[name];\n\t\t\t\tthis._count=this._frames.length;\n\t\t\t\t}else {\n\t\t\t\tif (tAniO.nodeRoot){\n\t\t\t\t\tAnimation.framesMap[name]=this._parseGraphicAnimationByData(tAniO);\n\t\t\t\t\ttAniO=Animation.framesMap[name];\n\t\t\t\t}\n\t\t\t\tthis._frames=tAniO.frames;\n\t\t\t\tthis._count=this._frames.length;\n\t\t\t\tif (!this._frameRateChanged)this._interval=tAniO.interval;\n\t\t\t\tthis._labels=this._copyLabels(tAniO.labels);\n\t\t\t}\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\tif (showWarn)console.log(\"ani not found:\",name);\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**@private */\n\t__proto._copyLabels=function(labels){\n\t\tif (!labels)return null;\n\t\tvar rst;\n\t\trst={};\n\t\tvar key;\n\t\tfor (key in labels){\n\t\t\trst[key]=Utils.copyArray([],labels[key]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\t/**@private */\n\t__proto._frameLoop=function(){\n\t\tif (this._style.visible && this._style.alpha > 0.01){\n\t\t\t_super.prototype._frameLoop.call(this);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._displayToIndex=function(value){\n\t\tif (this._frames)this.graphics=this._frames[value];\n\t}\n\n\t/**\n\t*停止动画播放，并清理对象属性。之后可存入对象池，方便对象复用。\n\t*/\n\t__proto.clear=function(){\n\t\tthis.stop();\n\t\tthis.graphics=null;\n\t\tthis._frames=null;\n\t\tthis._labels=null;\n\t}\n\n\t/**\n\t*<p>根据指定的动画模版初始化当前动画序列帧。选择动画模版的过程如下：1. 动画模版缓存池中key为cacheName的动画模版；2. 如果不存在，则加载指定的图片集合并创建动画模版。注意：只有指定不为空的cacheName，才能将创建好的动画模版以此为key缓存到动画模版缓存池，否则不进行缓存。</p>\n\t*<p>动画模版缓存池是以一定的内存开销来节省CPU开销，当相同的动画模版被多次使用时，相比于每次都创建新的动画模版，使用动画模版缓存池，只需创建一次，缓存之后多次复用，从而节省了动画模版创建的开销。</p>\n\t*<p>因为返回值为Animation对象本身，所以可以使用如下语法：ani.loadImages(...).loadImages(...).play(...);。</p>\n\t*@param urls 图片路径集合。需要创建动画模版时，会以此为数据源。参数形如：[url1,url2,url3,...]。\n\t*@param cacheName （可选）动画模板在动画模版缓存池中的key。如果此参数不为空，表示使用动画模版缓存池。如果动画模版缓存池中存在key为cacheName的动画模版，则使用此模版。否则，创建新的动画模版，如果cacheName不为空，则以cacheName为key缓存到动画模版缓存池中，如果cacheName为空，不进行缓存。\n\t*@return 返回Animation对象本身。\n\t*/\n\t__proto.loadImages=function(urls,cacheName){\n\t\t(cacheName===void 0)&& (cacheName=\"\");\n\t\tthis._url=\"\";\n\t\tif (!this._setFramesFromCache(cacheName)){\n\t\t\tthis.frames=Animation.framesMap[cacheName] ? Animation.framesMap[cacheName] :Animation.createFrames(urls,cacheName);\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*<p>根据指定的动画模版初始化当前动画序列帧。选择动画模版的过程如下：1. 动画模版缓存池中key为cacheName的动画模版；2. 如果不存在，则加载指定的图集并创建动画模版。</p>\n\t*<p>注意：只有指定不为空的cacheName，才能将创建好的动画模版以此为key缓存到动画模版缓存池，否则不进行缓存。</p>\n\t*<p>动画模版缓存池是以一定的内存开销来节省CPU开销，当相同的动画模版被多次使用时，相比于每次都创建新的动画模版，使用动画模版缓存池，只需创建一次，缓存之后多次复用，从而节省了动画模版创建的开销。</p>\n\t*<p>因为返回值为Animation对象本身，所以可以使用如下语法：ani.loadAtlas(...).loadAtlas(...).play(...);。</p>\n\t*@param url 图集路径。需要创建动画模版时，会以此为数据源。\n\t*@param loaded （可选）使用指定图集初始化动画完毕的回调。\n\t*@param cacheName （可选）动画模板在动画模版缓存池中的key。如果此参数不为空，表示使用动画模版缓存池。如果动画模版缓存池中存在key为cacheName的动画模版，则使用此模版。否则，创建新的动画模版，如果cacheName不为空，则以cacheName为key缓存到动画模版缓存池中，如果cacheName为空，不进行缓存。\n\t*@return 返回动画本身。\n\t*/\n\t__proto.loadAtlas=function(url,loaded,cacheName){\n\t\t(cacheName===void 0)&& (cacheName=\"\");\n\t\tthis._url=\"\";\n\t\tvar _this_=this;\n\t\tfunction onLoaded (loadUrl){\n\t\t\tif (url===loadUrl){\n\t\t\t\t_this_.frames=Animation.framesMap[cacheName] ? Animation.framesMap[cacheName] :Animation.createFrames(url,cacheName);\n\t\t\t\tif (loaded)loaded.run();\n\t\t\t}\n\t\t}\n\t\tif (!_this_._setFramesFromCache(cacheName)){\n\t\t\tif (Loader.getAtlas(url))onLoaded(url);\n\t\t\telse Laya.loader.load(url,Handler.create(null,onLoaded,[url]),null,/*laya.net.Loader.ATLAS*/\"atlas\");\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*<p>加载并解析由LayaAir IDE制作的动画文件，此文件中可能包含多个动画。默认帧率为在IDE中设计的帧率，如果调用过set interval，则使用此帧间隔对应的帧率。加载后创建动画模版，并缓存到动画模版缓存池，key \"url#动画名称\" 对应相应动画名称的动画模板，key \"url#\" 对应动画模版集合的默认动画模版。</p>\n\t*<p>注意：如果调用本方法前，还没有预加载动画使用的图集，请将atlas参数指定为对应的图集路径，否则会导致动画创建失败。</p>\n\t*<p>动画模版缓存池是以一定的内存开销来节省CPU开销，当相同的动画模版被多次使用时，相比于每次都创建新的动画模版，使用动画模版缓存池，只需创建一次，缓存之后多次复用，从而节省了动画模版创建的开销。</p>\n\t*<p>因为返回值为Animation对象本身，所以可以使用如下语法：ani.loadAnimation(...).loadAnimation(...).play(...);。</p>\n\t*@param url 动画文件路径。可由LayaAir IDE创建并发布。\n\t*@param loaded （可选）使用指定动画资源初始化动画完毕的回调。\n\t*@param atlas （可选）动画用到的图集地址（可选）。\n\t*@return 返回动画本身。\n\t*/\n\t__proto.loadAnimation=function(url,loaded,atlas){\n\t\tthis._url=url;\n\t\tvar _this_=this;\n\t\tif (!this._actionName)this._actionName=\"\";\n\t\tif (!_this_._setFramesFromCache(this._actionName)){\n\t\t\tif (!atlas || Loader.getAtlas(atlas)){\n\t\t\t\tthis._loadAnimationData(url,loaded,atlas);\n\t\t\t\t}else {\n\t\t\t\tLaya.loader.load(atlas,Handler.create(this,this._loadAnimationData,[url,loaded,atlas]),null,/*laya.net.Loader.ATLAS*/\"atlas\")\n\t\t\t}\n\t\t\t}else {\n\t\t\t_this_._setFramesFromCache(this._actionName,true);\n\t\t\tthis.index=0;\n\t\t\tif (loaded)loaded.run();\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**@private */\n\t__proto._loadAnimationData=function(url,loaded,atlas){\n\t\tvar _$this=this;\n\t\tif (atlas && !Loader.getAtlas(atlas)){\n\t\t\tconsole.warn(\"atlas load fail:\"+atlas);\n\t\t\treturn;\n\t\t};\n\t\tvar _this_=this;\n\t\tfunction onLoaded (loadUrl){\n\t\t\tif (!Loader.getRes(loadUrl))return;\n\t\t\tif (url===loadUrl){\n\t\t\t\tvar tAniO;\n\t\t\t\tif (!Animation.framesMap[url+\"#\"]){\n\t\t\t\t\tvar aniData=_this_._parseGraphicAnimation(Loader.getRes(url));\n\t\t\t\t\tif (!aniData)return;\n\t\t\t\t\tvar aniList=aniData.animationList;\n\t\t\t\t\tvar i=0,len=aniList.length;\n\t\t\t\t\tvar defaultO;\n\t\t\t\t\tfor (i=0;i < len;i++){\n\t\t\t\t\t\ttAniO=aniList[i];\n\t\t\t\t\t\tAnimation.framesMap[url+\"#\"+tAniO.name]=tAniO;\n\t\t\t\t\t\tif (!defaultO)defaultO=tAniO;\n\t\t\t\t\t}\n\t\t\t\t\tif (defaultO){\n\t\t\t\t\t\tAnimation.framesMap[url+\"#\"]=defaultO;\n\t\t\t\t\t\t_this_._setFramesFromCache(_$this._actionName,true);\n\t\t\t\t\t\t_$this.index=0;\n\t\t\t\t\t}\n\t\t\t\t\t_$this._checkResumePlaying();\n\t\t\t\t\t}else {\n\t\t\t\t\t_this_._setFramesFromCache(_$this._actionName,true);\n\t\t\t\t\t_$this.index=0;\n\t\t\t\t\t_$this._checkResumePlaying();\n\t\t\t\t}\n\t\t\t\tif (loaded)loaded.run();\n\t\t\t}\n\t\t}\n\t\tif (Loader.getRes(url))onLoaded(url);\n\t\telse Laya.loader.load(url,Handler.create(null,onLoaded,[url]),null,/*laya.net.Loader.JSON*/\"json\");\n\t\tLoader.clearRes(url);\n\t}\n\n\t/**@private */\n\t__proto._parseGraphicAnimation=function(animationData){\n\t\treturn GraphicAnimation.parseAnimationData(animationData);\n\t}\n\n\t/**@private */\n\t__proto._parseGraphicAnimationByData=function(animationObject){\n\t\treturn GraphicAnimation.parseAnimationByData(animationObject);\n\t}\n\n\t/**\n\t*当前动画的帧图像数组。本类中，每个帧图像是一个Graphics对象，而动画播放就是定时切换Graphics对象的过程。\n\t*/\n\t__getset(0,__proto,'frames',function(){\n\t\treturn this._frames;\n\t\t},function(value){\n\t\tthis._frames=value;\n\t\tif (value){\n\t\t\tthis._count=value.length;\n\t\t\tif (this._isPlaying)this.play(this._index,this.loop,this._actionName);\n\t\t\telse this.index=this._index;\n\t\t}\n\t});\n\n\t/**\n\t*是否自动播放，默认为false。如果设置为true，则动画被创建并添加到舞台后自动播放。\n\t*/\n\t__getset(0,__proto,'autoPlay',null,function(value){\n\t\tif (value)this.play();\n\t\telse this.stop();\n\t});\n\n\t/**\n\t*<p>动画数据源。</p>\n\t*<p>类型如下：<br/>\n\t*1. LayaAir IDE动画文件路径：使用此类型需要预加载所需的图集资源，否则会创建失败，如果不想预加载或者需要创建完毕的回调，请使用loadAnimation(...)方法；<br/>\n\t*2. 图集路径：使用此类型创建的动画模版不会被缓存到动画模版缓存池中，如果需要缓存或者创建完毕的回调，请使用loadAtlas(...)方法；<br/>\n\t*3. 图片路径集合：使用此类型创建的动画模版不会被缓存到动画模版缓存池中，如果需要缓存，请使用loadImages(...)方法。</p>\n\t*@param value 数据源。比如：图集：\"xx/a1.atlas\"；图片集合：\"a1.png,a2.png,a3.png\"；LayaAir IDE动画\"xx/a1.ani\"。\n\t*/\n\t__getset(0,__proto,'source',null,function(value){\n\t\tif (value.indexOf(\".ani\")>-1)this.loadAnimation(value);\n\t\telse if (value.indexOf(\".json\")>-1 || value.indexOf(\"als\")>-1 || value.indexOf(\"atlas\")>-1)this.loadAtlas(value);\n\t\telse this.loadImages(value.split(\",\"));\n\t});\n\n\t/**\n\t*设置自动播放的动画名称，在LayaAir IDE中可以创建的多个动画组成的动画集合，选择其中一个动画名称进行播放。\n\t*/\n\t__getset(0,__proto,'autoAnimation',null,function(value){\n\t\tthis.play(0,true,value,false);\n\t});\n\n\tAnimation.createFrames=function(url,name){\n\t\tvar arr,i=0,n=0,g;\n\t\tif ((typeof url=='string')){\n\t\t\tvar atlas=Loader.getAtlas(url);\n\t\t\tif (atlas && atlas.length){\n\t\t\t\tarr=[];\n\t\t\t\tfor (i=0,n=atlas.length;i < n;i++){\n\t\t\t\t\tg=new RunDriver.createGraphics();\n\t\t\t\t\tg.drawTexture(Loader.getRes(atlas[i]),0,0);\n\t\t\t\t\tarr.push(g);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else if ((url instanceof Array)){\n\t\t\tarr=[];\n\t\t\tfor (i=0,n=url.length;i < n;i++){\n\t\t\t\tg=new RunDriver.createGraphics();\n\t\t\t\tg.loadImage(url[i],0,0);\n\t\t\t\tarr.push(g);\n\t\t\t}\n\t\t}\n\t\tif (name)Animation.framesMap[name]=arr;\n\t\treturn arr;\n\t}\n\n\tAnimation.clearCache=function(key){\n\t\tvar cache=Animation.framesMap;\n\t\tvar val;\n\t\tvar key2=key+\"#\";\n\t\tfor (val in cache){\n\t\t\tif (val===key || val.indexOf(key2)==0){\n\t\t\t\tdelete Animation.framesMap[val];\n\t\t\t}\n\t\t}\n\t}\n\n\tAnimation.framesMap={};\n\treturn Animation;\n})(AnimationPlayerBase)\n\n\n/**\n*关键帧动画播放类。\n*/\n//class laya.display.FrameAnimation extends laya.display.AnimationPlayerBase\nvar FrameAnimation=(function(_super){\n\tfunction FrameAnimation(){\n\t\t/**\n\t\t*@private\n\t\t*id对象表\n\t\t*/\n\t\tthis._targetDic=null;\n\t\t/**\n\t\t*@private\n\t\t*动画数据\n\t\t*/\n\t\tthis._animationData=null;\n\t\t/**@private */\n\t\tthis._animationNewFrames=null;\n\t\tFrameAnimation.__super.call(this);\n\t\tif (FrameAnimation._sortIndexFun==null){\n\t\t\tFrameAnimation._sortIndexFun=MathUtil.sortByKey(\"index\",false,true);\n\t\t}\n\t}\n\n\t__class(FrameAnimation,'laya.display.FrameAnimation',_super);\n\tvar __proto=FrameAnimation.prototype;\n\t/**\n\t*@private\n\t*初始化动画数据\n\t*@param targetDic 对象表\n\t*@param animationData 动画数据\n\t*\n\t*/\n\t__proto._setUp=function(targetDic,animationData){\n\t\tthis._labels=null;\n\t\tthis._animationNewFrames=null;\n\t\tthis._targetDic=targetDic;\n\t\tthis._animationData=animationData;\n\t\tthis.interval=1000 / animationData.frameRate;\n\t\tif (animationData.parsed){\n\t\t\tthis._count=animationData.count;\n\t\t\tthis._labels=animationData.labels;\n\t\t\tthis._animationNewFrames=animationData.animationNewFrames;\n\t\t\t}else {\n\t\t\tthis._animationNewFrames=[];\n\t\t\tthis._calculateDatas();\n\t\t}\n\t\tanimationData.parsed=true;\n\t\tanimationData.labels=this._labels;\n\t\tanimationData.count=this._count;\n\t\tanimationData.animationNewFrames=this._animationNewFrames;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.clear=function(){\n\t\t_super.prototype.clear.call(this);\n\t\tthis._targetDic=null;\n\t\tthis._animationData=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto._displayToIndex=function(value){\n\t\tif (!this._animationData)return;\n\t\tif (value < 0)value=0;\n\t\tif (value > this._count)value=this._count;\n\t\tvar nodes=this._animationData.nodes,i=0,len=nodes.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tthis._displayNodeToFrame(nodes[i],value);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*将节点设置到某一帧的状态\n\t*@param node 节点ID\n\t*@param frame\n\t*@param targetDic 节点表\n\t*\n\t*/\n\t__proto._displayNodeToFrame=function(node,frame,targetDic){\n\t\tif (!targetDic)targetDic=this._targetDic;\n\t\tvar target=targetDic[node.target];\n\t\tif (!target){\n\t\t\treturn;\n\t\t};\n\t\tvar frames=node.frames,key,propFrames,value;\n\t\tvar keys=node.keys,i=0,len=keys.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tkey=keys[i];\n\t\t\tpropFrames=frames[key];\n\t\t\tif (propFrames.length > frame){\n\t\t\t\tvalue=propFrames[frame];\n\t\t\t\t}else {\n\t\t\t\tvalue=propFrames[propFrames.length-1];\n\t\t\t}\n\t\t\ttarget[key]=value;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*计算帧数据\n\t*\n\t*/\n\t__proto._calculateDatas=function(){\n\t\tif (!this._animationData)return;\n\t\tvar nodes=this._animationData.nodes,i=0,len=nodes.length,tNode;\n\t\tthis._count=0;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttNode=nodes[i];\n\t\t\tthis._calculateNodeKeyFrames(tNode);\n\t\t}\n\t\tthis._count+=1;\n\t}\n\n\t/**\n\t*@private\n\t*计算某个节点的帧数据\n\t*@param node\n\t*\n\t*/\n\t__proto._calculateNodeKeyFrames=function(node){\n\t\tvar keyFrames=node.keyframes,key,tKeyFrames,target=node.target;\n\t\tif (!node.frames){\n\t\t\tnode.frames={};\n\t\t}\n\t\tif (!node.keys){\n\t\t\tnode.keys=[];\n\t\t\t}else {\n\t\t\tnode.keys.length=0;\n\t\t}\n\t\tif (!node.initValues){\n\t\t\tnode.initValues={};\n\t\t}\n\t\tfor (key in keyFrames){\n\t\t\ttKeyFrames=keyFrames[key];\n\t\t\tif (!node.frames[key]){\n\t\t\t\tnode.frames[key]=[];\n\t\t\t}\n\t\t\tif (this._targetDic && this._targetDic[target]){\n\t\t\t\tnode.initValues[key]=this._targetDic[target][key];\n\t\t\t}\n\t\t\ttKeyFrames.sort(FrameAnimation._sortIndexFun);\n\t\t\tnode.keys.push(key);\n\t\t\tthis._calculateNodePropFrames(tKeyFrames,node.frames[key],key,target);\n\t\t}\n\t}\n\n\t/**\n\t*将动画控制对象还原到动画控制之前的状态\n\t*/\n\t__proto.resetToInitState=function(){\n\t\tif (!this._targetDic)return;\n\t\tif (!this._animationData)return;\n\t\tvar nodes=this._animationData.nodes,i=0,len=nodes.length;\n\t\tvar tNode;\n\t\tvar initValues;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttNode=nodes[i];\n\t\t\tinitValues=tNode.initValues;\n\t\t\tif (!initValues)continue ;\n\t\t\tvar target=this._targetDic[tNode.target];\n\t\t\tif (!target)continue ;\n\t\t\tvar key;\n\t\t\tfor (key in initValues){\n\t\t\t\ttarget[key]=initValues[key];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*计算节点某个属性的帧数据\n\t*@param keyframes\n\t*@param frames\n\t*@param key\n\t*@param target\n\t*\n\t*/\n\t__proto._calculateNodePropFrames=function(keyframes,frames,key,target){\n\t\tvar i=0,len=keyframes.length-1;\n\t\tframes.length=keyframes[len].index+1;\n\t\tfor (i=0;i < len;i++){\n\t\t\tthis._dealKeyFrame(keyframes[i]);\n\t\t\tthis._calculateFrameValues(keyframes[i],keyframes[i+1],frames);\n\t\t}\n\t\tif (len==0){\n\t\t\tframes[keyframes[0].index]=keyframes[0].value;\n\t\t\tif (this._animationNewFrames)\n\t\t\t\tthis._animationNewFrames[keyframes[0].index]=true;\n\t\t}\n\t\tthis._dealKeyFrame(keyframes[i]);\n\t}\n\n\t/**\n\t*@private\n\t*\n\t*/\n\t__proto._dealKeyFrame=function(keyFrame){\n\t\tif (keyFrame.label && keyFrame.label !=\"\")this.addLabel(keyFrame.label,keyFrame.index);\n\t}\n\n\t/**\n\t*@private\n\t*计算两个关键帧直接的帧数据\n\t*@param startFrame\n\t*@param endFrame\n\t*@param result\n\t*\n\t*/\n\t__proto._calculateFrameValues=function(startFrame,endFrame,result){\n\t\tvar i=0,easeFun;\n\t\tvar start=startFrame.index,end=endFrame.index;\n\t\tvar startValue=startFrame.value;\n\t\tvar dValue=endFrame.value-startFrame.value;\n\t\tvar dLen=end-start;\n\t\tif (end > this._count)this._count=end;\n\t\tif (startFrame.tween){\n\t\t\teaseFun=Ease[startFrame.tweenMethod];\n\t\t\tif (easeFun==null){\n\t\t\t\teaseFun=Ease.linearNone;\n\t\t\t}\n\t\t\tfor (i=start;i < end;i++){\n\t\t\t\tresult[i]=easeFun(i-start,startValue,dValue,dLen);\n\t\t\t\tif (this._animationNewFrames){\n\t\t\t\t\tthis._animationNewFrames[i]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (i=start;i < end;i++){\n\t\t\t\tresult[i]=startValue;\n\t\t\t}\n\t\t}\n\t\tif (this._animationNewFrames){\n\t\t\tthis._animationNewFrames[startFrame.index]=true;\n\t\t\tthis._animationNewFrames[endFrame.index]=true;\n\t\t}\n\t\tresult[endFrame.index]=endFrame.value;\n\t}\n\n\tFrameAnimation._sortIndexFun=null;\n\treturn FrameAnimation;\n})(AnimationPlayerBase)\n\n\n/**\n*<p><code>Input</code> 类用于创建显示对象以显示和输入文本。</p>\n*<p>Input 类封装了原生的文本输入框，由于不同浏览器的差异，会导致此对象的默认文本的位置与用户点击输入时的文本的位置有少许的偏差。</p>\n*/\n//class laya.display.Input extends laya.display.Text\nvar Input=(function(_super){\n\tfunction Input(){\n\t\t/**@private */\n\t\tthis._focus=false;\n\t\t/**@private */\n\t\tthis._multiline=false;\n\t\t/**@private */\n\t\tthis._editable=true;\n\t\t/**@private */\n\t\tthis._restrictPattern=null;\n\t\tthis._type=\"text\";\n\t\t/**输入提示符。*/\n\t\tthis._prompt='';\n\t\t/**输入提示符颜色。*/\n\t\tthis._promptColor=\"#A9A9A9\";\n\t\tthis._originColor=\"#000000\";\n\t\tthis._content='';\n\t\tInput.__super.call(this);\n\t\tthis._maxChars=1E5;\n\t\tthis._width=100;\n\t\tthis._height=20;\n\t\tthis.multiline=false;\n\t\tthis.overflow=Text.SCROLL;\n\t\tthis.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this._onMouseDown);\n\t\tthis.on(/*laya.events.Event.UNDISPLAY*/\"undisplay\",this,this._onUnDisplay);\n\t}\n\n\t__class(Input,'laya.display.Input',_super);\n\tvar __proto=Input.prototype;\n\t/**\n\t*设置光标位置和选取字符。\n\t*@param startIndex 光标起始位置。\n\t*@param endIndex 光标结束位置。\n\t*/\n\t__proto.setSelection=function(startIndex,endIndex){\n\t\tthis.focus=true;\n\t\tlaya.display.Input.inputElement.selectionStart=startIndex;\n\t\tlaya.display.Input.inputElement.selectionEnd=endIndex;\n\t}\n\n\t__proto._onUnDisplay=function(e){\n\t\tthis.focus=false;\n\t}\n\n\t__proto._onMouseDown=function(e){\n\t\tthis.focus=true;\n\t}\n\n\t/**\n\t*在输入期间，如果 Input 实例的位置改变，调用_syncInputTransform同步输入框的位置。\n\t*/\n\t__proto._syncInputTransform=function(){\n\t\tvar inputElement=this.nativeInput;\n\t\tvar transform=Utils.getTransformRelativeToWindow(this,this.padding[3],this.padding[0]);\n\t\tvar inputWid=this._width-this.padding[1]-this.padding[3];\n\t\tvar inputHei=this._height-this.padding[0]-this.padding[2];\n\t\tif (Render.isConchApp){\n\t\t\tinputElement.setScale(transform.scaleX,transform.scaleY);\n\t\t\tinputElement.setSize(inputWid,inputHei);\n\t\t\tinputElement.setPos(transform.x,transform.y);\n\t\t\t}else {\n\t\t\tInput.inputContainer.style.transform=Input.inputContainer.style.webkitTransform=\"scale(\"+transform.scaleX+\",\"+transform.scaleY+\") rotate(\"+(Laya.stage.canvasDegree)+\"deg)\";\n\t\t\tinputElement.style.width=inputWid+'px';\n\t\t\tinputElement.style.height=inputHei+'px';\n\t\t\tInput.inputContainer.style.left=transform.x+'px';\n\t\t\tInput.inputContainer.style.top=transform.y+'px';\n\t\t}\n\t}\n\n\t/**选中当前实例的所有文本。*/\n\t__proto.select=function(){\n\t\tthis.nativeInput.select();\n\t}\n\n\t__proto._setInputMethod=function(){\n\t\tInput.input.parentElement && (Input.inputContainer.removeChild(Input.input));\n\t\tInput.area.parentElement && (Input.inputContainer.removeChild(Input.area));\n\t\tInput.inputElement=(this._multiline ? Input.area :Input.input);\n\t\tInput.inputContainer.appendChild(Input.inputElement);\n\t\tif (Text.RightToLeft){\n\t\t\tInput.inputElement.style.direction=\"rtl\";\n\t\t}\n\t}\n\n\t__proto._focusIn=function(){\n\t\tlaya.display.Input.isInputting=true;\n\t\tvar input=this.nativeInput;\n\t\tthis._focus=true;\n\t\tvar cssStyle=input.style;\n\t\tcssStyle.whiteSpace=(this.wordWrap ? \"pre-wrap\" :\"nowrap\");\n\t\tthis._setPromptColor();\n\t\tinput.readOnly=!this._editable;\n\t\tif (Render.isConchApp){\n\t\t\tinput.setType(this._type);\n\t\t\tinput.setForbidEdit(!this._editable);\n\t\t}\n\t\tinput.maxLength=this._maxChars;\n\t\tvar padding=this.padding;\n\t\tinput.type=this._type;\n\t\tinput.value=this._content;\n\t\tinput.placeholder=this._prompt;\n\t\tLaya.stage.off(/*laya.events.Event.KEY_DOWN*/\"keydown\",this,this._onKeyDown);\n\t\tLaya.stage.on(/*laya.events.Event.KEY_DOWN*/\"keydown\",this,this._onKeyDown);\n\t\tLaya.stage.focus=this;\n\t\tthis.event(/*laya.events.Event.FOCUS*/\"focus\");\n\t\tif (Browser.onPC)input.focus();\n\t\tif(!Browser.onMiniGame && !Browser.onBDMiniGame && !Browser.onQGMiniGame && !Browser.onVVMiniGame && !Browser.onBLMiniGame && !Browser.onAlipayMiniGame && !Browser.onTTMiniGame && !Browser.onHWMiniGame && !Browser.onTBMiniGame){\n\t\t\tvar temp=this._text;\n\t\t\tthis._text=null;\n\t\t}\n\t\tthis.typeset();\n\t\tinput.setColor(this._originColor);\n\t\tif(input.setBgColor)\n\t\t\tinput.setBgColor(this.bgColor);\n\t\tinput.setFontSize(this.fontSize);\n\t\tinput.setFontFace(Browser.onIPhone ? (Text._fontFamilyMap[this.font] || this.font):this.font);\n\t\tif (Render.isConchApp){\n\t\t\tinput.setMultiAble && input.setMultiAble(this._multiline);\n\t\t}\n\t\tcssStyle.lineHeight=(this.leading+this.fontSize)+\"px\";\n\t\tcssStyle.fontStyle=(this.italic ? \"italic\" :\"normal\");\n\t\tcssStyle.fontWeight=(this.bold ? \"bold\" :\"normal\");\n\t\tcssStyle.textAlign=this.align;\n\t\tcssStyle.padding=\"0 0\";\n\t\tthis._syncInputTransform();\n\t\tif (!Render.isConchApp && Browser.onPC)\n\t\t\tLaya.timer.frameLoop(1,this,this._syncInputTransform);\n\t}\n\n\t// 设置DOM输入框提示符颜色。\n\t__proto._setPromptColor=function(){\n\t\tInput.promptStyleDOM=Browser.getElementById(\"promptStyle\");\n\t\tif (!Input.promptStyleDOM){\n\t\t\tInput.promptStyleDOM=Browser.createElement(\"style\");\n\t\t\tInput.promptStyleDOM.setAttribute(\"id\",\"promptStyle\");\n\t\t\tBrowser.document.head.appendChild(Input.promptStyleDOM);\n\t\t}\n\t\tInput.promptStyleDOM.innerText=\"input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {\"+\"color:\"+this._promptColor+\"}\"+\"input:-moz-placeholder, textarea:-moz-placeholder {\"+\"color:\"+this._promptColor+\"}\"+\"input::-moz-placeholder, textarea::-moz-placeholder {\"+\"color:\"+this._promptColor+\"}\"+\"input:-ms-input-placeholder, textarea:-ms-input-placeholder {\"+\"color:\"+this._promptColor+\"}\";\n\t}\n\n\t/**@private */\n\t__proto._focusOut=function(){\n\t\tlaya.display.Input.isInputting=false;\n\t\tthis._focus=false;\n\t\tthis._text=null;\n\t\tthis._content=this.nativeInput.value;\n\t\tif (!this._content){\n\t\t\tLaya.superSet(Text,this,'text',this._prompt);\n\t\t\tLaya.superSet(Text,this,'color',this._promptColor);\n\t\t\t}else {\n\t\t\tLaya.superSet(Text,this,'text',this._content);\n\t\t\tLaya.superSet(Text,this,'color',this._originColor);\n\t\t}\n\t\tLaya.stage.off(/*laya.events.Event.KEY_DOWN*/\"keydown\",this,this._onKeyDown);\n\t\tLaya.stage.focus=null;\n\t\tthis.event(/*laya.events.Event.BLUR*/\"blur\");\n\t\tif (Render.isConchApp)this.nativeInput.blur();\n\t\tBrowser.onPC && Laya.timer.clear(this,this._syncInputTransform);\n\t}\n\n\t/**@private */\n\t__proto._onKeyDown=function(e){\n\t\tif (e.keyCode===13){\n\t\t\tif (Browser.onMobile && !this._multiline)\n\t\t\t\tthis.focus=false;\n\t\t\tthis.event(/*laya.events.Event.ENTER*/\"enter\");\n\t\t}\n\t}\n\n\t__proto.changeText=function(text){\n\t\tthis._content=text;\n\t\tif (this._focus){\n\t\t\tthis.nativeInput.value=text || '';\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t}else\n\t\t_super.prototype.changeText.call(this,text);\n\t}\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'color',_super.prototype._$get_color,function(value){\n\t\tif (this._focus)\n\t\t\tthis.nativeInput.setColor(value);\n\t\tLaya.superSet(Text,this,'color',this._content?value:this._promptColor);\n\t\tthis._originColor=value;\n\t});\n\n\t//[Deprecated]\n\t__getset(0,__proto,'inputElementYAdjuster',function(){\n\t\tconsole.warn(\"deprecated: 由于即使设置了该值，在各平台和浏览器之间也不一定一致，inputElementYAdjuster已弃用。\");\n\t\treturn 0;\n\t\t},function(value){\n\t\tconsole.warn(\"deprecated: 由于即使设置了该值，在各平台和浏览器之间也不一定一致，inputElementYAdjuster已弃用。\");\n\t});\n\n\t/**表示是否是多行输入框。*/\n\t__getset(0,__proto,'multiline',function(){\n\t\treturn this._multiline;\n\t\t},function(value){\n\t\tthis._multiline=value;\n\t\tthis.valign=value ? \"top\" :\"middle\";\n\t});\n\n\t/**\n\t*<p>字符数量限制，默认为10000。</p>\n\t*<p>设置字符数量限制时，小于等于0的值将会限制字符数量为10000。</p>\n\t*/\n\t__getset(0,__proto,'maxChars',function(){\n\t\treturn this._maxChars;\n\t\t},function(value){\n\t\tif (value <=0)\n\t\t\tvalue=1E5;\n\t\tthis._maxChars=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'text',function(){\n\t\tif (this._focus)\n\t\t\treturn this.nativeInput.value;\n\t\telse\n\t\treturn this._content || \"\";\n\t\t},function(value){\n\t\tLaya.superSet(Text,this,'color',this._originColor);\n\t\tvalue+='';\n\t\tif (this._focus){\n\t\t\tthis.nativeInput.value=value || '';\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t\t}else {\n\t\t\tif (!this._multiline)\n\t\t\t\tvalue=value.replace(/\\r?\\n/g,'');\n\t\t\tthis._content=value;\n\t\t\tif (value)\n\t\t\t\tLaya.superSet(Text,this,'text',value);\n\t\t\telse {\n\t\t\t\tLaya.superSet(Text,this,'text',this._prompt);\n\t\t\t\tLaya.superSet(Text,this,'color',this.promptColor);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*获取对输入框的引用实例。\n\t*/\n\t__getset(0,__proto,'nativeInput',function(){\n\t\treturn this._multiline ? Input.area :Input.input;\n\t});\n\n\t/**\n\t*设置输入提示符。\n\t*/\n\t__getset(0,__proto,'prompt',function(){\n\t\treturn this._prompt;\n\t\t},function(value){\n\t\tif (!this._text && value)\n\t\t\tLaya.superSet(Text,this,'color',this._promptColor);\n\t\tthis.promptColor=this._promptColor;\n\t\tif (this._text)\n\t\t\tLaya.superSet(Text,this,'text',(this._text==this._prompt)?value:this._text);\n\t\telse\n\t\tLaya.superSet(Text,this,'text',value);\n\t\tthis._prompt=Text.langPacks && Text.langPacks[value] ? Text.langPacks[value] :value;\n\t});\n\n\t// 因此 调用focus接口是无法都在移动平台立刻弹出键盘的\n\t/**\n\t*表示焦点是否在此实例上。\n\t*/\n\t__getset(0,__proto,'focus',function(){\n\t\treturn this._focus;\n\t\t},function(value){\n\t\tvar input=this.nativeInput;\n\t\tif (this._focus!==value){\n\t\t\tif (value){\n\t\t\t\tif (input.target){\n\t\t\t\t\tinput.target._focusOut();\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._setInputMethod();\n\t\t\t\t}\n\t\t\t\tinput.target=this;\n\t\t\t\tthis._focusIn();\n\t\t\t\t}else {\n\t\t\t\tinput.target=null;\n\t\t\t\tthis._focusOut();\n\t\t\t\tBrowser.document.body.scrollTop=0;\n\t\t\t\tinput.blur();\n\t\t\t\tif (Render.isConchApp){\n\t\t\t\t\tinput.setPos(-10000,-10000);\n\t\t\t\t}else if (Input.inputContainer.contains(input))\n\t\t\t\tInput.inputContainer.removeChild(input);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**限制输入的字符。*/\n\t__getset(0,__proto,'restrict',function(){\n\t\tif (this._restrictPattern){\n\t\t\treturn this._restrictPattern.source;\n\t\t}\n\t\treturn \"\";\n\t\t},function(pattern){\n\t\tif (pattern){\n\t\t\tpattern=\"[^\"+pattern+\"]\";\n\t\t\tif (pattern.indexOf(\"^^\")>-1)\n\t\t\t\tpattern=pattern.replace(\"^^\",\"\");\n\t\t\tthis._restrictPattern=new RegExp(pattern,\"g\");\n\t\t}else\n\t\tthis._restrictPattern=null;\n\t});\n\n\t/**\n\t*是否可编辑。\n\t*/\n\t__getset(0,__proto,'editable',function(){\n\t\treturn this._editable;\n\t\t},function(value){\n\t\tthis._editable=value;\n\t\tif (Render.isConchApp){\n\t\t\tInput.input.setForbidEdit(!value);\n\t\t}\n\t});\n\n\t/**\n\t*设置输入提示符颜色。\n\t*/\n\t__getset(0,__proto,'promptColor',function(){\n\t\treturn this._promptColor;\n\t\t},function(value){\n\t\tthis._promptColor=value;\n\t\tif (!this._content)Laya.superSet(Text,this,'color',value);\n\t});\n\n\t/**\n\t*<p>输入框类型为Input静态常量之一。</p>\n\t*<ul>\n\t*<li>TYPE_TEXT</li>\n\t*<li>TYPE_PASSWORD</li>\n\t*<li>TYPE_EMAIL</li>\n\t*<li>TYPE_URL</li>\n\t*<li>TYPE_NUMBER</li>\n\t*<li>TYPE_RANGE</li>\n\t*<li>TYPE_DATE</li>\n\t*<li>TYPE_MONTH</li>\n\t*<li>TYPE_WEEK</li>\n\t*<li>TYPE_TIME</li>\n\t*<li>TYPE_DATE_TIME</li>\n\t*<li>TYPE_DATE_TIME_LOCAL</li>\n\t*</ul>\n\t*<p>平台兼容性参见http://www.w3school.com.cn/html5/html_5_form_input_types.asp。</p>\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t\t},function(value){\n\t\tif (value==\"password\")\n\t\t\tthis._getCSSStyle().password=true;\n\t\telse\n\t\tthis._getCSSStyle().password=false;\n\t\tthis._type=value;\n\t\tif (Render.isConchApp){\n\t\t\tthis.nativeInput.setType(value);\n\t\t}\n\t});\n\n\t/**\n\t*<p>原生输入框 X 轴调整值，用来调整输入框坐标。</p>\n\t*<p>由于即使设置了该值，在各平台和浏览器之间也不一定一致，inputElementXAdjuster已弃用。</p>\n\t*@deprecated\n\t*/\n\t__getset(0,__proto,'inputElementXAdjuster',function(){\n\t\tconsole.warn(\"deprecated: 由于即使设置了该值，在各平台和浏览器之间也不一定一致，inputElementXAdjuster已弃用。\");\n\t\treturn 0;\n\t\t},function(value){\n\t\tconsole.warn(\"deprecated: 由于即使设置了该值，在各平台和浏览器之间也不一定一致，inputElementXAdjuster已弃用。\");\n\t});\n\n\t//[Deprecated(replacement=\"Input.type\")]\n\t__getset(0,__proto,'asPassword',function(){\n\t\treturn this._getCSSStyle().password;\n\t\t},function(value){\n\t\tthis._getCSSStyle().password=value;\n\t\tthis._type=/*CLASS CONST:laya.display.Input.TYPE_PASSWORD*/\"password\";\n\t\tconsole.warn(\"deprecated: 使用type=\\\"password\\\"替代设置asPassword, asPassword将在下次重大更新时删去\");\n\t\tthis.isChanged=true;\n\t});\n\n\tInput.__init__=function(){\n\t\tInput._createInputElement();\n\t\tif (Browser.onMobile){\n\t\t\tvar isTrue=false;\n\t\t\tif (Browser.onMiniGame || Browser.onBDMiniGame || Browser.onKGMiniGame || Browser.onQGMiniGame || Browser.onVVMiniGame || Browser.onBLMiniGame || Browser.onAlipayMiniGame || Browser.onQQMiniGame || Browser.onTTMiniGame || Browser.onHWMiniGame||Browser.onTBMiniGame){\n\t\t\t\tisTrue=true;\n\t\t\t}\n\t\t\tRender.canvas.addEventListener(Input.IOS_IFRAME ?(isTrue ? \"touchend\" :\"click\"):\"touchend\",Input._popupInputMethod);\n\t\t}\n\t}\n\n\tInput._popupInputMethod=function(e){\n\t\tif (!laya.display.Input.isInputting)return;\n\t\tvar input=laya.display.Input.inputElement;\n\t\tinput.focus();\n\t}\n\n\tInput._createInputElement=function(){\n\t\tInput._initInput(Input.area=Browser.createElement(\"textarea\"));\n\t\tInput._initInput(Input.input=Browser.createElement(\"input\"));\n\t\tInput.inputContainer=Browser.createElement(\"div\");\n\t\tInput.inputContainer.style.position=\"absolute\";\n\t\tInput.inputContainer.style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input.inputContainer);\n\t\tInput.inputContainer.setPos=function (x,y){Input.inputContainer.style.left=x+'px';Input.inputContainer.style.top=y+'px';};\n\t}\n\n\tInput._initInput=function(input){\n\t\tvar style=input.style;\n\t\tstyle.cssText=\"position:absolute;overflow:hidden;resize:none;transform-origin:0 0;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-o-transform-origin:0 0;\";\n\t\tstyle.resize='none';\n\t\tstyle.backgroundColor='transparent';\n\t\tstyle.border='none';\n\t\tstyle.outline='none';\n\t\tstyle.zIndex=1;\n\t\tinput.addEventListener('input',Input._processInputting);\n\t\tinput.addEventListener('mousemove',Input._stopEvent);\n\t\tinput.addEventListener('mousedown',Input._stopEvent);\n\t\tinput.addEventListener('touchmove',Input._stopEvent);\n\t\tinput.setFontFace=function (fontFace){input.style.fontFamily=fontFace;};\n\t\tif(!Render.isConchApp){\n\t\t\tinput.setColor=function (color){input.style.color=color;};\n\t\t\tinput.setFontSize=function (fontSize){input.style.fontSize=fontSize+'px';};\n\t\t}\n\t}\n\n\tInput._processInputting=function(e){\n\t\tvar input=laya.display.Input.inputElement.target;\n\t\tif (!input)return;\n\t\tvar value=laya.display.Input.inputElement.value;\n\t\tif (input._restrictPattern){\n\t\t\tvalue=value.replace(/\\u2006|\\x27/g,\"\");\n\t\t\tif (input._restrictPattern.test(value)){\n\t\t\t\tvalue=value.replace(input._restrictPattern,\"\");\n\t\t\t\tlaya.display.Input.inputElement.value=value;\n\t\t\t}\n\t\t}\n\t\tinput._text=value;\n\t\tinput.event(/*laya.events.Event.INPUT*/\"input\");\n\t}\n\n\tInput._stopEvent=function(e){\n\t\tif (e.type=='touchmove')\n\t\t\te.preventDefault();\n\t\te.stopPropagation && e.stopPropagation();\n\t}\n\n\tInput.TYPE_TEXT=\"text\";\n\tInput.TYPE_PASSWORD=\"password\";\n\tInput.TYPE_EMAIL=\"email\";\n\tInput.TYPE_URL=\"url\";\n\tInput.TYPE_NUMBER=\"number\";\n\tInput.TYPE_RANGE=\"range\";\n\tInput.TYPE_DATE=\"date\";\n\tInput.TYPE_MONTH=\"month\";\n\tInput.TYPE_WEEK=\"week\";\n\tInput.TYPE_TIME=\"time\";\n\tInput.TYPE_DATE_TIME=\"datetime\";\n\tInput.TYPE_DATE_TIME_LOCAL=\"datetime-local\";\n\tInput.TYPE_SEARCH=\"search\";\n\tInput.input=null;\n\tInput.area=null;\n\tInput.inputElement=null;\n\tInput.inputContainer=null;\n\tInput.confirmButton=null;\n\tInput.promptStyleDOM=null;\n\tInput.inputHeight=45;\n\tInput.isInputting=false;\n\tInput.stageMatrix=null;\n\t__static(Input,\n\t['IOS_IFRAME',function(){return this.IOS_IFRAME=(Browser.onIOS && Browser.window.top !=Browser.window.self);}\n\t]);\n\treturn Input;\n})(Text)\n\n\n/**\n*@private\n*<p> <code>HTMLImage</code> 用于创建 HTML Image 元素。</p>\n*<p>请使用 <code>HTMLImage.create()<code>获取新实例，不要直接使用 <code>new HTMLImage<code> 。</p>\n*/\n//class laya.resource.HTMLImage extends laya.resource.FileBitmap\nvar HTMLImage=(function(_super){\n\tfunction HTMLImage(src,def){\n\t\t/**异步加载锁*/\n\t\tthis._recreateLock=false;\n\t\t/**异步加载完成后是否需要释放（有可能在恢复过程中,再次被释放，用此变量做标记）*/\n\t\tthis._needReleaseAgain=false;\n\t\tthis._enableMerageInAtlas=true;\n\t\tHTMLImage.__super.call(this);\n\t\tthis._init_(src,def);\n\t}\n\n\t__class(HTMLImage,'laya.resource.HTMLImage',_super);\n\tvar __proto=HTMLImage.prototype;\n\t__proto._init_=function(src,def){\n\t\tthis._src=src;\n\t\tthis._source=new Browser.window.Image();\n\t\tif (def){\n\t\t\tdef.onload && (this.onload=def.onload);\n\t\t\tdef.onerror && (this.onerror=def.onerror);\n\t\t\tdef.onCreate && def.onCreate(this);\n\t\t}\n\t\tif (src.indexOf(\"data:image\")!=0)this._source.crossOrigin=\"\";\n\t\t(src)&& (this._source.src=src);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.recreateResource=function(){\n\t\tvar _$this=this;\n\t\tif (this._src===\"\")\n\t\t\tthrow new Error(\"src no null！\");\n\t\tthis._needReleaseAgain=false;\n\t\tif (!this._source){\n\t\t\tthis._recreateLock=true;\n\t\t\tvar _this=this;\n\t\t\tthis._source=new Browser.window.Image();\n\t\t\tthis._source.crossOrigin=\"\";\n\t\t\tthis._source.onload=function (){\n\t\t\t\tif (_this._needReleaseAgain){\n\t\t\t\t\t_this._needReleaseAgain=false;\n\t\t\t\t\t_this._source.onload=null;\n\t\t\t\t\t_this._source=null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t_this._source.onload=null;\n\t\t\t\t_this.memorySize=_$this._w *_$this._h *4;\n\t\t\t\t_this._recreateLock=false;\n\t\t\t\t_this.completeCreate();\n\t\t\t};\n\t\t\tthis._source.src=this._src;\n\t\t\t}else {\n\t\t\tif (this._recreateLock)\n\t\t\t\treturn;\n\t\t\tthis.memorySize=this._w *this._h *4;\n\t\t\tthis._recreateLock=false;\n\t\t\tthis.completeCreate();\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.disposeResource=function(){\n\t\tif (this._recreateLock)\n\t\t\tthis._needReleaseAgain=true;\n\t\t(this._source)&& (this._source=null,this.memorySize=0);\n\t}\n\n\t/***调整尺寸。*/\n\t__proto.onresize=function(){\n\t\tthis._w=this._source.width;\n\t\tthis._h=this._source.height;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'onload',null,function(value){\n\t\tvar _$this=this;\n\t\tthis._onload=value;\n\t\tthis._source && (this._source.onload=this._onload !=null ? (function(){\n\t\t\t_$this.onresize();\n\t\t\t_$this._onload();\n\t\t}):null);\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'onerror',null,function(value){\n\t\tvar _$this=this;\n\t\tthis._onerror=value;\n\t\tthis._source && (this._source.onerror=this._onerror !=null ? (function(){\n\t\t\t_$this._onerror()\n\t\t}):null);\n\t});\n\n\t__getset(0,__proto,'enableMerageInAtlas',function(){\n\t\treturn this._enableMerageInAtlas;\n\t\t},function(value){\n\t\tthis._enableMerageInAtlas=value;\n\t\tif (Render.isConchApp){\n\t\t\tif (this._source)this._source.enableMerageInAtlas=value;\n\t\t}\n\t});\n\n\tHTMLImage.create=function(src,def){\n\t\treturn new HTMLImage(src,def);\n\t}\n\n\treturn HTMLImage;\n})(FileBitmap)\n\n\n/**\n*<p> 动效模板。用于为指定目标对象添加动画效果。每个动效有唯一的目标对象，而同一个对象可以添加多个动效。 当一个动效开始播放时，其他动效会自动停止播放。</p>\n*<p> 可以通过LayaAir IDE创建。 </p>\n*/\n//class laya.display.EffectAnimation extends laya.display.FrameAnimation\nvar EffectAnimation=(function(_super){\n\tfunction EffectAnimation(){\n\t\t/**@private */\n\t\tthis._target=null;\n\t\t/**@private */\n\t\tthis._playEvents=null;\n\t\t/**@private */\n\t\tthis._initData={};\n\t\t/**@private */\n\t\tthis._aniKeys=null;\n\t\t/**@private */\n\t\tthis._effectClass=null;\n\t\tEffectAnimation.__super.call(this);\n\t}\n\n\t__class(EffectAnimation,'laya.display.EffectAnimation',_super);\n\tvar __proto=EffectAnimation.prototype;\n\t/**@private */\n\t__proto._onOtherBegin=function(effect){\n\t\tif (effect==this)\n\t\t\treturn;\n\t\tthis.stop();\n\t}\n\n\t/**@private */\n\t__proto.addEvent=function(){\n\t\tif (!this._target || !this._playEvents)\n\t\t\treturn;\n\t\tthis._setControlNode(this._target);\n\t\tthis._target.on(this._playEvents,this,this._onPlayAction);\n\t}\n\n\t/**@private */\n\t__proto._onPlayAction=function(){\n\t\tthis.play(0,false);\n\t}\n\n\t__proto.play=function(start,loop,name,showWarn){\n\t\t(start===void 0)&& (start=0);\n\t\t(loop===void 0)&& (loop=true);\n\t\t(name===void 0)&& (name=\"\");\n\t\t(showWarn===void 0)&& (showWarn=true);\n\t\tif (!this._target)\n\t\t\treturn;\n\t\tthis._target.event(\"effectanimationbegin\",[this]);\n\t\tthis._recordInitData();\n\t\tlaya.display.AnimationPlayerBase.prototype.play.call(this,start,loop,name,showWarn);\n\t}\n\n\t/**@private */\n\t__proto._recordInitData=function(){\n\t\tif (!this._aniKeys)\n\t\t\treturn;\n\t\tvar i=0,len=0;\n\t\tlen=this._aniKeys.length;\n\t\tvar key;\n\t\tfor (i=0;i < len;i++){\n\t\t\tkey=this._aniKeys[i];\n\t\t\tthis._initData[key]=this._target[key];\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._displayToIndex=function(value){\n\t\tif (!this._animationData)\n\t\t\treturn;\n\t\tif (value < 0)\n\t\t\tvalue=0;\n\t\tif (value > this._count)\n\t\t\tvalue=this._count;\n\t\tvar nodes=this._animationData.nodes,i=0,len=nodes.length;\n\t\tlen=len > 1 ? 1 :len;\n\t\tfor (i=0;i < len;i++){\n\t\t\tthis._displayNodeToFrame(nodes[i],value);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._displayNodeToFrame=function(node,frame,targetDic){\n\t\tif (!this._target)\n\t\t\treturn;\n\t\tvar target;\n\t\ttarget=this._target;\n\t\tvar frames=node.frames,key,propFrames,value;\n\t\tvar keys=node.keys,i=0,len=keys.length;\n\t\tvar secondFrames;\n\t\tsecondFrames=node.secondFrames;\n\t\tvar tSecondFrame=0;\n\t\tvar easeFun;\n\t\tvar tKeyFrames;\n\t\tvar startFrame;\n\t\tvar endFrame;\n\t\tfor (i=0;i < len;i++){\n\t\t\tkey=keys[i];\n\t\t\tpropFrames=frames[key];\n\t\t\ttSecondFrame=secondFrames[key];\n\t\t\tif (tSecondFrame==-1){\n\t\t\t\tvalue=this._initData[key];\n\t\t\t\t}else {\n\t\t\t\tif (frame < tSecondFrame){\n\t\t\t\t\ttKeyFrames=node.keyframes[key];\n\t\t\t\t\tstartFrame=tKeyFrames[0];\n\t\t\t\t\tif (startFrame.tween){\n\t\t\t\t\t\teaseFun=Ease[startFrame.tweenMethod];\n\t\t\t\t\t\tif (easeFun==null){\n\t\t\t\t\t\t\teaseFun=Ease.linearNone;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tendFrame=tKeyFrames[1];\n\t\t\t\t\t\tvalue=easeFun(frame,this._initData[key],endFrame.value-this._initData[key],endFrame.index);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvalue=this._initData[key];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tif (propFrames.length > frame){\n\t\t\t\t\t\tvalue=propFrames[frame];\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvalue=propFrames[propFrames.length-1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[key]=value;\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._calculateNodeKeyFrames=function(node){\n\t\t_super.prototype._calculateNodeKeyFrames.call(this,node);\n\t\tvar keyFrames=node.keyframes,key,tKeyFrames,target=node.target;\n\t\tvar secondFrames;\n\t\tsecondFrames={};\n\t\tnode.secondFrames=secondFrames;\n\t\tfor (key in keyFrames){\n\t\t\ttKeyFrames=keyFrames[key];\n\t\t\tif (tKeyFrames.length <=1){\n\t\t\t\tsecondFrames[key]=-1;\n\t\t\t\t}else {\n\t\t\t\tsecondFrames[key]=tKeyFrames[1].index;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*本实例的目标对象。通过本实例控制目标对象的属性变化。\n\t*@param v 指定的目标对象。\n\t*/\n\t__getset(0,__proto,'target',function(){\n\t\treturn this._target;\n\t\t},function(v){\n\t\tif (this._target){\n\t\t\tthis._target.off(\"effectanimationbegin\",this,this._onOtherBegin);\n\t\t}\n\t\tthis._target=v;\n\t\tif (this._target){\n\t\t\tthis._target.on(\"effectanimationbegin\",this,this._onOtherBegin);\n\t\t}\n\t\tthis.addEvent();\n\t});\n\n\t/**\n\t*设置开始播放的事件。本实例会侦听目标对象的指定事件，触发后播放相应动画效果。\n\t*@param event\n\t*/\n\t__getset(0,__proto,'playEvent',null,function(event){\n\t\tthis._playEvents=event;\n\t\tif (!event)\n\t\t\treturn;\n\t\tthis.addEvent();\n\t});\n\n\t/**\n\t*设置动画数据。\n\t*@param uiData\n\t*/\n\t__getset(0,__proto,'effectData',null,function(uiData){\n\t\tif (uiData){\n\t\t\tvar aniData;\n\t\t\taniData=uiData[\"animations\"];\n\t\t\tif (aniData && aniData[0]){\n\t\t\t\tthis._setUp({},aniData[0]);\n\t\t\t\tif (aniData[0].nodes && aniData[0].nodes[0]){\n\t\t\t\t\tthis._aniKeys=aniData[0].nodes[0].keys;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*设置提供数据的类。\n\t*@param classStr 类路径\n\t*/\n\t__getset(0,__proto,'effectClass',null,function(classStr){\n\t\tthis._effectClass=ClassUtils.getClass(classStr);\n\t\tif (this._effectClass){\n\t\t\tvar uiData;\n\t\t\tuiData=this._effectClass[\"uiView\"];\n\t\t\tif (uiData){\n\t\t\t\tvar aniData;\n\t\t\t\taniData=uiData[\"animations\"];\n\t\t\t\tif (aniData && aniData[0]){\n\t\t\t\t\tthis._setUp({},aniData[0]);\n\t\t\t\t\tif (aniData[0].nodes && aniData[0].nodes[0]){\n\t\t\t\t\t\tthis._aniKeys=aniData[0].nodes[0].keys;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tEffectAnimation.EffectAnimationBegin=\"effectanimationbegin\";\n\treturn EffectAnimation;\n})(FrameAnimation)\n\n\n/**\n*@private\n*/\n//class laya.utils.GraphicAnimation extends laya.display.FrameAnimation\nvar GraphicAnimation=(function(_super){\n\tvar GraphicNode;\n\tfunction GraphicAnimation(){\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis.animationList=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis.animationDic=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._nodeList=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._nodeDefaultProps=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._gList=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._nodeIDAniDic={};\n\t\tthis._rootNode=null;\n\t\tthis._nodeGDic=null;\n\t\tGraphicAnimation.__super.call(this);\n\t}\n\n\t__class(GraphicAnimation,'laya.utils.GraphicAnimation',_super);\n\tvar __proto=GraphicAnimation.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._parseNodeList=function(uiView){\n\t\tif (!this._nodeList){\n\t\t\tthis._nodeList=[];\n\t\t}\n\t\tthis._nodeDefaultProps[uiView.compId]=uiView.props;\n\t\tif (uiView.compId)\n\t\t\tthis._nodeList.push(uiView.compId);\n\t\tvar childs=uiView.child;\n\t\tif (childs){\n\t\t\tvar i=0,len=childs.length;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\tthis._parseNodeList(childs[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calGraphicData=function(aniData){\n\t\tthis._setUp(null,aniData);\n\t\tthis._createGraphicData();\n\t\tif (this._nodeIDAniDic){\n\t\t\tvar key;\n\t\t\tfor (key in this._nodeIDAniDic){\n\t\t\t\tthis._nodeIDAniDic[key]=null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._createGraphicData=function(){\n\t\tvar gList=[];\n\t\tvar i=0,len=this.count;\n\t\tvar animationDataNew=this._animationNewFrames;\n\t\tif (!animationDataNew)animationDataNew=[];\n\t\tvar preGraphic;\n\t\tfor (i=0;i < len;i++){\n\t\t\tif (animationDataNew[i] || !preGraphic){\n\t\t\t\tpreGraphic=this._createFrameGraphic(i);\n\t\t\t}\n\t\t\tgList.push(preGraphic);\n\t\t}\n\t\tthis._gList=gList;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._createFrameGraphic=function(frame){\n\t\tvar g=RunDriver.createGraphics();\n\t\tif (!GraphicAnimation._rootMatrix)\n\t\t\tGraphicAnimation._rootMatrix=new Matrix();\n\t\tthis._updateNodeGraphic(this._rootNode,frame,GraphicAnimation._rootMatrix,g);\n\t\treturn g;\n\t}\n\n\t__proto._updateNodeGraphic=function(node,frame,parentTransfrom,g,alpha){\n\t\t(alpha===void 0)&& (alpha=1);\n\t\tvar tNodeG;\n\t\ttNodeG=this._nodeGDic[node.compId]=this._getNodeGraphicData(node.compId,frame,this._nodeGDic[node.compId]);\n\t\tvar tGraphicAlpha=tNodeG.alpha *alpha;\n\t\tif (tGraphicAlpha < 0.01)return;\n\t\tif (!tNodeG.resultTransform){\n\t\t\ttNodeG.resultTransform=Matrix.create();\n\t\t};\n\t\tvar tResultTransform;\n\t\ttResultTransform=tNodeG.resultTransform;\n\t\tMatrix.mul(tNodeG.transform,parentTransfrom,tResultTransform);\n\t\tvar tTex;\n\t\tif (tNodeG.skin){\n\t\t\ttTex=this._getTextureByUrl(tNodeG.skin);\n\t\t\tif (tTex){\n\t\t\t\tif (tResultTransform._checkTransform()){\n\t\t\t\t\tg.drawTexture(tTex,0,0,tNodeG.width,tNodeG.height,tResultTransform,tGraphicAlpha);\n\t\t\t\t\ttNodeG.resultTransform=null;\n\t\t\t\t\t}else {\n\t\t\t\t\tg.drawTexture(tTex,tResultTransform.tx,tResultTransform.ty,tNodeG.width,tNodeG.height,null,tGraphicAlpha);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar childs;\n\t\tchilds=node.child;\n\t\tif (!childs)\n\t\t\treturn;\n\t\tvar i=0,len=0;\n\t\tlen=childs.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tthis._updateNodeGraphic(childs[i],frame,tResultTransform,g,tGraphicAlpha);\n\t\t}\n\t}\n\n\t__proto._updateNoChilds=function(tNodeG,g){\n\t\tif (!tNodeG.skin)\n\t\t\treturn;\n\t\tvar tTex=this._getTextureByUrl(tNodeG.skin);\n\t\tif (!tTex)\n\t\t\treturn;\n\t\tvar tTransform=tNodeG.transform;\n\t\ttTransform._checkTransform();\n\t\tvar onlyTranslate=false;\n\t\tonlyTranslate=!tTransform.bTransform;\n\t\tif (!onlyTranslate){\n\t\t\tg.drawTexture(tTex,0,0,tNodeG.width,tNodeG.height,tTransform.clone(),tNodeG.alpha);\n\t\t\t}else {\n\t\t\tg.drawTexture(tTex,tTransform.tx,tTransform.ty,tNodeG.width,tNodeG.height,null,tNodeG.alpha);\n\t\t}\n\t}\n\n\t__proto._updateNodeGraphic2=function(node,frame,g){\n\t\tvar tNodeG;\n\t\ttNodeG=this._nodeGDic[node.compId]=this._getNodeGraphicData(node.compId,frame,this._nodeGDic[node.compId]);\n\t\tif (!node.child){\n\t\t\tthis._updateNoChilds(tNodeG,g);\n\t\t\treturn;\n\t\t};\n\t\tvar tTransform=tNodeG.transform;\n\t\ttTransform._checkTransform();\n\t\tvar onlyTranslate=false;\n\t\tonlyTranslate=!tTransform.bTransform;\n\t\tvar hasTrans=false;\n\t\thasTrans=onlyTranslate && (tTransform.tx !=0 || tTransform.ty !=0);\n\t\tvar ifSave=false;\n\t\tifSave=(tTransform.bTransform)|| tNodeG.alpha !=1;\n\t\tif (ifSave){\n\t\t\tg.save();\n\t\t}\n\t\tif (tNodeG.alpha !=1){\n\t\t\tg.alpha(tNodeG.alpha);\n\t\t}\n\t\tif (!onlyTranslate){\n\t\t\tg.transform(tTransform.clone());\n\t\t\t}else if (hasTrans){\n\t\t\tg.translate(tTransform.tx,tTransform.ty);\n\t\t};\n\t\tvar childs;\n\t\tchilds=node.child;\n\t\tvar tTex;\n\t\tif (tNodeG.skin){\n\t\t\ttTex=this._getTextureByUrl(tNodeG.skin);\n\t\t\tif (tTex){\n\t\t\t\tg.drawTexture(tTex,0,0,tNodeG.width,tNodeG.height);\n\t\t\t}\n\t\t}\n\t\tif (childs){\n\t\t\tvar i=0,len=0;\n\t\t\tlen=childs.length;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\tthis._updateNodeGraphic2(childs[i],frame,g);\n\t\t\t}\n\t\t}\n\t\tif (ifSave){\n\t\t\tg.restore();\n\t\t\t}else {\n\t\t\tif (!onlyTranslate){\n\t\t\t\tg.transform(tTransform.clone().invert());\n\t\t\t\t}else if (hasTrans){\n\t\t\t\tg.translate(-tTransform.tx,-tTransform.ty);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculateNodeKeyFrames=function(node){\n\t\t_super.prototype._calculateNodeKeyFrames.call(this,node);\n\t\tthis._nodeIDAniDic[node.target]=node;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.getNodeDataByID=function(nodeID){\n\t\treturn this._nodeIDAniDic[nodeID];\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getParams=function(obj,params,frame,obj2){\n\t\tvar rst=GraphicAnimation._temParam;\n\t\trst.length=params.length;\n\t\tvar i=0,len=params.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\trst[i]=this._getObjVar(obj,params[i][0],frame,params[i][1],obj2);\n\t\t}\n\t\treturn rst;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getObjVar=function(obj,key,frame,noValue,obj2){\n\t\tif (obj.hasOwnProperty(key)){\n\t\t\tvar vArr=obj[key];\n\t\t\tif (frame >=vArr.length)\n\t\t\t\tframe=vArr.length-1;\n\t\t\tif(obj[key][frame]!=undefined)\n\t\t\t\treturn obj[key][frame];\n\t\t}\n\t\tif (obj2.hasOwnProperty(key)){\n\t\t\treturn obj2[key];\n\t\t}\n\t\treturn noValue;\n\t}\n\n\t__proto._getNodeGraphicData=function(nodeID,frame,rst){\n\t\tif (!rst)\n\t\t\trst=GraphicNode.create();\n\t\tif (!rst.transform){\n\t\t\trst.transform=Matrix.create();\n\t\t\t}else{\n\t\t\trst.transform.identity();\n\t\t};\n\t\tvar node=this.getNodeDataByID(nodeID);\n\t\tif (!node)\n\t\t\treturn rst;\n\t\tvar frameData=node.frames;\n\t\tvar params=this._getParams(frameData,GraphicAnimation._drawTextureCmd,frame,this._nodeDefaultProps[nodeID]);\n\t\tvar url=params[0];\n\t\tvar width=NaN,height=NaN;\n\t\tvar px=params[5],py=params[6];\n\t\tvar aX=params[13],aY=params[14];\n\t\tvar sx=params[7],sy=params[8];\n\t\tvar rotate=params[9];\n\t\tvar skewX=params[11],skewY=params[12]\n\t\twidth=params[3];\n\t\theight=params[4];\n\t\tif (width==0 || height==0)url=null;\n\t\tif (width==-1)width=0;\n\t\tif (height==-1)height=0;\n\t\tvar tex;\n\t\trst.skin=url;\n\t\trst.width=width;\n\t\trst.height=height;\n\t\tif (url){\n\t\t\ttex=this._getTextureByUrl(url);\n\t\t\tif (tex){\n\t\t\t\tif (!width)\n\t\t\t\t\twidth=tex.sourceWidth;\n\t\t\t\tif (!height)\n\t\t\t\t\theight=tex.sourceHeight;\n\t\t\t\t}else {\n\t\t\t\tconsole.warn(\"lost skin:\",url,\",you may load pics first\");\n\t\t\t}\n\t\t}\n\t\trst.alpha=params[10];\n\t\tvar m;\n\t\tm=rst.transform;\n\t\tif (aX !=0){\n\t\t\tpx=aX *width;\n\t\t}\n\t\tif (aY !=0){\n\t\t\tpy=aY *height;\n\t\t}\n\t\tif (px !=0 || py !=0){\n\t\t\tm.translate(-px,-py);\n\t\t};\n\t\tvar tm=null;\n\t\tif (rotate || sx!==1 || sy!==1 || skewX || skewY){\n\t\t\ttm=GraphicAnimation._tempMt;\n\t\t\ttm.identity();\n\t\t\ttm.bTransform=true;\n\t\t\tvar skx=(rotate-skewX)*0.0174532922222222;\n\t\t\tvar sky=(rotate+skewY)*0.0174532922222222;\n\t\t\tvar cx=Math.cos(sky);\n\t\t\tvar ssx=Math.sin(sky);\n\t\t\tvar cy=Math.sin(skx);\n\t\t\tvar ssy=Math.cos(skx);\n\t\t\ttm.a=sx *cx;\n\t\t\ttm.b=sx *ssx;\n\t\t\ttm.c=-sy *cy;\n\t\t\ttm.d=sy *ssy;\n\t\t\ttm.tx=tm.ty=0;\n\t\t}\n\t\tif (tm){\n\t\t\tm=Matrix.mul(m,tm,m);\n\t\t}\n\t\tm.translate(params[1],params[2]);\n\t\treturn rst;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getTextureByUrl=function(url){\n\t\treturn Loader.getRes(url);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.setAniData=function(uiView,aniName){\n\t\tif (uiView.animations){\n\t\t\tthis._nodeDefaultProps={};\n\t\t\tthis._nodeGDic={};\n\t\t\tif (this._nodeList)\n\t\t\t\tthis._nodeList.length=0;\n\t\t\tthis._rootNode=uiView;\n\t\t\tthis._parseNodeList(uiView);\n\t\t\tvar aniDic={};\n\t\t\tvar anilist=[];\n\t\t\tvar animations=uiView.animations;\n\t\t\tvar i=0,len=animations.length;\n\t\t\tvar tAniO;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\ttAniO=animations[i];\n\t\t\t\tthis._labels=null;\n\t\t\t\tif (aniName && aniName !=tAniO.name){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tif (!tAniO)\n\t\t\t\t\tcontinue ;\n\t\t\t\ttry {\n\t\t\t\t\tthis._calGraphicData(tAniO);\n\t\t\t\t\t}catch (e){\n\t\t\t\t\tconsole.warn(\"parse animation fail:\"+tAniO.name+\",empty animation created\");\n\t\t\t\t\tthis._gList=[];\n\t\t\t\t};\n\t\t\t\tvar frameO={};\n\t\t\t\tframeO.interval=1000 / tAniO[\"frameRate\"];\n\t\t\t\tframeO.frames=this._gList;\n\t\t\t\tframeO.labels=this._labels;\n\t\t\t\tframeO.name=tAniO.name;\n\t\t\t\tanilist.push(frameO);\n\t\t\t\taniDic[tAniO.name]=frameO;\n\t\t\t}\n\t\t\tthis.animationList=anilist;\n\t\t\tthis.animationDic=aniDic;\n\t\t}\n\t\tGraphicAnimation._temParam.length=0;\n\t}\n\n\t__proto.parseByData=function(aniData){\n\t\tvar rootNode,aniO;\n\t\trootNode=aniData.nodeRoot;\n\t\taniO=aniData.aniO;\n\t\tdelete aniData.nodeRoot;\n\t\tdelete aniData.aniO;\n\t\tthis._nodeDefaultProps={};\n\t\tthis._nodeGDic={};\n\t\tif (this._nodeList)\n\t\t\tthis._nodeList.length=0;\n\t\tthis._rootNode=rootNode;\n\t\tthis._parseNodeList(rootNode);\n\t\tthis._labels=null;\n\t\ttry {\n\t\t\tthis._calGraphicData(aniO);\n\t\t\t}catch (e){\n\t\t\tconsole.warn(\"parse animation fail:\"+aniO.name+\",empty animation created\");\n\t\t\tthis._gList=[];\n\t\t};\n\t\tvar frameO=aniData;\n\t\tframeO.interval=1000 / aniO[\"frameRate\"];\n\t\tframeO.frames=this._gList;\n\t\tframeO.labels=this._labels;\n\t\tframeO.name=aniO.name;\n\t\treturn frameO;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.setUpAniData=function(uiView){\n\t\tif (uiView.animations){\n\t\t\tvar aniDic={};\n\t\t\tvar anilist=[];\n\t\t\tvar animations=uiView.animations;\n\t\t\tvar i=0,len=animations.length;\n\t\t\tvar tAniO;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\ttAniO=animations[i];\n\t\t\t\tif (!tAniO)\n\t\t\t\t\tcontinue ;\n\t\t\t\tvar frameO={};\n\t\t\t\tframeO.name=tAniO.name;\n\t\t\t\tframeO.aniO=tAniO;\n\t\t\t\tframeO.nodeRoot=uiView;\n\t\t\t\tanilist.push(frameO);\n\t\t\t\taniDic[tAniO.name]=frameO;\n\t\t\t}\n\t\t\tthis.animationList=anilist;\n\t\t\tthis.animationDic=aniDic;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._clear=function(){\n\t\tthis.animationList=null;\n\t\tthis.animationDic=null;\n\t\tthis._gList=null;\n\t\tif (this._nodeGDic){\n\t\t\tvar key;\n\t\t\tvar tGNode;\n\t\t\tfor (key in this._nodeGDic){\n\t\t\t\ttGNode=this._nodeGDic[key];\n\t\t\t\tif (tGNode)tGNode.recover();\n\t\t\t}\n\t\t}\n\t\tthis._nodeGDic=null;\n\t}\n\n\tGraphicAnimation.parseAnimationByData=function(animationObject){\n\t\tif (!GraphicAnimation._I)\n\t\t\tGraphicAnimation._I=new GraphicAnimation();\n\t\tvar rst;\n\t\trst=GraphicAnimation._I.parseByData(animationObject);\n\t\tGraphicAnimation._I._clear();\n\t\treturn rst;\n\t}\n\n\tGraphicAnimation.parseAnimationData=function(aniData){\n\t\tif (!GraphicAnimation._I)\n\t\t\tGraphicAnimation._I=new GraphicAnimation();\n\t\tGraphicAnimation._I.setUpAniData(aniData);\n\t\tvar rst;\n\t\trst={};\n\t\trst.animationList=GraphicAnimation._I.animationList;\n\t\trst.animationDic=GraphicAnimation._I.animationDic;\n\t\tGraphicAnimation._I._clear();\n\t\treturn rst;\n\t}\n\n\tGraphicAnimation._drawTextureCmd=[[\"skin\",null],[\"x\",0],[\"y\",0],[\"width\",-1],[\"height\",-1],[\"pivotX\",0],[\"pivotY\",0],[\"scaleX\",1],[\"scaleY\",1],[\"rotation\",0],[\"alpha\",1],[\"skewX\",0],[\"skewY\",0],[\"anchorX\",0],[\"anchorY\",0]];\n\tGraphicAnimation._temParam=[];\n\tGraphicAnimation._I=null;\n\tGraphicAnimation._rootMatrix=null;\n\t__static(GraphicAnimation,\n\t['_tempMt',function(){return this._tempMt=new Matrix();}\n\t]);\n\tGraphicAnimation.__init$=function(){\n\t\t//class GraphicNode\n\t\tGraphicNode=(function(){\n\t\t\tfunction GraphicNode(){\n\t\t\t\tthis.skin=null;\n\t\t\t\tthis.transform=null;\n\t\t\t\tthis.resultTransform=null;\n\t\t\t\tthis.width=NaN;\n\t\t\t\tthis.height=NaN;\n\t\t\t\tthis.alpha=1;\n\t\t\t}\n\t\t\t__class(GraphicNode,'');\n\t\t\tvar __proto=GraphicNode.prototype;\n\t\t\t__proto.recover=function(){\n\t\t\t\tthis.skin=null;\n\t\t\t\tthis.width=0;\n\t\t\t\tthis.height=0;\n\t\t\t\tthis.alpha=1;\n\t\t\t\tif (this.transform){\n\t\t\t\t\tthis.transform.destroy();\n\t\t\t\t\tthis.transform=null;\n\t\t\t\t}\n\t\t\t\tif (this.resultTransform){\n\t\t\t\t\tthis.resultTransform.destroy();\n\t\t\t\t\tthis.resultTransform=null;\n\t\t\t\t}\n\t\t\t\tPool.recover(\"GraphicNode\",this);\n\t\t\t}\n\t\t\tGraphicNode.create=function(){\n\t\t\t\treturn Pool.getItemByClass(\"GraphicNode\",GraphicNode);\n\t\t\t}\n\t\t\treturn GraphicNode;\n\t\t})()\n\t}\n\n\treturn GraphicAnimation;\n})(FrameAnimation)\n\n\n\tLaya.__init([EventDispatcher,LoaderManager,GraphicAnimation,Render,Browser,Timer,LocalStorage,TimeLine]);\n})(window,document,Laya);\n\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n//class LayaMain\nvar LayaMain=(function(){\n\t/*[COMPILER OPTIONS:normal]*/\n\tfunction LayaMain(){}\n\t__class(LayaMain,'LayaMain');\n\treturn LayaMain;\n})()\n\n\n\n\t/**LayaGameStart**/\n\tnew LayaMain();\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.d3.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar AnimationContent=laya.ani.AnimationContent,AnimationPlayer=laya.ani.AnimationPlayer,AnimationState=laya.ani.AnimationState;\n\tvar AnimationTemplet=laya.ani.AnimationTemplet,Arith=laya.maths.Arith,AtlasResourceManager=laya.webgl.atlas.AtlasResourceManager;\n\tvar BaseShader=laya.webgl.shader.BaseShader,Browser=laya.utils.Browser,Buffer=laya.webgl.utils.Buffer,Byte=laya.utils.Byte;\n\tvar CacheAbleSkinMesh=laya.ani.bone.canvasmesh.CacheAbleSkinMesh,ClassUtils=laya.utils.ClassUtils,Config=Laya.Config;\n\tvar Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher,Handler=laya.utils.Handler,Loader=laya.net.Loader;\n\tvar LoaderManager=laya.net.LoaderManager,MathUtil=laya.maths.MathUtil,Node=laya.display.Node,Render=laya.renders.Render;\n\tvar RenderContext=laya.renders.RenderContext,RenderSprite=laya.renders.RenderSprite,RenderState2D=laya.webgl.utils.RenderState2D;\n\tvar Resource=laya.resource.Resource,RunDriver=laya.utils.RunDriver,Shader=laya.webgl.shader.Shader,ShaderCompile=laya.webgl.utils.ShaderCompile;\n\tvar Sprite=laya.display.Sprite,Stat=laya.utils.Stat,StringKey=laya.utils.StringKey,Style=laya.display.css.Style;\n\tvar Texture=laya.resource.Texture,URL=laya.net.URL,Utils=laya.utils.Utils,WebGL=laya.webgl.WebGL,WebGLContext=laya.webgl.WebGLContext;\n\tvar WebGLContext2D=laya.webgl.canvas.WebGLContext2D;\nLaya.interface('laya.d3.core.IClone');\nLaya.interface('laya.d3.graphics.IVertex');\nLaya.interface('laya.d3.core.render.IUpdate');\nLaya.interface('laya.d3.core.scene.ITreeNode');\nLaya.interface('laya.d3.core.render.IRenderable');\n/**\n*@private\n*/\n//class laya.d3.animation.AnimationClipParser01\nvar AnimationClipParser01=(function(){\n\tfunction AnimationClipParser01(){}\n\t__class(AnimationClipParser01,'laya.d3.animation.AnimationClipParser01');\n\tAnimationClipParser01.READ_DATA=function(){\n\t\tAnimationClipParser01._DATA.offset=AnimationClipParser01._reader.getUint32();\n\t\tAnimationClipParser01._DATA.size=AnimationClipParser01._reader.getUint32();\n\t}\n\n\tAnimationClipParser01.READ_BLOCK=function(){\n\t\tvar count=AnimationClipParser01._BLOCK.count=AnimationClipParser01._reader.getUint16();\n\t\tvar blockStarts=AnimationClipParser01._BLOCK.blockStarts=[];\n\t\tvar blockLengths=AnimationClipParser01._BLOCK.blockLengths=[];\n\t\tfor (var i=0;i < count;i++){\n\t\t\tblockStarts.push(AnimationClipParser01._reader.getUint32());\n\t\t\tblockLengths.push(AnimationClipParser01._reader.getUint32());\n\t\t}\n\t}\n\n\tAnimationClipParser01.READ_STRINGS=function(){\n\t\tvar offset=AnimationClipParser01._reader.getUint32();\n\t\tvar count=AnimationClipParser01._reader.getUint16();\n\t\tvar prePos=AnimationClipParser01._reader.pos;\n\t\tAnimationClipParser01._reader.pos=offset+AnimationClipParser01._DATA.offset;\n\t\tfor (var i=0;i < count;i++)\n\t\tAnimationClipParser01._strings[i]=AnimationClipParser01._reader.readUTFString();\n\t\tAnimationClipParser01._reader.pos=prePos;\n\t}\n\n\tAnimationClipParser01.parse=function(clip,reader){\n\t\tAnimationClipParser01._animationClip=clip;\n\t\tAnimationClipParser01._reader=reader;\n\t\tvar arrayBuffer=reader.__getBuffer();\n\t\tAnimationClipParser01.READ_DATA();\n\t\tAnimationClipParser01.READ_BLOCK();\n\t\tAnimationClipParser01.READ_STRINGS();\n\t\tfor (var i=0,n=AnimationClipParser01._BLOCK.count;i < n;i++){\n\t\t\tvar index=reader.getUint16();\n\t\t\tvar blockName=AnimationClipParser01._strings[index];\n\t\t\tvar fn=AnimationClipParser01[\"READ_\"+blockName];\n\t\t\tif (fn==null)\n\t\t\t\tthrow new Error(\"model file err,no this function:\"+index+\" \"+blockName);\n\t\t\telse\n\t\t\tfn.call();\n\t\t}\n\t}\n\n\tAnimationClipParser01.READ_ANIMATIONS=function(){\n\t\tvar i=0,j=0;\n\t\tvar node;\n\t\tvar reader=AnimationClipParser01._reader;\n\t\tvar buffer=reader.__getBuffer();\n\t\tvar lengthTypes=[];\n\t\tvar lenghthTypeCount=reader.getUint8();\n\t\tlengthTypes.length=lenghthTypeCount;\n\t\tfor (i=0;i < lenghthTypeCount;i++)\n\t\tlengthTypes[i]=reader.getUint16();\n\t\tvar startTimeTypes=[];\n\t\tvar startTimeTypeCount=reader.getUint16();\n\t\tstartTimeTypes.length=startTimeTypeCount;\n\t\tfor (i=0;i < startTimeTypeCount;i++)\n\t\tstartTimeTypes[i]=reader.getFloat32();\n\t\tvar clip=AnimationClipParser01._animationClip;\n\t\tclip.name=AnimationClipParser01._strings[reader.getUint16()];\n\t\tvar clipDur=clip._duration=reader.getFloat32();\n\t\tclip.islooping=!!reader.getByte();\n\t\tclip._frameRate=reader.getInt16();\n\t\tvar nodeCount=reader.getInt16();\n\t\tvar nodes=clip._nodes=new Array;\n\t\tnodes.length=nodeCount;\n\t\tvar publicDatas=clip._publicClipDatas=[];\n\t\tpublicDatas.length=nodeCount;\n\t\tvar nodesMap=clip._nodesMap={};\n\t\tvar cachePropertyToNodeIndex=0,unCachePropertyToNodeIndex=0;\n\t\tfor (i=0;i < nodeCount;i++){\n\t\t\tnode=nodes[i]=new KeyframeNode();\n\t\t\tvar pathLength=reader.getUint16();\n\t\t\tvar path=node.path=[];\n\t\t\tpath.length=pathLength;\n\t\t\tfor (j=0;j < pathLength;j++)\n\t\t\tpath[j]=AnimationClipParser01._strings[reader.getUint16()];\n\t\t\tvar nodePath=path.join(\"/\");\n\t\t\tvar mapArray=nodesMap[nodePath];\n\t\t\t(mapArray)|| (nodesMap[nodePath]=mapArray=[]);\n\t\t\tmapArray.push(node);\n\t\t\tvar componentTypeStrIndex=reader.getInt16();\n\t\t\t(componentTypeStrIndex!==-1)&& (node.componentType=AnimationClipParser01._strings[componentTypeStrIndex]);\n\t\t\tvar propertyNameID=AnimationNode._propertyIndexDic[AnimationClipParser01._strings[reader.getUint16()]];\n\t\t\tif (propertyNameID !=null){\n\t\t\t\tvar isTransformProperty=propertyNameID < 4;\n\t\t\t\tvar cacheProperty=!isTransformProperty || (isTransformProperty && path[0]===\"\");\n\t\t\t\tnode._cacheProperty=cacheProperty;\n\t\t\t\tif (cacheProperty)\n\t\t\t\t\tcachePropertyToNodeIndex++;\n\t\t\t\telse\n\t\t\t\tunCachePropertyToNodeIndex++;\n\t\t\t\tnode.propertyNameID=propertyNameID;\n\t\t\t\t}else {\n\t\t\t\tthrow new Error(\"AnimationClipParser01:unknown property name.\");\n\t\t\t};\n\t\t\tvar dataLength=lengthTypes[reader.getUint8()];\n\t\t\tnode.keyFrameWidth=dataLength / 4;\n\t\t\tvar keyFrames=node.keyFrames=[];\n\t\t\tvar keyframeCount=keyFrames.length=reader.getUint16();\n\t\t\tvar lastKeyFrame=null;\n\t\t\tvar startTime=NaN;\n\t\t\tfor (j=0;j < keyframeCount;j++){\n\t\t\t\tvar keyFrame=keyFrames[j]=new Keyframe();\n\t\t\t\tstartTime=keyFrame.startTime=startTimeTypes[reader.getUint16()];\n\t\t\t\tvar offset=reader.pos;\n\t\t\t\tkeyFrame.inTangent=new Float32Array(buffer.slice(offset,offset+dataLength));\n\t\t\t\treader.pos+=dataLength;\n\t\t\t\toffset=reader.pos;\n\t\t\t\tkeyFrame.outTangent=new Float32Array(buffer.slice(offset,offset+dataLength));\n\t\t\t\treader.pos+=dataLength;\n\t\t\t\toffset=reader.pos;\n\t\t\t\tkeyFrame.data=new Float32Array(buffer.slice(offset,offset+dataLength));\n\t\t\t\treader.pos+=dataLength;\n\t\t\t\tif (lastKeyFrame){\n\t\t\t\t\tlastKeyFrame.next=keyFrame;\n\t\t\t\t\tlastKeyFrame.duration=startTime-lastKeyFrame.startTime;\n\t\t\t\t}\n\t\t\t\tlastKeyFrame=keyFrame;\n\t\t\t}\n\t\t\tkeyFrame.next=null;\n\t\t\tkeyFrame.duration=clipDur-startTime;\n\t\t};\n\t\tvar nodeToCachePropertyMap=clip._nodeToCachePropertyMap=new Int32Array(nodeCount);\n\t\tvar cachePropertyToNodeMap=clip._cachePropertyMap=new Int32Array(cachePropertyToNodeIndex);\n\t\tvar unCachePropertyToNodeMap=clip._unCachePropertyMap=new Int32Array(unCachePropertyToNodeIndex);\n\t\tcachePropertyToNodeIndex=unCachePropertyToNodeIndex=0;\n\t\tfor (i=0;i < nodeCount;i++){\n\t\t\tnode=nodes[i];\n\t\t\tif (node._cacheProperty){\n\t\t\t\tnodeToCachePropertyMap[i]=cachePropertyToNodeIndex;\n\t\t\t\tcachePropertyToNodeMap[cachePropertyToNodeIndex++]=i;\n\t\t\t\t}else {\n\t\t\t\tunCachePropertyToNodeMap[unCachePropertyToNodeIndex++]=i;\n\t\t\t}\n\t\t}\n\t}\n\n\tAnimationClipParser01._animationClip=null;\n\tAnimationClipParser01._reader=null;\n\tAnimationClipParser01._strings=[];\n\t__static(AnimationClipParser01,\n\t['_BLOCK',function(){return this._BLOCK={count:0};},'_DATA',function(){return this._DATA={offset:0,size:0};}\n\t]);\n\treturn AnimationClipParser01;\n})()\n\n\n/**\n*@private\n*/\n//class laya.d3.animation.AnimationClipParser02\nvar AnimationClipParser02=(function(){\n\tfunction AnimationClipParser02(){}\n\t__class(AnimationClipParser02,'laya.d3.animation.AnimationClipParser02');\n\tAnimationClipParser02.READ_DATA=function(){\n\t\tAnimationClipParser02._DATA.offset=AnimationClipParser02._reader.getUint32();\n\t\tAnimationClipParser02._DATA.size=AnimationClipParser02._reader.getUint32();\n\t}\n\n\tAnimationClipParser02.READ_BLOCK=function(){\n\t\tvar count=AnimationClipParser02._BLOCK.count=AnimationClipParser02._reader.getUint16();\n\t\tvar blockStarts=AnimationClipParser02._BLOCK.blockStarts=[];\n\t\tvar blockLengths=AnimationClipParser02._BLOCK.blockLengths=[];\n\t\tfor (var i=0;i < count;i++){\n\t\t\tblockStarts.push(AnimationClipParser02._reader.getUint32());\n\t\t\tblockLengths.push(AnimationClipParser02._reader.getUint32());\n\t\t}\n\t}\n\n\tAnimationClipParser02.READ_STRINGS=function(){\n\t\tvar offset=AnimationClipParser02._reader.getUint32();\n\t\tvar count=AnimationClipParser02._reader.getUint16();\n\t\tvar prePos=AnimationClipParser02._reader.pos;\n\t\tAnimationClipParser02._reader.pos=offset+AnimationClipParser02._DATA.offset;\n\t\tfor (var i=0;i < count;i++)\n\t\tAnimationClipParser02._strings[i]=AnimationClipParser02._reader.readUTFString();\n\t\tAnimationClipParser02._reader.pos=prePos;\n\t}\n\n\tAnimationClipParser02.parse=function(clip,reader){\n\t\tAnimationClipParser02._animationClip=clip;\n\t\tAnimationClipParser02._reader=reader;\n\t\tvar arrayBuffer=reader.__getBuffer();\n\t\tAnimationClipParser02.READ_DATA();\n\t\tAnimationClipParser02.READ_BLOCK();\n\t\tAnimationClipParser02.READ_STRINGS();\n\t\tfor (var i=0,n=AnimationClipParser02._BLOCK.count;i < n;i++){\n\t\t\tvar index=reader.getUint16();\n\t\t\tvar blockName=AnimationClipParser02._strings[index];\n\t\t\tvar fn=AnimationClipParser02[\"READ_\"+blockName];\n\t\t\tif (fn==null)\n\t\t\t\tthrow new Error(\"model file err,no this function:\"+index+\" \"+blockName);\n\t\t\telse\n\t\t\tfn.call();\n\t\t}\n\t}\n\n\tAnimationClipParser02.READ_ANIMATIONS=function(){\n\t\tvar i=0,j=0;\n\t\tvar node;\n\t\tvar reader=AnimationClipParser02._reader;\n\t\tvar buffer=reader.__getBuffer();\n\t\tvar lengthTypes=[];\n\t\tvar lenghthTypeCount=reader.getUint8();\n\t\tlengthTypes.length=lenghthTypeCount;\n\t\tfor (i=0;i < lenghthTypeCount;i++)\n\t\tlengthTypes[i]=reader.getUint16();\n\t\tvar startTimeTypes=[];\n\t\tvar startTimeTypeCount=reader.getUint16();\n\t\tstartTimeTypes.length=startTimeTypeCount;\n\t\tfor (i=0;i < startTimeTypeCount;i++)\n\t\tstartTimeTypes[i]=reader.getFloat32();\n\t\tvar clip=AnimationClipParser02._animationClip;\n\t\tclip.name=AnimationClipParser02._strings[reader.getUint16()];\n\t\tvar clipDur=clip._duration=reader.getFloat32();\n\t\tclip.islooping=!!reader.getByte();\n\t\tclip._frameRate=reader.getInt16();\n\t\tvar nodeCount=reader.getInt16();\n\t\tvar nodes=clip._nodes=new Array;\n\t\tnodes.length=nodeCount;\n\t\tvar publicDatas=clip._publicClipDatas=[];\n\t\tpublicDatas.length=nodeCount;\n\t\tvar nodesMap=clip._nodesMap={};\n\t\tvar cachePropertyToNodeIndex=0,unCachePropertyToNodeIndex=0;\n\t\tfor (i=0;i < nodeCount;i++){\n\t\t\tnode=nodes[i]=new KeyframeNode();\n\t\t\tvar pathLength=reader.getUint16();\n\t\t\tvar path=node.path=[];\n\t\t\tpath.length=pathLength;\n\t\t\tfor (j=0;j < pathLength;j++)\n\t\t\tpath[j]=AnimationClipParser02._strings[reader.getUint16()];\n\t\t\tvar nodePath=path.join(\"/\");\n\t\t\tvar mapArray=nodesMap[nodePath];\n\t\t\t(mapArray)|| (nodesMap[nodePath]=mapArray=[]);\n\t\t\tmapArray.push(node);\n\t\t\tvar componentTypeStrIndex=reader.getInt16();\n\t\t\t(componentTypeStrIndex!==-1)&& (node.componentType=AnimationClipParser02._strings[componentTypeStrIndex]);\n\t\t\tvar propertyNameID=AnimationNode._propertyIndexDic[AnimationClipParser02._strings[reader.getUint16()]];\n\t\t\tif (propertyNameID !=null){\n\t\t\t\tvar isTransformProperty=propertyNameID < 4;\n\t\t\t\tvar cacheProperty=!isTransformProperty || (isTransformProperty && path[0]===\"\");\n\t\t\t\tnode._cacheProperty=cacheProperty;\n\t\t\t\tif (cacheProperty)\n\t\t\t\t\tcachePropertyToNodeIndex++;\n\t\t\t\telse\n\t\t\t\tunCachePropertyToNodeIndex++;\n\t\t\t\tnode.propertyNameID=propertyNameID;\n\t\t\t\t}else {\n\t\t\t\tthrow new Error(\"AnimationClipParser02:unknown property name.\");\n\t\t\t};\n\t\t\tvar dataLength=lengthTypes[reader.getUint8()];\n\t\t\tnode.keyFrameWidth=dataLength / 4;\n\t\t\tvar keyFrames=node.keyFrames=[];\n\t\t\tvar keyframeCount=keyFrames.length=reader.getUint16();\n\t\t\tvar lastKeyFrame=null;\n\t\t\tvar startTime=NaN;\n\t\t\tfor (j=0;j < keyframeCount;j++){\n\t\t\t\tvar keyFrame=keyFrames[j]=new Keyframe();\n\t\t\t\tstartTime=keyFrame.startTime=startTimeTypes[reader.getUint16()];\n\t\t\t\tvar offset=reader.pos;\n\t\t\t\tkeyFrame.inTangent=new Float32Array(buffer.slice(offset,offset+dataLength));\n\t\t\t\treader.pos+=dataLength;\n\t\t\t\toffset=reader.pos;\n\t\t\t\tkeyFrame.outTangent=new Float32Array(buffer.slice(offset,offset+dataLength));\n\t\t\t\treader.pos+=dataLength;\n\t\t\t\toffset=reader.pos;\n\t\t\t\tkeyFrame.data=new Float32Array(buffer.slice(offset,offset+dataLength));\n\t\t\t\treader.pos+=dataLength;\n\t\t\t\tif (lastKeyFrame){\n\t\t\t\t\tlastKeyFrame.next=keyFrame;\n\t\t\t\t\tlastKeyFrame.duration=startTime-lastKeyFrame.startTime;\n\t\t\t\t}\n\t\t\t\tlastKeyFrame=keyFrame;\n\t\t\t}\n\t\t\tkeyFrame.next=null;\n\t\t\tkeyFrame.duration=clipDur-startTime;\n\t\t};\n\t\tvar eventCount=reader.getUint16();\n\t\tfor (i=0;i < eventCount;i++){\n\t\t\tvar event=new AnimationEvent();\n\t\t\tevent.time=reader.getFloat32();\n\t\t\tevent.eventName=AnimationClipParser02._strings[reader.getUint16()];\n\t\t\tvar params;\n\t\t\tvar paramCount=reader.getUint16();\n\t\t\t(paramCount > 0)&& (event.params=params=[]);\n\t\t\tfor (j=0;j < paramCount;j++){\n\t\t\t\tvar type=reader.getByte();\n\t\t\t\tswitch (type){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tparams.push(!!reader.getByte());\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tparams.push(reader.getInt32());\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tparams.push(reader.getFloat32());\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tparams.push(AnimationClipParser02._strings[reader.getUint16()]);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\tthrow new Error(\"unknown type.\");\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tclip.addEvent(event);\n\t\t};\n\t\tvar nodeToCachePropertyMap=clip._nodeToCachePropertyMap=new Int32Array(nodeCount);\n\t\tvar cachePropertyToNodeMap=clip._cachePropertyMap=new Int32Array(cachePropertyToNodeIndex);\n\t\tvar unCachePropertyToNodeMap=clip._unCachePropertyMap=new Int32Array(unCachePropertyToNodeIndex);\n\t\tcachePropertyToNodeIndex=unCachePropertyToNodeIndex=0;\n\t\tfor (i=0;i < nodeCount;i++){\n\t\t\tnode=nodes[i];\n\t\t\tif (node._cacheProperty){\n\t\t\t\tnodeToCachePropertyMap[i]=cachePropertyToNodeIndex;\n\t\t\t\tcachePropertyToNodeMap[cachePropertyToNodeIndex++]=i;\n\t\t\t\t}else {\n\t\t\t\tunCachePropertyToNodeMap[unCachePropertyToNodeIndex++]=i;\n\t\t\t}\n\t\t}\n\t}\n\n\tAnimationClipParser02._animationClip=null;\n\tAnimationClipParser02._reader=null;\n\tAnimationClipParser02._strings=[];\n\t__static(AnimationClipParser02,\n\t['_BLOCK',function(){return this._BLOCK={count:0};},'_DATA',function(){return this._DATA={offset:0,size:0};}\n\t]);\n\treturn AnimationClipParser02;\n})()\n\n\n/**\n*<code>AnimationEvent</code> 类用于实现动画事件。\n*/\n//class laya.d3.animation.AnimationEvent\nvar AnimationEvent=(function(){\n\tfunction AnimationEvent(){\n\t\t/**事件触发时间。*/\n\t\tthis.time=NaN;\n\t\t/**事件触发名称。*/\n\t\tthis.eventName=null;\n\t\t/**事件触发参数。*/\n\t\tthis.params=null;\n\t}\n\n\t__class(AnimationEvent,'laya.d3.animation.AnimationEvent');\n\treturn AnimationEvent;\n})()\n\n\n/**\n*<code>BoneNode</code> 类用于实现骨骼节点。\n*/\n//class laya.d3.animation.AnimationNode\nvar AnimationNode=(function(){\n\tfunction AnimationNode(){\n\t\t/**@private */\n\t\t//this._childs=null;\n\t\t/**@private */\n\t\t//this._parent=null;\n\t\t/**@private [只读]*/\n\t\t//this.transform=null;\n\t\t/**节点名称。 */\n\t\t//this.name=null;\n\t\tthis._childs=[];\n\t\tthis.transform=new AnimationTransform3D(this);\n\t}\n\n\t__class(AnimationNode,'laya.d3.animation.AnimationNode');\n\tvar __proto=AnimationNode.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*添加子节点。\n\t*@param child 子节点。\n\t*/\n\t__proto.addChild=function(child){\n\t\tchild._parent=this;\n\t\tchild.transform.setParent(this.transform);\n\t\tthis._childs.push(child);\n\t}\n\n\t/**\n\t*移除子节点。\n\t*@param child 子节点。\n\t*/\n\t__proto.removeChild=function(child){\n\t\tvar index=this._childs.indexOf(child);\n\t\t(index!==-1)&& (this._childs.splice(index,1));\n\t}\n\n\t/**\n\t*根据名字获取子节点。\n\t*@param name 名字。\n\t*/\n\t__proto.getChildByName=function(name){\n\t\tfor (var i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar child=this._childs[i];\n\t\t\tif (child.name===name)\n\t\t\t\treturn child;\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*根据索引获取子节点。\n\t*@param index 索引。\n\t*/\n\t__proto.getChildByIndex=function(index){\n\t\treturn this._childs[index];\n\t}\n\n\t/**\n\t*获取子节点的个数。\n\t*/\n\t__proto.getChildCount=function(){\n\t\treturn this._childs.length;\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destNode=destObject;\n\t\tdestNode.name=this.name;\n\t\tfor (var i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar child=this._childs[i];\n\t\t\tvar destChild=child.clone();\n\t\t\tdestNode.addChild(destChild);\n\t\t\tvar transform=child.transform;\n\t\t\tvar destTransform=destChild.transform;\n\t\t\tdestTransform.setLocalPosition(transform.getLocalPosition());\n\t\t\tdestTransform.setLocalRotation(transform.getLocalRotation());\n\t\t\tdestTransform.setLocalScale(transform.getLocalScale());\n\t\t\tdestTransform._localRotationEuler=transform._localRotationEuler;\n\t\t\tdestTransform._setWorldMatrixIgnoreUpdate(transform.getWorldMatrix());\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\tAnimationNode.__init__=function(){\n\t\tAnimationNode.registerAnimationNodeProperty(\"localPosition\",AnimationNode._getLocalPosition,AnimationNode._setLocalPosition);\n\t\tAnimationNode.registerAnimationNodeProperty(\"localRotation\",AnimationNode._getLocalRotation,AnimationNode._setLocalRotation);\n\t\tAnimationNode.registerAnimationNodeProperty(\"localScale\",AnimationNode._getLocalScale,AnimationNode._setLocalScale);\n\t\tAnimationNode.registerAnimationNodeProperty(\"localRotationEuler\",AnimationNode._getLocalRotationEuler,AnimationNode._setLocalRotationEuler);\n\t\tAnimationNode.registerAnimationNodeProperty(\"particleRender.sharedMaterial.tintColor\",AnimationNode._getParticleRenderSharedMaterialTintColor,AnimationNode._setParticleRenderSharedMaterialTintColor);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.tilingOffset\",AnimationNode._getMeshRenderSharedMaterialTilingOffset,AnimationNode._setMeshRenderSharedMaterialTilingOffset);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.albedoColor\",AnimationNode._getMeshRenderSharedMaterialAlbedo,AnimationNode._setMeshRenderSharedMaterialAlbedo);\n\t\tAnimationNode.registerAnimationNodeProperty(\"skinnedMeshRender.sharedMaterial.tilingOffset\",AnimationNode._getSkinnedMeshRenderSharedMaterialTilingOffset,AnimationNode._setSkinnedMeshRenderSharedMaterialTilingOffset);\n\t\tAnimationNode.registerAnimationNodeProperty(\"skinnedMeshRender.sharedMaterial.albedoColor\",AnimationNode._getSkinnedMeshRenderSharedMaterialAlbedo,AnimationNode._setSkinnedMeshRenderSharedMaterialAlbedo);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.albedo\",AnimationNode._getMeshRenderSharedMaterialAlbedo,AnimationNode._setMeshRenderSharedMaterialAlbedo);\n\t\tAnimationNode.registerAnimationNodeProperty(\"skinnedMeshRender.sharedMaterial.albedo\",AnimationNode._getSkinnedMeshRenderSharedMaterialAlbedo,AnimationNode._setSkinnedMeshRenderSharedMaterialAlbedo);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.intensity\",AnimationNode._getMeshRenderSharedMaterialIntensity,AnimationNode._setMeshRenderSharedMaterialIntensity);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.alpha\",AnimationNode._getMeshRenderSharedMaterialAlpha,AnimationNode._setMeshRenderSharedMaterialAlpha);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.alphaColor\",AnimationNode._getMeshRenderSharedMaterialAlphaColor,AnimationNode._setMeshRenderSharedMaterialAlphaColor);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.baseColor\",AnimationNode._getMeshRenderSharedMaterialBaseColor,AnimationNode._setMeshRenderSharedMaterialBaseColor);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.dissolve\",AnimationNode._getMeshRenderSharedMaterialDissolve,AnimationNode._setMeshRenderSharedMaterialDissolve);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.dissolveSpeed\",AnimationNode._getMeshRenderSharedMaterialDissolveSpeed,AnimationNode._setMeshRenderSharedMaterialDissolveSpeed);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.mMultiplier\",AnimationNode._getMeshRenderSharedMaterialMMultiplier,AnimationNode._setMeshRenderSharedMaterialMMultiplier);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.baseScrollSpeedX\",AnimationNode._getMeshRenderSharedMaterialBaseScrollSpeedX,AnimationNode._setMeshRenderSharedMaterialBaseScrollSpeedX);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.baseScrollSpeedY\",AnimationNode._getMeshRenderSharedMaterialBaseScrollSpeedY,AnimationNode._setMeshRenderSharedMaterialBaseScrollSpeedY);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.secondScrollSpeedX\",AnimationNode._getMeshRenderSharedMaterialSecondScrollSpeedX,AnimationNode._setMeshRenderSharedMaterialSecondScrollSpeedX);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.secondScrollSpeedY\",AnimationNode._getMeshRenderSharedMaterialSecondScrollSpeedY,AnimationNode._setMeshRenderSharedMaterialSecondScrollSpeedY);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.detailTilingOffset\",AnimationNode._getMeshRenderSharedMaterialDetailTilingOffset,AnimationNode._setMeshRenderSharedMaterialDetailTilingOffset);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.dissolveTilingOffset\",AnimationNode._getMeshRenderSharedMaterialDissolveTilingOffset,AnimationNode._setMeshRenderSharedMaterialDissolveTilingOffset);\n\t\tAnimationNode.registerAnimationNodeProperty(\"meshRender.sharedMaterial.maskTilingOffset\",AnimationNode._getMeshRenderSharedMaterialMaskTilingOffset,AnimationNode._setMeshRenderSharedMaterialMaskTilingOffset);\n\t}\n\n\tAnimationNode.registerAnimationNodeProperty=function(propertyName,getFunc,setFunc){\n\t\tif (AnimationNode._propertyIndexDic[propertyName]){\n\t\t\tthrow new Error(\"AnimationNode: this propertyName has registered.\");\n\t\t\t}else {\n\t\t\tAnimationNode._propertyIndexDic[propertyName]=AnimationNode._propertyIDCounter;\n\t\t\tAnimationNode._propertyGetFuncs[AnimationNode._propertyIDCounter]=getFunc;\n\t\t\tAnimationNode._propertySetFuncs[AnimationNode._propertyIDCounter]=setFunc;\n\t\t\tAnimationNode._propertyIDCounter++;\n\t\t}\n\t}\n\n\tAnimationNode._getLocalPosition=function(animationNode,sprite3D){\n\t\tif (animationNode)\n\t\t\treturn animationNode.transform.getLocalPosition();\n\t\telse\n\t\treturn sprite3D._transform.localPosition.elements;\n\t}\n\n\tAnimationNode._setLocalPosition=function(animationNode,sprite3D,value){\n\t\tif (animationNode){\n\t\t\tanimationNode.transform.setLocalPosition(value);\n\t\t\t}else {\n\t\t\tvar spriteTransform=sprite3D._transform;\n\t\t\tvar localPosition=spriteTransform.localPosition;\n\t\t\tlocalPosition.elements=value;\n\t\t\tspriteTransform.localPosition=localPosition;\n\t\t}\n\t}\n\n\tAnimationNode._getLocalRotation=function(animationNode,sprite3D){\n\t\tif (animationNode)\n\t\t\treturn animationNode.transform.getLocalRotation();\n\t\telse\n\t\treturn sprite3D._transform.localRotation.elements;\n\t}\n\n\tAnimationNode._setLocalRotation=function(animationNode,sprite3D,value){\n\t\tif (animationNode){\n\t\t\tanimationNode.transform.setLocalRotation(value);\n\t\t\t}else {\n\t\t\tvar spriteTransform=sprite3D._transform;\n\t\t\tvar localRotation=spriteTransform.localRotation;\n\t\t\tlocalRotation.elements=value;\n\t\t\tspriteTransform.localRotation=localRotation;\n\t\t}\n\t}\n\n\tAnimationNode._getLocalScale=function(animationNode,sprite3D){\n\t\tif (animationNode)\n\t\t\treturn animationNode.transform.getLocalScale();\n\t\telse\n\t\treturn sprite3D._transform.localScale.elements;\n\t}\n\n\tAnimationNode._setLocalScale=function(animationNode,sprite3D,value){\n\t\tif (animationNode){\n\t\t\tanimationNode.transform.setLocalScale(value);\n\t\t\t}else {\n\t\t\tvar spriteTransform=sprite3D._transform;\n\t\t\tvar localScale=spriteTransform.localScale;\n\t\t\tlocalScale.elements=value;\n\t\t\tspriteTransform.localScale=localScale;\n\t\t}\n\t}\n\n\tAnimationNode._getLocalRotationEuler=function(animationNode,sprite3D){\n\t\tif (animationNode)\n\t\t\treturn animationNode.transform.getLocalRotationEuler();\n\t\telse\n\t\treturn sprite3D._transform.localRotationEuler.elements;\n\t}\n\n\tAnimationNode._setLocalRotationEuler=function(animationNode,sprite3D,value){\n\t\tif (animationNode){\n\t\t\tanimationNode.transform.setLocalRotationEuler(value);\n\t\t\t}else {\n\t\t\tvar spriteTransform=sprite3D._transform;\n\t\t\tvar localRotationEuler=spriteTransform.localRotationEuler;\n\t\t\tlocalRotationEuler.elements=value;\n\t\t\tspriteTransform.localRotationEuler=localRotationEuler;\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialTilingOffset=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.tilingOffset.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.tilingOffset.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialTilingOffset=function(animationNode,sprite3D,value){\n\t\tvar material,tilingOffset;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\ttilingOffset=material.tilingOffset;\n\t\t\t\ttilingOffset.elements=value;\n\t\t\t\tmaterial.tilingOffset=tilingOffset;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\ttilingOffset=material.tilingOffset;\n\t\t\ttilingOffset.elements=value;\n\t\t\tmaterial.tilingOffset=tilingOffset;\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialAlbedo=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.albedoColor.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.albedoColor.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialAlbedo=function(animationNode,sprite3D,value){\n\t\tvar material,albedo;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\talbedo=material.albedoColor;\n\t\t\t\talbedo.elements=value;\n\t\t\t\tmaterial.albedoColor=albedo;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\talbedo=material.albedoColor;\n\t\t\talbedo.elements=value;\n\t\t\tmaterial.albedoColor=albedo;\n\t\t}\n\t}\n\n\tAnimationNode._getSkinnedMeshRenderSharedMaterialTilingOffset=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).skinnedMeshRender.sharedMaterial;\n\t\t\t\treturn material.tilingOffset.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).skinnedMeshRender.sharedMaterial;\n\t\t\treturn material.tilingOffset.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setSkinnedMeshRenderSharedMaterialTilingOffset=function(animationNode,sprite3D,value){\n\t\tvar material,tilingOffset;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).skinnedMeshRender.material;\n\t\t\t\ttilingOffset=material.tilingOffset;\n\t\t\t\ttilingOffset.elements=value;\n\t\t\t\tmaterial.tilingOffset=tilingOffset;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).skinnedMeshRender.material;\n\t\t\ttilingOffset=material.tilingOffset;\n\t\t\ttilingOffset.elements=value;\n\t\t\tmaterial.tilingOffset=tilingOffset;\n\t\t}\n\t}\n\n\tAnimationNode._getSkinnedMeshRenderSharedMaterialAlbedo=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).skinnedMeshRender.sharedMaterial;\n\t\t\t\treturn material.albedoColor.elements;\n\t\t\t\t}else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).skinnedMeshRender.sharedMaterial;\n\t\t\treturn material.albedoColor.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setSkinnedMeshRenderSharedMaterialAlbedo=function(animationNode,sprite3D,value){\n\t\tvar material,albedo;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).skinnedMeshRender.material;\n\t\t\t\talbedo=material.albedoColor;\n\t\t\t\talbedo.elements=value;\n\t\t\t\tmaterial.albedoColor=albedo;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).skinnedMeshRender.material;\n\t\t\talbedo=material.albedoColor;\n\t\t\talbedo.elements=value;\n\t\t\tmaterial.albedoColor=albedo;\n\t\t}\n\t}\n\n\tAnimationNode._getParticleRenderSharedMaterialTintColor=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).particleRender.sharedMaterial;\n\t\t\t\treturn material.tintColor.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).particleRender.sharedMaterial;\n\t\t\treturn material.tintColor.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setParticleRenderSharedMaterialTintColor=function(animationNode,sprite3D,value){\n\t\tvar material,tintColor;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).particleRender.material;\n\t\t\t\ttintColor=material.tintColor;\n\t\t\t\ttintColor.elements=value;\n\t\t\t\tmaterial.tintColor=tintColor;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).particleRender.material;\n\t\t\ttintColor=material.tintColor;\n\t\t\ttintColor.elements=value;\n\t\t\tmaterial.tintColor=tintColor;\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialAlphaColor=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.alphaColor.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.alphaColor.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialAlphaColor=function(animationNode,sprite3D,value){\n\t\tvar material,alphaColor;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\talphaColor=material.alphaColor;\n\t\t\t\talphaColor.elements=value;\n\t\t\t\tmaterial.alphaColor=alphaColor;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\talphaColor=material.alphaColor;\n\t\t\talphaColor.elements=value;\n\t\t\tmaterial.alphaColor=alphaColor;\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialBaseColor=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.baseColor.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.baseColor.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialBaseColor=function(animationNode,sprite3D,value){\n\t\tvar material,baseColor;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tbaseColor=material.baseColor;\n\t\t\t\tbaseColor.elements=value;\n\t\t\t\tmaterial.baseColor=baseColor;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tbaseColor=material.baseColor;\n\t\t\tbaseColor.elements=value;\n\t\t\tmaterial.baseColor=baseColor;\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialDissolve=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.dissolve;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.dissolve;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialDissolve=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.dissolve=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.dissolve=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialDissolveSpeed=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.dissolveSpeed;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.dissolveSpeed;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialDissolveSpeed=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.dissolveSpeed=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.dissolveSpeed=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialMMultiplier=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.mMultiplier;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.mMultiplier;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialMMultiplier=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.mMultiplier=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.mMultiplier=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialBaseScrollSpeedX=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.baseScrollSpeedX;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.baseScrollSpeedX;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialBaseScrollSpeedX=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.baseScrollSpeedX=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.baseScrollSpeedX=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialBaseScrollSpeedY=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.baseScrollSpeedY;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.baseScrollSpeedY;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialBaseScrollSpeedY=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.baseScrollSpeedY=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.baseScrollSpeedY=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialSecondScrollSpeedX=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.secondScrollSpeedX;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.secondScrollSpeedX;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialSecondScrollSpeedX=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.secondScrollSpeedX=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.secondScrollSpeedX=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialSecondScrollSpeedY=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.secondScrollSpeedY;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.secondScrollSpeedY;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialSecondScrollSpeedY=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.secondScrollSpeedY=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.secondScrollSpeedY=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialAlpha=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.alpha;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.alpha;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialAlpha=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.alpha=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.alpha=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialIntensity=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.intensity;\n\t\t\t}else\n\t\t\treturn 0.0;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.intensity;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialIntensity=function(animationNode,sprite3D,value){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaterial.intensity=value[0];\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaterial.intensity=value[0];\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialDetailTilingOffset=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.detailTilingOffset.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.detailTilingOffset.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialDetailTilingOffset=function(animationNode,sprite3D,value){\n\t\tvar material,detailTilingOffset;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tdetailTilingOffset=material.detailTilingOffset;\n\t\t\t\tdetailTilingOffset.elements=value;\n\t\t\t\tmaterial.detailTilingOffset=detailTilingOffset;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tdetailTilingOffset=material.detailTilingOffset;\n\t\t\tdetailTilingOffset.elements=value;\n\t\t\tmaterial.detailTilingOffset=detailTilingOffset;\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialDissolveTilingOffset=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.dissolveTilingOffset.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.dissolveTilingOffset.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialDissolveTilingOffset=function(animationNode,sprite3D,value){\n\t\tvar material,dissolveTilingOffset;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tdissolveTilingOffset=material.dissolveTilingOffset;\n\t\t\t\tdissolveTilingOffset.elements=value;\n\t\t\t\tmaterial.dissolveTilingOffset=dissolveTilingOffset;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tdissolveTilingOffset=material.dissolveTilingOffset;\n\t\t\tdissolveTilingOffset.elements=value;\n\t\t\tmaterial.dissolveTilingOffset=dissolveTilingOffset;\n\t\t}\n\t}\n\n\tAnimationNode._getMeshRenderSharedMaterialMaskTilingOffset=function(animationNode,sprite3D){\n\t\tvar material;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.sharedMaterial;\n\t\t\t\treturn material.maskTilingOffset.elements;\n\t\t\t}else\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.sharedMaterial;\n\t\t\treturn material.maskTilingOffset.elements;\n\t\t}\n\t}\n\n\tAnimationNode._setMeshRenderSharedMaterialMaskTilingOffset=function(animationNode,sprite3D,value){\n\t\tvar material,maskTilingOffset;\n\t\tif (animationNode){\n\t\t\tvar entity=animationNode.transform._entity;\n\t\t\tif (entity){\n\t\t\t\tmaterial=(entity.owner).meshRender.material;\n\t\t\t\tmaskTilingOffset=material.maskTilingOffset;\n\t\t\t\tmaskTilingOffset.elements=value;\n\t\t\t\tmaterial.maskTilingOffset=maskTilingOffset;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmaterial=(sprite3D).meshRender.material;\n\t\t\tmaskTilingOffset=material.maskTilingOffset;\n\t\t\tmaskTilingOffset.elements=value;\n\t\t\tmaterial.maskTilingOffset=maskTilingOffset;\n\t\t}\n\t}\n\n\tAnimationNode._propertyIDCounter=0;\n\tAnimationNode._propertyIndexDic={};\n\tAnimationNode._propertySetFuncs=[];\n\tAnimationNode._propertyGetFuncs=[];\n\treturn AnimationNode;\n})()\n\n\n/**\n*@private\n*/\n//class laya.d3.animation.Keyframe\nvar Keyframe=(function(){\n\tfunction Keyframe(){\n\t\tthis.startTime=NaN;\n\t\tthis.inTangent=null;\n\t\tthis.outTangent=null;\n\t\tthis.data=null;\n\t\tthis.duration=NaN;\n\t\tthis.next=null;\n\t}\n\n\t__class(Keyframe,'laya.d3.animation.Keyframe');\n\treturn Keyframe;\n})()\n\n\n/**\n*@private\n*/\n//class laya.d3.animation.KeyframeNode\nvar KeyframeNode=(function(){\n\tfunction KeyframeNode(){\n\t\tthis._cacheProperty=false;\n\t\tthis.path=null;\n\t\tthis.componentType=null;\n\t\t//TODO:是否去掉\n\t\tthis.propertyNameID=0;\n\t\tthis.keyFrameWidth=0;\n\t\tthis.defaultData=null;\n\t\tthis.keyFrames=null;\n\t}\n\n\t__class(KeyframeNode,'laya.d3.animation.KeyframeNode');\n\treturn KeyframeNode;\n})()\n\n\n/**\n*<code>SplineCurvePositionVelocity</code> 类用于通过顶点和速度创建闪光插值。\n*/\n//class laya.d3.core.glitter.SplineCurvePositionVelocity\nvar SplineCurvePositionVelocity=(function(){\n\tfunction SplineCurvePositionVelocity(){\n\t\tthis._tempVector30=new Vector3();\n\t\tthis._tempVector31=new Vector3();\n\t\tthis._tempVector32=new Vector3();\n\t\tthis._a=new Vector3();\n\t\tthis._b=new Vector3();\n\t\tthis._c=new Vector3();\n\t\tthis._d=new Vector3();\n\t}\n\n\t__class(SplineCurvePositionVelocity,'laya.d3.core.glitter.SplineCurvePositionVelocity');\n\tvar __proto=SplineCurvePositionVelocity.prototype;\n\t/**\n\t*初始化插值所需信息。\n\t*@param position0 顶点0的位置。\n\t*@param velocity0 顶点0的速度。\n\t*@param position1 顶点1的位置。\n\t*@param velocity1 顶点1的速度。\n\t*/\n\t__proto.Init=function(position0,velocity0,position1,velocity1){\n\t\tposition0.cloneTo(this._d);\n\t\tvelocity0.cloneTo(this._c);\n\t\tVector3.scale(position0,2.0,this._a);\n\t\tVector3.scale(position1,2.0,this._tempVector30);\n\t\tVector3.subtract(this._a,this._tempVector30,this._a);\n\t\tVector3.add(this._a,velocity0,this._a);\n\t\tVector3.add(this._a,velocity1,this._a);\n\t\tVector3.scale(position1,3.0,this._b);\n\t\tVector3.scale(position0,3.0,this._tempVector30);\n\t\tVector3.subtract(this._b,this._tempVector30,this._b);\n\t\tVector3.subtract(this._b,velocity1,this._b);\n\t\tVector3.scale(velocity0,2.0,this._tempVector30);\n\t\tVector3.subtract(this._b,this._tempVector30,this._b);\n\t}\n\n\t/**\n\t*初始化插值所需信息。\n\t*@param t 插值比例\n\t*@param out 输出结果\n\t*/\n\t__proto.Slerp=function(t,out){\n\t\tVector3.scale(this._a,t *t *t,this._tempVector30);\n\t\tVector3.scale(this._b,t *t,this._tempVector31);\n\t\tVector3.scale(this._c,t,this._tempVector32);\n\t\tVector3.add(this._tempVector30,this._tempVector31,out);\n\t\tVector3.add(out,this._tempVector32,out);\n\t\tVector3.add(out,this._d,out);\n\t}\n\n\treturn SplineCurvePositionVelocity;\n})()\n\n\n/**\n*<code>HeightMap</code> 类用于实现高度图数据。\n*/\n//class laya.d3.core.HeightMap\nvar HeightMap=(function(){\n\tfunction HeightMap(width,height,minHeight,maxHeight){\n\t\t/**@private */\n\t\tthis._datas=null;\n\t\t/**@private */\n\t\tthis._w=0;\n\t\t/**@private */\n\t\tthis._h=0;\n\t\t/**@private */\n\t\tthis._minHeight=NaN;\n\t\t/**@private */\n\t\tthis._maxHeight=NaN;\n\t\tthis._datas=[];\n\t\tthis._w=width;\n\t\tthis._h=height;\n\t\tthis._minHeight=minHeight;\n\t\tthis._maxHeight=maxHeight;\n\t}\n\n\t__class(HeightMap,'laya.d3.core.HeightMap');\n\tvar __proto=HeightMap.prototype;\n\t/**@private */\n\t__proto._inBounds=function(row,col){\n\t\treturn row >=0 && row < this._h && col >=0 && col < this._w;\n\t}\n\n\t/**\n\t*获取高度。\n\t*@param row 列数。\n\t*@param col 行数。\n\t*@return 高度。\n\t*/\n\t__proto.getHeight=function(row,col){\n\t\tif (this._inBounds(row,col))\n\t\t\treturn this._datas[row][col];\n\t\telse\n\t\treturn NaN;\n\t}\n\n\t/**\n\t*获取宽度。\n\t*@return value 宽度。\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._w;\n\t});\n\n\t/**\n\t*获取高度。\n\t*@return value 高度。\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\treturn this._h;\n\t});\n\n\t/**\n\t*最大高度。\n\t*@return value 最大高度。\n\t*/\n\t__getset(0,__proto,'maxHeight',function(){\n\t\treturn this._maxHeight;\n\t});\n\n\t/**\n\t*最大高度。\n\t*@return value 最大高度。\n\t*/\n\t__getset(0,__proto,'minHeight',function(){\n\t\treturn this._minHeight;\n\t});\n\n\tHeightMap.creatFromMesh=function(mesh,width,height,outCellSize){\n\t\tvar vertices=[];\n\t\tvar indexs=[];\n\t\tvar submesheCount=mesh.getSubMeshCount();\n\t\tfor (var i=0;i < submesheCount;i++){\n\t\t\tvar subMesh=mesh.getSubMesh(i);\n\t\t\tvar vertexBuffer=subMesh._getVertexBuffer();\n\t\t\tvar verts=vertexBuffer.getData();\n\t\t\tvar subMeshVertices=[];\n\t\t\tfor (var j=0;j < verts.length;j+=vertexBuffer.vertexDeclaration.vertexStride / 4){\n\t\t\t\tvar position=new Vector3(verts[j+0],verts[j+1],verts[j+2]);\n\t\t\t\tsubMeshVertices.push(position);\n\t\t\t}\n\t\t\tvertices.push(subMeshVertices);\n\t\t\tvar ib=subMesh._getIndexBuffer();\n\t\t\tindexs.push(ib.getData());\n\t\t};\n\t\tvar boundingBox=mesh.boundingBox;\n\t\tvar minX=boundingBox.min.x;\n\t\tvar minZ=boundingBox.min.z;\n\t\tvar maxX=boundingBox.max.x;\n\t\tvar maxZ=boundingBox.max.z;\n\t\tvar minY=boundingBox.min.y;\n\t\tvar maxY=boundingBox.max.y;\n\t\tvar widthSize=maxX-minX;\n\t\tvar heightSize=maxZ-minZ;\n\t\tvar cellWidth=outCellSize.elements[0]=widthSize / (width-1);\n\t\tvar cellHeight=outCellSize.elements[1]=heightSize / (height-1);\n\t\tvar heightMap=new HeightMap(width,height,minY,maxY);\n\t\tvar ray=HeightMap._tempRay;\n\t\tvar rayDirE=ray.direction.elements;\n\t\trayDirE[0]=0;\n\t\trayDirE[1]=-1;\n\t\trayDirE[2]=0;\n\t\tvar heightOffset=0.1;\n\t\tvar rayY=maxY+heightOffset;\n\t\tray.origin.elements[1]=rayY;\n\t\tfor (var h=0;h < height;h++){\n\t\t\tvar posZ=minZ+h *cellHeight;\n\t\t\theightMap._datas[h]=[];\n\t\t\tfor (var w=0;w < width;w++){\n\t\t\t\tvar posX=minX+w *cellWidth;\n\t\t\t\tvar rayOriE=ray.origin.elements;\n\t\t\t\trayOriE[0]=posX;\n\t\t\t\trayOriE[2]=posZ;\n\t\t\t\tvar closestIntersection=HeightMap._getPosition(ray,vertices,indexs);\n\t\t\t\theightMap._datas[h][w]=(closestIntersection===Number.MAX_VALUE)? NaN :rayY-closestIntersection;\n\t\t\t}\n\t\t}\n\t\treturn heightMap;\n\t}\n\n\tHeightMap.createFromImage=function(texture,minHeight,maxHeight){\n\t\tvar textureWidth=texture.width;\n\t\tvar textureHeight=texture.height;\n\t\tvar heightMap=new HeightMap(textureWidth,textureHeight,minHeight,maxHeight);\n\t\tvar compressionRatio=(maxHeight-minHeight)/ 254;\n\t\tvar pixelsInfo=texture.getPixels();\n\t\tvar index=0;\n\t\tfor (var h=0;h <textureHeight;h++){\n\t\t\tvar colDatas=heightMap._datas[h]=[];\n\t\t\tfor (var w=0;w < textureWidth;w++){\n\t\t\t\tvar r=pixelsInfo[index++];\n\t\t\t\tvar g=pixelsInfo[index++];\n\t\t\t\tvar b=pixelsInfo[index++];\n\t\t\t\tvar a=pixelsInfo[index++];\n\t\t\t\tif (r==255 && g==255 && b==255 && a==255)\n\t\t\t\t\tcolDatas[w]=NaN;\n\t\t\t\telse {\n\t\t\t\t\tcolDatas[w]=(r+g+b)/ 3 *compressionRatio+minHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn heightMap;\n\t}\n\n\tHeightMap._getPosition=function(ray,vertices,indexs){\n\t\tvar closestIntersection=Number.MAX_VALUE;\n\t\tfor (var i=0;i < vertices.length;i++){\n\t\t\tvar subMeshVertices=vertices[i];\n\t\t\tvar subMeshIndexes=indexs[i];\n\t\t\tfor (var j=0;j < subMeshIndexes.length;j+=3){\n\t\t\t\tvar vertex1=subMeshVertices[subMeshIndexes[j+0]];\n\t\t\t\tvar vertex2=subMeshVertices[subMeshIndexes[j+1]];\n\t\t\t\tvar vertex3=subMeshVertices[subMeshIndexes[j+2]];\n\t\t\t\tvar intersection=Picker.rayIntersectsTriangle(ray,vertex1,vertex2,vertex3);\n\t\t\t\tif (!isNaN(intersection)&& intersection < closestIntersection){\n\t\t\t\t\tclosestIntersection=intersection;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn closestIntersection;\n\t}\n\n\t__static(HeightMap,\n\t['_tempRay',function(){return this._tempRay=new Ray(new Vector3(),new Vector3());}\n\t]);\n\treturn HeightMap;\n})()\n\n\n/**\n*<code>Layer</code> 类用于实现层。\n*/\n//class laya.d3.core.Layer\nvar Layer=(function(){\n\tfunction Layer(){\n\t\t/**@private 编号。*/\n\t\t//this._number=0;\n\t\t/**@private 蒙版值。*/\n\t\t//this._mask=0;\n\t\t/**@private 是否显示。*/\n\t\t//this._visible=false;\n\t\t/**@private 只读,不允许修改。*/\n\t\t//this._nonRigidbodyOffset=0;\n\t\t/**@private 只读,不允许修改。*/\n\t\t//this._colliders=null;\n\t\t/**名字。*/\n\t\t//this.name=null;\n\t\tthis._visible=true;\n\t\tthis._nonRigidbodyOffset=0;\n\t\tthis._colliders=[];\n\t}\n\n\t__class(Layer,'laya.d3.core.Layer');\n\tvar __proto=Layer.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._binarySearchIndex=function(){\n\t\tvar start=0;\n\t\tvar end=Layer._collsionTestList.length-1;\n\t\tvar mid=0;\n\t\twhile (start <=end){\n\t\t\tmid=Math.floor((start+end)/ 2);\n\t\t\tvar midValue=Layer._collsionTestList[mid];\n\t\t\tif (midValue==this._number)\n\t\t\t\treturn mid;\n\t\t\telse if (midValue > this._number)\n\t\t\tend=mid-1;\n\t\t\telse\n\t\t\tstart=mid+1;\n\t\t}\n\t\treturn start;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addCollider=function(collider){\n\t\t(this._colliders.length===0)&& (Layer._collsionTestList.splice(this._binarySearchIndex(),0,this._number));\n\t\tif (collider._isRigidbody){\n\t\t\tthis._colliders.unshift(collider);\n\t\t\tthis._nonRigidbodyOffset++;\n\t\t\t}else {\n\t\t\tthis._colliders.push(collider);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeCollider=function(collider){\n\t\tvar index=this._colliders.indexOf(collider);\n\t\tif (index < this._nonRigidbodyOffset)\n\t\t\tthis._nonRigidbodyOffset--;\n\t\tthis._colliders.splice(index,1);\n\t\t(this._colliders.length===0)&& (Layer._collsionTestList.splice(Layer._collsionTestList.indexOf(this._number),1));\n\t}\n\n\t/**\n\t*获取编号。\n\t*@return 编号。\n\t*/\n\t__getset(0,__proto,'number',function(){\n\t\treturn this._number;\n\t});\n\n\t/**\n\t*设置是否显示。\n\t*@param value 是否显示。\n\t*/\n\t/**\n\t*获取是否显示。\n\t*@return 是否显示。\n\t*/\n\t__getset(0,__proto,'visible',function(){\n\t\treturn this._visible;\n\t\t},function(value){\n\t\tthis._visible=value;\n\t\tif (value)\n\t\t\tLayer._visibleLayers=Layer._visibleLayers | this.mask;\n\t\telse\n\t\tLayer._visibleLayers=Layer._visibleLayers & ~this.mask;\n\t});\n\n\t/**\n\t*获取蒙版值。\n\t*@return 蒙版值。\n\t*/\n\t__getset(0,__proto,'mask',function(){\n\t\treturn this._mask;\n\t});\n\n\t/**\n\t*设置Layer显示层。\n\t*@param value 显示层。\n\t*/\n\t/**\n\t*获取Layer显示层。\n\t*@return 显示层。\n\t*/\n\t__getset(1,Layer,'visibleLayers',function(){\n\t\treturn Layer._visibleLayers;\n\t\t},function(value){\n\t\tLayer._visibleLayers=value;\n\t\tfor (var i=0,n=Layer._layerList.length;i < n;i++){\n\t\t\tvar layer=Layer._layerList[i];\n\t\t\tlayer._visible=(layer._mask & Layer._visibleLayers)!==0;\n\t\t}\n\t});\n\n\tLayer.__init__=function(){\n\t\tLayer._layerList.length=31;\n\t\tfor (var i=0;i < 31;i++){\n\t\t\tvar layer=new Layer();\n\t\t\tLayer._layerList[i]=layer;\n\t\t\tif (i===0){\n\t\t\t\tlayer.name=\"Default Layer\";\n\t\t\t\tlayer.visible=true;\n\t\t\t\t}else {\n\t\t\t\tlayer.name=\"Layer-\"+i;\n\t\t\t\tlayer.visible=false;\n\t\t\t}\n\t\t\tlayer._number=i;\n\t\t\tlayer._mask=Math.pow(2,i);\n\t\t}\n\t\tLayer.currentCreationLayer=Layer._layerList[0];\n\t}\n\n\tLayer.getLayerByNumber=function(number){\n\t\tif (number < 0 || number > 30)\n\t\t\tthrow new Error(\"无法返回指定Layer，该number超出范围！\");\n\t\treturn Layer._layerList[number];\n\t}\n\n\tLayer.getLayerByName=function(name){\n\t\tfor (var i=0;i < 31;i++){\n\t\t\tif (Layer._layerList[i].name===name)\n\t\t\t\treturn Layer._layerList[i];\n\t\t}\n\t\tthrow new Error(\"无法返回指定Layer,该name不存在\");\n\t}\n\n\tLayer.isVisible=function(mask){\n\t\treturn (mask & Layer._currentCameraCullingMask & Layer._visibleLayers)!=0;\n\t}\n\n\tLayer._layerList=[];\n\tLayer._visibleLayers=2147483647;\n\tLayer._collsionTestList=[];\n\tLayer._currentCameraCullingMask=2147483647;\n\tLayer.maxCount=31;\n\tLayer.currentCreationLayer=null;\n\treturn Layer;\n})()\n\n\n/**\n*<code>Burst</code> 类用于粒子的爆裂描述。\n*/\n//class laya.d3.core.particleShuriKen.module.Burst\nvar Burst=(function(){\n\tfunction Burst(time,minCount,maxCount){\n\t\t/**@private 爆裂时间,单位为秒。*/\n\t\tthis._time=NaN;\n\t\t/**@private 爆裂的最小数量。*/\n\t\tthis._minCount=0;\n\t\t/**@private 爆裂的最大数量。*/\n\t\tthis._maxCount=0;\n\t\tthis._time=time;\n\t\tthis._minCount=minCount;\n\t\tthis._maxCount=maxCount;\n\t}\n\n\t__class(Burst,'laya.d3.core.particleShuriKen.module.Burst');\n\tvar __proto=Burst.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destBurst=destObject;\n\t\tdestBurst._time=this._time\n\t\tdestBurst._minCount=this._minCount;\n\t\tdestBurst._maxCount=this._maxCount;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destBurst=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destBurst);\n\t\treturn destBurst;\n\t}\n\n\t/**\n\t*获取爆裂时间,单位为秒。\n\t*@return 爆裂时间,单位为秒。\n\t*/\n\t__getset(0,__proto,'time',function(){\n\t\treturn this._time;\n\t});\n\n\t/**\n\t*获取爆裂的最小数量。\n\t*@return 爆裂的最小数量。\n\t*/\n\t__getset(0,__proto,'minCount',function(){\n\t\treturn this._minCount;\n\t});\n\n\t/**\n\t*获取爆裂的最大数量。\n\t*@return 爆裂的最大数量。\n\t*/\n\t__getset(0,__proto,'maxCount',function(){\n\t\treturn this._maxCount;\n\t});\n\n\treturn Burst;\n})()\n\n\n/**\n*<code>ColorOverLifetime</code> 类用于粒子的生命周期颜色。\n*/\n//class laya.d3.core.particleShuriKen.module.ColorOverLifetime\nvar ColorOverLifetime=(function(){\n\tfunction ColorOverLifetime(color){\n\t\t/**@private */\n\t\tthis._color=null;\n\t\t/**是否启用。*/\n\t\tthis.enbale=false;\n\t\tthis._color=color;\n\t}\n\n\t__class(ColorOverLifetime,'laya.d3.core.particleShuriKen.module.ColorOverLifetime');\n\tvar __proto=ColorOverLifetime.prototype;\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destColorOverLifetime=destObject;\n\t\tthis._color.cloneTo(destColorOverLifetime._color);\n\t\tdestColorOverLifetime.enbale=this.enbale;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destColor;\n\t\tswitch (this._color.type){\n\t\t\tcase 0:\n\t\t\t\tdestColor=GradientColor.createByConstant(this._color.constant.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tdestColor=GradientColor.createByGradient(this._color.gradient.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tdestColor=GradientColor.createByRandomTwoConstant(this._color.constantMin.clone(),this._color.constantMax.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tdestColor=GradientColor.createByRandomTwoGradient(this._color.gradientMin.clone(),this._color.gradientMax.clone());\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar destColorOverLifetime=/*__JS__ */new this.constructor(destColor);\n\t\tdestColorOverLifetime.enbale=this.enbale;\n\t\treturn destColorOverLifetime;\n\t}\n\n\t/**\n\t*获取颜色。\n\t*/\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\treturn ColorOverLifetime;\n})()\n\n\n/**\n*<code>Emission</code> 类用于粒子发射器。\n*/\n//class laya.d3.core.particleShuriKen.module.Emission\nvar Emission=(function(){\n\tfunction Emission(){\n\t\t/**@private */\n\t\tthis._destroyed=false;\n\t\t/**@private 粒子发射速率,每秒发射的个数。*/\n\t\tthis._emissionRate=0;\n\t\t/**@private 粒子的爆裂,不允许修改。*/\n\t\tthis._bursts=null;\n\t\t/**是否启用。*/\n\t\tthis.enbale=false;\n\t\tthis._destroyed=false;\n\t\tthis.emissionRate=10;\n\t\tthis._bursts=[];\n\t}\n\n\t__class(Emission,'laya.d3.core.particleShuriKen.module.Emission');\n\tvar __proto=Emission.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true,\"laya.resource.IDestroy\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\tthis._bursts=null;\n\t\tthis._destroyed=true;\n\t}\n\n\t/**\n\t*获取粒子爆裂个数。\n\t*@return 粒子爆裂个数。\n\t*/\n\t__proto.getBurstsCount=function(){\n\t\treturn this._bursts.length;\n\t}\n\n\t/**\n\t*通过索引获取粒子爆裂。\n\t*@param index 爆裂索引。\n\t*@return 粒子爆裂。\n\t*/\n\t__proto.getBurstByIndex=function(index){\n\t\treturn this._bursts[index];\n\t}\n\n\t/**\n\t*增加粒子爆裂。\n\t*@param burst 爆裂。\n\t*/\n\t__proto.addBurst=function(burst){\n\t\tvar burstsCount=this._bursts.length;\n\t\tif (burstsCount > 0)\n\t\t\tfor (var i=0;i < burstsCount;i++){\n\t\t\tif (this._bursts[i].time > burst.time)\n\t\t\t\tthis._bursts.splice(i,0,burst);\n\t\t}\n\t\tthis._bursts.push(burst);\n\t}\n\n\t/**\n\t*移除粒子爆裂。\n\t*@param burst 爆裂。\n\t*/\n\t__proto.removeBurst=function(burst){\n\t\tvar index=this._bursts.indexOf(burst);\n\t\tif (index!==-1){\n\t\t\tthis._bursts.splice(index,1);\n\t\t}\n\t}\n\n\t/**\n\t*通过索引移除粒子爆裂。\n\t*@param index 爆裂索引。\n\t*/\n\t__proto.removeBurstByIndex=function(index){\n\t\tthis._bursts.splice(index,1);\n\t}\n\n\t/**\n\t*清空粒子爆裂。\n\t*/\n\t__proto.clearBurst=function(){\n\t\tthis._bursts.length=0;\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destEmission=destObject;\n\t\tvar destBursts=destEmission._bursts;\n\t\tdestBursts.length=this._bursts.length;\n\t\tfor (var i=0,n=this._bursts.length;i < n;i++){\n\t\t\tvar destBurst=destBursts[i];\n\t\t\tif (destBurst)\n\t\t\t\tthis._bursts[i].cloneTo(destBurst);\n\t\t\telse\n\t\t\tdestBursts[i]=this._bursts[i].clone();\n\t\t}\n\t\tdestEmission._emissionRate=this._emissionRate;\n\t\tdestEmission.enbale=this.enbale;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destEmission=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destEmission);\n\t\treturn destEmission;\n\t}\n\n\t/**\n\t*获取是否已销毁。\n\t*@return 是否已销毁。\n\t*/\n\t__getset(0,__proto,'destroyed',function(){\n\t\treturn this._destroyed;\n\t});\n\n\t/**\n\t*设置粒子发射速率。\n\t*@param emissionRate 粒子发射速率 (个/秒)。\n\t*/\n\t/**\n\t*获取粒子发射速率。\n\t*@return 粒子发射速率 (个/秒)。\n\t*/\n\t__getset(0,__proto,'emissionRate',function(){\n\t\treturn this._emissionRate;\n\t\t},function(value){\n\t\tif (value < 0)\n\t\t\tthrow new Error(\"ParticleBaseShape:emissionRate value must large or equal than 0.\");\n\t\tthis._emissionRate=value;\n\t});\n\n\treturn Emission;\n})()\n\n\n/**\n*<code>FrameOverTime</code> 类用于创建时间帧。\n*/\n//class laya.d3.core.particleShuriKen.module.FrameOverTime\nvar FrameOverTime=(function(){\n\tfunction FrameOverTime(){\n\t\t/**@private */\n\t\tthis._type=0;\n\t\t/**@private */\n\t\tthis._constant=0;\n\t\t/**@private */\n\t\tthis._overTime=null;\n\t\t/**@private */\n\t\tthis._constantMin=0;\n\t\t/**@private */\n\t\tthis._constantMax=0;\n\t\t/**@private */\n\t\tthis._overTimeMin=null;\n\t\t/**@private */\n\t\tthis._overTimeMax=null;\n\t}\n\n\t__class(FrameOverTime,'laya.d3.core.particleShuriKen.module.FrameOverTime');\n\tvar __proto=FrameOverTime.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destFrameOverTime=destObject;\n\t\tdestFrameOverTime._type=this._type;\n\t\tdestFrameOverTime._constant=this._constant;\n\t\tthis._overTime.cloneTo(destFrameOverTime._overTime);\n\t\tdestFrameOverTime._constantMin=this._constantMin;\n\t\tdestFrameOverTime._constantMax=this._constantMax;\n\t\tthis._overTimeMin.cloneTo(destFrameOverTime._overTimeMin);\n\t\tthis._overTimeMax.cloneTo(destFrameOverTime._overTimeMax);\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destFrameOverTime=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destFrameOverTime);\n\t\treturn destFrameOverTime;\n\t}\n\n\t/**\n\t*时间帧。\n\t*/\n\t__getset(0,__proto,'frameOverTimeData',function(){\n\t\treturn this._overTime;\n\t});\n\n\t/**\n\t*固定帧。\n\t*/\n\t__getset(0,__proto,'constant',function(){\n\t\treturn this._constant;\n\t});\n\n\t/**\n\t*生命周期旋转类型,0常量模式，1曲线模式，2随机双常量模式，3随机双曲线模式。\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t});\n\n\t/**\n\t*最小时间帧。\n\t*/\n\t__getset(0,__proto,'frameOverTimeDataMin',function(){\n\t\treturn this._overTimeMin;\n\t});\n\n\t/**\n\t*最小固定帧。\n\t*/\n\t__getset(0,__proto,'constantMin',function(){\n\t\treturn this._constantMin;\n\t});\n\n\t/**\n\t*最大时间帧。\n\t*/\n\t__getset(0,__proto,'frameOverTimeDataMax',function(){\n\t\treturn this._overTimeMax;\n\t});\n\n\t/**\n\t*最大固定帧。\n\t*/\n\t__getset(0,__proto,'constantMax',function(){\n\t\treturn this._constantMax;\n\t});\n\n\tFrameOverTime.createByConstant=function(constant){\n\t\tvar rotationOverLifetime=new FrameOverTime();\n\t\trotationOverLifetime._type=0;\n\t\trotationOverLifetime._constant=constant;\n\t\treturn rotationOverLifetime;\n\t}\n\n\tFrameOverTime.createByOverTime=function(overTime){\n\t\tvar rotationOverLifetime=new FrameOverTime();\n\t\trotationOverLifetime._type=1;\n\t\trotationOverLifetime._overTime=overTime;\n\t\treturn rotationOverLifetime;\n\t}\n\n\tFrameOverTime.createByRandomTwoConstant=function(constantMin,constantMax){\n\t\tvar rotationOverLifetime=new FrameOverTime();\n\t\trotationOverLifetime._type=2;\n\t\trotationOverLifetime._constantMin=constantMin;\n\t\trotationOverLifetime._constantMax=constantMax;\n\t\treturn rotationOverLifetime;\n\t}\n\n\tFrameOverTime.createByRandomTwoOverTime=function(gradientFrameMin,gradientFrameMax){\n\t\tvar rotationOverLifetime=new FrameOverTime();\n\t\trotationOverLifetime._type=3;\n\t\trotationOverLifetime._overTimeMin=gradientFrameMin;\n\t\trotationOverLifetime._overTimeMax=gradientFrameMax;\n\t\treturn rotationOverLifetime;\n\t}\n\n\treturn FrameOverTime;\n})()\n\n\n/**\n*<code>GradientRotation</code> 类用于创建渐变角速度。\n*/\n//class laya.d3.core.particleShuriKen.module.GradientAngularVelocity\nvar GradientAngularVelocity=(function(){\n\tfunction GradientAngularVelocity(){\n\t\t/**@private */\n\t\tthis._type=0;\n\t\t/**@private */\n\t\tthis._separateAxes=false;\n\t\t/**@private */\n\t\tthis._constant=NaN;\n\t\t/**@private */\n\t\tthis._constantSeparate=null;\n\t\t/**@private */\n\t\tthis._gradient=null;\n\t\t/**@private */\n\t\tthis._gradientX=null;\n\t\t/**@private */\n\t\tthis._gradientY=null;\n\t\t/**@private */\n\t\tthis._gradientZ=null;\n\t\t/**@private */\n\t\tthis._gradientW=null;\n\t\t/**@private */\n\t\tthis._constantMin=NaN;\n\t\t/**@private */\n\t\tthis._constantMax=NaN;\n\t\t/**@private */\n\t\tthis._constantMinSeparate=null;\n\t\t/**@private */\n\t\tthis._constantMaxSeparate=null;\n\t\t/**@private */\n\t\tthis._gradientMin=null;\n\t\t/**@private */\n\t\tthis._gradientMax=null;\n\t\t/**@private */\n\t\tthis._gradientXMin=null;\n\t\t/**@private */\n\t\tthis._gradientXMax=null;\n\t\t/**@private */\n\t\tthis._gradientYMin=null;\n\t\t/**@private */\n\t\tthis._gradientYMax=null;\n\t\t/**@private */\n\t\tthis._gradientZMin=null;\n\t\t/**@private */\n\t\tthis._gradientZMax=null;\n\t\t/**@private */\n\t\tthis._gradientWMin=null;\n\t\t/**@private */\n\t\tthis._gradientWMax=null;\n\t}\n\n\t__class(GradientAngularVelocity,'laya.d3.core.particleShuriKen.module.GradientAngularVelocity');\n\tvar __proto=GradientAngularVelocity.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGradientAngularVelocity=destObject;\n\t\tdestGradientAngularVelocity._type=this._type;\n\t\tdestGradientAngularVelocity._separateAxes=this._separateAxes;\n\t\tdestGradientAngularVelocity._constant=this._constant;\n\t\tthis._constantSeparate.cloneTo(destGradientAngularVelocity._constantSeparate);\n\t\tthis._gradient.cloneTo(destGradientAngularVelocity._gradient);\n\t\tthis._gradientX.cloneTo(destGradientAngularVelocity._gradientX);\n\t\tthis._gradientY.cloneTo(destGradientAngularVelocity._gradientY);\n\t\tthis._gradientZ.cloneTo(destGradientAngularVelocity._gradientZ);\n\t\tdestGradientAngularVelocity._constantMin=this._constantMin;\n\t\tdestGradientAngularVelocity._constantMax=this._constantMax;\n\t\tthis._constantMinSeparate.cloneTo(destGradientAngularVelocity._constantMinSeparate);\n\t\tthis._constantMaxSeparate.cloneTo(destGradientAngularVelocity._constantMaxSeparate);\n\t\tthis._gradientMin.cloneTo(destGradientAngularVelocity._gradientMin);\n\t\tthis._gradientMax.cloneTo(destGradientAngularVelocity._gradientMax);\n\t\tthis._gradientXMin.cloneTo(destGradientAngularVelocity._gradientXMin);\n\t\tthis._gradientXMax.cloneTo(destGradientAngularVelocity._gradientXMax);\n\t\tthis._gradientYMin.cloneTo(destGradientAngularVelocity._gradientYMin);\n\t\tthis._gradientYMax.cloneTo(destGradientAngularVelocity._gradientYMax);\n\t\tthis._gradientZMin.cloneTo(destGradientAngularVelocity._gradientZMin);\n\t\tthis._gradientZMax.cloneTo(destGradientAngularVelocity._gradientZMax);\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destGradientAngularVelocity=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destGradientAngularVelocity);\n\t\treturn destGradientAngularVelocity;\n\t}\n\n\t/**\n\t*渐变角速度Z。\n\t*/\n\t__getset(0,__proto,'gradientZ',function(){\n\t\treturn this._gradientZ;\n\t});\n\n\t/**\n\t*固定角速度。\n\t*/\n\t__getset(0,__proto,'constant',function(){\n\t\treturn this._constant;\n\t});\n\n\t/**\n\t*渐变角速度。\n\t*/\n\t__getset(0,__proto,'gradient',function(){\n\t\treturn this._gradient;\n\t});\n\n\t/**\n\t*是否分轴。\n\t*/\n\t__getset(0,__proto,'separateAxes',function(){\n\t\treturn this._separateAxes;\n\t});\n\n\t/**\n\t*生命周期角速度类型,0常量模式，1曲线模式，2随机双常量模式，3随机双曲线模式。\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t});\n\n\t/**\n\t*分轴固定角速度。\n\t*/\n\t__getset(0,__proto,'constantSeparate',function(){\n\t\treturn this._constantSeparate;\n\t});\n\n\t/**\n\t*渐变角角速度X。\n\t*/\n\t__getset(0,__proto,'gradientX',function(){\n\t\treturn this._gradientX;\n\t});\n\n\t/**\n\t*渐变角速度Y。\n\t*/\n\t__getset(0,__proto,'gradientY',function(){\n\t\treturn this._gradientY;\n\t});\n\n\t/**\n\t*渐变角速度Z。\n\t*/\n\t__getset(0,__proto,'gradientW',function(){\n\t\treturn this._gradientW;\n\t});\n\n\t/**\n\t*最小渐变角速度。\n\t*/\n\t__getset(0,__proto,'gradientMin',function(){\n\t\treturn this._gradientMin;\n\t});\n\n\t/**\n\t*最小随机双固定角速度。\n\t*/\n\t__getset(0,__proto,'constantMin',function(){\n\t\treturn this._constantMin;\n\t});\n\n\t/**\n\t*最大渐变角速度。\n\t*/\n\t__getset(0,__proto,'gradientMax',function(){\n\t\treturn this._gradientMax;\n\t});\n\n\t/**\n\t*最大随机双固定角速度。\n\t*/\n\t__getset(0,__proto,'constantMax',function(){\n\t\treturn this._constantMax;\n\t});\n\n\t/**\n\t*最小渐变角速度Z。\n\t*/\n\t__getset(0,__proto,'gradientWMin',function(){\n\t\treturn this._gradientWMin;\n\t});\n\n\t/**\n\t*最小分轴随机双固定角速度。\n\t*/\n\t__getset(0,__proto,'constantMinSeparate',function(){\n\t\treturn this._constantMinSeparate;\n\t});\n\n\t/**\n\t*最大分轴随机双固定角速度。\n\t*/\n\t__getset(0,__proto,'constantMaxSeparate',function(){\n\t\treturn this._constantMaxSeparate;\n\t});\n\n\t/**\n\t*最小渐变角速度X。\n\t*/\n\t__getset(0,__proto,'gradientXMin',function(){\n\t\treturn this._gradientXMin;\n\t});\n\n\t/**\n\t*最大渐变角速度X。\n\t*/\n\t__getset(0,__proto,'gradientXMax',function(){\n\t\treturn this._gradientXMax;\n\t});\n\n\t/**\n\t*最大渐变角速度Z。\n\t*/\n\t__getset(0,__proto,'gradientWMax',function(){\n\t\treturn this._gradientWMax;\n\t});\n\n\t/**\n\t*最小渐变角速度Y。\n\t*/\n\t__getset(0,__proto,'gradientYMin',function(){\n\t\treturn this._gradientYMin;\n\t});\n\n\t/**\n\t*最大渐变角速度Y。\n\t*/\n\t__getset(0,__proto,'gradientYMax',function(){\n\t\treturn this._gradientYMax;\n\t});\n\n\t/**\n\t*最小渐变角速度Z。\n\t*/\n\t__getset(0,__proto,'gradientZMin',function(){\n\t\treturn this._gradientZMin;\n\t});\n\n\t/**\n\t*最大渐变角速度Z。\n\t*/\n\t__getset(0,__proto,'gradientZMax',function(){\n\t\treturn this._gradientZMax;\n\t});\n\n\tGradientAngularVelocity.createByConstant=function(constant){\n\t\tvar gradientAngularVelocity=new GradientAngularVelocity();\n\t\tgradientAngularVelocity._type=0;\n\t\tgradientAngularVelocity._separateAxes=false;\n\t\tgradientAngularVelocity._constant=constant;\n\t\treturn gradientAngularVelocity;\n\t}\n\n\tGradientAngularVelocity.createByConstantSeparate=function(separateConstant){\n\t\tvar gradientAngularVelocity=new GradientAngularVelocity();\n\t\tgradientAngularVelocity._type=0;\n\t\tgradientAngularVelocity._separateAxes=true;\n\t\tgradientAngularVelocity._constantSeparate=separateConstant;\n\t\treturn gradientAngularVelocity;\n\t}\n\n\tGradientAngularVelocity.createByGradient=function(gradient){\n\t\tvar gradientAngularVelocity=new GradientAngularVelocity();\n\t\tgradientAngularVelocity._type=1;\n\t\tgradientAngularVelocity._separateAxes=false;\n\t\tgradientAngularVelocity._gradient=gradient;\n\t\treturn gradientAngularVelocity;\n\t}\n\n\tGradientAngularVelocity.createByGradientSeparate=function(gradientX,gradientY,gradientZ,gradientW){\n\t\tvar gradientAngularVelocity=new GradientAngularVelocity();\n\t\tgradientAngularVelocity._type=1;\n\t\tgradientAngularVelocity._separateAxes=true;\n\t\tgradientAngularVelocity._gradientX=gradientX;\n\t\tgradientAngularVelocity._gradientY=gradientY;\n\t\tgradientAngularVelocity._gradientZ=gradientZ;\n\t\tgradientAngularVelocity._gradientW=gradientW;\n\t\treturn gradientAngularVelocity;\n\t}\n\n\tGradientAngularVelocity.createByRandomTwoConstant=function(constantMin,constantMax){\n\t\tvar gradientAngularVelocity=new GradientAngularVelocity();\n\t\tgradientAngularVelocity._type=2;\n\t\tgradientAngularVelocity._separateAxes=false;\n\t\tgradientAngularVelocity._constantMin=constantMin;\n\t\tgradientAngularVelocity._constantMax=constantMax;\n\t\treturn gradientAngularVelocity;\n\t}\n\n\tGradientAngularVelocity.createByRandomTwoConstantSeparate=function(separateConstantMin,separateConstantMax){\n\t\tvar gradientAngularVelocity=new GradientAngularVelocity();\n\t\tgradientAngularVelocity._type=2;\n\t\tgradientAngularVelocity._separateAxes=true;\n\t\tgradientAngularVelocity._constantMinSeparate=separateConstantMin;\n\t\tgradientAngularVelocity._constantMaxSeparate=separateConstantMax;\n\t\treturn gradientAngularVelocity;\n\t}\n\n\tGradientAngularVelocity.createByRandomTwoGradient=function(gradientMin,gradientMax){\n\t\tvar gradientAngularVelocity=new GradientAngularVelocity();\n\t\tgradientAngularVelocity._type=3;\n\t\tgradientAngularVelocity._separateAxes=false;\n\t\tgradientAngularVelocity._gradientMin=gradientMin;\n\t\tgradientAngularVelocity._gradientMax=gradientMax;\n\t\treturn gradientAngularVelocity;\n\t}\n\n\tGradientAngularVelocity.createByRandomTwoGradientSeparate=function(gradientXMin,gradientXMax,gradientYMin,gradientYMax,gradientZMin,gradientZMax,gradientWMin,gradientWMax){\n\t\tvar gradientAngularVelocity=new GradientAngularVelocity();\n\t\tgradientAngularVelocity._type=3;\n\t\tgradientAngularVelocity._separateAxes=true;\n\t\tgradientAngularVelocity._gradientXMin=gradientXMin;\n\t\tgradientAngularVelocity._gradientXMax=gradientXMax;\n\t\tgradientAngularVelocity._gradientYMin=gradientYMin;\n\t\tgradientAngularVelocity._gradientYMax=gradientYMax;\n\t\tgradientAngularVelocity._gradientZMin=gradientZMin;\n\t\tgradientAngularVelocity._gradientZMax=gradientZMax;\n\t\tgradientAngularVelocity._gradientWMin=gradientWMin;\n\t\tgradientAngularVelocity._gradientWMax=gradientWMax;\n\t\treturn gradientAngularVelocity;\n\t}\n\n\treturn GradientAngularVelocity;\n})()\n\n\n/**\n*<code>GradientColor</code> 类用于创建渐变颜色。\n*/\n//class laya.d3.core.particleShuriKen.module.GradientColor\nvar GradientColor=(function(){\n\tfunction GradientColor(){\n\t\t/**@private */\n\t\tthis._type=0;\n\t\t/**@private */\n\t\tthis._constant=null;\n\t\t/**@private */\n\t\tthis._constantMin=null;\n\t\t/**@private */\n\t\tthis._constantMax=null;\n\t\t/**@private */\n\t\tthis._gradient=null;\n\t\t/**@private */\n\t\tthis._gradientMin=null;\n\t\t/**@private */\n\t\tthis._gradientMax=null;\n\t}\n\n\t__class(GradientColor,'laya.d3.core.particleShuriKen.module.GradientColor');\n\tvar __proto=GradientColor.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGradientColor=destObject;\n\t\tdestGradientColor._type=this._type;\n\t\tthis._constant.cloneTo(destGradientColor._constant);\n\t\tthis._constantMin.cloneTo(destGradientColor._constantMin);\n\t\tthis._constantMax.cloneTo(destGradientColor._constantMax);\n\t\tthis._gradient.cloneTo(destGradientColor._gradient);\n\t\tthis._gradientMin.cloneTo(destGradientColor._gradientMin);\n\t\tthis._gradientMax.cloneTo(destGradientColor._gradientMax);\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destGradientColor=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destGradientColor);\n\t\treturn destGradientColor;\n\t}\n\n\t/**\n\t*渐变颜色。\n\t*/\n\t__getset(0,__proto,'gradient',function(){\n\t\treturn this._gradient;\n\t});\n\n\t/**\n\t*固定颜色。\n\t*/\n\t__getset(0,__proto,'constant',function(){\n\t\treturn this._constant;\n\t});\n\n\t/**\n\t*生命周期颜色类型,0为固定颜色模式,1渐变模式,2为随机双固定颜色模式,3随机双渐变模式。\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t});\n\n\t/**\n\t*最小渐变颜色。\n\t*/\n\t__getset(0,__proto,'gradientMin',function(){\n\t\treturn this._gradientMin;\n\t});\n\n\t/**\n\t*最小固定颜色。\n\t*/\n\t__getset(0,__proto,'constantMin',function(){\n\t\treturn this._constantMin;\n\t});\n\n\t/**\n\t*最大渐变颜色。\n\t*/\n\t__getset(0,__proto,'gradientMax',function(){\n\t\treturn this._gradientMax;\n\t});\n\n\t/**\n\t*最大固定颜色。\n\t*/\n\t__getset(0,__proto,'constantMax',function(){\n\t\treturn this._constantMax;\n\t});\n\n\tGradientColor.createByConstant=function(constant){\n\t\tvar gradientColor=new GradientColor();\n\t\tgradientColor._type=0;\n\t\tgradientColor._constant=constant;\n\t\treturn gradientColor;\n\t}\n\n\tGradientColor.createByGradient=function(gradient){\n\t\tvar gradientColor=new GradientColor();\n\t\tgradientColor._type=1;\n\t\tgradientColor._gradient=gradient;\n\t\treturn gradientColor;\n\t}\n\n\tGradientColor.createByRandomTwoConstant=function(minConstant,maxConstant){\n\t\tvar gradientColor=new GradientColor();\n\t\tgradientColor._type=2;\n\t\tgradientColor._constantMin=minConstant;\n\t\tgradientColor._constantMax=maxConstant;\n\t\treturn gradientColor;\n\t}\n\n\tGradientColor.createByRandomTwoGradient=function(minGradient,maxGradient){\n\t\tvar gradientColor=new GradientColor();\n\t\tgradientColor._type=3;\n\t\tgradientColor._gradientMin=minGradient;\n\t\tgradientColor._gradientMax=maxGradient;\n\t\treturn gradientColor;\n\t}\n\n\treturn GradientColor;\n})()\n\n\n/**\n*<code>GradientDataColor</code> 类用于创建颜色渐变。\n*/\n//class laya.d3.core.particleShuriKen.module.GradientDataColor\nvar GradientDataColor=(function(){\n\tfunction GradientDataColor(){\n\t\t/**@private */\n\t\tthis._alphaCurrentLength=0;\n\t\t/**@private */\n\t\tthis._rgbCurrentLength=0;\n\t\t/**@private 开发者禁止修改。*/\n\t\tthis._alphaElements=null;\n\t\t/**@private 开发者禁止修改。*/\n\t\tthis._rgbElements=null;\n\t\tthis._alphaElements=new Float32Array(8);\n\t\tthis._rgbElements=new Float32Array(16);\n\t}\n\n\t__class(GradientDataColor,'laya.d3.core.particleShuriKen.module.GradientDataColor');\n\tvar __proto=GradientDataColor.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*增加Alpha渐变。\n\t*@param key 生命周期，范围为0到1。\n\t*@param value rgb值。\n\t*/\n\t__proto.addAlpha=function(key,value){\n\t\tif (this._alphaCurrentLength < 8){\n\t\t\tif ((this._alphaCurrentLength===6)&& ((key!==1))){\n\t\t\t\tkey=1;\n\t\t\t\tconsole.log(\"GradientDataColor warning:the forth key is  be force set to 1.\");\n\t\t\t}\n\t\t\tthis._alphaElements[this._alphaCurrentLength++]=key;\n\t\t\tthis._alphaElements[this._alphaCurrentLength++]=value;\n\t\t\t}else {\n\t\t\tconsole.log(\"GradientDataColor warning:data count must lessEqual than 4\");\n\t\t}\n\t}\n\n\t/**\n\t*增加RGB渐变。\n\t*@param key 生命周期，范围为0到1。\n\t*@param value RGB值。\n\t*/\n\t__proto.addRGB=function(key,value){\n\t\tif (this._rgbCurrentLength < 16){\n\t\t\tif ((this._rgbCurrentLength===12)&& ((key!==1))){\n\t\t\t\tkey=1;\n\t\t\t\tconsole.log(\"GradientDataColor warning:the forth key is  be force set to 1.\");\n\t\t\t}\n\t\t\tthis._rgbElements[this._rgbCurrentLength++]=key;\n\t\t\tthis._rgbElements[this._rgbCurrentLength++]=value.x;\n\t\t\tthis._rgbElements[this._rgbCurrentLength++]=value.y;\n\t\t\tthis._rgbElements[this._rgbCurrentLength++]=value.z;\n\t\t\t}else {\n\t\t\tconsole.log(\"GradientDataColor warning:data count must lessEqual than 4\");\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGradientDataColor=destObject;\n\t\tvar i=0,n=0;\n\t\tdestGradientDataColor._alphaCurrentLength=this._alphaCurrentLength;\n\t\tvar destAlphaElements=destGradientDataColor._alphaElements;\n\t\tdestAlphaElements.length=this._alphaElements.length;\n\t\tfor (i=0,n=this._alphaElements.length;i < n;i++)\n\t\tdestAlphaElements[i]=this._alphaElements[i];\n\t\tdestGradientDataColor._rgbCurrentLength=this._rgbCurrentLength;\n\t\tvar destRGBElements=destGradientDataColor._rgbElements;\n\t\tdestRGBElements.length=this._rgbElements.length;\n\t\tfor (i=0,n=this._rgbElements.length;i < n;i++)\n\t\tdestRGBElements[i]=this._rgbElements[i];\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destGradientDataColor=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destGradientDataColor);\n\t\treturn destGradientDataColor;\n\t}\n\n\t/**渐变Alpha数量。*/\n\t__getset(0,__proto,'alphaGradientCount',function(){\n\t\treturn this._alphaCurrentLength / 2;\n\t});\n\n\t/**渐变RGB数量。*/\n\t__getset(0,__proto,'rgbGradientCount',function(){\n\t\treturn this._rgbCurrentLength / 4;\n\t});\n\n\treturn GradientDataColor;\n})()\n\n\n/**\n*<code>GradientDataInt</code> 类用于创建整形渐变。\n*/\n//class laya.d3.core.particleShuriKen.module.GradientDataInt\nvar GradientDataInt=(function(){\n\tfunction GradientDataInt(){\n\t\t/**@private */\n\t\tthis._currentLength=0;\n\t\t/**@private 开发者禁止修改。*/\n\t\tthis._elements=null;\n\t\tthis._elements=new Float32Array(8);\n\t}\n\n\t__class(GradientDataInt,'laya.d3.core.particleShuriKen.module.GradientDataInt');\n\tvar __proto=GradientDataInt.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*增加整形渐变。\n\t*@param key 生命周期，范围为0到1。\n\t*@param value 整形值。\n\t*/\n\t__proto.add=function(key,value){\n\t\tif (this._currentLength < 8){\n\t\t\tif ((this._currentLength===6)&& ((key!==1))){\n\t\t\t\tkey=1;\n\t\t\t\tconsole.log(\"Warning:the forth key is  be force set to 1.\");\n\t\t\t}\n\t\t\tthis._elements[this._currentLength++]=key;\n\t\t\tthis._elements[this._currentLength++]=value;\n\t\t\t}else {\n\t\t\tconsole.log(\"Warning:data count must lessEqual than 4\");\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGradientDataInt=destObject;\n\t\tdestGradientDataInt._currentLength=this._currentLength;\n\t\tvar destElements=destGradientDataInt._elements;\n\t\tdestElements.length=this._elements.length;\n\t\tfor (var i=0,n=this._elements.length;i < n;i++){\n\t\t\tdestElements[i]=this._elements[i];\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destGradientDataInt=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destGradientDataInt);\n\t\treturn destGradientDataInt;\n\t}\n\n\t/**整形渐变数量。*/\n\t__getset(0,__proto,'gradientCount',function(){\n\t\treturn this._currentLength / 2;\n\t});\n\n\treturn GradientDataInt;\n})()\n\n\n/**\n*<code>GradientDataNumber</code> 类用于创建浮点渐变。\n*/\n//class laya.d3.core.particleShuriKen.module.GradientDataNumber\nvar GradientDataNumber=(function(){\n\tfunction GradientDataNumber(){\n\t\t/**@private */\n\t\tthis._currentLength=0;\n\t\t/**@private 开发者禁止修改。*/\n\t\tthis._elements=null;\n\t\tthis._elements=new Float32Array(8);\n\t}\n\n\t__class(GradientDataNumber,'laya.d3.core.particleShuriKen.module.GradientDataNumber');\n\tvar __proto=GradientDataNumber.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*增加浮点渐变。\n\t*@param key 生命周期，范围为0到1。\n\t*@param value 浮点值。\n\t*/\n\t__proto.add=function(key,value){\n\t\tif (this._currentLength < 8){\n\t\t\tif ((this._currentLength===6)&& ((key!==1))){\n\t\t\t\tkey=1;\n\t\t\t\tconsole.log(\"GradientDataNumber warning:the forth key is  be force set to 1.\");\n\t\t\t}\n\t\t\tthis._elements[this._currentLength++]=key;\n\t\t\tthis._elements[this._currentLength++]=value;\n\t\t\t}else {\n\t\t\tconsole.log(\"GradientDataNumber warning:data count must lessEqual than 4\");\n\t\t}\n\t}\n\n\t/**\n\t*通过索引获取键。\n\t*@param index 索引。\n\t*@return value 键。\n\t*/\n\t__proto.getKeyByIndex=function(index){\n\t\treturn this._elements[index *2];\n\t}\n\n\t/**\n\t*通过索引获取值。\n\t*@param index 索引。\n\t*@return value 值。\n\t*/\n\t__proto.getValueByIndex=function(index){\n\t\treturn this._elements[index *2+1];\n\t}\n\n\t/**\n\t*获取平均值。\n\t*/\n\t__proto.getAverageValue=function(){\n\t\tvar total=0;\n\t\tfor (var i=0,n=this._currentLength-2;i < n;i+=2){\n\t\t\tvar subValue=this._elements[i+1];\n\t\t\tsubValue+=this._elements[i+3];\n\t\t\tsubValue=subValue *(this._elements[i+2]-this._elements[i]);\n\t\t}\n\t\treturn total / 2;\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGradientDataNumber=destObject;\n\t\tdestGradientDataNumber._currentLength=this._currentLength;\n\t\tvar destElements=destGradientDataNumber._elements;\n\t\tdestElements.length=this._elements.length;\n\t\tfor (var i=0,n=this._elements.length;i < n;i++)\n\t\tdestElements[i]=this._elements[i];\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destGradientDataNumber=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destGradientDataNumber);\n\t\treturn destGradientDataNumber;\n\t}\n\n\t/**渐变浮点数量。*/\n\t__getset(0,__proto,'gradientCount',function(){\n\t\treturn this._currentLength / 2;\n\t});\n\n\treturn GradientDataNumber;\n})()\n\n\n/**\n*<code>GradientDataVector2</code> 类用于创建二维向量渐变。\n*/\n//class laya.d3.core.particleShuriKen.module.GradientDataVector2\nvar GradientDataVector2=(function(){\n\tfunction GradientDataVector2(){\n\t\t/**@private */\n\t\tthis._currentLength=0;\n\t\t/**@private 开发者禁止修改。*/\n\t\tthis._elements=null;\n\t\tthis._elements=new Float32Array(12);\n\t}\n\n\t__class(GradientDataVector2,'laya.d3.core.particleShuriKen.module.GradientDataVector2');\n\tvar __proto=GradientDataVector2.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*增加二维向量渐变。\n\t*@param key 生命周期，范围为0到1。\n\t*@param value 二维向量值。\n\t*/\n\t__proto.add=function(key,value){\n\t\tif (this._currentLength < 8){\n\t\t\tif ((this._currentLength===6)&& ((key!==1))){\n\t\t\t\tkey=1;\n\t\t\t\tconsole.log(\"GradientDataVector2 warning:the forth key is  be force set to 1.\");\n\t\t\t}\n\t\t\tthis._elements[this._currentLength++]=key;\n\t\t\tthis._elements[this._currentLength++]=value.x;\n\t\t\tthis._elements[this._currentLength++]=value.y;\n\t\t\t}else {\n\t\t\tconsole.log(\"GradientDataVector2 warning:data count must lessEqual than 4\");\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGradientDataVector2=destObject;\n\t\tdestGradientDataVector2._currentLength=this._currentLength;\n\t\tvar destElements=destGradientDataVector2._elements;\n\t\tdestElements.length=this._elements.length;\n\t\tfor (var i=0,n=this._elements.length;i < n;i++){\n\t\t\tdestElements[i]=this._elements[i];\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destGradientDataVector2=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destGradientDataVector2);\n\t\treturn destGradientDataVector2;\n\t}\n\n\t/**二维向量渐变数量。*/\n\t__getset(0,__proto,'gradientCount',function(){\n\t\treturn this._currentLength / 3;\n\t});\n\n\treturn GradientDataVector2;\n})()\n\n\n/**\n*<code>GradientSize</code> 类用于创建渐变尺寸。\n*/\n//class laya.d3.core.particleShuriKen.module.GradientSize\nvar GradientSize=(function(){\n\tfunction GradientSize(){\n\t\t/**@private */\n\t\tthis._type=0;\n\t\t/**@private */\n\t\tthis._separateAxes=false;\n\t\t/**@private */\n\t\tthis._gradient=null;\n\t\t/**@private */\n\t\tthis._gradientX=null;\n\t\t/**@private */\n\t\tthis._gradientY=null;\n\t\t/**@private */\n\t\tthis._gradientZ=null;\n\t\t/**@private */\n\t\tthis._constantMin=NaN;\n\t\t/**@private */\n\t\tthis._constantMax=NaN;\n\t\t/**@private */\n\t\tthis._constantMinSeparate=null;\n\t\t/**@private */\n\t\tthis._constantMaxSeparate=null;\n\t\t/**@private */\n\t\tthis._gradientMin=null;\n\t\t/**@private */\n\t\tthis._gradientMax=null;\n\t\t/**@private */\n\t\tthis._gradientXMin=null;\n\t\t/**@private */\n\t\tthis._gradientXMax=null;\n\t\t/**@private */\n\t\tthis._gradientYMin=null;\n\t\t/**@private */\n\t\tthis._gradientYMax=null;\n\t\t/**@private */\n\t\tthis._gradientZMin=null;\n\t\t/**@private */\n\t\tthis._gradientZMax=null;\n\t}\n\n\t__class(GradientSize,'laya.d3.core.particleShuriKen.module.GradientSize');\n\tvar __proto=GradientSize.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*获取最大尺寸。\n\t*/\n\t__proto.getMaxSizeInGradient=function(){\n\t\tvar i=0,n=0;\n\t\tvar maxSize=-Number.MAX_VALUE;\n\t\tswitch (this._type){\n\t\t\tcase 0:\n\t\t\t\tif (this._separateAxes){\n\t\t\t\t\tfor (i=0,n=this._gradientX.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradientX.getValueByIndex(i));\n\t\t\t\t\tfor (i=0,n=this._gradientY.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradientY.getValueByIndex(i));\n\t\t\t\t\t}else {\n\t\t\t\t\tfor (i=0,n=this._gradient.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradient.getValueByIndex(i));\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tif (this._separateAxes){\n\t\t\t\t\tmaxSize=Math.max(this._constantMinSeparate.x,this._constantMaxSeparate.x);\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._constantMinSeparate.y);\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._constantMaxSeparate.y);\n\t\t\t\t\t}else {\n\t\t\t\t\tmaxSize=Math.max(this._constantMin,this._constantMax);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (this._separateAxes){\n\t\t\t\t\tfor (i=0,n=this._gradientXMin.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradientXMin.getValueByIndex(i));\n\t\t\t\t\tfor (i=0,n=this._gradientXMax.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradientXMax.getValueByIndex(i));\n\t\t\t\t\tfor (i=0,n=this._gradientYMin.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradientYMin.getValueByIndex(i));\n\t\t\t\t\tfor (i=0,n=this._gradientZMax.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradientZMax.getValueByIndex(i));\n\t\t\t\t\t}else {\n\t\t\t\t\tfor (i=0,n=this._gradientMin.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradientMin.getValueByIndex(i));\n\t\t\t\t\tfor (i=0,n=this._gradientMax.gradientCount;i < n;i++)\n\t\t\t\t\tmaxSize=Math.max(maxSize,this._gradientMax.getValueByIndex(i));\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\treturn maxSize;\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGradientSize=destObject;\n\t\tdestGradientSize._type=this._type;\n\t\tdestGradientSize._separateAxes=this._separateAxes;\n\t\tthis._gradient.cloneTo(destGradientSize._gradient);\n\t\tthis._gradientX.cloneTo(destGradientSize._gradientX);\n\t\tthis._gradientY.cloneTo(destGradientSize._gradientY);\n\t\tthis._gradientZ.cloneTo(destGradientSize._gradientZ);\n\t\tdestGradientSize._constantMin=this._constantMin;\n\t\tdestGradientSize._constantMax=this._constantMax;\n\t\tthis._constantMinSeparate.cloneTo(destGradientSize._constantMinSeparate);\n\t\tthis._constantMaxSeparate.cloneTo(destGradientSize._constantMaxSeparate);\n\t\tthis._gradientMin.cloneTo(destGradientSize._gradientMin);\n\t\tthis._gradientMax.cloneTo(destGradientSize._gradientMax);\n\t\tthis._gradientXMin.cloneTo(destGradientSize._gradientXMin);\n\t\tthis._gradientXMax.cloneTo(destGradientSize._gradientXMax);\n\t\tthis._gradientYMin.cloneTo(destGradientSize._gradientYMin);\n\t\tthis._gradientYMax.cloneTo(destGradientSize._gradientYMax);\n\t\tthis._gradientZMin.cloneTo(destGradientSize._gradientZMin);\n\t\tthis._gradientZMax.cloneTo(destGradientSize._gradientZMax);\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destGradientSize=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destGradientSize);\n\t\treturn destGradientSize;\n\t}\n\n\t/**\n\t*渐变尺寸Z。\n\t*/\n\t__getset(0,__proto,'gradientZ',function(){\n\t\treturn this._gradientZ;\n\t});\n\n\t/**\n\t*渐变尺寸。\n\t*/\n\t__getset(0,__proto,'gradient',function(){\n\t\treturn this._gradient;\n\t});\n\n\t/**\n\t*是否分轴。\n\t*/\n\t__getset(0,__proto,'separateAxes',function(){\n\t\treturn this._separateAxes;\n\t});\n\n\t/**\n\t*生命周期尺寸类型，0曲线模式，1随机双常量模式，2随机双曲线模式。\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t});\n\n\t/**\n\t*渐变最小尺寸。\n\t*/\n\t__getset(0,__proto,'gradientMin',function(){\n\t\treturn this._gradientMin;\n\t});\n\n\t/**\n\t*最小随机双固定尺寸。\n\t*/\n\t__getset(0,__proto,'constantMin',function(){\n\t\treturn this._constantMin;\n\t});\n\n\t/**\n\t*渐变尺寸X。\n\t*/\n\t__getset(0,__proto,'gradientX',function(){\n\t\treturn this._gradientX;\n\t});\n\n\t/**\n\t*渐变尺寸Y。\n\t*/\n\t__getset(0,__proto,'gradientY',function(){\n\t\treturn this._gradientY;\n\t});\n\n\t/**\n\t*渐变最大尺寸。\n\t*/\n\t__getset(0,__proto,'gradientMax',function(){\n\t\treturn this._gradientMax;\n\t});\n\n\t/**\n\t*最大随机双固定尺寸。\n\t*/\n\t__getset(0,__proto,'constantMax',function(){\n\t\treturn this._constantMax;\n\t});\n\n\t/**\n\t*最小分轴随机双固定尺寸。\n\t*/\n\t__getset(0,__proto,'constantMinSeparate',function(){\n\t\treturn this._constantMinSeparate;\n\t});\n\n\t/**\n\t*最小分轴随机双固定尺寸。\n\t*/\n\t__getset(0,__proto,'constantMaxSeparate',function(){\n\t\treturn this._constantMaxSeparate;\n\t});\n\n\t/**\n\t*渐变最小尺寸X。\n\t*/\n\t__getset(0,__proto,'gradientXMin',function(){\n\t\treturn this._gradientXMin;\n\t});\n\n\t/**\n\t*渐变最大尺寸X。\n\t*/\n\t__getset(0,__proto,'gradientXMax',function(){\n\t\treturn this._gradientXMax;\n\t});\n\n\t/**\n\t*渐变最小尺寸Y。\n\t*/\n\t__getset(0,__proto,'gradientYMin',function(){\n\t\treturn this._gradientYMin;\n\t});\n\n\t/**\n\t*渐变最大尺寸Y。\n\t*/\n\t__getset(0,__proto,'gradientYMax',function(){\n\t\treturn this._gradientYMax;\n\t});\n\n\t/**\n\t*渐变最小尺寸Z。\n\t*/\n\t__getset(0,__proto,'gradientZMin',function(){\n\t\treturn this._gradientZMin;\n\t});\n\n\t/**\n\t*渐变最大尺寸Z。\n\t*/\n\t__getset(0,__proto,'gradientZMax',function(){\n\t\treturn this._gradientZMax;\n\t});\n\n\tGradientSize.createByGradient=function(gradient){\n\t\tvar gradientSize=new GradientSize();\n\t\tgradientSize._type=0;\n\t\tgradientSize._separateAxes=false;\n\t\tgradientSize._gradient=gradient;\n\t\treturn gradientSize;\n\t}\n\n\tGradientSize.createByGradientSeparate=function(gradientX,gradientY,gradientZ){\n\t\tvar gradientSize=new GradientSize();\n\t\tgradientSize._type=0;\n\t\tgradientSize._separateAxes=true;\n\t\tgradientSize._gradientX=gradientX;\n\t\tgradientSize._gradientY=gradientY;\n\t\tgradientSize._gradientZ=gradientZ;\n\t\treturn gradientSize;\n\t}\n\n\tGradientSize.createByRandomTwoConstant=function(constantMin,constantMax){\n\t\tvar gradientSize=new GradientSize();\n\t\tgradientSize._type=1;\n\t\tgradientSize._separateAxes=false;\n\t\tgradientSize._constantMin=constantMin;\n\t\tgradientSize._constantMax=constantMax;\n\t\treturn gradientSize;\n\t}\n\n\tGradientSize.createByRandomTwoConstantSeparate=function(constantMinSeparate,constantMaxSeparate){\n\t\tvar gradientSize=new GradientSize();\n\t\tgradientSize._type=1;\n\t\tgradientSize._separateAxes=true;\n\t\tgradientSize._constantMinSeparate=constantMinSeparate;\n\t\tgradientSize._constantMaxSeparate=constantMaxSeparate;\n\t\treturn gradientSize;\n\t}\n\n\tGradientSize.createByRandomTwoGradient=function(gradientMin,gradientMax){\n\t\tvar gradientSize=new GradientSize();\n\t\tgradientSize._type=2;\n\t\tgradientSize._separateAxes=false;\n\t\tgradientSize._gradientMin=gradientMin;\n\t\tgradientSize._gradientMax=gradientMax;\n\t\treturn gradientSize;\n\t}\n\n\tGradientSize.createByRandomTwoGradientSeparate=function(gradientXMin,gradientXMax,gradientYMin,gradientYMax,gradientZMin,gradientZMax){\n\t\tvar gradientSize=new GradientSize();\n\t\tgradientSize._type=2;\n\t\tgradientSize._separateAxes=true;\n\t\tgradientSize._gradientXMin=gradientXMin;\n\t\tgradientSize._gradientXMax=gradientXMax;\n\t\tgradientSize._gradientYMin=gradientYMin;\n\t\tgradientSize._gradientYMax=gradientYMax;\n\t\tgradientSize._gradientZMin=gradientZMin;\n\t\tgradientSize._gradientZMax=gradientZMax;\n\t\treturn gradientSize;\n\t}\n\n\treturn GradientSize;\n})()\n\n\n/**\n*<code>GradientVelocity</code> 类用于创建渐变速度。\n*/\n//class laya.d3.core.particleShuriKen.module.GradientVelocity\nvar GradientVelocity=(function(){\n\tfunction GradientVelocity(){\n\t\t/**@private */\n\t\tthis._type=0;\n\t\t/**@private */\n\t\tthis._constant=null;\n\t\t/**@private */\n\t\tthis._gradientX=null;\n\t\t/**@private */\n\t\tthis._gradientY=null;\n\t\t/**@private */\n\t\tthis._gradientZ=null;\n\t\t/**@private */\n\t\tthis._constantMin=null;\n\t\t/**@private */\n\t\tthis._constantMax=null;\n\t\t/**@private */\n\t\tthis._gradientXMin=null;\n\t\t/**@private */\n\t\tthis._gradientXMax=null;\n\t\t/**@private */\n\t\tthis._gradientYMin=null;\n\t\t/**@private */\n\t\tthis._gradientYMax=null;\n\t\t/**@private */\n\t\tthis._gradientZMin=null;\n\t\t/**@private */\n\t\tthis._gradientZMax=null;\n\t}\n\n\t__class(GradientVelocity,'laya.d3.core.particleShuriKen.module.GradientVelocity');\n\tvar __proto=GradientVelocity.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGradientVelocity=destObject;\n\t\tdestGradientVelocity._type=this._type;\n\t\tthis._constant.cloneTo(destGradientVelocity._constant);\n\t\tthis._gradientX.cloneTo(destGradientVelocity._gradientX);\n\t\tthis._gradientY.cloneTo(destGradientVelocity._gradientY);\n\t\tthis._gradientZ.cloneTo(destGradientVelocity._gradientZ);\n\t\tthis._constantMin.cloneTo(destGradientVelocity._constantMin);\n\t\tthis._constantMax.cloneTo(destGradientVelocity._constantMax);\n\t\tthis._gradientXMin.cloneTo(destGradientVelocity._gradientXMin);\n\t\tthis._gradientXMax.cloneTo(destGradientVelocity._gradientXMax);\n\t\tthis._gradientYMin.cloneTo(destGradientVelocity._gradientYMin);\n\t\tthis._gradientYMax.cloneTo(destGradientVelocity._gradientYMax);\n\t\tthis._gradientZMin.cloneTo(destGradientVelocity._gradientZMin);\n\t\tthis._gradientZMax.cloneTo(destGradientVelocity._gradientZMax);\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destGradientVelocity=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destGradientVelocity);\n\t\treturn destGradientVelocity;\n\t}\n\n\t/**\n\t*渐变速度Z。\n\t*/\n\t__getset(0,__proto,'gradientZ',function(){\n\t\treturn this._gradientZ;\n\t});\n\n\t/**固定速度。*/\n\t__getset(0,__proto,'constant',function(){\n\t\treturn this._constant;\n\t});\n\n\t/**\n\t*生命周期速度类型，0常量模式，1曲线模式，2随机双常量模式，3随机双曲线模式。\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t});\n\n\t/**\n\t*渐变最大速度X。\n\t*/\n\t__getset(0,__proto,'gradientXMax',function(){\n\t\treturn this._gradientXMax;\n\t});\n\n\t/**最小固定速度。*/\n\t__getset(0,__proto,'constantMin',function(){\n\t\treturn this._constantMin;\n\t});\n\n\t/**\n\t*渐变速度X。\n\t*/\n\t__getset(0,__proto,'gradientX',function(){\n\t\treturn this._gradientX;\n\t});\n\n\t/**\n\t*渐变速度Y。\n\t*/\n\t__getset(0,__proto,'gradientY',function(){\n\t\treturn this._gradientY;\n\t});\n\n\t/**\n\t*渐变最小速度X。\n\t*/\n\t__getset(0,__proto,'gradientXMin',function(){\n\t\treturn this._gradientXMin;\n\t});\n\n\t/**最大固定速度。*/\n\t__getset(0,__proto,'constantMax',function(){\n\t\treturn this._constantMax;\n\t});\n\n\t/**\n\t*渐变最小速度Y。\n\t*/\n\t__getset(0,__proto,'gradientYMin',function(){\n\t\treturn this._gradientYMin;\n\t});\n\n\t/**\n\t*渐变最大速度Y。\n\t*/\n\t__getset(0,__proto,'gradientYMax',function(){\n\t\treturn this._gradientYMax;\n\t});\n\n\t/**\n\t*渐变最小速度Z。\n\t*/\n\t__getset(0,__proto,'gradientZMin',function(){\n\t\treturn this._gradientZMin;\n\t});\n\n\t/**\n\t*渐变最大速度Z。\n\t*/\n\t__getset(0,__proto,'gradientZMax',function(){\n\t\treturn this._gradientZMax;\n\t});\n\n\tGradientVelocity.createByConstant=function(constant){\n\t\tvar gradientVelocity=new GradientVelocity();\n\t\tgradientVelocity._type=0;\n\t\tgradientVelocity._constant=constant;\n\t\treturn gradientVelocity;\n\t}\n\n\tGradientVelocity.createByGradient=function(gradientX,gradientY,gradientZ){\n\t\tvar gradientVelocity=new GradientVelocity();\n\t\tgradientVelocity._type=1;\n\t\tgradientVelocity._gradientX=gradientX;\n\t\tgradientVelocity._gradientY=gradientY;\n\t\tgradientVelocity._gradientZ=gradientZ;\n\t\treturn gradientVelocity;\n\t}\n\n\tGradientVelocity.createByRandomTwoConstant=function(constantMin,constantMax){\n\t\tvar gradientVelocity=new GradientVelocity();\n\t\tgradientVelocity._type=2;\n\t\tgradientVelocity._constantMin=constantMin;\n\t\tgradientVelocity._constantMax=constantMax;\n\t\treturn gradientVelocity;\n\t}\n\n\tGradientVelocity.createByRandomTwoGradient=function(gradientXMin,gradientXMax,gradientYMin,gradientYMax,gradientZMin,gradientZMax){\n\t\tvar gradientVelocity=new GradientVelocity();\n\t\tgradientVelocity._type=3;\n\t\tgradientVelocity._gradientXMin=gradientXMin;\n\t\tgradientVelocity._gradientXMax=gradientXMax;\n\t\tgradientVelocity._gradientYMin=gradientYMin;\n\t\tgradientVelocity._gradientYMax=gradientYMax;\n\t\tgradientVelocity._gradientZMin=gradientZMin;\n\t\tgradientVelocity._gradientZMax=gradientZMax;\n\t\treturn gradientVelocity;\n\t}\n\n\treturn GradientVelocity;\n})()\n\n\n/**\n*<code>RotationOverLifetime</code> 类用于粒子的生命周期旋转。\n*/\n//class laya.d3.core.particleShuriKen.module.RotationOverLifetime\nvar RotationOverLifetime=(function(){\n\tfunction RotationOverLifetime(angularVelocity){\n\t\t/**@private */\n\t\tthis._angularVelocity=null;\n\t\t/**是否启用*/\n\t\tthis.enbale=false;\n\t\tthis._angularVelocity=angularVelocity;\n\t}\n\n\t__class(RotationOverLifetime,'laya.d3.core.particleShuriKen.module.RotationOverLifetime');\n\tvar __proto=RotationOverLifetime.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destRotationOverLifetime=destObject;\n\t\tthis._angularVelocity.cloneTo(destRotationOverLifetime._angularVelocity);\n\t\tdestRotationOverLifetime.enbale=this.enbale;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destAngularVelocity;\n\t\tswitch (this._angularVelocity.type){\n\t\t\tcase 0:\n\t\t\t\tif (this._angularVelocity.separateAxes)\n\t\t\t\t\tdestAngularVelocity=GradientAngularVelocity.createByConstantSeparate(this._angularVelocity.constantSeparate.clone());\n\t\t\t\telse\n\t\t\t\tdestAngularVelocity=GradientAngularVelocity.createByConstant(this._angularVelocity.constant);\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tif (this._angularVelocity.separateAxes)\n\t\t\t\t\tdestAngularVelocity=GradientAngularVelocity.createByGradientSeparate(this._angularVelocity.gradientX.clone(),this._angularVelocity.gradientY.clone(),this._angularVelocity.gradientZ.clone(),this._angularVelocity.gradientW.clone());\n\t\t\t\telse\n\t\t\t\tdestAngularVelocity=GradientAngularVelocity.createByGradient(this._angularVelocity.gradient.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (this._angularVelocity.separateAxes)\n\t\t\t\t\tdestAngularVelocity=GradientAngularVelocity.createByRandomTwoConstantSeparate(this._angularVelocity.constantMinSeparate.clone(),this._angularVelocity.constantMaxSeparate.clone());\n\t\t\t\telse\n\t\t\t\tdestAngularVelocity=GradientAngularVelocity.createByRandomTwoConstant(this._angularVelocity.constantMin,this._angularVelocity.constantMax);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tif (this._angularVelocity.separateAxes)\n\t\t\t\t\tdestAngularVelocity=GradientAngularVelocity.createByRandomTwoGradientSeparate(this._angularVelocity.gradientXMin.clone(),this._angularVelocity.gradientYMin.clone(),this._angularVelocity.gradientZMin.clone(),this._angularVelocity.gradientWMin.clone(),this._angularVelocity.gradientXMax.clone(),this._angularVelocity.gradientYMax.clone(),this._angularVelocity.gradientZMax.clone(),this._angularVelocity.gradientWMax.clone());\n\t\t\t\telse\n\t\t\t\tdestAngularVelocity=GradientAngularVelocity.createByRandomTwoGradient(this._angularVelocity.gradientMin.clone(),this._angularVelocity.gradientMax.clone());\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar destRotationOverLifetime=/*__JS__ */new this.constructor(destAngularVelocity);\n\t\tdestRotationOverLifetime.enbale=this.enbale;\n\t\treturn destRotationOverLifetime;\n\t}\n\n\t/**\n\t*获取角速度。\n\t*/\n\t__getset(0,__proto,'angularVelocity',function(){\n\t\treturn this._angularVelocity;\n\t});\n\n\treturn RotationOverLifetime;\n})()\n\n\n/**\n*<code>BaseShape</code> 类用于粒子形状。\n*/\n//class laya.d3.core.particleShuriKen.module.shape.BaseShape\nvar BaseShape=(function(){\n\tfunction BaseShape(){\n\t\t/**是否启用。*/\n\t\tthis.enable=false;\n\t\t/**随机方向。*/\n\t\tthis.randomDirection=false;\n\t}\n\n\t__class(BaseShape,'laya.d3.core.particleShuriKen.module.shape.BaseShape');\n\tvar __proto=BaseShape.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**@private */\n\t__proto._getShapeBoundBox=function(boundBox){\n\t\tthrow new Error(\"BaseShape: must override it.\");\n\t}\n\n\t/**@private */\n\t__proto._getSpeedBoundBox=function(boundBox){\n\t\tthrow new Error(\"BaseShape: must override it.\");\n\t}\n\n\t/**\n\t*用于生成粒子初始位置和方向。\n\t*@param position 粒子位置。\n\t*@param direction 粒子方向。\n\t*/\n\t__proto.generatePositionAndDirection=function(position,direction,rand,randomSeeds){\n\t\tthrow new Error(\"BaseShape: must override it.\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculateProceduralBounds=function(boundBox,emitterPosScale,minMaxBounds){\n\t\tthis._getShapeBoundBox(boundBox);\n\t\tvar min=boundBox.min;\n\t\tvar max=boundBox.max;\n\t\tVector3.multiply(min,emitterPosScale,min);\n\t\tVector3.multiply(max,emitterPosScale,max);\n\t\tvar speedBounds=new BoundBox(new Vector3(),new Vector3());\n\t\tif (this.randomDirection){\n\t\t\tspeedBounds.min=new Vector3(-1,-1,-1);\n\t\t\tspeedBounds.max=new Vector3(1,1,1);\n\t\t}\n\t\telse{\n\t\t\tthis._getSpeedBoundBox(speedBounds);\n\t\t};\n\t\tvar maxSpeedBound=new BoundBox(new Vector3(),new Vector3());\n\t\tvar maxSpeedMin=maxSpeedBound.min;\n\t\tvar maxSpeedMax=maxSpeedBound.max;\n\t\tVector3.scale(speedBounds.min,minMaxBounds.y,maxSpeedMin);\n\t\tVector3.scale(speedBounds.max,minMaxBounds.y,maxSpeedMax);\n\t\tVector3.add(boundBox.min,maxSpeedMin,maxSpeedMin);\n\t\tVector3.add(boundBox.max,maxSpeedMax,maxSpeedMax);\n\t\tVector3.min(boundBox.min,maxSpeedMin,boundBox.min);\n\t\tVector3.max(boundBox.max,maxSpeedMin,boundBox.max);\n\t\tvar minSpeedBound=new BoundBox(new Vector3(),new Vector3());\n\t\tvar minSpeedMin=minSpeedBound.min;\n\t\tvar minSpeedMax=minSpeedBound.max;\n\t\tVector3.scale(speedBounds.min,minMaxBounds.x,minSpeedMin);\n\t\tVector3.scale(speedBounds.max,minMaxBounds.x,minSpeedMax);\n\t\tVector3.min(minSpeedBound.min,minSpeedMax,maxSpeedMin);\n\t\tVector3.max(minSpeedBound.min,minSpeedMax,maxSpeedMax);\n\t\tVector3.min(boundBox.min,maxSpeedMin,boundBox.min);\n\t\tVector3.max(boundBox.max,maxSpeedMin,boundBox.max);\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destShape=destObject;\n\t\tdestShape.enable=this.enable;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destShape=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destShape);\n\t\treturn destShape;\n\t}\n\n\treturn BaseShape;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.particleShuriKen.module.shape.ShapeUtils\nvar ShapeUtils=(function(){\n\tfunction ShapeUtils(){}\n\t__class(ShapeUtils,'laya.d3.core.particleShuriKen.module.shape.ShapeUtils');\n\tShapeUtils._randomPointUnitArcCircle=function(arc,out,rand){\n\t\tvar outE=out.elements;\n\t\tvar angle=NaN;\n\t\tif (rand)\n\t\t\tangle=rand.getFloat()*arc;\n\t\telse\n\t\tangle=Math.random()*arc;\n\t\toutE[0]=Math.cos(angle);\n\t\toutE[1]=Math.sin(angle);\n\t}\n\n\tShapeUtils._randomPointInsideUnitArcCircle=function(arc,out,rand){\n\t\tvar outE=out.elements;\n\t\tShapeUtils._randomPointUnitArcCircle(arc,out,rand);\n\t\tvar range=NaN;\n\t\tif (rand)\n\t\t\trange=Math.pow(rand.getFloat(),1.0 / 2.0);\n\t\telse\n\t\trange=Math.pow(Math.random(),1.0 / 2.0);\n\t\toutE[0]=outE[0] *range;\n\t\toutE[1]=outE[1] *range;\n\t}\n\n\tShapeUtils._randomPointUnitCircle=function(out,rand){\n\t\tvar outE=out.elements;\n\t\tvar angle=NaN;\n\t\tif (rand)\n\t\t\tangle=rand.getFloat()*Math.PI *2;\n\t\telse\n\t\tangle=Math.random()*Math.PI *2;\n\t\toutE[0]=Math.cos(angle);\n\t\toutE[1]=Math.sin(angle);\n\t}\n\n\tShapeUtils._randomPointInsideUnitCircle=function(out,rand){\n\t\tvar outE=out.elements;\n\t\tShapeUtils._randomPointUnitCircle(out);\n\t\tvar range=NaN;\n\t\tif (rand)\n\t\t\trange=Math.pow(rand.getFloat(),1.0 / 2.0);\n\t\telse\n\t\trange=Math.pow(Math.random(),1.0 / 2.0);\n\t\toutE[0]=outE[0] *range;\n\t\toutE[1]=outE[1] *range;\n\t}\n\n\tShapeUtils._randomPointUnitSphere=function(out,rand){\n\t\tvar outE=out.elements;\n\t\tvar z=NaN;\n\t\tvar a=NaN;\n\t\tif (rand){\n\t\t\tz=outE[2]=rand.getFloat()*2-1.0;\n\t\t\ta=rand.getFloat()*Math.PI *2;\n\t\t\t}else {\n\t\t\tz=outE[2]=Math.random()*2-1.0;\n\t\t\ta=Math.random()*Math.PI *2;\n\t\t};\n\t\tvar r=Math.sqrt(1.0-z *z);\n\t\toutE[0]=r *Math.cos(a);\n\t\toutE[1]=r *Math.sin(a);\n\t}\n\n\tShapeUtils._randomPointInsideUnitSphere=function(out,rand){\n\t\tvar outE=out.elements;\n\t\tShapeUtils._randomPointUnitSphere(out);\n\t\tvar range=NaN;\n\t\tif (rand)\n\t\t\trange=Math.pow(rand.getFloat(),1.0 / 3.0);\n\t\telse\n\t\trange=Math.pow(Math.random(),1.0 / 3.0);\n\t\toutE[0]=outE[0] *range;\n\t\toutE[1]=outE[1] *range;\n\t\toutE[2]=outE[2] *range;\n\t}\n\n\tShapeUtils._randomPointInsideHalfUnitBox=function(out,rand){\n\t\tvar outE=out.elements;\n\t\tif (rand){\n\t\t\toutE[0]=(rand.getFloat()-0.5);\n\t\t\toutE[1]=(rand.getFloat()-0.5);\n\t\t\toutE[2]=(rand.getFloat()-0.5);\n\t\t\t}else {\n\t\t\toutE[0]=(Math.random()-0.5);\n\t\t\toutE[1]=(Math.random()-0.5);\n\t\t\toutE[2]=(Math.random()-0.5);\n\t\t}\n\t}\n\n\treturn ShapeUtils;\n})()\n\n\n/**\n*<code>SizeOverLifetime</code> 类用于粒子的生命周期尺寸。\n*/\n//class laya.d3.core.particleShuriKen.module.SizeOverLifetime\nvar SizeOverLifetime=(function(){\n\tfunction SizeOverLifetime(size){\n\t\t/**@private */\n\t\tthis._size=null;\n\t\t/**是否启用*/\n\t\tthis.enbale=false;\n\t\tthis._size=size;\n\t}\n\n\t__class(SizeOverLifetime,'laya.d3.core.particleShuriKen.module.SizeOverLifetime');\n\tvar __proto=SizeOverLifetime.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destSizeOverLifetime=destObject;\n\t\tthis._size.cloneTo(destSizeOverLifetime._size);\n\t\tdestSizeOverLifetime.enbale=this.enbale;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destSize;\n\t\tswitch (this._size.type){\n\t\t\tcase 0:\n\t\t\t\tif (this._size.separateAxes)\n\t\t\t\t\tdestSize=GradientSize.createByGradientSeparate(this._size.gradientX.clone(),this._size.gradientY.clone(),this._size.gradientZ.clone());\n\t\t\t\telse\n\t\t\t\tdestSize=GradientSize.createByGradient(this._size.gradient.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tif (this._size.separateAxes)\n\t\t\t\t\tdestSize=GradientSize.createByRandomTwoConstantSeparate(this._size.constantMinSeparate.clone(),this._size.constantMaxSeparate.clone());\n\t\t\t\telse\n\t\t\t\tdestSize=GradientSize.createByRandomTwoConstant(this._size.constantMin,this._size.constantMax);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (this._size.separateAxes)\n\t\t\t\t\tdestSize=GradientSize.createByRandomTwoGradientSeparate(this._size.gradientXMin.clone(),this._size.gradientYMin.clone(),this._size.gradientZMin.clone(),this._size.gradientXMax.clone(),this._size.gradientYMax.clone(),this._size.gradientZMax.clone());\n\t\t\t\telse\n\t\t\t\tdestSize=GradientSize.createByRandomTwoGradient(this._size.gradientMin.clone(),this._size.gradientMax.clone());\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar destSizeOverLifetime=/*__JS__ */new this.constructor(destSize);\n\t\tdestSizeOverLifetime.enbale=this.enbale;\n\t\treturn destSizeOverLifetime;\n\t}\n\n\t/**\n\t*获取尺寸。\n\t*/\n\t__getset(0,__proto,'size',function(){\n\t\treturn this._size;\n\t});\n\n\treturn SizeOverLifetime;\n})()\n\n\n/**\n*<code>StartFrame</code> 类用于创建开始帧。\n*/\n//class laya.d3.core.particleShuriKen.module.StartFrame\nvar StartFrame=(function(){\n\tfunction StartFrame(){\n\t\t/**@private */\n\t\tthis._type=0;\n\t\t/**@private */\n\t\tthis._constant=NaN;\n\t\t/**@private */\n\t\tthis._constantMin=NaN;\n\t\t/**@private */\n\t\tthis._constantMax=NaN;\n\t}\n\n\t__class(StartFrame,'laya.d3.core.particleShuriKen.module.StartFrame');\n\tvar __proto=StartFrame.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destStartFrame=destObject;\n\t\tdestStartFrame._type=this._type;\n\t\tdestStartFrame._constant=this._constant;\n\t\tdestStartFrame._constantMin=this._constantMin;\n\t\tdestStartFrame._constantMax=this._constantMax;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destStartFrame=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destStartFrame);\n\t\treturn destStartFrame;\n\t}\n\n\t/**\n\t*固定帧。\n\t*/\n\t__getset(0,__proto,'constant',function(){\n\t\treturn this._constant;\n\t});\n\n\t/**\n\t*开始帧类型,0常量模式，1随机双常量模式。\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t});\n\n\t/**\n\t*最小固定帧。\n\t*/\n\t__getset(0,__proto,'constantMin',function(){\n\t\treturn this._constantMin;\n\t});\n\n\t/**\n\t*最大固定帧。\n\t*/\n\t__getset(0,__proto,'constantMax',function(){\n\t\treturn this._constantMax;\n\t});\n\n\tStartFrame.createByConstant=function(constant){\n\t\tvar rotationOverLifetime=new StartFrame();\n\t\trotationOverLifetime._type=0;\n\t\trotationOverLifetime._constant=constant;\n\t\treturn rotationOverLifetime;\n\t}\n\n\tStartFrame.createByRandomTwoConstant=function(constantMin,constantMax){\n\t\tvar rotationOverLifetime=new StartFrame();\n\t\trotationOverLifetime._type=1;\n\t\trotationOverLifetime._constantMin=constantMin;\n\t\trotationOverLifetime._constantMax=constantMax;\n\t\treturn rotationOverLifetime;\n\t}\n\n\treturn StartFrame;\n})()\n\n\n/**\n*<code>TextureSheetAnimation</code> 类用于创建粒子帧动画。\n*/\n//class laya.d3.core.particleShuriKen.module.TextureSheetAnimation\nvar TextureSheetAnimation=(function(){\n\tfunction TextureSheetAnimation(frame,startFrame){\n\t\t/**@private */\n\t\tthis._frame=null;\n\t\t/**@private */\n\t\tthis._startFrame=null;\n\t\t/**纹理平铺。*/\n\t\tthis.tiles=null;\n\t\t/**类型,0为whole sheet、1为singal row。*/\n\t\tthis.type=0;\n\t\t/**是否随机行，type为1时有效。*/\n\t\tthis.randomRow=false;\n\t\t/**行索引,type为1时有效。*/\n\t\tthis.rowIndex=0;\n\t\t/**循环次数。*/\n\t\tthis.cycles=0;\n\t\t/**UV通道类型,0为Noting,1为Everything,待补充,暂不支持。*/\n\t\tthis.enableUVChannels=0;\n\t\t/**是否启用*/\n\t\tthis.enable=false;\n\t\tthis.tiles=new Vector2(1,1);\n\t\tthis.type=0;\n\t\tthis.randomRow=true;\n\t\tthis.rowIndex=0;\n\t\tthis.cycles=1;\n\t\tthis.enableUVChannels=1;\n\t\tthis._frame=frame;\n\t\tthis._startFrame=startFrame;\n\t}\n\n\t__class(TextureSheetAnimation,'laya.d3.core.particleShuriKen.module.TextureSheetAnimation');\n\tvar __proto=TextureSheetAnimation.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destTextureSheetAnimation=destObject;\n\t\tthis.tiles.cloneTo(destTextureSheetAnimation.tiles);\n\t\tdestTextureSheetAnimation.type=this.type;\n\t\tdestTextureSheetAnimation.randomRow=this.randomRow;\n\t\tthis._frame.cloneTo(destTextureSheetAnimation._frame);\n\t\tthis._startFrame.cloneTo(destTextureSheetAnimation._startFrame);\n\t\tdestTextureSheetAnimation.cycles=this.cycles;\n\t\tdestTextureSheetAnimation.enableUVChannels=this.enableUVChannels;\n\t\tdestTextureSheetAnimation.enable=this.enable;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destFrame;\n\t\tswitch (this._frame.type){\n\t\t\tcase 0:\n\t\t\t\tdestFrame=FrameOverTime.createByConstant(this._frame.constant);\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tdestFrame=FrameOverTime.createByOverTime(this._frame.frameOverTimeData.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tdestFrame=FrameOverTime.createByRandomTwoConstant(this._frame.constantMin,this._frame.constantMax);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tdestFrame=FrameOverTime.createByRandomTwoOverTime(this._frame.frameOverTimeDataMin.clone(),this._frame.frameOverTimeDataMax.clone());\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar destStartFrame;\n\t\tswitch (this._startFrame.type){\n\t\t\tcase 0:\n\t\t\t\tdestStartFrame=StartFrame.createByConstant(this._startFrame.constant);\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tdestStartFrame=StartFrame.createByRandomTwoConstant(this._startFrame.constantMin,this._startFrame.constantMax);\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar destTextureSheetAnimation=/*__JS__ */new this.constructor(destFrame,destStartFrame);\n\t\tthis.tiles.cloneTo(destTextureSheetAnimation.tiles);\n\t\tdestTextureSheetAnimation.type=this.type;\n\t\tdestTextureSheetAnimation.randomRow=this.randomRow;\n\t\tdestTextureSheetAnimation.cycles=this.cycles;\n\t\tdestTextureSheetAnimation.enableUVChannels=this.enableUVChannels;\n\t\tdestTextureSheetAnimation.enable=this.enable;\n\t\treturn destTextureSheetAnimation;\n\t}\n\n\t/**获取时间帧率。*/\n\t__getset(0,__proto,'frame',function(){\n\t\treturn this._frame;\n\t});\n\n\t/**获取开始帧率。*/\n\t__getset(0,__proto,'startFrame',function(){\n\t\treturn this._startFrame;\n\t});\n\n\treturn TextureSheetAnimation;\n})()\n\n\n/**\n*<code>VelocityOverLifetime</code> 类用于粒子的生命周期速度。\n*/\n//class laya.d3.core.particleShuriKen.module.VelocityOverLifetime\nvar VelocityOverLifetime=(function(){\n\tfunction VelocityOverLifetime(velocity){\n\t\t/**@private */\n\t\tthis._velocity=null;\n\t\t/**是否启用*/\n\t\tthis.enbale=false;\n\t\t/**速度空间,0为local,1为world。*/\n\t\tthis.space=0;\n\t\tthis._velocity=velocity;\n\t}\n\n\t__class(VelocityOverLifetime,'laya.d3.core.particleShuriKen.module.VelocityOverLifetime');\n\tvar __proto=VelocityOverLifetime.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destVelocityOverLifetime=destObject;\n\t\tthis._velocity.cloneTo(destVelocityOverLifetime._velocity);\n\t\tdestVelocityOverLifetime.enbale=this.enbale;\n\t\tdestVelocityOverLifetime.space=this.space;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destVelocity;\n\t\tswitch(this._velocity.type){\n\t\t\tcase 0:\n\t\t\t\tdestVelocity=GradientVelocity.createByConstant(this._velocity.constant.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tdestVelocity=GradientVelocity.createByGradient(this._velocity.gradientX.clone(),this._velocity.gradientY.clone(),this._velocity.gradientZ.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tdestVelocity=GradientVelocity.createByRandomTwoConstant(this._velocity.constantMin.clone(),this._velocity.constantMax.clone());\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tdestVelocity=GradientVelocity.createByRandomTwoGradient(this._velocity.gradientXMin.clone(),this._velocity.gradientYMin.clone(),this._velocity.gradientZMin.clone(),this._velocity.gradientXMax.clone(),this._velocity.gradientYMax.clone(),this._velocity.gradientZMax.clone());\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar destVelocityOverLifetime=/*__JS__ */new this.constructor(destVelocity);\n\t\tdestVelocityOverLifetime.enbale=this.enbale;\n\t\tdestVelocityOverLifetime.space=this.space;\n\t\treturn destVelocityOverLifetime;\n\t}\n\n\t/**\n\t*获取尺寸。\n\t*/\n\t__getset(0,__proto,'velocity',function(){\n\t\treturn this._velocity;\n\t});\n\n\treturn VelocityOverLifetime;\n})()\n\n\n/**\n*@private\n*/\n//class laya.d3.core.particleShuriKen.ShurikenParticleData\nvar ShurikenParticleData=(function(){\n\tfunction ShurikenParticleData(){}\n\t__class(ShurikenParticleData,'laya.d3.core.particleShuriKen.ShurikenParticleData');\n\tShurikenParticleData._getStartLifetimeFromGradient=function(startLifeTimeGradient,emissionTime){\n\t\tfor (var i=1,n=startLifeTimeGradient.gradientCount;i < n;i++){\n\t\t\tvar key=startLifeTimeGradient.getKeyByIndex(i);\n\t\t\tif (key >=emissionTime){\n\t\t\t\tvar lastKey=startLifeTimeGradient.getKeyByIndex(i-1);\n\t\t\t\tvar age=(emissionTime-lastKey)/ (key-lastKey);\n\t\t\t\treturn MathUtil.lerp(startLifeTimeGradient.getValueByIndex(i-1),startLifeTimeGradient.getValueByIndex(i),age)\n\t\t\t}\n\t\t}\n\t\tthrow new Error(\"ShurikenParticleData: can't get value foam startLifeTimeGradient.\");\n\t}\n\n\tShurikenParticleData._randomInvertRoationArray=function(rotatonE,outE,randomizeRotationDirection,rand,randomSeeds){\n\t\tvar randDic=NaN;\n\t\tif (rand){\n\t\t\trand.seed=randomSeeds[6];\n\t\t\trandDic=rand.getFloat();\n\t\t\trandomSeeds[6]=rand.seed;\n\t\t\t}else {\n\t\t\trandDic=Math.random();\n\t\t}\n\t\tif (randDic < randomizeRotationDirection){\n\t\t\toutE[0]=-rotatonE[0];\n\t\t\toutE[1]=-rotatonE[1];\n\t\t\toutE[2]=-rotatonE[2];\n\t\t\t}else {\n\t\t\toutE[0]=rotatonE[0];\n\t\t\toutE[1]=rotatonE[1];\n\t\t\toutE[2]=rotatonE[2];\n\t\t}\n\t}\n\n\tShurikenParticleData._randomInvertRoation=function(rotaton,randomizeRotationDirection,rand,randomSeeds){\n\t\tvar randDic=NaN;\n\t\tif (rand){\n\t\t\trand.seed=randomSeeds[6];\n\t\t\trandDic=rand.getFloat();\n\t\t\trandomSeeds[6]=rand.seed;\n\t\t\t}else {\n\t\t\trandDic=Math.random();\n\t\t}\n\t\tif (randDic < randomizeRotationDirection)\n\t\t\trotaton=-rotaton;\n\t\treturn rotaton;\n\t}\n\n\tShurikenParticleData.create=function(particleSystem,particleRender,transform){\n\t\tvar autoRandomSeed=particleSystem.autoRandomSeed;\n\t\tvar rand=particleSystem._rand;\n\t\tvar randomSeeds=particleSystem._randomSeeds;\n\t\tswitch (particleSystem.startColorType){\n\t\t\tcase 0:;\n\t\t\t\tvar constantStartColorE=particleSystem.startColorConstant.elements;\n\t\t\t\tShurikenParticleData.startColor[0]=constantStartColorE[0];\n\t\t\t\tShurikenParticleData.startColor[1]=constantStartColorE[1];\n\t\t\t\tShurikenParticleData.startColor[2]=constantStartColorE[2];\n\t\t\t\tShurikenParticleData.startColor[3]=constantStartColorE[3];\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\tMathUtil.lerpVector4(particleSystem.startColorConstantMin.elements,particleSystem.startColorConstantMax.elements,Math.random(),ShurikenParticleData.startColor);\n\t\t\t\t\t}else {\n\t\t\t\t\trand.seed=randomSeeds[3];\n\t\t\t\t\tMathUtil.lerpVector4(particleSystem.startColorConstantMin.elements,particleSystem.startColorConstantMax.elements,rand.getFloat(),ShurikenParticleData.startColor);\n\t\t\t\t\trandomSeeds[3]=rand.seed;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar colorOverLifetime=particleSystem.colorOverLifetime;\n\t\tif (colorOverLifetime && colorOverLifetime.enbale){\n\t\t\tvar color=colorOverLifetime.color;\n\t\t\tswitch (color.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tShurikenParticleData.startColor[0]=ShurikenParticleData.startColor[0] *color.constant.x;\n\t\t\t\t\tShurikenParticleData.startColor[1]=ShurikenParticleData.startColor[1] *color.constant.y;\n\t\t\t\t\tShurikenParticleData.startColor[2]=ShurikenParticleData.startColor[2] *color.constant.z;\n\t\t\t\t\tShurikenParticleData.startColor[3]=ShurikenParticleData.startColor[3] *color.constant.w;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:;\n\t\t\t\t\tvar colorRandom=NaN;\n\t\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\t\tcolorRandom=Math.random();\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trand.seed=randomSeeds[10];\n\t\t\t\t\t\tcolorRandom=rand.getFloat();\n\t\t\t\t\t\trandomSeeds[10]=rand.seed;\n\t\t\t\t\t};\n\t\t\t\t\tvar minConstantColor=color.constantMin;\n\t\t\t\t\tvar maxConstantColor=color.constantMax;\n\t\t\t\t\tShurikenParticleData.startColor[0]=ShurikenParticleData.startColor[0] *MathUtil.lerp(minConstantColor.x,maxConstantColor.x,colorRandom);\n\t\t\t\t\tShurikenParticleData.startColor[1]=ShurikenParticleData.startColor[1] *MathUtil.lerp(minConstantColor.y,maxConstantColor.y,colorRandom);\n\t\t\t\t\tShurikenParticleData.startColor[2]=ShurikenParticleData.startColor[2] *MathUtil.lerp(minConstantColor.z,maxConstantColor.z,colorRandom);\n\t\t\t\t\tShurikenParticleData.startColor[3]=ShurikenParticleData.startColor[3] *MathUtil.lerp(minConstantColor.w,maxConstantColor.w,colorRandom);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t};\n\t\tvar particleSize=ShurikenParticleData.startSize;\n\t\tswitch (particleSystem.startSizeType){\n\t\t\tcase 0:\n\t\t\t\tif (particleSystem.threeDStartSize){\n\t\t\t\t\tvar startSizeConstantSeparate=particleSystem.startSizeConstantSeparate;\n\t\t\t\t\tparticleSize[0]=startSizeConstantSeparate.x;\n\t\t\t\t\tparticleSize[1]=startSizeConstantSeparate.y;\n\t\t\t\t\tparticleSize[2]=startSizeConstantSeparate.z;\n\t\t\t\t\t}else {\n\t\t\t\t\tparticleSize[0]=particleSize[1]=particleSize[2]=particleSystem.startSizeConstant;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (particleSystem.threeDStartSize){\n\t\t\t\t\tvar startSizeConstantMinSeparate=particleSystem.startSizeConstantMinSeparate;\n\t\t\t\t\tvar startSizeConstantMaxSeparate=particleSystem.startSizeConstantMaxSeparate;\n\t\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\t\tparticleSize[0]=MathUtil.lerp(startSizeConstantMinSeparate.x,startSizeConstantMaxSeparate.x,Math.random());\n\t\t\t\t\t\tparticleSize[1]=MathUtil.lerp(startSizeConstantMinSeparate.y,startSizeConstantMaxSeparate.y,Math.random());\n\t\t\t\t\t\tparticleSize[2]=MathUtil.lerp(startSizeConstantMinSeparate.z,startSizeConstantMaxSeparate.z,Math.random());\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trand.seed=randomSeeds[4];\n\t\t\t\t\t\tparticleSize[0]=MathUtil.lerp(startSizeConstantMinSeparate.x,startSizeConstantMaxSeparate.x,rand.getFloat());\n\t\t\t\t\t\tparticleSize[1]=MathUtil.lerp(startSizeConstantMinSeparate.y,startSizeConstantMaxSeparate.y,rand.getFloat());\n\t\t\t\t\t\tparticleSize[2]=MathUtil.lerp(startSizeConstantMinSeparate.z,startSizeConstantMaxSeparate.z,rand.getFloat());\n\t\t\t\t\t\trandomSeeds[4]=rand.seed;\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\t\tparticleSize[0]=particleSize[1]=particleSize[2]=MathUtil.lerp(particleSystem.startSizeConstantMin,particleSystem.startSizeConstantMax,Math.random());\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trand.seed=randomSeeds[4];\n\t\t\t\t\t\tparticleSize[0]=particleSize[1]=particleSize[2]=MathUtil.lerp(particleSystem.startSizeConstantMin,particleSystem.startSizeConstantMax,rand.getFloat());\n\t\t\t\t\t\trandomSeeds[4]=rand.seed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar sizeOverLifetime=particleSystem.sizeOverLifetime;\n\t\tif (sizeOverLifetime && sizeOverLifetime.enbale && sizeOverLifetime.size.type===1){\n\t\t\tvar size=sizeOverLifetime.size;\n\t\t\tif (size.separateAxes){\n\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\tparticleSize[0]=particleSize[0] *MathUtil.lerp(size.constantMinSeparate.x,size.constantMaxSeparate.x,Math.random());\n\t\t\t\t\tparticleSize[1]=particleSize[1] *MathUtil.lerp(size.constantMinSeparate.y,size.constantMaxSeparate.y,Math.random());\n\t\t\t\t\tparticleSize[2]=particleSize[2] *MathUtil.lerp(size.constantMinSeparate.z,size.constantMaxSeparate.z,Math.random());\n\t\t\t\t\t}else {\n\t\t\t\t\trand.seed=randomSeeds[11];\n\t\t\t\t\tparticleSize[0]=particleSize[0] *MathUtil.lerp(size.constantMinSeparate.x,size.constantMaxSeparate.x,rand.getFloat());\n\t\t\t\t\tparticleSize[1]=particleSize[1] *MathUtil.lerp(size.constantMinSeparate.y,size.constantMaxSeparate.y,rand.getFloat());\n\t\t\t\t\tparticleSize[2]=particleSize[2] *MathUtil.lerp(size.constantMinSeparate.z,size.constantMaxSeparate.z,rand.getFloat());\n\t\t\t\t\trandomSeeds[11]=rand.seed;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar randomSize=NaN;\n\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\trandomSize=MathUtil.lerp(size.constantMin,size.constantMax,Math.random());\n\t\t\t\t\t}else {\n\t\t\t\t\trand.seed=randomSeeds[11];\n\t\t\t\t\trandomSize=MathUtil.lerp(size.constantMin,size.constantMax,rand.getFloat());\n\t\t\t\t\trandomSeeds[11]=rand.seed;\n\t\t\t\t}\n\t\t\t\tparticleSize[0]=particleSize[0] *randomSize;\n\t\t\t\tparticleSize[1]=particleSize[1] *randomSize;\n\t\t\t\tparticleSize[2]=particleSize[2] *randomSize;\n\t\t\t}\n\t\t};\n\t\tvar renderMode=particleRender.renderMode;\n\t\tif (renderMode!==1){\n\t\t\tswitch (particleSystem.startRotationType){\n\t\t\t\tcase 0:\n\t\t\t\t\tif (particleSystem.threeDStartRotation){\n\t\t\t\t\t\tvar startRotationConstantSeparate=particleSystem.startRotationConstantSeparate;\n\t\t\t\t\t\tvar randomRotationE=ShurikenParticleData._tempVector30.elements;\n\t\t\t\t\t\tShurikenParticleData._randomInvertRoationArray(startRotationConstantSeparate.elements,randomRotationE,particleSystem.randomizeRotationDirection,autoRandomSeed ? null :rand,randomSeeds);\n\t\t\t\t\t\tShurikenParticleData.startRotation[0]=randomRotationE[0];\n\t\t\t\t\t\tShurikenParticleData.startRotation[1]=randomRotationE[1];\n\t\t\t\t\t\tif (renderMode!==4)\n\t\t\t\t\t\t\tShurikenParticleData.startRotation[2]=-randomRotationE[2];\n\t\t\t\t\t\telse\n\t\t\t\t\t\tShurikenParticleData.startRotation[2]=randomRotationE[2];\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tShurikenParticleData.startRotation[0]=ShurikenParticleData._randomInvertRoation(particleSystem.startRotationConstant,particleSystem.randomizeRotationDirection,autoRandomSeed ? null :rand,randomSeeds);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tif (particleSystem.threeDStartRotation){\n\t\t\t\t\t\tvar startRotationConstantMinSeparate=particleSystem.startRotationConstantMinSeparate;\n\t\t\t\t\t\tvar startRotationConstantMaxSeparate=particleSystem.startRotationConstantMaxSeparate;\n\t\t\t\t\t\tvar lerpRoationE=ShurikenParticleData._tempVector30.elements;\n\t\t\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\t\t\tlerpRoationE[0]=MathUtil.lerp(startRotationConstantMinSeparate.x,startRotationConstantMaxSeparate.x,Math.random());\n\t\t\t\t\t\t\tlerpRoationE[1]=MathUtil.lerp(startRotationConstantMinSeparate.y,startRotationConstantMaxSeparate.y,Math.random());\n\t\t\t\t\t\t\tlerpRoationE[2]=MathUtil.lerp(startRotationConstantMinSeparate.z,startRotationConstantMaxSeparate.z,Math.random());\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\trand.seed=randomSeeds[5];\n\t\t\t\t\t\t\tlerpRoationE[0]=MathUtil.lerp(startRotationConstantMinSeparate.x,startRotationConstantMaxSeparate.x,rand.getFloat());\n\t\t\t\t\t\t\tlerpRoationE[1]=MathUtil.lerp(startRotationConstantMinSeparate.y,startRotationConstantMaxSeparate.y,rand.getFloat());\n\t\t\t\t\t\t\tlerpRoationE[2]=MathUtil.lerp(startRotationConstantMinSeparate.z,startRotationConstantMaxSeparate.z,rand.getFloat());\n\t\t\t\t\t\t\trandomSeeds[5]=rand.seed;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tShurikenParticleData._randomInvertRoationArray(lerpRoationE,lerpRoationE,particleSystem.randomizeRotationDirection,autoRandomSeed ? null :rand,randomSeeds);\n\t\t\t\t\t\tShurikenParticleData.startRotation[0]=lerpRoationE[0];\n\t\t\t\t\t\tShurikenParticleData.startRotation[1]=lerpRoationE[1];\n\t\t\t\t\t\tif (renderMode!==4)\n\t\t\t\t\t\t\tShurikenParticleData.startRotation[2]=-lerpRoationE[2];\n\t\t\t\t\t\telse\n\t\t\t\t\t\tShurikenParticleData.startRotation[2]=lerpRoationE[2];\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\t\t\tShurikenParticleData.startRotation[0]=ShurikenParticleData._randomInvertRoation(MathUtil.lerp(particleSystem.startRotationConstantMin,particleSystem.startRotationConstantMax,Math.random()),particleSystem.randomizeRotationDirection,autoRandomSeed ? null :rand,randomSeeds);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\trand.seed=randomSeeds[5];\n\t\t\t\t\t\t\tShurikenParticleData.startRotation[0]=ShurikenParticleData._randomInvertRoation(MathUtil.lerp(particleSystem.startRotationConstantMin,particleSystem.startRotationConstantMax,rand.getFloat()),particleSystem.randomizeRotationDirection,autoRandomSeed ? null :rand,randomSeeds);\n\t\t\t\t\t\t\trandomSeeds[5]=rand.seed;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\tswitch (particleSystem.startLifetimeType){\n\t\t\tcase 0:\n\t\t\t\tShurikenParticleData.startLifeTime=particleSystem.startLifetimeConstant;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tShurikenParticleData.startLifeTime=ShurikenParticleData._getStartLifetimeFromGradient(particleSystem.startLifeTimeGradient,particleSystem.emissionTime);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\tShurikenParticleData.startLifeTime=MathUtil.lerp(particleSystem.startLifetimeConstantMin,particleSystem.startLifetimeConstantMax,Math.random());\n\t\t\t\t\t}else {\n\t\t\t\t\trand.seed=randomSeeds[7];\n\t\t\t\t\tShurikenParticleData.startLifeTime=MathUtil.lerp(particleSystem.startLifetimeConstantMin,particleSystem.startLifetimeConstantMax,rand.getFloat());\n\t\t\t\t\trandomSeeds[7]=rand.seed;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 3:;\n\t\t\t\tvar emissionTime=particleSystem.emissionTime;\n\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\tShurikenParticleData.startLifeTime=MathUtil.lerp(ShurikenParticleData._getStartLifetimeFromGradient(particleSystem.startLifeTimeGradientMin,emissionTime),ShurikenParticleData._getStartLifetimeFromGradient(particleSystem.startLifeTimeGradientMax,emissionTime),Math.random());\n\t\t\t\t\t}else {\n\t\t\t\t\trand.seed=randomSeeds[7];\n\t\t\t\t\tShurikenParticleData.startLifeTime=MathUtil.lerp(ShurikenParticleData._getStartLifetimeFromGradient(particleSystem.startLifeTimeGradientMin,emissionTime),ShurikenParticleData._getStartLifetimeFromGradient(particleSystem.startLifeTimeGradientMax,emissionTime),rand.getFloat());\n\t\t\t\t\trandomSeeds[7]=rand.seed;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tswitch (particleSystem.startSpeedType){\n\t\t\tcase 0:\n\t\t\t\tShurikenParticleData.startSpeed=particleSystem.startSpeedConstant;\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\tShurikenParticleData.startSpeed=MathUtil.lerp(particleSystem.startSpeedConstantMin,particleSystem.startSpeedConstantMax,Math.random());\n\t\t\t\t\t}else {\n\t\t\t\t\trand.seed=randomSeeds[8];\n\t\t\t\t\tShurikenParticleData.startSpeed=MathUtil.lerp(particleSystem.startSpeedConstantMin,particleSystem.startSpeedConstantMax,rand.getFloat());\n\t\t\t\t\trandomSeeds[8]=rand.seed;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar textureSheetAnimation=particleSystem.textureSheetAnimation;\n\t\tvar enableSheetAnimation=textureSheetAnimation && textureSheetAnimation.enable;\n\t\tif (enableSheetAnimation){\n\t\t\tvar title=textureSheetAnimation.tiles;\n\t\t\tvar titleX=title.x,titleY=title.y;\n\t\t\tvar subU=1.0 / titleX,subV=1.0 / titleY;\n\t\t\tvar startFrameCount=0;\n\t\t\tvar startFrame=textureSheetAnimation.startFrame;\n\t\t\tswitch (startFrame.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tstartFrameCount=startFrame.constant;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\t\tstartFrameCount=MathUtil.lerp(startFrame.constantMin,startFrame.constantMax,Math.random());\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trand.seed=randomSeeds[14];\n\t\t\t\t\t\tstartFrameCount=MathUtil.lerp(startFrame.constantMin,startFrame.constantMax,rand.getFloat());\n\t\t\t\t\t\trandomSeeds[14]=rand.seed;\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar frame=textureSheetAnimation.frame;\n\t\t\tswitch (frame.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tstartFrameCount+=frame.constant;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\t\tstartFrameCount+=MathUtil.lerp(frame.constantMin,frame.constantMax,Math.random());\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trand.seed=randomSeeds[15];\n\t\t\t\t\t\tstartFrameCount+=MathUtil.lerp(frame.constantMin,frame.constantMax,rand.getFloat());\n\t\t\t\t\t\trandomSeeds[15]=rand.seed;\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar startRow=0;\n\t\t\tswitch (textureSheetAnimation.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tstartRow=Math.floor(startFrameCount / titleX);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tif (textureSheetAnimation.randomRow){\n\t\t\t\t\t\tif (autoRandomSeed){\n\t\t\t\t\t\t\tstartRow=Math.floor(Math.random()*titleY);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\trand.seed=randomSeeds[13];\n\t\t\t\t\t\t\tstartRow=Math.floor(rand.getFloat()*titleY);\n\t\t\t\t\t\t\trandomSeeds[13]=rand.seed;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tstartRow=textureSheetAnimation.rowIndex;\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar startCol=Math.floor(startFrameCount % titleX);\n\t\t\tShurikenParticleData.startUVInfo=ShurikenParticleData.startUVInfo;\n\t\t\tShurikenParticleData.startUVInfo[0]=subU;\n\t\t\tShurikenParticleData.startUVInfo[1]=subV;\n\t\t\tShurikenParticleData.startUVInfo[2]=startCol *subU;\n\t\t\tShurikenParticleData.startUVInfo[3]=startRow *subV;\n\t\t\t}else {\n\t\t\tShurikenParticleData.startUVInfo=ShurikenParticleData.startUVInfo;\n\t\t\tShurikenParticleData.startUVInfo[0]=1.0;\n\t\t\tShurikenParticleData.startUVInfo[1]=1.0;\n\t\t\tShurikenParticleData.startUVInfo[2]=0.0;\n\t\t\tShurikenParticleData.startUVInfo[3]=0.0;\n\t\t}\n\t\tswitch (particleSystem.simulationSpace){\n\t\t\tcase 0:;\n\t\t\t\tvar positionE=transform.position.elements;\n\t\t\t\tShurikenParticleData.simulationWorldPostion[0]=positionE[0];\n\t\t\t\tShurikenParticleData.simulationWorldPostion[1]=positionE[1];\n\t\t\t\tShurikenParticleData.simulationWorldPostion[2]=positionE[2];\n\t\t\t\tvar rotationE=transform.rotation.elements;\n\t\t\t\tShurikenParticleData.simulationWorldRotation[0]=rotationE[0];\n\t\t\t\tShurikenParticleData.simulationWorldRotation[1]=rotationE[1];\n\t\t\t\tShurikenParticleData.simulationWorldRotation[2]=rotationE[2];\n\t\t\t\tShurikenParticleData.simulationWorldRotation[3]=rotationE[3];\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"ShurikenParticleMaterial: SimulationSpace value is invalid.\");\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\tShurikenParticleData.startLifeTime=NaN;\n\tShurikenParticleData.startSpeed=NaN;\n\t__static(ShurikenParticleData,\n\t['_tempVector30',function(){return this._tempVector30=new Vector3();},'_tempQuaternion',function(){return this._tempQuaternion=new Quaternion();},'startColor',function(){return this.startColor=new Float32Array(4);},'startSize',function(){return this.startSize=new Float32Array(3);},'startRotation',function(){return this.startRotation=new Float32Array(3);},'startUVInfo',function(){return this.startUVInfo=new Float32Array(4);},'simulationWorldPostion',function(){return this.simulationWorldPostion=new Float32Array(3);},'simulationWorldRotation',function(){return this.simulationWorldRotation=new Float32Array(4);}\n\t]);\n\treturn ShurikenParticleData;\n})()\n\n\n/**\n*@private\n*<code>PhasorSpriter3D</code> 类用于创建矢量笔刷。\n*/\n//class laya.d3.core.PhasorSpriter3D\nvar PhasorSpriter3D=(function(){\n\tfunction PhasorSpriter3D(){\n\t\tthis._tempInt0=0;\n\t\tthis._tempInt1=0;\n\t\tthis._tempUint0=0;\n\t\tthis._tempUint1=0;\n\t\tthis._tempUint2=0;\n\t\tthis._tempUint3=0;\n\t\tthis._tempUint4=0;\n\t\tthis._tempUint5=0;\n\t\tthis._tempUint6=0;\n\t\tthis._tempUint7=0;\n\t\tthis._tempNumver0=NaN;\n\t\tthis._tempNumver1=NaN;\n\t\tthis._tempNumver2=NaN;\n\t\tthis._tempNumver3=NaN;\n\t\tthis._floatSizePerVer=7;\n\t\t//顶点结构为Position(3个float)+Color(4个float)\n\t\tthis._defaultBufferSize=600 *this._floatSizePerVer;\n\t\tthis._vb=null;\n\t\tthis._posInVBData=0;\n\t\tthis._ib=null;\n\t\tthis._posInIBData=0;\n\t\tthis._primitiveType=NaN;\n\t\tthis._hasBegun=false;\n\t\tthis._numVertsPerPrimitive=0;\n\t\tthis._camera=null;\n\t\tthis._sharderNameID=0;\n\t\tthis._shader=null;\n\t\t/**@private */\n\t\tthis._shaderCompile=null;\n\t\tthis._vbData=new Float32Array(this._defaultBufferSize);\n\t\tthis._ibData=new Uint16Array(this._defaultBufferSize);\n\t\tthis._spriteShaderValue=new ValusArray();\n\t\t;\n\t\tthis._vb=VertexBuffer3D.create(PhasorSpriter3D._vertexDeclaration,this._defaultBufferSize / this._floatSizePerVer,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\tthis._ib=IndexBuffer3D.create(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._defaultBufferSize,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\tthis._sharderNameID=Shader3D.nameKey.getID(\"LINE\");\n\t\tthis._shaderCompile=ShaderCompile3D._preCompileShader[this._sharderNameID];\n\t}\n\n\t__class(PhasorSpriter3D,'laya.d3.core.PhasorSpriter3D');\n\tvar __proto=PhasorSpriter3D.prototype;\n\t__proto.line=function(startPosition,startColor,endPosition,endColor){\n\t\tif (!this._hasBegun || this._primitiveType!==/*laya.webgl.WebGLContext.LINES*/0x0001)\n\t\t\tthis.drawLinesException();\n\t\tif (this._posInVBData+2 *this._floatSizePerVer > this._vbData.length || this._posInIBData+2 > this._ibData.length)\n\t\t\tthis.flush();\n\t\tthis._tempUint0=this._posInVBData / this._floatSizePerVer;\n\t\tthis.addVertex(startPosition.x,startPosition.y,startPosition.z,startColor.x,startColor.y,startColor.z,startColor.w);\n\t\tthis.addVertex(endPosition.x,endPosition.y,endPosition.z,endColor.x,endColor.y,endColor.z,endColor.w);\n\t\tthis.addIndexes(this._tempUint0,this._tempUint0+1);\n\t\treturn this;\n\t}\n\n\t__proto.circle=function(radius,numberOfPoints,r,g,b,a){\n\t\tif (!this._hasBegun || (this._primitiveType!==/*laya.webgl.WebGLContext.LINES*/0x0001))\n\t\t\tthis.drawLinesException();\n\t\tthis._tempUint0=numberOfPoints *2;\n\t\tif (this._posInVBData+this._tempUint0 *this._floatSizePerVer > this._vbData.length || this._posInIBData+2 *this._tempUint0 > this._ibData.length)\n\t\t\tthis.flush();\n\t\tthis._tempUint1=this._posInVBData / this._floatSizePerVer;\n\t\tfor (this._tempNumver0=0,this._tempInt0=0;this._tempNumver0 < 3.1416 *2;this._tempNumver0=this._tempNumver0+(3.1416 / numberOfPoints),this._tempInt0++){\n\t\t\tthis.addVertex(Math.sin(this._tempNumver0)*radius,Math.cos(this._tempNumver0)*radius,0,r,g,b,a);\n\t\t\tif (this._tempInt0===0){\n\t\t\t\tthis.addIndexes(this._tempUint1);\n\t\t\t\t}else if (this._tempInt0===this._tempUint0-1){\n\t\t\t\tthis._tempUint2=this._tempUint1+this._tempInt0;\n\t\t\t\tthis.addIndexes(this._tempUint2,this._tempUint2,this._tempUint1);\n\t\t\t\t}else {\n\t\t\t\tthis._tempUint2=this._tempUint1+this._tempInt0;\n\t\t\t\tthis.addIndexes(this._tempUint2,this._tempUint2);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t__proto.plane=function(positionX,positionY,positionZ,width,height,r,g,b,a){\n\t\tif (!this._hasBegun || this._primitiveType!==/*laya.webgl.WebGLContext.TRIANGLES*/0x0004)\n\t\t\tthis.drawTrianglesException();\n\t\tif (this._posInVBData+4 *this._floatSizePerVer > this._vbData.length || this._posInIBData+6 > this._ibData.length)\n\t\t\tthis.flush();\n\t\tthis._tempNumver0=width / 2;\n\t\tthis._tempNumver1=height / 2;\n\t\tthis._tempUint0=this._posInVBData / this._floatSizePerVer;\n\t\tthis.addVertex(positionX-this._tempNumver0,positionY+this._tempNumver1,positionZ,r,g,b,a);\n\t\tthis.addVertex(positionX+this._tempNumver0,positionY+this._tempNumver1,positionZ,r,g,b,a);\n\t\tthis.addVertex(positionX-this._tempNumver0,positionY-this._tempNumver1,positionZ,r,g,b,a);\n\t\tthis.addVertex(positionX+this._tempNumver0,positionY-this._tempNumver1,positionZ,r,g,b,a);\n\t\tthis._tempUint1=this._tempUint0+1;\n\t\tthis._tempUint2=this._tempUint0+2;\n\t\tthis.addIndexes(this._tempUint0,this._tempUint1,this._tempUint2,this._tempUint2,this._tempUint1,this._tempUint0+3);\n\t\treturn this;\n\t}\n\n\t__proto.box=function(positionX,positionY,positionZ,width,height,depth,r,g,b,a){\n\t\tif (!this._hasBegun || this._primitiveType!==/*laya.webgl.WebGLContext.TRIANGLES*/0x0004)\n\t\t\tthis.drawTrianglesException();\n\t\tif (this._posInVBData+8 *this._floatSizePerVer > this._vbData.length || this._posInIBData+36 > this._ibData.length)\n\t\t\tthis.flush();\n\t\tthis._tempNumver0=width / 2;\n\t\tthis._tempNumver1=height / 2;\n\t\tthis._tempNumver2=depth / 2;\n\t\tthis._tempUint0=this._posInVBData / this._floatSizePerVer;\n\t\tthis.addVertex(positionX-this._tempNumver0,positionY+this._tempNumver1,positionZ+this._tempNumver2,r,g,b,a);\n\t\tthis.addVertex(positionX+this._tempNumver0,positionY+this._tempNumver1,positionZ+this._tempNumver2,r,g,b,a);\n\t\tthis.addVertex(positionX-this._tempNumver0,positionY-this._tempNumver1,positionZ+this._tempNumver2,r,g,b,a);\n\t\tthis.addVertex(positionX+this._tempNumver0,positionY-this._tempNumver1,positionZ+this._tempNumver2,r,g,b,a);\n\t\tthis.addVertex(positionX+this._tempNumver0,positionY+this._tempNumver1,positionZ-this._tempNumver2,r,g,b,a);\n\t\tthis.addVertex(positionX-this._tempNumver0,positionY+this._tempNumver1,positionZ-this._tempNumver2,r,g,b,a);\n\t\tthis.addVertex(positionX+this._tempNumver0,positionY-this._tempNumver1,positionZ-this._tempNumver2,r,g,b,a);\n\t\tthis.addVertex(positionX-this._tempNumver0,positionY-this._tempNumver1,positionZ-this._tempNumver2,r,g,b,a);\n\t\tthis._tempUint1=this._tempUint0+1;\n\t\tthis._tempUint2=this._tempUint0+2;\n\t\tthis._tempUint3=this._tempUint0+3;\n\t\tthis._tempUint4=this._tempUint0+4;\n\t\tthis._tempUint5=this._tempUint0+5;\n\t\tthis._tempUint6=this._tempUint0+6;\n\t\tthis._tempUint7=this._tempUint0+7;\n\t\tthis.addIndexes(this._tempUint0,this._tempUint1,this._tempUint2,this._tempUint2,this._tempUint1,this._tempUint3,\n\t\tthis._tempUint4,this._tempUint5,this._tempUint6,this._tempUint6,this._tempUint5,this._tempUint7,\n\t\tthis._tempUint5,this._tempUint0,this._tempUint7,this._tempUint7,this._tempUint0,this._tempUint2,\n\t\tthis._tempUint1,this._tempUint4,this._tempUint3,this._tempUint3,this._tempUint4,this._tempUint6,\n\t\tthis._tempUint5,this._tempUint4,this._tempUint0,this._tempUint0,this._tempUint4,this._tempUint1,\n\t\tthis._tempUint2,this._tempUint3,this._tempUint7,this._tempUint7,this._tempUint3,this._tempUint6);\n\t\treturn this;\n\t}\n\n\t__proto.cone=function(radius,length,Slices,r,g,b,a){\n\t\tif (!this._hasBegun || this._primitiveType!==/*laya.webgl.WebGLContext.TRIANGLES*/0x0004)\n\t\t\tthis.drawTrianglesException();\n\t\tif (this._posInVBData+(2 *Slices+2)*this._floatSizePerVer > this._vbData.length || this._posInIBData+6 *Slices > this._ibData.length)\n\t\t\tthis.flush();\n\t\tthis._tempUint0=this._posInVBData;\n\t\tthis._tempUint1=this._posInVBData / this._floatSizePerVer;\n\t\tthis._tempNumver0=Math.PI *2 / Slices;\n\t\tthis.addVertexIndex(0,length,0,r,g,b,a,this._tempUint0);\n\t\tthis.addVertexIndex(0,0,0,r,g,b,a,this._tempUint0+this._floatSizePerVer);\n\t\tthis._tempInt0=2;\n\t\tthis._tempNumver1=0;\n\t\tfor (this._tempInt1=0;this._tempInt1 < Slices;this._tempInt1++){\n\t\t\tthis._tempNumver2=Math.cos(this._tempNumver1);\n\t\t\tthis._tempNumver3=Math.sin(this._tempNumver1);\n\t\t\tthis.addVertexIndex(radius *this._tempNumver2,0,radius *this._tempNumver3,r,g,b,a,this._tempUint0+this._tempInt0 *this._floatSizePerVer);\n\t\t\tthis.addIndexes(this._tempUint1,this._tempUint1+this._tempInt0);\n\t\t\tif (this._tempInt1==Slices-1)\n\t\t\t\tthis.addIndexes(this._tempUint1+2);\n\t\t\telse\n\t\t\tthis.addIndexes(this._tempUint1+this._tempInt0+1);\n\t\t\tthis.addVertexIndex(radius *this._tempNumver2,0,radius *this._tempNumver3,r,g,b,a,this._tempUint0+(this._tempInt0+Slices)*this._floatSizePerVer);\n\t\t\tthis.addIndexes(this._tempUint1+1);\n\t\t\tif (this._tempInt1==Slices-1)\n\t\t\t\tthis.addIndexes(this._tempUint1+Slices+2);\n\t\t\telse\n\t\t\tthis.addIndexes(this._tempUint1+this._tempInt0+Slices+1);\n\t\t\tthis.addIndexes(this._tempUint1+this._tempInt0+Slices);\n\t\t\tthis._tempInt0++;\n\t\t\tthis._tempNumver1+=this._tempNumver0;\n\t\t}\n\t\treturn this;\n\t}\n\n\t__proto.boundingBoxLine=function(minX,minY,minZ,maxX,maxY,maxZ,r,g,b,a){\n\t\tif (!this._hasBegun || this._primitiveType!==/*laya.webgl.WebGLContext.LINES*/0x0001)\n\t\t\tthis.drawLinesException();\n\t\tif (this._posInVBData+8 *this._floatSizePerVer > this._vbData.length || this._posInIBData+48 > this._ibData.length)\n\t\t\tthis.flush();\n\t\tthis._tempUint0=this._posInVBData / this._floatSizePerVer;\n\t\tthis.addVertex(minX,maxY,maxZ,r,g,b,a);\n\t\tthis.addVertex(maxX,maxY,maxZ,r,g,b,a);\n\t\tthis.addVertex(minX,minY,maxZ,r,g,b,a);\n\t\tthis.addVertex(maxX,minY,maxZ,r,g,b,a);\n\t\tthis.addVertex(maxX,maxY,minZ,r,g,b,a);\n\t\tthis.addVertex(minX,maxY,minZ,r,g,b,a);\n\t\tthis.addVertex(maxX,minY,minZ,r,g,b,a);\n\t\tthis.addVertex(minX,minY,minZ,r,g,b,a);\n\t\tthis._tempUint1=this._tempUint0+1;\n\t\tthis._tempUint2=this._tempUint0+2;\n\t\tthis._tempUint3=this._tempUint0+3;\n\t\tthis._tempUint4=this._tempUint0+4;\n\t\tthis._tempUint5=this._tempUint0+5;\n\t\tthis._tempUint6=this._tempUint0+6;\n\t\tthis._tempUint7=this._tempUint0+7;\n\t\tthis.addIndexes(this._tempUint0,this._tempUint1,this._tempUint1,this._tempUint3,this._tempUint3,this._tempUint2,this._tempUint2,this._tempUint0,\n\t\tthis._tempUint4,this._tempUint5,this._tempUint5,this._tempUint7,this._tempUint7,this._tempUint6,this._tempUint6,this._tempUint4,\n\t\tthis._tempUint5,this._tempUint0,this._tempUint0,this._tempUint2,this._tempUint2,this._tempUint7,this._tempUint7,this._tempUint5,\n\t\tthis._tempUint1,this._tempUint4,this._tempUint4,this._tempUint6,this._tempUint6,this._tempUint3,this._tempUint3,this._tempUint1,\n\t\tthis._tempUint5,this._tempUint4,this._tempUint4,this._tempUint1,this._tempUint1,this._tempUint0,this._tempUint0,this._tempUint5,\n\t\tthis._tempUint2,this._tempUint3,this._tempUint3,this._tempUint6,this._tempUint6,this._tempUint7,this._tempUint7,this._tempUint2);\n\t\treturn this;\n\t}\n\n\t__proto.addVertex=function(x,y,z,r,g,b,a){\n\t\tif (!this._hasBegun)\n\t\t\tthis.addVertexIndexException();\n\t\tthis._vbData[this._posInVBData]=x,this._vbData[this._posInVBData+1]=y,this._vbData[this._posInVBData+2]=z;\n\t\tthis._vbData[this._posInVBData+3]=r,this._vbData[this._posInVBData+4]=g,this._vbData[this._posInVBData+5]=b,this._vbData[this._posInVBData+6]=a;\n\t\tthis._posInVBData+=this._floatSizePerVer;\n\t\treturn this;\n\t}\n\n\t__proto.addVertexIndex=function(x,y,z,r,g,b,a,index){\n\t\tif (!this._hasBegun)\n\t\t\tthis.addVertexIndexException();\n\t\tthis._vbData[index]=x,this._vbData[index+1]=y,this._vbData[index+2]=z;\n\t\tthis._vbData[index+3]=r,this._vbData[index+4]=g,this._vbData[index+5]=b,this._vbData[index+6]=a;\n\t\tindex+=this._floatSizePerVer;\n\t\tif (index > this._posInVBData)\n\t\t\tthis._posInVBData=index;\n\t\treturn this;\n\t}\n\n\t__proto.addIndexes=function(__indexes){\n\t\tvar indexes=arguments;\n\t\tif (!this._hasBegun)\n\t\t\tthis.addVertexIndexException();\n\t\tfor (var i=0;i < indexes.length;i++){\n\t\t\tthis._ibData[this._posInIBData]=indexes[i];\n\t\t\tthis._posInIBData++;\n\t\t}\n\t\treturn this;\n\t}\n\n\t__proto.begin=function(primitive,camera){\n\t\tif (this._hasBegun)\n\t\t\tthis.beginException0();\n\t\tif (primitive!==/*laya.webgl.WebGLContext.LINES*/0x0001 && primitive!==/*laya.webgl.WebGLContext.TRIANGLES*/0x0004)\n\t\t\tthis.beginException1();\n\t\tthis._primitiveType=primitive;\n\t\tthis._camera=camera;\n\t\tthis._hasBegun=true;\n\t\treturn this;\n\t}\n\n\t__proto.end=function(){\n\t\tif (!this._hasBegun)\n\t\t\tthis.endException();\n\t\tthis.flush();\n\t\tthis._hasBegun=false;\n\t\treturn this;\n\t}\n\n\t__proto.flush=function(){\n\t\tif (this._posInVBData===0)\n\t\t\treturn;\n\t\tthis._ib.setData(this._ibData);\n\t\tthis._vb.setData(this._vbData);\n\t\tthis._vb._bind();\n\t\tthis._ib._bind();\n\t\tthis._shader=this._shaderCompile.withCompile(0,0,0);\n\t\tthis._shader.bind();\n\t\tthis._shader.uploadAttributes(PhasorSpriter3D._vertexDeclaration.shaderValues.data,null);\n\t\tthis._spriteShaderValue.setValue(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,(this._camera).projectionViewMatrix.elements);\n\t\tthis._shader.uploadSpriteUniforms(this._spriteShaderValue.data);\n\t\tStat.drawCall++;\n\t\tWebGL.mainContext.drawElements(this._primitiveType,this._posInIBData,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\tthis._posInIBData=0;\n\t\tthis._posInVBData=0;\n\t}\n\n\t__proto.addVertexIndexException=function(){\n\t\tthrow new Error(\"请先调用begin()函数\");\n\t}\n\n\t__proto.beginException0=function(){\n\t\tthrow new Error(\"调用begin()前请确保已成功调用end()！\");\n\t}\n\n\t__proto.beginException1=function(){\n\t\tthrow new Error(\"只支持“LINES”和“TRIANGLES”两种基元！\");\n\t}\n\n\t__proto.endException=function(){\n\t\tthrow new Error(\"调用end()前请确保已成功调用begin()！\");\n\t}\n\n\t__proto.drawLinesException=function(){\n\t\tthrow new Error(\"您必须确保在此之前已调用begin()且使用“LINES”基元！\");\n\t}\n\n\t__proto.drawTrianglesException=function(){\n\t\tthrow new Error(\"您必须确保在此之前已调用begin()且使用“TRIANGLES”基元！\");\n\t}\n\n\t__static(PhasorSpriter3D,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(28,[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),new VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1)]);}\n\t]);\n\treturn PhasorSpriter3D;\n})()\n\n\n/**\n*@private\n*<code>RenderElement</code> 类用于实现渲染物体。\n*/\n//class laya.d3.core.render.RenderElement\nvar RenderElement=(function(){\n\tfunction RenderElement(){\n\t\t/**@private */\n\t\tthis._id=0;\n\t\t/**@private 类型0为默认，2为DynamicBatch。*/\n\t\tthis._type=0;\n\t\t/**@private 排序ID。*/\n\t\tthis._mainSortID=0;\n\t\t/**@private */\n\t\tthis._render=null;\n\t\t/**@private 所属Sprite3D精灵。*/\n\t\tthis._sprite3D=null;\n\t\t/**@private 渲染所用材质。*/\n\t\tthis._material=null;\n\t\t/**@private 渲染元素。*/\n\t\tthis._renderObj=null;\n\t\t/**@private */\n\t\tthis._staticBatch=null;\n\t\t//...............临时...........................\n\t\tthis._tempBatchIndexStart=0;\n\t\t//TODO:\n\t\tthis._tempBatchIndexEnd=0;\n\t\t/**@private */\n\t\tthis._canDynamicBatch=false;\n\t\t/**当前ShaderValue。*/\n\t\tthis._shaderValue=null;\n\t\tthis._onPreRenderFunction=null;\n\t\tthis._id=++RenderElement._uniqueIDCounter;\n\t\tthis._canDynamicBatch=true;\n\t\tthis._shaderValue=new ValusArray();\n\t}\n\n\t__class(RenderElement,'laya.d3.core.render.RenderElement');\n\tvar __proto=RenderElement.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto.getDynamicBatchBakedVertexs=function(index){\n\t\tvar byteSizeInFloat=4;\n\t\tvar vb=this._renderObj._getVertexBuffer(index);\n\t\tvar bakedVertexes=vb.getData().slice();\n\t\tvar vertexDeclaration=vb.vertexDeclaration;\n\t\tvar positionOffset=vertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.POSITION0*/0).offset / byteSizeInFloat;\n\t\tvar normalOffset=vertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3).offset / byteSizeInFloat;\n\t\tvar transform=this._sprite3D.transform;\n\t\tvar worldMatrix=transform.worldMatrix;\n\t\tvar rotation=transform.rotation;\n\t\tvar vertexFloatCount=vertexDeclaration.vertexStride / byteSizeInFloat;\n\t\tfor (var i=0,n=bakedVertexes.length;i < n;i+=vertexFloatCount){\n\t\t\tvar posOffset=i+positionOffset;\n\t\t\tvar norOffset=i+normalOffset;\n\t\t\tUtils3D.transformVector3ArrayToVector3ArrayCoordinate(bakedVertexes,posOffset,worldMatrix,bakedVertexes,posOffset);\n\t\t\tUtils3D.transformVector3ArrayByQuat(bakedVertexes,norOffset,rotation,bakedVertexes,norOffset);\n\t\t}\n\t\treturn bakedVertexes;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.getBakedIndices=function(){\n\t\treturn this._renderObj._getIndexBuffer().getData();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\t(this._staticBatch)&& (this._staticBatch._manager._garbageCollection(this));\n\t}\n\n\t/**\n\t*获取唯一标识ID,通常用于识别。\n\t*/\n\t__getset(0,__proto,'id',function(){\n\t\treturn this._id;\n\t});\n\n\t__getset(0,__proto,'renderObj',function(){\n\t\treturn this._renderObj;\n\t\t},function(value){\n\t\tif (this._renderObj!==value){\n\t\t\tthis._renderObj=value;\n\t\t}\n\t});\n\n\tRenderElement._uniqueIDCounter=0;\n\treturn RenderElement;\n})()\n\n\n/**\n*@private\n*<code>RenderQuene</code> 类用于实现渲染队列。\n*/\n//class laya.d3.core.render.RenderQueue\nvar RenderQueue=(function(){\n\tfunction RenderQueue(scene){\n\t\t/**@private */\n\t\tthis._id=0;\n\t\t/**@private */\n\t\tthis._needSort=false;\n\t\t/**@private */\n\t\tthis._renderElements=null;\n\t\t/**@private */\n\t\tthis._renderableRenderObjects=null;\n\t\t/**@private */\n\t\tthis._dynamicBatchCombineRenderElements=null;\n\t\t/**@private */\n\t\tthis._finalElements=null;\n\t\t/**@private */\n\t\tthis._scene=null;\n\t\tthis._id=++RenderQueue._uniqueIDCounter;\n\t\tthis._needSort=false;\n\t\tthis._scene=scene;\n\t\tthis._renderElements=[];\n\t\tthis._renderableRenderObjects=[];\n\t\tthis._dynamicBatchCombineRenderElements=[];\n\t}\n\n\t__class(RenderQueue,'laya.d3.core.render.RenderQueue');\n\tvar __proto=RenderQueue.prototype;\n\t__proto._sortOpaqueFunc=function(a,b){\n\t\tif (a._render && b._render){\n\t\t\tvar renderQueue=a._material.renderQueue-b._material.renderQueue;\n\t\t\tif (renderQueue===0){\n\t\t\t\treturn a._render._distanceForSort-b._render._distanceForSort;\n\t\t\t\t}else {\n\t\t\t\treturn renderQueue\n\t\t\t}\n\t\t\t}else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t__proto._sortAlphaFunc=function(a,b){\n\t\tif (a._render && b._render){\n\t\t\tvar renderQueue=a._material.renderQueue-b._material.renderQueue;\n\t\t\tif (renderQueue===0){\n\t\t\t\treturn b._render._distanceForSort-a._render._distanceForSort;\n\t\t\t\t}else {\n\t\t\t\treturn renderQueue;\n\t\t\t}\n\t\t}else\n\t\treturn 0;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._begainRenderElement=function(state,renderObj,material){\n\t\tif (renderObj._beforeRender(state)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._sortAlpha=function(cameraPos){\n\t\tRenderQueue._cameraPosition=cameraPos;\n\t\tthis._finalElements.sort(this._sortAlphaFunc);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._sortOpaque=function(cameraPos){\n\t\tRenderQueue._cameraPosition=cameraPos;\n\t\tthis._finalElements.sort(this._sortOpaqueFunc);\n\t}\n\n\t/**\n\t*@private\n\t*准备渲染队列。\n\t*@param state 渲染状态。\n\t*/\n\t__proto._preRender=function(state){\n\t\tthis._finalElements=this._renderElements.concat(this._dynamicBatchCombineRenderElements);\n\t}\n\n\t/**\n\t*@private\n\t*渲染队列。\n\t*@param state 渲染状态。\n\t*/\n\t__proto._render=function(state,isTarget){\n\t\tvar loopCount=Stat.loopCount;\n\t\tvar scene=this._scene;\n\t\tvar camera=state.camera;\n\t\tvar cameraID=camera.id;\n\t\tvar vbs;\n\t\tvar vertexBuffer,vertexDeclaration,shader;\n\t\tvar forceUploadParams=false;\n\t\tvar lastStateMaterial,lastStateOwner;\n\t\tfor (var i=0,n=this._finalElements.length;i < n;i++){\n\t\t\tvar renderElement=this._finalElements[i];\n\t\t\tvar renderObj,material,owner;\n\t\t\tif (renderElement._onPreRenderFunction !=null){\n\t\t\t\trenderElement._onPreRenderFunction.call(renderElement._sprite3D,state);\n\t\t\t}\n\t\t\tif (renderElement._type===0){\n\t\t\t\tstate.owner=owner=renderElement._sprite3D;\n\t\t\t\tstate.renderElement=renderElement;\n\t\t\t\towner._preRenderUpdateComponents(state);\n\t\t\t\trenderObj=renderElement.renderObj,material=renderElement._material;\n\t\t\t\tif (this._begainRenderElement(state,renderObj,material)){\n\t\t\t\t\tvbs=renderObj._getVertexBuffers();\n\t\t\t\t\tvertexBuffer=renderObj._getVertexBuffer(0);\n\t\t\t\t\tvertexDeclaration=vertexBuffer.vertexDeclaration;\n\t\t\t\t\tshader=state._shader=material._getShader(scene._shaderDefineValue,vertexDeclaration.shaderDefineValue,owner._shaderDefineValue);\n\t\t\t\t\tforceUploadParams=shader.bind()|| (loopCount!==shader._uploadLoopCount);\n\t\t\t\t\tif (vbs){\n\t\t\t\t\t\tif (shader._uploadVertexBuffer!==vbs || forceUploadParams){\n\t\t\t\t\t\t\tfor (var j=0;j < vbs.length;j++){\n\t\t\t\t\t\t\t\tvar vb=vbs[j];\n\t\t\t\t\t\t\t\tshader.uploadAttributesX(vb.vertexDeclaration.shaderValues.data,vb);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tshader._uploadVertexBuffer=vbs;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tif (shader._uploadVertexBuffer!==vertexBuffer || forceUploadParams){\n\t\t\t\t\t\t\tshader.uploadAttributes(vertexDeclaration.shaderValues.data,null);\n\t\t\t\t\t\t\tshader._uploadVertexBuffer=vertexBuffer;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (shader._uploadScene!==scene || forceUploadParams){\n\t\t\t\t\t\tshader.uploadSceneUniforms(scene._shaderValues.data);\n\t\t\t\t\t\tshader._uploadScene=scene;\n\t\t\t\t\t}\n\t\t\t\t\tif (camera!==shader._uploadCamera || shader._uploadSprite3D!==owner || forceUploadParams){\n\t\t\t\t\t\tshader.uploadSpriteUniforms(owner._shaderValues.data);\n\t\t\t\t\t\tshader._uploadSprite3D=owner;\n\t\t\t\t\t}\n\t\t\t\t\tif (camera!==shader._uploadCamera || forceUploadParams){\n\t\t\t\t\t\tshader.uploadCameraUniforms(camera._shaderValues.data);\n\t\t\t\t\t\tshader._uploadCamera=camera;\n\t\t\t\t\t}\n\t\t\t\t\tif (shader._uploadMaterial!==material || forceUploadParams){\n\t\t\t\t\t\tmaterial._upload();\n\t\t\t\t\t\tshader._uploadMaterial=material;\n\t\t\t\t\t}\n\t\t\t\t\tif (lastStateMaterial!==material){\n\t\t\t\t\t\tmaterial._setRenderStateBlendDepth();\n\t\t\t\t\t\tmaterial._setRenderStateFrontFace(isTarget,owner.transform);\n\t\t\t\t\t\tlastStateMaterial=material;\n\t\t\t\t\t\tlastStateOwner=owner;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tif (lastStateOwner!==owner){\n\t\t\t\t\t\t\tmaterial._setRenderStateFrontFace(isTarget,owner.transform);\n\t\t\t\t\t\t\tlastStateOwner=owner;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trenderObj._render(state);\n\t\t\t\t\tshader._uploadLoopCount=loopCount;\n\t\t\t\t}\n\t\t\t\towner._postRenderUpdateComponents(state);\n\t\t\t\t}else if (renderElement._type===2){\n\t\t\t\tvar dynamicBatch=renderElement.renderObj;\n\t\t\t\tstate.owner=owner=renderElement._sprite3D;\n\t\t\t\tstate.renderElement=renderElement;\n\t\t\t\tstate._batchIndexStart=renderElement._tempBatchIndexStart;\n\t\t\t\tstate._batchIndexEnd=renderElement._tempBatchIndexEnd;\n\t\t\t\trenderObj=renderElement.renderObj,material=renderElement._material;\n\t\t\t\tif (this._begainRenderElement(state,renderObj,material)){\n\t\t\t\t\tvertexBuffer=renderObj._getVertexBuffer(0);\n\t\t\t\t\tvertexDeclaration=vertexBuffer.vertexDeclaration;\n\t\t\t\t\tshader=state._shader=material._getShader(scene._shaderDefineValue,vertexDeclaration.shaderDefineValue,owner._shaderDefineValue);\n\t\t\t\t\tforceUploadParams=shader.bind()|| (loopCount!==shader._uploadLoopCount);\n\t\t\t\t\tif (shader._uploadVertexBuffer!==vertexBuffer || forceUploadParams){\n\t\t\t\t\t\tshader.uploadAttributes(vertexDeclaration.shaderValues.data,null);\n\t\t\t\t\t\tshader._uploadVertexBuffer=vertexBuffer;\n\t\t\t\t\t}\n\t\t\t\t\tif (shader._uploadScene!==scene || forceUploadParams){\n\t\t\t\t\t\tshader.uploadSceneUniforms(scene._shaderValues.data);\n\t\t\t\t\t\tshader._uploadScene=scene;\n\t\t\t\t\t}\n\t\t\t\t\tif (camera!==shader._uploadCamera || shader._uploadSprite3D!==owner || forceUploadParams){\n\t\t\t\t\t\tshader.uploadSpriteUniforms(owner._shaderValues.data);\n\t\t\t\t\t\tshader._uploadSprite3D=owner;\n\t\t\t\t\t}\n\t\t\t\t\tif (camera!==shader._uploadCamera || forceUploadParams){\n\t\t\t\t\t\tshader.uploadCameraUniforms(camera._shaderValues.data);\n\t\t\t\t\t\tshader._uploadCamera=camera;\n\t\t\t\t\t}\n\t\t\t\t\tif (shader._uploadMaterial!==material || forceUploadParams){\n\t\t\t\t\t\tmaterial._upload();\n\t\t\t\t\t\tshader._uploadMaterial=material;\n\t\t\t\t\t}\n\t\t\t\t\tif (lastStateMaterial!==material){\n\t\t\t\t\t\tmaterial._setRenderStateBlendDepth();\n\t\t\t\t\t\tmaterial._setRenderStateFrontFace(isTarget,owner.transform);\n\t\t\t\t\t\tlastStateMaterial=material;\n\t\t\t\t\t\tlastStateOwner=owner;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tif (lastStateOwner!==owner){\n\t\t\t\t\t\t\tmaterial._setRenderStateFrontFace(isTarget,owner.transform);\n\t\t\t\t\t\t\tlastStateOwner=owner;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trenderObj._render(state);\n\t\t\t\t\tshader._uploadLoopCount=loopCount;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*渲染队列。\n\t*@param state 渲染状态。\n\t*/\n\t__proto._renderShadow=function(state,isOnePSSM){\n\t\tvar loopCount=Stat.loopCount;\n\t\tvar scene=this._scene;\n\t\tvar camera=state.camera;\n\t\tvar vertexBuffer,vertexDeclaration,shader;\n\t\tvar forceUploadParams=false;\n\t\tvar lastStateMaterial,lastStateOwner;\n\t\tfor (var i=0,n=this._finalElements.length;i < n;i++){\n\t\t\tvar renderElement=this._finalElements[i];\n\t\t\tvar renderObj,material,owner;\n\t\t\tif (renderElement._type===0){\n\t\t\t\tstate.owner=owner=renderElement._sprite3D;\n\t\t\t\tif (!isOnePSSM && (owner._projectionViewWorldUpdateCamera!==camera || owner._projectionViewWorldUpdateLoopCount!==Stat.loopCount)){\n\t\t\t\t\towner._render._renderUpdate(state._projectionViewMatrix);\n\t\t\t\t\towner._projectionViewWorldUpdateLoopCount=Stat.loopCount;\n\t\t\t\t\towner._projectionViewWorldUpdateCamera=camera;\n\t\t\t\t}\n\t\t\t\tstate.renderElement=renderElement;\n\t\t\t\towner._preRenderUpdateComponents(state);\n\t\t\t\trenderObj=renderElement.renderObj,material=renderElement._material;\n\t\t\t\tif (this._begainRenderElement(state,renderObj,null)){\n\t\t\t\t\tvertexBuffer=renderObj._getVertexBuffer(0);\n\t\t\t\t\tvertexDeclaration=vertexBuffer.vertexDeclaration;\n\t\t\t\t\tshader=state._shader=material._getShader(scene._shaderDefineValue,vertexDeclaration.shaderDefineValue,owner._shaderDefineValue);\n\t\t\t\t\tforceUploadParams=shader.bind()|| (loopCount!==shader._uploadLoopCount);\n\t\t\t\t\tif (shader._uploadVertexBuffer!==vertexBuffer || forceUploadParams){\n\t\t\t\t\t\tshader.uploadAttributes(vertexDeclaration.shaderValues.data,null);\n\t\t\t\t\t\tshader._uploadVertexBuffer=vertexBuffer;\n\t\t\t\t\t}\n\t\t\t\t\tif (camera!==shader._uploadCamera || shader._uploadSprite3D!==owner || forceUploadParams){\n\t\t\t\t\t\tshader.uploadSpriteUniforms(owner._shaderValues.data);\n\t\t\t\t\t\tshader._uploadSprite3D=owner;\n\t\t\t\t\t}\n\t\t\t\t\tif (camera!==shader._uploadCamera || forceUploadParams){\n\t\t\t\t\t\tshader.uploadCameraUniforms(camera._shaderValues.data);\n\t\t\t\t\t\tshader._uploadCamera=camera;\n\t\t\t\t\t}\n\t\t\t\t\tif (shader._uploadMaterial!==material || forceUploadParams){\n\t\t\t\t\t\tmaterial._upload();\n\t\t\t\t\t\tshader._uploadMaterial=material;\n\t\t\t\t\t}\n\t\t\t\t\tif (shader._uploadRenderElement!==renderElement || forceUploadParams){}\n\t\t\t\t\t\tif (lastStateMaterial!==material){\n\t\t\t\t\t\tmaterial._setRenderStateFrontFace(false,owner.transform);\n\t\t\t\t\t\tlastStateMaterial=material;\n\t\t\t\t\t\tlastStateOwner=owner;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tif (lastStateOwner!==owner){\n\t\t\t\t\t\t\tmaterial._setRenderStateFrontFace(false,owner.transform);\n\t\t\t\t\t\t\tlastStateOwner=owner;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trenderObj._render(state);\n\t\t\t\t\tshader._uploadLoopCount=loopCount;\n\t\t\t\t}\n\t\t\t\towner._postRenderUpdateComponents(state);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*清空队列中的渲染物体。\n\t*/\n\t__proto._clearRenderElements=function(){\n\t\tthis._dynamicBatchCombineRenderElements.length=0;\n\t\tthis._renderElements.length=0;\n\t\tthis._needSort=true;\n\t}\n\n\t/**\n\t*添加渲染物体。\n\t*@param renderObj 渲染物体。\n\t*/\n\t__proto._addRenderElement=function(renderElement){\n\t\tthis._renderElements.push(renderElement);\n\t\tthis._needSort=true;\n\t}\n\n\t/**\n\t*添加动态批处理。\n\t*@param renderObj 动态批处理。\n\t*/\n\t__proto._addDynamicBatchElement=function(dynamicBatchElement){\n\t\tthis._dynamicBatchCombineRenderElements.push(dynamicBatchElement);\n\t}\n\n\t/**\n\t*获取唯一标识ID(通常用于优化或识别)。\n\t*/\n\t__getset(0,__proto,'id',function(){\n\t\treturn this._id;\n\t});\n\n\tRenderQueue._uniqueIDCounter=0;\n\tRenderQueue._cameraPosition=null;\n\treturn RenderQueue;\n})()\n\n\n/**\n*<code>RenderState</code> 类用于实现渲染状态。\n*/\n//class laya.d3.core.render.RenderState\nvar RenderState=(function(){\n\tfunction RenderState(){\n\t\t/**@private */\n\t\tthis._staticBatch=null;\n\t\t/**@private */\n\t\tthis._batchIndexStart=0;\n\t\t/**@private */\n\t\tthis._batchIndexEnd=0;\n\t\t/**@private */\n\t\tthis._viewMatrix=null;\n\t\t/**@private */\n\t\tthis._projectionMatrix=null;\n\t\t/**@private */\n\t\tthis._projectionViewMatrix=null;\n\t\t/**@private */\n\t\tthis._viewport=null;\n\t\t/**@private */\n\t\tthis._shader=null;\n\t\t/**距上一帧间隔时间。*/\n\t\tthis.elapsedTime=NaN;\n\t\t/**当前场景。*/\n\t\tthis.scene=null;\n\t\t/**当前渲染3D精灵。*/\n\t\tthis.owner=null;\n\t\t/**当前渲染物体。*/\n\t\tthis.renderElement=null;\n\t\t/**当前摄像机。*/\n\t\tthis.camera=null;\n\t}\n\n\t__class(RenderState,'laya.d3.core.render.RenderState');\n\tRenderState.clientWidth=0;\n\tRenderState.clientHeight=0;\n\treturn RenderState;\n})()\n\n\n//class laya.d3.core.scene.OctreeNode\nvar OctreeNode=(function(){\n\tfunction OctreeNode(scene,currentDepth){\n\t\tthis._exactBox=null;\n\t\tthis._relaxBox=null;\n\t\tthis._scene=null;\n\t\tthis._parent=null;\n\t\tthis._currentDepth=0;\n\t\tthis._boundingSphere=new BoundSphere(new Vector3(),0);\n\t\tthis._corners=/*new vector.<>*/[new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3()];\n\t\tthis._boundingBoxCenter=new Vector3();\n\t\tthis._children=__newvec(8);\n\t\tthis._objects=[];\n\t\tthis._tempBoundBoxCorners=/*new vector.<>*/[new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3()];\n\t\tthis._scene=scene;\n\t\tthis._currentDepth=currentDepth;\n\t}\n\n\t__class(OctreeNode,'laya.d3.core.scene.OctreeNode');\n\tvar __proto=OctreeNode.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.scene.ITreeNode\":true})\n\t__proto.init=function(center,treeSize){\n\t\tvar min=new Vector3();\n\t\tvar max=new Vector3();\n\t\tVector3.scale(treeSize,-0.5,min);\n\t\tVector3.scale(treeSize,0.5,max);\n\t\tVector3.add(min,center,min);\n\t\tVector3.add(max,center,max);\n\t\tthis.exactBox=new BoundBox(min,max);\n\t\tthis.relaxBox=new BoundBox(min,max);\n\t}\n\n\t__proto.addTreeNode=function(render){\n\t\tif (Collision.boxContainsBox(this._relaxBox,render.boundingBox)===/*laya.d3.math.ContainmentType.Contains*/1)\n\t\t\tthis.addNodeDown(render,0);\n\t\telse\n\t\tthis.addObject(render);\n\t}\n\n\t__proto.addChild=function(index){\n\t\tvar child=this._children[index];\n\t\tif (child==null){\n\t\t\tchild=new OctreeNode(this._scene,this._currentDepth+1);\n\t\t\tthis._children[index]=child;\n\t\t\tchild._parent=this;\n\t\t\tVector3.subtract(this._exactBox.max,this._exactBox.min,OctreeNode.tempSize);\n\t\t\tVector3.multiply(OctreeNode.tempSize,OctreeNode._octreeSplit[index],OctreeNode.tempCenter);\n\t\t\tVector3.add(this._exactBox.min,OctreeNode.tempCenter,OctreeNode.tempCenter);\n\t\t\tVector3.scale(OctreeNode.tempSize,0.25,OctreeNode.tempSize);\n\t\t\tvar min=new Vector3();\n\t\t\tvar max=new Vector3();\n\t\t\tVector3.subtract(OctreeNode.tempCenter,OctreeNode.tempSize,min);\n\t\t\tVector3.add(OctreeNode.tempCenter,OctreeNode.tempSize,max);\n\t\t\tchild.exactBox=new BoundBox(min,max);\n\t\t\tVector3.scale(OctreeNode.tempSize,OctreeNode.relax,OctreeNode.tempSize);\n\t\t\tvar relaxMin=new Vector3();\n\t\t\tvar relaxMax=new Vector3();\n\t\t\tVector3.subtract(OctreeNode.tempCenter,OctreeNode.tempSize,relaxMin);\n\t\t\tVector3.add(OctreeNode.tempCenter,OctreeNode.tempSize,relaxMax);\n\t\t\tchild.relaxBox=new BoundBox(relaxMin,relaxMax);\n\t\t}\n\t\treturn child;\n\t}\n\n\t__proto.addObject=function(object){\n\t\tobject._treeNode=this;\n\t\tthis._objects.push(object);\n\t}\n\n\t__proto.removeObject=function(object){\n\t\tif (object._treeNode !=this){\n\t\t\tconsole.log(\"OctreeNode::removeObject error\");\n\t\t\treturn false;\n\t\t};\n\t\tvar index=this._objects.indexOf(object);\n\t\tif (index!==-1){\n\t\t\tthis._objects.splice(index,1);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t__proto.clearObject=function(){\n\t\tthis._objects.length=0;\n\t}\n\n\t__proto.addNodeUp=function(render,depth){\n\t\tif (this._parent && (Collision.boxContainsBox(this._exactBox,render.boundingBox)!==/*laya.d3.math.ContainmentType.Contains*/1)){\n\t\t\tthis._parent.addNodeUp(render,depth-1);\n\t\t}else\n\t\tthis.addNodeDown(render,depth);\n\t}\n\n\t__proto.addNodeDown=function(render,depth){\n\t\tif (depth < this._scene.treeLevel){\n\t\t\tvar childIndex=this.inChildIndex(render.boundingBoxCenter);\n\t\t\tvar child=this.addChild(childIndex);\n\t\t\tif (Collision.boxContainsBox(child._relaxBox,render.boundingBox)===/*laya.d3.math.ContainmentType.Contains*/1){\n\t\t\t\tchild.addNodeDown(render,++depth);\n\t\t\t}else\n\t\t\tthis.addObject(render);\n\t\t\t}else {\n\t\t\tthis.addObject(render);\n\t\t}\n\t}\n\n\t__proto.inChildIndex=function(objectCenter){\n\t\tvar z=objectCenter.z < this._boundingBoxCenter.z ? 0 :1;\n\t\tvar y=objectCenter.y < this._boundingBoxCenter.y ? 0 :1;\n\t\tvar x=objectCenter.x < this._boundingBoxCenter.x ? 0 :1;\n\t\treturn z *4+y *2+x;\n\t}\n\n\t__proto.updateObject=function(render){\n\t\tif (Collision.boxContainsBox(this._relaxBox,render.boundingBox)===/*laya.d3.math.ContainmentType.Contains*/1){\n\t\t\tthis.removeObject(render);\n\t\t\trender._treeNode=null;\n\t\t\tthis.addNodeDown(render,this._currentDepth);\n\t\t\t}else if (this._parent){\n\t\t\tthis.removeObject(render);\n\t\t\trender._treeNode=null;\n\t\t\tthis._parent.addNodeUp(render,this._currentDepth-1);\n\t\t}\n\t}\n\n\t__proto.cullingObjects=function(boundFrustum,testVisible,flags,cameraPosition,projectionView){\n\t\tvar i=0,j=0,n=0,m=0;\n\t\tvar dynamicBatchManager=this._scene._dynamicBatchManager;\n\t\tfor (i=0,n=this._objects.length;i < n;i++){\n\t\t\tvar render=this._objects[i];\n\t\t\tif (Layer.isVisible(render._owner.layer.mask)&& render.enable){\n\t\t\t\tif (testVisible){\n\t\t\t\t\tStat.treeSpriteCollision+=1;\n\t\t\t\t\tif (boundFrustum.containsBoundSphere(render.boundingSphere)===/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\trender._renderUpdate(projectionView);\n\t\t\t\trender._distanceForSort=Vector3.distance(render.boundingSphere.center,cameraPosition)+render.sortingFudge;\n\t\t\t\tvar renderElements=render._renderElements;\n\t\t\t\tfor (j=0,m=renderElements.length;j < m;j++){\n\t\t\t\t\tvar renderElement=renderElements[j];\n\t\t\t\t\tvar staticBatch=renderElement._staticBatch;\n\t\t\t\t\tif (staticBatch && (staticBatch._material===renderElement._material)){\n\t\t\t\t\t\tstaticBatch._addBatchRenderElement(renderElement);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvar renderObj=renderElement.renderObj;\n\t\t\t\t\t\tif ((renderObj.triangleCount < /*laya.d3.graphics.DynamicBatch.maxCombineTriangleCount*/10)&& (renderObj._vertexBufferCount===1)&& (renderObj._getIndexBuffer())&& (renderElement._material.renderQueue < 2)&& renderElement._canDynamicBatch && (!render._owner.isStatic))\n\t\t\t\t\t\t\tdynamicBatchManager._addPrepareRenderElement(renderElement);\n\t\t\t\t\t\telse\n\t\t\t\t\t\tthis._scene.getRenderQueue(renderElement._material.renderQueue)._addRenderElement(renderElement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < 8;i++){\n\t\t\tvar child=this._children[i];\n\t\t\tif (child==null)\n\t\t\t\tcontinue ;\n\t\t\tvar testVisibleChild=testVisible;\n\t\t\tif (testVisible){\n\t\t\t\tvar type=boundFrustum.containsBoundBox(child._relaxBox);\n\t\t\t\tStat.treeNodeCollision+=1;\n\t\t\t\tif (type===/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\t\t\tcontinue ;\n\t\t\t\ttestVisibleChild=(type===/*laya.d3.math.ContainmentType.Intersects*/2);\n\t\t\t}\n\t\t\tchild.cullingObjects(boundFrustum,testVisibleChild,flags,cameraPosition,projectionView);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.cullingShadowObjects=function(lightBoundFrustum,splitShadowQueues,testVisible,flags,scene){\n\t\tvar i=0,j=0,n=0,m=0;\n\t\tvar dynamicBatchManager=this._scene._dynamicBatchManager;\n\t\tfor (i=0,n=this._objects.length;i < n;i++){\n\t\t\tvar baseRender=this._objects[i];\n\t\t\tif (baseRender.castShadow && Layer.isVisible(baseRender._owner.layer.mask)&& baseRender.enable){\n\t\t\t\tif (testVisible && lightBoundFrustum[0].containsBoundSphere(baseRender.boundingSphere)===/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\t\t\tcontinue ;\n\t\t\t\tfor (var k=1,kNum=lightBoundFrustum.length;k < kNum;k++){\n\t\t\t\t\tvar shadowQueue=splitShadowQueues[k-1];\n\t\t\t\t\tif (lightBoundFrustum[k].containsBoundSphere(baseRender.boundingSphere)!==/*laya.d3.math.ContainmentType.Disjoint*/0){\n\t\t\t\t\t\tvar renderElements=baseRender._renderElements;\n\t\t\t\t\t\tfor (j=0,m=renderElements.length;j < m;j++)\n\t\t\t\t\t\tshadowQueue._addRenderElement(renderElements[j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < 8;i++){\n\t\t\tvar child=this._children[i];\n\t\t\tif (child==null)\n\t\t\t\tcontinue ;\n\t\t\tvar testVisibleChild=testVisible;\n\t\t\tif (testVisible){\n\t\t\t\tvar type=lightBoundFrustum[0].containsBoundBox(child._relaxBox);\n\t\t\t\tif (type===/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\t\t\tcontinue ;\n\t\t\t\ttestVisibleChild=(type===/*laya.d3.math.ContainmentType.Intersects*/2);\n\t\t\t}\n\t\t\tchild.cullingShadowObjects(lightBoundFrustum,splitShadowQueues,testVisibleChild,flags,scene);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.cullingShadowObjectsOnePSSM=function(lightBoundFrustum,splitShadowQueues,lightViewProjectMatrix,testVisible,flags,scene){\n\t\tvar shadowQueue=splitShadowQueues[0];\n\t\tvar i=0,j=0,n=0,m=0;\n\t\tfor (i=0,n=this._objects.length;i < n;i++){\n\t\t\tvar baseRender=this._objects[i];\n\t\t\tif (baseRender.castShadow && Layer.isVisible(baseRender._owner.layer.mask)&& baseRender.enable){\n\t\t\t\tif (testVisible && lightBoundFrustum.containsBoundSphere(baseRender.boundingSphere)===/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\t\t\tcontinue ;\n\t\t\t\tbaseRender._renderUpdate(lightViewProjectMatrix);\n\t\t\t\tvar renderElements=baseRender._renderElements;\n\t\t\t\tfor (j=0,m=renderElements.length;j < m;j++)\n\t\t\t\tshadowQueue._addRenderElement(renderElements[j]);\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < 8;i++){\n\t\t\tvar child=this._children[i];\n\t\t\tif (child==null)\n\t\t\t\tcontinue ;\n\t\t\tvar testVisibleChild=testVisible;\n\t\t\tif (testVisible){\n\t\t\t\tvar type=lightBoundFrustum.containsBoundBox(child._relaxBox);\n\t\t\t\tif (type===/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\t\t\tcontinue ;\n\t\t\t\ttestVisibleChild=(type===/*laya.d3.math.ContainmentType.Intersects*/2);\n\t\t\t}\n\t\t\tchild.cullingShadowObjectsOnePSSM(lightBoundFrustum,splitShadowQueues,lightViewProjectMatrix,testVisibleChild,flags,scene);\n\t\t}\n\t}\n\n\t__proto.renderBoudingBox=function(linePhasor){\n\t\tthis._renderBoudingBox(linePhasor);\n\t\tfor (var i=0;i < 8;++i){\n\t\t\tvar pChild=this._children[i];\n\t\t\tif (pChild){\n\t\t\t\tpChild.renderBoudingBox(linePhasor);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.buildAllChild=function(depth){\n\t\tif (depth < this._scene.treeLevel){\n\t\t\tfor (var i=0;i < 8;i++){\n\t\t\t\tvar child=this.addChild(i);\n\t\t\t\tchild.buildAllChild(depth+1);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._renderBoudingBox=function(linePhasor){}\n\t__getset(0,__proto,'exactBox',function(){\n\t\treturn this._exactBox;\n\t\t},function(value){\n\t\tthis._exactBox=value;\n\t\tVector3.add(value.min,value.max,this._boundingBoxCenter);\n\t\tVector3.scale(this._boundingBoxCenter,0.5,this._boundingBoxCenter);\n\t});\n\n\t__getset(0,__proto,'relaxBox',function(){\n\t\treturn this._relaxBox;\n\t\t},function(value){\n\t\tthis._relaxBox=value;\n\t\tvalue.getCorners(this._corners);\n\t\tBoundSphere.createfromPoints(this._corners,this._boundingSphere);\n\t});\n\n\tOctreeNode.debugMode=false;\n\tOctreeNode.relax=1.15;\n\tOctreeNode.CHILDNUM=8;\n\t__static(OctreeNode,\n\t['tempVector0',function(){return this.tempVector0=new Vector3();},'tempSize',function(){return this.tempSize=new Vector3();},'tempCenter',function(){return this.tempCenter=new Vector3();},'_octreeSplit',function(){return this._octreeSplit=[new Vector3(0.250,0.250,0.250),new Vector3(0.750,0.250,0.250),new Vector3(0.250,0.750,0.250),new Vector3(0.750,0.750,0.250),new Vector3(0.250,0.250,0.750),new Vector3(0.750,0.250,0.750),new Vector3(0.250,0.750,0.750),new Vector3(0.750,0.750,0.750)];}\n\t]);\n\treturn OctreeNode;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.scene.SceneManager\nvar SceneManager=(function(){\n\tfunction SceneManager(){}\n\t__class(SceneManager,'laya.d3.core.scene.SceneManager');\n\treturn SceneManager;\n})()\n\n\n//class laya.d3.core.trail.module.Color\nvar Color$1=(function(){\n\tfunction Color(r,g,b,a){\n\t\tthis._r=NaN;\n\t\tthis._g=NaN;\n\t\tthis._b=NaN;\n\t\tthis._a=NaN;\n\t\t(r===void 0)&& (r=1);\n\t\t(g===void 0)&& (g=1);\n\t\t(b===void 0)&& (b=1);\n\t\t(a===void 0)&& (a=1);\n\t\tthis._r=r;\n\t\tthis._g=g;\n\t\tthis._b=b;\n\t\tthis._a=a;\n\t}\n\n\t__class(Color,'laya.d3.core.trail.module.Color',null,'Color$1');\n\tvar __proto=Color.prototype;\n\t__proto.cloneTo=function(destObject){\n\t\tdestObject._r=this._r;\n\t\tdestObject._g=this._g;\n\t\tdestObject._b=this._b;\n\t\tdestObject._a=this._a;\n\t}\n\n\t__static(Color,\n\t['RED',function(){return this.RED=new Color(1,0,0,1);},'GREEN',function(){return this.GREEN=new Color(0,1,0,1);},'BLUE',function(){return this.BLUE=new Color(0,0,1,1);},'CYAN',function(){return this.CYAN=new Color(0,1,1,1);},'YELLOW',function(){return this.YELLOW=new Color(1,0.92,0.016,1);},'MAGENTA',function(){return this.MAGENTA=new Color(1,0,1,1);},'GRAY',function(){return this.GRAY=new Color(0.5,0.5,0.5,1);},'WHITE',function(){return this.WHITE=new Color(1,1,1,1);},'BLACK',function(){return this.BLACK=new Color(0,0,0,1);}\n\t]);\n\treturn Color;\n})()\n\n\n//class laya.d3.core.trail.module.Gradient\nvar Gradient=(function(){\n\tfunction Gradient(){\n\t\t/**\n\t\t*梯度模式\n\t\t*/\n\t\tthis._mode=0;\n\t\t/**\n\t\t*颜色值关键帧数据,最大长度为10\n\t\t*/\n\t\tthis._colorKeys=null;\n\t\t/**\n\t\t*透明度关键帧数据,最大长度为10\n\t\t*/\n\t\tthis._alphaKeys=null;\n\t\tthis.index=0;\n\t\tthis._colorKeyData=new Float32Array(40);\n\t\tthis._alphaKeyData=new Float32Array(20);\n\t\tthis._colorKeys=[];\n\t\tthis._alphaKeys=[];\n\t}\n\n\t__class(Gradient,'laya.d3.core.trail.module.Gradient');\n\tvar __proto=Gradient.prototype;\n\t/**\n\t*设置渐变，使用一组颜色关键帧数据和透明度关键帧数据。\n\t*@param colorKeys 渐变的颜色值关键帧数据(最大长度为10)。\n\t*@param alphaKeys 渐变的透明度关键帧数据(最大长度为10)。\n\t*/\n\t__proto.setKeys=function(colorKeys,alphaKeys){\n\t\tthis._colorKeys=colorKeys;\n\t\tthis.index=0;\n\t\tvar gradientColorKey;\n\t\tfor (var i=0;i < colorKeys.length;i++){\n\t\t\tgradientColorKey=colorKeys[i];\n\t\t\tvar color=gradientColorKey.color;\n\t\t\tthis._colorKeyData[this.index++]=color._r;\n\t\t\tthis._colorKeyData[this.index++]=color._g;\n\t\t\tthis._colorKeyData[this.index++]=color._b;\n\t\t\tthis._colorKeyData[this.index++]=gradientColorKey.time;\n\t\t}\n\t\tthis._alphaKeys=alphaKeys;\n\t\tthis.index=0;\n\t\tvar gradientAlphaKey;\n\t\tfor (var j=0;j < alphaKeys.length;j++){\n\t\t\tgradientAlphaKey=alphaKeys[j];\n\t\t\tthis._alphaKeyData[this.index++]=gradientAlphaKey.alpha;\n\t\t\tthis._alphaKeyData[this.index++]=gradientAlphaKey.time;\n\t\t}\n\t}\n\n\t__proto.cloneTo=function(destObject){\n\t\tvar i=0,j=0;\n\t\tvar cks=this.colorKeys;\n\t\tvar _cks=[];\n\t\tfor (i=0,j=cks.length;i < j;i++){\n\t\t\tvar _ck=new GradientColorKey();\n\t\t\tcks[i].cloneTo(_ck);\n\t\t\t_cks.push(_ck);\n\t\t};\n\t\tvar aks=this.alphaKeys;\n\t\tvar _aks=[];\n\t\tfor (i=0,j=aks.length;i < j;i++){\n\t\t\tvar _ak=new GradientAlphaKey();\n\t\t\taks[i].cloneTo(_ak);\n\t\t\t_aks.push(_ak);\n\t\t}\n\t\tdestObject.setKeys(_cks,_aks);\n\t}\n\n\t/**\n\t*设置梯度模式。\n\t*@param value 梯度模式。\n\t*/\n\t/**\n\t*获取梯度模式。\n\t*@return 梯度模式。\n\t*/\n\t__getset(0,__proto,'mode',function(){\n\t\treturn this._mode;\n\t\t},function(value){\n\t\tthis._mode=value;\n\t});\n\n\t/**\n\t*设置颜色值关键帧数据\n\t*/\n\t/**\n\t*获取颜色值关键帧数据\n\t*/\n\t__getset(0,__proto,'colorKeys',function(){\n\t\treturn this._colorKeys;\n\t\t},function(values){\n\t\tthis._colorKeys=values;\n\t\tthis.index=0;\n\t\tfor (var i=0;i < values.length;i++){\n\t\t\tvar value=values[i];\n\t\t\tvar color=value.color;\n\t\t\tthis._colorKeyData[this.index++]=color._r;\n\t\t\tthis._colorKeyData[this.index++]=color._g;\n\t\t\tthis._colorKeyData[this.index++]=color._b;\n\t\t\tthis._colorKeyData[this.index++]=value.time;\n\t\t}\n\t});\n\n\t/**\n\t*设置透明度关键帧数据\n\t*/\n\t/**\n\t*获取透明度关键帧数据\n\t*/\n\t__getset(0,__proto,'alphaKeys',function(){\n\t\treturn this._alphaKeys;\n\t\t},function(values){\n\t\tthis._alphaKeys=values;\n\t\tthis.index=0;\n\t\tfor (var i=0;i < values.length;i++){\n\t\t\tvar value=values[i];\n\t\t\tthis._alphaKeyData[this.index++]=value.alpha;\n\t\t\tthis._alphaKeyData[this.index++]=value.time;\n\t\t}\n\t});\n\n\treturn Gradient;\n})()\n\n\n//class laya.d3.core.trail.module.GradientAlphaKey\nvar GradientAlphaKey=(function(){\n\tfunction GradientAlphaKey(alpha,time){\n\t\tthis._alpha=NaN;\n\t\tthis._time=NaN;\n\t\t(alpha===void 0)&& (alpha=0);\n\t\t(time===void 0)&& (time=0);\n\t\tthis._alpha=alpha;\n\t\tthis._time=time;\n\t}\n\n\t__class(GradientAlphaKey,'laya.d3.core.trail.module.GradientAlphaKey');\n\tvar __proto=GradientAlphaKey.prototype;\n\t__proto.cloneTo=function(destObject){\n\t\tdestObject.alpha=this.alpha;\n\t\tdestObject.time=this.time;\n\t}\n\n\t/**\n\t*设置透明度。\n\t*@param value 透明度。\n\t*/\n\t/**\n\t*获取透明度。\n\t*@return 透明度。\n\t*/\n\t__getset(0,__proto,'alpha',function(){\n\t\treturn this._alpha;\n\t\t},function(value){\n\t\tthis._alpha=value;\n\t});\n\n\t/**\n\t*设置时间。\n\t*@param value 时间。\n\t*/\n\t/**\n\t*获取时间。\n\t*@return 时间。\n\t*/\n\t__getset(0,__proto,'time',function(){\n\t\treturn this._time;\n\t\t},function(value){\n\t\tthis._time=value;\n\t});\n\n\treturn GradientAlphaKey;\n})()\n\n\n//class laya.d3.core.trail.module.GradientColorKey\nvar GradientColorKey=(function(){\n\tfunction GradientColorKey(color,time){\n\t\tthis._color=null;\n\t\tthis._time=NaN;\n\t\t(time===void 0)&& (time=0);\n\t\tthis._color=color||new Color$1();\n\t\tthis._time=time;\n\t}\n\n\t__class(GradientColorKey,'laya.d3.core.trail.module.GradientColorKey');\n\tvar __proto=GradientColorKey.prototype;\n\t__proto.cloneTo=function(destObject){\n\t\tthis.color.cloneTo(destObject.color);\n\t\tdestObject.time=this.time;\n\t}\n\n\t/**\n\t*设置颜色值。\n\t*@param value 颜色值。\n\t*/\n\t/**\n\t*获取颜色值。\n\t*@return 颜色值。\n\t*/\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t\t},function(value){\n\t\tthis._color=value;\n\t});\n\n\t/**\n\t*设置时间。\n\t*@param value 时间。\n\t*/\n\t/**\n\t*获取时间。\n\t*@return 时间。\n\t*/\n\t__getset(0,__proto,'time',function(){\n\t\treturn this._time;\n\t\t},function(value){\n\t\tthis._time=value;\n\t});\n\n\treturn GradientColorKey;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.trail.module.GradientMode\nvar GradientMode=(function(){\n\tfunction GradientMode(){}\n\t__class(GradientMode,'laya.d3.core.trail.module.GradientMode');\n\tGradientMode.Blend=0;\n\tGradientMode.Fixed=1;\n\treturn GradientMode;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.trail.module.TextureMode\nvar TextureMode=(function(){\n\tfunction TextureMode(){}\n\t__class(TextureMode,'laya.d3.core.trail.module.TextureMode');\n\tTextureMode.Stretch=0;\n\tTextureMode.Tile=1;\n\treturn TextureMode;\n})()\n\n\n//class laya.d3.core.trail.module.TrailKeyFrame\nvar TrailKeyFrame=(function(){\n\tfunction TrailKeyFrame(){\n\t\tthis.time=NaN;\n\t\tthis.inTangent=NaN;\n\t\tthis.outTangent=NaN;\n\t\tthis.value=NaN;\n\t}\n\n\t__class(TrailKeyFrame,'laya.d3.core.trail.module.TrailKeyFrame');\n\tvar __proto=TrailKeyFrame.prototype;\n\t__proto.cloneTo=function(destObject){\n\t\tdestObject.time=this.time;\n\t\tdestObject.inTangent=this.inTangent;\n\t\tdestObject.outTangent=this.outTangent;\n\t\tdestObject.value=this.value;\n\t}\n\n\treturn TrailKeyFrame;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.trail.TrailRenderElement\nvar TrailRenderElement=(function(){\n\tfunction TrailRenderElement(owner){\n\t\tthis._id=0;\n\t\tthis._owner=null;\n\t\tthis._camera=null;\n\t\tthis._vertexBuffers=null;\n\t\t//固定顶点个数\n\t\tthis._verticesCount=0;\n\t\t//虚拟顶点个数\n\t\tthis._virtualVerticesCount=0;\n\t\tthis._maxVerticesCount=256;\n\t\tthis._vertices1=null;\n\t\tthis._vertexBuffer1=null;\n\t\tthis._floatCountPerVertices1=8;\n\t\tthis._verticesIndex1=0;\n\t\tthis._everyAddVerticeCount1=0;\n\t\tthis._delLength=0;\n\t\tthis._vertices2=null;\n\t\tthis._vertexBuffer2=null;\n\t\tthis._floatCountPerVertices2=1;\n\t\tthis._everyGroupVertexBirthTime=null;\n\t\tthis._VerticesToTailLength=null;\n\t\tthis._everyVertexToPreVertexDistance=null;\n\t\tthis._pointe=null;\n\t\tthis._pointAtoBVector3e=null;\n\t\tthis._isStart=false;\n\t\tthis._isFinish=false;\n\t\tthis._isDead=false;\n\t\tthis._curtime=NaN;\n\t\tthis._curDisappearIndex=0;\n\t\tthis._lastPosition=new Vector3();\n\t\tthis._curPosition=new Vector3();\n\t\tthis._delVector3=new Vector3();\n\t\tthis._lastFixedVertexPosition=new Vector3();\n\t\tthis._pointAtoBVector3=new Vector3();\n\t\tthis._pointA=new Vector3();\n\t\tthis._pointB=new Vector3();\n\t\tthis._owner=owner;\n\t\tthis._id=TrailRenderElement.renderElementCount++;\n\t\tif (this._id==0){\n\t\t\towner._owner.transform.position.cloneTo(this._lastPosition);\n\t\t\t}else {\n\t\t\towner._curSubTrailFinishPosition.cloneTo(this._lastPosition);\n\t\t}\n\t\tthis._everyGroupVertexBirthTime=[];\n\t\tthis._VerticesToTailLength=new Float32Array(this._maxVerticesCount);\n\t\tthis._everyVertexToPreVertexDistance=new Float32Array(this._maxVerticesCount);\n\t\tthis._vertices1=new Float32Array(this._maxVerticesCount *this._floatCountPerVertices1);\n\t\tthis._vertices2=new Float32Array(this._maxVerticesCount *this._floatCountPerVertices2);\n\t\tthis._vertexBuffer1=new VertexBuffer3D(VertexTrail.vertexDeclaration1,this._maxVerticesCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer2=new VertexBuffer3D(VertexTrail.vertexDeclaration2,this._maxVerticesCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffers=[];\n\t\tthis._vertexBuffers.push(this._vertexBuffer1);\n\t\tthis._vertexBuffers.push(this._vertexBuffer2);\n\t}\n\n\t__class(TrailRenderElement,'laya.d3.core.trail.TrailRenderElement');\n\tvar __proto=TrailRenderElement.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true})\n\t/**\n\t*@private\n\t*更新Trail数据\n\t*/\n\t__proto._updateTrail=function(){\n\t\tthis._everyAddVerticeCount1=0;\n\t\tif (!this._isStart){\n\t\t\tthis._addTrailByFirstPosition(this._lastPosition,this._curPosition);\n\t\t}\n\t\tthis._addTrailByNextPosition(this._curPosition);\n\t\tthis._vertexBuffer1.setData(this._vertices1,this._verticesIndex1,this._verticesIndex1,this._everyAddVerticeCount1);\n\t\tthis._verticesIndex1+=this._everyAddVerticeCount1;\n\t\tthis._curPosition.cloneTo(this._lastPosition);\n\t\tif (this._virtualVerticesCount==2){\n\t\t\tthis._verticesIndex1-=this._floatCountPerVertices1 *2;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*通过起始位置添加TrailRenderElement起始数据\n\t*@param firstPosition 起始位置\n\t*@param secondPosition 第二次位置\n\t*/\n\t__proto._addTrailByFirstPosition=function(firstPosition,secondPosition){\n\t\tVector3.subtract(secondPosition,firstPosition,this._delVector3);\n\t\tVector3.cross(this._delVector3,this._camera.forward,this._pointAtoBVector3);\n\t\tVector3.normalize(this._pointAtoBVector3,this._pointAtoBVector3);\n\t\tVector3.scale(this._pointAtoBVector3,this._owner.widthMultiplier / 2,this._pointAtoBVector3);\n\t\tthis._updateVerticesByPosition(firstPosition);\n\t\tfirstPosition.cloneTo(this._lastFixedVertexPosition);\n\t\tthis._verticesCount+=2;\n\t\tthis._curtime=this._owner._hasLifeSubTrail ? this._owner._curSubTrailFinishCurTime :this._owner._curtime;\n\t\tthis._everyGroupVertexBirthTime.push(this._curtime);\n\t\tthis._isStart=true;\n\t\tthis._owner._hasLifeSubTrail=true;\n\t}\n\n\t/**\n\t*@private\n\t*通过位置更新TrailRenderElement数据\n\t*@param position 位置\n\t*/\n\t__proto._addTrailByNextPosition=function(position){\n\t\tVector3.subtract(position,this._lastFixedVertexPosition,this._delVector3);\n\t\tVector3.cross(this._delVector3,this._camera.forward,this._pointAtoBVector3);\n\t\tVector3.normalize(this._pointAtoBVector3,this._pointAtoBVector3);\n\t\tVector3.scale(this._pointAtoBVector3,this._owner.widthMultiplier / 2,this._pointAtoBVector3);\n\t\tthis._delLength=Vector3.scalarLength(this._delVector3);\n\t\tif (this._delLength-this._owner.minVertexDistance >=MathUtils3D.zeroTolerance){\n\t\t\tthis._owner._trailTotalLength+=this._delLength;\n\t\t\tthis._owner._trailSupplementLength=0;\n\t\t\tthis._updateVerticesByPosition(position);\n\t\t\tposition.cloneTo(this._lastFixedVertexPosition);\n\t\t\tthis._verticesCount+=2;\n\t\t\tthis._virtualVerticesCount=0;\n\t\t\tthis._everyGroupVertexBirthTime.push(this._owner._curtime);\n\t\t\tif (this._verticesCount==this._maxVerticesCount){\n\t\t\t\tthis._onTrailRenderElementFinish();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._owner._trailSupplementLength=this._delLength;\n\t\t\tthis._updateVerticesByPosition(position);\n\t\t\tthis._virtualVerticesCount=2;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*通过位置更新顶点数据\n\t*@param position 位置\n\t*/\n\t__proto._updateVerticesByPosition=function(position){\n\t\tthis._pointe=position.elements;\n\t\tthis._pointAtoBVector3e=this._pointAtoBVector3.elements;\n\t\tthis._curtime=this._owner._curtime;\n\t\tif (this._owner._hasLifeSubTrail && this._isStart==false){\n\t\t\tthis._pointe=this._owner._curSubTrailFinishPosition.elements;\n\t\t\tthis._pointAtoBVector3e=this._owner._curSubTrailFinishDirection.elements;\n\t\t\tthis._curtime=this._owner._curSubTrailFinishCurTime;\n\t\t}\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[0];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[1];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[2];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=-this._pointAtoBVector3e[0];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=-this._pointAtoBVector3e[1];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=-this._pointAtoBVector3e[2];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._curtime;\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=1.0;\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[0];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[1];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[2];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointAtoBVector3e[0];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointAtoBVector3e[1];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointAtoBVector3e[2];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._curtime;\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=0.0;\n\t\tthis._VerticesToTailLength[this._verticesCount / 2]=this._owner._trailTotalLength+this._owner._trailSupplementLength;\n\t\tif (this._owner._trailSupplementLength==0){\n\t\t\tthis._everyVertexToPreVertexDistance[this._verticesCount / 2]=this._delLength;\n\t\t\t}else {\n\t\t\tthis._everyVertexToPreVertexDistance[this._verticesCount / 2]=this._isStart ? this._owner._trailSupplementLength :0;\n\t\t}\n\t}\n\n\t/**\n\t*更新VertexBuffer2数据\n\t*/\n\t__proto._updateVertexBuffer2=function(){\n\t\tvar _uvIndex=0;\n\t\tvar _uvX=0.0;\n\t\tvar i=0,j=0;\n\t\tfor (i=0,j=(this._verticesCount+this._virtualVerticesCount)/ 2;i < j;i++){\n\t\t\tif (this._owner.textureMode==/*laya.d3.core.trail.module.TextureMode.Stretch*/0){\n\t\t\t\t_uvX=(this._VerticesToTailLength[i]-this._owner._trailDeadLength)/ (this._owner._trailTotalLength+this._owner._trailSupplementLength-this._owner._trailDeadLength);\n\t\t\t\t}else {\n\t\t\t\t_uvX=this._owner._trailTotalLength+this._owner._trailSupplementLength-this._VerticesToTailLength[i];\n\t\t\t}\n\t\t\tthis._vertices2[_uvIndex++]=1.0-_uvX;\n\t\t\tthis._vertices2[_uvIndex++]=1.0-_uvX;\n\t\t}\n\t\tthis._vertexBuffer2.setData(this._vertices2,0,0,this._verticesCount+this._virtualVerticesCount);\n\t}\n\n\t/**\n\t*trailRenderElement完成时调用\n\t*@param finishedPosition\n\t*/\n\t__proto._onTrailRenderElementFinish=function(){\n\t\tthis._lastFixedVertexPosition.cloneTo(this._owner._curSubTrailFinishPosition);\n\t\tthis._pointAtoBVector3.cloneTo(this._owner._curSubTrailFinishDirection);\n\t\tthis._owner._curSubTrailFinishCurTime=this._owner._curtime;\n\t\tthis._isFinish=true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateDisappear=function(){\n\t\tvar i=0,j=0;\n\t\tfor (i=this._curDisappearIndex,j=(this._verticesCount+this._virtualVerticesCount)/ 2;i < j;i++){\n\t\t\tif (this._owner._curtime-this._everyGroupVertexBirthTime[i] >=this._owner.time+MathUtils3D.zeroTolerance){\n\t\t\t\tthis._curDisappearIndex++;\n\t\t\t\tthis._owner._trailDeadLength+=this._everyVertexToPreVertexDistance[this._curDisappearIndex];\n\t\t\t\tif (this._curDisappearIndex >=(this._verticesCount+this._virtualVerticesCount)/ 2){\n\t\t\t\t\tthis._isDead=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*渲染前调用\n\t*@param state 渲染状态\n\t*@return 是否渲染\n\t*/\n\t__proto._beforeRender=function(state){\n\t\tthis._camera=state.camera;\n\t\tif (this._camera==null)\n\t\t\treturn false;\n\t\tthis._owner._owner.transform.position.cloneTo(this._curPosition);\n\t\tif (!this._isDead){\n\t\t\tif (this._verticesCount < this._maxVerticesCount){\n\t\t\t\tif (!this._owner._isStart){\n\t\t\t\t\tthis._owner._owner.transform.position.cloneTo(this._lastPosition);\n\t\t\t\t\tthis._owner._isStart=true;\n\t\t\t\t}\n\t\t\t\tif (!Vector3.equals(this._lastPosition,this._curPosition)){\n\t\t\t\t\tthis._updateTrail();\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tif (this._isFinish){\n\t\t\t\t\tthis._isFinish=false;\n\t\t\t\t\tthis._owner._curSubTrailFinished=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this._verticesCount > 0){\n\t\t\t\tthis._updateVertexBuffer2();\n\t\t\t\tthis._updateDisappear();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*渲染时调用\n\t*@param state 渲染状态\n\t*/\n\t__proto._render=function(state){\n\t\tif (this._isDead)\n\t\t\treturn;\n\t\tWebGL.mainContext.drawArrays(/*laya.webgl.WebGLContext.TRIANGLE_STRIP*/0x0005,this._curDisappearIndex *2,this._verticesCount+this._virtualVerticesCount-this._curDisappearIndex *2);\n\t\tStat.drawCall++;\n\t\tStat.trianglesFaces+=(this._verticesCount+this._virtualVerticesCount-this._curDisappearIndex *2-2);\n\t}\n\n\t/**\n\t*获取vertexBuffer\n\t*@param index vertexBuffer索引\n\t*@return vertexBuffer\n\t*/\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index===0)\n\t\t\treturn this._vertexBuffer1;\n\t\telse if (index===1)\n\t\treturn this._vertexBuffer2;\n\t\telse\n\t\treturn null;\n\t}\n\n\t/**\n\t*获取vertexBuffer数组\n\t*@return vertexBuffer数组\n\t*/\n\t__proto._getVertexBuffers=function(){\n\t\treturn this._vertexBuffers;\n\t}\n\n\t/**\n\t*获取顶点索引缓冲\n\t*@return 顶点索引缓冲\n\t*/\n\t__proto._getIndexBuffer=function(){\n\t\treturn null;\n\t}\n\n\t/**\n\t*重新激活该renderElement\n\t*/\n\t__proto.reActivate=function(){\n\t\tthis._id=laya.d3.core.trail.TrailRenderElement.renderElementCount++;\n\t\tthis._isStart=false;\n\t\tthis._isFinish=false;\n\t\tthis._isDead=false;\n\t\tthis._verticesCount=0;\n\t\tthis._virtualVerticesCount=0;\n\t\tthis._verticesIndex1=0;\n\t\tthis._delLength=0;\n\t\tthis._curDisappearIndex=0;\n\t\tthis._everyGroupVertexBirthTime=[];\n\t\tthis._owner._curSubTrailFinishPosition.cloneTo(this._lastPosition);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\tthis._vertexBuffer1.dispose();\n\t\tthis._vertexBuffer2.dispose();\n\t\tthis._vertices1=null;\n\t\tthis._vertexBuffer1=null;\n\t\tthis._vertices2=null;\n\t\tthis._vertexBuffer2=null;\n\t\tthis._vertexBuffers=null;\n\t\tthis._everyGroupVertexBirthTime=null;\n\t\tthis._VerticesToTailLength=null;\n\t\tthis._everyVertexToPreVertexDistance=null;\n\t\tthis._lastPosition=null;\n\t\tthis._curPosition=null;\n\t\tthis._delVector3=null;\n\t\tthis._lastFixedVertexPosition=null;\n\t\tthis._pointAtoBVector3=null;\n\t\tthis._pointe=null;\n\t\tthis._pointAtoBVector3e=null;\n\t\tthis._pointA=null;\n\t\tthis._pointB=null;\n\t}\n\n\t/**\n\t*获取vertexBuffer数量\n\t*@return vertexBuffer数量\n\t*/\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn this._vertexBuffers.length;\n\t});\n\n\t/**\n\t*获取三角面数量\n\t*@return 三角面数量\n\t*/\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn 0;\n\t});\n\n\tTrailRenderElement.renderElementCount=0;\n\treturn TrailRenderElement;\n})()\n\n\n/**\n*<code>VertexTrail</code> 类用于创建拖尾顶点结构。\n*/\n//class laya.d3.core.trail.VertexTrail\nvar VertexTrail=(function(){\n\tfunction VertexTrail(){}\n\t__class(VertexTrail,'laya.d3.core.trail.VertexTrail');\n\tvar __proto=VertexTrail.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexTrail._vertexDeclaration1;\n\t});\n\n\t__getset(1,VertexTrail,'vertexDeclaration1',function(){\n\t\treturn VertexTrail._vertexDeclaration1;\n\t});\n\n\t__getset(1,VertexTrail,'vertexDeclaration2',function(){\n\t\treturn VertexTrail._vertexDeclaration2;\n\t});\n\n\t__static(VertexTrail,\n\t['_vertexDeclaration1',function(){return this._vertexDeclaration1=new VertexDeclaration(32,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.OFFSETVECTOR*/41),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.TIME0*/33),\n\t\tnew VertexElement(28,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0Y*/40)]);},'_vertexDeclaration2',function(){return this._vertexDeclaration2=new VertexDeclaration(4,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0X*/38)]);}\n\t]);\n\treturn VertexTrail;\n})()\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.domino.DominoKeyFrame\nvar DominoKeyFrame=(function(){\n\tfunction DominoKeyFrame(){\n\t\tthis.position=Vector3.ZERO;\n\t\tthis.rotation=Quaternion.DEFAULT;\n\t\tthis.scale=new Vector3(0.3,0.6,0.1);\n\t}\n\n\t__class(DominoKeyFrame,'laya.d3.extension.domino.DominoKeyFrame');\n\treturn DominoKeyFrame;\n})()\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.domino.DominoRenderElement\nvar DominoRenderElement=(function(){\n\tfunction DominoRenderElement(owner){\n\t\tthis._owner=null;\n\t\tthis.id=0;\n\t\tthis._curDominoCount=0;\n\t\tthis._perDominoVertexCount=24;\n\t\tthis._perDominoIndiceCount=36;\n\t\tthis._vertexBuffers=null;\n\t\tthis._vertices1=null;\n\t\tthis._vertexBuffer1=null;\n\t\tthis._floatCountPerVertices1=4;\n\t\tthis._verticesIndex1=0;\n\t\tthis._everyAddVerticeCount1=0;\n\t\tthis._vertices2=null;\n\t\tthis._vertexBuffer2=null;\n\t\tthis._floatCountPerVertices2=6;\n\t\tthis._verticesIndex2=0;\n\t\tthis._everyAddVerticeCount2=0;\n\t\tthis._everyUpdateVerticeCount2=0;\n\t\tthis._indices=null;\n\t\tthis._indexBuffer=null;\n\t\tthis._indicesIndex=0;\n\t\tthis._everyAddindiceCount=0;\n\t\tthis._index=0;\n\t\tthis._color=new Vector4(Math.random(),Math.random(),Math.random(),1);\n\t\tthis._topColor=this._color;\n\t\tthis._buttomColor=this._color;\n\t\tthis._leftColor=this._color;\n\t\tthis._rightColor=this._color;\n\t\tthis._frontColor=this._color;\n\t\tthis._backColor=this._color;\n\t\tthis._localMatrix=new Matrix4x4();\n\t\tthis._localPostion=new Vector3();\n\t\tthis._localNormal=new Vector3();\n\t\tthis._owner=owner;\n\t\tthis.id=DominoRenderElement.renderElementCount++;\n\t\tvar _maxVertexCount=this._owner.DominoRenderElementMaxDominoCount *this._perDominoVertexCount;\n\t\tthis._vertices1=new Float32Array(_maxVertexCount *this._floatCountPerVertices1);\n\t\tthis._vertices2=new Float32Array(_maxVertexCount *this._floatCountPerVertices2);\n\t\tthis._vertexBuffer1=new VertexBuffer3D(DominoVertex.vertexDeclaration1,_maxVertexCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer2=new VertexBuffer3D(DominoVertex.vertexDeclaration2,_maxVertexCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffers=[];\n\t\tthis._vertexBuffers.push(this._vertexBuffer1);\n\t\tthis._vertexBuffers.push(this._vertexBuffer2);\n\t\tvar _maxIndiceCount=this._owner.DominoRenderElementMaxDominoCount *this._perDominoIndiceCount;\n\t\tthis._indices=new Uint16Array(_maxIndiceCount);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",_maxIndiceCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t}\n\n\t__class(DominoRenderElement,'laya.d3.extension.domino.DominoRenderElement');\n\tvar __proto=DominoRenderElement.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true})\n\t__proto.addDomino=function(position,rotation,scale){\n\t\t(position===void 0)&& (position=Vector3.ZERO);\n\t\t(rotation===void 0)&& (rotation=Quaternion.DEFAULT);\n\t\t(scale===void 0)&& (scale=Vector3.ONE);\n\t\tthis._curDominoCount++;\n\t\tthis._owner.dominoCount++;\n\t\tthis._owner.dominoPosition.push(position);\n\t\tthis.addDataForVertexBuffer1();\n\t\tthis.addDataForVertexBuffer2(position,rotation,scale);\n\t\tthis.addDataForIndexBuffer();\n\t}\n\n\t__proto.updateDomino=function(index,position,rotation,scale){\n\t\t(position===void 0)&& (position=Vector3.ZERO);\n\t\t(rotation===void 0)&& (rotation=Quaternion.DEFAULT);\n\t\t(scale===void 0)&& (scale=Vector3.ONE);\n\t\tthis._everyUpdateVerticeCount2=0;\n\t\tvar offset=this._perDominoVertexCount *this._floatCountPerVertices2 *index;\n\t\tvar positions=DominoFilter._positions;\n\t\tvar positione,positionX=NaN,positionY=NaN,positionZ=NaN;\n\t\tvar normals=DominoFilter._normals;\n\t\tvar normale,normalX=NaN,normalY=NaN,normalZ=NaN;\n\t\tvar i=0,length=positions.length;\n\t\tMatrix4x4.createAffineTransformation(position,rotation,scale,this._localMatrix);\n\t\tfor (i=0;i < length;i++){\n\t\t\tVector3.transformCoordinate(positions[i],this._localMatrix,this._localPostion);\n\t\t\tpositione=this._localPostion.elements;\n\t\t\tpositionX=positione[0];\n\t\t\tpositionY=positione[1];\n\t\t\tpositionZ=positione[2];\n\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=positionX;\n\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=positionY;\n\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=positionZ;\n\t\t\tVector3.TransformNormal(normals[i],this._localMatrix,this._localNormal);\n\t\t\tnormale=this._localNormal.elements;\n\t\t\tnormalX=normale[0];\n\t\t\tnormalY=normale[1];\n\t\t\tnormalZ=normale[2];\n\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=normalX;\n\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=normalY;\n\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=normalZ;\n\t\t}\n\t\tthis._vertexBuffer2.setData(this._vertices2,offset,offset,this._everyUpdateVerticeCount2);\n\t}\n\n\t__proto.updateDominos=function(startIndex,count,keyFrames){\n\t\tthis._everyUpdateVerticeCount2=0;\n\t\tvar offset=this._perDominoVertexCount *this._floatCountPerVertices2 *startIndex;\n\t\tvar positions=DominoFilter._positions;\n\t\tvar positione,positionX=NaN,positionY=NaN,positionZ=NaN;\n\t\tvar normals=DominoFilter._normals;\n\t\tvar normale,normalX=NaN,normalY=NaN,normalZ=NaN;\n\t\tvar i=0,j=0,length=positions.length;\n\t\tvar keyFrame;\n\t\tfor (i=0;i < count;i++){\n\t\t\tkeyFrame=keyFrames[i];\n\t\t\tMatrix4x4.createAffineTransformation(keyFrame.position,keyFrame.rotation,keyFrame.scale,this._localMatrix);\n\t\t\tfor (j=0;j < length;j++){\n\t\t\t\tVector3.transformCoordinate(positions[j],this._localMatrix,this._localPostion);\n\t\t\t\tpositione=this._localPostion.elements;\n\t\t\t\tpositionX=positione[0];\n\t\t\t\tpositionY=positione[1];\n\t\t\t\tpositionZ=positione[2];\n\t\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=positionX;\n\t\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=positionY;\n\t\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=positionZ;\n\t\t\t\tVector3.TransformNormal(normals[j],this._localMatrix,this._localNormal);\n\t\t\t\tnormale=this._localNormal.elements;\n\t\t\t\tnormalX=normale[0];\n\t\t\t\tnormalY=normale[1];\n\t\t\t\tnormalZ=normale[2];\n\t\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=normalX;\n\t\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=normalY;\n\t\t\t\tthis._vertices2[offset+this._everyUpdateVerticeCount2++]=normalZ;\n\t\t\t}\n\t\t}\n\t\tthis._vertexBuffer2.setData(this._vertices2,offset,offset,this._everyUpdateVerticeCount2);\n\t}\n\n\t__proto.addDataForVertexBuffer1=function(){\n\t\tthis._everyAddVerticeCount1=0;\n\t\tthis.addDataForVertices1(this._topColor);\n\t\tthis.addDataForVertices1(this._buttomColor);\n\t\tthis.addDataForVertices1(this._leftColor);\n\t\tthis.addDataForVertices1(this._rightColor);\n\t\tthis.addDataForVertices1(this._frontColor);\n\t\tthis.addDataForVertices1(this._backColor);\n\t\tthis._vertexBuffer1.setData(this._vertices1,this._verticesIndex1,this._verticesIndex1,this._everyAddVerticeCount1);\n\t\tthis._verticesIndex1+=this._everyAddVerticeCount1;\n\t}\n\n\t__proto.addDataForVertexBuffer2=function(position,rotation,scale){\n\t\t(position===void 0)&& (position=Vector3.ZERO);\n\t\t(rotation===void 0)&& (rotation=Quaternion.DEFAULT);\n\t\t(scale===void 0)&& (scale=Vector3.ONE);\n\t\tthis._everyAddVerticeCount2=0;\n\t\tvar positions=DominoFilter._positions;\n\t\tvar positione,positionX=NaN,positionY=NaN,positionZ=NaN;\n\t\tvar normals=DominoFilter._normals;\n\t\tvar normale,normalX=NaN,normalY=NaN,normalZ=NaN;\n\t\tvar i=0,j=0,length=positions.length;\n\t\tMatrix4x4.createAffineTransformation(position,rotation,scale,this._localMatrix);\n\t\tfor (i=0;i < length;i++){\n\t\t\tVector3.transformCoordinate(positions[i],this._localMatrix,this._localPostion);\n\t\t\tpositione=this._localPostion.elements;\n\t\t\tpositionX=positione[0];\n\t\t\tpositionY=positione[1];\n\t\t\tpositionZ=positione[2];\n\t\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=positionX;\n\t\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=positionY;\n\t\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=positionZ;\n\t\t\tVector3.TransformNormal(normals[i],this._localMatrix,this._localNormal);\n\t\t\tnormale=this._localNormal.elements;\n\t\t\tnormalX=normale[0];\n\t\t\tnormalY=normale[1];\n\t\t\tnormalZ=normale[2];\n\t\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=normalX;\n\t\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=normalY;\n\t\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=normalZ;\n\t\t}\n\t\tthis._vertexBuffer2.setData(this._vertices2,this._verticesIndex2,this._verticesIndex2,this._everyAddVerticeCount2);\n\t\tthis._verticesIndex2+=this._everyAddVerticeCount2;\n\t}\n\n\t__proto.addDataForIndexBuffer=function(){\n\t\tthis._everyAddindiceCount=0;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+0;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+1;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+2;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+2;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+3;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+0;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+4;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+7;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+6;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+6;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+5;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+4;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+8;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+9;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+10;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+10;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+11;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+8;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+12;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+15;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+14;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+14;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+13;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+12;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+16;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+17;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+18;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+18;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+19;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+16;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+20;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+23;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+22;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+22;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+21;\n\t\tthis._indices[this._indicesIndex+this._everyAddindiceCount++]=this._index+20;\n\t\tthis._indexBuffer.setData(this._indices,this._indicesIndex,this._indicesIndex,this._everyAddindiceCount);\n\t\tthis._indicesIndex+=this._everyAddindiceCount;\n\t\tthis._index+=this._perDominoVertexCount;\n\t}\n\n\t__proto.addDataForVertices1=function(color){\n\t\tvar colore=color.elements;\n\t\tvar colorX=colore[0];\n\t\tvar colorY=colore[1];\n\t\tvar colorZ=colore[2];\n\t\tvar colorW=colore[3];\n\t\tfor (var i=0;i < 4;i++){\n\t\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=colorX;\n\t\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=colorY;\n\t\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=colorZ;\n\t\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=colorW;\n\t\t}\n\t}\n\n\t__proto._beforeRender=function(state){\n\t\tthis._indexBuffer._bind();\n\t\treturn true;\n\t}\n\n\t__proto._render=function(state){\n\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._indicesIndex,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\tStat.drawCall++;\n\t\tStat.trianglesFaces+=this._indicesIndex / 3;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn this._indexBuffer;\n\t}\n\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index===0)\n\t\t\treturn this._vertexBuffer1;\n\t\telse if (index===1)\n\t\treturn this._vertexBuffer2;\n\t\telse\n\t\treturn null;\n\t}\n\n\t__proto._getVertexBuffers=function(){\n\t\treturn this._vertexBuffers;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn null;\n\t}\n\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn this._vertexBuffers.length;\n\t});\n\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn this._indicesIndex / 3;\n\t});\n\n\tDominoRenderElement.renderElementCount=0;\n\treturn DominoRenderElement;\n})()\n\n\n/**\n*<code>DominoVertex</code> 类用于创建多米诺顶点结构。\n*/\n//class laya.d3.extension.domino.DominoVertex\nvar DominoVertex=(function(){\n\tfunction DominoVertex(){}\n\t__class(DominoVertex,'laya.d3.extension.domino.DominoVertex');\n\tvar __proto=DominoVertex.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn DominoVertex._vertexDeclaration1;\n\t});\n\n\t__getset(1,DominoVertex,'vertexDeclaration1',function(){\n\t\treturn DominoVertex._vertexDeclaration1;\n\t});\n\n\t__getset(1,DominoVertex,'vertexDeclaration2',function(){\n\t\treturn DominoVertex._vertexDeclaration2;\n\t});\n\n\t__static(DominoVertex,\n\t['_vertexDeclaration1',function(){return this._vertexDeclaration1=new VertexDeclaration(16,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1)]);},'_vertexDeclaration2',function(){return this._vertexDeclaration2=new VertexDeclaration(24,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3)]);}\n\t]);\n\treturn DominoVertex;\n})()\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lineRender.LineVertex\nvar LineVertex=(function(){\n\tfunction LineVertex(){}\n\t__class(LineVertex,'laya.d3.extension.lineRender.LineVertex');\n\tvar __proto=LineVertex.prototype;\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn LineVertex._vertexDeclaration1;\n\t});\n\n\t__getset(1,LineVertex,'vertexDeclaration1',function(){\n\t\treturn LineVertex._vertexDeclaration1;\n\t});\n\n\t__getset(1,LineVertex,'vertexDeclaration2',function(){\n\t\treturn LineVertex._vertexDeclaration2;\n\t});\n\n\t__getset(1,LineVertex,'vertexDeclaration3',function(){\n\t\treturn LineVertex._vertexDeclaration3;\n\t});\n\n\t__static(LineVertex,\n\t['_vertexDeclaration1',function(){return this._vertexDeclaration1=new VertexDeclaration(16,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0Y*/40)]);},'_vertexDeclaration2',function(){return this._vertexDeclaration2=new VertexDeclaration(12,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.OFFSETVECTOR*/41)]);},'_vertexDeclaration3',function(){return this._vertexDeclaration3=new VertexDeclaration(8,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0X*/38),\n\t\tnew VertexElement(4,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0X1*/39)]);}\n\t]);\n\treturn LineVertex;\n})()\n\n\n/**\n*@private\n*<code>DynamicBatch</code> 类用于动态批处理。\n*/\n//class laya.d3.graphics.DynamicBatch\nvar DynamicBatch=(function(){\n\tfunction DynamicBatch(vertexDeclaration){\n\t\tthis._vertexDeclaration=null;\n\t\tthis._vertexDatas=null;\n\t\tthis._indexDatas=null;\n\t\tthis._vertexBuffer=null;\n\t\tthis._indexBuffer=null;\n\t\tthis._currentCombineVertexCount=0;\n\t\tthis._currentCombineIndexCount=0;\n\t\tthis._combineRenderElements=null;\n\t\tthis._materials=null;\n\t\tthis._materialToRenderElementsOffsets=null;\n\t\tthis._merageElements=null;\n\t\tthis._combineRenderElementPool=null;\n\t\tthis._combineRenderElementPoolIndex=0;\n\t\tthis._currentCombineVertexCount=0;\n\t\tthis._currentCombineIndexCount=0;\n\t\tthis._combineRenderElements=[];\n\t\tthis._materialToRenderElementsOffsets=[];\n\t\tthis._materials=[];\n\t\tthis._merageElements=[];\n\t\tthis._combineRenderElementPool=[];\n\t\tthis._combineRenderElementPoolIndex=0;\n\t\tthis._vertexDeclaration=vertexDeclaration;\n\t}\n\n\t__class(DynamicBatch,'laya.d3.graphics.DynamicBatch');\n\tvar __proto=DynamicBatch.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true})\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index===0)\n\t\t\treturn this._vertexBuffer;\n\t\telse\n\t\treturn null;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn this._indexBuffer;\n\t}\n\n\t__proto._getCombineRenderElementFromPool=function(view,projection,projectionView){\n\t\tvar renderElement=this._combineRenderElementPool[this._combineRenderElementPoolIndex++];\n\t\tif (!renderElement){\n\t\t\tthis._combineRenderElementPool[this._combineRenderElementPoolIndex-1]=renderElement=new RenderElement();\n\t\t\trenderElement._sprite3D=new MeshSprite3D();\n\t\t}\n\t\trenderElement._sprite3D._render._renderUpdate(projectionView);\n\t\treturn renderElement;\n\t}\n\n\t__proto._getRenderElement=function(view,projection,projectionView){\n\t\tif (!this._vertexDatas){\n\t\t\tthis._vertexDatas=new Float32Array(this._vertexDeclaration.vertexStride / 4 *DynamicBatch.maxVertexCount);\n\t\t\tthis._indexDatas=new Uint16Array(DynamicBatch.maxIndexCount);\n\t\t\tthis._vertexBuffer=VertexBuffer3D.create(this._vertexDeclaration,DynamicBatch.maxVertexCount,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\t\tthis._indexBuffer=IndexBuffer3D.create(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",DynamicBatch.maxIndexCount,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\t}\n\t\tthis._merageElements.length=0;\n\t\tvar curMerVerCount=0;\n\t\tvar curIndexCount=0;\n\t\tfor (var i=0,n=this._combineRenderElements.length;i < n;i++){\n\t\t\tvar renderElement=this._combineRenderElements[i];\n\t\t\tvar subVertexDatas=renderElement.getDynamicBatchBakedVertexs(0);\n\t\t\tvar subIndexDatas=renderElement.getBakedIndices();\n\t\t\tvar isInvert=renderElement._sprite3D.transform._isFrontFaceInvert;\n\t\t\tvar indexOffset=curMerVerCount / (this._vertexDeclaration.vertexStride / 4);\n\t\t\tvar indexStart=curIndexCount;\n\t\t\tvar indexEnd=indexStart+subIndexDatas.length;\n\t\t\trenderElement._tempBatchIndexStart=indexStart;\n\t\t\trenderElement._tempBatchIndexEnd=indexEnd;\n\t\t\tthis._indexDatas.set(subIndexDatas,curIndexCount);\n\t\t\tvar k=0;\n\t\t\tif (isInvert){\n\t\t\t\tfor (k=indexStart;k < indexEnd;k+=3){\n\t\t\t\t\tthis._indexDatas[k]=indexOffset+this._indexDatas[k];\n\t\t\t\t\tvar index1=this._indexDatas[k+1];\n\t\t\t\t\tvar index2=this._indexDatas[k+2];\n\t\t\t\t\tthis._indexDatas[k+1]=indexOffset+index2;\n\t\t\t\t\tthis._indexDatas[k+2]=indexOffset+index1;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tfor (k=indexStart;k < indexEnd;k+=3){\n\t\t\t\t\tthis._indexDatas[k]=indexOffset+this._indexDatas[k];\n\t\t\t\t\tthis._indexDatas[k+1]=indexOffset+this._indexDatas[k+1];\n\t\t\t\t\tthis._indexDatas[k+2]=indexOffset+this._indexDatas[k+2];\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurIndexCount+=subIndexDatas.length;\n\t\t\tthis._vertexDatas.set(subVertexDatas,curMerVerCount);\n\t\t\tcurMerVerCount+=subVertexDatas.length;\n\t\t}\n\t\tthis._vertexBuffer.setData(this._vertexDatas);\n\t\tthis._indexBuffer.setData(this._indexDatas);\n\t\tthis._combineRenderElementPoolIndex=0;\n\t\tfor (i=0,n=this._materials.length;i < n;i++){\n\t\t\tvar merageElement=this._getCombineRenderElementFromPool(view,projection,projectionView);\n\t\t\tmerageElement._type=2;\n\t\t\tmerageElement._staticBatch=null;\n\t\t\tmerageElement.renderObj=this;\n\t\t\tvar renderElementStartIndex=this._combineRenderElements[this._materialToRenderElementsOffsets[i]]._tempBatchIndexStart;\n\t\t\tvar renderElementEndIndex=(i+1===this._materialToRenderElementsOffsets.length)? curIndexCount :this._combineRenderElements[this._materialToRenderElementsOffsets[i+1]]._tempBatchIndexStart;\n\t\t\tmerageElement._tempBatchIndexStart=renderElementStartIndex;\n\t\t\tmerageElement._tempBatchIndexEnd=renderElementEndIndex;\n\t\t\tmerageElement._material=this._materials[i];\n\t\t\tthis._merageElements.push(merageElement);\n\t\t}\n\t}\n\n\t__proto._addCombineRenderObjTest=function(renderElement){\n\t\tvar renderObj=renderElement.renderObj;\n\t\tvar indexCount=this._currentCombineIndexCount+renderObj._getIndexBuffer().indexCount;\n\t\tvar vertexCount=this._currentCombineVertexCount+renderObj._getVertexBuffer().vertexCount;\n\t\tif (vertexCount > DynamicBatch.maxVertexCount || indexCount > DynamicBatch.maxIndexCount){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t__proto._addCombineRenderObj=function(renderElement){\n\t\tvar renderObj=renderElement.renderObj;\n\t\tthis._combineRenderElements.push(renderElement);\n\t\tthis._currentCombineIndexCount=this._currentCombineIndexCount+renderObj._getIndexBuffer().indexCount;\n\t\tthis._currentCombineVertexCount=this._currentCombineVertexCount+renderObj._getVertexBuffer().vertexCount;\n\t}\n\n\t__proto._addCombineMaterial=function(material){\n\t\tthis._materials.push(material);\n\t}\n\n\t__proto._addMaterialToRenderElementOffset=function(offset){\n\t\tthis._materialToRenderElementsOffsets.push(offset);\n\t}\n\n\t__proto._clearRenderElements=function(){\n\t\tthis._combineRenderElements.length=0;\n\t\tthis._materials.length=0;\n\t\tthis._materialToRenderElementsOffsets.length=0;\n\t\tthis._currentCombineVertexCount=0;\n\t\tthis._currentCombineIndexCount=0;\n\t}\n\n\t__proto._addToRenderQueue=function(scene,view,projection,projectionView){\n\t\tthis._getRenderElement(view,projection,projectionView);\n\t\tfor (var i=0,n=this._materials.length;i < n;i++)\n\t\tscene.getRenderQueue(this._materials[i].renderQueue)._addDynamicBatchElement(this._merageElements[i]);\n\t}\n\n\t__proto._beforeRender=function(state){\n\t\tthis._vertexBuffer._bind();\n\t\tthis._indexBuffer._bind();\n\t\treturn true;\n\t}\n\n\t__proto._render=function(state){\n\t\tvar indexCount=state._batchIndexEnd-state._batchIndexStart;\n\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,indexCount,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,state._batchIndexStart *2);\n\t\tStat.drawCall++;\n\t\tStat.trianglesFaces+=indexCount / 3;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getVertexBuffers=function(){\n\t\treturn null;\n\t}\n\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn 1;\n\t});\n\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn this._indexBuffer.indexCount / 3;\n\t});\n\n\t__getset(0,__proto,'combineRenderElementsCount',function(){\n\t\treturn this._combineRenderElements.length;\n\t});\n\n\tDynamicBatch.maxVertexCount=20000;\n\tDynamicBatch.maxIndexCount=40000;\n\tDynamicBatch.maxCombineTriangleCount=10;\n\treturn DynamicBatch;\n})()\n\n\n/**\n*@private\n*<code>DynamicBatchManager</code> 类用于管理动态批处理。\n*/\n//class laya.d3.graphics.DynamicBatchManager\nvar DynamicBatchManager=(function(){\n\tfunction DynamicBatchManager(){\n\t\tthis._dynamicBatches=null;\n\t\tthis._prepareDynamicBatchCombineElements=null;\n\t\tthis._dynamicBatches={};\n\t\tthis._prepareDynamicBatchCombineElements=[];\n\t}\n\n\t__class(DynamicBatchManager,'laya.d3.graphics.DynamicBatchManager');\n\tvar __proto=DynamicBatchManager.prototype;\n\t__proto.getDynamicBatch=function(_vertexDeclaration,number){\n\t\tvar dynamicBatch;\n\t\tvar key=_vertexDeclaration.id.toString()+number;\n\t\tif (!this._dynamicBatches[key]){\n\t\t\tthis._dynamicBatches[key]=dynamicBatch=new DynamicBatch(_vertexDeclaration);\n\t\t\t}else {\n\t\t\tdynamicBatch=this._dynamicBatches[key];\n\t\t}\n\t\treturn dynamicBatch;\n\t}\n\n\t/**需手动调用*/\n\t__proto._garbageCollection=function(){\n\t\tfor (var key in this._dynamicBatches)\n\t\tif (this._dynamicBatches[key].combineRenderElementsCount===0)\n\t\t\tdelete this._dynamicBatches[key];\n\t}\n\n\t__proto._addPrepareRenderElement=function(renderElement){\n\t\tthis._prepareDynamicBatchCombineElements.push(renderElement);\n\t}\n\n\t/**@private */\n\t__proto._finishCombineDynamicBatch=function(scene){\n\t\tthis._prepareDynamicBatchCombineElements.sort(DynamicBatchManager._sortPrepareDynamicBatch);\n\t\tvar lastMaterial;\n\t\tvar lastVertexDeclaration;\n\t\tvar lastRenderElement;\n\t\tvar lastBatchNumber=-1;\n\t\tvar lastCanMerage=true;\n\t\tvar curMaterial;\n\t\tvar curRenderElement;\n\t\tvar curDynamicBatch;\n\t\tvar curbatchNumber=0;\n\t\tvar laterAddMaterial;\n\t\tvar laterAddRenderElement;\n\t\tvar laterAddMatToElementOffset=-1;\n\t\tfor (var i=0,n=this._prepareDynamicBatchCombineElements.length;i < n;i++){\n\t\t\tcurRenderElement=this._prepareDynamicBatchCombineElements[i];\n\t\t\tvar curDeclaration=curRenderElement.renderObj._getVertexBuffer(0).vertexDeclaration;\n\t\t\tvar declarationChanged=(lastVertexDeclaration!==curDeclaration);\n\t\t\tdeclarationChanged && (curbatchNumber=0,lastVertexDeclaration=curDeclaration);\n\t\t\tvar batchNumbrChanged=(curbatchNumber!==lastBatchNumber);\n\t\t\tbatchNumbrChanged && (lastBatchNumber=curbatchNumber);\n\t\t\tif ((declarationChanged)|| batchNumbrChanged){\n\t\t\t\tcurDynamicBatch=this.getDynamicBatch(curDeclaration,curbatchNumber);\n\t\t\t\tlastMaterial=null;\n\t\t\t}\n\t\t\tif (lastCanMerage){\n\t\t\t\tif (curDynamicBatch._addCombineRenderObjTest(curRenderElement)){\n\t\t\t\t\tcurMaterial=curRenderElement._material;\n\t\t\t\t\tif (lastMaterial!==curMaterial){\n\t\t\t\t\t\tif (laterAddMaterial){\n\t\t\t\t\t\t\tscene.getRenderQueue(laterAddRenderElement._material.renderQueue)._addRenderElement(laterAddRenderElement);\n\t\t\t\t\t\t\tlaterAddMaterial=null;\n\t\t\t\t\t\t\tlaterAddRenderElement=null;\n\t\t\t\t\t\t\tlaterAddMatToElementOffset=-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlaterAddMaterial=curMaterial;\n\t\t\t\t\t\tlaterAddMatToElementOffset=curDynamicBatch.combineRenderElementsCount;\n\t\t\t\t\t\tlaterAddRenderElement=curRenderElement;\n\t\t\t\t\t\tlastMaterial=curMaterial;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tif (laterAddMaterial){\n\t\t\t\t\t\t\tvar lastRenderObj=laterAddRenderElement.renderObj;\n\t\t\t\t\t\t\tvar curRenderObj=curRenderElement.renderObj;\n\t\t\t\t\t\t\tif (((lastRenderObj._getVertexBuffer().vertexCount+curRenderObj._getVertexBuffer().vertexCount)> DynamicBatch.maxVertexCount)|| ((lastRenderObj._getIndexBuffer().indexCount+curRenderObj._getIndexBuffer().indexCount)> DynamicBatch.maxIndexCount)){\n\t\t\t\t\t\t\t\tscene.getRenderQueue(laterAddRenderElement._material.renderQueue)._addRenderElement(laterAddRenderElement);\n\t\t\t\t\t\t\t\tlaterAddMaterial=curMaterial;\n\t\t\t\t\t\t\t\tlaterAddMatToElementOffset=curDynamicBatch.combineRenderElementsCount;\n\t\t\t\t\t\t\t\tlaterAddRenderElement=curRenderElement;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tcurDynamicBatch._addCombineMaterial(laterAddMaterial);\n\t\t\t\t\t\t\t\tcurDynamicBatch._addMaterialToRenderElementOffset(laterAddMatToElementOffset);\n\t\t\t\t\t\t\t\tcurDynamicBatch._addCombineRenderObj(laterAddRenderElement);\n\t\t\t\t\t\t\t\tlaterAddMaterial=null;\n\t\t\t\t\t\t\t\tlaterAddRenderElement=null;\n\t\t\t\t\t\t\t\tlaterAddMatToElementOffset=-1;\n\t\t\t\t\t\t\t\tcurDynamicBatch._addCombineRenderObj(curRenderElement);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tcurDynamicBatch._addCombineRenderObj(curRenderElement);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlastCanMerage=true;\n\t\t\t\t\t}else {\n\t\t\t\t\tif (laterAddMaterial){\n\t\t\t\t\t\tscene.getRenderQueue(laterAddRenderElement._material.renderQueue)._addRenderElement(laterAddRenderElement);\n\t\t\t\t\t\tlaterAddMaterial=null;\n\t\t\t\t\t\tlaterAddRenderElement=null;\n\t\t\t\t\t\tlaterAddMatToElementOffset=-1;\n\t\t\t\t\t}\n\t\t\t\t\tcurbatchNumber++;\n\t\t\t\t\tlastCanMerage=false;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tlastRenderElement=this._prepareDynamicBatchCombineElements[i-1];\n\t\t\t\tcurDynamicBatch._addMaterialToRenderElementOffset(curDynamicBatch.combineRenderElementsCount);\n\t\t\t\tlastMaterial=lastRenderElement._material;\n\t\t\t\tcurDynamicBatch._addCombineMaterial(lastMaterial);\n\t\t\t\tcurDynamicBatch._addCombineRenderObj(lastRenderElement);\n\t\t\t\tlastCanMerage=true;\n\t\t\t\tcurMaterial=curRenderElement._material;\n\t\t\t\tif (lastMaterial!==curMaterial){\n\t\t\t\t\tlaterAddMaterial=curMaterial;\n\t\t\t\t\tlaterAddMatToElementOffset=curDynamicBatch.combineRenderElementsCount;\n\t\t\t\t\tlaterAddRenderElement=curRenderElement;\n\t\t\t\t\t}else {\n\t\t\t\t\tcurDynamicBatch._addCombineRenderObj(curRenderElement);\n\t\t\t\t}\n\t\t\t\tlastMaterial=curMaterial;\n\t\t\t}\n\t\t}\n\t\tif (laterAddMaterial){\n\t\t\tscene.getRenderQueue(laterAddRenderElement._material.renderQueue)._addRenderElement(laterAddRenderElement);\n\t\t\tlaterAddMaterial=null;\n\t\t\tlaterAddRenderElement=null;\n\t\t\tlaterAddMatToElementOffset=-1;\n\t\t}\n\t\tthis._prepareDynamicBatchCombineElements.length=0;\n\t}\n\n\t__proto._clearRenderElements=function(){\n\t\tfor (var key in this._dynamicBatches)\n\t\tthis._dynamicBatches[key]._clearRenderElements();\n\t}\n\n\t__proto._addToRenderQueue=function(scene,view,projection,projectionView){\n\t\tfor (var key in this._dynamicBatches){\n\t\t\tvar dynamicBatch=this._dynamicBatches[key];\n\t\t\t(dynamicBatch.combineRenderElementsCount > 0)&& (dynamicBatch._addToRenderQueue(scene,view,projection,projectionView));\n\t\t}\n\t}\n\n\t__proto.dispose=function(){\n\t\tthis._dynamicBatches=null;\n\t}\n\n\tDynamicBatchManager._sortPrepareDynamicBatch=function(a,b){\n\t\treturn a._mainSortID-b._mainSortID;\n\t}\n\n\treturn DynamicBatchManager;\n})()\n\n\n/**\n*@private\n*/\n//class laya.d3.graphics.FrustumCulling\nvar FrustumCulling=(function(){\n\tfunction FrustumCulling(){}\n\t__class(FrustumCulling,'laya.d3.graphics.FrustumCulling');\n\tFrustumCulling.renderShadowObjectCulling=function(scene,lightFrustum,shadowQueues,lightViewProjectMatrix,nPSSMNum){\n\t\tvar i=0,j=0,n=0,m=0;\n\t\tfor (i=0,n=shadowQueues.length;i < n;i++){\n\t\t\tvar quene=shadowQueues[i];\n\t\t\t(quene)&& (quene._clearRenderElements());\n\t\t};\n\t\tvar frustumCullingObjects=scene._cullingRenders;\n\t\tvar baseRender,shadowQueue,renderElements;\n\t\tif (nPSSMNum > 1){\n\t\t\tfor (i=0,n=scene._cullingRendersLength;i < n;i++){\n\t\t\t\tbaseRender=frustumCullingObjects[i];\n\t\t\t\tif (baseRender.castShadow && Layer.isVisible(baseRender._owner.layer.mask)&& baseRender.enable){\n\t\t\t\t\tfor (var k=1,kNum=lightFrustum.length;k < kNum;k++){\n\t\t\t\t\t\tshadowQueue=shadowQueues[k-1];\n\t\t\t\t\t\tif (lightFrustum[k].containsBoundSphere(baseRender.boundingSphere)!==/*laya.d3.math.ContainmentType.Disjoint*/0){\n\t\t\t\t\t\t\trenderElements=baseRender._renderElements;\n\t\t\t\t\t\t\tfor (j=0,m=renderElements.length;j < m;j++)\n\t\t\t\t\t\t\tshadowQueue._addRenderElement(renderElements[j]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (i=0,n=scene._cullingRendersLength;i < n;i++){\n\t\t\t\tbaseRender=frustumCullingObjects[i];\n\t\t\t\tif (baseRender.castShadow && Layer.isVisible(baseRender._owner.layer.mask)&& baseRender.enable){\n\t\t\t\t\tif (lightFrustum[0].containsBoundSphere(baseRender.boundingSphere)!==/*laya.d3.math.ContainmentType.Disjoint*/0){\n\t\t\t\t\t\tbaseRender._renderUpdate(lightViewProjectMatrix);\n\t\t\t\t\t\tshadowQueue=shadowQueues[0];\n\t\t\t\t\t\trenderElements=baseRender._renderElements;\n\t\t\t\t\t\tfor (j=0,m=renderElements.length;j < m;j++)\n\t\t\t\t\t\tshadowQueue._addRenderElement(renderElements[j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tFrustumCulling.renderShadowObjectCullingOctree=function(scene,lightFrustum,quenesResult,lightViewProjectMatrix,nPSSMNum){\n\t\tfor (var i=0,n=quenesResult.length;i < n;i++){\n\t\t\tvar quene=quenesResult[i];\n\t\t\t(quene)&& (quene._clearRenderElements());\n\t\t}\n\t\tif (nPSSMNum > 1){\n\t\t\tscene.treeRoot.cullingShadowObjects(lightFrustum,quenesResult,true,0,scene);\n\t\t\t}else {\n\t\t\tscene.treeRoot.cullingShadowObjectsOnePSSM(lightFrustum[0],quenesResult,lightViewProjectMatrix,true,0,scene);\n\t\t}\n\t}\n\n\tFrustumCulling.renderObjectCulling=function(boundFrustum,scene,camera,view,projection,projectionView){\n\t\tvar i=0,n=0,j=0,m=0;\n\t\tvar queues=scene._quenes;\n\t\tvar dynamicBatchManager=scene._dynamicBatchManager;\n\t\tvar frustumCullingObjects=scene._cullingRenders;\n\t\tfor (i=0,n=queues.length;i < n;i++){\n\t\t\tvar queue=queues[i];\n\t\t\t(queue)&& (queue._clearRenderElements());\n\t\t};\n\t\tvar staticBatchManagers=StaticBatchManager._staticBatchManagers;\n\t\tfor (i=0,n=staticBatchManagers.length;i < n;i++)\n\t\tstaticBatchManagers[i]._clearRenderElements();\n\t\tdynamicBatchManager._clearRenderElements();\n\t\tvar cameraPosition=camera.transform.position;\n\t\tfor (i=0,n=scene._cullingRendersLength;i < n;i++){\n\t\t\tvar baseRender=frustumCullingObjects[i];\n\t\t\tif (Layer.isVisible(baseRender._owner.layer.mask)&& baseRender.enable && (boundFrustum.containsBoundSphere(baseRender.boundingSphere)!==/*laya.d3.math.ContainmentType.Disjoint*/0)){\n\t\t\t\tif (baseRender._renderUpdate(projectionView)){\n\t\t\t\t\tbaseRender._distanceForSort=Vector3.distance(baseRender.boundingSphere.center,cameraPosition)+baseRender.sortingFudge;\n\t\t\t\t\tvar renderElements=baseRender._renderElements;\n\t\t\t\t\tfor (j=0,m=renderElements.length;j < m;j++){\n\t\t\t\t\t\tvar renderElement=renderElements[j];\n\t\t\t\t\t\tvar staticBatch=renderElement._staticBatch;\n\t\t\t\t\t\tif (staticBatch && (staticBatch._material===renderElement._material)){\n\t\t\t\t\t\t\tstaticBatch._addBatchRenderElement(renderElement);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tvar renderObj=renderElement.renderObj;\n\t\t\t\t\t\t\tif ((renderObj.triangleCount < /*laya.d3.graphics.DynamicBatch.maxCombineTriangleCount*/10)&& (renderObj._vertexBufferCount===1)&& (renderObj._getIndexBuffer())&& (renderElement._material.renderQueue < 2)&& renderElement._canDynamicBatch && (!baseRender._owner.isStatic))\n\t\t\t\t\t\t\t\tdynamicBatchManager._addPrepareRenderElement(renderElement);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\tscene.getRenderQueue(renderElement._material.renderQueue)._addRenderElement(renderElement);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i=0,n=staticBatchManagers.length;i < n;i++)\n\t\tstaticBatchManagers[i]._addToRenderQueue(scene,view,projection,projectionView);\n\t\tdynamicBatchManager._finishCombineDynamicBatch(scene);\n\t\tdynamicBatchManager._addToRenderQueue(scene,view,projection,projectionView);\n\t}\n\n\tFrustumCulling.renderObjectCullingOctree=function(boundFrustum,scene,camera,view,projection,projectionView){\n\t\tvar i=0,n=0;\n\t\tvar queues=scene._quenes;\n\t\tvar dynamicBatchManager=scene._dynamicBatchManager;\n\t\tfor (i=0,n=queues.length;i < n;i++){\n\t\t\tvar queue=queues[i];\n\t\t\t(queue)&& (queue._clearRenderElements());\n\t\t};\n\t\tvar staticBatchManagers=StaticBatchManager._staticBatchManagers;\n\t\tfor (i=0,n=staticBatchManagers.length;i < n;i++)\n\t\tstaticBatchManagers[i]._clearRenderElements();\n\t\tdynamicBatchManager._clearRenderElements();\n\t\tscene._cullingRenders.length=0;\n\t\tscene.treeRoot.cullingObjects(boundFrustum,true,0,camera.transform.position,projectionView);\n\t\tfor (i=0,n=staticBatchManagers.length;i < n;i++)\n\t\tstaticBatchManagers[i]._addToRenderQueue(scene,view,projection,projectionView);\n\t\tdynamicBatchManager._finishCombineDynamicBatch(scene);\n\t\tdynamicBatchManager._addToRenderQueue(scene,view,projection,projectionView);\n\t}\n\n\tFrustumCulling.renderObjectCullingNoBoundFrustum=function(scene,camera,view,projection,projectionView){\n\t\tvar i=0,n=0,j=0,m=0;\n\t\tvar queues=scene._quenes;\n\t\tvar dynamicBatchManager=scene._dynamicBatchManager;\n\t\tvar frustumCullingObjects=scene._cullingRenders;\n\t\tfor (i=0,n=queues.length;i < n;i++){\n\t\t\tvar queue=queues[i];\n\t\t\t(queue)&& (queue._clearRenderElements());\n\t\t};\n\t\tvar staticBatchManagers=StaticBatchManager._staticBatchManagers;\n\t\tfor (i=0,n=staticBatchManagers.length;i < n;i++)\n\t\tstaticBatchManagers[i]._clearRenderElements();\n\t\tdynamicBatchManager._clearRenderElements();\n\t\tvar cameraPosition=camera.transform.position;\n\t\tfor (i=0,n=scene._cullingRendersLength;i < n;i++){\n\t\t\tvar baseRender=frustumCullingObjects[i];\n\t\t\tif (Layer.isVisible(baseRender._owner.layer.mask)&& baseRender.enable){\n\t\t\t\tbaseRender._renderUpdate(projectionView);\n\t\t\t\tbaseRender._distanceForSort=Vector3.distance(baseRender.boundingSphere.center,cameraPosition)+baseRender.sortingFudge;\n\t\t\t\tvar renderElements=baseRender._renderElements;\n\t\t\t\tfor (j=0,m=renderElements.length;j < m;j++){\n\t\t\t\t\tvar renderElement=renderElements[j];\n\t\t\t\t\tvar staticBatch=renderElement._staticBatch;\n\t\t\t\t\tif (staticBatch && (staticBatch._material===renderElement._material)){\n\t\t\t\t\t\tstaticBatch._addBatchRenderElement(renderElement);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvar renderObj=renderElement.renderObj;\n\t\t\t\t\t\tif ((renderObj.triangleCount < /*laya.d3.graphics.DynamicBatch.maxCombineTriangleCount*/10)&& (renderObj._vertexBufferCount===1)&& (renderObj._getIndexBuffer())&& (renderElement._material.renderQueue < 2)&& renderElement._canDynamicBatch && (!baseRender._owner.isStatic))\n\t\t\t\t\t\t\tdynamicBatchManager._addPrepareRenderElement(renderElement);\n\t\t\t\t\t\telse\n\t\t\t\t\t\tscene.getRenderQueue(renderElement._material.renderQueue)._addRenderElement(renderElement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (i=0,n=staticBatchManagers.length;i < n;i++)\n\t\tstaticBatchManagers[i]._addToRenderQueue(scene,view,projection,projectionView);\n\t\tdynamicBatchManager._finishCombineDynamicBatch(scene);\n\t\tdynamicBatchManager._addToRenderQueue(scene,view,projection,projectionView);\n\t}\n\n\treturn FrustumCulling;\n})()\n\n\n/**\n*@private\n*<code>StaticBatchManager</code> 类用于静态批处理管理的父类。\n*/\n//class laya.d3.graphics.StaticBatchManager\nvar StaticBatchManager=(function(){\n\tfunction StaticBatchManager(){\n\t\t/**@private */\n\t\tthis._initBatchRenderElements=null;\n\t\t/**@private */\n\t\tthis._staticBatches=null;\n\t\tthis._initBatchRenderElements=[];\n\t\tthis._staticBatches={};\n\t}\n\n\t__class(StaticBatchManager,'laya.d3.graphics.StaticBatchManager');\n\tvar __proto=StaticBatchManager.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._finishInit=function(){\n\t\tfor (var key in this._staticBatches)\n\t\tthis._staticBatches[key]._finishInit();\n\t\tthis._initBatchRenderElements.length=0;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initStaticBatchs=function(rootSprite){\n\t\tthrow new Error(\"StaticBatchManager:must override this function.\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addInitBatchSprite=function(renderableSprite3D){\n\t\tvar renderElements=renderableSprite3D._render._renderElements;\n\t\tfor (var i=0,n=renderElements.length;i < n;i++)\n\t\tthis._initBatchRenderElements.push(renderElements[i]);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._clearRenderElements=function(){\n\t\tfor (var key in this._staticBatches)\n\t\tthis._staticBatches[key]._clearRenderElements();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._garbageCollection=function(renderElement){\n\t\tvar staticBatch=renderElement._staticBatch;\n\t\tvar initBatchRenderElements=staticBatch._initBatchRenderElements;\n\t\tvar index=initBatchRenderElements.indexOf(renderElement);\n\t\tinitBatchRenderElements.splice(index,1);\n\t\tif (initBatchRenderElements.length===0){\n\t\t\tstaticBatch.dispose();\n\t\t\tdelete this._staticBatches[staticBatch._key];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addToRenderQueue=function(scene,view,projection,projectionView){\n\t\tfor (var key in this._staticBatches){\n\t\t\tvar staticBatch=this._staticBatches[key];\n\t\t\tif (staticBatch._batchRenderElements.length > 0)\n\t\t\t\tstaticBatch._updateToRenderQueue(scene,projectionView);\n\t\t}\n\t}\n\n\t__proto.dispose=function(){\n\t\tthis._staticBatches=null;\n\t}\n\n\tStaticBatchManager._addToStaticBatchQueue=function(sprite3D){\n\t\tif ((sprite3D instanceof laya.d3.core.RenderableSprite3D ))\n\t\t\t(sprite3D)._addToInitStaticBatchManager();\n\t\tfor (var i=0,n=sprite3D.numChildren;i < n;i++)\n\t\tStaticBatchManager._addToStaticBatchQueue(sprite3D._childs [i]);\n\t}\n\n\tStaticBatchManager.combine=function(staticBatchRoot,renderableSprite3Ds){\n\t\tvar i=0,n=0,staticBatchManager;\n\t\tif (renderableSprite3Ds){\n\t\t\tfor (i=0,n=renderableSprite3Ds.length;i < n;i++){\n\t\t\t\tvar renderableSprite3D=renderableSprite3Ds[i];\n\t\t\t\trenderableSprite3D._addToInitStaticBatchManager();\n\t\t\t}\n\t\t\t}else {\n\t\t\tif (staticBatchRoot)\n\t\t\t\tStaticBatchManager._addToStaticBatchQueue(staticBatchRoot);\n\t\t}\n\t\tfor (i=0,n=StaticBatchManager._staticBatchManagers.length;i < n;i++){\n\t\t\tstaticBatchManager=StaticBatchManager._staticBatchManagers[i];\n\t\t\tstaticBatchManager._initStaticBatchs(staticBatchRoot);\n\t\t\tstaticBatchManager._finishInit();\n\t\t}\n\t}\n\n\tStaticBatchManager._staticBatchManagers=[];\n\treturn StaticBatchManager;\n})()\n\n\n/**\n*<code>StaticBatch</code> 类用于静态合并的父类,该类为抽象类。\n*/\n//class laya.d3.graphics.StaticBatch\nvar StaticBatch=(function(){\n\tfunction StaticBatch(key,manager,rootOwner){\n\t\t/**@private */\n\t\tthis._combineRenderElementPoolIndex=0;\n\t\t/**@private */\n\t\tthis._combineRenderElementPool=null;\n\t\t/**@private */\n\t\tthis._initBatchRenderElements=null;\n\t\t/**@private */\n\t\tthis._batchRenderElements=null;\n\t\t/**@private */\n\t\tthis._material=null;\n\t\t/**@private */\n\t\tthis._rootOwner=null;\n\t\t/**@private */\n\t\tthis._key=null;\n\t\t/**@private */\n\t\tthis._manager=null;\n\t\tthis._key=key;\n\t\tthis._manager=manager;\n\t\tthis._combineRenderElementPoolIndex=0;\n\t\tthis._combineRenderElementPool=[];\n\t\tthis._initBatchRenderElements=[];\n\t\tthis._batchRenderElements=[];\n\t\tthis._rootOwner=rootOwner;\n\t}\n\n\t__class(StaticBatch,'laya.d3.graphics.StaticBatch');\n\tvar __proto=StaticBatch.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true,\"laya.resource.IDispose\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._binarySearch=function(renderElement){\n\t\tvar start=0;\n\t\tvar end=this._batchRenderElements.length-1;\n\t\tvar mid=0;\n\t\twhile (start <=end){\n\t\t\tmid=Math.floor((start+end)/ 2);\n\t\t\tif (this._compareBatchRenderElement(this._batchRenderElements[mid],renderElement))\n\t\t\t\tend=mid-1;\n\t\t\telse\n\t\t\tstart=mid+1;\n\t\t}\n\t\treturn start;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._compareBatchRenderElement=function(a,b){\n\t\tthrow new Error(\"StaticBatch:must override this function.\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getVertexDecLightMap=function(vertexDeclaration){\n\t\tif (vertexDeclaration===VertexPositionNormalTextureSkinSTangent.vertexDeclaration){\n\t\t\treturn VertexPositionNormalTexture0Texture1SkinSTangent.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalTextureSkin.vertexDeclaration){\n\t\t\treturn VertexPositionNormalTexture0Texture1Skin.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalColorTextureSTangent.vertexDeclaration){\n\t\t\treturn VertexPositionNormalColorTexture0Texture1STangent.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNTBTexture.vertexDeclaration){\n\t\t\treturn null;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalColorTexture.vertexDeclaration){\n\t\t\treturn VertexPositionNormalColorTexture0Texture1.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalTextureSTangent.vertexDeclaration){\n\t\t\treturn VertexPositionNormalTexture0Texture1STangent.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalTexture.vertexDeclaration){\n\t\t\treturn VertexPositionNormalTexture0Texture1.vertexDeclaration;\n\t\t}\n\t\tif (vertexDeclaration===VertexPositionNormalTextureSkinTangent.vertexDeclaration){\n\t\t\treturn VertexPositionNormalTexture0Texture1SkinTangent.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalTextureSkin.vertexDeclaration){\n\t\t\treturn VertexPositionNormalTexture0Texture1Skin.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalColorTextureTangent.vertexDeclaration){\n\t\t\treturn VertexPositionNormalColorTexture0Texture1Tangent.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNTBTexture.vertexDeclaration){\n\t\t\treturn null;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalColorTexture.vertexDeclaration){\n\t\t\treturn VertexPositionNormalColorTexture0Texture1.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalTextureTangent.vertexDeclaration){\n\t\t\treturn VertexPositionNormalTexture0Texture1Tangent.vertexDeclaration;\n\t\t\t}else if (vertexDeclaration===VertexPositionNormalTexture.vertexDeclaration){\n\t\t\treturn VertexPositionNormalTexture0Texture1.vertexDeclaration;\n\t\t\t}else {\n\t\t\treturn vertexDeclaration;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getCombineRenderElementFromPool=function(){\n\t\tthrow new Error(\"StaticBatch:must override this function.\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addBatchRenderElement=function(renderElement){\n\t\tthis._batchRenderElements.splice(this._binarySearch(renderElement),0,renderElement);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateToRenderQueue=function(scene,projectionView){\n\t\tthis._combineRenderElementPoolIndex=0;\n\t\tthis._getRenderElement(scene.getRenderQueue(this._material.renderQueue)._renderElements,scene,projectionView);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getRenderElement=function(mergeElements,scene,projectionView){\n\t\tthrow new Error(\"StaticBatch:must override this function.\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._finishInit=function(){\n\t\tthrow new Error(\"StaticBatch:must override this function.\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._clearRenderElements=function(){\n\t\tthis._batchRenderElements.length=0;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.dispose=function(){}\n\t//..................临时.................................\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\treturn null;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn null;\n\t}\n\n\t__proto._beforeRender=function(state){\n\t\treturn true;\n\t}\n\n\t__proto._render=function(state){}\n\t/**\n\t*@private\n\t*/\n\t__proto._getVertexBuffers=function(){\n\t\treturn null;\n\t}\n\n\t//..................临时.................................\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn 1;\n\t});\n\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn 0;\n\t});\n\n\tStaticBatch.combine=function(staticBatchRoot){\n\t\tconsole.log(\"StaticBatch: discard property,please use StaticBatchManager.combine() function instead.\");\n\t\tStaticBatchManager.combine(staticBatchRoot);\n\t}\n\n\tStaticBatch.maxBatchVertexCount=65535;\n\treturn StaticBatch;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.graphics.VertexDeclaration\nvar VertexDeclaration=(function(){\n\tfunction VertexDeclaration(vertexStride,vertexElements){\n\t\tthis._id=0;\n\t\tthis._shaderValues=null;\n\t\tthis._shaderDefineValue=0;\n\t\t//private var _shaderAttribute:*;\n\t\tthis._vertexStride=0;\n\t\tthis._vertexElements=null;\n\t\tthis._vertexElementsDic=null;\n\t\tthis._id=++VertexDeclaration._uniqueIDCounter;\n\t\tif (this._id > VertexDeclaration.maxVertexDeclaration)\n\t\t\tthrow new Error(\"VertexDeclaration: VertexDeclaration count should not large than \",VertexDeclaration.maxVertexDeclaration);\n\t\tthis._shaderValues=new ValusArray();\n\t\tthis._vertexElementsDic={};\n\t\tthis._vertexStride=vertexStride;\n\t\tthis._vertexElements=vertexElements;\n\t\tfor (var i=0;i < vertexElements.length;i++){\n\t\t\tvar vertexElement=vertexElements[i];\n\t\t\tvar attributeName=vertexElement.elementUsage;\n\t\t\tthis._vertexElementsDic[attributeName]=vertexElement;\n\t\t\tvar value=[VertexDeclaration._getTypeSize(vertexElement.elementFormat)/ 4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,this._vertexStride,vertexElement.offset];\n\t\t\tthis._shaderValues.setValue(attributeName,value);\n\t\t\tswitch (attributeName){\n\t\t\t\tcase /*laya.d3.graphics.VertexElementUsage.COLOR0*/1:\n\t\t\t\t\tthis._addShaderDefine(ShaderCompile3D.SHADERDEFINE_COLOR);\n\t\t\t\t\tbreak\n\t\t\t\tcase /*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2:\n\t\t\t\t\tthis._addShaderDefine(ShaderCompile3D.SHADERDEFINE_UV0);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15:\n\t\t\t\t\tthis._addShaderDefine(ShaderCompile3D.SHADERDEFINE_UV1);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t}\n\n\t__class(VertexDeclaration,'laya.d3.graphics.VertexDeclaration');\n\tvar __proto=VertexDeclaration.prototype;\n\t/**\n\t*增加Shader宏定义。\n\t*@param value 宏定义。\n\t*/\n\t__proto._addShaderDefine=function(value){\n\t\tthis._shaderDefineValue |=value;\n\t}\n\n\t/**\n\t*移除Shader宏定义。\n\t*@param value 宏定义。\n\t*/\n\t__proto._removeShaderDefine=function(value){\n\t\tthis._shaderDefineValue &=~value;\n\t}\n\n\t__proto.getVertexElements=function(){\n\t\treturn this._vertexElements.slice();\n\t}\n\n\t__proto.getVertexElementByUsage=function(usage){\n\t\treturn this._vertexElementsDic[usage];\n\t}\n\n\t__proto.unBinding=function(){}\n\t__getset(0,__proto,'shaderDefineValue',function(){\n\t\treturn this._shaderDefineValue;\n\t});\n\n\t/**\n\t*获取唯一标识ID(通常用于优化或识别)。\n\t*@return 唯一标识ID\n\t*/\n\t__getset(0,__proto,'id',function(){\n\t\treturn this._id;\n\t});\n\n\t__getset(0,__proto,'vertexStride',function(){\n\t\treturn this._vertexStride;\n\t});\n\n\t__getset(0,__proto,'shaderValues',function(){\n\t\treturn this._shaderValues;\n\t});\n\n\tVertexDeclaration._getTypeSize=function(format){\n\t\tswitch (format){\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.Single*/\"single\":\n\t\t\t\treturn 4;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\":\n\t\t\t\treturn 8;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\":\n\t\t\t\treturn 12;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\":\n\t\t\t\treturn 16;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.Color*/\"color\":\n\t\t\t\treturn 4;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.Byte4*/\"byte4\":\n\t\t\t\treturn 4;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.Short2*/\"short2\":\n\t\t\t\treturn 4;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.Short4*/\"short4\":\n\t\t\t\treturn 8;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.NormalizedShort2*/\"normalizedshort2\":\n\t\t\t\treturn 4;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.NormalizedShort4*/\"normalizedshort4\":\n\t\t\t\treturn 8;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.HalfVector2*/\"halfvector2\":\n\t\t\t\treturn 4;\n\t\t\tcase /*laya.d3.graphics.VertexElementFormat.HalfVector4*/\"halfvector4\":\n\t\t\t\treturn 8;\n\t\t\t}\n\t\treturn 0;\n\t}\n\n\tVertexDeclaration.getVertexStride=function(vertexElements){\n\t\tvar curStride=0;\n\t\tfor (var i=0;i < vertexElements.Length;i++){\n\t\t\tvar element=vertexElements[i];\n\t\t\tvar stride=element.offset+VertexDeclaration._getTypeSize(element.elementFormat);\n\t\t\tif (curStride < stride){\n\t\t\t\tcurStride=stride;\n\t\t\t}\n\t\t}\n\t\treturn curStride;\n\t}\n\n\tVertexDeclaration._maxVertexDeclarationBit=1000;\n\tVertexDeclaration._uniqueIDCounter=1;\n\t__static(VertexDeclaration,\n\t['maxVertexDeclaration',function(){return this.maxVertexDeclaration=2147483647-Math.floor(2147483647 / 1000)*1000;}\n\t]);\n\treturn VertexDeclaration;\n})()\n\n\n/**\n*<code>VertexElement</code> 类用于创建顶点结构分配。\n*/\n//class laya.d3.graphics.VertexElement\nvar VertexElement=(function(){\n\tfunction VertexElement(offset,elementFormat,elementUsage){\n\t\tthis.offset=0;\n\t\tthis.elementFormat=null;\n\t\tthis.elementUsage=0;\n\t\tthis.offset=offset;\n\t\tthis.elementFormat=elementFormat;\n\t\tthis.elementUsage=elementUsage;\n\t}\n\n\t__class(VertexElement,'laya.d3.graphics.VertexElement');\n\treturn VertexElement;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.graphics.VertexElementFormat\nvar VertexElementFormat=(function(){\n\tfunction VertexElementFormat(){}\n\t__class(VertexElementFormat,'laya.d3.graphics.VertexElementFormat');\n\tVertexElementFormat.Single=\"single\";\n\tVertexElementFormat.Vector2=\"vector2\";\n\tVertexElementFormat.Vector3=\"vector3\";\n\tVertexElementFormat.Vector4=\"vector4\";\n\tVertexElementFormat.Color=\"color\";\n\tVertexElementFormat.Byte4=\"byte4\";\n\tVertexElementFormat.Short2=\"short2\";\n\tVertexElementFormat.Short4=\"short4\";\n\tVertexElementFormat.NormalizedShort2=\"normalizedshort2\";\n\tVertexElementFormat.NormalizedShort4=\"normalizedshort4\";\n\tVertexElementFormat.HalfVector2=\"halfvector2\";\n\tVertexElementFormat.HalfVector4=\"halfvector4\";\n\treturn VertexElementFormat;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.graphics.VertexElementUsage\nvar VertexElementUsage=(function(){\n\tfunction VertexElementUsage(){}\n\t__class(VertexElementUsage,'laya.d3.graphics.VertexElementUsage');\n\tVertexElementUsage.POSITION0=0;\n\tVertexElementUsage.COLOR0=1;\n\tVertexElementUsage.TEXTURECOORDINATE0=2;\n\tVertexElementUsage.NORMAL0=3;\n\tVertexElementUsage.BINORMAL0=4;\n\tVertexElementUsage.TANGENT0=5;\n\tVertexElementUsage.BLENDINDICES0=6;\n\tVertexElementUsage.BLENDWEIGHT0=7;\n\tVertexElementUsage.DEPTH0=8;\n\tVertexElementUsage.FOG0=9;\n\tVertexElementUsage.POINTSIZE0=10;\n\tVertexElementUsage.SAMPLE0=11;\n\tVertexElementUsage.TESSELLATEFACTOR0=12;\n\tVertexElementUsage.COLOR1=13;\n\tVertexElementUsage.NEXTTEXTURECOORDINATE0=14;\n\tVertexElementUsage.TEXTURECOORDINATE1=15;\n\tVertexElementUsage.NEXTTEXTURECOORDINATE1=16;\n\tVertexElementUsage.CORNERTEXTURECOORDINATE0=17;\n\tVertexElementUsage.VELOCITY0=18;\n\tVertexElementUsage.STARTCOLOR0=19;\n\tVertexElementUsage.STARTSIZE=20;\n\tVertexElementUsage.AGEADDSCALE0=21;\n\tVertexElementUsage.STARTROTATION=22;\n\tVertexElementUsage.ENDCOLOR0=23;\n\tVertexElementUsage.STARTLIFETIME=24;\n\tVertexElementUsage.TIME0=33;\n\tVertexElementUsage.SHAPEPOSITIONSTARTLIFETIME=30;\n\tVertexElementUsage.DIRECTIONTIME=32;\n\tVertexElementUsage.SIZEROTATION0=27;\n\tVertexElementUsage.RADIUS0=28;\n\tVertexElementUsage.RADIAN0=29;\n\tVertexElementUsage.STARTSPEED=31;\n\tVertexElementUsage.RANDOM0=34;\n\tVertexElementUsage.RANDOM1=35;\n\tVertexElementUsage.SIMULATIONWORLDPOSTION=36;\n\tVertexElementUsage.SIMULATIONWORLDROTATION=37;\n\tVertexElementUsage.TEXTURECOORDINATE0X=38;\n\tVertexElementUsage.TEXTURECOORDINATE0X1=39;\n\tVertexElementUsage.TEXTURECOORDINATE0Y=40;\n\tVertexElementUsage.OFFSETVECTOR=41;\n\treturn VertexElementUsage;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTangent</code> 类用于创建粒子顶点结构。\n*/\n//class laya.d3.graphics.VertexGlitter\nvar VertexGlitter=(function(){\n\tfunction VertexGlitter(position,textureCoordinate,time){\n\t\tthis._position=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._time=NaN;\n\t\tthis._position=position;\n\t\tthis._textureCoordinate0=textureCoordinate;\n\t\tthis._time=time;\n\t}\n\n\t__class(VertexGlitter,'laya.d3.graphics.VertexGlitter');\n\tvar __proto=VertexGlitter.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'time',function(){\n\t\treturn this._time;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexGlitter._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexGlitter,'vertexDeclaration',function(){\n\t\treturn VertexGlitter._vertexDeclaration;\n\t});\n\n\t__static(VertexGlitter,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(24,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(20,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.TIME0*/33)]);}\n\t]);\n\treturn VertexGlitter;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTangent</code> 类用于创建粒子顶点结构。\n*/\n//class laya.d3.graphics.VertexParticle\nvar VertexParticle=(function(){\n\tfunction VertexParticle(cornerTextureCoordinate,position,velocity,startColor,endColor,sizeRotation,radius,radian,ageAddScale,time){\n\t\tthis._cornerTextureCoordinate=null;\n\t\tthis._position=null;\n\t\tthis._velocity=null;\n\t\tthis._startColor=null;\n\t\tthis._endColor=null;\n\t\tthis._sizeRotation=null;\n\t\tthis._radius=null;\n\t\tthis._radian=null;\n\t\tthis._ageAddScale=NaN;\n\t\tthis._time=NaN;\n\t\tthis._cornerTextureCoordinate=cornerTextureCoordinate;\n\t\tthis._position=position;\n\t\tthis._velocity=velocity;\n\t\tthis._startColor=startColor;\n\t\tthis._endColor=endColor;\n\t\tthis._sizeRotation=sizeRotation;\n\t\tthis._radius=radius;\n\t\tthis._radian=radian;\n\t\tthis._ageAddScale=ageAddScale;\n\t\tthis._time=time;\n\t}\n\n\t__class(VertexParticle,'laya.d3.graphics.VertexParticle');\n\tvar __proto=VertexParticle.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'endColor',function(){\n\t\treturn this._endColor;\n\t});\n\n\t__getset(0,__proto,'cornerTextureCoordinate',function(){\n\t\treturn this._cornerTextureCoordinate;\n\t});\n\n\t__getset(0,__proto,'sizeRotation',function(){\n\t\treturn this._sizeRotation;\n\t});\n\n\t__getset(0,__proto,'velocity',function(){\n\t\treturn this._velocity;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'startColor',function(){\n\t\treturn this._startColor;\n\t});\n\n\t__getset(0,__proto,'radius',function(){\n\t\treturn this._radius;\n\t});\n\n\t__getset(0,__proto,'radian',function(){\n\t\treturn this._radian;\n\t});\n\n\t__getset(0,__proto,'ageAddScale',function(){\n\t\treturn this._ageAddScale;\n\t});\n\n\t__getset(0,__proto,'time',function(){\n\t\treturn this._time;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexParticle._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexParticle,'vertexDeclaration',function(){\n\t\treturn VertexParticle._vertexDeclaration;\n\t});\n\n\t__static(VertexParticle,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(116,\n\t\t[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.CORNERTEXTURECOORDINATE0*/17),\n\t\tnew VertexElement(16,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(28,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.VELOCITY0*/18),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.STARTCOLOR0*/19),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.ENDCOLOR0*/23),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.SIZEROTATION0*/27),\n\t\tnew VertexElement(84,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.RADIUS0*/28),\n\t\tnew VertexElement(92,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.RADIAN0*/29),\n\t\tnew VertexElement(108,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.STARTLIFETIME*/24),\n\t\tnew VertexElement(112,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.TIME0*/33)]);}\n\t]);\n\treturn VertexParticle;\n})()\n\n\n//class laya.d3.graphics.VertexPosition\nvar VertexPosition=(function(){\n\tfunction VertexPosition(position){\n\t\tthis._position=null;\n\t\tthis._position=position;\n\t}\n\n\t__class(VertexPosition,'laya.d3.graphics.VertexPosition');\n\tvar __proto=VertexPosition.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPosition._vertexDeclaration;\n\t});\n\n\t/*INTERFACE laya.d3.graphics.IVertex */\n\t__getset(1,VertexPosition,'vertexDeclaration',function(){\n\t\treturn VertexPosition._vertexDeclaration;\n\t});\n\n\t__static(VertexPosition,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(12,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0)]);}\n\t]);\n\treturn VertexPosition;\n})()\n\n\n//class laya.d3.graphics.VertexPositionNormal\nvar VertexPositionNormal=(function(){\n\tfunction VertexPositionNormal(position,normal){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t}\n\n\t__class(VertexPositionNormal,'laya.d3.graphics.VertexPositionNormal');\n\tvar __proto=VertexPositionNormal.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormal._vertexDeclaration;\n\t});\n\n\t/*INTERFACE laya.d3.graphics.IVertex */\n\t__getset(1,VertexPositionNormal,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormal._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormal,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(24,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3)]);}\n\t]);\n\treturn VertexPositionNormal;\n})()\n\n\n/**\n*<code>VertexPositionNormalColor</code> 类用于创建位置、法线、颜色顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColor\nvar VertexPositionNormalColor=(function(){\n\tfunction VertexPositionNormalColor(position,normal,color){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t}\n\n\t__class(VertexPositionNormalColor,'laya.d3.graphics.VertexPositionNormalColor');\n\tvar __proto=VertexPositionNormalColor.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColor._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColor,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColor._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColor,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(40,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1)]);}\n\t]);\n\treturn VertexPositionNormalColor;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorSkin</code> 类用于创建位置、法线、颜色、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorSkin\nvar VertexPositionNormalColorSkin=(function(){\n\tfunction VertexPositionNormalColorSkin(position,normal,color,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalColorSkin,'laya.d3.graphics.VertexPositionNormalColorSkin');\n\tvar __proto=VertexPositionNormalColorSkin.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorSkin._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorSkin,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorSkin._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorSkin,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(72,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6)]);}\n\t]);\n\treturn VertexPositionNormalColorSkin;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorSkin</code> 类用于创建位置、法线、颜色、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorSkinSTangent\nvar VertexPositionNormalColorSkinSTangent=(function(){\n\tfunction VertexPositionNormalColorSkinSTangent(position,normal,color,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalColorSkinSTangent,'laya.d3.graphics.VertexPositionNormalColorSkinSTangent');\n\tvar __proto=VertexPositionNormalColorSkinSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorSkinSTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorSkinSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorSkinSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorSkinSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(88,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorSkinSTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorSkin</code> 类用于创建位置、法线、颜色、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorSkinTangent\nvar VertexPositionNormalColorSkinTangent=(function(){\n\tfunction VertexPositionNormalColorSkinTangent(position,normal,color,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalColorSkinTangent,'laya.d3.graphics.VertexPositionNormalColorSkinTangent');\n\tvar __proto=VertexPositionNormalColorSkinTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorSkinTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorSkinTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorSkinTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorSkinTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(84,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorSkinTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTangent</code> 类用于创建位置、法线、颜色、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorSTangent\nvar VertexPositionNormalColorSTangent=(function(){\n\tfunction VertexPositionNormalColorSTangent(position,normal,color,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalColorSTangent,'laya.d3.graphics.VertexPositionNormalColorSTangent');\n\tvar __proto=VertexPositionNormalColorSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorSTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(56,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorSTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTangent</code> 类用于创建位置、法线、颜色、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTangent\nvar VertexPositionNormalColorTangent=(function(){\n\tfunction VertexPositionNormalColorTangent(position,normal,color,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalColorTangent,'laya.d3.graphics.VertexPositionNormalColorTangent');\n\tvar __proto=VertexPositionNormalColorTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(52,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTexture</code> 类用于创建位置、法线、颜色、纹理顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTexture\nvar VertexPositionNormalColorTexture=(function(){\n\tfunction VertexPositionNormalColorTexture(position,normal,color,textureCoordinate){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t}\n\n\t__class(VertexPositionNormalColorTexture,'laya.d3.graphics.VertexPositionNormalColorTexture');\n\tvar __proto=VertexPositionNormalColorTexture.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTexture,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTexture,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(48,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2)]);}\n\t]);\n\treturn VertexPositionNormalColorTexture;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTexture</code> 类用于创建位置、法线、颜色、纹理顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTexture0Texture1\nvar VertexPositionNormalColorTexture0Texture1=(function(){\n\tfunction VertexPositionNormalColorTexture0Texture1(position,normal,color,textureCoordinate0,textureCoordinate1){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t}\n\n\t__class(VertexPositionNormalColorTexture0Texture1,'laya.d3.graphics.VertexPositionNormalColorTexture0Texture1');\n\tvar __proto=VertexPositionNormalColorTexture0Texture1.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTexture0Texture1,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTexture0Texture1,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(56,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15)]);}\n\t]);\n\treturn VertexPositionNormalColorTexture0Texture1;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTextureSkin</code> 类用于创建位置、法线、颜色、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTexture0Texture1Skin\nvar VertexPositionNormalColorTexture0Texture1Skin=(function(){\n\tfunction VertexPositionNormalColorTexture0Texture1Skin(position,normal,color,textureCoordinate0,textureCoordinate1,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalColorTexture0Texture1Skin,'laya.d3.graphics.VertexPositionNormalColorTexture0Texture1Skin');\n\tvar __proto=VertexPositionNormalColorTexture0Texture1Skin.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1Skin._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTexture0Texture1Skin,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1Skin._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTexture0Texture1Skin,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(88,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6)]);}\n\t]);\n\treturn VertexPositionNormalColorTexture0Texture1Skin;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTexture0Texture1SkinSTangent\nvar VertexPositionNormalColorTexture0Texture1SkinSTangent=(function(){\n\tfunction VertexPositionNormalColorTexture0Texture1SkinSTangent(position,normal,color,textureCoordinate0,textureCoordinate1,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalColorTexture0Texture1SkinSTangent,'laya.d3.graphics.VertexPositionNormalColorTexture0Texture1SkinSTangent');\n\tvar __proto=VertexPositionNormalColorTexture0Texture1SkinSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1SkinSTangent._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTexture0Texture1SkinSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1SkinSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTexture0Texture1SkinSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(104,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(88,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTexture0Texture1SkinSTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTexture0Texture1SkinTangent\nvar VertexPositionNormalColorTexture0Texture1SkinTangent=(function(){\n\tfunction VertexPositionNormalColorTexture0Texture1SkinTangent(){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t}\n\n\t__class(VertexPositionNormalColorTexture0Texture1SkinTangent,'laya.d3.graphics.VertexPositionNormalColorTexture0Texture1SkinTangent');\n\tvar __proto=VertexPositionNormalColorTexture0Texture1SkinTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__proto.VertexPositionNormalColorTexture0SkinTangent=function(position,normal,color,textureCoordinate0,textureCoordinate1,tangent,blendIndex,blendWeight){\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1SkinTangent._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTexture0Texture1SkinTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1SkinTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTexture0Texture1SkinTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(100,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(88,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTexture0Texture1SkinTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTextureTangent</code> 类用于创建位置、法线、颜色、纹理、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTexture0Texture1STangent\nvar VertexPositionNormalColorTexture0Texture1STangent=(function(){\n\tfunction VertexPositionNormalColorTexture0Texture1STangent(position,normal,color,textureCoordinate0,textureCoordinate1,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalColorTexture0Texture1STangent,'laya.d3.graphics.VertexPositionNormalColorTexture0Texture1STangent');\n\tvar __proto=VertexPositionNormalColorTexture0Texture1STangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1STangent._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTexture0Texture1STangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1STangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTexture0Texture1STangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(72,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTexture0Texture1STangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTextureTangent</code> 类用于创建位置、法线、颜色、纹理、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTexture0Texture1Tangent\nvar VertexPositionNormalColorTexture0Texture1Tangent=(function(){\n\tfunction VertexPositionNormalColorTexture0Texture1Tangent(){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._tangent=null;\n\t}\n\n\t__class(VertexPositionNormalColorTexture0Texture1Tangent,'laya.d3.graphics.VertexPositionNormalColorTexture0Texture1Tangent');\n\tvar __proto=VertexPositionNormalColorTexture0Texture1Tangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__proto.VertexPositionNormalColorTexture0Tangent=function(position,normal,color,textureCoordinate0,textureCoordinate1,tangent){\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1Tangent._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTexture0Texture1Tangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTexture0Texture1Tangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTexture0Texture1Tangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(68,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTexture0Texture1Tangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTextureSkin</code> 类用于创建位置、法线、颜色、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTextureSkin\nvar VertexPositionNormalColorTextureSkin=(function(){\n\tfunction VertexPositionNormalColorTextureSkin(position,normal,color,textureCoordinate,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalColorTextureSkin,'laya.d3.graphics.VertexPositionNormalColorTextureSkin');\n\tvar __proto=VertexPositionNormalColorTextureSkin.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureSkin._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTextureSkin,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureSkin._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTextureSkin,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(80,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(64,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6)]);}\n\t]);\n\treturn VertexPositionNormalColorTextureSkin;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTextureSkinSTangent\nvar VertexPositionNormalColorTextureSkinSTangent=(function(){\n\tfunction VertexPositionNormalColorTextureSkinSTangent(position,normal,color,textureCoordinate,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalColorTextureSkinSTangent,'laya.d3.graphics.VertexPositionNormalColorTextureSkinSTangent');\n\tvar __proto=VertexPositionNormalColorTextureSkinSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureSkinSTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTextureSkinSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureSkinSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTextureSkinSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(96,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(64,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(80,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTextureSkinSTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTextureSkinTangent\nvar VertexPositionNormalColorTextureSkinTangent=(function(){\n\tfunction VertexPositionNormalColorTextureSkinTangent(position,normal,color,textureCoordinate,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalColorTextureSkinTangent,'laya.d3.graphics.VertexPositionNormalColorTextureSkinTangent');\n\tvar __proto=VertexPositionNormalColorTextureSkinTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureSkinTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTextureSkinTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureSkinTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTextureSkinTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(92,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(64,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(80,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTextureSkinTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTextureTangent</code> 类用于创建位置、法线、颜色、纹理、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTextureSTangent\nvar VertexPositionNormalColorTextureSTangent=(function(){\n\tfunction VertexPositionNormalColorTextureSTangent(position,normal,color,textureCoordinate,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalColorTextureSTangent,'laya.d3.graphics.VertexPositionNormalColorTextureSTangent');\n\tvar __proto=VertexPositionNormalColorTextureSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureSTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTextureSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTextureSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(64,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTextureSTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTextureTangent</code> 类用于创建位置、法线、颜色、纹理、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalColorTextureTangent\nvar VertexPositionNormalColorTextureTangent=(function(){\n\tfunction VertexPositionNormalColorTextureTangent(position,normal,color,textureCoordinate,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._color=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._color=color;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalColorTextureTangent,'laya.d3.graphics.VertexPositionNormalColorTextureTangent');\n\tvar __proto=VertexPositionNormalColorTextureTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._color;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalColorTextureTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalColorTextureTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalColorTextureTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(60,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalColorTextureTangent;\n})()\n\n\n//class laya.d3.graphics.VertexPositionNormalSTangent\nvar VertexPositionNormalSTangent=(function(){\n\tfunction VertexPositionNormalSTangent(position,normal,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalSTangent,'laya.d3.graphics.VertexPositionNormalSTangent');\n\tvar __proto=VertexPositionNormalSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalSTangent._vertexDeclaration;\n\t});\n\n\t/*INTERFACE laya.d3.graphics.IVertex */\n\t__getset(1,VertexPositionNormalSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(40,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalSTangent;\n})()\n\n\n//class laya.d3.graphics.VertexPositionNormalTangent\nvar VertexPositionNormalTangent=(function(){\n\tfunction VertexPositionNormalTangent(position,normal,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalTangent,'laya.d3.graphics.VertexPositionNormalTangent');\n\tvar __proto=VertexPositionNormalTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTangent._vertexDeclaration;\n\t});\n\n\t/*INTERFACE laya.d3.graphics.IVertex */\n\t__getset(1,VertexPositionNormalTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(36,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTexture</code> 类用于创建位置、法线、纹理顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTexture\nvar VertexPositionNormalTexture=(function(){\n\tfunction VertexPositionNormalTexture(position,normal,textureCoordinate){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t}\n\n\t__class(VertexPositionNormalTexture,'laya.d3.graphics.VertexPositionNormalTexture');\n\tvar __proto=VertexPositionNormalTexture.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalTexture,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTexture,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(32,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2)]);}\n\t]);\n\treturn VertexPositionNormalTexture;\n})()\n\n\n/**\n*<code>VertexPositionNormalTexture</code> 类用于创建位置、法线、纹理顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTexture0Texture1\nvar VertexPositionNormalTexture0Texture1=(function(){\n\tfunction VertexPositionNormalTexture0Texture1(position,normal,textureCoordinate0,textureCoordinate1){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t}\n\n\t__class(VertexPositionNormalTexture0Texture1,'laya.d3.graphics.VertexPositionNormalTexture0Texture1');\n\tvar __proto=VertexPositionNormalTexture0Texture1.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(1,VertexPositionNormalTexture0Texture1,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTexture0Texture1,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(40,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15)]);}\n\t]);\n\treturn VertexPositionNormalTexture0Texture1;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTextureSkin</code> 类用于创建位置、法线、颜色、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTexture0Texture1Skin\nvar VertexPositionNormalTexture0Texture1Skin=(function(){\n\tfunction VertexPositionNormalTexture0Texture1Skin(position,normal,textureCoordinate0,textureCoordinate1,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalTexture0Texture1Skin,'laya.d3.graphics.VertexPositionNormalTexture0Texture1Skin');\n\tvar __proto=VertexPositionNormalTexture0Texture1Skin.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1Skin._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(1,VertexPositionNormalTexture0Texture1Skin,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1Skin._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTexture0Texture1Skin,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(72,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6)]);}\n\t]);\n\treturn VertexPositionNormalTexture0Texture1Skin;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTexture0Texture1SkinSTangent\nvar VertexPositionNormalTexture0Texture1SkinSTangent=(function(){\n\tfunction VertexPositionNormalTexture0Texture1SkinSTangent(position,normal,textureCoordinate0,textureCoordinate1,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalTexture0Texture1SkinSTangent,'laya.d3.graphics.VertexPositionNormalTexture0Texture1SkinSTangent');\n\tvar __proto=VertexPositionNormalTexture0Texture1SkinSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1SkinSTangent._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(1,VertexPositionNormalTexture0Texture1SkinSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1SkinSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTexture0Texture1SkinSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(88,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTexture0Texture1SkinSTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTexture0Texture1SkinTangent\nvar VertexPositionNormalTexture0Texture1SkinTangent=(function(){\n\tfunction VertexPositionNormalTexture0Texture1SkinTangent(){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t}\n\n\t__class(VertexPositionNormalTexture0Texture1SkinTangent,'laya.d3.graphics.VertexPositionNormalTexture0Texture1SkinTangent');\n\tvar __proto=VertexPositionNormalTexture0Texture1SkinTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__proto.VertexPositionNormalTexture0SkinTangent=function(position,normal,textureCoordinate0,textureCoordinate1,tangent,blendIndex,blendWeight){\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1SkinTangent._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(1,VertexPositionNormalTexture0Texture1SkinTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1SkinTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTexture0Texture1SkinTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(84,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTexture0Texture1SkinTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureTangent</code> 类用于创建位置、法线、纹理、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTexture0Texture1STangent\nvar VertexPositionNormalTexture0Texture1STangent=(function(){\n\tfunction VertexPositionNormalTexture0Texture1STangent(position,normal,textureCoordinate0,textureCoordinate1,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalTexture0Texture1STangent,'laya.d3.graphics.VertexPositionNormalTexture0Texture1STangent');\n\tvar __proto=VertexPositionNormalTexture0Texture1STangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1STangent._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(1,VertexPositionNormalTexture0Texture1STangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1STangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTexture0Texture1STangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(56,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTexture0Texture1STangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureTangent</code> 类用于创建位置、法线、纹理、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTexture0Texture1Tangent\nvar VertexPositionNormalTexture0Texture1Tangent=(function(){\n\tfunction VertexPositionNormalTexture0Texture1Tangent(){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._tangent=null;\n\t}\n\n\t__class(VertexPositionNormalTexture0Texture1Tangent,'laya.d3.graphics.VertexPositionNormalTexture0Texture1Tangent');\n\tvar __proto=VertexPositionNormalTexture0Texture1Tangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__proto.VertexPositionNormalTexture0Tangent=function(position,normal,textureCoordinate0,textureCoordinate1,tangent){\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1Tangent._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(1,VertexPositionNormalTexture0Texture1Tangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTexture0Texture1Tangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTexture0Texture1Tangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(52,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(40,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTexture0Texture1Tangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalColorTextureSkin</code> 类用于创建位置、法线、颜色、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTextureSkin\nvar VertexPositionNormalTextureSkin=(function(){\n\tfunction VertexPositionNormalTextureSkin(position,normal,textureCoordinate,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalTextureSkin,'laya.d3.graphics.VertexPositionNormalTextureSkin');\n\tvar __proto=VertexPositionNormalTextureSkin.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureSkin._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalTextureSkin,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureSkin._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTextureSkin,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(64,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6)]);}\n\t]);\n\treturn VertexPositionNormalTextureSkin;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTextureSkinSTangent\nvar VertexPositionNormalTextureSkinSTangent=(function(){\n\tfunction VertexPositionNormalTextureSkinSTangent(position,normal,textureCoordinate,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalTextureSkinSTangent,'laya.d3.graphics.VertexPositionNormalTextureSkinSTangent');\n\tvar __proto=VertexPositionNormalTextureSkinSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureSkinSTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalTextureSkinSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureSkinSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTextureSkinSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(80,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(64,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTextureSkinSTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTextureSkinTangent\nvar VertexPositionNormalTextureSkinTangent=(function(){\n\tfunction VertexPositionNormalTextureSkinTangent(position,normal,textureCoordinate,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._tangent=tangent;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNormalTextureSkinTangent,'laya.d3.graphics.VertexPositionNormalTextureSkinTangent');\n\tvar __proto=VertexPositionNormalTextureSkinTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureSkinTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalTextureSkinTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureSkinTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTextureSkinTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(76,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6),\n\t\tnew VertexElement(64,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTextureSkinTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureTangent</code> 类用于创建位置、法线、纹理、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTextureSTangent\nvar VertexPositionNormalTextureSTangent=(function(){\n\tfunction VertexPositionNormalTextureSTangent(position,normal,textureCoordinate,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalTextureSTangent,'laya.d3.graphics.VertexPositionNormalTextureSTangent');\n\tvar __proto=VertexPositionNormalTextureSTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureSTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalTextureSTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureSTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTextureSTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(48,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTextureSTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureTangent</code> 类用于创建位置、法线、纹理、切线顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNormalTextureTangent\nvar VertexPositionNormalTextureTangent=(function(){\n\tfunction VertexPositionNormalTextureTangent(position,normal,textureCoordinate,tangent){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._tangent=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t\tthis._tangent=tangent;\n\t}\n\n\t__class(VertexPositionNormalTextureTangent,'laya.d3.graphics.VertexPositionNormalTextureTangent');\n\tvar __proto=VertexPositionNormalTextureTangent.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureTangent._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNormalTextureTangent,'vertexDeclaration',function(){\n\t\treturn VertexPositionNormalTextureTangent._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNormalTextureTangent,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(44,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5)]);}\n\t]);\n\treturn VertexPositionNormalTextureTangent;\n})()\n\n\n/**\n*<code>VertexPositionNormalTexture</code> 类用于创建位置、法线、纹理顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNTBTexture\nvar VertexPositionNTBTexture=(function(){\n\tfunction VertexPositionNTBTexture(position,normal,textureCoordinate){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t}\n\n\t__class(VertexPositionNTBTexture,'laya.d3.graphics.VertexPositionNTBTexture');\n\tvar __proto=VertexPositionNTBTexture.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNTBTexture._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNTBTexture,'vertexDeclaration',function(){\n\t\treturn VertexPositionNTBTexture._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNTBTexture,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(56,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5),\n\t\tnew VertexElement(36,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.BINORMAL0*/4),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2)]);}\n\t]);\n\treturn VertexPositionNTBTexture;\n})()\n\n\n/**\n*<code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNTBTexture0Texture1Skin\nvar VertexPositionNTBTexture0Texture1Skin=(function(){\n\tfunction VertexPositionNTBTexture0Texture1Skin(position,normal,binormal,textureCoordinate0,textureCoordinate1,tangent,blendIndex,blendWeight){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._textureCoordinate1=null;\n\t\tthis._blendIndex=null;\n\t\tthis._blendWeight=null;\n\t\tthis._tangent=null;\n\t\tthis.binormal=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t\tthis._textureCoordinate1=textureCoordinate1;\n\t\tthis._tangent=tangent;\n\t\tbinormal=binormal;\n\t\tthis._blendIndex=blendIndex;\n\t\tthis._blendWeight=blendWeight;\n\t}\n\n\t__class(VertexPositionNTBTexture0Texture1Skin,'laya.d3.graphics.VertexPositionNTBTexture0Texture1Skin');\n\tvar __proto=VertexPositionNTBTexture0Texture1Skin.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'tangent',function(){\n\t\treturn this._tangent;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNTBTexture0Texture1Skin._vertexDeclaration;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate1',function(){\n\t\treturn this._textureCoordinate1;\n\t});\n\n\t__getset(0,__proto,'blendIndex',function(){\n\t\treturn this._blendIndex;\n\t});\n\n\t__getset(0,__proto,'blendWeight',function(){\n\t\treturn this._blendWeight;\n\t});\n\n\t__getset(1,VertexPositionNTBTexture0Texture1Skin,'vertexDeclaration',function(){\n\t\treturn VertexPositionNTBTexture0Texture1Skin._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNTBTexture0Texture1Skin,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(96,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5),\n\t\tnew VertexElement(36,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.BINORMAL0*/4),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15),\n\t\tnew VertexElement(64,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(80,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6)]);}\n\t]);\n\treturn VertexPositionNTBTexture0Texture1Skin;\n})()\n\n\n/**\n*<code>VertexPositionNormalTexture</code> 类用于创建位置、法线、纹理顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionNTBTextureSkin\nvar VertexPositionNTBTextureSkin=(function(){\n\tfunction VertexPositionNTBTextureSkin(position,normal,textureCoordinate){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoordinate=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoordinate=textureCoordinate;\n\t}\n\n\t__class(VertexPositionNTBTextureSkin,'laya.d3.graphics.VertexPositionNTBTextureSkin');\n\tvar __proto=VertexPositionNTBTextureSkin.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'textureCoordinate',function(){\n\t\treturn this._textureCoordinate;\n\t});\n\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionNTBTextureSkin._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionNTBTextureSkin,'vertexDeclaration',function(){\n\t\treturn VertexPositionNTBTextureSkin._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionNTBTextureSkin,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(88,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5),\n\t\tnew VertexElement(36,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.BINORMAL0*/4),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(56,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7),\n\t\tnew VertexElement(72,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6)]);}\n\t]);\n\treturn VertexPositionNTBTextureSkin;\n})()\n\n\n/**\n*<code>VertexPositionTerrain</code> 类用于创建位置、法线、纹理1、纹理2顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionTerrain\nvar VertexPositionTerrain=(function(){\n\tfunction VertexPositionTerrain(position,normal,textureCoord0,textureCoord1){\n\t\tthis._position=null;\n\t\tthis._normal=null;\n\t\tthis._textureCoord0=null;\n\t\tthis._textureCoord1=null;\n\t\tthis._position=position;\n\t\tthis._normal=normal;\n\t\tthis._textureCoord0=textureCoord0;\n\t\tthis._textureCoord1=textureCoord1;\n\t}\n\n\t__class(VertexPositionTerrain,'laya.d3.graphics.VertexPositionTerrain');\n\tvar __proto=VertexPositionTerrain.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'normal',function(){\n\t\treturn this._normal;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoord0',function(){\n\t\treturn this._textureCoord0;\n\t});\n\n\t__getset(0,__proto,'textureCoord1',function(){\n\t\treturn this._textureCoord1;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionTerrain._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionTerrain,'vertexDeclaration',function(){\n\t\treturn VertexPositionTerrain._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionTerrain,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(40,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3),\n\t\tnew VertexElement(24,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15)]);}\n\t]);\n\treturn VertexPositionTerrain;\n})()\n\n\n/**\n*<code>VertexPositionNormalTexture</code> 类用于创建位置、纹理顶点结构。\n*/\n//class laya.d3.graphics.VertexPositionTexture0\nvar VertexPositionTexture0=(function(){\n\tfunction VertexPositionTexture0(position,textureCoordinate0){\n\t\tthis._position=null;\n\t\tthis._textureCoordinate0=null;\n\t\tthis._position=position;\n\t\tthis._textureCoordinate0=textureCoordinate0;\n\t}\n\n\t__class(VertexPositionTexture0,'laya.d3.graphics.VertexPositionTexture0');\n\tvar __proto=VertexPositionTexture0.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._position;\n\t});\n\n\t__getset(0,__proto,'textureCoordinate0',function(){\n\t\treturn this._textureCoordinate0;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexPositionTexture0._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexPositionTexture0,'vertexDeclaration',function(){\n\t\treturn VertexPositionTexture0._vertexDeclaration;\n\t});\n\n\t__static(VertexPositionTexture0,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(20,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2)]);}\n\t]);\n\treturn VertexPositionTexture0;\n})()\n\n\n/**\n*<code>VertexShurikenParticle</code> 类用于创建粒子顶点结构。\n*/\n//class laya.d3.graphics.VertexShurikenParticleBillboard\nvar VertexShurikenParticleBillboard=(function(){\n\tfunction VertexShurikenParticleBillboard(cornerTextureCoordinate,positionStartLifeTime,velocity,startColor,startSize,startRotation0,startRotation1,startRotation2,ageAddScale,time,startSpeed,randoms0,randoms1,simulationWorldPostion){\n\t\t/**@private */\n\t\tthis._cornerTextureCoordinate=null;\n\t\t/**@private */\n\t\tthis._positionStartLifeTime=null;\n\t\t/**@private */\n\t\tthis._velocity=null;\n\t\t/**@private */\n\t\tthis._startColor=null;\n\t\t/**@private */\n\t\tthis._startSize=null;\n\t\t/**@private */\n\t\tthis._startRotation0=null;\n\t\t/**@private */\n\t\tthis._startRotation1=null;\n\t\t/**@private */\n\t\tthis._startRotation2=null;\n\t\t/**@private */\n\t\tthis._startLifeTime=NaN;\n\t\t/**@private */\n\t\tthis._time=NaN;\n\t\t/**@private */\n\t\tthis._startSpeed=NaN;\n\t\t/**@private */\n\t\tthis._randoms0=null;\n\t\t/**@private */\n\t\tthis._randoms1=null;\n\t\t/**@private */\n\t\tthis._simulationWorldPostion=null;\n\t\tthis._cornerTextureCoordinate=cornerTextureCoordinate;\n\t\tthis._positionStartLifeTime=positionStartLifeTime;\n\t\tthis._velocity=velocity;\n\t\tthis._startColor=startColor;\n\t\tthis._startSize=startSize;\n\t\tthis._startRotation0=startRotation0;\n\t\tthis._startRotation1=startRotation1;\n\t\tthis._startRotation2=startRotation2;\n\t\tthis._startLifeTime=ageAddScale;\n\t\tthis._time=time;\n\t\tthis._startSpeed=startSpeed;\n\t\tthis._randoms0=this.random0;\n\t\tthis._randoms1=this.random1;\n\t\tthis._simulationWorldPostion=simulationWorldPostion;\n\t}\n\n\t__class(VertexShurikenParticleBillboard,'laya.d3.graphics.VertexShurikenParticleBillboard');\n\tvar __proto=VertexShurikenParticleBillboard.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'cornerTextureCoordinate',function(){\n\t\treturn this._cornerTextureCoordinate;\n\t});\n\n\t__getset(0,__proto,'random1',function(){\n\t\treturn this._randoms1;\n\t});\n\n\t__getset(0,__proto,'startRotation2',function(){\n\t\treturn this._startRotation2;\n\t});\n\n\t__getset(0,__proto,'positionStartLifeTime',function(){\n\t\treturn this._positionStartLifeTime;\n\t});\n\n\t__getset(0,__proto,'velocity',function(){\n\t\treturn this._velocity;\n\t});\n\n\t__getset(0,__proto,'random0',function(){\n\t\treturn this._randoms0;\n\t});\n\n\t__getset(0,__proto,'startSize',function(){\n\t\treturn this._startSize;\n\t});\n\n\t__getset(0,__proto,'startColor',function(){\n\t\treturn this._startColor;\n\t});\n\n\t__getset(0,__proto,'startRotation0',function(){\n\t\treturn this._startRotation0;\n\t});\n\n\t__getset(0,__proto,'startRotation1',function(){\n\t\treturn this._startRotation1;\n\t});\n\n\t__getset(0,__proto,'startLifeTime',function(){\n\t\treturn this._startLifeTime;\n\t});\n\n\t__getset(0,__proto,'time',function(){\n\t\treturn this._time;\n\t});\n\n\t__getset(0,__proto,'startSpeed',function(){\n\t\treturn this._startSpeed;\n\t});\n\n\t__getset(0,__proto,'simulationWorldPostion',function(){\n\t\treturn this._simulationWorldPostion;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexShurikenParticleBillboard._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexShurikenParticleBillboard,'vertexDeclaration',function(){\n\t\treturn VertexShurikenParticleBillboard._vertexDeclaration;\n\t});\n\n\t__static(VertexShurikenParticleBillboard,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(152,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.CORNERTEXTURECOORDINATE0*/17),\n\t\tnew VertexElement(16,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.SHAPEPOSITIONSTARTLIFETIME*/30),\n\t\tnew VertexElement(32,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.DIRECTIONTIME*/32),\n\t\tnew VertexElement(48,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.STARTCOLOR0*/19),\n\t\tnew VertexElement(64,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.STARTSIZE*/20),\n\t\tnew VertexElement(76,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.STARTROTATION*/22),\n\t\tnew VertexElement(88,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.STARTSPEED*/31),\n\t\tnew VertexElement(92,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.RANDOM0*/34),\n\t\tnew VertexElement(108,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.RANDOM1*/35),\n\t\tnew VertexElement(124,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.SIMULATIONWORLDPOSTION*/36),\n\t\tnew VertexElement(136,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.SIMULATIONWORLDROTATION*/37)]);}\n\t]);\n\treturn VertexShurikenParticleBillboard;\n})()\n\n\n/**\n*<code>VertexShurikenParticle</code> 类用于创建粒子顶点结构。\n*/\n//class laya.d3.graphics.VertexShurikenParticleMesh\nvar VertexShurikenParticleMesh=(function(){\n\tfunction VertexShurikenParticleMesh(cornerTextureCoordinate,positionStartLifeTime,velocity,startColor,startSize,startRotation0,startRotation1,startRotation2,ageAddScale,time,startSpeed,randoms0,randoms1,simulationWorldPostion){\n\t\t/**@private */\n\t\tthis._cornerTextureCoordinate=null;\n\t\t/**@private */\n\t\tthis._positionStartLifeTime=null;\n\t\t/**@private */\n\t\tthis._velocity=null;\n\t\t/**@private */\n\t\tthis._startColor=null;\n\t\t/**@private */\n\t\tthis._startSize=null;\n\t\t/**@private */\n\t\tthis._startRotation0=null;\n\t\t/**@private */\n\t\tthis._startRotation1=null;\n\t\t/**@private */\n\t\tthis._startRotation2=null;\n\t\t/**@private */\n\t\tthis._startLifeTime=NaN;\n\t\t/**@private */\n\t\tthis._time=NaN;\n\t\t/**@private */\n\t\tthis._startSpeed=NaN;\n\t\t/**@private */\n\t\tthis._randoms0=null;\n\t\t/**@private */\n\t\tthis._randoms1=null;\n\t\t/**@private */\n\t\tthis._simulationWorldPostion=null;\n\t\tthis._cornerTextureCoordinate=cornerTextureCoordinate;\n\t\tthis._positionStartLifeTime=positionStartLifeTime;\n\t\tthis._velocity=velocity;\n\t\tthis._startColor=startColor;\n\t\tthis._startSize=startSize;\n\t\tthis._startRotation0=startRotation0;\n\t\tthis._startRotation1=startRotation1;\n\t\tthis._startRotation2=startRotation2;\n\t\tthis._startLifeTime=ageAddScale;\n\t\tthis._time=time;\n\t\tthis._startSpeed=startSpeed;\n\t\tthis._randoms0=this.random0;\n\t\tthis._randoms1=this.random1;\n\t\tthis._simulationWorldPostion=simulationWorldPostion;\n\t}\n\n\t__class(VertexShurikenParticleMesh,'laya.d3.graphics.VertexShurikenParticleMesh');\n\tvar __proto=VertexShurikenParticleMesh.prototype;\n\tLaya.imps(__proto,{\"laya.d3.graphics.IVertex\":true})\n\t__getset(0,__proto,'cornerTextureCoordinate',function(){\n\t\treturn this._cornerTextureCoordinate;\n\t});\n\n\t__getset(0,__proto,'velocity',function(){\n\t\treturn this._velocity;\n\t});\n\n\t__getset(0,__proto,'position',function(){\n\t\treturn this._positionStartLifeTime;\n\t});\n\n\t__getset(0,__proto,'random0',function(){\n\t\treturn this._randoms0;\n\t});\n\n\t__getset(0,__proto,'startSize',function(){\n\t\treturn this._startSize;\n\t});\n\n\t__getset(0,__proto,'startColor',function(){\n\t\treturn this._startColor;\n\t});\n\n\t__getset(0,__proto,'startRotation0',function(){\n\t\treturn this._startRotation0;\n\t});\n\n\t__getset(0,__proto,'startRotation1',function(){\n\t\treturn this._startRotation1;\n\t});\n\n\t__getset(0,__proto,'random1',function(){\n\t\treturn this._randoms1;\n\t});\n\n\t__getset(0,__proto,'startRotation2',function(){\n\t\treturn this._startRotation2;\n\t});\n\n\t__getset(0,__proto,'startLifeTime',function(){\n\t\treturn this._startLifeTime;\n\t});\n\n\t__getset(0,__proto,'time',function(){\n\t\treturn this._time;\n\t});\n\n\t__getset(0,__proto,'startSpeed',function(){\n\t\treturn this._startSpeed;\n\t});\n\n\t__getset(0,__proto,'simulationWorldPostion',function(){\n\t\treturn this._simulationWorldPostion;\n\t});\n\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn VertexShurikenParticleMesh._vertexDeclaration;\n\t});\n\n\t__getset(1,VertexShurikenParticleMesh,'vertexDeclaration',function(){\n\t\treturn VertexShurikenParticleMesh._vertexDeclaration;\n\t});\n\n\t__static(VertexShurikenParticleMesh,\n\t['_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(172,[\n\t\tnew VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),\n\t\tnew VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.COLOR0*/1),\n\t\tnew VertexElement(28,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2),\n\t\tnew VertexElement(36,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.SHAPEPOSITIONSTARTLIFETIME*/30),\n\t\tnew VertexElement(52,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.DIRECTIONTIME*/32),\n\t\tnew VertexElement(68,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.STARTCOLOR0*/19),\n\t\tnew VertexElement(84,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.STARTSIZE*/20),\n\t\tnew VertexElement(96,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.STARTROTATION*/22),\n\t\tnew VertexElement(108,/*laya.d3.graphics.VertexElementFormat.Single*/\"single\",/*laya.d3.graphics.VertexElementUsage.STARTSPEED*/31),\n\t\tnew VertexElement(112,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.RANDOM0*/34),\n\t\tnew VertexElement(128,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.RANDOM1*/35),\n\t\tnew VertexElement(144,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.SIMULATIONWORLDPOSTION*/36),\n\t\tnew VertexElement(156,/*laya.d3.graphics.VertexElementFormat.Vector4*/\"vector4\",/*laya.d3.graphics.VertexElementUsage.SIMULATIONWORLDROTATION*/37)]);}\n\t]);\n\treturn VertexShurikenParticleMesh;\n})()\n\n\n/**\n*@private\n*<code>LoadModel</code> 类用于模型加载。\n*/\n//class laya.d3.loaders.LoadModelV01\nvar LoadModelV01=(function(){\n\tfunction LoadModelV01(readData,version,mesh,materials,subMeshes,materialMap){\n\t\t/**@private */\n\t\tthis._version=null;\n\t\t/**@private */\n\t\tthis._strings=['BLOCK','DATA',\"STRINGS\"];\n\t\t/**@private */\n\t\tthis._materials=null;\n\t\t/**@private */\n\t\tthis._subMeshes=null;\n\t\t/**@private */\n\t\tthis._materialMap=null;\n\t\t/**@private */\n\t\tthis._readData=null;\n\t\t/**@private */\n\t\tthis._mesh=null;\n\t\t/**@private */\n\t\tthis._BLOCK={count:0};\n\t\t/**@private */\n\t\tthis._DATA={offset:0,size:0};\n\t\t/**@private */\n\t\tthis._STRINGS={offset:0,size:0};\n\t\t/**@private */\n\t\tthis._shaderAttributes=null;\n\t\tthis._mesh=mesh;\n\t\tthis._materials=materials;\n\t\tthis._subMeshes=subMeshes;\n\t\tthis._materialMap=materialMap;\n\t\tthis._version=version;\n\t\tthis._onLoaded(readData);\n\t}\n\n\t__class(LoadModelV01,'laya.d3.loaders.LoadModelV01');\n\tvar __proto=LoadModelV01.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._onLoaded=function(readData){\n\t\tthis._readData=readData;\n\t\tthis.READ_BLOCK();\n\t\tfor (var i=0;i < this._BLOCK.count;i++){\n\t\t\tvar index=this._readData.getUint16();\n\t\t\tvar blockName=this._strings[index];\n\t\t\tvar fn=this[\"READ_\"+blockName];\n\t\t\tif (fn==null)throw new Error(\"model file err,no this function:\"+index+\" \"+blockName);\n\t\t\tif (!fn.call(this))break ;\n\t\t}\n\t\treturn this._mesh;\n\t}\n\n\t__proto.onError=function(){}\n\t/**\n\t*@private\n\t*/\n\t__proto._readString=function(){\n\t\treturn this._strings[this._readData.getUint16()];\n\t}\n\n\t__proto.READ_BLOCK=function(){\n\t\tvar n=this._readData.getUint16();\n\t\tthis._BLOCK.count=this._readData.getUint16();\n\t\treturn true;\n\t}\n\n\t__proto.READ_DATA=function(){\n\t\tthis._DATA.offset=this._readData.getUint32();\n\t\tthis._DATA.size=this._readData.getUint32();\n\t\treturn true;\n\t}\n\n\t__proto.READ_STRINGS=function(){\n\t\tthis._STRINGS.offset=this._readData.getUint16();\n\t\tthis._STRINGS.size=this._readData.getUint16();\n\t\tvar ofs=this._readData.pos;\n\t\tthis._readData.pos=this._STRINGS.offset+this._DATA.offset;\n\t\tfor (var i=0;i < this._STRINGS.size;i++){\n\t\t\tthis._strings[i]=this._readData.readUTFString();\n\t\t}\n\t\tthis._readData.pos=ofs;\n\t\treturn true;\n\t}\n\n\t__proto.READ_MATERIAL=function(){\n\t\tvar i=0,n=0;\n\t\tvar index=this._readData.getUint16();\n\t\tvar shaderName=this._readString();\n\t\tvar url=this._readString();\n\t\tif (url!==\"null\")\n\t\t\tthis._materials[index]=Loader.getRes(this._materialMap[url]);\n\t\telse\n\t\tthis._materials[index]=new BaseMaterial();\n\t\treturn true;\n\t}\n\n\t__proto.READ_MESH=function(){\n\t\tvar name=this._readString();\n\t\tswitch (this._version){\n\t\t\tcase \"LAYAMODEL:01\":\n\t\t\t\tconsole.log(\"Warning: The (.lm) file is converted by old fbxTools,please reConverted it use  lastest fbxTools version,later we will remove the  support of old version (.lm) support.\");\n\t\t\t\tbreak ;\n\t\t\tcase \"LAYASKINANI:01\":\n\t\t\tcase \"LAYAMODEL:02\":;\n\t\t\t\tvar arrayBuffer=this._readData.__getBuffer();\n\t\t\t\tvar i=0,n=0;\n\t\t\t\tvar bindPoseStart=this._readData.getUint32();\n\t\t\t\tvar binPoseLength=this._readData.getUint32();\n\t\t\t\tvar bindPoseDatas=new Float32Array(arrayBuffer.slice(bindPoseStart+this._DATA.offset,bindPoseStart+this._DATA.offset+binPoseLength));\n\t\t\t\tvar inverseGlobalBindPoseStart=this._readData.getUint32();\n\t\t\t\tvar inverseGlobalBinPoseLength=this._readData.getUint32();\n\t\t\t\tvar invGloBindPoseDatas=new Float32Array(arrayBuffer.slice(inverseGlobalBindPoseStart+this._DATA.offset,inverseGlobalBindPoseStart+this._DATA.offset+inverseGlobalBinPoseLength));\n\t\t\t\tthis.mesh._inverseBindPoses=[];\n\t\t\t\tfor (i=0,n=invGloBindPoseDatas.length;i < n;i+=16){\n\t\t\t\t\tvar inverseGlobalBindPose=new Matrix4x4(invGloBindPoseDatas[i+0],invGloBindPoseDatas[i+1],invGloBindPoseDatas[i+2],invGloBindPoseDatas[i+3],invGloBindPoseDatas[i+4],invGloBindPoseDatas[i+5],invGloBindPoseDatas[i+6],invGloBindPoseDatas[i+7],invGloBindPoseDatas[i+8],invGloBindPoseDatas[i+9],invGloBindPoseDatas[i+10],invGloBindPoseDatas[i+11],invGloBindPoseDatas[i+12],invGloBindPoseDatas[i+13],invGloBindPoseDatas[i+14],invGloBindPoseDatas[i+15]);\n\t\t\t\t\tthis.mesh._inverseBindPoses.push(inverseGlobalBindPose);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"LoadModel:unknown version.\");\n\t\t\t}\n\t\treturn true;\n\t}\n\n\t__proto.READ_SUBMESH=function(){\n\t\tvar className=this._readString();\n\t\tvar material=this._readData.getUint8();\n\t\tvar bufferAttribute=this._readString();\n\t\tthis._shaderAttributes=bufferAttribute.match(LoadModelV01._attrReg);\n\t\tvar ibofs=this._readData.getUint32();\n\t\tvar ibsize=this._readData.getUint32();\n\t\tvar vbIndicesofs=this._readData.getUint32();\n\t\tvar vbIndicessize=this._readData.getUint32();\n\t\tvar vbofs=this._readData.getUint32();\n\t\tvar vbsize=this._readData.getUint32();\n\t\tvar boneDicofs=this._readData.getUint32();\n\t\tvar boneDicsize=this._readData.getUint32();\n\t\tvar arrayBuffer=this._readData.__getBuffer();\n\t\tvar submesh=new SubMesh(this._mesh);\n\t\tvar vertexDeclaration=this._getVertexDeclaration();\n\t\tvar vb=VertexBuffer3D.create(vertexDeclaration,vbsize / vertexDeclaration.vertexStride,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tvar vbStart=vbofs+this._DATA.offset;\n\t\tvar vbArrayBuffer=arrayBuffer.slice(vbStart,vbStart+vbsize);\n\t\tvb.setData(new Float32Array(vbArrayBuffer));\n\t\tsubmesh._vertexBuffer=vb;\n\t\tvar vertexElements=vb.vertexDeclaration.getVertexElements();\n\t\tfor (var i=0;i < vertexElements.length;i++)\n\t\tsubmesh._bufferUsage[(vertexElements [i]).elementUsage]=vb;\n\t\tvar ib=IndexBuffer3D.create(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",ibsize / 2,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tvar ibStart=ibofs+this._DATA.offset;\n\t\tvar ibArrayBuffer=arrayBuffer.slice(ibStart,ibStart+ibsize);\n\t\tib.setData(new Uint16Array(ibArrayBuffer));\n\t\tsubmesh._indexBuffer=ib;\n\t\tvar boneDicArrayBuffer=arrayBuffer.slice(boneDicofs+this._DATA.offset,boneDicofs+this._DATA.offset+boneDicsize);\n\t\tsubmesh._boneIndicesList[0]=new Uint8Array(boneDicArrayBuffer);\n\t\tthis._subMeshes.push(submesh);\n\t\treturn true;\n\t}\n\n\t__proto.READ_DATAAREA=function(){\n\t\treturn false;\n\t}\n\n\t__proto._getVertexDeclaration=function(){\n\t\tvar position=false,normal=false,color=false,texcoord0=false,texcoord1=false,tangent=false,blendWeight=false,blendIndex=false;\n\t\tvar binormal=false;\n\t\tfor (var i=0;i < this._shaderAttributes.length;i+=8){\n\t\t\tswitch (this._shaderAttributes[i]){\n\t\t\t\tcase \"POSITION\":\n\t\t\t\t\tposition=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"NORMAL\":\n\t\t\t\t\tnormal=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"COLOR\":\n\t\t\t\t\tcolor=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"UV\":\n\t\t\t\t\ttexcoord0=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"UV1\":\n\t\t\t\t\ttexcoord1=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"BLENDWEIGHT\":\n\t\t\t\t\tblendWeight=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"BLENDINDICES\":\n\t\t\t\t\tblendIndex=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"TANGENT\":\n\t\t\t\t\ttangent=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"BINORMAL\":\n\t\t\t\t\tbinormal=true;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t};\n\t\tvar vertexDeclaration;\n\t\tif (position && normal && color && texcoord0 && texcoord1 && blendWeight && blendIndex && tangent)\n\t\t\tvertexDeclaration=VertexPositionNormalColorTexture0Texture1SkinTangent.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && texcoord1 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalColorTexture0Texture1Skin.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && texcoord1 && blendWeight && blendIndex && tangent)\n\t\tvertexDeclaration=VertexPositionNormalTexture0Texture1SkinTangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && texcoord1 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalTexture0Texture1Skin.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && blendWeight && blendIndex && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorTextureSkinTangent.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalColorTextureSkin.vertexDeclaration;\n\t\telse if (position && normal && tangent && binormal && texcoord0 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNTBTextureSkin.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && blendWeight && blendIndex && tangent)\n\t\tvertexDeclaration=VertexPositionNormalTextureSkinTangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalTextureSkin.vertexDeclaration;\n\t\telse if (position && normal && color && blendWeight && blendIndex && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorSkinTangent.vertexDeclaration;\n\t\telse if (position && normal && color && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalColorSkin.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && texcoord1 && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorTexture0Texture1Tangent.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && texcoord1)\n\t\tvertexDeclaration=VertexPositionNormalColorTexture0Texture1.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && texcoord1 && tangent)\n\t\tvertexDeclaration=VertexPositionNormalTexture0Texture1Tangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && texcoord1)\n\t\tvertexDeclaration=VertexPositionNormalTexture0Texture1.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorTextureTangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && tangent && binormal)\n\t\tvertexDeclaration=VertexPositionNTBTexture.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0)\n\t\tvertexDeclaration=VertexPositionNormalColorTexture.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && tangent)\n\t\tvertexDeclaration=VertexPositionNormalTextureTangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0)\n\t\tvertexDeclaration=VertexPositionNormalTexture.vertexDeclaration;\n\t\telse if (position && normal && color && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorTangent.vertexDeclaration;\n\t\telse if (position && normal && color)\n\t\tvertexDeclaration=VertexPositionNormalColor.vertexDeclaration;\n\t\treturn vertexDeclaration;\n\t}\n\n\t__getset(0,__proto,'mesh',function(){\n\t\treturn this._mesh;\n\t});\n\n\tLoadModelV01._attrReg=new RegExp(\"(\\\\w+)|([:,;])\",\"g\");\n\treturn LoadModelV01;\n})()\n\n\n/**\n*@private\n*<code>LoadModel</code> 类用于模型加载。\n*/\n//class laya.d3.loaders.LoadModelV02\nvar LoadModelV02=(function(){\n\tfunction LoadModelV02(){}\n\t__class(LoadModelV02,'laya.d3.loaders.LoadModelV02');\n\tLoadModelV02.parse=function(readData,version,mesh,materials,subMeshes,materialMap){\n\t\tLoadModelV02._mesh=mesh;\n\t\tLoadModelV02._materials=materials;\n\t\tLoadModelV02._subMeshes=subMeshes;\n\t\tLoadModelV02._materialMap=materialMap;\n\t\tLoadModelV02._version=version;\n\t\tLoadModelV02._readData=readData;\n\t\tLoadModelV02.READ_DATA();\n\t\tLoadModelV02.READ_BLOCK();\n\t\tLoadModelV02.READ_STRINGS();\n\t\tfor (var i=0,n=LoadModelV02._BLOCK.count;i < n;i++){\n\t\t\tLoadModelV02._readData.pos=LoadModelV02._BLOCK.blockStarts[i];\n\t\t\tvar index=LoadModelV02._readData.getUint16();\n\t\t\tvar blockName=LoadModelV02._strings[index];\n\t\t\tvar fn=LoadModelV02[\"READ_\"+blockName];\n\t\t\tif (fn==null)\n\t\t\t\tthrow new Error(\"model file err,no this function:\"+index+\" \"+blockName);\n\t\t\telse\n\t\t\tfn.call();\n\t\t}\n\t\tLoadModelV02._strings.length=0;\n\t\tLoadModelV02._readData=null;\n\t\tLoadModelV02._version=null;\n\t\tLoadModelV02._mesh=null;\n\t\tLoadModelV02._materials=null;\n\t\tLoadModelV02._subMeshes=null;\n\t\tLoadModelV02._materialMap=null;\n\t}\n\n\tLoadModelV02._readString=function(){\n\t\treturn LoadModelV02._strings[LoadModelV02._readData.getUint16()];\n\t}\n\n\tLoadModelV02.READ_DATA=function(){\n\t\tLoadModelV02._DATA.offset=LoadModelV02._readData.getUint32();\n\t\tLoadModelV02._DATA.size=LoadModelV02._readData.getUint32();\n\t}\n\n\tLoadModelV02.READ_BLOCK=function(){\n\t\tvar count=LoadModelV02._BLOCK.count=LoadModelV02._readData.getUint16();\n\t\tvar blockStarts=LoadModelV02._BLOCK.blockStarts=[];\n\t\tvar blockLengths=LoadModelV02._BLOCK.blockLengths=[];\n\t\tfor (var i=0;i < count;i++){\n\t\t\tblockStarts.push(LoadModelV02._readData.getUint32());\n\t\t\tblockLengths.push(LoadModelV02._readData.getUint32());\n\t\t}\n\t}\n\n\tLoadModelV02.READ_STRINGS=function(){\n\t\tvar offset=LoadModelV02._readData.getUint32();\n\t\tvar count=LoadModelV02._readData.getUint16();\n\t\tvar prePos=LoadModelV02._readData.pos;\n\t\tLoadModelV02._readData.pos=offset+LoadModelV02._DATA.offset;\n\t\tfor (var i=0;i < count;i++)\n\t\tLoadModelV02._strings[i]=LoadModelV02._readData.readUTFString();\n\t\tLoadModelV02._readData.pos=prePos;\n\t}\n\n\tLoadModelV02.READ_MATERIAL=function(){\n\t\tvar i=0,n=0;\n\t\tvar clasName=LoadModelV02._readString();\n\t\tvar shaderName=LoadModelV02._readString();\n\t\tvar url=LoadModelV02._readString();\n\t\tif (url!==\"\")\n\t\t\tLoadModelV02._materials.push(Loader.getRes(LoadModelV02._materialMap[url]));\n\t\treturn true;\n\t}\n\n\tLoadModelV02.READ_MESH=function(){\n\t\tvar name=LoadModelV02._readString();\n\t\tvar arrayBuffer=LoadModelV02._readData.__getBuffer();\n\t\tvar i=0,n=0;\n\t\tvar vertexBufferCount=LoadModelV02._readData.getInt16();\n\t\tvar offset=LoadModelV02._DATA.offset;\n\t\tfor (i=0;i < vertexBufferCount;i++){\n\t\t\tvar vbStart=offset+LoadModelV02._readData.getUint32();\n\t\t\tvar vbLength=LoadModelV02._readData.getUint32();\n\t\t\tvar vbDatas=new Float32Array(arrayBuffer.slice(vbStart,vbStart+vbLength));\n\t\t\tvar bufferAttribute=LoadModelV02._readString();\n\t\t\tvar shaderAttributes=bufferAttribute.match(LoadModelV02._attrReg);\n\t\t\tvar vertexDeclaration=LoadModelV02._getVertexDeclaration(shaderAttributes);\n\t\t\tvar vertexBuffer=VertexBuffer3D.create(vertexDeclaration,(vbDatas.length *4)/ vertexDeclaration.vertexStride,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\t\tvertexBuffer.setData(vbDatas);\n\t\t\tLoadModelV02._mesh._vertexBuffers.push(vertexBuffer);\n\t\t};\n\t\tvar ibStart=offset+LoadModelV02._readData.getUint32();\n\t\tvar ibLength=LoadModelV02._readData.getUint32();\n\t\tvar ibDatas=new Uint16Array(arrayBuffer.slice(ibStart,ibStart+ibLength));\n\t\tvar indexBuffer=IndexBuffer3D.create(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",ibLength / 2,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tindexBuffer.setData(ibDatas);\n\t\tLoadModelV02._mesh._indexBuffer=indexBuffer;\n\t\tvar boneNames=LoadModelV02._mesh._boneNames=[];\n\t\tvar boneCount=LoadModelV02._readData.getUint16();\n\t\tboneNames.length=boneCount;\n\t\tfor (i=0;i < boneCount;i++)\n\t\tboneNames[i]=LoadModelV02._strings[LoadModelV02._readData.getUint16()];\n\t\tvar bindPoseStart=LoadModelV02._readData.getUint32();\n\t\tvar binPoseLength=LoadModelV02._readData.getUint32();\n\t\tvar bindPoseDatas=new Float32Array(arrayBuffer.slice(offset+bindPoseStart,offset+bindPoseStart+binPoseLength));\n\t\tvar inverseGlobalBindPoseStart=LoadModelV02._readData.getUint32();\n\t\tvar inverseGlobalBinPoseLength=LoadModelV02._readData.getUint32();\n\t\tvar invGloBindPoseDatas=new Float32Array(arrayBuffer.slice(offset+inverseGlobalBindPoseStart,offset+inverseGlobalBindPoseStart+inverseGlobalBinPoseLength));\n\t\tLoadModelV02._mesh._inverseBindPoses=[];\n\t\tfor (i=0,n=invGloBindPoseDatas.length;i < n;i+=16){\n\t\t\tvar inverseGlobalBindPose=new Matrix4x4(invGloBindPoseDatas[i+0],invGloBindPoseDatas[i+1],invGloBindPoseDatas[i+2],invGloBindPoseDatas[i+3],invGloBindPoseDatas[i+4],invGloBindPoseDatas[i+5],invGloBindPoseDatas[i+6],invGloBindPoseDatas[i+7],invGloBindPoseDatas[i+8],invGloBindPoseDatas[i+9],invGloBindPoseDatas[i+10],invGloBindPoseDatas[i+11],invGloBindPoseDatas[i+12],invGloBindPoseDatas[i+13],invGloBindPoseDatas[i+14],invGloBindPoseDatas[i+15]);\n\t\t\tLoadModelV02._mesh._inverseBindPoses.push(inverseGlobalBindPose);\n\t\t}\n\t\tLoadModelV02._mesh._skinnedDatas=new Float32Array(invGloBindPoseDatas.length*16);\n\t\treturn true;\n\t}\n\n\tLoadModelV02.READ_SUBMESH=function(){\n\t\tvar arrayBuffer=LoadModelV02._readData.__getBuffer();\n\t\tvar submesh=new SubMesh(LoadModelV02._mesh);\n\t\tvar vbIndex=LoadModelV02._readData.getInt16();\n\t\tvar vbStart=LoadModelV02._readData.getUint32();\n\t\tvar vbLength=LoadModelV02._readData.getUint32();\n\t\tsubmesh._vertexBuffer=LoadModelV02._mesh._vertexBuffers[vbIndex];\n\t\tsubmesh._vertexStart=vbStart;\n\t\tsubmesh._vertexCount=vbLength;\n\t\tvar ibStart=LoadModelV02._readData.getUint32();\n\t\tvar ibCount=LoadModelV02._readData.getUint32();\n\t\tvar indexBuffer=LoadModelV02._mesh._indexBuffer;\n\t\tsubmesh._indexBuffer=indexBuffer;\n\t\tsubmesh._indexStart=ibStart;\n\t\tsubmesh._indexCount=ibCount;\n\t\tsubmesh._indices=new Uint16Array(indexBuffer.getData().buffer,ibStart *2,ibCount);\n\t\tvar offset=LoadModelV02._DATA.offset;\n\t\tvar subIndexBufferStart=submesh._subIndexBufferStart;\n\t\tvar subIndexBufferCount=submesh._subIndexBufferCount;\n\t\tvar boneIndicesList=submesh._boneIndicesList;\n\t\tvar drawCount=LoadModelV02._readData.getUint16();\n\t\tsubIndexBufferStart.length=drawCount;\n\t\tsubIndexBufferCount.length=drawCount;\n\t\tboneIndicesList.length=drawCount;\n\t\tfor (var i=0;i < drawCount;i++){\n\t\t\tsubIndexBufferStart[i]=LoadModelV02._readData.getUint32();\n\t\t\tsubIndexBufferCount[i]=LoadModelV02._readData.getUint32();\n\t\t\tvar boneDicofs=LoadModelV02._readData.getUint32();\n\t\t\tvar boneDicsize=LoadModelV02._readData.getUint32();\n\t\t\tsubmesh._boneIndicesList[i]=new Uint8Array(arrayBuffer.slice(offset+boneDicofs,offset+boneDicofs+boneDicsize));\n\t\t}\n\t\tLoadModelV02._subMeshes.push(submesh);\n\t\treturn true;\n\t}\n\n\tLoadModelV02._getVertexDeclaration=function(shaderAttributes){\n\t\tvar position=false,normal=false,color=false,texcoord0=false,texcoord1=false,tangent=false,blendWeight=false,blendIndex=false;\n\t\tvar binormal=false;\n\t\tfor (var i=0;i < shaderAttributes.length;i++){\n\t\t\tswitch (shaderAttributes[i]){\n\t\t\t\tcase \"POSITION\":\n\t\t\t\t\tposition=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"NORMAL\":\n\t\t\t\t\tnormal=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"COLOR\":\n\t\t\t\t\tcolor=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"UV\":\n\t\t\t\t\ttexcoord0=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"UV1\":\n\t\t\t\t\ttexcoord1=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"BLENDWEIGHT\":\n\t\t\t\t\tblendWeight=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"BLENDINDICES\":\n\t\t\t\t\tblendIndex=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"TANGENT\":\n\t\t\t\t\ttangent=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"BINORMAL\":\n\t\t\t\t\tbinormal=true;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t};\n\t\tvar vertexDeclaration;\n\t\tif (position && normal && color && texcoord0 && texcoord1 && blendWeight && blendIndex && tangent)\n\t\t\tvertexDeclaration=VertexPositionNormalColorTexture0Texture1SkinTangent.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && texcoord1 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalColorTexture0Texture1Skin.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && texcoord1 && blendWeight && blendIndex && tangent)\n\t\tvertexDeclaration=VertexPositionNormalTexture0Texture1SkinTangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && texcoord1 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalTexture0Texture1Skin.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && blendWeight && blendIndex && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorTextureSkinTangent.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalColorTextureSkin.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && blendWeight && blendIndex && tangent)\n\t\tvertexDeclaration=VertexPositionNormalTextureSkinTangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalTextureSkin.vertexDeclaration;\n\t\telse if (position && normal && color && blendWeight && blendIndex && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorSkinTangent.vertexDeclaration;\n\t\telse if (position && normal && color && blendWeight && blendIndex)\n\t\tvertexDeclaration=VertexPositionNormalColorSkin.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && texcoord1 && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorTexture0Texture1Tangent.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && texcoord1)\n\t\tvertexDeclaration=VertexPositionNormalColorTexture0Texture1.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && texcoord1 && tangent)\n\t\tvertexDeclaration=VertexPositionNormalTexture0Texture1Tangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && texcoord1)\n\t\tvertexDeclaration=VertexPositionNormalTexture0Texture1.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0 && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorTextureTangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && tangent && binormal)\n\t\tvertexDeclaration=VertexPositionNTBTexture.vertexDeclaration;\n\t\telse if (position && normal && color && texcoord0)\n\t\tvertexDeclaration=VertexPositionNormalColorTexture.vertexDeclaration;\n\t\telse if (position && normal && texcoord0 && tangent)\n\t\tvertexDeclaration=VertexPositionNormalTextureTangent.vertexDeclaration;\n\t\telse if (position && normal && texcoord0)\n\t\tvertexDeclaration=VertexPositionNormalTexture.vertexDeclaration;\n\t\telse if (position && normal && color && tangent)\n\t\tvertexDeclaration=VertexPositionNormalColorTangent.vertexDeclaration;\n\t\telse if (position && normal && color)\n\t\tvertexDeclaration=VertexPositionNormalColor.vertexDeclaration;\n\t\treturn vertexDeclaration;\n\t}\n\n\tLoadModelV02._attrReg=new RegExp(\"(\\\\w+)|([:,;])\",\"g\");\n\tLoadModelV02._strings=[];\n\tLoadModelV02._readData=null;\n\tLoadModelV02._version=null;\n\tLoadModelV02._mesh=null;\n\tLoadModelV02._materials=null;\n\tLoadModelV02._subMeshes=null;\n\tLoadModelV02._materialMap=null;\n\t__static(LoadModelV02,\n\t['_BLOCK',function(){return this._BLOCK={count:0};},'_DATA',function(){return this._DATA={offset:0,size:0};}\n\t]);\n\treturn LoadModelV02;\n})()\n\n\n/**\n*@private\n*<code>LoadModel</code> 类用于模型加载。\n*/\n//class laya.d3.loaders.LoadModelV03\nvar LoadModelV03=(function(){\n\tfunction LoadModelV03(){}\n\t__class(LoadModelV03,'laya.d3.loaders.LoadModelV03');\n\tLoadModelV03.parse=function(readData,version,mesh,subMeshes,materialMap){\n\t\tLoadModelV03._mesh=mesh;\n\t\tLoadModelV03._subMeshes=subMeshes;\n\t\tLoadModelV03._materialMap=materialMap;\n\t\tLoadModelV03._version=version;\n\t\tLoadModelV03._readData=readData;\n\t\tLoadModelV03.READ_DATA();\n\t\tLoadModelV03.READ_BLOCK();\n\t\tLoadModelV03.READ_STRINGS();\n\t\tfor (var i=0,n=LoadModelV03._BLOCK.count;i < n;i++){\n\t\t\tLoadModelV03._readData.pos=LoadModelV03._BLOCK.blockStarts[i];\n\t\t\tvar index=LoadModelV03._readData.getUint16();\n\t\t\tvar blockName=LoadModelV03._strings[index];\n\t\t\tvar fn=LoadModelV03[\"READ_\"+blockName];\n\t\t\tif (fn==null)\n\t\t\t\tthrow new Error(\"model file err,no this function:\"+index+\" \"+blockName);\n\t\t\telse\n\t\t\tfn.call();\n\t\t}\n\t\tLoadModelV03._strings.length=0;\n\t\tLoadModelV03._readData=null;\n\t\tLoadModelV03._version=null;\n\t\tLoadModelV03._mesh=null;\n\t\tLoadModelV03._subMeshes=null;\n\t\tLoadModelV03._materialMap=null;\n\t}\n\n\tLoadModelV03._readString=function(){\n\t\treturn LoadModelV03._strings[LoadModelV03._readData.getUint16()];\n\t}\n\n\tLoadModelV03.READ_DATA=function(){\n\t\tLoadModelV03._DATA.offset=LoadModelV03._readData.getUint32();\n\t\tLoadModelV03._DATA.size=LoadModelV03._readData.getUint32();\n\t}\n\n\tLoadModelV03.READ_BLOCK=function(){\n\t\tvar count=LoadModelV03._BLOCK.count=LoadModelV03._readData.getUint16();\n\t\tvar blockStarts=LoadModelV03._BLOCK.blockStarts=[];\n\t\tvar blockLengths=LoadModelV03._BLOCK.blockLengths=[];\n\t\tfor (var i=0;i < count;i++){\n\t\t\tblockStarts.push(LoadModelV03._readData.getUint32());\n\t\t\tblockLengths.push(LoadModelV03._readData.getUint32());\n\t\t}\n\t}\n\n\tLoadModelV03.READ_STRINGS=function(){\n\t\tvar offset=LoadModelV03._readData.getUint32();\n\t\tvar count=LoadModelV03._readData.getUint16();\n\t\tvar prePos=LoadModelV03._readData.pos;\n\t\tLoadModelV03._readData.pos=offset+LoadModelV03._DATA.offset;\n\t\tfor (var i=0;i < count;i++)\n\t\tLoadModelV03._strings[i]=LoadModelV03._readData.readUTFString();\n\t\tLoadModelV03._readData.pos=prePos;\n\t}\n\n\tLoadModelV03.READ_MESH=function(){\n\t\tvar name=LoadModelV03._readString();\n\t\tvar arrayBuffer=LoadModelV03._readData.__getBuffer();\n\t\tvar i=0,n=0;\n\t\tvar vertexBufferCount=LoadModelV03._readData.getInt16();\n\t\tvar offset=LoadModelV03._DATA.offset;\n\t\tfor (i=0;i < vertexBufferCount;i++){\n\t\t\tvar vbStart=offset+LoadModelV03._readData.getUint32();\n\t\t\tvar vbLength=LoadModelV03._readData.getUint32();\n\t\t\tvar vbDatas=new Float32Array(arrayBuffer.slice(vbStart,vbStart+vbLength));\n\t\t\tvar bufferAttribute=LoadModelV03._readString();\n\t\t\tvar vertexDeclaration;\n\t\t\tswitch(LoadModelV03._version){\n\t\t\t\tcase \"LAYAMODEL:03\":\n\t\t\t\t\tvertexDeclaration=LoadModelV03._vertexDeclarationMap_Discard[bufferAttribute];\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"LAYAMODEL:0301\":\n\t\t\t\t\tvertexDeclaration=LoadModelV03._vertexDeclarationMap[bufferAttribute];\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"LoadModelV03: unknown version.\");\n\t\t\t\t}\n\t\t\tif (!vertexDeclaration)\n\t\t\t\tthrow new Error(\"LoadModelV03: unknown vertexDeclaration.\");\n\t\t\tvar vertexBuffer=VertexBuffer3D.create(vertexDeclaration,(vbDatas.length *4)/ vertexDeclaration.vertexStride,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\t\tvertexBuffer.setData(vbDatas);\n\t\t\tLoadModelV03._mesh._vertexBuffers.push(vertexBuffer);\n\t\t};\n\t\tvar ibStart=offset+LoadModelV03._readData.getUint32();\n\t\tvar ibLength=LoadModelV03._readData.getUint32();\n\t\tvar ibDatas=new Uint16Array(arrayBuffer.slice(ibStart,ibStart+ibLength));\n\t\tvar indexBuffer=IndexBuffer3D.create(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",ibLength / 2,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tindexBuffer.setData(ibDatas);\n\t\tLoadModelV03._mesh._indexBuffer=indexBuffer;\n\t\tvar boneNames=LoadModelV03._mesh._boneNames=[];\n\t\tvar boneCount=LoadModelV03._readData.getUint16();\n\t\tboneNames.length=boneCount;\n\t\tfor (i=0;i < boneCount;i++)\n\t\tboneNames[i]=LoadModelV03._strings[LoadModelV03._readData.getUint16()];\n\t\tLoadModelV03._readData.pos+=8;\n\t\tvar inverseGlobalBindPoseStart=LoadModelV03._readData.getUint32();\n\t\tvar inverseGlobalBinPoseLength=LoadModelV03._readData.getUint32();\n\t\tvar invGloBindPoseDatas=new Float32Array(arrayBuffer.slice(offset+inverseGlobalBindPoseStart,offset+inverseGlobalBindPoseStart+inverseGlobalBinPoseLength));\n\t\tLoadModelV03._mesh._inverseBindPoses=[];\n\t\tfor (i=0,n=invGloBindPoseDatas.length;i < n;i+=16){\n\t\t\tvar inverseGlobalBindPose=new Matrix4x4(invGloBindPoseDatas[i+0],invGloBindPoseDatas[i+1],invGloBindPoseDatas[i+2],invGloBindPoseDatas[i+3],invGloBindPoseDatas[i+4],invGloBindPoseDatas[i+5],invGloBindPoseDatas[i+6],invGloBindPoseDatas[i+7],invGloBindPoseDatas[i+8],invGloBindPoseDatas[i+9],invGloBindPoseDatas[i+10],invGloBindPoseDatas[i+11],invGloBindPoseDatas[i+12],invGloBindPoseDatas[i+13],invGloBindPoseDatas[i+14],invGloBindPoseDatas[i+15]);\n\t\t\tLoadModelV03._mesh._inverseBindPoses.push(inverseGlobalBindPose);\n\t\t}\n\t\tLoadModelV03._mesh._skinnedDatas=new Float32Array(invGloBindPoseDatas.length*16);\n\t\treturn true;\n\t}\n\n\tLoadModelV03.READ_SUBMESH=function(){\n\t\tvar arrayBuffer=LoadModelV03._readData.__getBuffer();\n\t\tvar submesh=new SubMesh(LoadModelV03._mesh);\n\t\tvar vbIndex=LoadModelV03._readData.getInt16();\n\t\tvar vbStart=LoadModelV03._readData.getUint32();\n\t\tvar vbLength=LoadModelV03._readData.getUint32();\n\t\tsubmesh._vertexBuffer=LoadModelV03._mesh._vertexBuffers[vbIndex];\n\t\tsubmesh._vertexStart=vbStart;\n\t\tsubmesh._vertexCount=vbLength;\n\t\tvar ibStart=LoadModelV03._readData.getUint32();\n\t\tvar ibCount=LoadModelV03._readData.getUint32();\n\t\tvar indexBuffer=LoadModelV03._mesh._indexBuffer;\n\t\tsubmesh._indexBuffer=indexBuffer;\n\t\tsubmesh._indexStart=ibStart;\n\t\tsubmesh._indexCount=ibCount;\n\t\tsubmesh._indices=new Uint16Array(indexBuffer.getData().buffer,ibStart *2,ibCount);\n\t\tvar offset=LoadModelV03._DATA.offset;\n\t\tvar subIndexBufferStart=submesh._subIndexBufferStart;\n\t\tvar subIndexBufferCount=submesh._subIndexBufferCount;\n\t\tvar boneIndicesList=submesh._boneIndicesList;\n\t\tvar drawCount=LoadModelV03._readData.getUint16();\n\t\tsubIndexBufferStart.length=drawCount;\n\t\tsubIndexBufferCount.length=drawCount;\n\t\tboneIndicesList.length=drawCount;\n\t\tfor (var i=0;i < drawCount;i++){\n\t\t\tsubIndexBufferStart[i]=LoadModelV03._readData.getUint32();\n\t\t\tsubIndexBufferCount[i]=LoadModelV03._readData.getUint32();\n\t\t\tvar boneDicofs=LoadModelV03._readData.getUint32();\n\t\t\tvar boneDicsize=LoadModelV03._readData.getUint32();\n\t\t\tboneIndicesList[i]=new Uint8Array(arrayBuffer.slice(offset+boneDicofs,offset+boneDicofs+boneDicsize));\n\t\t}\n\t\tLoadModelV03._subMeshes.push(submesh);\n\t\treturn true;\n\t}\n\n\tLoadModelV03._strings=[];\n\tLoadModelV03._readData=null;\n\tLoadModelV03._version=null;\n\tLoadModelV03._mesh=null;\n\tLoadModelV03._subMeshes=null;\n\tLoadModelV03._materialMap=null;\n\t__static(LoadModelV03,\n\t['_vertexDeclarationMap_Discard',function(){return this._vertexDeclarationMap_Discard={\n\t\t\t\"POSITION,NORMAL,COLOR,UV,UV1,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalColorTexture0Texture1SkinTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,UV1,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalColorTexture0Texture1Skin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,TANGENT,BINORMAL,UV,UV1,BLENDWEIGHT,BLENDINDICES,\":VertexPositionNTBTexture0Texture1Skin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,UV1,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalTexture0Texture1SkinTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,UV1,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalTexture0Texture1Skin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalColorTextureSkinTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalColorTextureSkin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalTextureSkinTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalTextureSkin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalColorSkinTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalColorSkin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,UV1,TANGENT\":VertexPositionNormalColorTexture0Texture1Tangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,UV1\":VertexPositionNormalColorTexture0Texture1.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,UV1,TANGENT\":VertexPositionNormalTexture0Texture1Tangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,UV1\":VertexPositionNormalTexture0Texture1.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,TANGENT\":VertexPositionNormalColorTextureTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,TANGENT,BINORMAL\":VertexPositionNTBTexture.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV\":VertexPositionNormalColorTexture.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,TANGENT\":VertexPositionNormalTextureTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV\":VertexPositionNormalTexture.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,TANGENT\":VertexPositionNormalColorTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR\":VertexPositionNormalColor.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,TANGENT\":VertexPositionNormalTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL\":VertexPositionNormal.vertexDeclaration,\n\t\t\t\"POSITION,UV\":VertexPositionTexture0.vertexDeclaration,\n\t\t\t\"POSITION\":VertexPosition.vertexDeclaration};},'_vertexDeclarationMap',function(){return this._vertexDeclarationMap={\n\t\t\t\"POSITION,NORMAL,COLOR,UV,UV1,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalColorTexture0Texture1SkinSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,UV1,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalColorTexture0Texture1Skin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,TANGENT,BINORMAL,UV,UV1,BLENDWEIGHT,BLENDINDICES,\":VertexPositionNTBTexture0Texture1Skin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,UV1,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalTexture0Texture1SkinSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,UV1,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalTexture0Texture1Skin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalColorTextureSkinSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalColorTextureSkin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalTextureSkinSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalTextureSkin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,BLENDWEIGHT,BLENDINDICES,TANGENT\":VertexPositionNormalColorSkinSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,BLENDWEIGHT,BLENDINDICES\":VertexPositionNormalColorSkin.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,UV1,TANGENT\":VertexPositionNormalColorTexture0Texture1STangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,UV1\":VertexPositionNormalColorTexture0Texture1.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,UV1,TANGENT\":VertexPositionNormalTexture0Texture1STangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,UV1\":VertexPositionNormalTexture0Texture1.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV,TANGENT\":VertexPositionNormalColorTextureSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,TANGENT,BINORMAL\":VertexPositionNTBTexture.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,UV\":VertexPositionNormalColorTexture.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV,TANGENT\":VertexPositionNormalTextureSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,UV\":VertexPositionNormalTexture.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR,TANGENT\":VertexPositionNormalColorSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,COLOR\":VertexPositionNormalColor.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL,TANGENT\":VertexPositionNormalSTangent.vertexDeclaration,\n\t\t\t\"POSITION,NORMAL\":VertexPositionNormal.vertexDeclaration,\n\t\t\t\"POSITION,UV\":VertexPositionTexture0.vertexDeclaration,\n\t\t\t\"POSITION\":VertexPosition.vertexDeclaration};},'_BLOCK',function(){return this._BLOCK={count:0};},'_DATA',function(){return this._DATA={offset:0,size:0};}\n\t]);\n\treturn LoadModelV03;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.loaders.MeshReader\nvar MeshReader=(function(){\n\tfunction MeshReader(){}\n\t__class(MeshReader,'laya.d3.loaders.MeshReader');\n\tMeshReader.read=function(data,mesh,materials,subMeshes,materialMap){\n\t\tvar readData=new Byte(data);\n\t\treadData.pos=0;\n\t\tvar version=readData.readUTFString();\n\t\tswitch (version){\n\t\t\tcase \"LAYAMODEL:01\":\n\t\t\tcase \"LAYASKINANI:01\":\n\t\t\t\tMeshReader._readVersion01(readData,version,mesh,materials,subMeshes,materialMap);\n\t\t\t\tbreak ;\n\t\t\tcase \"LAYAMODEL:02\":\n\t\t\t\tLoadModelV02.parse(readData,version,mesh,materials,subMeshes,materialMap);\n\t\t\t\tbreak ;\n\t\t\tcase \"LAYAMODEL:03\":\n\t\t\tcase \"LAYAMODEL:0301\":\n\t\t\t\tLoadModelV03.parse(readData,version,mesh,subMeshes,materialMap);\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"MeshReader: unknown mesh version.\");\n\t\t\t}\n\t\tmesh._setSubMeshes(subMeshes);\n\t}\n\n\tMeshReader._readVersion01=function(readData,version,mesh,materials,subMeshes,materialMap){\n\t\tnew LoadModelV01(readData,version,mesh,materials,subMeshes,materialMap);\n\t}\n\n\treturn MeshReader;\n})()\n\n\n/**\n*<code>BoundBox</code> 类用于创建包围盒。\n*/\n//class laya.d3.math.BoundBox\nvar BoundBox=(function(){\n\tfunction BoundBox(min,max){\n\t\t/**最小顶点。*/\n\t\tthis.min=null;\n\t\t/**最大顶点。*/\n\t\tthis.max=null;\n\t\tthis.min=min;\n\t\tthis.max=max;\n\t}\n\n\t__class(BoundBox,'laya.d3.math.BoundBox');\n\tvar __proto=BoundBox.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*获取包围盒的8个角顶点。\n\t*@param corners 返回顶点的输出队列。\n\t*/\n\t__proto.getCorners=function(corners){\n\t\tcorners.length=8;\n\t\tvar mine=this.min.elements;\n\t\tvar maxe=this.max.elements;\n\t\tvar minX=mine[0];\n\t\tvar minY=mine[1];\n\t\tvar minZ=mine[2];\n\t\tvar maxX=maxe[0];\n\t\tvar maxY=maxe[1];\n\t\tvar maxZ=maxe[2];\n\t\tcorners[0]=new Vector3(minX,maxY,maxZ);\n\t\tcorners[1]=new Vector3(maxX,maxY,maxZ);\n\t\tcorners[2]=new Vector3(maxX,minY,maxZ);\n\t\tcorners[3]=new Vector3(minX,minY,maxZ);\n\t\tcorners[4]=new Vector3(minX,maxY,minZ);\n\t\tcorners[5]=new Vector3(maxX,maxY,minZ);\n\t\tcorners[6]=new Vector3(maxX,minY,minZ);\n\t\tcorners[7]=new Vector3(minX,minY,minZ);\n\t}\n\n\t__proto.toDefault=function(){\n\t\tthis.min.toDefault();\n\t\tthis.max.toDefault();\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar dest=destObject;\n\t\tthis.min.cloneTo(dest.min);\n\t\tthis.max.cloneTo(dest.max);\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor(new Vector3(),new Vector3());\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\tBoundBox.createfromPoints=function(points,out){\n\t\tif (points==null)\n\t\t\tthrow new Error(\"points\");\n\t\tvar min=out.min;\n\t\tvar max=out.max;\n\t\tvar minE=min.elements;\n\t\tminE[0]=Number.MAX_VALUE;\n\t\tminE[1]=Number.MAX_VALUE;\n\t\tminE[2]=Number.MAX_VALUE;\n\t\tvar maxE=max.elements;\n\t\tmaxE[0]=-Number.MAX_VALUE;\n\t\tmaxE[1]=-Number.MAX_VALUE;\n\t\tmaxE[2]=-Number.MAX_VALUE;\n\t\tfor (var i=0,n=points.length;i < n;++i){\n\t\t\tVector3.min(min,points[i],min);\n\t\t\tVector3.max(max,points[i],max);\n\t\t}\n\t}\n\n\tBoundBox.merge=function(box1,box2,out){\n\t\tVector3.min(box1.min,box2.min,out.min);\n\t\tVector3.max(box1.max,box2.max,out.max);\n\t}\n\n\treturn BoundBox;\n})()\n\n\n/**\n*<code>BoundFrustum</code> 类用于创建锥截体。\n*/\n//class laya.d3.math.BoundFrustum\nvar BoundFrustum=(function(){\n\tfunction BoundFrustum(matrix){\n\t\t/**4x4矩阵*/\n\t\tthis._matrix=null;\n\t\t/**近平面*/\n\t\tthis._near=null;\n\t\t/**远平面*/\n\t\tthis._far=null;\n\t\t/**左平面*/\n\t\tthis._left=null;\n\t\t/**右平面*/\n\t\tthis._right=null;\n\t\t/**顶平面*/\n\t\tthis._top=null;\n\t\t/**底平面*/\n\t\tthis._bottom=null;\n\t\tthis._matrix=matrix;\n\t\tthis._near=new Plane(new Vector3());\n\t\tthis._far=new Plane(new Vector3());\n\t\tthis._left=new Plane(new Vector3());\n\t\tthis._right=new Plane(new Vector3());\n\t\tthis._top=new Plane(new Vector3());\n\t\tthis._bottom=new Plane(new Vector3());\n\t\tBoundFrustum._getPlanesFromMatrix(this._matrix,this._near,this._far,this._left,this._right,this._top,this._bottom);\n\t}\n\n\t__class(BoundFrustum,'laya.d3.math.BoundFrustum');\n\tvar __proto=BoundFrustum.prototype;\n\t/**\n\t*判断是否与其他锥截体相等。\n\t*@param other 锥截体。\n\t*/\n\t__proto.equalsBoundFrustum=function(other){\n\t\treturn this._matrix.equalsOtherMatrix(other.matrix)\n\t}\n\n\t/**\n\t*判断是否与其他对象相等。\n\t*@param obj 对象。\n\t*/\n\t__proto.equalsObj=function(obj){\n\t\tif ((obj instanceof laya.d3.math.BoundFrustum )){\n\t\t\tvar bf=obj;\n\t\t\treturn this.equalsBoundFrustum(bf);\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*获取锥截体的任意一平面。\n\t*0:近平面\n\t*1:远平面\n\t*2:左平面\n\t*3:右平面\n\t*4:顶平面\n\t*5:底平面\n\t*@param index 索引。\n\t*/\n\t__proto.getPlane=function(index){\n\t\tswitch (index){\n\t\t\tcase 0:\n\t\t\t\treturn this._near;\n\t\t\tcase 1:\n\t\t\t\treturn this._far;\n\t\t\tcase 2:\n\t\t\t\treturn this._left;\n\t\t\tcase 3:\n\t\t\t\treturn this._right;\n\t\t\tcase 4:\n\t\t\t\treturn this._top;\n\t\t\tcase 5:\n\t\t\t\treturn this._bottom;\n\t\t\tdefault :\n\t\t\t\treturn null;\n\t\t\t}\n\t}\n\n\t/**\n\t*锥截体的8个顶点。\n\t*@param corners 返回顶点的输出队列。\n\t*/\n\t__proto.getCorners=function(corners){\n\t\tBoundFrustum._get3PlaneInterPoint(this._near,this._bottom,this._right).cloneTo(corners[0]);\n\t\tBoundFrustum._get3PlaneInterPoint(this._near,this._top,this._right).cloneTo(corners[1]);\n\t\tBoundFrustum._get3PlaneInterPoint(this._near,this._top,this._left).cloneTo(corners[2]);\n\t\tBoundFrustum._get3PlaneInterPoint(this._near,this._bottom,this._left).cloneTo(corners[3]);\n\t\tBoundFrustum._get3PlaneInterPoint(this._far,this._bottom,this._right).cloneTo(corners[4]);\n\t\tBoundFrustum._get3PlaneInterPoint(this._far,this._top,this._right).cloneTo(corners[5]);\n\t\tBoundFrustum._get3PlaneInterPoint(this._far,this._top,this._left).cloneTo(corners[6]);\n\t\tBoundFrustum._get3PlaneInterPoint(this._far,this._bottom,this._left).cloneTo(corners[7]);\n\t}\n\n\t/**\n\t*与点的位置关系。返回-1,包涵;0,相交;1,不相交\n\t*@param point 点。\n\t*/\n\t__proto.containsPoint=function(point){\n\t\tvar result=Plane.PlaneIntersectionType_Front;\n\t\tvar planeResult=Plane.PlaneIntersectionType_Front;\n\t\tfor (var i=0;i < 6;i++){\n\t\t\tswitch (i){\n\t\t\t\tcase 0:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndPoint(this._near,point);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndPoint(this._far,point);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndPoint(this._left,point);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndPoint(this._right,point);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 4:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndPoint(this._top,point);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 5:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndPoint(this._bottom,point);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\tswitch (planeResult){\n\t\t\t\tcase Plane.PlaneIntersectionType_Back:\n\t\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\t\tcase Plane.PlaneIntersectionType_Intersecting:\n\t\t\t\t\tresult=Plane.PlaneIntersectionType_Intersecting;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\tswitch (result){\n\t\t\tcase Plane.PlaneIntersectionType_Intersecting:\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t\tdefault :\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\t\t}\n\t}\n\n\t/**\n\t*与包围盒的位置关系。返回-1,包涵;0,相交;1,不相交\n\t*@param box 包围盒。\n\t*/\n\t__proto.containsBoundBox=function(box){\n\t\tvar p=BoundFrustum._tempV30,n=BoundFrustum._tempV31;\n\t\tvar plane;\n\t\tvar result=/*laya.d3.math.ContainmentType.Contains*/1;\n\t\tfor (var i=0;i < 6;i++){\n\t\t\tplane=this.getPlane(i);\n\t\t\tthis._getBoxToPlanePVertexNVertex(box,plane.normal,p,n);\n\t\t\tif (Collision.intersectsPlaneAndPoint(plane,p)===Plane.PlaneIntersectionType_Back)\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\tif (Collision.intersectsPlaneAndPoint(plane,n)===Plane.PlaneIntersectionType_Back)\n\t\t\t\tresult=/*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t*与包围球的位置关系。返回-1,包涵;0,相交;1,不相交\n\t*@param sphere 包围球。\n\t*/\n\t__proto.containsBoundSphere=function(sphere){\n\t\tvar result=Plane.PlaneIntersectionType_Front;\n\t\tvar planeResult=Plane.PlaneIntersectionType_Front;\n\t\tfor (var i=0;i < 6;i++){\n\t\t\tswitch (i){\n\t\t\t\tcase 0:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndSphere(this._near,sphere);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndSphere(this._far,sphere);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndSphere(this._left,sphere);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndSphere(this._right,sphere);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 4:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndSphere(this._top,sphere);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 5:\n\t\t\t\t\tplaneResult=Collision.intersectsPlaneAndSphere(this._bottom,sphere);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\tswitch (planeResult){\n\t\t\t\tcase Plane.PlaneIntersectionType_Back:\n\t\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\t\tcase Plane.PlaneIntersectionType_Intersecting:\n\t\t\t\t\tresult=Plane.PlaneIntersectionType_Intersecting;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\tswitch (result){\n\t\t\tcase Plane.PlaneIntersectionType_Intersecting:\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t\tdefault :\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getBoxToPlanePVertexNVertex=function(box,planeNormal,outP,outN){\n\t\tvar boxMin=box.min;\n\t\tvar boxMinE=boxMin.elements;\n\t\tvar boxMax=box.max;\n\t\tvar boxMaxE=boxMax.elements;\n\t\tvar planeNorE=planeNormal.elements;\n\t\tvar planeNorEX=planeNorE[0];\n\t\tvar planeNorEY=planeNorE[1];\n\t\tvar planeNorEZ=planeNorE[2];\n\t\tboxMin.cloneTo(outP);;\n\t\tvar outPE=outP.elements;\n\t\tif (planeNorEX >=0)\n\t\t\toutPE[0]=boxMaxE[0];\n\t\tif (planeNorEY >=0)\n\t\t\toutPE[1]=boxMaxE[1];\n\t\tif (planeNorEZ >=0)\n\t\t\toutPE[2]=boxMaxE[2];\n\t\tboxMax.cloneTo(outN);\n\t\tvar outNE=outN.elements;\n\t\tif (planeNorEX >=0)\n\t\t\toutNE[0]=boxMinE[0];\n\t\tif (planeNorEY >=0)\n\t\t\toutNE[1]=boxMinE[1];\n\t\tif (planeNorEZ >=0)\n\t\t\toutNE[2]=boxMinE[2];\n\t}\n\n\t/**\n\t*获取顶平面。\n\t*@return 顶平面。\n\t*/\n\t__getset(0,__proto,'top',function(){\n\t\treturn this._top;\n\t});\n\n\t/**\n\t*设置描述矩阵。\n\t*@param matrix 描述矩阵。\n\t*/\n\t/**\n\t*获取描述矩阵。\n\t*@return 描述矩阵。\n\t*/\n\t__getset(0,__proto,'matrix',function(){\n\t\treturn this._matrix;\n\t\t},function(matrix){\n\t\tthis._matrix=matrix;\n\t\tBoundFrustum._getPlanesFromMatrix(this._matrix,this._near,this._far,this._left,this._right,this._top,this._bottom);\n\t});\n\n\t/**\n\t*获取近平面。\n\t*@return 近平面。\n\t*/\n\t__getset(0,__proto,'near',function(){\n\t\treturn this._near;\n\t});\n\n\t/**\n\t*获取远平面。\n\t*@return 远平面。\n\t*/\n\t__getset(0,__proto,'far',function(){\n\t\treturn this._far;\n\t});\n\n\t/**\n\t*获取左平面。\n\t*@return 左平面。\n\t*/\n\t__getset(0,__proto,'left',function(){\n\t\treturn this._left;\n\t});\n\n\t/**\n\t*获取右平面。\n\t*@return 右平面。\n\t*/\n\t__getset(0,__proto,'right',function(){\n\t\treturn this._right;\n\t});\n\n\t/**\n\t*获取底平面。\n\t*@return 底平面。\n\t*/\n\t__getset(0,__proto,'bottom',function(){\n\t\treturn this._bottom;\n\t});\n\n\tBoundFrustum._getPlanesFromMatrix=function(m,np,fp,lp,rp,tp,bp){\n\t\tvar matrixE=m.elements;\n\t\tvar m11=matrixE[0];\n\t\tvar m12=matrixE[1];\n\t\tvar m13=matrixE[2];\n\t\tvar m14=matrixE[3];\n\t\tvar m21=matrixE[4];\n\t\tvar m22=matrixE[5];\n\t\tvar m23=matrixE[6];\n\t\tvar m24=matrixE[7];\n\t\tvar m31=matrixE[8];\n\t\tvar m32=matrixE[9];\n\t\tvar m33=matrixE[10];\n\t\tvar m34=matrixE[11];\n\t\tvar m41=matrixE[12];\n\t\tvar m42=matrixE[13];\n\t\tvar m43=matrixE[14];\n\t\tvar m44=matrixE[15];\n\t\tvar nearNorE=np.normal.elements;\n\t\tnearNorE[0]=m14+m13;\n\t\tnearNorE[1]=m24+m23;\n\t\tnearNorE[2]=m34+m33;\n\t\tnp.distance=m44+m43;\n\t\tnp.normalize();\n\t\tvar farNorE=fp.normal.elements;\n\t\tfarNorE[0]=m14-m13;\n\t\tfarNorE[1]=m24-m23;\n\t\tfarNorE[2]=m34-m33;\n\t\tfp.distance=m44-m43;\n\t\tfp.normalize();\n\t\tvar leftNorE=lp.normal.elements;\n\t\tleftNorE[0]=m14+m11;\n\t\tleftNorE[1]=m24+m21;\n\t\tleftNorE[2]=m34+m31;\n\t\tlp.distance=m44+m41;\n\t\tlp.normalize();\n\t\tvar rightNorE=rp.normal.elements;\n\t\trightNorE[0]=m14-m11;\n\t\trightNorE[1]=m24-m21;\n\t\trightNorE[2]=m34-m31;\n\t\trp.distance=m44-m41;\n\t\trp.normalize();\n\t\tvar topNorE=tp.normal.elements;\n\t\ttopNorE[0]=m14-m12;\n\t\ttopNorE[1]=m24-m22;\n\t\ttopNorE[2]=m34-m32;\n\t\ttp.distance=m44-m42;\n\t\ttp.normalize();\n\t\tvar bottomNorE=bp.normal.elements;\n\t\tbottomNorE[0]=m14+m12;\n\t\tbottomNorE[1]=m24+m22;\n\t\tbottomNorE[2]=m34+m32;\n\t\tbp.distance=m44+m42;\n\t\tbp.normalize();\n\t}\n\n\tBoundFrustum._get3PlaneInterPoint=function(p1,p2,p3){\n\t\tvar p1Nor=p1.normal;\n\t\tvar p2Nor=p2.normal;\n\t\tvar p3Nor=p3.normal;\n\t\tVector3.cross(p2Nor,p3Nor,BoundFrustum._tempV30);\n\t\tVector3.cross(p3Nor,p1Nor,BoundFrustum._tempV31);\n\t\tVector3.cross(p1Nor,p2Nor,BoundFrustum._tempV32);\n\t\tvar a=Vector3.dot(p1Nor,BoundFrustum._tempV30);\n\t\tvar b=Vector3.dot(p2Nor,BoundFrustum._tempV31);\n\t\tvar c=Vector3.dot(p3Nor,BoundFrustum._tempV32);\n\t\tVector3.scale(BoundFrustum._tempV30,-p1.distance / a,BoundFrustum._tempV33);\n\t\tVector3.scale(BoundFrustum._tempV31,-p2.distance / b,BoundFrustum._tempV34);\n\t\tVector3.scale(BoundFrustum._tempV32,-p3.distance / c,BoundFrustum._tempV35);\n\t\tVector3.add(BoundFrustum._tempV33,BoundFrustum._tempV34,BoundFrustum._tempV36);\n\t\tVector3.add(BoundFrustum._tempV35,BoundFrustum._tempV36,BoundFrustum._tempV37);\n\t\tvar v=BoundFrustum._tempV37;\n\t\treturn v;\n\t}\n\n\t__static(BoundFrustum,\n\t['_tempV30',function(){return this._tempV30=new Vector3();},'_tempV31',function(){return this._tempV31=new Vector3();},'_tempV32',function(){return this._tempV32=new Vector3();},'_tempV33',function(){return this._tempV33=new Vector3();},'_tempV34',function(){return this._tempV34=new Vector3();},'_tempV35',function(){return this._tempV35=new Vector3();},'_tempV36',function(){return this._tempV36=new Vector3();},'_tempV37',function(){return this._tempV37=new Vector3();}\n\t]);\n\treturn BoundFrustum;\n})()\n\n\n/**\n*<code>BoundSphere</code> 类用于创建包围球。\n*/\n//class laya.d3.math.BoundSphere\nvar BoundSphere=(function(){\n\tfunction BoundSphere(center,radius){\n\t\t/**包围球的中心。*/\n\t\tthis.center=null;\n\t\t/**包围球的半径。*/\n\t\tthis.radius=NaN;\n\t\tthis.center=center;\n\t\tthis.radius=radius;\n\t}\n\n\t__class(BoundSphere,'laya.d3.math.BoundSphere');\n\tvar __proto=BoundSphere.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t__proto.toDefault=function(){\n\t\tthis.center.toDefault();\n\t\tthis.radius=0;\n\t}\n\n\t/**\n\t*判断射线是否与碰撞球交叉，并返回交叉距离。\n\t*@param ray 射线。\n\t*@return 距离交叉点的距离，-1表示不交叉。\n\t*/\n\t__proto.intersectsRayDistance=function(ray){\n\t\treturn Collision.intersectsRayAndSphereRD(ray,this);\n\t}\n\n\t/**\n\t*判断射线是否与碰撞球交叉，并返回交叉点。\n\t*@param ray 射线。\n\t*@param outPoint 交叉点。\n\t*@return 距离交叉点的距离，-1表示不交叉。\n\t*/\n\t__proto.intersectsRayPoint=function(ray,outPoint){\n\t\treturn Collision.intersectsRayAndSphereRP(ray,this,outPoint);\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar dest=destObject;\n\t\tthis.center.cloneTo(dest.center);\n\t\tdest.radius=this.radius;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor(new Vector3(),new Vector3());\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\tBoundSphere.createFromSubPoints=function(points,start,count,out){\n\t\tif (points==null){\n\t\t\tthrow new Error(\"points\");\n\t\t}\n\t\tif (start < 0 || start >=points.length){\n\t\t\tthrow new Error(\"start\"+start+\"Must be in the range [0, \"+(points.length-1)+\"]\");\n\t\t}\n\t\tif (count < 0 || (start+count)> points.length){\n\t\t\tthrow new Error(\"count\"+count+\"Must be in the range <= \"+points.length+\"}\");\n\t\t};\n\t\tvar upperEnd=start+count;\n\t\tvar center=BoundSphere._tempVector3;\n\t\tcenter.elements[0]=0;\n\t\tcenter.elements[1]=0;\n\t\tcenter.elements[2]=0;\n\t\tfor (var i=start;i < upperEnd;++i){\n\t\t\tVector3.add(points[i],center,center);\n\t\t};\n\t\tvar outCenter=out.center;\n\t\tVector3.scale(center,1 / count,outCenter);\n\t\tvar radius=0.0;\n\t\tfor (i=start;i < upperEnd;++i){\n\t\t\tvar distance=Vector3.distanceSquared(outCenter,points[i]);\n\t\t\tif (distance > radius)\n\t\t\t\tradius=distance;\n\t\t}\n\t\tout.radius=Math.sqrt(radius);\n\t}\n\n\tBoundSphere.createfromPoints=function(points,out){\n\t\tif (points==null){\n\t\t\tthrow new Error(\"points\");\n\t\t}\n\t\tBoundSphere.createFromSubPoints(points,0,points.length,out);\n\t}\n\n\t__static(BoundSphere,\n\t['_tempVector3',function(){return this._tempVector3=new Vector3();}\n\t]);\n\treturn BoundSphere;\n})()\n\n\n/**\n*<code>Collision</code> 类用于检测碰撞。\n*/\n//class laya.d3.math.Collision\nvar Collision=(function(){\n\t/**\n\t*创建一个 <code>Collision</code> 实例。\n\t*/\n\tfunction Collision(){}\n\t__class(Collision,'laya.d3.math.Collision');\n\tCollision.distancePlaneToPoint=function(plane,point){\n\t\tvar dot=Vector3.dot(plane.normal,point);\n\t\treturn dot-plane.distance;\n\t}\n\n\tCollision.distanceBoxToPoint=function(box,point){\n\t\tvar boxMine=box.min.elements;\n\t\tvar boxMineX=boxMine[0];\n\t\tvar boxMineY=boxMine[1];\n\t\tvar boxMineZ=boxMine[2];\n\t\tvar boxMaxe=box.max.elements;\n\t\tvar boxMaxeX=boxMaxe[0];\n\t\tvar boxMaxeY=boxMaxe[1];\n\t\tvar boxMaxeZ=boxMaxe[2];\n\t\tvar pointe=point.elements;\n\t\tvar pointeX=pointe[0];\n\t\tvar pointeY=pointe[1];\n\t\tvar pointeZ=pointe[2];\n\t\tvar distance=0;\n\t\tif (pointeX < boxMineX)\n\t\t\tdistance+=(boxMineX-pointeX)*(boxMineX-pointeX);\n\t\tif (pointeX > boxMaxeX)\n\t\t\tdistance+=(boxMaxeX-pointeX)*(boxMaxeX-pointeX);\n\t\tif (pointeY < boxMineY)\n\t\t\tdistance+=(boxMineY-pointeY)*(boxMineY-pointeY);\n\t\tif (pointeY > boxMaxeY)\n\t\t\tdistance+=(boxMaxeY-pointeY)*(boxMaxeY-pointeY);\n\t\tif (pointeZ < boxMineZ)\n\t\t\tdistance+=(boxMineZ-pointeZ)*(boxMineZ-pointeZ);\n\t\tif (pointeZ > boxMaxeZ)\n\t\t\tdistance+=(boxMaxeZ-pointeZ)*(boxMaxeZ-pointeZ);\n\t\treturn Math.sqrt(distance);\n\t}\n\n\tCollision.distanceBoxToBox=function(box1,box2){\n\t\tvar box1Mine=box1.min.elements;\n\t\tvar box1MineX=box1Mine[0];\n\t\tvar box1MineY=box1Mine[1];\n\t\tvar box1MineZ=box1Mine[2];\n\t\tvar box1Maxe=box1.max.elements;\n\t\tvar box1MaxeX=box1Maxe[0];\n\t\tvar box1MaxeY=box1Maxe[1];\n\t\tvar box1MaxeZ=box1Maxe[2];\n\t\tvar box2Mine=box2.min.elements;\n\t\tvar box2MineX=box2Mine[0];\n\t\tvar box2MineY=box2Mine[1];\n\t\tvar box2MineZ=box2Mine[2];\n\t\tvar box2Maxe=box2.max.elements;\n\t\tvar box2MaxeX=box2Maxe[0];\n\t\tvar box2MaxeY=box2Maxe[1];\n\t\tvar box2MaxeZ=box2Maxe[2];\n\t\tvar distance=0;\n\t\tvar delta=NaN;\n\t\tif (box1MineX > box2MaxeX){\n\t\t\tdelta=box1MineX-box2MaxeX;\n\t\t\tdistance+=delta *delta;\n\t\t\t}else if (box2MineX > box1MaxeX){\n\t\t\tdelta=box2MineX-box1MaxeX;\n\t\t\tdistance+=delta *delta;\n\t\t}\n\t\tif (box1MineY > box2MaxeY){\n\t\t\tdelta=box1MineY-box2MaxeY;\n\t\t\tdistance+=delta *delta;\n\t\t\t}else if (box2MineY > box1MaxeY){\n\t\t\tdelta=box2MineY-box1MaxeY;\n\t\t\tdistance+=delta *delta;\n\t\t}\n\t\tif (box1MineZ > box2MaxeZ){\n\t\t\tdelta=box1MineZ-box2MaxeZ;\n\t\t\tdistance+=delta *delta;\n\t\t\t}else if (box2MineZ > box1MaxeZ){\n\t\t\tdelta=box2MineZ-box1MaxeZ;\n\t\t\tdistance+=delta *delta;\n\t\t}\n\t\treturn Math.sqrt(distance);\n\t}\n\n\tCollision.distanceSphereToPoint=function(sphere,point){\n\t\tvar distance=Math.sqrt(Vector3.distanceSquared(sphere.center,point));\n\t\tdistance-=sphere.radius;\n\t\treturn Math.max(distance,0);\n\t}\n\n\tCollision.distanceSphereToSphere=function(sphere1,sphere2){\n\t\tvar distance=Math.sqrt(Vector3.distanceSquared(sphere1.center,sphere2.center));\n\t\tdistance-=sphere1.radius+sphere2.radius;\n\t\treturn Math.max(distance,0);\n\t}\n\n\tCollision.intersectsRayAndTriangleRD=function(ray,vertex1,vertex2,vertex3,out){\n\t\tvar rayO=ray.origin;\n\t\tvar rayOe=rayO.elements;\n\t\tvar rayOeX=rayOe[0];\n\t\tvar rayOeY=rayOe[1];\n\t\tvar rayOeZ=rayOe[2];\n\t\tvar rayD=ray.direction;\n\t\tvar rayDe=rayD.elements;\n\t\tvar rayDeX=rayDe[0];\n\t\tvar rayDeY=rayDe[1];\n\t\tvar rayDeZ=rayDe[2];\n\t\tvar v1e=vertex1.elements;\n\t\tvar v1eX=v1e[0];\n\t\tvar v1eY=v1e[1];\n\t\tvar v1eZ=v1e[2];\n\t\tvar v2e=vertex2.elements;\n\t\tvar v2eX=v2e[0];\n\t\tvar v2eY=v2e[1];\n\t\tvar v2eZ=v2e[2];\n\t\tvar v3e=vertex3.elements;\n\t\tvar v3eX=v3e[0];\n\t\tvar v3eY=v3e[1];\n\t\tvar v3eZ=v3e[2];\n\t\tvar _tempV30e=Collision._tempV30.elements;\n\t\tvar _tempV30eX=_tempV30e[0];\n\t\tvar _tempV30eY=_tempV30e[1];\n\t\tvar _tempV30eZ=_tempV30e[2];\n\t\t_tempV30eX=v2eX-v1eX;\n\t\t_tempV30eY=v2eY-v1eY;\n\t\t_tempV30eZ=v2eZ-v1eZ;\n\t\tvar _tempV31e=Collision._tempV31.elements;\n\t\tvar _tempV31eX=_tempV31e[0];\n\t\tvar _tempV31eY=_tempV31e[1];\n\t\tvar _tempV31eZ=_tempV31e[2];\n\t\t_tempV31eX=v3eX-v1eX;\n\t\t_tempV31eY=v3eY-v1eY;\n\t\t_tempV31eZ=v3eZ-v1eZ;\n\t\tvar _tempV32e=Collision._tempV32.elements;\n\t\tvar _tempV32eX=_tempV32e[0];\n\t\tvar _tempV32eY=_tempV32e[1];\n\t\tvar _tempV32eZ=_tempV32e[2];\n\t\t_tempV32eX=(rayDeY *_tempV31eZ)-(rayDeZ *_tempV31eY);\n\t\t_tempV32eY=(rayDeZ *_tempV31eX)-(rayDeX *_tempV31eZ);\n\t\t_tempV32eZ=(rayDeX *_tempV31eY)-(rayDeY *_tempV31eX);\n\t\tvar determinant=(_tempV30eX *_tempV32eX)+(_tempV30eY *_tempV32eY)+(_tempV30eZ *_tempV32eZ);\n\t\tif (MathUtils3D.isZero(determinant)){\n\t\t\tout=0;\n\t\t\treturn false;\n\t\t};\n\t\tvar inversedeterminant=1 / determinant;\n\t\tvar _tempV33e=Collision._tempV33.elements;\n\t\tvar _tempV33eX=_tempV33e[0];\n\t\tvar _tempV33eY=_tempV33e[1];\n\t\tvar _tempV33eZ=_tempV33e[2];\n\t\t_tempV33eX=rayOeX-v1eX;\n\t\t_tempV33eY=rayOeY-v1eY;\n\t\t_tempV33eZ=rayOeZ-v1eZ;\n\t\tvar triangleU=(_tempV33eX *_tempV32eX)+(_tempV33eY *_tempV32eY)+(_tempV33eZ *_tempV32eZ);\n\t\ttriangleU *=inversedeterminant;\n\t\tif (triangleU < 0 || triangleU > 1){\n\t\t\tout=0;\n\t\t\treturn false;\n\t\t};\n\t\tvar _tempV34e=Collision._tempV34.elements;\n\t\tvar _tempV34eX=_tempV34e[0];\n\t\tvar _tempV34eY=_tempV34e[1];\n\t\tvar _tempV34eZ=_tempV34e[2];\n\t\t_tempV34eX=(_tempV33eY *_tempV30eZ)-(_tempV33eZ *_tempV30eY);\n\t\t_tempV34eY=(_tempV33eZ *_tempV30eX)-(_tempV33eX *_tempV30eZ);\n\t\t_tempV34eZ=(_tempV33eX *_tempV30eY)-(_tempV33eY *_tempV30eX);\n\t\tvar triangleV=((rayDeX *_tempV34eX)+(rayDeY *_tempV34eY))+(rayDeZ *_tempV34eZ);\n\t\ttriangleV *=inversedeterminant;\n\t\tif (triangleV < 0 || triangleU+triangleV > 1){\n\t\t\tout=0;\n\t\t\treturn false;\n\t\t};\n\t\tvar raydistance=(_tempV31eX *_tempV34eX)+(_tempV31eY *_tempV34eY)+(_tempV31eZ *_tempV34eZ);\n\t\traydistance *=inversedeterminant;\n\t\tif (raydistance < 0){\n\t\t\tout=0;\n\t\t\treturn false;\n\t\t}\n\t\tout=raydistance;\n\t\treturn true;\n\t}\n\n\tCollision.intersectsRayAndTriangleRP=function(ray,vertex1,vertex2,vertex3,out){\n\t\tvar distance=NaN;\n\t\tif (!Collision.intersectsRayAndTriangleRD(ray,vertex1,vertex2,vertex3,distance)){\n\t\t\tout=Vector3.ZERO;\n\t\t\treturn false;\n\t\t}\n\t\tVector3.scale(ray.direction,distance,Collision._tempV30);\n\t\tVector3.add(ray.origin,Collision._tempV30,out);\n\t\treturn true;\n\t}\n\n\tCollision.intersectsRayAndPoint=function(ray,point){\n\t\tVector3.subtract(ray.origin,point,Collision._tempV30);\n\t\tvar b=Vector3.dot(Collision._tempV30,ray.direction);\n\t\tvar c=Vector3.dot(Collision._tempV30,Collision._tempV30)-MathUtils3D.zeroTolerance;\n\t\tif (c > 0 && b > 0)\n\t\t\treturn false;\n\t\tvar discriminant=b *b-c;\n\t\tif (discriminant < 0)\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\tCollision.intersectsRayAndRay=function(ray1,ray2,out){\n\t\tvar ray1o=ray1.origin;\n\t\tvar ray1oe=ray1o.elements;\n\t\tvar ray1oeX=ray1oe[0];\n\t\tvar ray1oeY=ray1oe[1];\n\t\tvar ray1oeZ=ray1oe[2];\n\t\tvar ray1d=ray1.direction;\n\t\tvar ray1de=ray1d.elements;\n\t\tvar ray1deX=ray1de[0];\n\t\tvar ray1deY=ray1de[1];\n\t\tvar ray1deZ=ray1de[2];\n\t\tvar ray2o=ray2.origin;\n\t\tvar ray2oe=ray2o.elements;\n\t\tvar ray2oeX=ray2oe[0];\n\t\tvar ray2oeY=ray2oe[1];\n\t\tvar ray2oeZ=ray2oe[2];\n\t\tvar ray2d=ray2.direction;\n\t\tvar ray2de=ray2d.elements;\n\t\tvar ray2deX=ray2de[0];\n\t\tvar ray2deY=ray2de[1];\n\t\tvar ray2deZ=ray2de[2];\n\t\tVector3.cross(ray1d,ray2d,Collision._tempV30);\n\t\tvar tempV3e=Collision._tempV30.elements;\n\t\tvar denominator=Vector3.scalarLengthSquared(Collision._tempV30);\n\t\tif (MathUtils3D.isZero(denominator)){\n\t\t\tif (MathUtils3D.nearEqual(ray2oeX,ray1oeX)&& MathUtils3D.nearEqual(ray2oeY,ray1oeY)&& MathUtils3D.nearEqual(ray2oeZ,ray1oeZ)){\n\t\t\t\tVector3.ZERO.cloneTo(out);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tvar m11=ray2oeX-ray1oeX;\n\t\tvar m12=ray2oeY-ray1oeY;\n\t\tvar m13=ray2oeZ-ray1oeZ;\n\t\tvar m21=ray2deX;\n\t\tvar m22=ray2deY;\n\t\tvar m23=ray2deZ;\n\t\tvar m31=tempV3e[0];\n\t\tvar m32=tempV3e[1];\n\t\tvar m33=tempV3e[2];\n\t\tvar dets=m11 *m22 *m33+m12 *m23 *m31+m13 *m21 *m32-m11 *m23 *m32-m12 *m21 *m33-m13 *m22 *m31;\n\t\tm21=ray1deX;\n\t\tm22=ray1deY;\n\t\tm23=ray1deZ;\n\t\tvar dett=m11 *m22 *m33+m12 *m23 *m31+m13 *m21 *m32-m11 *m23 *m32-m12 *m21 *m33-m13 *m22 *m31;\n\t\tvar s=dets / denominator;\n\t\tvar t=dett / denominator;\n\t\tVector3.scale(ray1d,s,Collision._tempV30);\n\t\tVector3.scale(ray2d,t,Collision._tempV31);\n\t\tVector3.add(ray1o,Collision._tempV30,Collision._tempV32);\n\t\tVector3.add(ray2o,Collision._tempV31,Collision._tempV33);\n\t\tvar point1e=Collision._tempV32.elements;\n\t\tvar point2e=Collision._tempV33.elements;\n\t\tif (!MathUtils3D.nearEqual(point2e[0],point1e[0])|| !MathUtils3D.nearEqual(point2e[1],point1e[1])|| !MathUtils3D.nearEqual(point2e[2],point1e[2])){\n\t\t\tVector3.ZERO.cloneTo(out);\n\t\t\treturn false;\n\t\t}\n\t\tCollision._tempV32.cloneTo(out);\n\t\treturn true;\n\t}\n\n\tCollision.intersectsPlaneAndTriangle=function(plane,vertex1,vertex2,vertex3){\n\t\tvar test1=Collision.intersectsPlaneAndPoint(plane,vertex1);\n\t\tvar test2=Collision.intersectsPlaneAndPoint(plane,vertex2);\n\t\tvar test3=Collision.intersectsPlaneAndPoint(plane,vertex3);\n\t\tif (test1==Plane.PlaneIntersectionType_Front && test2==Plane.PlaneIntersectionType_Front && test3==Plane.PlaneIntersectionType_Front)\n\t\t\treturn Plane.PlaneIntersectionType_Front;\n\t\tif (test1==Plane.PlaneIntersectionType_Back && test2==Plane.PlaneIntersectionType_Back && test3==Plane.PlaneIntersectionType_Back)\n\t\t\treturn Plane.PlaneIntersectionType_Back;\n\t\treturn Plane.PlaneIntersectionType_Intersecting;\n\t}\n\n\tCollision.intersectsRayAndPlaneRD=function(ray,plane,out){\n\t\tvar planeNor=plane.normal;\n\t\tvar direction=Vector3.dot(planeNor,ray.direction);\n\t\tif (MathUtils3D.isZero(direction)){\n\t\t\tout=0;\n\t\t\treturn false;\n\t\t};\n\t\tvar position=Vector3.dot(planeNor,ray.origin);\n\t\tout=(-plane.distance-position)/ direction;\n\t\tif (out < 0){\n\t\t\tout=0;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tCollision.intersectsRayAndPlaneRP=function(ray,plane,out){\n\t\tvar distance=NaN;\n\t\tif (!Collision.intersectsRayAndPlaneRD(ray,plane,distance)){\n\t\t\tout=Vector3.ZERO;\n\t\t\treturn false;\n\t\t}\n\t\tVector3.scale(ray.direction,distance,Collision._tempV30);\n\t\tVector3.add(ray.origin,Collision._tempV30,Collision._tempV31);\n\t\tout=Collision._tempV31;\n\t\treturn true;\n\t}\n\n\tCollision.intersectsRayAndBoxRD=function(ray,box){\n\t\tvar rayoe=ray.origin.elements;\n\t\tvar rayoeX=rayoe[0];\n\t\tvar rayoeY=rayoe[1];\n\t\tvar rayoeZ=rayoe[2];\n\t\tvar rayde=ray.direction.elements;\n\t\tvar raydeX=rayde[0];\n\t\tvar raydeY=rayde[1];\n\t\tvar raydeZ=rayde[2];\n\t\tvar boxMine=box.min.elements;\n\t\tvar boxMineX=boxMine[0];\n\t\tvar boxMineY=boxMine[1];\n\t\tvar boxMineZ=boxMine[2];\n\t\tvar boxMaxe=box.max.elements;\n\t\tvar boxMaxeX=boxMaxe[0];\n\t\tvar boxMaxeY=boxMaxe[1];\n\t\tvar boxMaxeZ=boxMaxe[2];\n\t\tvar out=0;\n\t\tvar tmax=MathUtils3D.MaxValue;\n\t\tif (MathUtils3D.isZero(raydeX)){\n\t\t\tif (rayoeX < boxMineX || rayoeX > boxMaxeX){\n\t\t\t\treturn-1;\n\t\t\t}\n\t\t\t}else {\n\t\t\tvar inverse=1 / raydeX;\n\t\t\tvar t1=(boxMineX-rayoeX)*inverse;\n\t\t\tvar t2=(boxMaxeX-rayoeX)*inverse;\n\t\t\tif (t1 > t2){\n\t\t\t\tvar temp=t1;\n\t\t\t\tt1=t2;\n\t\t\t\tt2=temp;\n\t\t\t}\n\t\t\tout=Math.max(t1,out);\n\t\t\ttmax=Math.min(t2,tmax);\n\t\t\tif (out > tmax){\n\t\t\t\treturn-1;\n\t\t\t}\n\t\t}\n\t\tif (MathUtils3D.isZero(raydeY)){\n\t\t\tif (rayoeY < boxMineY || rayoeY > boxMaxeY){\n\t\t\t\treturn-1;\n\t\t\t}\n\t\t\t}else {\n\t\t\tvar inverse1=1 / raydeY;\n\t\t\tvar t3=(boxMineY-rayoeY)*inverse1;\n\t\t\tvar t4=(boxMaxeY-rayoeY)*inverse1;\n\t\t\tif (t3 > t4){\n\t\t\t\tvar temp1=t3;\n\t\t\t\tt3=t4;\n\t\t\t\tt4=temp1;\n\t\t\t}\n\t\t\tout=Math.max(t3,out);\n\t\t\ttmax=Math.min(t4,tmax);\n\t\t\tif (out > tmax){\n\t\t\t\treturn-1;\n\t\t\t}\n\t\t}\n\t\tif (MathUtils3D.isZero(raydeZ)){\n\t\t\tif (rayoeZ < boxMineZ || rayoeZ > boxMaxeZ){\n\t\t\t\treturn-1;\n\t\t\t}\n\t\t\t}else {\n\t\t\tvar inverse2=1 / raydeZ;\n\t\t\tvar t5=(boxMineZ-rayoeZ)*inverse2;\n\t\t\tvar t6=(boxMaxeZ-rayoeZ)*inverse2;\n\t\t\tif (t5 > t6){\n\t\t\t\tvar temp2=t5;\n\t\t\t\tt5=t6;\n\t\t\t\tt6=temp2;\n\t\t\t}\n\t\t\tout=Math.max(t5,out);\n\t\t\ttmax=Math.min(t6,tmax);\n\t\t\tif (out > tmax){\n\t\t\t\treturn-1;\n\t\t\t}\n\t\t}\n\t\treturn out;\n\t}\n\n\tCollision.intersectsRayAndBoxRP=function(ray,box,out){\n\t\tvar distance=Collision.intersectsRayAndBoxRD(ray,box);\n\t\tif (distance===-1){\n\t\t\tVector3.ZERO.cloneTo(out);\n\t\t\treturn distance;\n\t\t}\n\t\tVector3.scale(ray.direction,distance,Collision._tempV30);\n\t\tVector3.add(ray.origin,Collision._tempV30,Collision._tempV31);\n\t\tCollision._tempV31.cloneTo(out);\n\t\treturn distance;\n\t}\n\n\tCollision.intersectsRayAndSphereRD=function(ray,sphere){\n\t\tvar sphereR=sphere.radius;\n\t\tVector3.subtract(ray.origin,sphere.center,Collision._tempV30);\n\t\tvar b=Vector3.dot(Collision._tempV30,ray.direction);\n\t\tvar c=Vector3.dot(Collision._tempV30,Collision._tempV30)-(sphereR *sphereR);\n\t\tif (c > 0 && b > 0){\n\t\t\treturn-1;\n\t\t};\n\t\tvar discriminant=b *b-c;\n\t\tif (discriminant < 0){\n\t\t\treturn-1;\n\t\t};\n\t\tvar distance=-b-Math.sqrt(discriminant);\n\t\tif (distance < 0)\n\t\t\tdistance=0;\n\t\treturn distance;\n\t}\n\n\tCollision.intersectsRayAndSphereRP=function(ray,sphere,out){\n\t\tvar distance=Collision.intersectsRayAndSphereRD(ray,sphere);\n\t\tif (distance===-1){\n\t\t\tVector3.ZERO.cloneTo(out);\n\t\t\treturn distance;\n\t\t}\n\t\tVector3.scale(ray.direction,distance,Collision._tempV30);\n\t\tVector3.add(ray.origin,Collision._tempV30,Collision._tempV31);\n\t\tCollision._tempV31.cloneTo(out);\n\t\treturn distance;\n\t}\n\n\tCollision.intersectsSphereAndTriangle=function(sphere,vertex1,vertex2,vertex3){\n\t\tvar sphereC=sphere.center;\n\t\tvar sphereR=sphere.radius;\n\t\tCollision.closestPointPointTriangle(sphereC,vertex1,vertex2,vertex3,Collision._tempV30);\n\t\tVector3.subtract(Collision._tempV30,sphereC,Collision._tempV31);\n\t\tvar dot=Vector3.dot(Collision._tempV31,Collision._tempV31);\n\t\treturn dot <=sphereR *sphereR;\n\t}\n\n\tCollision.intersectsPlaneAndPoint=function(plane,point){\n\t\tvar distance=Vector3.dot(plane.normal,point)+plane.distance;\n\t\tif (distance > 0)\n\t\t\treturn Plane.PlaneIntersectionType_Front;\n\t\tif (distance < 0)\n\t\t\treturn Plane.PlaneIntersectionType_Back;\n\t\treturn Plane.PlaneIntersectionType_Intersecting;\n\t}\n\n\tCollision.intersectsPlaneAndPlane=function(plane1,plane2){\n\t\tVector3.cross(plane1.normal,plane2.normal,Collision._tempV30);\n\t\tvar denominator=Vector3.dot(Collision._tempV30,Collision._tempV30);\n\t\tif (MathUtils3D.isZero(denominator))\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\tCollision.intersectsPlaneAndPlaneRL=function(plane1,plane2,line){\n\t\tvar plane1nor=plane1.normal;\n\t\tvar plane2nor=plane2.normal;\n\t\tVector3.cross(plane1nor,plane2nor,Collision._tempV34);\n\t\tvar denominator=Vector3.dot(Collision._tempV34,Collision._tempV34);\n\t\tif (MathUtils3D.isZero(denominator))\n\t\t\treturn false;\n\t\tVector3.scale(plane2nor,plane1.distance,Collision._tempV30);\n\t\tVector3.scale(plane1nor,plane2.distance,Collision._tempV31);\n\t\tVector3.subtract(Collision._tempV30,Collision._tempV31,Collision._tempV32);\n\t\tVector3.cross(Collision._tempV32,Collision._tempV34,Collision._tempV33);\n\t\tVector3.normalize(Collision._tempV34,Collision._tempV34);\n\t\tline=new Ray(Collision._tempV33,Collision._tempV34);\n\t\treturn true;\n\t}\n\n\tCollision.intersectsPlaneAndBox=function(plane,box){\n\t\tvar planeD=plane.distance;\n\t\tvar planeNor=plane.normal;\n\t\tvar planeNore=planeNor.elements;\n\t\tvar planeNoreX=planeNore[0];\n\t\tvar planeNoreY=planeNore[1];\n\t\tvar planeNoreZ=planeNore[2];\n\t\tvar boxMine=box.min.elements;\n\t\tvar boxMineX=boxMine[0];\n\t\tvar boxMineY=boxMine[1];\n\t\tvar boxMineZ=boxMine[2];\n\t\tvar boxMaxe=box.max.elements;\n\t\tvar boxMaxeX=boxMaxe[0];\n\t\tvar boxMaxeY=boxMaxe[1];\n\t\tvar boxMaxeZ=boxMaxe[2];\n\t\tCollision._tempV30.elements[0]=(planeNoreX > 0)? boxMineX :boxMaxeX;\n\t\tCollision._tempV30.elements[1]=(planeNoreY > 0)? boxMineY :boxMaxeY;\n\t\tCollision._tempV30.elements[2]=(planeNoreZ > 0)? boxMineZ :boxMaxeZ;\n\t\tCollision._tempV31.elements[0]=(planeNoreX > 0)? boxMaxeX :boxMineX;\n\t\tCollision._tempV31.elements[1]=(planeNoreY > 0)? boxMaxeY :boxMineY;\n\t\tCollision._tempV31.elements[2]=(planeNoreZ > 0)? boxMaxeZ :boxMineZ;\n\t\tvar distance=Vector3.dot(planeNor,Collision._tempV30);\n\t\tif (distance+planeD > 0)\n\t\t\treturn Plane.PlaneIntersectionType_Front;\n\t\tdistance=Vector3.dot(planeNor,Collision._tempV31);\n\t\tif (distance+planeD < 0)\n\t\t\treturn Plane.PlaneIntersectionType_Back;\n\t\treturn Plane.PlaneIntersectionType_Intersecting;\n\t}\n\n\tCollision.intersectsPlaneAndSphere=function(plane,sphere){\n\t\tvar sphereR=sphere.radius;\n\t\tvar distance=Vector3.dot(plane.normal,sphere.center)+plane.distance;\n\t\tif (distance > sphereR)\n\t\t\treturn Plane.PlaneIntersectionType_Front;\n\t\tif (distance <-sphereR)\n\t\t\treturn Plane.PlaneIntersectionType_Back;\n\t\treturn Plane.PlaneIntersectionType_Intersecting;\n\t}\n\n\tCollision.intersectsBoxAndBox=function(box1,box2){\n\t\tvar box1Mine=box1.min.elements;\n\t\tvar box1Maxe=box1.max.elements;\n\t\tvar box2Mine=box2.min.elements;\n\t\tvar box2Maxe=box2.max.elements;\n\t\tif (box1Mine[0] > box2Maxe[0] || box2Mine[0] > box1Maxe[0])\n\t\t\treturn false;\n\t\tif (box1Mine[1] > box2Maxe[1] || box2Mine[1] > box1Maxe[1])\n\t\t\treturn false;\n\t\tif (box1Mine[2] > box2Maxe[2] || box2Mine[2] > box1Maxe[2])\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\tCollision.intersectsBoxAndSphere=function(box,sphere){\n\t\tvar sphereC=sphere.center;\n\t\tvar sphereR=sphere.radius;\n\t\tVector3.Clamp(sphereC,box.min,box.max,Collision._tempV30);\n\t\tvar distance=Vector3.distanceSquared(sphereC,Collision._tempV30);\n\t\treturn distance <=sphereR *sphereR;\n\t}\n\n\tCollision.intersectsSphereAndSphere=function(sphere1,sphere2){\n\t\tvar radiisum=sphere1.radius+sphere2.radius;\n\t\treturn Vector3.distanceSquared(sphere1.center,sphere2.center)<=radiisum *radiisum;\n\t}\n\n\tCollision.boxContainsPoint=function(box,point){\n\t\tvar boxMine=box.min.elements;\n\t\tvar boxMaxe=box.max.elements;\n\t\tvar pointe=point.elements;\n\t\tif (boxMine[0] <=pointe[0] && boxMaxe[0] >=pointe[0] && boxMine[1] <=pointe[1] && boxMaxe[1] >=pointe[1] && boxMine[2] <=pointe[2] && boxMaxe[2] >=pointe[2])\n\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t}\n\n\tCollision.boxContainsBox=function(box1,box2){\n\t\tvar box1Mine=box1.min.elements;\n\t\tvar box1MineX=box1Mine[0];\n\t\tvar box1MineY=box1Mine[1];\n\t\tvar box1MineZ=box1Mine[2];\n\t\tvar box1Maxe=box1.max.elements;\n\t\tvar box1MaxeX=box1Maxe[0];\n\t\tvar box1MaxeY=box1Maxe[1];\n\t\tvar box1MaxeZ=box1Maxe[2];\n\t\tvar box2Mine=box2.min.elements;\n\t\tvar box2MineX=box2Mine[0];\n\t\tvar box2MineY=box2Mine[1];\n\t\tvar box2MineZ=box2Mine[2];\n\t\tvar box2Maxe=box2.max.elements;\n\t\tvar box2MaxeX=box2Maxe[0];\n\t\tvar box2MaxeY=box2Maxe[1];\n\t\tvar box2MaxeZ=box2Maxe[2];\n\t\tif (box1MaxeX < box2MineX || box1MineX > box2MaxeX)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (box1MaxeY < box2MineY || box1MineY > box2MaxeY)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (box1MaxeZ < box2MineZ || box1MineZ > box2MaxeZ)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (box1MineX <=box2MineX && box2MaxeX <=box2MaxeX && box1MineY <=box2MineY && box2MaxeY <=box1MaxeY && box1MineZ <=box2MineZ && box2MaxeZ <=box1MaxeZ){\n\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\t}\n\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t}\n\n\tCollision.boxContainsSphere=function(box,sphere){\n\t\tvar boxMin=box.min;\n\t\tvar boxMine=boxMin.elements;\n\t\tvar boxMineX=boxMine[0];\n\t\tvar boxMineY=boxMine[1];\n\t\tvar boxMineZ=boxMine[2];\n\t\tvar boxMax=box.max;\n\t\tvar boxMaxe=boxMax.elements;\n\t\tvar boxMaxeX=boxMaxe[0];\n\t\tvar boxMaxeY=boxMaxe[1];\n\t\tvar boxMaxeZ=boxMaxe[2];\n\t\tvar sphereC=sphere.center;\n\t\tvar sphereCe=sphereC.elements;\n\t\tvar sphereCeX=sphereCe[0];\n\t\tvar sphereCeY=sphereCe[1];\n\t\tvar sphereCeZ=sphereCe[2];\n\t\tvar sphereR=sphere.radius;\n\t\tVector3.Clamp(sphereC,boxMin,boxMax,Collision._tempV30);\n\t\tvar distance=Vector3.distanceSquared(sphereC,Collision._tempV30);\n\t\tif (distance > sphereR *sphereR)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif ((((boxMineX+sphereR <=sphereCeX)&& (sphereCeX <=boxMaxeX-sphereR))&& ((boxMaxeX-boxMineX > sphereR)&&\n\t\t\t(boxMineY+sphereR <=sphereCeY)))&& (((sphereCeY <=boxMaxeY-sphereR)&& (boxMaxeY-boxMineY > sphereR))&&\n\t\t(((boxMineZ+sphereR <=sphereCeZ)&& (sphereCeZ <=boxMaxeZ-sphereR))&& (boxMaxeZ-boxMineZ > sphereR))))\n\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t}\n\n\tCollision.sphereContainsPoint=function(sphere,point){\n\t\tif (Vector3.distanceSquared(point,sphere.center)<=sphere.radius *sphere.radius)\n\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t}\n\n\tCollision.sphereContainsTriangle=function(sphere,vertex1,vertex2,vertex3){\n\t\tvar test1=Collision.sphereContainsPoint(sphere,vertex1);\n\t\tvar test2=Collision.sphereContainsPoint(sphere,vertex2);\n\t\tvar test3=Collision.sphereContainsPoint(sphere,vertex3);\n\t\tif (test1==/*laya.d3.math.ContainmentType.Contains*/1 && test2==/*laya.d3.math.ContainmentType.Contains*/1 && test3==/*laya.d3.math.ContainmentType.Contains*/1)\n\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\tif (Collision.intersectsSphereAndTriangle(sphere,vertex1,vertex2,vertex3))\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t}\n\n\tCollision.sphereContainsBox=function(sphere,box){\n\t\tvar sphereC=sphere.center;\n\t\tvar sphereCe=sphereC.elements;\n\t\tvar sphereCeX=sphereCe[0];\n\t\tvar sphereCeY=sphereCe[1];\n\t\tvar sphereCeZ=sphereCe[2];\n\t\tvar sphereR=sphere.radius;\n\t\tvar boxMin=box.min;\n\t\tvar boxMine=boxMin.elements;\n\t\tvar boxMineX=boxMine[0];\n\t\tvar boxMineY=boxMine[1];\n\t\tvar boxMineZ=boxMine[2];\n\t\tvar boxMax=box.max;\n\t\tvar boxMaxe=boxMax.elements;\n\t\tvar boxMaxeX=boxMaxe[0];\n\t\tvar boxMaxeY=boxMaxe[1];\n\t\tvar boxMaxeZ=boxMaxe[2];\n\t\tvar _tempV30e=Collision._tempV30.elements;\n\t\tvar _tempV30eX=_tempV30e[0];\n\t\tvar _tempV30eY=_tempV30e[1];\n\t\tvar _tempV30eZ=_tempV30e[2];\n\t\tif (!Collision.intersectsBoxAndSphere(box,sphere))\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tvar radiusSquared=sphereR *sphereR;\n\t\t_tempV30eX=sphereCeX-boxMineX;\n\t\t_tempV30eY=sphereCeY-boxMaxeY;\n\t\t_tempV30eZ=sphereCeZ-boxMaxeZ;\n\t\tif (Vector3.scalarLengthSquared(Collision._tempV30)> radiusSquared)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t_tempV30eX=sphereCeX-boxMaxeX;\n\t\t_tempV30eY=sphereCeY-boxMaxeY;\n\t\t_tempV30eZ=sphereCeZ-boxMaxeZ;\n\t\tif (Vector3.scalarLengthSquared(Collision._tempV30)> radiusSquared)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t_tempV30eX=sphereCeX-boxMaxeX;\n\t\t_tempV30eY=sphereCeY-boxMineY;\n\t\t_tempV30eZ=sphereCeZ-boxMaxeZ;\n\t\tif (Vector3.scalarLengthSquared(Collision._tempV30)> radiusSquared)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t_tempV30eX=sphereCeX-boxMineX;\n\t\t_tempV30eY=sphereCeY-boxMineY;\n\t\t_tempV30eZ=sphereCeZ-boxMaxeZ;\n\t\tif (Vector3.scalarLengthSquared(Collision._tempV30)> radiusSquared)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t_tempV30eX=sphereCeX-boxMineX;\n\t\t_tempV30eY=sphereCeY-boxMaxeY;\n\t\t_tempV30eZ=sphereCeZ-boxMineZ;\n\t\tif (Vector3.scalarLengthSquared(Collision._tempV30)> radiusSquared)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t_tempV30eX=sphereCeX-boxMaxeX;\n\t\t_tempV30eY=sphereCeY-boxMaxeY;\n\t\t_tempV30eZ=sphereCeZ-boxMineZ;\n\t\tif (Vector3.scalarLengthSquared(Collision._tempV30)> radiusSquared)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t_tempV30eX=sphereCeX-boxMaxeX;\n\t\t_tempV30eY=sphereCeY-boxMineY;\n\t\t_tempV30eZ=sphereCeZ-boxMineZ;\n\t\tif (Vector3.scalarLengthSquared(Collision._tempV30)> radiusSquared)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\t_tempV30eX=sphereCeX-boxMineX;\n\t\t_tempV30eY=sphereCeY-boxMineY;\n\t\t_tempV30eZ=sphereCeZ-boxMineZ;\n\t\tif (Vector3.scalarLengthSquared(Collision._tempV30)> radiusSquared)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t}\n\n\tCollision.sphereContainsSphere=function(sphere1,sphere2){\n\t\tvar sphere1R=sphere1.radius;\n\t\tvar sphere2R=sphere2.radius;\n\t\tvar distance=Vector3.distance(sphere1.center,sphere2.center);\n\t\tif (sphere1R+sphere2R < distance)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (sphere1R-sphere2R < distance)\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t}\n\n\tCollision.closestPointPointTriangle=function(point,vertex1,vertex2,vertex3,out){\n\t\tVector3.subtract(vertex2,vertex1,Collision._tempV30);\n\t\tVector3.subtract(vertex3,vertex1,Collision._tempV31);\n\t\tVector3.subtract(point,vertex1,Collision._tempV32);\n\t\tVector3.subtract(point,vertex2,Collision._tempV33);\n\t\tVector3.subtract(point,vertex3,Collision._tempV34);\n\t\tvar d1=Vector3.dot(Collision._tempV30,Collision._tempV32);\n\t\tvar d2=Vector3.dot(Collision._tempV31,Collision._tempV32);\n\t\tvar d3=Vector3.dot(Collision._tempV30,Collision._tempV33);\n\t\tvar d4=Vector3.dot(Collision._tempV31,Collision._tempV33);\n\t\tvar d5=Vector3.dot(Collision._tempV30,Collision._tempV34);\n\t\tvar d6=Vector3.dot(Collision._tempV31,Collision._tempV34);\n\t\tif (d1 <=0 && d2 <=0){\n\t\t\tvertex1.cloneTo(out);\n\t\t\treturn;\n\t\t}\n\t\tif (d3 >=0 && d4 <=d3){\n\t\t\tvertex2.cloneTo(out);\n\t\t\treturn;\n\t\t};\n\t\tvar vc=d1 *d4-d3 *d2;\n\t\tif (vc <=0 && d1 >=0 && d3 <=0){\n\t\t\tvar v=d1 / (d1-d3);\n\t\t\tVector3.scale(Collision._tempV30,v,out);\n\t\t\tVector3.add(vertex1,out,out);\n\t\t\treturn;\n\t\t}\n\t\tif (d6 >=0 && d5 <=d6){\n\t\t\tvertex3.cloneTo(out);\n\t\t\treturn;\n\t\t};\n\t\tvar vb=d5 *d2-d1 *d6;\n\t\tif (vb <=0 && d2 >=0 && d6 <=0){\n\t\t\tvar w=d2 / (d2-d6);\n\t\t\tVector3.scale(Collision._tempV31,w,out);\n\t\t\tVector3.add(vertex1,out,out);\n\t\t\treturn;\n\t\t};\n\t\tvar va=d3 *d6-d5 *d4;\n\t\tif (va <=0 && (d4-d3)>=0 && (d5-d6)>=0){\n\t\t\tvar w3=(d4-d3)/ ((d4-d3)+(d5-d6));\n\t\t\tVector3.subtract(vertex3,vertex2,out);\n\t\t\tVector3.scale(out,w3,out);\n\t\t\tVector3.add(vertex2,out,out);\n\t\t\treturn;\n\t\t};\n\t\tvar denom=1 / (va+vb+vc);\n\t\tvar v2=vb *denom;\n\t\tvar w2=vc *denom;\n\t\tVector3.scale(Collision._tempV30,v2,Collision._tempV35);\n\t\tVector3.scale(Collision._tempV31,w2,Collision._tempV36);\n\t\tVector3.add(Collision._tempV35,Collision._tempV36,out);\n\t\tVector3.add(vertex1,out,out);\n\t}\n\n\tCollision.closestPointPlanePoint=function(plane,point,out){\n\t\tvar planeN=plane.normal;\n\t\tvar t=Vector3.dot(planeN,point)-plane.distance;\n\t\tVector3.scale(planeN,t,Collision._tempV30);\n\t\tVector3.subtract(point,Collision._tempV30,out);\n\t}\n\n\tCollision.closestPointBoxPoint=function(box,point,out){\n\t\tVector3.max(point,box.min,Collision._tempV30);\n\t\tVector3.min(Collision._tempV30,box.max,out);\n\t}\n\n\tCollision.closestPointSpherePoint=function(sphere,point,out){\n\t\tvar sphereC=sphere.center;\n\t\tVector3.subtract(point,sphereC,out);\n\t\tVector3.normalize(out,out);\n\t\tVector3.scale(out,sphere.radius,out);\n\t\tVector3.add(out,sphereC,out);\n\t}\n\n\tCollision.closestPointSphereSphere=function(sphere1,sphere2,out){\n\t\tvar sphere1C=sphere1.center;\n\t\tVector3.subtract(sphere2.center,sphere1C,out);\n\t\tVector3.normalize(out,out);\n\t\tVector3.scale(out,sphere1.radius,out);\n\t\tVector3.add(out,sphere1C,out);\n\t}\n\n\t__static(Collision,\n\t['_tempV30',function(){return this._tempV30=new Vector3();},'_tempV31',function(){return this._tempV31=new Vector3();},'_tempV32',function(){return this._tempV32=new Vector3();},'_tempV33',function(){return this._tempV33=new Vector3();},'_tempV34',function(){return this._tempV34=new Vector3();},'_tempV35',function(){return this._tempV35=new Vector3();},'_tempV36',function(){return this._tempV36=new Vector3();}\n\t]);\n\treturn Collision;\n})()\n\n\n/**\n*<code>ContainmentType</code> 类用于定义空间物体位置关系。\n*/\n//class laya.d3.math.ContainmentType\nvar ContainmentType=(function(){\n\tfunction ContainmentType(){}\n\t__class(ContainmentType,'laya.d3.math.ContainmentType');\n\tContainmentType.Disjoint=0;\n\tContainmentType.Contains=1;\n\tContainmentType.Intersects=2;\n\treturn ContainmentType;\n})()\n\n\n/**\n*<code>MathUtils</code> 类用于创建数学工具。\n*/\n//class laya.d3.math.MathUtils3D\nvar MathUtils3D=(function(){\n\t/**\n\t*创建一个 <code>MathUtils</code> 实例。\n\t*/\n\tfunction MathUtils3D(){}\n\t__class(MathUtils3D,'laya.d3.math.MathUtils3D');\n\tMathUtils3D.isZero=function(v){\n\t\treturn Math.abs(v)< MathUtils3D.zeroTolerance;\n\t}\n\n\tMathUtils3D.nearEqual=function(n1,n2){\n\t\tif (MathUtils3D.isZero(n1-n2))\n\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\tMathUtils3D.fastInvSqrt=function(value){\n\t\tif (MathUtils3D.isZero(value))\n\t\t\treturn value;\n\t\treturn 1.0 / Math.sqrt(value);\n\t}\n\n\t__static(MathUtils3D,\n\t['zeroTolerance',function(){return this.zeroTolerance=1e-6;},'MaxValue',function(){return this.MaxValue=3.40282347e+38;},'MinValue',function(){return this.MinValue=-3.40282347e+38;}\n\t]);\n\treturn MathUtils3D;\n})()\n\n\n/**\n*<code>Matrix3x3</code> 类用于创建3x3矩阵。\n*/\n//class laya.d3.math.Matrix3x3\nvar Matrix3x3=(function(){\n\tfunction Matrix3x3(){\n\t\t/**矩阵元素数组*/\n\t\t//this.elements=null;\n\t\tvar e=this.elements=new Float32Array(9);\n\t\te[0]=1;\n\t\te[1]=0;\n\t\te[2]=0;\n\t\te[3]=0;\n\t\te[4]=1;\n\t\te[5]=0;\n\t\te[6]=0;\n\t\te[7]=0;\n\t\te[8]=1;\n\t}\n\n\t__class(Matrix3x3,'laya.d3.math.Matrix3x3');\n\tvar __proto=Matrix3x3.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*计算3x3矩阵的行列式\n\t*@return 矩阵的行列式\n\t*/\n\t__proto.determinant=function(){\n\t\tvar f=this.elements;\n\t\tvar a00=f[0],a01=f[1],a02=f[2];\n\t\tvar a10=f[3],a11=f[4],a12=f[5];\n\t\tvar a20=f[6],a21=f[7],a22=f[8];\n\t\treturn a00 *(a22 *a11-a12 *a21)+a01 *(-a22 *a10+a12 *a20)+a02 *(a21 *a10-a11 *a20);\n\t}\n\n\t/**\n\t*通过一个二维向量转换3x3矩阵\n\t*@param tra 转换向量\n\t*@param out 输出矩阵\n\t*/\n\t__proto.translate=function(trans,out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\tvar g=trans.elements;\n\t\tvar a00=f[0],a01=f[1],a02=f[2];\n\t\tvar a10=f[3],a11=f[4],a12=f[5];\n\t\tvar a20=f[6],a21=f[7],a22=f[8];\n\t\tvar x=g[0],y=g[1];\n\t\te[0]=a00;\n\t\te[1]=a01;\n\t\te[2]=a02;\n\t\te[3]=a10;\n\t\te[4]=a11;\n\t\te[5]=a12;\n\t\te[6]=x *a00+y *a10+a20;\n\t\te[7]=x *a01+y *a11+a21;\n\t\te[8]=x *a02+y *a12+a22;\n\t}\n\n\t/**\n\t*根据指定角度旋转3x3矩阵\n\t*@param rad 旋转角度\n\t*@param out 输出矩阵\n\t*/\n\t__proto.rotate=function(rad,out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\tvar a00=f[0],a01=f[1],a02=f[2];\n\t\tvar a10=f[3],a11=f[4],a12=f[5];\n\t\tvar a20=f[6],a21=f[7],a22=f[8];\n\t\tvar s=Math.sin(rad);\n\t\tvar c=Math.cos(rad);\n\t\te[0]=c *a00+s *a10;\n\t\te[1]=c *a01+s *a11;\n\t\te[2]=c *a02+s *a12;\n\t\te[3]=c *a10-s *a00;\n\t\te[4]=c *a11-s *a01;\n\t\te[5]=c *a12-s *a02;\n\t\te[6]=a20;\n\t\te[7]=a21;\n\t\te[8]=a22;\n\t}\n\n\t/**\n\t*根据制定缩放3x3矩阵\n\t*@param scale 缩放值\n\t*@param out 输出矩阵\n\t*/\n\t__proto.scale=function(scale,out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\tvar g=scale.elements;\n\t\tvar x=g[0],y=g[1];\n\t\te[0]=x *f[0];\n\t\te[1]=x *f[1];\n\t\te[2]=x *f[2];\n\t\te[3]=y *f[3];\n\t\te[4]=y *f[4];\n\t\te[5]=y *f[5];\n\t\te[6]=f[6];\n\t\te[7]=f[7];\n\t\te[8]=f[8];\n\t}\n\n\t/**\n\t*计算3x3矩阵的逆矩阵\n\t*@param out 输出的逆矩阵\n\t*/\n\t__proto.invert=function(out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\tvar a00=f[0],a01=f[1],a02=f[2];\n\t\tvar a10=f[3],a11=f[4],a12=f[5];\n\t\tvar a20=f[6],a21=f[7],a22=f[8];\n\t\tvar b01=a22 *a11-a12 *a21;\n\t\tvar b11=-a22 *a10+a12 *a20;\n\t\tvar b21=a21 *a10-a11 *a20;\n\t\tvar det=a00 *b01+a01 *b11+a02 *b21;\n\t\tif (!det){\n\t\t\tout=null;\n\t\t}\n\t\tdet=1.0 / det;\n\t\te[0]=b01 *det;\n\t\te[1]=(-a22 *a01+a02 *a21)*det;\n\t\te[2]=(a12 *a01-a02 *a11)*det;\n\t\te[3]=b11 *det;\n\t\te[4]=(a22 *a00-a02 *a20)*det;\n\t\te[5]=(-a12 *a00+a02 *a10)*det;\n\t\te[6]=b21 *det;\n\t\te[7]=(-a21 *a00+a01 *a20)*det;\n\t\te[8]=(a11 *a00-a01 *a10)*det;\n\t}\n\n\t/**\n\t*计算3x3矩阵的转置矩阵\n\t*@param out 输出矩阵\n\t*/\n\t__proto.transpose=function(out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\tif (out===this){\n\t\t\tvar a01=f[1],a02=f[2],a12=f[5];\n\t\t\te[1]=f[3];\n\t\t\te[2]=f[6];\n\t\t\te[3]=a01;\n\t\t\te[5]=f[7];\n\t\t\te[6]=a02;\n\t\t\te[7]=a12;\n\t\t\t}else {\n\t\t\te[0]=f[0];\n\t\t\te[1]=f[3];\n\t\t\te[2]=f[6];\n\t\t\te[3]=f[1];\n\t\t\te[4]=f[4];\n\t\t\te[5]=f[7];\n\t\t\te[6]=f[2];\n\t\t\te[7]=f[5];\n\t\t\te[8]=f[8];\n\t\t}\n\t}\n\n\t/**设置已有的矩阵为单位矩阵*/\n\t__proto.identity=function(){\n\t\tvar e=this.elements;\n\t\te[0]=1;\n\t\te[1]=0;\n\t\te[2]=0;\n\t\te[3]=0;\n\t\te[4]=1;\n\t\te[5]=0;\n\t\te[6]=0;\n\t\te[7]=0;\n\t\te[8]=1;\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar i,s,d;\n\t\ts=this.elements;\n\t\td=destObject.elements;\n\t\tif (s===d){\n\t\t\treturn;\n\t\t}\n\t\tfor (i=0;i < 9;++i){\n\t\t\td[i]=s[i];\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\tMatrix3x3.createFromTranslation=function(trans,out){\n\t\tvar e=out.elements;\n\t\tvar g=trans.elements;\n\t\tout[0]=1;\n\t\tout[1]=0;\n\t\tout[2]=0;\n\t\tout[3]=0;\n\t\tout[4]=1;\n\t\tout[5]=0;\n\t\tout[6]=g[0];\n\t\tout[7]=g[1];\n\t\tout[8]=1;\n\t}\n\n\tMatrix3x3.createFromRotation=function(rad,out){\n\t\tvar e=out.elements;\n\t\tvar s=Math.sin(rad),c=Math.cos(rad);\n\t\te[0]=c;\n\t\te[1]=s;\n\t\te[2]=0;\n\t\te[3]=-s;\n\t\te[4]=c;\n\t\te[5]=0;\n\t\te[6]=0;\n\t\te[7]=0;\n\t\te[8]=1;\n\t}\n\n\tMatrix3x3.createFromScaling=function(scale,out){\n\t\tvar e=out.elements;\n\t\tvar g=scale.elements;\n\t\te[0]=g[0];\n\t\te[1]=0;\n\t\te[2]=0;\n\t\te[3]=0;\n\t\te[4]=g[1];\n\t\te[5]=0;\n\t\te[6]=0;\n\t\te[7]=0;\n\t\te[8]=1;\n\t}\n\n\tMatrix3x3.createFromMatrix4x4=function(sou,out){\n\t\tout[0]=sou[0];\n\t\tout[1]=sou[1];\n\t\tout[2]=sou[2];\n\t\tout[3]=sou[4];\n\t\tout[4]=sou[5];\n\t\tout[5]=sou[6];\n\t\tout[6]=sou[8];\n\t\tout[7]=sou[9];\n\t\tout[8]=sou[10];\n\t}\n\n\tMatrix3x3.multiply=function(left,right,out){\n\t\tvar e=out.elements;\n\t\tvar f=left.elements;\n\t\tvar g=right.elements;\n\t\tvar a00=f[0],a01=f[1],a02=f[2];\n\t\tvar a10=f[3],a11=f[4],a12=f[5];\n\t\tvar a20=f[6],a21=f[7],a22=f[8];\n\t\tvar b00=g[0],b01=g[1],b02=g[2];\n\t\tvar b10=g[3],b11=g[4],b12=g[5];\n\t\tvar b20=g[6],b21=g[7],b22=g[8];\n\t\te[0]=b00 *a00+b01 *a10+b02 *a20;\n\t\te[1]=b00 *a01+b01 *a11+b02 *a21;\n\t\te[2]=b00 *a02+b01 *a12+b02 *a22;\n\t\te[3]=b10 *a00+b11 *a10+b12 *a20;\n\t\te[4]=b10 *a01+b11 *a11+b12 *a21;\n\t\te[5]=b10 *a02+b11 *a12+b12 *a22;\n\t\te[6]=b20 *a00+b21 *a10+b22 *a20;\n\t\te[7]=b20 *a01+b21 *a11+b22 *a21;\n\t\te[8]=b20 *a02+b21 *a12+b22 *a22;\n\t}\n\n\tMatrix3x3.lookAt=function(eye,target,up,out){\n\t\tVector3.subtract(eye,target,Matrix3x3._tempV30);\n\t\tVector3.normalize(Matrix3x3._tempV30,Matrix3x3._tempV30);\n\t\tVector3.cross(up,Matrix3x3._tempV30,Matrix3x3._tempV31);\n\t\tVector3.normalize(Matrix3x3._tempV31,Matrix3x3._tempV31);\n\t\tVector3.cross(Matrix3x3._tempV30,Matrix3x3._tempV31,Matrix3x3._tempV32);\n\t\tvar v0e=Matrix3x3._tempV30.elements;\n\t\tvar v1e=Matrix3x3._tempV31.elements;\n\t\tvar v2e=Matrix3x3._tempV32.elements;\n\t\tvar me=out.elements;\n\t\tme[0]=v1e[0];\n\t\tme[3]=v1e[1];\n\t\tme[6]=v1e[2];\n\t\tme[1]=v2e[0];\n\t\tme[4]=v2e[1];\n\t\tme[7]=v2e[2];\n\t\tme[2]=v0e[0];\n\t\tme[5]=v0e[1];\n\t\tme[8]=v0e[2];\n\t}\n\n\tMatrix3x3.DEFAULT=new Matrix3x3();\n\t__static(Matrix3x3,\n\t['_tempV30',function(){return this._tempV30=new Vector3();},'_tempV31',function(){return this._tempV31=new Vector3();},'_tempV32',function(){return this._tempV32=new Vector3();}\n\t]);\n\treturn Matrix3x3;\n})()\n\n\n/**\n*<code>Matrix4x4</code> 类用于创建4x4矩阵。\n*/\n//class laya.d3.math.Matrix4x4\nvar Matrix4x4=(function(){\n\tfunction Matrix4x4(m11,m12,m13,m14,m21,m22,m23,m24,m31,m32,m33,m34,m41,m42,m43,m44){\n\t\t/**矩阵元素数组*/\n\t\t//this.elements=null;\n\t\t(m11===void 0)&& (m11=1);\n\t\t(m12===void 0)&& (m12=0);\n\t\t(m13===void 0)&& (m13=0);\n\t\t(m14===void 0)&& (m14=0);\n\t\t(m21===void 0)&& (m21=0);\n\t\t(m22===void 0)&& (m22=1);\n\t\t(m23===void 0)&& (m23=0);\n\t\t(m24===void 0)&& (m24=0);\n\t\t(m31===void 0)&& (m31=0);\n\t\t(m32===void 0)&& (m32=0);\n\t\t(m33===void 0)&& (m33=1);\n\t\t(m34===void 0)&& (m34=0);\n\t\t(m41===void 0)&& (m41=0);\n\t\t(m42===void 0)&& (m42=0);\n\t\t(m43===void 0)&& (m43=0);\n\t\t(m44===void 0)&& (m44=1);\n\t\tvar e=this.elements=new Float32Array(16);\n\t\te[0]=m11;\n\t\te[1]=m12;\n\t\te[2]=m13;\n\t\te[3]=m14;\n\t\te[4]=m21;\n\t\te[5]=m22;\n\t\te[6]=m23;\n\t\te[7]=m24;\n\t\te[8]=m31;\n\t\te[9]=m32;\n\t\te[10]=m33;\n\t\te[11]=m34;\n\t\te[12]=m41;\n\t\te[13]=m42;\n\t\te[14]=m43;\n\t\te[15]=m44;\n\t}\n\n\t__class(Matrix4x4,'laya.d3.math.Matrix4x4');\n\tvar __proto=Matrix4x4.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t__proto.getElementByRowColumn=function(row,column){\n\t\tif (row < 0 || row > 3)\n\t\t\tthrow new Error(\"row\",\"Rows and columns for matrices run from 0 to 3, inclusive.\");\n\t\tif (column < 0 || column > 3)\n\t\t\tthrow new Error(\"column\",\"Rows and columns for matrices run from 0 to 3, inclusive.\");\n\t\treturn this.elements[(row *4)+column];\n\t}\n\n\t__proto.setElementByRowColumn=function(row,column,value){\n\t\tif (row < 0 || row > 3)\n\t\t\tthrow new Error(\"row\",\"Rows and columns for matrices run from 0 to 3, inclusive.\");\n\t\tif (column < 0 || column > 3)\n\t\t\tthrow new Error(\"column\",\"Rows and columns for matrices run from 0 to 3, inclusive.\");\n\t\tthis.elements[(row *4)+column]=value;\n\t}\n\n\t/**\n\t*判断两个4x4矩阵的值是否相等。\n\t*@param other 4x4矩阵\n\t*/\n\t__proto.equalsOtherMatrix=function(other){\n\t\tvar e=this.elements;\n\t\tvar oe=other.elements;\n\t\treturn (MathUtils3D.nearEqual(e[0],oe[0])&& MathUtils3D.nearEqual(e[1],oe[1])&& MathUtils3D.nearEqual(e[2],oe[2])&& MathUtils3D.nearEqual(e[3],oe[3])&& MathUtils3D.nearEqual(e[4],oe[4])&& MathUtils3D.nearEqual(e[5],oe[5])&& MathUtils3D.nearEqual(e[6],oe[6])&& MathUtils3D.nearEqual(e[7],oe[7])&& MathUtils3D.nearEqual(e[8],oe[8])&& MathUtils3D.nearEqual(e[9],oe[9])&& MathUtils3D.nearEqual(e[10],oe[10])&& MathUtils3D.nearEqual(e[11],oe[11])&& MathUtils3D.nearEqual(e[12],oe[12])&& MathUtils3D.nearEqual(e[13],oe[13])&& MathUtils3D.nearEqual(e[14],oe[14])&& MathUtils3D.nearEqual(e[15],oe[15]));\n\t}\n\n\t/**\n\t*分解矩阵为平移向量、旋转四元数、缩放向量。\n\t*@param translation 平移向量。\n\t*@param rotation 旋转四元数。\n\t*@param scale 缩放向量。\n\t*@return 是否分解成功。\n\t*/\n\t__proto.decomposeTransRotScale=function(translation,rotation,scale){\n\t\tvar rotationMatrix=Matrix4x4._tempMatrix4x4;\n\t\tif (this.decomposeTransRotMatScale(translation,rotationMatrix,scale)){\n\t\t\tQuaternion.createFromMatrix4x4(rotationMatrix,rotation);\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\trotation.identity();\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*分解矩阵为平移向量、旋转矩阵、缩放向量。\n\t*@param translation 平移向量。\n\t*@param rotationMatrix 旋转矩阵。\n\t*@param scale 缩放向量。\n\t*@return 是否分解成功。\n\t*/\n\t__proto.decomposeTransRotMatScale=function(translation,rotationMatrix,scale){\n\t\tvar e=this.elements;\n\t\tvar te=translation.elements;\n\t\tvar re=rotationMatrix.elements;\n\t\tvar se=scale.elements;\n\t\tte[0]=e[12];\n\t\tte[1]=e[13];\n\t\tte[2]=e[14];\n\t\tvar m11=e[0],m12=e[1],m13=e[2];\n\t\tvar m21=e[4],m22=e[5],m23=e[6];\n\t\tvar m31=e[8],m32=e[9],m33=e[10];\n\t\tvar sX=se[0]=Math.sqrt((m11 *m11)+(m12 *m12)+(m13 *m13));\n\t\tvar sY=se[1]=Math.sqrt((m21 *m21)+(m22 *m22)+(m23 *m23));\n\t\tvar sZ=se[2]=Math.sqrt((m31 *m31)+(m32 *m32)+(m33 *m33));\n\t\tif (MathUtils3D.isZero(sX)|| MathUtils3D.isZero(sY)|| MathUtils3D.isZero(sZ)){\n\t\t\tre[1]=re[2]=re[3]=re[4]=re[6]=re[7]=re[8]=re[9]=re[11]=re[12]=re[13]=re[14]=0;\n\t\t\tre[0]=re[5]=re[10]=re[15]=1;\n\t\t\treturn false;\n\t\t};\n\t\tvar at=Matrix4x4._tempVector0;\n\t\tvar atE=at.elements;\n\t\tatE[0]=m31 / sZ;\n\t\tatE[1]=m32 / sZ;\n\t\tatE[2]=m33 / sZ;\n\t\tvar tempRight=Matrix4x4._tempVector1;\n\t\tvar tempRightE=tempRight.elements;\n\t\ttempRightE[0]=m11 / sX;\n\t\ttempRightE[1]=m12 / sX;\n\t\ttempRightE[2]=m13 / sX;\n\t\tvar up=Matrix4x4._tempVector2;\n\t\tVector3.cross(at,tempRight,up);\n\t\tvar right=Matrix4x4._tempVector1;\n\t\tVector3.cross(up,at,right);\n\t\tre[3]=re[7]=re[11]=re[12]=re[13]=re[14]=0;\n\t\tre[15]=1;\n\t\tre[0]=right.x;\n\t\tre[1]=right.y;\n\t\tre[2]=right.z;\n\t\tre[4]=up.x;\n\t\tre[5]=up.y;\n\t\tre[6]=up.z;\n\t\tre[8]=at.x;\n\t\tre[9]=at.y;\n\t\tre[10]=at.z;\n\t\t((re[0] *m11+re[1] *m12+re[2] *m13)< 0.0)&& (se[0]=-sX);\n\t\t((re[4] *m21+re[5] *m22+re[6] *m23)< 0.0)&& (se[1]=-sY);\n\t\t((re[8] *m31+re[9] *m32+re[10] *m33)< 0.0)&& (se[2]=-sZ);\n\t\treturn true;\n\t}\n\n\t/**\n\t*分解旋转矩阵的旋转为YawPitchRoll欧拉角。\n\t*@param out float yaw\n\t*@param out float pitch\n\t*@param out float roll\n\t*@return\n\t*/\n\t__proto.decomposeYawPitchRoll=function(yawPitchRoll){\n\t\tvar yawPitchRollE=yawPitchRoll.elements;\n\t\tvar pitch=Math.asin(-this.elements[9]);\n\t\tyawPitchRollE[1]=pitch;\n\t\tvar test=Math.cos(pitch);\n\t\tif (test > MathUtils3D.zeroTolerance){\n\t\t\tyawPitchRollE[2]=Math.atan2(this.elements[1],this.elements[5]);\n\t\t\tyawPitchRollE[0]=Math.atan2(this.elements[8],this.elements[10]);\n\t\t\t}else {\n\t\t\tyawPitchRollE[2]=Math.atan2(-this.elements[4],this.elements[0]);\n\t\t\tyawPitchRollE[0]=0.0;\n\t\t}\n\t}\n\n\t/**归一化矩阵 */\n\t__proto.normalize=function(){\n\t\tvar v=this.elements;\n\t\tvar c=v[0],d=v[1],e=v[2],g=Math.sqrt(c *c+d *d+e *e);\n\t\tif (g){\n\t\t\tif (g==1)\n\t\t\t\treturn;\n\t\t\t}else {\n\t\t\tv[0]=0;\n\t\t\tv[1]=0;\n\t\t\tv[2]=0;\n\t\t\treturn;\n\t\t}\n\t\tg=1 / g;\n\t\tv[0]=c *g;\n\t\tv[1]=d *g;\n\t\tv[2]=e *g;\n\t}\n\n\t/**计算矩阵的转置矩阵*/\n\t__proto.transpose=function(){\n\t\tvar e,t;\n\t\te=this.elements;\n\t\tt=e[1];\n\t\te[1]=e[4];\n\t\te[4]=t;\n\t\tt=e[2];\n\t\te[2]=e[8];\n\t\te[8]=t;\n\t\tt=e[3];\n\t\te[3]=e[12];\n\t\te[12]=t;\n\t\tt=e[6];\n\t\te[6]=e[9];\n\t\te[9]=t;\n\t\tt=e[7];\n\t\te[7]=e[13];\n\t\te[13]=t;\n\t\tt=e[11];\n\t\te[11]=e[14];\n\t\te[14]=t;\n\t\treturn this;\n\t}\n\n\t/**\n\t*计算一个矩阵的逆矩阵\n\t*@param out 输出矩阵\n\t*/\n\t__proto.invert=function(out){\n\t\tvar ae=this.elements;\n\t\tvar oe=out.elements;\n\t\tvar a00=ae[0],a01=ae[1],a02=ae[2],a03=ae[3],a10=ae[4],a11=ae[5],a12=ae[6],a13=ae[7],a20=ae[8],a21=ae[9],a22=ae[10],a23=ae[11],a30=ae[12],a31=ae[13],a32=ae[14],a33=ae[15],\n\t\tb00=a00 *a11-a01 *a10,b01=a00 *a12-a02 *a10,b02=a00 *a13-a03 *a10,b03=a01 *a12-a02 *a11,b04=a01 *a13-a03 *a11,b05=a02 *a13-a03 *a12,b06=a20 *a31-a21 *a30,b07=a20 *a32-a22 *a30,b08=a20 *a33-a23 *a30,b09=a21 *a32-a22 *a31,b10=a21 *a33-a23 *a31,b11=a22 *a33-a23 *a32,\n\t\tdet=b00 *b11-b01 *b10+b02 *b09+b03 *b08-b04 *b07+b05 *b06;\n\t\tif (Math.abs(det)===0.0){\n\t\t\treturn;\n\t\t}\n\t\tdet=1.0 / det;\n\t\toe[0]=(a11 *b11-a12 *b10+a13 *b09)*det;\n\t\toe[1]=(a02 *b10-a01 *b11-a03 *b09)*det;\n\t\toe[2]=(a31 *b05-a32 *b04+a33 *b03)*det;\n\t\toe[3]=(a22 *b04-a21 *b05-a23 *b03)*det;\n\t\toe[4]=(a12 *b08-a10 *b11-a13 *b07)*det;\n\t\toe[5]=(a00 *b11-a02 *b08+a03 *b07)*det;\n\t\toe[6]=(a32 *b02-a30 *b05-a33 *b01)*det;\n\t\toe[7]=(a20 *b05-a22 *b02+a23 *b01)*det;\n\t\toe[8]=(a10 *b10-a11 *b08+a13 *b06)*det;\n\t\toe[9]=(a01 *b08-a00 *b10-a03 *b06)*det;\n\t\toe[10]=(a30 *b04-a31 *b02+a33 *b00)*det;\n\t\toe[11]=(a21 *b02-a20 *b04-a23 *b00)*det;\n\t\toe[12]=(a11 *b07-a10 *b09-a12 *b06)*det;\n\t\toe[13]=(a00 *b09-a01 *b07+a02 *b06)*det;\n\t\toe[14]=(a31 *b01-a30 *b03-a32 *b00)*det;\n\t\toe[15]=(a20 *b03-a21 *b01+a22 *b00)*det;\n\t}\n\n\t/**设置矩阵为单位矩阵*/\n\t__proto.identity=function(){\n\t\tvar e=this.elements;\n\t\te[1]=e[2]=e[3]=e[4]=e[6]=e[7]=e[8]=e[9]=e[11]=e[12]=e[13]=e[14]=0;\n\t\te[0]=e[5]=e[10]=e[15]=1;\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar i,s,d;\n\t\ts=this.elements;\n\t\td=destObject.elements;\n\t\tif (s===d){\n\t\t\treturn;\n\t\t}\n\t\tfor (i=0;i < 16;++i){\n\t\t\td[i]=s[i];\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\t/**\n\t*获取平移向量。\n\t*@param out 平移向量。\n\t*/\n\t__proto.getTranslationVector=function(out){\n\t\tvar me=this.elements;\n\t\tvar te=out.elements;\n\t\tte[0]=me[12];\n\t\tte[1]=me[13];\n\t\tte[2]=me[14];\n\t}\n\n\t/**\n\t*设置平移向量。\n\t*@param translate 平移向量。\n\t*/\n\t__proto.setTranslationVector=function(translate){\n\t\tvar me=this.elements;\n\t\tvar ve=translate.elements;\n\t\tme[12]=ve[0];\n\t\tme[13]=ve[1];\n\t\tme[14]=ve[2];\n\t}\n\n\t/**\n\t*获取前向量。\n\t*@param out 前向量。\n\t*/\n\t__proto.getForward=function(out){\n\t\tvar me=this.elements;\n\t\tvar te=out.elements;\n\t\tte[0]=-me[8];\n\t\tte[1]=-me[9];\n\t\tte[2]=-me[10];\n\t}\n\n\t/**\n\t*设置前向量。\n\t*@param forward 前向量。\n\t*/\n\t__proto.setForward=function(forward){\n\t\tvar me=this.elements;\n\t\tvar ve=forward.elements;\n\t\tme[8]=-ve[0];\n\t\tme[9]=-ve[1];\n\t\tme[10]=-ve[2];\n\t}\n\n\tMatrix4x4.createRotationX=function(rad,out){\n\t\tvar oe=out.elements;\n\t\tvar s=Math.sin(rad),c=Math.cos(rad);\n\t\toe[1]=oe[2]=oe[3]=oe[4]=oe[7]=oe[8]=oe[11]=oe[12]=oe[13]=oe[14]=0;\n\t\toe[0]=oe[15]=1;\n\t\toe[5]=oe[10]=c;\n\t\toe[6]=s;\n\t\toe[9]=-s;\n\t}\n\n\tMatrix4x4.createRotationY=function(rad,out){\n\t\tvar oe=out.elements;\n\t\tvar s=Math.sin(rad),c=Math.cos(rad);\n\t\toe[1]=oe[3]=oe[4]=oe[6]=oe[7]=oe[9]=oe[11]=oe[12]=oe[13]=oe[14]=0;\n\t\toe[5]=oe[15]=1;\n\t\toe[0]=oe[10]=c;\n\t\toe[2]=-s;\n\t\toe[8]=s;\n\t}\n\n\tMatrix4x4.createRotationZ=function(rad,out){\n\t\tvar oe=out.elements;\n\t\tvar s=Math.sin(rad),c=Math.cos(rad);\n\t\toe[2]=oe[3]=oe[6]=oe[7]=oe[8]=oe[9]=oe[11]=oe[12]=oe[13]=oe[14]=0;\n\t\toe[10]=oe[15]=1;\n\t\toe[0]=oe[5]=c;\n\t\toe[1]=s;\n\t\toe[4]=-s;\n\t}\n\n\tMatrix4x4.createRotationYawPitchRoll=function(yaw,pitch,roll,result){\n\t\tQuaternion.createFromYawPitchRoll(yaw,pitch,roll,Matrix4x4._tempQuaternion);\n\t\tMatrix4x4.createRotationQuaternion(Matrix4x4._tempQuaternion,result);\n\t}\n\n\tMatrix4x4.createRotationAxis=function(axis,angle,result){\n\t\tvar axisE=axis.elements;\n\t\tvar x=axisE[0];\n\t\tvar y=axisE[1];\n\t\tvar z=axisE[2];\n\t\tvar cos=Math.cos(angle);\n\t\tvar sin=Math.sin(angle);\n\t\tvar xx=x *x;\n\t\tvar yy=y *y;\n\t\tvar zz=z *z;\n\t\tvar xy=x *y;\n\t\tvar xz=x *z;\n\t\tvar yz=y *z;\n\t\tvar resultE=result.elements;\n\t\tresultE[3]=resultE[7]=resultE[11]=resultE[12]=resultE[13]=resultE[14]=0;\n\t\tresultE[15]=1.0;\n\t\tresultE[0]=xx+(cos *(1.0-xx));\n\t\tresultE[1]=(xy-(cos *xy))+(sin *z);\n\t\tresultE[2]=(xz-(cos *xz))-(sin *y);\n\t\tresultE[4]=(xy-(cos *xy))-(sin *z);\n\t\tresultE[5]=yy+(cos *(1.0-yy));\n\t\tresultE[6]=(yz-(cos *yz))+(sin *x);\n\t\tresultE[8]=(xz-(cos *xz))+(sin *y);\n\t\tresultE[9]=(yz-(cos *yz))-(sin *x);\n\t\tresultE[10]=zz+(cos *(1.0-zz));\n\t}\n\n\tMatrix4x4.createRotationQuaternion=function(rotation,result){\n\t\tvar rotationE=rotation.elements;\n\t\tvar resultE=result.elements;\n\t\tvar rotationX=rotationE[0];\n\t\tvar rotationY=rotationE[1];\n\t\tvar rotationZ=rotationE[2];\n\t\tvar rotationW=rotationE[3];\n\t\tvar xx=rotationX *rotationX;\n\t\tvar yy=rotationY *rotationY;\n\t\tvar zz=rotationZ *rotationZ;\n\t\tvar xy=rotationX *rotationY;\n\t\tvar zw=rotationZ *rotationW;\n\t\tvar zx=rotationZ *rotationX;\n\t\tvar yw=rotationY *rotationW;\n\t\tvar yz=rotationY *rotationZ;\n\t\tvar xw=rotationX *rotationW;\n\t\tresultE[3]=resultE[7]=resultE[11]=resultE[12]=resultE[13]=resultE[14]=0;\n\t\tresultE[15]=1.0;\n\t\tresultE[0]=1.0-(2.0 *(yy+zz));\n\t\tresultE[1]=2.0 *(xy+zw);\n\t\tresultE[2]=2.0 *(zx-yw);\n\t\tresultE[4]=2.0 *(xy-zw);\n\t\tresultE[5]=1.0-(2.0 *(zz+xx));\n\t\tresultE[6]=2.0 *(yz+xw);\n\t\tresultE[8]=2.0 *(zx+yw);\n\t\tresultE[9]=2.0 *(yz-xw);\n\t\tresultE[10]=1.0-(2.0 *(yy+xx));\n\t}\n\n\tMatrix4x4.createTranslate=function(trans,out){\n\t\tvar te=trans.elements;\n\t\tvar oe=out.elements;\n\t\toe[4]=oe[8]=oe[1]=oe[9]=oe[2]=oe[6]=oe[3]=oe[7]=oe[11]=0;\n\t\toe[0]=oe[5]=oe[10]=oe[15]=1;\n\t\toe[12]=te[0];\n\t\toe[13]=te[1];\n\t\toe[14]=te[2];\n\t}\n\n\tMatrix4x4.createScaling=function(scale,out){\n\t\tvar se=scale.elements;\n\t\tvar oe=out.elements;\n\t\toe[0]=se[0];\n\t\toe[5]=se[1];\n\t\toe[10]=se[2];\n\t\toe[1]=oe[4]=oe[8]=oe[12]=oe[9]=oe[13]=oe[2]=oe[6]=oe[14]=oe[3]=oe[7]=oe[11]=0;\n\t\toe[15]=1;\n\t}\n\n\tMatrix4x4.multiply=function(left,right,out){\n\t\tvar i,e,a,b,ai0,ai1,ai2,ai3;\n\t\te=out.elements;\n\t\ta=left.elements;\n\t\tb=right.elements;\n\t\tif (e===b){\n\t\t\tb=new Float32Array(16);\n\t\t\tfor (i=0;i < 16;++i){\n\t\t\t\tb[i]=e[i];\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=a[i];\n\t\t\tai1=a[i+4];\n\t\t\tai2=a[i+8];\n\t\t\tai3=a[i+12];\n\t\t\te[i]=ai0 *b[0]+ai1 *b[1]+ai2 *b[2]+ai3 *b[3];\n\t\t\te[i+4]=ai0 *b[4]+ai1 *b[5]+ai2 *b[6]+ai3 *b[7];\n\t\t\te[i+8]=ai0 *b[8]+ai1 *b[9]+ai2 *b[10]+ai3 *b[11];\n\t\t\te[i+12]=ai0 *b[12]+ai1 *b[13]+ai2 *b[14]+ai3 *b[15];\n\t\t}\n\t}\n\n\tMatrix4x4.createFromQuaternion=function(rotation,out){\n\t\tvar e=out.elements;\n\t\tvar q=rotation.elements;\n\t\tvar x=q[0],y=q[1],z=q[2],w=q[3];\n\t\tvar x2=x+x;\n\t\tvar y2=y+y;\n\t\tvar z2=z+z;\n\t\tvar xx=x *x2;\n\t\tvar yx=y *x2;\n\t\tvar yy=y *y2;\n\t\tvar zx=z *x2;\n\t\tvar zy=z *y2;\n\t\tvar zz=z *z2;\n\t\tvar wx=w *x2;\n\t\tvar wy=w *y2;\n\t\tvar wz=w *z2;\n\t\te[0]=1-yy-zz;\n\t\te[1]=yx+wz;\n\t\te[2]=zx-wy;\n\t\te[3]=0;\n\t\te[4]=yx-wz;\n\t\te[5]=1-xx-zz;\n\t\te[6]=zy+wx;\n\t\te[7]=0;\n\t\te[8]=zx+wy;\n\t\te[9]=zy-wx;\n\t\te[10]=1-xx-yy;\n\t\te[11]=0;\n\t\te[12]=0;\n\t\te[13]=0;\n\t\te[14]=0;\n\t\te[15]=1;\n\t}\n\n\tMatrix4x4.createAffineTransformation=function(trans,rot,scale,out){\n\t\tvar te=trans.elements;\n\t\tvar re=rot.elements;\n\t\tvar se=scale.elements;\n\t\tvar oe=out.elements;\n\t\tvar x=re[0],y=re[1],z=re[2],w=re[3],x2=x+x,y2=y+y,z2=z+z;\n\t\tvar xx=x *x2,xy=x *y2,xz=x *z2,yy=y *y2,yz=y *z2,zz=z *z2;\n\t\tvar wx=w *x2,wy=w *y2,wz=w *z2,sx=se[0],sy=se[1],sz=se[2];\n\t\toe[0]=(1-(yy+zz))*sx;\n\t\toe[1]=(xy+wz)*sx;\n\t\toe[2]=(xz-wy)*sx;\n\t\toe[3]=0;\n\t\toe[4]=(xy-wz)*sy;\n\t\toe[5]=(1-(xx+zz))*sy;\n\t\toe[6]=(yz+wx)*sy;\n\t\toe[7]=0;\n\t\toe[8]=(xz+wy)*sz;\n\t\toe[9]=(yz-wx)*sz;\n\t\toe[10]=(1-(xx+yy))*sz;\n\t\toe[11]=0;\n\t\toe[12]=te[0];\n\t\toe[13]=te[1];\n\t\toe[14]=te[2];\n\t\toe[15]=1;\n\t}\n\n\tMatrix4x4.createLookAt=function(eye,target,up,out){\n\t\tvar oE=out.elements;\n\t\tvar xaxis=Matrix4x4._tempVector0;\n\t\tvar yaxis=Matrix4x4._tempVector1;\n\t\tvar zaxis=Matrix4x4._tempVector2;\n\t\tVector3.subtract(eye,target,zaxis);\n\t\tVector3.normalize(zaxis,zaxis);\n\t\tVector3.cross(up,zaxis,xaxis);\n\t\tVector3.normalize(xaxis,xaxis);\n\t\tVector3.cross(zaxis,xaxis,yaxis);\n\t\tout.identity();\n\t\toE[0]=xaxis.x;\n\t\toE[4]=xaxis.y;\n\t\toE[8]=xaxis.z;\n\t\toE[1]=yaxis.x;\n\t\toE[5]=yaxis.y;\n\t\toE[9]=yaxis.z;\n\t\toE[2]=zaxis.x;\n\t\toE[6]=zaxis.y;\n\t\toE[10]=zaxis.z;\n\t\toE[12]=-Vector3.dot(xaxis,eye);\n\t\toE[13]=-Vector3.dot(yaxis,eye);\n\t\toE[14]=-Vector3.dot(zaxis,eye);\n\t}\n\n\tMatrix4x4.createPerspective=function(fov,aspect,near,far,out){\n\t\tvar oe=out.elements;\n\t\tvar f=1.0 / Math.tan(fov / 2),nf=1 / (near-far);\n\t\toe[0]=f / aspect;\n\t\toe[5]=f;\n\t\toe[10]=(far+near)*nf;\n\t\toe[11]=-1;\n\t\toe[14]=(2 *far *near)*nf;\n\t\toe[1]=oe[2]=oe[3]=oe[4]=oe[6]=oe[7]=oe[8]=oe[9]=oe[12]=oe[13]=oe[15]=0;\n\t}\n\n\tMatrix4x4.createOrthoOffCenterRH=function(left,right,bottom,top,near,far,out){\n\t\tvar oe=out.elements;\n\t\tvar lr=1 / (left-right);\n\t\tvar bt=1 / (bottom-top);\n\t\tvar nf=1 / (near-far);\n\t\toe[1]=oe[2]=oe[3]=oe[4]=oe[6]=oe[7]=oe[8]=oe[9]=oe[11]=0;\n\t\toe[15]=1;\n\t\toe[0]=-2 *lr;\n\t\toe[5]=-2 *bt;\n\t\toe[10]=2 *nf;\n\t\toe[12]=(left+right)*lr;\n\t\toe[13]=(top+bottom)*bt;\n\t\toe[14]=(far+near)*nf;\n\t}\n\n\tMatrix4x4.translation=function(v3,out){\n\t\tvar ve=v3.elements;\n\t\tvar oe=out.elements;\n\t\toe[0]=oe[5]=oe[10]=oe[15]=1;\n\t\toe[12]=ve[0];\n\t\toe[13]=ve[1];\n\t\toe[14]=ve[2];\n\t}\n\n\t__static(Matrix4x4,\n\t['_tempMatrix4x4',function(){return this._tempMatrix4x4=new Matrix4x4();},'_tempVector0',function(){return this._tempVector0=new Vector3();},'_tempVector1',function(){return this._tempVector1=new Vector3();},'_tempVector2',function(){return this._tempVector2=new Vector3();},'_tempQuaternion',function(){return this._tempQuaternion=new Quaternion();},'DEFAULT',function(){return this.DEFAULT=new Matrix4x4();},'ZERO',function(){return this.ZERO=new Matrix4x4(\n\t\t0,0,0,0,\n\t\t0,0,0,0,\n\t\t0,0,0,0,\n\t\t0,0,0,0);}\n\t]);\n\treturn Matrix4x4;\n})()\n\n\n/**\n*<code>OrientedBoundBox</code> 类用于创建OBB包围盒。\n*/\n//class laya.d3.math.OrientedBoundBox\nvar OrientedBoundBox=(function(){\n\tfunction OrientedBoundBox(extents,transformation){\n\t\t/**每个轴长度的一半*/\n\t\tthis.extents=null;\n\t\t/**这个矩阵表示包围盒的位置和缩放,它的平移向量表示该包围盒的中心*/\n\t\tthis.transformation=null;\n\t\tthis.extents=extents;\n\t\tthis.transformation=transformation;\n\t}\n\n\t__class(OrientedBoundBox,'laya.d3.math.OrientedBoundBox');\n\tvar __proto=OrientedBoundBox.prototype;\n\t/**\n\t*获取OBB包围盒的8个顶点。\n\t*@param corners 返回顶点的输出队列。\n\t*/\n\t__proto.getCorners=function(corners){\n\t\tvar xve=OrientedBoundBox._tempV30.elements;\n\t\tvar yve=OrientedBoundBox._tempV31.elements;\n\t\tvar zve=OrientedBoundBox._tempV32.elements;\n\t\tvar extentsE=this.extents.elements;\n\t\txve[0]=extentsE[0];\n\t\txve[1]=xve[2]=0;\n\t\tyve[1]=extentsE[1];\n\t\tyve[0]=yve[2]=0;\n\t\tzve[2]=extentsE[2];\n\t\tzve[0]=zve[1]=0;\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV30,this.transformation,OrientedBoundBox._tempV30);\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV31,this.transformation,OrientedBoundBox._tempV31);\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV32,this.transformation,OrientedBoundBox._tempV32);\n\t\tvar center=OrientedBoundBox._tempV33;\n\t\tthis.transformation.getTranslationVector(center);\n\t\tcorners.length=8;\n\t\tVector3.add(center,OrientedBoundBox._tempV30,OrientedBoundBox._tempV34);\n\t\tVector3.add(OrientedBoundBox._tempV34,OrientedBoundBox._tempV31,OrientedBoundBox._tempV34);\n\t\tVector3.add(OrientedBoundBox._tempV34,OrientedBoundBox._tempV32,corners[0]);\n\t\tVector3.add(center,OrientedBoundBox._tempV30,OrientedBoundBox._tempV34);\n\t\tVector3.add(OrientedBoundBox._tempV34,OrientedBoundBox._tempV31,OrientedBoundBox._tempV34);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV32,corners[1]);\n\t\tVector3.subtract(center,OrientedBoundBox._tempV30,OrientedBoundBox._tempV34);\n\t\tVector3.add(OrientedBoundBox._tempV34,OrientedBoundBox._tempV31,OrientedBoundBox._tempV34);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV32,corners[2]);\n\t\tVector3.subtract(center,OrientedBoundBox._tempV30,OrientedBoundBox._tempV34);\n\t\tVector3.add(OrientedBoundBox._tempV34,OrientedBoundBox._tempV31,OrientedBoundBox._tempV34);\n\t\tVector3.add(OrientedBoundBox._tempV34,OrientedBoundBox._tempV32,corners[3]);\n\t\tVector3.add(center,OrientedBoundBox._tempV30,OrientedBoundBox._tempV34);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV31,OrientedBoundBox._tempV34);\n\t\tVector3.add(OrientedBoundBox._tempV34,OrientedBoundBox._tempV32,corners[4]);\n\t\tVector3.add(center,OrientedBoundBox._tempV30,OrientedBoundBox._tempV34);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV31,OrientedBoundBox._tempV34);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV32,corners[5]);\n\t\tVector3.subtract(center,OrientedBoundBox._tempV30,OrientedBoundBox._tempV34);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV31,OrientedBoundBox._tempV34);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV32,corners[6]);\n\t\tVector3.subtract(center,OrientedBoundBox._tempV30,OrientedBoundBox._tempV34);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV31,OrientedBoundBox._tempV34);\n\t\tVector3.add(OrientedBoundBox._tempV34,OrientedBoundBox._tempV32,corners[7]);\n\t}\n\n\t/**\n\t*变换该包围盒的矩阵信息。\n\t*@param mat 矩阵\n\t*/\n\t__proto.transform=function(mat){\n\t\tMatrix4x4.multiply(this.transformation,mat,this.transformation);\n\t}\n\n\t/**\n\t*缩放该包围盒\n\t*@param scaling 各轴的缩放比。\n\t*/\n\t__proto.scale=function(scaling){\n\t\tVector3.multiply(this.extents,scaling,this.extents);\n\t}\n\n\t/**\n\t*平移该包围盒。\n\t*@param translation 平移参数\n\t*/\n\t__proto.translate=function(translation){\n\t\tthis.transformation.getTranslationVector(OrientedBoundBox._tempV30);\n\t\tVector3.add(OrientedBoundBox._tempV30,translation,OrientedBoundBox._tempV31);\n\t\tthis.transformation.setTranslationVector(OrientedBoundBox._tempV31);\n\t}\n\n\t/**\n\t*该包围盒的尺寸。\n\t*@param out 输出\n\t*/\n\t__proto.Size=function(out){\n\t\tVector3.scale(this.extents,2,out);\n\t}\n\n\t/**\n\t*该包围盒需要考虑的尺寸\n\t*@param out 输出\n\t*/\n\t__proto.getSize=function(out){\n\t\tvar extentsE=this.extents.elements;\n\t\tOrientedBoundBox._tempV30.x=extentsE[0];\n\t\tOrientedBoundBox._tempV31.y=extentsE[1];\n\t\tOrientedBoundBox._tempV32.z=extentsE[2];\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV30,this.transformation,OrientedBoundBox._tempV30);\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV31,this.transformation,OrientedBoundBox._tempV31);\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV31,this.transformation,OrientedBoundBox._tempV32);\n\t\tvar oe=out.elements;\n\t\toe[0]=Vector3.scalarLength(OrientedBoundBox._tempV30);\n\t\toe[1]=Vector3.scalarLength(OrientedBoundBox._tempV31);\n\t\toe[2]=Vector3.scalarLength(OrientedBoundBox._tempV32);\n\t}\n\n\t/**\n\t*该包围盒需要考虑尺寸的平方\n\t*@param out 输出\n\t*/\n\t__proto.getSizeSquared=function(out){\n\t\tvar extentsE=this.extents.elements;\n\t\tOrientedBoundBox._tempV30.x=extentsE[0];\n\t\tOrientedBoundBox._tempV31.y=extentsE[1];\n\t\tOrientedBoundBox._tempV32.z=extentsE[2];\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV30,this.transformation,OrientedBoundBox._tempV30);\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV31,this.transformation,OrientedBoundBox._tempV31);\n\t\tVector3.TransformNormal(OrientedBoundBox._tempV31,this.transformation,OrientedBoundBox._tempV32);\n\t\tvar oe=out.elements;\n\t\toe[0]=Vector3.scalarLengthSquared(OrientedBoundBox._tempV30);\n\t\toe[1]=Vector3.scalarLengthSquared(OrientedBoundBox._tempV31);\n\t\toe[2]=Vector3.scalarLengthSquared(OrientedBoundBox._tempV32);\n\t}\n\n\t/**\n\t*该包围盒的几何中心\n\t*/\n\t__proto.getCenter=function(center){\n\t\tthis.transformation.getTranslationVector(center);\n\t}\n\n\t/**\n\t*该包围盒是否包含空间中一点\n\t*@param point 点\n\t*@return 返回位置关系\n\t*/\n\t__proto.containsPoint=function(point){\n\t\tvar extentsE=this.extents.elements;\n\t\tvar extentsEX=extentsE[0];\n\t\tvar extentsEY=extentsE[1];\n\t\tvar extentsEZ=extentsE[2];\n\t\tthis.transformation.invert(OrientedBoundBox._tempM0);\n\t\tVector3.transformCoordinate(point,OrientedBoundBox._tempM0,OrientedBoundBox._tempV30);\n\t\tvar _tempV30e=OrientedBoundBox._tempV30.elements;\n\t\tvar _tempV30ex=Math.abs(_tempV30e[0]);\n\t\tvar _tempV30ey=Math.abs(_tempV30e[1]);\n\t\tvar _tempV30ez=Math.abs(_tempV30e[2]);\n\t\tif (MathUtils3D.nearEqual(_tempV30ex,extentsEX)&& MathUtils3D.nearEqual(_tempV30ey,extentsEY)&& MathUtils3D.nearEqual(_tempV30ez,extentsEZ))\n\t\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\tif (_tempV30ex < extentsEX && _tempV30ey < extentsEY && _tempV30ez < extentsEZ)\n\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\telse\n\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t}\n\n\t/**\n\t*该包围盒是否包含空间中多点\n\t*@param point 点\n\t*@return 返回位置关系\n\t*/\n\t__proto.containsPoints=function(points){\n\t\tvar extentse=this.extents.elements;\n\t\tvar extentsex=extentse[0];\n\t\tvar extentsey=extentse[1];\n\t\tvar extentsez=extentse[2];\n\t\tthis.transformation.invert(OrientedBoundBox._tempM0);\n\t\tvar containsAll=true;\n\t\tvar containsAny=false;\n\t\tfor (var i=0;i < points.length;i++){\n\t\t\tVector3.transformCoordinate(points[i],OrientedBoundBox._tempM0,OrientedBoundBox._tempV30);\n\t\t\tvar _tempV30e=OrientedBoundBox._tempV30.elements;\n\t\t\tvar _tempV30ex=Math.abs(_tempV30e[0]);\n\t\t\tvar _tempV30ey=Math.abs(_tempV30e[1]);\n\t\t\tvar _tempV30ez=Math.abs(_tempV30e[2]);\n\t\t\tif (MathUtils3D.nearEqual(_tempV30ex,extentsex)&& MathUtils3D.nearEqual(_tempV30ey,extentsey)&& MathUtils3D.nearEqual(_tempV30ez,extentsez))\n\t\t\t\tcontainsAny=true;\n\t\t\tif (_tempV30ex < extentsex && _tempV30ey < extentsey && _tempV30ez < extentsez)\n\t\t\t\tcontainsAny=true;\n\t\t\telse\n\t\t\tcontainsAll=false;\n\t\t}\n\t\tif (containsAll)\n\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\telse if (containsAny)\n\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t\telse\n\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t}\n\n\t/**\n\t*该包围盒是否包含空间中一包围球\n\t*@param sphere 包围球\n\t*@param ignoreScale 是否考虑该包围盒的缩放\n\t*@return 返回位置关系\n\t*/\n\t__proto.containsSphere=function(sphere,ignoreScale){\n\t\t(ignoreScale===void 0)&& (ignoreScale=false);\n\t\tvar extentsE=this.extents.elements;\n\t\tvar extentsEX=extentsE[0];\n\t\tvar extentsEY=extentsE[1];\n\t\tvar extentsEZ=extentsE[2];\n\t\tvar sphereR=sphere.radius;\n\t\tthis.transformation.invert(OrientedBoundBox._tempM0);\n\t\tVector3.transformCoordinate(sphere.center,OrientedBoundBox._tempM0,OrientedBoundBox._tempV30);\n\t\tvar locRadius=NaN;\n\t\tif (ignoreScale){\n\t\t\tlocRadius=sphereR;\n\t\t\t}else {\n\t\t\tVector3.scale(Vector3.UnitX,sphereR,OrientedBoundBox._tempV31);\n\t\t\tVector3.TransformNormal(OrientedBoundBox._tempV31,OrientedBoundBox._tempM0,OrientedBoundBox._tempV31);\n\t\t\tlocRadius=Vector3.scalarLength(OrientedBoundBox._tempV31);\n\t\t}\n\t\tVector3.scale(this.extents,-1,OrientedBoundBox._tempV32);\n\t\tVector3.Clamp(OrientedBoundBox._tempV30,OrientedBoundBox._tempV32,this.extents,OrientedBoundBox._tempV33);\n\t\tvar distance=Vector3.distanceSquared(OrientedBoundBox._tempV30,OrientedBoundBox._tempV33);\n\t\tif (distance > locRadius *locRadius)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tvar tempV30e=OrientedBoundBox._tempV30.elements;\n\t\tvar tempV30ex=tempV30e[0];\n\t\tvar tempV30ey=tempV30e[1];\n\t\tvar tempV30ez=tempV30e[2];\n\t\tvar tempV32e=OrientedBoundBox._tempV32.elements;\n\t\tvar tempV32ex=tempV32e[0];\n\t\tvar tempV32ey=tempV32e[1];\n\t\tvar tempV32ez=tempV32e[2];\n\t\tif ((((tempV32ex+locRadius <=tempV30ex)&& (tempV30ex <=extentsEX-locRadius))&& ((extentsEX-tempV32ex > locRadius)&& (tempV32ey+locRadius <=tempV30ey)))&& (((tempV30ey <=extentsEY-locRadius)&& (extentsEY-tempV32ey > locRadius))&& (((tempV32ez+locRadius <=tempV30ez)&& (tempV30ez <=extentsEZ-locRadius))&& (extentsEZ-tempV32ez > locRadius)))){\n\t\t\treturn /*laya.d3.math.ContainmentType.Contains*/1;\n\t\t}\n\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t}\n\n\t/**\n\t*For accuracy,The transformation matrix for both <see cref=\"OrientedBoundingBox\"/> must not have any scaling applied to it.\n\t*Anyway,scaling using Scale method will keep this method accurate.\n\t*该包围盒是否包含空间中另一OBB包围盒\n\t*@param obb OBB包围盒\n\t*@return 返回位置关系\n\t*/\n\t__proto.containsOrientedBoundBox=function(obb){\n\t\tvar i=0,k=0;\n\t\tobb.getCorners(OrientedBoundBox._corners);\n\t\tvar cornersCheck=this.containsPoints(OrientedBoundBox._corners);\n\t\tif (cornersCheck !=/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\treturn cornersCheck;\n\t\tvar sizeAe=this.extents.elements;\n\t\tobb.extents.cloneTo(OrientedBoundBox._tempV35);\n\t\tvar sizeBe=OrientedBoundBox._tempV35.elements;\n\t\tOrientedBoundBox._getRows(this.transformation,OrientedBoundBox._rows1);\n\t\tOrientedBoundBox._getRows(obb.transformation,OrientedBoundBox._rows2);\n\t\tvar extentA=NaN,extentB=NaN,separation=NaN,dotNumber=NaN;\n\t\tfor (i=0;i < 4;i++){\n\t\t\tfor (k=0;k < 4;k++){\n\t\t\t\tif (i==3 || k==3){\n\t\t\t\t\tOrientedBoundBox._tempM0.setElementByRowColumn(i,k,0);\n\t\t\t\t\tOrientedBoundBox._tempM1.setElementByRowColumn(i,k,0);\n\t\t\t\t\t}else {\n\t\t\t\t\tdotNumber=Vector3.dot(OrientedBoundBox._rows1[i],OrientedBoundBox._rows2[k]);\n\t\t\t\t\tOrientedBoundBox._tempM0.setElementByRowColumn(i,k,dotNumber);\n\t\t\t\t\tOrientedBoundBox._tempM1.setElementByRowColumn(i,k,Math.abs(dotNumber));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tobb.getCenter(OrientedBoundBox._tempV34);\n\t\tthis.getCenter(OrientedBoundBox._tempV36);\n\t\tVector3.subtract(OrientedBoundBox._tempV34,OrientedBoundBox._tempV36,OrientedBoundBox._tempV30);\n\t\tvar vsepAe=OrientedBoundBox._tempV31.elements;\n\t\tvsepAe[0]=Vector3.dot(OrientedBoundBox._tempV30,OrientedBoundBox._rows1[0]);\n\t\tvsepAe[1]=Vector3.dot(OrientedBoundBox._tempV30,OrientedBoundBox._rows1[1]);\n\t\tvsepAe[2]=Vector3.dot(OrientedBoundBox._tempV30,OrientedBoundBox._rows1[2]);\n\t\tvar _tempV32e=OrientedBoundBox._tempV32.elements;\n\t\tvar _tempV33e=OrientedBoundBox._tempV33.elements;\n\t\tfor (i=0;i < 3;i++){\n\t\t\t_tempV32e[0]=OrientedBoundBox._tempM1.getElementByRowColumn(i,0);\n\t\t\t_tempV32e[1]=OrientedBoundBox._tempM1.getElementByRowColumn(i,1);\n\t\t\t_tempV32e[2]=OrientedBoundBox._tempM1.getElementByRowColumn(i,2);\n\t\t\textentA=sizeAe[i];\n\t\t\textentB=Vector3.dot(OrientedBoundBox._tempV35,OrientedBoundBox._tempV32);\n\t\t\tseparation=Math.abs(vsepAe[i]);\n\t\t\tif (separation > extentA+extentB)\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t}\n\t\tfor (k=0;k < 3;k++){\n\t\t\t_tempV32e[0]=OrientedBoundBox._tempM1.getElementByRowColumn(0,k);\n\t\t\t_tempV32e[1]=OrientedBoundBox._tempM1.getElementByRowColumn(1,k);\n\t\t\t_tempV32e[2]=OrientedBoundBox._tempM1.getElementByRowColumn(2,k);\n\t\t\t_tempV33e[0]=OrientedBoundBox._tempM0.getElementByRowColumn(0,k);\n\t\t\t_tempV33e[1]=OrientedBoundBox._tempM0.getElementByRowColumn(1,k);\n\t\t\t_tempV33e[2]=OrientedBoundBox._tempM0.getElementByRowColumn(2,k);\n\t\t\textentA=Vector3.dot(this.extents,OrientedBoundBox._tempV32);\n\t\t\textentB=sizeBe[k];\n\t\t\tseparation=Math.abs(Vector3.dot(OrientedBoundBox._tempV31,OrientedBoundBox._tempV33));\n\t\t\tif (separation > extentA+extentB)\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t}\n\t\tfor (i=0;i < 3;i++){\n\t\t\tfor (k=0;k < 3;k++){\n\t\t\t\tvar i1=(i+1)% 3,i2=(i+2)% 3;\n\t\t\t\tvar k1=(k+1)% 3,k2=(k+2)% 3;\n\t\t\t\textentA=sizeAe[i1] *OrientedBoundBox._tempM1.getElementByRowColumn(i2,k)+sizeAe[i2] *OrientedBoundBox._tempM1.getElementByRowColumn(i1,k);\n\t\t\t\textentB=sizeBe[k1] *OrientedBoundBox._tempM1.getElementByRowColumn(i,k2)+sizeBe[k2] *OrientedBoundBox._tempM1.getElementByRowColumn(i,k1);\n\t\t\t\tseparation=Math.abs(vsepAe[i2] *OrientedBoundBox._tempM0.getElementByRowColumn(i1,k)-vsepAe[i1] *OrientedBoundBox._tempM0.getElementByRowColumn(i2,k));\n\t\t\t\tif (separation > extentA+extentB)\n\t\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\t}\n\t\t}\n\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t}\n\n\t/**\n\t*该包围盒是否包含空间中一条线\n\t*@param point1 点1\n\t*@param point2 点2\n\t*@return 返回位置关系\n\t*/\n\t__proto.containsLine=function(point1,point2){\n\t\tOrientedBoundBox._corners[0]=point1;\n\t\tOrientedBoundBox._corners[1]=point2;\n\t\tvar cornersCheck=this.containsPoints(OrientedBoundBox._corners);\n\t\tif (cornersCheck !=/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\treturn cornersCheck;\n\t\tvar extentsE=this.extents.elements;\n\t\tvar extentsX=extentsE[0];\n\t\tvar extentsY=extentsE[1];\n\t\tvar extentsZ=extentsE[2];\n\t\tthis.transformation.invert(OrientedBoundBox._tempM0);\n\t\tVector3.transformCoordinate(point1,OrientedBoundBox._tempM0,OrientedBoundBox._tempV30);\n\t\tVector3.transformCoordinate(point2,OrientedBoundBox._tempM0,OrientedBoundBox._tempV31);\n\t\tVector3.add(OrientedBoundBox._tempV30,OrientedBoundBox._tempV31,OrientedBoundBox._tempV32);\n\t\tVector3.scale(OrientedBoundBox._tempV32,0.5,OrientedBoundBox._tempV32);\n\t\tVector3.subtract(OrientedBoundBox._tempV30,OrientedBoundBox._tempV32,OrientedBoundBox._tempV33);\n\t\tvar _tempV33e=OrientedBoundBox._tempV33.elements;\n\t\tvar _tempV33X=_tempV33e[0];\n\t\tvar _tempV33Y=_tempV33e[1];\n\t\tvar _tempV33Z=_tempV33e[2];\n\t\tvar _tempV34e=OrientedBoundBox._tempV34.elements;\n\t\tvar _tempV34X=_tempV34e[0]=Math.abs(_tempV33e[0]);\n\t\tvar _tempV34Y=_tempV34e[1]=Math.abs(_tempV33e[1]);\n\t\tvar _tempV34Z=_tempV34e[2]=Math.abs(_tempV33e[2]);\n\t\tvar _tempV32e=OrientedBoundBox._tempV32.elements;\n\t\tvar _tempV32X=_tempV32e[0];\n\t\tvar _tempV32Y=_tempV32e[1];\n\t\tvar _tempV32Z=_tempV32e[2];\n\t\tif (Math.abs(_tempV32X)> extentsX+_tempV34X)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (Math.abs(_tempV32Y)> extentsY+_tempV34Y)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (Math.abs(_tempV32Z)> extentsZ+_tempV34Z)\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (Math.abs(_tempV32Y *_tempV33Z-_tempV32Z *_tempV33Y)> (extentsY *_tempV34Z+extentsZ *_tempV34Y))\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (Math.abs(_tempV32X *_tempV33Z-_tempV32Z *_tempV33X)> (extentsX *_tempV34Z+extentsZ *_tempV34X))\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\tif (Math.abs(_tempV32X *_tempV33Y-_tempV32Y *_tempV33X)> (extentsX *_tempV34Y+extentsY *_tempV34X))\n\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t}\n\n\t/**\n\t*该包围盒是否包含空间中另一OBB包围盒\n\t*@param box 包围盒\n\t*@return 返回位置关系\n\t*/\n\t__proto.containsBoundBox=function(box){\n\t\tvar i=0,k=0;\n\t\tvar min=box.min;\n\t\tvar max=box.max;\n\t\tbox.getCorners(OrientedBoundBox._corners);\n\t\tvar cornersCheck=this.containsPoints(OrientedBoundBox._corners);\n\t\tif (cornersCheck !=/*laya.d3.math.ContainmentType.Disjoint*/0)\n\t\t\treturn cornersCheck;\n\t\tVector3.subtract(max,min,OrientedBoundBox._tempV30);\n\t\tVector3.scale(OrientedBoundBox._tempV30,0.5,OrientedBoundBox._tempV30);\n\t\tVector3.add(min,OrientedBoundBox._tempV30,OrientedBoundBox._tempV30);\n\t\tVector3.subtract(max,OrientedBoundBox._tempV30,OrientedBoundBox._tempV31);\n\t\tvar sizeAe=this.extents.elements;\n\t\tvar sizeBe=OrientedBoundBox._tempV31.elements;\n\t\tOrientedBoundBox._getRows(this.transformation,OrientedBoundBox._rows1);\n\t\tthis.transformation.invert(OrientedBoundBox._tempM0);\n\t\tvar extentA=NaN,extentB=NaN,separation=NaN,dotNumber=NaN;\n\t\tfor (i=0;i < 3;i++){\n\t\t\tfor (k=0;k < 3;k++){\n\t\t\t\tOrientedBoundBox._tempM1.setElementByRowColumn(i,k,Math.abs(OrientedBoundBox._tempM0.getElementByRowColumn(i,k)));\n\t\t\t}\n\t\t}\n\t\tthis.getCenter(OrientedBoundBox._tempV35);\n\t\tVector3.subtract(OrientedBoundBox._tempV30,OrientedBoundBox._tempV35,OrientedBoundBox._tempV32);\n\t\tvar vsepAe=OrientedBoundBox._tempV31.elements;\n\t\tvsepAe[0]=Vector3.dot(OrientedBoundBox._tempV32,OrientedBoundBox._rows1[0]);\n\t\tvsepAe[1]=Vector3.dot(OrientedBoundBox._tempV32,OrientedBoundBox._rows1[1]);\n\t\tvsepAe[2]=Vector3.dot(OrientedBoundBox._tempV32,OrientedBoundBox._rows1[2]);\n\t\tvar _tempV33e=OrientedBoundBox._tempV33.elements;\n\t\tvar _tempV34e=OrientedBoundBox._tempV34.elements;\n\t\tfor (i=0;i < 3;i++){\n\t\t\t_tempV33e[0]=OrientedBoundBox._tempM1.getElementByRowColumn(i,0);\n\t\t\t_tempV33e[1]=OrientedBoundBox._tempM1.getElementByRowColumn(i,1);\n\t\t\t_tempV33e[2]=OrientedBoundBox._tempM1.getElementByRowColumn(i,2);\n\t\t\textentA=sizeAe[i];\n\t\t\textentB=Vector3.dot(OrientedBoundBox._tempV31,OrientedBoundBox._tempV33);\n\t\t\tseparation=Math.abs(vsepAe[i]);\n\t\t\tif (separation > extentA+extentB)\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t}\n\t\tfor (k=0;k < 3;k++){\n\t\t\t_tempV33e[0]=OrientedBoundBox._tempM1.getElementByRowColumn(0,k);\n\t\t\t_tempV33e[1]=OrientedBoundBox._tempM1.getElementByRowColumn(1,k);\n\t\t\t_tempV33e[2]=OrientedBoundBox._tempM1.getElementByRowColumn(2,k);\n\t\t\t_tempV34e[0]=OrientedBoundBox._tempM0.getElementByRowColumn(0,k);\n\t\t\t_tempV34e[1]=OrientedBoundBox._tempM0.getElementByRowColumn(1,k);\n\t\t\t_tempV34e[2]=OrientedBoundBox._tempM0.getElementByRowColumn(2,k);\n\t\t\textentA=Vector3.dot(this.extents,OrientedBoundBox._tempV33);\n\t\t\textentB=sizeBe[k];\n\t\t\tseparation=Math.abs(Vector3.dot(OrientedBoundBox._tempV31,OrientedBoundBox._tempV34));\n\t\t\tif (separation > extentA+extentB)\n\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t}\n\t\tfor (i=0;i < 3;i++){\n\t\t\tfor (k=0;k < 3;k++){\n\t\t\t\tvar i1=(i+1)% 3,i2=(i+2)% 3;\n\t\t\t\tvar k1=(k+1)% 3,k2=(k+2)% 3;\n\t\t\t\textentA=sizeAe[i1] *OrientedBoundBox._tempM1.getElementByRowColumn(i2,k)+sizeAe[i2] *OrientedBoundBox._tempM1.getElementByRowColumn(i1,k);\n\t\t\t\textentB=sizeBe[k1] *OrientedBoundBox._tempM1.getElementByRowColumn(i,k2)+sizeBe[k2] *OrientedBoundBox._tempM1.getElementByRowColumn(i,k1);\n\t\t\t\tseparation=Math.abs(vsepAe[i2] *OrientedBoundBox._tempM0.getElementByRowColumn(i1,k)-vsepAe[i1] *OrientedBoundBox._tempM0.getElementByRowColumn(i2,k));\n\t\t\t\tif (separation > extentA+extentB)\n\t\t\t\t\treturn /*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\t}\n\t\t}\n\t\treturn /*laya.d3.math.ContainmentType.Intersects*/2;\n\t}\n\n\t/**\n\t*该包围盒是否与空间中另一射线相交\n\t*@param ray\n\t*@param out\n\t*@return\n\t*/\n\t__proto.intersectsRay=function(ray,out){\n\t\tVector3.scale(this.extents,-1,OrientedBoundBox._tempV30);\n\t\tthis.transformation.invert(OrientedBoundBox._tempM0);\n\t\tVector3.TransformNormal(ray.direction,OrientedBoundBox._tempM0,OrientedBoundBox._ray.direction);\n\t\tVector3.transformCoordinate(ray.origin,OrientedBoundBox._tempM0,OrientedBoundBox._ray.origin);\n\t\tOrientedBoundBox._boxBound1.min=OrientedBoundBox._tempV30;\n\t\tOrientedBoundBox._boxBound1.max=this.extents;\n\t\tvar intersects=Collision.intersectsRayAndBoxRP(OrientedBoundBox._ray,OrientedBoundBox._boxBound1,out);\n\t\tif (intersects!==-1)\n\t\t\tVector3.transformCoordinate(out,this.transformation,out);\n\t\treturn intersects;\n\t}\n\n\t__proto._getLocalCorners=function(corners){\n\t\tcorners.length=8;\n\t\tvar extentsE=this.extents.elements;\n\t\tOrientedBoundBox._tempV30.x=extentsE[0];\n\t\tOrientedBoundBox._tempV31.y=extentsE[1];\n\t\tOrientedBoundBox._tempV32.z=extentsE[2];\n\t\tVector3.add(OrientedBoundBox._tempV30,OrientedBoundBox._tempV31,OrientedBoundBox._tempV33);\n\t\tVector3.add(OrientedBoundBox._tempV33,OrientedBoundBox._tempV32,corners[0]);\n\t\tVector3.add(OrientedBoundBox._tempV30,OrientedBoundBox._tempV31,OrientedBoundBox._tempV33);\n\t\tVector3.subtract(OrientedBoundBox._tempV33,OrientedBoundBox._tempV32,corners[1]);\n\t\tVector3.subtract(OrientedBoundBox._tempV31,OrientedBoundBox._tempV30,OrientedBoundBox._tempV33);\n\t\tVector3.subtract(OrientedBoundBox._tempV33,OrientedBoundBox._tempV30,corners[2]);\n\t\tVector3.subtract(OrientedBoundBox._tempV31,OrientedBoundBox._tempV30,OrientedBoundBox._tempV33);\n\t\tVector3.add(OrientedBoundBox._tempV33,OrientedBoundBox._tempV32,corners[3]);\n\t\tVector3.subtract(OrientedBoundBox._tempV30,OrientedBoundBox._tempV31,OrientedBoundBox._tempV33);\n\t\tVector3.add(OrientedBoundBox._tempV33,OrientedBoundBox._tempV32,corners[4]);\n\t\tVector3.subtract(OrientedBoundBox._tempV30,OrientedBoundBox._tempV31,OrientedBoundBox._tempV33);\n\t\tVector3.subtract(OrientedBoundBox._tempV33,OrientedBoundBox._tempV32,corners[5]);\n\t\tVector3.scale(corners[0],-1,corners[6]);\n\t\tVector3.subtract(OrientedBoundBox._tempV32,OrientedBoundBox._tempV30,OrientedBoundBox._tempV33);\n\t\tVector3.subtract(OrientedBoundBox._tempV33,OrientedBoundBox._tempV31,corners[7]);\n\t}\n\n\t/**\n\t*判断两个包围盒是否相等\n\t*@param obb obb包围盒\n\t*@return Boolean\n\t*/\n\t__proto.equals=function(obb){\n\t\treturn this.extents==obb.extents && this.transformation==obb.transformation;\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar dest=destObject;\n\t\tthis.extents.cloneTo(dest.extents);\n\t\tthis.transformation.cloneTo(dest.transformation);\n\t}\n\n\tOrientedBoundBox.createByBoundBox=function(box,out){\n\t\tvar min=box.min;\n\t\tvar max=box.max;\n\t\tVector3.subtract(max,min,OrientedBoundBox._tempV30);\n\t\tVector3.scale(OrientedBoundBox._tempV30,0.5,OrientedBoundBox._tempV30);\n\t\tVector3.add(min,OrientedBoundBox._tempV30,OrientedBoundBox._tempV31);\n\t\tVector3.subtract(max,OrientedBoundBox._tempV31,OrientedBoundBox._tempV32);\n\t\tMatrix4x4.translation(OrientedBoundBox._tempV31,OrientedBoundBox._tempM0);\n\t\tvar extents=OrientedBoundBox._tempV32.clone();\n\t\tvar transformation=OrientedBoundBox._tempM0.clone();\n\t\tout.extents=extents;\n\t\tout.transformation=transformation;\n\t}\n\n\tOrientedBoundBox.createByMinAndMaxVertex=function(min,max){\n\t\tVector3.subtract(max,min,OrientedBoundBox._tempV30);\n\t\tVector3.scale(OrientedBoundBox._tempV30,0.5,OrientedBoundBox._tempV30);\n\t\tVector3.add(min,OrientedBoundBox._tempV30,OrientedBoundBox._tempV31);\n\t\tVector3.subtract(max,OrientedBoundBox._tempV31,OrientedBoundBox._tempV32);\n\t\tMatrix4x4.translation(OrientedBoundBox._tempV31,OrientedBoundBox._tempM0);\n\t\tvar obb=new OrientedBoundBox(OrientedBoundBox._tempV32,OrientedBoundBox._tempM0);\n\t\treturn obb;\n\t}\n\n\tOrientedBoundBox._getRows=function(mat,out){\n\t\tout.length=3;\n\t\tvar mate=mat.elements;\n\t\tvar row0e=out[0].elements;\n\t\trow0e[0]=mate[0];\n\t\trow0e[1]=mate[1];\n\t\trow0e[2]=mate[2];\n\t\tvar row1e=out[1].elements;\n\t\trow1e[0]=mate[4];\n\t\trow1e[1]=mate[5];\n\t\trow1e[2]=mate[6];\n\t\tvar row2e=out[2].elements;\n\t\trow2e[0]=mate[8];\n\t\trow2e[1]=mate[9];\n\t\trow2e[2]=mate[10];\n\t}\n\n\tOrientedBoundBox.getObbtoObbMatrix4x4=function(a,b,noMatrixScaleApplied,out){\n\t\tvar at=a.transformation;\n\t\tvar bt=b.transformation;\n\t\tif (noMatrixScaleApplied){\n\t\t\tOrientedBoundBox._getRows(at,OrientedBoundBox._rows1);\n\t\t\tOrientedBoundBox._getRows(bt,OrientedBoundBox._rows2);\n\t\t\tfor (var i=0;i < 3;i++){\n\t\t\t\tfor (var k=0;k < 3;k++){\n\t\t\t\t\tout.setElementByRowColumn(i,k,Vector3.dot(OrientedBoundBox._rows2[i],OrientedBoundBox._rows1[k]));\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.getCenter(OrientedBoundBox._tempV30);\n\t\t\ta.getCenter(OrientedBoundBox._tempV31);\n\t\t\tVector3.subtract(OrientedBoundBox._tempV30,OrientedBoundBox._tempV31,OrientedBoundBox._tempV32);\n\t\t\tvar AtoBMe=out.elements;\n\t\t\tAtoBMe[12]=Vector3.dot(OrientedBoundBox._tempV32,OrientedBoundBox._rows1[0]);\n\t\t\tAtoBMe[13]=Vector3.dot(OrientedBoundBox._tempV32,OrientedBoundBox._rows1[1]);\n\t\t\tAtoBMe[14]=Vector3.dot(OrientedBoundBox._tempV32,OrientedBoundBox._rows1[2]);\n\t\t\tAtoBMe[15]=1;\n\t\t\t}else {\n\t\t\tat.invert(OrientedBoundBox._tempM0);\n\t\t\tMatrix4x4.multiply(bt,OrientedBoundBox._tempM0,out);\n\t\t}\n\t}\n\n\tOrientedBoundBox.merge=function(a,b,noMatrixScaleApplied){\n\t\tvar ae=a.extents;\n\t\tvar at=a.transformation;\n\t\tOrientedBoundBox.getObbtoObbMatrix4x4(a,b,noMatrixScaleApplied,OrientedBoundBox._tempM0);\n\t\tb._getLocalCorners(OrientedBoundBox._corners);\n\t\tVector3.transformCoordinate(OrientedBoundBox._corners[0],OrientedBoundBox._tempM0,OrientedBoundBox._corners[0]);\n\t\tVector3.transformCoordinate(OrientedBoundBox._corners[1],OrientedBoundBox._tempM0,OrientedBoundBox._corners[1]);\n\t\tVector3.transformCoordinate(OrientedBoundBox._corners[2],OrientedBoundBox._tempM0,OrientedBoundBox._corners[2]);\n\t\tVector3.transformCoordinate(OrientedBoundBox._corners[3],OrientedBoundBox._tempM0,OrientedBoundBox._corners[3]);\n\t\tVector3.transformCoordinate(OrientedBoundBox._corners[4],OrientedBoundBox._tempM0,OrientedBoundBox._corners[4]);\n\t\tVector3.transformCoordinate(OrientedBoundBox._corners[5],OrientedBoundBox._tempM0,OrientedBoundBox._corners[5]);\n\t\tVector3.transformCoordinate(OrientedBoundBox._corners[6],OrientedBoundBox._tempM0,OrientedBoundBox._corners[6]);\n\t\tVector3.transformCoordinate(OrientedBoundBox._corners[7],OrientedBoundBox._tempM0,OrientedBoundBox._corners[7]);\n\t\tVector3.scale(ae,-1,OrientedBoundBox._boxBound1.min);\n\t\tae.cloneTo(OrientedBoundBox._boxBound1.max);\n\t\tBoundBox.createfromPoints(OrientedBoundBox._corners,OrientedBoundBox._boxBound2);\n\t\tBoundBox.merge(OrientedBoundBox._boxBound2,OrientedBoundBox._boxBound1,OrientedBoundBox._boxBound3);\n\t\tvar box3Min=OrientedBoundBox._boxBound3.min;\n\t\tvar box3Max=OrientedBoundBox._boxBound3.max;\n\t\tVector3.subtract(box3Max,box3Min,OrientedBoundBox._tempV30);\n\t\tVector3.scale(OrientedBoundBox._tempV30,0.5,OrientedBoundBox._tempV30);\n\t\tVector3.add(box3Min,OrientedBoundBox._tempV30,OrientedBoundBox._tempV32);\n\t\tVector3.subtract(box3Max,OrientedBoundBox._tempV32,ae);\n\t\tVector3.transformCoordinate(OrientedBoundBox._tempV32,at,OrientedBoundBox._tempV33);\n\t}\n\n\t__static(OrientedBoundBox,\n\t['_tempV30',function(){return this._tempV30=new Vector3();},'_tempV31',function(){return this._tempV31=new Vector3();},'_tempV32',function(){return this._tempV32=new Vector3();},'_tempV33',function(){return this._tempV33=new Vector3();},'_tempV34',function(){return this._tempV34=new Vector3();},'_tempV35',function(){return this._tempV35=new Vector3();},'_tempV36',function(){return this._tempV36=new Vector3();},'_tempM0',function(){return this._tempM0=new Matrix4x4();},'_tempM1',function(){return this._tempM1=new Matrix4x4();},'_corners',function(){return this._corners=/*new vector.<>*/[new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3()];},'_rows1',function(){return this._rows1=/*new vector.<>*/[new Vector3(),new Vector3(),new Vector3()];},'_rows2',function(){return this._rows2=/*new vector.<>*/[new Vector3(),new Vector3(),new Vector3()];},'_ray',function(){return this._ray=new Ray(new Vector3(),new Vector3());},'_boxBound1',function(){return this._boxBound1=new BoundBox(new Vector3(),new Vector3());},'_boxBound2',function(){return this._boxBound2=new BoundBox(new Vector3(),new Vector3());},'_boxBound3',function(){return this._boxBound3=new BoundBox(new Vector3(),new Vector3());}\n\t]);\n\treturn OrientedBoundBox;\n})()\n\n\n/**\n*<code>Plane</code> 类用于创建平面。\n*/\n//class laya.d3.math.Plane\nvar Plane=(function(){\n\tfunction Plane(normal,d){\n\t\t/**平面的向量*/\n\t\tthis.normal=null;\n\t\t/**平面到坐标系原点的距离*/\n\t\tthis.distance=NaN;\n\t\t(d===void 0)&& (d=0);\n\t\tthis.normal=normal;\n\t\tthis.distance=d;\n\t}\n\n\t__class(Plane,'laya.d3.math.Plane');\n\tvar __proto=Plane.prototype;\n\t/**\n\t*更改平面法线向量的系数，使之成单位长度。\n\t*/\n\t__proto.normalize=function(){\n\t\tvar normalE=this.normal.elements;\n\t\tvar normalEX=normalE[0];\n\t\tvar normalEY=normalE[1];\n\t\tvar normalEZ=normalE[2];\n\t\tvar magnitude=1 / Math.sqrt(normalEX *normalEX+normalEY *normalEY+normalEZ *normalEZ);\n\t\tnormalE[0]=normalEX *magnitude;\n\t\tnormalE[1]=normalEY *magnitude;\n\t\tnormalE[2]=normalEZ *magnitude;\n\t\tthis.distance *=magnitude;\n\t}\n\n\tPlane.createPlaneBy3P=function(point1,point2,point3){\n\t\tvar point1e=point1.elements;\n\t\tvar point2e=point2.elements;\n\t\tvar point3e=point3.elements;\n\t\tvar x1=point2e[0]-point1e[0];\n\t\tvar y1=point2e[1]-point1e[1];\n\t\tvar z1=point2e[2]-point1e[2];\n\t\tvar x2=point3e[0]-point1e[0];\n\t\tvar y2=point3e[1]-point1e[1];\n\t\tvar z2=point3e[2]-point1e[2];\n\t\tvar yz=(y1 *z2)-(z1 *y2);\n\t\tvar xz=(z1 *x2)-(x1 *z2);\n\t\tvar xy=(x1 *y2)-(y1 *x2);\n\t\tvar invPyth=1 / (Math.sqrt((yz *yz)+(xz *xz)+(xy *xy)));\n\t\tvar x=yz *invPyth;\n\t\tvar y=xz *invPyth;\n\t\tvar z=xy *invPyth;\n\t\tvar TEMPVec3e=Plane._TEMPVec3.elements;\n\t\tTEMPVec3e[0]=x;\n\t\tTEMPVec3e[1]=y;\n\t\tTEMPVec3e[2]=z;\n\t\tvar d=-((x *point1e[0])+(y *point1e[1])+(z *point1e[2]));\n\t\tvar plane=new Plane(Plane._TEMPVec3,d);\n\t\treturn plane;\n\t}\n\n\tPlane.PlaneIntersectionType_Back=0;\n\tPlane.PlaneIntersectionType_Front=1;\n\tPlane.PlaneIntersectionType_Intersecting=2;\n\t__static(Plane,\n\t['_TEMPVec3',function(){return this._TEMPVec3=new Vector3();}\n\t]);\n\treturn Plane;\n})()\n\n\n/**\n*<code>Quaternion</code> 类用于创建四元数。\n*/\n//class laya.d3.math.Quaternion\nvar Quaternion=(function(){\n\tfunction Quaternion(x,y,z,w){\n\t\tthis.elements=new Float32Array(4);\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\t(z===void 0)&& (z=0);\n\t\t(w===void 0)&& (w=1);\n\t\tthis.elements[0]=x;\n\t\tthis.elements[1]=y;\n\t\tthis.elements[2]=z;\n\t\tthis.elements[3]=w;\n\t}\n\n\t__class(Quaternion,'laya.d3.math.Quaternion');\n\tvar __proto=Quaternion.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*根据缩放值缩放四元数\n\t*@param scale 缩放值\n\t*@param out 输出四元数\n\t*/\n\t__proto.scaling=function(scaling,out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\te[0]=f[0] *scaling;\n\t\te[1]=f[1] *scaling;\n\t\te[2]=f[2] *scaling;\n\t\te[3]=f[3] *scaling;\n\t}\n\n\t/**\n\t*归一化四元数\n\t*@param out 输出四元数\n\t*/\n\t__proto.normalize=function(out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\tvar x=f[0],y=f[1],z=f[2],w=f[3];\n\t\tvar len=x *x+y *y+z *z+w *w;\n\t\tif (len > 0){\n\t\t\tlen=1 / Math.sqrt(len);\n\t\t\te[0]=x *len;\n\t\t\te[1]=y *len;\n\t\t\te[2]=z *len;\n\t\t\te[3]=w *len;\n\t\t}\n\t}\n\n\t/**\n\t*计算四元数的长度\n\t*@return 长度\n\t*/\n\t__proto.length=function(){\n\t\tvar f=this.elements;\n\t\tvar x=f[0],y=f[1],z=f[2],w=f[3];\n\t\treturn Math.sqrt(x *x+y *y+z *z+w *w);\n\t}\n\n\t/**\n\t*根据绕X轴的角度旋转四元数\n\t*@param rad 角度\n\t*@param out 输出四元数\n\t*/\n\t__proto.rotateX=function(rad,out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\trad *=0.5;\n\t\tvar ax=f[0],ay=f[1],az=f[2],aw=f[3];\n\t\tvar bx=Math.sin(rad),bw=Math.cos(rad);\n\t\te[0]=ax *bw+aw *bx;\n\t\te[1]=ay *bw+az *bx;\n\t\te[2]=az *bw-ay *bx;\n\t\te[3]=aw *bw-ax *bx;\n\t}\n\n\t/**\n\t*根据绕Y轴的制定角度旋转四元数\n\t*@param rad 角度\n\t*@param out 输出四元数\n\t*/\n\t__proto.rotateY=function(rad,out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\trad *=0.5;\n\t\tvar ax=f[0],ay=f[1],az=f[2],aw=f[3],by=Math.sin(rad),bw=Math.cos(rad);\n\t\te[0]=ax *bw-az *by;\n\t\te[1]=ay *bw+aw *by;\n\t\te[2]=az *bw+ax *by;\n\t\te[3]=aw *bw-ay *by;\n\t}\n\n\t/**\n\t*根据绕Z轴的制定角度旋转四元数\n\t*@param rad 角度\n\t*@param out 输出四元数\n\t*/\n\t__proto.rotateZ=function(rad,out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\trad *=0.5;\n\t\tvar ax=f[0],ay=f[1],az=f[2],aw=f[3],bz=Math.sin(rad),bw=Math.cos(rad);\n\t\te[0]=ax *bw+ay *bz;\n\t\te[1]=ay *bw-ax *bz;\n\t\te[2]=az *bw+aw *bz;\n\t\te[3]=aw *bw-az *bz;\n\t}\n\n\t/**\n\t*分解四元数到欧拉角（顺序为Yaw、Pitch、Roll），参考自http://xboxforums.create.msdn.com/forums/p/4574/23988.aspx#23988,问题绕X轴翻转超过±90度时有，会产生瞬间反转\n\t*@param quaternion 源四元数\n\t*@param out 欧拉角值\n\t*/\n\t__proto.getYawPitchRoll=function(out){\n\t\tVector3.transformQuat(Vector3.ForwardRH,this,Quaternion.TEMPVector31);\n\t\tVector3.transformQuat(Vector3.Up,this,Quaternion.TEMPVector32);\n\t\tvar upe=Quaternion.TEMPVector32.elements;\n\t\tQuaternion.angleTo(Vector3.ZERO,Quaternion.TEMPVector31,Quaternion.TEMPVector33);\n\t\tvar anglee=Quaternion.TEMPVector33.elements;\n\t\tif (anglee[0]==Math.PI / 2){\n\t\t\tanglee[1]=Quaternion.arcTanAngle(upe[2],upe[0]);\n\t\t\tanglee[2]=0;\n\t\t\t}else if (anglee[0]==-Math.PI / 2){\n\t\t\tanglee[1]=Quaternion.arcTanAngle(-upe[2],-upe[0]);\n\t\t\tanglee[2]=0;\n\t\t\t}else {\n\t\t\tMatrix4x4.createRotationY(-anglee[1],Quaternion.TEMPMatrix0);\n\t\t\tMatrix4x4.createRotationX(-anglee[0],Quaternion.TEMPMatrix1);\n\t\t\tVector3.transformCoordinate(Quaternion.TEMPVector32,Quaternion.TEMPMatrix0,Quaternion.TEMPVector32);\n\t\t\tVector3.transformCoordinate(Quaternion.TEMPVector32,Quaternion.TEMPMatrix1,Quaternion.TEMPVector32);\n\t\t\tanglee[2]=Quaternion.arcTanAngle(upe[1],-upe[0]);\n\t\t}\n\t\tif (anglee[1] <=-Math.PI)\n\t\t\tanglee[1]=Math.PI;\n\t\tif (anglee[2] <=-Math.PI)\n\t\t\tanglee[2]=Math.PI;\n\t\tif (anglee[1] >=Math.PI && anglee[2] >=Math.PI){\n\t\t\tanglee[1]=0;\n\t\t\tanglee[2]=0;\n\t\t\tanglee[0]=Math.PI-anglee[0];\n\t\t};\n\t\tvar oe=out.elements;\n\t\toe[0]=anglee[1];\n\t\toe[1]=anglee[0];\n\t\toe[2]=anglee[2];\n\t}\n\n\t/**\n\t*求四元数的逆\n\t*@param out 输出四元数\n\t*/\n\t__proto.invert=function(out){\n\t\tvar e=out.elements;\n\t\tvar f=this.elements;\n\t\tvar a0=f[0],a1=f[1],a2=f[2],a3=f[3];\n\t\tvar dot=a0 *a0+a1 *a1+a2 *a2+a3 *a3;\n\t\tvar invDot=dot ? 1.0 / dot :0;\n\t\te[0]=-a0 *invDot;\n\t\te[1]=-a1 *invDot;\n\t\te[2]=-a2 *invDot;\n\t\te[3]=a3 *invDot;\n\t}\n\n\t/**\n\t*设置四元数为单位算数\n\t*@param out 输出四元数\n\t*/\n\t__proto.identity=function(){\n\t\tvar e=this.elements;\n\t\te[0]=0;\n\t\te[1]=0;\n\t\te[2]=0;\n\t\te[3]=1;\n\t}\n\n\t/**\n\t*从Array数组拷贝值。\n\t*@param array 数组。\n\t*@param offset 数组偏移。\n\t*/\n\t__proto.fromArray=function(array,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\tthis.elements[0]=array[offset+0];\n\t\tthis.elements[1]=array[offset+1];\n\t\tthis.elements[2]=array[offset+2];\n\t\tthis.elements[3]=array[offset+3];\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar i,s,d;\n\t\ts=this.elements;\n\t\td=destObject.elements;\n\t\tif (s===d){\n\t\t\treturn;\n\t\t}\n\t\tfor (i=0;i < 4;++i){\n\t\t\td[i]=s[i];\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\t__proto.equals=function(b){\n\t\tvar ae=this.elements;\n\t\tvar be=b.elements;\n\t\treturn MathUtils3D.nearEqual(ae[0],be[0])&& MathUtils3D.nearEqual(ae[1],be[1])&& MathUtils3D.nearEqual(ae[2],be[2])&& MathUtils3D.nearEqual(ae[3],be[3]);\n\t}\n\n\t/**\n\t*计算长度的平方。\n\t*@return 长度的平方。\n\t*/\n\t__proto.lengthSquared=function(){\n\t\tvar x=this.elements[0];\n\t\tvar y=this.elements[1];\n\t\tvar z=this.elements[2];\n\t\tvar w=this.elements[3];\n\t\treturn (x *x)+(y *y)+(z *z)+(w *w);\n\t}\n\n\t/**\n\t*获取四元数的x值\n\t*/\n\t__getset(0,__proto,'x',function(){\n\t\treturn this.elements[0];\n\t});\n\n\t/**\n\t*获取四元数的y值\n\t*/\n\t__getset(0,__proto,'y',function(){\n\t\treturn this.elements[1];\n\t});\n\n\t/**\n\t*获取四元数的z值\n\t*/\n\t__getset(0,__proto,'z',function(){\n\t\treturn this.elements[2];\n\t});\n\n\t/**\n\t*获取四元数的w值\n\t*/\n\t__getset(0,__proto,'w',function(){\n\t\treturn this.elements[3];\n\t});\n\n\tQuaternion.createFromYawPitchRoll=function(yaw,pitch,roll,out){\n\t\tvar halfRoll=roll *0.5;\n\t\tvar halfPitch=pitch *0.5;\n\t\tvar halfYaw=yaw *0.5;\n\t\tvar sinRoll=Math.sin(halfRoll);\n\t\tvar cosRoll=Math.cos(halfRoll);\n\t\tvar sinPitch=Math.sin(halfPitch);\n\t\tvar cosPitch=Math.cos(halfPitch);\n\t\tvar sinYaw=Math.sin(halfYaw);\n\t\tvar cosYaw=Math.cos(halfYaw);\n\t\tvar oe=out.elements;\n\t\toe[0]=(cosYaw *sinPitch *cosRoll)+(sinYaw *cosPitch *sinRoll);\n\t\toe[1]=(sinYaw *cosPitch *cosRoll)-(cosYaw *sinPitch *sinRoll);\n\t\toe[2]=(cosYaw *cosPitch *sinRoll)-(sinYaw *sinPitch *cosRoll);\n\t\toe[3]=(cosYaw *cosPitch *cosRoll)+(sinYaw *sinPitch *sinRoll);\n\t}\n\n\tQuaternion.multiply=function(left,right,out){\n\t\tvar le=left.elements;\n\t\tvar re=right.elements;\n\t\tvar oe=out.elements;\n\t\tvar lx=le[0];\n\t\tvar ly=le[1];\n\t\tvar lz=le[2];\n\t\tvar lw=le[3];\n\t\tvar rx=re[0];\n\t\tvar ry=re[1];\n\t\tvar rz=re[2];\n\t\tvar rw=re[3];\n\t\tvar a=(ly *rz-lz *ry);\n\t\tvar b=(lz *rx-lx *rz);\n\t\tvar c=(lx *ry-ly *rx);\n\t\tvar d=(lx *rx+ly *ry+lz *rz);\n\t\toe[0]=(lx *rw+rx *lw)+a;\n\t\toe[1]=(ly *rw+ry *lw)+b;\n\t\toe[2]=(lz *rw+rz *lw)+c;\n\t\toe[3]=lw *rw-d;\n\t}\n\n\tQuaternion.arcTanAngle=function(x,y){\n\t\tif (x==0){\n\t\t\tif (y==1)\n\t\t\t\treturn Math.PI / 2;\n\t\t\treturn-Math.PI / 2;\n\t\t}\n\t\tif (x > 0)\n\t\t\treturn Math.atan(y / x);\n\t\tif (x < 0){\n\t\t\tif (y > 0)\n\t\t\t\treturn Math.atan(y / x)+Math.PI;\n\t\t\treturn Math.atan(y / x)-Math.PI;\n\t\t}\n\t\treturn 0;\n\t}\n\n\tQuaternion.angleTo=function(from,location,angle){\n\t\tVector3.subtract(location,from,Quaternion.TEMPVector30);\n\t\tVector3.normalize(Quaternion.TEMPVector30,Quaternion.TEMPVector30);\n\t\tangle.elements[0]=Math.asin(Quaternion.TEMPVector30.y);\n\t\tangle.elements[1]=Quaternion.arcTanAngle(-Quaternion.TEMPVector30.z,-Quaternion.TEMPVector30.x);\n\t}\n\n\tQuaternion.createFromAxisAngle=function(axis,rad,out){\n\t\tvar e=out.elements;\n\t\tvar f=axis.elements;\n\t\trad=rad *0.5;\n\t\tvar s=Math.sin(rad);\n\t\te[0]=s *f[0];\n\t\te[1]=s *f[1];\n\t\te[2]=s *f[2];\n\t\te[3]=Math.cos(rad);\n\t}\n\n\tQuaternion.createFromMatrix3x3=function(sou,out){\n\t\tvar e=out.elements;\n\t\tvar f=sou.elements;\n\t\tvar fTrace=f[0]+f[4]+f[8];\n\t\tvar fRoot;\n\t\tif (fTrace > 0.0){\n\t\t\tfRoot=Math.sqrt(fTrace+1.0);\n\t\t\te[3]=0.5 *fRoot;\n\t\t\tfRoot=0.5 / fRoot;\n\t\t\te[0]=(f[5]-f[7])*fRoot;\n\t\t\te[1]=(f[6]-f[2])*fRoot;\n\t\t\te[2]=(f[1]-f[3])*fRoot;\n\t\t\t}else {\n\t\t\tvar i=0;\n\t\t\tif (f[4] > f[0])\n\t\t\t\ti=1;\n\t\t\tif (f[8] > f[i *3+i])\n\t\t\t\ti=2;\n\t\t\tvar j=(i+1)% 3;\n\t\t\tvar k=(i+2)% 3;\n\t\t\tfRoot=Math.sqrt(f[i *3+i]-f[j *3+j]-f[k *3+k]+1.0);\n\t\t\te[i]=0.5 *fRoot;\n\t\t\tfRoot=0.5 / fRoot;\n\t\t\te[3]=(f[j *3+k]-f[k *3+j])*fRoot;\n\t\t\te[j]=(f[j *3+i]+f[i *3+j])*fRoot;\n\t\t\te[k]=(f[k *3+i]+f[i *3+k])*fRoot;\n\t\t}\n\t\treturn;\n\t}\n\n\tQuaternion.createFromMatrix4x4=function(mat,out){\n\t\tvar me=mat.elements;\n\t\tvar oe=out.elements;\n\t\tvar sqrt;\n\t\tvar half;\n\t\tvar scale=me[0]+me[5]+me[10];\n\t\tif (scale > 0.0){\n\t\t\tsqrt=Math.sqrt(scale+1.0);\n\t\t\toe[3]=sqrt *0.5;\n\t\t\tsqrt=0.5 / sqrt;\n\t\t\toe[0]=(me[6]-me[9])*sqrt;\n\t\t\toe[1]=(me[8]-me[2])*sqrt;\n\t\t\toe[2]=(me[1]-me[4])*sqrt;\n\t\t\t}else if ((me[0] >=me[5])&& (me[0] >=me[10])){\n\t\t\tsqrt=Math.sqrt(1.0+me[0]-me[5]-me[10]);\n\t\t\thalf=0.5 / sqrt;\n\t\t\toe[0]=0.5 *sqrt;\n\t\t\toe[1]=(me[1]+me[4])*half;\n\t\t\toe[2]=(me[2]+me[8])*half;\n\t\t\toe[3]=(me[6]-me[9])*half;\n\t\t\t}else if (me[5] > me[10]){\n\t\t\tsqrt=Math.sqrt(1.0+me[5]-me[0]-me[10]);\n\t\t\thalf=0.5 / sqrt;\n\t\t\toe[0]=(me[4]+me[1])*half;\n\t\t\toe[1]=0.5 *sqrt;\n\t\t\toe[2]=(me[9]+me[6])*half;\n\t\t\toe[3]=(me[8]-me[2])*half;\n\t\t\t}else {\n\t\t\tsqrt=Math.sqrt(1.0+me[10]-me[0]-me[5]);\n\t\t\thalf=0.5 / sqrt;\n\t\t\toe[0]=(me[8]+me[2])*half;\n\t\t\toe[1]=(me[9]+me[6])*half;\n\t\t\toe[2]=0.5 *sqrt;\n\t\t\toe[3]=(me[1]-me[4])*half;\n\t\t}\n\t}\n\n\tQuaternion.slerp=function(left,right,t,out){\n\t\tvar a=left.elements;\n\t\tvar b=right.elements;\n\t\tvar oe=out.elements;\n\t\tvar ax=a[0],ay=a[1],az=a[2],aw=a[3],bx=b[0],by=b[1],bz=b[2],bw=b[3];\n\t\tvar omega,cosom,sinom,scale0,scale1;\n\t\tcosom=ax *bx+ay *by+az *bz+aw *bw;\n\t\tif (cosom < 0.0){\n\t\t\tcosom=-cosom;\n\t\t\tbx=-bx;\n\t\t\tby=-by;\n\t\t\tbz=-bz;\n\t\t\tbw=-bw;\n\t\t}\n\t\tif ((1.0-cosom)> 0.000001){\n\t\t\tomega=Math.acos(cosom);\n\t\t\tsinom=Math.sin(omega);\n\t\t\tscale0=Math.sin((1.0-t)*omega)/ sinom;\n\t\t\tscale1=Math.sin(t *omega)/ sinom;\n\t\t\t}else {\n\t\t\tscale0=1.0-t;\n\t\t\tscale1=t;\n\t\t}\n\t\toe[0]=scale0 *ax+scale1 *bx;\n\t\toe[1]=scale0 *ay+scale1 *by;\n\t\toe[2]=scale0 *az+scale1 *bz;\n\t\toe[3]=scale0 *aw+scale1 *bw;\n\t\treturn oe;\n\t}\n\n\tQuaternion.lerp=function(left,right,t,out){\n\t\tvar e=out.elements;\n\t\tvar f=left.elements;\n\t\tvar g=right.elements;\n\t\tvar ax=f[0],ay=f[1],az=f[2],aw=f[3];\n\t\te[0]=ax+t *(g[0]-ax);\n\t\te[1]=ay+t *(g[1]-ay);\n\t\te[2]=az+t *(g[2]-az);\n\t\te[3]=aw+t *(g[3]-aw);\n\t}\n\n\tQuaternion.add=function(left,right,out){\n\t\tvar e=out.elements;\n\t\tvar f=left.elements;\n\t\tvar g=right.elements;\n\t\te[0]=f[0]+g[0];\n\t\te[1]=f[1]+g[1];\n\t\te[2]=f[2]+g[2];\n\t\te[3]=f[3]+g[3];\n\t}\n\n\tQuaternion.dot=function(left,right){\n\t\tvar f=left.elements;\n\t\tvar g=right.elements;\n\t\treturn f[0] *g[0]+f[1] *g[1]+f[2] *g[2]+f[3] *g[3];\n\t}\n\n\tQuaternion.rotationLookAt=function(forward,up,out){\n\t\tQuaternion.lookAt(Vector3.ZERO,forward,up,out);\n\t}\n\n\tQuaternion.lookAt=function(eye,target,up,out){\n\t\tMatrix3x3.lookAt(eye,target,up,Quaternion._tempMatrix3x3);\n\t\tQuaternion.rotationMatrix(Quaternion._tempMatrix3x3,out);\n\t}\n\n\tQuaternion.invert=function(value,out){\n\t\tvar vE=value.elements;\n\t\tvar oE=out.elements;\n\t\tvar lengthSq=value.lengthSquared();\n\t\tif (!MathUtils3D.isZero(lengthSq)){\n\t\t\tlengthSq=1.0 / lengthSq;\n\t\t\toE[0]=-vE[0] *lengthSq;\n\t\t\toE[1]=-vE[1] *lengthSq;\n\t\t\toE[2]=-vE[2] *lengthSq;\n\t\t\toE[3]=vE[3] *lengthSq;\n\t\t}\n\t}\n\n\tQuaternion.rotationMatrix=function(matrix3x3,out){\n\t\tvar me=matrix3x3.elements;\n\t\tvar m11=me[0];\n\t\tvar m12=me[1];\n\t\tvar m13=me[2];\n\t\tvar m21=me[3];\n\t\tvar m22=me[4];\n\t\tvar m23=me[5];\n\t\tvar m31=me[6];\n\t\tvar m32=me[7];\n\t\tvar m33=me[8];\n\t\tvar oe=out.elements;\n\t\tvar sqrt=NaN,half=NaN;\n\t\tvar scale=m11+m22+m33;\n\t\tif (scale > 0){\n\t\t\tsqrt=Math.sqrt(scale+1);\n\t\t\toe[3]=sqrt *0.5;\n\t\t\tsqrt=0.5 / sqrt;\n\t\t\toe[0]=(m23-m32)*sqrt;\n\t\t\toe[1]=(m31-m13)*sqrt;\n\t\t\toe[2]=(m12-m21)*sqrt;\n\t\t\t}else if ((m11 >=m22)&& (m11 >=m33)){\n\t\t\tsqrt=Math.sqrt(1+m11-m22-m33);\n\t\t\thalf=0.5 / sqrt;\n\t\t\toe[0]=0.5 *sqrt;\n\t\t\toe[1]=(m12+m21)*half;\n\t\t\toe[2]=(m13+m31)*half;\n\t\t\toe[3]=(m23-m32)*half;\n\t\t\t}else if (m22 > m33){\n\t\t\tsqrt=Math.sqrt(1+m22-m11-m33);\n\t\t\thalf=0.5 / sqrt;\n\t\t\toe[0]=(m21+m12)*half;\n\t\t\toe[1]=0.5 *sqrt;\n\t\t\toe[2]=(m32+m23)*half;\n\t\t\toe[3]=(m31-m13)*half;\n\t\t\t}else {\n\t\t\tsqrt=Math.sqrt(1+m33-m11-m22);\n\t\t\thalf=0.5 / sqrt;\n\t\t\toe[0]=(m31+m13)*half;\n\t\t\toe[1]=(m32+m23)*half;\n\t\t\toe[2]=0.5 *sqrt;\n\t\t\toe[3]=(m12-m21)*half;\n\t\t}\n\t}\n\n\tQuaternion.DEFAULT=new Quaternion();\n\t__static(Quaternion,\n\t['TEMPVector30',function(){return this.TEMPVector30=new Vector3();},'TEMPVector31',function(){return this.TEMPVector31=new Vector3();},'TEMPVector32',function(){return this.TEMPVector32=new Vector3();},'TEMPVector33',function(){return this.TEMPVector33=new Vector3();},'TEMPMatrix0',function(){return this.TEMPMatrix0=new Matrix4x4();},'TEMPMatrix1',function(){return this.TEMPMatrix1=new Matrix4x4();},'_tempMatrix3x3',function(){return this._tempMatrix3x3=new Matrix3x3();},'NAN',function(){return this.NAN=new Quaternion(NaN,NaN,NaN,NaN);}\n\t]);\n\treturn Quaternion;\n})()\n\n\n/**\n*<code>Rand</code> 类用于通过32位无符号整型随机种子创建随机数。\n*/\n//class laya.d3.math.Rand\nvar Rand=(function(){\n\tfunction Rand(seed){\n\t\tthis._temp=new Uint32Array(1);\n\t\tthis.seeds=new Uint32Array(4);\n\t\tthis.seeds[0]=seed;\n\t\tthis.seeds[1]=this.seeds[0] *0x6C078965+1;\n\t\tthis.seeds[2]=this.seeds[1] *0x6C078965+1;\n\t\tthis.seeds[3]=this.seeds[2] *0x6C078965+1;\n\t}\n\n\t__class(Rand,'laya.d3.math.Rand');\n\tvar __proto=Rand.prototype;\n\t/**\n\t*获取无符号32位整形随机数。\n\t*@return 无符号32位整形随机数。\n\t*/\n\t__proto.getUint=function(){\n\t\tthis._temp[0]=this.seeds[0] ^ (this.seeds[0] << 11);\n\t\tthis.seeds[0]=this.seeds[1];\n\t\tthis.seeds[1]=this.seeds[2];\n\t\tthis.seeds[2]=this.seeds[3];\n\t\tthis.seeds[3]=(this.seeds[3] ^ (this.seeds[3] >>> 19))^ (this._temp[0] ^ (this._temp[0] >>> 8));\n\t\treturn this.seeds[3];\n\t}\n\n\t/**\n\t*获取0到1之间的浮点随机数。\n\t*@return 0到1之间的浮点随机数。\n\t*/\n\t__proto.getFloat=function(){\n\t\tthis.getUint();\n\t\treturn (this.seeds[3] & 0x007FFFFF)*(1.0 / 8388607.0);\n\t}\n\n\t/**\n\t*获取-1到1之间的浮点随机数。\n\t*@return-1到1之间的浮点随机数。\n\t*/\n\t__proto.getSignedFloat=function(){\n\t\treturn this.getFloat()*2.0-1.0;\n\t}\n\n\t/**\n\t*设置随机种子。\n\t*@param seed 随机种子。\n\t*/\n\t/**\n\t*获取随机种子。\n\t*@return 随机种子。\n\t*/\n\t__getset(0,__proto,'seed',function(){\n\t\treturn this.seeds[0];\n\t\t},function(seed){\n\t\tthis.seeds[0]=seed;\n\t\tthis.seeds[1]=this.seeds[0] *0x6C078965+1;\n\t\tthis.seeds[2]=this.seeds[1] *0x6C078965+1;\n\t\tthis.seeds[3]=this.seeds[2] *0x6C078965+1;\n\t});\n\n\tRand.getFloatFromInt=function(v){\n\t\treturn (v & 0x007FFFFF)*(1.0 / 8388607.0)\n\t}\n\n\tRand.getByteFromInt=function(v){\n\t\treturn (v & 0x007FFFFF)>>> 15;\n\t}\n\n\treturn Rand;\n})()\n\n\n/**\n*<code>Rand</code> 类用于通过128位整型种子创建随机数,算法来自:https://github.com/AndreasMadsen/xorshift。\n*/\n//class laya.d3.math.RandX\nvar RandX=(function(){\n\tfunction RandX(seed){\n\t\t/**@private */\n\t\tthis._state0U=NaN;\n\t\t/**@private */\n\t\tthis._state0L=NaN;\n\t\t/**@private */\n\t\tthis._state1U=NaN;\n\t\t/**@private */\n\t\tthis._state1L=NaN;\n\t\tif (!((seed instanceof Array))|| seed.length!==4)\n\t\t\tthrow new Error('Rand:Seed must be an array with 4 numbers');\n\t\tthis._state0U=seed[0] | 0;\n\t\tthis._state0L=seed[1] | 0;\n\t\tthis._state1U=seed[2] | 0;\n\t\tthis._state1L=seed[3] | 0;\n\t}\n\n\t__class(RandX,'laya.d3.math.RandX');\n\tvar __proto=RandX.prototype;\n\t/**\n\t*通过2x32位的数组，返回64位的随机数。\n\t*@return 64位的随机数。\n\t*/\n\t__proto.randomint=function(){\n\t\tvar s1U=this._state0U,s1L=this._state0L;\n\t\tvar s0U=this._state1U,s0L=this._state1L;\n\t\tvar sumL=(s0L >>> 0)+(s1L >>> 0);\n\t\tvar resU=(s0U+s1U+(sumL / 2 >>> 31))>>> 0;\n\t\tvar resL=sumL >>> 0;\n\t\tthis._state0U=s0U;\n\t\tthis._state0L=s0L;\n\t\tvar t1U=0,t1L=0;\n\t\tvar t2U=0,t2L=0;\n\t\tvar a1=23;\n\t\tvar m1=0xFFFFFFFF << (32-a1);\n\t\tt1U=(s1U << a1)| ((s1L & m1)>>> (32-a1));\n\t\tt1L=s1L << a1;\n\t\ts1U=s1U ^ t1U;\n\t\ts1L=s1L ^ t1L;\n\t\tt1U=s1U ^ s0U;\n\t\tt1L=s1L ^ s0L;\n\t\tvar a2=18;\n\t\tvar m2=0xFFFFFFFF >>> (32-a2);\n\t\tt2U=s1U >>> a2;\n\t\tt2L=(s1L >>> a2)| ((s1U & m2)<< (32-a2));\n\t\tt1U=t1U ^ t2U;\n\t\tt1L=t1L ^ t2L;\n\t\tvar a3=5;\n\t\tvar m3=0xFFFFFFFF >>> (32-a3);\n\t\tt2U=s0U >>> a3;\n\t\tt2L=(s0L >>> a3)| ((s0U & m3)<< (32-a3));\n\t\tt1U=t1U ^ t2U;\n\t\tt1L=t1L ^ t2L;\n\t\tthis._state1U=t1U;\n\t\tthis._state1L=t1L;\n\t\treturn [resU,resL];\n\t}\n\n\t/**\n\t*返回[0,1)之间的随机数。\n\t*@return\n\t*/\n\t__proto.random=function(){\n\t\tvar t2=this.randomint();\n\t\tvar t2U=t2[0];\n\t\tvar t2L=t2[1];\n\t\tvar eU=0x3FF << (52-32);\n\t\tvar eL=0;\n\t\tvar a1=12;\n\t\tvar m1=0xFFFFFFFF >>> (32-a1);\n\t\tvar sU=t2U >>> a1;\n\t\tvar sL=(t2L >>> a1)| ((t2U & m1)<< (32-a1));\n\t\tvar xU=eU | sU;\n\t\tvar xL=eL | sL;\n\t\tRandX._CONVERTION_BUFFER.setUint32(0,xU,false);\n\t\tRandX._CONVERTION_BUFFER.setUint32(4,xL,false);\n\t\tvar d=/*__JS__ */Rand._CONVERTION_BUFFER.getFloat64(0,false);\n\t\treturn d-1;\n\t}\n\n\t__static(RandX,\n\t['_CONVERTION_BUFFER',function(){return this._CONVERTION_BUFFER=new DataView(new ArrayBuffer(8));},'defaultRand',function(){return this.defaultRand=/*__JS__ */new Rand([0,Date.now()/ 65536,0,Date.now()% 65536]);}\n\t]);\n\treturn RandX;\n})()\n\n\n/**\n*<code>Ray</code> 类用于创建射线。\n*/\n//class laya.d3.math.Ray\nvar Ray=(function(){\n\tfunction Ray(origin,direction){\n\t\t/**原点*/\n\t\tthis.origin=null;\n\t\t/**方向*/\n\t\tthis.direction=null;\n\t\tthis.origin=origin;\n\t\tthis.direction=direction;\n\t}\n\n\t__class(Ray,'laya.d3.math.Ray');\n\treturn Ray;\n})()\n\n\n/**\n*<code>Vector2</code> 类用于创建二维向量。\n*/\n//class laya.d3.math.Vector2\nvar Vector2=(function(){\n\tfunction Vector2(x,y){\n\t\tthis.elements=new Float32Array(2);\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\tvar v=this.elements;\n\t\tv[0]=x;\n\t\tv[1]=y;\n\t}\n\n\t__class(Vector2,'laya.d3.math.Vector2');\n\tvar __proto=Vector2.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*从Array数组拷贝值。\n\t*@param array 数组。\n\t*@param offset 数组偏移。\n\t*/\n\t__proto.fromArray=function(array,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\tthis.elements[0]=array[offset+0];\n\t\tthis.elements[1]=array[offset+1];\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destVector2=destObject;\n\t\tvar destE=destVector2.elements;\n\t\tvar s=this.elements;\n\t\tdestE[0]=s[0];\n\t\tdestE[1]=s[1];\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destVector2=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destVector2);\n\t\treturn destVector2;\n\t}\n\n\t/**\n\t*设置X轴坐标。\n\t*@param value X轴坐标。\n\t*/\n\t/**\n\t*获取X轴坐标。\n\t*@return X轴坐标。\n\t*/\n\t__getset(0,__proto,'x',function(){\n\t\treturn this.elements[0];\n\t\t},function(value){\n\t\tthis.elements[0]=value;\n\t});\n\n\t/**\n\t*设置Y轴坐标。\n\t*@param value Y轴坐标。\n\t*/\n\t/**\n\t*获取Y轴坐标。\n\t*@return Y轴坐标。\n\t*/\n\t__getset(0,__proto,'y',function(){\n\t\treturn this.elements[1];\n\t\t},function(value){\n\t\tthis.elements[1]=value;\n\t});\n\n\tVector2.scale=function(a,b,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\te[0]=f[0] *b;\n\t\te[1]=f[1] *b;\n\t}\n\n\t__static(Vector2,\n\t['ZERO',function(){return this.ZERO=new Vector2(0.0,0.0);},'ONE',function(){return this.ONE=new Vector2(1.0,1.0);}\n\t]);\n\treturn Vector2;\n})()\n\n\n/**\n*<code>Vector3</code> 类用于创建三维向量。\n*/\n//class laya.d3.math.Vector3\nvar Vector3=(function(){\n\tfunction Vector3(x,y,z){\n\t\tthis.elements=new Float32Array(3);\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\t(z===void 0)&& (z=0);\n\t\tvar v=this.elements;\n\t\tv[0]=x;\n\t\tv[1]=y;\n\t\tv[2]=z;\n\t}\n\n\t__class(Vector3,'laya.d3.math.Vector3');\n\tvar __proto=Vector3.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*从Array数组拷贝值。\n\t*@param array 数组。\n\t*@param offset 数组偏移。\n\t*/\n\t__proto.fromArray=function(array,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\tthis.elements[0]=array[offset+0];\n\t\tthis.elements[1]=array[offset+1];\n\t\tthis.elements[2]=array[offset+2];\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destVector3=destObject;\n\t\tvar destE=destVector3.elements;\n\t\tvar s=this.elements;\n\t\tdestE[0]=s[0];\n\t\tdestE[1]=s[1];\n\t\tdestE[2]=s[2];\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destVector3=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destVector3);\n\t\treturn destVector3;\n\t}\n\n\t__proto.toDefault=function(){\n\t\tthis.elements[0]=0;\n\t\tthis.elements[1]=0;\n\t\tthis.elements[2]=0;\n\t}\n\n\t/**\n\t*设置X轴坐标。\n\t*@param value X轴坐标。\n\t*/\n\t/**\n\t*获取X轴坐标。\n\t*@return X轴坐标。\n\t*/\n\t__getset(0,__proto,'x',function(){\n\t\treturn this.elements[0];\n\t\t},function(value){\n\t\tthis.elements[0]=value;\n\t});\n\n\t/**\n\t*设置Y轴坐标。\n\t*@param value Y轴坐标。\n\t*/\n\t/**\n\t*获取Y轴坐标。\n\t*@return Y轴坐标。\n\t*/\n\t__getset(0,__proto,'y',function(){\n\t\treturn this.elements[1];\n\t\t},function(value){\n\t\tthis.elements[1]=value;\n\t});\n\n\t/**\n\t*设置Z轴坐标。\n\t*@param value Z轴坐标。\n\t*/\n\t/**\n\t*获取Z轴坐标。\n\t*@return Z轴坐标。\n\t*/\n\t__getset(0,__proto,'z',function(){\n\t\treturn this.elements[2];\n\t\t},function(value){\n\t\tthis.elements[2]=value;\n\t});\n\n\tVector3.distanceSquared=function(value1,value2){\n\t\tvar value1e=value1.elements;\n\t\tvar value2e=value2.elements;\n\t\tvar x=value1e[0]-value2e[0];\n\t\tvar y=value1e[1]-value2e[1];\n\t\tvar z=value1e[2]-value2e[2];\n\t\treturn (x *x)+(y *y)+(z *z);\n\t}\n\n\tVector3.distance=function(value1,value2){\n\t\tvar value1e=value1.elements;\n\t\tvar value2e=value2.elements;\n\t\tvar x=value1e[0]-value2e[0];\n\t\tvar y=value1e[1]-value2e[1];\n\t\tvar z=value1e[2]-value2e[2];\n\t\treturn Math.sqrt((x *x)+(y *y)+(z *z));\n\t}\n\n\tVector3.min=function(a,b,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\tvar g=b.elements\n\t\te[0]=Math.min(f[0],g[0]);\n\t\te[1]=Math.min(f[1],g[1]);\n\t\te[2]=Math.min(f[2],g[2]);\n\t}\n\n\tVector3.max=function(a,b,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\tvar g=b.elements\n\t\te[0]=Math.max(f[0],g[0]);\n\t\te[1]=Math.max(f[1],g[1]);\n\t\te[2]=Math.max(f[2],g[2]);\n\t}\n\n\tVector3.transformQuat=function(source,rotation,out){\n\t\tvar destination=out.elements;\n\t\tvar se=source.elements;\n\t\tvar re=rotation.elements;\n\t\tvar x=se[0],y=se[1],z=se[2],qx=re[0],qy=re[1],qz=re[2],qw=re[3],\n\t\tix=qw *x+qy *z-qz *y,iy=qw *y+qz *x-qx *z,iz=qw *z+qx *y-qy *x,iw=-qx *x-qy *y-qz *z;\n\t\tdestination[0]=ix *qw+iw *-qx+iy *-qz-iz *-qy;\n\t\tdestination[1]=iy *qw+iw *-qy+iz *-qx-ix *-qz;\n\t\tdestination[2]=iz *qw+iw *-qz+ix *-qy-iy *-qx;\n\t}\n\n\tVector3.scalarLength=function(a){\n\t\tvar f=a.elements;\n\t\tvar x=f[0],y=f[1],z=f[2];\n\t\treturn Math.sqrt(x *x+y *y+z *z);\n\t}\n\n\tVector3.scalarLengthSquared=function(a){\n\t\tvar f=a.elements;\n\t\tvar x=f[0],y=f[1],z=f[2];\n\t\treturn x *x+y *y+z *z;\n\t}\n\n\tVector3.normalize=function(s,out){\n\t\tvar se=s.elements;\n\t\tvar oe=out.elements;\n\t\tvar x=se[0],y=se[1],z=se[2];\n\t\tvar len=x *x+y *y+z *z;\n\t\tif (len > 0){\n\t\t\tlen=1 / Math.sqrt(len);\n\t\t\toe[0]=se[0] *len;\n\t\t\toe[1]=se[1] *len;\n\t\t\toe[2]=se[2] *len;\n\t\t}\n\t}\n\n\tVector3.multiply=function(a,b,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\tvar g=b.elements\n\t\te[0]=f[0] *g[0];\n\t\te[1]=f[1] *g[1];\n\t\te[2]=f[2] *g[2];\n\t}\n\n\tVector3.scale=function(a,b,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\te[0]=f[0] *b;\n\t\te[1]=f[1] *b;\n\t\te[2]=f[2] *b;\n\t}\n\n\tVector3.lerp=function(a,b,t,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\tvar g=b.elements;\n\t\tvar ax=f[0],ay=f[1],az=f[2];\n\t\te[0]=ax+t *(g[0]-ax);\n\t\te[1]=ay+t *(g[1]-ay);\n\t\te[2]=az+t *(g[2]-az);\n\t}\n\n\tVector3.transformV3ToV3=function(vector,transform,result){\n\t\tvar intermediate=Vector3._tempVector4;\n\t\tVector3.transformV3ToV4(vector,transform,intermediate);\n\t\tvar intermediateElem=intermediate.elements;\n\t\tvar resultElem=result.elements;\n\t\tresultElem[0]=intermediateElem[0];\n\t\tresultElem[1]=intermediateElem[1];\n\t\tresultElem[2]=intermediateElem[2];\n\t}\n\n\tVector3.transformV3ToV4=function(vector,transform,result){\n\t\tvar vectorElem=vector.elements;\n\t\tvar vectorX=vectorElem[0];\n\t\tvar vectorY=vectorElem[1];\n\t\tvar vectorZ=vectorElem[2];\n\t\tvar transformElem=transform.elements;\n\t\tvar resultElem=result.elements;\n\t\tresultElem[0]=(vectorX *transformElem[0])+(vectorY *transformElem[4])+(vectorZ *transformElem[8])+transformElem[12];\n\t\tresultElem[1]=(vectorX *transformElem[1])+(vectorY *transformElem[5])+(vectorZ *transformElem[9])+transformElem[13];\n\t\tresultElem[2]=(vectorX *transformElem[2])+(vectorY *transformElem[6])+(vectorZ *transformElem[10])+transformElem[14];\n\t\tresultElem[3]=(vectorX *transformElem[3])+(vectorY *transformElem[7])+(vectorZ *transformElem[11])+transformElem[15];\n\t}\n\n\tVector3.TransformNormal=function(normal,transform,result){\n\t\tvar normalElem=normal.elements;\n\t\tvar normalX=normalElem[0];\n\t\tvar normalY=normalElem[1];\n\t\tvar normalZ=normalElem[2];\n\t\tvar transformElem=transform.elements;\n\t\tvar resultElem=result.elements;\n\t\tresultElem[0]=(normalX *transformElem[0])+(normalY *transformElem[4])+(normalZ *transformElem[8]);\n\t\tresultElem[1]=(normalX *transformElem[1])+(normalY *transformElem[5])+(normalZ *transformElem[9]);\n\t\tresultElem[2]=(normalX *transformElem[2])+(normalY *transformElem[6])+(normalZ *transformElem[10]);\n\t}\n\n\tVector3.transformCoordinate=function(coordinate,transform,result){\n\t\tvar vectorElem=Vector3._tempVector4.elements;\n\t\tvar coordinateElem=coordinate.elements;\n\t\tvar coordinateX=coordinateElem[0];\n\t\tvar coordinateY=coordinateElem[1];\n\t\tvar coordinateZ=coordinateElem[2];\n\t\tvar transformElem=transform.elements;\n\t\tvectorElem[0]=(coordinateX *transformElem[0])+(coordinateY *transformElem[4])+(coordinateZ *transformElem[8])+transformElem[12];\n\t\tvectorElem[1]=(coordinateX *transformElem[1])+(coordinateY *transformElem[5])+(coordinateZ *transformElem[9])+transformElem[13];\n\t\tvectorElem[2]=(coordinateX *transformElem[2])+(coordinateY *transformElem[6])+(coordinateZ *transformElem[10])+transformElem[14];\n\t\tvectorElem[3]=1.0 / ((coordinateX *transformElem[3])+(coordinateY *transformElem[7])+(coordinateZ *transformElem[11])+transformElem[15]);\n\t\tvar resultElem=result.elements;\n\t\tresultElem[0]=vectorElem[0] *vectorElem[3];\n\t\tresultElem[1]=vectorElem[1] *vectorElem[3];\n\t\tresultElem[2]=vectorElem[2] *vectorElem[3];\n\t}\n\n\tVector3.Clamp=function(value,min,max,out){\n\t\tvar valuee=value.elements;\n\t\tvar x=valuee[0];\n\t\tvar y=valuee[1];\n\t\tvar z=valuee[2];\n\t\tvar mine=min.elements;\n\t\tvar mineX=mine[0];\n\t\tvar mineY=mine[1];\n\t\tvar mineZ=mine[2];\n\t\tvar maxe=max.elements;\n\t\tvar maxeX=maxe[0];\n\t\tvar maxeY=maxe[1];\n\t\tvar maxeZ=maxe[2];\n\t\tvar oute=out.elements;\n\t\tx=(x > maxeX)? maxeX :x;\n\t\tx=(x < mineX)? mineX :x;\n\t\ty=(y > maxeY)? maxeY :y;\n\t\ty=(y < mineY)? mineY :y;\n\t\tz=(z > maxeZ)? maxeZ :z;\n\t\tz=(z < mineZ)? mineZ :z;\n\t\toute[0]=x;\n\t\toute[1]=y;\n\t\toute[2]=z;\n\t}\n\n\tVector3.add=function(a,b,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\tvar g=b.elements\n\t\te[0]=f[0]+g[0];\n\t\te[1]=f[1]+g[1];\n\t\te[2]=f[2]+g[2];\n\t}\n\n\tVector3.subtract=function(a,b,o){\n\t\tvar oe=o.elements;\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\toe[0]=ae[0]-be[0];\n\t\toe[1]=ae[1]-be[1];\n\t\toe[2]=ae[2]-be[2];\n\t}\n\n\tVector3.cross=function(a,b,o){\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\tvar oe=o.elements;\n\t\tvar ax=ae[0],ay=ae[1],az=ae[2],bx=be[0],by=be[1],bz=be[2];\n\t\toe[0]=ay *bz-az *by;\n\t\toe[1]=az *bx-ax *bz;\n\t\toe[2]=ax *by-ay *bx;\n\t}\n\n\tVector3.dot=function(a,b){\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\tvar r=(ae[0] *be[0])+(ae[1] *be[1])+(ae[2] *be[2]);\n\t\treturn r;\n\t}\n\n\tVector3.equals=function(a,b){\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\treturn MathUtils3D.nearEqual(Math.abs(ae[0]),Math.abs(be[0]))&& MathUtils3D.nearEqual(Math.abs(ae[1]),Math.abs(be[1]))&& MathUtils3D.nearEqual(Math.abs(ae[2]),Math.abs(be[2]));\n\t}\n\n\tVector3.ZERO=new Vector3(0.0,0.0,0.0);\n\tVector3.ONE=new Vector3(1.0,1.0,1.0);\n\tVector3.NegativeUnitX=new Vector3(-1,0,0);\n\tVector3.UnitX=new Vector3(1,0,0);\n\tVector3.UnitY=new Vector3(0,1,0);\n\tVector3.UnitZ=new Vector3(0,0,1);\n\tVector3.ForwardRH=new Vector3(0,0,-1);\n\tVector3.ForwardLH=new Vector3(0,0,1);\n\tVector3.Up=new Vector3(0,1,0);\n\tVector3.NAN=new Vector3(NaN,NaN,NaN);\n\t__static(Vector3,\n\t['_tempVector4',function(){return this._tempVector4=new Vector4();}\n\t]);\n\treturn Vector3;\n})()\n\n\n/**\n*<code>Vector4</code> 类用于创建四维向量。\n*/\n//class laya.d3.math.Vector4\nvar Vector4=(function(){\n\tfunction Vector4(x,y,z,w){\n\t\tthis.elements=new Float32Array(4);\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\t(z===void 0)&& (z=0);\n\t\t(w===void 0)&& (w=0);\n\t\tvar v=this.elements;\n\t\tv[0]=x;\n\t\tv[1]=y;\n\t\tv[2]=z;\n\t\tv[3]=w;\n\t}\n\n\t__class(Vector4,'laya.d3.math.Vector4');\n\tvar __proto=Vector4.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*从Array数组拷贝值。\n\t*@param array 数组。\n\t*@param offset 数组偏移。\n\t*/\n\t__proto.fromArray=function(array,offset){\n\t\t(offset===void 0)&& (offset=0);\n\t\tthis.elements[0]=array[offset+0];\n\t\tthis.elements[1]=array[offset+1];\n\t\tthis.elements[2]=array[offset+2];\n\t\tthis.elements[3]=array[offset+3];\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destVector4=destObject;\n\t\tvar destE=destVector4.elements;\n\t\tvar s=this.elements;\n\t\tdestE[0]=s[0];\n\t\tdestE[1]=s[1];\n\t\tdestE[2]=s[2];\n\t\tdestE[3]=s[3];\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destVector4=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destVector4);\n\t\treturn destVector4;\n\t}\n\n\t/**\n\t*求四维向量的长度。\n\t*@return 长度。\n\t*/\n\t__proto.length=function(){\n\t\treturn Math.sqrt(this.x *this.x+this.y *this.y+this.z *this.z+this.w *this.w);\n\t}\n\n\t/**\n\t*求四维向量长度的平方。\n\t*@return 长度的平方。\n\t*/\n\t__proto.lengthSquared=function(){\n\t\treturn this.x *this.x+this.y *this.y+this.z *this.z+this.w *this.w;\n\t}\n\n\t/**\n\t*设置X轴坐标。\n\t*@param value X轴坐标。\n\t*/\n\t/**\n\t*获取X轴坐标。\n\t*@return X轴坐标。\n\t*/\n\t__getset(0,__proto,'x',function(){\n\t\treturn this.elements[0];\n\t\t},function(value){\n\t\tthis.elements[0]=value;\n\t});\n\n\t/**\n\t*设置Y轴坐标。\n\t*@param value Y轴坐标。\n\t*/\n\t/**\n\t*获取Y轴坐标。\n\t*@return Y轴坐标。\n\t*/\n\t__getset(0,__proto,'y',function(){\n\t\treturn this.elements[1];\n\t\t},function(value){\n\t\tthis.elements[1]=value;\n\t});\n\n\t/**\n\t*设置Z轴坐标。\n\t*@param value Z轴坐标。\n\t*/\n\t/**\n\t*获取Z轴坐标。\n\t*@return Z轴坐标。\n\t*/\n\t__getset(0,__proto,'z',function(){\n\t\treturn this.elements[2];\n\t\t},function(value){\n\t\tthis.elements[2]=value;\n\t});\n\n\t/**\n\t*设置W轴坐标。\n\t*@param value W轴坐标。\n\t*/\n\t/**\n\t*获取W轴坐标。\n\t*@return W轴坐标。\n\t*/\n\t__getset(0,__proto,'w',function(){\n\t\treturn this.elements[3];\n\t\t},function(value){\n\t\tthis.elements[3]=value;\n\t});\n\n\tVector4.lerp=function(a,b,t,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\tvar g=b.elements;\n\t\tvar ax=f[0],ay=f[1],az=f[2],aw=f[3];\n\t\te[0]=ax+t *(g[0]-ax);\n\t\te[1]=ay+t *(g[1]-ay);\n\t\te[2]=az+t *(g[2]-az);\n\t\te[3]=aw+t *(g[3]-aw);\n\t}\n\n\tVector4.transformByM4x4=function(vector4,m4x4,out){\n\t\tvar ve=vector4.elements;\n\t\tvar vx=ve[0];\n\t\tvar vy=ve[1];\n\t\tvar vz=ve[2];\n\t\tvar vw=ve[3];\n\t\tvar me=m4x4.elements;\n\t\tvar oe=out.elements;\n\t\toe[0]=vx *me[0]+vy *me[4]+vz *me[8]+vw *me[12];\n\t\toe[1]=vx *me[1]+vy *me[5]+vz *me[9]+vw *me[13];\n\t\toe[2]=vx *me[2]+vy *me[6]+vz *me[10]+vw *me[14];\n\t\toe[3]=vx *me[3]+vy *me[7]+vz *me[11]+vw *me[15];\n\t}\n\n\tVector4.equals=function(a,b){\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\treturn MathUtils3D.nearEqual(Math.abs(ae[0]),Math.abs(be[0]))&& MathUtils3D.nearEqual(Math.abs(ae[1]),Math.abs(be[1]))&& MathUtils3D.nearEqual(Math.abs(ae[2]),Math.abs(be[2]))&& MathUtils3D.nearEqual(Math.abs(ae[3]),Math.abs(be[3]));\n\t}\n\n\tVector4.normalize=function(s,out){\n\t\tvar se=s.elements;\n\t\tvar oe=out.elements;\n\t\tvar len=/*if err,please use iflash.method.xmlLength()*/s.length();\n\t\tif (len > 0){\n\t\t\toe[0]=se[0] *len;\n\t\t\toe[1]=se[1] *len;\n\t\t\toe[2]=se[2] *len;\n\t\t\toe[3]=se[3] *len;\n\t\t}\n\t}\n\n\tVector4.add=function(a,b,out){\n\t\tvar oe=out.elements;\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\toe[0]=ae[0]+be[0];\n\t\toe[1]=ae[1]+be[1];\n\t\toe[2]=ae[2]+be[2];\n\t\toe[3]=ae[3]+be[3];\n\t}\n\n\tVector4.subtract=function(a,b,out){\n\t\tvar oe=out.elements;\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\toe[0]=ae[0]-be[0];\n\t\toe[1]=ae[1]-be[1];\n\t\toe[2]=ae[2]-be[2];\n\t\toe[3]=ae[3]-be[3];\n\t}\n\n\tVector4.multiply=function(a,b,out){\n\t\tvar oe=out.elements;\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\toe[0]=ae[0] *be[0];\n\t\toe[1]=ae[1] *be[1];\n\t\toe[2]=ae[2] *be[2];\n\t\toe[3]=ae[3] *be[3];\n\t}\n\n\tVector4.scale=function(a,b,out){\n\t\tvar oe=out.elements;\n\t\tvar ae=a.elements;\n\t\toe[0]=ae[0] *b;\n\t\toe[1]=ae[1] *b;\n\t\toe[2]=ae[2] *b;\n\t\toe[3]=ae[3] *b;\n\t}\n\n\tVector4.Clamp=function(value,min,max,out){\n\t\tvar valuee=value.elements;\n\t\tvar x=valuee[0];\n\t\tvar y=valuee[1];\n\t\tvar z=valuee[2];\n\t\tvar w=valuee[3];\n\t\tvar mine=min.elements;\n\t\tvar mineX=mine[0];\n\t\tvar mineY=mine[1];\n\t\tvar mineZ=mine[2];\n\t\tvar mineW=mine[3];\n\t\tvar maxe=max.elements;\n\t\tvar maxeX=maxe[0];\n\t\tvar maxeY=maxe[1];\n\t\tvar maxeZ=maxe[2];\n\t\tvar maxeW=maxe[3];\n\t\tvar oute=out.elements;\n\t\tx=(x > maxeX)? maxeX :x;\n\t\tx=(x < mineX)? mineX :x;\n\t\ty=(y > maxeY)? maxeY :y;\n\t\ty=(y < mineY)? mineY :y;\n\t\tz=(z > maxeZ)? maxeZ :z;\n\t\tz=(z < mineZ)? mineZ :z;\n\t\tw=(w > maxeW)? maxeW :w;\n\t\tw=(w < mineW)? mineW :w;\n\t\toute[0]=x;\n\t\toute[1]=y;\n\t\toute[2]=z;\n\t\toute[3]=w;\n\t}\n\n\tVector4.distanceSquared=function(value1,value2){\n\t\tvar value1e=value1.elements;\n\t\tvar value2e=value2.elements;\n\t\tvar x=value1e[0]-value2e[0];\n\t\tvar y=value1e[1]-value2e[1];\n\t\tvar z=value1e[2]-value2e[2];\n\t\tvar w=value1e[3]-value2e[3];\n\t\treturn (x *x)+(y *y)+(z *z)+(w *w);\n\t}\n\n\tVector4.distance=function(value1,value2){\n\t\tvar value1e=value1.elements;\n\t\tvar value2e=value2.elements;\n\t\tvar x=value1e[0]-value2e[0];\n\t\tvar y=value1e[1]-value2e[1];\n\t\tvar z=value1e[2]-value2e[2];\n\t\tvar w=value1e[3]-value2e[3];\n\t\treturn Math.sqrt((x *x)+(y *y)+(z *z)+(w *w));\n\t}\n\n\tVector4.dot=function(a,b){\n\t\tvar ae=a.elements;\n\t\tvar be=b.elements;\n\t\tvar r=(ae[0] *be[0])+(ae[1] *be[1])+(ae[2] *be[2])+(ae[3] *be[3]);\n\t\treturn r;\n\t}\n\n\tVector4.min=function(a,b,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\tvar g=b.elements\n\t\te[0]=Math.min(f[0],g[0]);\n\t\te[1]=Math.min(f[1],g[1]);\n\t\te[2]=Math.min(f[2],g[2]);\n\t\te[3]=Math.min(f[3],g[3]);\n\t}\n\n\tVector4.max=function(a,b,out){\n\t\tvar e=out.elements;\n\t\tvar f=a.elements;\n\t\tvar g=b.elements\n\t\te[0]=Math.max(f[0],g[0]);\n\t\te[1]=Math.max(f[1],g[1]);\n\t\te[2]=Math.max(f[2],g[2]);\n\t\te[3]=Math.max(f[3],g[3]);\n\t}\n\n\t__static(Vector4,\n\t['ZERO',function(){return this.ZERO=new Vector4();},'ONE',function(){return this.ONE=new Vector4(1.0,1.0,1.0,1.0);},'UnitX',function(){return this.UnitX=new Vector4(1.0,0.0,0.0,0.0);},'UnitY',function(){return this.UnitY=new Vector4(0.0,1.0,0.0,0.0);},'UnitZ',function(){return this.UnitZ=new Vector4(0.0,0.0,1.0,0.0);},'UnitW',function(){return this.UnitW=new Vector4(0.0,0.0,0.0,1.0);}\n\t]);\n\treturn Vector4;\n})()\n\n\n/**\n*<code>Viewport</code> 类用于创建视口。\n*/\n//class laya.d3.math.Viewport\nvar Viewport=(function(){\n\tfunction Viewport(x,y,width,height){\n\t\t/**X轴坐标*/\n\t\t//this.x=NaN;\n\t\t/**Y轴坐标*/\n\t\t//this.y=NaN;\n\t\t/**宽度*/\n\t\t//this.width=NaN;\n\t\t/**高度*/\n\t\t//this.height=NaN;\n\t\t/**最小深度*/\n\t\t//this.minDepth=NaN;\n\t\t/**最大深度*/\n\t\t//this.maxDepth=NaN;\n\t\tthis.minDepth=0.0;\n\t\tthis.maxDepth=1.0;\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.width=width;\n\t\tthis.height=height;\n\t}\n\n\t__class(Viewport,'laya.d3.math.Viewport');\n\tvar __proto=Viewport.prototype;\n\t/**\n\t*变换一个三维向量。\n\t*@param source 源三维向量。\n\t*@param matrix 变换矩阵。\n\t*@param vector 输出三维向量。\n\t*/\n\t__proto.project=function(source,matrix,out){\n\t\tVector3.transformV3ToV3(source,matrix,out);\n\t\tvar sourceEleme=source.elements;\n\t\tvar matrixEleme=matrix.elements;\n\t\tvar outEleme=out.elements;\n\t\tvar a=(((sourceEleme[0] *matrixEleme[3])+(sourceEleme[1] *matrixEleme[7]))+(sourceEleme[2] *matrixEleme[11]))+matrixEleme[15];\n\t\tif (a!==1.0){\n\t\t\toutEleme[0]=outEleme[0] / a;\n\t\t\toutEleme[1]=outEleme[1] / a;\n\t\t\toutEleme[2]=outEleme[2] / a;\n\t\t}\n\t\toutEleme[0]=(((outEleme[0]+1.0)*0.5)*this.width)+this.x;\n\t\toutEleme[1]=(((-outEleme[1]+1.0)*0.5)*this.height)+this.y;\n\t\toutEleme[2]=(outEleme[2] *(this.maxDepth-this.minDepth))+this.minDepth;\n\t}\n\n\t/**\n\t*反变换一个三维向量。\n\t*@param source 源三维向量。\n\t*@param matrix 变换矩阵。\n\t*@param vector 输出三维向量。\n\t*/\n\t__proto.unprojectFromMat=function(source,matrix,out){\n\t\tvar sourceEleme=source.elements;\n\t\tvar matrixEleme=matrix.elements;\n\t\tvar outEleme=out.elements;\n\t\toutEleme[0]=(((sourceEleme[0]-this.x)/ (this.width))*2.0)-1.0;\n\t\toutEleme[1]=-((((sourceEleme[1]-this.y)/ (this.height))*2.0)-1.0);\n\t\tvar halfDepth=(this.maxDepth-this.minDepth)/ 2;\n\t\toutEleme[2]=(sourceEleme[2]-this.minDepth-halfDepth)/ halfDepth;\n\t\tvar a=(((outEleme[0] *matrixEleme[3])+(outEleme[1] *matrixEleme[7]))+(outEleme[2] *matrixEleme[11]))+matrixEleme[15];\n\t\tVector3.transformV3ToV3(out,matrix,out);\n\t\tif (a!==1.0){\n\t\t\toutEleme[0]=outEleme[0] / a;\n\t\t\toutEleme[1]=outEleme[1] / a;\n\t\t\toutEleme[2]=outEleme[2] / a;\n\t\t}\n\t}\n\n\t/**\n\t*反变换一个三维向量。\n\t*@param source 源三维向量。\n\t*@param projection 透视投影矩阵。\n\t*@param view 视图矩阵。\n\t*@param world 世界矩阵,可设置为null。\n\t*@param out 输出向量。\n\t*/\n\t__proto.unprojectFromWVP=function(source,projection,view,world,out){\n\t\tMatrix4x4.multiply(projection,view,Viewport._tempMatrix4x4);\n\t\t(world)&& (Matrix4x4.multiply(Viewport._tempMatrix4x4,world,Viewport._tempMatrix4x4));\n\t\tViewport._tempMatrix4x4.invert(Viewport._tempMatrix4x4);\n\t\tthis.unprojectFromMat(source,Viewport._tempMatrix4x4,out);\n\t}\n\n\t__static(Viewport,\n\t['_tempMatrix4x4',function(){return this._tempMatrix4x4=new Matrix4x4();}\n\t]);\n\treturn Viewport;\n})()\n\n\n/**\n*<code>Sky</code> 类用于创建天空的父类，抽象类不允许实例。\n*/\n//class laya.d3.resource.models.Sky\nvar Sky=(function(){\n\tfunction Sky(){\n\t\t/**@private */\n\t\t//this.__ownerCamera=null;\n\t\t/**@private 透明混合度。 */\n\t\tthis._alphaBlending=1.0;\n\t\t/**@private 颜色强度。 */\n\t\tthis._colorIntensity=1.0;\n\t\t/**@private */\n\t\t//this._vertexBuffer=null;\n\t\t/**@private */\n\t\t//this._indexBuffer=null;\n\t\t/**@private */\n\t\t//this._sharderNameID=0;\n\t\t/**@private */\n\t\t//this._shader=null;\n\t\t/**@private */\n\t\t//this._shaderValue=null;\n\t\t/**@private */\n\t\t//this._shaderCompile=null;\n\t\t/**@private */\n\t\t//this._environmentDiffuse=null;\n\t\t/**@private */\n\t\t//this._environmentSpecular=null;\n\t\t;\n\t\tthis._shaderValue=new ValusArray();\n\t}\n\n\t__class(Sky,'laya.d3.resource.models.Sky');\n\tvar __proto=Sky.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._setEnvironmentDiffuse=function(){\n\t\tif (this._environmentDiffuse.loaded){\n\t\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.ENVIRONMENTDIFFUSE*/7,this._environmentDiffuse);\n\t\t\t}else {\n\t\t\tthis._environmentDiffuse.on(/*laya.events.Event.LOADED*/\"loaded\",this,this._environmentDiffuseLoaded);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setEnvironmentSpecular=function(){\n\t\tif (this._environmentSpecular.loaded){\n\t\t\tvar si=this._environmentSpecular['simLodInfo'];\n\t\t\tif (si && (si instanceof Float32Array))\n\t\t\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.SIMLODINFO*/9,si);\n\t\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.ENVIRONMENTSPECULAR*/8,this._environmentSpecular);\n\t\t\t}else {\n\t\t\tthis._environmentSpecular.on(/*laya.events.Event.LOADED*/\"loaded\",this,this._environmentSpecularLoaded);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._environmentDiffuseLoaded=function(){\n\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.ENVIRONMENTDIFFUSE*/7,this._environmentDiffuse);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._environmentSpecularLoaded=function(){\n\t\tvar si=this._environmentSpecular['simLodInfo'];\n\t\tif (si && (si instanceof Float32Array))\n\t\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.SIMLODINFO*/9,si);\n\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.ENVIRONMENTSPECULAR*/8,this._environmentSpecular);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._render=function(state){}\n\t/**\n\t*销毁天空。\n\t*/\n\t__proto.destroy=function(){\n\t\tthis.__ownerCamera=null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_ownerCamera',null,function(value){\n\t\tthis.__ownerCamera=value;\n\t\t(this._environmentDiffuse)&& (this._setEnvironmentDiffuse());\n\t\t(this._environmentSpecular)&& (this._setEnvironmentSpecular());\n\t});\n\n\t/**\n\t*设置透明混合度。\n\t*@param value 透明混合度。\n\t*/\n\t/**\n\t*获取透明混合度。\n\t*@return 透明混合度。\n\t*/\n\t__getset(0,__proto,'alphaBlending',function(){\n\t\treturn this._alphaBlending;\n\t\t},function(value){\n\t\tthis._alphaBlending=value;\n\t\tif (this._alphaBlending < 0)\n\t\t\tthis._alphaBlending=0;\n\t\tif (this._alphaBlending > 1)\n\t\t\tthis._alphaBlending=1;\n\t});\n\n\t__getset(0,__proto,'envDiffuseSHBlue',null,function(value){\n\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.DIFFUSEIRRADMATB*/12,value);\n\t});\n\n\t/**\n\t*设置颜色强度。\n\t*@param value 颜色强度。\n\t*/\n\t/**\n\t*获取颜色强度。\n\t*@return 颜色强度。\n\t*/\n\t__getset(0,__proto,'colorIntensity',function(){\n\t\treturn this._colorIntensity;\n\t\t},function(value){\n\t\tthis._colorIntensity=value;\n\t\tif (this._colorIntensity < 0)\n\t\t\tthis._colorIntensity=0;\n\t});\n\n\t__getset(0,__proto,'envDiffuseSHGreen',null,function(value){\n\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.DIFFUSEIRRADMATG*/11,value);\n\t});\n\n\t__getset(0,__proto,'envDiffuseSHRed',null,function(value){\n\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.DIFFUSEIRRADMATR*/10,value);\n\t});\n\n\t/**\n\t*设置环境漫反射贴图。\n\t*@param value 环境漫反射贴图。\n\t*/\n\t/**\n\t*获取环境漫反射贴图。\n\t*@return 环境漫反射贴图。\n\t*/\n\t__getset(0,__proto,'environmentDiffuse',function(){\n\t\treturn this._environmentDiffuse;\n\t\t},function(value){\n\t\tvalue.minFifter=/*laya.webgl.WebGLContext.NEAREST*/0x2600;\n\t\tthis._environmentDiffuse=value;\n\t\t(this.__ownerCamera)&& (this._setEnvironmentDiffuse());\n\t});\n\n\t/**\n\t*设置环境高光贴图。\n\t*@param value 环境高光贴图。\n\t*/\n\t/**\n\t*获取环境高光贴图。\n\t*@return 环境高光贴图。\n\t*/\n\t__getset(0,__proto,'environmentSpecular',function(){\n\t\treturn this._environmentSpecular;\n\t\t},function(value){\n\t\tthis._environmentSpecular=value;\n\t\t(this.__ownerCamera)&& (this._setEnvironmentSpecular());\n\t});\n\n\tSky.MVPMATRIX=0;\n\tSky.INTENSITY=1;\n\tSky.ALPHABLENDING=2;\n\tSky.DIFFUSETEXTURE=3;\n\treturn Sky;\n})()\n\n\n/**\n*<code>SubMesh</code> 类用于创建子网格数据模板。\n*/\n//class laya.d3.resource.models.SubMesh\nvar SubMesh=(function(){\n\tfunction SubMesh(mesh){\n\t\t/**@private */\n\t\tthis._mesh=null;\n\t\t/**@private */\n\t\tthis._boneIndicesList=null;\n\t\t/**@private */\n\t\tthis._subIndexBufferStart=null;\n\t\t/**@private */\n\t\tthis._subIndexBufferCount=null;\n\t\t/**@private */\n\t\tthis._skinAnimationDatas=null;\n\t\t/**@private */\n\t\tthis._bufferUsage=null;\n\t\t/**@private */\n\t\tthis._indexInMesh=0;\n\t\t/**@private */\n\t\tthis._vertexBuffer=null;\n\t\t/**@private */\n\t\tthis._vertexStart=0;\n\t\t/**@private */\n\t\tthis._vertexCount=0;\n\t\t/**@private */\n\t\tthis._indexBuffer=null;\n\t\t/**@private */\n\t\tthis._indexStart=0;\n\t\t/**@private */\n\t\tthis._indexCount=0;\n\t\t/**@private */\n\t\tthis._indices=null;\n\t\tthis._bufferUsage={};\n\t\tthis._mesh=mesh;\n\t\tthis._boneIndicesList=[];\n\t\tthis._subIndexBufferStart=[];\n\t\tthis._subIndexBufferCount=[];\n\t}\n\n\t__class(SubMesh,'laya.d3.resource.models.SubMesh');\n\tvar __proto=SubMesh.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true,\"laya.resource.IDispose\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index===0)\n\t\t\treturn this._vertexBuffer;\n\t\telse\n\t\treturn null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getIndexBuffer=function(){\n\t\treturn this._indexBuffer;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getStaticBatchBakedVertexs=function(batchOwnerTransform,owner){\n\t\tvar byteSizeInFloat=4;\n\t\tvar vertexBuffer=this._vertexBuffer;\n\t\tvar vertexDeclaration=vertexBuffer.vertexDeclaration;\n\t\tvar positionOffset=vertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.POSITION0*/0).offset / byteSizeInFloat;\n\t\tvar normalOffset=vertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3).offset / byteSizeInFloat;\n\t\tvar lightmapScaleOffset=owner.meshRender.lightmapScaleOffset;\n\t\tvar i=0,n=0,bakedVertexes,bakedVertexFloatCount=0,lightingMapTexcoordOffset=0,uv1Element;\n\t\tvar uv0Offset=0,oriVertexFloatCount=0;\n\t\tif (lightmapScaleOffset){\n\t\t\tuv1Element=vertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15);\n\t\t\tif (uv1Element){\n\t\t\t\tbakedVertexFloatCount=vertexDeclaration.vertexStride / byteSizeInFloat;\n\t\t\t\tif (this._vertexCount > 0)\n\t\t\t\t\tbakedVertexes=vertexBuffer.getData().slice(this._vertexStart *bakedVertexFloatCount,(this._vertexStart+this._vertexCount)*bakedVertexFloatCount);\n\t\t\t\telse\n\t\t\t\tbakedVertexes=vertexBuffer.getData().slice();\n\t\t\t\tlightingMapTexcoordOffset=uv1Element.offset / byteSizeInFloat;\n\t\t\t\t}else {\n\t\t\t\toriVertexFloatCount=vertexDeclaration.vertexStride / byteSizeInFloat;\n\t\t\t\tbakedVertexFloatCount=oriVertexFloatCount+2;\n\t\t\t\tif (this._vertexCount)\n\t\t\t\t\tbakedVertexes=new Float32Array(this._vertexCount *(vertexBuffer.vertexDeclaration.vertexStride / byteSizeInFloat+2));\n\t\t\t\telse\n\t\t\t\tbakedVertexes=new Float32Array(vertexBuffer.vertexCount *(vertexBuffer.vertexDeclaration.vertexStride / byteSizeInFloat+2));\n\t\t\t\tuv0Offset=vertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2).offset / byteSizeInFloat;\n\t\t\t\tlightingMapTexcoordOffset=uv0Offset+2;\n\t\t\t\tvar oriVertexes=vertexBuffer.getData();\n\t\t\t\tfor (i=0,n=oriVertexes.length / oriVertexFloatCount;i < n;i++){\n\t\t\t\t\tvar oriVertexOffset=0;\n\t\t\t\t\tif (this._vertexCount > 0)\n\t\t\t\t\t\toriVertexOffset=(this._vertexStart+i)*oriVertexFloatCount;\n\t\t\t\t\telse\n\t\t\t\t\toriVertexOffset=i *oriVertexFloatCount;\n\t\t\t\t\tvar bakedVertexOffset=i *bakedVertexFloatCount;\n\t\t\t\t\tvar j=0;\n\t\t\t\t\tfor (j=0;j < lightingMapTexcoordOffset;j++)\n\t\t\t\t\tbakedVertexes[bakedVertexOffset+j]=oriVertexes[oriVertexOffset+j];\n\t\t\t\t\tfor (j=lightingMapTexcoordOffset;j < oriVertexFloatCount;j++)\n\t\t\t\t\tbakedVertexes[bakedVertexOffset+j+2]=oriVertexes[oriVertexOffset+j];\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tbakedVertexFloatCount=vertexDeclaration.vertexStride / byteSizeInFloat;\n\t\t\tif (this._vertexCount)\n\t\t\t\tbakedVertexes=vertexBuffer.getData().slice(this._vertexStart *bakedVertexFloatCount,(this._vertexStart+this._vertexCount)*bakedVertexFloatCount);\n\t\t\telse\n\t\t\tbakedVertexes=vertexBuffer.getData().slice();\n\t\t}\n\t\tif (batchOwnerTransform){\n\t\t\tvar rootMat=batchOwnerTransform.worldMatrix;\n\t\t\tvar rootInvertMat=SubMesh._tempMatrix4x40;\n\t\t\trootMat.invert(rootInvertMat);\n\t\t\tvar result=SubMesh._tempMatrix4x41;\n\t\t\tvar transform=owner.transform.worldMatrix;\n\t\t\tMatrix4x4.multiply(rootInvertMat,transform,result);\n\t\t\t}else {\n\t\t\tresult=owner.transform.worldMatrix;\n\t\t};\n\t\tvar rotation=SubMesh._tempQuaternion0;\n\t\tresult.decomposeTransRotScale(SubMesh._tempVector30,rotation,SubMesh._tempVector31);\n\t\tfor (i=0,n=bakedVertexes.length / bakedVertexFloatCount;i < n;i++){\n\t\t\tvar posOffset=i *bakedVertexFloatCount+positionOffset;\n\t\t\tvar norOffset=i *bakedVertexFloatCount+normalOffset;\n\t\t\tUtils3D.transformVector3ArrayToVector3ArrayCoordinate(bakedVertexes,posOffset,result,bakedVertexes,posOffset);\n\t\t\tUtils3D.transformVector3ArrayByQuat(bakedVertexes,norOffset,rotation,bakedVertexes,norOffset);\n\t\t\tif (lightmapScaleOffset){\n\t\t\t\tvar lightingMapTexOffset=i *bakedVertexFloatCount+lightingMapTexcoordOffset;\n\t\t\t\tif (uv1Element){\n\t\t\t\t\tUtils3D.transformLightingMapTexcoordByUV1Array(bakedVertexes,lightingMapTexOffset,lightmapScaleOffset,bakedVertexes,lightingMapTexOffset);\n\t\t\t\t\t}else {\n\t\t\t\t\tvar tex0Offset=i *oriVertexFloatCount+uv0Offset;\n\t\t\t\t\tUtils3D.transformLightingMapTexcoordByUV0Array(oriVertexes,tex0Offset,lightmapScaleOffset,bakedVertexes,lightingMapTexOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn bakedVertexes;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getVertexBuffers=function(){\n\t\treturn null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._beforeRender=function(state){\n\t\tthis._vertexBuffer._bind();\n\t\tthis._indexBuffer._bind();\n\t\treturn true;\n\t}\n\n\t/**\n\t*@private\n\t*渲染。\n\t*@param state 渲染状态。\n\t*/\n\t__proto._render=function(state){\n\t\tvar skinAnimationDatas;\n\t\tvar indexCount=0;\n\t\tvar renderElement=state.renderElement;\n\t\tif (this._indexCount > 1){\n\t\t\tvar boneIndicesListCount=this._boneIndicesList.length;\n\t\t\tif (boneIndicesListCount > 1){\n\t\t\t\tfor (var i=0;i < boneIndicesListCount;i++){\n\t\t\t\t\tskinAnimationDatas=renderElement._skinAnimationDatas || this._skinAnimationDatas;\n\t\t\t\t\tif (skinAnimationDatas){\n\t\t\t\t\t\trenderElement._shaderValue.setValue(/*laya.d3.core.SkinnedMeshSprite3D.BONES*/0,skinAnimationDatas[i]);\n\t\t\t\t\t\tstate._shader.uploadRenderElementUniforms(renderElement._shaderValue.data);\n\t\t\t\t\t}\n\t\t\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._subIndexBufferCount[i],/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._subIndexBufferStart[i] *2);\n\t\t\t\t}\n\t\t\t\tStat.drawCall+=boneIndicesListCount;\n\t\t\t\t}else {\n\t\t\t\tskinAnimationDatas=renderElement._skinAnimationDatas || this._skinAnimationDatas;\n\t\t\t\tif (skinAnimationDatas){\n\t\t\t\t\trenderElement._shaderValue.setValue(/*laya.d3.core.SkinnedMeshSprite3D.BONES*/0,skinAnimationDatas[0]);\n\t\t\t\t\tstate._shader.uploadRenderElementUniforms(renderElement._shaderValue.data);\n\t\t\t\t}\n\t\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._indexCount,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._indexStart *2);\n\t\t\t\tStat.drawCall++;\n\t\t\t}\n\t\t\tindexCount=this._indexCount;\n\t\t\t}else {\n\t\t\tindexCount=this._indexBuffer.indexCount;\n\t\t\tskinAnimationDatas=renderElement._skinAnimationDatas || this._skinAnimationDatas;\n\t\t\tif (skinAnimationDatas){\n\t\t\t\trenderElement._shaderValue.setValue(/*laya.d3.core.SkinnedMeshSprite3D.BONES*/0,skinAnimationDatas[0]);\n\t\t\t\tstate._shader.uploadRenderElementUniforms(renderElement._shaderValue.data);\n\t\t\t}\n\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,indexCount,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\t\tStat.drawCall++;\n\t\t}\n\t\tStat.trianglesFaces+=indexCount / 3;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.getIndices=function(){\n\t\tif (this._indexCount > 0)\n\t\t\treturn this._indices;\n\t\telse\n\t\treturn this._indexBuffer.getData();\n\t}\n\n\t/**\n\t*<p>彻底清理资源。</p>\n\t*<p><b>注意：</b>会强制解锁清理。</p>\n\t*/\n\t__proto.dispose=function(){\n\t\tthis._indexBuffer.destroy();\n\t\tthis._vertexBuffer.destroy();\n\t\tthis._mesh=null;\n\t\tthis._boneIndicesList=null;\n\t\tthis._subIndexBufferStart=null;\n\t\tthis._subIndexBufferCount=null;\n\t\tthis._skinAnimationDatas=null;\n\t\tthis._bufferUsage=null;\n\t\tthis._vertexBuffer=null;\n\t\tthis._indexBuffer=null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn 1;\n\t});\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn this._indexBuffer.indexCount / 3;\n\t});\n\n\t__static(SubMesh,\n\t['_tempVector30',function(){return this._tempVector30=new Vector3();},'_tempVector31',function(){return this._tempVector31=new Vector3();},'_tempQuaternion0',function(){return this._tempQuaternion0=new Quaternion();},'_tempMatrix4x40',function(){return this._tempMatrix4x40=new Matrix4x4();},'_tempMatrix4x41',function(){return this._tempMatrix4x41=new Matrix4x4();}\n\t]);\n\treturn SubMesh;\n})()\n\n\n/**\n*@private\n*/\n//class laya.d3.shader.ShaderDefines\nvar ShaderDefines$1=(function(){\n\tfunction ShaderDefines(shaderdefines){\n\t\t/**@private [只读]*/\n\t\tthis.defineCounter=0;\n\t\t/**@private [只读]*/\n\t\tthis.defines=null;\n\t\tif (shaderdefines){\n\t\t\tthis.defineCounter=shaderdefines.defineCounter;\n\t\t\tthis.defines=shaderdefines.defines.slice();\n\t\t\t}else {\n\t\t\tthis.defineCounter=0;\n\t\t\tthis.defines=[];\n\t\t}\n\t}\n\n\t__class(ShaderDefines,'laya.d3.shader.ShaderDefines',null,'ShaderDefines$1');\n\tvar __proto=ShaderDefines.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto.registerDefine=function(name){\n\t\tvar value=Math.pow(2,this.defineCounter++);\n\t\tthis.defines[value]=name;\n\t\treturn value;\n\t}\n\n\treturn ShaderDefines;\n})()\n\n\n/**\n*@private\n*<code>ShaderInit</code> 类用于初始化内置Shader。\n*/\n//class laya.d3.shader.ShaderInit3D\nvar ShaderInit3D=(function(){\n\t/**\n\t*创建一个 <code>ShaderInit</code> 实例。\n\t*/\n\tfunction ShaderInit3D(){}\n\t__class(ShaderInit3D,'laya.d3.shader.ShaderInit3D');\n\tShaderInit3D.__init__=function(){\n\t\tShaderCompile3D._globalRegDefine(\"HIGHPRECISION\",ShaderCompile3D.SHADERDEFINE_HIGHPRECISION);\n\t\tShaderCompile3D._globalRegDefine(\"FOG\",ShaderCompile3D.SHADERDEFINE_FOG);\n\t\tShaderCompile3D._globalRegDefine(\"DIRECTIONLIGHT\",ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t\tShaderCompile3D._globalRegDefine(\"POINTLIGHT\",ShaderCompile3D.SHADERDEFINE_POINTLIGHT);\n\t\tShaderCompile3D._globalRegDefine(\"SPOTLIGHT\",ShaderCompile3D.SHADERDEFINE_SPOTLIGHT);\n\t\tShaderCompile3D._globalRegDefine(\"UV\",ShaderCompile3D.SHADERDEFINE_UV0);\n\t\tShaderCompile3D._globalRegDefine(\"COLOR\",ShaderCompile3D.SHADERDEFINE_COLOR);\n\t\tShaderCompile3D._globalRegDefine(\"UV1\",ShaderCompile3D.SHADERDEFINE_UV1);\n\t\tShaderCompile3D._globalRegDefine(\"CASTSHADOW\",ParallelSplitShadowMap.SHADERDEFINE_CAST_SHADOW);\n\t\tShaderCompile3D._globalRegDefine(\"SHADOWMAP_PSSM1\",ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM1);\n\t\tShaderCompile3D._globalRegDefine(\"SHADOWMAP_PSSM2\",ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM2);\n\t\tShaderCompile3D._globalRegDefine(\"SHADOWMAP_PSSM3\",ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM3);\n\t\tShaderCompile3D._globalRegDefine(\"SHADOWMAP_PCF_NO\",ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF_NO);\n\t\tShaderCompile3D._globalRegDefine(\"SHADOWMAP_PCF1\",ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF1);\n\t\tShaderCompile3D._globalRegDefine(\"SHADOWMAP_PCF2\",ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF2);\n\t\tShaderCompile3D._globalRegDefine(\"SHADOWMAP_PCF3\",ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF3);\n\t\tShaderCompile3D._globalRegDefine(\"DEPTHFOG\",ShaderCompile3D.SAHDERDEFINE_DEPTHFOG);\n\t\tShader3D.addInclude(\"LightHelper.glsl\",\"\\nstruct DirectionLight\\n{\\n vec3 Direction;\\n vec3 Diffuse;\\n};\\n\\nstruct PointLight\\n{\\n vec3 Diffuse;\\n vec3 Attenuation;\\n vec3 Position;\\n float Range;\\n};\\n\\nstruct SpotLight\\n{\\n vec3 Diffuse;\\n vec3 Attenuation;\\n vec3 Position;\\n vec3 Direction;\\n float Spot;\\n float Range;\\n};\\n\\n\\nvec3 NormalSampleToWorldSpace(vec3 normalMapSample, vec3 unitNormal, vec3 tangent)\\n{\\n\tvec3 normalT = 2.0*normalMapSample - 1.0;\\n\\n\t// Build orthonormal basis.\\n\tvec3 N = normalize(unitNormal);\\n\tvec3 T = normalize(tangent- dot(tangent, N)*N);\\n\tvec3 B = cross(T, N);\\n\\n\tmat3 TBN = mat3(T, B, N);\\n\\n\t// Transform from tangent space to world space.\\n\tvec3 bumpedNormal = TBN*normalT;\\n\\n\treturn bumpedNormal;\\n}\\n\\n\\nvoid  computeDirectionLight(in vec3 matDif,in vec3 matAmb,in vec4 matSpe,in DirectionLight dirLight,in vec3 ambinentColor,in vec3 normal,in vec3 toEye,out vec3 dif,out vec3 amb,out vec3 spec)\\n{\\n\tdif=vec3(0.0);//不初始化在IOS中闪烁，PC中不会闪烁\\n\tamb=vec3(0.0);\\n\tspec=vec3(0.0);\\n\tvec3 lightVec=-normalize(dirLight.Direction);\\n\t\\n\tamb=matAmb*ambinentColor;\\n\t\\n\tfloat  diffuseFactor=dot(lightVec, normal);\\n\t\\n\tif(diffuseFactor>0.0)\\n\t{\\n\t   vec3 v = reflect(-lightVec, normal);\\n\t   float specFactor = pow(max(dot(v, toEye), 0.0), matSpe.w);\\n\t   \\n\t   dif = diffuseFactor * matDif * dirLight.Diffuse;\\n\t   spec = specFactor * matSpe.rgb;\\n\t}\\n\t\\n}\\n\\nvoid computePointLight(in vec3 matDif,in vec3 matAmb,in vec4 matSpe,in PointLight poiLight,in vec3 ambinentColor, in vec3 pos,in vec3 normal,in vec3 toEye,out vec3 dif,out vec3 amb,out vec3 spec)\\n{\\n\tdif=vec3(0.0);\\n\tamb=vec3(0.0);\\n\tspec=vec3(0.0);\\n\tvec3 lightVec = poiLight.Position - pos;\\n\t\t\\n\tfloat d = length(lightVec);\\n\t\\n\tif( d > poiLight.Range )\\n\t\treturn;\\n\t\t\\n\tlightVec /= d; \\n\t\\n\tamb = matAmb*ambinentColor;\t\\n\\n\tfloat diffuseFactor = dot(lightVec, normal);\\n\\n\tif( diffuseFactor > 0.0 )\\n\t{\\n\t\tvec3 v= reflect(-lightVec, normal);\\n\t\tfloat specFactor = pow(max(dot(v, toEye), 0.0), matSpe.w);\\n\t\t\t\t\t\\n\t\tdif = diffuseFactor * matDif * poiLight.Diffuse;\\n\t\tspec = specFactor * matSpe.rgb;\\n\t}\\n\\n\tfloat attenuate = 1.0 / dot(poiLight.Attenuation, vec3(1.0, d, d*d));\\n\\n\tdif *= attenuate;\\n\tspec*= attenuate;\\n}\\n\\nvoid ComputeSpotLight(in vec3 matDif,in vec3 matAmb,in vec4 matSpe,in SpotLight spoLight,in vec3 ambinentColor,in vec3 pos, in vec3 normal,in vec3 toEye,out vec3 dif,out vec3 amb,out vec3 spec)\\n{\\n\tamb = vec3(0.0);\\n\tdif =vec3(0.0);\\n\tspec= vec3(0.0);\\n\tvec3 lightVec = spoLight.Position - pos;\\n\t\t\\n\tfloat d = length(lightVec);\\n\t\\n\tif( d > spoLight.Range)\\n\t\treturn;\\n\t\t\\n\tlightVec /= d; \\n\t\\n\tamb = matAmb*ambinentColor;\t\\n\\n\tfloat diffuseFactor = dot(lightVec, normal);\\n\\n\tif(diffuseFactor > 0.0)\\n\t{\\n\t\tvec3 v= reflect(-lightVec, normal);\\n\t\tfloat specFactor = pow(max(dot(v, toEye), 0.0), matSpe.w);\\n\t\t\t\t\t\\n\t\tdif = diffuseFactor * matDif * spoLight.Diffuse;\\n\t\tspec = specFactor * matSpe.rgb;\\n\t}\\n\t\\n\tfloat spot = pow(max(dot(-lightVec, normalize(spoLight.Direction)), 0.0), spoLight.Spot);\\n\\n\tfloat attenuate = spot/dot(spoLight.Attenuation, vec3(1.0, d, d*d));\\n\\n\tamb *= spot;\\n\tdif *= attenuate;\\n\tspec*= attenuate;\\n}\\n\\n\");\n\t\tShader3D.addInclude(\"Lighting.glsl\",\"\\nstruct DirectionLight\\n{\\n\tvec3 Color;\\n\tvec3 Direction;\\n};\\n\\nstruct PointLight\\n{\\n\tvec3 Color;\\n\tvec3 Position;\\n\tfloat Range;\\n};\\n\\nstruct SpotLight\\n{\\n\tvec3 Color;\\n\tvec3 Position;\\n\tvec3 Direction;\\n\tfloat Spot;\\n\tfloat Range;\\n};\\n\\n// U3D中使用衰减纹理,此函数模拟并非正确\\n//float U3DAttenuation(in vec3 L,in float invLightRadius)\\n//{\\n//\tfloat fRatio = clamp(length(L) * invLightRadius,0.0,1.0);\\n//\tfRatio *= fRatio;\\n//\treturn 1.0 / (1.0 + 25.0 * fRatio)* clamp(4.0*(1.0 - fRatio),0.0,1.0); //fade to black as if 4 pixel texture\\n//} \\n\\n// Same as Just Cause 2 and Crysis 2 (you can read GPU Pro 1 book for more information)\\nfloat BasicAttenuation(in vec3 L,in float invLightRadius)\\n{\\n\tvec3 distance = L * invLightRadius;\\n\tfloat attenuation = clamp(1.0 - dot(distance, distance),0.0,1.0); // Equals float attenuation = saturate(1.0f - dot(L, L) / (lightRadius *  lightRadius)); \t\\n\treturn attenuation * attenuation;\\n} \\n\\n// Inspired on http://fools.slindev.com/viewtopic.php?f=11&t=21&view=unread#unread\t\\nfloat NaturalAttenuation(in vec3 L,in float invLightRadius)\\n{\\n\tfloat attenuationFactor = 30.0;\\n\tvec3 distance = L * invLightRadius;\\n\tfloat attenuation = dot(distance, distance); // Equals float attenuation = dot(L, L) / (lightRadius *  lightRadius);\\n\tattenuation = 1.0 / (attenuation * attenuationFactor + 1.0);\\n\t// Second we move down the function therewith it reaches zero at abscissa 1:\\n\tattenuationFactor = 1.0 / (attenuationFactor + 1.0); //attenuationFactor contains now the value we have to subtract\\n\tattenuation = max(attenuation - attenuationFactor, 0.0); // The max fixes a bug.\\n\t// Finally we expand the equation along the y-axis so that it starts with a function value of 1 again.\\n\tattenuation /= 1.0 - attenuationFactor;\\n\treturn attenuation;\\n} \\n\\nvoid LayaAirBlinnPhongLight (in vec3 specColor,in float specColorIntensity,in vec3 normal,in vec3 gloss, in vec3 viewDir,in vec3 lightColor, in vec3 lightVec,out vec3 diffuseColor,out vec3 specularColor)\\n{\\n    mediump vec3 h = normalize(viewDir-lightVec);\\n    lowp float ln = max (0.0, dot (-lightVec,normal));\\n    float nh = max (0.0, dot (h,normal));\\n\tdiffuseColor=lightColor * ln;\\n\tspecularColor=lightColor *specColor*pow (nh, specColorIntensity*128.0) * gloss;\\n}\\n\\nvoid LayaAirBlinnPhongDiectionLight (in vec3 specColor,in float specColorIntensity,in vec3 normal,in vec3 gloss, in vec3 viewDir, in DirectionLight light,out vec3 diffuseColor,out vec3 specularColor)\\n{\\n\tvec3 lightVec=normalize(light.Direction);\\n\tLayaAirBlinnPhongLight(specColor,specColorIntensity,normal,gloss,viewDir,light.Color,lightVec,diffuseColor,specularColor);\\n}\\n\\nvoid LayaAirBlinnPhongPointLight (in vec3 pos,in vec3 specColor,in float specColorIntensity,in vec3 normal,in vec3 gloss, in vec3 viewDir, in PointLight light,out vec3 diffuseColor,out vec3 specularColor)\\n{\\n\tvec3 lightVec =  pos-light.Position;\\n\t//if( length(lightVec) > light.Range )\\n\t//\treturn;\\n\tLayaAirBlinnPhongLight(specColor,specColorIntensity,normal,gloss,viewDir,light.Color,lightVec/length(lightVec),diffuseColor,specularColor);\\n\tfloat attenuate = BasicAttenuation(lightVec, 1.0/light.Range);\\n\tdiffuseColor *= attenuate;\\n\tspecularColor*= attenuate;\\n}\\n\\nvoid LayaAirBlinnPhongSpotLight (in vec3 pos,in vec3 specColor,in float specColorIntensity,in vec3 normal,in vec3 gloss, in vec3 viewDir, in SpotLight light,out vec3 diffuseColor,out vec3 specularColor)\\n{\\n\tvec3 lightVec =  pos-light.Position;\\n\t//if( length(lightVec) > light.Range )\\n\t//\treturn;\\n\tvec3 normalLightVec=lightVec/length(lightVec);\\n\tLayaAirBlinnPhongLight(specColor,specColorIntensity,normal,gloss,viewDir,light.Color,normalLightVec,diffuseColor,specularColor);\\n\tfloat spot = pow(max(dot(normalLightVec, normalize(light.Direction)), 0.0), light.Spot);\\n\tfloat attenuate = spot*BasicAttenuation(lightVec, 1.0/light.Range);\\n\tdiffuseColor *= attenuate;\\n\tspecularColor*= attenuate;\\n}\\n\\nvec3 NormalSampleToWorldSpace(vec3 normalMapSample, vec3 unitNormal, vec3 tangent,vec3 binormal)\\n{\\n\tvec3 normalT =vec3(2.0*normalMapSample.x - 1.0,1.0-2.0*normalMapSample.y,2.0*normalMapSample.z - 1.0);\\n\t\\n\t// Build orthonormal basis.\\n\tvec3 N = normalize(unitNormal);\\n\tvec3 T = normalize(tangent);\\n\tvec3 B = normalize(binormal);\\n\tmat3 TBN = mat3(T, B, N);\\n\t\\n\t// Transform from tangent space to world space.\\n\tvec3 bumpedNormal = TBN*normalT;\\n\\n\treturn bumpedNormal;\\n}\\n\\n\\n\");\n\t\tShader3D.addInclude(\"ShadowHelper.glsl\",\"uniform sampler2D u_shadowMap1;\\nuniform sampler2D u_shadowMap2;\\nuniform sampler2D u_shadowMap3;\\nuniform vec2\t  u_shadowPCFoffset;\\nuniform vec3     u_shadowPSSMDistance;\\nvec4 packDepth(const in float depth)\\n{\\n\tconst vec4 bitShift = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);\\n\tconst vec4 bitMask\t= vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);\\n\tvec4 res = mod(depth*bitShift*vec4(255), vec4(256))/vec4(255);\\n\tres -= res.xxyz * bitMask;\\n\treturn res;\\n}\\nfloat unpackDepth(const in vec4 rgbaDepth)\\n{\\n\tconst vec4 bitShift = vec4(1.0/(256.0*256.0*256.0), 1.0/(256.0*256.0), 1.0/256.0, 1.0);\\n\tfloat depth = dot(rgbaDepth, bitShift);\\n\treturn depth;\\n}\\nfloat tex2DPCF( sampler2D shadowMap,vec2 texcoord,vec2 invsize,float zRef )\\n{\\n\tvec2 texelpos =texcoord / invsize;\\n\tvec2 lerps = fract( texelpos );\\n\tfloat sourcevals[4];\\n\tsourcevals[0] = float( unpackDepth(texture2D(shadowMap,texcoord)) > zRef );\\n\tsourcevals[1] = float( unpackDepth(texture2D(shadowMap,texcoord + vec2(invsize.x,0))) > zRef );\\n\tsourcevals[2] = float( unpackDepth(texture2D(shadowMap,texcoord + vec2(0,invsize.y))) > zRef );\\n\tsourcevals[3] = float( unpackDepth(texture2D(shadowMap,texcoord + vec2(invsize.x, invsize.y) )) > zRef );\\n\treturn mix( mix(sourcevals[0],sourcevals[2],lerps.y),mix(sourcevals[1],sourcevals[3],lerps.y),lerps.x );\\n}\\nfloat getShadowPSSM3( sampler2D shadowMap1,sampler2D shadowMap2,sampler2D shadowMap3,mat4 lightShadowVP[4],vec3 pssmDistance,vec2 shadowPCFOffset,vec3 worldPos,float posViewZ,float zBias )\\n{\\n\tfloat value = 1.0;\\n\tint nPSNum = int(posViewZ>pssmDistance.x);\\n\tnPSNum += int(posViewZ>pssmDistance.y);\\n\tnPSNum += int(posViewZ>pssmDistance.z);\\n\t//真SB,webgl不支持在PS中直接访问数组\\n\tmat4 lightVP;\\n\tif( nPSNum == 0 )\\n\t{\\n\t\tlightVP = lightShadowVP[1];\\n\t}\\n\telse if( nPSNum == 1 )\\n\t{\\n\t\tlightVP = lightShadowVP[2];\\n\t}\\n\telse if( nPSNum == 2 )\\n\t{\\n\t\tlightVP = lightShadowVP[3];\\n\t}\\n\tvec4 vLightMVPPos = lightVP * vec4(worldPos,1.0);\\n\t//为了效率，在CPU计算/2.0 + 0.5\\n\t//vec3 vText = (vLightMVPPos.xyz / vLightMVPPos.w)/2.0 + 0.5;\\n\tvec3 vText = vLightMVPPos.xyz / vLightMVPPos.w;\\n\tfloat fMyZ = vText.z - zBias;\\n\t/*\\n\tbvec4 bInFrustumVec = bvec4 ( vText.x >= 0.0, vText.x <= 1.0, vText.y >= 0.0, vText.y <= 1.0 );\\n\tbool bInFrustum = all( bInFrustumVec );\\n\tbvec2 bFrustumTestVec = bvec2( bInFrustum, fMyZ <= 1.0 );\\n\tbool bFrustumTest = all( bFrustumTestVec );\\n\tif ( bFrustumTest ) \\n\t*/\\n\tif( fMyZ <= 1.0 )\\n\t{\\n\t\tfloat zdepth=0.0;\\n#ifdef SHADOWMAP_PCF3\\n\t\tif ( nPSNum == 0 )\\n\t\t{\\n\t\t\tvalue =  tex2DPCF( shadowMap1, vText.xy,shadowPCFOffset,fMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(shadowPCFOffset.xy),shadowPCFOffset,\tfMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(shadowPCFOffset.x,0),shadowPCFOffset,\tfMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(0,shadowPCFOffset.y),shadowPCFOffset,\tfMyZ );\\n\t\t\tvalue = value/4.0;\\n\t\t} \\n\t\telse if( nPSNum == 1 )\\n\t\t{\\n\t\t\tvalue = tex2DPCF( shadowMap2,vText.xy,shadowPCFOffset,fMyZ);\\n\t\t}\\n\t\telse if( nPSNum == 2 )\\n\t\t{\\n\t\t\tvec4 color = texture2D( shadowMap3,vText.xy );\\n\t\t\tzdepth = unpackDepth(color);\\n\t\t\tvalue = float(fMyZ < zdepth);\\n\t\t}\\n#endif\\n#ifdef SHADOWMAP_PCF2\\n\t\tif ( nPSNum == 0 )\\n\t\t{\\n\t\t\tvalue = tex2DPCF( shadowMap1,vText.xy,shadowPCFOffset,fMyZ);\\n\t\t}\\n\t\telse if( nPSNum == 1 )\\n\t\t{\\n\t\t\tvalue = tex2DPCF( shadowMap2,vText.xy,shadowPCFOffset,fMyZ);\\n\t\t}\\n\t\telse if( nPSNum == 2 )\\n\t\t{\\n\t\t\tvec4 color = texture2D( shadowMap3,vText.xy );\\n\t\t\tzdepth = unpackDepth(color);\\n\t\t\tvalue = float(fMyZ < zdepth);\\n\t\t}\\n\\n#endif\\n#ifdef SHADOWMAP_PCF1\\n\t\tif ( nPSNum == 0 )\\n\t\t{\\n\t\t\tvalue = tex2DPCF( shadowMap1,vText.xy,shadowPCFOffset,fMyZ);\\n\t\t}\\n\t\telse if( nPSNum == 1 )\\n\t\t{\\n\t\t\tvec4 color = texture2D( shadowMap2,vText.xy );\\n\t\t\tzdepth = unpackDepth(color);\\n\t\t\tvalue = float(fMyZ < zdepth);\\n\t\t}\\n\t\telse if( nPSNum == 2 )\\n\t\t{\\n\t\t\tvec4 color = texture2D( shadowMap3,vText.xy );\\n\t\t\tzdepth = unpackDepth(color);\\n\t\t\tvalue = float(fMyZ < zdepth);\\n\t\t}\\n#endif\\n#ifdef SHADOWMAP_PCF_NO\\n\t\tvec4 color;\\n\t\tif ( nPSNum == 0 )\\n\t\t{\\n\t\t\tcolor = texture2D( shadowMap1,vText.xy );\\n\t\t}\\n\t\telse if( nPSNum == 1 )\\n\t\t{\\n\t\t\tcolor = texture2D( shadowMap2,vText.xy );\\n\t\t}\\n\t\telse if( nPSNum == 2 )\\n\t\t{\\n\t\t\tcolor = texture2D( shadowMap3,vText.xy );\\n\t\t}\\n\t\tzdepth = unpackDepth(color);\\n\t\tvalue = float(fMyZ < zdepth);\\n#endif\\n\t}\\n\treturn value;\\n}\\nfloat getShadowPSSM2( sampler2D shadowMap1,sampler2D shadowMap2,mat4 lightShadowVP[4],vec3 pssmDistance,vec2 shadowPCFOffset,vec3 worldPos,float posViewZ,float zBias )\\n{\\n\tfloat value = 1.0;\\n\tint nPSNum = int(posViewZ>pssmDistance.x);\\n\tnPSNum += int(posViewZ>pssmDistance.y);\\n\t//真SB,webgl不支持在PS中直接访问数组\\n\tmat4 lightVP;\\n\tif( nPSNum == 0 )\\n\t{\\n\t\tlightVP = lightShadowVP[1];\\n\t}\\n\telse if( nPSNum == 1 )\\n\t{\\n\t\tlightVP = lightShadowVP[2];\\n\t}\\n\tvec4 vLightMVPPos = lightVP * vec4(worldPos,1.0);\\n\t//为了效率，在CPU计算/2.0 + 0.5\\n\t//vec3 vText = (vLightMVPPos.xyz / vLightMVPPos.w)/2.0 + 0.5;\\n\tvec3 vText = vLightMVPPos.xyz / vLightMVPPos.w;\\n\tfloat fMyZ = vText.z - zBias;\\n\t/*\\n\tbvec4 bInFrustumVec = bvec4 ( vText.x >= 0.0, vText.x <= 1.0, vText.y >= 0.0, vText.y <= 1.0 );\\n\tbool bInFrustum = all( bInFrustumVec );\\n\tbvec2 bFrustumTestVec = bvec2( bInFrustum, fMyZ <= 1.0 );\\n\tbool bFrustumTest = all( bFrustumTestVec );\\n\tif ( bFrustumTest ) \\n\t*/\\n\tif( fMyZ <= 1.0 )\\n\t{\\n\t\tfloat zdepth=0.0;\\n#ifdef SHADOWMAP_PCF3\\n\t\tif ( nPSNum == 0 )\\n\t\t{\\n\t\t\tvalue =  tex2DPCF( shadowMap1, vText.xy,shadowPCFOffset,fMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(shadowPCFOffset.xy),shadowPCFOffset,\tfMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(shadowPCFOffset.x,0),shadowPCFOffset,\tfMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(0,shadowPCFOffset.y),shadowPCFOffset,\tfMyZ );\\n\t\t\tvalue = value/4.0;\\n\t\t}\\n\t\telse if( nPSNum == 1 )\\n\t\t{\\n\t\t\tvalue = tex2DPCF( shadowMap2,vText.xy,shadowPCFOffset,fMyZ);\\n\t\t}\\n#endif\\n#ifdef SHADOWMAP_PCF2\\n\t\tif ( nPSNum == 0 )\\n\t\t{\\n\t\t\tvalue = tex2DPCF( shadowMap1,vText.xy,shadowPCFOffset,fMyZ);\\n\t\t}\\n\t\telse if( nPSNum == 1 )\\n\t\t{\\n\t\t\tvalue = tex2DPCF( shadowMap2,vText.xy,shadowPCFOffset,fMyZ);\\n\t\t}\\n#endif\\n#ifdef SHADOWMAP_PCF1\\n\t\tif ( nPSNum == 0 )\\n\t\t{\\n\t\t\tvalue = tex2DPCF( shadowMap1,vText.xy,shadowPCFOffset,fMyZ);\\n\t\t}\\n\t\telse if( nPSNum == 1 )\\n\t\t{\\n\t\t\tvec4 color = texture2D( shadowMap2,vText.xy );\\n\t\t\tzdepth = unpackDepth(color);\\n\t\t\tvalue = float(fMyZ < zdepth);\\n\t\t}\\n#endif\\n#ifdef SHADOWMAP_PCF_NO\\n\t\tvec4 color;\\n\t\tif ( nPSNum == 0 )\\n\t\t{\\n\t\t\tcolor = texture2D( shadowMap1,vText.xy );\\n\t\t}\\n\t\telse if( nPSNum == 1 )\\n\t\t{\\n\t\t\tcolor = texture2D( shadowMap2,vText.xy );\\n\t\t}\\n\t\tzdepth = unpackDepth(color);\\n\t\tvalue = float(fMyZ < zdepth);\\n#endif\\n\t}\\n\treturn value;\\n}\\nfloat getShadowPSSM1( sampler2D shadowMap1,vec4 lightMVPPos,vec3 pssmDistance,vec2 shadowPCFOffset,float posViewZ,float zBias )\\n{\\n\tfloat value = 1.0;\\n\tif( posViewZ < pssmDistance.x )\\n\t{\\n\t\tvec3 vText = lightMVPPos.xyz / lightMVPPos.w;\\n\t\tfloat fMyZ = vText.z - zBias;\\n\t\t/*\\n\t\tbvec4 bInFrustumVec = bvec4 ( vText.x >= 0.0, vText.x <= 1.0, vText.y >= 0.0, vText.y <= 1.0 );\\n\t\tbool bInFrustum = all( bInFrustumVec );\\n\t\tbvec2 bFrustumTestVec = bvec2( bInFrustum, fMyZ <= 1.0 );\\n\t\tbool bFrustumTest = all( bFrustumTestVec );\\n\t\t*/\\n\t\tif ( fMyZ <= 1.0 ) \\n\t\t{\\n\t\t\tfloat zdepth=0.0;\\n#ifdef SHADOWMAP_PCF3\\n\t\t\tvalue =  tex2DPCF( shadowMap1, vText.xy,shadowPCFOffset,fMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(shadowPCFOffset.xy),shadowPCFOffset,fMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(shadowPCFOffset.x,0),shadowPCFOffset,fMyZ );\\n\t\t\tvalue += tex2DPCF( shadowMap1, vText.xy+vec2(0,shadowPCFOffset.y),shadowPCFOffset,fMyZ );\\n\t\t\tvalue = value/4.0;\\n#endif\\n#ifdef SHADOWMAP_PCF2\t\t\\n\t\t\tvalue = tex2DPCF( shadowMap1,vText.xy,shadowPCFOffset,fMyZ);\\n#endif\\n#ifdef SHADOWMAP_PCF1\\n\t\t\tvalue = tex2DPCF( shadowMap1,vText.xy,shadowPCFOffset,fMyZ);\\n#endif\\n#ifdef SHADOWMAP_PCF_NO\t\t\\n\t\t\tvec4 color = texture2D( shadowMap1,vText.xy );\\n\t\t\tzdepth = unpackDepth(color);\\n\t\t\tvalue = float(fMyZ < zdepth);\\n#endif\\n\t\t}\\n\t}\\n\treturn value;\\n}\");\n\t\tShader3D.addInclude(\"WaveFunction.glsl\",\"\\nuniform vec2 u_WaveInfoD[20];\\nuniform vec4 u_WaveInfo[20];\\n\\nuniform float TEXWAVE_UV_SCALE ;//= 20.0; //每texwidth像素代表的实际距离\\n/**\\n\t这里的计算都是\\n*/\\n\\n/**\\n* 计算一个波形\\n*  开始计算的时候都按照z向上，最后输出的时候，颠倒一下。\\n* @param tm {float} 毫秒\\n*/\\nvoid calcGerstnerWave(float curtm, vec3 pos, float deep, vec2 uvpos, out vec3 opos, out vec3 B, out vec3 T, out vec3 N, out float foamS){\\n\tfloat tm = curtm/1000.;\\n\topos = pos;\\n\tvec3 wpos=vec3(0.);\t\t//累加的位置\\n\tN=vec3(0.,0.,0.);\t//输出的法线初始化一下\\n\tT=vec3(0.,0.,0.);\\n\tB=vec3(0.,0.,0.);\\n\tvec2 cD ;//= D;\\n\t//float deepAtt = max(0.,min(deep,1.0));\\n\t//A*=deepAtt; //TODO\\n\t\\n\tfor( int i=0; i<4; i++){\\n\t\tcD = u_WaveInfoD[i];//vec2(wi.winfo[0],wi.winfo[1]);// wi.vDir;\\n\t\tfloat Q = u_WaveInfo[i].x;//wi.QorK;\\n\t\tfloat A = u_WaveInfo[i].y;//wi.A;\\n\t\tfloat W = u_WaveInfo[i].z;//wi.omega;\\n\t\tfloat P = u_WaveInfo[i].w;//wi.phi;\\n\t\tfloat dop = dot(cD,uvpos);\\n\t\tfloat c = cos(dop*W - tm*P);//TODO 优化\\n\t\tfloat s = sin(dop*W - tm*P);\\n\t\tfloat AWs = A*W*s;\\n\t\tfloat AWc = A*W*c;\\n\t\tfloat _QxyAWs = -Q*cD.x*cD.y*AWs;\\n\t\t\\n\t\twpos += vec3(Q*A*cD.x*c,\\n\t\t\t\t\tQ*A*cD.y*c,\\n\t\t\t\t\tA*s);\\n\t\tN += vec3(-cD.x*AWc,\\n\t\t\t\t-cD.y*AWc,\\n\t\t\t\tQ*AWs);//记得最后1-\\n\t\tT += vec3(_QxyAWs,\\n\t\t\t\tQ*cD.y*cD.y*AWs,//记得1-\\n\t\t\t\tcD.y*AWc\\n\t\t\t);\\n\t\tB += vec3(Q*cD.x*cD.x*AWs,//记得1-\\n\t\t\t\t_QxyAWs,\\n\t\t\t\tcD.x*AWc\\n\t\t\t);\\n\t\t//float v1 = exp(-tan((dop*W - tm*P)/2.+1.07));//除2，+pi/2 这样正好能对齐\\n#ifdef USE_FOAM\t\t\\n\t\tfloat v1 = 0.5-sin((dop*W - tm*P)/1.+2.0)/2.;\\n\t\tfoamS += pow(v1,9.)/4.;\\n#endif\\n\t}\\n\tT.y=1.-T.y; B.x=1.-B.x;N.z=1.-N.z;\\n\topos += vec3(wpos.x,wpos.z*min(deep/10.,1.),wpos.y);\\n\t//y和z交换一下。现在根据uv计算的位置，所以直接交换yz就行。其他情况下有问题么\\n\tT.xyz=T.xzy;\\n\tB.xyz=B.xzy;\\n\tN.xyz=N.xzy;\\n}\\n\\n\\nvoid calcWave(float curtm, vec2 uv, out vec3 B, out vec3 T, out vec3 N){\\n\tfloat tm = curtm/1000.;\\n\tN=vec3(0.,0.,0.);\t//输出的法线初始化一下\\n\tvec2 uvpos = uv*TEXWAVE_UV_SCALE; //TODO 这个范围是什么 就是1？\\n\tuvpos.y*=-1.;\\n\tvec2 cD;// = D;\\n\tconst int NumWaves = 4;\\n\tfloat scale = 1./float(NumWaves);\\n\tfor( int i=0; i<NumWaves; i++){\\n\t\tcD = u_WaveInfoD[i];//vec2(wi.winfo[0],wi.winfo[1]);// wi.vDir;\\n\t\tfloat k = 1.5;//u_WaveInfo[i].x;//wi.QorK; TODO  不知道为什么，这个取u_WaveInfo[i].x，在mi3w上就会闪。测试发现实际值也传过来了，就是1.5\\n\t\tfloat A = u_WaveInfo[i].y;//wi.A;\\n\t\tfloat W = u_WaveInfo[i].z;//wi.omega;\\n\t\tfloat P = u_WaveInfo[i].w;//wi.phi;\\n\t\t\\n\t\tfloat dop = dot(cD,uvpos);\\n\t\tfloat c = cos(dop*W - tm*P);//TODO 优化\\n\t\tfloat s = sin(dop*W - tm*P);\\n\t\t/*\\n\t\tfloat AWs = A*W*s;\\n\t\tfloat AWc = A*W*c;\\n\t\tfloat _QxyAWs = -Q*cD.x*cD.y*AWs;\\n\t\t\\n\t\tN += vec3(-cD.x*AWc,\\n\t\t\t\t-cD.y*AWc,\\n\t\t\t\tQ*AWs);//记得最后1-\\n\t\t*/\\n\t\tfloat kWAc = scale*c;//k*W*A*c;  为了提高精度，这里只保留sin，cos部分，实际使用的时候再乘回来。\\n\t\t//float kWAc = k*W*A*c;  \\n\t\tN += vec3(\\n\t\t\t-kWAc*cD.x*pow((s+1.)/2.,k-1.),\\n\t\t\t-kWAc*cD.y*pow((s+1.)/2.,k-1.),\\n\t\t\t1.\\n\t\t);\\n\t}\\n\t//N.z=1.-N.z;\\n\t//y和z交换一下。现在根据uv计算的位置，所以直接交换yz就行。其他情况下有问题么\\n\tN.xyz=N.xzy;\\n}\\n\");\n\t\tShader3D.addInclude(\"BRDF.glsl\",\"vec4 LayaAirBRDF(in vec3 diffuseColor, in vec3 specularColor, in float oneMinusReflectivity, in float smoothness, in vec3 normal, in vec3 viewDir, in vec3 lightDir, in vec3 lightColor, in vec3 gi)\\n{\\n\tfloat perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness);\\n\tvec3 halfDir = SafeNormalize(viewDir - lightDir);\\n\t\\n\tfloat nv = abs(dot(normal, viewDir));\\n\t\\n\tfloat nl = clamp(dot(normal,   -lightDir),  0.0, 1.0);\\n\tfloat nh = clamp(dot(normal,     halfDir),  0.0, 1.0);\\n\tfloat lv = clamp(dot(lightDir,   viewDir),  0.0, 1.0);\\n\tfloat lh = clamp(dot(lightDir,  -halfDir),  0.0, 1.0);\\n\t\\n\tfloat diffuseTerm = DisneyDiffuse(nv, nl, lh, perceptualRoughness) * nl;\\n\t\\n\tfloat roughness = PerceptualRoughnessToRoughness(perceptualRoughness);\\n\t\\n\t//#if UNITY_BRDF_GGX\\n\tfloat V = SmithJointGGXVisibilityTerm(nl, nv, roughness);\\n\tfloat D = GGXTerm(nh, roughness);\\n\t\\n\tfloat specularTerm = V * D * PI;\\n\t\\n\tspecularTerm = sqrt(max(0.0001, specularTerm));\\n\tspecularTerm = max(0.0, specularTerm * nl);\\n\t\\n\tvec4 color;\\n\tcolor.rgb = diffuseColor * (gi + lightColor * diffuseTerm) + specularTerm * lightColor * FresnelTerm (specularColor, lh);\\n\t\\n\tcolor.a = 1.0;\\n\treturn color;\\n}\");\n\t\tShader3D.addInclude(\"PBRUtils.glsl\",\"struct DirectionLight\\n{\\n\tvec3 Color;\\n\tvec3 Direction;\\n};\\n\\nvec3 UnpackScaleNormal(in vec2 uv0)\\n{\\n\t#ifdef NORMALTEXTURE\\n\t\tvec3 normalT;\\n\t\tvec4 normalMapSample = texture2D(u_NormalTexture, uv0);\\n\t\tnormalT.x = 2.0 * normalMapSample.x - 1.0;\\n\t\tnormalT.y = 1.0 - 2.0 * normalMapSample.y;\\n\t\tnormalT.xy *= u_normalScale;\\n\t\tnormalT.z = sqrt(1.0 - clamp(dot(normalT.xy, normalT.xy), 0.0, 1.0));\\n\t\t\\n\t\tvec3 T = normalize(v_Tangent);\\n\t\tvec3 B = normalize(v_Binormal);\\n\t\tvec3 N = normalize(v_Normal);\\n\t\tmat3 TBN = mat3(T, B, N);\\n\t\t\\n\t\tvec3 bumpedNormal = TBN * normalize(normalT);\\n\t\treturn bumpedNormal;\\n\t#else\\n\t\treturn normalize(v_Normal);\\n\t#endif\\n}\\n\\nvec4 DielectricSpecularColor = vec4(0.220916301, 0.220916301, 0.220916301, 1.0 - 0.220916301);\\n\\nfloat PI = 3.14159265359;\\n\\nvec3 FresnelTerm (in vec3 F0, in float cosA)\\n{\\n\treturn F0 + (vec3(1.0) - F0) * pow(1.0 - cosA, 5.0);\\n}\\n\\nfloat PerceptualRoughnessToRoughness(in float perceptualRoughness)\\n{\\n\treturn perceptualRoughness * perceptualRoughness;\\n}\\n\\nfloat PerceptualRoughnessToSpecularPower(in float perceptualRoughness)\\n{\\n\tfloat m = PerceptualRoughnessToRoughness(perceptualRoughness);\\n\tfloat sq = max(0.0001, m * m);\\n\tfloat n = (2.0 / sq) - 2.0;\\n\tn = max(n, 0.0001);\\n\treturn n;\\n}\\n\\nfloat RoughnessToPerceptualRoughness(in float roughness)\\n{\\n\treturn sqrt(roughness);\\n}\\n\\nfloat SmoothnessToRoughness(in float smoothness)\\n{\\n\treturn (1.0 - smoothness) * (1.0 - smoothness);\\n}\\n\\nfloat SmoothnessToPerceptualRoughness(in float smoothness)\\n{\\n\treturn (1.0 - smoothness);\\n}\\n\\nvec3 SafeNormalize(in vec3 inVec)\\n{\\n\tfloat dp3 = max(0.001,dot(inVec,inVec));\\n\treturn inVec * (1.0 / sqrt(dp3));\\n}\\n\\nfloat DisneyDiffuse(in float NdotV, in float NdotL, in float LdotH, in float perceptualRoughness)\\n{\\n\tfloat fd90 = 0.5 + 2.0 * LdotH * LdotH * perceptualRoughness;\\n\tfloat lightScatter\t= (1.0 + (fd90 - 1.0) * pow(1.0 - NdotL,5.0));\\n\tfloat viewScatter\t= (1.0 + (fd90 - 1.0) * pow(1.0 - NdotV,5.0));\\n\\n\treturn lightScatter * viewScatter;\\n}\\n\\nfloat SmithJointGGXVisibilityTerm (float NdotL, float NdotV, float roughness)\\n{\\n\tfloat a = roughness;\\n\tfloat lambdaV = NdotL * (NdotV * (1.0 - a) + a);\\n\tfloat lambdaL = NdotV * (NdotL * (1.0 - a) + a);\\n\\n\treturn 0.5 / (lambdaV + lambdaL + 0.00001);\\n}\\n\\nfloat GGXTerm (float NdotH, float roughness)\\n{\\n\tfloat a2 = roughness * roughness;\\n\tfloat d = (NdotH * a2 - NdotH) * NdotH + 1.0;\\n\treturn 0.31830988618 * a2 / (d * d + 0.0000001);\\n}\\n\\nfloat OneMinusReflectivityFromMetallic(in float metallic)\\n{\\n\tfloat oneMinusDielectricSpec = DielectricSpecularColor.a;\\n\treturn oneMinusDielectricSpec - metallic * oneMinusDielectricSpec;\\n}\\n\\nfloat SpecularStrength(vec3 specular)\\n{\\n    //(SHADER_TARGET < 30)return specular.r; \\n    return max (max (specular.r, specular.g), specular.b);\\n}\\n\\nvec3 DiffuseAndSpecularFromMetallic(in vec3 diffuseColor, in float metallic, out vec3 specularColor, out float oneMinusReflectivity)\\n{\\n\tspecularColor = mix(DielectricSpecularColor.rgb, diffuseColor, metallic);\\n\toneMinusReflectivity = OneMinusReflectivityFromMetallic(metallic);\\n\treturn diffuseColor * oneMinusReflectivity;\\n}\\n\\nvec3 EnergyConservationBetweenDiffuseAndSpecular(in vec3 diffuseColor, in vec3 specularColor, out float oneMinusReflectivity)\\n{\\n\toneMinusReflectivity = 1.0 - SpecularStrength(specularColor);\\n\treturn diffuseColor * oneMinusReflectivity;\\n}\\n\\nvec4 Occlusion(in vec2 uv0){\\n\t#ifdef OCCLUSIONTEXTURE\\n\t\tvec4 occlusionTextureColor = texture2D(u_OcclusionTexture, uv0);\\n\t\tfloat occ = occlusionTextureColor.g;\\n\t\tfloat oneMinusT = 1.0 - u_occlusionStrength;\\n\t\tfloat lerpOneTo = oneMinusT + occ * u_occlusionStrength;\\n\t\treturn occlusionTextureColor * lerpOneTo;\\n\t#else\\n\t\treturn vec4(1.0);\\n\t#endif\\n}\\n\\nvec2 ParallaxOffset(in vec3 viewDir){\\n\t#ifdef PARALLAXTEXTURE\\n\t\tfloat h = texture2D(u_ParallaxTexture, v_Texcoord0).g;\\n\t\th = h * u_parallaxScale - u_parallaxScale / 2.0;\\n\t\tvec3 v = viewDir;\\n\t\tv.z += 0.42;\\n\t\tvec2 offset = h * (v.xy / v.z);\\n\t\treturn v_Texcoord0 + offset;\\n\t#else\\n\t\treturn v_Texcoord0;\\n\t#endif\\n}\\n\\n\");\n\t\tShader3D.addInclude(\"PBRStandardLighting.glsl\",\"#include \\\"PBRUtils.glsl\\\"\\n#include \\\"BRDF.glsl\\\"\\n\\nvec4 PBRStandardLight(in vec3 diffuseColor, in float metallic, in float smoothness, in vec3 normal, in vec3 viewDir, in vec3 lightDir, in vec3 lightColor, in vec3 gi)\\n{\\n\tfloat oneMinusReflectivity;\\n\tvec3 specularColor;\\n\tdiffuseColor = DiffuseAndSpecularFromMetallic (diffuseColor, metallic, specularColor, oneMinusReflectivity);\\n\t\\n\tvec4 color = LayaAirBRDF(diffuseColor, specularColor, oneMinusReflectivity, smoothness, normal, viewDir, lightDir, lightColor, gi);\\n\treturn color;\\n}\\n\\nvec4 PBRStandardDiectionLight (in vec3 diffuseColor, in float metallic, in float smoothness, in vec3 normal, in vec3 viewDir, in DirectionLight light, in vec3 gi)\\n{\\n\tvec3 lightVec = normalize(light.Direction);\\n\treturn PBRStandardLight(diffuseColor, metallic, smoothness, normal, viewDir, lightVec, light.Color, gi);\\n}\\n\\nvec2 MetallicGloss(in float diffuseTextureAlpha, in vec2 uv0)\\n{\\n\tvec2 mg;\\n\t\\n\t#ifdef METALLICGLOSSTEXTURE\\n\t\tvec4 metallicGlossTextureColor = texture2D(u_MetallicGlossTexture, uv0);\\n\t\t#ifdef SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA\\n\t\t\tmg.r = metallicGlossTextureColor.r;\\n\t\t\tmg.g = diffuseTextureAlpha;\\n\t\t#else\\n\t\t    mg = metallicGlossTextureColor.ra;\\n\t\t#endif\\n\t\tmg.g *= u_smoothnessScale;\\n\t#else\\n\t\tmg.r = u_metallic;\\n\t\t#ifdef SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA\\n\t\t\tmg.g = diffuseTextureAlpha * u_smoothnessScale;\\n\t\t#else\\n\t\t\tmg.g = u_smoothness;\\n\t\t#endif\\n\t#endif\\n\t\\n\treturn mg;\\n}\\n\\n\");\n\t\tShader3D.addInclude(\"PBRSpecularLighting.glsl\",\"#include \\\"PBRUtils.glsl\\\"\\n#include \\\"BRDF.glsl\\\"\\n\\nvec4 PBRSpecularLight(in vec3 diffuseColor, in vec3 specularColor, in float smoothness, in vec3 normal, in vec3 viewDir, in vec3 lightDir, in vec3 lightColor, in vec3 gi)\\n{\\n\tfloat oneMinusReflectivity;\\n\tdiffuseColor = EnergyConservationBetweenDiffuseAndSpecular (diffuseColor, specularColor, oneMinusReflectivity);\\n\t\\n\tvec4 color = LayaAirBRDF(diffuseColor, specularColor, oneMinusReflectivity, smoothness, normal, viewDir, lightDir, lightColor, gi);\\n\treturn color;\\n}\\n\\nvec4 PBRSpecularDiectionLight (in vec3 diffuseColor, in vec3 specularColor, in float smoothness, in vec3 normal, in vec3 viewDir, in DirectionLight light, in vec3 gi)\\n{\\n\tvec3 lightVec = normalize(light.Direction);\\n\treturn PBRSpecularLight(diffuseColor, specularColor, smoothness, normal, viewDir, lightVec, light.Color, gi);\\n}\\n\\nvec4 SpecularGloss(float diffuseTextureAlpha, in vec2 uv0)\\n{\\n    vec4 sg;\\n\t\\n\t#ifdef SPECULARTEXTURE\\n\t\tvec4 specularTextureColor = texture2D(u_SpecularTexture, uv0);\\n\t\t#ifdef SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA\\n\t\t\tsg.rgb = specularTextureColor.rgb;\\n\t\t\tsg.a = diffuseTextureAlpha;\\n\t\t#else\\n\t\t\tsg = specularTextureColor;\\n\t\t#endif\\n\t\tsg.a *= u_smoothnessScale;\\n\t#else\\n\t\tsg.rgb = u_SpecularColor.rgb;\\n\t\t#ifdef SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA\\n\t\t\tsg.a = diffuseTextureAlpha * u_smoothnessScale;\\n\t\t#else\\n\t\t\tsg.a = u_smoothness;\\n\t\t#endif\\n\t#endif\\n\t\\n    return sg;\\n}\\n\\n\");\n\t\tvar vs,ps;\n\t\tvar attributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Color':/*laya.d3.graphics.VertexElementUsage.COLOR0*/1,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_Texcoord1':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15,\n\t\t\t'a_BoneWeights':/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7,\n\t\t\t'a_BoneIndices':/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6,\n\t\t\t'a_Tangent0':/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5};\n\t\tvar uniformMap={\n\t\t\t'u_Bones':[ /*laya.d3.core.SkinnedMeshSprite3D.BONES*/0,/*laya.d3.shader.Shader3D.PERIOD_RENDERELEMENT*/0],\n\t\t\t'u_DiffuseTexture':[ /*laya.d3.core.material.BlinnPhongMaterial.ALBEDOTEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SpecularTexture':[ /*laya.d3.core.material.BlinnPhongMaterial.SPECULARTEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_NormalTexture':[ /*laya.d3.core.material.BlinnPhongMaterial.NORMALTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_ReflectTexture':[ /*laya.d3.core.material.BlinnPhongMaterial.REFLECTTEXTURE*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_AlphaTestValue':[ /*laya.d3.core.material.BaseMaterial.ALPHATESTVALUE*/0,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseColor':[ /*laya.d3.core.material.BlinnPhongMaterial.ALBEDOCOLOR*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialSpecular':[ /*laya.d3.core.material.BlinnPhongMaterial.MATERIALSPECULAR*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Shininess':[ /*laya.d3.core.material.BlinnPhongMaterial.SHININESS*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialReflect':[ /*laya.d3.core.material.BlinnPhongMaterial.MATERIALREFLECT*/10,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset':[ /*laya.d3.core.material.BlinnPhongMaterial.TILINGOFFSET*/11,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WorldMat':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_LightmapScaleOffset':[ /*laya.d3.core.RenderableSprite3D.LIGHTMAPSCALEOFFSET*/2,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_LightMap':[ /*laya.d3.core.RenderableSprite3D.LIGHTMAP*/3,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPos':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_FogStart':[ /*laya.d3.core.scene.Scene.FOGSTART*/1,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogRange':[ /*laya.d3.core.scene.Scene.FOGRANGE*/2,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogColor':[ /*laya.d3.core.scene.Scene.FOGCOLOR*/0,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Color':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Position':[ /*laya.d3.core.scene.Scene.POINTLIGHTPOS*/5,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Range':[ /*laya.d3.core.scene.Scene.POINTLIGHTRANGE*/6,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Color':[ /*laya.d3.core.scene.Scene.POINTLIGHTCOLOR*/8,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Position':[ /*laya.d3.core.scene.Scene.SPOTLIGHTPOS*/9,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Direction':[ /*laya.d3.core.scene.Scene.SPOTLIGHTDIRECTION*/10,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Range':[ /*laya.d3.core.scene.Scene.SPOTLIGHTRANGE*/12,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Spot':[ /*laya.d3.core.scene.Scene.SPOTLIGHTSPOT*/11,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Color':[ /*laya.d3.core.scene.Scene.SPOTLIGHTCOLOR*/14,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_AmbientColor':[ /*laya.d3.core.scene.Scene.AMBIENTCOLOR*/21,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap1':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap2':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap3':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE3*/20,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPSSMDistance':[ /*laya.d3.core.scene.Scene.SHADOWDISTANCE*/15,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_lightShadowVP':[ /*laya.d3.core.scene.Scene.SHADOWLIGHTVIEWPROJECT*/16,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPCFoffset':[ /*laya.d3.core.scene.Scene.SHADOWMAPPCFOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]};\n\t\tvar BLINNPHONG=Shader3D.nameKey.add(\"BLINNPHONG\");\n\t\tvs=\"attribute vec4 a_Position;\\nuniform mat4 u_MvpMatrix;\\n\\n#if defined(DIFFUSEMAP)||((defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&(defined(SPECULARMAP)||defined(NORMALMAP)))||(defined(LIGHTMAP)&&defined(UV))\\n\tattribute vec2 a_Texcoord0;\\n\tvarying vec2 v_Texcoord0;\\n#endif\\n\\n#if defined(LIGHTMAP)&&defined(UV1)\\n\tattribute vec2 a_Texcoord1;\\n#endif\\n\\n#ifdef LIGHTMAP\\n\tuniform vec4 u_LightmapScaleOffset;\\n\tvarying vec2 v_LightMapUV;\\n#endif\\n\\n#ifdef COLOR\\n\tattribute vec4 a_Color;\\n\tvarying vec4 v_Color;\\n#endif\\n\\n#ifdef BONE\\n\tconst int c_MaxBoneCount = 24;\\n\tattribute vec4 a_BoneIndices;\\n\tattribute vec4 a_BoneWeights;\\n\tuniform mat4 u_Bones[c_MaxBoneCount];\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\tattribute vec3 a_Normal;\\n\tvarying vec3 v_Normal; \\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\tuniform vec3 u_CameraPos;\\n\tvarying vec3 v_ViewDir; \\n#endif\\n\\n#if (defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP))&&defined(NORMALMAP)\\n\tattribute vec4 a_Tangent0;\\n\tvarying vec3 v_Tangent;\\n\tvarying vec3 v_Binormal;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)||defined(RECEIVESHADOW)\\n\tuniform mat4 u_WorldMat;\\n\tvarying vec3 v_PositionWorld;\\n#endif\\n\\nvarying float v_posViewZ;\\n#ifdef RECEIVESHADOW\\n  #ifdef SHADOWMAP_PSSM1 \\n  varying vec4 v_lightMVPPos;\\n  uniform mat4 u_lightShadowVP[4];\\n  #endif\\n#endif\\n\\n#ifdef TILINGOFFSET\\n\tuniform vec4 u_TilingOffset;\\n#endif\\n\\nvoid main_castShadow()\\n{\\n\t#ifdef BONE\\n\t\tmat4 skinTransform=mat4(0.0);\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\t\tvec4 position=skinTransform*a_Position;\\n\t\tgl_Position = u_MvpMatrix * position;\\n\t#else\\n\t\tgl_Position = u_MvpMatrix * a_Position;\\n\t#endif\\n\t \\n\t//TODO没考虑UV动画呢\\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tv_Texcoord0=a_Texcoord0;\\n\t#endif\\n\t\tv_posViewZ = gl_Position.z;\\n}\\n\\nvoid main_normal()\\n{\\n\t#ifdef BONE\\n\t\tmat4 skinTransform=mat4(0.0);\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\t\tvec4 position=skinTransform*a_Position;\\n\t\tgl_Position = u_MvpMatrix * position;\\n\t#else\\n\t\tgl_Position = u_MvpMatrix * a_Position;\\n\t#endif\\n\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\t\tmat3 worldMat;\\n\t\t#ifdef BONE\\n\t\t\tworldMat=mat3(u_WorldMat*skinTransform);\\n\t\t#else\\n\t\t\tworldMat=mat3(u_WorldMat);\\n\t\t#endif  \\n\t\tv_Normal=worldMat*a_Normal;//TODO:法线可以用\\\"魔法\\\"矩阵\\n\t\t#if (defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&defined(NORMALMAP)\\n\t\t\tv_Tangent=worldMat*a_Tangent0.xyz;\\n\t\t\tv_Binormal=cross(v_Normal,v_Tangent)*a_Tangent0.w;\\n\t\t#endif\\n\t#endif\\n\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)||defined(RECEIVESHADOW)\\n\t\t#ifdef BONE\\n\t\t\tv_PositionWorld=(u_WorldMat*position).xyz;\\n\t\t#else\\n\t\t\tv_PositionWorld=(u_WorldMat*a_Position).xyz;\\n\t\t#endif\\n\t#endif\\n\t\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\t\tv_ViewDir=u_CameraPos-v_PositionWorld;\\n\t#endif\\n\\n\t#if defined(DIFFUSEMAP)||((defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&(defined(SPECULARMAP)||defined(NORMALMAP)))\\n\t\tv_Texcoord0=a_Texcoord0;\\n\t\t#ifdef TILINGOFFSET\\n\t\t\tv_Texcoord0=(vec2(v_Texcoord0.x,v_Texcoord0.y-1.0)*u_TilingOffset.xy)+u_TilingOffset.zw;\\n\t\t\tv_Texcoord0=vec2(v_Texcoord0.x,1.0+v_Texcoord0.y);\\n\t\t#endif\\n\t#endif\\n\\n\t#ifdef LIGHTMAP\\n\t\t#ifdef SCALEOFFSETLIGHTINGMAPUV\\n\t\t\t#ifdef UV1\\n\t\t\t\tv_LightMapUV=vec2(a_Texcoord1.x*u_LightmapScaleOffset.x+u_LightmapScaleOffset.z,1.0+a_Texcoord1.y*u_LightmapScaleOffset.y+u_LightmapScaleOffset.w);\\n\t\t\t#else\\n\t\t\t\tv_LightMapUV=vec2(a_Texcoord0.x,a_Texcoord0.y-1.0)*u_LightmapScaleOffset.xy+u_LightmapScaleOffset.zw;\\n\t\t\t#endif \\n\t\t#else\\n\t\t\t#ifdef UV1\\n\t\t\t\tv_LightMapUV=a_Texcoord1;\\n\t\t\t#else\\n\t\t\t\tv_LightMapUV=a_Texcoord0;\\n\t\t\t#endif \\n\t\t#endif \\n\t#endif\\n\\n\t#ifdef COLOR\\n\t\tv_Color=a_Color;\\n\t#endif\\n\\n\t#ifdef RECEIVESHADOW\\n\t\tv_posViewZ = gl_Position.w;\\n\t\t#ifdef SHADOWMAP_PSSM1 \\n\t\t\tv_lightMVPPos = u_lightShadowVP[0] * vec4(v_PositionWorld,1.0);\\n\t\t#endif\\n\t#endif\\n}\\n\\nvoid main()\\n{\\n\t#ifdef CASTSHADOW\\n\t\tmain_castShadow();\\n\t#else\\n\t\tmain_normal();\\n\t#endif\\n}\";\n\t\tps=\"#ifdef HIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\n#include \\\"Lighting.glsl\\\";\\n\\nuniform vec4 u_DiffuseColor;\\n\\n#ifdef COLOR\\n\tvarying vec4 v_Color;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\tvarying vec3 v_ViewDir; \\n#endif\\n\\n#ifdef ALPHATEST\\n\tuniform float u_AlphaTestValue;\\n#endif\\n\\n#ifdef DIFFUSEMAP\\n\tuniform sampler2D u_DiffuseTexture;\\n#endif\\n\\n#ifdef REFLECTMAP\\n\tuniform samplerCube u_ReflectTexture;\\n\tuniform vec3 u_MaterialReflect;\\n#endif\\n\\n#if defined(DIFFUSEMAP)||((defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&(defined(SPECULARMAP)||defined(NORMALMAP)))\\n\tvarying vec2 v_Texcoord0;\\n#endif\\n\\n#ifdef LIGHTMAP\\n\tvarying vec2 v_LightMapUV;\\n\tuniform sampler2D u_LightMap;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\tuniform vec3 u_MaterialSpecular;\\n\tuniform float u_Shininess;\\n\t#ifdef SPECULARMAP \\n\t\tuniform sampler2D u_SpecularTexture;\\n\t#endif\\n#endif\\n\\n#ifdef FOG\\n\tuniform float u_FogStart;\\n\tuniform float u_FogRange;\\n\t#ifdef ADDTIVEFOG\\n\t#else\\n\t\tuniform vec3 u_FogColor;\\n\t#endif\\n#endif\\n\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\tvarying vec3 v_Normal;\\n#endif\\n\\n#if (defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&defined(NORMALMAP)\\n\tuniform sampler2D u_NormalTexture;\\n\tvarying vec3 v_Tangent;\\n\tvarying vec3 v_Binormal;\\n#endif\\n\\n#ifdef DIRECTIONLIGHT\\n\tuniform DirectionLight u_DirectionLight;\\n#endif\\n\\n#ifdef POINTLIGHT\\n\tuniform PointLight u_PointLight;\\n#endif\\n\\n#ifdef SPOTLIGHT\\n\tuniform SpotLight u_SpotLight;\\n#endif\\n\\nuniform vec3 u_AmbientColor;\\n\\n\\n#if defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)||defined(RECEIVESHADOW)\\n\tvarying vec3 v_PositionWorld;\\n#endif\\n\\n#include \\\"ShadowHelper.glsl\\\"\\nvarying float v_posViewZ;\\n#ifdef RECEIVESHADOW\\n\t#if defined(SHADOWMAP_PSSM2)||defined(SHADOWMAP_PSSM3)\\n\t\tuniform mat4 u_lightShadowVP[4];\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM1 \\n\t\tvarying vec4 v_lightMVPPos;\\n\t#endif\\n#endif\\n\\nvoid main_castShadow()\\n{\\n\t//gl_FragColor=vec4(v_posViewZ,0.0,0.0,1.0);\\n\tgl_FragColor=packDepth(v_posViewZ);\\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tfloat alpha = texture2D(u_DiffuseTexture,v_Texcoord0).w;\\n\t\tif( alpha < u_AlphaTestValue )\\n\t\t{\\n\t\t\tdiscard;\\n\t\t}\\n\t#endif\\n}\\nvoid main_normal()\\n{\\n\tvec4 mainColor=u_DiffuseColor;\\n\t#ifdef DIFFUSEMAP\\n\t\tvec4 difTexColor=texture2D(u_DiffuseTexture, v_Texcoord0);\\n\t\tmainColor=mainColor*difTexColor;\\n\t#endif \\n\t#ifdef COLOR\\n\t\tmainColor=mainColor*v_Color;\\n\t#endif \\n    \\n\t#ifdef ALPHATEST\\n\t\tif(mainColor.a<u_AlphaTestValue)\\n\t\t\tdiscard;\\n\t#endif\\n  \\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\t\tvec3 normal;\\n\t\t#if (defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&defined(NORMALMAP)\\n\t\t\tvec3 normalMapSample = texture2D(u_NormalTexture, v_Texcoord0).rgb;\\n\t\t\tnormal = normalize(NormalSampleToWorldSpace(normalMapSample, v_Normal, v_Tangent,v_Binormal));\\n\t\t#else\\n\t\t\tnormal = normalize(v_Normal);\\n\t\t#endif\\n\t#endif\\n\t\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t\tvec3 viewDir= normalize(v_ViewDir);\\n\t\tvec3 diffuse = vec3(0.0);\\n\t\tvec3 specular= vec3(0.0);\\n\t\tvec3 dif,spe;\\n\t\t#ifdef SPECULARMAP\\n\t\t\tvec3 gloss=texture2D(u_SpecularTexture, v_Texcoord0).rgb;\\n\t\t#else\\n\t\t\t#ifdef DIFFUSEMAP\\n\t\t\t\tvec3 gloss=vec3(difTexColor.a);\\n\t\t\t#else\\n\t\t\t\tvec3 gloss=vec3(1.0);\\n\t\t\t#endif\\n\t\t#endif\\n\t#endif\\n\\n\t\\n\t#ifdef DIRECTIONLIGHT\\n\t\tLayaAirBlinnPhongDiectionLight(u_MaterialSpecular,u_Shininess,normal,gloss,viewDir,u_DirectionLight,dif,spe);\\n\t\tdiffuse+=dif;\\n\t\tspecular+=spe;\\n\t#endif\\n \\n\t#ifdef POINTLIGHT\\n\t\tLayaAirBlinnPhongPointLight(v_PositionWorld,u_MaterialSpecular,u_Shininess,normal,gloss,viewDir,u_PointLight,dif,spe);\\n\t\tdiffuse+=dif;\\n\t\tspecular+=spe;\\n\t#endif\\n\\n\t#ifdef SPOTLIGHT\\n\t\tLayaAirBlinnPhongSpotLight(v_PositionWorld,u_MaterialSpecular,u_Shininess,normal,gloss,viewDir,u_SpotLight,dif,spe);\\n\t\tdiffuse+=dif;\\n\t\tspecular+=spe;\\n\t#endif\\n\\n\t\\n\tvec3 finalDiffuse;\\n\t#ifdef LIGHTMAP\\n\t\tfinalDiffuse=texture2D(u_LightMap, v_LightMapUV).rgb*2.0;\\n\t\t//float exponent = texture2D(u_LightMap, v_LightMapUV).a;\\n\t\t//finalDiffuse = texture2D(u_LightMap, v_LightMapUV).rgb;\\n\t\t//float ratio = pow(2.0, exponent * 255.0 - (128.0 + 8.0));\\n\t\t//finalDiffuse = finalDiffuse * 255.0 * ratio;\t\\n\t\t//finalDiffuse = sqrt(finalDiffuse);\\n\t#else\\n\t\tfinalDiffuse=vec3(0.0);\\n\t#endif\\n\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t\tfinalDiffuse+=diffuse;\\n\t#endif\\n\\n\t#ifdef RECEIVESHADOW\\n\t\tfloat shadowValue = 1.0;\\n\t\t#ifdef SHADOWMAP_PSSM3\\n\t\t\tshadowValue = getShadowPSSM3( u_shadowMap1,u_shadowMap2,u_shadowMap3,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t\t#endif\\n\t\t#ifdef SHADOWMAP_PSSM2\\n\t\t\tshadowValue = getShadowPSSM2( u_shadowMap1,u_shadowMap2,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t\t#endif \\n\t\t#ifdef SHADOWMAP_PSSM1\\n\t\t\tshadowValue = getShadowPSSM1( u_shadowMap1,v_lightMVPPos,u_shadowPSSMDistance,u_shadowPCFoffset,v_posViewZ,0.001);\\n\t\t#endif\\n\t\tgl_FragColor =vec4(mainColor.rgb*(u_AmbientColor + finalDiffuse)*shadowValue,mainColor.a);\\n\t#else\\n\t\tgl_FragColor =vec4(mainColor.rgb*(u_AmbientColor + finalDiffuse),mainColor.a);\\n\t#endif\\n\t\\n\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t\t#ifdef RECEIVESHADOW\\n\t\t\tgl_FragColor.rgb+=specular*shadowValue;\\n\t\t#else\\n\t\t\tgl_FragColor.rgb+=specular;\\n\t\t#endif\\n\t#endif\\n\\n\\n\t#ifdef REFLECTMAP\\n\t\tvec3 incident = -viewDir;\\n\t\tvec3 reflectionVector = reflect(incident,normal);\\n\t\tvec3 reflectionColor  = textureCube(u_ReflectTexture,reflectionVector).rgb;\\n\t\tgl_FragColor.rgb += u_MaterialReflect*reflectionColor;\\n\t#endif\\n\t  \\n\t#ifdef FOG\\n\t\tfloat lerpFact=clamp((1.0/gl_FragCoord.w-u_FogStart)/u_FogRange,0.0,1.0);\\n\t\t#ifdef ADDTIVEFOG\\n\t\t\tgl_FragColor.rgb=mix(gl_FragColor.rgb,vec3(0.0,0.0,0.0),lerpFact);\\n\t\t#else\\n\t\t\tgl_FragColor.rgb=mix(gl_FragColor.rgb,u_FogColor,lerpFact);\\n\t\t#endif\\n\t#endif\\n}\\n\\nvoid main()\\n{\\n\t#ifdef CASTSHADOW\t\t\\n\t\tmain_castShadow();\\n\t#else\\n\t  main_normal();\\n\t#endif  \\n}\\n\\n\";\n\t\tvar shaderCompile=ShaderCompile3D.add(BLINNPHONG,vs,ps,attributeMap,uniformMap);\n\t\tBlinnPhongMaterial.SHADERDEFINE_DIFFUSEMAP=shaderCompile.registerMaterialDefine(\"DIFFUSEMAP\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_NORMALMAP=shaderCompile.registerMaterialDefine(\"NORMALMAP\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_SPECULARMAP=shaderCompile.registerMaterialDefine(\"SPECULARMAP\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_REFLECTMAP=shaderCompile.registerMaterialDefine(\"REFLECTMAP\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_TILINGOFFSET=shaderCompile.registerMaterialDefine(\"TILINGOFFSET\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_ADDTIVEFOG=shaderCompile.registerMaterialDefine(\"ADDTIVEFOG\");\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Color':/*laya.d3.graphics.VertexElementUsage.COLOR0*/1,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_Texcoord1':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15,\n\t\t\t'a_TexcoordNext0':/*laya.d3.graphics.VertexElementUsage.NEXTTEXTURECOORDINATE0*/14,\n\t\t\t'a_BoneWeights':/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7,\n\t\t\t'a_BoneIndices':/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6,\n\t\t\t'a_Tangent0':/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5};\n\t\tuniformMap={\n\t\t\t'u_Bones':[ /*laya.d3.core.SkinnedMeshSprite3D.BONES*/0,/*laya.d3.shader.Shader3D.PERIOD_RENDERELEMENT*/0],\n\t\t\t'u_DiffuseTexture':[ /*laya.d3.core.material.StandardMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SpecularTexture':[ /*laya.d3.core.material.StandardMaterial.SPECULARTEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_NormalTexture':[ /*laya.d3.core.material.StandardMaterial.NORMALTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_AmbientTexture':[ /*laya.d3.core.material.StandardMaterial.AMBIENTTEXTURE*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_ReflectTexture':[ /*laya.d3.core.material.StandardMaterial.REFLECTTEXTURE*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_AlphaTestValue':[ /*laya.d3.core.material.BaseMaterial.ALPHATESTVALUE*/0,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Albedo':[ /*laya.d3.core.material.StandardMaterial.ALBEDO*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_UVMatrix':[ /*laya.d3.core.material.StandardMaterial.UVMATRIX*/13,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_UVAge':[ /*laya.d3.core.material.StandardMaterial.UVAGE*/14,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_UVAniAge':[ /*laya.d3.core.material.StandardMaterial.UVANIAGE*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialDiffuse':[ /*laya.d3.core.material.StandardMaterial.MATERIALDIFFUSE*/10,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialAmbient':[ /*laya.d3.core.material.StandardMaterial.MATERIALAMBIENT*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialSpecular':[ /*laya.d3.core.material.StandardMaterial.MATERIALSPECULAR*/11,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialReflect':[ /*laya.d3.core.material.StandardMaterial.MATERIALREFLECT*/12,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset':[ /*laya.d3.core.material.StandardMaterial.TILINGOFFSET*/15,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WorldMat':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_LightmapScaleOffset':[ /*laya.d3.core.RenderableSprite3D.LIGHTMAPSCALEOFFSET*/2,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_LightMap':[ /*laya.d3.core.RenderableSprite3D.LIGHTMAP*/3,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPos':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_FogStart':[ /*laya.d3.core.scene.Scene.FOGSTART*/1,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogRange':[ /*laya.d3.core.scene.Scene.FOGRANGE*/2,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogColor':[ /*laya.d3.core.scene.Scene.FOGCOLOR*/0,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Diffuse':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Position':[ /*laya.d3.core.scene.Scene.POINTLIGHTPOS*/5,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Range':[ /*laya.d3.core.scene.Scene.POINTLIGHTRANGE*/6,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Attenuation':[ /*laya.d3.core.scene.Scene.POINTLIGHTATTENUATION*/7,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Diffuse':[ /*laya.d3.core.scene.Scene.POINTLIGHTCOLOR*/8,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Position':[ /*laya.d3.core.scene.Scene.SPOTLIGHTPOS*/9,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Direction':[ /*laya.d3.core.scene.Scene.SPOTLIGHTDIRECTION*/10,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Range':[ /*laya.d3.core.scene.Scene.SPOTLIGHTRANGE*/12,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Spot':[ /*laya.d3.core.scene.Scene.SPOTLIGHTSPOT*/11,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Attenuation':[ /*laya.d3.core.scene.Scene.SPOTLIGHTATTENUATION*/13,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Diffuse':[ /*laya.d3.core.scene.Scene.SPOTLIGHTCOLOR*/14,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_AmbientColor':[ /*laya.d3.core.scene.Scene.AMBIENTCOLOR*/21,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap1':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap2':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap3':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE3*/20,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPSSMDistance':[ /*laya.d3.core.scene.Scene.SHADOWDISTANCE*/15,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_lightShadowVP':[ /*laya.d3.core.scene.Scene.SHADOWLIGHTVIEWPROJECT*/16,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPCFoffset':[ /*laya.d3.core.scene.Scene.SHADOWMAPPCFOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]};\n\t\tvar SIMPLE=Shader3D.nameKey.add(\"SIMPLE\");\n\t\tvs=\"attribute vec4 a_Position;\\nuniform mat4 u_MvpMatrix;\\n\\n\\n\\n#if defined(DIFFUSEMAP)||((defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&(defined(COLOR)&&defined(SPECULARMAP)||defined(NORMALMAP)))||(defined(LIGHTMAP)&&defined(UV))\\nattribute vec2 a_Texcoord0;\\nvarying vec2 v_Texcoord0;\\n  #ifdef UVTRANSFORM \\n  uniform mat4 u_UVMatrix;\\n  #endif\\n#endif\\n\\n#if defined(AMBIENTMAP)||(defined(LIGHTMAP)&&defined(UV1))\\nattribute vec2 a_Texcoord1;\\n#endif\\n\\n#if defined(AMBIENTMAP)||defined(LIGHTMAP)\\nuniform vec4 u_LightmapScaleOffset;\\nvarying vec2 v_LightMapUV;\\n#endif\\n\\n\\n#ifdef COLOR\\nattribute vec4 a_Color;\\nvarying vec4 v_Color;\\n#endif\\n\\n#ifdef BONE\\nattribute vec4 a_BoneIndices;\\nattribute vec4 a_BoneWeights;\\nconst int c_MaxBoneCount = 24;\\nuniform mat4 u_Bones[c_MaxBoneCount];\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\nattribute vec3 a_Normal;\\nvarying vec3 v_Normal;\\n#endif\\n\\n#if (defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP))&&defined(NORMALMAP)\\nattribute vec3 a_Tangent0;\\nvarying vec3 v_Tangent0;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)||defined(DEPTHFOG)||defined(REFLECTMAP)||defined(RECEIVESHADOW)\\nuniform mat4 u_WorldMat;\\nvarying vec3 v_PositionWorld;\\n#endif\\n\\nvarying float v_posViewZ;\\n#ifdef RECEIVESHADOW\\n  #ifdef SHADOWMAP_PSSM1 \\n  varying vec4 v_lightMVPPos;\\n  uniform mat4 u_lightShadowVP[4];\\n  #endif\\n#endif\\n\\n#ifdef TILINGOFFSET\\n\tuniform vec4 u_TilingOffset;\\n#endif\\n\\nvoid main_castShadow()\\n{\\n#ifdef BONE\\n\tmat4 skinTransform=mat4(0.0);\\n\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\tvec4 position=skinTransform*a_Position;\\n\tgl_Position = u_MvpMatrix * position;\\n#else\\n\tgl_Position = u_MvpMatrix * a_Position;\\n#endif\\n \\n//TODO没考虑UV动画呢\\n#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\tv_Texcoord0=a_Texcoord0;\\n#endif\\n\tv_posViewZ = gl_Position.z;\\n}\\n\\nvoid main_normal()\\n{\\n#ifdef BONE\\n\tmat4 skinTransform=mat4(0.0);\\n\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\tvec4 position=skinTransform*a_Position;\\n\tgl_Position = u_MvpMatrix * position;\\n#else\\n\tgl_Position = u_MvpMatrix * a_Position;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\tmat3 worldMat;\\n\t#ifdef BONE\\n\t\tworldMat=mat3(u_WorldMat*skinTransform);\\n\t#else\\n\t\tworldMat=mat3(u_WorldMat);\\n\t#endif  \\n\tv_Normal=worldMat*a_Normal;\\n\t#if (defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&defined(NORMALMAP)\\n\t\tv_Tangent0=worldMat*a_Tangent0;\\n\t#endif\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)||defined(DEPTHFOG)||defined(REFLECTMAP)||defined(RECEIVESHADOW)\\n\t#ifdef BONE\\n\t\tv_PositionWorld=(u_WorldMat*position).xyz;\\n\t#else\\n\t\tv_PositionWorld=(u_WorldMat*a_Position).xyz;\\n\t#endif\\n#endif\\n\\n#if defined(DIFFUSEMAP)||((defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&(defined(COLOR)&&defined(SPECULARMAP)||defined(NORMALMAP)))\\n\tv_Texcoord0=a_Texcoord0;\\n\t#ifdef TILINGOFFSET\\n\t\tv_Texcoord0=(vec2(v_Texcoord0.x,v_Texcoord0.y-1.0)*u_TilingOffset.xy)+u_TilingOffset.zw;\\n\t\tv_Texcoord0=vec2(v_Texcoord0.x,v_Texcoord0.y+1.0);\\n\t#endif\\n\t#ifdef UVTRANSFORM\\n\t\tv_Texcoord0=(u_UVMatrix*vec4(v_Texcoord0,0.0,1.0)).xy;\\n\t#endif\\n#endif\\n\\n#if defined(AMBIENTMAP)||defined(LIGHTMAP)\\n\t#ifdef SCALEOFFSETLIGHTINGMAPUV\\n\t\t#ifdef UV1\\n\t\t\tv_LightMapUV=vec2(a_Texcoord1.x*u_LightmapScaleOffset.x+u_LightmapScaleOffset.z,1.0+a_Texcoord1.y*u_LightmapScaleOffset.y+u_LightmapScaleOffset.w);\\n\t\t#else\\n\t\t\tv_LightMapUV=vec2(a_Texcoord0.x,a_Texcoord0.y-1.0)*u_LightmapScaleOffset.xy+u_LightmapScaleOffset.zw;\\n\t\t#endif \\n\t#else\\n\t\t#ifdef UV1\\n\t\t\tv_LightMapUV=a_Texcoord1;\\n\t\t#else\\n\t\t\tv_LightMapUV=a_Texcoord0;\\n\t\t#endif \\n\t#endif \\n#endif\\n\\n#ifdef COLOR\\n\tv_Color=a_Color;\\n#endif\\n\\n#ifdef RECEIVESHADOW\\n\tv_posViewZ = gl_Position.w;\\n\t#ifdef SHADOWMAP_PSSM1 \\n\t\tv_lightMVPPos = u_lightShadowVP[0] * vec4(v_PositionWorld,1.0);\\n\t#endif\\n#endif\\n}\\n\\nvoid main()\\n{\\n#ifdef CASTSHADOW\\n\tmain_castShadow();\\n#else\\n\tmain_normal();\\n#endif\\n}\";\n\t\tps=\"#ifdef HIGHPRECISION\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n\\n#include \\\"LightHelper.glsl\\\";\\n\\nuniform vec4 u_Albedo;\\n\\n#ifdef ALPHATEST\\nuniform float u_AlphaTestValue;\\n#endif\\n\\n#ifdef DIFFUSEMAP\\nuniform sampler2D u_DiffuseTexture;\\n#endif\\n\\n#ifdef REFLECTMAP\\nuniform samplerCube u_ReflectTexture;\\nuniform vec3 u_MaterialReflect;\\n#endif\\n\\n#if   defined(DIFFUSEMAP)||((defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&(defined(COLOR)&&defined(SPECULARMAP)||defined(NORMALMAP)))\\nvarying vec2 v_Texcoord0;\\n#endif\\n\\n#if defined(AMBIENTMAP)||defined(LIGHTMAP)\\nvarying vec2 v_LightMapUV;\\n#endif\\n#ifdef AMBIENTMAP\\nuniform sampler2D u_AmbientTexture;\\n#endif\\n#ifdef LIGHTMAP\\nuniform sampler2D u_LightMap;\\n#endif\\n\\n#ifdef COLOR\\nvarying vec4 v_Color;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\nuniform vec3 u_MaterialDiffuse;\\nuniform vec4 u_MaterialSpecular;\\n  #if (defined(DIFFUSEMAP)||defined(COLOR))&&defined(SPECULARMAP) \\n  uniform sampler2D u_SpecularTexture;\\n  #endif\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(AMBIENTMAP)||defined(LIGHTMAP)\\nuniform vec3 u_MaterialAmbient;\\n#endif\\n\\n#if defined(FOG)||defined(DEPTHFOG)\\n\tuniform float u_FogStart;\\n\tuniform float u_FogRange;\\n\t#ifdef ADDTIVEFOG\\n\t#else\\n\t\tuniform vec3 u_FogColor;\\n\t#endif\\n#endif\\n\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\nvarying vec3 v_Normal;\\n#endif\\n\\n#if (defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&defined(NORMALMAP)\\nuniform sampler2D u_NormalTexture;\\nvarying vec3 v_Tangent0;\\n#endif\\n\\n#ifdef DIRECTIONLIGHT\\nuniform DirectionLight u_DirectionLight;\\n#endif\\n\\n#ifdef POINTLIGHT\\nuniform PointLight u_PointLight;\\n#endif\\n\\n#ifdef SPOTLIGHT\\nuniform SpotLight u_SpotLight;\\n#endif\\n\\nuniform vec3 u_AmbientColor;\\n\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)||defined(DEPTHFOG)||defined(REFLECTMAP)||(defined(RECEIVESHADOW)&&(defined(SHADOWMAP_PSM2)||defined(SHADOWMAP_PSM3)))\\nuniform vec3 u_CameraPos;\\n#endif\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)||defined(DEPTHFOG)||defined(REFLECTMAP)\\nvarying vec3 v_PositionWorld;\\n#endif\\n\\n#include \\\"ShadowHelper.glsl\\\"\\n#ifdef RECEIVESHADOW\\n\t#if defined(SHADOWMAP_PSSM2)||defined(SHADOWMAP_PSSM3)\\n\tuniform mat4 u_lightShadowVP[4];\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM1 \\n\tvarying vec4 v_lightMVPPos;\\n\t#endif\\n#endif\\nvarying float v_posViewZ;\\n\\n\\n\\nvoid main_castShadow()\\n{\\n\t//gl_FragColor=vec4(v_posViewZ,0.0,0.0,1.0);\\n\tgl_FragColor=packDepth(v_posViewZ);\\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tfloat alpha = texture2D(u_DiffuseTexture,v_Texcoord0).w;\\n\t\tif( alpha < u_AlphaTestValue )\\n\t\t{\\n\t\t\tdiscard;\\n\t\t}\\n\t#endif\\n}\\nvoid main_normal()\\n{\\n#if defined(DIFFUSEMAP)&&!defined(COLOR)\\n\tgl_FragColor=texture2D(u_DiffuseTexture, v_Texcoord0);\\n#endif \\n  \\n#if defined(COLOR)&&!defined(DIFFUSEMAP)\\n\tgl_FragColor=v_Color;\\n#endif \\n  \\n#if defined(DIFFUSEMAP)&&defined(COLOR)\\n\tvec4 texColor=texture2D(u_DiffuseTexture, v_Texcoord0);\\n\tgl_FragColor=texColor*v_Color;\\n#endif\\n  \\n#if !defined(DIFFUSEMAP)&&!defined(COLOR)\\n\tgl_FragColor=vec4(1.0,1.0,1.0,1.0);\\n#endif \\n    \\n#ifdef ALPHATEST\\n\tif(gl_FragColor.a-u_AlphaTestValue<0.0)\\n\t\tdiscard;\\n#endif\\n  \\n  \\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(REFLECTMAP)\\n\tvec3 normal;\\n    #if (defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT))&&defined(NORMALMAP)\\n\t\tvec3 normalMapSample = texture2D(u_NormalTexture, v_Texcoord0).rgb;\\n\t\tnormal = normalize(NormalSampleToWorldSpace(normalMapSample, v_Normal, v_Tangent0));\\n\t#else\\n\t\tnormal = normalize(v_Normal);\\n    #endif\\n#endif\\n\t\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\tvec3 diffuse = vec3(0.0);\\n\tvec3 ambient = vec3(0.0);\\n\tvec3 specular= vec3(0.0);\\n\tvec3 dif, amb, spe;\\n#endif\\n  \\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)||defined(REFLECTMAP)\\n\tvec3 toEye;\\n\t#ifdef FOG\\n\t\ttoEye=u_CameraPos-v_PositionWorld;\\n\t\tfloat toEyeLength=length(toEye);\\n\t\ttoEye/=toEyeLength;\\n\t#else\\n\t\ttoEye=normalize(u_CameraPos-v_PositionWorld);\\n\t#endif\\n#endif\\n\t\\n#ifdef DIRECTIONLIGHT\\n\tcomputeDirectionLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_DirectionLight,u_AmbientColor,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n \\n#ifdef POINTLIGHT\\n\tcomputePointLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_PointLight,u_AmbientColor,v_PositionWorld,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n\\n#ifdef SPOTLIGHT\\n\tComputeSpotLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_SpotLight,u_AmbientColor,v_PositionWorld,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n\\n#ifdef RECEIVESHADOW\\n\tfloat shadowValue = 1.0;\\n\t#ifdef SHADOWMAP_PSSM3\\n\t\tshadowValue = getShadowPSSM3( u_shadowMap1,u_shadowMap2,u_shadowMap3,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM2\\n\t\tshadowValue = getShadowPSSM2( u_shadowMap1,u_shadowMap2,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t#endif \\n\t#ifdef SHADOWMAP_PSSM1\\n\t\tshadowValue = getShadowPSSM1( u_shadowMap1,v_lightMVPPos,u_shadowPSSMDistance,u_shadowPCFoffset,v_posViewZ,0.001);\\n\t#endif\\n#endif\\n\\n#ifdef AMBIENTMAP\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient+texture2D(u_AmbientTexture, v_LightMapUV).rgb); \\n\t#else\\n\t\t#if defined(RECEIVESHADOW)\\n\t\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient+texture2D(u_AmbientTexture, v_LightMapUV).rgb * shadowValue);\\n\t\t#else\\n\t\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient+texture2D(u_AmbientTexture, v_LightMapUV).rgb); \\n\t\t#endif\\n\t#endif\\n#endif\\n\\n#ifdef LIGHTMAP\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient+texture2D(u_LightMap, v_LightMapUV).rgb); \\n\t#else\\n\t\t#if defined(RECEIVESHADOW)\\n\t\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient+texture2D(u_LightMap, v_LightMapUV).rgb * shadowValue);\\n\t\t#else\\n\t\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient+texture2D(u_LightMap, v_LightMapUV).rgb); \\n\t\t#endif\\n\t#endif\\n#endif\\n\\ngl_FragColor=gl_FragColor*u_Albedo;\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t#if (defined(DIFFUSEMAP)||defined(COLOR))&&defined(SPECULARMAP)\\n\t\tspecular =specular*texture2D(u_SpecularTexture, v_Texcoord0).rgb;\\n    #endif\\n\t#ifdef RECEIVESHADOW\\n\t\tgl_FragColor =vec4( gl_FragColor.rgb*(ambient + diffuse*shadowValue) + specular*shadowValue,gl_FragColor.a);\\n\t#else\\n\t\tgl_FragColor =vec4( gl_FragColor.rgb*(ambient + diffuse) + specular,gl_FragColor.a);\\n\t#endif\\n#endif\\n  \\n#ifdef REFLECTMAP\\n\tvec3 incident = -toEye;\\n\tvec3 reflectionVector = reflect(incident,normal);\\n\tvec3 reflectionColor  = textureCube(u_ReflectTexture,reflectionVector).rgb;\\n\tgl_FragColor.rgb += u_MaterialReflect*reflectionColor;\\n#endif\\n  \\n#ifdef FOG\\n\tfloat lerpFact=clamp((toEyeLength-u_FogStart)/u_FogRange,0.0,1.0);\\n\t#ifdef ADDTIVEFOG\\n\t\tgl_FragColor.rgb=mix(gl_FragColor.rgb,vec3(0.0,0.0,0.0),lerpFact);\\n\t#else\\n\t\tgl_FragColor.rgb=mix(gl_FragColor.rgb,u_FogColor,lerpFact);\\n\t#endif\\n#endif\\n#ifdef DEPTHFOG\\n\tfloat lerpFact = (-v_PositionWorld.y-u_FogStart)/u_FogRange;\\n\tgl_FragColor.rgb=mix(gl_FragColor.rgb,u_FogColor,lerpFact);\\n#endif\\n}\\n\\nvoid main()\\n{\\n#ifdef CASTSHADOW\t\t\\n\tmain_castShadow();\\n#else\\n  main_normal();\\n#endif  \\n}\\n\\n\";\n\t\tshaderCompile=ShaderCompile3D.add(SIMPLE,vs,ps,attributeMap,uniformMap);\n\t\tStandardMaterial.SHADERDEFINE_DIFFUSEMAP=shaderCompile.registerMaterialDefine(\"DIFFUSEMAP\");\n\t\tStandardMaterial.SHADERDEFINE_NORMALMAP=shaderCompile.registerMaterialDefine(\"NORMALMAP\");\n\t\tStandardMaterial.SHADERDEFINE_SPECULARMAP=shaderCompile.registerMaterialDefine(\"SPECULARMAP\");\n\t\tStandardMaterial.SHADERDEFINE_EMISSIVEMAP=shaderCompile.registerMaterialDefine(\"EMISSIVEMAP\");\n\t\tStandardMaterial.SHADERDEFINE_AMBIENTMAP=shaderCompile.registerMaterialDefine(\"AMBIENTMAP\");\n\t\tStandardMaterial.SHADERDEFINE_REFLECTMAP=shaderCompile.registerMaterialDefine(\"REFLECTMAP\");\n\t\tStandardMaterial.SHADERDEFINE_UVTRANSFORM=shaderCompile.registerMaterialDefine(\"UVTRANSFORM\");\n\t\tStandardMaterial.SHADERDEFINE_TILINGOFFSET=shaderCompile.registerMaterialDefine(\"TILINGOFFSET\");\n\t\tStandardMaterial.SHADERDEFINE_ADDTIVEFOG=shaderCompile.registerMaterialDefine(\"ADDTIVEFOG\");\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Color':/*laya.d3.graphics.VertexElementUsage.COLOR0*/1};\n\t\tuniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2]};\n\t\tvar LINE=Shader3D.nameKey.add(\"LINE\");\n\t\tvs=\"attribute vec4 a_Position;\\nuniform mat4 u_MvpMatrix;\\nattribute vec4 a_Color;\\nvarying vec4 v_Color;\\n\\n\\nvoid main()\\n{\\n  gl_Position = u_MvpMatrix * a_Position;\\n  v_Color=a_Color;\\n}\";\n\t\tps=\"#ifdef HIGHPRECISION\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n\\nvarying vec4 v_Color;\\n\\nvoid main()\\n{\\n  gl_FragColor=v_Color; \\n}\\n\\n\";\n\t\tShaderCompile3D.add(LINE,vs,ps,attributeMap,uniformMap);\n\t\tattributeMap={\n\t\t\t'a_position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'tangent':/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5,\n\t\t\t'binormal':/*laya.d3.graphics.VertexElementUsage.BINORMAL0*/4,\n\t\t\t'uv':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_BoneWeights':/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7,\n\t\t\t'a_BoneIndices':/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6,\n\t\t\t'a_Tangent0':/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5};\n\t\tuniformMap={\n\t\t\t'u_Bones':[ /*laya.d3.core.SkinnedMeshSprite3D.BONES*/0,/*laya.d3.shader.Shader3D.PERIOD_RENDERELEMENT*/0],\n\t\t\t'u_lodRect':[ /*laya.d3.core.BaseCamera.SIMLODINFO*/9,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'irrad_mat_red':[ /*laya.d3.core.BaseCamera.DIFFUSEIRRADMATR*/10,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'irrad_mat_green':[ /*laya.d3.core.BaseCamera.DIFFUSEIRRADMATG*/11,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'irrad_mat_blue':[ /*laya.d3.core.BaseCamera.DIFFUSEIRRADMATB*/12,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_hdrexposure':[ /*laya.d3.core.BaseCamera.HDREXPOSURE*/13,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_aoObjPos':[ /*laya.d3.core.material.PBRMaterial.AOOBJPOS*/14,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texBaseColor':[ /*laya.d3.core.material.PBRMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texNormal':[ /*laya.d3.core.material.PBRMaterial.NORMALTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texPbrInfo':[ /*laya.d3.core.material.PBRMaterial.PBRINFOTEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texPrefilterdEnv':[ /*laya.d3.core.BaseCamera.ENVIRONMENTSPECULAR*/8,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'texHSNoise':[ /*laya.d3.core.material.PBRMaterial.HSNOISETEXTURE*/15,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texPrefilterDiff':[ /*laya.d3.core.BaseCamera.ENVIRONMENTDIFFUSE*/7,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_AlphaTestValue':[ /*laya.d3.core.material.BaseMaterial.ALPHATESTVALUE*/0,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texBRDFLUT':[ /*laya.d3.core.material.PBRMaterial.PBRLUTTEXTURE*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_UVAniAge':[ /*laya.d3.core.material.PBRMaterial.UVANIAGE*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_roughness':[ /*laya.d3.core.material.PBRMaterial.MATERIALROUGHNESS*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_metaless':[ /*laya.d3.core.material.PBRMaterial.MATERIALMETALESS*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_UVMatrix':[ /*laya.d3.core.material.PBRMaterial.UVMATRIX*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_UVAge':[ /*laya.d3.core.material.PBRMaterial.UVAGE*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'modelMatrix':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'mvp':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'cameraPosition':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_View':[ /*laya.d3.core.BaseCamera.VIEWMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_Project':[ /*laya.d3.core.BaseCamera.PROJECTMATRIX*/2,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_FogStart':[ /*laya.d3.core.scene.Scene.FOGSTART*/1,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogRange':[ /*laya.d3.core.scene.Scene.FOGRANGE*/2,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogColor':[ /*laya.d3.core.scene.Scene.FOGCOLOR*/0,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Diffuse':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Position':[ /*laya.d3.core.scene.Scene.POINTLIGHTPOS*/5,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Range':[ /*laya.d3.core.scene.Scene.POINTLIGHTRANGE*/6,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Attenuation':[ /*laya.d3.core.scene.Scene.POINTLIGHTATTENUATION*/7,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Diffuse':[ /*laya.d3.core.scene.Scene.POINTLIGHTCOLOR*/8,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Position':[ /*laya.d3.core.scene.Scene.SPOTLIGHTPOS*/9,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Direction':[ /*laya.d3.core.scene.Scene.SPOTLIGHTDIRECTION*/10,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Range':[ /*laya.d3.core.scene.Scene.SPOTLIGHTRANGE*/12,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Spot':[ /*laya.d3.core.scene.Scene.SPOTLIGHTSPOT*/11,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Attenuation':[ /*laya.d3.core.scene.Scene.SPOTLIGHTATTENUATION*/13,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Diffuse':[ /*laya.d3.core.scene.Scene.SPOTLIGHTCOLOR*/14,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap1':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap2':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap3':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE3*/20,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPSSMDistance':[ /*laya.d3.core.scene.Scene.SHADOWDISTANCE*/15,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_lightShadowVP':[ /*laya.d3.core.scene.Scene.SHADOWLIGHTVIEWPROJECT*/16,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPCFoffset':[ /*laya.d3.core.scene.Scene.SHADOWMAPPCFOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]};\n\t\tvar PBR=Shader3D.nameKey.add(\"PBR\");\n\t\tvs=\"\\nuniform mat4 modelMatrix;\\n//uniform mat4 modelViewMatrix;\\n//uniform mat4 projectionMatrix;\\nuniform mat4 u_View;\\nuniform mat4 u_Project;\\nuniform mat4 mvp;\\n//uniform mat4 viewMatrix;\\nuniform vec3 cameraPosition;\\n\\nattribute vec3 a_position;\\nattribute vec3 a_normal;\\n#ifdef HAS_TANGENT\\nattribute vec3 tangent;\\nattribute vec3 binormal;\\n#endif\\nattribute vec2 uv;\\n#ifdef BONE\\nattribute vec4 a_BoneIndices;\\nattribute vec4 a_BoneWeights;\\nconst int c_MaxBoneCount = 24;\\nuniform mat4 u_Bones[c_MaxBoneCount];\\n#endif\\n\\nvarying vec2 vUv;\\nvarying vec3 vWorldNorm;\\nvarying vec4 vViewPos;\\nvarying vec4 vWorldPos;\\nvarying vec3 vLightDir;\\nvarying vec3 vViewDir;\\n#ifdef HAS_TANGENT\\nvarying vec3 vWorldTangent;\\nvarying vec3 vWorldBinormal;\\n#endif\\n\\n#ifdef RECEIVESHADOW\\nvarying float v_posViewZ;\\n  #ifdef SHADOWMAP_PSSM1 \\n  varying vec4 v_lightMVPPos;\\n  uniform mat4 u_lightShadowVP[4];\\n  #endif\\n#endif\\n\\nvoid main() {\\n#ifdef BONE\\n\tmat4 skinTransform=mat4(0.0);\\n\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\tgl_Position = mvp*skinTransform*vec4(a_position,1.);\\n\tmat4 modelMat = modelMatrix*skinTransform;\\n#else\\n\tgl_Position = mvp*vec4(a_position,1.);\\n\tmat4 modelMat = modelMatrix;\\n#endif\t\\n\tvWorldPos = modelMat*vec4(a_position,1.);\\n\\n#ifdef CASTSHADOW \\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tvUv = uv;\\n\t#endif\t\\n#else\\n    vUv = uv;\\n\tvWorldNorm = normalize((modelMat*vec4(a_normal,0.0)).xyz);\\n\t#ifdef HAS_TANGENT\\n\tvWorldTangent = normalize((modelMat*vec4(tangent,0.0)).xyz);\\n\tvWorldBinormal = normalize((modelMat*vec4(binormal,0.0)).xyz);\\n\t#endif\\n    \\n    vViewDir = (vWorldPos.xyz-cameraPosition);//这个不能normalize。否则无法线性差值了\\n#ifdef RECEIVESHADOW\\n\tv_posViewZ = gl_Position.z;\\n\t#ifdef SHADOWMAP_PSSM1 \\n\t\tv_lightMVPPos = u_lightShadowVP[0] * vWorldPos;\\n\t#endif\\n#endif\t\\n#endif\\n}\\n\";\n\t\tps=\"//#version 300 es\\n\\nprecision highp float;\\nprecision lowp int;\\n\\nconst float PI = 3.14159265358979323846264;\\nconst float _2PI = 6.2831853071796;\\nvarying vec2 vUv;\\nvarying vec3 vWorldNorm;\\n#ifdef HAS_TANGENT\\nvarying vec3 vWorldTangent;\\nvarying vec3 vWorldBinormal;\\n#endif\\nvarying vec3 vViewDir;\\nvarying vec4 vViewPos;\\nvarying vec4 vWorldPos;\\n//\\nuniform sampler2D texBaseColor;\\nuniform sampler2D texNormal;\\n//预计算的贴图\\nuniform sampler2D texPrefilterdEnv;\\nuniform sampler2D texBRDFLUT;\\nuniform sampler2D texPrefilterDiff;\\n#ifdef HAS_PBRINFO\\nuniform sampler2D texPbrInfo;   //Ao, Roughness, Metallic\\n#endif\\nuniform float u_hdrexposure;\\nuniform float u_AlphaTestValue;\\n\\nuniform float u_roughness;\\nuniform float u_metaless;\\nconst float maxlv = 7.;\t//现在只支持512分辨率的环境贴图\\nconst int nmaxlv = 9;//\\n\t\t\t\t\t\t\t\\nuniform mat4 irrad_mat_red;\\nuniform mat4 irrad_mat_green;\\nuniform mat4 irrad_mat_blue;\t\t\t\t\t\t\t\\n\\nvec3 speccontrib = vec3(0.);\\n\\nconst float _maxu8 = 255.0;\\nconst float _maxu16 = 65535.0;\\nconst float _shift8 = 256.0;    //平移的话是*256而不是255\\nvec2 _RGBAToU16(const in vec4 rgba){\\n    return vec2((rgba.r*_maxu8+rgba.g*_maxu8*_shift8)/_maxu16, (rgba.b*_maxu8+rgba.a*_maxu8*_shift8)/_maxu16);\\n}\\nvec3 _RGBEToRGB( const in vec4 rgba ){\\n    float f = pow(2.0, rgba.w * 255.0 - (128.0 + 8.0));\\n    return rgba.rgb * (255.0 * f);\\n}\\n\\nfloat saturate(float v){\\n    return min(max(v,0.),1.);\\n}\\n\\nvec4 tex2dLod(sampler2D tex, float u, float v, float lod){\\n\tvec2 uv = vec2(u,v);\\n\tuv+=mod(gl_FragCoord.xy-vec2(0.5),2.0)*vec2(128.,0.);\\n\treturn texture2D(tex,uv,lod-16.);\\n}\\n\\n/*\\n* 对一个全景图进行采样。假设x轴指向中心。\\n*/\\nvec4 texPanorama(sampler2D tex, const in vec3 dir){\\n\tfloat envu = atan(dir.z,dir.x)/_2PI+0.5; \t\\n\tfloat envv = acos(dir.y)/PI;//(1.0-dir.y)/2.0;\\n\treturn texture2D(tex,vec2(envu,envv));\\n}\\n\\nvec4 texPanoramaLod(sampler2D tex, const in vec3 dir, float lod){\\n\tfloat envu = atan(dir.z,dir.x)/_2PI+0.5; \t\\n\tfloat envv = acos(dir.y)/PI;//(1.0-dir.y)/2.0;\\n\treturn tex2dLod(tex,envu,envv,lod);\\n}\\n\\n/*\\n    计算sh光照。\\n    使用level=2，所以需要9个系数。\\n    https://cseweb.ucsd.edu/~ravir/papers/envmap/envmap.pdf\\n*/\\nfloat environment_exposure = 1.0;\\nvec3 diff_sh9(vec3 dir){\\n\tvec4 shDir = vec4(dir.x,-dir.z,dir.y,1.0);\\n  return max(vec3(0.0), vec3(\\n\tdot(shDir, irrad_mat_red * shDir),\\n\tdot(shDir, irrad_mat_green * shDir),\\n\tdot(shDir, irrad_mat_blue * shDir)\\n\t)) * environment_exposure;\t\\n}\\n\\n#ifdef HAS_TANGENT\\nvec3 applyNormalTex( vec3 norm, vec3 surf_norm ) {\\n    vec3 mapN = norm * 2.0 - 1.0;\\n    //mapN.xy = normalScale * mapN.xy;\\n    mat3 tsn = mat3( vWorldTangent, vWorldBinormal, surf_norm );\\n    return normalize( tsn * mapN );\\n}\\n#endif\\n\\nvec4 pbrlight(vec3 normal, float rough, float NoV, vec3 R){\\n    vec4 basecolor = texture2D(texBaseColor,vUv);\\n\tbasecolor.rgb = pow(basecolor.rgb,vec3(2.2));\\n\tfloat metaless = 1.0; \t\\n\tconst float ismetalinfov = (128./255.);\\n\tif(basecolor.a>=ismetalinfov){//这时候表示金属度\\n\t\tmetaless = (basecolor.a-ismetalinfov)*2.;\\n\t\tbasecolor.a = 1.0;\\n\t}else{\\n\t\tmetaless = 0.;\\n\t\tbasecolor.a = basecolor.a*2.0;\\n\t}\\n\t#ifdef FIX_METALESS\\n\tmetaless = u_metaless;\\n\t#endif\\n\t#ifdef HAS_PBRINFO\t\\n\tvec4 pbrinfo = texture2D(texPbrInfo, vUv);\\n\tmetaless = pbrinfo.b;\\n\trough = pbrinfo.g;\\n\t#endif\\n    const vec3 nonmetalF0 =vec3(0.02);\\n    vec3 F0 =  mix(nonmetalF0, basecolor.rgb, metaless);\\n\t\\n    vec4 PrefilteredColor = texPanoramaLod(texPrefilterdEnv, R, rough*maxlv);\\n    PrefilteredColor.rgb = _RGBEToRGB(PrefilteredColor);\\n    vec4 EnvBRDF = texture2D(texBRDFLUT,vec2(rough , NoV));//TODO lod\\n    vec2 rg = _RGBAToU16(EnvBRDF);    \\n    speccontrib = (F0* rg.x + saturate( 50.0 * PrefilteredColor.g ) * rg.y);\\n\tvec3 color_spec = PrefilteredColor.rgb*speccontrib;\\n\t\\n\tvec3 color_diff=diff_sh9(normal);\\n\tvec3 outc =  color_diff*mix(basecolor.rgb,vec3(0.),metaless)*(vec3(1.0)-speccontrib)+color_spec;\\n\t#ifdef HAS_PBRINFO\\n\toutc*=pbrinfo.r;\\n\t#endif\\n\treturn vec4(outc, basecolor.a);\\n}\\n\\nvec3 oldlight(vec4 normal, float NoV, vec3 R){\\n    vec4 basecolor = texture2D(texBaseColor,vUv);\\n\tconst vec3 lightdir=normalize(vec3(1.,1.,0.));\\n\tconst vec3 spcecol = vec3(1.,0.8,0.8);\\n\tconst vec3 amb = vec3(0.5);\\n\tvec3 diffv =  (vec3(saturate(dot(lightdir,normal.xyz)))+amb);\\n\t//vec3 spec = spcecol* pow(saturate(dot(R,lightdir)),(1.-pbrinfo.g)*5.);\\n\treturn diffv*basecolor.rgb;//+spec;\\n}\\n\\n#include \\\"ShadowHelper.glsl\\\"\\n#ifdef RECEIVESHADOW\\nvarying float v_posViewZ;\\n\t#if defined(SHADOWMAP_PSSM2)||defined(SHADOWMAP_PSSM3)\\n\tuniform mat4 u_lightShadowVP[4];\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM1 \\n\tvarying vec4 v_lightMVPPos;\\n\t#endif\\n#endif\\n\\nvoid main() {\\n#ifdef CASTSHADOW\\n\tgl_FragColor=packDepth(gl_FragCoord.w);\\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tfloat alpha = texture2D(texBaseColor,vUv).w;\\n\t\tif( alpha < u_AlphaTestValue ){\\n\t\t\tdiscard;\\n\t\t}\\n\t#endif\\n#else\\n\\n\t#ifdef RECEIVESHADOW\\n\t\tfloat shadowValue = 1.0;\\n\t\t#ifdef SHADOWMAP_PSSM3\\n\t\t\tshadowValue = getShadowPSSM3( u_shadowMap1,u_shadowMap2,u_shadowMap3,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,vWorldPos.xyz,v_posViewZ,0.0001);\\n\t\t#endif\\n\t\t#ifdef SHADOWMAP_PSSM2\\n\t\t\tshadowValue = getShadowPSSM2( u_shadowMap1,u_shadowMap2,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,vWorldPos.xyz,v_posViewZ,0.0001);\\n\t\t#endif \\n\t\t#ifdef SHADOWMAP_PSSM1\\n\t\t\tshadowValue = getShadowPSSM1( u_shadowMap1,v_lightMVPPos,u_shadowPSSMDistance,u_shadowPCFoffset,v_posViewZ,0.0001);\\n\t\t#endif\\n\t#endif\t\\n\t\\n    vec3 normal =  normalize(vWorldNorm);\\n\tvec4 normtex = texture2D( texNormal, vUv );\\n\t#ifdef HAS_TANGENT\t\\n\tnormal = applyNormalTex(normtex.xyz, normal);\\n\t#endif\\n    vec3 view   = -normalize(vViewDir);\\n    float NoV = saturate(dot( view, normal ));\\n    vec3 R = 2. * NoV * normal - view;\\n\tfloat roughness = normtex.a;\\n\t#ifdef FIX_ROUGHNESS\\n\troughness = u_roughness;\\n\t#endif\\n\t\\n\tvec4 pbrl = pbrlight(normal,roughness,NoV,R)*u_hdrexposure;\\n    gl_FragColor.rgb =  pow(pbrl.rgb,vec3(0.45455));\\n\t//gl_FragColor.rgb = oldlight(normtex,NoV,R);\\n\t#ifdef RECEIVESHADOW\\n\tgl_FragColor.rgb *= max(shadowValue,0.7);\\n\t#endif\\n\t\\n    gl_FragColor.a = pbrl.a;\\n\\n#endif\\n}\\n\";\n\t\tshaderCompile=ShaderCompile3D.add(PBR,vs,ps,attributeMap,uniformMap);\n\t\tPBRMaterial.SHADERDEFINE_FIX_METALESS=shaderCompile.registerMaterialDefine(\"FIX_METALESS\");\n\t\tPBRMaterial.SHADERDEFINE_FIX_ROUGHNESS=shaderCompile.registerMaterialDefine(\"FIX_ROUGHNESS\");\n\t\tPBRMaterial.SHADERDEFINE_HAS_TANGENT=shaderCompile.registerMaterialDefine(\"HAS_TANGENT\");\n\t\tPBRMaterial.SHADERDEFINE_HAS_PBRINFO=shaderCompile.registerMaterialDefine(\"HAS_PBRINFO\");\n\t\tPBRMaterial.SHADERDEFINE_USE_GROUNDTRUTH=shaderCompile.registerMaterialDefine(\"USE_GROUNDTRUTH\");\n\t\tPBRMaterial.SHADERDEFINE_TEST_CLIPZ=shaderCompile.registerMaterialDefine(\"CLIPZ\");\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Tangent0':/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_BoneWeights':/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7,\n\t\t\t'a_BoneIndices':/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6\n\t\t};\n\t\tuniformMap={\n\t\t\t'u_Bones':[ /*laya.d3.core.SkinnedMeshSprite3D.BONES*/0,/*laya.d3.shader.Shader3D.PERIOD_RENDERELEMENT*/0],\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WorldMat':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPos':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_AlphaTestValue':[ /*laya.d3.core.material.BaseMaterial.ALPHATESTVALUE*/0,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseColor':[ /*laya.d3.core.material.PBRStandardMaterial.DIFFUSECOLOR*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_EmissionColor':[ /*laya.d3.core.material.PBRStandardMaterial.EMISSIONCOLOR*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture':[ /*laya.d3.core.material.PBRStandardMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_NormalTexture':[ /*laya.d3.core.material.PBRStandardMaterial.NORMALTEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_ParallaxTexture':[ /*laya.d3.core.material.PBRStandardMaterial.PARALLAXTEXTURE*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MetallicGlossTexture':[ /*laya.d3.core.material.PBRStandardMaterial.METALLICGLOSSTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_OcclusionTexture':[ /*laya.d3.core.material.PBRStandardMaterial.OCCLUSIONTEXTURE*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_EmissionTexture':[ /*laya.d3.core.material.PBRStandardMaterial.EMISSIONTEXTURE*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_metallic':[ /*laya.d3.core.material.PBRStandardMaterial.METALLIC*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_smoothness':[ /*laya.d3.core.material.PBRStandardMaterial.SMOOTHNESS*/10,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_smoothnessScale':[ /*laya.d3.core.material.PBRStandardMaterial.SMOOTHNESSSCALE*/11,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_occlusionStrength':[ /*laya.d3.core.material.PBRStandardMaterial.OCCLUSIONSTRENGTH*/13,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_normalScale':[ /*laya.d3.core.material.PBRStandardMaterial.NORMALSCALE*/14,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_parallaxScale':[ /*laya.d3.core.material.PBRStandardMaterial.PARALLAXSCALE*/15,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset':[ /*laya.d3.core.material.PBRStandardMaterial.TILINGOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Color':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_AmbientColor':[ /*laya.d3.core.scene.Scene.AMBIENTCOLOR*/21,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap1':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap2':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap3':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE3*/20,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPSSMDistance':[ /*laya.d3.core.scene.Scene.SHADOWDISTANCE*/15,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_lightShadowVP':[ /*laya.d3.core.scene.Scene.SHADOWLIGHTVIEWPROJECT*/16,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPCFoffset':[ /*laya.d3.core.scene.Scene.SHADOWMAPPCFOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]\n\t\t};\n\t\tvar PBRStandard=Shader3D.nameKey.add(\"PBRStandard\");\n\t\tvs=\"attribute vec4 a_Position;\\nattribute vec3 a_Normal;\\nattribute vec4 a_Tangent0;\\nattribute vec2 a_Texcoord0;\\n\\nuniform mat4 u_MvpMatrix;\\nuniform mat4 u_WorldMat;\\nuniform vec3 u_CameraPos;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec3 v_Normal;\\nvarying vec3 v_Tangent;\\nvarying vec3 v_Binormal;\\nvarying vec3 v_ViewDir;\\nvarying vec3 v_PositionWorld;\\n\\n#ifdef TILINGOFFSET\\n\tuniform vec4 u_TilingOffset;\\n#endif\\n\\nvarying float v_posViewZ;\\n#ifdef RECEIVESHADOW\\n  #ifdef SHADOWMAP_PSSM1 \\n\t  varying vec4 v_lightMVPPos;\\n\t  uniform mat4 u_lightShadowVP[4];\\n  #endif\\n#endif\\n\\n#ifdef BONE\\n\tconst int c_MaxBoneCount = 24;\\n\tattribute vec4 a_BoneIndices;\\n\tattribute vec4 a_BoneWeights;\\n\tuniform mat4 u_Bones[c_MaxBoneCount];\\n#endif\\n\\nvoid main_castShadow()\\n{\\n\t#ifdef BONE\\n\t\tmat4 skinTransform=mat4(0.0);\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\t\tvec4 position = skinTransform * a_Position;\\n\t\tgl_Position = u_MvpMatrix * position;\\n\t#else\\n\t\tgl_Position = u_MvpMatrix * a_Position;\\n\t#endif\\n\t \\n\t//TODO没考虑UV动画呢\\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tv_Texcoord0 = a_Texcoord0;\\n\t#endif\\n\t\tv_posViewZ = gl_Position.z;\\n}\\n\\nvoid main_normal()\\n{\\n\tmat3 worldMat;\\n\t#ifdef BONE\\n\t\tmat4 skinTransform = mat4(0.0);\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\t\tvec4 position = skinTransform * a_Position;\\n\t\tgl_Position = u_MvpMatrix * position;\\n\t\tworldMat=mat3(u_WorldMat*skinTransform);\\n\t\tv_PositionWorld = (u_WorldMat * position).xyz;\\n\t#else\\n\t\tgl_Position = u_MvpMatrix * a_Position;\\n\t\tworldMat = mat3(u_WorldMat);\\n\t\tv_PositionWorld = (u_WorldMat * a_Position).xyz;\\n\t#endif\\n\t\\n\tv_Normal = worldMat * a_Normal;\\n\tv_Tangent = worldMat * a_Tangent0.xyz;\\n\tv_Binormal = cross(v_Normal, v_Tangent) * a_Tangent0.w;\\n  \\n\tv_Texcoord0 = a_Texcoord0;\\n\t#ifdef TILINGOFFSET\\n\t\tv_Texcoord0=(vec2(v_Texcoord0.x,v_Texcoord0.y-1.0)*u_TilingOffset.xy)+u_TilingOffset.zw;\\n\t#endif\\n\t\tv_Texcoord0=vec2(v_Texcoord0.x,1.0 + v_Texcoord0.y);\\n  \\n\tv_ViewDir = u_CameraPos - v_PositionWorld;\\n  \\n\t#ifdef RECEIVESHADOW\\n\t\tv_posViewZ = gl_Position.w;\\n\t\t#ifdef SHADOWMAP_PSSM1 \\n\t\t\tv_lightMVPPos = u_lightShadowVP[0] * vec4(v_PositionWorld,1.0);\\n\t\t#endif\\n\t#endif\\n}\\n\\nvoid main()\\n{\\n\t#ifdef CASTSHADOW\\n\t\tmain_castShadow();\\n\t#else\\n\t\tmain_normal();\\n\t#endif\\n}\";\n\t\tps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec3 v_Normal;\\nvarying vec3 v_Tangent;\\nvarying vec3 v_Binormal;\\nvarying vec3 v_ViewDir;\\n\\nuniform vec3 u_AmbientColor;\\nuniform vec4 u_DiffuseColor;\\n\\n#ifdef DIFFUSETEXTURE\\n\tuniform sampler2D u_DiffuseTexture;\\n#endif\\n#ifdef METALLICGLOSSTEXTURE\\n\tuniform sampler2D u_MetallicGlossTexture;\\n#endif\\n#ifdef NORMALTEXTURE\\n\tuniform sampler2D u_NormalTexture;\\n\tuniform float u_normalScale;\\n#endif\\n#ifdef PARALLAXTEXTURE\\n\tuniform sampler2D u_ParallaxTexture;\\n\tuniform float u_parallaxScale;\\n#endif\\n#ifdef OCCLUSIONTEXTURE\\n\tuniform sampler2D u_OcclusionTexture;\\n\tuniform float u_occlusionStrength;\\n#endif\\n#ifdef EMISSION\\n\t#ifdef EMISSIONTEXTURE\\n\t\tuniform sampler2D u_EmissionTexture;\\n\t#endif\\n\tuniform vec4 u_EmissionColor;\\n#endif\\n\\nuniform float u_AlphaTestValue;\\nuniform float u_metallic;\\nuniform float u_smoothness;\\nuniform float u_smoothnessScale;\\n\\n#include \\\"PBRStandardLighting.glsl\\\"\\n#include \\\"ShadowHelper.glsl\\\"\\n\\nvarying float v_posViewZ;\\n#ifdef RECEIVESHADOW\\n\t#if defined(SHADOWMAP_PSSM2)||defined(SHADOWMAP_PSSM3)\\n\t\tuniform mat4 u_lightShadowVP[4];\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM1 \\n\t\tvarying vec4 v_lightMVPPos;\\n\t#endif\\n#endif\\n\\nuniform DirectionLight u_DirectionLight;\\n\\nvoid main_castShadow()\\n{\\n\tgl_FragColor=packDepth(v_posViewZ);\\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tfloat alpha = texture2D(u_DiffuseTexture,v_Texcoord0).w;\\n\t\tif( alpha < u_AlphaTestValue )\\n\t\t{\\n\t\t\tdiscard;\\n\t\t}\\n\t#endif\\n}\\n\\nvoid main_normal()\\n{\t\\n\tvec3 viewDir = normalize(v_ViewDir);\\n\t\\n\tvec2 uv0 = ParallaxOffset(viewDir);\\n\t\\n\tvec2 mg;\\n\t#ifdef DIFFUSETEXTURE\\n\t\tvec4 diffuseTextureColor = texture2D(u_DiffuseTexture, uv0);\\n\t\tvec4 diffuseColor = diffuseTextureColor * u_DiffuseColor;\\n\t\tmg = MetallicGloss(diffuseTextureColor.a, uv0);\\n\t#else\\n\t\tvec4 diffuseColor = u_DiffuseColor;\\n\t\tmg = MetallicGloss(1.0, uv0);\\n\t#endif\\n\t\\n\t#ifdef ALPHATEST\\n\t\tif(diffuseColor.a < u_AlphaTestValue)\\n\t\t\tdiscard;\\n\t#endif\\n\t\\n\tgl_FragColor = diffuseColor;\\n\t\\n\tvec3 normal = UnpackScaleNormal(uv0);\\n  \\n\tvec3 gi =  u_AmbientColor * Occlusion(uv0).rgb;\\n  \\n\tvec4 color = PBRStandardDiectionLight(diffuseColor.rgb, mg.r, mg.g, normal, viewDir, u_DirectionLight, gi);\\n\t\\n\tcolor.a = diffuseColor.a;\\n\t\\n\t#ifdef EMISSION\\n\t\tvec4 emissionColor = u_EmissionColor;\\n\t\t#ifdef EMISSIONTEXTURE\\n\t\t\temissionColor *=  texture2D(u_EmissionTexture, uv0);\\n\t\t#endif\\n\t\tcolor.rgb += emissionColor.rgb;\\n\t#endif\\n\t\\n\t#ifdef RECEIVESHADOW\\n\t\tfloat shadowValue = 1.0;\\n\t\t#ifdef SHADOWMAP_PSSM3\\n\t\t\tshadowValue = getShadowPSSM3( u_shadowMap1,u_shadowMap2,u_shadowMap3,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t\t#endif\\n\t\t#ifdef SHADOWMAP_PSSM2\\n\t\t\tshadowValue = getShadowPSSM2( u_shadowMap1,u_shadowMap2,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t\t#endif \\n\t\t#ifdef SHADOWMAP_PSSM1\\n\t\t\tshadowValue = getShadowPSSM1( u_shadowMap1,v_lightMVPPos,u_shadowPSSMDistance,u_shadowPCFoffset,v_posViewZ,0.001);\\n\t\t#endif\\n\t\tgl_FragColor = vec4(color.rgb * shadowValue, color.a);\\n\t#else\\n\t\tgl_FragColor = color;\\n\t#endif\\n}\\n\\nvoid main()\\n{\\n\t#ifdef CASTSHADOW\t\t\\n\t\tmain_castShadow();\\n\t#else\\n\t\tmain_normal();\\n\t#endif  \\n}\\n\\n\";\n\t\tshaderCompile=ShaderCompile3D.add(PBRStandard,vs,ps,attributeMap,uniformMap);\n\t\tPBRStandardMaterial.SHADERDEFINE_DIFFUSETEXTURE=shaderCompile.registerMaterialDefine(\"DIFFUSETEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_METALLICGLOSSTEXTURE=shaderCompile.registerMaterialDefine(\"METALLICGLOSSTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA=shaderCompile.registerMaterialDefine(\"SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA\");\n\t\tPBRStandardMaterial.SHADERDEFINE_NORMALTEXTURE=shaderCompile.registerMaterialDefine(\"NORMALTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_PARALLAXTEXTURE=shaderCompile.registerMaterialDefine(\"PARALLAXTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_OCCLUSIONTEXTURE=shaderCompile.registerMaterialDefine(\"OCCLUSIONTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_EMISSION=shaderCompile.registerMaterialDefine(\"EMISSION\");\n\t\tPBRStandardMaterial.SHADERDEFINE_EMISSIONTEXTURE=shaderCompile.registerMaterialDefine(\"EMISSIONTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_TILINGOFFSET=shaderCompile.registerMaterialDefine(\"TILINGOFFSET\");\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Tangent0':/*laya.d3.graphics.VertexElementUsage.TANGENT0*/5,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_BoneWeights':/*laya.d3.graphics.VertexElementUsage.BLENDWEIGHT0*/7,\n\t\t\t'a_BoneIndices':/*laya.d3.graphics.VertexElementUsage.BLENDINDICES0*/6\n\t\t};\n\t\tuniformMap={\n\t\t\t'u_Bones':[ /*laya.d3.core.SkinnedMeshSprite3D.BONES*/0,/*laya.d3.shader.Shader3D.PERIOD_RENDERELEMENT*/0],\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WorldMat':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPos':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_AlphaTestValue':[ /*laya.d3.core.material.BaseMaterial.ALPHATESTVALUE*/0,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseColor':[ /*laya.d3.core.material.PBRSpecularMaterial.DIFFUSECOLOR*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SpecularColor':[ /*laya.d3.core.material.PBRSpecularMaterial.SPECULARCOLOR*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_EmissionColor':[ /*laya.d3.core.material.PBRSpecularMaterial.EMISSIONCOLOR*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture':[ /*laya.d3.core.material.PBRSpecularMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_NormalTexture':[ /*laya.d3.core.material.PBRSpecularMaterial.NORMALTEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_ParallaxTexture':[ /*laya.d3.core.material.PBRSpecularMaterial.PARALLAXTEXTURE*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SpecularTexture':[ /*laya.d3.core.material.PBRSpecularMaterial.SPECULARTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_OcclusionTexture':[ /*laya.d3.core.material.PBRSpecularMaterial.OCCLUSIONTEXTURE*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_EmissionTexture':[ /*laya.d3.core.material.PBRSpecularMaterial.EMISSIONTEXTURE*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_smoothness':[ /*laya.d3.core.material.PBRSpecularMaterial.SMOOTHNESS*/10,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_smoothnessScale':[ /*laya.d3.core.material.PBRSpecularMaterial.SMOOTHNESSSCALE*/11,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_occlusionStrength':[ /*laya.d3.core.material.PBRSpecularMaterial.OCCLUSIONSTRENGTH*/13,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_normalScale':[ /*laya.d3.core.material.PBRSpecularMaterial.NORMALSCALE*/14,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_parallaxScale':[ /*laya.d3.core.material.PBRSpecularMaterial.PARALLAXSCALE*/15,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset':[ /*laya.d3.core.material.PBRSpecularMaterial.TILINGOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Color':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_AmbientColor':[ /*laya.d3.core.scene.Scene.AMBIENTCOLOR*/21,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap1':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap2':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap3':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE3*/20,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPSSMDistance':[ /*laya.d3.core.scene.Scene.SHADOWDISTANCE*/15,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_lightShadowVP':[ /*laya.d3.core.scene.Scene.SHADOWLIGHTVIEWPROJECT*/16,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPCFoffset':[ /*laya.d3.core.scene.Scene.SHADOWMAPPCFOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]\n\t\t};\n\t\tvar PBRSpecular=Shader3D.nameKey.add(\"PBRSpecular\");\n\t\tvs=\"attribute vec4 a_Position;\\nattribute vec3 a_Normal;\\nattribute vec4 a_Tangent0;\\nattribute vec2 a_Texcoord0;\\n\\nuniform mat4 u_MvpMatrix;\\nuniform mat4 u_WorldMat;\\nuniform vec3 u_CameraPos;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec3 v_Normal;\\nvarying vec3 v_Tangent;\\nvarying vec3 v_Binormal;\\nvarying vec3 v_ViewDir;\\nvarying vec3 v_PositionWorld;\\n\\n#ifdef TILINGOFFSET\\n\tuniform vec4 u_TilingOffset;\\n#endif\\n\\nvarying float v_posViewZ;\\n#ifdef RECEIVESHADOW\\n  #ifdef SHADOWMAP_PSSM1 \\n\t  varying vec4 v_lightMVPPos;\\n\t  uniform mat4 u_lightShadowVP[4];\\n  #endif\\n#endif\\n\\n#ifdef BONE\\n\tconst int c_MaxBoneCount = 24;\\n\tattribute vec4 a_BoneIndices;\\n\tattribute vec4 a_BoneWeights;\\n\tuniform mat4 u_Bones[c_MaxBoneCount];\\n#endif\\n\\nvoid main_castShadow()\\n{\\n\t#ifdef BONE\\n\t\tmat4 skinTransform=mat4(0.0);\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\t\tvec4 position = skinTransform * a_Position;\\n\t\tgl_Position = u_MvpMatrix * position;\\n\t#else\\n\t\tgl_Position = u_MvpMatrix * a_Position;\\n\t#endif\\n\t \\n\t//TODO没考虑UV动画呢\\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tv_Texcoord0 = a_Texcoord0;\\n\t#endif\\n\t\tv_posViewZ = gl_Position.z;\\n}\\n\\nvoid main_normal()\\n{\\n\tmat3 worldMat;\\n\t#ifdef BONE\\n\t\tmat4 skinTransform = mat4(0.0);\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.x)] * a_BoneWeights.x;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.y)] * a_BoneWeights.y;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.z)] * a_BoneWeights.z;\\n\t\tskinTransform += u_Bones[int(a_BoneIndices.w)] * a_BoneWeights.w;\\n\t\tvec4 position = skinTransform * a_Position;\\n\t\tgl_Position = u_MvpMatrix * position;\\n\t\tworldMat=mat3(u_WorldMat*skinTransform);\\n\t\tv_PositionWorld = (u_WorldMat * position).xyz;\\n\t#else\\n\t\tgl_Position = u_MvpMatrix * a_Position;\\n\t\tworldMat = mat3(u_WorldMat);\\n\t\tv_PositionWorld = (u_WorldMat * a_Position).xyz;\\n\t#endif\\n\t\\n\tv_Normal = worldMat * a_Normal;\\n\tv_Tangent = worldMat * a_Tangent0.xyz;\\n\tv_Binormal = cross(v_Normal, v_Tangent) * a_Tangent0.w;\\n  \\n\tv_Texcoord0 = a_Texcoord0;\\n\t#ifdef TILINGOFFSET\\n\t\tv_Texcoord0=(vec2(v_Texcoord0.x,v_Texcoord0.y-1.0)*u_TilingOffset.xy)+u_TilingOffset.zw;\\n\t#endif\\n\t\tv_Texcoord0=vec2(v_Texcoord0.x,1.0 + v_Texcoord0.y);\\n  \\n\tv_ViewDir = u_CameraPos - v_PositionWorld;\\n  \\n\t#ifdef RECEIVESHADOW\\n\t\tv_posViewZ = gl_Position.w;\\n\t\t#ifdef SHADOWMAP_PSSM1 \\n\t\t\tv_lightMVPPos = u_lightShadowVP[0] * vec4(v_PositionWorld,1.0);\\n\t\t#endif\\n\t#endif\\n}\\n\\nvoid main()\\n{\\n\t#ifdef CASTSHADOW\\n\t\tmain_castShadow();\\n\t#else\\n\t\tmain_normal();\\n\t#endif\\n}\";\n\t\tps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec3 v_Normal;\\nvarying vec3 v_Tangent;\\nvarying vec3 v_Binormal;\\nvarying vec3 v_ViewDir;\\n\\nuniform vec3 u_AmbientColor;\\nuniform vec4 u_DiffuseColor;\\nuniform vec4 u_SpecularColor;\\n\\n#ifdef DIFFUSETEXTURE\\n\tuniform sampler2D u_DiffuseTexture;\\n#endif\\n#ifdef SPECULARTEXTURE\\n\tuniform sampler2D u_SpecularTexture;\\n#endif\\n#ifdef NORMALTEXTURE\\n\tuniform sampler2D u_NormalTexture;\\n\tuniform float u_normalScale;\\n#endif\\n#ifdef PARALLAXTEXTURE\\n\tuniform sampler2D u_ParallaxTexture;\\n\tuniform float u_parallaxScale;\\n#endif\\n#ifdef OCCLUSIONTEXTURE\\n\tuniform sampler2D u_OcclusionTexture;\\n\tuniform float u_occlusionStrength;\\n#endif\\n#ifdef EMISSION\\n\t#ifdef EMISSIONTEXTURE\\n\t\tuniform sampler2D u_EmissionTexture;\\n\t#endif\\n\tuniform vec4 u_EmissionColor;\\n#endif\\n\\nuniform float u_AlphaTestValue;\\nuniform float u_metallic;\\nuniform float u_smoothness;\\nuniform float u_smoothnessScale;\\n\\n#include \\\"PBRSpecularLighting.glsl\\\"\\n#include \\\"ShadowHelper.glsl\\\"\\n\\nvarying float v_posViewZ;\\n#ifdef RECEIVESHADOW\\n\t#if defined(SHADOWMAP_PSSM2)||defined(SHADOWMAP_PSSM3)\\n\t\tuniform mat4 u_lightShadowVP[4];\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM1 \\n\t\tvarying vec4 v_lightMVPPos;\\n\t#endif\\n#endif\\n\\nuniform DirectionLight u_DirectionLight;\\n\\nvoid main_castShadow()\\n{\\n\tgl_FragColor=packDepth(v_posViewZ);\\n\t#if defined(DIFFUSEMAP)&&defined(ALPHATEST)\\n\t\tfloat alpha = texture2D(u_DiffuseTexture,v_Texcoord0).w;\\n\t\tif( alpha < u_AlphaTestValue )\\n\t\t{\\n\t\t\tdiscard;\\n\t\t}\\n\t#endif\\n}\\n\\nvoid main_normal()\\n{\t\\n\tvec3 viewDir = normalize(v_ViewDir);\\n\t\\n\tvec2 uv0 = ParallaxOffset(viewDir);\\n\t\\n\tvec4 sg;\\n\t#ifdef DIFFUSETEXTURE\\n\t\tvec4 diffuseTextureColor = texture2D(u_DiffuseTexture, uv0);\\n\t\tvec4 diffuseColor = diffuseTextureColor * u_DiffuseColor;\\n\t\tsg = SpecularGloss(diffuseTextureColor.a, uv0);\\n\t#else\\n\t\tvec4 diffuseColor = u_DiffuseColor;\\n\t\tsg = SpecularGloss(1.0, uv0);\\n\t#endif\\n\t\\n\t#ifdef ALPHATEST\\n\t\tif(diffuseColor.a < u_AlphaTestValue)\\n\t\t\tdiscard;\\n\t#endif\\n  \\n\tvec3 normal = UnpackScaleNormal(uv0);\\n\t\\n\tvec3 gi =  u_AmbientColor * Occlusion(uv0).rgb;\\n\t\\n\t//float a = (sg.r+sg.g+sg.b) / 3.0;\\n  \\n\tvec4 color = PBRSpecularDiectionLight(diffuseColor.rgb, sg.rgb, sg.a, normal,viewDir, u_DirectionLight, gi);\\n\t\\n\tcolor.a = diffuseColor.a;\\n\t\\n\t#ifdef EMISSION\\n\t\tvec4 emissionColor = u_EmissionColor;\\n\t\t#ifdef EMISSIONTEXTURE\\n\t\t\temissionColor *=  texture2D(u_EmissionTexture, uv0);\\n\t\t#endif\\n\t\tcolor.rgb += emissionColor.rgb;\\n\t#endif\\n\t\\n\t#ifdef RECEIVESHADOW\\n\t\tfloat shadowValue = 1.0;\\n\t\t#ifdef SHADOWMAP_PSSM3\\n\t\t\tshadowValue = getShadowPSSM3( u_shadowMap1,u_shadowMap2,u_shadowMap3,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t\t#endif\\n\t\t#ifdef SHADOWMAP_PSSM2\\n\t\t\tshadowValue = getShadowPSSM2( u_shadowMap1,u_shadowMap2,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t\t#endif \\n\t\t#ifdef SHADOWMAP_PSSM1\\n\t\t\tshadowValue = getShadowPSSM1( u_shadowMap1,v_lightMVPPos,u_shadowPSSMDistance,u_shadowPCFoffset,v_posViewZ,0.001);\\n\t\t#endif\\n\t\tgl_FragColor = vec4(color.rgb * shadowValue, color.a);\\n\t#else\\n\t\tgl_FragColor = color;\\n\t#endif\\n}\\n\\nvoid main()\\n{\\n\t#ifdef CASTSHADOW\t\t\\n\t\tmain_castShadow();\\n\t#else\\n\t\tmain_normal();\\n\t#endif  \\n}\\n\\n\";\n\t\tshaderCompile=ShaderCompile3D.add(PBRSpecular,vs,ps,attributeMap,uniformMap);\n\t\tPBRSpecularMaterial.SHADERDEFINE_DIFFUSETEXTURE=shaderCompile.registerMaterialDefine(\"DIFFUSETEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_SPECULARTEXTURE=shaderCompile.registerMaterialDefine(\"SPECULARTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA=shaderCompile.registerMaterialDefine(\"SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_NORMALTEXTURE=shaderCompile.registerMaterialDefine(\"NORMALTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_PARALLAXTEXTURE=shaderCompile.registerMaterialDefine(\"PARALLAXTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_OCCLUSIONTEXTURE=shaderCompile.registerMaterialDefine(\"OCCLUSIONTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_EMISSION=shaderCompile.registerMaterialDefine(\"EMISSION\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_EMISSIONTEXTURE=shaderCompile.registerMaterialDefine(\"EMISSIONTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_TILINGOFFSET=shaderCompile.registerMaterialDefine(\"TILINGOFFSET\");\n\t\tattributeMap={\n\t\t\t'a_position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'uv':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2};\n\t\tuniformMap={\n\t\t\t'irrad_mat_red':[ /*laya.d3.core.BaseCamera.DIFFUSEIRRADMATR*/10,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'irrad_mat_green':[ /*laya.d3.core.BaseCamera.DIFFUSEIRRADMATG*/11,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'irrad_mat_blue':[ /*laya.d3.core.BaseCamera.DIFFUSEIRRADMATB*/12,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_hdrexposure':[ /*laya.d3.core.BaseCamera.HDREXPOSURE*/13,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'texBaseColor':[ /*laya.d3.core.material.WaterMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texNormal':[ /*laya.d3.core.material.WaterMaterial.NORMALTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texSky':[ /*laya.d3.core.material.WaterMaterial.SKYTEXTURE*/11,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texUnderWater':[ /*laya.d3.core.material.WaterMaterial.UNDERWATERTEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texPrefilterdEnv':[ /*laya.d3.core.BaseCamera.ENVIRONMENTSPECULAR*/8,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'texPrefilterDiff':[ /*laya.d3.core.BaseCamera.ENVIRONMENTDIFFUSE*/7,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'texWaterDisp':[ /*laya.d3.core.material.WaterMaterial.VERTEXDISPTEXTURE*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texWaveDetail':[ /*laya.d3.core.material.WaterMaterial.DETAILTEXTURE*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texDeepColor':[ /*laya.d3.core.material.WaterMaterial.DEEPCOLORTEXTURE*/10,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texWaterInfo':[ /*laya.d3.core.material.WaterMaterial.WATERINFO*/16,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'texFoam':[ /*laya.d3.core.material.WaterMaterial.FOAMTEXTURE*/17,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'GEOWAVE_UV_SCALE':[ /*laya.d3.core.material.WaterMaterial.GEOWAVE_UV_SCALE*/18,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'modelMatrix':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'mvp':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'cameraPosition':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_curTm':[ /*laya.d3.core.material.WaterMaterial.CURTM*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_scrsize':[ /*laya.d3.core.material.WaterMaterial.SCRSIZE*/15,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WaveInfoD':[ /*laya.d3.core.material.WaterMaterial.WAVEINFOD*/13,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WaveInfo':[ /*laya.d3.core.material.WaterMaterial.WAVEINFO*/12,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WaveMainDir':[ /*laya.d3.core.material.WaterMaterial.WAVEMAINDIR*/14,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DeepScale':[ /*laya.d3.core.material.WaterMaterial.WAVEINFODEEPSCALE*/20,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SeaColor':[ /*laya.d3.core.material.WaterMaterial.SEA_COLOR*/19,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_View':[ /*laya.d3.core.BaseCamera.VIEWMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_Project':[ /*laya.d3.core.BaseCamera.PROJECTMATRIX*/2,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_FogStart':[ /*laya.d3.core.scene.Scene.FOGSTART*/1,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogRange':[ /*laya.d3.core.scene.Scene.FOGRANGE*/2,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogColor':[ /*laya.d3.core.scene.Scene.FOGCOLOR*/0,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Diffuse':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Position':[ /*laya.d3.core.scene.Scene.POINTLIGHTPOS*/5,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Range':[ /*laya.d3.core.scene.Scene.POINTLIGHTRANGE*/6,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Attenuation':[ /*laya.d3.core.scene.Scene.POINTLIGHTATTENUATION*/7,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Diffuse':[ /*laya.d3.core.scene.Scene.POINTLIGHTCOLOR*/8,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Position':[ /*laya.d3.core.scene.Scene.SPOTLIGHTPOS*/9,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Direction':[ /*laya.d3.core.scene.Scene.SPOTLIGHTDIRECTION*/10,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Range':[ /*laya.d3.core.scene.Scene.SPOTLIGHTRANGE*/12,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Spot':[ /*laya.d3.core.scene.Scene.SPOTLIGHTSPOT*/11,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Attenuation':[ /*laya.d3.core.scene.Scene.SPOTLIGHTATTENUATION*/13,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Diffuse':[ /*laya.d3.core.scene.Scene.SPOTLIGHTCOLOR*/14,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]};\n\t\tvar Water=Shader3D.nameKey.add(\"Water\");\n\t\tvs=\"\\nuniform mat4 modelMatrix;\\n//uniform mat4 modelViewMatrix;\\n//uniform mat4 projectionMatrix;\\nuniform mat4 u_View;\\nuniform mat4 u_Project;\\nuniform mat4 mvp;\\n//uniform mat4 viewMatrix;\\nuniform vec3 cameraPosition;\\nuniform float u_curTm;\\n\\nattribute vec3 a_position;\\nattribute vec3 a_normal;\\nattribute vec2 uv;\\n//uniform sampler2D texWaterDisp;\\n#ifdef USE_VERTEX_DEEPINFO\\n#else\\nuniform sampler2D texWaterInfo;\\nvarying vec4 vWaterInfo;\\nuniform float u_DeepScale;//texWaterInfo.r*vDeepScale\\n#endif\\nuniform float u_WaveMainDir;\t//主波方向\\nuniform float GEOWAVE_UV_SCALE ;//= 100.0;\\n\\n\\nvarying vec2 vUv;\\nvarying vec3 vWorldNorm;\\nvarying vec3 vWorldTan;\\nvarying vec3 vWorldBin;\\nvarying vec4 vViewPos;\\nvarying vec4 vWorldPos;\\nvarying vec3 vLightDir;\\nvarying vec3 vViewDir;\\nvarying vec3 vDisp;\\nvarying float fDeep;\\nvarying mat2 matUVTrans;\\nvarying float fFoam;\\n\\nconst float PI = 3.14159265358979323846264;\\n\\n#include \\\"WaveFunction.glsl\\\"\\n\\nvec2 getPosFromUV(vec2 uv){\\n\treturn uv*50.;\\n}\\n\\nvoid main() {\\n\tvec3 pos = a_position;\\n    vUv = uv;\\n\t\\n\t//vDisp = texture2D(texWaterDisp,uv).rgb;\\n\t//vec3 disp = vDisp;\\n\t\\n\t//TODO 这里有个潜规则。\\n\tfloat tt = pos.y; pos.y=pos.z; pos.z=-tt;\\n\t\\n\t#ifdef USE_VERTEX_DEEPINFO\\n\tfDeep = -pos.y;\\n\tpos.y=0.0;\\n\t#else\\n\tvWaterInfo = texture2D(texWaterInfo,uv);\\n\tfDeep = vWaterInfo.r*u_DeepScale;\\n\t#endif\\n\t\\n\t\\n\t//计算波形\\n\tmat4 modelMat = modelMatrix;\\n\tvec3 opos, T,B,N;\\n\tfloat foams=0.;\\n\tvec2 uvpos = uv*GEOWAVE_UV_SCALE+vec2(modelMat[3][0],0.);//TODO 如果有旋转缩放怎么办\\n\tcalcGerstnerWave(u_curTm, pos,fDeep, uvpos,opos,B,T,N,foams);\\n\tfFoam = foams;\\n\tgl_Position = mvp*vec4(opos,1.);\\n\tvWorldPos = modelMat*vec4(opos,1.);\\n\\n\tvWorldNorm = normalize((modelMatrix*vec4(N,0.0)).xyz);\\n\tvWorldTan = normalize((modelMatrix*vec4(T,0.0)).xyz);\\n\tvWorldBin = normalize((modelMatrix*vec4(B,0.0)).xyz);\\n    vViewDir = vWorldPos.xyz-cameraPosition; //这个不能取normalize，否则会引入非线性\\n\t\\n\tfloat s = sin(u_WaveMainDir);\\n\tfloat c = cos(u_WaveMainDir);\\n\tmatUVTrans = mat2(c,-s,s,c);\\n}\\n\";\n\t\tps=\"//#version 300 es\\n\\nprecision highp float;\\nprecision lowp int;\\n\\nconst float PI = 3.14159265358979323846264;\\nconst float _2PI = 6.2831853071796;\\nvarying vec2 vUv;\\nvarying vec3 vWorldNorm;\\nvarying vec3 vWorldTan;\\nvarying vec3 vWorldBin;\\nvarying vec3 vViewDir;//入射。pos-cam\\nvarying vec4 vViewPos;\\nvarying vec4 vWorldPos;\\nvarying float fDeep;\\nvarying mat2 matUVTrans;\\n#ifdef USE_VERTEX_DEEPINFO\\n#else\\nvarying vec4 vWaterInfo;\\n#endif\\nmat3 matTBNOff;//\\n\\n//\\nuniform sampler2D texBaseColor;\\nuniform sampler2D texNormal;\\n#ifdef CUBE_ENV\\nuniform samplerCube texSky;\\n#else\\nuniform sampler2D texSky;\\n#endif\\nuniform sampler2D texUnderWater;\\nuniform sampler2D texWaveDetail;\\n//uniform sampler2D texDeepColor;\\nuniform sampler2D texFoam;\\nvarying float fFoam;\\nuniform float u_curTm;\\nuniform vec2 u_scrsize;\\nuniform vec3 u_SeaColor;//\\n\\nconst int NumTexWaves=4;\\nconst float Amp_over_L = 0.01;\\n//const vec3 SEA_COLOR1 = vec3(0.0292,0.672,0.7467);//大洋\\n//const vec3 SEA_COLOR2 = vec3(0,0.927,0.43);//近海\\n\\nconst float _maxu8 = 255.0;\\nconst float _maxu16 = 65535.0;\\nconst float _shift8 = 256.0;    //平移的话是*256而不是255\\nvec2 _RGBAToU16(const in vec4 rgba){\\n    return vec2((rgba.r*_maxu8+rgba.g*_maxu8*_shift8)/_maxu16, (rgba.b*_maxu8+rgba.a*_maxu8*_shift8)/_maxu16);\\n}\\nvec3 _RGBEToRGB( const in vec4 rgba ){\\n    float f = pow(2.0, rgba.w * 255.0 - (128.0 + 8.0));\\n    return rgba.rgb * (255.0 * f);\\n}\\n\\nfloat saturate(float v){\\n    return min(max(v,0.),1.);\\n}\\n\\n/*\\n\t各种 ToneMap\\n*/\\n//Reinhard\\nvec3 ReinhardToneMapping(vec3 color, float adapted_lum) {\\n    const float MIDDLE_GREY = 1.;\\n    color *= MIDDLE_GREY / adapted_lum;\\n    return color / (1.0 + color);\\n}\\n\\n//CE2\\nvec3 CEToneMapping(vec3 color, float adapted_lum){\\n    return 1. - exp(-adapted_lum * color);\\n}\\n\\n//UC2\\nvec3 F1(vec3 x){\\n\tconst float A = 0.22;\\n\tconst float B = 0.30;\\n\tconst float C = 0.10;\\n\tconst float D = 0.20;\\n\tconst float E = 0.01;\\n\tconst float F = 0.30;\\n \\n\treturn ((x * (A * x + C * B) + D * E) / (x * (A * x + B) + D * F)) - E / F;\\n}\\n\\nvec3 Uncharted2ToneMapping(vec3 color, float adapted_lum){\\n\tconst vec3 WHITE = vec3(11.2);\\n\treturn F1(1.6 * adapted_lum * color) / F1(WHITE);\\n}\\n\\n//ACES\\nvec3 ACESToneMapping(vec3 color, float adapted_lum){\\n\tconst float A = 2.51;\\n\tconst float B = 0.03;\\n\tconst float C = 2.43;\\n\tconst float D = 0.59;\\n\tconst float E = 0.14;\\n\\n\tcolor *= adapted_lum;\\n\treturn (color * (A * color + B)) / (color * (C * color + D) + E);\\n}\\n\\n/*\\n* 对一个全景图进行采样。假设x轴指向中心。\\n*/\\nvec4 texPanorama(sampler2D tex, const in vec3 dir){\\n\tfloat envu = atan(dir.z,dir.x)/_2PI+0.5; \t\\n\tfloat envv = acos(dir.y)/PI;//(1.0-dir.y)/2.0;\\n\treturn texture2D(tex,vec2(envu,envv));\\n}\\n\\n/*\\n\t与位于0点的测试棒的相交测试交点\\n\t这个是瞎写的，只是为了测试\\n*/\\nbool hitClydiner(vec3 pos, vec3 dir, out vec3 hitpos, out vec3 hitnormal){\\n\tconst float r = 0.5;\\n\tfloat a = dir.x*dir.x+dir.z*dir.z;\\n\tfloat b = 2.*dir.x*pos.x+2.*dir.z*pos.z;\\n\tfloat c = pos.x*pos.x+pos.z*pos.z-r*r;\\n\tfloat d = b*b-4.*a*c;\\n\tif(d>=0.0){\\n\t\tfloat t = (-b+sqrt(d))/2./a;\\n\t\tt =min(t, (-b-sqrt(d))/2./a);\\n\t\thitpos = pos+dir*t;\\n\t\treturn true;\\n\t}\\n\t/*\\n\tvec3 v1 = normalize(cross(dir,vec3(0.,1.,0.)));//公垂线\\n\tfloat dist = dot(pos,v1);//最短距离\\n\tif(abs(dist)<r){\\n\t\treturn true;\\n\t}\\n\t*/\\n\treturn false;\\n}\\n\\n///* 根据散射公式来计算某个方向的颜色 *///\\n//\\nfloat phase_function(float costheta, float g, float g2){\\n\treturn 1.5*( (1.0-g2) / (2.0+g2) ) * (1.0+costheta*costheta) / pow(1.0+g2-2.0*g*costheta, 1.5);\t\\n}\\n\\nconst float _density = .2;\\nconst vec3 _vLightDir=vec3(0.,-1.,0.);//必须是规格化的\\nconst int _SAMPLENUM = 20;\\nconst float _K1 = 1.0;\\nconst float _g = -0.93;\\n//\\nvec3 calcScatter(vec3 start, vec3 dir, vec3 end){\\n\tfloat len = length(end-start);\\n\tfloat costheta = dot(dir,_vLightDir);\\n\tfloat g2 = _g*_g;\\n\tfloat K = _K1*len*_density*phase_function(costheta,_g,g2);\\n\t//用分段的方式来积分\\n\tfloat dlen = len/float(_SAMPLENUM);//距离平分\\n\tfloat ddeep = (start.y-end.y)/float(_SAMPLENUM);//深度平分\\n\tfloat sum=0.;\\n\tfor( int i=0; i<_SAMPLENUM; i++){\\n\t\tfloat fi = float(i);\\n\t\tfloat v1 = exp(-_density*(dlen+ddeep)*fi);//TODO 应该可以用分析法计算出来\\n\t\tsum += v1;\\n\t}\\n\treturn vec3(K*sum);\\n}\\n///* 根据散射公式来计算某个方向的亮度  END *///\\n\\nconst float cDeep = -2.;\t//假设水的深度\\nvec3 getShuiDiColor(vec3 pos, vec3 dir, vec3 normal){\\n\t//一个无限大的水底，黑白格纹理。纹理长度为1米\\n\tfloat t = ( cDeep-pos.y )/dir.y;\\n\tif(t<0.) return vec3(1.,0.,0.);//TEST\\n\tbool bhit = false;\\n\tvec3 hitpos;\\n\tvec3 hitcolor;\\n\tvec3 hn;\\n\tif(hitClydiner(pos,dir,hitpos,hn) && hitpos.y>cDeep && hitpos.y<pos.y){\\n\t\tbhit=true;\\n\t\thitcolor = vec3(.8,.8,.8);\\n\\n\t}else\\n\t{\\n\t\thitpos = pos+dir*t;\\n\t\tvec3 hp = floor(hitpos);\\n\t\tfloat a = mod((hp.x+hp.z),2.);\\n\t\thitcolor = (a<.9)?vec3(0.,0.,0.):vec3(1.,1.,1.);\\n\t\t//hitcolor = texture2D(texUnderWater,hitpos.xz/10.).rgb;\\n\t}\\n\t\\n\tfloat l = length(hitpos-pos);\\n\t//return texture2D(texDeepColor,vec2(min(max(l/400.,0.),1.),0.5)).rgb;\\n\t//return SEA_COLOR1*calcScatter(pos,dir,hitpos);\\n\tfloat left = pow(0.8,l);//假设透过率为80%，则到达水底的时候的光强。\\n\treturn mix(hitcolor,u_SeaColor,1.-left);\\n}\\n\\n/*\\n\tview已经normalize了\\n*/\\nvec3 getRefractColor(vec3 view,vec3 normal){\\n\tvec3 T = refract(-view, normal, 0.7);\\n\treturn getShuiDiColor(vWorldPos.xyz,T,normal); \\n}\\n\\nvec4 calcWaterC(vec3 view, vec3 normal, float von, vec3 R, float rough){\\n\t/*\\n\t只有浪顶的法线向下，也就是波形形成了交叠的时候，才会这样，所以要通过参数控制避免出现这种情况，而不是在这里保护。\\n\tif(dot(R,vec3(0.,1.,0.))<0.){\\n\t\tR = -R;\\n\t}\\n\t*/\\n\t//vec3 refr = getRefractColor(-view,normal);\\n#ifdef USE_REFR_TEX\t\\n\tvec3 refr = texture2D(texUnderWater, gl_FragCoord.xy/u_scrsize+normal.xz/8.).rgb;\\n#else\\n\tvec3 refr = u_SeaColor;\\n#endif\\n\tfloat F0=0.02;\\n\t//菲涅尔，越大反射越强\\n\tfloat f =  F0+(1.0-F0)*exp2((-5.55473*von-6.98316)*von);\\n\t//float f = F0+(1.0-F0)*pow(1.-von,5.);\\n\t//能看到水底的程度。反射剩余的*水中的衰减\\n\t//float a = (1.-f)*(1.-deepk);\\n#ifdef CUBE_ENV\\n\tvec4 reflc = textureCube(texSky,R);\\n#else\\n\tvec4 reflc = texPanorama(texSky, R);\\n#endif\\n#ifdef HDR_ENV\\n\tvec3 refl = _RGBEToRGB(reflc)*f;\\n#else\\n\tvec3 refl = reflc.rgb*f;\\n#endif\\n\t//return vec4(refl*(1.-rough),1.);\\n\t\\n\t//vec3 refl = reflc.rgb*f;\\n\tvec3 final = mix(refr, u_SeaColor, min(fDeep/10.,1.))+refl*(max(0.,1.-rough));\\n#ifdef HDR_ENV\\n\tfinal = ACESToneMapping(final,1.);//TODO 这个要uniform传入\\n#endif\\n\treturn vec4(final,f);\\n}\\n\\nvoid main() {\\n    vec3 normal =  normalize(vWorldNorm);\\n\t//如果uv=1为100米，希望每个细节纹理表示20米的小波形，则uv缩放是 100/20。细节纹理内部也要用这个值，即pos=uv*20\\n\tvec2 ruv = matUVTrans*vUv;\\n\tvec3 detailNorm = texture2D(texWaveDetail,fract(ruv*5.)).rgb*2.-vec3(1.);//TODO uv怎么算\\n\tfloat texNormScale = 2.*PI*float(NumTexWaves)*Amp_over_L*2.5;\\n\tdetailNorm *= vec3(texNormScale,1.,texNormScale);\\n\t//旋转\\n\t//细节纹理来自rendertarget，因此需要颠倒z\\n\t\\n\tmatTBNOff = mat3(matUVTrans[0][0],0.,matUVTrans[1][0],\\n\t0.,1.,0.,\\n\tmatUVTrans[0][1],0.,matUVTrans[1][1]\\n\t);\\n\t\\n\t/*\\n\tmatTBNOff = mat3(0.,0.,1.,\\n\t0.,1.,0.,\\n\t-1.,0.,0.\\n\t);\\n\t*/\\n\\n    mat3 tsn = mat3( vWorldBin, normal, vWorldTan);\t\\n    //normal = normalize(tsn * matTBNOff * detailNorm);\\n\tnormal = normalize(tsn * detailNorm); //这个应该更正确。因为本身方向就是根据uv算的，如果是静态图片才需要转换。\\n\t//vec4 normtex = texture2D( texNormal, vUv );\\n    vec3 view   = -normalize(vViewDir);//view 是指向camera的\\n    float NoV = saturate(dot( view, normal ));\\n    //vec3 R = 2. * NoV * normal - view;\\n\t\\n#ifdef USE_FOAM\t\\n\tvec4 foamc = (texture2D(texFoam,vUv*50.)+texture2D(texFoam,vUv*20.))/2.;\\n\tfloat nearcoast = 1.-min(fDeep/10.,1.);// 1.-vWaterInfo.r;\\n\tfloat foams = (nearcoast/4.+fFoam)*2.*nearcoast;\\n#else\\n\tfloat foams =0.;\\n#endif\\n\t\\n\tvec3 R = reflect(-view,normal);\\n\tvec4 wc = calcWaterC(view, normal,NoV,R, foams);\\n\\n\tgl_FragColor.rgb = wc.rgb;//normalize(detailNorm).rrr;//((normal)+vec3(0.0))/1.;//normalize(normal).rgb;//texture2D(texWaveDetail,vUv).rgb;// fracColor * texture2D(texUnderWater, vUv*20.0).rgb;// vec3(1.0);//pbrl.rgb;\\n    gl_FragColor.a = 1.0;//wc.a;\\n#ifdef USE_FOAM\\n\tgl_FragColor.rgb = mix(gl_FragColor.rgb,vec3(1.),foamc.a*foams);\\n\tgl_FragColor.a = foamc.r;\\n#endif\\n\t//if(mod(vUv.x*100.,1.0)<0.02 || mod(vUv.y*100.,1.0)<0.02) gl_FragColor.rgb=vec3(0.5,.5,.5);\\n\t//gl_FragColor.rgb = detailNorm;\\n}\\n\";\n\t\tshaderCompile=ShaderCompile3D.add(Water,vs,ps,attributeMap,uniformMap);\n\t\tWaterMaterial.SHADERDEFINE_CUBE_ENV=shaderCompile.registerMaterialDefine(\"CUBE_ENV\");\n\t\tWaterMaterial.SHADERDEFINE_HDR_ENV=shaderCompile.registerMaterialDefine(\"HDR_ENV\");\n\t\tWaterMaterial.SHADERDEFINE_SHOW_NORMAL=shaderCompile.registerMaterialDefine(\"SHOW_NORMAL\");\n\t\tWaterMaterial.SHADERDEFINE_USEVERTEXHEIGHT=shaderCompile.registerMaterialDefine(\"USE_VERTEX_DEEPINFO\");\n\t\tWaterMaterial.SHADERDEFINE_USE_FOAM=shaderCompile.registerMaterialDefine(\"USE_FOAM\");\n\t\tWaterMaterial.SHADERDEFINE_USE_REFRACT_TEX=shaderCompile.registerMaterialDefine(\"USE_REFR_TEX\");\n\t\tattributeMap={\n\t\t\t'a_CornerTextureCoordinate':/*laya.d3.graphics.VertexElementUsage.CORNERTEXTURECOORDINATE0*/17,\n\t\t\t'a_MeshPosition':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_MeshColor':/*laya.d3.graphics.VertexElementUsage.COLOR0*/1,\n\t\t\t'a_MeshTextureCoordinate':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_ShapePositionStartLifeTime':/*laya.d3.graphics.VertexElementUsage.SHAPEPOSITIONSTARTLIFETIME*/30,\n\t\t\t'a_DirectionTime':/*laya.d3.graphics.VertexElementUsage.DIRECTIONTIME*/32,\n\t\t\t'a_StartColor':/*laya.d3.graphics.VertexElementUsage.STARTCOLOR0*/19,\n\t\t\t'a_EndColor':/*laya.d3.graphics.VertexElementUsage.ENDCOLOR0*/23,\n\t\t\t'a_StartSize':/*laya.d3.graphics.VertexElementUsage.STARTSIZE*/20,\n\t\t\t'a_StartRotation0':/*laya.d3.graphics.VertexElementUsage.STARTROTATION*/22,\n\t\t\t'a_StartSpeed':/*laya.d3.graphics.VertexElementUsage.STARTSPEED*/31,\n\t\t\t'a_Random0':/*laya.d3.graphics.VertexElementUsage.RANDOM0*/34,\n\t\t\t'a_Random1':/*laya.d3.graphics.VertexElementUsage.RANDOM1*/35,\n\t\t\t'a_SimulationWorldPostion':/*laya.d3.graphics.VertexElementUsage.SIMULATIONWORLDPOSTION*/36,\n\t\t\t'a_SimulationWorldRotation':/*laya.d3.graphics.VertexElementUsage.SIMULATIONWORLDROTATION*/37};\n\t\tuniformMap={\n\t\t\t'u_Tintcolor':[ /*laya.d3.core.particleShuriKen.ShurikenParticleMaterial.TINTCOLOR*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset':[ /*laya.d3.core.particleShuriKen.ShurikenParticleMaterial.TILINGOFFSET*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_texture':[ /*laya.d3.core.particleShuriKen.ShurikenParticleMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WorldPosition':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.WORLDPOSITION*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WorldRotation':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.WORLDROTATION*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_PositionScale':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.POSITIONSCALE*/4,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SizeScale':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SIZESCALE*/5,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ScalingMode':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SCALINGMODE*/6,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_Gravity':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.GRAVITY*/7,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ThreeDStartRotation':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.THREEDSTARTROTATION*/8,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_StretchedBillboardLengthScale':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.STRETCHEDBILLBOARDLENGTHSCALE*/9,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_StretchedBillboardSpeedScale':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.STRETCHEDBILLBOARDSPEEDSCALE*/10,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SimulationSpace':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SIMULATIONSPACE*/11,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CurrentTime':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.CURRENTTIME*/12,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ColorOverLifeGradientAlphas':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTALPHAS*/22,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ColorOverLifeGradientColors':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTCOLORS*/23,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MaxColorOverLifeGradientAlphas':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTALPHAS*/24,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MaxColorOverLifeGradientColors':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTCOLORS*/25,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityConst':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONST*/13,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTX*/14,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTY*/15,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZ*/16,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityConstMax':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONSTMAX*/17,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientMaxX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTXMAX*/18,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientMaxY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTYMAX*/19,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientMaxZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZMAX*/20,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLSpaceType':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLSPACETYPE*/21,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradient':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENT*/26,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTX*/27,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTY*/28,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZ*/29,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientMax':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientMax*/30,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientMaxX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTXMAX*/31,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientMaxY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTYMAX*/32,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientMaxZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZMAX*/33,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityConst':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONST*/34,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityConstSeprarate':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTSEPRARATE*/35,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradient':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENT*/36,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTX*/37,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTY*/38,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZ*/39,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientW':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTW*/40,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityConstMax':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAX*/41,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityConstMaxSeprarate':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAXSEPRARATE*/42,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMax':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTMAX*/43,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMaxX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTXMAX*/44,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMaxY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTYMAX*/45,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMaxZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZMAX*/46,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMaxW':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTWMAX*/47,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_TSACycles':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONCYCLES*/48,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_TSASubUVLength':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONSUBUVLENGTH*/49,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_TSAGradientUVs':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTUVS*/50,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_TSAMaxGradientUVs':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTMAXUVS*/51,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPosition':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_CameraDirection':[ /*laya.d3.core.BaseCamera.CAMERADIRECTION*/5,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_CameraUp':[ /*laya.d3.core.BaseCamera.CAMERAUP*/6,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_View':[ /*laya.d3.core.BaseCamera.VIEWMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_Projection':[ /*laya.d3.core.BaseCamera.PROJECTMATRIX*/2,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_FogStart':[ /*laya.d3.core.scene.Scene.FOGSTART*/1,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogRange':[ /*laya.d3.core.scene.Scene.FOGRANGE*/2,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogColor':[ /*laya.d3.core.scene.Scene.FOGCOLOR*/0,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]};\n\t\tvar PARTICLESHURIKEN=Shader3D.nameKey.add(\"PARTICLESHURIKEN\");\n\t\tvs=\"#ifdef HIGHPRECISION\\n  precision highp float;\\n#else\\n  precision mediump float;\\n#endif\\n\\n#if defined(SPHERHBILLBOARD)||defined(STRETCHEDBILLBOARD)||defined(HORIZONTALBILLBOARD)||defined(VERTICALBILLBOARD)\\n\tattribute vec4 a_CornerTextureCoordinate;\\n#endif\\n#ifdef RENDERMODE_MESH\\n\tattribute vec3 a_MeshPosition;\\n\tattribute vec4 a_MeshColor;\\n\tattribute vec2 a_MeshTextureCoordinate;\\n\tvarying vec4 v_MeshColor;\\n#endif\\n\\nattribute vec4 a_ShapePositionStartLifeTime;\\nattribute vec4 a_DirectionTime;\\nattribute vec4 a_StartColor;\\nattribute vec3 a_StartSize;\\nattribute vec3 a_StartRotation0;\\nattribute float a_StartSpeed;\\n#if defined(COLOROVERLIFETIME)||defined(RANDOMCOLOROVERLIFETIME)||defined(SIZEOVERLIFETIMERANDOMCURVES)||defined(SIZEOVERLIFETIMERANDOMCURVESSEPERATE)||defined(ROTATIONOVERLIFETIMERANDOMCONSTANTS)||defined(ROTATIONOVERLIFETIMERANDOMCURVES)\\n  attribute vec4 a_Random0;\\n#endif\\n#if defined(TEXTURESHEETANIMATIONRANDOMCURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n  attribute vec4 a_Random1;\\n#endif\\nattribute vec3 a_SimulationWorldPostion;\\nattribute vec4 a_SimulationWorldRotation;\\n\\nvarying float v_Discard;\\nvarying vec4 v_Color;\\n#ifdef DIFFUSEMAP\\n\tvarying vec2 v_TextureCoordinate;\\n#endif\\n\\nuniform float u_CurrentTime;\\nuniform vec3 u_Gravity;\\n\\nuniform vec3 u_WorldPosition;\\nuniform vec4 u_WorldRotation;\\nuniform bool u_ThreeDStartRotation;\\nuniform int u_ScalingMode;\\nuniform vec3 u_PositionScale;\\nuniform vec3 u_SizeScale;\\nuniform mat4 u_View;\\nuniform mat4 u_Projection;\\n\\n#ifdef STRETCHEDBILLBOARD\\n\tuniform vec3 u_CameraPosition;\\n#endif\\nuniform vec3 u_CameraDirection;//TODO:只有几种广告牌模式需要用\\nuniform vec3 u_CameraUp;\\n\\nuniform  float u_StretchedBillboardLengthScale;\\nuniform  float u_StretchedBillboardSpeedScale;\\nuniform int u_SimulationSpace;\\n\\n#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n  uniform  int  u_VOLSpaceType;\\n#endif\\n#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)\\n  uniform  vec3 u_VOLVelocityConst;\\n#endif\\n#if defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n  uniform  vec2 u_VOLVelocityGradientX[4];//x为key,y为速度\\n  uniform  vec2 u_VOLVelocityGradientY[4];//x为key,y为速度\\n  uniform  vec2 u_VOLVelocityGradientZ[4];//x为key,y为速度\\n#endif\\n#ifdef VELOCITYOVERLIFETIMERANDOMCONSTANT\\n  uniform  vec3 u_VOLVelocityConstMax;\\n#endif\\n#ifdef VELOCITYOVERLIFETIMERANDOMCURVE\\n  uniform  vec2 u_VOLVelocityGradientMaxX[4];//x为key,y为速度\\n  uniform  vec2 u_VOLVelocityGradientMaxY[4];//x为key,y为速度\\n  uniform  vec2 u_VOLVelocityGradientMaxZ[4];//x为key,y为速度\\n#endif\\n\\n#ifdef COLOROVERLIFETIME\\n  uniform  vec4 u_ColorOverLifeGradientColors[4];//x为key,yzw为Color\\n  uniform  vec2 u_ColorOverLifeGradientAlphas[4];//x为key,y为Alpha\\n#endif\\n#ifdef RANDOMCOLOROVERLIFETIME\\n  uniform  vec4 u_ColorOverLifeGradientColors[4];//x为key,yzw为Color\\n  uniform  vec2 u_ColorOverLifeGradientAlphas[4];//x为key,y为Alpha\\n  uniform  vec4 u_MaxColorOverLifeGradientColors[4];//x为key,yzw为Color\\n  uniform  vec2 u_MaxColorOverLifeGradientAlphas[4];//x为key,y为Alpha\\n#endif\\n\\n\\n#if defined(SIZEOVERLIFETIMECURVE)||defined(SIZEOVERLIFETIMERANDOMCURVES)\\n  uniform  vec2 u_SOLSizeGradient[4];//x为key,y为尺寸\\n#endif\\n#ifdef SIZEOVERLIFETIMERANDOMCURVES\\n  uniform  vec2 u_SOLSizeGradientMax[4];//x为key,y为尺寸\\n#endif\\n#if defined(SIZEOVERLIFETIMECURVESEPERATE)||defined(SIZEOVERLIFETIMERANDOMCURVESSEPERATE)\\n  uniform  vec2 u_SOLSizeGradientX[4];//x为key,y为尺寸\\n  uniform  vec2 u_SOLSizeGradientY[4];//x为key,y为尺寸\\n  uniform  vec2 u_SOLSizeGradientZ[4];//x为key,y为尺寸\\n#endif\\n#ifdef SIZEOVERLIFETIMERANDOMCURVESSEPERATE\\n  uniform  vec2 u_SOLSizeGradientMaxX[4];//x为key,y为尺寸\\n  uniform  vec2 u_SOLSizeGradientMaxY[4];//x为key,y为尺寸\\n  uniform  vec2 u_SOLSizeGradientMaxZ[4];//x为key,y为尺寸\\n#endif\\n\\n\\n#ifdef ROTATIONOVERLIFETIME\\n  #if defined(ROTATIONOVERLIFETIMECONSTANT)||defined(ROTATIONOVERLIFETIMERANDOMCONSTANTS)\\n    uniform  float u_ROLAngularVelocityConst;\\n  #endif\\n  #ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n    uniform  float u_ROLAngularVelocityConstMax;\\n  #endif\\n  #if defined(ROTATIONOVERLIFETIMECURVE)||defined(ROTATIONOVERLIFETIMERANDOMCURVES)\\n    uniform  vec2 u_ROLAngularVelocityGradient[4];//x为key,y为旋转\\n  #endif\\n  #ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n    uniform  vec2 u_ROLAngularVelocityGradientMax[4];//x为key,y为旋转\\n  #endif\\n#endif\\n#ifdef ROTATIONOVERLIFETIMESEPERATE\\n  #if defined(ROTATIONOVERLIFETIMECONSTANT)||defined(ROTATIONOVERLIFETIMERANDOMCONSTANTS)\\n    uniform  vec3 u_ROLAngularVelocityConstSeprarate;\\n  #endif\\n  #ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n    uniform  vec3 u_ROLAngularVelocityConstMaxSeprarate;\\n  #endif\\n  #if defined(ROTATIONOVERLIFETIMECURVE)||defined(ROTATIONOVERLIFETIMERANDOMCURVES)\\n    uniform  vec2 u_ROLAngularVelocityGradientX[4];\\n    uniform  vec2 u_ROLAngularVelocityGradientY[4];\\n    uniform  vec2 u_ROLAngularVelocityGradientZ[4];\\n\tuniform  vec2 u_ROLAngularVelocityGradientW[4];\\n  #endif\\n  #ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n    uniform  vec2 u_ROLAngularVelocityGradientMaxX[4];\\n    uniform  vec2 u_ROLAngularVelocityGradientMaxY[4];\\n    uniform  vec2 u_ROLAngularVelocityGradientMaxZ[4];\\n\tuniform  vec2 u_ROLAngularVelocityGradientMaxW[4];\\n  #endif\\n#endif\\n\\n#if defined(TEXTURESHEETANIMATIONCURVE)||defined(TEXTURESHEETANIMATIONRANDOMCURVE)\\n  uniform  float u_TSACycles;\\n  uniform  vec2 u_TSASubUVLength;\\n  uniform  vec2 u_TSAGradientUVs[4];//x为key,y为frame\\n#endif\\n#ifdef TEXTURESHEETANIMATIONRANDOMCURVE\\n  uniform  vec2 u_TSAMaxGradientUVs[4];//x为key,y为frame\\n#endif\\n\\n#ifdef FOG\\n\tvarying vec3 v_PositionWorld;\\n#endif\\n\\n#ifdef TILINGOFFSET\\n\tuniform vec4 u_TilingOffset;\\n#endif\\n\\nvec3 rotationByEuler(in vec3 vector,in vec3 rot)\\n{\\n\tfloat halfRoll = rot.z * 0.5;\\n    float halfPitch = rot.x * 0.5;\\n\tfloat halfYaw = rot.y * 0.5;\\n\\n\tfloat sinRoll = sin(halfRoll);\\n\tfloat cosRoll = cos(halfRoll);\\n\tfloat sinPitch = sin(halfPitch);\\n\tfloat cosPitch = cos(halfPitch);\\n\tfloat sinYaw = sin(halfYaw);\\n\tfloat cosYaw = cos(halfYaw);\\n\\n\tfloat quaX = (cosYaw * sinPitch * cosRoll) + (sinYaw * cosPitch * sinRoll);\\n\tfloat quaY = (sinYaw * cosPitch * cosRoll) - (cosYaw * sinPitch * sinRoll);\\n\tfloat quaZ = (cosYaw * cosPitch * sinRoll) - (sinYaw * sinPitch * cosRoll);\\n\tfloat quaW = (cosYaw * cosPitch * cosRoll) + (sinYaw * sinPitch * sinRoll);\\n\t\\n\t//vec4 q=vec4(quaX,quaY,quaZ,quaW);\\n\t//vec3 temp = cross(q.xyz, vector) + q.w * vector;\\n\t//return (cross(temp, -q.xyz) + dot(q.xyz,vector) * q.xyz + q.w * temp);\\n\t\\n\tfloat x = quaX + quaX;\\n    float y = quaY + quaY;\\n    float z = quaZ + quaZ;\\n    float wx = quaW * x;\\n    float wy = quaW * y;\\n    float wz = quaW * z;\\n\tfloat xx = quaX * x;\\n    float xy = quaX * y;\\n\tfloat xz = quaX * z;\\n    float yy = quaY * y;\\n    float yz = quaY * z;\\n    float zz = quaZ * z;\\n\\n    return vec3(((vector.x * ((1.0 - yy) - zz)) + (vector.y * (xy - wz))) + (vector.z * (xz + wy)),\\n                ((vector.x * (xy + wz)) + (vector.y * ((1.0 - xx) - zz))) + (vector.z * (yz - wx)),\\n                ((vector.x * (xz - wy)) + (vector.y * (yz + wx))) + (vector.z * ((1.0 - xx) - yy)));\\n\t\\n}\\n\\n//假定axis已经归一化\\nvec3 rotationByAxis(in vec3 vector,in vec3 axis, in float angle)\\n{\\n\tfloat halfAngle = angle * 0.5;\\n\tfloat sin = sin(halfAngle);\\n\t\\n\tfloat quaX = axis.x * sin;\\n\tfloat quaY = axis.y * sin;\\n\tfloat quaZ = axis.z * sin;\\n\tfloat quaW = cos(halfAngle);\\n\t\\n\t//vec4 q=vec4(quaX,quaY,quaZ,quaW);\\n\t//vec3 temp = cross(q.xyz, vector) + q.w * vector;\\n\t//return (cross(temp, -q.xyz) + dot(q.xyz,vector) * q.xyz + q.w * temp);\\n\t\\n\tfloat x = quaX + quaX;\\n    float y = quaY + quaY;\\n    float z = quaZ + quaZ;\\n    float wx = quaW * x;\\n    float wy = quaW * y;\\n    float wz = quaW * z;\\n\tfloat xx = quaX * x;\\n    float xy = quaX * y;\\n\tfloat xz = quaX * z;\\n    float yy = quaY * y;\\n    float yz = quaY * z;\\n    float zz = quaZ * z;\\n\\n    return vec3(((vector.x * ((1.0 - yy) - zz)) + (vector.y * (xy - wz))) + (vector.z * (xz + wy)),\\n                ((vector.x * (xy + wz)) + (vector.y * ((1.0 - xx) - zz))) + (vector.z * (yz - wx)),\\n                ((vector.x * (xz - wy)) + (vector.y * (yz + wx))) + (vector.z * ((1.0 - xx) - yy)));\\n\t\\n}\\n\\nvec3 rotationByQuaternions(in vec3 v,in vec4 q) \\n{\\n\treturn v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);\\n}\\n\\n \\n#if defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)||defined(SIZEOVERLIFETIMECURVE)||defined(SIZEOVERLIFETIMECURVESEPERATE)||defined(SIZEOVERLIFETIMERANDOMCURVES)||defined(SIZEOVERLIFETIMERANDOMCURVESSEPERATE)\\nfloat getCurValueFromGradientFloat(in vec2 gradientNumbers[4],in float normalizedAge)\\n{\\n\tfloat curValue;\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec2 gradientNumber=gradientNumbers[i];\\n\t\tfloat key=gradientNumber.x;\\n\t\tif(key>=normalizedAge)\\n\t\t{\\n\t\t\tvec2 lastGradientNumber=gradientNumbers[i-1];\\n\t\t\tfloat lastKey=lastGradientNumber.x;\\n\t\t\tfloat age=(normalizedAge-lastKey)/(key-lastKey);\\n\t\t\tcurValue=mix(lastGradientNumber.y,gradientNumber.y,age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn curValue;\\n}\\n#endif\\n\\n#if defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)||defined(ROTATIONOVERLIFETIMECURVE)||defined(ROTATIONOVERLIFETIMERANDOMCURVES)\\nfloat getTotalValueFromGradientFloat(in vec2 gradientNumbers[4],in float normalizedAge)\\n{\\n\tfloat totalValue=0.0;\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec2 gradientNumber=gradientNumbers[i];\\n\t\tfloat key=gradientNumber.x;\\n\t\tvec2 lastGradientNumber=gradientNumbers[i-1];\\n\t\tfloat lastValue=lastGradientNumber.y;\\n\t\t\\n\t\tif(key>=normalizedAge){\\n\t\t\tfloat lastKey=lastGradientNumber.x;\\n\t\t\tfloat age=(normalizedAge-lastKey)/(key-lastKey);\\n\t\t\ttotalValue+=(lastValue+mix(lastValue,gradientNumber.y,age))/2.0*a_ShapePositionStartLifeTime.w*(normalizedAge-lastKey);\\n\t\t\tbreak;\\n\t\t}\\n\t\telse{\\n\t\t\ttotalValue+=(lastValue+gradientNumber.y)/2.0*a_ShapePositionStartLifeTime.w*(key-lastGradientNumber.x);\\n\t\t}\\n\t}\\n\treturn totalValue;\\n}\\n#endif\\n\\n#if defined(COLOROVERLIFETIME)||defined(RANDOMCOLOROVERLIFETIME)\\nvec4 getColorFromGradient(in vec2 gradientAlphas[4],in vec4 gradientColors[4],in float normalizedAge)\\n{\\n\tvec4 overTimeColor;\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec2 gradientAlpha=gradientAlphas[i];\\n\t\tfloat alphaKey=gradientAlpha.x;\\n\t\tif(alphaKey>=normalizedAge)\\n\t\t{\\n\t\t\tvec2 lastGradientAlpha=gradientAlphas[i-1];\\n\t\t\tfloat lastAlphaKey=lastGradientAlpha.x;\\n\t\t\tfloat age=(normalizedAge-lastAlphaKey)/(alphaKey-lastAlphaKey);\\n\t\t\toverTimeColor.a=mix(lastGradientAlpha.y,gradientAlpha.y,age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\t\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec4 gradientColor=gradientColors[i];\\n\t\tfloat colorKey=gradientColor.x;\\n\t\tif(colorKey>=normalizedAge)\\n\t\t{\\n\t\t\tvec4 lastGradientColor=gradientColors[i-1];\\n\t\t\tfloat lastColorKey=lastGradientColor.x;\\n\t\t\tfloat age=(normalizedAge-lastColorKey)/(colorKey-lastColorKey);\\n\t\t\toverTimeColor.rgb=mix(gradientColors[i-1].yzw,gradientColor.yzw,age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn overTimeColor;\\n}\\n#endif\\n\\n\\n#if defined(TEXTURESHEETANIMATIONCURVE)||defined(TEXTURESHEETANIMATIONRANDOMCURVE)\\nfloat getFrameFromGradient(in vec2 gradientFrames[4],in float normalizedAge)\\n{\\n\tfloat overTimeFrame;\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec2 gradientFrame=gradientFrames[i];\\n\t\tfloat key=gradientFrame.x;\\n\t\tif(key>=normalizedAge)\\n\t\t{\\n\t\t\tvec2 lastGradientFrame=gradientFrames[i-1];\\n\t\t\tfloat lastKey=lastGradientFrame.x;\\n\t\t\tfloat age=(normalizedAge-lastKey)/(key-lastKey);\\n\t\t\toverTimeFrame=mix(lastGradientFrame.y,gradientFrame.y,age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn floor(overTimeFrame);\\n}\\n#endif\\n\\n#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\nvec3 computeParticleLifeVelocity(in float normalizedAge)\\n{\\n  vec3 outLifeVelocity;\\n  #ifdef VELOCITYOVERLIFETIMECONSTANT\\n\t outLifeVelocity=u_VOLVelocityConst; \\n  #endif\\n  #ifdef VELOCITYOVERLIFETIMECURVE\\n     outLifeVelocity= vec3(getCurValueFromGradientFloat(u_VOLVelocityGradientX,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientY,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientZ,normalizedAge));\\n  #endif\\n  #ifdef VELOCITYOVERLIFETIMERANDOMCONSTANT\\n\t outLifeVelocity=mix(u_VOLVelocityConst,u_VOLVelocityConstMax,vec3(a_Random1.y,a_Random1.z,a_Random1.w)); \\n  #endif\\n  #ifdef VELOCITYOVERLIFETIMERANDOMCURVE\\n     outLifeVelocity=vec3(mix(getCurValueFromGradientFloat(u_VOLVelocityGradientX,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientMaxX,normalizedAge),a_Random1.y),\\n\t                 mix(getCurValueFromGradientFloat(u_VOLVelocityGradientY,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientMaxY,normalizedAge),a_Random1.z),\\n\t\t\t\t\t mix(getCurValueFromGradientFloat(u_VOLVelocityGradientZ,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientMaxZ,normalizedAge),a_Random1.w));\\n  #endif\\n\t\t\t\t\t\\n  return outLifeVelocity;\\n} \\n#endif\\n\\nvec3 computeParticlePosition(in vec3 startVelocity, in vec3 lifeVelocity,in float age,in float normalizedAge,vec3 gravityVelocity,vec4 worldRotation)\\n{\\n   vec3 startPosition;\\n   vec3 lifePosition;\\n   #if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n\t#ifdef VELOCITYOVERLIFETIMECONSTANT\\n\t\t  startPosition=startVelocity*age;\\n\t\t  lifePosition=lifeVelocity*age;\\n\t#endif\\n\t#ifdef VELOCITYOVERLIFETIMECURVE\\n\t\t  startPosition=startVelocity*age;\\n\t\t  lifePosition=vec3(getTotalValueFromGradientFloat(u_VOLVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientZ,normalizedAge));\\n\t#endif\\n\t#ifdef VELOCITYOVERLIFETIMERANDOMCONSTANT\\n\t\t  startPosition=startVelocity*age;\\n\t\t  lifePosition=lifeVelocity*age;\\n\t#endif\\n\t#ifdef VELOCITYOVERLIFETIMERANDOMCURVE\\n\t\t  startPosition=startVelocity*age;\\n\t\t  lifePosition=vec3(mix(getTotalValueFromGradientFloat(u_VOLVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientMaxX,normalizedAge),a_Random1.y)\\n\t      ,mix(getTotalValueFromGradientFloat(u_VOLVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientMaxY,normalizedAge),a_Random1.z)\\n\t      ,mix(getTotalValueFromGradientFloat(u_VOLVelocityGradientZ,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientMaxZ,normalizedAge),a_Random1.w));\\n\t#endif\\n\t\\n\tvec3 finalPosition;\\n\tif(u_VOLSpaceType==0){\\n\t  if(u_ScalingMode!=2)\\n\t   finalPosition =rotationByQuaternions(u_PositionScale*(a_ShapePositionStartLifeTime.xyz+startPosition+lifePosition),worldRotation);\\n\t  else\\n\t   finalPosition =rotationByQuaternions(u_PositionScale*a_ShapePositionStartLifeTime.xyz+startPosition+lifePosition,worldRotation);\\n\t}\\n\telse{\\n\t  if(u_ScalingMode!=2)\\n\t    finalPosition = rotationByQuaternions(u_PositionScale*(a_ShapePositionStartLifeTime.xyz+startPosition),worldRotation)+lifePosition;\\n\t  else\\n\t    finalPosition = rotationByQuaternions(u_PositionScale*a_ShapePositionStartLifeTime.xyz+startPosition,worldRotation)+lifePosition;\\n\t}\\n  #else\\n\t startPosition=startVelocity*age;\\n\t vec3 finalPosition;\\n\t if(u_ScalingMode!=2)\\n\t   finalPosition = rotationByQuaternions(u_PositionScale*(a_ShapePositionStartLifeTime.xyz+startPosition),worldRotation);\\n\t else\\n\t   finalPosition = rotationByQuaternions(u_PositionScale*a_ShapePositionStartLifeTime.xyz+startPosition,worldRotation);\\n  #endif\\n  \\n  if(u_SimulationSpace==0)\\n    finalPosition=finalPosition+a_SimulationWorldPostion;\\n  else if(u_SimulationSpace==1) \\n    finalPosition=finalPosition+u_WorldPosition;\\n  \\n  finalPosition+=0.5*gravityVelocity*age;\\n \\n  return  finalPosition;\\n}\\n\\n\\nvec4 computeParticleColor(in vec4 color,in float normalizedAge)\\n{\\n\t#ifdef COLOROVERLIFETIME\\n\t  color*=getColorFromGradient(u_ColorOverLifeGradientAlphas,u_ColorOverLifeGradientColors,normalizedAge);\\n\t#endif\\n\t\\n\t#ifdef RANDOMCOLOROVERLIFETIME\\n\t  color*=mix(getColorFromGradient(u_ColorOverLifeGradientAlphas,u_ColorOverLifeGradientColors,normalizedAge),getColorFromGradient(u_MaxColorOverLifeGradientAlphas,u_MaxColorOverLifeGradientColors,normalizedAge),a_Random0.y);\\n\t#endif\\n\\n    return color;\\n}\\n\\nvec2 computeParticleSizeBillbard(in vec2 size,in float normalizedAge)\\n{\\n\t#ifdef SIZEOVERLIFETIMECURVE\\n\t\tsize*=getCurValueFromGradientFloat(u_SOLSizeGradient,normalizedAge);\\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMERANDOMCURVES\\n\t    size*=mix(getCurValueFromGradientFloat(u_SOLSizeGradient,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMax,normalizedAge),a_Random0.z); \\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMECURVESEPERATE\\n\t\tsize*=vec2(getCurValueFromGradientFloat(u_SOLSizeGradientX,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientY,normalizedAge));\\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMERANDOMCURVESSEPERATE\\n\t    size*=vec2(mix(getCurValueFromGradientFloat(u_SOLSizeGradientX,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxX,normalizedAge),a_Random0.z)\\n\t    ,mix(getCurValueFromGradientFloat(u_SOLSizeGradientY,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxY,normalizedAge),a_Random0.z));\\n\t#endif\\n\treturn size;\\n}\\n\\n#ifdef RENDERMODE_MESH\\nvec3 computeParticleSizeMesh(in vec3 size,in float normalizedAge)\\n{\\n\t#ifdef SIZEOVERLIFETIMECURVE\\n\t\tsize*=getCurValueFromGradientFloat(u_SOLSizeGradient,normalizedAge);\\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMERANDOMCURVES\\n\t    size*=mix(getCurValueFromGradientFloat(u_SOLSizeGradient,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMax,normalizedAge),a_Random0.z); \\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMECURVESEPERATE\\n\t\tsize*=vec3(getCurValueFromGradientFloat(u_SOLSizeGradientX,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientY,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientZ,normalizedAge));\\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMERANDOMCURVESSEPERATE\\n\t    size*=vec3(mix(getCurValueFromGradientFloat(u_SOLSizeGradientX,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxX,normalizedAge),a_Random0.z)\\n\t    ,mix(getCurValueFromGradientFloat(u_SOLSizeGradientY,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxY,normalizedAge),a_Random0.z)\\n\t\t,mix(getCurValueFromGradientFloat(u_SOLSizeGradientZ,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxZ,normalizedAge),a_Random0.z));\\n\t#endif\\n\treturn size;\\n}\\n#endif\\n\\nfloat computeParticleRotationFloat(in float rotation,in float age,in float normalizedAge)\\n{ \\n\t#ifdef ROTATIONOVERLIFETIME\\n\t\t#ifdef ROTATIONOVERLIFETIMECONSTANT\\n\t\t\tfloat ageRot=u_ROLAngularVelocityConst*age;\\n\t        rotation+=ageRot;\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMECURVE\\n\t\t\trotation+=getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge);\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n\t\t\tfloat ageRot=mix(u_ROLAngularVelocityConst,u_ROLAngularVelocityConstMax,a_Random0.w)*age;\\n\t        rotation+=ageRot;\\n\t    #endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n\t\t\trotation+=mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMax,normalizedAge),a_Random0.w);\\n\t\t#endif\\n\t#endif\\n\t#ifdef ROTATIONOVERLIFETIMESEPERATE\\n\t\t#ifdef ROTATIONOVERLIFETIMECONSTANT\\n\t\t\tfloat ageRot=u_ROLAngularVelocityConstSeprarate.z*age;\\n\t        rotation+=ageRot;\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMECURVE\\n\t\t\trotation+=getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge);\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n\t\t\tfloat ageRot=mix(u_ROLAngularVelocityConstSeprarate.z,u_ROLAngularVelocityConstMaxSeprarate.z,a_Random0.w)*age;\\n\t        rotation+=ageRot;\\n\t    #endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n\t\t\trotation+=mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMaxZ,normalizedAge),a_Random0.w));\\n\t\t#endif\\n\t#endif\\n\treturn rotation;\\n}\\n\\n\\n#if defined(RENDERMODE_MESH)&&(defined(ROTATIONOVERLIFETIME)||defined(ROTATIONOVERLIFETIMESEPERATE))\\nvec3 computeParticleRotationVec3(in vec3 rotation,in float age,in float normalizedAge)\\n{ \\n\t#ifdef ROTATIONOVERLIFETIME\\n\t#ifdef ROTATIONOVERLIFETIMECONSTANT\\n\t\t\tfloat ageRot=u_ROLAngularVelocityConst*age;\\n\t        rotation+=ageRot;\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMECURVE\\n\t\t\trotation+=getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge);\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n\t\t\tfloat ageRot=mix(u_ROLAngularVelocityConst,u_ROLAngularVelocityConstMax,a_Random0.w)*age;\\n\t        rotation+=ageRot;\\n\t    #endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n\t\t\trotation+=mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMax,normalizedAge),a_Random0.w);\\n\t\t#endif\\n\t#endif\\n\t#ifdef ROTATIONOVERLIFETIMESEPERATE\\n\t#ifdef ROTATIONOVERLIFETIMECONSTANT\\n\t\t\tvec3 ageRot=u_ROLAngularVelocityConstSeprarate*age;\\n\t        rotation+=ageRot;\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMECURVE\\n\t\t\trotation+=vec3(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge));\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n\t\t\tvec3 ageRot=mix(u_ROLAngularVelocityConstSeprarate,u_ROLAngularVelocityConstMaxSeprarate,a_Random0.w)*age;\\n\t        rotation+=ageRot;\\n\t    #endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n\t\t\trotation+=vec3(mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMaxX,normalizedAge),a_Random0.w)\\n\t        ,mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMaxY,normalizedAge),a_Random0.w)\\n\t        ,mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMaxZ,normalizedAge),a_Random0.w));\\n\t\t#endif\\n\t#endif\\n\treturn rotation;\\n}\\n#endif\\n\\nvec2 computeParticleUV(in vec2 uv,in float normalizedAge)\\n{ \\n\t#ifdef TEXTURESHEETANIMATIONCURVE\\n\t\tfloat cycleNormalizedAge=normalizedAge*u_TSACycles;\\n\t\tfloat frame=getFrameFromGradient(u_TSAGradientUVs,cycleNormalizedAge-floor(cycleNormalizedAge));\\n\t\tfloat totalULength=frame*u_TSASubUVLength.x;\\n\t\tfloat floorTotalULength=floor(totalULength);\\n\t    uv.x+=totalULength-floorTotalULength;\\n\t\tuv.y+=floorTotalULength*u_TSASubUVLength.y;\\n    #endif\\n\t#ifdef TEXTURESHEETANIMATIONRANDOMCURVE\\n\t\tfloat cycleNormalizedAge=normalizedAge*u_TSACycles;\\n\t\tfloat uvNormalizedAge=cycleNormalizedAge-floor(cycleNormalizedAge);\\n\t    float frame=floor(mix(getFrameFromGradient(u_TSAGradientUVs,uvNormalizedAge),getFrameFromGradient(u_TSAMaxGradientUVs,uvNormalizedAge),a_Random1.x));\\n\t\tfloat totalULength=frame*u_TSASubUVLength.x;\\n\t\tfloat floorTotalULength=floor(totalULength);\\n\t    uv.x+=totalULength-floorTotalULength;\\n\t\tuv.y+=floorTotalULength*u_TSASubUVLength.y;\\n    #endif\\n\treturn uv;\\n}\\n\\nvoid main()\\n{\\n\tfloat age = u_CurrentTime - a_DirectionTime.w;\\n\tfloat normalizedAge = age/a_ShapePositionStartLifeTime.w;\\n\tvec3 lifeVelocity;\\n\tif(normalizedAge<1.0){ \\n\tvec3 startVelocity=a_DirectionTime.xyz*a_StartSpeed;\\n\t#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n\t\tlifeVelocity= computeParticleLifeVelocity(normalizedAge);//计算粒子生命周期速度\\n\t#endif \\n\tvec3 gravityVelocity=u_Gravity*age;\\n\t\\n\tvec4 worldRotation;\\n\tif(u_SimulationSpace==0)\\n\t\tworldRotation=a_SimulationWorldRotation;\\n\telse\\n\t\tworldRotation=u_WorldRotation;\\n\t\\n\tvec3 center=computeParticlePosition(startVelocity, lifeVelocity, age, normalizedAge,gravityVelocity,worldRotation);//计算粒子位置\\n   \\n   \\n   #ifdef SPHERHBILLBOARD\\n\t\tvec2 corner=a_CornerTextureCoordinate.xy;//Billboard模式z轴无效\\n        vec3 cameraUpVector =normalize(u_CameraUp);//TODO:是否外面归一化\\n        vec3 sideVector = normalize(cross(u_CameraDirection,cameraUpVector));\\n        vec3 upVector = normalize(cross(sideVector,u_CameraDirection));\\n\t    corner*=computeParticleSizeBillbard(a_StartSize.xy,normalizedAge);\\n\t\t#if defined(ROTATIONOVERLIFETIME)||defined(ROTATIONOVERLIFETIMESEPERATE)\\n\t\t\tif(u_ThreeDStartRotation){\\n\t\t\t\tvec3 rotation=vec3(a_StartRotation0.xy,computeParticleRotationFloat(a_StartRotation0.z,age,normalizedAge));\\n\t\t\t\tcenter += u_SizeScale.xzy*rotationByEuler(corner.x*sideVector+corner.y*upVector,rotation);\\n\t\t\t}\\n\t\t\telse{\\n\t\t\t\tfloat rot = computeParticleRotationFloat(a_StartRotation0.x, age,normalizedAge);\\n\t\t\t\tfloat c = cos(rot);\\n\t\t\t\tfloat s = sin(rot);\\n\t\t\t\tmat2 rotation= mat2(c, -s, s, c);\\n\t\t\t\tcorner=rotation*corner;\\n\t\t\t\tcenter += u_SizeScale.xzy*(corner.x*sideVector+corner.y*upVector);\\n\t\t\t}\\n\t\t#else\\n\t\t\tif(u_ThreeDStartRotation){\\n\t\t\t\tcenter += u_SizeScale.xzy*rotationByEuler(corner.x*sideVector+corner.y*upVector,a_StartRotation0);\\n\t\t\t}\\n\t\t\telse{\\n\t\t\t\tfloat c = cos(a_StartRotation0.x);\\n\t\t\t\tfloat s = sin(a_StartRotation0.x);\\n\t\t\t\tmat2 rotation= mat2(c, -s, s, c);\\n\t\t\t\tcorner=rotation*corner;\\n\t\t\t\tcenter += u_SizeScale.xzy*(corner.x*sideVector+corner.y*upVector);\\n\t\t\t}\\n\t\t#endif\\n   #endif\\n   \\n   #ifdef STRETCHEDBILLBOARD\\n\tvec2 corner=a_CornerTextureCoordinate.xy;//Billboard模式z轴无效\\n\tvec3 velocity;\\n\t#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n\t    if(u_VOLSpaceType==0)\\n\t\t  velocity=rotationByQuaternions(u_SizeScale*(startVelocity+lifeVelocity),worldRotation)+gravityVelocity;\\n\t    else\\n\t\t  velocity=rotationByQuaternions(u_SizeScale*startVelocity,worldRotation)+lifeVelocity+gravityVelocity;\\n    #else\\n\t    velocity= rotationByQuaternions(u_SizeScale*startVelocity,worldRotation)+gravityVelocity;\\n    #endif\t\\n\t\tvec3 cameraUpVector = normalize(velocity);\\n\t\tvec3 direction = normalize(center-u_CameraPosition);\\n        vec3 sideVector = normalize(cross(direction,normalize(velocity)));\\n\t\t\\n\t\tsideVector=u_SizeScale.xzy*sideVector;\\n\t\tcameraUpVector=length(vec3(u_SizeScale.x,0.0,0.0))*cameraUpVector;\\n\t\t\\n\t    vec2 size=computeParticleSizeBillbard(a_StartSize.xy,normalizedAge);\\n\t\t\\n\t    const mat2 rotaionZHalfPI=mat2(0.0, -1.0, 1.0, 0.0);\\n\t    corner=rotaionZHalfPI*corner;\\n\t    corner.y=corner.y-abs(corner.y);\\n\t\t\\n\t    float speed=length(velocity);//TODO:\\n\t    center +=sign(u_SizeScale.x)*(sign(u_StretchedBillboardLengthScale)*size.x*corner.x*sideVector+(speed*u_StretchedBillboardSpeedScale+size.y*u_StretchedBillboardLengthScale)*corner.y*cameraUpVector);\\n   #endif\\n   \\n   #ifdef HORIZONTALBILLBOARD\\n\t\tvec2 corner=a_CornerTextureCoordinate.xy;//Billboard模式z轴无效\\n        const vec3 cameraUpVector=vec3(0.0,0.0,1.0);\\n\t    const vec3 sideVector = vec3(-1.0,0.0,0.0);\\n\t\t\\n\t\tfloat rot = computeParticleRotationFloat(a_StartRotation0.x, age,normalizedAge);\\n        float c = cos(rot);\\n        float s = sin(rot);\\n        mat2 rotation= mat2(c, -s, s, c);\\n\t    corner=rotation*corner*cos(0.78539816339744830961566084581988);//TODO:临时缩小cos45,不确定U3D原因\\n\t\tcorner*=computeParticleSizeBillbard(a_StartSize.xy,normalizedAge);\\n        center +=u_SizeScale.xzy*(corner.x*sideVector+ corner.y*cameraUpVector);\\n   #endif\\n   \\n   #ifdef VERTICALBILLBOARD\\n\t\tvec2 corner=a_CornerTextureCoordinate.xy;//Billboard模式z轴无效\\n        const vec3 cameraUpVector =vec3(0.0,1.0,0.0);\\n        vec3 sideVector = normalize(cross(u_CameraDirection,cameraUpVector));\\n\t\t\\n\t\tfloat rot = computeParticleRotationFloat(a_StartRotation0.x, age,normalizedAge);\\n        float c = cos(rot);\\n        float s = sin(rot);\\n        mat2 rotation= mat2(c, -s, s, c);\\n\t    corner=rotation*corner*cos(0.78539816339744830961566084581988);//TODO:临时缩小cos45,不确定U3D原因\\n\t\tcorner*=computeParticleSizeBillbard(a_StartSize.xy,normalizedAge);\\n        center +=u_SizeScale.xzy*(corner.x*sideVector+ corner.y*cameraUpVector);\\n   #endif\\n   \\n   #ifdef RENDERMODE_MESH\\n\t    vec3 size=computeParticleSizeMesh(a_StartSize,normalizedAge);\\n\t\t#if defined(ROTATIONOVERLIFETIME)||defined(ROTATIONOVERLIFETIMESEPERATE)\\n\t\t\tif(u_ThreeDStartRotation){\\n\t\t\t\tvec3 rotation=vec3(a_StartRotation0.xy,-computeParticleRotationFloat(a_StartRotation0.z, age,normalizedAge));\\n\t\t\t\tcenter+= rotationByQuaternions(u_SizeScale*rotationByEuler(a_MeshPosition*size,rotation),worldRotation);\\n\t\t\t}\\n\t\t\telse{\\n\t\t\t\t#ifdef ROTATIONOVERLIFETIME\\n\t\t\t\t\tfloat angle=computeParticleRotationFloat(a_StartRotation0.x, age,normalizedAge);\\n\t\t\t\t\tif(a_ShapePositionStartLifeTime.x!=0.0||a_ShapePositionStartLifeTime.y!=0.0){\\n\t\t\t\t\t\tcenter+= (rotationByQuaternions(rotationByAxis(u_SizeScale*a_MeshPosition*size,normalize(cross(vec3(0.0,0.0,1.0),vec3(a_ShapePositionStartLifeTime.xy,0.0))),angle),worldRotation));//已验证\\n\t\t\t\t\t}\\n\t\t\t\t\telse{\\n\t\t\t\t\t\t#ifdef SHAPE\\n\t\t\t\t\t\t\tcenter+= u_SizeScale.xzy*(rotationByQuaternions(rotationByAxis(a_MeshPosition*size,vec3(0.0,-1.0,0.0),angle),worldRotation));\\n\t\t\t\t\t\t#else\\n\t\t\t\t\t\t\tif(u_SimulationSpace==0)\\n\t\t\t\t\t\t\t\tcenter+=rotationByAxis(u_SizeScale*a_MeshPosition*size,vec3(0.0,0.0,-1.0),angle);//已验证\\n\t\t\t\t\t\t\telse if(u_SimulationSpace==1)\\n\t\t\t\t\t\t\t\tcenter+=rotationByQuaternions(u_SizeScale*rotationByAxis(a_MeshPosition*size,vec3(0.0,0.0,-1.0),angle),worldRotation);//已验证\\n\t\t\t\t\t\t#endif\\n\t\t\t\t\t}\\n\t\t\t\t#endif\\n\t\t\t\t#ifdef ROTATIONOVERLIFETIMESEPERATE\\n\t\t\t\t\t//TODO:是否应合并if(u_ThreeDStartRotation)分支代码,待测试\\n\t\t\t\t\tvec3 angle=computeParticleRotationVec3(vec3(0.0,0.0,a_StartRotation0.z), age,normalizedAge);\\n\t\t\t\t\tcenter+= (rotationByQuaternions(rotationByEuler(u_SizeScale*a_MeshPosition*size,vec3(angle.x,angle.y,angle.z)),worldRotation));//已验证\\n\t\t\t\t#endif\t\\n\t\t\t}\\n\t\t#else\\n\t\t\tif(u_ThreeDStartRotation){\\n\t\t\t\tcenter+= rotationByQuaternions(u_SizeScale*rotationByEuler(a_MeshPosition*size,a_StartRotation0),worldRotation);//已验证\\n\t\t\t}\\n\t\t\telse{\\n\t\t\t\tif(a_ShapePositionStartLifeTime.x!=0.0||a_ShapePositionStartLifeTime.y!=0.0){\\n\t\t\t\t\tif(u_SimulationSpace==0)\\n\t\t\t\t\t\tcenter+= rotationByAxis(u_SizeScale*a_MeshPosition*size,normalize(cross(vec3(0.0,0.0,1.0),vec3(a_ShapePositionStartLifeTime.xy,0.0))),a_StartRotation0.x);\\n\t\t\t\t\telse if(u_SimulationSpace==1)\\n\t\t\t\t\t\tcenter+= (rotationByQuaternions(u_SizeScale*rotationByAxis(a_MeshPosition*size,normalize(cross(vec3(0.0,0.0,1.0),vec3(a_ShapePositionStartLifeTime.xy,0.0))),a_StartRotation0.x),worldRotation));//已验证\\n\t\t\t\t}\\n\t\t\t\telse{\\n\t\t\t\t\t#ifdef SHAPE\\n\t\t\t\t\t\tif(u_SimulationSpace==0)\\n\t\t\t\t\t\t\tcenter+= u_SizeScale*rotationByAxis(a_MeshPosition*size,vec3(0.0,-1.0,0.0),a_StartRotation0.x);\\n\t\t\t\t\t\telse if(u_SimulationSpace==1)\\n\t\t\t\t\t\t\tcenter+= rotationByQuaternions(u_SizeScale*rotationByAxis(a_MeshPosition*size,vec3(0.0,-1.0,0.0),a_StartRotation0.x),worldRotation);\t\\n\t\t\t\t\t#else\\n\t\t\t\t\t\tif(u_SimulationSpace==0)\\n\t\t\t\t\t\t\tcenter+= rotationByAxis(u_SizeScale*a_MeshPosition*size,vec3(0.0,0.0,-1.0),a_StartRotation0.x);\\n\t\t\t\t\t\telse if(u_SimulationSpace==1)\\n\t\t\t\t\t\t\tcenter+= rotationByQuaternions(u_SizeScale*rotationByAxis(a_MeshPosition*size,vec3(0.0,0.0,-1.0),a_StartRotation0.x),worldRotation);//已验证\\n\t\t\t\t\t#endif\\n\t\t\t\t}\\n\t\t\t}\\n\t\t#endif\\n\t\tv_MeshColor=a_MeshColor;\\n   #endif\\n   \\n    gl_Position=u_Projection*u_View*vec4(center,1.0);\\n    v_Color = computeParticleColor(a_StartColor, normalizedAge);\\n\t#ifdef DIFFUSEMAP\\n\t\t#if defined(SPHERHBILLBOARD)||defined(STRETCHEDBILLBOARD)||defined(HORIZONTALBILLBOARD)||defined(VERTICALBILLBOARD)\\n\t\t\tv_TextureCoordinate =computeParticleUV(a_CornerTextureCoordinate.zw, normalizedAge);\\n\t\t#endif\\n\t\t#ifdef RENDERMODE_MESH\\n\t\t\tv_TextureCoordinate =computeParticleUV(a_MeshTextureCoordinate, normalizedAge);\\n\t\t#endif\\n\t\t\\n\t\t#ifdef TILINGOFFSET\\n\t\t\tv_TextureCoordinate=vec2(v_TextureCoordinate.x,1.0-v_TextureCoordinate.y)*u_TilingOffset.xy+vec2(u_TilingOffset.z,-u_TilingOffset.w);//需要特殊处理\\n\t\t\tv_TextureCoordinate=vec2(v_TextureCoordinate.x,1.0-v_TextureCoordinate.y);//需要特殊处理\\n\t\t#endif\\n\t#endif\\n    v_Discard=0.0;\\n\t  \\n\t#ifdef FOG\\n\t\tv_PositionWorld=center;\\n\t#endif\\n   }\\n   else\\n\t{\\n\t\tv_Discard=1.0;\\n\t}\\n}\\n\\n\";\n\t\tps=\"#ifdef HIGHPRECISION\\n  precision highp float;\\n#else\\n  precision mediump float;\\n#endif\\n\\nvarying float v_Discard;\\nvarying vec4 v_Color;\\nvarying vec2 v_TextureCoordinate;\\nuniform sampler2D u_texture;\\nuniform vec4 u_Tintcolor;\\n\\n#ifdef RENDERMODE_MESH\\n\tvarying vec4 v_MeshColor;\\n#endif\\n\\n#ifdef FOG\\n\tvarying vec3 v_PositionWorld;\\n\tuniform vec3 u_CameraPosition;\\n\tuniform float u_FogStart;\\n\tuniform float u_FogRange;\\n\t#ifdef ADDTIVEFOG\\n\t#else\\n\t\tuniform vec3 u_FogColor;\\n\t#endif\\n#endif\\n\\n\\nvoid main()\\n{\t\\n\t#ifdef RENDERMODE_MESH\\n\t\tgl_FragColor=v_MeshColor;\\n\t#else\\n\t\tgl_FragColor=vec4(1.0);\t\\n\t#endif\\n\t\t\\n\t#ifdef DIFFUSEMAP\\n\t\tif(v_Discard!=0.0)\\n\t\t\tdiscard;\\n\t\t#ifdef TINTCOLOR\\n\t\t\tgl_FragColor*=texture2D(u_texture,v_TextureCoordinate)*u_Tintcolor*2.0*v_Color;\\n\t\t#else\\n\t\t\tgl_FragColor*=texture2D(u_texture,v_TextureCoordinate)*v_Color;\\n\t\t#endif\\n\t#else\\n\t\t#ifdef TINTCOLOR\\n\t\t\tgl_FragColor*=u_Tintcolor*2.0*v_Color;\\n\t\t#else\\n\t\t\tgl_FragColor*=v_Color;\\n\t\t#endif\\n\t#endif\\n\t\\n\t#ifdef FOG\\n\t\tvec3 toEye=u_CameraPosition-v_PositionWorld;\\n\t\tfloat toEyeLength=length(toEye);\\n\t\ttoEye/=toEyeLength;\\n\t\t\\n\t\tfloat lerpFact=clamp((toEyeLength-u_FogStart)/u_FogRange,0.0,1.0);\\n\t\t#ifdef ADDTIVEFOG\\n\t\t\tgl_FragColor.rgb=mix(gl_FragColor.rgb,vec3(0.0,0.0,0.0),lerpFact);\\n\t\t#else\\n\t\t\tgl_FragColor.rgb=mix(gl_FragColor.rgb,u_FogColor,lerpFact);\\n\t\t#endif\\n\t#endif\\n}\";\n\t\tshaderCompile=ShaderCompile3D.add(PARTICLESHURIKEN,vs,ps,attributeMap,uniformMap);\n\t\tShurikenParticleMaterial.SHADERDEFINE_DIFFUSEMAP=shaderCompile.registerMaterialDefine(\"DIFFUSEMAP\");\n\t\tShurikenParticleMaterial.SHADERDEFINE_TINTCOLOR=shaderCompile.registerMaterialDefine(\"TINTCOLOR\");\n\t\tShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG=shaderCompile.registerMaterialDefine(\"ADDTIVEFOG\");\n\t\tShurikenParticleMaterial.SHADERDEFINE_TILINGOFFSET=shaderCompile.registerMaterialDefine(\"TILINGOFFSET\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_BILLBOARD=shaderCompile.registerSpriteDefine(\"SPHERHBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_STRETCHEDBILLBOARD=shaderCompile.registerSpriteDefine(\"STRETCHEDBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_HORIZONTALBILLBOARD=shaderCompile.registerSpriteDefine(\"HORIZONTALBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_VERTICALBILLBOARD=shaderCompile.registerSpriteDefine(\"VERTICALBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_COLOROVERLIFETIME=shaderCompile.registerSpriteDefine(\"COLOROVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RANDOMCOLOROVERLIFETIME=shaderCompile.registerSpriteDefine(\"RANDOMCOLOROVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECONSTANT=shaderCompile.registerSpriteDefine(\"VELOCITYOVERLIFETIMECONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECURVE=shaderCompile.registerSpriteDefine(\"VELOCITYOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCONSTANT=shaderCompile.registerSpriteDefine(\"VELOCITYOVERLIFETIMERANDOMCONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCURVE=shaderCompile.registerSpriteDefine(\"VELOCITYOVERLIFETIMERANDOMCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONCURVE=shaderCompile.registerSpriteDefine(\"TEXTURESHEETANIMATIONCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONRANDOMCURVE=shaderCompile.registerSpriteDefine(\"TEXTURESHEETANIMATIONRANDOMCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIME=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMESEPERATE=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMESEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECONSTANT=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMECONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECURVE=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCONSTANTS=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMERANDOMCONSTANTS\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCURVES=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMERANDOMCURVES\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVE=shaderCompile.registerSpriteDefine(\"SIZEOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVESEPERATE=shaderCompile.registerSpriteDefine(\"SIZEOVERLIFETIMECURVESEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVES=shaderCompile.registerSpriteDefine(\"SIZEOVERLIFETIMERANDOMCURVES\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVESSEPERATE=shaderCompile.registerSpriteDefine(\"SIZEOVERLIFETIMERANDOMCURVESSEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_MESH=shaderCompile.registerSpriteDefine(\"RENDERMODE_MESH\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SHAPE=shaderCompile.registerSpriteDefine(\"SHAPE\");\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_Time':/*laya.d3.graphics.VertexElementUsage.TIME0*/33};\n\t\tuniformMap={\n\t\t\t'u_Texture':[ /*laya.d3.core.material.GlitterMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Albedo':[ /*laya.d3.core.material.GlitterMaterial.ALBEDO*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Color':[ /*laya.d3.core.material.GlitterMaterial.UNICOLOR*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_CurrentTime':[ /*laya.d3.core.glitter.Glitter.CURRENTTIME*/2,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_Duration':[ /*laya.d3.core.glitter.Glitter.DURATION*/3,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2]};\n\t\tvar GLITTER=Shader3D.nameKey.add(\"GLITTER\");\n\t\tvs=\"attribute vec4 a_Position;\\nattribute vec2 a_Texcoord0;\\nattribute float a_Time;\\n\\nuniform mat4 u_MvpMatrix;\\nuniform  float u_CurrentTime;\\nuniform  vec4 u_Color;\\nuniform float u_Duration;\\n\\nvarying vec2 v_Texcoord;\\nvarying vec4 v_Color;\\n\\n\\nvoid main()\\n{\\n  gl_Position = u_MvpMatrix * a_Position;\\n  \\n  float age = u_CurrentTime-a_Time;\\n  float normalizedAge = clamp(age / u_Duration,0.0,1.0);\\n   \\n  v_Texcoord=a_Texcoord0;\\n  \\n  v_Color=u_Color;\\n  v_Color.a*=1.0-normalizedAge;\\n}\\n\";\n\t\tps=\"#ifdef HIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nuniform vec4 u_Albedo;\\nuniform sampler2D u_Texture;\\n\\nvarying vec2 v_Texcoord;\\nvarying vec4 v_Color;\\n\\n\\nvoid main()\\n{\t\\n  gl_FragColor=texture2D(u_Texture, v_Texcoord)*v_Color;\\n  gl_FragColor=gl_FragColor*u_Albedo;\\n}\\n\\n\";\n\t\tshaderCompile=ShaderCompile3D.add(GLITTER,vs,ps,attributeMap,uniformMap);\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0};\n\t\tuniformMap={\n\t\t\t'u_Intensity':[ /*laya.d3.resource.models.Sky.INTENSITY*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_AlphaBlending':[ /*laya.d3.resource.models.Sky.ALPHABLENDING*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_CubeTexture':[ /*laya.d3.resource.models.Sky.DIFFUSETEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.BaseCamera.VPMATRIX_NO_TRANSLATE*/4,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3]};\n\t\tvar skyBox=Shader3D.nameKey.add(\"SkyBox\");\n\t\tvs=\"attribute vec4 a_Position;\\nuniform mat4 u_MvpMatrix;\\nvarying vec3 v_Texcoord;\\n\\n\\nvoid main()\\n{\\n  gl_Position = (u_MvpMatrix*a_Position).xyww;\\n  v_Texcoord=a_Position.xyz;\\n}\\n\";\n\t\tps=\"#ifdef HIGHPRECISION\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n\\nuniform float u_Intensity;\\nuniform float u_AlphaBlending;\\nuniform samplerCube u_CubeTexture;\\n\\nvarying vec3 v_Texcoord;\\n\\n\\nvoid main()\\n{\t\\n  gl_FragColor=vec4(textureCube(u_CubeTexture, v_Texcoord).rgb*u_Intensity,u_AlphaBlending);\\n}\\n\\n\";\n\t\tShaderCompile3D.add(skyBox,vs,ps,attributeMap,uniformMap);\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2};\n\t\tuniformMap={\n\t\t\t'u_Intensity':[ /*laya.d3.resource.models.Sky.INTENSITY*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_AlphaBlending':[ /*laya.d3.resource.models.Sky.ALPHABLENDING*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_texture':[ /*laya.d3.resource.models.Sky.DIFFUSETEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.BaseCamera.VPMATRIX_NO_TRANSLATE*/4,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3]};\n\t\tvar skyDome=Shader3D.nameKey.add(\"SkyDome\");\n\t\tvs=\"attribute vec4 a_Position;\\nattribute vec2 a_Texcoord0;\\nuniform mat4 u_MvpMatrix;\\nvarying vec2 v_Texcoord;\\n\\n\\nvoid main()\\n{\\n  gl_Position = (u_MvpMatrix*a_Position).xyww;\\n  v_Texcoord = a_Texcoord0;\\n}\\n\";\n\t\tps=\"#ifdef HIGHPRECISION\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n\\nuniform float u_Intensity;\\nuniform float u_AlphaBlending;\\nuniform sampler2D u_texture;\\n\\nvarying vec2 v_Texcoord;\\n\\n\\nvoid main()\\n{\t\\n  gl_FragColor=vec4(texture2D(u_texture, v_Texcoord).rgb*u_Intensity,u_AlphaBlending);\\n}\\n\\n\";\n\t\tShaderCompile3D.add(skyDome,vs,ps,attributeMap,uniformMap);\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_Texcoord1':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE1*/15};\n\t\tuniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WorldMat':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_LightmapScaleOffset':[ /*laya.d3.core.RenderableSprite3D.LIGHTMAPSCALEOFFSET*/2,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_LightMap':[ /*laya.d3.core.RenderableSprite3D.LIGHTMAP*/3,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SplatAlphaTexture':[ /*laya.d3.core.material.TerrainMaterial.SPLATALPHATEXTURE*/0,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_NormalTexture':[ /*laya.d3.core.material.TerrainMaterial.NORMALTEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture1':[ /*laya.d3.core.material.TerrainMaterial.DIFFUSETEXTURE1*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture2':[ /*laya.d3.core.material.TerrainMaterial.DIFFUSETEXTURE2*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture3':[ /*laya.d3.core.material.TerrainMaterial.DIFFUSETEXTURE3*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture4':[ /*laya.d3.core.material.TerrainMaterial.DIFFUSETEXTURE4*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScale1':[ /*laya.d3.core.material.TerrainMaterial.DIFFUSESCALE1*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScale2':[ /*laya.d3.core.material.TerrainMaterial.DIFFUSESCALE2*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScale3':[ /*laya.d3.core.material.TerrainMaterial.DIFFUSESCALE3*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScale4':[ /*laya.d3.core.material.TerrainMaterial.DIFFUSESCALE4*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialDiffuse':[ /*laya.d3.core.material.TerrainMaterial.MATERIALDIFFUSE*/11,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialAmbient':[ /*laya.d3.core.material.TerrainMaterial.MATERIALAMBIENT*/10,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialSpecular':[ /*laya.d3.core.material.TerrainMaterial.MATERIALSPECULAR*/12,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_CameraPos':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_FogStart':[ /*laya.d3.core.scene.Scene.FOGSTART*/1,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogRange':[ /*laya.d3.core.scene.Scene.FOGRANGE*/2,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogColor':[ /*laya.d3.core.scene.Scene.FOGCOLOR*/0,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Diffuse':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Position':[ /*laya.d3.core.scene.Scene.POINTLIGHTPOS*/5,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Range':[ /*laya.d3.core.scene.Scene.POINTLIGHTRANGE*/6,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Attenuation':[ /*laya.d3.core.scene.Scene.POINTLIGHTATTENUATION*/7,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Diffuse':[ /*laya.d3.core.scene.Scene.POINTLIGHTCOLOR*/8,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Position':[ /*laya.d3.core.scene.Scene.SPOTLIGHTPOS*/9,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Direction':[ /*laya.d3.core.scene.Scene.SPOTLIGHTDIRECTION*/10,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Range':[ /*laya.d3.core.scene.Scene.SPOTLIGHTRANGE*/12,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Spot':[ /*laya.d3.core.scene.Scene.SPOTLIGHTSPOT*/11,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Attenuation':[ /*laya.d3.core.scene.Scene.SPOTLIGHTATTENUATION*/13,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Diffuse':[ /*laya.d3.core.scene.Scene.SPOTLIGHTCOLOR*/14,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_AmbientColor':[ /*laya.d3.core.scene.Scene.AMBIENTCOLOR*/21,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap1':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap2':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap3':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE3*/20,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPSSMDistance':[ /*laya.d3.core.scene.Scene.SHADOWDISTANCE*/15,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_lightShadowVP':[ /*laya.d3.core.scene.Scene.SHADOWLIGHTVIEWPROJECT*/16,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPCFoffset':[ /*laya.d3.core.scene.Scene.SHADOWMAPPCFOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]};\n\t\tvar terrain=Shader3D.nameKey.add(\"Terrain\");\n\t\tvs=\"attribute vec4 a_Position;\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(LIGHTMAP)\\n\tattribute vec3 a_Normal;\\n\tvarying vec3 v_Normal;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||(defined(RECEIVESHADOW)&&defined(SHADOWMAP_PSSM1))\\n\tuniform mat4 u_WorldMat;\\n\tvarying vec3 v_PositionWorld;\\n#endif\\n\\nvarying float v_posViewZ;\\n#ifdef RECEIVESHADOW\\n  #ifdef SHADOWMAP_PSSM1 \\n  varying vec4 v_lightMVPPos;\\n  uniform mat4 u_lightShadowVP[4];\\n  #endif\\n#endif\\n\\n#ifdef LIGHTMAP\\n\tuniform vec4 u_LightmapScaleOffset;\\n\tvarying vec2 v_LightMapUV;\\n#endif\\n\\nattribute vec2 a_Texcoord0;\\nattribute vec2 a_Texcoord1;\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\nuniform mat4 u_MvpMatrix;\\n\\nvoid main()\\n{\\n\tgl_Position = u_MvpMatrix * a_Position;\\n\tv_Texcoord0=a_Texcoord0;\\n\tv_Texcoord1=a_Texcoord1;\\n\t\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\tv_Normal=a_Normal;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||(defined(RECEIVESHADOW)&&defined(SHADOWMAP_PSSM1))\\n\tv_PositionWorld=(u_WorldMat*a_Position).xyz;\\n#endif\\n\\n#ifdef LIGHTMAP\\n\t//这个地方使用a_Normal 并不是真的代表normal，其实凑巧法线图的uv正好是符合 light_Map的UV\\n\tv_LightMapUV=vec2(a_Normal.x*u_LightmapScaleOffset.x+u_LightmapScaleOffset.z,(a_Normal.y-1.0)*u_LightmapScaleOffset.y+u_LightmapScaleOffset.w);\\n#endif\\n\\n#ifdef RECEIVESHADOW\\n\tv_posViewZ = gl_Position.w;\\n\t#ifdef SHADOWMAP_PSSM1\\n\t\tv_lightMVPPos = u_lightShadowVP[0] * vec4(v_PositionWorld,1.0);\\n\t#endif\\n#endif\\n\\n}\";\n\t\tps=\"#ifdef HIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\n#include \\\"LightHelper.glsl\\\";\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\tuniform vec3 u_MaterialDiffuse;\\n\tuniform vec4 u_MaterialSpecular;\\n\tuniform vec3 u_CameraPos;\\n\tvarying vec3 v_Normal;\\n\tvarying vec3 v_PositionWorld;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(LIGHTMAP)\\n\tuniform vec3 u_MaterialAmbient;\\n#endif\\n\\n#ifdef FOG\\n\tuniform float u_FogStart;\\n\tuniform float u_FogRange;\\n\tuniform vec3 u_FogColor;\\n#endif\\n\\n\\n#ifdef DIRECTIONLIGHT\\n\tuniform DirectionLight u_DirectionLight;\\n#endif\\n\\n#ifdef POINTLIGHT\\n\tuniform PointLight u_PointLight;\\n#endif\\n\\n#ifdef SPOTLIGHT\\n\tuniform SpotLight u_SpotLight;\\n#endif\\n\\nuniform vec3 u_AmbientColor;\\n\\n#include \\\"ShadowHelper.glsl\\\"\\n#ifdef RECEIVESHADOW\\n\t#if defined(SHADOWMAP_PSSM2)||defined(SHADOWMAP_PSSM3)\\n\tuniform mat4 u_lightShadowVP[4];\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM1 \\n\tvarying vec4 v_lightMVPPos;\\n\t#endif\\n#endif\\nvarying float v_posViewZ;\\n\\n\\nuniform sampler2D u_SplatAlphaTexture;\\nuniform sampler2D u_NormalTexture;\\nuniform sampler2D u_DiffuseTexture1;\\nuniform sampler2D u_DiffuseTexture2;\\nuniform sampler2D u_DiffuseTexture3;\\nuniform sampler2D u_DiffuseTexture4;\\nuniform vec2 u_DiffuseScale1;\\nuniform vec2 u_DiffuseScale2;\\nuniform vec2 u_DiffuseScale3;\\nuniform vec2 u_DiffuseScale4;\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\n\\n#ifdef LIGHTMAP\\n\tuniform sampler2D u_LightMap;\\n\tvarying vec2 v_LightMapUV;\\n#endif\\n\\nvoid main()\\n{\\n#ifdef DETAIL_NUM1\\n\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord1/u_DiffuseScale1);\\n\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\tgl_FragColor.xyz = color1.xyz;\\n#endif\\n#ifdef DETAIL_NUM2\\n\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord1/u_DiffuseScale1);\\n\tvec4 color2 = texture2D(u_DiffuseTexture2, v_Texcoord1/u_DiffuseScale2);\\n\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\tgl_FragColor.xyz = color1.xyz * (1.0-splatAlpha.r) + color2.xyz * splatAlpha.r;\\n#endif\\n#ifdef DETAIL_NUM3\\n\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord1/u_DiffuseScale1);\\n\tvec4 color2 = texture2D(u_DiffuseTexture2, v_Texcoord1/u_DiffuseScale2);\\n\tvec4 color3 = texture2D(u_DiffuseTexture3, v_Texcoord1/u_DiffuseScale3);\\n\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\tgl_FragColor.xyz = color1.xyz * (1.0-(splatAlpha.r+splatAlpha.g)) + color2.xyz * splatAlpha.r + color3.xyz * splatAlpha.g;\\n#endif\\n#ifdef DETAIL_NUM4\\n\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord1/u_DiffuseScale1);\\n\tvec4 color2 = texture2D(u_DiffuseTexture2, v_Texcoord1/u_DiffuseScale2);\\n\tvec4 color3 = texture2D(u_DiffuseTexture3, v_Texcoord1/u_DiffuseScale3);\\n\tvec4 color4 = texture2D(u_DiffuseTexture4, v_Texcoord1/u_DiffuseScale4);\\n\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\tgl_FragColor.xyz = color1.xyz * (1.0-(splatAlpha.r+splatAlpha.g+splatAlpha.b))+ color2.xyz * splatAlpha.r + color3.xyz * splatAlpha.g + color4.xyz * splatAlpha.b;\\n#endif\\n\tgl_FragColor.w = splatAlpha.a;\\n\t\t\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n    vec3 normal = texture2D(u_NormalTexture,v_Normal.xy).xyz;\\n\tnormal = normal*2.0 - vec3(1.0);\\n\tvec3 diffuse = vec3(0.0);\\n\tvec3 ambient = vec3(0.0);\\n\tvec3 specular= vec3(0.0);\\n\tvec3 dif, amb, spe;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)\\n\tvec3 toEye;\\n\t#ifdef FOG\\n\t\ttoEye=u_CameraPos-v_PositionWorld;\\n\t\tfloat toEyeLength=length(toEye);\\n\t\ttoEye/=toEyeLength;\\n\t#else\\n\t\ttoEye=normalize(u_CameraPos-v_PositionWorld);\\n\t#endif\\n#endif\\n\\n#ifdef DIRECTIONLIGHT\\n\tcomputeDirectionLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_DirectionLight,u_AmbientColor,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n \\n#ifdef POINTLIGHT\\n\tcomputePointLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_PointLight,u_AmbientColor,v_PositionWorld,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n\\n#ifdef SPOTLIGHT\\n\tComputeSpotLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_SpotLight,u_AmbientColor,v_PositionWorld,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n\\n#ifdef RECEIVESHADOW\\n\tfloat shadowValue = 1.0;\\n\t#ifdef SHADOWMAP_PSSM3\\n\t\tshadowValue = getShadowPSSM3( u_shadowMap1,u_shadowMap2,u_shadowMap3,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM2\\n\t\tshadowValue = getShadowPSSM2( u_shadowMap1,u_shadowMap2,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t#endif \\n\t#ifdef SHADOWMAP_PSSM1\\n\t\tshadowValue = getShadowPSSM1( u_shadowMap1,v_lightMVPPos,u_shadowPSSMDistance,u_shadowPCFoffset,v_posViewZ,0.001);\\n\t#endif\\n#endif\\n\\n#ifdef LIGHTMAP\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient + texture2D(u_LightMap, v_LightMapUV).rgb);\\n\t#else\\n\t\t#if defined(RECEIVESHADOW)\\n\t\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient + texture2D(u_LightMap, v_LightMapUV).rgb * shadowValue);\\n\t\t#else\\n\t\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient + texture2D(u_LightMap, v_LightMapUV).rgb);\\n\t\t#endif\\n\t#endif\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t#ifdef RECEIVESHADOW\\n\t\tgl_FragColor =vec4( gl_FragColor.rgb*(ambient + diffuse*shadowValue) + specular * shadowValue,gl_FragColor.a);\\n\t#else\\n\t\tgl_FragColor =vec4( gl_FragColor.rgb*(ambient + diffuse) + specular, gl_FragColor.a);\\n\t#endif\\n#endif\\n\\n#ifdef FOG\\n\tfloat lerpFact=clamp((toEyeLength-u_FogStart)/u_FogRange,0.0,1.0);\\n\tgl_FragColor.rgb=mix(gl_FragColor.rgb,u_FogColor,lerpFact);\\n#endif\\n}\\n\\n\";\n\t\tvar terrainCompile3D=ShaderCompile3D.add(terrain,vs,ps,attributeMap,uniformMap);\n\t\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM1=terrainCompile3D.registerMaterialDefine(\"DETAIL_NUM1\");\n\t\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM2=terrainCompile3D.registerMaterialDefine(\"DETAIL_NUM2\");\n\t\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM4=terrainCompile3D.registerMaterialDefine(\"DETAIL_NUM4\");\n\t\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM3=terrainCompile3D.registerMaterialDefine(\"DETAIL_NUM3\");\n\t\tattributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2\n\t\t};\n\t\tuniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WorldMat':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPos':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_LightmapScaleOffset':[ /*laya.d3.core.RenderableSprite3D.LIGHTMAPSCALEOFFSET*/2,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_LightMap':[ /*laya.d3.core.RenderableSprite3D.LIGHTMAP*/3,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SplatAlphaTexture':[ /*laya.d3.core.material.ExtendTerrainMaterial.SPLATALPHATEXTURE*/0,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture1':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSETEXTURE1*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture2':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSETEXTURE2*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture3':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSETEXTURE3*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture4':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSETEXTURE4*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseTexture5':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSETEXTURE5*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScaleOffset1':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSESCALEOFFSET1*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScaleOffset2':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSESCALEOFFSET2*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScaleOffset3':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSESCALEOFFSET3*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScaleOffset4':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSESCALEOFFSET4*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DiffuseScaleOffset5':[ /*laya.d3.core.material.ExtendTerrainMaterial.DIFFUSESCALEOFFSET5*/10,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialAlbedo':[ /*laya.d3.core.material.ExtendTerrainMaterial.MATERIALALBEDO*/14,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialDiffuse':[ /*laya.d3.core.material.ExtendTerrainMaterial.MATERIALDIFFUSE*/12,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialAmbient':[ /*laya.d3.core.material.ExtendTerrainMaterial.MATERIALAMBIENT*/11,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaterialSpecular':[ /*laya.d3.core.material.ExtendTerrainMaterial.MATERIALSPECULAR*/13,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_FogStart':[ /*laya.d3.core.scene.Scene.FOGSTART*/1,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogRange':[ /*laya.d3.core.scene.Scene.FOGRANGE*/2,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogColor':[ /*laya.d3.core.scene.Scene.FOGCOLOR*/0,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Diffuse':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Position':[ /*laya.d3.core.scene.Scene.POINTLIGHTPOS*/5,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Range':[ /*laya.d3.core.scene.Scene.POINTLIGHTRANGE*/6,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Attenuation':[ /*laya.d3.core.scene.Scene.POINTLIGHTATTENUATION*/7,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_PointLight.Diffuse':[ /*laya.d3.core.scene.Scene.POINTLIGHTCOLOR*/8,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Position':[ /*laya.d3.core.scene.Scene.SPOTLIGHTPOS*/9,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Direction':[ /*laya.d3.core.scene.Scene.SPOTLIGHTDIRECTION*/10,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Range':[ /*laya.d3.core.scene.Scene.SPOTLIGHTRANGE*/12,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Spot':[ /*laya.d3.core.scene.Scene.SPOTLIGHTSPOT*/11,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Attenuation':[ /*laya.d3.core.scene.Scene.SPOTLIGHTATTENUATION*/13,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_SpotLight.Diffuse':[ /*laya.d3.core.scene.Scene.SPOTLIGHTCOLOR*/14,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_AmbientColor':[ /*laya.d3.core.scene.Scene.AMBIENTCOLOR*/21,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap1':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap2':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowMap3':[ /*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE3*/20,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPSSMDistance':[ /*laya.d3.core.scene.Scene.SHADOWDISTANCE*/15,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_lightShadowVP':[ /*laya.d3.core.scene.Scene.SHADOWLIGHTVIEWPROJECT*/16,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_shadowPCFoffset':[ /*laya.d3.core.scene.Scene.SHADOWMAPPCFOFFSET*/17,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]\n\t\t};\n\t\tvar extendTerrainShader=Shader3D.nameKey.add(\"ExtendTerrain\");\n\t\tvs=\"attribute vec4 a_Position;\\nattribute vec2 a_Texcoord0;\\n\\nuniform mat4 u_MvpMatrix;\\n\\nvarying vec2 v_Texcoord0;\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(LIGHTMAP)\\n\tattribute vec3 a_Normal;\\n\tvarying vec3 v_Normal;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)||(defined(RECEIVESHADOW)&&defined(SHADOWMAP_PSSM1))\\n\tuniform mat4 u_WorldMat;\\n\tvarying vec3 v_PositionWorld;\\n#endif\\n\\n#ifdef LIGHTMAP\\n\tvarying vec2 v_LightMapUV;\\n\tuniform vec4 u_LightmapScaleOffset;\\n#endif\\n\\n#ifdef RECEIVESHADOW\\n\tvarying float v_posViewZ;\\n\t#ifdef SHADOWMAP_PSSM1 \\n\t\tvarying vec4 v_lightMVPPos;\\n\t\tuniform mat4 u_lightShadowVP[4];\\n\t#endif\\n#endif\\n\\nvoid main()\\n{\\n\tgl_Position = u_MvpMatrix * a_Position;\\n  \\n\tv_Texcoord0 = a_Texcoord0;\\n  \\n\t#ifdef LIGHTMAP\\n\t\tv_LightMapUV = vec2(a_Texcoord0.x*u_LightmapScaleOffset.x+u_LightmapScaleOffset.z,(a_Texcoord0.y-1.0)*u_LightmapScaleOffset.y+u_LightmapScaleOffset.w);\\n\t#endif\\n  \\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t\tv_Normal = a_Normal;\\n\t#endif\\n\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)||(defined(RECEIVESHADOW)&&defined(SHADOWMAP_PSSM1))\\n\t\tv_PositionWorld=(u_WorldMat*a_Position).xyz;\\n\t#endif\\n\\n\t#ifdef RECEIVESHADOW\\n\t\tv_posViewZ = gl_Position.w;\\n\t\t#ifdef SHADOWMAP_PSSM1\\n\t\t\tv_lightMVPPos = u_lightShadowVP[0] * vec4(v_PositionWorld,1.0);\\n\t\t#endif\\n\t#endif\\n}\";\n\t\tps=\"#ifdef HIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\n#include \\\"LightHelper.glsl\\\";\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)\\n\tuniform vec3 u_MaterialDiffuse;\\n\tuniform vec4 u_MaterialSpecular;\\n\tuniform vec3 u_CameraPos;\\n\tvarying vec3 v_Normal;\\n\tvarying vec3 v_PositionWorld;\\n#endif\\n\\n#ifdef FOG\\n\tuniform float u_FogStart;\\n\tuniform float u_FogRange;\\n\tuniform vec3 u_FogColor;\\n#endif\\n\\n\\n#ifdef DIRECTIONLIGHT\\n\tuniform DirectionLight u_DirectionLight;\\n#endif\\n\\n#ifdef POINTLIGHT\\n\tuniform PointLight u_PointLight;\\n#endif\\n\\n#ifdef SPOTLIGHT\\n\tuniform SpotLight u_SpotLight;\\n#endif\\n\\nuniform vec3 u_AmbientColor;\\n\\n#include \\\"ShadowHelper.glsl\\\"\\n#ifdef RECEIVESHADOW\\n\t#if defined(SHADOWMAP_PSSM2)||defined(SHADOWMAP_PSSM3)\\n\tuniform mat4 u_lightShadowVP[4];\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM1 \\n\tvarying vec4 v_lightMVPPos;\\n\t#endif\\n#endif\\nvarying float v_posViewZ;\\n\\n\\nuniform sampler2D u_SplatAlphaTexture;\\n\\nuniform sampler2D u_DiffuseTexture1;\\nuniform sampler2D u_DiffuseTexture2;\\nuniform sampler2D u_DiffuseTexture3;\\nuniform sampler2D u_DiffuseTexture4;\\nuniform sampler2D u_DiffuseTexture5;\\n\\nuniform vec4 u_DiffuseScaleOffset1;\\nuniform vec4 u_DiffuseScaleOffset2;\\nuniform vec4 u_DiffuseScaleOffset3;\\nuniform vec4 u_DiffuseScaleOffset4;\\nuniform vec4 u_DiffuseScaleOffset5;\\n\\nvarying vec2 v_Texcoord0;\\n\\nuniform vec3 u_MaterialAmbient;\\nuniform vec4 u_MaterialAlbedo;\\n\\n#ifdef LIGHTMAP\\n\tuniform sampler2D u_LightMap;\\n\tvarying vec2 v_LightMapUV;\\n#endif\\n\\nvoid main()\\n{\\n\t#ifdef ExtendTerrain_DETAIL_NUM1\\n\t\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\t\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord0 * u_DiffuseScaleOffset1.xy);\\n\t\tgl_FragColor.xyz = color1.xyz * splatAlpha.r;\\n\t#endif\\n\t#ifdef ExtendTerrain_DETAIL_NUM2\\n\t\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\t\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord0 * u_DiffuseScaleOffset1.xy);\\n\t\tvec4 color2 = texture2D(u_DiffuseTexture2, v_Texcoord0 * u_DiffuseScaleOffset2.xy);\\n\t\tgl_FragColor.xyz = color1.xyz * splatAlpha.r + color2.xyz * (1.0 - splatAlpha.r);\\n\t#endif\\n\t#ifdef ExtendTerrain_DETAIL_NUM3\\n\t\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\t\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord0 * u_DiffuseScaleOffset1.xy);\\n\t\tvec4 color2 = texture2D(u_DiffuseTexture2, v_Texcoord0 * u_DiffuseScaleOffset2.xy);\\n\t\tvec4 color3 = texture2D(u_DiffuseTexture3, v_Texcoord0 * u_DiffuseScaleOffset3.xy);\\n\t\tgl_FragColor.xyz = color1.xyz * splatAlpha.r  + color2.xyz * splatAlpha.g + color3.xyz * (1.0 - splatAlpha.r - splatAlpha.g);\\n\t#endif\\n\t#ifdef ExtendTerrain_DETAIL_NUM4\\n\t\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\t\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord0 * u_DiffuseScaleOffset1.xy);\\n\t\tvec4 color2 = texture2D(u_DiffuseTexture2, v_Texcoord0 * u_DiffuseScaleOffset2.xy);\\n\t\tvec4 color3 = texture2D(u_DiffuseTexture3, v_Texcoord0 * u_DiffuseScaleOffset3.xy);\\n\t\tvec4 color4 = texture2D(u_DiffuseTexture4, v_Texcoord0 * u_DiffuseScaleOffset4.xy);\\n\t\tgl_FragColor.xyz = color1.xyz * splatAlpha.r  + color2.xyz * splatAlpha.g + color3.xyz * splatAlpha.b + color4.xyz * (1.0 - splatAlpha.r - splatAlpha.g - splatAlpha.b);\\n\t#endif\\n\t#ifdef ExtendTerrain_DETAIL_NUM5\\n\t\tvec4 splatAlpha = texture2D(u_SplatAlphaTexture, v_Texcoord0);\\n\t\tvec4 color1 = texture2D(u_DiffuseTexture1, v_Texcoord0 * u_DiffuseScaleOffset1.xy);\\n\t\tvec4 color2 = texture2D(u_DiffuseTexture2, v_Texcoord0 * u_DiffuseScaleOffset2.xy);\\n\t\tvec4 color3 = texture2D(u_DiffuseTexture3, v_Texcoord0 * u_DiffuseScaleOffset3.xy);\\n\t\tvec4 color4 = texture2D(u_DiffuseTexture4, v_Texcoord0 * u_DiffuseScaleOffset4.xy);\\n\t\tvec4 color5 = texture2D(u_DiffuseTexture5, v_Texcoord0 * u_DiffuseScaleOffset5.xy);\\n\t\tgl_FragColor.xyz = color1.xyz * splatAlpha.r  + color2.xyz * splatAlpha.g + color3.xyz * splatAlpha.b + color4.xyz * splatAlpha.a + color5.xyz * (1.0 - splatAlpha.r - splatAlpha.g - splatAlpha.b - splatAlpha.a);\\n\t#endif\\n\t\tgl_FragColor.w = splatAlpha.a;\\n\t\t\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n    vec3 normal = v_Normal;\\n\tvec3 diffuse = vec3(0.0);\\n\tvec3 ambient = vec3(0.0);\\n\tvec3 specular= vec3(0.0);\\n\tvec3 dif, amb, spe;\\n#endif\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)||defined(FOG)\\n\tvec3 toEye;\\n\t#ifdef FOG\\n\t\ttoEye=u_CameraPos-v_PositionWorld;\\n\t\tfloat toEyeLength=length(toEye);\\n\t\ttoEye/=toEyeLength;\\n\t#else\\n\t\ttoEye=normalize(u_CameraPos-v_PositionWorld);\\n\t#endif\\n#endif\\n\\n#ifdef DIRECTIONLIGHT\\n\tcomputeDirectionLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_DirectionLight,u_AmbientColor,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n \\n#ifdef POINTLIGHT\\n\tcomputePointLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_PointLight,u_AmbientColor,v_PositionWorld,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n\\n#ifdef SPOTLIGHT\\n\tComputeSpotLight(u_MaterialDiffuse,u_MaterialAmbient,u_MaterialSpecular,u_SpotLight,u_AmbientColor,v_PositionWorld,normal,toEye, dif, amb, spe);\\n\tdiffuse+=dif;\\n\tambient+=amb;\\n\tspecular+=spe;\\n#endif\\n\\n#ifdef RECEIVESHADOW\\n\tfloat shadowValue = 1.0;\\n\t#ifdef SHADOWMAP_PSSM3\\n\t\tshadowValue = getShadowPSSM3( u_shadowMap1,u_shadowMap2,u_shadowMap3,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t#endif\\n\t#ifdef SHADOWMAP_PSSM2\\n\t\tshadowValue = getShadowPSSM2( u_shadowMap1,u_shadowMap2,u_lightShadowVP,u_shadowPSSMDistance,u_shadowPCFoffset,v_PositionWorld,v_posViewZ,0.001);\\n\t#endif \\n\t#ifdef SHADOWMAP_PSSM1\\n\t\tshadowValue = getShadowPSSM1( u_shadowMap1,v_lightMVPPos,u_shadowPSSMDistance,u_shadowPCFoffset,v_posViewZ,0.001);\\n\t#endif\\n#endif\\n\\n#ifdef LIGHTMAP\\n\t#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient + texture2D(u_LightMap, v_LightMapUV).rgb);\\n\t#else\\n\t\t#if defined(RECEIVESHADOW)\t\t\\n\t\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient+texture2D(u_LightMap, v_LightMapUV).rgb * shadowValue);\\n\t\t\t//vec3 tColor= u_MaterialAmbient + texture2D(u_LightMap, v_LightMapUV).rgb * shadowValue + mix(vec3(0.15,0.15,0.15),vec3(0.0),shadowValue);\\n\t\t\t//gl_FragColor.rgb*=tColor;\\n\t\t#else\\n\t\t\tgl_FragColor.rgb=gl_FragColor.rgb*(u_MaterialAmbient + texture2D(u_LightMap, v_LightMapUV).rgb);\\n\t\t#endif\\n\t#endif\\n#endif\\n\\ngl_FragColor=gl_FragColor*u_MaterialAlbedo;\\n\\n#if defined(DIRECTIONLIGHT)||defined(POINTLIGHT)||defined(SPOTLIGHT)\\n\t#ifdef RECEIVESHADOW\\n\t\tgl_FragColor = vec4( gl_FragColor.rgb*(ambient + diffuse*shadowValue) + specular * shadowValue,gl_FragColor.a);\\n\t#else\\n\t\tgl_FragColor =vec4( gl_FragColor.rgb*(ambient + diffuse) + specular, gl_FragColor.a);\\n\t#endif\\n#endif\\n\\n#ifdef FOG\\n\tfloat lerpFact=clamp((toEyeLength-u_FogStart)/u_FogRange,0.0,1.0);\\n\tgl_FragColor.rgb=mix(gl_FragColor.rgb,u_FogColor,lerpFact);\\n#endif\\n}\\n\\n\\n\\n\\n\\n\";\n\t\tvar extendTerrainCompile3D=ShaderCompile3D.add(extendTerrainShader,vs,ps,attributeMap,uniformMap);\n\t\textendTerrainCompile3D.addSpriteDefines(RenderableSprite3D.shaderDefines);\n\t\textendTerrainCompile3D.addMaterialDefines(ExtendTerrainMaterial.shaderDefines);\n\t\tattributeMap={\n\t\t\t'a_Position' :/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_OffsetVector':/*laya.d3.graphics.VertexElementUsage.OFFSETVECTOR*/41,\n\t\t\t'a_Texcoord0X' :/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0X*/38,\n\t\t\t'a_Texcoord0Y' :/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0Y*/40,\n\t\t\t'a_BirthTime' :/*laya.d3.graphics.VertexElementUsage.TIME0*/33\n\t\t};\n\t\tuniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VMatrix':[ /*laya.d3.core.BaseCamera.VIEWMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_PMatrix':[ /*laya.d3.core.BaseCamera.PROJECTMATRIX*/2,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_TilingOffset':[ /*laya.d3.core.trail.TrailMaterial.TILINGOFFSET*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MainTexture':[ /*laya.d3.core.trail.TrailMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MainColor':[ /*laya.d3.core.trail.TrailMaterial.TINTCOLOR*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_CurTime' :[ /*laya.d3.core.trail.TrailSprite3D.CURTIME*/3,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_LifeTime' :[ /*laya.d3.core.trail.TrailSprite3D.LIFETIME*/4,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WidthCurve' :[ /*laya.d3.core.trail.TrailSprite3D.WIDTHCURVE*/5,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WidthCurveKeyLength' :[ /*laya.d3.core.trail.TrailSprite3D.WIDTHCURVEKEYLENGTH*/6,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_GradientColorkey' :[ /*laya.d3.core.trail.TrailSprite3D.GRADIENTCOLORKEY*/7,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_GradientAlphakey' :[ /*laya.d3.core.trail.TrailSprite3D.GRADIENTALPHAKEY*/8,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2]\n\t\t};\n\t\tvar trailShader=Shader3D.nameKey.add(\"Trail\");\n\t\tvs=\"attribute vec3 a_Position;\\nattribute vec3 a_OffsetVector;\\nattribute vec4 a_Color;\\nattribute float a_Texcoord0X;\\nattribute float a_Texcoord0Y;\\nattribute float a_BirthTime;\\n\\nuniform mat4 u_VMatrix;\\nuniform mat4 u_PMatrix;\\n\\nuniform vec4 u_TilingOffset;\\n\\nuniform float u_CurTime;\\nuniform float u_LifeTime;\\nuniform vec4 u_WidthCurve[10];\\nuniform int u_WidthCurveKeyLength;\\n\\nuniform vec4 u_GradientColorkey[10];\\nuniform vec2 u_GradientAlphakey[10];\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec4 v_Color;\\n\\nfloat hermiteInterpolate(float t, float outTangent, float inTangent, float duration, float value1, float value2)\\n{\\n\tfloat t2 = t * t;\\n\tfloat t3 = t2 * t;\\n\tfloat a = 2.0 * t3 - 3.0 * t2 + 1.0;\\n\tfloat b = t3 - 2.0 * t2 + t;\\n\tfloat c = t3 - t2;\\n\tfloat d = -2.0 * t3 + 3.0 * t2;\\n\treturn a * value1 + b * outTangent * duration + c * inTangent * duration + d * value2;\\n}\\n\\nfloat getCurWidth(in float normalizeTime)\\n{\\n\tif(normalizeTime == 0.0){\\n\t\treturn u_WidthCurve[0].w;\\n\t}\\n\telse if(normalizeTime >= 1.0){\\n\t\treturn u_WidthCurve[u_WidthCurveKeyLength - 1].w;\\n\t}\\n\telse{\\n\t\tfor(int i = 0; i < 10; i ++ )\\n\t\t{\\n\t\t\tif(normalizeTime == u_WidthCurve[i].x)\\n\t\t\t{\\n\t\t\t\treturn u_WidthCurve[i].w;\\n\t\t\t}\\n\t\t\t\\n\t\t\tvec4 lastFrame = u_WidthCurve[i];\\n\t\t\tvec4 nextFrame = u_WidthCurve[i + 1];\\n\t\t\tif(normalizeTime > lastFrame.x && normalizeTime < nextFrame.x)\\n\t\t\t{\\n\t\t\t\tfloat duration = nextFrame.x - lastFrame.x;\\n\t\t\t\tfloat t = (normalizeTime - lastFrame.x) / duration;\\n\t\t\t\tfloat outTangent = lastFrame.z;\\n\t\t\t\tfloat inTangent = nextFrame.y;\\n\t\t\t\tfloat value1 = lastFrame.w;\\n\t\t\t\tfloat value2 = nextFrame.w;\\n\t\t\t\treturn hermiteInterpolate(t, outTangent, inTangent, duration, value1, value2);\\n\t\t\t}\\n\t\t}\t\\n\t}\\n}\t\\n\\nvec4 getColorFromGradientByBlend(in vec4 gradientColors[10], in vec2 gradientAlphas[10], in float normalizeTime)\\n{\\n\tvec4 color;\\n\tfor(int i = 1; i < 10; i++)\\n\t{\\n\t\tvec4 gradientColor = gradientColors[i];\\n\t\tfloat colorKey = gradientColor.w;\\n\t\tif(colorKey >= normalizeTime)\\n\t\t{\\n\t\t\tvec4 lastGradientColor = gradientColors[i-1];\\n\t\t\tfloat lastColorKey = lastGradientColor.w;\\n\t\t\tfloat age = (normalizeTime - lastColorKey) / (colorKey - lastColorKey);\\n\t\t\tcolor.rgb = mix(gradientColors[i-1].xyz, gradientColor.xyz, age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\tfor(int i = 1; i < 10; i++)\\n\t{\\n\t\tvec2 gradientAlpha = gradientAlphas[i];\\n\t\tfloat alphaKey = gradientAlpha.y;\\n\t\tif(alphaKey >= normalizeTime)\\n\t\t{\\n\t\t\tvec2 lastGradientAlpha = gradientAlphas[i-1];\\n\t\t\tfloat lastAlphaKey = lastGradientAlpha.y;\\n\t\t\tfloat age = (normalizeTime - lastAlphaKey) / (alphaKey - lastAlphaKey);\\n\t\t\tcolor.a = mix(lastGradientAlpha.x, gradientAlpha.x, age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn color;\\n}\\n\\nvec4 getColorFromGradientByFixed(in vec4 gradientColors[10], in vec2 gradientAlphas[10], in float normalizeTime)\\n{\\n\tvec4 color;\\n\tfor(int i = 1; i < 10; i++)\\n\t{\\n\t\tvec4 gradientColor = gradientColors[i];\\n\t\tif(gradientColor.w >= normalizeTime)\\n\t\t{\\n\t\t\tcolor.rgb = gradientColor.xyz;\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\tfor(int i = 1; i < 10; i++)\\n\t{\\n\t\tvec2 gradientAlpha = gradientAlphas[i];\\n\t\tif(gradientAlpha.y >= normalizeTime)\\n\t\t{\\n\t\t\tcolor.a = gradientAlpha.x;\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn color;\\n}\\n\\nvoid main()\\n{\\n\tfloat normalizeTime = (u_CurTime - a_BirthTime) / u_LifeTime;\\n\t\\n\tgl_Position = u_PMatrix * u_VMatrix * vec4(a_Position + a_OffsetVector * getCurWidth(normalizeTime),1.0);\\n\t\\n\t#ifdef TILINGOFFSET\\n\t\tv_Texcoord0 = (vec2(a_Texcoord0X, a_Texcoord0Y) * u_TilingOffset.xy) + u_TilingOffset.zw;\\n\t#else\\n\t\tv_Texcoord0 = vec2(a_Texcoord0X, a_Texcoord0Y);\\n\t#endif\\n\t\\n\t#ifdef GRADIENTMODE_BLEND\\n\t\tv_Color = getColorFromGradientByBlend(u_GradientColorkey, u_GradientAlphakey, normalizeTime);\\n\t#else\\n\t\tv_Color = getColorFromGradientByFixed(u_GradientColorkey, u_GradientAlphakey, normalizeTime);\\n\t#endif\\n}\\n\\n\\n\\n\";\n\t\tps=\"#ifdef HIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nuniform sampler2D u_MainTexture;\\nuniform vec4 u_MainColor;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec4 v_Color;\\n\\nvoid main()\\n{\t\\n\tvec4 color = 2.0 * u_MainColor * v_Color;\\n\t#ifdef DIFFUSETEXTURE\\n\t\tvec4 mainTextureColor = texture2D(u_MainTexture, v_Texcoord0);\\n\t\tcolor *= mainTextureColor;\\n\t#endif\\n\tgl_FragColor = color;\\n}\\n\\n\";\n\t\tvar trailCompile3D=ShaderCompile3D.add(trailShader,vs,ps,attributeMap,uniformMap);\n\t\tTrailMaterial.SHADERDEFINE_DIFFUSETEXTURE=trailCompile3D.registerMaterialDefine(\"DIFFUSETEXTURE\");\n\t\tTrailMaterial.SHADERDEFINE_TILINGOFFSET=trailCompile3D.registerSpriteDefine(\"TILINGOFFSET\");\n\t\tTrailSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND=trailCompile3D.registerSpriteDefine(\"GRADIENTMODE_BLEND\");\n\t}\n\n\treturn ShaderInit3D;\n})()\n\n\n/**\n*@private\n*<code>Shader3D</code> 主要用数组的方式保存shader变量定义，后期合并ShaderValue不使用for in，性能较高。\n*/\n//class laya.d3.shader.ValusArray\nvar ValusArray=(function(){\n\tfunction ValusArray(){\n\t\tthis._data=null;\n\t\tthis._data=[];\n\t}\n\n\t__class(ValusArray,'laya.d3.shader.ValusArray');\n\tvar __proto=ValusArray.prototype;\n\t__proto.setValue=function(name,value){\n\t\tthis._data[name]=value;\n\t}\n\n\t__getset(0,__proto,'data',function(){\n\t\treturn this._data;\n\t});\n\n\treturn ValusArray;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.shadowMap.ParallelSplitShadowMap\nvar ParallelSplitShadowMap=(function(){\n\tfunction ParallelSplitShadowMap(){\n\t\t/**@private */\n\t\t//this.lastNearPlane=NaN;\n\t\t/**@private */\n\t\t//this.lastFieldOfView=NaN;\n\t\t/**@private */\n\t\t//this.lastAspectRatio=NaN;\n\t\t/**@private */\n\t\tthis._currentPSSM=-1;\n\t\t/**@private */\n\t\tthis._numberOfPSSM=3;\n\t\t/**@private */\n\t\tthis._maxDistance=200.0;\n\t\t/**@private */\n\t\tthis._ratioOfDistance=1.0 / this._numberOfPSSM;\n\t\t/**@private */\n\t\tthis._statesDirty=true;\n\t\t/**@private */\n\t\tthis._lightCulling=null;\n\t\t/**@private */\n\t\tthis._renderTarget=null;\n\t\t/**@private */\n\t\tthis._lightVPMatrix=null;\n\t\t/**@private */\n\t\tthis._lightCameras=null;\n\t\t/**@private */\n\t\tthis._shadowQuenes=null;\n\t\t/**@private */\n\t\tthis._shadowMapTextureSize=1024;\n\t\t/**@private */\n\t\tthis._scene=null;\n\t\t/**@private */\n\t\tthis._PCFType=0;\n\t\t/**@private */\n\t\tthis._shaderValueLightVP=null;\n\t\t/**@private */\n\t\tthis._shaderValueVPs=null;\n\t\tthis._spiltDistance=new Array(/*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3+1);\n\t\tthis._globalParallelLightDir=new Vector3(0,-1,0);\n\t\tthis._boundingSphere=new Array(/*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3+1);\n\t\tthis._boundingBox=new Array(/*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3+1);\n\t\tthis._frustumPos=new Array((/*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3+1)*4);\n\t\tthis._uniformDistance=new Array(/*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3+1);\n\t\tthis._logDistance=new Array(/*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3+1);\n\t\tthis._dimension=new Array(/*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3+1);\n\t\tthis._tempLookAt3=new Vector3();\n\t\tthis._tempLookAt4=new Vector4();\n\t\tthis._tempValue=new Vector4();\n\t\tthis._tempPos=new Vector3();\n\t\tthis._tempLightUp=new Vector3();\n\t\tthis._tempMin=new Vector4();\n\t\tthis._tempMax=new Vector4();\n\t\tthis._tempMatrix44=new Matrix4x4;\n\t\tthis._splitFrustumCulling=new BoundFrustum(Matrix4x4.DEFAULT);\n\t\tthis._tempScaleMatrix44=new Matrix4x4;\n\t\tthis._shadowPCFOffset=new Vector2(1.0 / 1024.0,1.0 / 1024.0);\n\t\tthis._shaderValueDistance=new Vector4();\n\t\tvar i=0;\n\t\tfor (i=0;i < this._spiltDistance.length;i++){\n\t\t\tthis._spiltDistance[i]=0.0;\n\t\t}\n\t\tfor (i=0;i < this._dimension.length;i++){\n\t\t\tthis._dimension[i]=new Vector2();\n\t\t}\n\t\tfor (i=0;i < this._frustumPos.length;i++){\n\t\t\tthis._frustumPos[i]=new Vector3();\n\t\t}\n\t\tfor (i=0;i < this._boundingBox.length;i++){\n\t\t\tthis._boundingBox[i]=new BoundBox(new Vector3(),new Vector3());\n\t\t}\n\t\tfor (i=0;i < this._boundingSphere.length;i++){\n\t\t\tthis._boundingSphere[i]=new BoundSphere(new Vector3(),0.0);\n\t\t}\n\t\tMatrix4x4.createScaling(new Vector3(0.5,0.5,1.0),this._tempScaleMatrix44);\n\t\tthis._tempScaleMatrix44.elements[12]=0.5;\n\t\tthis._tempScaleMatrix44.elements[13]=0.5;\n\t}\n\n\t__class(ParallelSplitShadowMap,'laya.d3.shadowMap.ParallelSplitShadowMap');\n\tvar __proto=ParallelSplitShadowMap.prototype;\n\t__proto.setInfo=function(scene,maxDistance,globalParallelDir,shadowMapTextureSize,numberOfPSSM,PCFType){\n\t\tif (numberOfPSSM > /*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3){\n\t\t\tthis._numberOfPSSM=/*CLASS CONST:laya.d3.shadowMap.ParallelSplitShadowMap.MAX_PSSM_COUNT*/3;\n\t\t}\n\t\tthis._scene=scene;\n\t\tthis._maxDistance=maxDistance;\n\t\tthis.PSSMNum=numberOfPSSM;\n\t\tthis._globalParallelLightDir=globalParallelDir;\n\t\tthis._ratioOfDistance=1.0 / this._numberOfPSSM;\n\t\tfor (var i=0;i < this._spiltDistance.length;i++){\n\t\t\tthis._spiltDistance[i]=0.0;\n\t\t}\n\t\tthis._shadowMapTextureSize=shadowMapTextureSize;\n\t\tthis._shadowPCFOffset.x=1.0 / this._shadowMapTextureSize;\n\t\tthis._shadowPCFOffset.y=1.0 / this._shadowMapTextureSize;\n\t\tthis.setPCFType(PCFType);\n\t\tthis._statesDirty=true;\n\t}\n\n\t__proto.setPCFType=function(PCFtype){\n\t\tthis._PCFType=PCFtype;\n\t\tswitch (this._PCFType){\n\t\t\tcase 0:\n\t\t\t\tthis._scene.addShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF_NO);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF1);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF2);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF3);\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tthis._scene.addShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF1);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF_NO);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF2);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF3);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis._scene.addShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF2);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF_NO);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF1);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF3);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis._scene.addShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF3);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF_NO);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF1);\n\t\t\t\tthis._scene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF2);\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t__proto.getPCFType=function(){\n\t\treturn this._PCFType;\n\t}\n\n\t__proto.setFarDistance=function(value){\n\t\tif (this._maxDistance !=value){\n\t\t\tthis._maxDistance=value;\n\t\t\tthis._statesDirty=true;\n\t\t}\n\t}\n\n\t__proto.getFarDistance=function(){\n\t\treturn this._maxDistance;\n\t}\n\n\t__proto._setGlobalParallelLightDir=function(dir){\n\t\tthis._globalParallelLightDir=dir;\n\t}\n\n\t__proto.getGlobalParallelLightDir=function(){\n\t\treturn this._globalParallelLightDir;\n\t}\n\n\t__proto.getCurrentPSSM=function(){\n\t\treturn this._currentPSSM;\n\t}\n\n\t__proto.getLightCamera=function(index){\n\t\treturn this._lightCameras[index];\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._beginSampler=function(index,sceneCamera){\n\t\tif (index < 0 || index > this._numberOfPSSM)\n\t\t\tthrow new Error(\"ParallelSplitShadowMap: beginSample invalid index\");\n\t\tthis._currentPSSM=index;\n\t\tthis._update(sceneCamera);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.endSampler=function(sceneCamera){\n\t\tthis._currentPSSM=-1;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calcAllLightCameraInfo=function(sceneCamera){\n\t\tif (this._numberOfPSSM===1){\n\t\t\tthis._beginSampler(0,sceneCamera);\n\t\t\tthis.endSampler(sceneCamera);\n\t\t\t}else {\n\t\t\tfor (var i=0,n=this._numberOfPSSM+1;i < n;i++){\n\t\t\t\tthis._beginSampler(i,sceneCamera);\n\t\t\t\tthis.endSampler(sceneCamera);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._recalculate=function(nearPlane,fieldOfView,aspectRatio){\n\t\tthis._calcSplitDistance(nearPlane);\n\t\tthis._calcBoundingBox(fieldOfView,aspectRatio);\n\t\tthis._rebuildRenderInfo();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._update=function(sceneCamera){\n\t\tvar nearPlane=sceneCamera.nearPlane;\n\t\tvar fieldOfView=sceneCamera.fieldOfView;\n\t\tvar aspectRatio=(sceneCamera).aspectRatio;\n\t\tif (this._statesDirty || this.lastNearPlane!==nearPlane || this.lastFieldOfView!==fieldOfView || this.lastAspectRatio!==aspectRatio){\n\t\t\tthis._recalculate(nearPlane,fieldOfView,aspectRatio);\n\t\t\tthis._uploadShaderValue();\n\t\t\tthis._statesDirty=false;\n\t\t\tthis.lastNearPlane=nearPlane;\n\t\t\tthis.lastFieldOfView=fieldOfView;\n\t\t\tthis.lastAspectRatio=aspectRatio;\n\t\t}\n\t\tthis._calcLightViewProject(sceneCamera);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._uploadShaderValue=function(){\n\t\tvar scene=this._scene;\n\t\tswitch (this._numberOfPSSM){\n\t\t\tcase 1:\n\t\t\t\tscene.addShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM1);\n\t\t\t\tscene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM2);\n\t\t\t\tscene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM3);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tscene.addShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM2);\n\t\t\t\tscene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM1);\n\t\t\t\tscene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM3);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tscene.addShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM3);\n\t\t\t\tscene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM1);\n\t\t\t\tscene.removeShaderDefine(laya.d3.shadowMap.ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM2);\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar sceneSV=scene._shaderValues;\n\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWDISTANCE*/15,this._shaderValueDistance.elements);\n\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWLIGHTVIEWPROJECT*/16,this._shaderValueLightVP);\n\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWMAPPCFOFFSET*/17,this._shadowPCFOffset.elements);\n\t\tswitch (this._numberOfPSSM){\n\t\t\tcase 3:\n\t\t\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,this.getRenderTarget(1));\n\t\t\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,this.getRenderTarget(2));\n\t\t\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE3*/20,this.getRenderTarget(3));\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,this.getRenderTarget(1));\n\t\t\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE2*/19,this.getRenderTarget(2));\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tsceneSV.setValue(/*laya.d3.core.scene.Scene.SHADOWMAPTEXTURE1*/18,this.getRenderTarget(1));\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calcSplitDistance=function(nearPlane){\n\t\tvar far=this._maxDistance;\n\t\tvar invNumberOfPSSM=1.0 / this._numberOfPSSM;\n\t\tvar i=0;\n\t\tfor (i=0;i <=this._numberOfPSSM;i++){\n\t\t\tthis._uniformDistance[i]=nearPlane+(far-nearPlane)*i *invNumberOfPSSM;\n\t\t};\n\t\tvar farDivNear=far / nearPlane;\n\t\tfor (i=0;i <=this._numberOfPSSM;i++){\n\t\t\tvar n=Math.pow(farDivNear,i *invNumberOfPSSM);\n\t\t\tthis._logDistance[i]=nearPlane *n;\n\t\t}\n\t\tfor (i=0;i <=this._numberOfPSSM;i++){\n\t\t\tthis._spiltDistance[i]=this._uniformDistance[i] *this._ratioOfDistance+this._logDistance[i] *(1.0-this._ratioOfDistance);\n\t\t}\n\t\tthis._shaderValueDistance.x=this._spiltDistance[1];\n\t\tthis._shaderValueDistance.y=this._spiltDistance[2];\n\t\tthis._shaderValueDistance.z=this._spiltDistance[3];\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calcBoundingBox=function(fieldOfView,aspectRatio){\n\t\tvar fov=3.1415926 *fieldOfView / 180.0;\n\t\tvar halfTanValue=Math.tan(fov / 2.0);\n\t\tvar height=NaN;\n\t\tvar width=NaN;\n\t\tvar distance=NaN;\n\t\tvar i=0;\n\t\tfor (i=0;i <=this._numberOfPSSM;i++){\n\t\t\tdistance=this._spiltDistance[i];\n\t\t\theight=distance *halfTanValue;\n\t\t\twidth=height *aspectRatio;\n\t\t\tvar temp=this._frustumPos[i *4+0].elements;\n\t\t\ttemp[0]=-width;\n\t\t\ttemp[1]=-height;\n\t\t\ttemp[2]=-distance;\n\t\t\ttemp=this._frustumPos[i *4+1].elements;\n\t\t\ttemp[0]=width;\n\t\t\ttemp[1]=-height;\n\t\t\ttemp[2]=-distance;\n\t\t\ttemp=this._frustumPos[i *4+2].elements;\n\t\t\ttemp[0]=-width;\n\t\t\ttemp[1]=height;\n\t\t\ttemp[2]=-distance;\n\t\t\ttemp=this._frustumPos[i *4+3].elements;\n\t\t\ttemp[0]=width;\n\t\t\ttemp[1]=height;\n\t\t\ttemp[2]=-distance;\n\t\t\ttemp=this._dimension[i].elements;\n\t\t\ttemp[0]=width;\n\t\t\ttemp[1]=height;\n\t\t};\n\t\tvar d;\n\t\tvar min;\n\t\tvar max;\n\t\tvar center;\n\t\tfor (i=1;i <=this._numberOfPSSM;i++){\n\t\t\td=this._dimension[i].elements;\n\t\t\tmin=this._boundingBox[i].min.elements;\n\t\t\tmin[0]=-d[0];\n\t\t\tmin[1]=-d[1];\n\t\t\tmin[2]=-this._spiltDistance[i];\n\t\t\tmax=this._boundingBox[i].max.elements;\n\t\t\tmax[0]=d[0];\n\t\t\tmax[1]=d[1];\n\t\t\tmax[2]=-this._spiltDistance[i-1];\n\t\t\tcenter=this._boundingSphere[i].center.elements;\n\t\t\tcenter[0]=(min[0]+max[0])*0.5;\n\t\t\tcenter[1]=(min[1]+max[1])*0.5;\n\t\t\tcenter[2]=(min[2]+max[2])*0.5;\n\t\t\tthis._boundingSphere[i].radius=Math.sqrt(Math.pow(max[0]-min[0],2)+Math.pow(max[1]-min[1],2)+Math.pow(max[2]-min[2],2))*0.5;\n\t\t}\n\t\tmin=this._boundingBox[0].min.elements;\n\t\td=this._dimension[this._numberOfPSSM].elements;\n\t\tmin[0]=-d[0];\n\t\tmin[1]=-d[1];\n\t\tmin[2]=-this._spiltDistance[this._numberOfPSSM];\n\t\tmax=this._boundingBox[0].max.elements;\n\t\tmax[0]=d[0];\n\t\tmax[1]=d[1];\n\t\tmax[2]=-this._spiltDistance[0];\n\t\tcenter=this._boundingSphere[0].center.elements;\n\t\tcenter[0]=(min[0]+max[0])*0.5;\n\t\tcenter[1]=(min[1]+max[1])*0.5;\n\t\tcenter[2]=(min[2]+max[2])*0.5;\n\t\tthis._boundingSphere[0].radius=Math.sqrt(Math.pow(max[0]-min[0],2)+Math.pow(max[1]-min[1],2)+Math.pow(max[2]-min[2],2))*0.5;\n\t}\n\n\t__proto.calcSplitFrustum=function(sceneCamera){\n\t\tif (this._currentPSSM > 0){\n\t\t\tMatrix4x4.createPerspective(3.1416 *sceneCamera.fieldOfView / 180.0,(sceneCamera).aspectRatio,this._spiltDistance[this._currentPSSM-1],this._spiltDistance[this._currentPSSM],this._tempMatrix44);\n\t\t\t}else {\n\t\t\tMatrix4x4.createPerspective(3.1416 *sceneCamera.fieldOfView / 180.0,(sceneCamera).aspectRatio,this._spiltDistance[0],this._spiltDistance[this._numberOfPSSM],this._tempMatrix44);\n\t\t}\n\t\tMatrix4x4.multiply(this._tempMatrix44,(sceneCamera).viewMatrix,this._tempMatrix44);\n\t\tthis._splitFrustumCulling.matrix=this._tempMatrix44;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._rebuildRenderInfo=function(){\n\t\tvar nNum=this._numberOfPSSM+1;\n\t\tvar i=0;\n\t\tif (this._renderTarget==null){\n\t\t\tthis._renderTarget=__newvec(nNum);\n\t\t\tthis._renderTarget[0]=null;\n\t\t\tfor (i=1;i < nNum;i++){\n\t\t\t\tthis._renderTarget[i]=new RenderTexture(this._shadowMapTextureSize,this._shadowMapTextureSize,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5,false,false,/*laya.webgl.WebGLContext.NEAREST*/0x2600,/*laya.webgl.WebGLContext.NEAREST*/0x2600);\n\t\t\t}\n\t\t\t}else if (this._renderTarget.length !=nNum){\n\t\t\tthis.disposeAllRenderTarget();\n\t\t\tthis._renderTarget.length=nNum;\n\t\t\tthis._renderTarget[0]=null;\n\t\t\tfor (i=1;i < nNum;i++){\n\t\t\t\tthis._renderTarget[i]=new RenderTexture(this._shadowMapTextureSize,this._shadowMapTextureSize,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5,false,false,/*laya.webgl.WebGLContext.NEAREST*/0x2600,/*laya.webgl.WebGLContext.NEAREST*/0x2600);\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (i=1;i < nNum;i++){\n\t\t\t\tif (this._renderTarget[i]==null || this._renderTarget[i].width !=this._shadowMapTextureSize || this._renderTarget[i].height !=this._shadowMapTextureSize){\n\t\t\t\t\tif (this._renderTarget[i] !=null){\n\t\t\t\t\t\tthis._renderTarget[i].destroy();\n\t\t\t\t\t}\n\t\t\t\t\tthis._renderTarget[i]=new RenderTexture(this._shadowMapTextureSize,this._shadowMapTextureSize,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5,false,false,/*laya.webgl.WebGLContext.NEAREST*/0x2600,/*laya.webgl.WebGLContext.NEAREST*/0x2600);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._lightCulling==null || this._lightCulling.length !=nNum){\n\t\t\tif (this._lightCulling){\n\t\t\t\tthis._lightCulling.length=nNum;\n\t\t\t\t}else {\n\t\t\t\tthis._lightCulling=__newvec(nNum);\n\t\t\t}\n\t\t\tfor (i=0;i < this._lightCulling.length;i++){\n\t\t\t\tthis._lightCulling[i]=new BoundFrustum(Matrix4x4.DEFAULT);\n\t\t\t}\n\t\t}\n\t\tif (this._lightVPMatrix==null || this._lightVPMatrix.length !=nNum){\n\t\t\tif (this._lightVPMatrix){\n\t\t\t\tthis._lightVPMatrix.length=nNum;\n\t\t\t\t}else {\n\t\t\t\tthis._lightVPMatrix=__newvec(nNum);\n\t\t\t}\n\t\t\tfor (i=0;i < this._lightVPMatrix.length;i++){\n\t\t\t\tthis._lightVPMatrix[i]=new Matrix4x4();\n\t\t\t}\n\t\t}\n\t\tif (this._lightCameras==null || this._lightCameras.length !=nNum){\n\t\t\tif (this._lightCameras){\n\t\t\t\tthis._lightCameras.length=nNum;\n\t\t\t\t}else {\n\t\t\t\tthis._lightCameras=__newvec(nNum);\n\t\t\t}\n\t\t\tfor (i=0;i < this._lightCameras.length;i++){\n\t\t\t\tthis._lightCameras[i]=new Camera();\n\t\t\t\tthis._lightCameras[i].name=\"lightCamera\"+i;\n\t\t\t}\n\t\t}\n\t\tif (this._shadowQuenes==null || this._shadowQuenes.length !=this._numberOfPSSM){\n\t\t\tif (this._shadowQuenes){\n\t\t\t\tthis._shadowQuenes.length=this._numberOfPSSM;\n\t\t\t\t}else {\n\t\t\t\tthis._shadowQuenes=__newvec(this._numberOfPSSM);\n\t\t\t}\n\t\t\tfor (i=0;i < this._shadowQuenes.length;i++){\n\t\t\t\tthis._shadowQuenes[i]=new RenderQueue(this._scene);\n\t\t\t}\n\t\t}\n\t\tif (this._shaderValueVPs==null || this._shaderValueVPs.length !=nNum){\n\t\t\tif (this._shaderValueVPs){\n\t\t\t\tthis._shaderValueVPs.length=nNum;\n\t\t\t\t}else {\n\t\t\t\tthis._shaderValueVPs=__newvec(nNum);\n\t\t\t}\n\t\t\tthis._shaderValueLightVP=new Float32Array(nNum *16);\n\t\t\tfor (i=0;i < nNum;i++){\n\t\t\t\tthis._shaderValueVPs[i]=new Float32Array(this._shaderValueLightVP.buffer,i *64);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calcLightViewProject=function(sceneCamera){\n\t\tvar boundSphere=this._boundingSphere[this._currentPSSM];\n\t\tvar cameraMatViewInv=sceneCamera.transform.worldMatrix;\n\t\tvar radius=boundSphere.radius;\n\t\tboundSphere.center.cloneTo(this._tempLookAt3);\n\t\tVector3.transformV3ToV4(this._tempLookAt3,cameraMatViewInv,this._tempLookAt4);\n\t\tvar lookAt3Element=this._tempLookAt3.elements;\n\t\tvar lookAt4Element=this._tempLookAt4.elements;\n\t\tlookAt3Element[0]=lookAt4Element[0];\n\t\tlookAt3Element[1]=lookAt4Element[1];\n\t\tlookAt3Element[2]=lookAt4Element[2];\n\t\tvar lightUpElement=this._tempLightUp.elements;\n\t\tvar sceneCameraDir=sceneCamera.forward.elements;\n\t\tlightUpElement[0]=sceneCameraDir[0];\n\t\tlightUpElement[1]=1.0;\n\t\tlightUpElement[2]=sceneCameraDir[2];\n\t\tVector3.normalize(this._tempLightUp,this._tempLightUp);\n\t\tVector3.scale(this._globalParallelLightDir,boundSphere.radius *4,this._tempPos);\n\t\tVector3.subtract(this._tempLookAt3,this._tempPos,this._tempPos);\n\t\tvar curLightCamera=this._lightCameras[this._currentPSSM];\n\t\tcurLightCamera.transform.position=this._tempPos;\n\t\tcurLightCamera.transform.lookAt(this._tempLookAt3,this._tempLightUp,false);\n\t\tvar tempMaxElements=this._tempMax.elements;\n\t\tvar tempMinElements=this._tempMin.elements;\n\t\ttempMaxElements[0]=tempMaxElements[1]=tempMaxElements[2]=-100000.0;\n\t\ttempMaxElements[3]=1.0;\n\t\ttempMinElements[0]=tempMinElements[1]=tempMinElements[2]=100000.0;\n\t\ttempMinElements[3]=1.0;\n\t\tMatrix4x4.multiply(curLightCamera.viewMatrix,cameraMatViewInv,this._tempMatrix44);\n\t\tvar tempValueElement=this._tempValue.elements;\n\t\tvar corners=[];\n\t\tcorners.length=8;\n\t\tthis._boundingBox[this._currentPSSM].getCorners(corners);\n\t\tfor (var i=0;i < 8;i++){\n\t\t\tvar frustumPosElements=corners[i].elements;\n\t\t\ttempValueElement[0]=frustumPosElements[0];\n\t\t\ttempValueElement[1]=frustumPosElements[1];\n\t\t\ttempValueElement[2]=frustumPosElements[2];\n\t\t\ttempValueElement[3]=1.0;\n\t\t\tVector4.transformByM4x4(this._tempValue,this._tempMatrix44,this._tempValue);\n\t\t\ttempMinElements[0]=(tempValueElement[0] < tempMinElements[0])? tempValueElement[0] :tempMinElements[0];\n\t\t\ttempMinElements[1]=(tempValueElement[1] < tempMinElements[1])? tempValueElement[1] :tempMinElements[1];\n\t\t\ttempMinElements[2]=(tempValueElement[2] < tempMinElements[2])? tempValueElement[2] :tempMinElements[2];\n\t\t\ttempMaxElements[0]=(tempValueElement[0] > tempMaxElements[0])? tempValueElement[0] :tempMaxElements[0];\n\t\t\ttempMaxElements[1]=(tempValueElement[1] > tempMaxElements[1])? tempValueElement[1] :tempMaxElements[1];\n\t\t\ttempMaxElements[2]=(tempValueElement[2] > tempMaxElements[2])? tempValueElement[2] :tempMaxElements[2];\n\t\t}\n\t\tVector4.add(this._tempMax,this._tempMin,this._tempValue);\n\t\ttempValueElement[0] *=0.5;\n\t\ttempValueElement[1] *=0.5;\n\t\ttempValueElement[2] *=0.5;\n\t\ttempValueElement[3]=1;\n\t\tVector4.transformByM4x4(this._tempValue,curLightCamera.transform.worldMatrix,this._tempValue);\n\t\tvar distance=Math.abs(-this._tempMax.z);\n\t\tvar farPlane=distance > this._maxDistance ? distance :this._maxDistance;\n\t\tVector3.scale(this._globalParallelLightDir,farPlane,this._tempPos);\n\t\tvar tempPosElement=this._tempPos.elements;\n\t\ttempPosElement[0]=tempValueElement[0]-tempPosElement[0];\n\t\ttempPosElement[1]=tempValueElement[1]-tempPosElement[1];\n\t\ttempPosElement[2]=tempValueElement[2]-tempPosElement[2];\n\t\tcurLightCamera.transform.position=this._tempPos;\n\t\tcurLightCamera.transform.lookAt(this._tempLookAt3,this._tempLightUp,false);\n\t\tMatrix4x4.createOrthoOffCenterRH(tempMinElements[0],tempMaxElements[0],tempMinElements[1],tempMaxElements[1],1.0,farPlane+0.5 *(tempMaxElements[2]-tempMinElements[2]),curLightCamera.projectionMatrix);\n\t\tcurLightCamera.projectionViewMatrix.cloneTo(this._lightVPMatrix[this._currentPSSM]);\n\t\tthis._lightCulling[this._currentPSSM].matrix=this._lightVPMatrix[this._currentPSSM];\n\t\tParallelSplitShadowMap.multiplyMatrixOutFloat32Array(this._tempScaleMatrix44,this._lightVPMatrix[this._currentPSSM],this._shaderValueVPs[this._currentPSSM]);\n\t}\n\n\t__proto.getLightFrustumCulling=function(currentPSSM){\n\t\treturn this._lightCulling[currentPSSM];\n\t}\n\n\t__proto.getSplitFrustumCulling=function(){\n\t\treturn this._splitFrustumCulling;\n\t}\n\n\t__proto.getSplitDistance=function(index){\n\t\treturn this._spiltDistance[index];\n\t}\n\n\t__proto.setShadowMapTextureSize=function(size){\n\t\tif (size!==this._shadowMapTextureSize){\n\t\t\tthis._shadowMapTextureSize=size;\n\t\t\tthis._shadowPCFOffset.x=1 / this._shadowMapTextureSize;\n\t\t\tthis._shadowPCFOffset.y=1 / this._shadowMapTextureSize;\n\t\t\tthis._statesDirty=true;\n\t\t}\n\t}\n\n\t__proto.getShadowMapTextureSize=function(){\n\t\treturn this._shadowMapTextureSize;\n\t}\n\n\t__proto.beginRenderTarget=function(index){\n\t\tthis._renderTarget[index].start();\n\t}\n\n\t__proto.endRenderTarget=function(index){\n\t\tthis._renderTarget[index].end();\n\t}\n\n\t__proto.getRenderTarget=function(index){\n\t\treturn this._renderTarget[index];\n\t}\n\n\t__proto.disposeAllRenderTarget=function(){\n\t\tfor (var i=0,n=this._numberOfPSSM+1;i < n;i++){\n\t\t\tif (this._renderTarget[i]){\n\t\t\t\tthis._renderTarget[i].destroy();\n\t\t\t\tthis._renderTarget[i]=null;\n\t\t\t}\n\t\t}\n\t}\n\n\t__getset(0,__proto,'PSSMNum',function(){\n\t\treturn this._numberOfPSSM;\n\t\t},function(value){\n\t\tvalue=value > 0 ? value :1;\n\t\tvalue=value <=3 ? value :3;\n\t\tif (this._numberOfPSSM !=value){\n\t\t\tthis._numberOfPSSM=value;\n\t\t\tthis._ratioOfDistance=1.0 / this._numberOfPSSM;\n\t\t\tthis._statesDirty=true;\n\t\t}\n\t});\n\n\tParallelSplitShadowMap.multiplyMatrixOutFloat32Array=function(left,right,out){\n\t\tvar i,a,b,ai0,ai1,ai2,ai3;\n\t\ta=left.elements;\n\t\tb=right.elements;\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=a[i];\n\t\t\tai1=a[i+4];\n\t\t\tai2=a[i+8];\n\t\t\tai3=a[i+12];\n\t\t\tout[i]=ai0 *b[0]+ai1 *b[1]+ai2 *b[2]+ai3 *b[3];\n\t\t\tout[i+4]=ai0 *b[4]+ai1 *b[5]+ai2 *b[6]+ai3 *b[7];\n\t\t\tout[i+8]=ai0 *b[8]+ai1 *b[9]+ai2 *b[10]+ai3 *b[11];\n\t\t\tout[i+12]=ai0 *b[12]+ai1 *b[13]+ai2 *b[14]+ai3 *b[15];\n\t\t}\n\t}\n\n\tParallelSplitShadowMap.SHADERDEFINE_RECEIVE_SHADOW=0x1;\n\tParallelSplitShadowMap.SHADERDEFINE_CAST_SHADOW=0x200;\n\tParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM1=0x400;\n\tParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM2=0x800;\n\tParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM3=0x1000;\n\tParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF_NO=0x2000;\n\tParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF1=0x4000;\n\tParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF2=0x8000;\n\tParallelSplitShadowMap.SHADERDEFINE_SHADOW_PCF3=0x10000;\n\tParallelSplitShadowMap.MAX_PSSM_COUNT=3;\n\treturn ParallelSplitShadowMap;\n})()\n\n\n/**\n*<code>TerrainLeaf</code> Terrain的叶子节点\n*/\n//class laya.d3.terrain.TerrainLeaf\nvar TerrainLeaf=(function(){\n\tfunction TerrainLeaf(){\n\t\tthis._boundingSphere=null;\n\t\tthis._boundingBox=null;\n\t\tthis._sizeOfY=null;\n\t\tthis._currentLODLevel=0;\n\t\tthis._lastDistanceToEye=NaN;\n\t\tthis._originalBoundingSphere=null;\n\t\tthis._originalBoundingBox=null;\n\t\tthis._originalBoundingBoxCorners=null;\n\t\tthis._bUseStrip=false;\n\t\tthis._gridSize=NaN;\n\t\tthis._beginGridX=0;\n\t\t//针对整个大地形的偏移\n\t\tthis._beginGridZ=0;\n\t\t//针对整个大地形的偏移\n\t\tthis._LODError=null;\n\t\tTerrainLeaf.__init__();\n\t\tthis._currentLODLevel=0;\n\t}\n\n\t__class(TerrainLeaf,'laya.d3.terrain.TerrainLeaf');\n\tvar __proto=TerrainLeaf.prototype;\n\t__proto.calcVertextNorml=function(x,z,terrainHeightData,heighDataWidth,heightDataHeight,normal){\n\t\tvar dZ=0,dX=0;\n\t\tdX=TerrainLeaf.getHeightFromTerrainHeightData(x-1,z-1,terrainHeightData,heighDataWidth,heightDataHeight)*-1.0;\n\t\tdX+=TerrainLeaf.getHeightFromTerrainHeightData(x-1,z,terrainHeightData,heighDataWidth,heightDataHeight)*-1.0;\n\t\tdX+=TerrainLeaf.getHeightFromTerrainHeightData(x-1,z+1,terrainHeightData,heighDataWidth,heightDataHeight)*-1.0;\n\t\tdX+=TerrainLeaf.getHeightFromTerrainHeightData(x+1,z-1,terrainHeightData,heighDataWidth,heightDataHeight)*1.0;\n\t\tdX+=TerrainLeaf.getHeightFromTerrainHeightData(x+1,z,terrainHeightData,heighDataWidth,heightDataHeight)*1.0;\n\t\tdX+=TerrainLeaf.getHeightFromTerrainHeightData(x+1,z+1,terrainHeightData,heighDataWidth,heightDataHeight)*1.0;\n\t\tdZ=TerrainLeaf.getHeightFromTerrainHeightData(x-1,z-1,terrainHeightData,heighDataWidth,heightDataHeight)*-1.0;\n\t\tdZ+=TerrainLeaf.getHeightFromTerrainHeightData(x,z-1,terrainHeightData,heighDataWidth,heightDataHeight)*-1.0;\n\t\tdZ+=TerrainLeaf.getHeightFromTerrainHeightData(x+1,z-1,terrainHeightData,heighDataWidth,heightDataHeight)*-1.0;\n\t\tdZ+=TerrainLeaf.getHeightFromTerrainHeightData(x-1,z+1,terrainHeightData,heighDataWidth,heightDataHeight)*1.0;\n\t\tdZ+=TerrainLeaf.getHeightFromTerrainHeightData(x,z+1,terrainHeightData,heighDataWidth,heightDataHeight)*1.0;\n\t\tdZ+=TerrainLeaf.getHeightFromTerrainHeightData(x+1,z+1,terrainHeightData,heighDataWidth,heightDataHeight)*1.0;\n\t\tnormal.x=-dX;\n\t\tnormal.y=6;\n\t\tnormal.z=-dZ;\n\t\tVector3.normalize(normal,normal);\n\t}\n\n\t__proto.calcVertextNormlUV=function(x,z,terrainWidth,terrainHeight,normal){\n\t\tnormal.x=x / terrainWidth;\n\t\tnormal.y=z / terrainHeight;\n\t\tnormal.z=z / terrainHeight;\n\t}\n\n\t__proto.calcVertextBuffer=function(offsetChunkX,offsetChunkZ,beginX,beginZ,girdSize,vertextBuffer,offset,strideSize,terrainHeightData,heighDataWidth,heightDataHeight,cameraCoordinateInverse){\n\t\tif (cameraCoordinateInverse==true && !TerrainLeaf.__ADAPT_MATRIX__){\n\t\t\tTerrainLeaf.__ADAPT_MATRIX__=new Matrix4x4();\n\t\t\tvar mat=new Matrix4x4();\n\t\t\tMatrix4x4.createRotationY(Math.PI,TerrainLeaf.__ADAPT_MATRIX__);\n\t\t\tMatrix4x4.createTranslate(new Vector3(0,0,(heightDataHeight-1)*girdSize),mat);\n\t\t\tMatrix4x4.multiply(mat,TerrainLeaf.__ADAPT_MATRIX__,TerrainLeaf.__ADAPT_MATRIX__);\n\t\t\tTerrainLeaf.__ADAPT_MATRIX_INV__=new Matrix4x4();\n\t\t\tTerrainLeaf.__ADAPT_MATRIX__.invert(TerrainLeaf.__ADAPT_MATRIX_INV__);\n\t\t}\n\t\tthis._gridSize=girdSize;\n\t\tthis._beginGridX=offsetChunkX *TerrainLeaf.CHUNK_GRID_NUM+beginX;\n\t\tthis._beginGridZ=offsetChunkZ *TerrainLeaf.CHUNK_GRID_NUM+beginZ;\n\t\tvar nNum=offset *strideSize;\n\t\tvar minY=2147483647;\n\t\tvar maxY=-2147483648;\n\t\tvar normal=new Vector3();\n\t\tfor (var i=0,s=TerrainLeaf.LEAF_GRID_NUM+1;i < s;i++){\n\t\t\tfor (var j=0,s1=TerrainLeaf.LEAF_GRID_NUM+1;j < s1;j++){\n\t\t\t\tTerrainLeaf.__VECTOR3__.x=(this._beginGridX+j)*this._gridSize;\n\t\t\t\tTerrainLeaf.__VECTOR3__.z=(this._beginGridZ+i)*this._gridSize;\n\t\t\t\tTerrainLeaf.__VECTOR3__.y=terrainHeightData[(this._beginGridZ+i)*(heighDataWidth)+(this._beginGridX+j)];\n\t\t\t\tminY=TerrainLeaf.__VECTOR3__.y < minY ? TerrainLeaf.__VECTOR3__.y :minY;\n\t\t\t\tmaxY=TerrainLeaf.__VECTOR3__.y > maxY ? TerrainLeaf.__VECTOR3__.y :maxY;\n\t\t\t\tif (TerrainLeaf.__ADAPT_MATRIX__){\n\t\t\t\t\tVector3.transformV3ToV3(TerrainLeaf.__VECTOR3__,TerrainLeaf.__ADAPT_MATRIX__,TerrainLeaf.__VECTOR3__);\n\t\t\t\t}\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.z;\n\t\t\t\tnNum++;\n\t\t\t\tthis.calcVertextNormlUV(this._beginGridX+j,this._beginGridZ+i,heighDataWidth,heightDataHeight,normal);\n\t\t\t\tvertextBuffer[nNum]=normal.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.z;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginX+j)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginZ+i)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=this._beginGridX+j;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=this._beginGridZ+i;\n\t\t\t\tnNum++;\n\t\t\t}\n\t\t}\n\t\tthis._sizeOfY=new Vector2(minY-1,maxY+1);\n\t\tthis.calcLODErrors(terrainHeightData,heighDataWidth,heightDataHeight);\n\t\tthis.calcOriginalBoudingBoxAndSphere();\n\t}\n\n\t__proto.calcSkirtVertextBuffer=function(offsetChunkX,offsetChunkZ,beginX,beginZ,girdSize,vertextBuffer,offset,strideSize,terrainHeightData,heighDataWidth,heightDataHeight){\n\t\tthis._gridSize=girdSize;\n\t\tthis._beginGridX=offsetChunkX *TerrainLeaf.CHUNK_GRID_NUM+beginX;\n\t\tthis._beginGridZ=offsetChunkZ *TerrainLeaf.CHUNK_GRID_NUM+beginZ;\n\t\tvar nNum=offset *strideSize;\n\t\tvar i=0,j=0,s=TerrainLeaf.LEAF_GRID_NUM+1;\n\t\tvar normal=new Vector3();\n\t\tvar hZIndex=0;\n\t\tvar hXIndex=0;\n\t\tvar h=0;\n\t\tvar zh=0;\n\t\tvar xh=0;\n\t\tfor (i=0;i < 2;i++){\n\t\t\tfor (j=0;j < s;j++){\n\t\t\t\tTerrainLeaf.__VECTOR3__.x=(this._beginGridX+j)*this._gridSize;\n\t\t\t\tTerrainLeaf.__VECTOR3__.y=(i==1 ? terrainHeightData[this._beginGridZ *heighDataWidth+(this._beginGridX+j)] :-this._gridSize);\n\t\t\t\tTerrainLeaf.__VECTOR3__.z=(this._beginGridZ+0)*this._gridSize;\n\t\t\t\tif (TerrainLeaf.__ADAPT_MATRIX__){\n\t\t\t\t\tVector3.transformV3ToV3(TerrainLeaf.__VECTOR3__,TerrainLeaf.__ADAPT_MATRIX__,TerrainLeaf.__VECTOR3__);\n\t\t\t\t}\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.z;\n\t\t\t\tnNum++;\n\t\t\t\tif (i==0){\n\t\t\t\t\thZIndex=(this._beginGridZ-1);\n\t\t\t\t\t}else {\n\t\t\t\t\thZIndex=this._beginGridZ;\n\t\t\t\t}\n\t\t\t\tthis.calcVertextNormlUV(this._beginGridX+j,hZIndex,heighDataWidth,heightDataHeight,normal);\n\t\t\t\tvertextBuffer[nNum]=normal.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.z;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginX+j)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginZ+0)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=this._beginGridX+j;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=hZIndex;\n\t\t\t\tnNum++;\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < 2;i++){\n\t\t\tfor (j=0;j < s;j++){\n\t\t\t\tTerrainLeaf.__VECTOR3__.x=(this._beginGridX+j)*this._gridSize;\n\t\t\t\tTerrainLeaf.__VECTOR3__.y=(i==0 ? terrainHeightData[(this._beginGridZ+TerrainLeaf.LEAF_GRID_NUM)*(heighDataWidth)+(this._beginGridX+j)] :-this._gridSize);\n\t\t\t\tTerrainLeaf.__VECTOR3__.z=(this._beginGridZ+TerrainLeaf.LEAF_GRID_NUM)*this._gridSize;\n\t\t\t\tif (TerrainLeaf.__ADAPT_MATRIX__){\n\t\t\t\t\tVector3.transformV3ToV3(TerrainLeaf.__VECTOR3__,TerrainLeaf.__ADAPT_MATRIX__,TerrainLeaf.__VECTOR3__);\n\t\t\t\t}\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.z;\n\t\t\t\tnNum++;\n\t\t\t\tif (i==0){\n\t\t\t\t\thZIndex=this._beginGridZ+TerrainLeaf.LEAF_GRID_NUM;\n\t\t\t\t\t}else {\n\t\t\t\t\thZIndex=(this._beginGridZ+TerrainLeaf.LEAF_GRID_NUM+1);\n\t\t\t\t}\n\t\t\t\tthis.calcVertextNormlUV(this._beginGridX+j,hZIndex,heighDataWidth,heightDataHeight,normal);\n\t\t\t\tvertextBuffer[nNum]=normal.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.z;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginX+j)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginZ+TerrainLeaf.LEAF_GRID_NUM)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=this._beginGridX+j;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=hZIndex;\n\t\t\t\tnNum++;\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < 2;i++){\n\t\t\tfor (j=0;j < s;j++){\n\t\t\t\tTerrainLeaf.__VECTOR3__.x=(this._beginGridX+0)*this._gridSize;\n\t\t\t\tTerrainLeaf.__VECTOR3__.y=(i==0 ? terrainHeightData[(this._beginGridZ+j)*(heighDataWidth)+(this._beginGridX+0)] :-this._gridSize);\n\t\t\t\tTerrainLeaf.__VECTOR3__.z=(this._beginGridZ+j)*this._gridSize;\n\t\t\t\tif (TerrainLeaf.__ADAPT_MATRIX__){\n\t\t\t\t\tVector3.transformV3ToV3(TerrainLeaf.__VECTOR3__,TerrainLeaf.__ADAPT_MATRIX__,TerrainLeaf.__VECTOR3__);\n\t\t\t\t}\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.z;\n\t\t\t\tnNum++;\n\t\t\t\tif (i==0){\n\t\t\t\t\thXIndex=this._beginGridX;\n\t\t\t\t\t}else {\n\t\t\t\t\thXIndex=(this._beginGridX-1);\n\t\t\t\t}\n\t\t\t\tthis.calcVertextNormlUV(hXIndex,this._beginGridZ+j,heighDataWidth,heightDataHeight,normal);\n\t\t\t\tvertextBuffer[nNum]=normal.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.z;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginX+0)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginZ+j)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=hXIndex;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=this._beginGridZ+j;\n\t\t\t\tnNum++;\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < 2;i++){\n\t\t\tfor (j=0;j < s;j++){\n\t\t\t\tTerrainLeaf.__VECTOR3__.x=(this._beginGridX+TerrainLeaf.LEAF_GRID_NUM)*this._gridSize;\n\t\t\t\tTerrainLeaf.__VECTOR3__.y=(i==1 ? terrainHeightData[(this._beginGridZ+j)*(heighDataWidth)+(this._beginGridX+TerrainLeaf.LEAF_GRID_NUM)] :-this._gridSize);\n\t\t\t\tTerrainLeaf.__VECTOR3__.z=(this._beginGridZ+j)*this._gridSize;\n\t\t\t\tif (TerrainLeaf.__ADAPT_MATRIX__){\n\t\t\t\t\tVector3.transformV3ToV3(TerrainLeaf.__VECTOR3__,TerrainLeaf.__ADAPT_MATRIX__,TerrainLeaf.__VECTOR3__);\n\t\t\t\t}\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=TerrainLeaf.__VECTOR3__.z;\n\t\t\t\tnNum++;\n\t\t\t\tif (i==0){\n\t\t\t\t\thXIndex=this._beginGridX+TerrainLeaf.LEAF_GRID_NUM+1;\n\t\t\t\t\t}else {\n\t\t\t\t\thXIndex=this._beginGridX+TerrainLeaf.LEAF_GRID_NUM;\n\t\t\t\t}\n\t\t\t\tthis.calcVertextNormlUV(hXIndex,this._beginGridZ+j,heighDataWidth,heightDataHeight,normal);\n\t\t\t\tvertextBuffer[nNum]=normal.x;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.y;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=normal.z;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginX+TerrainLeaf.LEAF_GRID_NUM)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=(beginZ+j)/ TerrainLeaf.CHUNK_GRID_NUM;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=hXIndex;\n\t\t\t\tnNum++;\n\t\t\t\tvertextBuffer[nNum]=this._beginGridZ+j;\n\t\t\t\tnNum++;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.calcOriginalBoudingBoxAndSphere=function(){\n\t\tvar min=new Vector3(this._beginGridX *this._gridSize,this._sizeOfY.x,this._beginGridZ *this._gridSize);\n\t\tvar max=new Vector3((this._beginGridX+TerrainLeaf.LEAF_GRID_NUM)*this._gridSize,this._sizeOfY.y,(this._beginGridZ+TerrainLeaf.LEAF_GRID_NUM)*this._gridSize);\n\t\tif (TerrainLeaf.__ADAPT_MATRIX__){\n\t\t\tVector3.transformV3ToV3(min,TerrainLeaf.__ADAPT_MATRIX__,min);\n\t\t\tVector3.transformV3ToV3(max,TerrainLeaf.__ADAPT_MATRIX__,max);\n\t\t}\n\t\tthis._originalBoundingBox=new BoundBox(min,max);\n\t\tvar size=new Vector3();\n\t\tVector3.subtract(max,min,size);\n\t\tVector3.scale(size,0.5,size);\n\t\tvar center=new Vector3();\n\t\tVector3.add(min,size,center);\n\t\tthis._originalBoundingSphere=new BoundSphere(center,Vector3.scalarLength(size));\n\t\tthis._originalBoundingBoxCorners=__newvec(8,null);\n\t\tthis._originalBoundingBox.getCorners(this._originalBoundingBoxCorners);\n\t\tthis._boundingBox=new BoundBox(new Vector3(-0.5,-0.5,-0.5),new Vector3(0.5,0.5,0.5));\n\t\tthis._boundingSphere=new BoundSphere(new Vector3(0,0,0),1);\n\t}\n\n\t__proto.calcLeafBoudingBox=function(worldMatrix){\n\t\tfor (var i=0;i < 8;i++){\n\t\t\tVector3.transformCoordinate(this._originalBoundingBoxCorners[i],worldMatrix,BaseRender._tempBoundBoxCorners[i]);\n\t\t}\n\t\tBoundBox.createfromPoints(BaseRender._tempBoundBoxCorners,this._boundingBox);\n\t}\n\n\t__proto.calcLeafBoudingSphere=function(worldMatrix,maxScale){\n\t\tVector3.transformCoordinate(this._originalBoundingSphere.center,worldMatrix,this._boundingSphere.center);\n\t\tthis._boundingSphere.radius=this._originalBoundingSphere.radius *maxScale;\n\t}\n\n\t__proto.calcLODErrors=function(terrainHeightData,heighDataWidth,heightDataHeight){\n\t\tthis._LODError=new Float32Array(TerrainLeaf._maxLODLevel+1);\n\t\tvar step=1;\n\t\tfor (var i=0,n=TerrainLeaf._maxLODLevel+1;i < n;i++){\n\t\t\tvar maxError=0;\n\t\t\tfor (var y=0,n1=TerrainLeaf.LEAF_GRID_NUM;y < n1;y+=step){\n\t\t\t\tfor (var x=0,n2=TerrainLeaf.LEAF_GRID_NUM;x < n2;x+=step){\n\t\t\t\t\tvar z00=terrainHeightData[(this._beginGridZ+y)*heighDataWidth+(this._beginGridX+x)];\n\t\t\t\t\tvar z10=terrainHeightData[(this._beginGridZ+y)*heighDataWidth+(this._beginGridX+x)+step];\n\t\t\t\t\tvar z01=terrainHeightData[(this._beginGridZ+y+step)*heighDataWidth+(this._beginGridX+x)];\n\t\t\t\t\tvar z11=terrainHeightData[(this._beginGridZ+y+step)*heighDataWidth+(this._beginGridX+x)+step];\n\t\t\t\t\tfor (var j=0;j < step;j++){\n\t\t\t\t\t\tvar ys=j / step;\n\t\t\t\t\t\tfor (var k=0;k < step;k++){\n\t\t\t\t\t\t\tvar xs=k / step;\n\t\t\t\t\t\t\tvar z=terrainHeightData[(this._beginGridZ+y+j)*heighDataWidth+(this._beginGridX+x)+k];\n\t\t\t\t\t\t\tvar iz=(xs+ys <=1)? (z00+(z10-z00)*xs+(z01-z00)*ys):(z11+(z01-z11)*(1-xs)+(z10-z11)*(1-ys));\n\t\t\t\t\t\t\tvar error=Math.abs(iz-z);\n\t\t\t\t\t\t\tmaxError=Math.max(maxError,error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tstep *=2;\n\t\t\tthis._LODError[i]=maxError;\n\t\t}\n\t}\n\n\t__proto.determineLod=function(eyePos,perspectiveFactor,tolerance,tolerAndPerspectiveChanged){\n\t\tvar nDistanceToEye=Vector3.distance(eyePos,this._boundingSphere.center);\n\t\tvar n=TerrainLeaf._maxLODLevel;\n\t\tif (!tolerAndPerspectiveChanged){\n\t\t\tif (this._lastDistanceToEye==nDistanceToEye){\n\t\t\t\treturn this._currentLODLevel;\n\t\t\t\t}else if (this._lastDistanceToEye > nDistanceToEye){\n\t\t\t\tn=this._currentLODLevel;\n\t\t\t}\n\t\t}\n\t\tfor (var i=n;i >=1;i--){\n\t\t\tif (Terrain.LOD_DISTANCE_FACTOR *this._LODError[i] / nDistanceToEye *perspectiveFactor < tolerance){\n\t\t\t\tthis._currentLODLevel=i;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\tthis._lastDistanceToEye=nDistanceToEye;\n\t\treturn this._currentLODLevel;\n\t}\n\n\tTerrainLeaf.__init__=function(){\n\t\tif (!TerrainLeaf._bInit){\n\t\t\tvar nLeafNum=(TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM)*(TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM);\n\t\t\tTerrainLeaf._planeLODIndex=__newvec(nLeafNum);\n\t\t\tvar i=0,j=0,k=0,n=0,n1=0,nOffset=0;\n\t\t\tvar nOriginIndexArray=null,nTempIndex=null;\n\t\t\tfor (i=0;i < nLeafNum;i++){\n\t\t\t\tTerrainLeaf._planeLODIndex[i]=new Array(TerrainLeaf._maxLODLevel+1);\n\t\t\t}\n\t\t\tfor (i=0,n=TerrainLeaf._maxLODLevel+1;i < n;i++){\n\t\t\t\tTerrainLeaf._planeLODIndex[0][i]=TerrainLeaf.calcPlaneLODIndex(i);\n\t\t\t}\n\t\t\tfor (i=1;i < nLeafNum;i++){\n\t\t\t\tnOffset=i *TerrainLeaf.LEAF_PLANE_VERTEXT_COUNT;\n\t\t\t\tfor (j=0,n1=TerrainLeaf._maxLODLevel+1;j < n1;j++){\n\t\t\t\t\tnOriginIndexArray=TerrainLeaf._planeLODIndex[0][j];\n\t\t\t\t\tnTempIndex=new Uint16Array(nOriginIndexArray.length);\n\t\t\t\t\tfor (k=0;k < nOriginIndexArray.length;k++){\n\t\t\t\t\t\tnTempIndex[k]=nOriginIndexArray[k]+nOffset;\n\t\t\t\t\t}\n\t\t\t\t\tTerrainLeaf._planeLODIndex[i][j]=nTempIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\tTerrainLeaf._skirtLODIndex=__newvec(nLeafNum);\n\t\t\tfor (i=0;i < nLeafNum;i++){\n\t\t\t\tTerrainLeaf._skirtLODIndex[i]=new Array(TerrainLeaf._maxLODLevel+1);\n\t\t\t}\n\t\t\tfor (i=0,n=TerrainLeaf._maxLODLevel+1;i < n;i++){\n\t\t\t\tTerrainLeaf._skirtLODIndex[0][i]=TerrainLeaf.calcSkirtLODIndex(i);\n\t\t\t}\n\t\t\tfor (i=1;i < nLeafNum;i++){\n\t\t\t\tnOffset=i *TerrainLeaf.LEAF_SKIRT_VERTEXT_COUNT;\n\t\t\t\tfor (j=0,n1=TerrainLeaf._maxLODLevel+1;j < n1;j++){\n\t\t\t\t\tnOriginIndexArray=TerrainLeaf._skirtLODIndex[0][j];\n\t\t\t\t\tnTempIndex=new Uint16Array(nOriginIndexArray.length);\n\t\t\t\t\tfor (k=0;k < nOriginIndexArray.length;k++){\n\t\t\t\t\t\tnTempIndex[k]=nOriginIndexArray[k]+nOffset;\n\t\t\t\t\t}\n\t\t\t\t\tTerrainLeaf._skirtLODIndex[i][j]=nTempIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t\tTerrainLeaf._bInit=true;\n\t\t}\n\t}\n\n\tTerrainLeaf.getPlaneLODIndex=function(leafIndex,LODLevel){\n\t\treturn TerrainLeaf._planeLODIndex[leafIndex][LODLevel];\n\t}\n\n\tTerrainLeaf.getSkirtLODIndex=function(leafIndex,LODLevel){\n\t\treturn TerrainLeaf._skirtLODIndex[leafIndex][LODLevel];\n\t}\n\n\tTerrainLeaf.calcPlaneLODIndex=function(level){\n\t\tif (level > TerrainLeaf._maxLODLevel)level=TerrainLeaf._maxLODLevel;\n\t\tvar nGridNumAddOne=TerrainLeaf.LEAF_GRID_NUM+1;\n\t\tvar nNum=0;\n\t\tvar indexBuffer=null;\n\t\tvar nLODGridNum=laya.d3.terrain.TerrainLeaf.LEAF_GRID_NUM / Math.pow(2,level);\n\t\tindexBuffer=new Uint16Array(nLODGridNum *nLODGridNum *6);\n\t\tvar nGridSpace=laya.d3.terrain.TerrainLeaf.LEAF_GRID_NUM / nLODGridNum;\n\t\tfor (var i=0;i < TerrainLeaf.LEAF_GRID_NUM;i+=nGridSpace){\n\t\t\tfor (var j=0;j < TerrainLeaf.LEAF_GRID_NUM;j+=nGridSpace){\n\t\t\t\tindexBuffer[nNum]=(i+nGridSpace)*nGridNumAddOne+j;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=i *nGridNumAddOne+j;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=i *nGridNumAddOne+j+nGridSpace;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=i *nGridNumAddOne+j+nGridSpace;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=(i+nGridSpace)*nGridNumAddOne+j+nGridSpace;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=(i+nGridSpace)*nGridNumAddOne+j;\n\t\t\t\tnNum++;\n\t\t\t}\n\t\t}\n\t\treturn indexBuffer;\n\t}\n\n\tTerrainLeaf.calcSkirtLODIndex=function(level){\n\t\tif (level > TerrainLeaf._maxLODLevel)level=TerrainLeaf._maxLODLevel;\n\t\tvar nSkirtIndexOffset=(TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM)*(TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM)*TerrainLeaf.LEAF_PLANE_VERTEXT_COUNT;\n\t\tvar nGridNumAddOne=TerrainLeaf.LEAF_GRID_NUM+1;\n\t\tvar nNum=0;\n\t\tvar indexBuffer=null;\n\t\tvar nLODGridNum=laya.d3.terrain.TerrainLeaf.LEAF_GRID_NUM / Math.pow(2,level);\n\t\tindexBuffer=new Uint16Array(nLODGridNum *4 *6);\n\t\tvar nGridSpace=laya.d3.terrain.TerrainLeaf.LEAF_GRID_NUM / nLODGridNum;\n\t\tfor (var j=0;j < 4;j++){\n\t\t\tfor (var i=0;i < TerrainLeaf.LEAF_GRID_NUM;i+=nGridSpace){\n\t\t\t\tindexBuffer[nNum]=nSkirtIndexOffset+nGridNumAddOne+i;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=nSkirtIndexOffset+i;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=nSkirtIndexOffset+i+nGridSpace;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=nSkirtIndexOffset+i+nGridSpace;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=nSkirtIndexOffset+nGridNumAddOne+i+nGridSpace;\n\t\t\t\tnNum++;\n\t\t\t\tindexBuffer[nNum]=nSkirtIndexOffset+nGridNumAddOne+i;\n\t\t\t\tnNum++;\n\t\t\t}\n\t\t\tnSkirtIndexOffset+=nGridNumAddOne *2;\n\t\t}\n\t\treturn indexBuffer;\n\t}\n\n\tTerrainLeaf.getHeightFromTerrainHeightData=function(x,z,terrainHeightData,heighDataWidth,heightDataHeight){\n\t\tx=x < 0 ? 0 :x;\n\t\tx=(x >=heighDataWidth)? heighDataWidth-1 :x;\n\t\tz=z < 0 ? 0 :z;\n\t\tz=(z >=heightDataHeight)? heightDataHeight-1 :z;\n\t\treturn terrainHeightData[z *heighDataWidth+x];\n\t}\n\n\tTerrainLeaf.CHUNK_GRID_NUM=64;\n\tTerrainLeaf.LEAF_GRID_NUM=32;\n\tTerrainLeaf.__ADAPT_MATRIX__=null;\n\tTerrainLeaf.__ADAPT_MATRIX_INV__=null;\n\tTerrainLeaf._planeLODIndex=null;\n\tTerrainLeaf._skirtLODIndex=null;\n\tTerrainLeaf._bInit=false;\n\t__static(TerrainLeaf,\n\t['LEAF_PLANE_VERTEXT_COUNT',function(){return this.LEAF_PLANE_VERTEXT_COUNT=(TerrainLeaf.LEAF_GRID_NUM+1)*(TerrainLeaf.LEAF_GRID_NUM+1);},'LEAF_SKIRT_VERTEXT_COUNT',function(){return this.LEAF_SKIRT_VERTEXT_COUNT=(TerrainLeaf.LEAF_GRID_NUM+1)*2 *4;},'LEAF_VERTEXT_COUNT',function(){return this.LEAF_VERTEXT_COUNT=TerrainLeaf.LEAF_PLANE_VERTEXT_COUNT+TerrainLeaf.LEAF_SKIRT_VERTEXT_COUNT;},'LEAF_PLANE_MAX_INDEX_COUNT',function(){return this.LEAF_PLANE_MAX_INDEX_COUNT=TerrainLeaf.LEAF_GRID_NUM *TerrainLeaf.LEAF_GRID_NUM *6;},'LEAF_SKIRT_MAX_INDEX_COUNT',function(){return this.LEAF_SKIRT_MAX_INDEX_COUNT=TerrainLeaf.LEAF_GRID_NUM *4 *6;},'LEAF_MAX_INDEX_COUNT',function(){return this.LEAF_MAX_INDEX_COUNT=TerrainLeaf.LEAF_PLANE_MAX_INDEX_COUNT+TerrainLeaf.LEAF_SKIRT_MAX_INDEX_COUNT;},'__VECTOR3__',function(){return this.__VECTOR3__=new Vector3();},'_maxLODLevel',function(){return this._maxLODLevel=/*__JS__ */Math.log2(TerrainLeaf.LEAF_GRID_NUM);}\n\t]);\n\treturn TerrainLeaf;\n})()\n\n\n/**\n*<code>DetailTextureInfo</code> 类用于描述地形细节纹理。\n*/\n//class laya.d3.terrain.unit.ChunkInfo\nvar ChunkInfo=(function(){\n\tfunction ChunkInfo(){\n\t\tthis.alphaMap=null;\n\t\tthis.detailID=null;\n\t\tthis.normalMap=null;\n\t\t;\n\t}\n\n\t__class(ChunkInfo,'laya.d3.terrain.unit.ChunkInfo');\n\treturn ChunkInfo;\n})()\n\n\n/**\n*<code>DetailTextureInfo</code> 类用于描述地形细节纹理。\n*/\n//class laya.d3.terrain.unit.DetailTextureInfo\nvar DetailTextureInfo=(function(){\n\tfunction DetailTextureInfo(){\n\t\tthis.diffuseTexture=null;\n\t\tthis.normalTexture=null;\n\t\tthis.scale=null;\n\t\tthis.offset=null;\n\t\t;\n\t}\n\n\t__class(DetailTextureInfo,'laya.d3.terrain.unit.DetailTextureInfo');\n\treturn DetailTextureInfo;\n})()\n\n\n/**\n*<code>MaterialInfo</code> 类用于描述地形材质信息。\n*/\n//class laya.d3.terrain.unit.MaterialInfo\nvar MaterialInfo=(function(){\n\tfunction MaterialInfo(){\n\t\tthis.ambientColor=null;\n\t\tthis.diffuseColor=null;\n\t\tthis.specularColor=null;\n\t\t;\n\t}\n\n\t__class(MaterialInfo,'laya.d3.terrain.unit.MaterialInfo');\n\treturn MaterialInfo;\n})()\n\n\n/**\n*<code>Physics</code> 类用于简单物理检测。\n*/\n//class laya.d3.utils.Physics\nvar Physics=(function(){\n\t/**\n\t*创建一个 <code>Physics</code> 实例。\n\t*/\n\tfunction Physics(){}\n\t__class(Physics,'laya.d3.utils.Physics');\n\tPhysics.__init__=function(){\n\t\tvar maxCount=/*laya.d3.core.Layer.maxCount*/31;\n\t\tPhysics._layerCollsionMatrix.length=maxCount;\n\t\tfor (var i=0;i < maxCount;i++){\n\t\t\tvar collArray=[];\n\t\t\tvar count=maxCount-i;\n\t\t\tcollArray.length=count;\n\t\t\tfor (var j=0;j < count;j++)\n\t\t\tif (j===count-1)\n\t\t\t\tcollArray[j]=true;\n\t\t\telse\n\t\t\tcollArray[j]=false;\n\t\t\tPhysics._layerCollsionMatrix[i]=collArray;\n\t\t}\n\t}\n\n\tPhysics.setLayerCollision=function(layer1,layer2,collison){\n\t\tPhysics._layerCollsionMatrix[layer1.number][(/*laya.d3.core.Layer.maxCount*/31-1)-layer2.number]=collison;\n\t}\n\n\tPhysics.getLayerCollision=function(layer1,layer2){\n\t\treturn Physics._layerCollsionMatrix[layer1.number][(/*laya.d3.core.Layer.maxCount*/31-1)-layer2.number];\n\t}\n\n\tPhysics.setColliderCollision=function(collider1,collider2,collsion){\n\t\tif (collsion){\n\t\t\tdelete collider1._ignoreCollisonMap[collider2.id];\n\t\t\tdelete collider2._ignoreCollisonMap[collider1.id];\n\t\t\t}else {\n\t\t\tcollider1._ignoreCollisonMap[collider2.id]=collider2;\n\t\t\tcollider2._ignoreCollisonMap[collider1.id]=collider1;\n\t\t}\n\t}\n\n\tPhysics.getIColliderCollision=function(collider1,collider2){\n\t\treturn collider1._ignoreCollisonMap[collider2.id] ? true :false;\n\t}\n\n\tPhysics.rayCast=function(ray,outHitInfo,distance,layer){\n\t\t(distance===void 0)&& (distance=1.79e+308);\n\t\t(layer===void 0)&& (layer=0);\n\t\tPhysics._outHitAllInfo.length=0;\n\t\tvar colliders=Layer.getLayerByNumber(layer)._colliders;\n\t\tfor (var i=0,n=colliders.length;i < n;i++){\n\t\t\tvar collider=colliders[i];\n\t\t\tif (collider.enable){\n\t\t\t\tcollider.raycast(ray,Physics._outHitInfo,distance);\n\t\t\t\tif (Physics._outHitInfo.distance!==-1 && Physics._outHitInfo.distance <=distance){\n\t\t\t\t\tvar outHit=new RaycastHit();\n\t\t\t\t\tPhysics._outHitInfo.cloneTo(outHit);\n\t\t\t\t\tPhysics._outHitAllInfo.push(outHit);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (Physics._outHitAllInfo.length==0){\n\t\t\toutHitInfo.sprite3D=null;\n\t\t\toutHitInfo.distance=-1;\n\t\t\treturn;\n\t\t};\n\t\tvar minDistance=Number.MAX_VALUE;\n\t\tvar minIndex=0;\n\t\tfor (var j=0;j < Physics._outHitAllInfo.length;j++){\n\t\t\tif (Physics._outHitAllInfo[j].distance < minDistance){\n\t\t\t\tminDistance=Physics._outHitAllInfo[j].distance;\n\t\t\t\tminIndex=j;\n\t\t\t}\n\t\t}\n\t\tPhysics._outHitAllInfo[minIndex].cloneTo(outHitInfo);\n\t}\n\n\tPhysics.rayCastAll=function(ray,outHitAllInfo,distance,layer){\n\t\t(distance===void 0)&& (distance=1.79e+308);\n\t\t(layer===void 0)&& (layer=0);\n\t\toutHitAllInfo.length=0;\n\t\tvar colliders=Layer.getLayerByNumber(layer)._colliders;\n\t\tfor (var i=0,n=colliders.length;i < n;i++){\n\t\t\tvar collider=colliders[i];\n\t\t\tif (collider.enable){\n\t\t\t\tPhysics._outHitInfo.distance=-1;\n\t\t\t\tPhysics._outHitInfo.sprite3D=null;\n\t\t\t\tcollider.raycast(ray,Physics._outHitInfo,distance);\n\t\t\t\tif (Physics._outHitInfo.distance!==-1 && Physics._outHitInfo.distance <=distance){\n\t\t\t\t\tvar outHit=new RaycastHit();\n\t\t\t\t\tPhysics._outHitInfo.cloneTo(outHit);\n\t\t\t\t\toutHitAllInfo.push(outHit);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tPhysics._outHitAllInfo=[];\n\tPhysics._layerCollsionMatrix=[];\n\t__static(Physics,\n\t['_outHitInfo',function(){return this._outHitInfo=new RaycastHit();},'collisionManager',function(){return this.collisionManager=new CollisionManager();},'gravity',function(){return this.gravity=new Vector3(0,-9.81,0);}\n\t]);\n\treturn Physics;\n})()\n\n\n/**\n*<code>Picker</code> 类用于创建拾取。\n*/\n//class laya.d3.utils.Picker\nvar Picker=(function(){\n\t/**\n\t*创建一个 <code>Picker</code> 实例。\n\t*/\n\tfunction Picker(){}\n\t__class(Picker,'laya.d3.utils.Picker');\n\tPicker.calculateCursorRay=function(point,viewPort,projectionMatrix,viewMatrix,world,out){\n\t\tvar x=point.elements[0];\n\t\tvar y=point.elements[1];\n\t\tvar nearSource=Picker._tempVector30;\n\t\tvar nerSourceE=nearSource.elements;\n\t\tnerSourceE[0]=x;\n\t\tnerSourceE[1]=y;\n\t\tnerSourceE[2]=viewPort.minDepth;\n\t\tvar farSource=Picker._tempVector31;\n\t\tvar farSourceE=farSource.elements;\n\t\tfarSourceE[0]=x;\n\t\tfarSourceE[1]=y;\n\t\tfarSourceE[2]=viewPort.maxDepth;\n\t\tvar nearPoint=out.origin;\n\t\tvar farPoint=Picker._tempVector32;\n\t\tviewPort.unprojectFromWVP(nearSource,projectionMatrix,viewMatrix,world,nearPoint);\n\t\tviewPort.unprojectFromWVP(farSource,projectionMatrix,viewMatrix,world,farPoint);\n\t\tvar outDire=out.direction.elements;\n\t\toutDire[0]=farPoint.x-nearPoint.x;\n\t\toutDire[1]=farPoint.y-nearPoint.y;\n\t\toutDire[2]=farPoint.z-nearPoint.z;\n\t\tVector3.normalize(out.direction,out.direction);\n\t}\n\n\tPicker.rayIntersectsPositionsAndIndices=function(ray,vertexDatas,vertexDeclaration,indices,outHitInfo){\n\t\tvar vertexStrideFloatCount=vertexDeclaration.vertexStride / 4;\n\t\tvar positionVertexElementOffset=vertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.POSITION0*/0).offset / 4;\n\t\tvar closestIntersection=Number.MAX_VALUE;\n\t\tvar closestTriangleVertexIndex1=-1;\n\t\tvar closestTriangleVertexIndex2=-1;\n\t\tvar closestTriangleVertexIndex3=-1;\n\t\tfor (var j=0;j < indices.length;j+=3){\n\t\t\tvar vertex1=Picker._tempVector35;\n\t\t\tvar vertex1E=vertex1.elements;\n\t\t\tvar vertex1Index=indices[j] *vertexStrideFloatCount;\n\t\t\tvar vertex1PositionIndex=vertex1Index+positionVertexElementOffset;\n\t\t\tvertex1E[0]=vertexDatas[vertex1PositionIndex];\n\t\t\tvertex1E[1]=vertexDatas[vertex1PositionIndex+1];\n\t\t\tvertex1E[2]=vertexDatas[vertex1PositionIndex+2];\n\t\t\tvar vertex2=Picker._tempVector36;\n\t\t\tvar vertex2E=vertex2.elements;\n\t\t\tvar vertex2Index=indices[j+1] *vertexStrideFloatCount;\n\t\t\tvar vertex2PositionIndex=vertex2Index+positionVertexElementOffset;\n\t\t\tvertex2E[0]=vertexDatas[vertex2PositionIndex];\n\t\t\tvertex2E[1]=vertexDatas[vertex2PositionIndex+1];\n\t\t\tvertex2E[2]=vertexDatas[vertex2PositionIndex+2];\n\t\t\tvar vertex3=Picker._tempVector37;\n\t\t\tvar vertex3E=vertex3.elements;\n\t\t\tvar vertex3Index=indices[j+2] *vertexStrideFloatCount;\n\t\t\tvar vertex3PositionIndex=vertex3Index+positionVertexElementOffset;\n\t\t\tvertex3E[0]=vertexDatas[vertex3PositionIndex];\n\t\t\tvertex3E[1]=vertexDatas[vertex3PositionIndex+1];\n\t\t\tvertex3E[2]=vertexDatas[vertex3PositionIndex+2];\n\t\t\tvar intersection=laya.d3.utils.Picker.rayIntersectsTriangle(ray,vertex1,vertex2,vertex3);\n\t\t\tif (!isNaN(intersection)&& intersection < closestIntersection){\n\t\t\t\tclosestIntersection=intersection;\n\t\t\t\tclosestTriangleVertexIndex1=vertex1Index;\n\t\t\t\tclosestTriangleVertexIndex2=vertex2Index;\n\t\t\t\tclosestTriangleVertexIndex3=vertex3Index;\n\t\t\t}\n\t\t}\n\t\tif (closestIntersection!==Number.MAX_VALUE){\n\t\t\toutHitInfo.distance=closestIntersection;\n\t\t\tVector3.scale(ray.direction,closestIntersection,outHitInfo.position);\n\t\t\tVector3.add(ray.origin,outHitInfo.position,outHitInfo.position);\n\t\t\tvar trianglePositions=outHitInfo.trianglePositions;\n\t\t\tvar position0=trianglePositions[0];\n\t\t\tvar position1=trianglePositions[1];\n\t\t\tvar position2=trianglePositions[2];\n\t\t\tvar position0E=position0.elements;\n\t\t\tvar position1E=position1.elements;\n\t\t\tvar position2E=position2.elements;\n\t\t\tvar closestVertex1PositionIndex=closestTriangleVertexIndex1+positionVertexElementOffset;\n\t\t\tposition0E[0]=vertexDatas[closestVertex1PositionIndex];\n\t\t\tposition0E[1]=vertexDatas[closestVertex1PositionIndex+1];\n\t\t\tposition0E[2]=vertexDatas[closestVertex1PositionIndex+2];\n\t\t\tvar closestVertex2PositionIndex=closestTriangleVertexIndex2+positionVertexElementOffset;\n\t\t\tposition1E[0]=vertexDatas[closestVertex2PositionIndex];\n\t\t\tposition1E[1]=vertexDatas[closestVertex2PositionIndex+1];\n\t\t\tposition1E[2]=vertexDatas[closestVertex2PositionIndex+2];\n\t\t\tvar closestVertex3PositionIndex=closestTriangleVertexIndex3+positionVertexElementOffset;\n\t\t\tposition2E[0]=vertexDatas[closestVertex3PositionIndex];\n\t\t\tposition2E[1]=vertexDatas[closestVertex3PositionIndex+1];\n\t\t\tposition2E[2]=vertexDatas[closestVertex3PositionIndex+2];\n\t\t\tvar normalVertexElement=vertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3);\n\t\t\tif (normalVertexElement){\n\t\t\t\tvar normalVertexElementOffset=normalVertexElement.offset / 4;\n\t\t\t\tvar triangleNormals=outHitInfo.triangleNormals;\n\t\t\t\tvar normal0=triangleNormals[0];\n\t\t\t\tvar normal1=triangleNormals[1];\n\t\t\t\tvar normal2=triangleNormals[2];\n\t\t\t\tvar normal0E=normal0.elements;\n\t\t\t\tvar normal1E=normal1.elements;\n\t\t\t\tvar normal2E=normal2.elements;\n\t\t\t\tvar closestVertex1NormalIndex=closestTriangleVertexIndex1+normalVertexElementOffset;\n\t\t\t\tnormal0E[0]=vertexDatas[closestVertex1NormalIndex];\n\t\t\t\tnormal0E[1]=vertexDatas[closestVertex1NormalIndex+1];\n\t\t\t\tnormal0E[2]=vertexDatas[closestVertex1NormalIndex+2];\n\t\t\t\tvar closestVertex2NormalIndex=closestTriangleVertexIndex2+normalVertexElementOffset;\n\t\t\t\tnormal1E[0]=vertexDatas[closestVertex2NormalIndex];\n\t\t\t\tnormal1E[1]=vertexDatas[closestVertex2NormalIndex+1];\n\t\t\t\tnormal1E[2]=vertexDatas[closestVertex2NormalIndex+2];\n\t\t\t\tvar closestVertex3NormalIndex=closestTriangleVertexIndex3+normalVertexElementOffset;\n\t\t\t\tnormal2E[0]=vertexDatas[closestVertex3NormalIndex];\n\t\t\t\tnormal2E[1]=vertexDatas[closestVertex3NormalIndex+1];\n\t\t\t\tnormal2E[2]=vertexDatas[closestVertex3NormalIndex+2];\n\t\t\t}\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\toutHitInfo.position.toDefault();\n\t\t\toutHitInfo.distance=Number.MAX_VALUE;\n\t\t\toutHitInfo.trianglePositions[0].toDefault();\n\t\t\toutHitInfo.trianglePositions[1].toDefault();\n\t\t\toutHitInfo.trianglePositions[2].toDefault();\n\t\t\toutHitInfo.triangleNormals[0].toDefault();\n\t\t\toutHitInfo.triangleNormals[1].toDefault();\n\t\t\toutHitInfo.triangleNormals[2].toDefault();\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tPicker.rayIntersectsTriangle=function(ray,vertex1,vertex2,vertex3){\n\t\tvar result;\n\t\tvar edge1=Picker._tempVector30,edge2=Picker._tempVector31;\n\t\tVector3.subtract(vertex2,vertex1,edge1);\n\t\tVector3.subtract(vertex3,vertex1,edge2);\n\t\tvar directionCrossEdge2=Picker._tempVector32;\n\t\tVector3.cross(ray.direction,edge2,directionCrossEdge2);\n\t\tvar determinant;\n\t\tdeterminant=Vector3.dot(edge1,directionCrossEdge2);\n\t\tif (determinant >-Number.MIN_VALUE && determinant < Number.MIN_VALUE){\n\t\t\tresult=Number.NaN;\n\t\t\treturn result;\n\t\t};\n\t\tvar inverseDeterminant=1.0 / determinant;\n\t\tvar distanceVector=Picker._tempVector33;\n\t\tVector3.subtract(ray.origin,vertex1,distanceVector);\n\t\tvar triangleU;\n\t\ttriangleU=Vector3.dot(distanceVector,directionCrossEdge2);\n\t\ttriangleU *=inverseDeterminant;\n\t\tif (triangleU < 0 || triangleU > 1){\n\t\t\tresult=Number.NaN;\n\t\t\treturn result;\n\t\t};\n\t\tvar distanceCrossEdge1=Picker._tempVector34;\n\t\tVector3.cross(distanceVector,edge1,distanceCrossEdge1);\n\t\tvar triangleV;\n\t\ttriangleV=Vector3.dot(ray.direction,distanceCrossEdge1);\n\t\ttriangleV *=inverseDeterminant;\n\t\tif (triangleV < 0 || triangleU+triangleV > 1){\n\t\t\tresult=Number.NaN;\n\t\t\treturn result;\n\t\t};\n\t\tvar rayDistance;\n\t\trayDistance=Vector3.dot(edge2,distanceCrossEdge1);\n\t\trayDistance *=inverseDeterminant;\n\t\tif (rayDistance < 0){\n\t\t\tresult=Number.NaN;\n\t\t\treturn result;\n\t\t}\n\t\tresult=rayDistance;\n\t\treturn result;\n\t}\n\n\t__static(Picker,\n\t['_tempVector30',function(){return this._tempVector30=new Vector3();},'_tempVector31',function(){return this._tempVector31=new Vector3();},'_tempVector32',function(){return this._tempVector32=new Vector3();},'_tempVector33',function(){return this._tempVector33=new Vector3();},'_tempVector34',function(){return this._tempVector34=new Vector3();},'_tempVector35',function(){return this._tempVector35=new Vector3();},'_tempVector36',function(){return this._tempVector36=new Vector3();},'_tempVector37',function(){return this._tempVector37=new Vector3();}\n\t]);\n\treturn Picker;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.utils.RaycastHit\nvar RaycastHit=(function(){\n\tfunction RaycastHit(){\n\t\tthis.distance=NaN;\n\t\tthis.trianglePositions=null;\n\t\tthis.triangleNormals=null;\n\t\tthis.position=null;\n\t\tthis.sprite3D=null;\n\t\tthis.distance=-1;\n\t\tthis.trianglePositions=[new Vector3(),new Vector3(),new Vector3()];\n\t\tthis.trianglePositions.length=3;\n\t\tthis.triangleNormals=[new Vector3(),new Vector3(),new Vector3()];\n\t\tthis.triangleNormals.length=3;\n\t\tthis.position=new Vector3();\n\t}\n\n\t__class(RaycastHit,'laya.d3.utils.RaycastHit');\n\tvar __proto=RaycastHit.prototype;\n\t__proto.cloneTo=function(dec){\n\t\tdec.distance=this.distance;\n\t\tthis.trianglePositions[0].cloneTo(dec.trianglePositions[0]);\n\t\tthis.trianglePositions[1].cloneTo(dec.trianglePositions[1]);\n\t\tthis.trianglePositions[2].cloneTo(dec.trianglePositions[2]);\n\t\tthis.triangleNormals[0].cloneTo(dec.triangleNormals[0]);\n\t\tthis.triangleNormals[1].cloneTo(dec.triangleNormals[1]);\n\t\tthis.triangleNormals[2].cloneTo(dec.triangleNormals[2]);\n\t\tthis.position.cloneTo(dec.position);\n\t\tdec.sprite3D=this.sprite3D;\n\t}\n\n\treturn RaycastHit;\n})()\n\n\n//class laya.d3.utils.Size\nvar Size=(function(){\n\tfunction Size(width,height){\n\t\tthis._width=0;\n\t\tthis._height=0;\n\t\tthis._width=width;\n\t\tthis._height=height;\n\t}\n\n\t__class(Size,'laya.d3.utils.Size');\n\tvar __proto=Size.prototype;\n\t__getset(0,__proto,'width',function(){\n\t\tif (this._width===-1)\n\t\t\treturn RenderState.clientWidth;\n\t\treturn this._width;\n\t});\n\n\t__getset(0,__proto,'height',function(){\n\t\tif (this._height===-1)\n\t\t\treturn RenderState.clientHeight;\n\t\treturn this._height;\n\t});\n\n\t__getset(1,Size,'fullScreen',function(){\n\t\treturn new Size(-1,-1);\n\t});\n\n\treturn Size;\n})()\n\n\n/**\n*<code>Utils3D</code> 类用于创建3D工具。\n*/\n//class laya.d3.utils.Utils3D\nvar Utils3D=(function(){\n\tfunction Utils3D(){}\n\t__class(Utils3D,'laya.d3.utils.Utils3D');\n\tUtils3D._rotationTransformScaleSkinAnimation=function(tx,ty,tz,qx,qy,qz,qw,sx,sy,sz,outArray,outOffset){\n\t\tvar re=Utils3D._tempArray16_0;\n\t\tvar se=Utils3D._tempArray16_1;\n\t\tvar tse=Utils3D._tempArray16_2;\n\t\tvar x2=qx+qx;\n\t\tvar y2=qy+qy;\n\t\tvar z2=qz+qz;\n\t\tvar xx=qx *x2;\n\t\tvar yx=qy *x2;\n\t\tvar yy=qy *y2;\n\t\tvar zx=qz *x2;\n\t\tvar zy=qz *y2;\n\t\tvar zz=qz *z2;\n\t\tvar wx=qw *x2;\n\t\tvar wy=qw *y2;\n\t\tvar wz=qw *z2;\n\t\tre[15]=1;\n\t\tre[0]=1-yy-zz;\n\t\tre[1]=yx+wz;\n\t\tre[2]=zx-wy;\n\t\tre[4]=yx-wz;\n\t\tre[5]=1-xx-zz;\n\t\tre[6]=zy+wx;\n\t\tre[8]=zx+wy;\n\t\tre[9]=zy-wx;\n\t\tre[10]=1-xx-yy;\n\t\tse[15]=1;\n\t\tse[0]=sx;\n\t\tse[5]=sy;\n\t\tse[10]=sz;\n\t\tvar i,a,b,e,ai0,ai1,ai2,ai3;\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=re[i];\n\t\t\tai1=re[i+4];\n\t\t\tai2=re[i+8];\n\t\t\tai3=re[i+12];\n\t\t\ttse[i]=ai0;\n\t\t\ttse[i+4]=ai1;\n\t\t\ttse[i+8]=ai2;\n\t\t\ttse[i+12]=ai0 *tx+ai1 *ty+ai2 *tz+ai3;\n\t\t}\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=tse[i];\n\t\t\tai1=tse[i+4];\n\t\t\tai2=tse[i+8];\n\t\t\tai3=tse[i+12];\n\t\t\toutArray[i+outOffset]=ai0 *se[0]+ai1 *se[1]+ai2 *se[2]+ai3 *se[3];\n\t\t\toutArray[i+outOffset+4]=ai0 *se[4]+ai1 *se[5]+ai2 *se[6]+ai3 *se[7];\n\t\t\toutArray[i+outOffset+8]=ai0 *se[8]+ai1 *se[9]+ai2 *se[10]+ai3 *se[11];\n\t\t\toutArray[i+outOffset+12]=ai0 *se[12]+ai1 *se[13]+ai2 *se[14]+ai3 *se[15];\n\t\t}\n\t}\n\n\tUtils3D._createNodeByJson=function(rootNode,nodeData,node,innerResouMap){\n\t\tif (!node){\n\t\t\tswitch (nodeData.type){\n\t\t\t\tcase \"Sprite3D\":\n\t\t\t\t\tnode=new Sprite3D();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"MeshSprite3D\":\n\t\t\t\t\tnode=new MeshSprite3D();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"SkinnedMeshSprite3D\":\n\t\t\t\t\tnode=new SkinnedMeshSprite3D();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"ShuriKenParticle3D\":\n\t\t\t\t\tnode=new ShuriKenParticle3D();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"TrailSprite3D\":\n\t\t\t\t\tnode=new TrailSprite3D();\n\t\t\t\t\tbreak ;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"Terrain\":\n\t\t\t\t\tnode=new Terrain();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"Camera\":\n\t\t\t\t\tnode=new Camera();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"DirectionLight\":\n\t\t\t\t\tnode=new DirectionLight();\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"Utils3D:unidentified class type in (.lh) file.\");\n\t\t\t\t}\n\t\t};\n\t\tvar props=nodeData.props;\n\t\tif (props)\n\t\t\tfor (var key in props)\n\t\tnode[key]=props[key];\n\t\tvar customProps=nodeData.customProps;\n\t\tif (customProps){\n\t\t\tif ((node instanceof laya.d3.core.Sprite3D )){\n\t\t\t\tnode._parseBaseCustomProps(customProps);\n\t\t\t\tnode._parseCustomProps(rootNode,innerResouMap,customProps,nodeData);\n\t\t\t\tnode._parseCustomComponent(rootNode,innerResouMap,nodeData.components);\n\t\t\t\t}else {\n\t\t\t\tnode._parseCustomProps(rootNode,innerResouMap,customProps,nodeData);\n\t\t\t}\n\t\t};\n\t\tvar childData=nodeData.child;\n\t\tif (childData){\n\t\t\tfor (var i=0,n=childData.length;i < n;i++){\n\t\t\t\tvar child=Utils3D._createNodeByJson(rootNode,childData[i],null,innerResouMap)\n\t\t\t\tnode.addChild(child);\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}\n\n\tUtils3D._computeBoneAndAnimationDatasByBindPoseMatrxix=function(bones,curData,inverGlobalBindPose,outBonesDatas,outAnimationDatas,boneIndexToMesh){\n\t\tvar offset=0;\n\t\tvar matOffset=0;\n\t\tvar i;\n\t\tvar parentOffset;\n\t\tvar boneLength=bones.length;\n\t\tfor (i=0;i < boneLength;offset+=bones[i].keyframeWidth,matOffset+=16,i++){\n\t\t\tlaya.d3.utils.Utils3D._rotationTransformScaleSkinAnimation(curData[offset+0],curData[offset+1],curData[offset+2],curData[offset+3],curData[offset+4],curData[offset+5],curData[offset+6],curData[offset+7],curData[offset+8],curData[offset+9],outBonesDatas,matOffset);\n\t\t\tif (i !=0){\n\t\t\t\tparentOffset=bones[i].parentIndex *16;\n\t\t\t\tlaya.d3.utils.Utils3D.mulMatrixByArray(outBonesDatas,parentOffset,outBonesDatas,matOffset,outBonesDatas,matOffset);\n\t\t\t}\n\t\t};\n\t\tvar n=inverGlobalBindPose.length;\n\t\tfor (i=0;i < n;i++){\n\t\t\tlaya.d3.utils.Utils3D.mulMatrixByArrayAndMatrixFast(outBonesDatas,boneIndexToMesh[i] *16,inverGlobalBindPose[i],outAnimationDatas,i *16);\n\t\t}\n\t}\n\n\tUtils3D._computeAnimationDatasByArrayAndMatrixFast=function(inverGlobalBindPose,bonesDatas,outAnimationDatas,boneIndexToMesh){\n\t\tfor (var i=0,n=inverGlobalBindPose.length;i < n;i++)\n\t\tlaya.d3.utils.Utils3D.mulMatrixByArrayAndMatrixFast(bonesDatas,boneIndexToMesh[i] *16,inverGlobalBindPose[i],outAnimationDatas,i *16);\n\t}\n\n\tUtils3D._computeBoneAndAnimationDatasByBindPoseMatrxixOld=function(bones,curData,inverGlobalBindPose,outBonesDatas,outAnimationDatas){\n\t\tvar offset=0;\n\t\tvar matOffset=0;\n\t\tvar i;\n\t\tvar parentOffset;\n\t\tvar boneLength=bones.length;\n\t\tfor (i=0;i < boneLength;offset+=bones[i].keyframeWidth,matOffset+=16,i++){\n\t\t\tlaya.d3.utils.Utils3D._rotationTransformScaleSkinAnimation(curData[offset+7],curData[offset+8],curData[offset+9],curData[offset+3],curData[offset+4],curData[offset+5],curData[offset+6],curData[offset+0],curData[offset+1],curData[offset+2],outBonesDatas,matOffset);\n\t\t\tif (i !=0){\n\t\t\t\tparentOffset=bones[i].parentIndex *16;\n\t\t\t\tlaya.d3.utils.Utils3D.mulMatrixByArray(outBonesDatas,parentOffset,outBonesDatas,matOffset,outBonesDatas,matOffset);\n\t\t\t}\n\t\t};\n\t\tvar n=inverGlobalBindPose.length;\n\t\tfor (i=0;i < n;i++){\n\t\t\tvar arrayOffset=i *16;\n\t\t\tlaya.d3.utils.Utils3D.mulMatrixByArrayAndMatrixFast(outBonesDatas,arrayOffset,inverGlobalBindPose[i],outAnimationDatas,arrayOffset);\n\t\t}\n\t}\n\n\tUtils3D._computeAnimationDatasByArrayAndMatrixFastOld=function(inverGlobalBindPose,bonesDatas,outAnimationDatas){\n\t\tvar n=inverGlobalBindPose.length;\n\t\tfor (var i=0;i < n;i++){\n\t\t\tvar arrayOffset=i *16;\n\t\t\tlaya.d3.utils.Utils3D.mulMatrixByArrayAndMatrixFast(bonesDatas,arrayOffset,inverGlobalBindPose[i],outAnimationDatas,arrayOffset);\n\t\t}\n\t}\n\n\tUtils3D._computeRootAnimationData=function(bones,curData,animationDatas){\n\t\tfor (var i=0,offset=0,matOffset=0,boneLength=bones.length;i < boneLength;offset+=bones[i].keyframeWidth,matOffset+=16,i++)\n\t\tlaya.d3.utils.Utils3D.createAffineTransformationArray(curData[offset+0],curData[offset+1],curData[offset+2],curData[offset+3],curData[offset+4],curData[offset+5],curData[offset+6],curData[offset+7],curData[offset+8],curData[offset+9],animationDatas,matOffset);\n\t}\n\n\tUtils3D.transformVector3ArrayByQuat=function(sourceArray,sourceOffset,rotation,outArray,outOffset){\n\t\tvar re=rotation.elements;\n\t\tvar x=sourceArray[sourceOffset],y=sourceArray[sourceOffset+1],z=sourceArray[sourceOffset+2],qx=re[0],qy=re[1],qz=re[2],qw=re[3],ix=qw *x+qy *z-qz *y,iy=qw *y+qz *x-qx *z,iz=qw *z+qx *y-qy *x,iw=-qx *x-qy *y-qz *z;\n\t\toutArray[outOffset]=ix *qw+iw *-qx+iy *-qz-iz *-qy;\n\t\toutArray[outOffset+1]=iy *qw+iw *-qy+iz *-qx-ix *-qz;\n\t\toutArray[outOffset+2]=iz *qw+iw *-qz+ix *-qy-iy *-qx;\n\t}\n\n\tUtils3D.mulMatrixByArray=function(leftArray,leftOffset,rightArray,rightOffset,outArray,outOffset){\n\t\tvar i,ai0,ai1,ai2,ai3;\n\t\tif (outArray===rightArray){\n\t\t\trightArray=Utils3D._tempArray16_3;\n\t\t\tfor (i=0;i < 16;++i){\n\t\t\t\trightArray[i]=outArray[outOffset+i];\n\t\t\t}\n\t\t\trightOffset=0;\n\t\t}\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=leftArray[leftOffset+i];\n\t\t\tai1=leftArray[leftOffset+i+4];\n\t\t\tai2=leftArray[leftOffset+i+8];\n\t\t\tai3=leftArray[leftOffset+i+12];\n\t\t\toutArray[outOffset+i]=ai0 *rightArray[rightOffset+0]+ai1 *rightArray[rightOffset+1]+ai2 *rightArray[rightOffset+2]+ai3 *rightArray[rightOffset+3];\n\t\t\toutArray[outOffset+i+4]=ai0 *rightArray[rightOffset+4]+ai1 *rightArray[rightOffset+5]+ai2 *rightArray[rightOffset+6]+ai3 *rightArray[rightOffset+7];\n\t\t\toutArray[outOffset+i+8]=ai0 *rightArray[rightOffset+8]+ai1 *rightArray[rightOffset+9]+ai2 *rightArray[rightOffset+10]+ai3 *rightArray[rightOffset+11];\n\t\t\toutArray[outOffset+i+12]=ai0 *rightArray[rightOffset+12]+ai1 *rightArray[rightOffset+13]+ai2 *rightArray[rightOffset+14]+ai3 *rightArray[rightOffset+15];\n\t\t}\n\t}\n\n\tUtils3D.mulMatrixByArrayFast=function(leftArray,leftOffset,rightArray,rightOffset,outArray,outOffset){\n\t\tvar i,ai0,ai1,ai2,ai3;\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=leftArray[leftOffset+i];\n\t\t\tai1=leftArray[leftOffset+i+4];\n\t\t\tai2=leftArray[leftOffset+i+8];\n\t\t\tai3=leftArray[leftOffset+i+12];\n\t\t\toutArray[outOffset+i]=ai0 *rightArray[rightOffset+0]+ai1 *rightArray[rightOffset+1]+ai2 *rightArray[rightOffset+2]+ai3 *rightArray[rightOffset+3];\n\t\t\toutArray[outOffset+i+4]=ai0 *rightArray[rightOffset+4]+ai1 *rightArray[rightOffset+5]+ai2 *rightArray[rightOffset+6]+ai3 *rightArray[rightOffset+7];\n\t\t\toutArray[outOffset+i+8]=ai0 *rightArray[rightOffset+8]+ai1 *rightArray[rightOffset+9]+ai2 *rightArray[rightOffset+10]+ai3 *rightArray[rightOffset+11];\n\t\t\toutArray[outOffset+i+12]=ai0 *rightArray[rightOffset+12]+ai1 *rightArray[rightOffset+13]+ai2 *rightArray[rightOffset+14]+ai3 *rightArray[rightOffset+15];\n\t\t}\n\t}\n\n\tUtils3D.mulMatrixByArrayAndMatrixFast=function(leftArray,leftOffset,rightMatrix,outArray,outOffset){\n\t\tvar i,ai0,ai1,ai2,ai3;\n\t\tvar rightMatrixE=rightMatrix.elements;\n\t\tvar m11=rightMatrixE[0],m12=rightMatrixE[1],m13=rightMatrixE[2],m14=rightMatrixE[3];\n\t\tvar m21=rightMatrixE[4],m22=rightMatrixE[5],m23=rightMatrixE[6],m24=rightMatrixE[7];\n\t\tvar m31=rightMatrixE[8],m32=rightMatrixE[9],m33=rightMatrixE[10],m34=rightMatrixE[11];\n\t\tvar m41=rightMatrixE[12],m42=rightMatrixE[13],m43=rightMatrixE[14],m44=rightMatrixE[15];\n\t\tvar ai0LeftOffset=leftOffset;\n\t\tvar ai1LeftOffset=leftOffset+4;\n\t\tvar ai2LeftOffset=leftOffset+8;\n\t\tvar ai3LeftOffset=leftOffset+12;\n\t\tvar ai0OutOffset=outOffset;\n\t\tvar ai1OutOffset=outOffset+4;\n\t\tvar ai2OutOffset=outOffset+8;\n\t\tvar ai3OutOffset=outOffset+12;\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=leftArray[ai0LeftOffset+i];\n\t\t\tai1=leftArray[ai1LeftOffset+i];\n\t\t\tai2=leftArray[ai2LeftOffset+i];\n\t\t\tai3=leftArray[ai3LeftOffset+i];\n\t\t\toutArray[ai0OutOffset+i]=ai0 *m11+ai1 *m12+ai2 *m13+ai3 *m14;\n\t\t\toutArray[ai1OutOffset+i]=ai0 *m21+ai1 *m22+ai2 *m23+ai3 *m24;\n\t\t\toutArray[ai2OutOffset+i]=ai0 *m31+ai1 *m32+ai2 *m33+ai3 *m34;\n\t\t\toutArray[ai3OutOffset+i]=ai0 *m41+ai1 *m42+ai2 *m43+ai3 *m44;\n\t\t}\n\t}\n\n\tUtils3D.createAffineTransformationArray=function(tX,tY,tZ,rX,rY,rZ,rW,sX,sY,sZ,outArray,outOffset){\n\t\tvar x2=rX+rX,y2=rY+rY,z2=rZ+rZ;\n\t\tvar xx=rX *x2,xy=rX *y2,xz=rX *z2,yy=rY *y2,yz=rY *z2,zz=rZ *z2;\n\t\tvar wx=rW *x2,wy=rW *y2,wz=rW *z2;\n\t\toutArray[outOffset+0]=(1-(yy+zz))*sX;\n\t\toutArray[outOffset+1]=(xy+wz)*sX;\n\t\toutArray[outOffset+2]=(xz-wy)*sX;\n\t\toutArray[outOffset+3]=0;\n\t\toutArray[outOffset+4]=(xy-wz)*sY;\n\t\toutArray[outOffset+5]=(1-(xx+zz))*sY;\n\t\toutArray[outOffset+6]=(yz+wx)*sY;\n\t\toutArray[outOffset+7]=0;\n\t\toutArray[outOffset+8]=(xz+wy)*sZ;\n\t\toutArray[outOffset+9]=(yz-wx)*sZ;\n\t\toutArray[outOffset+10]=(1-(xx+yy))*sZ;\n\t\toutArray[outOffset+11]=0;\n\t\toutArray[outOffset+12]=tX;\n\t\toutArray[outOffset+13]=tY;\n\t\toutArray[outOffset+14]=tZ;\n\t\toutArray[outOffset+15]=1;\n\t}\n\n\tUtils3D.transformVector3ArrayToVector3ArrayCoordinate=function(source,sourceOffset,transform,result,resultOffset){\n\t\tvar vectorElem=Utils3D._tempArray4_0;\n\t\tvar coordinateX=source[sourceOffset+0];\n\t\tvar coordinateY=source[sourceOffset+1];\n\t\tvar coordinateZ=source[sourceOffset+2];\n\t\tvar transformElem=transform.elements;\n\t\tvectorElem[0]=(coordinateX *transformElem[0])+(coordinateY *transformElem[4])+(coordinateZ *transformElem[8])+transformElem[12];\n\t\tvectorElem[1]=(coordinateX *transformElem[1])+(coordinateY *transformElem[5])+(coordinateZ *transformElem[9])+transformElem[13];\n\t\tvectorElem[2]=(coordinateX *transformElem[2])+(coordinateY *transformElem[6])+(coordinateZ *transformElem[10])+transformElem[14];\n\t\tvectorElem[3]=1.0 / ((coordinateX *transformElem[3])+(coordinateY *transformElem[7])+(coordinateZ *transformElem[11])+transformElem[15]);\n\t\tresult[resultOffset+0]=vectorElem[0] *vectorElem[3];\n\t\tresult[resultOffset+1]=vectorElem[1] *vectorElem[3];\n\t\tresult[resultOffset+2]=vectorElem[2] *vectorElem[3];\n\t}\n\n\tUtils3D.transformLightingMapTexcoordByUV0Array=function(source,sourceOffset,lightingMapScaleOffset,result,resultOffset){\n\t\tvar lightingMapScaleOffsetE=lightingMapScaleOffset.elements;\n\t\tresult[resultOffset+0]=source[sourceOffset+0] *lightingMapScaleOffsetE[0]+lightingMapScaleOffsetE[2];\n\t\tresult[resultOffset+1]=(source[sourceOffset+1]-1.0)*lightingMapScaleOffsetE[1]+lightingMapScaleOffsetE[3];\n\t}\n\n\tUtils3D.transformLightingMapTexcoordByUV1Array=function(source,sourceOffset,lightingMapScaleOffset,result,resultOffset){\n\t\tvar lightingMapScaleOffsetE=lightingMapScaleOffset.elements;\n\t\tresult[resultOffset+0]=source[sourceOffset+0] *lightingMapScaleOffsetE[0]+lightingMapScaleOffsetE[2];\n\t\tresult[resultOffset+1]=1.0+source[sourceOffset+1] *lightingMapScaleOffsetE[1]+lightingMapScaleOffsetE[3];\n\t}\n\n\tUtils3D.getURLVerion=function(url){\n\t\tvar index=url.indexOf(\"?\");\n\t\treturn index >=0 ? url.substr(index):null;\n\t}\n\n\tUtils3D._quaternionCreateFromYawPitchRollArray=function(yaw,pitch,roll,out){\n\t\tvar halfRoll=roll *0.5;\n\t\tvar halfPitch=pitch *0.5;\n\t\tvar halfYaw=yaw *0.5;\n\t\tvar sinRoll=Math.sin(halfRoll);\n\t\tvar cosRoll=Math.cos(halfRoll);\n\t\tvar sinPitch=Math.sin(halfPitch);\n\t\tvar cosPitch=Math.cos(halfPitch);\n\t\tvar sinYaw=Math.sin(halfYaw);\n\t\tvar cosYaw=Math.cos(halfYaw);\n\t\tout[0]=(cosYaw *sinPitch *cosRoll)+(sinYaw *cosPitch *sinRoll);\n\t\tout[1]=(sinYaw *cosPitch *cosRoll)-(cosYaw *sinPitch *sinRoll);\n\t\tout[2]=(cosYaw *cosPitch *sinRoll)-(sinYaw *sinPitch *cosRoll);\n\t\tout[3]=(cosYaw *cosPitch *cosRoll)+(sinYaw *sinPitch *sinRoll);\n\t}\n\n\tUtils3D._createAffineTransformationArray=function(trans,rot,scale,outE){\n\t\tvar x=rot[0],y=rot[1],z=rot[2],w=rot[3],x2=x+x,y2=y+y,z2=z+z;\n\t\tvar xx=x *x2,xy=x *y2,xz=x *z2,yy=y *y2,yz=y *z2,zz=z *z2;\n\t\tvar wx=w *x2,wy=w *y2,wz=w *z2,sx=scale[0],sy=scale[1],sz=scale[2];\n\t\toutE[0]=(1-(yy+zz))*sx;\n\t\toutE[1]=(xy+wz)*sx;\n\t\toutE[2]=(xz-wy)*sx;\n\t\toutE[3]=0;\n\t\toutE[4]=(xy-wz)*sy;\n\t\toutE[5]=(1-(xx+zz))*sy;\n\t\toutE[6]=(yz+wx)*sy;\n\t\toutE[7]=0;\n\t\toutE[8]=(xz+wy)*sz;\n\t\toutE[9]=(yz-wx)*sz;\n\t\toutE[10]=(1-(xx+yy))*sz;\n\t\toutE[11]=0;\n\t\toutE[12]=trans[0];\n\t\toutE[13]=trans[1];\n\t\toutE[14]=trans[2];\n\t\toutE[15]=1;\n\t}\n\n\tUtils3D._mulMatrixArray=function(leftMatrixE,rightMatrix,outArray,outOffset){\n\t\tvar i,ai0,ai1,ai2,ai3;\n\t\tvar rightMatrixE=rightMatrix.elements;\n\t\tvar m11=rightMatrixE[0],m12=rightMatrixE[1],m13=rightMatrixE[2],m14=rightMatrixE[3];\n\t\tvar m21=rightMatrixE[4],m22=rightMatrixE[5],m23=rightMatrixE[6],m24=rightMatrixE[7];\n\t\tvar m31=rightMatrixE[8],m32=rightMatrixE[9],m33=rightMatrixE[10],m34=rightMatrixE[11];\n\t\tvar m41=rightMatrixE[12],m42=rightMatrixE[13],m43=rightMatrixE[14],m44=rightMatrixE[15];\n\t\tvar ai0OutOffset=outOffset;\n\t\tvar ai1OutOffset=outOffset+4;\n\t\tvar ai2OutOffset=outOffset+8;\n\t\tvar ai3OutOffset=outOffset+12;\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=leftMatrixE[i];\n\t\t\tai1=leftMatrixE[i+4];\n\t\t\tai2=leftMatrixE[i+8];\n\t\t\tai3=leftMatrixE[i+12];\n\t\t\toutArray[ai0OutOffset+i]=ai0 *m11+ai1 *m12+ai2 *m13+ai3 *m14;\n\t\t\toutArray[ai1OutOffset+i]=ai0 *m21+ai1 *m22+ai2 *m23+ai3 *m24;\n\t\t\toutArray[ai2OutOffset+i]=ai0 *m31+ai1 *m32+ai2 *m33+ai3 *m34;\n\t\t\toutArray[ai3OutOffset+i]=ai0 *m41+ai1 *m42+ai2 *m43+ai3 *m44;\n\t\t}\n\t}\n\n\tUtils3D.getYawPitchRoll=function(quaternion,out){\n\t\tUtils3D.transformQuat(Vector3.ForwardRH,quaternion,Quaternion.TEMPVector31);\n\t\tUtils3D.transformQuat(Vector3.Up,quaternion,Quaternion.TEMPVector32);\n\t\tvar upe=Quaternion.TEMPVector32.elements;\n\t\tUtils3D.angleTo(Vector3.ZERO,Quaternion.TEMPVector31,Quaternion.TEMPVector33);\n\t\tvar anglee=Quaternion.TEMPVector33.elements;\n\t\tif (anglee[0]==Math.PI / 2){\n\t\t\tanglee[1]=Utils3D.arcTanAngle(upe[2],upe[0]);\n\t\t\tanglee[2]=0;\n\t\t\t}else if (anglee[0]==-Math.PI / 2){\n\t\t\tanglee[1]=Utils3D.arcTanAngle(-upe[2],-upe[0]);\n\t\t\tanglee[2]=0;\n\t\t\t}else {\n\t\t\tMatrix4x4.createRotationY(-anglee[1],Quaternion.TEMPMatrix0);\n\t\t\tMatrix4x4.createRotationX(-anglee[0],Quaternion.TEMPMatrix1);\n\t\t\tVector3.transformCoordinate(Quaternion.TEMPVector32,Quaternion.TEMPMatrix0,Quaternion.TEMPVector32);\n\t\t\tVector3.transformCoordinate(Quaternion.TEMPVector32,Quaternion.TEMPMatrix1,Quaternion.TEMPVector32);\n\t\t\tanglee[2]=Utils3D.arcTanAngle(upe[1],-upe[0]);\n\t\t}\n\t\tif (anglee[1] <=-Math.PI)\n\t\t\tanglee[1]=Math.PI;\n\t\tif (anglee[2] <=-Math.PI)\n\t\t\tanglee[2]=Math.PI;\n\t\tif (anglee[1] >=Math.PI && anglee[2] >=Math.PI){\n\t\t\tanglee[1]=0;\n\t\t\tanglee[2]=0;\n\t\t\tanglee[0]=Math.PI-anglee[0];\n\t\t}\n\t\tout[0]=anglee[1];\n\t\tout[1]=anglee[0];\n\t\tout[2]=anglee[2];\n\t}\n\n\tUtils3D.arcTanAngle=function(x,y){\n\t\tif (x==0){\n\t\t\tif (y==1)\n\t\t\t\treturn Math.PI / 2;\n\t\t\treturn-Math.PI / 2;\n\t\t}\n\t\tif (x > 0)\n\t\t\treturn Math.atan(y / x);\n\t\tif (x < 0){\n\t\t\tif (y > 0)\n\t\t\t\treturn Math.atan(y / x)+Math.PI;\n\t\t\treturn Math.atan(y / x)-Math.PI;\n\t\t}\n\t\treturn 0;\n\t}\n\n\tUtils3D.angleTo=function(from,location,angle){\n\t\tVector3.subtract(location,from,Quaternion.TEMPVector30);\n\t\tVector3.normalize(Quaternion.TEMPVector30,Quaternion.TEMPVector30);\n\t\tangle.elements[0]=Math.asin(Quaternion.TEMPVector30.y);\n\t\tangle.elements[1]=Utils3D.arcTanAngle(-Quaternion.TEMPVector30.z,-Quaternion.TEMPVector30.x);\n\t}\n\n\tUtils3D.transformQuat=function(source,rotation,out){\n\t\tvar destination=out.elements;\n\t\tvar se=source.elements;\n\t\tvar re=rotation;\n\t\tvar x=se[0],y=se[1],z=se[2],qx=re[0],qy=re[1],qz=re[2],qw=re[3],\n\t\tix=qw *x+qy *z-qz *y,iy=qw *y+qz *x-qx *z,iz=qw *z+qx *y-qy *x,iw=-qx *x-qy *y-qz *z;\n\t\tdestination[0]=ix *qw+iw *-qx+iy *-qz-iz *-qy;\n\t\tdestination[1]=iy *qw+iw *-qy+iz *-qx-ix *-qz;\n\t\tdestination[2]=iz *qw+iw *-qz+ix *-qy-iy *-qx;\n\t}\n\n\tUtils3D.quaterionNormalize=function(f,e){\n\t\tvar x=f[0],y=f[1],z=f[2],w=f[3];\n\t\tvar len=x *x+y *y+z *z+w *w;\n\t\tif (len > 0){\n\t\t\tlen=1 / Math.sqrt(len);\n\t\t\te[0]=x *len;\n\t\t\te[1]=y *len;\n\t\t\te[2]=z *len;\n\t\t\te[3]=w *len;\n\t\t}\n\t}\n\n\tUtils3D.matrix4x4MultiplyFFF=function(a,b,e){\n\t\tvar i,ai0,ai1,ai2,ai3;\n\t\tif (e===b){\n\t\t\tb=new Float32Array(16);\n\t\t\tfor (i=0;i < 16;++i){\n\t\t\t\tb[i]=e[i];\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < 4;i++){\n\t\t\tai0=a[i];\n\t\t\tai1=a[i+4];\n\t\t\tai2=a[i+8];\n\t\t\tai3=a[i+12];\n\t\t\te[i]=ai0 *b[0]+ai1 *b[1]+ai2 *b[2]+ai3 *b[3];\n\t\t\te[i+4]=ai0 *b[4]+ai1 *b[5]+ai2 *b[6]+ai3 *b[7];\n\t\t\te[i+8]=ai0 *b[8]+ai1 *b[9]+ai2 *b[10]+ai3 *b[11];\n\t\t\te[i+12]=ai0 *b[12]+ai1 *b[13]+ai2 *b[14]+ai3 *b[15];\n\t\t}\n\t}\n\n\tUtils3D.matrix4x4MultiplyMFM=function(left,right,out){\n\t\tUtils3D.matrix4x4MultiplyFFF(left.elements,right,out.elements);\n\t}\n\n\t__static(Utils3D,\n\t['_typeToFunO',function(){return this._typeToFunO={\"INT16\":\"writeInt16\",\"SHORT\":\"writeInt16\",\"UINT16\":\"writeUint16\",\"UINT32\":\"writeUint32\",\"FLOAT32\":\"writeFloat32\",\"INT\":\"writeInt32\",\"UINT\":\"writeUint32\",\"BYTE\":\"writeByte\",\"STRING\":\"writeUTFString\"};},'_tempVector3_0',function(){return this._tempVector3_0=new Vector3();},'_tempVector3_1',function(){return this._tempVector3_1=new Vector3();},'_tempVector3_2',function(){return this._tempVector3_2=new Vector3();},'_tempVector3_3',function(){return this._tempVector3_3=new Vector3();},'_tempVector3_4',function(){return this._tempVector3_4=new Vector3();},'_tempVector3_5',function(){return this._tempVector3_5=new Vector3();},'_tempVector3_6',function(){return this._tempVector3_6=new Vector3();},'_tempArray4_0',function(){return this._tempArray4_0=new Float32Array(4);},'_tempArray16_0',function(){return this._tempArray16_0=new Float32Array(16);},'_tempArray16_1',function(){return this._tempArray16_1=new Float32Array(16);},'_tempArray16_2',function(){return this._tempArray16_2=new Float32Array(16);},'_tempArray16_3',function(){return this._tempArray16_3=new Float32Array(16);}\n\t]);\n\treturn Utils3D;\n})()\n\n\n/**\n*<code>Laya3D</code> 类用于初始化3D设置。\n*/\n//class Laya3D\nvar Laya3D=(function(){\n\t/**\n\t*创建一个 <code>Laya3D</code> 实例。\n\t*/\n\tfunction Laya3D(){}\n\t__class(Laya3D,'Laya3D');\n\tLaya3D._cancelLoadByUrl=function(url){\n\t\tLaya.loader.cancelLoadByUrl(url);\n\t\tLaya3D._innerFirstLevelLoaderManager.cancelLoadByUrl(url);\n\t\tLaya3D._innerSecondLevelLoaderManager.cancelLoadByUrl(url);\n\t\tLaya3D._innerThirdLevelLoaderManager.cancelLoadByUrl(url);\n\t\tLaya3D._innerFourthLevelLoaderManager.cancelLoadByUrl(url);\n\t}\n\n\tLaya3D._changeWebGLSize=function(width,height){\n\t\tWebGL.onStageResize(width,height);\n\t\tRenderState.clientWidth=width;\n\t\tRenderState.clientHeight=height;\n\t}\n\n\tLaya3D.__init__=function(){\n\t\tvar createMap=LoaderManager.createMap;\n\t\tcreateMap[\"lh\"]=[Sprite3D,/*CLASS CONST:Laya3D.HIERARCHY*/\"SPRITE3DHIERARCHY\"];\n\t\tcreateMap[\"ls\"]=[Scene,/*CLASS CONST:Laya3D.HIERARCHY*/\"SPRITE3DHIERARCHY\"];\n\t\tcreateMap[\"lm\"]=[Mesh,/*CLASS CONST:Laya3D.MESH*/\"MESH\"];\n\t\tcreateMap[\"lmat\"]=[StandardMaterial,/*CLASS CONST:Laya3D.MATERIAL*/\"MATERIAL\"];\n\t\tcreateMap[\"lpbr\"]=[PBRMaterial,/*CLASS CONST:Laya3D.MATERIAL*/\"MATERIAL\"];\n\t\tcreateMap[\"ltc\"]=[TextureCube,/*CLASS CONST:Laya3D.TEXTURECUBE*/\"TEXTURECUBE\"];\n\t\tcreateMap[\"jpg\"]=[Texture2D,\"nativeimage\"];\n\t\tcreateMap[\"jpeg\"]=[Texture2D,\"nativeimage\"];\n\t\tcreateMap[\"png\"]=[Texture2D,\"nativeimage\"];\n\t\tcreateMap[\"pkm\"]=[Texture2D,/*laya.net.Loader.BUFFER*/\"arraybuffer\"];\n\t\tcreateMap[\"lsani\"]=[AnimationTemplet,/*laya.net.Loader.BUFFER*/\"arraybuffer\"];\n\t\tcreateMap[\"lrani\"]=[AnimationTemplet,/*laya.net.Loader.BUFFER*/\"arraybuffer\"];\n\t\tcreateMap[\"raw\"]=[DataTexture2D,/*laya.net.Loader.BUFFER*/\"arraybuffer\"];\n\t\tcreateMap[\"mipmaps\"]=[DataTexture2D,/*laya.net.Loader.BUFFER*/\"arraybuffer\"];\n\t\tcreateMap[\"thdata\"]=[TerrainHeightData,/*laya.net.Loader.BUFFER*/\"arraybuffer\"];\n\t\tcreateMap[\"lt\"]=[TerrainRes,/*CLASS CONST:Laya3D.TERRAIN*/\"TERRAIN\"];\n\t\tcreateMap[\"lani\"]=[AnimationClip,/*laya.net.Loader.BUFFER*/\"arraybuffer\"];\n\t\tcreateMap[\"lav\"]=[Avatar,/*laya.net.Loader.JSON*/\"json\"];\n\t\tcreateMap[\"ani\"]=[AnimationTemplet,/*laya.net.Loader.BUFFER*/\"arraybuffer\"];\n\t\tLoader.parserMap[ /*CLASS CONST:Laya3D.HIERARCHY*/\"SPRITE3DHIERARCHY\"]=Laya3D._loadHierarchy;\n\t\tLoader.parserMap[ /*CLASS CONST:Laya3D.MESH*/\"MESH\"]=Laya3D._loadMesh;\n\t\tLoader.parserMap[ /*CLASS CONST:Laya3D.MATERIAL*/\"MATERIAL\"]=Laya3D._loadMaterial;\n\t\tLoader.parserMap[ /*CLASS CONST:Laya3D.TEXTURECUBE*/\"TEXTURECUBE\"]=Laya3D._loadTextureCube;\n\t\tLoader.parserMap[ /*CLASS CONST:Laya3D.TERRAIN*/\"TERRAIN\"]=Laya3D._loadTerrain;\n\t\tLaya3D._innerFirstLevelLoaderManager.on(/*laya.events.Event.ERROR*/\"error\",null,Laya3D._eventLoadManagerError);\n\t\tLaya3D._innerSecondLevelLoaderManager.on(/*laya.events.Event.ERROR*/\"error\",null,Laya3D._eventLoadManagerError);\n\t\tLaya3D._innerThirdLevelLoaderManager.on(/*laya.events.Event.ERROR*/\"error\",null,Laya3D._eventLoadManagerError);\n\t\tLaya3D._innerFourthLevelLoaderManager.on(/*laya.events.Event.ERROR*/\"error\",null,Laya3D._eventLoadManagerError);\n\t}\n\n\tLaya3D.READ_BLOCK=function(){\n\t\tLaya3D._readData.pos+=4;\n\t\treturn true;\n\t}\n\n\tLaya3D.READ_DATA=function(){\n\t\tLaya3D._DATA.offset=Laya3D._readData.getUint32();\n\t\tLaya3D._DATA.size=Laya3D._readData.getUint32();\n\t\treturn true;\n\t}\n\n\tLaya3D.READ_STRINGS=function(){\n\t\tvar materialUrls=[];\n\t\tvar _STRINGS={offset:0,size:0};\n\t\t_STRINGS.offset=Laya3D._readData.getUint16();\n\t\t_STRINGS.size=Laya3D._readData.getUint16();\n\t\tvar ofs=Laya3D._readData.pos;\n\t\tLaya3D._readData.pos=_STRINGS.offset+Laya3D._DATA.offset;\n\t\tfor (var i=0;i < _STRINGS.size;i++){\n\t\t\tvar string=Laya3D._readData.readUTFString();\n\t\t\tif (string.lastIndexOf(\".lmat\")!==-1 || string.lastIndexOf(\".lpbr\")!==-1)\n\t\t\t\tmaterialUrls.push(string);\n\t\t}\n\t\treturn materialUrls;\n\t}\n\n\tLaya3D.formatRelativePath=function(base,value){\n\t\tvar path;\n\t\tvar char1=value.charAt(0);\n\t\tif (char1===\".\"){\n\t\t\tvar parts=(base+value).split(\"/\");\n\t\t\tfor (var i=0,len=parts.length;i < len;i++){\n\t\t\t\tif (parts[i]=='..'){\n\t\t\t\t\tvar index=i-1;\n\t\t\t\t\tif (index > 0 && parts[index]!=='..'){\n\t\t\t\t\t\tparts.splice(index,2);\n\t\t\t\t\t\ti-=2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpath=parts.join('/');\n\t\t\t}else {\n\t\t\tpath=base+value;\n\t\t}\n\t\t(URL.customFormat !=null)&&(path=URL.customFormat(path,null));\n\t\treturn path;\n\t}\n\n\tLaya3D._eventLoadManagerError=function(msg){\n\t\tLaya.loader.event(/*laya.events.Event.ERROR*/\"error\",msg);\n\t}\n\n\tLaya3D._addHierarchyInnerUrls=function(urls,urlMap,urlVersion,hierarchyBasePath,path,clas){\n\t\tvar formatSubUrl=Laya3D.formatRelativePath(hierarchyBasePath,path);\n\t\t(urlVersion)&& (formatSubUrl=formatSubUrl+urlVersion);\n\t\turls.push({url:formatSubUrl,clas:clas});\n\t\turlMap[path]=formatSubUrl;\n\t}\n\n\tLaya3D._getSprite3DHierarchyInnerUrls=function(node,firstLevelUrls,secondLevelUrls,fourthLelUrls,urlMap,urlVersion,hierarchyBasePath){\n\t\tvar i=0,n=0;\n\t\tvar customProps;\n\t\tswitch (node.type){\n\t\t\tcase \"Scene\":;\n\t\t\t\tvar lightmaps=node.customProps.lightmaps;\n\t\t\t\tfor (i=0,n=lightmaps.length;i < n;i++){\n\t\t\t\t\tvar lightMap=lightmaps[i].replace(\".exr\",\".png\");\n\t\t\t\t\tLaya3D._addHierarchyInnerUrls(fourthLelUrls,urlMap,urlVersion,hierarchyBasePath,lightMap,Texture2D);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase \"MeshSprite3D\":\n\t\t\tcase \"TrailSprite3D\":\n\t\t\tcase \"LineSprite3D\":\n\t\t\tcase \"SkinnedMeshSprite3D\":;\n\t\t\t\tvar meshPath;\n\t\t\t\tif (node.instanceParams){\n\t\t\t\t\tmeshPath=node.instanceParams.loadPath;\n\t\t\t\t\t(meshPath)&& (Laya3D._addHierarchyInnerUrls(firstLevelUrls,urlMap,urlVersion,hierarchyBasePath,meshPath,Mesh));\n\t\t\t\t\t}else {\n\t\t\t\t\tcustomProps=node.customProps;\n\t\t\t\t\tmeshPath=customProps.meshPath;\n\t\t\t\t\t(meshPath)&& (Laya3D._addHierarchyInnerUrls(firstLevelUrls,urlMap,urlVersion,hierarchyBasePath,meshPath,Mesh));\n\t\t\t\t\tvar materials=customProps.materials;\n\t\t\t\t\tif (materials)\n\t\t\t\t\t\tfor (i=0,n=materials.length;i < n;i++){\n\t\t\t\t\t\tvar mat=materials[i];\n\t\t\t\t\t\tvar clasPaths=mat.type.split('.');\n\t\t\t\t\t\tvar clas=Browser.window;\n\t\t\t\t\t\tclasPaths.forEach(function(cls){\n\t\t\t\t\t\t\tclas=clas[cls];\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (typeof(clas)=='function')Laya3D._addHierarchyInnerUrls(secondLevelUrls,urlMap,urlVersion,hierarchyBasePath,mat.path,clas);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthrow('_getSprite3DHierarchyInnerUrls 错误: '+mat.type+' 不是类');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase \"ShuriKenParticle3D\":\n\t\t\t\tcustomProps=node.customProps;\n\t\t\t\tvar parMeshPath=customProps.meshPath;\n\t\t\t\t(parMeshPath)&& (Laya3D._addHierarchyInnerUrls(firstLevelUrls,urlMap,urlVersion,hierarchyBasePath,parMeshPath,Mesh));\n\t\t\t\tvar materialData=customProps.material;\n\t\t\t\tif (materialData){\n\t\t\t\t\tclasPaths=materialData.type.split('.');\n\t\t\t\t\tclas=Browser.window;\n\t\t\t\t\tclasPaths.forEach(function(cls){\n\t\t\t\t\t\tclas=clas[cls];\n\t\t\t\t\t});\n\t\t\t\t\tLaya3D._addHierarchyInnerUrls(secondLevelUrls,urlMap,urlVersion,hierarchyBasePath,materialData.path,clas);\n\t\t\t\t\t}else {\n\t\t\t\t\tvar materialPath=customProps.materialPath;\n\t\t\t\t\tif (materialPath){\n\t\t\t\t\t\tLaya3D._addHierarchyInnerUrls(secondLevelUrls,urlMap,urlVersion,hierarchyBasePath,materialPath,ShurikenParticleMaterial);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvar texturePath=customProps.texturePath;\n\t\t\t\t\t\tif (texturePath)\n\t\t\t\t\t\t\tLaya3D._addHierarchyInnerUrls(fourthLelUrls,urlMap,urlVersion,hierarchyBasePath,texturePath,Texture2D);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase \"Terrain\":\n\t\t\t\tLaya3D._addHierarchyInnerUrls(fourthLelUrls,urlMap,urlVersion,hierarchyBasePath,node.customProps.dataPath,TerrainRes);\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar components=node.components;\n\t\tfor (var k in components){\n\t\t\tvar component=components[k];\n\t\t\tswitch (k){\n\t\t\t\tcase \"Animator\":;\n\t\t\t\t\tvar avatarPath=component.avatarPath;\n\t\t\t\t\tif (avatarPath){\n\t\t\t\t\t\tLaya3D._addHierarchyInnerUrls(fourthLelUrls,urlMap,urlVersion,hierarchyBasePath,avatarPath,Avatar);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvar avatarData=component.avatar;\n\t\t\t\t\t\t(avatarData)&& (Laya3D._addHierarchyInnerUrls(fourthLelUrls,urlMap,urlVersion,hierarchyBasePath,avatarData.path,Avatar));\n\t\t\t\t\t};\n\t\t\t\t\tvar clipPaths=component.clipPaths;\n\t\t\t\t\tfor (i=0,n=clipPaths.length;i < n;i++)\n\t\t\t\t\tLaya3D._addHierarchyInnerUrls(fourthLelUrls,urlMap,urlVersion,hierarchyBasePath,clipPaths[i],AnimationClip);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t};\n\t\tvar children=node.child;\n\t\tfor (i=0,n=children.length;i < n;i++)\n\t\tLaya3D._getSprite3DHierarchyInnerUrls(children[i],firstLevelUrls,secondLevelUrls,fourthLelUrls,urlMap,urlVersion,hierarchyBasePath);\n\t}\n\n\tLaya3D._loadHierarchy=function(loader){\n\t\tloader.on(/*laya.events.Event.LOADED*/\"loaded\",null,Laya3D._onHierarchylhLoaded,[loader,loader._class._getGroup()]);\n\t\tloader.load(loader.url,/*laya.net.Loader.JSON*/\"json\",false,null,true);\n\t}\n\n\tLaya3D._onHierarchylhLoaded=function(loader,group,lhData){\n\t\tif (loader._class.destroyed){\n\t\t\tloader.endLoad();\n\t\t\t}else {\n\t\t\tvar url=loader.url;\n\t\t\tvar urlVersion=Utils3D.getURLVerion(url);\n\t\t\tvar hierarchyBasePath=URL.getPath(url);\n\t\t\tvar firstLevUrls=[];\n\t\t\tvar secondLevUrls=[];\n\t\t\tvar forthLevUrls=[];\n\t\t\tvar urlMap={};\n\t\t\tLaya3D._getSprite3DHierarchyInnerUrls(lhData,firstLevUrls,secondLevUrls,forthLevUrls,urlMap,urlVersion,hierarchyBasePath);\n\t\t\tvar urlCount=firstLevUrls.length+secondLevUrls.length+forthLevUrls.length;\n\t\t\tvar totalProcessCount=urlCount+1;\n\t\t\tvar weight=1 / totalProcessCount;\n\t\t\tLaya3D._onProcessChange(loader,0,weight,1.0);\n\t\t\tif (forthLevUrls.length > 0){\n\t\t\t\tvar processCeil=urlCount / totalProcessCount;\n\t\t\t\tvar processHandler=Handler.create(null,Laya3D._onProcessChange,[loader,weight,processCeil],false);\n\t\t\t\tLaya3D._innerFourthLevelLoaderManager.create(forthLevUrls,Handler.create(null,Laya3D._onHierarchyInnerForthLevResouLoaded,[loader,group,processHandler,lhData,urlMap,firstLevUrls,secondLevUrls,weight+processCeil *forthLevUrls.length,processCeil]),processHandler,null,null,1,true,group);\n\t\t\t\t}else {\n\t\t\t\tLaya3D._onHierarchyInnerForthLevResouLoaded(loader,group,null,lhData,urlMap,firstLevUrls,secondLevUrls,weight,processCeil);\n\t\t\t}\n\t\t}\n\t}\n\n\tLaya3D._onHierarchyInnerForthLevResouLoaded=function(loader,group,processHandler,lhData,urlMap,firstLevUrls,secondLevUrls,processOffset,processCeil){\n\t\tif (loader._class.destroyed){\n\t\t\tloader.endLoad();\n\t\t\t}else {\n\t\t\t(processHandler)&& (processHandler.recover());\n\t\t\tif (secondLevUrls.length > 0){\n\t\t\t\tvar process=Handler.create(null,Laya3D._onProcessChange,[loader,processOffset,processCeil],false);\n\t\t\t\tLaya3D._innerSecondLevelLoaderManager.create(secondLevUrls,Handler.create(null,Laya3D._onHierarchyInnerSecondLevResouLoaded,[loader,group,process,lhData,urlMap,firstLevUrls,processOffset+processCeil *secondLevUrls.length,processCeil]),processHandler,null,null,1,true,group);\n\t\t\t\t}else {\n\t\t\t\tLaya3D._onHierarchyInnerSecondLevResouLoaded(loader,group,null,lhData,urlMap,firstLevUrls,processOffset,processCeil);\n\t\t\t}\n\t\t}\n\t}\n\n\tLaya3D._onHierarchyInnerSecondLevResouLoaded=function(loader,group,processHandler,lhData,urlMap,firstLevUrls,processOffset,processCeil){\n\t\tif (loader._class.destroyed){\n\t\t\tloader.endLoad();\n\t\t\t}else {\n\t\t\t(processHandler)&& (processHandler.recover());\n\t\t\tif (firstLevUrls.length > 0){\n\t\t\t\tvar process=Handler.create(null,Laya3D._onProcessChange,[loader,processOffset,processCeil],false);\n\t\t\t\tLaya3D._innerFirstLevelLoaderManager.create(firstLevUrls,Handler.create(null,Laya3D._onHierarchyInnerFirstLevResouLoaded,[loader,process,lhData,urlMap,]),processHandler,null,null,1,true,group);\n\t\t\t\t}else {\n\t\t\t\tLaya3D._onHierarchyInnerFirstLevResouLoaded(loader,null,lhData,urlMap);\n\t\t\t}\n\t\t}\n\t}\n\n\tLaya3D._onHierarchyInnerFirstLevResouLoaded=function(loader,processHandler,lhData,urlMap){\n\t\t(processHandler)&& (processHandler.recover());\n\t\tloader.endLoad([lhData,urlMap]);\n\t}\n\n\tLaya3D._loadTerrain=function(loader){\n\t\tloader.on(/*laya.events.Event.LOADED*/\"loaded\",null,Laya3D._onTerrainLtLoaded,[loader,loader._class._getGroup()]);\n\t\tloader.load(loader.url,/*laya.net.Loader.JSON*/\"json\",false,null,true);\n\t}\n\n\tLaya3D._onTerrainLtLoaded=function(loader,group,ltData){\n\t\tif (loader._class.destroyed){\n\t\t\tloader.endLoad();\n\t\t\t}else {\n\t\t\tvar url=loader.url;\n\t\t\tvar urlVersion=Utils3D.getURLVerion(url);\n\t\t\tvar terrainBasePath=URL.getPath(url);\n\t\t\tvar heightMapURL,textureURLs=[];\n\t\t\tvar urlMap={};\n\t\t\tvar formatUrl;\n\t\t\tvar i=0,n=0,count=0;\n\t\t\tvar heightData=ltData.heightData;\n\t\t\theightMapURL=heightData.url;\n\t\t\tformatUrl=Laya3D.formatRelativePath(terrainBasePath,heightMapURL);\n\t\t\t(urlVersion)&& (formatUrl=formatUrl+urlVersion);\n\t\t\turlMap[heightMapURL]=formatUrl;\n\t\t\theightMapURL=formatUrl;\n\t\t\tvar detailTextures=ltData.detailTexture;\n\t\t\tfor (i=0,n=detailTextures.length;i < n;i++)\n\t\t\ttextureURLs.push({url:detailTextures[i].diffuse});\n\t\t\tvar normalMaps=ltData.normalMap;\n\t\t\tfor (i=0,n=normalMaps.length;i < n;i++)\n\t\t\ttextureURLs.push({url:normalMaps[i]});\n\t\t\tvar alphaMaps=ltData.alphaMap;\n\t\t\tfor (i=0,n=alphaMaps.length;i < n;i++)\n\t\t\ttextureURLs.push({url:alphaMaps[i],params:[false,false,/*laya.webgl.WebGLContext.RGBA*/0x1908,true]});\n\t\t\tfor (i=0,n=textureURLs.length;i < n;i++){\n\t\t\t\tvar subUrl=textureURLs[i].url;\n\t\t\t\tformatUrl=Laya3D.formatRelativePath(terrainBasePath,subUrl);\n\t\t\t\t(urlVersion)&& (formatUrl=formatUrl+urlVersion);\n\t\t\t\ttextureURLs[i].url=formatUrl;\n\t\t\t\turlMap[subUrl]=formatUrl;\n\t\t\t};\n\t\t\tvar texsUrlCount=textureURLs.length;\n\t\t\tvar totalProcessCount=texsUrlCount+2;\n\t\t\tvar weight=1 / totalProcessCount;\n\t\t\tLaya3D._onProcessChange(loader,0,weight,1.0);\n\t\t\tvar loadInfo={heightMapLoaded:false,texturesLoaded:false};\n\t\t\tvar hmProcessHandler=Handler.create(null,Laya3D._onProcessChange,[loader,weight,weight],false);\n\t\t\tLaya3D._innerFourthLevelLoaderManager.create(heightMapURL,Handler.create(null,Laya3D._onTerrainHeightMapLoaded,[loader,hmProcessHandler,ltData,urlMap,loadInfo]),hmProcessHandler,null,[heightData.numX,heightData.numZ,heightData.bitType,heightData.value],1,true,group);\n\t\t\tvar texsProcessHandler=Handler.create(null,Laya3D._onProcessChange,[loader,weight *2,texsUrlCount / totalProcessCount],false);\n\t\t\tLaya3D._innerFourthLevelLoaderManager.create(textureURLs,Handler.create(null,Laya3D._onTerrainTexturesLoaded,[loader,texsProcessHandler,ltData,urlMap,loadInfo]),texsProcessHandler,null,null,1,true,group);\n\t\t}\n\t}\n\n\tLaya3D._onTerrainHeightMapLoaded=function(loader,processHandler,ltData,urlMap,loadInfo){\n\t\tloadInfo.heightMapLoaded=true;\n\t\tif (loadInfo.texturesLoaded){\n\t\t\tloader.endLoad([ltData,urlMap]);\n\t\t\tprocessHandler.recover();\n\t\t}\n\t}\n\n\tLaya3D._onTerrainTexturesLoaded=function(loader,processHandler,ltData,urlMap,loadInfo){\n\t\tloadInfo.texturesLoaded=true;\n\t\tif (loadInfo.heightMapLoaded){\n\t\t\tloader.endLoad([ltData,urlMap]);\n\t\t\tprocessHandler.recover();\n\t\t}\n\t}\n\n\tLaya3D._loadMesh=function(loader){\n\t\tloader.on(/*laya.events.Event.LOADED*/\"loaded\",null,Laya3D._onMeshLmLoaded,[loader,loader._class._getGroup()]);\n\t\tloader.load(loader.url,/*laya.net.Loader.BUFFER*/\"arraybuffer\",false,null,true);\n\t}\n\n\tLaya3D._onMeshLmLoaded=function(loader,group,lmData){\n\t\tif (loader._class.destroyed){\n\t\t\tloader.endLoad();\n\t\t\t}else {\n\t\t\tvar url=loader.url;\n\t\t\tvar urlVersion=Utils3D.getURLVerion(url);\n\t\t\tvar meshBasePath=URL.getPath(url);\n\t\t\tvar urls;\n\t\t\tvar urlMap={};\n\t\t\tvar formatSubUrl;\n\t\t\tvar i=0,n=0,count=0;\n\t\t\tLaya3D._readData=new Byte(lmData);\n\t\t\tLaya3D._readData.pos=0;\n\t\t\tvar version=Laya3D._readData.readUTFString();\n\t\t\tswitch (version){\n\t\t\t\tcase \"LAYAMODEL:02\":\n\t\t\t\tcase \"LAYAMODEL:03\":\n\t\t\t\tcase \"LAYAMODEL:0301\":;\n\t\t\t\t\tvar dataOffset=Laya3D._readData.getUint32();\n\t\t\t\t\tLaya3D._readData.pos=Laya3D._readData.pos+4;\n\t\t\t\t\tcount=Laya3D._readData.getUint16();\n\t\t\t\t\tLaya3D._readData.pos=Laya3D._readData.pos+count *8;\n\t\t\t\t\tvar offset=Laya3D._readData.getUint32();\n\t\t\t\t\tcount=Laya3D._readData.getUint16();\n\t\t\t\t\tLaya3D._readData.pos=dataOffset+offset;\n\t\t\t\t\turls=[];\n\t\t\t\t\tfor (i=0;i < count;i++){\n\t\t\t\t\t\tvar string=Laya3D._readData.readUTFString();\n\t\t\t\t\t\tif (string.lastIndexOf(\".lmat\")!==-1)\n\t\t\t\t\t\t\turls.push(string);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tLaya3D.READ_BLOCK();\n\t\t\t\t\tfor (i=0;i < 2;i++){\n\t\t\t\t\t\tvar index=Laya3D._readData.getUint16();\n\t\t\t\t\t\tvar blockName=Laya3D._strings[index];\n\t\t\t\t\t\tvar fn=Laya3D[\"READ_\"+blockName];\n\t\t\t\t\t\tif (fn==null)throw new Error(\"model file err,no this function:\"+index+\" \"+blockName);\n\t\t\t\t\t\tif (i===1)\n\t\t\t\t\t\t\turls=fn.call();\n\t\t\t\t\t\telse\n\t\t\t\t\t\tfn.call()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tfor (i=0,n=urls.length;i < n;i++){\n\t\t\t\tvar subUrl=urls[i];\n\t\t\t\tformatSubUrl=Laya3D.formatRelativePath(meshBasePath,subUrl);\n\t\t\t\t(urlVersion)&& (formatSubUrl=formatSubUrl+urlVersion);\n\t\t\t\turls[i]=formatSubUrl;\n\t\t\t\turlMap[subUrl]=formatSubUrl;\n\t\t\t}\n\t\t\tif (urls.length > 0){\n\t\t\t\tvar urlCount=1;\n\t\t\t\tvar totalProcessCount=urlCount+1;\n\t\t\t\tvar lmatWeight=1 / totalProcessCount;\n\t\t\t\tLaya3D._onProcessChange(loader,0,lmatWeight,1.0);\n\t\t\t\tvar processHandler=Handler.create(null,Laya3D._onProcessChange,[loader,lmatWeight,urlCount / totalProcessCount],false);\n\t\t\t\tLaya3D._innerSecondLevelLoaderManager.create(urls,Handler.create(null,Laya3D._onMeshMateialLoaded,[loader,processHandler,lmData,urlMap]),processHandler,null,null,1,true,group);\n\t\t\t\t}else {\n\t\t\t\tloader.endLoad([lmData,urlMap]);\n\t\t\t}\n\t\t}\n\t}\n\n\tLaya3D._onMeshMateialLoaded=function(loader,processHandler,lmData,urlMap){\n\t\tloader.endLoad([lmData,urlMap]);\n\t\tprocessHandler.recover();\n\t}\n\n\tLaya3D._getMaterialTexturePath=function(path,urlVersion,materialBath){\n\t\tvar extenIndex=path.length-4;\n\t\tif (path.indexOf(\".dds\")==extenIndex || path.indexOf(\".tga\")==extenIndex || path.indexOf(\".exr\")==extenIndex || path.indexOf(\".DDS\")==extenIndex || path.indexOf(\".TGA\")==extenIndex || path.indexOf(\".EXR\")==extenIndex)\n\t\t\tpath=path.substr(0,extenIndex)+\".png\";\n\t\tpath=Laya3D.formatRelativePath(materialBath,path);\n\t\t(urlVersion)&& (path=path+urlVersion);\n\t\treturn path;\n\t}\n\n\tLaya3D._loadMaterial=function(loader){\n\t\tloader.on(/*laya.events.Event.LOADED*/\"loaded\",null,Laya3D._onMaterilLmatLoaded,[loader,loader._class._getGroup()]);\n\t\tloader.load(loader.url,/*laya.net.Loader.JSON*/\"json\",false,null,true);\n\t}\n\n\tLaya3D._onMaterilLmatLoaded=function(loader,group,lmatData){\n\t\tif (loader._class.destroyed){\n\t\t\tloader.endLoad();\n\t\t\t}else {\n\t\t\tvar url=loader.url;\n\t\t\tvar urlVersion=Utils3D.getURLVerion(url);\n\t\t\tvar materialBasePath=URL.getPath(url);\n\t\t\tvar urls=[];\n\t\t\tvar urlMap={};\n\t\t\tvar customProps=lmatData.customProps;\n\t\t\tvar formatSubUrl;\n\t\t\tvar version=lmatData.version;\n\t\t\tif (version){\n\t\t\t\tswitch (version){\n\t\t\t\t\tcase \"LAYAMATERIAL:01\":\n\t\t\t\t\tcase \"LAYAMATERIAL:02\":;\n\t\t\t\t\t\tvar textures=lmatData.props.textures;\n\t\t\t\t\t\tfor (var i=0,n=textures.length;i < n;i++){\n\t\t\t\t\t\t\tvar tex=textures[i];\n\t\t\t\t\t\t\tvar path=tex.path;\n\t\t\t\t\t\t\tif (path){\n\t\t\t\t\t\t\t\tvar extenIndex=path.length-4;\n\t\t\t\t\t\t\t\tif (path.indexOf(\".exr\")==extenIndex || path.indexOf(\".EXR\")==extenIndex)\n\t\t\t\t\t\t\t\t\tpath=path.substr(0,extenIndex)+\".png\";\n\t\t\t\t\t\t\t\tformatSubUrl=Laya3D.formatRelativePath(materialBasePath,path);\n\t\t\t\t\t\t\t\t(urlVersion)&& (formatSubUrl=formatSubUrl+urlVersion);\n\t\t\t\t\t\t\t\turls.push({url:formatSubUrl,params:tex.params});\n\t\t\t\t\t\t\t\turlMap[path]=formatSubUrl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\tthrow new Error(\"Laya3D:unkonwn version.\");\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar diffuseTexture=customProps.diffuseTexture.texture2D;\n\t\t\t\tif (diffuseTexture){\n\t\t\t\t\tformatSubUrl=Laya3D._getMaterialTexturePath(diffuseTexture,urlVersion,materialBasePath);\n\t\t\t\t\turls.push(formatSubUrl);\n\t\t\t\t\turlMap[diffuseTexture]=formatSubUrl;\n\t\t\t\t}\n\t\t\t\tif (customProps.normalTexture){\n\t\t\t\t\tvar normalTexture=customProps.normalTexture.texture2D;\n\t\t\t\t\tif (normalTexture){\n\t\t\t\t\t\tformatSubUrl=Laya3D._getMaterialTexturePath(normalTexture,urlVersion,materialBasePath);\n\t\t\t\t\t\turls.push(formatSubUrl);\n\t\t\t\t\t\turlMap[normalTexture]=formatSubUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (customProps.specularTexture){\n\t\t\t\t\tvar specularTexture=customProps.specularTexture.texture2D;\n\t\t\t\t\tif (specularTexture){\n\t\t\t\t\t\tformatSubUrl=Laya3D._getMaterialTexturePath(specularTexture,urlVersion,materialBasePath);\n\t\t\t\t\t\turls.push(formatSubUrl);\n\t\t\t\t\t\turlMap[specularTexture]=formatSubUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (customProps.emissiveTexture){\n\t\t\t\t\tvar emissiveTexture=customProps.emissiveTexture.texture2D;\n\t\t\t\t\tif (emissiveTexture){\n\t\t\t\t\t\tformatSubUrl=Laya3D._getMaterialTexturePath(emissiveTexture,urlVersion,materialBasePath);\n\t\t\t\t\t\turls.push(formatSubUrl);\n\t\t\t\t\t\turlMap[emissiveTexture]=formatSubUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (customProps.ambientTexture){\n\t\t\t\t\tvar ambientTexture=customProps.ambientTexture.texture2D;\n\t\t\t\t\tif (ambientTexture){\n\t\t\t\t\t\tformatSubUrl=Laya3D._getMaterialTexturePath(ambientTexture,urlVersion,materialBasePath);\n\t\t\t\t\t\turls.push(formatSubUrl);\n\t\t\t\t\t\turlMap[ambientTexture]=formatSubUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (customProps.reflectTexture){\n\t\t\t\t\tvar reflectTexture=customProps.reflectTexture.texture2D;\n\t\t\t\t\tif (reflectTexture){\n\t\t\t\t\t\tformatSubUrl=Laya3D._getMaterialTexturePath(reflectTexture,urlVersion,materialBasePath);\n\t\t\t\t\t\turls.push(formatSubUrl);\n\t\t\t\t\t\turlMap[reflectTexture]=formatSubUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tvar urlCount=urls.length;\n\t\t\tvar totalProcessCount=urlCount+1;\n\t\t\tvar lmatWeight=1 / totalProcessCount;\n\t\t\tLaya3D._onProcessChange(loader,0,lmatWeight,1.0);\n\t\t\tif (urlCount > 0){\n\t\t\t\tvar processHandler=Handler.create(null,Laya3D._onProcessChange,[loader,lmatWeight,urlCount / totalProcessCount],false);\n\t\t\t\tLaya3D._innerFourthLevelLoaderManager.create(urls,Handler.create(null,Laya3D._onMateialTexturesLoaded,[loader,processHandler,lmatData,urlMap]),processHandler,Texture2D,null,1,true,group);\n\t\t\t\t}else {\n\t\t\t\tLaya3D._onMateialTexturesLoaded(loader,null,lmatData,null);\n\t\t\t}\n\t\t}\n\t}\n\n\tLaya3D._onMateialTexturesLoaded=function(loader,processHandler,lmatData,urlMap){\n\t\tloader.endLoad([lmatData,urlMap]);\n\t\t(processHandler)&& (processHandler.recover());\n\t}\n\n\tLaya3D._loadTextureCube=function(loader){\n\t\tloader.on(/*laya.events.Event.LOADED*/\"loaded\",null,Laya3D._onTextureCubeLtcLoaded,[loader]);\n\t\tloader.load(loader.url,/*laya.net.Loader.JSON*/\"json\",false,null,true);\n\t}\n\n\tLaya3D._onTextureCubeLtcLoaded=function(loader,ltcData){\n\t\tif (loader._class.destroyed){\n\t\t\tloader.endLoad();\n\t\t\t}else {\n\t\t\tvar ltcBasePath=URL.getPath(loader.url);\n\t\t\tvar urls=[Laya3D.formatRelativePath(ltcBasePath,ltcData.px),Laya3D.formatRelativePath(ltcBasePath,ltcData.nx),Laya3D.formatRelativePath(ltcBasePath,ltcData.py),Laya3D.formatRelativePath(ltcBasePath,ltcData.ny),Laya3D.formatRelativePath(ltcBasePath,ltcData.pz),Laya3D.formatRelativePath(ltcBasePath,ltcData.nz)];\n\t\t\tvar ltcWeight=1.0 / 7.0;\n\t\t\tLaya3D._onProcessChange(loader,0,ltcWeight,1.0);\n\t\t\tvar processHandler=Handler.create(null,Laya3D._onProcessChange,[loader,ltcWeight,6 / 7],false);\n\t\t\tLaya3D._innerFourthLevelLoaderManager.load(urls,Handler.create(null,Laya3D._onTextureCubeImagesLoaded,[loader,urls,processHandler]),processHandler,\"nativeimage\");\n\t\t}\n\t}\n\n\tLaya3D._onTextureCubeImagesLoaded=function(loader,urls,processHandler){\n\t\tvar images=[];\n\t\timages.length=6;\n\t\tfor (var i=0;i < 6;i++){\n\t\t\tvar url=urls[i];\n\t\t\timages[i]=Loader.getRes(url);\n\t\t\tLoader.clearRes(url);\n\t\t}\n\t\tloader.endLoad(images);\n\t\tprocessHandler.recover();\n\t}\n\n\tLaya3D._onProcessChange=function(loader,offset,weight,process){\n\t\tprocess=offset+process *weight;\n\t\t(process < 1.0)&& (loader.event(/*laya.events.Event.PROGRESS*/\"progress\",process));\n\t}\n\n\tLaya3D.init=function(width,height,antialias,alpha,premultipliedAlpha,stencil){\n\t\t(antialias===void 0)&& (antialias=false);\n\t\t(alpha===void 0)&& (alpha=false);\n\t\t(premultipliedAlpha===void 0)&& (premultipliedAlpha=true);\n\t\t(stencil===void 0)&& (stencil=true);\n\t\tif (Laya3D._isinit)return;\n\t\tLaya3D._isinit=true;\n\t\tRunDriver.update3DLoop=function (){\n\t\t\tCollisionManager._triggerCollision();\n\t\t}\n\t\tRunDriver.cancelLoadByUrl=function (url){\n\t\t\tLaya3D._cancelLoadByUrl(url);\n\t\t}\n\t\tConfig.isAntialias=antialias;\n\t\tConfig.isAlpha=alpha;\n\t\tConfig.premultipliedAlpha=premultipliedAlpha;\n\t\tConfig.isStencil=stencil;\n\t\tif (!WebGL.enable()){\n\t\t\talert(\"Laya3D init error,must support webGL!\");\n\t\t\treturn;\n\t\t}\n\t\tRunDriver.changeWebGLSize=Laya3D._changeWebGLSize;\n\t\tRender.is3DMode=true;\n\t\tLaya.init(width,height);\n\t\tLayer.__init__();\n\t\tPhysics.__init__();\n\t\tExtendTerrainMaterial.__init__();\n\t\tShaderInit3D.__init__();\n\t\tMeshSprite3D.__init__();\n\t\tAnimationNode.__init__();\n\t\tLaya3D.__init__();\n\t\tAtlasResourceManager.maxTextureCount=2;\n\t\tif (Laya3D.debugMode || OctreeNode.debugMode)\n\t\t\tLaya3D._debugPhasorSprite=new PhasorSpriter3D();\n\t}\n\n\tLaya3D.HIERARCHY=\"SPRITE3DHIERARCHY\";\n\tLaya3D.MESH=\"MESH\";\n\tLaya3D.MATERIAL=\"MATERIAL\";\n\tLaya3D.PBRMATERIAL=\"PBRMTL\";\n\tLaya3D.TEXTURECUBE=\"TEXTURECUBE\";\n\tLaya3D.TERRAIN=\"TERRAIN\";\n\tLaya3D._readData=null;\n\tLaya3D._debugPhasorSprite=null;\n\tLaya3D.debugMode=false;\n\tLaya3D._isinit=false;\n\t__static(Laya3D,\n\t['_DATA',function(){return this._DATA={offset:0,size:0};},'_strings',function(){return this._strings=['BLOCK','DATA',\"STRINGS\"];},'_innerFirstLevelLoaderManager',function(){return this._innerFirstLevelLoaderManager=new LoaderManager();},'_innerSecondLevelLoaderManager',function(){return this._innerSecondLevelLoaderManager=new LoaderManager();},'_innerThirdLevelLoaderManager',function(){return this._innerThirdLevelLoaderManager=new LoaderManager();},'_innerFourthLevelLoaderManager',function(){return this._innerFourthLevelLoaderManager=new LoaderManager();}\n\t]);\n\treturn Laya3D;\n})()\n\n\n/**\n*<code>Transform3D</code> 类用于实现3D变换。\n*/\n//class laya.d3.animation.AnimationTransform3D extends laya.events.EventDispatcher\nvar AnimationTransform3D=(function(_super){\n\tfunction AnimationTransform3D(owner){\n\t\t/**@private */\n\t\t//this._localMatrix=null;\n\t\t/**@private */\n\t\t//this._worldMatrix=null;\n\t\t/**@private */\n\t\t//this._localPosition=null;\n\t\t/**@private */\n\t\t//this._localRotation=null;\n\t\t/**@private */\n\t\t//this._localScale=null;\n\t\t/**@private */\n\t\t//this._localQuaternionUpdate=false;\n\t\t/**@private */\n\t\t//this._locaEulerlUpdate=false;\n\t\t/**@private */\n\t\t//this._localUpdate=false;\n\t\t/**@private */\n\t\t//this._parent=null;\n\t\t/**@private */\n\t\t//this._childs=null;\n\t\t/**@private */\n\t\t//this._localRotationEuler=null;\n\t\t/**@private */\n\t\t//this._owner=null;\n\t\t/**@private */\n\t\t//this._worldUpdate=false;\n\t\t/**@private */\n\t\t//this._entity=null;\n\t\tAnimationTransform3D.__super.call(this);\n\t\tthis._owner=owner;\n\t\tthis._childs=[];\n\t\tthis._localMatrix=new Float32Array(16);\n\t\tthis._localQuaternionUpdate=false;\n\t\tthis._locaEulerlUpdate=false;\n\t\tthis._localUpdate=false;\n\t\tthis._worldUpdate=true;\n\t}\n\n\t__class(AnimationTransform3D,'laya.d3.animation.AnimationTransform3D',_super);\n\tvar __proto=AnimationTransform3D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._getlocalMatrix=function(){\n\t\tif (this._localUpdate){\n\t\t\tUtils3D._createAffineTransformationArray(this._localPosition,this._localRotation,this._localScale,this._localMatrix);\n\t\t\tthis._localUpdate=false;\n\t\t}\n\t\treturn this._localMatrix;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldTransform=function(){\n\t\tif (!this._worldUpdate){\n\t\t\tthis._worldUpdate=true;\n\t\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t\tthis._childs[i]._onWorldTransform();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setWorldMatrixAndUpdate=function(matrix){\n\t\tthis._worldMatrix=matrix;\n\t\tif (this._parent==null){\n\t\t\tthrow new Error(\"don't need to set worldMatrix to root Node.\");\n\t\t\t}else {\n\t\t\tif (this._parent._parent==null){\n\t\t\t\tvar locMat=this._getlocalMatrix();\n\t\t\t\tfor (var i=0;i < 16;++i)\n\t\t\t\tthis._worldMatrix[i]=locMat[i];\n\t\t\t\t}else {\n\t\t\t\tUtils3D.matrix4x4MultiplyFFF(this._parent.getWorldMatrix(),this._getlocalMatrix(),this._worldMatrix);\n\t\t\t}\n\t\t}\n\t\tthis._worldUpdate=false;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setWorldMatrixNoUpdate=function(matrix){\n\t\tthis._worldMatrix=matrix;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setWorldMatrixIgnoreUpdate=function(matrix){\n\t\tthis._worldMatrix=matrix;\n\t\tthis._worldUpdate=false;\n\t}\n\n\t/**\n\t*获取局部位置。\n\t*@return 局部位置。\n\t*/\n\t__proto.getLocalPosition=function(){\n\t\treturn this._localPosition;\n\t}\n\n\t/**\n\t*设置局部位置。\n\t*@param value 局部位置。\n\t*/\n\t__proto.setLocalPosition=function(value){\n\t\tif (this._parent){\n\t\t\tthis._localPosition=value;\n\t\t\tthis._localUpdate=true;\n\t\t\tthis._onWorldTransform();\n\t\t\t}else {\n\t\t\tvar entityTransform=this._entity.owner._transform;\n\t\t\tvar entityPosition=this._entity.localPosition;\n\t\t\tvar entityPositionE=entityPosition.elements;\n\t\t\tentityPositionE[0]=value[0];\n\t\t\tentityPositionE[1]=value[1];\n\t\t\tentityPositionE[2]=value[2];\n\t\t\tentityTransform.localPosition=entityPosition;\n\t\t}\n\t}\n\n\t/**\n\t*获取局部旋转。\n\t*@return 局部旋转。\n\t*/\n\t__proto.getLocalRotation=function(){\n\t\tif (this._localQuaternionUpdate){\n\t\t\tvar eulerE=this._localRotationEuler;\n\t\t\tUtils3D._quaternionCreateFromYawPitchRollArray(eulerE[1] / AnimationTransform3D._angleToRandin,eulerE[0] / AnimationTransform3D._angleToRandin,eulerE[2] / AnimationTransform3D._angleToRandin,this._localRotation);\n\t\t\tthis._localQuaternionUpdate=false;\n\t\t}\n\t\treturn this._localRotation;\n\t}\n\n\t/**\n\t*设置局部旋转。\n\t*@param value 局部旋转。\n\t*/\n\t__proto.setLocalRotation=function(value){\n\t\tif (this._parent){\n\t\t\tthis._localRotation=value;\n\t\t\tUtils3D.quaterionNormalize(this._localRotation,this._localRotation);\n\t\t\tthis._locaEulerlUpdate=true;\n\t\t\tthis._localQuaternionUpdate=false;\n\t\t\tthis._localUpdate=true;\n\t\t\tthis._onWorldTransform();\n\t\t\t}else {\n\t\t\tvar entityTransform=this._entity.owner._transform;\n\t\t\tvar entityRotation=this._entity.localRotation;\n\t\t\tvar entityRotationE=entityRotation.elements;\n\t\t\tentityRotationE[0]=value[0];\n\t\t\tentityRotationE[1]=value[1];\n\t\t\tentityRotationE[2]=value[2];\n\t\t\tentityRotationE[3]=value[3];\n\t\t\tentityTransform.localRotation=entityRotation;\n\t\t}\n\t}\n\n\t/**\n\t*获取局部缩放。\n\t*@return 局部缩放。\n\t*/\n\t__proto.getLocalScale=function(){\n\t\treturn this._localScale;\n\t}\n\n\t/**\n\t*设置局部缩放。\n\t*@param value 局部缩放。\n\t*/\n\t__proto.setLocalScale=function(value){\n\t\tif (this._parent){\n\t\t\tthis._localScale=value;\n\t\t\tthis._localUpdate=true;\n\t\t\tthis._onWorldTransform();\n\t\t\t}else {\n\t\t\tvar entityTransform=this._entity.owner._transform;\n\t\t\tvar entityScale=this._entity.localScale;\n\t\t\tvar entityScaleE=entityScale.elements;\n\t\t\tentityScaleE[0]=value[0];\n\t\t\tentityScaleE[1]=value[1];\n\t\t\tentityScaleE[2]=value[2];\n\t\t\tentityTransform.localScale=entityScale;\n\t\t}\n\t}\n\n\t/**\n\t*获取局部空间的旋转角度。\n\t*@return 欧拉角的旋转值，顺序为x、y、z。\n\t*/\n\t__proto.getLocalRotationEuler=function(){\n\t\tif (this._locaEulerlUpdate){\n\t\t\tUtils3D.getYawPitchRoll(this._localRotation,AnimationTransform3D._tempVector3);\n\t\t\tvar eulerE=AnimationTransform3D._tempVector3;\n\t\t\tvar localRotationEulerE=this._localRotationEuler;\n\t\t\tlocalRotationEulerE[0]=eulerE[1] *AnimationTransform3D._angleToRandin;\n\t\t\tlocalRotationEulerE[1]=eulerE[0] *AnimationTransform3D._angleToRandin;\n\t\t\tlocalRotationEulerE[2]=eulerE[2] *AnimationTransform3D._angleToRandin;\n\t\t\tthis._locaEulerlUpdate=false;\n\t\t}\n\t\treturn this._localRotationEuler;\n\t}\n\n\t/**\n\t*设置局部空间的旋转角度。\n\t*@param value 欧拉角的旋转值，顺序为x、y、z。\n\t*/\n\t__proto.setLocalRotationEuler=function(value){\n\t\tif (this._parent){\n\t\t\tUtils3D._quaternionCreateFromYawPitchRollArray(value[1] / AnimationTransform3D._angleToRandin,value[0] / AnimationTransform3D._angleToRandin,value[2] / AnimationTransform3D._angleToRandin,this._localRotation);\n\t\t\tthis._localRotationEuler=value;\n\t\t\tthis._locaEulerlUpdate=false;\n\t\t\tthis._localQuaternionUpdate=false;\n\t\t\tthis._localUpdate=true;\n\t\t\tthis._onWorldTransform();\n\t\t\t}else {\n\t\t\tvar entityTransform=this._entity.owner._transform;\n\t\t\tvar entityLocalRotationEuler=this._entity.localRotationEuler;\n\t\t\tvar elements=entityLocalRotationEuler.elements;\n\t\t\telements[0]=value[0];\n\t\t\telements[1]=value[1];\n\t\t\telements[2]=value[2];\n\t\t\tentityTransform.localRotationEuler=entityLocalRotationEuler;\n\t\t}\n\t}\n\n\t/**\n\t*获取世界矩阵。\n\t*@return 世界矩阵。\n\t*/\n\t__proto.getWorldMatrix=function(){\n\t\tif (this._worldUpdate){\n\t\t\tif (this._parent._parent !=null){\n\t\t\t\tUtils3D.matrix4x4MultiplyFFF(this._parent.getWorldMatrix(),this._getlocalMatrix(),this._worldMatrix);\n\t\t\t\t}else {\n\t\t\t\tvar locMat=this._getlocalMatrix();\n\t\t\t\tfor (var i=0;i < 16;++i)\n\t\t\t\tthis._worldMatrix[i]=locMat[i];\n\t\t\t}\n\t\t\tthis._worldUpdate=false;\n\t\t}\n\t\treturn this._worldMatrix;\n\t}\n\n\t/**\n\t*设置父3D变换。\n\t*@param value 父3D变换。\n\t*/\n\t__proto.setParent=function(value){\n\t\tif (this._parent!==value){\n\t\t\tif (this._parent){\n\t\t\t\tvar parentChilds=this._parent._childs;\n\t\t\t\tvar index=parentChilds.indexOf(this);\n\t\t\t\tparentChilds.splice(index,1);\n\t\t\t}\n\t\t\tif (value){\n\t\t\t\tvalue._childs.push(this);\n\t\t\t\t(value)&& (this._onWorldTransform());\n\t\t\t}\n\t\t\tthis._parent=value;\n\t\t}\n\t}\n\n\t__static(AnimationTransform3D,\n\t['_tempVector3',function(){return this._tempVector3=new Float32Array(3);},'_angleToRandin',function(){return this._angleToRandin=180 / Math.PI;}\n\t]);\n\treturn AnimationTransform3D;\n})(EventDispatcher)\n\n\n/**\n*<code>Component3D</code> 类用于创建组件的父类。\n*/\n//class laya.d3.component.Component3D extends laya.events.EventDispatcher\nvar Component3D=(function(_super){\n\tfunction Component3D(){\n\t\t/**@private */\n\t\tthis._destroyed=false;\n\t\t/**@private 唯一标识ID。*/\n\t\tthis._id=0;\n\t\t/**@private 是否启动。*/\n\t\tthis._enable=false;\n\t\t/**@private 所属Sprite3D节点。*/\n\t\tthis._owner=null;\n\t\t/**是否已执行start函数。*/\n\t\tthis.started=false;\n\t\tComponent3D.__super.call(this);\n\t\tthis._destroyed=false;\n\t\tthis._id=Component3D._uniqueIDCounter;\n\t\tComponent3D._uniqueIDCounter++;\n\t}\n\n\t__class(Component3D,'laya.d3.component.Component3D',_super);\n\tvar __proto=Component3D.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IUpdate\":true,\"laya.resource.IDestroy\":true})\n\t/**\n\t*@private\n\t*初始化组件。\n\t*@param owner 所属Sprite3D节点。\n\t*/\n\t__proto._initialize=function(owner){\n\t\tthis._owner=owner;\n\t\tthis._enable=true;\n\t\tthis.started=false;\n\t\tthis._load(owner);\n\t}\n\n\t/**\n\t*@private\n\t*销毁组件。\n\t*/\n\t__proto._destroy=function(){\n\t\tthis._unload(this._owner);\n\t\tthis._owner=null;\n\t\tthis._destroyed=true;\n\t}\n\n\t/**\n\t*@private\n\t*载入组件时执行,可重写此函数。\n\t*/\n\t__proto._load=function(owner){}\n\t/**\n\t*@private\n\t*在任意第一次更新时执行,可重写此函数。\n\t*/\n\t__proto._start=function(state){}\n\t/**\n\t*@private\n\t*更新组件,可重写此函数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._update=function(state){}\n\t/**\n\t*@private\n\t*更新的最后阶段执行,可重写此函数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._lateUpdate=function(state){}\n\t/**\n\t*@private\n\t*渲染前设置组件相关参数,可重写此函数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._preRenderUpdate=function(state){}\n\t/**\n\t*@private\n\t*渲染的最后阶段执行,可重写此函数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._postRenderUpdate=function(state){}\n\t/**\n\t*@private\n\t*卸载组件时执行,可重写此函数。\n\t*/\n\t__proto._unload=function(owner){\n\t\tthis.offAll();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._cloneTo=function(dest){}\n\t/**\n\t*获取唯一标识ID。\n\t*@return 唯一标识ID。\n\t*/\n\t__getset(0,__proto,'id',function(){\n\t\treturn this._id;\n\t});\n\n\t/**\n\t*获取是否已销毁。\n\t*@return 是否已销毁。\n\t*/\n\t__getset(0,__proto,'destroyed',function(){\n\t\treturn this._destroyed;\n\t});\n\n\t/**\n\t*获取所属Sprite3D节点。\n\t*@return 所属Sprite3D节点。\n\t*/\n\t__getset(0,__proto,'owner',function(){\n\t\treturn this._owner;\n\t});\n\n\t/**\n\t*设置是否启用。\n\t*@param value 是否启动\n\t*/\n\t/**\n\t*获取是否启用。\n\t*@return 是否启动。\n\t*/\n\t__getset(0,__proto,'enable',function(){\n\t\treturn this._enable;\n\t\t},function(value){\n\t\tif (this._enable!==value){\n\t\t\tthis._enable=value;\n\t\t\tthis.event(/*laya.events.Event.ENABLE_CHANGED*/\"enablechanged\",this._enable);\n\t\t}\n\t});\n\n\t/**\n\t*获取是否为单实例组件。\n\t*@return 是否为单实例组件。\n\t*/\n\t__getset(0,__proto,'isSingleton',function(){\n\t\treturn Component3D._isSingleton;\n\t});\n\n\tComponent3D._isSingleton=true;\n\tComponent3D._uniqueIDCounter=1;\n\treturn Component3D;\n})(EventDispatcher)\n\n\n/**\n*<code>GeometryFilter</code> 类用于创建集合体过滤器,抽象类不允许实例。\n*/\n//class laya.d3.core.GeometryFilter extends laya.events.EventDispatcher\nvar GeometryFilter=(function(_super){\n\tfunction GeometryFilter(){\n\t\t/**@private */\n\t\tthis._destroyed=false;\n\t\tGeometryFilter.__super.call(this);\n\t\tthis._destroyed=false;\n\t}\n\n\t__class(GeometryFilter,'laya.d3.core.GeometryFilter',_super);\n\tvar __proto=GeometryFilter.prototype;\n\tLaya.imps(__proto,{\"laya.resource.IDestroy\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\tthis.offAll();\n\t\tthis._destroyed=true;\n\t}\n\n\t/**@private */\n\t__getset(0,__proto,'_isAsyncLoaded',function(){\n\t\treturn true;\n\t});\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_originalBoundingBoxCorners',function(){\n\t\tthrow new Error(\"BaseRender: must override it.\");\n\t});\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_originalBoundingSphere',function(){\n\t\tthrow new Error(\"BaseRender: must override it.\");\n\t});\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_originalBoundingBox',function(){\n\t\tthrow new Error(\"BaseRender: must override it.\");\n\t});\n\n\t/**\n\t*获取是否已销毁。\n\t*@return 是否已销毁。\n\t*/\n\t__getset(0,__proto,'destroyed',function(){\n\t\treturn this._destroyed;\n\t});\n\n\treturn GeometryFilter;\n})(EventDispatcher)\n\n\n/**\n*<code>Render</code> 类用于渲染器的父类，抽象类不允许实例。\n*/\n//class laya.d3.core.render.BaseRender extends laya.events.EventDispatcher\nvar BaseRender=(function(_super){\n\tfunction BaseRender(owner){\n\t\t/**@private */\n\t\t//this._id=0;\n\t\t/**@private */\n\t\t//this._destroyed=false;\n\t\t/**@private */\n\t\t//this._lightmapScaleOffset=null;\n\t\t/**@private */\n\t\t//this._lightmapIndex=0;\n\t\t/**@private */\n\t\t//this._enable=false;\n\t\t/**@private */\n\t\t//this._receiveShadow=false;\n\t\t/**@private */\n\t\t//this._materialsInstance=null;\n\t\t/**@private */\n\t\t//this._boundingSphere=null;\n\t\t/**@private */\n\t\t//this._boundingBox=null;\n\t\t/**@private */\n\t\t//this._boundingBoxCenter=null;\n\t\t/**@private */\n\t\t//this._boundingSphereNeedChange=false;\n\t\t/**@private */\n\t\t//this._boundingBoxNeedChange=false;\n\t\t/**@private */\n\t\t//this._boundingBoxCenterNeedChange=false;\n\t\t/**@private */\n\t\t//this._octreeNodeNeedChange=false;\n\t\t/**@private */\n\t\t//this._indexInSceneFrustumCullingObjects=0;\n\t\t/**@private */\n\t\t//this._materials=null;\n\t\t/**@private */\n\t\t//this._owner=null;\n\t\t/**@private */\n\t\t//this._renderElements=null;\n\t\t/**@private */\n\t\t//this._distanceForSort=NaN;\n\t\t/**@private */\n\t\t//this._treeNode=null;\n\t\t/**@private */\n\t\t//this._isPartOfStaticBatch=false;\n\t\t/**@private */\n\t\t//this._staticBatchRootSprite3D=null;\n\t\t/**@private */\n\t\t//this._staticBatchRenderElements=null;\n\t\t/**排序矫正值。*/\n\t\t//this.sortingFudge=NaN;\n\t\t/**是否产生阴影。 */\n\t\t//this.castShadow=false;\n\t\tBaseRender.__super.call(this);\n\t\tthis._id=++BaseRender._uniqueIDCounter;\n\t\tthis._indexInSceneFrustumCullingObjects=-1;\n\t\tthis._boundingBox=new BoundBox(new Vector3(),new Vector3());\n\t\tthis._boundingBoxCenter=new Vector3();\n\t\tthis._boundingSphere=new BoundSphere(new Vector3(),0);\n\t\tthis._boundingSphereNeedChange=true;\n\t\tthis._boundingBoxNeedChange=true;\n\t\tthis._boundingBoxCenterNeedChange=true;\n\t\tthis._octreeNodeNeedChange=true;\n\t\tthis._materials=[];\n\t\tthis._renderElements=[];\n\t\tthis._isPartOfStaticBatch=false;\n\t\tthis._destroyed=false;\n\t\tthis._owner=owner;\n\t\tthis._enable=true;\n\t\tthis._materialsInstance=[];\n\t\tthis.lightmapIndex=-1;\n\t\tthis.castShadow=false;\n\t\tthis.receiveShadow=false;\n\t\tthis.sortingFudge=0.0;\n\t\tthis._owner.transform.on(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatNeedChange);\n\t}\n\n\t__class(BaseRender,'laya.d3.core.render.BaseRender',_super);\n\tvar __proto=BaseRender.prototype;\n\tLaya.imps(__proto,{\"laya.resource.IDestroy\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._changeMaterialReference=function(lastValue,value){\n\t\t(lastValue)&& (lastValue._removeReference());\n\t\tvalue._addReference();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getInstanceMaterial=function(material,index){\n\t\tvar insMat=/*__JS__ */new material.constructor();\n\t\tmaterial.cloneTo(insMat);\n\t\tinsMat.name=insMat.name+\"(Instance)\";\n\t\tthis._materialsInstance[index]=true;\n\t\tthis._changeMaterialReference(this._materials[index],insMat);\n\t\tthis._materials[index]=insMat;\n\t\treturn insMat;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setShaderValuelightMap=function(lightMap){\n\t\tthis._setShaderValueTexture(/*laya.d3.core.RenderableSprite3D.LIGHTMAP*/3,lightMap);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldMatNeedChange=function(){\n\t\tthis._boundingSphereNeedChange=true;\n\t\tthis._boundingBoxNeedChange=true;\n\t\tthis._boundingBoxCenterNeedChange=true;\n\t\tthis._octreeNodeNeedChange=true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderRenderableBoundBox=function(){\n\t\tvar linePhasor=Laya3D._debugPhasorSprite;\n\t\tvar boundBox=this.boundingBox;\n\t\tvar corners=BaseRender._tempBoundBoxCorners;\n\t\tboundBox.getCorners(corners);\n\t\tlinePhasor.line(corners[0],BaseRender._greenColor,corners[1],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[2],BaseRender._greenColor,corners[3],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[4],BaseRender._greenColor,corners[5],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[6],BaseRender._greenColor,corners[7],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[0],BaseRender._greenColor,corners[3],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[1],BaseRender._greenColor,corners[2],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[2],BaseRender._greenColor,corners[6],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[3],BaseRender._greenColor,corners[7],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[0],BaseRender._greenColor,corners[4],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[1],BaseRender._greenColor,corners[5],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[4],BaseRender._greenColor,corners[7],BaseRender._greenColor);\n\t\tlinePhasor.line(corners[5],BaseRender._greenColor,corners[6],BaseRender._greenColor);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculateBoundingSphere=function(){\n\t\tthrow(\"BaseRender: must override it.\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculateBoundingBox=function(){\n\t\tthrow(\"BaseRender: must override it.\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setShaderValueTexture=function(shaderName,texture){\n\t\tthis._owner._shaderValues.setValue(shaderName,texture);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setShaderValueMatrix4x4=function(shaderName,matrix4x4){\n\t\tthis._owner._shaderValues.setValue(shaderName,matrix4x4 ? matrix4x4.elements :null);\n\t}\n\n\t/**\n\t*设置颜色。\n\t*@param shaderIndex shader索引。\n\t*@param color 颜色向量。\n\t*/\n\t__proto._setShaderValueColor=function(shaderIndex,color){\n\t\tthis._owner._shaderValues.setValue(shaderIndex,color ? color.elements :null);\n\t}\n\n\t/**\n\t*设置Buffer。\n\t*@param shaderIndex shader索引。\n\t*@param buffer buffer数据。\n\t*/\n\t__proto._setShaderValueBuffer=function(shaderIndex,buffer){\n\t\tthis._owner._shaderValues.setValue(shaderIndex,buffer);\n\t}\n\n\t/**\n\t*设置整型。\n\t*@param shaderIndex shader索引。\n\t*@param i 整形。\n\t*/\n\t__proto._setShaderValueInt=function(shaderIndex,i){\n\t\tthis._owner._shaderValues.setValue(shaderIndex,i);\n\t}\n\n\t/**\n\t*设置布尔。\n\t*@param shaderIndex shader索引。\n\t*@param b 布尔。\n\t*/\n\t__proto._setShaderValueBool=function(shaderIndex,b){\n\t\tthis._owner._shaderValues.setValue(shaderIndex,b);\n\t}\n\n\t/**\n\t*设置浮点。\n\t*@param shaderIndex shader索引。\n\t*@param i 浮点。\n\t*/\n\t__proto._setShaderValueNumber=function(shaderIndex,number){\n\t\tthis._owner._shaderValues.setValue(shaderIndex,number);\n\t}\n\n\t/**\n\t*设置二维向量。\n\t*@param shaderIndex shader索引。\n\t*@param vector2 二维向量。\n\t*/\n\t__proto._setShaderValueVector2=function(shaderIndex,vector2){\n\t\tthis._owner._shaderValues.setValue(shaderIndex,vector2 ? vector2.elements :null);\n\t}\n\n\t/**\n\t*增加Shader宏定义。\n\t*@param value 宏定义。\n\t*/\n\t__proto._addShaderDefine=function(value){\n\t\tthis._owner._shaderDefineValue |=value;\n\t}\n\n\t/**\n\t*移除Shader宏定义。\n\t*@param value 宏定义。\n\t*/\n\t__proto._removeShaderDefine=function(value){\n\t\tthis._owner._shaderDefineValue &=~value;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderUpdate=function(projectionView){\n\t\treturn true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._applyLightMapParams=function(){\n\t\tif (this._lightmapIndex >=0){\n\t\t\tvar scene=this._owner.scene;\n\t\t\tif (scene){\n\t\t\t\tvar lightMaps=scene.getlightmaps();\n\t\t\t\tvar lightMap=lightMaps[this._lightmapIndex];\n\t\t\t\tif (lightMap){\n\t\t\t\t\tthis._addShaderDefine(RenderableSprite3D.SAHDERDEFINE_LIGHTMAP);\n\t\t\t\t\tif (lightMap.loaded)\n\t\t\t\t\t\tthis._setShaderValuelightMap(lightMap);\n\t\t\t\t\telse\n\t\t\t\t\tlightMap.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._setShaderValuelightMap);\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._removeShaderDefine(RenderableSprite3D.SAHDERDEFINE_LIGHTMAP);\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tthis._removeShaderDefine(RenderableSprite3D.SAHDERDEFINE_LIGHTMAP);\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(RenderableSprite3D.SAHDERDEFINE_LIGHTMAP);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateOctreeNode=function(){\n\t\tvar treeNode=this._treeNode;\n\t\tif (treeNode && this._octreeNodeNeedChange){\n\t\t\ttreeNode.updateObject(this);\n\t\t\tthis._octreeNodeNeedChange=false;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\tthis.offAll();\n\t\tvar i=0,n=0;\n\t\tfor (i=0,n=this._renderElements.length;i < n;i++)\n\t\tthis._renderElements[i]._destroy();\n\t\tfor (i=0,n=this._materials.length;i < n;i++)\n\t\tthis._materials[i]._removeReference();\n\t\tthis._renderElements=null;\n\t\tthis._owner=null;\n\t\tthis._materials=null;\n\t\tthis._boundingBox=null;\n\t\tthis._boundingBoxCenter=null;\n\t\tthis._boundingSphere=null;\n\t\tthis._lightmapScaleOffset=null;\n\t\tthis._destroyed=true;\n\t}\n\n\t/**\n\t*获取包围球,只读,不允许修改其值。\n\t*@return 包围球。\n\t*/\n\t__getset(0,__proto,'boundingSphere',function(){\n\t\tif (this._boundingSphereNeedChange){\n\t\t\tthis._calculateBoundingSphere();\n\t\t\tthis._boundingSphereNeedChange=false;\n\t\t}\n\t\treturn this._boundingSphere;\n\t});\n\n\t/**\n\t*获取唯一标识ID,通常用于识别。\n\t*/\n\t__getset(0,__proto,'id',function(){\n\t\treturn this._id;\n\t});\n\n\t/**\n\t*设置第一个实例材质。\n\t*@param value 第一个实例材质。\n\t*/\n\t/**\n\t*返回第一个实例材质,第一次使用会拷贝实例对象。\n\t*@return 第一个实例材质。\n\t*/\n\t__getset(0,__proto,'material',function(){\n\t\tvar material=this._materials[0];\n\t\tif (material && !this._materialsInstance[0]){\n\t\t\tvar insMat=this._getInstanceMaterial(material,0);\n\t\t\tthis.event(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",[this,0,insMat]);\n\t\t}\n\t\treturn this._materials[0];\n\t\t},function(value){\n\t\tthis.sharedMaterial=value;\n\t});\n\n\t/**\n\t*设置第一个材质。\n\t*@param value 第一个材质。\n\t*/\n\t/**\n\t*返回第一个材质。\n\t*@return 第一个材质。\n\t*/\n\t__getset(0,__proto,'sharedMaterial',function(){\n\t\treturn this._materials[0];\n\t\t},function(value){\n\t\tvar lastValue=this._materials[0];\n\t\tif (lastValue!==value){\n\t\t\tthis._materials[0]=value;\n\t\t\tthis._materialsInstance[0]=false;\n\t\t\tthis._changeMaterialReference(lastValue,value);\n\t\t\tthis.event(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",[this,0,value]);\n\t\t}\n\t});\n\n\t/**\n\t*设置光照贴图的索引。\n\t*@param value 光照贴图的索引。\n\t*/\n\t/**\n\t*获取光照贴图的索引。\n\t*@return 光照贴图的索引。\n\t*/\n\t__getset(0,__proto,'lightmapIndex',function(){\n\t\treturn this._lightmapIndex;\n\t\t},function(value){\n\t\tthis._lightmapIndex=value;\n\t\tthis._applyLightMapParams();\n\t});\n\n\t/**\n\t*设置光照贴图的缩放和偏移。\n\t*@param 光照贴图的缩放和偏移。\n\t*/\n\t/**\n\t*获取光照贴图的缩放和偏移。\n\t*@return 光照贴图的缩放和偏移。\n\t*/\n\t__getset(0,__proto,'lightmapScaleOffset',function(){\n\t\treturn this._lightmapScaleOffset;\n\t\t},function(value){\n\t\tthis._lightmapScaleOffset=value;\n\t\tthis._setShaderValueColor(/*laya.d3.core.RenderableSprite3D.LIGHTMAPSCALEOFFSET*/2,value);\n\t\tthis._addShaderDefine(RenderableSprite3D.SHADERDEFINE_SCALEOFFSETLIGHTINGMAPUV);\n\t});\n\n\t/**\n\t*设置是否可用。\n\t*@param value 是否可用。\n\t*/\n\t/**\n\t*获取是否可用。\n\t*@return 是否可用。\n\t*/\n\t__getset(0,__proto,'enable',function(){\n\t\treturn this._enable;\n\t\t},function(value){\n\t\tthis._enable=value;\n\t\tthis.event(/*laya.events.Event.ENABLE_CHANGED*/\"enablechanged\",[this,value]);\n\t});\n\n\t/**\n\t*设置实例材质列表。\n\t*@param value 实例材质列表。\n\t*/\n\t/**\n\t*获取潜拷贝实例材质列表,第一次使用会拷贝实例对象。\n\t*@return 浅拷贝实例材质列表。\n\t*/\n\t__getset(0,__proto,'materials',function(){\n\t\tfor (var i=0,n=this._materials.length;i < n;i++){\n\t\t\tif (!this._materialsInstance[i]){\n\t\t\t\tvar insMat=this._getInstanceMaterial(this._materials[i],i);\n\t\t\t\tthis.event(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",[this,i,insMat]);\n\t\t\t}\n\t\t}\n\t\treturn this._materials.slice();\n\t\t},function(value){\n\t\tthis.sharedMaterials=value;\n\t});\n\n\t/**\n\t*设置材质列表。\n\t*@param value 材质列表。\n\t*/\n\t/**\n\t*获取浅拷贝材质列表。\n\t*@return 浅拷贝材质列表。\n\t*/\n\t__getset(0,__proto,'sharedMaterials',function(){\n\t\tvar materials=this._materials.slice();\n\t\treturn materials;\n\t\t},function(value){\n\t\tif (!value)\n\t\t\tthrow new Error(\"MeshRender: shadredMaterials value can't be null.\");\n\t\tvar len=value.length;\n\t\tthis._materialsInstance.length=len;\n\t\tfor (var i=0;i < len;i++){\n\t\t\tvar lastValue=this._materials[i];\n\t\t\tif (lastValue!==value[i]){\n\t\t\t\tthis._materialsInstance[i]=false;\n\t\t\t\tthis._changeMaterialReference(lastValue,value[i]);\n\t\t\t\tthis.event(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",[this,i,value[i]]);\n\t\t\t}\n\t\t}\n\t\tthis._materials=value;\n\t});\n\n\t/**\n\t*获取包围盒,只读,不允许修改其值。\n\t*@return 包围盒。\n\t*/\n\t__getset(0,__proto,'boundingBox',function(){\n\t\tif (this._boundingBoxNeedChange){\n\t\t\tthis._calculateBoundingBox();\n\t\t\tthis._boundingBoxNeedChange=false;\n\t\t}\n\t\treturn this._boundingBox;\n\t});\n\n\t/**\n\t*获取包围盒中心,不允许修改其值。\n\t*@return 包围盒中心。\n\t*/\n\t__getset(0,__proto,'boundingBoxCenter',function(){\n\t\tif (this._boundingBoxCenterNeedChange){\n\t\t\tvar boundBox=this.boundingBox;\n\t\t\tVector3.add(boundBox.min,boundBox.max,this._boundingBoxCenter);\n\t\t\tVector3.scale(this._boundingBoxCenter,0.5,this._boundingBoxCenter);\n\t\t\tthis._boundingBoxCenterNeedChange=false;\n\t\t}\n\t\treturn this._boundingBoxCenter;\n\t});\n\n\t/**\n\t*设置是否接收阴影属性\n\t*/\n\t/**\n\t*获得是否接收阴影属性\n\t*/\n\t__getset(0,__proto,'receiveShadow',function(){\n\t\treturn this._receiveShadow;\n\t\t},function(value){\n\t\tif (this._receiveShadow!==value){\n\t\t\tthis._receiveShadow=value;\n\t\t\tif (value)\n\t\t\t\tthis._addShaderDefine(ParallelSplitShadowMap.SHADERDEFINE_RECEIVE_SHADOW);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(ParallelSplitShadowMap.SHADERDEFINE_RECEIVE_SHADOW);\n\t\t}\n\t});\n\n\t/**\n\t*获取是否已销毁。\n\t*@return 是否已销毁。\n\t*/\n\t__getset(0,__proto,'destroyed',function(){\n\t\treturn this._destroyed;\n\t});\n\n\tBaseRender._uniqueIDCounter=0;\n\t__static(BaseRender,\n\t['_tempBoundBoxCorners',function(){return this._tempBoundBoxCorners=/*new vector.<>*/[new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3()];},'_greenColor',function(){return this._greenColor=new Vector4(0.0,1.0,0.0,1.0);}\n\t]);\n\treturn BaseRender;\n})(EventDispatcher)\n\n\n/**\n*<code>Transform3D</code> 类用于实现3D变换。\n*/\n//class laya.d3.core.Transform3D extends laya.events.EventDispatcher\nvar Transform3D=(function(_super){\n\tfunction Transform3D(owner){\n\t\t/**@private */\n\t\tthis._owner=null;\n\t\t/**@private */\n\t\tthis._localQuaternionUpdate=false;\n\t\t/**@private */\n\t\tthis._locaEulerlUpdate=false;\n\t\t/**@private */\n\t\tthis._localUpdate=false;\n\t\t/**@private */\n\t\tthis._worldUpdate=true;\n\t\t/**@private */\n\t\tthis._positionUpdate=true;\n\t\t/**@private */\n\t\tthis._rotationUpdate=true;\n\t\t/**@private */\n\t\tthis._scaleUpdate=true;\n\t\t/**@private */\n\t\tthis._parent=null;\n\t\t/**@private */\n\t\tthis._childs=null;\n\t\t/**@private */\n\t\tthis._dummy=null;\n\t\t/**变换中心点,注意:该中心点不受变换的影响。*/\n\t\tthis.pivot=null;\n\t\tTransform3D.__super.call(this);\n\t\tthis._localPosition=new Vector3();\n\t\tthis._localRotation=new Quaternion(0,0,0,1);\n\t\tthis._localScale=new Vector3(1,1,1);\n\t\tthis._localRotationEuler=new Vector3();\n\t\tthis._localMatrix=new Matrix4x4();\n\t\tthis._position=new Vector3();\n\t\tthis._rotation=new Quaternion(0,0,0,1);\n\t\tthis._scale=new Vector3(1,1,1);\n\t\tthis._worldMatrix=new Matrix4x4();\n\t\tthis._forward=new Vector3();\n\t\tthis._up=new Vector3();\n\t\tthis._right=new Vector3();\n\t\tthis._owner=owner;\n\t\tthis._childs=[];\n\t}\n\n\t__class(Transform3D,'laya.d3.core.Transform3D',_super);\n\tvar __proto=Transform3D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._updateLocalMatrix=function(){\n\t\tif (this.pivot && (this.pivot.x!==0 || this.pivot.y!==0 || this.pivot.z!==0)){\n\t\t\tvar scalePivot=Transform3D._tempVector30;\n\t\t\tVector3.multiply(this.pivot,this._localScale,scalePivot);\n\t\t\tvar scaleOffsetPosition=Transform3D._tempVector31;\n\t\t\tVector3.subtract(scalePivot,this.pivot,scaleOffsetPosition);\n\t\t\tvar rotationOffsetPosition=Transform3D._tempVector32;\n\t\t\tvar localRot=this.localRotation;\n\t\t\tVector3.transformQuat(scalePivot,localRot,rotationOffsetPosition);\n\t\t\tVector3.subtract(rotationOffsetPosition,scalePivot,rotationOffsetPosition);\n\t\t\tvar resultLocalPosition=Transform3D._tempVector33;\n\t\t\tVector3.subtract(this._localPosition,scaleOffsetPosition,resultLocalPosition);\n\t\t\tVector3.subtract(resultLocalPosition,rotationOffsetPosition,resultLocalPosition);\n\t\t\tMatrix4x4.createAffineTransformation(resultLocalPosition,localRot,this._localScale,this._localMatrix);\n\t\t\t}else {\n\t\t\tMatrix4x4.createAffineTransformation(this._localPosition,this.localRotation,this._localScale,this._localMatrix);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldPositionRotationTransform=function(){\n\t\tif (!this._worldUpdate || !this._positionUpdate || !this._rotationUpdate){\n\t\t\tthis._worldUpdate=this._positionUpdate=this._rotationUpdate=true;\n\t\t\tthis.event(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\");\n\t\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t\tthis._childs[i]._onWorldPositionRotationTransform();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldPositionScaleTransform=function(){\n\t\tif (!this._worldUpdate || !this._positionUpdate || !this._scaleUpdate){\n\t\t\tthis._worldUpdate=this._positionUpdate=this._scaleUpdate=true;\n\t\t\tthis.event(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\");\n\t\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t\tthis._childs[i]._onWorldPositionScaleTransform();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldPositionTransform=function(){\n\t\tif (!this._worldUpdate || !this._positionUpdate){\n\t\t\tthis._worldUpdate=this._positionUpdate=true;\n\t\t\tthis.event(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\");\n\t\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t\tthis._childs[i]._onWorldPositionTransform();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldRotationTransform=function(){\n\t\tif (!this._worldUpdate || !this._rotationUpdate){\n\t\t\tthis._worldUpdate=this._rotationUpdate=true;\n\t\t\tthis.event(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\");\n\t\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t\tthis._childs[i]._onWorldPositionRotationTransform();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldScaleTransform=function(){\n\t\tif (!this._worldUpdate || !this._scaleUpdate){\n\t\t\tthis._worldUpdate=this._scaleUpdate=true;\n\t\t\tthis.event(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\");\n\t\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t\tthis._childs[i]._onWorldPositionScaleTransform();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldTransform=function(){\n\t\tif (!this._worldUpdate || !this._positionUpdate || !this._rotationUpdate || !this._scaleUpdate){\n\t\t\tthis._worldUpdate=this._positionUpdate=this._rotationUpdate=this._scaleUpdate=true;\n\t\t\tthis.event(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\");\n\t\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t\tthis._childs[i]._onWorldTransform();\n\t\t}\n\t}\n\n\t/**\n\t*平移变换。\n\t*@param translation 移动距离。\n\t*@param isLocal 是否局部空间。\n\t*/\n\t__proto.translate=function(translation,isLocal){\n\t\t(isLocal===void 0)&& (isLocal=true);\n\t\tif (isLocal){\n\t\t\tMatrix4x4.createFromQuaternion(this.localRotation,Transform3D._tempMatrix0);\n\t\t\tVector3.transformCoordinate(translation,Transform3D._tempMatrix0,Transform3D._tempVector30);\n\t\t\tVector3.add(this.localPosition,Transform3D._tempVector30,this._localPosition);\n\t\t\tthis.localPosition=this._localPosition;\n\t\t\t}else {\n\t\t\tVector3.add(this.position,translation,this._position);\n\t\t\tthis.position=this._position;\n\t\t}\n\t}\n\n\t/**\n\t*旋转变换。\n\t*@param rotations 旋转幅度。\n\t*@param isLocal 是否局部空间。\n\t*@param isRadian 是否弧度制。\n\t*/\n\t__proto.rotate=function(rotation,isLocal,isRadian){\n\t\t(isLocal===void 0)&& (isLocal=true);\n\t\t(isRadian===void 0)&& (isRadian=true);\n\t\tvar rot;\n\t\tif (isRadian){\n\t\t\trot=rotation;\n\t\t\t}else {\n\t\t\tVector3.scale(rotation,Math.PI / 180.0,Transform3D._tempVector30);\n\t\t\trot=Transform3D._tempVector30;\n\t\t}\n\t\tQuaternion.createFromYawPitchRoll(rot.y,rot.x,rot.z,Transform3D._tempQuaternion0);\n\t\tif (isLocal){\n\t\t\tQuaternion.multiply(this._localRotation,Transform3D._tempQuaternion0,this._localRotation);\n\t\t\tthis.localRotation=this._localRotation;\n\t\t\t}else {\n\t\t\tQuaternion.multiply(Transform3D._tempQuaternion0,this.rotation,this._rotation);\n\t\t\tthis.rotation=this._rotation;\n\t\t}\n\t}\n\n\t/**\n\t*观察目标位置。\n\t*@param target 观察目标。\n\t*@param up 向上向量。\n\t*@param isLocal 是否局部空间。\n\t*/\n\t__proto.lookAt=function(target,up,isLocal){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\tvar targetE=target.elements;\n\t\tvar eyeE;\n\t\tif (isLocal){\n\t\t\teyeE=this._localPosition.elements;\n\t\t\tif (Math.abs(eyeE[0]-targetE[0])< MathUtils3D.zeroTolerance && Math.abs(eyeE[1]-targetE[1])< MathUtils3D.zeroTolerance && Math.abs(eyeE[2]-targetE[2])< MathUtils3D.zeroTolerance)\n\t\t\t\treturn;\n\t\t\tQuaternion.lookAt(this._localPosition,target,up,this._localRotation);\n\t\t\tthis._localRotation.invert(this._localRotation);\n\t\t\tthis.localRotation=this._localRotation;\n\t\t\t}else {\n\t\t\tvar worldPosition=this.position;\n\t\t\teyeE=worldPosition.elements;\n\t\t\tif (Math.abs(eyeE[0]-targetE[0])< MathUtils3D.zeroTolerance && Math.abs(eyeE[1]-targetE[1])< MathUtils3D.zeroTolerance && Math.abs(eyeE[2]-targetE[2])< MathUtils3D.zeroTolerance)\n\t\t\t\treturn;\n\t\t\tQuaternion.lookAt(worldPosition,target,up,this._rotation);\n\t\t\tthis._rotation.invert(this._rotation);\n\t\t\tthis.rotation=this._rotation;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_isFrontFaceInvert',function(){\n\t\tvar scale=this.scale;\n\t\tvar isInvert=scale.x < 0;\n\t\t(scale.y < 0)&& (isInvert=!isInvert);\n\t\t(scale.z < 0)&& (isInvert=!isInvert);\n\t\treturn isInvert;\n\t});\n\n\t/**\n\t*获取所属精灵。\n\t*/\n\t__getset(0,__proto,'owner',function(){\n\t\treturn this._owner;\n\t});\n\n\t/**\n\t*设置局部旋转。\n\t*@param value 局部旋转。\n\t*/\n\t/**\n\t*获取局部旋转。\n\t*@return 局部旋转。\n\t*/\n\t__getset(0,__proto,'localRotation',function(){\n\t\tif (this._localQuaternionUpdate){\n\t\t\tvar eulerE=this._localRotationEuler.elements;\n\t\t\tQuaternion.createFromYawPitchRoll(eulerE[1] / Transform3D._angleToRandin,eulerE[0] / Transform3D._angleToRandin,eulerE[2] / Transform3D._angleToRandin,this._localRotation);\n\t\t}\n\t\treturn this._localRotation;\n\t\t},function(value){\n\t\tthis._localRotation=value;\n\t\tthis._localRotation.normalize(this._localRotation);\n\t\tthis._locaEulerlUpdate=true;\n\t\tthis._localQuaternionUpdate=false;\n\t\tthis._localUpdate=true;\n\t\tif (this.pivot && (this.pivot.x!==0 || this.pivot.y!==0 || this.pivot.z!==0))\n\t\t\tthis._onWorldPositionRotationTransform();\n\t\telse\n\t\tthis._onWorldRotationTransform();\n\t});\n\n\t/**\n\t*设置世界矩阵。\n\t*@param value 世界矩阵。\n\t*/\n\t/**\n\t*获取世界矩阵。\n\t*@return 世界矩阵。\n\t*/\n\t__getset(0,__proto,'worldMatrix',function(){\n\t\tif (this._worldUpdate){\n\t\t\tif (this._parent !=null)\n\t\t\t\tMatrix4x4.multiply(this._parent.worldMatrix,this.localMatrix,this._worldMatrix);\n\t\t\telse\n\t\t\tthis.localMatrix.cloneTo(this._worldMatrix);\n\t\t\tthis._worldUpdate=false;\n\t\t}\n\t\treturn this._worldMatrix;\n\t\t},function(value){\n\t\tif (this._parent===null){\n\t\t\tvalue.cloneTo(this._localMatrix);\n\t\t\t}else {\n\t\t\tthis._parent.worldMatrix.invert(this._localMatrix);\n\t\t\tMatrix4x4.multiply(this._localMatrix,value,this._localMatrix);\n\t\t}\n\t\tthis.localMatrix=this._localMatrix;\n\t\tthis._worldMatrix=value;\n\t\tthis._worldUpdate=false;\n\t});\n\n\t/**\n\t*获取世界矩阵是否需要更新。\n\t*@return 世界矩阵是否需要更新。\n\t*/\n\t__getset(0,__proto,'worldNeedUpdate',function(){\n\t\treturn this._worldUpdate;\n\t});\n\n\t/**\n\t*设置局部矩阵。\n\t*@param value 局部矩阵。\n\t*/\n\t/**\n\t*获取局部矩阵。\n\t*@return 局部矩阵。\n\t*/\n\t__getset(0,__proto,'localMatrix',function(){\n\t\tif (this._localUpdate){\n\t\t\tthis._updateLocalMatrix();\n\t\t\tthis._localUpdate=false;\n\t\t}\n\t\treturn this._localMatrix;\n\t\t},function(value){\n\t\tthis._localMatrix=value;\n\t\tthis._localMatrix.decomposeTransRotScale(this._localPosition,this._localRotation,this._localScale);\n\t\tthis._localUpdate=false;\n\t\tthis._onWorldTransform();\n\t});\n\n\t/**\n\t*设置关联虚拟变换。\n\t*@param value 虚拟变换。\n\t*/\n\t/**\n\t*获取关联虚拟变换。\n\t*@return 虚拟变换。\n\t*/\n\t__getset(0,__proto,'dummy',function(){\n\t\treturn this._dummy;\n\t\t},function(value){\n\t\tif (this._dummy!==value){\n\t\t\t(this._dummy)&& (this._dummy._entity=null);\n\t\t\t(value)&& (value._entity=this);\n\t\t\tthis._dummy=value;\n\t\t}\n\t});\n\n\t/**\n\t*设置局部位置。\n\t*@param value 局部位置。\n\t*/\n\t/**\n\t*获取局部位置。\n\t*@return 局部位置。\n\t*/\n\t__getset(0,__proto,'localPosition',function(){\n\t\treturn this._localPosition;\n\t\t},function(value){\n\t\tthis._localPosition=value;\n\t\tthis._localUpdate=true;\n\t\tthis._onWorldPositionTransform();\n\t});\n\n\t/**\n\t*设置世界位置。\n\t*@param value 世界位置。\n\t*/\n\t/**\n\t*获取世界位置。\n\t*@return 世界位置。\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (this._positionUpdate){\n\t\t\tif (this._parent !=null){\n\t\t\t\tvar parentPosition=this._parent.position;\n\t\t\t\tVector3.multiply(this._localPosition,this._parent.scale,Transform3D._tempVector30);\n\t\t\t\tVector3.transformQuat(Transform3D._tempVector30,this._parent.rotation,Transform3D._tempVector30);\n\t\t\t\tVector3.add(parentPosition,Transform3D._tempVector30,this._position);\n\t\t\t\t}else {\n\t\t\t\tthis._localPosition.cloneTo(this._position);\n\t\t\t}\n\t\t\tthis._positionUpdate=false;\n\t\t}\n\t\treturn this._position;\n\t\t},function(value){\n\t\tif (this._parent !=null){\n\t\t\tVector3.subtract(value,this._parent.position,this._localPosition);\n\t\t\tvar parentScaleE=this._parent.scale.elements;\n\t\t\tvar psX=parentScaleE[0],psY=parentScaleE[1],psZ=parentScaleE[2];\n\t\t\tif (psX!==1.0 || psY!==1.0 || psZ!==1.0){\n\t\t\t\tvar invertScale=Transform3D._tempVector30;\n\t\t\t\tvar invertScaleE=invertScale.elements;\n\t\t\t\tinvertScaleE[0]=1.0 / psX;\n\t\t\t\tinvertScaleE[1]=1.0 / psY;\n\t\t\t\tinvertScaleE[2]=1.0 / psZ;\n\t\t\t\tVector3.multiply(this._localPosition,invertScale,this._localPosition);\n\t\t\t};\n\t\t\tvar parentRotation=this._parent.rotation;\n\t\t\tparentRotation.invert(Transform3D._tempQuaternion0);\n\t\t\tVector3.transformQuat(this._localPosition,Transform3D._tempQuaternion0,this._localPosition);\n\t\t\t}else {\n\t\t\tvalue.cloneTo(this._localPosition);\n\t\t}\n\t\tthis.localPosition=this._localPosition;\n\t\tthis._position=value;\n\t\tthis._positionUpdate=false;\n\t});\n\n\t/**\n\t*设置局部缩放。\n\t*@param value 局部缩放。\n\t*/\n\t/**\n\t*获取局部缩放。\n\t*@return 局部缩放。\n\t*/\n\t__getset(0,__proto,'localScale',function(){\n\t\treturn this._localScale;\n\t\t},function(value){\n\t\tthis._localScale=value;\n\t\tthis._localUpdate=true;\n\t\tif (this.pivot && (this.pivot.x!==0 || this.pivot.y!==0 || this.pivot.z!==0))\n\t\t\tthis._onWorldPositionScaleTransform();\n\t\telse\n\t\tthis._onWorldScaleTransform();\n\t});\n\n\t/**\n\t*设置局部空间的旋转角度。\n\t*@param value 欧拉角的旋转值，顺序为x、y、z。\n\t*/\n\t/**\n\t*获取局部空间的旋转角度。\n\t*@return 欧拉角的旋转值，顺序为x、y、z。\n\t*/\n\t__getset(0,__proto,'localRotationEuler',function(){\n\t\tif (this._locaEulerlUpdate){\n\t\t\tthis._localRotation.getYawPitchRoll(Transform3D._tempVector30);\n\t\t\tvar eulerE=Transform3D._tempVector30.elements;\n\t\t\tvar localRotationEulerE=this._localRotationEuler.elements;\n\t\t\tlocalRotationEulerE[0]=eulerE[1] *Transform3D._angleToRandin;\n\t\t\tlocalRotationEulerE[1]=eulerE[0] *Transform3D._angleToRandin;\n\t\t\tlocalRotationEulerE[2]=eulerE[2] *Transform3D._angleToRandin;\n\t\t}\n\t\treturn this._localRotationEuler;\n\t\t},function(value){\n\t\tthis._localRotationEuler=value;\n\t\tthis._locaEulerlUpdate=false;\n\t\tthis._localQuaternionUpdate=true;\n\t\tthis._localUpdate=true;\n\t\tif (this.pivot && (this.pivot.x!==0 || this.pivot.y!==0 || this.pivot.z!==0))\n\t\t\tthis._onWorldPositionRotationTransform();\n\t\telse\n\t\tthis._onWorldRotationTransform();\n\t});\n\n\t/**\n\t*设置世界旋转。\n\t*@param value 世界旋转。\n\t*/\n\t/**\n\t*获取世界旋转。\n\t*@return 世界旋转。\n\t*/\n\t__getset(0,__proto,'rotation',function(){\n\t\tif (this._rotationUpdate){\n\t\t\tif (this._parent !=null)\n\t\t\t\tQuaternion.multiply(this._parent.rotation,this.localRotation,this._rotation);\n\t\t\telse\n\t\t\tthis.localRotation.cloneTo(this._rotation);\n\t\t\tthis._rotationUpdate=false;\n\t\t}\n\t\treturn this._rotation;\n\t\t},function(value){\n\t\tif (this._parent !=null){\n\t\t\tthis._parent.rotation.invert(Transform3D._tempQuaternion0);\n\t\t\tQuaternion.multiply(value,Transform3D._tempQuaternion0,this._localRotation);\n\t\t\t}else {\n\t\t\tvalue.cloneTo(this._localRotation);\n\t\t}\n\t\tthis.localRotation=this._localRotation;\n\t\tthis._rotation=value;\n\t\tthis._rotationUpdate=false;\n\t});\n\n\t/**\n\t*设置世界缩放。\n\t*@param value 世界缩放。\n\t*/\n\t/**\n\t*获取世界缩放。\n\t*@return 世界缩放。\n\t*/\n\t__getset(0,__proto,'scale',function(){\n\t\tif (!this._scaleUpdate)\n\t\t\treturn this._scale;\n\t\tif (this._parent!==null)\n\t\t\tVector3.multiply(this._parent.scale,this._localScale,this._scale);\n\t\telse\n\t\tthis._localScale.cloneTo(this._scale);\n\t\tthis._scaleUpdate=false;\n\t\treturn this._scale;\n\t\t},function(value){\n\t\tif (this._parent!==null){\n\t\t\tvar pScaleE=this._parent.scale.elements;\n\t\t\tvar invPScaleE=Transform3D._tempVector30.elements;\n\t\t\tinvPScaleE[0]=1.0 / pScaleE[0];\n\t\t\tinvPScaleE[1]=1.0 / pScaleE[1];\n\t\t\tinvPScaleE[2]=1.0 / pScaleE[2];\n\t\t\tVector3.multiply(value,Transform3D._tempVector30,this._localScale);\n\t\t\t}else {\n\t\t\tvalue.cloneTo(this._localScale);\n\t\t}\n\t\tthis.localScale=this._localScale;\n\t\tthis._scale=value;\n\t\tthis._scaleUpdate=false;\n\t});\n\n\t/**\n\t*设置局部空间的旋转角度。\n\t*@param 欧拉角的旋转值，顺序为x、y、z。\n\t*/\n\t__getset(0,__proto,'rotationEuler',null,function(value){\n\t\tQuaternion.createFromYawPitchRoll(value.y,value.x,value.z,this._rotation);\n\t\tthis.rotation=this._rotation;\n\t});\n\n\t/**\n\t*获取向前方向。\n\t*@return 向前方向。\n\t*/\n\t__getset(0,__proto,'forward',function(){\n\t\tvar worldMatElem=this.worldMatrix.elements;\n\t\tthis._forward.elements[0]=-worldMatElem[8];\n\t\tthis._forward.elements[1]=-worldMatElem[9];\n\t\tthis._forward.elements[2]=-worldMatElem[10];\n\t\treturn this._forward;\n\t});\n\n\t/**\n\t*获取向上方向。\n\t*@return 向上方向。\n\t*/\n\t__getset(0,__proto,'up',function(){\n\t\tvar worldMatElem=this.worldMatrix.elements;\n\t\tthis._up.elements[0]=worldMatElem[4];\n\t\tthis._up.elements[1]=worldMatElem[5];\n\t\tthis._up.elements[2]=worldMatElem[6];\n\t\treturn this._up;\n\t});\n\n\t/**\n\t*获取向右方向。\n\t*@return 向右方向。\n\t*/\n\t__getset(0,__proto,'right',function(){\n\t\tvar worldMatElem=this.worldMatrix.elements;\n\t\tthis._right.elements[0]=worldMatElem[0];\n\t\tthis._right.elements[1]=worldMatElem[1];\n\t\tthis._right.elements[2]=worldMatElem[2];\n\t\treturn this._right;\n\t});\n\n\t/**\n\t*设置父3D变换。\n\t*@param value 父3D变换。\n\t*/\n\t/**\n\t*获取父3D变换。\n\t*@return 父3D变换。\n\t*/\n\t__getset(0,__proto,'parent',function(){\n\t\treturn this._parent;\n\t\t},function(value){\n\t\tif (this._parent!==value){\n\t\t\tif (this._parent){\n\t\t\t\tvar parentChilds=this._parent._childs;\n\t\t\t\tvar index=parentChilds.indexOf(this);\n\t\t\t\tparentChilds.splice(index,1);\n\t\t\t}\n\t\t\tif (value){\n\t\t\t\tvalue._childs.push(this);\n\t\t\t\t(value)&& (this._onWorldTransform());\n\t\t\t}\n\t\t\tthis._parent=value;\n\t\t}\n\t});\n\n\t__static(Transform3D,\n\t['_tempVector30',function(){return this._tempVector30=new Vector3();},'_tempVector31',function(){return this._tempVector31=new Vector3();},'_tempVector32',function(){return this._tempVector32=new Vector3();},'_tempVector33',function(){return this._tempVector33=new Vector3();},'_tempQuaternion0',function(){return this._tempQuaternion0=new Quaternion();},'_tempMatrix0',function(){return this._tempMatrix0=new Matrix4x4();},'_angleToRandin',function(){return this._angleToRandin=180 / Math.PI;}\n\t]);\n\treturn Transform3D;\n})(EventDispatcher)\n\n\n/**\n*<code>TransformUV</code> 类用于实现UV变换。\n*/\n//class laya.d3.core.TransformUV extends laya.events.EventDispatcher\nvar TransformUV=(function(_super){\n\tfunction TransformUV(){\n\t\t/**@private */\n\t\tthis._rotation=0;\n\t\t/**@private */\n\t\t//this._tiling=null;\n\t\t/**@private */\n\t\tthis._matNeedUpdte=false;\n\t\tTransformUV.__super.call(this);\n\t\tthis._matrix=new Matrix4x4();\n\t\tthis._offset=new Vector2();\n\t\tthis._tiling=new Vector2(1.0,1.0);\n\t}\n\n\t__class(TransformUV,'laya.d3.core.TransformUV',_super);\n\tvar __proto=TransformUV.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._updateMatrix=function(){\n\t\tTransformUV._tempOffsetV3.elements[0]=this._offset.x;\n\t\tTransformUV._tempOffsetV3.elements[1]=this._offset.y;\n\t\tQuaternion.createFromYawPitchRoll(0,0,this._rotation,TransformUV._tempRotationQua);\n\t\tTransformUV._tempTitlingV3.elements[0]=this._tiling.x;\n\t\tTransformUV._tempTitlingV3.elements[1]=this._tiling.y;\n\t\tMatrix4x4.createAffineTransformation(TransformUV._tempOffsetV3,TransformUV._tempRotationQua,TransformUV._tempTitlingV3,this._matrix);\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tdestObject._matrix=this._matrix.clone();\n\t\tdestObject._offset=this._offset.clone();\n\t\tdestObject._rotation=this._rotation;\n\t\tdestObject._tiling=this._tiling.clone();\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\t/**\n\t*获取变换矩阵。\n\t*@return 变换矩阵。\n\t*/\n\t__getset(0,__proto,'matrix',function(){\n\t\tif (this._matNeedUpdte){\n\t\t\tthis._updateMatrix();\n\t\t\tthis._matNeedUpdte=false;\n\t\t}\n\t\treturn this._matrix;\n\t});\n\n\t/**\n\t*设置平铺次数。\n\t*@param value 平铺次数。\n\t*/\n\t/**\n\t*获取平铺次数。\n\t*@return 平铺次数。\n\t*/\n\t__getset(0,__proto,'tiling',function(){\n\t\treturn this._tiling;\n\t\t},function(value){\n\t\tthis._tiling=value;\n\t\tthis._matNeedUpdte=true;\n\t});\n\n\t/**\n\t*设置偏移。\n\t*@param value 偏移。\n\t*/\n\t/**\n\t*获取偏移。\n\t*@return 偏移。\n\t*/\n\t__getset(0,__proto,'offset',function(){\n\t\treturn this._offset;\n\t\t},function(value){\n\t\tthis._offset=value;\n\t\tthis._matNeedUpdte=true;\n\t});\n\n\t/**\n\t*设置旋转。\n\t*@param value 旋转。\n\t*/\n\t/**\n\t*获取旋转。\n\t*@return 旋转。\n\t*/\n\t__getset(0,__proto,'rotation',function(){\n\t\treturn this._rotation;\n\t\t},function(value){\n\t\tthis._rotation=value;\n\t\tthis._matNeedUpdte=true;\n\t});\n\n\t__static(TransformUV,\n\t['_tempOffsetV3',function(){return this._tempOffsetV3=new Vector3(0,0,0);},'_tempRotationQua',function(){return this._tempRotationQua=new Quaternion();},'_tempTitlingV3',function(){return this._tempTitlingV3=new Vector3(1,1,1);}\n\t]);\n\treturn TransformUV;\n})(EventDispatcher)\n\n\n/**\n*<code>CollsionManager</code> 类用于碰撞管理器。\n*/\n//class laya.d3.utils.CollisionManager extends laya.events.EventDispatcher\nvar CollisionManager=(function(_super){\n\t/**\n\t*创建一个新的 <code>CollsionManager</code> 实例。\n\t*/\n\tfunction CollisionManager(){\n\t\tCollisionManager.__super.call(this);\n\t}\n\n\t__class(CollisionManager,'laya.d3.utils.CollisionManager',_super);\n\tCollisionManager._onTrigger=function(rigidCol,receiveCol,rigidScripts,receiveScripts,bothRigid){\n\t\tvar i=0,n=0;\n\t\tvar rigidID=rigidCol.id;\n\t\tvar receiveID=receiveCol.id;\n\t\tif (!rigidCol._ignoreCollisonMap[receiveID]){\n\t\t\tvar colMan=Physics.collisionManager;\n\t\t\tvar needTest=rigidCol._runtimeCollisonTestMap[receiveID];\n\t\t\tif (needTest !=null){\n\t\t\t\tif (needTest){\n\t\t\t\t\tif (rigidCol._collisonTo(receiveCol)){\n\t\t\t\t\t\tif (rigidCol._runtimeCollisonMap[receiveID]){\n\t\t\t\t\t\t\tfor (i=0,n=rigidScripts.length;i < n;i++)\n\t\t\t\t\t\t\trigidScripts[i].onTriggerStay(receiveCol);\n\t\t\t\t\t\t\tfor (i=0,n=receiveScripts.length;i < n;i++)\n\t\t\t\t\t\t\treceiveScripts[i].onTriggerStay(rigidCol);\n\t\t\t\t\t\t\tcolMan.event(/*laya.events.Event.TRIGGER_STAY*/\"triggerstay\",[rigidCol,receiveCol]);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\trigidCol._runtimeCollisonMap[receiveID]=receiveCol;\n\t\t\t\t\t\t\trigidCol._runtimeCollisonTestMap[receiveID]=false;\n\t\t\t\t\t\t\treceiveCol._runtimeCollisonMap[rigidID]=rigidCol;\n\t\t\t\t\t\t\tif (bothRigid)\n\t\t\t\t\t\t\t\treceiveCol._runtimeCollisonTestMap[rigidID]=false;\n\t\t\t\t\t\t\tfor (i=0,n=rigidScripts.length;i < n;i++)\n\t\t\t\t\t\t\trigidScripts[i].onTriggerEnter(receiveCol);\n\t\t\t\t\t\t\tfor (i=0,n=receiveScripts.length;i < n;i++)\n\t\t\t\t\t\t\treceiveScripts[i].onTriggerEnter(rigidCol);\n\t\t\t\t\t\t\tcolMan.event(/*laya.events.Event.TRIGGER_ENTER*/\"triggerenter\",[rigidCol,receiveCol]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvar rigidMap=rigidCol._runtimeCollisonMap;\n\t\t\t\t\t\tif (rigidMap[receiveID]){\n\t\t\t\t\t\t\tdelete rigidMap[receiveID];\n\t\t\t\t\t\t\tdelete rigidCol._runtimeCollisonTestMap[receiveID];\n\t\t\t\t\t\t\tdelete receiveCol._runtimeCollisonMap[rigidID];\n\t\t\t\t\t\t\tif (bothRigid)\n\t\t\t\t\t\t\t\tdelete receiveCol._runtimeCollisonTestMap[rigidID];\n\t\t\t\t\t\t\tfor (i=0,n=rigidScripts.length;i < n;i++)\n\t\t\t\t\t\t\trigidScripts[i].onTriggerExit(receiveCol);\n\t\t\t\t\t\t\tfor (i=0,n=receiveScripts.length;i < n;i++)\n\t\t\t\t\t\t\treceiveScripts[i].onTriggerExit(rigidCol);\n\t\t\t\t\t\t\tcolMan.event(/*laya.events.Event.TRIGGER_EXIT*/\"triggerexit\",[rigidCol,receiveCol]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tfor (i=0,n=rigidScripts.length;i < n;i++)\n\t\t\t\t\trigidScripts[i].onTriggerStay(receiveCol);\n\t\t\t\t\tfor (i=0,n=receiveScripts.length;i < n;i++)\n\t\t\t\t\treceiveScripts[i].onTriggerStay(rigidCol);\n\t\t\t\t\tcolMan.event(/*laya.events.Event.TRIGGER_STAY*/\"triggerstay\",[rigidCol,receiveCol]);\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tif (rigidCol._collisonTo(receiveCol)){\n\t\t\t\t\trigidCol._runtimeCollisonMap[receiveID]=receiveCol;\n\t\t\t\t\trigidCol._runtimeCollisonTestMap[receiveID]=false;\n\t\t\t\t\treceiveCol._runtimeCollisonMap[rigidID]=rigidCol;\n\t\t\t\t\tif (bothRigid)\n\t\t\t\t\t\treceiveCol._runtimeCollisonTestMap[rigidID]=false;\n\t\t\t\t\tfor (i=0,n=rigidScripts.length;i < n;i++)\n\t\t\t\t\trigidScripts[i].onTriggerEnter(receiveCol);\n\t\t\t\t\tfor (i=0,n=receiveScripts.length;i < n;i++)\n\t\t\t\t\treceiveScripts[i].onTriggerEnter(rigidCol);\n\t\t\t\t\tcolMan.event(/*laya.events.Event.TRIGGER_ENTER*/\"triggerenter\",[rigidCol,receiveCol]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tCollisionManager._triggerCollision=function(){\n\t\tvar colList=Layer._collsionTestList;\n\t\tvar colCount=colList.length;\n\t\tvar colMat=Physics._layerCollsionMatrix;\n\t\tfor (var i=0;i < colCount;i++){\n\t\t\tvar row=colList[i];\n\t\t\tvar rowLayer=Layer.getLayerByNumber(row);\n\t\t\tvar rowColliders=rowLayer._colliders;\n\t\t\tvar rowRigOffset=rowLayer._nonRigidbodyOffset;\n\t\t\tfor (var j=colCount-1;j >=i;j--){\n\t\t\t\tvar col=colList[j];\n\t\t\t\tvar test=colMat[row][(/*laya.d3.core.Layer.maxCount*/31-1)-col];\n\t\t\t\tif (test){\n\t\t\t\t\tvar k=0,c=0,x=0,z=0;\n\t\t\t\t\tvar rowCol,colCol,rowScripts;\n\t\t\t\t\tvar colLayer=Layer.getLayerByNumber(col);\n\t\t\t\t\tvar colColliders=colLayer._colliders;\n\t\t\t\t\tvar colRigOffset=colLayer._nonRigidbodyOffset;\n\t\t\t\t\tif (rowLayer!==colLayer){\n\t\t\t\t\t\tfor (k=0;k < rowRigOffset;k++){\n\t\t\t\t\t\t\trowCol=rowColliders[k];\n\t\t\t\t\t\t\tif (rowCol.enable){\n\t\t\t\t\t\t\t\trowScripts=rowCol.owner._scripts;\n\t\t\t\t\t\t\t\tfor (x=0,z=colRigOffset;x < z;x++){\n\t\t\t\t\t\t\t\t\tcolCol=colColliders[x];\n\t\t\t\t\t\t\t\t\t(colCol.enable)&& (CollisionManager._onTrigger(rowCol,colCol,rowScripts,colCol.owner._scripts,true));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor (x=colRigOffset,z=colColliders.length;x < z;x++){\n\t\t\t\t\t\t\t\t\tcolCol=colColliders[x];\n\t\t\t\t\t\t\t\t\t(colCol.enable)&& (CollisionManager._onTrigger(rowCol,colCol,rowScripts,colCol.owner._scripts,false));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (k=rowRigOffset,c=rowColliders.length;k < c;k++){\n\t\t\t\t\t\t\trowCol=rowColliders[k];\n\t\t\t\t\t\t\tif (rowCol.enable){\n\t\t\t\t\t\t\t\trowScripts=rowCol.owner._scripts;\n\t\t\t\t\t\t\t\tfor (x=0,z=colLayer._nonRigidbodyOffset;x < z;x++){\n\t\t\t\t\t\t\t\t\tcolCol=colColliders[x];\n\t\t\t\t\t\t\t\t\t(colCol.enable)&& (CollisionManager._onTrigger(colCol,rowCol,rowScripts,colCol.owner._scripts,false));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tfor (k=0;k < rowRigOffset;k++){\n\t\t\t\t\t\t\trowCol=rowColliders[k];\n\t\t\t\t\t\t\tif (rowCol.enable){\n\t\t\t\t\t\t\t\trowScripts=rowCol.owner._scripts;\n\t\t\t\t\t\t\t\tfor (x=k+1,z=rowRigOffset;x < z;x++){\n\t\t\t\t\t\t\t\t\tcolCol=colColliders[x];\n\t\t\t\t\t\t\t\t\t(colCol.enable)&& (CollisionManager._onTrigger(rowCol,colCol,rowScripts,colCol.owner._scripts,true));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor (x=rowRigOffset,z=rowColliders.length;x < z;x++){\n\t\t\t\t\t\t\t\t\tcolCol=colColliders[x];\n\t\t\t\t\t\t\t\t\t(colCol.enable)&& (CollisionManager._onTrigger(rowCol,colCol,rowScripts,colCol.owner._scripts,false));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn CollisionManager;\n})(EventDispatcher)\n\n\n/**\n*<code>SplineCurvePosition</code> 类用于通过顶点创建闪光插值。\n*/\n//class laya.d3.core.glitter.SplineCurvePosition extends laya.d3.core.glitter.SplineCurvePositionVelocity\nvar SplineCurvePosition=(function(_super){\n\t/**\n\t*创建一个 <code>SplineCurvePosition</code> 实例。\n\t*/\n\tfunction SplineCurvePosition(){\n\t\tSplineCurvePosition.__super.call(this);\n\t}\n\n\t__class(SplineCurvePosition,'laya.d3.core.glitter.SplineCurvePosition',_super);\n\tvar __proto=SplineCurvePosition.prototype;\n\t/**\n\t*@private\n\t*计算速度。\n\t*/\n\t__proto._CalcVelocity=function(left,right,out){\n\t\tVector3.subtract(left,right,out);\n\t\tVector3.scale(out,0.5,out);\n\t}\n\n\t/**\n\t*初始化插值所需信息。\n\t*@param lastPosition0 顶点0的上次位置。\n\t*@param position0 顶点0的位置。\n\t*@param lastPosition1 顶点1的上次位置。\n\t*@param position1 顶点1的位置。\n\t*/\n\t__proto.Init=function(lastPosition0,position0,lastPosition1,position1){\n\t\tthis._CalcVelocity(position0,lastPosition0,this._tempVector30);\n\t\tthis._CalcVelocity(position1,lastPosition1,this._tempVector31);\n\t\t_super.prototype.Init.call(this,position0,this._tempVector30,position1,this._tempVector31);\n\t}\n\n\treturn SplineCurvePosition;\n})(SplineCurvePositionVelocity)\n\n\n/**\n*<code>BoxShape</code> 类用于创建球形粒子形状。\n*/\n//class laya.d3.core.particleShuriKen.module.shape.BoxShape extends laya.d3.core.particleShuriKen.module.shape.BaseShape\nvar BoxShape=(function(_super){\n\tfunction BoxShape(){\n\t\t/**发射器X轴长度。*/\n\t\tthis.x=NaN;\n\t\t/**发射器Y轴长度。*/\n\t\tthis.y=NaN;\n\t\t/**发射器Z轴长度。*/\n\t\tthis.z=NaN;\n\t\tBoxShape.__super.call(this);\n\t\tthis.x=1.0;\n\t\tthis.y=1.0;\n\t\tthis.z=1.0;\n\t\tthis.randomDirection=false;\n\t}\n\n\t__class(BoxShape,'laya.d3.core.particleShuriKen.module.shape.BoxShape',_super);\n\tvar __proto=BoxShape.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getShapeBoundBox=function(boundBox){\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=-this.x *0.5;\n\t\tminE[1]=-this.y *0.5;\n\t\tminE[2]=-this.z *0.5;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=this.x *0.5;\n\t\tmaxE[1]=this.y *0.5;\n\t\tmaxE[2]=this.z *0.5;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getSpeedBoundBox=function(boundBox){\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=0.0;\n\t\tminE[1]=0.0;\n\t\tminE[2]=0.0;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=0.0;\n\t\tmaxE[1]=1.0;\n\t\tmaxE[2]=0.0;\n\t}\n\n\t/**\n\t*用于生成粒子初始位置和方向。\n\t*@param position 粒子位置。\n\t*@param direction 粒子方向。\n\t*/\n\t__proto.generatePositionAndDirection=function(position,direction,rand,randomSeeds){\n\t\tvar rpE=position.elements;\n\t\tvar rdE=direction.elements;\n\t\tif (rand){\n\t\t\trand.seed=randomSeeds[16];\n\t\t\tShapeUtils._randomPointInsideHalfUnitBox(position,rand);\n\t\t\trandomSeeds[16]=rand.seed;\n\t\t\t}else {\n\t\t\tShapeUtils._randomPointInsideHalfUnitBox(position);\n\t\t}\n\t\trpE[0]=this.x *rpE[0];\n\t\trpE[1]=this.y *rpE[1];\n\t\trpE[2]=this.z *rpE[2];\n\t\tif (this.randomDirection){\n\t\t\tif (rand){\n\t\t\t\trand.seed=randomSeeds[17];\n\t\t\t\tShapeUtils._randomPointUnitSphere(direction,rand);\n\t\t\t\trandomSeeds[17]=rand.seed;\n\t\t\t\t}else {\n\t\t\t\tShapeUtils._randomPointUnitSphere(direction);\n\t\t\t}\n\t\t\t}else {\n\t\t\trdE[0]=0.0;\n\t\t\trdE[1]=0.0;\n\t\t\trdE[2]=1.0;\n\t\t}\n\t}\n\n\t__proto.cloneTo=function(destObject){\n\t\t_super.prototype.cloneTo.call(this,destObject);\n\t\tvar destShape=destObject;\n\t\tdestShape.x=this.x;\n\t\tdestShape.y=this.y;\n\t\tdestShape.z=this.z;\n\t\tdestShape.randomDirection=this.randomDirection;\n\t}\n\n\treturn BoxShape;\n})(BaseShape)\n\n\n/**\n*<code>CircleShape</code> 类用于创建环形粒子形状。\n*/\n//class laya.d3.core.particleShuriKen.module.shape.CircleShape extends laya.d3.core.particleShuriKen.module.shape.BaseShape\nvar CircleShape=(function(_super){\n\tfunction CircleShape(){\n\t\t/**发射器半径。*/\n\t\tthis.radius=NaN;\n\t\t/**环形弧度。*/\n\t\tthis.arc=NaN;\n\t\t/**从边缘发射。*/\n\t\tthis.emitFromEdge=false;\n\t\tCircleShape.__super.call(this);\n\t\tthis.radius=1.0;\n\t\tthis.arc=360.0 / 180.0 *Math.PI;\n\t\tthis.emitFromEdge=false;\n\t\tthis.randomDirection=false;\n\t}\n\n\t__class(CircleShape,'laya.d3.core.particleShuriKen.module.shape.CircleShape',_super);\n\tvar __proto=CircleShape.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getShapeBoundBox=function(boundBox){\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=minE[2]=-this.radius;\n\t\tminE[1]=0;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=maxE[2]=this.radius;\n\t\tmaxE[1]=0;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getSpeedBoundBox=function(boundBox){\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=minE[1]=-1;\n\t\tminE[2]=0;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=maxE[1]=1;\n\t\tmaxE[2]=0;\n\t}\n\n\t/**\n\t*用于生成粒子初始位置和方向。\n\t*@param position 粒子位置。\n\t*@param direction 粒子方向。\n\t*/\n\t__proto.generatePositionAndDirection=function(position,direction,rand,randomSeeds){\n\t\tvar rpE=position.elements;\n\t\tvar positionPointE=CircleShape._tempPositionPoint.elements;\n\t\tif (rand){\n\t\t\trand.seed=randomSeeds[16];\n\t\t\tif (this.emitFromEdge)\n\t\t\t\tShapeUtils._randomPointUnitArcCircle(this.arc,CircleShape._tempPositionPoint,rand);\n\t\t\telse\n\t\t\tShapeUtils._randomPointInsideUnitArcCircle(this.arc,CircleShape._tempPositionPoint,rand);\n\t\t\trandomSeeds[16]=rand.seed;\n\t\t\t}else {\n\t\t\tif (this.emitFromEdge)\n\t\t\t\tShapeUtils._randomPointUnitArcCircle(this.arc,CircleShape._tempPositionPoint);\n\t\t\telse\n\t\t\tShapeUtils._randomPointInsideUnitArcCircle(this.arc,CircleShape._tempPositionPoint);\n\t\t}\n\t\trpE[0]=-positionPointE[0];\n\t\trpE[1]=positionPointE[1];\n\t\trpE[2]=0;\n\t\tVector3.scale(position,this.radius,position);\n\t\tif (this.randomDirection){\n\t\t\tif (rand){\n\t\t\t\trand.seed=randomSeeds[17];\n\t\t\t\tShapeUtils._randomPointUnitSphere(direction,rand);\n\t\t\t\trandomSeeds[17]=rand.seed;\n\t\t\t\t}else {\n\t\t\t\tShapeUtils._randomPointUnitSphere(direction);\n\t\t\t}\n\t\t\t}else {\n\t\t\tposition.cloneTo(direction);\n\t\t}\n\t}\n\n\t__proto.cloneTo=function(destObject){\n\t\t_super.prototype.cloneTo.call(this,destObject);\n\t\tvar destShape=destObject;\n\t\tdestShape.radius=this.radius;\n\t\tdestShape.arc=this.arc;\n\t\tdestShape.emitFromEdge=this.emitFromEdge;\n\t\tdestShape.randomDirection=this.randomDirection;\n\t}\n\n\t__static(CircleShape,\n\t['_tempPositionPoint',function(){return this._tempPositionPoint=new Vector2();}\n\t]);\n\treturn CircleShape;\n})(BaseShape)\n\n\n/**\n*<code>ConeShape</code> 类用于创建锥形粒子形状。\n*/\n//class laya.d3.core.particleShuriKen.module.shape.ConeShape extends laya.d3.core.particleShuriKen.module.shape.BaseShape\nvar ConeShape=(function(_super){\n\tfunction ConeShape(){\n\t\t/**发射角度。*/\n\t\tthis.angle=NaN;\n\t\t/**发射器半径。*/\n\t\tthis.radius=NaN;\n\t\t/**椎体长度。*/\n\t\tthis.length=NaN;\n\t\t/**发射类型,0为Base,1为BaseShell,2为Volume,3为VolumeShell。*/\n\t\tthis.emitType=0;\n\t\tConeShape.__super.call(this);\n\t\tthis.angle=25.0 / 180.0 *Math.PI;\n\t\tthis.radius=1.0;\n\t\tthis.length=5.0;\n\t\tthis.emitType=0;\n\t\tthis.randomDirection=false;\n\t}\n\n\t__class(ConeShape,'laya.d3.core.particleShuriKen.module.shape.ConeShape',_super);\n\tvar __proto=ConeShape.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getShapeBoundBox=function(boundBox){\n\t\tvar coneRadius2=this.radius+this.length *Math.sin(this.angle);\n\t\tvar coneLength=this.length *Math.cos(this.angle);\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=minE[1]=-coneRadius2;\n\t\tminE[2]=0;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=maxE[1]=coneRadius2;\n\t\tmaxE[2]=coneLength;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getSpeedBoundBox=function(boundBox){\n\t\tvar sinA=Math.sin(this.angle);\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=minE[1]=-sinA;\n\t\tminE[2]=0;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=minE[1]=sinA;\n\t\tmaxE[2]=1;\n\t}\n\n\t/**\n\t*用于生成粒子初始位置和方向。\n\t*@param position 粒子位置。\n\t*@param direction 粒子方向。\n\t*/\n\t__proto.generatePositionAndDirection=function(position,direction,rand,randomSeeds){\n\t\tvar rpE=position.elements;\n\t\tvar rdE=direction.elements;\n\t\tvar positionPointE=ConeShape._tempPositionPoint.elements;\n\t\tvar positionX=NaN;\n\t\tvar positionY=NaN;\n\t\tvar directionPointE;\n\t\tvar dirCosA=Math.cos(this.angle);\n\t\tvar dirSinA=Math.sin(this.angle);\n\t\tswitch (this.emitType){\n\t\t\tcase 0:\n\t\t\t\tif (rand){\n\t\t\t\t\trand.seed=randomSeeds[16];\n\t\t\t\t\tShapeUtils._randomPointInsideUnitCircle(ConeShape._tempPositionPoint,rand);\n\t\t\t\t\trandomSeeds[16]=rand.seed;\n\t\t\t\t\t}else {\n\t\t\t\t\tShapeUtils._randomPointInsideUnitCircle(ConeShape._tempPositionPoint);\n\t\t\t\t}\n\t\t\t\tpositionX=positionPointE[0];\n\t\t\t\tpositionY=positionPointE[1];\n\t\t\t\trpE[0]=positionX *this.radius;\n\t\t\t\trpE[1]=positionY *this.radius;\n\t\t\t\trpE[2]=0;\n\t\t\t\tif (this.randomDirection){\n\t\t\t\t\tif (rand){\n\t\t\t\t\t\trand.seed=randomSeeds[17];\n\t\t\t\t\t\tShapeUtils._randomPointInsideUnitCircle(ConeShape._tempDirectionPoint,rand);\n\t\t\t\t\t\trandomSeeds[17]=rand.seed;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tShapeUtils._randomPointInsideUnitCircle(ConeShape._tempDirectionPoint);\n\t\t\t\t\t}\n\t\t\t\t\tdirectionPointE=ConeShape._tempDirectionPoint.elements;\n\t\t\t\t\trdE[0]=directionPointE[0] *dirSinA;\n\t\t\t\t\trdE[1]=directionPointE[1] *dirSinA;\n\t\t\t\t\t}else {\n\t\t\t\t\trdE[0]=positionX *dirSinA;\n\t\t\t\t\trdE[1]=positionY *dirSinA;\n\t\t\t\t}\n\t\t\t\trdE[2]=dirCosA;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tif (rand){\n\t\t\t\t\trand.seed=randomSeeds[16];\n\t\t\t\t\tShapeUtils._randomPointUnitCircle(ConeShape._tempPositionPoint,rand);\n\t\t\t\t\trandomSeeds[16]=rand.seed;\n\t\t\t\t\t}else {\n\t\t\t\t\tShapeUtils._randomPointUnitCircle(ConeShape._tempPositionPoint);\n\t\t\t\t}\n\t\t\t\tpositionX=positionPointE[0];\n\t\t\t\tpositionY=positionPointE[1];\n\t\t\t\trpE[0]=positionX *this.radius;\n\t\t\t\trpE[1]=positionY *this.radius;\n\t\t\t\trpE[2]=0;\n\t\t\t\tif (this.randomDirection){\n\t\t\t\t\tif (rand){\n\t\t\t\t\t\trand.seed=randomSeeds[17];\n\t\t\t\t\t\tShapeUtils._randomPointInsideUnitCircle(ConeShape._tempDirectionPoint,rand);\n\t\t\t\t\t\trandomSeeds[17]=rand.seed;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tShapeUtils._randomPointInsideUnitCircle(ConeShape._tempDirectionPoint);\n\t\t\t\t\t}\n\t\t\t\t\tdirectionPointE=ConeShape._tempDirectionPoint.elements;\n\t\t\t\t\trdE[0]=directionPointE[0] *dirSinA;\n\t\t\t\t\trdE[1]=directionPointE[1] *dirSinA;\n\t\t\t\t\t}else {\n\t\t\t\t\trdE[0]=positionX *dirSinA;\n\t\t\t\t\trdE[1]=positionY *dirSinA;\n\t\t\t\t}\n\t\t\t\trdE[2]=dirCosA;\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (rand){\n\t\t\t\t\trand.seed=randomSeeds[16];\n\t\t\t\t\tShapeUtils._randomPointInsideUnitCircle(ConeShape._tempPositionPoint,rand);\n\t\t\t\t\t}else {\n\t\t\t\t\tShapeUtils._randomPointInsideUnitCircle(ConeShape._tempPositionPoint);\n\t\t\t\t}\n\t\t\t\tpositionX=positionPointE[0];\n\t\t\t\tpositionY=positionPointE[1];\n\t\t\t\trpE[0]=positionX *this.radius;\n\t\t\t\trpE[1]=positionY *this.radius;\n\t\t\t\trpE[2]=0;\n\t\t\t\trdE[0]=positionX *dirSinA;\n\t\t\t\trdE[1]=positionY *dirSinA;\n\t\t\t\trdE[2]=dirCosA;\n\t\t\t\tVector3.normalize(direction,direction);\n\t\t\t\tif (rand){\n\t\t\t\t\tVector3.scale(direction,this.length *rand.getFloat(),direction);\n\t\t\t\t\trandomSeeds[16]=rand.seed;\n\t\t\t\t\t}else {\n\t\t\t\t\tVector3.scale(direction,this.length *Math.random(),direction);\n\t\t\t\t}\n\t\t\t\tVector3.add(position,direction,position);\n\t\t\t\tif (this.randomDirection){\n\t\t\t\t\tif (rand){\n\t\t\t\t\t\trand.seed=randomSeeds[17];\n\t\t\t\t\t\tShapeUtils._randomPointUnitSphere(direction,rand);\n\t\t\t\t\t\trandomSeeds[17]=rand.seed;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tShapeUtils._randomPointUnitSphere(direction);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tif (rand){\n\t\t\t\t\trand.seed=randomSeeds[16];\n\t\t\t\t\tShapeUtils._randomPointUnitCircle(ConeShape._tempPositionPoint,rand);\n\t\t\t\t\t}else {\n\t\t\t\t\tShapeUtils._randomPointUnitCircle(ConeShape._tempPositionPoint);\n\t\t\t\t}\n\t\t\t\tpositionX=positionPointE[0];\n\t\t\t\tpositionY=positionPointE[1];\n\t\t\t\trpE[0]=positionX *this.radius;\n\t\t\t\trpE[1]=positionY *this.radius;\n\t\t\t\trpE[2]=0;\n\t\t\t\trdE[0]=positionX *dirSinA;\n\t\t\t\trdE[1]=positionY *dirSinA;\n\t\t\t\trdE[2]=dirCosA;\n\t\t\t\tVector3.normalize(direction,direction);\n\t\t\t\tif (rand){\n\t\t\t\t\tVector3.scale(direction,this.length *rand.getFloat(),direction);\n\t\t\t\t\trandomSeeds[16]=rand.seed;\n\t\t\t\t\t}else {\n\t\t\t\t\tVector3.scale(direction,this.length *Math.random(),direction);\n\t\t\t\t}\n\t\t\t\tVector3.add(position,direction,position);\n\t\t\t\tif (this.randomDirection){\n\t\t\t\t\tif (rand){\n\t\t\t\t\t\trand.seed=randomSeeds[17];\n\t\t\t\t\t\tShapeUtils._randomPointUnitSphere(direction,rand);\n\t\t\t\t\t\trandomSeeds[17]=rand.seed;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tShapeUtils._randomPointUnitSphere(direction);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"ConeShape:emitType is invalid.\");\n\t\t\t}\n\t}\n\n\t__proto.cloneTo=function(destObject){\n\t\t_super.prototype.cloneTo.call(this,destObject);\n\t\tvar destShape=destObject;\n\t\tdestShape.angle=this.angle;\n\t\tdestShape.radius=this.radius;\n\t\tdestShape.length=this.length;\n\t\tdestShape.emitType=this.emitType;\n\t\tdestShape.randomDirection=this.randomDirection;\n\t}\n\n\t__static(ConeShape,\n\t['_tempPositionPoint',function(){return this._tempPositionPoint=new Vector2();},'_tempDirectionPoint',function(){return this._tempDirectionPoint=new Vector2();}\n\t]);\n\treturn ConeShape;\n})(BaseShape)\n\n\n/**\n*<code>HemisphereShape</code> 类用于创建半球形粒子形状。\n*/\n//class laya.d3.core.particleShuriKen.module.shape.HemisphereShape extends laya.d3.core.particleShuriKen.module.shape.BaseShape\nvar HemisphereShape=(function(_super){\n\tfunction HemisphereShape(){\n\t\t/**发射器半径。*/\n\t\tthis.radius=NaN;\n\t\t/**从外壳发射。*/\n\t\tthis.emitFromShell=false;\n\t\tHemisphereShape.__super.call(this);\n\t\tthis.radius=1.0;\n\t\tthis.emitFromShell=false;\n\t\tthis.randomDirection=false;\n\t}\n\n\t__class(HemisphereShape,'laya.d3.core.particleShuriKen.module.shape.HemisphereShape',_super);\n\tvar __proto=HemisphereShape.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getShapeBoundBox=function(boundBox){\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=minE[1]=minE[2]=-this.radius;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=maxE[1]=this.radius;\n\t\tmaxE[2]=0;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getSpeedBoundBox=function(boundBox){\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=minE[1]=-1;\n\t\tminE[2]=0;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=maxE[1]=maxE[2]=1;\n\t}\n\n\t/**\n\t*用于生成粒子初始位置和方向。\n\t*@param position 粒子位置。\n\t*@param direction 粒子方向。\n\t*/\n\t__proto.generatePositionAndDirection=function(position,direction,rand,randomSeeds){\n\t\tvar rpE=position.elements;\n\t\tif (rand){\n\t\t\trand.seed=randomSeeds[16];\n\t\t\tif (this.emitFromShell)\n\t\t\t\tShapeUtils._randomPointUnitSphere(position,rand);\n\t\t\telse\n\t\t\tShapeUtils._randomPointInsideUnitSphere(position,rand);\n\t\t\trandomSeeds[16]=rand.seed;\n\t\t\t}else {\n\t\t\tif (this.emitFromShell)\n\t\t\t\tShapeUtils._randomPointUnitSphere(position);\n\t\t\telse\n\t\t\tShapeUtils._randomPointInsideUnitSphere(position);\n\t\t}\n\t\tVector3.scale(position,this.radius,position);\n\t\tvar z=rpE[2];\n\t\t(z < 0.0)&& (rpE[2]=z *-1.0);\n\t\tif (this.randomDirection){\n\t\t\tif (rand){\n\t\t\t\trand.seed=randomSeeds[17];\n\t\t\t\tShapeUtils._randomPointUnitSphere(direction,rand);\n\t\t\t\trandomSeeds[17]=rand.seed;\n\t\t\t\t}else {\n\t\t\t\tShapeUtils._randomPointUnitSphere(direction);\n\t\t\t}\n\t\t\t}else {\n\t\t\tposition.cloneTo(direction);\n\t\t}\n\t}\n\n\t__proto.cloneTo=function(destObject){\n\t\t_super.prototype.cloneTo.call(this,destObject);\n\t\tvar destShape=destObject;\n\t\tdestShape.radius=this.radius;\n\t\tdestShape.emitFromShell=this.emitFromShell;\n\t\tdestShape.randomDirection=this.randomDirection;\n\t}\n\n\treturn HemisphereShape;\n})(BaseShape)\n\n\n/**\n*<code>SphereShape</code> 类用于创建球形粒子形状。\n*/\n//class laya.d3.core.particleShuriKen.module.shape.SphereShape extends laya.d3.core.particleShuriKen.module.shape.BaseShape\nvar SphereShape=(function(_super){\n\tfunction SphereShape(){\n\t\t/**发射器半径。*/\n\t\tthis.radius=NaN;\n\t\t/**从外壳发射。*/\n\t\tthis.emitFromShell=false;\n\t\tSphereShape.__super.call(this);\n\t\tthis.radius=1.0;\n\t\tthis.emitFromShell=false;\n\t\tthis.randomDirection=false;\n\t}\n\n\t__class(SphereShape,'laya.d3.core.particleShuriKen.module.shape.SphereShape',_super);\n\tvar __proto=SphereShape.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getShapeBoundBox=function(boundBox){\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=minE[1]=minE[2]=-this.radius;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=maxE[1]=maxE[2]=this.radius;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getSpeedBoundBox=function(boundBox){\n\t\tvar minE=boundBox.min.elements;\n\t\tminE[0]=minE[1]=minE[2]=-1;\n\t\tvar maxE=boundBox.max.elements;\n\t\tmaxE[0]=maxE[1]=maxE[2]=1;\n\t}\n\n\t/**\n\t*用于生成粒子初始位置和方向。\n\t*@param position 粒子位置。\n\t*@param direction 粒子方向。\n\t*/\n\t__proto.generatePositionAndDirection=function(position,direction,rand,randomSeeds){\n\t\tif (rand){\n\t\t\trand.seed=randomSeeds[16];\n\t\t\tif (this.emitFromShell)\n\t\t\t\tShapeUtils._randomPointUnitSphere(position,rand);\n\t\t\telse\n\t\t\tShapeUtils._randomPointInsideUnitSphere(position,rand);\n\t\t\trandomSeeds[16]=rand.seed;\n\t\t\t}else {\n\t\t\tif (this.emitFromShell)\n\t\t\t\tShapeUtils._randomPointUnitSphere(position);\n\t\t\telse\n\t\t\tShapeUtils._randomPointInsideUnitSphere(position);\n\t\t}\n\t\tVector3.scale(position,this.radius,position);\n\t\tif (this.randomDirection){\n\t\t\tif (rand){\n\t\t\t\trand.seed=randomSeeds[17];\n\t\t\t\tShapeUtils._randomPointUnitSphere(direction,rand);\n\t\t\t\trandomSeeds[17]=rand.seed;\n\t\t\t\t}else {\n\t\t\t\tShapeUtils._randomPointUnitSphere(direction);\n\t\t\t}\n\t\t\t}else {\n\t\t\tposition.cloneTo(direction);\n\t\t}\n\t}\n\n\t__proto.cloneTo=function(destObject){\n\t\t_super.prototype.cloneTo.call(this,destObject);\n\t\tvar destShape=destObject;\n\t\tdestShape.radius=this.radius;\n\t\tdestShape.emitFromShell=this.emitFromShell;\n\t\tdestShape.randomDirection=this.randomDirection;\n\t}\n\n\treturn SphereShape;\n})(BaseShape)\n\n\n/**\n*@private\n*/\n//class laya.d3.core.render.SubMeshRenderElement extends laya.d3.core.render.RenderElement\nvar SubMeshRenderElement=(function(_super){\n\tfunction SubMeshRenderElement(){\n\t\t/**@private */\n\t\tthis._batchIndexStart=0;\n\t\t/**@private */\n\t\tthis._batchIndexEnd=0;\n\t\t/**@private */\n\t\tthis._skinAnimationDatas=null;\n\t\tSubMeshRenderElement.__super.call(this);\n\t}\n\n\t__class(SubMeshRenderElement,'laya.d3.core.render.SubMeshRenderElement',_super);\n\treturn SubMeshRenderElement;\n})(RenderElement)\n\n\n/**\n*@private\n*<code>ShaderCompile</code> 类用于创建Shader编译类型。\n*/\n//class laya.d3.shader.ShaderCompile3D extends laya.webgl.utils.ShaderCompile\nvar ShaderCompile3D=(function(_super){\n\tfunction ShaderCompile3D(name,vs,ps,attributeMap,uniformMap,includeFiles){\n\t\t/**@private */\n\t\tthis._name=NaN;\n\t\t/**@private */\n\t\tthis._attributeMap=null;\n\t\t/**@private */\n\t\tthis._renderElementUniformMap=null;\n\t\t/**@private */\n\t\tthis._materialUniformMap=null;\n\t\t/**@private */\n\t\tthis._spriteUniformMap=null;\n\t\t/**@private */\n\t\tthis._cameraUniformMap=null;\n\t\t/**@private */\n\t\tthis._sceneUniformMap=null;\n\t\tthis.sharders=null;\n\t\t/**@private */\n\t\tthis._spriteDefineCounter=3;\n\t\t/**@private */\n\t\tthis._spriteInt2name=[];\n\t\t/**@private */\n\t\tthis._spriteName2Int={};\n\t\t/**@private */\n\t\tthis._materialDefineCounter=1;\n\t\t/**@private */\n\t\tthis._materialInt2name=[];\n\t\t/**@private */\n\t\tthis._materialName2Int={};\n\t\tthis._conchShader=null;\n\t\tthis._name=name;\n\t\tthis._renderElementUniformMap={};\n\t\tthis._materialUniformMap={};\n\t\tthis._spriteUniformMap={};\n\t\tthis._cameraUniformMap={};\n\t\tthis._sceneUniformMap={};\n\t\tthis.sharders=[];\n\t\tthis._spriteInt2name[ParallelSplitShadowMap.SHADERDEFINE_RECEIVE_SHADOW]=\"RECEIVESHADOW\";\n\t\tthis._spriteInt2name[RenderableSprite3D.SHADERDEFINE_SCALEOFFSETLIGHTINGMAPUV]=\"SCALEOFFSETLIGHTINGMAPUV\";\n\t\tthis._spriteInt2name[RenderableSprite3D.SAHDERDEFINE_LIGHTMAP]=\"LIGHTMAP\";\n\t\tthis._spriteInt2name[SkinnedMeshSprite3D.SHADERDEFINE_BONE]=\"BONE\";\n\t\tthis._materialInt2name[BaseMaterial.SHADERDEFINE_ALPHATEST]=\"ALPHATEST\";\n\t\tvar defineMap={};\n\t\tShaderCompile3D.__super.call(this,name,vs,ps,null,defineMap);\n\t\tthis._attributeMap=attributeMap;\n\t\tvar renderElementUnifCount=0,materialUnifCount=0,spriteUnifCount=0;\n\t\tvar key;\n\t\tfor (key in uniformMap){\n\t\t\tvar uniformParam=uniformMap[key];\n\t\t\tswitch (uniformParam[1]){\n\t\t\t\tcase /*laya.d3.shader.Shader3D.PERIOD_RENDERELEMENT*/0:\n\t\t\t\t\tthis._renderElementUniformMap[key]=uniformParam[0];\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1:\n\t\t\t\t\tthis._materialUniformMap[key]=uniformParam[0];\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2:\n\t\t\t\t\tthis._spriteUniformMap[key]=uniformParam[0];\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3:\n\t\t\t\t\tthis._cameraUniformMap[key]=uniformParam[0];\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.d3.shader.Shader3D.PERIOD_SCENE*/4:\n\t\t\t\t\tthis._sceneUniformMap[key]=uniformParam[0];\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"ShaderCompile3D: period is unkonw.\");\n\t\t\t\t}\n\t\t}\n\t}\n\n\t__class(ShaderCompile3D,'laya.d3.shader.ShaderCompile3D',_super);\n\tvar __proto=ShaderCompile3D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._definesToNameDic=function(value,int2Name){\n\t\tvar o={};\n\t\tvar d=1;\n\t\tfor (var i=0;i < 32;i++){\n\t\t\td=1 << i;\n\t\t\tif (d > value)break ;\n\t\t\tif (value & d){\n\t\t\t\tvar name=int2Name[d];\n\t\t\t\tname && (o[name]=\"\");\n\t\t\t}\n\t\t}\n\t\treturn o;\n\t}\n\n\t/**\n\t*根据宏动态生成shader文件，支持#include?COLOR_FILTER \"parts/ColorFilter_ps_logic.glsl\";条件嵌入文件\n\t*@param name\n\t*@param vs\n\t*@param ps\n\t*@param define 宏定义，格式:{name:value...}\n\t*@return\n\t*/\n\t__proto.withCompile=function(publicDefine,spriteDefine,materialDefine){\n\t\tvar shader;\n\t\tvar spriteDefShaders,materialDefShaders;\n\t\tspriteDefShaders=this.sharders[publicDefine];\n\t\tif (spriteDefShaders){\n\t\t\tmaterialDefShaders=spriteDefShaders[spriteDefine];\n\t\t\tif (materialDefShaders){\n\t\t\t\tshader=materialDefShaders[materialDefine];\n\t\t\t\tif (shader)\n\t\t\t\t\treturn shader;\n\t\t\t\t}else {\n\t\t\t\tmaterialDefShaders=spriteDefShaders[spriteDefine]=[];\n\t\t\t}\n\t\t\t}else {\n\t\t\tspriteDefShaders=this.sharders[publicDefine]=[];\n\t\t\tmaterialDefShaders=spriteDefShaders[spriteDefine]=[];\n\t\t};\n\t\tvar publicDefGroup=this._definesToNameDic(publicDefine,ShaderCompile3D._globalInt2name);\n\t\tvar spriteDefGroup=this._definesToNameDic(spriteDefine,this._spriteInt2name);\n\t\tvar materialDefGroup=this._definesToNameDic(materialDefine,this._materialInt2name);\n\t\tvar key;\n\t\tif (laya.d3.shader.ShaderCompile3D.debugMode){\n\t\t\tvar publicDefGroupStr=\"\";\n\t\t\tfor (key in publicDefGroup)\n\t\t\tpublicDefGroupStr+=key+\" \";\n\t\t\tvar spriteDefGroupStr=\"\";\n\t\t\tfor (key in spriteDefGroup)\n\t\t\tspriteDefGroupStr+=key+\" \";\n\t\t\tvar materialDefGroupStr=\"\";\n\t\t\tfor (key in materialDefGroup)\n\t\t\tmaterialDefGroupStr+=key+\" \";\n\t\t\tconsole.log(\"ShaderCompile3DDebugMode---(Name:\"+Shader3D.nameKey.getName(this._name)+\" PublicDefine:\"+publicDefine+\" SpriteDefine:\"+spriteDefine+\" MaterialDefine:\"+materialDefine+\" PublicDefineGroup:\"+publicDefGroupStr+\" SpriteDefineGroup:\"+spriteDefGroupStr+\"MaterialDefineGroup: \"+materialDefGroupStr+\")---ShaderCompile3DDebugMode\");\n\t\t};\n\t\tvar defMap={};\n\t\tvar defineStr=\"\";\n\t\tif (publicDefGroup){\n\t\t\tfor (key in publicDefGroup){\n\t\t\t\tdefineStr+=\"#define \"+key+\"\\n\";\n\t\t\t\tdefMap[key]=true;\n\t\t\t}\n\t\t}\n\t\tif (spriteDefGroup){\n\t\t\tfor (key in spriteDefGroup){\n\t\t\t\tdefineStr+=\"#define \"+key+\"\\n\";\n\t\t\t\tdefMap[key]=true;\n\t\t\t}\n\t\t}\n\t\tif (materialDefGroup){\n\t\t\tfor (key in materialDefGroup){\n\t\t\t\tdefineStr+=\"#define \"+key+\"\\n\";\n\t\t\t\tdefMap[key]=true;\n\t\t\t}\n\t\t};\n\t\tvar vs=this._VS.toscript(defMap,[]);\n\t\tvar ps=this._PS.toscript(defMap,[]);\n\t\tshader=Shader3D.create(defineStr+vs.join('\\n'),defineStr+ps.join('\\n'),this._attributeMap,this._sceneUniformMap,this._cameraUniformMap,this._spriteUniformMap,this._materialUniformMap,this._renderElementUniformMap);\n\t\tmaterialDefShaders[materialDefine]=shader;\n\t\treturn shader;\n\t}\n\n\t/**\n\t*通过宏定义预编译shader。\n\t*@param spriteIntToNameDic 精灵宏定义数组。\n\t*@param publicDefine 公共宏定义值。\n\t*@param spriteDefine 精灵宏定义值。\n\t*@param materialDefine 材质宏定义值。\n\t*/\n\t__proto.precompileShaderWithShaderDefine=function(publicDefine,spriteDefine,materialDefine){\n\t\tthis.withCompile(publicDefine,spriteDefine,materialDefine);\n\t}\n\n\t/**\n\t*注册材质宏定义。\n\t*@param name 宏定义名称。\n\t*@return\n\t*/\n\t__proto.addMaterialDefines=function(shaderdefines){\n\t\tvar defines=shaderdefines.defines;\n\t\tfor (var k in defines){\n\t\t\tvar name=defines[k];\n\t\t\tvar i=parseInt(k);\n\t\t\tthis._materialInt2name[i]=name;\n\t\t\tthis._materialName2Int[name]=i;\n\t\t}\n\t}\n\n\t/**\n\t*注册精灵宏定义。\n\t*@param name 宏定义名称。\n\t*@return\n\t*/\n\t__proto.addSpriteDefines=function(shaderdefines){\n\t\tvar defines=shaderdefines.defines;\n\t\tfor (var k in defines){\n\t\t\tvar name=defines[k];\n\t\t\tvar i=parseInt(k);\n\t\t\tthis._spriteInt2name[i]=name;\n\t\t\tthis._spriteName2Int[name]=i;\n\t\t}\n\t}\n\n\t/**\n\t*通过名称获取宏定义值。\n\t*@param name 名称。\n\t*@return 宏定义值。\n\t*/\n\t__proto.getMaterialDefineByName=function(name){\n\t\treturn this._materialName2Int[name];\n\t}\n\n\t/**\n\t*注册材质宏定义。\n\t*@param name 宏定义名称。\n\t*@return\n\t*/\n\t__proto.registerMaterialDefine=function(name){\n\t\tvar value=Math.pow(2,this._materialDefineCounter++);\n\t\tthis._materialInt2name[value]=name;\n\t\tthis._materialName2Int[name]=value;\n\t\treturn value;\n\t}\n\n\t/**\n\t*注册精灵宏定义。\n\t*@param name 宏定义名称。\n\t*@return\n\t*/\n\t__proto.registerSpriteDefine=function(name){\n\t\tvar value=Math.pow(2,this._spriteDefineCounter++);\n\t\tthis._spriteInt2name[value]=name;\n\t\tthis._spriteName2Int[name]=value;\n\t\treturn value;\n\t}\n\n\tShaderCompile3D._globalRegDefine=function(name,value){\n\t\tShaderCompile3D._globalInt2name[value]=name;\n\t}\n\n\tShaderCompile3D.add=function(nameID,vs,ps,attributeMap,uniformMap){\n\t\treturn laya.d3.shader.ShaderCompile3D._preCompileShader[nameID]=new ShaderCompile3D(nameID,vs,ps,attributeMap,uniformMap,ShaderCompile.includes);\n\t}\n\n\tShaderCompile3D.get=function(name){\n\t\treturn laya.d3.shader.ShaderCompile3D._preCompileShader[Shader3D.nameKey.getID(name)];\n\t}\n\n\tShaderCompile3D._preCompileShader={};\n\tShaderCompile3D._globalInt2name=[];\n\tShaderCompile3D.debugMode=false;\n\tShaderCompile3D.SHADERDEFINE_HIGHPRECISION=0x1;\n\tShaderCompile3D.SHADERDEFINE_FOG=0x4;\n\tShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT=0x8;\n\tShaderCompile3D.SHADERDEFINE_POINTLIGHT=0x10;\n\tShaderCompile3D.SHADERDEFINE_SPOTLIGHT=0x20;\n\tShaderCompile3D.SHADERDEFINE_UV0=0x40;\n\tShaderCompile3D.SHADERDEFINE_COLOR=0x80;\n\tShaderCompile3D.SHADERDEFINE_UV1=0x100;\n\tShaderCompile3D.SAHDERDEFINE_DEPTHFOG=0x20000;\n\treturn ShaderCompile3D;\n})(ShaderCompile)\n\n\n/**\n*@private\n*<code>MeshSprite3DStaticBatchManager</code> 类用于网格精灵静态批处理管理。\n*/\n//class laya.d3.graphics.MeshSprite3DStaticBatchManager extends laya.d3.graphics.StaticBatchManager\nvar MeshSprite3DStaticBatchManager=(function(_super){\n\t/**i\n\t*创建一个 <code>MeshSprite3DStaticBatchManager</code> 实例。\n\t*/\n\tfunction MeshSprite3DStaticBatchManager(){\n\t\tMeshSprite3DStaticBatchManager.__super.call(this);\n\t}\n\n\t__class(MeshSprite3DStaticBatchManager,'laya.d3.graphics.MeshSprite3DStaticBatchManager',_super);\n\tvar __proto=MeshSprite3DStaticBatchManager.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._getStaticBatch=function(rootOwner,vertexDeclaration,material,number){\n\t\tvar staticBatch;\n\t\tvar key;\n\t\tif (rootOwner)\n\t\t\tkey=rootOwner.id.toString()+material.id.toString()+vertexDeclaration.id.toString()+number.toString();\n\t\telse\n\t\tkey=material.id.toString()+vertexDeclaration.id.toString()+number.toString();\n\t\tif (!this._staticBatches[key])\n\t\t\tthis._staticBatches[key]=staticBatch=new SubMeshStaticBatch(key,this,rootOwner,vertexDeclaration,material);\n\t\telse\n\t\tstaticBatch=this._staticBatches[key];\n\t\treturn staticBatch;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._initStaticBatchs=function(rootOwner){\n\t\tthis._initBatchRenderElements.sort(MeshSprite3DStaticBatchManager._sortPrepareStaticBatch);\n\t\tvar lastMaterial;\n\t\tvar lastVertexDeclaration;\n\t\tvar lastCanMerage=false;\n\t\tvar curStaticBatch;\n\t\tvar batchNumber=0;\n\t\tfor (var i=0,n=this._initBatchRenderElements.length;i < n;i++){\n\t\t\tvar renderElement=this._initBatchRenderElements[i];\n\t\t\tvar vb=renderElement.renderObj._getVertexBuffer(0);\n\t\t\tvar originalOwner=renderElement._sprite3D;\n\t\t\tif ((lastVertexDeclaration===vb.vertexDeclaration)&& (lastMaterial===renderElement._material)){\n\t\t\t\tvar oldStaticBatch;\n\t\t\t\tif (!lastCanMerage){\n\t\t\t\t\tvar lastRenderObj=this._initBatchRenderElements[i-1];\n\t\t\t\t\tvar lastRenderElement=lastRenderObj.renderObj;\n\t\t\t\t\tvar curRenderElement=renderElement.renderObj;\n\t\t\t\t\tif (((lastRenderElement._getVertexBuffer().vertexCount+curRenderElement._getVertexBuffer().vertexCount)> /*laya.d3.graphics.StaticBatch.maxBatchVertexCount*/65535)){\n\t\t\t\t\t\tlastCanMerage=false;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tcurStaticBatch=this._getStaticBatch(rootOwner,lastVertexDeclaration,lastMaterial,batchNumber);\n\t\t\t\t\t\toldStaticBatch=lastRenderObj._staticBatch;\n\t\t\t\t\t\tif (oldStaticBatch!==curStaticBatch){\n\t\t\t\t\t\t\t(oldStaticBatch)&& (oldStaticBatch._deleteCombineBatchRenderObj(lastRenderObj));\n\t\t\t\t\t\t\tcurStaticBatch._addCombineBatchRenderObj(lastRenderObj);\n\t\t\t\t\t\t}\n\t\t\t\t\t\toldStaticBatch=renderElement._staticBatch;\n\t\t\t\t\t\tif (oldStaticBatch!==curStaticBatch){\n\t\t\t\t\t\t\t(oldStaticBatch)&& (oldStaticBatch._deleteCombineBatchRenderObj(renderElement));\n\t\t\t\t\t\t\tcurStaticBatch._addCombineBatchRenderObj(renderElement);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastCanMerage=true;\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tif (!curStaticBatch._addCombineBatchRenderObjTest(renderElement)){\n\t\t\t\t\t\tlastCanMerage=false;\n\t\t\t\t\t\tbatchNumber++;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\toldStaticBatch=renderElement._staticBatch;\n\t\t\t\t\t\tif (oldStaticBatch!==curStaticBatch){\n\t\t\t\t\t\t\t(oldStaticBatch)&& (oldStaticBatch._deleteCombineBatchRenderObj(renderElement));\n\t\t\t\t\t\t\tcurStaticBatch._addCombineBatchRenderObj(renderElement)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tlastCanMerage=false;\n\t\t\t\tbatchNumber=0;\n\t\t\t}\n\t\t\tlastMaterial=renderElement._material;\n\t\t\tlastVertexDeclaration=vb.vertexDeclaration;\n\t\t}\n\t}\n\n\tMeshSprite3DStaticBatchManager._sortPrepareStaticBatch=function(a,b){\n\t\tvar aRender=a._render,bRender=b._render;\n\t\tvar lightMapIndexOffset=aRender.lightmapIndex-bRender.lightmapIndex;\n\t\tif (lightMapIndexOffset===0){\n\t\t\tvar receiveShadowValue=/*__JS__ */aRender.receiveShadow-bRender.receiveShadow;\n\t\t\tif (receiveShadowValue===0){\n\t\t\t\tvar mainID=a._mainSortID-b._mainSortID;\n\t\t\t\tif (mainID===0){\n\t\t\t\t\treturn a.renderObj.triangleCount-b.renderObj.triangleCount;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn mainID;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\treturn receiveShadowValue;\n\t\t\t}\n\t\t\t}else {\n\t\t\treturn lightMapIndexOffset;\n\t\t}\n\t}\n\n\treturn MeshSprite3DStaticBatchManager;\n})(StaticBatchManager)\n\n\n/**\n*<code>SubMeshStaticBatch</code> 类用于网格静态合并。\n*/\n//class laya.d3.graphics.SubMeshStaticBatch extends laya.d3.graphics.StaticBatch\nvar SubMeshStaticBatch=(function(_super){\n\tfunction SubMeshStaticBatch(key,manager,rootOwner,vertexDeclaration,material){\n\t\t/**@private */\n\t\tthis._batchOwnerIndices=null;\n\t\t/**@private */\n\t\tthis._batchOwners=null;\n\t\t/**@private */\n\t\tthis._needFinishCombine=false;\n\t\t/**@private */\n\t\tthis._currentCombineVertexCount=0;\n\t\t/**@private */\n\t\tthis._currentCombineIndexCount=0;\n\t\t/**@private */\n\t\tthis._vertexDeclaration=null;\n\t\t/**@private */\n\t\tthis._vertexBuffer=null;\n\t\t/**@private */\n\t\tthis._indexBuffer=null;\n\t\tSubMeshStaticBatch.__super.call(this,key,manager,rootOwner);\n\t\tthis._batchOwnerIndices=[];\n\t\tthis._batchOwners=[];\n\t\tthis._needFinishCombine=false;\n\t\tthis._currentCombineVertexCount=0;\n\t\tthis._currentCombineIndexCount=0;\n\t\tthis._vertexDeclaration=vertexDeclaration;\n\t\tthis._material=material;\n\t}\n\n\t__class(SubMeshStaticBatch,'laya.d3.graphics.SubMeshStaticBatch',_super);\n\tvar __proto=SubMeshStaticBatch.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._compareBatchRenderElement=function(a,b){\n\t\treturn (a)._batchIndexStart > (b)._batchIndexStart;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addCombineBatchRenderObjTest=function(renderElement){\n\t\tvar vertexCount=0;\n\t\tvar subMeshVertexCount=(renderElement.renderObj)._vertexCount;\n\t\tif (subMeshVertexCount > 0)\n\t\t\tvertexCount=this._currentCombineVertexCount+subMeshVertexCount;\n\t\telse\n\t\tvertexCount=this._currentCombineVertexCount+renderElement.renderObj._getVertexBuffer().vertexCount;\n\t\tif (vertexCount > 65535)\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addCombineBatchRenderObj=function(renderElement){\n\t\tvar subMesh=renderElement.renderObj;\n\t\tvar subMeshVertexCount=subMesh._vertexCount;\n\t\tthis._initBatchRenderElements.push(renderElement);\n\t\trenderElement._staticBatch=this;\n\t\tif (subMeshVertexCount > 0){\n\t\t\tthis._currentCombineIndexCount+=subMesh._indexCount;\n\t\t\tthis._currentCombineVertexCount+=subMeshVertexCount;\n\t\t\t}else {\n\t\t\tthis._currentCombineIndexCount=this._currentCombineIndexCount+subMesh._getIndexBuffer().indexCount;\n\t\t\tthis._currentCombineVertexCount=this._currentCombineVertexCount+subMesh._getVertexBuffer().vertexCount;\n\t\t}\n\t\tthis._needFinishCombine=true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._deleteCombineBatchRenderObj=function(renderElement){\n\t\tvar subMesh=renderElement.renderObj;\n\t\tvar index=this._initBatchRenderElements.indexOf(renderElement);\n\t\tif (index!==-1){\n\t\t\tthis._initBatchRenderElements.splice(index,1);\n\t\t\trenderElement._staticBatch=null;\n\t\t\tvar subMeshVertexCount=subMesh._vertexCount;\n\t\t\tif (subMeshVertexCount > 0){\n\t\t\t\tthis._currentCombineIndexCount=this._currentCombineIndexCount-subMesh._indexCount;\n\t\t\t\tthis._currentCombineVertexCount=this._currentCombineVertexCount-subMeshVertexCount;\n\t\t\t\t}else {\n\t\t\t\tthis._currentCombineIndexCount=this._currentCombineIndexCount-subMesh._getIndexBuffer().indexCount;\n\t\t\t\tthis._currentCombineVertexCount=this._currentCombineVertexCount-subMesh._getVertexBuffer().vertexCount;\n\t\t\t}\n\t\t\tthis._needFinishCombine=true;\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._finishInit=function(){\n\t\tif (this._needFinishCombine){\n\t\t\tvar curMerVerCount=0;\n\t\t\tvar curIndexCount=0;\n\t\t\tif (this._initBatchRenderElements[0]._sprite3D._render.lightmapIndex >=0){\n\t\t\t\tthis._vertexDeclaration=this._getVertexDecLightMap(this._vertexDeclaration);\n\t\t\t\t}else {\n\t\t\t\tif ((this._material instanceof laya.d3.core.material.StandardMaterial )){\n\t\t\t\t\tif ((this._material).ambientTexture)\n\t\t\t\t\t\tthis._vertexDeclaration=this._getVertexDecLightMap(this._vertexDeclaration);\n\t\t\t\t}\n\t\t\t};\n\t\t\tvar vertexDatas=new Float32Array(this._vertexDeclaration.vertexStride / 4 *this._currentCombineVertexCount);\n\t\t\tvar indexDatas=new Uint16Array(this._currentCombineIndexCount);\n\t\t\tif (this._vertexBuffer){\n\t\t\t\tthis._vertexBuffer.destroy();\n\t\t\t\tthis._indexBuffer.destroy();\n\t\t\t}\n\t\t\tthis._vertexBuffer=VertexBuffer3D.create(this._vertexDeclaration,this._currentCombineVertexCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\t\tthis._indexBuffer=IndexBuffer3D.create(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._currentCombineIndexCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\t\tfor (var i=0,n=this._initBatchRenderElements.length;i < n;i++){\n\t\t\t\tvar renderElement=this._initBatchRenderElements [i];\n\t\t\t\tvar subMesh=renderElement.renderObj;\n\t\t\t\tvar subVertexDatas=subMesh._getStaticBatchBakedVertexs(this._rootOwner ? this._rootOwner._transform :null,renderElement._sprite3D);\n\t\t\t\tvar subIndexDatas=subMesh.getIndices();\n\t\t\t\tvar isInvert=renderElement._sprite3D.transform._isFrontFaceInvert;\n\t\t\t\tvar indexOffset=curMerVerCount / (this._vertexDeclaration.vertexStride / 4)-subMesh._vertexStart;\n\t\t\t\tvar indexStart=curIndexCount;\n\t\t\t\tvar indexEnd=indexStart+subIndexDatas.length;\n\t\t\t\trenderElement._batchIndexStart=indexStart;\n\t\t\t\trenderElement._batchIndexEnd=indexEnd;\n\t\t\t\tindexDatas.set(subIndexDatas,curIndexCount);\n\t\t\t\tvar k=0;\n\t\t\t\tif (isInvert){\n\t\t\t\t\tfor (k=indexStart;k < indexEnd;k+=3){\n\t\t\t\t\t\tindexDatas[k]=indexOffset+indexDatas[k];\n\t\t\t\t\t\tvar index1=indexDatas[k+1];\n\t\t\t\t\t\tvar index2=indexDatas[k+2];\n\t\t\t\t\t\tindexDatas[k+1]=indexOffset+index2;\n\t\t\t\t\t\tindexDatas[k+2]=indexOffset+index1;\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tfor (k=indexStart;k < indexEnd;k+=3){\n\t\t\t\t\t\tindexDatas[k]=indexOffset+indexDatas[k];\n\t\t\t\t\t\tindexDatas[k+1]=indexOffset+indexDatas[k+1];\n\t\t\t\t\t\tindexDatas[k+2]=indexOffset+indexDatas[k+2];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcurIndexCount+=subIndexDatas.length;\n\t\t\t\tvertexDatas.set(subVertexDatas,curMerVerCount);\n\t\t\t\tcurMerVerCount+=subVertexDatas.length;\n\t\t\t}\n\t\t\tthis._vertexBuffer.setData(vertexDatas);\n\t\t\tthis._indexBuffer.setData(indexDatas);\n\t\t\tthis._needFinishCombine=false;\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getCombineRenderElementFromPool=function(){\n\t\tvar renderElement=this._combineRenderElementPool[this._combineRenderElementPoolIndex++];\n\t\treturn renderElement || (this._combineRenderElementPool[this._combineRenderElementPoolIndex-1]=new SubMeshRenderElement());\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getRenderElement=function(renderQueueElements,scene,projectionView){\n\t\tvar lastRenderElement,renderElement;\n\t\tvar count=this._batchRenderElements.length;\n\t\tvar canMerge=true;\n\t\tfor (var i=0;i < count;i++){\n\t\t\trenderElement=this._batchRenderElements [i];\n\t\t\tvar render=renderElement._sprite3D._render;\n\t\t\tvar lastRender;\n\t\t\tif (i!==0){\n\t\t\t\tlastRenderElement=this._batchRenderElements [i-1];\n\t\t\t\tlastRender=lastRenderElement._sprite3D._render;\n\t\t\t\tcanMerge=(lastRender.lightmapIndex!==render.lightmapIndex || lastRender.receiveShadow!==render.receiveShadow || lastRenderElement._batchIndexEnd!==renderElement._batchIndexStart);\n\t\t\t};\n\t\t\tvar merageElement;\n\t\t\tif (canMerge){\n\t\t\t\tmerageElement=this._getCombineRenderElementFromPool();\n\t\t\t\tmerageElement.renderObj=this;\n\t\t\t\tmerageElement._material=this._material;\n\t\t\t\tmerageElement._batchIndexStart=(renderElement)._batchIndexStart;\n\t\t\t\tmerageElement._batchIndexEnd=(renderElement)._batchIndexEnd;\n\t\t\t\tvar lightMapIndex=render.lightmapIndex;\n\t\t\t\tvar cacheLightMapIndex=lightMapIndex+1;\n\t\t\t\tvar lightMapBatchOwnerIndices=this._batchOwnerIndices[cacheLightMapIndex];\n\t\t\t\t(lightMapBatchOwnerIndices)|| (lightMapBatchOwnerIndices=this._batchOwnerIndices[cacheLightMapIndex]=[]);\n\t\t\t\tvar batchOwnerIndex=lightMapBatchOwnerIndices[renderElement._render.receiveShadow ? 1 :0];\n\t\t\t\tvar batchOwner;\n\t\t\t\tif (batchOwnerIndex===undefined){\n\t\t\t\t\tlightMapBatchOwnerIndices[render.receiveShadow ? 1 :0]=this._batchOwners.length;\n\t\t\t\t\tbatchOwner=new MeshSprite3D(null,\"StaticBatchMeshSprite3D\");\n\t\t\t\t\tbatchOwner._scene=scene;\n\t\t\t\t\tbatchOwner._transform=this._rootOwner ? this._rootOwner._transform :null;\n\t\t\t\t\tbatchOwner._render.lightmapIndex=lightMapIndex;\n\t\t\t\t\tbatchOwner._render.receiveShadow=renderElement._render.receiveShadow;\n\t\t\t\t\tthis._batchOwners.push(batchOwner);\n\t\t\t\t\t}else {\n\t\t\t\t\tbatchOwner=this._batchOwners[batchOwnerIndex];\n\t\t\t\t}\n\t\t\t\tbatchOwner._render._renderUpdate(projectionView);\n\t\t\t\tmerageElement._sprite3D=batchOwner;\n\t\t\t\trenderQueueElements.push(merageElement);\n\t\t\t\t}else {\n\t\t\t\tmerageElement._batchIndexEnd=(renderElement)._batchIndexEnd;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._beforeRender=function(state){\n\t\tthis._vertexBuffer._bind();\n\t\tthis._indexBuffer._bind();\n\t\treturn true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._render=function(state){\n\t\tvar renderElement=state.renderElement;\n\t\tvar batchIndexStart=renderElement._batchIndexStart;\n\t\tvar indexCount=renderElement._batchIndexEnd-batchIndexStart;\n\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,indexCount,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,batchIndexStart *2);\n\t\tStat.drawCall++;\n\t\tStat.trianglesFaces+=indexCount / 3;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.dispose=function(){\n\t\tthis._batchOwnerIndices=null;\n\t\tthis._batchOwners=null;\n\t\tthis._vertexDeclaration=null;\n\t\tthis._vertexBuffer.destroy();\n\t\tthis._indexBuffer.destroy();\n\t}\n\n\t//..................临时.................................\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\treturn this._vertexBuffer;\n\t}\n\n\treturn SubMeshStaticBatch;\n})(StaticBatch)\n\n\n/**\n*<code>Sky</code> 类用于创建天空盒。\n*/\n//class laya.d3.resource.models.SkyBox extends laya.d3.resource.models.Sky\nvar SkyBox=(function(_super){\n\tfunction SkyBox(){\n\t\t/**@private */\n\t\t//this._numberVertices=0;\n\t\t/**@private */\n\t\t//this._numberIndices=0;\n\t\t/**@private 天空立方体纹理。 */\n\t\t//this._textureCube=null;\n\t\tSkyBox.__super.call(this);\n\t\tSkyBox._nameNumber++;\n\t\tthis.loadShaderParams();\n\t\tthis.createResource();\n\t\tthis.alphaBlending=1;\n\t\tthis.colorIntensity=1;\n\t}\n\n\t__class(SkyBox,'laya.d3.resource.models.SkyBox',_super);\n\tvar __proto=SkyBox.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._getShader=function(state){\n\t\tvar shaderDefineValue=state.scene._shaderDefineValue;\n\t\tthis._shader=this._shaderCompile.withCompile(shaderDefineValue,0,0);\n\t\treturn this._shader;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.createResource=function(){\n\t\tthis._numberVertices=36;\n\t\tthis._numberIndices=36;\n\t\tvar indices=new Uint16Array(this._numberIndices);\n\t\tvar vertexFloatStride=SkyBox._vertexDeclaration.vertexStride / 4;\n\t\tvar vertices=new Float32Array(this._numberVertices *vertexFloatStride);\n\t\tvar width=1.0;\n\t\tvar height=1.0;\n\t\tvar depth=1.0;\n\t\tvar halfWidth=width / 2.0;\n\t\tvar halfHeight=height / 2.0;\n\t\tvar halfDepth=depth / 2.0;\n\t\tvar topLeftFront=new Vector3(-halfWidth,halfHeight,halfDepth);\n\t\tvar bottomLeftFront=new Vector3(-halfWidth,-halfHeight,halfDepth);\n\t\tvar topRightFront=new Vector3(halfWidth,halfHeight,halfDepth);\n\t\tvar bottomRightFront=new Vector3(halfWidth,-halfHeight,halfDepth);\n\t\tvar topLeftBack=new Vector3(-halfWidth,halfHeight,-halfDepth);\n\t\tvar topRightBack=new Vector3(halfWidth,halfHeight,-halfDepth);\n\t\tvar bottomLeftBack=new Vector3(-halfWidth,-halfHeight,-halfDepth);\n\t\tvar bottomRightBack=new Vector3(halfWidth,-halfHeight,-halfDepth);\n\t\tvar vertexCount=0;\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomRightFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topLeftBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topLeftBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomRightFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topLeftBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomLeftBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topLeftFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomRightFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightBack);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,topRightFront);\n\t\tvertexCount=this._addVertex(vertices,vertexCount,bottomRightBack);\n\t\tfor (var i=0;i < 36;i++)\n\t\tindices[i]=i;\n\t\tthis._vertexBuffer=new VertexBuffer3D(SkyBox._vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._numberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(indices);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addVertex=function(vertices,index,position){\n\t\tvar posE=position.elements;\n\t\tvertices[index+0]=posE[0];\n\t\tvertices[index+1]=posE[1];\n\t\tvertices[index+2]=posE[2];\n\t\treturn index+3;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.loadShaderParams=function(){\n\t\tthis._sharderNameID=Shader3D.nameKey.getID(\"SkyBox\");\n\t\tthis._shaderCompile=ShaderCompile3D._preCompileShader[this._sharderNameID];\n\t}\n\n\t__proto._render=function(state){\n\t\tif (this._textureCube && this._textureCube.loaded){\n\t\t\tthis._vertexBuffer._bind();\n\t\t\tthis._indexBuffer._bind();\n\t\t\tthis._shader=this._getShader(state);\n\t\t\tthis._shader.bind();\n\t\t\tstate.camera.transform.worldMatrix.cloneTo(SkyBox._tempMatrix4x40);\n\t\t\tSkyBox._tempMatrix4x40.transpose();\n\t\t\tMatrix4x4.multiply(state._projectionMatrix,SkyBox._tempMatrix4x40,SkyBox._tempMatrix4x41);\n\t\t\tstate.camera._shaderValues.setValue(/*laya.d3.core.BaseCamera.VPMATRIX_NO_TRANSLATE*/4,SkyBox._tempMatrix4x41.elements);\n\t\t\tthis._shader.uploadCameraUniforms(state.camera._shaderValues.data);\n\t\t\tthis._shaderValue.setValue(1,this._colorIntensity);\n\t\t\tthis._shaderValue.setValue(2,this._alphaBlending);\n\t\t\tthis._shaderValue.setValue(3,this.textureCube);\n\t\t\tthis._shader.uploadAttributes(SkyBox._vertexDeclaration.shaderValues.data,null);\n\t\t\tthis._shader.uploadMaterialUniforms(this._shaderValue.data);\n\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,36,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\t\tStat.trianglesFaces+=12;\n\t\t\tStat.drawCall++;\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(){\n\t\t_super.prototype.destroy.call(this);\n\t\t(this._textureCube)&& (this._textureCube._removeReference(),this._textureCube=null);\n\t}\n\n\t/**\n\t*设置天空立方体纹理。\n\t*@param value 天空立方体纹理。\n\t*/\n\t/**\n\t*获取天空立方体纹理。\n\t*@return 天空立方体纹理。\n\t*/\n\t__getset(0,__proto,'textureCube',function(){\n\t\treturn this._textureCube;\n\t\t},function(value){\n\t\tif (this._textureCube!==value){\n\t\t\t(this._textureCube)&& (this._textureCube._removeReference());\n\t\t\tthis._textureCube=value;\n\t\t\t(value)&& (value._addReference());\n\t\t}\n\t});\n\n\tSkyBox._nameNumber=1;\n\t__static(SkyBox,\n\t['_tempMatrix4x40',function(){return this._tempMatrix4x40=new Matrix4x4();},'_tempMatrix4x41',function(){return this._tempMatrix4x41=new Matrix4x4();},'_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(12,[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0)]);}\n\t]);\n\treturn SkyBox;\n})(Sky)\n\n\n/**\n*<code>Sky</code> 类用于创建天空盒。\n*/\n//class laya.d3.resource.models.SkyDome extends laya.d3.resource.models.Sky\nvar SkyDome=(function(_super){\n\tfunction SkyDome(){\n\t\t/**@private */\n\t\t//this._numberVertices=0;\n\t\t/**@private */\n\t\t//this._numberIndices=0;\n\t\t/**@private 天空立方体纹理。 */\n\t\t//this._texture=null;\n\t\tthis._stacks=16;\n\t\tthis._slices=16;\n\t\tthis._radius=1;\n\t\tSkyDome.__super.call(this);\n\t\tSkyDome._nameNumber++;\n\t\tthis.loadShaderParams();\n\t\tthis.recreateResource();\n\t\tthis.alphaBlending=1;\n\t\tthis.colorIntensity=1;\n\t}\n\n\t__class(SkyDome,'laya.d3.resource.models.SkyDome',_super);\n\tvar __proto=SkyDome.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._getShader=function(state){\n\t\tvar shaderDefineValue=state.scene._shaderDefineValue;\n\t\tthis._shader=this._shaderCompile.withCompile(shaderDefineValue,0,0);\n\t\treturn this._shader;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.recreateResource=function(){\n\t\tthis._numberVertices=(this._stacks+1)*(this._slices+1);\n\t\tthis._numberIndices=(3 *this._stacks *(this._slices+1))*2;\n\t\tvar indices=new Uint16Array(this._numberIndices);\n\t\tvar vertexFloatStride=SkyDome._vertexDeclaration.vertexStride / 4;\n\t\tvar vertices=new Float32Array(this._numberVertices *vertexFloatStride);\n\t\tvar stackAngle=Math.PI / this._stacks;\n\t\tvar sliceAngle=(Math.PI *2.0)/ this._slices;\n\t\tvar vertexIndex=0;\n\t\tvar vertexCount=0;\n\t\tvar indexCount=0;\n\t\tfor (var stack=0;stack < (this._stacks+1);stack++){\n\t\t\tvar r=Math.sin(stack *stackAngle);\n\t\t\tvar y=Math.cos(stack *stackAngle);\n\t\t\tfor (var slice=0;slice < (this._slices+1);slice++){\n\t\t\t\tvar x=r *Math.sin(slice *sliceAngle);\n\t\t\t\tvar z=r *Math.cos(slice *sliceAngle);\n\t\t\t\tvertices[vertexCount+0]=x *this._radius;\n\t\t\t\tvertices[vertexCount+1]=y *this._radius;\n\t\t\t\tvertices[vertexCount+2]=z *this._radius;\n\t\t\t\tvertices[vertexCount+3]=-(slice / this._slices)+0.75;\n\t\t\t\tvertices[vertexCount+4]=stack / this._stacks;\n\t\t\t\tvertexCount+=vertexFloatStride;\n\t\t\t\tif (stack !=(this._stacks-1)){\n\t\t\t\t\tindices[indexCount++]=vertexIndex+1;\n\t\t\t\t\tindices[indexCount++]=vertexIndex;\n\t\t\t\t\tindices[indexCount++]=vertexIndex+(this._slices+1);\n\t\t\t\t\tindices[indexCount++]=vertexIndex+(this._slices+1);\n\t\t\t\t\tindices[indexCount++]=vertexIndex;\n\t\t\t\t\tindices[indexCount++]=vertexIndex+(this._slices);\n\t\t\t\t\tvertexIndex++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._vertexBuffer=new VertexBuffer3D(SkyDome._vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._numberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(indices);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.loadShaderParams=function(){\n\t\tthis._sharderNameID=Shader3D.nameKey.getID(\"SkyDome\");\n\t\tthis._shaderCompile=ShaderCompile3D._preCompileShader[this._sharderNameID];\n\t}\n\n\t__proto._render=function(state){\n\t\tif (this._texture && this._texture.loaded){\n\t\t\tthis._vertexBuffer._bind();\n\t\t\tthis._indexBuffer._bind();\n\t\t\tthis._shader=this._getShader(state);\n\t\t\tthis._shader.bind();\n\t\t\tstate.camera.transform.worldMatrix.cloneTo(SkyDome._tempMatrix4x40);\n\t\t\tSkyDome._tempMatrix4x40.transpose();\n\t\t\tMatrix4x4.multiply(state._projectionMatrix,SkyDome._tempMatrix4x40,SkyDome._tempMatrix4x41);\n\t\t\tstate.camera._shaderValues.setValue(/*laya.d3.core.BaseCamera.VPMATRIX_NO_TRANSLATE*/4,SkyDome._tempMatrix4x41.elements);\n\t\t\tthis._shader.uploadCameraUniforms(state.camera._shaderValues.data);\n\t\t\tthis._shaderValue.setValue(1,this._colorIntensity);\n\t\t\tthis._shaderValue.setValue(2,this._alphaBlending);\n\t\t\tthis._shaderValue.setValue(3,this.texture);\n\t\t\tthis._shader.uploadAttributes(SkyDome._vertexDeclaration.shaderValues.data,null);\n\t\t\tthis._shader.uploadMaterialUniforms(this._shaderValue.data);\n\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._indexBuffer.indexCount,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\t\tStat.trianglesFaces+=this._numberIndices / 3;\n\t\t\tStat.drawCall++;\n\t\t}\n\t}\n\n\t__proto.onEnvDescLoaded=function(envInfoFile){\n\t\tvar envPath='';\n\t\tvar ppos=Math.max(envInfoFile.lastIndexOf('/'),envInfoFile.lastIndexOf('\\\\'));\n\t\tif (ppos > 0){\n\t\t\tenvPath=envInfoFile.substr(0,ppos+1);\n\t\t};\n\t\tvar envinfoobj=Laya.loader.getRes(envInfoFile);\n\t\tif (envinfoobj.ev !=undefined && this.__ownerCamera)\n\t\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.HDREXPOSURE*/13,Math.pow(2,envinfoobj.ev));\n\t\telse\n\t\tthis.__ownerCamera._shaderValues.setValue(/*laya.d3.core.BaseCamera.HDREXPOSURE*/13,Math.pow(2,0.0));\n\t\tthis.texture=Texture2D.load(envPath+envinfoobj.skytex);\n\t\tthis.environmentSpecular=DataTexture2D.load(envPath+envinfoobj.prefiltedEnv);\n\t\tvar irrdMat=new Float32Array(envinfoobj.IrradianceMat);\n\t\tthis.envDiffuseSHRed=irrdMat.slice(0,16);\n\t\tthis.envDiffuseSHGreen=irrdMat.slice(16,32);\n\t\tthis.envDiffuseSHBlue=irrdMat.slice(32,48);\n\t}\n\n\t__proto.loadEnvInfo=function(envInfo){\n\t\tLaya.loader.load(envInfo,Handler.create(this,this.onEnvDescLoaded,[envInfo]));\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(){\n\t\t_super.prototype.destroy.call(this);\n\t\t(this._texture)&& (this._texture._removeReference(),this._texture=null);\n\t}\n\n\t/**\n\t*设置天空纹理。\n\t*@param value 天空纹理。\n\t*/\n\t/**\n\t*获取天空立方体纹理。\n\t*@return 天空立方体纹理。\n\t*/\n\t__getset(0,__proto,'texture',function(){\n\t\treturn this._texture;\n\t\t},function(value){\n\t\tif (this._texture!==value){\n\t\t\t(this._texture)&& (this._texture._removeReference());\n\t\t\tthis._texture=value;\n\t\t\t(value)&& (value._addReference());\n\t\t}\n\t});\n\n\tSkyDome._nameNumber=1;\n\t__static(SkyDome,\n\t['_tempMatrix4x40',function(){return this._tempMatrix4x40=new Matrix4x4();},'_tempMatrix4x41',function(){return this._tempMatrix4x41=new Matrix4x4();},'_vertexDeclaration',function(){return this._vertexDeclaration=new VertexDeclaration(20,[new VertexElement(0,/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\",/*laya.d3.graphics.VertexElementUsage.POSITION0*/0),new VertexElement(12,/*laya.d3.graphics.VertexElementFormat.Vector2*/\"vector2\",/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2)]);}\n\t]);\n\treturn SkyDome;\n})(Sky)\n\n\n/**\n*@private\n*<code>ComponentNode</code> 类用于实现组件精灵,该类为抽象类。\n*/\n//class laya.d3.core.ComponentNode extends laya.display.Node\nvar ComponentNode=(function(_super){\n\tfunction ComponentNode(){\n\t\t/**@private */\n\t\tthis._componentsMap=null;\n\t\t/**@private */\n\t\tthis._typeComponentsIndices=null;\n\t\t/**@private */\n\t\tthis._components=null;\n\t\t/**@private */\n\t\tthis._scripts=null;\n\t\tComponentNode.__super.call(this);\n\t\tthis._componentsMap=[];\n\t\tthis._typeComponentsIndices=[];\n\t\tthis._components=[];\n\t\tthis._scripts=[];\n\t}\n\n\t__class(ComponentNode,'laya.d3.core.ComponentNode',_super);\n\tvar __proto=ComponentNode.prototype;\n\t/**\n\t*添加指定类型组件。\n\t*@param type 组件类型。\n\t*@return 组件。\n\t*/\n\t__proto.addComponent=function(type){\n\t\tvar typeComponentIndex;\n\t\tvar index=this._componentsMap.indexOf(type);\n\t\tif (index===-1){\n\t\t\ttypeComponentIndex=[];\n\t\t\tthis._componentsMap.push(type);\n\t\t\tthis._typeComponentsIndices.push(typeComponentIndex);\n\t\t\t}else {\n\t\t\ttypeComponentIndex=this._typeComponentsIndices[index];\n\t\t\tif (this._components[typeComponentIndex[0]].isSingleton)\n\t\t\t\tthrow new Error(\"无法单实例创建\"+type+\"组件\"+\"，\"+type+\"组件已存在！\");\n\t\t};\n\t\tvar component=ClassUtils.getInstance(type);\n\t\ttypeComponentIndex.push(this._components.length);\n\t\tthis._components.push(component);\n\t\tif ((component instanceof laya.d3.component.Script ))\n\t\t\tthis._scripts.push(component);\n\t\tcomponent._initialize(this);\n\t\treturn component;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeComponent=function(mapIndex,index){\n\t\tvar componentIndices=this._typeComponentsIndices[mapIndex];\n\t\tvar componentIndex=componentIndices[index];\n\t\tvar component=this._components[componentIndex];\n\t\tthis._components.splice(componentIndex,1);\n\t\tif ((component instanceof laya.d3.component.Script ))\n\t\t\tthis._scripts.splice(this._scripts.indexOf(component),1);\n\t\tcomponentIndices.splice(index,1);\n\t\t(componentIndices.length===0)&& (this._typeComponentsIndices.splice(mapIndex,1),this._componentsMap.splice(mapIndex,1));\n\t\tfor (var i=0,n=this._componentsMap.length;i < n;i++){\n\t\t\tcomponentIndices=this._typeComponentsIndices[i];\n\t\t\tfor (var j=componentIndices.length-1;j >=0;j--){\n\t\t\t\tvar oldComponentIndex=componentIndices[j];\n\t\t\t\tif (oldComponentIndex > componentIndex)\n\t\t\t\t\tcomponentIndices[j]=--oldComponentIndex;\n\t\t\t\telse\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\tcomponent._destroy();\n\t}\n\n\t/**\n\t*通过指定类型和类型索引获得组件。\n\t*@param type 组件类型。\n\t*@param typeIndex 类型索引。\n\t*@return 组件。\n\t*/\n\t__proto.getComponentByType=function(type,typeIndex){\n\t\t(typeIndex===void 0)&& (typeIndex=0);\n\t\tvar mapIndex=this._componentsMap.indexOf(type);\n\t\tif (mapIndex===-1)\n\t\t\treturn null;\n\t\treturn this._components[this._typeComponentsIndices[mapIndex][typeIndex]];\n\t}\n\n\t/**\n\t*通过指定类型获得所有组件。\n\t*@param type 组件类型。\n\t*@param components 组件输出队列。\n\t*/\n\t__proto.getComponentsByType=function(type,components){\n\t\tvar index=this._componentsMap.indexOf(type);\n\t\tif (index===-1){\n\t\t\tcomponents.length=0;\n\t\t\treturn;\n\t\t};\n\t\tvar typeComponents=this._typeComponentsIndices[index];\n\t\tvar count=typeComponents.length;\n\t\tcomponents.length=count;\n\t\tfor (var i=0;i < count;i++)\n\t\tcomponents[i]=this._components[typeComponents[i]];\n\t}\n\n\t/**\n\t*通过指定索引获得组件。\n\t*@param index 索引。\n\t*@return 组件。\n\t*/\n\t__proto.getComponentByIndex=function(index){\n\t\treturn this._components[index];\n\t}\n\n\t/**\n\t*通过指定类型和类型索引移除组件。\n\t*@param type 组件类型。\n\t*@param typeIndex 类型索引。\n\t*/\n\t__proto.removeComponentByType=function(type,typeIndex){\n\t\t(typeIndex===void 0)&& (typeIndex=0);\n\t\tvar mapIndex=this._componentsMap.indexOf(type);\n\t\tif (mapIndex===-1)\n\t\t\treturn;\n\t\tthis._removeComponent(mapIndex,typeIndex);\n\t}\n\n\t/**\n\t*通过指定类型移除所有组件。\n\t*@param type 组件类型。\n\t*/\n\t__proto.removeComponentsByType=function(type){\n\t\tvar mapIndex=this._componentsMap.indexOf(type);\n\t\tif (mapIndex===-1)\n\t\t\treturn;\n\t\tvar componentIndices=this._typeComponentsIndices[mapIndex];\n\t\tfor (var i=0,n=componentIndices.length;i < n;componentIndices.length < n ? n--:i++)\n\t\tthis._removeComponent(mapIndex,i);\n\t}\n\n\t/**\n\t*移除全部组件。\n\t*/\n\t__proto.removeAllComponent=function(){\n\t\tfor (var i=0,n=this._componentsMap.length;i < n;this._componentsMap.length < n ? n--:i++)\n\t\tthis.removeComponentsByType(this._componentsMap[i]);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateComponents=function(state){\n\t\tfor (var i=0,n=this._components.length;i < n;i++){\n\t\t\tvar component=this._components[i];\n\t\t\t(!component.started)&& (component._start(state),component.started=true);\n\t\t\t(component.enable)&& (component._update(state));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._lateUpdateComponents=function(state){\n\t\tfor (var i=0;i < this._components.length;i++){\n\t\t\tvar component=this._components[i];\n\t\t\t(!component.started)&& (component._start(state),component.started=true);\n\t\t\t(component.enable)&& (component._lateUpdate(state));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._preRenderUpdateComponents=function(state){\n\t\tfor (var i=0;i < this._components.length;i++){\n\t\t\tvar component=this._components[i];\n\t\t\t(!component.started)&& (component._start(state),component.started=true);\n\t\t\t(component.enable)&& (component._preRenderUpdate(state));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._postRenderUpdateComponents=function(state){\n\t\tfor (var i=0;i < this._components.length;i++){\n\t\t\tvar component=this._components[i];\n\t\t\t(!component.started)&& (component._start(state),component.started=true);\n\t\t\t(component.enable)&& (component._postRenderUpdate(state));\n\t\t}\n\t}\n\n\treturn ComponentNode;\n})(Node)\n\n\n/**\n*<code>AnimationClip</code> 类用于动画片段资源。\n*/\n//class laya.d3.animation.AnimationClip extends laya.resource.Resource\nvar AnimationClip=(function(_super){\n\tfunction AnimationClip(){\n\t\t/**@private */\n\t\tthis._realTimeCurrentFrameIndexes=null;\n\t\t/**@private */\n\t\tthis._realTimeCurrentTimes=null;\n\t\t/**@private */\n\t\tthis._fullKeyframeIndicesCache=null;\n\t\t/**@private */\n\t\tthis._animationDatasCache=null;\n\t\t/**@private */\n\t\tthis._avatarDatasCache=null;\n\t\t/**@private */\n\t\tthis._skinnedDatasCache=null;\n\t\t/**@private */\n\t\tthis._version=null;\n\t\t/**@private */\n\t\tthis._nodes=null;\n\t\t/**@private */\n\t\tthis._nodesMap=null;\n\t\t/**@private */\n\t\tthis._cachePropertyMap=null;\n\t\t/**@private */\n\t\tthis._nodeToCachePropertyMap=null;\n\t\t/**@private */\n\t\tthis._unCachePropertyMap=null;\n\t\t/**@private */\n\t\tthis._duration=NaN;\n\t\t/**@private */\n\t\tthis._frameRate=0;\n\t\t/**@private */\n\t\tthis._animationEvents=null;\n\t\t/**@private */\n\t\tthis._publicClipDatas=null;\n\t\t/**是否循环。*/\n\t\tthis.islooping=false;\n\t\tAnimationClip.__super.call(this);\n\t\tthis._fullKeyframeIndicesCache={};\n\t\tthis._animationDatasCache=[];\n\t\tthis._avatarDatasCache=[];\n\t\tthis._skinnedDatasCache=[];\n\t\tthis._animationEvents=[];\n\t}\n\n\t__class(AnimationClip,'laya.d3.animation.AnimationClip',_super);\n\tvar __proto=AnimationClip.prototype;\n\t/**\n\t*获取动画片段时长。\n\t*/\n\t__proto.duration=function(){\n\t\treturn this._duration;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._hermiteInterpolate=function(frame,t,dur,out){\n\t\tvar p0=frame.data;\n\t\tvar tan0=frame.outTangent;\n\t\tvar nextFrame=frame.next;\n\t\tvar p1=nextFrame.data;\n\t\tvar tan1=nextFrame.inTangent;\n\t\tvar isComputeParams=false;\n\t\tvar a=NaN,b=NaN,c=NaN,d=NaN;\n\t\tfor (var i=0,n=out.length;i < n;i++){\n\t\t\tvar t0=tan0[i],t1=tan1[i];\n\t\t\tif (/*__JS__ */Number.isFinite(t0)&& Number.isFinite(t1)){\n\t\t\t\tif (!isComputeParams){\n\t\t\t\t\tvar t2=t *t;\n\t\t\t\t\tvar t3=t2 *t;\n\t\t\t\t\ta=2.0 *t3-3.0 *t2+1.0;\n\t\t\t\t\tb=t3-2.0 *t2+t;\n\t\t\t\t\tc=t3-t2;\n\t\t\t\t\td=-2.0 *t3+3.0 *t2;\n\t\t\t\t\tisComputeParams=true;\n\t\t\t\t}\n\t\t\t\tout[i]=a *p0[i]+b *t0 *dur+c *t1 *dur+d *p1[i];\n\t\t\t}else\n\t\t\tout[i]=p0[i];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getFullKeyframeIndicesWithCache=function(cacheInterval){\n\t\treturn this._fullKeyframeIndicesCache[cacheInterval];\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._cacheFullKeyframeIndices=function(cacheInterval,datas){\n\t\tthis._fullKeyframeIndicesCache[cacheInterval]=datas;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getAnimationDataWithCache=function(cacheRate,frameIndex){\n\t\tvar cacheDatas=this._animationDatasCache[cacheRate];\n\t\tif (!cacheDatas)\n\t\t\treturn null;\n\t\telse {\n\t\t\treturn cacheDatas[frameIndex];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._cacheAnimationData=function(cacheRate,frameIndex,datas){\n\t\tvar aniDatasCache=(this._animationDatasCache[cacheRate])|| (this._animationDatasCache[cacheRate]=[]);\n\t\taniDatasCache[frameIndex]=datas;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getAvatarDataWithCache=function(avatar,cacheRate,frameIndex){\n\t\tvar clipCache=this._avatarDatasCache[avatar.id];\n\t\tif (!clipCache){\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tvar rateCache=clipCache[cacheRate];\n\t\t\tif (!rateCache)\n\t\t\t\treturn null;\n\t\t\telse {\n\t\t\t\treturn rateCache[frameIndex];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._cacheAvatarData=function(avatar,cacheRate,frameIndex,datas){\n\t\tvar clipCache=(this._avatarDatasCache[avatar.id])|| (this._avatarDatasCache[avatar.id]=[]);\n\t\tvar rateCache=(clipCache[cacheRate])|| (clipCache[cacheRate]=[]);\n\t\trateCache[frameIndex]=datas;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._evaluateAnimationlDatasCacheMode=function(nodeOwners,nodesFrameIndices,animator,clipDatas,propertyMap){\n\t\tvar j=0,m=0;\n\t\tfor (var i=0,n=propertyMap ? propertyMap.length :this._nodes.length;i < n;i++){\n\t\t\tvar nodeIndex=propertyMap ? propertyMap[i] :i;\n\t\t\tvar node=this._nodes[nodeIndex];\n\t\t\tvar cacheProperty=node._cacheProperty;\n\t\t\tif (!nodeOwners[nodeIndex])\n\t\t\t\tcontinue ;\n\t\t\tvar frameIndices=nodesFrameIndices[nodeIndex];\n\t\t\tvar realFrameIndex=frameIndices[animator.currentFrameIndex];\n\t\t\tvar outDatas;\n\t\t\tvar lastFrameIndex=0;\n\t\t\tif (realFrameIndex!==-1){\n\t\t\t\tvar frame=node.keyFrames[realFrameIndex];\n\t\t\t\tvar nextKeyFrame=frame.next;\n\t\t\t\tif (nextKeyFrame){\n\t\t\t\t\tif (propertyMap && !cacheProperty){\n\t\t\t\t\t\toutDatas=clipDatas[nodeIndex];\n\t\t\t\t\t\t(outDatas)|| (outDatas=clipDatas[nodeIndex]=new Float32Array(node.keyFrameWidth));\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\toutDatas=new Float32Array(node.keyFrameWidth);\n\t\t\t\t\t\tclipDatas[i]=outDatas;\n\t\t\t\t\t};\n\t\t\t\t\tvar t=NaN;\n\t\t\t\t\tvar d=frame.duration;\n\t\t\t\t\tif (d!==0)\n\t\t\t\t\t\tt=(animator.currentFrameTime-frame.startTime)/ d;\n\t\t\t\t\telse\n\t\t\t\t\tt=0;\n\t\t\t\t\tthis._hermiteInterpolate(frame,t,d,outDatas);\n\t\t\t\t\t}else {\n\t\t\t\t\tif (propertyMap && !cacheProperty){\n\t\t\t\t\t\toutDatas=clipDatas[nodeIndex];\n\t\t\t\t\t\t(outDatas)|| (outDatas=clipDatas[nodeIndex]=new Float32Array(node.keyFrameWidth));\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tlastFrameIndex=animator._lastFrameIndex;\n\t\t\t\t\t\tif (lastFrameIndex!==-1 && frameIndices[lastFrameIndex]===realFrameIndex)\n\t\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t\toutDatas=new Float32Array(node.keyFrameWidth);\n\t\t\t\t\t\tclipDatas[i]=outDatas;\n\t\t\t\t\t};\n\t\t\t\t\tvar frameData=frame.data;\n\t\t\t\t\tfor (j=0,m=outDatas.length;j < m;j++)\n\t\t\t\t\toutDatas[j]=frameData[j];\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tif (propertyMap && !cacheProperty){\n\t\t\t\t\toutDatas=clipDatas[nodeIndex];\n\t\t\t\t\t(outDatas)|| (outDatas=clipDatas[nodeIndex]=new Float32Array(node.keyFrameWidth));\n\t\t\t\t\t}else {\n\t\t\t\t\tlastFrameIndex=animator._lastFrameIndex;\n\t\t\t\t\tif (lastFrameIndex!==-1 && frameIndices[lastFrameIndex]===realFrameIndex)\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\toutDatas=new Float32Array(node.keyFrameWidth);\n\t\t\t\t\tclipDatas[i]=outDatas;\n\t\t\t\t};\n\t\t\t\tvar firstFrameDatas=node.keyFrames[0].data;\n\t\t\t\tfor (j=0,m=outDatas.length;j < m;j++)\n\t\t\t\toutDatas[j]=firstFrameDatas[j];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._evaluateAnimationlDatasRealTime=function(nodeOwners,playCurTime,outAnimationDatas,propertyMap){\n\t\tvar i=0,n=0;\n\t\tvar nodes=this._nodes;\n\t\tif (!this._realTimeCurrentFrameIndexes){\n\t\t\tthis._realTimeCurrentFrameIndexes=new Int32Array(nodes.length);\n\t\t\tfor (i=0,n=nodes.length;i < n;i++)\n\t\t\tthis._realTimeCurrentFrameIndexes[i]=-1;\n\t\t\tthis._realTimeCurrentTimes=new Float32Array(nodes.length);\n\t\t}\n\t\tfor (i=0,n=propertyMap ? propertyMap.length :this._nodes.length;i < n;i++){\n\t\t\tvar index=propertyMap ? propertyMap[i] :i;\n\t\t\tvar node=nodes[index];\n\t\t\tif (playCurTime < this._realTimeCurrentTimes[index])\n\t\t\t\tthis._realTimeCurrentFrameIndexes[index]=-1;\n\t\t\tthis._realTimeCurrentTimes[index]=playCurTime;\n\t\t\tvar nextFrameIndex=this._realTimeCurrentFrameIndexes[index]+1;\n\t\t\tvar keyFrames=node.keyFrames;\n\t\t\tvar keyFramesCount=keyFrames.length;\n\t\t\twhile (nextFrameIndex < keyFramesCount){\n\t\t\t\tif (keyFrames[nextFrameIndex].startTime > playCurTime){\n\t\t\t\t\tthis._realTimeCurrentFrameIndexes[index]=nextFrameIndex-1;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t\tnextFrameIndex++;\n\t\t\t}\n\t\t\t(nextFrameIndex===keyFramesCount)&& (this._realTimeCurrentFrameIndexes[index]=keyFramesCount-1);\n\t\t\tvar j=0,m=0;\n\t\t\tvar outDatas=outAnimationDatas[index];\n\t\t\t(outDatas)|| (outDatas=outAnimationDatas[index]=new Float32Array(node.keyFrameWidth));\n\t\t\tvar frame=keyFrames[this._realTimeCurrentFrameIndexes[index]];\n\t\t\tif (frame){\n\t\t\t\tvar nextFarme=frame.next;\n\t\t\t\tif (nextFarme){\n\t\t\t\t\tvar d=frame.duration;\n\t\t\t\t\tvar t=NaN;\n\t\t\t\t\tif (d!==0)\n\t\t\t\t\t\tt=(playCurTime-frame.startTime)/ d;\n\t\t\t\t\telse\n\t\t\t\t\tt=0;\n\t\t\t\t\tthis._hermiteInterpolate(frame,t,d,outDatas);\n\t\t\t\t\t}else {\n\t\t\t\t\tvar frameData=frame.data;\n\t\t\t\t\tfor (j=0,m=outDatas.length;j < m;j++)\n\t\t\t\t\toutDatas[j]=frameData[j];\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar firstFrameDatas=node.keyFrames[0].data;\n\t\t\t\tfor (j=0,m=outDatas.length;j < m;j++)\n\t\t\t\toutDatas[j]=firstFrameDatas[j];\n\t\t\t};\n\t\t\tvar owner=nodeOwners[index];\n\t\t\tif (owner){\n\t\t\t\tif (propertyMap)\n\t\t\t\t\tAnimationNode._propertySetFuncs[node.propertyNameID](owner,null,outDatas);\n\t\t\t\telse\n\t\t\t\tAnimationNode._propertySetFuncs[node.propertyNameID](null,owner,outDatas);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._binarySearchEventIndex=function(time){\n\t\tvar start=0;\n\t\tvar end=this._animationEvents.length-1;\n\t\tvar mid=0;\n\t\twhile (start <=end){\n\t\t\tmid=Math.floor((start+end)/ 2);\n\t\t\tvar midValue=this._animationEvents[mid].time;\n\t\t\tif (midValue==time)\n\t\t\t\treturn mid;\n\t\t\telse if (midValue > time)\n\t\t\tend=mid-1;\n\t\t\telse\n\t\t\tstart=mid+1;\n\t\t}\n\t\treturn start;\n\t}\n\n\t/**\n\t*添加动画事件。\n\t*/\n\t__proto.addEvent=function(event){\n\t\tvar index=this._binarySearchEventIndex(event.time);\n\t\tthis._animationEvents.splice(index,0,event);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar reader=new Byte(data);\n\t\tthis._version=reader.readUTFString();\n\t\tswitch (this._version){\n\t\t\tcase \"LAYAANIMATION:01\":\n\t\t\t\tAnimationClipParser01.parse(this,reader);\n\t\t\t\tbreak ;\n\t\t\tcase \"LAYAANIMATION:02\":\n\t\t\t\tAnimationClipParser02.parse(this,reader);\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tthis.completeCreate();\n\t\tthis._endLoaded();\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.disposeResource=function(){\n\t\tthis._realTimeCurrentFrameIndexes=null;\n\t\tthis._realTimeCurrentTimes=null;\n\t\tthis._fullKeyframeIndicesCache=null;\n\t\tthis._animationDatasCache=null;\n\t\tthis._avatarDatasCache=null;\n\t\tthis._skinnedDatasCache=null;\n\t\tthis._version=null;\n\t\tthis._nodes=null;\n\t\tthis._nodesMap=null;\n\t\tthis._cachePropertyMap=null;\n\t\tthis._nodeToCachePropertyMap=null;\n\t\tthis._unCachePropertyMap=null;\n\t\tthis._publicClipDatas=null;\n\t}\n\n\tAnimationClip.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,AnimationClip);\n\t}\n\n\treturn AnimationClip;\n})(Resource)\n\n\n/**\n*<code>Avatar</code> 类用于创建Avatar。\n*/\n//class laya.d3.core.Avatar extends laya.resource.Resource\nvar Avatar=(function(_super){\n\tfunction Avatar(){\n\t\t/**@private */\n\t\t//this._version=null;\n\t\t/**@private */\n\t\t//this._rootNode=null;\n\t\tAvatar.__super.call(this);\n\t}\n\n\t__class(Avatar,'laya.d3.core.Avatar',_super);\n\tvar __proto=Avatar.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._initCloneToAnimator=function(destNode,destAnimator){\n\t\tdestAnimator._avatarNodeMap[destNode.name]=destNode;\n\t\tdestAnimator._avatarNodes.push(destNode);\n\t\tfor (var i=0,n=destNode.getChildCount();i < n;i++)\n\t\tthis._initCloneToAnimator(destNode.getChildByIndex(i),destAnimator);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._parseNode=function(nodaData,node){\n\t\tvar name=nodaData.props.name;\n\t\tnode.name=name;\n\t\tif (node._parent){\n\t\t\tvar customProps=nodaData.customProps;\n\t\t\tvar transform=node.transform;\n\t\t\ttransform._localRotationEuler=new Float32Array(3);\n\t\t\ttransform.setLocalPosition(new Float32Array(customProps.translate));\n\t\t\ttransform.setLocalRotation(new Float32Array(customProps.rotation));\n\t\t\ttransform.setLocalScale(new Float32Array(customProps.scale));\n\t\t\ttransform._setWorldMatrixAndUpdate(new Float32Array(16));\n\t\t};\n\t\tvar childrenData=nodaData.child;\n\t\tfor (var i=0,n=childrenData.length;i < n;i++){\n\t\t\tvar childData=childrenData[i];\n\t\t\tvar childBone=new AnimationNode();\n\t\t\tnode.addChild(childBone);\n\t\t\tthis._parseNode(childData,childBone);\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tthis._rootNode=new AnimationNode();\n\t\tif (data.version){\n\t\t\tthis._version=data.version;\n\t\t\tvar rootNode=data.rootNode;\n\t\t\t(rootNode)&& (this._parseNode(rootNode,this._rootNode));\n\t\t\t}else {\n\t\t\tthis._parseNode(data,this._rootNode);\n\t\t}\n\t\tthis._endLoaded();\n\t}\n\n\t/**\n\t*克隆数据到Avatr。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto._cloneDatasToAnimator=function(destAnimator){\n\t\tvar destRoot=this._rootNode.clone();\n\t\tdestRoot.transform._setWorldMatrixIgnoreUpdate(null);\n\t\tvar avatarNodes=[];\n\t\tdestAnimator._avatarNodeMap={};\n\t\tdestAnimator._avatarNodes=avatarNodes;\n\t\tthis._initCloneToAnimator(destRoot,destAnimator);\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destAvatar=destObject;\n\t\tvar destRoot=this._rootNode.clone();\n\t\tdestAvatar._rootNode=destRoot;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\tAvatar.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,Avatar);\n\t}\n\n\treturn Avatar;\n})(Resource)\n\n\n/**\n*<code>BaseMaterial</code> 类用于创建材质,抽象类,不允许实例。\n*/\n//class laya.d3.core.material.BaseMaterial extends laya.resource.Resource\nvar BaseMaterial=(function(_super){\n\tfunction BaseMaterial(){\n\t\t/**@private */\n\t\t//this._shader=null;\n\t\t/**@private */\n\t\t//this._shaderCompile=null;\n\t\t/**@private */\n\t\t//this._shaderDefineValue=0;\n\t\t/**@private */\n\t\t//this._disablePublicShaderDefine=0;\n\t\t/**@private */\n\t\t//this._alphaTest=false;\n\t\t/**@private */\n\t\t//this._shaderValues=null;\n\t\t/**@private */\n\t\t//this._values=null;\n\t\t/**渲染剔除状态。*/\n\t\t//this.cull=0;\n\t\t/**透明混合。*/\n\t\t//this.blend=0;\n\t\t/**源混合参数,在blend为BLEND_ENABLE_ALL时生效。*/\n\t\t//this.srcBlend=0;\n\t\t/**目标混合参数,在blend为BLEND_ENABLE_ALL时生效。*/\n\t\t//this.dstBlend=0;\n\t\t/**RGB源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。*/\n\t\t//this.srcBlendRGB=0;\n\t\t/**RGB目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。*/\n\t\t//this.dstBlendRGB=0;\n\t\t/**Alpha源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。*/\n\t\t//this.srcBlendAlpha=0;\n\t\t/**Alpha目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。*/\n\t\t//this.dstBlendAlpha=0;\n\t\t/**混合常量颜色。*/\n\t\t//this.blendConstColor=null;\n\t\t/**混合方程。*/\n\t\t//this.blendEquation=0;\n\t\t/**RGB混合方程。*/\n\t\t//this.blendEquationRGB=0;\n\t\t/**Alpha混合方程。*/\n\t\t//this.blendEquationAlpha=0;\n\t\t/**深度测试函数。*/\n\t\t//this.depthTest=0;\n\t\t/**是否深度写入。*/\n\t\t//this.depthWrite=false;\n\t\t/**所属渲染队列. */\n\t\t//this.renderQueue=0;\n\t\t/**@private */\n\t\t//this._conchMaterial=null;\n\t\tBaseMaterial.__super.call(this);\n\t\tthis._shaderDefineValue=0;\n\t\tthis._disablePublicShaderDefine=0;\n\t\tthis._shaderValues=new ValusArray();\n\t\tthis._values=[];\n\t\tthis.renderQueue=/*CLASS CONST:laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\tthis._alphaTest=false;\n\t\tthis.cull=2;\n\t\tthis.blend=0;\n\t\tthis.srcBlend=1;\n\t\tthis.dstBlend=0;\n\t\tthis.srcBlendRGB=1;\n\t\tthis.dstBlendRGB=0;\n\t\tthis.srcBlendAlpha=1;\n\t\tthis.dstBlendAlpha=0;\n\t\tthis.blendConstColor=new Vector4(1,1,1,1);\n\t\tthis.blendEquation=0;\n\t\tthis.blendEquationRGB=0;\n\t\tthis.blendEquationAlpha=0;\n\t\tthis.depthTest=0x0201;\n\t\tthis.depthWrite=true;\n\t}\n\n\t__class(BaseMaterial,'laya.d3.core.material.BaseMaterial',_super);\n\tvar __proto=BaseMaterial.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.IClone\":true})\n\t/**\n\t*增加Shader宏定义。\n\t*@param value 宏定义。\n\t*/\n\t__proto._addShaderDefine=function(value){\n\t\tthis._shaderDefineValue |=value;\n\t}\n\n\t/**\n\t*移除Shader宏定义。\n\t*@param value 宏定义。\n\t*/\n\t__proto._removeShaderDefine=function(value){\n\t\tthis._shaderDefineValue &=~value;\n\t}\n\n\t/**\n\t*增加禁用宏定义。\n\t*@param value 宏定义。\n\t*/\n\t__proto._addDisablePublicShaderDefine=function(value){\n\t\tthis._disablePublicShaderDefine |=value;\n\t}\n\n\t/**\n\t*移除禁用宏定义。\n\t*@param value 宏定义。\n\t*/\n\t__proto._removeDisablePublicShaderDefine=function(value){\n\t\tthis._disablePublicShaderDefine &=~value;\n\t}\n\n\t/**\n\t*设置Buffer。\n\t*@param shaderIndex shader索引。\n\t*@param buffer buffer数据。\n\t*/\n\t__proto._setBuffer=function(shaderIndex,buffer){\n\t\tvar shaderValue=this._shaderValues;\n\t\tshaderValue.setValue(shaderIndex,buffer);\n\t\tthis._values[shaderIndex]=buffer;\n\t}\n\n\t/**\n\t*获取Buffer。\n\t*@param shaderIndex shader索引。\n\t*@return\n\t*/\n\t__proto._getBuffer=function(shaderIndex){\n\t\treturn this._values[shaderIndex];\n\t}\n\n\t/**\n\t*设置矩阵。\n\t*@param shaderIndex shader索引。\n\t*@param matrix4x4 矩阵。\n\t*/\n\t__proto._setMatrix4x4=function(shaderIndex,matrix4x4){\n\t\tthis._shaderValues.setValue(shaderIndex,matrix4x4 ? matrix4x4.elements :null);\n\t\tthis._values[shaderIndex]=matrix4x4;\n\t}\n\n\t/**\n\t*获取矩阵。\n\t*@param shaderIndex shader索引。\n\t*@return 矩阵。\n\t*/\n\t__proto._getMatrix4x4=function(shaderIndex){\n\t\treturn this._values[shaderIndex];\n\t}\n\n\t/**\n\t*设置整型。\n\t*@param shaderIndex shader索引。\n\t*@param i 整形。\n\t*/\n\t__proto._setInt=function(shaderIndex,i){\n\t\tvar shaderValue=this._shaderValues;\n\t\tshaderValue.setValue(shaderIndex,i);\n\t\tthis._values[shaderIndex]=i;\n\t}\n\n\t/**\n\t*获取整形。\n\t*@param shaderIndex shader索引。\n\t*@return 整形。\n\t*/\n\t__proto._getInt=function(shaderIndex){\n\t\treturn this._values[shaderIndex];\n\t}\n\n\t/**\n\t*设置浮点。\n\t*@param shaderIndex shader索引。\n\t*@param i 浮点。\n\t*/\n\t__proto._setNumber=function(shaderIndex,number){\n\t\tvar shaderValue=this._shaderValues;\n\t\tshaderValue.setValue(shaderIndex,number);\n\t\tthis._values[shaderIndex]=number;\n\t}\n\n\t/**\n\t*获取浮点。\n\t*@param shaderIndex shader索引。\n\t*@return 浮点。\n\t*/\n\t__proto._getNumber=function(shaderIndex){\n\t\treturn this._values[shaderIndex];\n\t}\n\n\t/**\n\t*设置布尔。\n\t*@param shaderIndex shader索引。\n\t*@param b 布尔。\n\t*/\n\t__proto._setBool=function(shaderIndex,b){\n\t\tvar shaderValue=this._shaderValues;\n\t\tshaderValue.setValue(shaderIndex,b);\n\t\tthis._values[shaderIndex]=b;\n\t}\n\n\t/**\n\t*获取布尔。\n\t*@param shaderIndex shader索引。\n\t*@return 布尔。\n\t*/\n\t__proto._getBool=function(shaderIndex){\n\t\treturn this._values[shaderIndex];\n\t}\n\n\t/**\n\t*设置二维向量。\n\t*@param shaderIndex shader索引。\n\t*@param vector2 二维向量。\n\t*/\n\t__proto._setVector2=function(shaderIndex,vector2){\n\t\tvar shaderValue=this._shaderValues;\n\t\tshaderValue.setValue(shaderIndex,vector2 ? vector2.elements :null);\n\t\tthis._values[shaderIndex]=vector2;\n\t}\n\n\t/**\n\t*获取二维向量。\n\t*@param shaderIndex shader索引。\n\t*@return 二维向量。\n\t*/\n\t__proto._getVector2=function(shaderIndex){\n\t\treturn this._values[shaderIndex];\n\t}\n\n\t/**\n\t*设置颜色。\n\t*@param shaderIndex shader索引。\n\t*@param color 颜色向量。\n\t*/\n\t__proto._setColor=function(shaderIndex,color){\n\t\tvar shaderValue=this._shaderValues;\n\t\tshaderValue.setValue(shaderIndex,color ? color.elements :null);\n\t\tthis._values[shaderIndex]=color;\n\t}\n\n\t/**\n\t*获取颜色。\n\t*@param shaderIndex shader索引。\n\t*@return 颜色向量。\n\t*/\n\t__proto._getColor=function(shaderIndex){\n\t\treturn this._values[shaderIndex];\n\t}\n\n\t/**\n\t*设置纹理。\n\t*@param shaderIndex shader索引。\n\t*@param texture 纹理。\n\t*/\n\t__proto._setTexture=function(shaderIndex,texture){\n\t\tvar lastValue=this._values[shaderIndex];\n\t\tthis._values[shaderIndex]=texture;\n\t\tthis._shaderValues.setValue(shaderIndex,texture);\n\t\tif (this.referenceCount > 0){\n\t\t\t(lastValue)&& (lastValue._removeReference());\n\t\t\t(texture)&& (texture._addReference());\n\t\t}\n\t}\n\n\t/**\n\t*获取纹理。\n\t*@param shaderIndex shader索引。\n\t*@return 纹理。\n\t*/\n\t__proto._getTexture=function(shaderIndex){\n\t\treturn this._values[shaderIndex];\n\t}\n\n\t/**\n\t*上传材质。\n\t*@param state 相关渲染状态。\n\t*@param bufferUsageShader Buffer相关绑定。\n\t*@param shader 着色器。\n\t*@return 是否成功。\n\t*/\n\t__proto._upload=function(){\n\t\tthis._shader.uploadMaterialUniforms(this._shaderValues.data);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getShader=function(sceneDefineValue,vertexDefineValue,spriteDefineValue){\n\t\tvar publicDefineValue=(sceneDefineValue | vertexDefineValue)& (~this._disablePublicShaderDefine);\n\t\tthis._shader=this._shaderCompile.withCompile(publicDefineValue,spriteDefineValue,this._shaderDefineValue);\n\t\treturn this._shader;\n\t}\n\n\t/**\n\t*设置渲染相关状态。\n\t*/\n\t__proto._setRenderStateBlendDepth=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tWebGLContext.setDepthMask(gl,this.depthWrite);\n\t\tif (this.depthTest===0)\n\t\t\tWebGLContext.setDepthTest(gl,false);\n\t\telse {\n\t\t\tWebGLContext.setDepthTest(gl,true);\n\t\t\tWebGLContext.setDepthFunc(gl,this.depthTest);\n\t\t}\n\t\tswitch (this.blend){\n\t\t\tcase 0:\n\t\t\t\tWebGLContext.setBlend(gl,false);\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tWebGLContext.setBlend(gl,true);\n\t\t\t\tWebGLContext.setBlendFunc(gl,this.srcBlend,this.dstBlend);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tWebGLContext.setBlend(gl,true);\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t/**\n\t*设置渲染相关状态。\n\t*/\n\t__proto._setRenderStateFrontFace=function(isTarget,transform){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar forntFace=0;\n\t\tswitch (this.cull){\n\t\t\tcase 0:\n\t\t\t\tWebGLContext.setCullFace(gl,false);\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tWebGLContext.setCullFace(gl,true);\n\t\t\t\tif (isTarget){\n\t\t\t\t\tif (transform && transform._isFrontFaceInvert)\n\t\t\t\t\t\tforntFace=/*laya.webgl.WebGLContext.CCW*/0x0901;\n\t\t\t\t\telse\n\t\t\t\t\tforntFace=/*laya.webgl.WebGLContext.CW*/0x0900;\n\t\t\t\t\t}else {\n\t\t\t\t\tif (transform && transform._isFrontFaceInvert)\n\t\t\t\t\t\tforntFace=/*laya.webgl.WebGLContext.CW*/0x0900;\n\t\t\t\t\telse\n\t\t\t\t\tforntFace=/*laya.webgl.WebGLContext.CCW*/0x0901;\n\t\t\t\t}\n\t\t\t\tWebGLContext.setFrontFace(gl,forntFace);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tWebGLContext.setCullFace(gl,true);\n\t\t\t\tif (isTarget){\n\t\t\t\t\tif (transform && transform._isFrontFaceInvert)\n\t\t\t\t\t\tforntFace=/*laya.webgl.WebGLContext.CW*/0x0900;\n\t\t\t\t\telse\n\t\t\t\t\tforntFace=/*laya.webgl.WebGLContext.CCW*/0x0901;\n\t\t\t\t\t}else {\n\t\t\t\t\tif (transform && transform._isFrontFaceInvert)\n\t\t\t\t\t\tforntFace=/*laya.webgl.WebGLContext.CCW*/0x0901;\n\t\t\t\t\telse\n\t\t\t\t\tforntFace=/*laya.webgl.WebGLContext.CW*/0x0900;\n\t\t\t\t}\n\t\t\t\tWebGLContext.setFrontFace(gl,forntFace);\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar jsonData=data[0];\n\t\tvar textureMap=data[1];\n\t\tswitch (jsonData.version){\n\t\t\tcase \"LAYAMATERIAL:01\":;\n\t\t\t\tvar i=0,n=0;\n\t\t\t\tvar props=jsonData.props;\n\t\t\t\tfor (var key in props){\n\t\t\t\tswitch (key){\n\t\t\t\t\tcase \"vectors\":;\n\t\t\t\t\t\tvar vectors=props[key];\n\t\t\t\t\t\tfor (i=0,n=vectors.length;i < n;i++){\n\t\t\t\t\t\t\tvar vector=vectors[i];\n\t\t\t\t\t\t\tvar vectorValue=vector.value;\n\t\t\t\t\t\tswitch (vectorValue.length){\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tthis[vector.name]=new Vector2(vectorValue[0],vectorValue[1]);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tthis[vector.name]=new Vector3(vectorValue[0],vectorValue[1],vectorValue[2]);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tthis[vector.name]=new Vector4(vectorValue[0],vectorValue[1],vectorValue[2],vectorValue[3]);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tthrow new Error(\"BaseMaterial:unkonwn color length.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"textures\":;\n\t\t\t\t\tvar textures=props[key];\n\t\t\t\t\tfor (i=0,n=textures.length;i < n;i++){\n\t\t\t\t\t\tvar texture=textures[i];\n\t\t\t\t\t\tvar path=texture.path;\n\t\t\t\t\t\t(path)&& (this[texture.name]=Loader.getRes(textureMap[path]));\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"defines\":;\n\t\t\t\t\tvar defineNames=props[key];\n\t\t\t\t\tfor (i=0,n=defineNames.length;i < n;i++){\n\t\t\t\t\t\tvar define=this._shaderCompile.getMaterialDefineByName(defineNames[i]);\n\t\t\t\t\t\tthis._addShaderDefine(define);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"cull\":\n\t\t\t\t\tcase \"blend\":\n\t\t\t\t\tcase \"srcBlend\":\n\t\t\t\t\tcase \"dstBlend\":\n\t\t\t\t\tcase \"depthWrite\":\n\t\t\t\t\tthis[key]=props[key];\n\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"renderQueue\":;\n\t\t\t\t\tvar queue=props[key];\n\t\t\t\t\tswitch (queue){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tthis.renderQueue=2000;\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tthis.renderQueue=3000;\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\tthis[key]=props[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak ;\n\t\t\tcase \"LAYAMATERIAL:02\":\n\t\t\tprops=jsonData.props;\n\t\t\tfor (key in props){\n\t\t\t\tswitch (key){\n\t\t\t\t\tcase \"vectors\":\n\t\t\t\t\t\tvectors=props[key];\n\t\t\t\t\t\tfor (i=0,n=vectors.length;i < n;i++){\n\t\t\t\t\t\t\tvector=vectors[i];\n\t\t\t\t\t\t\tvectorValue=vector.value;\n\t\t\t\t\t\tswitch (vectorValue.length){\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tthis[vector.name]=new Vector2(vectorValue[0],vectorValue[1]);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tthis[vector.name]=new Vector3(vectorValue[0],vectorValue[1],vectorValue[2]);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tthis[vector.name]=new Vector4(vectorValue[0],vectorValue[1],vectorValue[2],vectorValue[3]);\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\t\tthrow new Error(\"BaseMaterial:unkonwn color length.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"textures\":\n\t\t\t\t\ttextures=props[key];\n\t\t\t\t\tfor (i=0,n=textures.length;i < n;i++){\n\t\t\t\t\t\ttexture=textures[i];\n\t\t\t\t\t\tpath=texture.path;\n\t\t\t\t\t\t(path)&& (this[texture.name]=Loader.getRes(textureMap[path]));\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"defines\":\n\t\t\t\t\tdefineNames=props[key];\n\t\t\t\t\tfor (i=0,n=defineNames.length;i < n;i++){\n\t\t\t\t\t\tdefine=this._shaderCompile.getMaterialDefineByName(defineNames[i]);\n\t\t\t\t\t\tthis._addShaderDefine(define);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\tthis[key]=props[key];\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\tthrow new Error(\"BaseMaterial:unkonwn version.\");\n\t\t}\n\t\tthis._endLoaded();\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._addReference=function(){\n\t\t_super.prototype._addReference.call(this);\n\t\tvar valueCount=this._values.length;\n\t\tfor (var i=0,n=valueCount;i < n;i++){\n\t\t\tvar value=this._values[i];\n\t\t\tif (value && (value instanceof laya.d3.resource.BaseTexture ))\n\t\t\t\t(value)._addReference();\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._removeReference=function(){\n\t\t_super.prototype._removeReference.call(this);\n\t\tvar valueCount=this._values.length;\n\t\tfor (var i=0,n=valueCount;i < n;i++){\n\t\t\tvar value=this._values[i];\n\t\t\tif (value && (value instanceof laya.d3.resource.BaseTexture ))\n\t\t\t\t(value)._removeReference();\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.disposeResource=function(){\n\t\tthis.blendConstColor=null;\n\t\tthis._shader=null;\n\t\tthis._shaderValues=null;\n\t\tvar valueCount=this._values.length;\n\t\tfor (var i=0,n=valueCount;i < n;i++){\n\t\t\tvar value=this._values[i];\n\t\t\tif (value && (value instanceof laya.d3.resource.BaseTexture ))\n\t\t\t\t(value)._removeReference();\n\t\t}\n\t\tthis._values=null;\n\t}\n\n\t/**\n\t*设置使用Shader名字。\n\t*@param name 名称。\n\t*/\n\t__proto.setShaderName=function(name){\n\t\tvar nameID=Shader3D.nameKey.getID(name);\n\t\tif (nameID===-1)\n\t\t\tthrow new Error(\"BaseMaterial: unknown shader name.\");\n\t\tthis._shaderCompile=ShaderCompile3D._preCompileShader[nameID];\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destBaseMaterial=destObject;\n\t\tdestBaseMaterial.name=this.name;\n\t\tdestBaseMaterial.cull=this.cull;\n\t\tdestBaseMaterial.blend=this.blend;\n\t\tdestBaseMaterial.srcBlend=this.srcBlend;\n\t\tdestBaseMaterial.dstBlend=this.dstBlend;\n\t\tdestBaseMaterial.srcBlendRGB=this.srcBlendRGB;\n\t\tdestBaseMaterial.dstBlendRGB=this.dstBlendRGB;\n\t\tdestBaseMaterial.srcBlendAlpha=this.srcBlendAlpha;\n\t\tdestBaseMaterial.dstBlendAlpha=this.dstBlendAlpha;\n\t\tthis.blendConstColor.cloneTo(destBaseMaterial.blendConstColor);\n\t\tdestBaseMaterial.blendEquation=this.blendEquation;\n\t\tdestBaseMaterial.blendEquationRGB=this.blendEquationRGB;\n\t\tdestBaseMaterial.blendEquationAlpha=this.blendEquationAlpha;\n\t\tdestBaseMaterial.depthTest=this.depthTest;\n\t\tdestBaseMaterial.depthWrite=this.depthWrite;\n\t\tdestBaseMaterial.renderQueue=this.renderQueue;\n\t\tdestBaseMaterial._shader=this._shader;\n\t\tdestBaseMaterial._disablePublicShaderDefine=this._disablePublicShaderDefine;\n\t\tdestBaseMaterial._shaderDefineValue=this._shaderDefineValue;\n\t\tvar i=0,n=0;\n\t\tvar destShaderValues=destBaseMaterial._shaderValues;\n\t\tdestBaseMaterial._shaderValues.data.length=this._shaderValues.data.length;\n\t\tvar valueCount=this._values.length;\n\t\tvar destValues=destBaseMaterial._values;\n\t\tdestValues.length=valueCount;\n\t\tfor (i=0,n=valueCount;i < n;i++){\n\t\t\tvar value=this._values[i];\n\t\t\tif (value){\n\t\t\t\tif ((typeof value=='number')){\n\t\t\t\t\tdestValues[i]=value;\n\t\t\t\t\tdestShaderValues.data[i]=value;\n\t\t\t\t\t}else if (((typeof value=='number')&& Math.floor(value)==value)){\n\t\t\t\t\tdestValues[i]=value;\n\t\t\t\t\tdestShaderValues.data[i]=value;\n\t\t\t\t\t}else if ((typeof value=='boolean')){\n\t\t\t\t\tdestValues[i]=value;\n\t\t\t\t\tdestShaderValues.data[i]=value;\n\t\t\t\t\t}else if ((value instanceof laya.d3.math.Vector2 )){\n\t\t\t\t\tvar v2=(destValues[i])|| (destValues[i]=new Vector2());\n\t\t\t\t\t(value).cloneTo(v2);\n\t\t\t\t\tdestShaderValues.data[i]=v2.elements;\n\t\t\t\t\t}else if ((value instanceof laya.d3.math.Vector3 )){\n\t\t\t\t\tvar v3=(destValues[i])|| (destValues[i]=new Vector3());\n\t\t\t\t\t(value).cloneTo(v3);\n\t\t\t\t\tdestShaderValues.data[i]=v3.elements;\n\t\t\t\t\t}else if ((value instanceof laya.d3.math.Vector4 )){\n\t\t\t\t\tvar v4=(destValues[i])|| (destValues[i]=new Vector4());\n\t\t\t\t\t(value).cloneTo(v4);\n\t\t\t\t\tdestShaderValues.data[i]=v4.elements;\n\t\t\t\t\t}else if ((value instanceof laya.d3.math.Matrix4x4 )){\n\t\t\t\t\tvar mat=(destValues[i])|| (destValues[i]=new Matrix4x4());\n\t\t\t\t\t(value).cloneTo(mat);\n\t\t\t\t\tdestShaderValues.data[i]=mat.elements;\n\t\t\t\t\t}else if ((value instanceof laya.d3.resource.BaseTexture )){\n\t\t\t\t\tdestValues[i]=value;\n\t\t\t\t\tdestShaderValues.data[i]=value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destBaseMaterial=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destBaseMaterial);\n\t\treturn destBaseMaterial;\n\t}\n\n\t/**\n\t*设置透明测试模式裁剪值。\n\t*@param value 透明测试模式裁剪值。\n\t*/\n\t/**\n\t*获取透明测试模式裁剪值。\n\t*@return 透明测试模式裁剪值。\n\t*/\n\t__getset(0,__proto,'alphaTestValue',function(){\n\t\treturn this._getNumber(0);\n\t\t},function(value){\n\t\tthis._setNumber(0,value);\n\t});\n\n\t/**\n\t*设置是否透明裁剪。\n\t*@param value 是否透明裁剪。\n\t*/\n\t/**\n\t*获取是否透明裁剪。\n\t*@return 是否透明裁剪。\n\t*/\n\t__getset(0,__proto,'alphaTest',function(){\n\t\treturn this._alphaTest;\n\t\t},function(value){\n\t\tthis._alphaTest=value;\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.BaseMaterial.SHADERDEFINE_ALPHATEST);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.BaseMaterial.SHADERDEFINE_ALPHATEST);\n\t});\n\n\tBaseMaterial.__init__=function(){\n\t\tBaseMaterial.SHADERDEFINE_ALPHATEST=BaseMaterial.shaderDefines.registerDefine(\"ALPHATEST\");\n\t}\n\n\tBaseMaterial.RENDERQUEUE_OPAQUE=2000;\n\tBaseMaterial.RENDERQUEUE_ALPHATEST=2450;\n\tBaseMaterial.RENDERQUEUE_TRANSPARENT=3000;\n\tBaseMaterial.CULL_NONE=0;\n\tBaseMaterial.CULL_FRONT=1;\n\tBaseMaterial.CULL_BACK=2;\n\tBaseMaterial.BLEND_DISABLE=0;\n\tBaseMaterial.BLEND_ENABLE_ALL=1;\n\tBaseMaterial.BLEND_ENABLE_SEPERATE=2;\n\tBaseMaterial.BLENDPARAM_ZERO=0;\n\tBaseMaterial.BLENDPARAM_ONE=1;\n\tBaseMaterial.BLENDPARAM_SRC_COLOR=0x0300;\n\tBaseMaterial.BLENDPARAM_ONE_MINUS_SRC_COLOR=0x0301;\n\tBaseMaterial.BLENDPARAM_DST_COLOR=0x0306;\n\tBaseMaterial.BLENDPARAM_ONE_MINUS_DST_COLOR=0x0307;\n\tBaseMaterial.BLENDPARAM_SRC_ALPHA=0x0302;\n\tBaseMaterial.BLENDPARAM_ONE_MINUS_SRC_ALPHA=0x0303;\n\tBaseMaterial.BLENDPARAM_DST_ALPHA=0x0304;\n\tBaseMaterial.BLENDPARAM_ONE_MINUS_DST_ALPHA=0x0305;\n\tBaseMaterial.BLENDPARAM_SRC_ALPHA_SATURATE=0x0308;\n\tBaseMaterial.BLENDEQUATION_ADD=0;\n\tBaseMaterial.BLENDEQUATION_SUBTRACT=1;\n\tBaseMaterial.BLENDEQUATION_REVERSE_SUBTRACT=2;\n\tBaseMaterial.DEPTHTEST_OFF=0;\n\tBaseMaterial.DEPTHTEST_NEVER=0x0200;\n\tBaseMaterial.DEPTHTEST_LESS=0x0201;\n\tBaseMaterial.DEPTHTEST_EQUAL=0x0202;\n\tBaseMaterial.DEPTHTEST_LEQUAL=0x0203;\n\tBaseMaterial.DEPTHTEST_GREATER=0x0204;\n\tBaseMaterial.DEPTHTEST_NOTEQUAL=0x0205;\n\tBaseMaterial.DEPTHTEST_GEQUAL=0x0206;\n\tBaseMaterial.DEPTHTEST_ALWAYS=0x0207;\n\tBaseMaterial.SHADERDEFINE_ALPHATEST=0x1;\n\tBaseMaterial.ALPHATESTVALUE=0;\n\t__static(BaseMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1();}\n\t]);\n\treturn BaseMaterial;\n})(Resource)\n\n\n/**\n*<code>BaseTexture</code> 纹理的父类，抽象类，不允许实例。\n*/\n//class laya.d3.resource.BaseTexture extends laya.resource.Resource\nvar BaseTexture=(function(_super){\n\tfunction BaseTexture(){\n\t\t/**@private */\n\t\tthis._type=0;\n\t\t/**@private */\n\t\tthis._width=0;\n\t\t/**@private */\n\t\tthis._height=0;\n\t\t/**@private */\n\t\tthis._size=null;\n\t\t/**@private */\n\t\tthis._repeat=false;\n\t\t/**@private */\n\t\tthis._mipmap=false;\n\t\t/**@private */\n\t\tthis._minFifter=0;\n\t\t/**@private */\n\t\tthis._magFifter=0;\n\t\t/**@private */\n\t\tthis._format=0;\n\t\t/**@private */\n\t\tthis._source=null;\n\t\t/**@private */\n\t\tthis._conchTexture=null;\n\t\t/**@private */\n\t\tthis._wrapModeU=0;\n\t\t/**@private */\n\t\tthis._wrapModeV=0;\n\t\tBaseTexture.__super.call(this);\n\t\tthis._repeat=true;\n\t\tthis.mipmap=true;\n\t\tthis.minFifter=-1;\n\t\tthis.magFifter=-1;\n\t}\n\n\t__class(BaseTexture,'laya.d3.resource.BaseTexture',_super);\n\tvar __proto=BaseTexture.prototype;\n\t/**\n\t*获取宽度。\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._width;\n\t});\n\n\t/**\n\t*是否使用重复模式纹理寻址\n\t*/\n\t/**\n\t*是否使用重复模式纹理寻址\n\t*/\n\t__getset(0,__proto,'repeat',function(){\n\t\treturn this._repeat;\n\t\t},function(value){\n\t\tif (this._repeat!==value){\n\t\t\tthis._repeat=value;\n\t\t\tif (this._source){\n\t\t\t\tvar gl=WebGL.mainContext;\n\t\t\t\tWebGLContext.bindTexture(gl,this._type,this._source);\n\t\t\t\tvar isPot=Arith.isPOT(this._width,this._height);\n\t\t\t\tif (isPot && this._repeat){\n\t\t\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.REPEAT*/0x2901);\n\t\t\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.REPEAT*/0x2901);\n\t\t\t\t\t}else {\n\t\t\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*获取高度。\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\treturn this._height;\n\t});\n\n\t/**\n\t*放大过滤器\n\t*/\n\t/**\n\t*放大过滤器\n\t*/\n\t__getset(0,__proto,'magFifter',function(){\n\t\treturn this._magFifter;\n\t\t},function(value){\n\t\tthis._magFifter=value;\n\t\tif (value !=this._magFifter){\n\t\t\tthis._conchTexture && this._conchTexture.setMaxFifter(value);\n\t\t}\n\t});\n\n\t/**\n\t*获取纹理纵向循环模式。\n\t*/\n\t__getset(0,__proto,'wrapModeV',function(){\n\t\treturn this._wrapModeV;\n\t});\n\n\t/**\n\t*获取尺寸。\n\t*/\n\t__getset(0,__proto,'size',function(){\n\t\treturn this._size;\n\t});\n\n\t/**\n\t*获取纹理横向循环模式。\n\t*/\n\t__getset(0,__proto,'wrapModeU',function(){\n\t\treturn this._wrapModeU;\n\t});\n\n\t/**\n\t*是否使用mipLevel\n\t*/\n\t/**\n\t*是否使用mipLevel\n\t*/\n\t__getset(0,__proto,'mipmap',function(){\n\t\treturn this._mipmap;\n\t\t},function(value){\n\t\tthis._mipmap=value;\n\t\tif (this._mipmap !=value){\n\t\t\tthis._conchTexture && this._conchTexture.setMipMap(value);\n\t\t}\n\t});\n\n\t/**\n\t*缩小过滤器\n\t*/\n\t/**\n\t*缩小过滤器\n\t*/\n\t__getset(0,__proto,'minFifter',function(){\n\t\treturn this._minFifter;\n\t\t},function(value){\n\t\tthis._minFifter=value;\n\t\tif (this._minFifter !=value){\n\t\t\tthis._conchTexture && this._conchTexture.setMinFifter(value);\n\t\t}\n\t});\n\n\t/**\n\t*纹理格式\n\t*/\n\t__getset(0,__proto,'format',function(){\n\t\treturn this._format;\n\t});\n\n\t/**\n\t*获取纹理资源。\n\t*/\n\t__getset(0,__proto,'source',function(){\n\t\tthis.activeResource();\n\t\treturn this._source;\n\t});\n\n\t/**\n\t*获取纹理资源。\n\t*/\n\t__getset(0,__proto,'defaulteTexture',function(){\n\t\treturn SolidColorTexture2D.grayTexture;\n\t});\n\n\tBaseTexture.WARPMODE_REPEAT=0;\n\tBaseTexture.WARPMODE_CLAMP=1;\n\treturn BaseTexture;\n})(Resource)\n\n\n/**\n*<code>BaseMesh</code> 类用于创建网格,抽象类,不允许实例。\n*/\n//class laya.d3.resource.models.BaseMesh extends laya.resource.Resource\nvar BaseMesh=(function(_super){\n\tfunction BaseMesh(){\n\t\t/**@private */\n\t\tthis._subMeshCount=0;\n\t\t/**@private */\n\t\tthis._boundingBox=null;\n\t\t/**@private */\n\t\tthis._boundingSphere=null;\n\t\t/**@private */\n\t\tthis._boundingBoxCorners=null;\n\t\t/**@private 只读,不允许修改。*/\n\t\tthis._positions=null;\n\t\tBaseMesh.__super.call(this);\n\t\tthis._boundingBoxCorners=__newvec(8,null);\n\t}\n\n\t__class(BaseMesh,'laya.d3.resource.models.BaseMesh',_super);\n\tvar __proto=BaseMesh.prototype;\n\t/**\n\t*获取网格顶点,请重载此方法。\n\t*@return 网格顶点。\n\t*/\n\t__proto._getPositions=function(){\n\t\tthrow new Error(\"未Override,请重载该属性！\");\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._generateBoundingObject=function(){\n\t\tthis._boundingSphere=new BoundSphere(new Vector3(),0);\n\t\tBoundSphere.createfromPoints(this._positions,this._boundingSphere);\n\t\tthis._boundingBox=new BoundBox(new Vector3(),new Vector3());\n\t\tBoundBox.createfromPoints(this._positions,this._boundingBox);\n\t\tthis._boundingBox.getCorners(this._boundingBoxCorners);\n\t}\n\n\t/**\n\t*获取渲染单元数量,请重载此方法。\n\t*@return 渲染单元数量。\n\t*/\n\t__proto.getRenderElementsCount=function(){\n\t\tthrow new Error(\"未Override,请重载该属性！\");\n\t}\n\n\t/**\n\t*获取渲染单元,请重载此方法。\n\t*@param index 索引。\n\t*@return 渲染单元。\n\t*/\n\t__proto.getRenderElement=function(index){\n\t\tthrow new Error(\"未Override,请重载该属性！\");\n\t}\n\n\t/**\n\t*获取SubMesh的个数。\n\t*@return SubMesh的个数。\n\t*/\n\t__getset(0,__proto,'subMeshCount',function(){\n\t\treturn this._subMeshCount;\n\t});\n\n\t/**\n\t*获取AABB包围盒,禁止修改其数据。\n\t*@return AABB包围盒。\n\t*/\n\t__getset(0,__proto,'boundingBox',function(){\n\t\treturn this._boundingBox;\n\t});\n\n\t/**\n\t*获取包围球顶点,禁止修改其数据。\n\t*@return 包围球。\n\t*/\n\t__getset(0,__proto,'boundingBoxCorners',function(){\n\t\treturn this._boundingBoxCorners;\n\t});\n\n\t/**\n\t*获取包围球,禁止修改其数据。\n\t*@return 包围球。\n\t*/\n\t__getset(0,__proto,'boundingSphere',function(){\n\t\treturn this._boundingSphere;\n\t});\n\n\treturn BaseMesh;\n})(Resource)\n\n\n/**\n*<code>TerrainHeightData</code> 类用于描述地形高度信息。\n*/\n//class laya.d3.terrain.TerrainHeightData extends laya.resource.Resource\nvar TerrainHeightData=(function(_super){\n\tfunction TerrainHeightData(){\n\t\tthis._terrainHeightData=null;\n\t\tthis._width=0;\n\t\tthis._height=0;\n\t\tthis._bitType=0;\n\t\tthis._value=NaN;\n\t\tTerrainHeightData.__super.call(this);\n\t}\n\n\t__class(TerrainHeightData,'laya.d3.terrain.TerrainHeightData',_super);\n\tvar __proto=TerrainHeightData.prototype;\n\t/**\n\t*异步回调\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tthis._width=params[0];\n\t\tthis._height=params[1];\n\t\tthis._bitType=params[2];\n\t\tthis._value=params[3];\n\t\tvar buffer;\n\t\tvar ratio=NaN;\n\t\tif (this._bitType==8){\n\t\t\tbuffer=new Uint8Array(data);\n\t\t\tratio=1.0 / 255.0;\n\t\t}\n\t\telse if (this._bitType==16){\n\t\t\tbuffer=new Int16Array(data);\n\t\t\tratio=1.0 / 32766.0;\n\t\t}\n\t\tthis._terrainHeightData=new Float32Array(this._height *this._width);\n\t\tfor (var i=0,n=this._height *this._width;i < n;i++){\n\t\t\tthis._terrainHeightData[i]=(buffer[i] *ratio *this._value)/2;\n\t\t}\n\t\tthis._endLoaded();\n\t}\n\n\tTerrainHeightData.load=function(url,widht,height,bitType,value){\n\t\treturn Laya.loader.create(url,null,null,TerrainHeightData,[widht,height,bitType,value],1,false);\n\t}\n\n\treturn TerrainHeightData;\n})(Resource)\n\n\n/**\n*<code>TerrainRes</code> 类用于描述地形信息。\n*/\n//class laya.d3.terrain.TerrainRes extends laya.resource.Resource\nvar TerrainRes=(function(_super){\n\tfunction TerrainRes(){\n\t\tthis._version=NaN;\n\t\tthis._cameraCoordinateInverse=false;\n\t\tthis._gridSize=NaN;\n\t\tthis._chunkNumX=0;\n\t\tthis._chunkNumZ=0;\n\t\tthis._heightDataX=0;\n\t\tthis._heightDataZ=0;\n\t\tthis._heightDataBitType=0;\n\t\tthis._heightDataValue=NaN;\n\t\tthis._heightDataUrl=null;\n\t\tthis._detailTextureInfos=null;\n\t\tthis._chunkInfos=null;\n\t\tthis._heightData=null;\n\t\tthis._materialInfo=null;\n\t\tthis._alphaMaps=null;\n\t\tthis._normalMaps=null;\n\t\tTerrainRes.__super.call(this);\n\t}\n\n\t__class(TerrainRes,'laya.d3.terrain.TerrainRes',_super);\n\tvar __proto=TerrainRes.prototype;\n\t__proto.parseData=function(data){\n\t\tvar json=data[0];\n\t\tvar resouMap=data[1];\n\t\tthis._version=json.version;\n\t\tif (this._version==1.0){\n\t\t\tthis._cameraCoordinateInverse=json.cameraCoordinateInverse;\n\t\t\tthis._gridSize=json.gridSize;\n\t\t\tthis._chunkNumX=json.chunkNumX;\n\t\t\tthis._chunkNumZ=json.chunkNumZ;\n\t\t\tvar heightData=json.heightData;\n\t\t\tthis._heightDataX=heightData.numX;\n\t\t\tthis._heightDataZ=heightData.numZ;\n\t\t\tthis._heightDataBitType=heightData.bitType;\n\t\t\tthis._heightDataValue=heightData.value;\n\t\t\tthis._heightDataUrl=resouMap[heightData.url];\n\t\t\tthis._materialInfo=new MaterialInfo();\n\t\t\tif (json.material){\n\t\t\t\tvar ambient=json.material.ambient;\n\t\t\t\tvar diffuse=json.material.diffuse;\n\t\t\t\tvar specular=json.material.specular;\n\t\t\t\tthis._materialInfo.ambientColor=new Vector3(ambient[0],ambient[1],ambient[2]);\n\t\t\t\tthis._materialInfo.diffuseColor=new Vector3(diffuse[0],diffuse[1],diffuse[2]);\n\t\t\t\tthis._materialInfo.specularColor=new Vector4(specular[0],specular[1],specular[2],specular[3]);\n\t\t\t};\n\t\t\tvar detailTextures=json.detailTexture;\n\t\t\tthis._detailTextureInfos=__newvec(detailTextures.length);\n\t\t\tfor (var i=0;i < detailTextures.length;i++){\n\t\t\t\tvar detail=detailTextures[i];\n\t\t\t\tvar info=new DetailTextureInfo();\n\t\t\t\tinfo.diffuseTexture=resouMap[detail.diffuse];\n\t\t\t\tinfo.normalTexture=detail.normal ? resouMap[detail.normal] :null;\n\t\t\t\tif (detail.scale){\n\t\t\t\t\tinfo.scale=new Vector2(detail.scale[0],detail.scale[1]);\n\t\t\t\t\t}else {\n\t\t\t\t\tinfo.scale=new Vector2(1,1);\n\t\t\t\t}\n\t\t\t\tif (detail.offset){\n\t\t\t\t\tinfo.offset=new Vector2(detail.offset[0],detail.offset[1]);\n\t\t\t\t\t}else {\n\t\t\t\t\tinfo.offset=new Vector2(0,0);\n\t\t\t\t}\n\t\t\t\tthis._detailTextureInfos[i]=info;\n\t\t\t};\n\t\t\tvar alphaMaps=json.alphaMap;\n\t\t\tthis._alphaMaps=__newvec(alphaMaps.length);\n\t\t\tfor (i=0;i < this._alphaMaps.length;i++){\n\t\t\t\tthis._alphaMaps[i]=json.alphaMap[i];\n\t\t\t};\n\t\t\tvar normalMaps=json.normalMap;\n\t\t\tthis._normalMaps=__newvec(normalMaps.length);\n\t\t\tfor (i=0;i < this._normalMaps.length;i++){\n\t\t\t\tthis._normalMaps[i]=json.normalMap[i];\n\t\t\t};\n\t\t\tvar jchunks=json.chunkInfo;\n\t\t\tif (this._chunkNumX *this._chunkNumZ !=jchunks.length){\n\t\t\t\talert(\"terrain data error\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis._chunkInfos=__newvec(jchunks.length);\n\t\t\tfor (i=0;i < jchunks.length;i++){\n\t\t\t\tvar jchunk=jchunks[i];\n\t\t\t\tvar chunkinfo=new ChunkInfo();\n\t\t\t\tvar nAlphaMapNum=jchunk.alphaMap.length;\n\t\t\t\tvar nDetailIDNum=jchunk.detailID.length;\n\t\t\t\tif (nAlphaMapNum !=nDetailIDNum){\n\t\t\t\t\talert(\"terrain chunk data error\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tchunkinfo.alphaMap=__newvec(nAlphaMapNum);\n\t\t\t\tchunkinfo.detailID=__newvec(nDetailIDNum);\n\t\t\t\tchunkinfo.normalMap=resouMap[this._normalMaps[jchunk.normalMap]];\n\t\t\t\tfor (var j=0;j < nAlphaMapNum;j++){\n\t\t\t\t\tchunkinfo.alphaMap[j]=resouMap[this._alphaMaps[jchunk.alphaMap[j]]];\n\t\t\t\t\tvar jid=jchunk.detailID[j];\n\t\t\t\t\tvar nIDNum=jid.length;\n\t\t\t\t\tchunkinfo.detailID[j]=new Uint8Array(nIDNum);\n\t\t\t\t\tfor (var k=0;k < nIDNum;k++){\n\t\t\t\t\t\tchunkinfo.detailID[j][k]=jid[k];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._chunkInfos[i]=chunkinfo;\n\t\t\t}\n\t\t\tthis._heightData=Loader.getRes(this._heightDataUrl);\n\t\t\tthis.onLoadTerrainComplete(this._heightData);\n\t\t}\n\t\treturn true;\n\t}\n\n\t__proto.onLoadTerrainComplete=function(heightData){\n\t\tthis._endLoaded();\n\t}\n\n\t/**\n\t*异步回调\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tthis.parseData(data);\n\t}\n\n\tTerrainRes.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,TerrainRes,null,1,false);\n\t}\n\n\treturn TerrainRes;\n})(Resource)\n\n\n/**\n*<code>KeyframeAnimation</code> 类用于帧动画组件的父类。\n*/\n//class laya.d3.component.animation.KeyframeAnimations extends laya.d3.component.Component3D\nvar KeyframeAnimations=(function(_super){\n\tfunction KeyframeAnimations(){\n\t\t/**动画播放器。*/\n\t\tthis._player=null;\n\t\t/**@private */\n\t\tthis._templet=null;\n\t\tKeyframeAnimations.__super.call(this);\n\t\tthis._player=new AnimationPlayer();\n\t}\n\n\t__class(KeyframeAnimations,'laya.d3.component.animation.KeyframeAnimations',_super);\n\tvar __proto=KeyframeAnimations.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._updateAnimtionPlayer=function(){\n\t\tthis._player._update(Laya.timer.delta);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addUpdatePlayerToTimer=function(){\n\t\tLaya.timer.frameLoop(1,this,this._updateAnimtionPlayer);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeUpdatePlayerToTimer=function(){\n\t\tLaya.timer.clear(this,this._updateAnimtionPlayer);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onOwnerActiveHierarchyChanged=function(active){\n\t\tif ((this._owner).displayedInStage){\n\t\t\tif (active)\n\t\t\t\tthis._addUpdatePlayerToTimer();\n\t\t\telse\n\t\t\tthis._removeUpdatePlayerToTimer();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*载入组件时执行\n\t*/\n\t__proto._load=function(owner){\n\t\t((owner).activeInHierarchy)&& (this._addUpdatePlayerToTimer());\n\t\towner.on(/*laya.events.Event.ACTIVE_IN_HIERARCHY_CHANGED*/\"activeinhierarchychanged\",this,this._onOwnerActiveHierarchyChanged);\n\t}\n\n\t/**\n\t*@private\n\t*卸载组件时执行\n\t*/\n\t__proto._unload=function(owner){\n\t\t_super.prototype._unload.call(this,owner);\n\t\t((owner).activeInHierarchy)&& (this._removeUpdatePlayerToTimer());\n\t\towner.off(/*laya.events.Event.ACTIVE_IN_HIERARCHY_CHANGED*/\"activeinhierarchychanged\",this,this._onOwnerActiveHierarchyChanged);\n\t\tthis._player._destroy();\n\t\tthis._player=null;\n\t\tthis._templet=null;\n\t}\n\n\t/**\n\t*设置url地址。\n\t*@param value 地址。\n\t*/\n\t__getset(0,__proto,'url',null,function(value){\n\t\tconsole.log(\"Warning: discard property,please use templet property instead.\");\n\t\tvar templet=Laya.loader.create(value,null,null,AnimationTemplet);\n\t\tif (this._templet!==templet){\n\t\t\tif (this._player.state!==/*laya.ani.AnimationState.stopped*/0)\n\t\t\t\tthis._player.stop(true);\n\t\t\tthis._templet=templet;\n\t\t\tthis._player.templet=templet;\n\t\t\tthis.event(/*laya.events.Event.ANIMATION_CHANGED*/\"animationchanged\",this);\n\t\t}\n\t});\n\n\t/**\n\t*获取动画播放器。\n\t*@return 动画播放器。\n\t*/\n\t__getset(0,__proto,'player',function(){\n\t\treturn this._player;\n\t});\n\n\t/**\n\t*设置动画模板。\n\t*@param value 设置动画模板。\n\t*/\n\t/**\n\t*获取动画模板。\n\t*@return value 动画模板。\n\t*/\n\t__getset(0,__proto,'templet',function(){\n\t\treturn this._templet;\n\t\t},function(value){\n\t\tif (this._templet!==value){\n\t\t\tif (this._player.state!==/*laya.ani.AnimationState.stopped*/0)\n\t\t\t\tthis._player.stop(true);\n\t\t\tthis._templet=value;\n\t\t\tthis._player.templet=value;\n\t\t\tthis.event(/*laya.events.Event.ANIMATION_CHANGED*/\"animationchanged\",this);\n\t\t}\n\t});\n\n\t/**\n\t*获取播放器帧数。\n\t*@return 播放器帧数。\n\t*/\n\t__getset(0,__proto,'currentFrameIndex',function(){\n\t\treturn this._player.currentKeyframeIndex;\n\t});\n\n\t/**\n\t*获取播放器的动画索引。\n\t*@return 动画索引。\n\t*/\n\t__getset(0,__proto,'currentAnimationClipIndex',function(){\n\t\treturn this._player.currentAnimationClipIndex;\n\t});\n\n\t/**\n\t*获取播放器当前动画的节点数量。\n\t*@return 节点数量。\n\t*/\n\t__getset(0,__proto,'nodeCount',function(){\n\t\treturn this._templet.getNodeCount(this._player.currentAnimationClipIndex);\n\t});\n\n\treturn KeyframeAnimations;\n})(Component3D)\n\n\n/**\n*<code>Animations</code> 类用于创建动画组件。\n*/\n//class laya.d3.component.Animator extends laya.d3.component.Component3D\nvar Animator=(function(_super){\n\tfunction Animator(){\n\t\t/**@private */\n\t\t//this._updateTransformPropertyLoopCount=0;\n\t\t/**@private */\n\t\t//this._cacheFrameRateInterval=NaN;\n\t\t/**@private */\n\t\t//this._cacheFrameRate=0;\n\t\t/**@private */\n\t\t//this._cachePlayRate=NaN;\n\t\t/**@private */\n\t\t//this._currentPlayClip=null;\n\t\t/**@private */\n\t\t//this._currentPlayClipIndex=0;\n\t\t/**@private */\n\t\t//this._stoped=false;\n\t\t/**@private */\n\t\t//this._currentTime=NaN;\n\t\t/**@private */\n\t\t//this._currentFrameTime=NaN;\n\t\t/**@private */\n\t\t//this._currentFrameIndex=0;\n\t\t/**@private */\n\t\t//this._elapsedPlaybackTime=NaN;\n\t\t/**@private */\n\t\t//this._startUpdateLoopCount=NaN;\n\t\t/**@private */\n\t\t//this._clipNames=null;\n\t\t/**@private */\n\t\t//this._clips=null;\n\t\t/**@private */\n\t\t//this._playStartFrames=null;\n\t\t/**@private */\n\t\t//this._playEndFrames=null;\n\t\t/**@private */\n\t\t//this._playEventIndex=0;\n\t\t/**@private */\n\t\t//this._defaultClipIndex=0;\n\t\t/**@private */\n\t\t//this._avatar=null;\n\t\t/**@private */\n\t\t//this._cacheNodesDefaultlValues=null;\n\t\t/**@private 无Avatar时缓存场景树中的精灵节点。*/\n\t\t//this._cacheNodesSpriteOwners=null;\n\t\t/**@private 有Avatar时缓存Avatar树中的AnimationNode节点。*/\n\t\t//this._cacheNodesAvatarOwners=null;\n\t\t/**@private */\n\t\t//this._lastPlayAnimationClip=null;\n\t\t/**@private */\n\t\t//this._lastPlayAnimationClipIndex=0;\n\t\t/**@private */\n\t\t//this._publicClipsDatas=null;\n\t\t/**@private */\n\t\t//this._publicAvatarNodeDatas=null;\n\t\t/**@private */\n\t\t//this._curAvatarNodeDatas=null;\n\t\t/**@private */\n\t\t//this._cacheNodesToSpriteMap=null;\n\t\t/**@private */\n\t\t//this._cacheSpriteToNodesMap=null;\n\t\t/**@private */\n\t\t//this._cacheFullFrames=null;\n\t\t/**@private */\n\t\t//this._linkSpritesData=null;\n\t\t/**@private */\n\t\t//this._avatarNodeMap=null;\n\t\t/**@private */\n\t\t//this._avatarNodes=null;\n\t\t/**@private */\n\t\t//this._canCache=false;\n\t\t/**@private */\n\t\t//this._lastFrameIndex=0;\n\t\t/**是否为缓存模式*/\n\t\t//this.isCache=false;\n\t\t/**播放速率*/\n\t\t//this.playbackRate=NaN;\n\t\t/**激活时是否自动播放*/\n\t\t//this.playOnWake=false;\n\t\tAnimator.__super.call(this);\n\t\tthis._clipNames=[];\n\t\tthis._clips=[];\n\t\tthis._playStartFrames=[];\n\t\tthis._playEndFrames=[];\n\t\tthis._cacheNodesSpriteOwners=[];\n\t\tthis._cacheNodesAvatarOwners=[];\n\t\tthis._cacheNodesDefaultlValues=[];\n\t\tthis._cacheNodesToSpriteMap=[];\n\t\tthis._cacheSpriteToNodesMap=[];\n\t\tthis._cacheFullFrames=[];\n\t\tthis._publicClipsDatas=[];\n\t\tthis._playEventIndex=-1;\n\t\tthis._updateTransformPropertyLoopCount=-1;\n\t\tthis._lastFrameIndex=-1;\n\t\tthis._defaultClipIndex=-1;\n\t\tthis._cachePlayRate=1.0;\n\t\tthis._currentPlayClip=null;\n\t\tthis._currentFrameIndex=-1;\n\t\tthis._currentTime=0.0;\n\t\tthis._elapsedPlaybackTime=0;\n\t\tthis._startUpdateLoopCount=-1;\n\t\tthis.isCache=true;\n\t\tthis.cacheFrameRate=60;\n\t\tthis.playbackRate=1.0;\n\t\tthis.playOnWake=true;\n\t}\n\n\t__class(Animator,'laya.d3.component.Animator',_super);\n\tvar __proto=Animator.prototype;\n\tLaya.imps(__proto,{\"laya.resource.IDestroy\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._getAvatarOwnersByClip=function(clipIndex){\n\t\tvar frameNodes=this._clips[clipIndex]._nodes;\n\t\tvar frameNodesCount=frameNodes.length;\n\t\tvar owners=this._cacheNodesAvatarOwners[clipIndex];\n\t\towners.length=frameNodesCount;\n\t\tvar defaultValues=this._cacheNodesDefaultlValues[clipIndex];\n\t\tdefaultValues.length=frameNodesCount;\n\t\tfor (var i=0;i < frameNodesCount;i++){\n\t\t\tvar nodeOwner=this._avatarNodes[0];\n\t\t\tvar node=frameNodes[i];\n\t\t\tvar path=node.path;\n\t\t\tfor (var j=0,m=path.length;j < m;j++){\n\t\t\t\tvar p=path[j];\n\t\t\t\tif (p===\"\"){\n\t\t\t\t\tbreak ;\n\t\t\t\t\t}else {\n\t\t\t\t\tnodeOwner=nodeOwner.getChildByName(p);\n\t\t\t\t\tif (!nodeOwner)\n\t\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!nodeOwner)\n\t\t\t\tcontinue ;\n\t\t\towners[i]=nodeOwner;\n\t\t\tvar datas=AnimationNode._propertyGetFuncs[node.propertyNameID](nodeOwner);\n\t\t\tif (datas){\n\t\t\t\tvar cacheDatas=new Float32Array(node.keyFrameWidth);\n\t\t\t\tdefaultValues[i]=cacheDatas;\n\t\t\t\tfor (j=0,m=datas.length;j < m;j++)\n\t\t\t\tcacheDatas[j]=datas[j];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._handleSpriteOwnersByClip=function(clipIndex){\n\t\tvar frameNodes=this._clips[clipIndex]._nodes;\n\t\tvar frameNodesCount=frameNodes.length;\n\t\tvar owners=this._cacheNodesSpriteOwners[clipIndex];\n\t\towners.length=frameNodesCount;\n\t\tvar defaultValues=this._cacheNodesDefaultlValues[clipIndex];\n\t\tdefaultValues.length=frameNodesCount;\n\t\tfor (var i=0;i < frameNodesCount;i++){\n\t\t\tvar nodeOwner=this._owner;\n\t\t\tvar node=frameNodes[i];\n\t\t\tvar path=node.path;\n\t\t\tvar j=0,m=0;\n\t\t\tfor (j=0,m=path.length;j < m;j++){\n\t\t\t\tvar p=path[j];\n\t\t\t\tif (p===\"\"){\n\t\t\t\t\tbreak ;\n\t\t\t\t\t}else {\n\t\t\t\t\tnodeOwner=nodeOwner.getChildByName(p);\n\t\t\t\t\tif (!nodeOwner)\n\t\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (nodeOwner){\n\t\t\t\towners[i]=nodeOwner;\n\t\t\t\tvar datas=AnimationNode._propertyGetFuncs[node.propertyNameID](null,nodeOwner);\n\t\t\t\tif (datas){\n\t\t\t\t\tvar cacheDatas=new Float32Array(node.keyFrameWidth);\n\t\t\t\t\tdefaultValues[i]=cacheDatas;\n\t\t\t\t\tfor (j=0,m=datas.length;j < m;j++)\n\t\t\t\t\tcacheDatas[j]=datas[j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._offClipAndAvatarRelateEvent=function(avatar,clip){\n\t\tif (avatar.loaded){\n\t\t\tif (!clip.loaded)\n\t\t\t\tclip.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._getAvatarOwnersByClip);\n\t\t\t}else {\n\t\t\tavatar.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._getAvatarOwnersAndInitDatasAsync);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getAvatarOwnersByClipAsync=function(clipIndex,clip){\n\t\tif (clip.loaded)\n\t\t\tthis._getAvatarOwnersByClip(clipIndex);\n\t\telse\n\t\tclip.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._getAvatarOwnersByClip,[clipIndex]);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._offGetSpriteOwnersByClipAsyncEvent=function(clip){\n\t\tif (!clip.loaded)\n\t\t\tclip.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._getSpriteOwnersByClipAsync);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getSpriteOwnersByClipAsync=function(clipIndex,clip){\n\t\tif (clip.loaded)\n\t\t\tthis._handleSpriteOwnersByClip(clipIndex);\n\t\telse\n\t\tclip.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._handleSpriteOwnersByClip,[clipIndex]);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getAvatarOwnersAndInitDatasAsync=function(){\n\t\tfor (var i=0,n=this._clips.length;i < n;i++)\n\t\tthis._getAvatarOwnersByClipAsync(i,this._clips[i]);\n\t\tthis._avatar._cloneDatasToAnimator(this);\n\t\tfor (i=0,n=this._avatarNodes.length;i < n;i++)\n\t\tthis._checkAnimationNode(this._avatarNodes[i],this._owner);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._offGetClipCacheFullKeyframeIndicesEvent=function(clip){\n\t\t(clip.loaded)|| (clip.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._computeCacheFullKeyframeIndices));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._computeCacheFullKeyframeIndices=function(clipIndex){\n\t\tvar clip=this._clips[clipIndex];\n\t\tvar cacheInterval=this._cacheFrameRateInterval *this._cachePlayRate;\n\t\tvar clipCacheFullFrames=clip._getFullKeyframeIndicesWithCache(cacheInterval);\n\t\tif (clipCacheFullFrames){\n\t\t\tthis._cacheFullFrames[clipIndex]=clipCacheFullFrames;\n\t\t\treturn;\n\t\t\t}else {\n\t\t\tclipCacheFullFrames=this._cacheFullFrames[clipIndex]=[];\n\t\t\tvar nodes=clip._nodes;\n\t\t\tvar nodeCount=nodes.length;\n\t\t\tclipCacheFullFrames.length=nodeCount;\n\t\t\tvar frameCount=Math.ceil(clip._duration / cacheInterval-0.00001)+1;\n\t\t\tfor (var i=0;i < nodeCount;i++){\n\t\t\t\tvar node=nodes[i];\n\t\t\t\tvar nodeFullFrames=new Int32Array(frameCount);\n\t\t\t\t(nodeFullFrames).fill(-1);\n\t\t\t\tvar keyFrames=node.keyFrames;\n\t\t\t\tfor (var j=0,n=keyFrames.length;j < n;j++){\n\t\t\t\t\tvar keyFrame=keyFrames[j];\n\t\t\t\t\tvar startTime=keyFrame.startTime;\n\t\t\t\t\tvar endTime=startTime+keyFrame.duration;\n\t\t\t\t\twhile (startTime <=endTime){\n\t\t\t\t\t\tvar frameIndex=Math.ceil(startTime / cacheInterval-0.00001);\n\t\t\t\t\t\tnodeFullFrames[frameIndex]=j;\n\t\t\t\t\t\tstartTime+=cacheInterval;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclipCacheFullFrames[i]=nodeFullFrames;\n\t\t\t}\n\t\t\tclip._cacheFullKeyframeIndices(cacheInterval,clipCacheFullFrames);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateAnimtionPlayer=function(){\n\t\tthis._updatePlayer(Laya.timer.delta / 1000.0);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onOwnerActiveHierarchyChanged=function(){\n\t\tvar owner=this._owner;\n\t\tif (owner.activeInHierarchy){\n\t\t\tLaya.timer.frameLoop(1,this,this._updateAnimtionPlayer);\n\t\t\t(this.playOnWake && this.clip)&& (this.play());\n\t\t\t}else {\n\t\t\t(this.playState!==/*laya.ani.AnimationState.stopped*/0)&& (this._stoped=true);\n\t\t\tLaya.timer.clear(this,this._updateAnimtionPlayer);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._eventScript=function(from,to){\n\t\tvar events=this._currentPlayClip._animationEvents;\n\t\tfor (var n=events.length;this._playEventIndex < n;this._playEventIndex++){\n\t\t\tvar eve=events[this._playEventIndex];\n\t\t\tvar eventTime=eve.time;\n\t\t\tif (from <=eventTime && eventTime < to){\n\t\t\t\tvar scripts=this._owner._scripts;\n\t\t\t\tfor (var j=0,m=scripts.length;j < m;j++){\n\t\t\t\t\tvar script=scripts[j];\n\t\t\t\t\tvar fun=script[eve.eventName];\n\t\t\t\t\t(fun)&& (fun.apply(script,eve.params));\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setPlayParams=function(time,cacheFrameInterval){\n\t\tvar lastTime=this._currentTime;\n\t\tthis._currentTime=time;\n\t\tthis._currentFrameIndex=Math.max(Math.floor(this.currentPlayTime / cacheFrameInterval-0.00001),0);\n\t\tthis._currentFrameTime=this._currentFrameIndex *cacheFrameInterval;\n\t\tthis._eventScript(lastTime,time);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setPlayParamsWhenStop=function(aniClipPlayDuration,cacheFrameInterval){\n\t\tvar lastTime=this._currentTime;\n\t\tthis._currentTime=aniClipPlayDuration;\n\t\tthis._currentFrameIndex=Math.max(Math.floor(aniClipPlayDuration / cacheFrameInterval-0.00001),0);\n\t\tthis._currentFrameTime=this._currentFrameIndex *cacheFrameInterval;\n\t\tthis._eventScript(lastTime,aniClipPlayDuration);\n\t\tthis._currentPlayClip=null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._revertKeyframeNodes=function(clip,clipIndex){\n\t\tvar originalValues=this._cacheNodesDefaultlValues[clipIndex];\n\t\tvar frameNodes=clip._nodes;\n\t\tif (this._avatar){\n\t\t\tvar avatarOwners=this._cacheNodesAvatarOwners[clipIndex];\n\t\t\tfor (var i=0,n=avatarOwners.length;i < n;i++){\n\t\t\t\tvar avatarOwner=avatarOwners[i];\n\t\t\t\t(avatarOwner)&& (AnimationNode._propertySetFuncs[frameNodes[i].propertyNameID](avatarOwner,null,originalValues[i]));\n\t\t\t}\n\t\t\t}else {\n\t\t\tvar spriteOwners=this._cacheNodesSpriteOwners[clipIndex];\n\t\t\tfor (i=0,n=spriteOwners.length;i < n;i++){\n\t\t\t\tvar spriteOwner=spriteOwners[i];\n\t\t\t\t(spriteOwner)&& (AnimationNode._propertySetFuncs[frameNodes[i].propertyNameID](null,spriteOwner,originalValues[i]));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onAnimationStop=function(){\n\t\tvar i=0,n=0;\n\t\tvar frameNode,keyFrames,endKeyframeData;\n\t\tthis._lastFrameIndex=-1;\n\t\tvar frameNodes=this._currentPlayClip._nodes;\n\t\tif (this._avatar){\n\t\t\tvar avatarOwners=this._cacheNodesAvatarOwners[this._currentPlayClipIndex];\n\t\t\tfor (i=0,n=avatarOwners.length;i < n;i++){\n\t\t\t\tvar nodeOwner=avatarOwners[i];\n\t\t\t\tframeNode=frameNodes[i];\n\t\t\t\tkeyFrames=frameNode.keyFrames;\n\t\t\t\tendKeyframeData=keyFrames[keyFrames.length-1].data;\n\t\t\t\t(nodeOwner)&& (AnimationNode._propertySetFuncs[frameNode.propertyNameID](nodeOwner,null,endKeyframeData));\n\t\t\t}\n\t\t\t}else {\n\t\t\tvar spriteOwners=this._cacheNodesSpriteOwners[this._currentPlayClipIndex];\n\t\t\tfor (i=0,n=spriteOwners.length;i < n;i++){\n\t\t\t\tvar spriteOwner=spriteOwners[i];\n\t\t\t\tframeNode=frameNodes[i];\n\t\t\t\tkeyFrames=frameNode.keyFrames;\n\t\t\t\tendKeyframeData=keyFrames[keyFrames.length-1].data;\n\t\t\t\t(spriteOwner)&& (AnimationNode._propertySetFuncs[frameNode.propertyNameID](null,spriteOwner,endKeyframeData));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setAnimationClipPropertyToAnimationNode=function(nodeOwners,propertyMap,clipDatas){\n\t\tfor (var i=0,n=propertyMap.length;i < n;i++){\n\t\t\tvar nodexIndex=propertyMap[i];\n\t\t\tvar owner=nodeOwners[nodexIndex];\n\t\t\tif (owner){\n\t\t\t\tvar ketframeNode=this._currentPlayClip._nodes[nodexIndex];\n\t\t\t\tvar datas=clipDatas[nodexIndex];\n\t\t\t\t(datas)&& (AnimationNode._propertySetFuncs[ketframeNode.propertyNameID](owner,null,datas));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setAnimationClipPropertyToSprite3D=function(nodeOwners,curClipAnimationDatas){\n\t\tfor (var i=0,n=nodeOwners.length;i < n;i++){\n\t\t\tvar owner=nodeOwners[i];\n\t\t\tif (owner){\n\t\t\t\tvar ketframeNode=this._currentPlayClip._nodes[i];\n\t\t\t\tvar datas=curClipAnimationDatas[i];\n\t\t\t\t(datas)&& (AnimationNode._propertySetFuncs[ketframeNode.propertyNameID](null,owner,datas));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._handleSpriteOwnersBySprite=function(clipIndex,isLink,path,sprite){\n\t\tvar clip=this._clips[clipIndex];\n\t\tvar nodePath=path.join(\"/\");\n\t\tvar ownersNodes=clip._nodesMap[nodePath];\n\t\tif (ownersNodes){\n\t\t\tvar owners=this._cacheNodesSpriteOwners[clipIndex];\n\t\t\tvar nodes=clip._nodes;\n\t\t\tvar defaultValues=this._cacheNodesDefaultlValues[clipIndex];\n\t\t\tfor (var i=0,n=ownersNodes.length;i < n;i++){\n\t\t\t\tvar node=ownersNodes[i];\n\t\t\t\tvar index=nodes.indexOf(node);\n\t\t\t\tif (isLink){\n\t\t\t\t\towners[index]=sprite;\n\t\t\t\t\tvar datas=AnimationNode._propertyGetFuncs[node.propertyNameID](null,sprite);\n\t\t\t\t\tif (datas){\n\t\t\t\t\t\tvar cacheDatas=defaultValues[index];\n\t\t\t\t\t\t(cacheDatas)|| (defaultValues[index]=cacheDatas=new Float32Array(node.keyFrameWidth));\n\t\t\t\t\t\tfor (var j=0,m=datas.length;j < m;j++)\n\t\t\t\t\t\tcacheDatas[j]=datas[j];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\towners[index]=null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._evaluateAvatarNodesCacheMode=function(avatarOwners,clip,publicClipDatas,avatarNodeDatas,unCacheMap){\n\t\tclip._evaluateAnimationlDatasCacheMode(avatarOwners,this._cacheFullFrames[this._currentPlayClipIndex],this,publicClipDatas,unCacheMap);\n\t\tthis._setAnimationClipPropertyToAnimationNode(avatarOwners,unCacheMap,publicClipDatas);\n\t\tfor (var i=0,n=this._avatarNodes.length;i < n;i++){\n\t\t\tvar node=this._avatarNodes[i];\n\t\t\tvar nodeTransform=node.transform;\n\t\t\tif (nodeTransform._worldUpdate){\n\t\t\t\tvar nodeMatrix=new Float32Array(16);\n\t\t\t\tavatarNodeDatas[i]=nodeMatrix;\n\t\t\t\tnodeTransform._setWorldMatrixAndUpdate(nodeMatrix);\n\t\t\t\t}else {\n\t\t\t\tvar mat=nodeTransform.getWorldMatrix();\n\t\t\t\tavatarNodeDatas[i]=mat ? mat :Animator.deafaultMatrix;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._evaluateAvatarNodesRealTime=function(avatarOwners,clip,publicClipDatas,avatarNodeDatas,unCacheMap){\n\t\tclip._evaluateAnimationlDatasRealTime(avatarOwners,this.currentPlayTime,publicClipDatas,unCacheMap);\n\t\tthis._setAnimationClipPropertyToAnimationNode(avatarOwners,unCacheMap,publicClipDatas);\n\t\tfor (var i=0,n=this._avatarNodes.length;i < n;i++){\n\t\t\tvar transform=this._avatarNodes[i].transform;\n\t\t\tif (transform._worldUpdate)\n\t\t\t\ttransform._setWorldMatrixNoUpdate(avatarNodeDatas[i]);\n\t\t\telse\n\t\t\tavatarNodeDatas[i]=Animator.deafaultMatrix;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateAvatarNodesToSpriteCacheMode=function(clip,avatarNodeDatas){\n\t\tfor (var i=0,n=this._cacheSpriteToNodesMap.length;i < n;i++){\n\t\t\tvar nodeIndex=this._cacheSpriteToNodesMap[i];\n\t\t\tvar nodeMatrix=avatarNodeDatas[nodeIndex];\n\t\t\tif (nodeMatrix!==Animator.deafaultMatrix){\n\t\t\t\tvar spriteTransform=this._avatarNodes[nodeIndex].transform._entity;\n\t\t\t\tvar spriteWorldMatrix=spriteTransform.worldMatrix;\n\t\t\t\tUtils3D.matrix4x4MultiplyMFM((this._owner)._transform.worldMatrix,nodeMatrix,spriteWorldMatrix);\n\t\t\t\tspriteTransform.worldMatrix=spriteWorldMatrix;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateAvatarNodesToSpriteRealTime=function(){\n\t\tfor (var i=0,n=this._cacheSpriteToNodesMap.length;i < n;i++){\n\t\t\tvar node=this._avatarNodes[this._cacheSpriteToNodesMap[i]];\n\t\t\tvar spriteTransform=node.transform._entity;\n\t\t\tvar nodeTransform=node.transform;\n\t\t\tif (nodeTransform._worldUpdate){\n\t\t\t\tvar nodeMatrix=Animator._tempMatrix4x40;\n\t\t\t\tnodeTransform._setWorldMatrixAndUpdate(nodeMatrix);\n\t\t\t\tvar spriteWorldMatrix=spriteTransform.worldMatrix;\n\t\t\t\tUtils3D.matrix4x4MultiplyMFM((this._owner)._transform.worldMatrix,nodeMatrix,spriteWorldMatrix);\n\t\t\t\tspriteTransform.worldMatrix=spriteWorldMatrix;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updatePlayer=function(elapsedTime){\n\t\tif (this._currentPlayClip==null || this._stoped || !this._currentPlayClip.loaded)\n\t\t\treturn;\n\t\tvar cacheFrameInterval=this._cacheFrameRateInterval *this._cachePlayRate;\n\t\tvar time=0;\n\t\t(this._startUpdateLoopCount!==Stat.loopCount)&& (time=elapsedTime *this.playbackRate,this._elapsedPlaybackTime+=time);\n\t\tvar frameRate=this._currentPlayClip._frameRate;\n\t\tvar playStart=this._playStartFrames[this._currentPlayClipIndex] / frameRate;\n\t\tvar playEnd=Math.min(this._playEndFrames[this._currentPlayClipIndex] / frameRate,this._currentPlayClip._duration);\n\t\tvar aniClipPlayDuration=playEnd-playStart;\n\t\tif ((!this._currentPlayClip.islooping && this._elapsedPlaybackTime >=aniClipPlayDuration)){\n\t\t\tthis._onAnimationStop();\n\t\t\tthis._setPlayParamsWhenStop(aniClipPlayDuration,cacheFrameInterval);\n\t\t\tthis.event(/*laya.events.Event.STOPPED*/\"stopped\");\n\t\t\treturn;\n\t\t}\n\t\ttime+=this._currentTime;\n\t\tif (aniClipPlayDuration > 0){\n\t\t\tif (time >=aniClipPlayDuration){\n\t\t\t\tdo {\n\t\t\t\t\ttime-=aniClipPlayDuration;\n\t\t\t\t\tif (time < aniClipPlayDuration){\n\t\t\t\t\t\tthis._setPlayParams(time,cacheFrameInterval);\n\t\t\t\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\t\t}\n\t\t\t\t\tthis._playEventIndex=0;\n\t\t\t\t\tthis._eventScript(0,time);\n\t\t\t\t}while (time >=aniClipPlayDuration)\n\t\t\t\t}else {\n\t\t\t\tthis._setPlayParams(time,cacheFrameInterval);\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis._currentTime=this._currentFrameTime=this._currentFrameIndex=this._playEventIndex=0;\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*更新蒙皮动画组件。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._update=function(state){\n\t\tvar clip=this._currentPlayClip;\n\t\tif (this.playState!==/*laya.ani.AnimationState.playing*/2 || !clip || !clip.loaded)\n\t\t\treturn;\n\t\tvar rate=this.playbackRate *Laya.timer.scale;\n\t\tvar cacheRate=this._cachePlayRate;\n\t\tthis._canCache=this.isCache && rate >=cacheRate;\n\t\tvar frameIndex=-1;\n\t\tvar clipDatas;\n\t\tif (this._canCache){\n\t\t\tframeIndex=this._currentFrameIndex;\n\t\t\tif (this._lastFrameIndex===frameIndex)\n\t\t\t\treturn;\n\t\t\tclipDatas=clip._getAnimationDataWithCache(cacheRate,frameIndex);\n\t\t\tif (this._avatar){\n\t\t\t\tvar avatarOwners=this._cacheNodesAvatarOwners[this._currentPlayClipIndex];\n\t\t\t\tvar cacheMap=clip._cachePropertyMap;\n\t\t\t\tvar cacheMapCount=cacheMap.length;\n\t\t\t\tif (cacheMapCount > 0){\n\t\t\t\t\tif (!clipDatas){\n\t\t\t\t\t\tclipDatas=[];\n\t\t\t\t\t\tclipDatas.length=cacheMapCount;\n\t\t\t\t\t\tclip._cacheAnimationData(cacheRate,frameIndex,clipDatas);\n\t\t\t\t\t\tclip._evaluateAnimationlDatasCacheMode(avatarOwners,this._cacheFullFrames[this._currentPlayClipIndex],this,clipDatas,cacheMap);\n\t\t\t\t\t}\n\t\t\t\t\tthis._setAnimationClipPropertyToAnimationNode(avatarOwners,cacheMap,clipDatas);\n\t\t\t\t}\n\t\t\t\tthis._curAvatarNodeDatas=clip._getAvatarDataWithCache(this._avatar,this._cachePlayRate,frameIndex);\n\t\t\t\tif (!this._curAvatarNodeDatas){\n\t\t\t\t\tthis._curAvatarNodeDatas=[];\n\t\t\t\t\tthis._curAvatarNodeDatas.length=this._avatarNodes.length;\n\t\t\t\t\tclip._cacheAvatarData(this._avatar,this._cachePlayRate,frameIndex,this._curAvatarNodeDatas);\n\t\t\t\t\tthis._evaluateAvatarNodesCacheMode(avatarOwners,clip,clip._publicClipDatas,this._curAvatarNodeDatas,clip._unCachePropertyMap);\n\t\t\t\t}\n\t\t\t\tthis._updateAvatarNodesToSpriteCacheMode(clip,this._curAvatarNodeDatas);\n\t\t\t\t}else {\n\t\t\t\tvar spriteOwners=this._cacheNodesSpriteOwners[this._currentPlayClipIndex];\n\t\t\t\tif (!clipDatas){\n\t\t\t\t\tclipDatas=[];\n\t\t\t\t\tclipDatas.length=this._currentPlayClip._nodes.length;\n\t\t\t\t\tclip._evaluateAnimationlDatasCacheMode(spriteOwners,this._cacheFullFrames[this._currentPlayClipIndex],this,clipDatas,null);\n\t\t\t\t\tclip._cacheAnimationData(cacheRate,frameIndex,clipDatas);\n\t\t\t\t}\n\t\t\t\tthis._setAnimationClipPropertyToSprite3D(spriteOwners,clipDatas);\n\t\t\t}\n\t\t\t}else {\n\t\t\tclipDatas=clip._publicClipDatas;\n\t\t\tif (this._avatar){\n\t\t\t\tclip._evaluateAnimationlDatasRealTime(this._cacheNodesAvatarOwners[this._currentPlayClipIndex],this.currentPlayTime,clipDatas,clip._cachePropertyMap);\n\t\t\t\tif (!this._publicAvatarNodeDatas){\n\t\t\t\t\tthis._publicAvatarNodeDatas=[];\n\t\t\t\t\tvar nodeCount=this._avatarNodes.length;\n\t\t\t\t\tthis._publicAvatarNodeDatas.length=nodeCount;\n\t\t\t\t\tfor (var i=1;i < nodeCount;i++)\n\t\t\t\t\tthis._publicAvatarNodeDatas[i]=new Float32Array(16);\n\t\t\t\t}\n\t\t\t\tthis._curAvatarNodeDatas=this._publicAvatarNodeDatas;\n\t\t\t\tthis._evaluateAvatarNodesRealTime(this._cacheNodesAvatarOwners[this._currentPlayClipIndex],clip,clipDatas,this._curAvatarNodeDatas,clip._unCachePropertyMap);\n\t\t\t\tthis._updateAvatarNodesToSpriteRealTime();\n\t\t\t\t}else {\n\t\t\t\tclip._evaluateAnimationlDatasRealTime(this._cacheNodesSpriteOwners[this._currentPlayClipIndex],this.currentPlayTime,clipDatas,null);\n\t\t\t}\n\t\t}\n\t\tthis._lastFrameIndex=frameIndex;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._checkAnimationNode=function(node,sprite){\n\t\tif (node.name===sprite.name && !sprite._transform.dummy)\n\t\t\tsprite._isLinkSpriteToAnimationNode(this,node,true);\n\t\tfor (var i=0,n=sprite._childs.length;i < n;i++)\n\t\tthis._checkAnimationNode(node,sprite.getChildAt(i));\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._load=function(owner){\n\t\t((owner).activeInHierarchy)&& (Laya.timer.frameLoop(1,this,this._updateAnimtionPlayer));\n\t\tthis._owner.on(/*laya.events.Event.ACTIVE_IN_HIERARCHY_CHANGED*/\"activeinhierarchychanged\",this,this._onOwnerActiveHierarchyChanged);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._unload=function(owner){\n\t\t_super.prototype._unload.call(this,owner);\n\t\t((owner).activeInHierarchy)&& (Laya.timer.clear(this,this._updateAnimtionPlayer));\n\t\tthis._owner.off(/*laya.events.Event.ACTIVE_IN_HIERARCHY_CHANGED*/\"activeinhierarchychanged\",this,this._onOwnerActiveHierarchyChanged);\n\t\tthis._curAvatarNodeDatas=null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\tfor (var i=0,n=this._clips.length;i < n;i++)\n\t\tthis._clips[i]._removeReference();\n\t\tthis._currentPlayClip=null;\n\t\tthis._clipNames=null;\n\t\tthis._cacheNodesSpriteOwners=null;\n\t\tthis._cacheNodesAvatarOwners=null;\n\t\tthis._cacheNodesDefaultlValues=null;\n\t\tthis._clips=null;\n\t\tthis._cacheFullFrames=null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._cloneTo=function(dest){\n\t\tvar animator=dest;\n\t\tanimator.avatar=this.avatar;\n\t\tvar clipCount=this._clips.length;\n\t\tfor (var i=0,n=this._clips.length;i < n;i++)\n\t\tanimator.addClip(this._clips[i]);\n\t\tif (this.clip){\n\t\t\tanimator.clip=this.clip;\n\t\t}\n\t\tif (this._linkSpritesData){\n\t\t\tanimator._linkSpritesData={};\n\t\t\tfor (var k in this._linkSpritesData)\n\t\t\tanimator._linkSpritesData[k]=this._linkSpritesData[k].slice();\n\t\t}\n\t}\n\n\t/**\n\t*添加动画片段。\n\t*@param clip 动画片段。\n\t*@param playName 动画片段播放名称，如果为null,则使用clip.name作为播放名称。\n\t*@param 开始帧率。\n\t*@param 结束帧率。\n\t*/\n\t__proto.addClip=function(clip,playName,startFrame,endFrame){\n\t\t(startFrame===void 0)&& (startFrame=0);\n\t\t(endFrame===void 0)&& (endFrame=4294967295);\n\t\tplayName=playName || clip.name;\n\t\tvar index=this._clipNames.indexOf(playName);\n\t\tif (index!==-1){\n\t\t\tif (this._clips[index]!==clip)\n\t\t\t\tthrow new Error(\"Animation:this playName has exist with another clip.\");\n\t\t\t}else {\n\t\t\tvar clipIndex=this._clips.indexOf(clip);\n\t\t\tif (startFrame < 0 || endFrame < 0)\n\t\t\t\tthrow new Error(\"Animator:startFrame and endFrame must large than zero.\");\n\t\t\tif (startFrame > endFrame)\n\t\t\t\tthrow new Error(\"Animator:startFrame must less than endFrame.\");\n\t\t\tthis._clipNames.push(playName);\n\t\t\tthis._clips.push(clip);\n\t\t\tthis._playStartFrames.push(startFrame);\n\t\t\tthis._playEndFrames.push(endFrame);\n\t\t\tthis._cacheNodesSpriteOwners.push([]);\n\t\t\tthis._cacheNodesAvatarOwners.push([]);\n\t\t\tthis._cacheNodesDefaultlValues.push([]);\n\t\t\tthis._publicClipsDatas.push([]);\n\t\t\tclip._addReference();\n\t\t\tclipIndex=this._clips.length-1;\n\t\t\tif (this._avatar){\n\t\t\t\tif (this._avatar.loaded)\n\t\t\t\t\tthis._getAvatarOwnersByClipAsync(clipIndex,clip);\n\t\t\t\telse\n\t\t\t\tthis._avatar.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._getAvatarOwnersByClipAsync,[clipIndex,clip]);\n\t\t\t\t}else {\n\t\t\t\tthis._getSpriteOwnersByClipAsync(clipIndex,clip);\n\t\t\t}\n\t\t\tif (clip.loaded)\n\t\t\t\tthis._computeCacheFullKeyframeIndices(clipIndex);\n\t\t\telse\n\t\t\tclip.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._computeCacheFullKeyframeIndices,[clipIndex]);\n\t\t}\n\t}\n\n\t/**\n\t*移除动画片段。\n\t*@param clip 动画片段。\n\t*/\n\t__proto.removeClip=function(clip){\n\t\tvar index=this._clips.indexOf(clip);\n\t\tif (index!==-1){\n\t\t\tif (this._avatar)\n\t\t\t\tthis._offClipAndAvatarRelateEvent(this._avatar,clip)\n\t\t\telse\n\t\t\tthis._offGetSpriteOwnersByClipAsyncEvent(clip);\n\t\t\tthis._offGetClipCacheFullKeyframeIndicesEvent(clip);\n\t\t\tthis._clipNames.splice(index,1);\n\t\t\tthis._clips.splice(index,1);\n\t\t\tthis._playStartFrames.splice(index,1);\n\t\t\tthis._playEndFrames.splice(index,1);\n\t\t\tthis._cacheNodesSpriteOwners.splice(index,1);\n\t\t\tthis._cacheNodesAvatarOwners.splice(index,1);\n\t\t\tthis._cacheNodesDefaultlValues.splice(index,1);\n\t\t\tthis._publicClipsDatas.splice(index,1);\n\t\t\tclip._removeReference();\n\t\t}\n\t}\n\n\t/**\n\t*通过播放名字移除动画片段。\n\t*@param playName 播放名字。\n\t*/\n\t__proto.removeClipByName=function(playName){\n\t\tvar index=this._clipNames.indexOf(playName);\n\t\tif (index!==-1){\n\t\t\tvar clip=this._clips[index];\n\t\t\tif (this._avatar)\n\t\t\t\tthis._offClipAndAvatarRelateEvent(this._avatar,clip);\n\t\t\telse\n\t\t\tthis._offGetSpriteOwnersByClipAsyncEvent(clip);\n\t\t\tthis._offGetClipCacheFullKeyframeIndicesEvent(clip);\n\t\t\tthis._clipNames.splice(index,1);\n\t\t\tthis._clips.splice(index,1);\n\t\t\tthis._playStartFrames.splice(index,1);\n\t\t\tthis._playEndFrames.splice(index,1);\n\t\t\tthis._cacheNodesSpriteOwners.splice(index,1);\n\t\t\tthis._cacheNodesAvatarOwners.splice(index,1);\n\t\t\tthis._cacheNodesDefaultlValues.splice(index,1);\n\t\t\tthis._publicClipsDatas.splice(index,1);\n\t\t}\n\t}\n\n\t/**\n\t*通过播放名字获取动画片段。\n\t*@param playName 播放名字。\n\t*@return 动画片段。\n\t*/\n\t__proto.getClip=function(playName){\n\t\tvar index=this._clipNames.indexOf(playName);\n\t\tif (index!==-1){\n\t\t\treturn this._clips[index];\n\t\t\t}else {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t*获取动画片段个数。\n\t*@return 动画个数。\n\t*/\n\t__proto.getClipCount=function(){\n\t\treturn this._clips.length;\n\t}\n\n\t/**\n\t*播放动画。\n\t*@param name 如果为null则播放默认动画，否则按名字播放动画片段。\n\t*@param playbackRate 播放速率。\n\t*@param startFrame 开始帧率。\n\t*@param endFrame 结束帧率.-1表示为最大结束帧率。\n\t*/\n\t__proto.play=function(name,playbackRate){\n\t\t(playbackRate===void 0)&& (playbackRate=1.0);\n\t\tif (!name && this._defaultClipIndex==-1)\n\t\t\tthrow new Error(\"Animator:must have  default clip value,please set clip property.\");\n\t\tif (name){\n\t\t\tthis._currentPlayClipIndex=this._clipNames.indexOf(name);\n\t\t\tthis._currentPlayClip=this._clips[this._currentPlayClipIndex];\n\t\t\t}else {\n\t\t\tthis._currentPlayClipIndex=this._defaultClipIndex;\n\t\t\tthis._currentPlayClip=this._clips[this._defaultClipIndex];\n\t\t}\n\t\tthis._currentTime=0;\n\t\tthis._currentFrameTime=0;\n\t\tthis._elapsedPlaybackTime=0;\n\t\tthis._playEventIndex=0;\n\t\tthis.playbackRate=playbackRate;\n\t\tthis._stoped=false;\n\t\tthis._currentFrameIndex=0;\n\t\tthis._startUpdateLoopCount=Stat.loopCount;\n\t\tif (this._lastPlayAnimationClip)\n\t\t\t(this._lastPlayAnimationClip!==this._currentPlayClip)&& (this._revertKeyframeNodes(this._lastPlayAnimationClip,this._lastPlayAnimationClipIndex));\n\t\tthis._updatePlayer(0);\n\t\tthis._lastPlayAnimationClip=this._currentPlayClip;\n\t\tthis._lastPlayAnimationClipIndex=this._currentPlayClipIndex;\n\t}\n\n\t/**\n\t*停止播放当前动画\n\t*/\n\t__proto.stop=function(){\n\t\tif (this.playState!==/*laya.ani.AnimationState.stopped*/0){\n\t\t\tthis._stoped=true;\n\t\t\tthis.event(/*laya.events.Event.STOPPED*/\"stopped\");\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getLinkSpritePath=function(sprite3D,path){\n\t\tpath.unshift(sprite3D.name);\n\t\tvar parent=sprite3D._parent;\n\t\tif (parent._hierarchyAnimator===this)\n\t\t\tthis._getLinkSpritePath(parent,path);\n\t\telse\n\t\tpath.shift();\n\t}\n\n\t/**\n\t*关联精灵节点到Avatar节点,此Animator必须有Avatar文件。\n\t*@param nodeName 关联节点的名字。\n\t*@param sprite3D 精灵节点。\n\t*@return 是否关联成功。\n\t*/\n\t__proto.linkSprite3DToAvatarNode=function(nodeName,sprite3D){\n\t\tif (sprite3D._hierarchyAnimator===this){\n\t\t\tif (this._avatar){\n\t\t\t\tvar node=this._avatarNodeMap[nodeName];\n\t\t\t\tif (node){this._linkSpritesData=this._linkSpritesData|| {};\n\t\t\t\t\tvar path=[];\n\t\t\t\t\tthis._getLinkSpritePath(sprite3D,path);\n\t\t\t\t\tthis._linkSpritesData[nodeName]=path;\n\t\t\t\t\tsprite3D._isLinkSpriteToAnimationNode(this,node,true);\n\t\t\t\t\treturn true;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}else {\n\t\t\tthrow(\"Animator:sprite3D must belong to this Animator\");\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*解除精灵节点到Avatar节点的关联,此Animator必须有Avatar文件。\n\t*@param sprite3D 精灵节点。\n\t*@return 是否解除关联成功。\n\t*/\n\t__proto.unLinkSprite3DToAvatarNode=function(sprite3D){\n\t\tif (this._avatar){\n\t\t\tvar dummy=sprite3D.transform.dummy;\n\t\t\tif (dummy){\n\t\t\t\tvar node=this._avatarNodeMap[dummy._owner.name];\n\t\t\t\tsprite3D._isLinkSpriteToAnimationNode(this,node,false);\n\t\t\t\treturn true;\n\t\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*获取当前播放状态\n\t*@return 当前播放状态\n\t*/\n\t__getset(0,__proto,'playState',function(){\n\t\tif (this._currentPlayClip==null)\n\t\t\treturn /*laya.ani.AnimationState.stopped*/0;\n\t\tif (this._stoped)\n\t\t\treturn /*laya.ani.AnimationState.stopped*/0;\n\t\treturn /*laya.ani.AnimationState.playing*/2;\n\t});\n\n\t/**\n\t*设置avatar。\n\t*@param value avatar。\n\t*/\n\t/**\n\t*获取avatar。\n\t*@return avator。\n\t*/\n\t__getset(0,__proto,'avatar',function(){\n\t\treturn this._avatar;\n\t\t},function(value){\n\t\tif (this._avatar!==value){\n\t\t\tvar lastAvatar=this._avatar;\n\t\t\tthis._avatar=value;\n\t\t\tvar clipLength=this._clips.length;\n\t\t\tfor (var i=0;i < clipLength;i++)\n\t\t\tthis._offClipAndAvatarRelateEvent(lastAvatar,this._clips[i]);\n\t\t\tif (value){\n\t\t\t\tif (value.loaded)\n\t\t\t\t\tthis._getAvatarOwnersAndInitDatasAsync();\n\t\t\t\telse\n\t\t\t\tvalue.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._getAvatarOwnersAndInitDatasAsync);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*设置缓存播放帧率，缓存模式下生效。注意：修改此值会有计算开销。*\n\t*@return value 缓存播放帧率\n\t*/\n\t/**\n\t*获取缓存播放帧，缓存模式下生效。\n\t*@return value 缓存播放帧率。\n\t*/\n\t__getset(0,__proto,'cacheFrameRate',function(){\n\t\treturn this._cacheFrameRate;\n\t\t},function(value){\n\t\tif (this._cacheFrameRate!==value){\n\t\t\tthis._cacheFrameRate=value;\n\t\t\tthis._cacheFrameRateInterval=1.0 / this._cacheFrameRate;\n\t\t\tfor (var i=0,n=this._clips.length;i < n;i++)\n\t\t\t(this._clips[i].loaded)&& (this._computeCacheFullKeyframeIndices(i));\n\t\t}\n\t});\n\n\t/**\n\t*设置默认动画片段,AnimationClip名称为默认playName。\n\t*@param value 默认动画片段。\n\t*/\n\t/**\n\t*获取默认动画片段。\n\t*@return 默认动画片段。\n\t*/\n\t__getset(0,__proto,'clip',function(){\n\t\treturn this._clips[this._defaultClipIndex];\n\t\t},function(value){\n\t\tvar index=value ? this._clips.indexOf(value):-1;\n\t\tif (this._defaultClipIndex!==index){\n\t\t\t(this._defaultClipIndex!==-1)&& (this.removeClip(this._clips[this._defaultClipIndex]));\n\t\t\t(index!==-1)&& (this.addClip(value,value.name));\n\t\t\tthis._defaultClipIndex=index;\n\t\t}\n\t});\n\n\t/**\n\t*获取当前帧数\n\t*@return 当前帧数\n\t*/\n\t__getset(0,__proto,'currentFrameIndex',function(){\n\t\treturn this._currentFrameIndex;\n\t});\n\n\t/**\n\t*设置缓存播放速率，缓存模式下生效。注意：修改此值会有计算开销。*\n\t*@return value 缓存播放速率。\n\t*/\n\t/**\n\t*获取缓存播放速率，缓存模式下生效。*\n\t*@return 缓存播放速率。\n\t*/\n\t__getset(0,__proto,'cachePlayRate',function(){\n\t\treturn this._cachePlayRate;\n\t\t},function(value){\n\t\tif (this._cachePlayRate!==value){\n\t\t\tthis._cachePlayRate=value;\n\t\t\tfor (var i=0,n=this._clips.length;i < n;i++)\n\t\t\t(this._clips[i].loaded)&& (this._computeCacheFullKeyframeIndices(i));\n\t\t}\n\t});\n\n\t/**\n\t*获取当前帧时间，不包括重播时间\n\t*@return value 当前时间\n\t*/\n\t__getset(0,__proto,'currentFrameTime',function(){\n\t\treturn this._currentFrameTime;\n\t});\n\n\t/**\n\t*获取当前动画索引\n\t*@return value 当前动画索引\n\t*/\n\t__getset(0,__proto,'currentPlayClip',function(){\n\t\treturn this._currentPlayClip;\n\t});\n\n\t/**\n\t*获取当前精确时间，不包括重播时间\n\t*@return value 当前时间\n\t*/\n\t__getset(0,__proto,'currentPlayTime',function(){\n\t\treturn this._currentTime+(this._playStartFrames[this._currentPlayClipIndex] / this._currentPlayClip._frameRate);\n\t});\n\n\t/**\n\t*设置当前播放位置\n\t*@param value 当前时间\n\t*/\n\t__getset(0,__proto,'playbackTime',null,function(value){\n\t\tif (this._currentPlayClip==null || !this._currentPlayClip || !this._currentPlayClip.loaded)\n\t\t\treturn;\n\t\tthis._startUpdateLoopCount=Stat.loopCount;\n\t\tvar cacheFrameInterval=this._cacheFrameRateInterval *this._cachePlayRate;\n\t\tthis._currentTime=value;\n\t\tthis._currentFrameIndex=Math.floor(this.currentPlayTime / cacheFrameInterval);\n\t\tthis._currentFrameTime=this._currentFrameIndex *cacheFrameInterval;\n\t});\n\n\t/**\n\t*设置是否暂停\n\t*@param value 是否暂停\n\t*/\n\t/**\n\t*获取当前是否暂停\n\t*@return 是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\treturn this._stoped;\n\t\t},function(value){\n\t\tthis._stoped=value;\n\t\tvalue && this.event(/*laya.events.Event.PAUSED*/\"paused\");\n\t});\n\n\t__static(Animator,\n\t['deafaultMatrix',function(){return this.deafaultMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);},'_tempMatrix4x40',function(){return this._tempMatrix4x40=new Float32Array(16);}\n\t]);\n\treturn Animator;\n})(Component3D)\n\n\n/**\n*<code>AttachPoint</code> 类用于创建挂点组件。\n*/\n//class laya.d3.component.AttachPoint extends laya.d3.component.Component3D\nvar AttachPoint=(function(_super){\n\tfunction AttachPoint(){\n\t\t/**@private */\n\t\tthis._attachSkeleton=null;\n\t\t/**@private */\n\t\tthis._extenData=null;\n\t\t/**挂点骨骼的名称。*/\n\t\tthis.attachBones=null;\n\t\t/**挂点骨骼的变换矩阵。*/\n\t\tthis.matrixs=null;\n\t\tAttachPoint.__super.call(this);\n\t\tthis.attachBones=[];\n\t\tthis.matrixs=[];\n\t}\n\n\t__class(AttachPoint,'laya.d3.component.AttachPoint',_super);\n\tvar __proto=AttachPoint.prototype;\n\t/**\n\t*@private\n\t*初始化载入挂点组件。\n\t*@param owner 所属精灵对象。\n\t*/\n\t__proto._load=function(owner){\n\t\t_super.prototype._load.call(this,owner);\n\t\tthis._attachSkeleton=(owner).getComponentByType(SkinAnimations);\n\t}\n\n\t/**\n\t*@private\n\t*更新挂点组件。\n\t*@param state 渲染状态。\n\t*/\n\t__proto._update=function(state){\n\t\tif (!this._attachSkeleton||this._attachSkeleton.destroyed || this._attachSkeleton.player.state===/*laya.ani.AnimationState.stopped*/0 || !this._attachSkeleton.curBonesDatas)\n\t\t\treturn;\n\t\tvar player=this._attachSkeleton.player;\n\t\tvar templet=this._attachSkeleton.templet;\n\t\tthis.matrixs.length=this.attachBones.length;\n\t\tvar boneDatas=this._attachSkeleton.curBonesDatas;\n\t\tvar worldMatrix=(this.owner).transform.worldMatrix;\n\t\tfor (var i=0,n=this.attachBones.length;i < n;i++){\n\t\t\tvar startIndex=templet.getNodeIndexWithName(player.currentAnimationClipIndex,this.attachBones[i])*16;\n\t\t\tvar matrix=this.matrixs[i];\n\t\t\tmatrix || (matrix=this.matrixs[i]=new Matrix4x4());\n\t\t\tvar matrixE=matrix.elements;\n\t\t\tfor (var j=0;j < 16;j++)\n\t\t\tmatrixE[j]=boneDatas[startIndex+j];\n\t\t\tMatrix4x4.multiply(worldMatrix,matrix,matrix);\n\t\t}\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t}\n\n\treturn AttachPoint;\n})(Component3D)\n\n\n/**\n*<code>Collider</code> 类用于创建碰撞器的父类，抽象类，不允许实例。\n*/\n//class laya.d3.component.physics.Collider extends laya.d3.component.Component3D\nvar Collider=(function(_super){\n\tfunction Collider(){\n\t\t/**@private */\n\t\t//this._needUpdate=false;\n\t\t/**@private 只读，不允许修改。*/\n\t\t//this._isRigidbody=false;\n\t\t/**@private */\n\t\t//this._runtimeCollisonMap=null;\n\t\t/**@private */\n\t\t//this._runtimeCollisonTestMap=null;\n\t\t/**@private */\n\t\t//this._ignoreCollisonMap=null;\n\t\t/**是否为触发器。*/\n\t\t//this.isTrigger=false;\n\t\tCollider.__super.call(this);\n\t\tthis._isRigidbody=false;\n\t\tthis._runtimeCollisonMap={};\n\t\tthis._runtimeCollisonTestMap={};\n\t\tthis._ignoreCollisonMap={};\n\t\tthis.isTrigger=true;\n\t}\n\n\t__class(Collider,'laya.d3.component.physics.Collider',_super);\n\tvar __proto=Collider.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._clearCollsionMap=function(){\n\t\tfor (var k in this._runtimeCollisonMap){\n\t\t\tvar otherCollider=this._runtimeCollisonMap[k];\n\t\t\tdelete otherCollider._runtimeCollisonMap[this.id];\n\t\t\tif (otherCollider._isRigidbody)\n\t\t\t\tdelete otherCollider._runtimeCollisonTestMap[this.id];\n\t\t\tvar otherID=otherCollider.id;\n\t\t\tdelete this._runtimeCollisonMap[otherID];\n\t\t\tif (this._isRigidbody)\n\t\t\t\tdelete this._runtimeCollisonTestMap[otherID];\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._unload=function(owner){\n\t\tfor (var k in this._runtimeCollisonMap){\n\t\t\tvar otherCollider=this._runtimeCollisonMap[k];\n\t\t\tdelete otherCollider._runtimeCollisonMap[this.id];\n\t\t\tif (otherCollider._isRigidbody)\n\t\t\t\tdelete otherCollider._runtimeCollisonTestMap[this.id];\n\t\t\tdelete this._ignoreCollisonMap[k]._ignoreCollisonMap[this.id];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setIsRigidbody=function(value){\n\t\tif (this._isRigidbody!==value){\n\t\t\tthis._isRigidbody=value;\n\t\t\tvar owner=this._owner;\n\t\t\tif (owner.displayedInStage){\n\t\t\t\tvar layer=owner.layer;\n\t\t\t\tlayer._removeCollider(this);\n\t\t\t\tlayer._addCollider(this);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getType=function(){\n\t\treturn-1;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._collisonTo=function(other){\n\t\treturn false;\n\t}\n\n\t/**\n\t*在场景中投下可与球体碰撞器碰撞的一条光线,获取发生碰撞的球体碰撞器信息。\n\t*@param ray 射线\n\t*@param outHitInfo 与该射线发生碰撞球体碰撞器的碰撞信息\n\t*@param distance 射线长度,默认为最大值\n\t*/\n\t__proto.raycast=function(ray,hitInfo,maxDistance){\n\t\t(maxDistance===void 0)&& (maxDistance=1.79e+308);\n\t\tthrow new Error(\"Collider:Must override it.\");\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'enable',_super.prototype._$get_enable,function(value){\n\t\tif (this._enable!==value){\n\t\t\tvar owner=this._owner;\n\t\t\tif (owner.displayedInStage)\n\t\t\t\t(value)|| (this._clearCollsionMap());\n\t\t\tthis._enable=value;\n\t\t\tthis.event(/*laya.events.Event.ENABLE_CHANGED*/\"enablechanged\",this._enable);\n\t\t}\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'isSingleton',function(){\n\t\treturn Collider._isSingleton;\n\t});\n\n\tCollider._isSingleton=false;\n\treturn Collider;\n})(Component3D)\n\n\n/**\n*<code>Rigidbody</code> 类用于创建动画组件。\n*/\n//class laya.d3.component.Rigidbody extends laya.d3.component.Component3D\nvar Rigidbody=(function(_super){\n\t/**\n\t*创建一个 <code>Rigidbody</code> 实例。\n\t*/\n\tfunction Rigidbody(){\n\t\tRigidbody.__super.call(this);\n\t}\n\n\t__class(Rigidbody,'laya.d3.component.Rigidbody',_super);\n\tvar __proto=Rigidbody.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'enable',_super.prototype._$get_enable,function(value){\n\t\tif (this._enable!==value){\n\t\t\tvar colliders=(this._owner)._colliders;\n\t\t\tfor (var i=0,n=colliders.length;i < n;i++){\n\t\t\t\tvar collider=colliders[i];\n\t\t\t\tcollider._setIsRigidbody(value);\n\t\t\t\tvar runtimeCollisonMap=collider._runtimeCollisonMap;\n\t\t\t\tvar runtimeCollisonTestMap=collider._runtimeCollisonTestMap;\n\t\t\t\tif (!value){\n\t\t\t\t\tfor (var k in runtimeCollisonMap)\n\t\t\t\t\tdelete runtimeCollisonTestMap[k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._enable=value;\n\t\t\tthis.event(/*laya.events.Event.ENABLE_CHANGED*/\"enablechanged\",this._enable);\n\t\t}\n\t});\n\n\treturn Rigidbody;\n})(Component3D)\n\n\n/**\n*<code>Script</code> 类用于创建脚本的父类。\n*/\n//class laya.d3.component.Script extends laya.d3.component.Component3D\nvar Script=(function(_super){\n\t/**\n\t*创建一个新的 <code>Script</code> 实例。\n\t*/\n\tfunction Script(){\n\t\tScript.__super.call(this);\n\t}\n\n\t__class(Script,'laya.d3.component.Script',_super);\n\tvar __proto=Script.prototype;\n\t/**\n\t*当其他碰撞器进入时触发。\n\t*/\n\t__proto.onTriggerEnter=function(other){}\n\t/**\n\t*当其他碰撞器退出时触发。\n\t*/\n\t__proto.onTriggerExit=function(other){}\n\t/**\n\t*当其他碰撞器保持进入状态时逐帧触发。\n\t*/\n\t__proto.onTriggerStay=function(other){}\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'isSingleton',function(){\n\t\treturn Script._isSingleton;\n\t});\n\n\tScript._isSingleton=false;\n\treturn Script;\n})(Component3D)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.GlitterRender extends laya.d3.core.render.BaseRender\nvar GlitterRender=(function(_super){\n\tfunction GlitterRender(owner){\n\t\tGlitterRender.__super.call(this,owner);\n\t}\n\n\t__class(GlitterRender,'laya.d3.core.GlitterRender',_super);\n\tvar __proto=GlitterRender.prototype;\n\t__proto._calculateBoundingBox=function(){\n\t\tvar minE=this._boundingBox.min.elements;\n\t\tminE[0]=-Number.MAX_VALUE;\n\t\tminE[1]=-Number.MAX_VALUE;\n\t\tminE[2]=-Number.MAX_VALUE;\n\t\tvar maxE=this._boundingBox.min.elements;\n\t\tmaxE[0]=Number.MAX_VALUE;\n\t\tmaxE[1]=Number.MAX_VALUE;\n\t\tmaxE[2]=Number.MAX_VALUE;\n\t}\n\n\t__proto._calculateBoundingSphere=function(){\n\t\tvar centerE=this._boundingSphere.center.elements;\n\t\tcenterE[0]=0;\n\t\tcenterE[1]=0;\n\t\tcenterE[2]=0;\n\t\tthis._boundingSphere.radius=Number.MAX_VALUE;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderUpdate=function(projectionView){\n\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,this._owner.transform.worldMatrix);\n\t\tvar projViewWorld=this._owner.getProjectionViewWorldMatrix(projectionView);\n\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projViewWorld);\n\t\tvar templet=(this._owner).templet;\n\t\tthis._setShaderValueNumber(/*laya.d3.core.glitter.Glitter.DURATION*/3,templet.lifeTime);\n\t\tthis._setShaderValueNumber(/*laya.d3.core.glitter.Glitter.CURRENTTIME*/2,templet._currentTime);\n\t\treturn true;\n\t}\n\n\treturn GlitterRender;\n})(BaseRender)\n\n\n/**\n*<code>MeshFilter</code> 类用于创建网格过滤器。\n*/\n//class laya.d3.core.MeshFilter extends laya.d3.core.GeometryFilter\nvar MeshFilter=(function(_super){\n\tfunction MeshFilter(owner){\n\t\t/**@private */\n\t\tthis._owner=null;\n\t\t/**@private */\n\t\tthis._sharedMesh=null;\n\t\tMeshFilter.__super.call(this);\n\t\tthis._owner=owner;\n\t}\n\n\t__class(MeshFilter,'laya.d3.core.MeshFilter',_super);\n\tvar __proto=MeshFilter.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._sharedMeshLoaded=function(){\n\t\tthis.event(/*laya.events.Event.LOADED*/\"loaded\");\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\tthis._owner=null;\n\t\t(this._sharedMesh)&& (this._sharedMesh._removeReference(),this._sharedMesh=null);\n\t}\n\n\t/**\n\t*设置共享网格。\n\t*@return value 共享网格。\n\t*/\n\t/**\n\t*获取共享网格。\n\t*@return 共享网格。\n\t*/\n\t__getset(0,__proto,'sharedMesh',function(){\n\t\treturn this._sharedMesh;\n\t\t},function(value){\n\t\tvar lastValue=this._sharedMesh;\n\t\t(lastValue)&& (lastValue._removeReference());\n\t\tthis._sharedMesh=value;\n\t\tvalue._addReference();\n\t\tthis.event(/*laya.events.Event.MESH_CHANGED*/\"meshchanged\",[this,lastValue,value]);\n\t\tif (!value.loaded){\n\t\t\tthis._sharedMesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._sharedMeshLoaded);\n\t\t}\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_isAsyncLoaded',function(){\n\t\treturn this._sharedMesh.loaded;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingBoxCorners',function(){\n\t\treturn this._sharedMesh.boundingBoxCorners;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingSphere',function(){\n\t\treturn this._sharedMesh.boundingSphere;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingBox',function(){\n\t\treturn this._sharedMesh.boundingBox;\n\t});\n\n\treturn MeshFilter;\n})(GeometryFilter)\n\n\n/**\n*<code>MeshRender</code> 类用于网格渲染器。\n*/\n//class laya.d3.core.MeshRender extends laya.d3.core.render.BaseRender\nvar MeshRender=(function(_super){\n\t/**\n\t*创建一个新的 <code>MeshRender</code> 实例。\n\t*/\n\tfunction MeshRender(owner){\n\t\tMeshRender.__super.call(this,owner);\n\t\t(owner).meshFilter.on(/*laya.events.Event.MESH_CHANGED*/\"meshchanged\",this,this._onMeshChanged);\n\t}\n\n\t__class(MeshRender,'laya.d3.core.MeshRender',_super);\n\tvar __proto=MeshRender.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._onMeshChanged=function(meshFilter,oldMesh,mesh){\n\t\tif (mesh.loaded){\n\t\t\tthis._boundingSphereNeedChange=this._boundingBoxNeedChange=this._boundingBoxCenterNeedChange=this._octreeNodeNeedChange=true;\n\t\t\t}else {\n\t\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._onMeshLoaed);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onMeshLoaed=function(sender,enable){\n\t\tthis._boundingSphereNeedChange=this._boundingBoxNeedChange=this._boundingBoxCenterNeedChange=this._octreeNodeNeedChange=true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculateBoundingSphereByInitSphere=function(boundSphere){\n\t\tvar maxScale=NaN;\n\t\tvar transform=this._owner.transform;\n\t\tvar scaleE=transform.scale.elements;\n\t\tvar scaleX=Math.abs(scaleE[0]);\n\t\tvar scaleY=Math.abs(scaleE[1]);\n\t\tvar scaleZ=Math.abs(scaleE[2]);\n\t\tif (scaleX >=scaleY && scaleX >=scaleZ)\n\t\t\tmaxScale=scaleX;\n\t\telse\n\t\tmaxScale=scaleY >=scaleZ ? scaleY :scaleZ;\n\t\tVector3.transformCoordinate(boundSphere.center,transform.worldMatrix,this._boundingSphere.center);\n\t\tthis._boundingSphere.radius=boundSphere.radius *maxScale;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculateBoundBoxByInitCorners=function(corners){\n\t\tvar worldMat=(this._owner).transform.worldMatrix;\n\t\tfor (var i=0;i < 8;i++)\n\t\tVector3.transformCoordinate(corners[i],worldMat,BaseRender._tempBoundBoxCorners[i]);\n\t\tBoundBox.createfromPoints(BaseRender._tempBoundBoxCorners,this._boundingBox);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._calculateBoundingSphere=function(){\n\t\tvar sharedMesh=(this._owner).meshFilter.sharedMesh;\n\t\tif (sharedMesh==null || sharedMesh.boundingSphere==null)\n\t\t\tthis._boundingSphere.toDefault();\n\t\telse\n\t\tthis._calculateBoundingSphereByInitSphere(sharedMesh.boundingSphere);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._calculateBoundingBox=function(){\n\t\tvar sharedMesh=(this._owner).meshFilter.sharedMesh;\n\t\tif (sharedMesh==null || sharedMesh.boundingBox==null)\n\t\t\tthis._boundingBox.toDefault();\n\t\telse\n\t\tthis._calculateBoundBoxByInitCorners(sharedMesh.boundingBoxCorners);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderUpdate=function(projectionView){\n\t\tvar transform=this._owner.transform;\n\t\tif (transform){\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,transform.worldMatrix);\n\t\t\tvar projViewWorld=this._owner.getProjectionViewWorldMatrix(projectionView);\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projViewWorld);\n\t\t\t}else {\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,Matrix4x4.DEFAULT);\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projectionView);\n\t\t}\n\t\tif (Laya3D.debugMode)\n\t\t\tthis._renderRenderableBoundBox();\n\t\treturn true;\n\t}\n\n\treturn MeshRender;\n})(BaseRender)\n\n\n/**\n*<code>ShurikenParticleSystem</code> 类用于创建3D粒子数据模板。\n*/\n//class laya.d3.core.particleShuriKen.ShurikenParticleSystem extends laya.d3.core.GeometryFilter\nvar ShurikenParticleSystem=(function(_super){\n\tfunction ShurikenParticleSystem(owner){\n\t\t/**@private */\n\t\t//this._boundingSphere=null;\n\t\t/**@private */\n\t\t//this._boundingBox=null;\n\t\t/**@private */\n\t\t//this._boundingBoxCorners=null;\n\t\t/**@private */\n\t\t//this._owner=null;\n\t\t/**@private */\n\t\t//this._ownerRender=null;\n\t\t/**@private */\n\t\t//this._vertices=null;\n\t\t/**@private */\n\t\t//this._floatCountPerVertex=0;\n\t\t/**@private */\n\t\t//this._startLifeTimeIndex=0;\n\t\t/**@private */\n\t\t//this._timeIndex=0;\n\t\t/**@private */\n\t\t//this._simulateUpdate=false;\n\t\t/**@private */\n\t\t//this._firstActiveElement=0;\n\t\t/**@private */\n\t\t//this._firstNewElement=0;\n\t\t/**@private */\n\t\t//this._firstFreeElement=0;\n\t\t/**@private */\n\t\t//this._firstRetiredElement=0;\n\t\t/**@private */\n\t\t//this._drawCounter=0;\n\t\t/**@private */\n\t\t//this._vertexBuffer=null;\n\t\t/**@private */\n\t\t//this._indexBuffer=null;\n\t\t/**@private */\n\t\t//this._bufferMaxParticles=0;\n\t\t/**@private */\n\t\t//this._emission=null;\n\t\t/**@private */\n\t\t//this._shape=null;\n\t\t/**@private */\n\t\t//this._isEmitting=false;\n\t\t/**@private */\n\t\t//this._isPlaying=false;\n\t\t/**@private */\n\t\t//this._isPaused=false;\n\t\t/**@private */\n\t\t//this._playStartDelay=NaN;\n\t\t/**@private 发射的累计时间。*/\n\t\t//this._frameRateTime=NaN;\n\t\t/**@private 一次循环内的累计时间。*/\n\t\t//this._emissionTime=NaN;\n\t\t/**@private */\n\t\t//this._totalDelayTime=NaN;\n\t\t/**@private */\n\t\t//this._burstsIndex=0;\n\t\t/**@private */\n\t\t//this._velocityOverLifetime=null;\n\t\t/**@private */\n\t\t//this._colorOverLifetime=null;\n\t\t/**@private */\n\t\t//this._sizeOverLifetime=null;\n\t\t/**@private */\n\t\t//this._rotationOverLifetime=null;\n\t\t/**@private */\n\t\t//this._textureSheetAnimation=null;\n\t\t/**@private */\n\t\t//this._startLifetimeType=0;\n\t\t/**@private */\n\t\t//this._startLifetimeConstant=NaN;\n\t\t/**@private */\n\t\t//this._startLifeTimeGradient=null;\n\t\t/**@private */\n\t\t//this._startLifetimeConstantMin=NaN;\n\t\t/**@private */\n\t\t//this._startLifetimeConstantMax=NaN;\n\t\t/**@private */\n\t\t//this._startLifeTimeGradientMin=null;\n\t\t/**@private */\n\t\t//this._startLifeTimeGradientMax=null;\n\t\t/**@private */\n\t\t//this._maxStartLifetime=NaN;\n\t\t/**@private */\n\t\t//this._vertexStride=0;\n\t\t/**@private */\n\t\t//this._indexStride=0;\n\t\t/**@private */\n\t\t//this._currentTime=NaN;\n\t\t/**@private */\n\t\t//this._startUpdateLoopCount=0;\n\t\t/**@private */\n\t\t//this._rand=null;\n\t\t/**@private */\n\t\t//this._randomSeeds=null;\n\t\t/**粒子运行的总时长，单位为秒。*/\n\t\t//this.duration=NaN;\n\t\t/**是否循环。*/\n\t\t//this.looping=false;\n\t\t/**是否预热。暂不支持*/\n\t\t//this.prewarm=false;\n\t\t/**开始延迟类型，0为常量模式,1为随机随机双常量模式，不能和prewarm一起使用。*/\n\t\t//this.startDelayType=0;\n\t\t/**开始播放延迟，不能和prewarm一起使用。*/\n\t\t//this.startDelay=NaN;\n\t\t/**开始播放最小延迟，不能和prewarm一起使用。*/\n\t\t//this.startDelayMin=NaN;\n\t\t/**开始播放最大延迟，不能和prewarm一起使用。*/\n\t\t//this.startDelayMax=NaN;\n\t\t/**开始速度模式，0为恒定速度，2为两个恒定速度的随机插值。缺少1、3模式*/\n\t\t//this.startSpeedType=0;\n\t\t/**开始速度,0模式。*/\n\t\t//this.startSpeedConstant=NaN;\n\t\t/**最小开始速度,1模式。*/\n\t\t//this.startSpeedConstantMin=NaN;\n\t\t/**最大开始速度,1模式。*/\n\t\t//this.startSpeedConstantMax=NaN;\n\t\t/**开始尺寸是否为3D模式。*/\n\t\t//this.threeDStartSize=false;\n\t\t/**开始尺寸模式,0为恒定尺寸，2为两个恒定尺寸的随机插值。缺少1、3模式和对应的二种3D模式*/\n\t\t//this.startSizeType=0;\n\t\t/**开始尺寸，0模式。*/\n\t\t//this.startSizeConstant=NaN;\n\t\t/**开始三维尺寸，0模式。*/\n\t\t//this.startSizeConstantSeparate=null;\n\t\t/**最小开始尺寸，2模式。*/\n\t\t//this.startSizeConstantMin=NaN;\n\t\t/**最大开始尺寸，2模式。*/\n\t\t//this.startSizeConstantMax=NaN;\n\t\t/**最小三维开始尺寸，2模式。*/\n\t\t//this.startSizeConstantMinSeparate=null;\n\t\t/**最大三维开始尺寸，2模式。*/\n\t\t//this.startSizeConstantMaxSeparate=null;\n\t\t/**3D开始旋转，暂不支持*/\n\t\t//this.threeDStartRotation=false;\n\t\t/**开始旋转模式,0为恒定尺寸，2为两个恒定旋转的随机插值,缺少2种模式,和对应的四种3D模式。*/\n\t\t//this.startRotationType=0;\n\t\t/**开始旋转，0模式。*/\n\t\t//this.startRotationConstant=NaN;\n\t\t/**开始三维旋转，0模式。*/\n\t\t//this.startRotationConstantSeparate=null;\n\t\t/**最小开始旋转，1模式。*/\n\t\t//this.startRotationConstantMin=NaN;\n\t\t/**最大开始旋转，1模式。*/\n\t\t//this.startRotationConstantMax=NaN;\n\t\t/**最小开始三维旋转，1模式。*/\n\t\t//this.startRotationConstantMinSeparate=null;\n\t\t/**最大开始三维旋转，1模式。*/\n\t\t//this.startRotationConstantMaxSeparate=null;\n\t\t/**随机旋转方向，范围为0.0到1.0*/\n\t\t//this.randomizeRotationDirection=NaN;\n\t\t/**开始颜色模式，0为恒定颜色，2为两个恒定颜色的随机插值,缺少2种模式。*/\n\t\t//this.startColorType=0;\n\t\t/**开始颜色，0模式。*/\n\t\t//this.startColorConstant=null;\n\t\t/**最小开始颜色，1模式。*/\n\t\t//this.startColorConstantMin=null;\n\t\t/**最大开始颜色，1模式。*/\n\t\t//this.startColorConstantMax=null;\n\t\t/**重力敏感度。*/\n\t\t//this.gravityModifier=NaN;\n\t\t/**模拟器空间,0为World,1为Local。暂不支持Custom。*/\n\t\t//this.simulationSpace=0;\n\t\t/**缩放模式，0为Hiercachy,1为Local,2为World。暂不支持1,2*/\n\t\t//this.scaleMode=0;\n\t\t/**激活时是否自动播放。*/\n\t\t//this.playOnAwake=false;\n\t\t/**随机种子,注:play()前设置有效。*/\n\t\t//this.randomSeed=null;\n\t\t/**是否使用随机种子。 */\n\t\t//this.autoRandomSeed=false;\n\t\t/**是否为性能模式,性能模式下会延迟粒子释放。*/\n\t\t//this.isPerformanceMode=false;\n\t\tShurikenParticleSystem.__super.call(this);\n\t\tthis._tempRotationMatrix=new Matrix4x4();\n\t\tthis._uvLength=new Vector2();\n\t\tthis._firstActiveElement=0;\n\t\tthis._firstNewElement=0;\n\t\tthis._firstFreeElement=0;\n\t\tthis._firstRetiredElement=0;\n\t\tthis._owner=owner;\n\t\tthis._ownerRender=owner.particleRender;\n\t\tthis._boundingBoxCorners=__newvec(8,null);\n\t\tthis._boundingSphere=new BoundSphere(new Vector3(),Number.MAX_VALUE);\n\t\tthis._boundingBox=new BoundBox(new Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),new Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE));\n\t\tthis._currentTime=0;\n\t\tthis._isEmitting=false;\n\t\tthis._isPlaying=false;\n\t\tthis._isPaused=false;\n\t\tthis._burstsIndex=0;\n\t\tthis._frameRateTime=0;\n\t\tthis._emissionTime=0;\n\t\tthis._totalDelayTime=0;\n\t\tthis._simulateUpdate=false;\n\t\tthis._bufferMaxParticles=1;\n\t\tthis.duration=5.0;\n\t\tthis.looping=true;\n\t\tthis.prewarm=false;\n\t\tthis.startDelayType=0;\n\t\tthis.startDelay=0.0;\n\t\tthis.startDelayMin=0.0;\n\t\tthis.startDelayMax=0.0;\n\t\tthis._startLifetimeType=0;\n\t\tthis._startLifetimeConstant=5.0;\n\t\tthis._startLifeTimeGradient=new GradientDataNumber();\n\t\tthis._startLifetimeConstantMin=0.0;\n\t\tthis._startLifetimeConstantMax=5.0;\n\t\tthis._startLifeTimeGradientMin=new GradientDataNumber();\n\t\tthis._startLifeTimeGradientMax=new GradientDataNumber();\n\t\tthis._maxStartLifetime=5.0;\n\t\tthis.startSpeedType=0;\n\t\tthis.startSpeedConstant=5.0;\n\t\tthis.startSpeedConstantMin=0.0;\n\t\tthis.startSpeedConstantMax=5.0;\n\t\tthis.threeDStartSize=false;\n\t\tthis.startSizeType=0;\n\t\tthis.startSizeConstant=1;\n\t\tthis.startSizeConstantSeparate=new Vector3(1,1,1);\n\t\tthis.startSizeConstantMin=0;\n\t\tthis.startSizeConstantMax=1;\n\t\tthis.startSizeConstantMinSeparate=new Vector3(0,0,0);\n\t\tthis.startSizeConstantMaxSeparate=new Vector3(1,1,1);\n\t\tthis.threeDStartRotation=false;\n\t\tthis.startRotationType=0;\n\t\tthis.startRotationConstant=0;\n\t\tthis.startRotationConstantSeparate=new Vector3(0,0,0);\n\t\tthis.startRotationConstantMin=0.0;\n\t\tthis.startRotationConstantMax=0.0;\n\t\tthis.startRotationConstantMinSeparate=new Vector3(0,0,0);\n\t\tthis.startRotationConstantMaxSeparate=new Vector3(0,0,0);\n\t\tthis.randomizeRotationDirection=0.0;\n\t\tthis.startColorType=0;\n\t\tthis.startColorConstant=new Vector4(1,1,1,1);\n\t\tthis.startColorConstantMin=new Vector4(1,1,1,1);\n\t\tthis.startColorConstantMax=new Vector4(1,1,1,1);\n\t\tthis.gravityModifier=0.0;\n\t\tthis.simulationSpace=1;\n\t\tthis.scaleMode=0;\n\t\tthis.playOnAwake=true;\n\t\tthis._rand=new Rand(0);\n\t\tthis.autoRandomSeed=true;\n\t\tthis.randomSeed=new Uint32Array(1);\n\t\tthis._randomSeeds=new Uint32Array(ShurikenParticleSystem._RANDOMOFFSET.length);\n\t\tthis.isPerformanceMode=true;\n\t\tthis._emission=new Emission();\n\t\tthis._emission.enbale=true;\n\t\tthis._owner.on(/*laya.events.Event.ACTIVE_IN_HIERARCHY_CHANGED*/\"activeinhierarchychanged\",this,this._onOwnerActiveHierarchyChanged);\n\t}\n\n\t__class(ShurikenParticleSystem,'laya.d3.core.particleShuriKen.ShurikenParticleSystem',_super);\n\tvar __proto=ShurikenParticleSystem.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true,\"laya.d3.core.IClone\":true})\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index===0)\n\t\t\treturn this._vertexBuffer;\n\t\telse\n\t\treturn null;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn this._indexBuffer;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._generateBoundingSphere=function(){\n\t\tvar centerE=this._boundingSphere.center.elements;\n\t\tcenterE[0]=0;\n\t\tcenterE[1]=0;\n\t\tcenterE[2]=0;\n\t\tthis._boundingSphere.radius=Number.MAX_VALUE;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._generateBoundingBox=function(){\n\t\tvar particle=this._owner;\n\t\tvar particleRender=particle.particleRender;\n\t\tvar boundMin=this._boundingBox.min;\n\t\tvar boundMax=this._boundingBox.max;\n\t\tvar i=0,n=0;\n\t\tvar maxStartLifeTime=NaN;\n\t\tswitch (this.startLifetimeType){\n\t\t\tcase 0:\n\t\t\t\tmaxStartLifeTime=this.startLifetimeConstant;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tmaxStartLifeTime=-Number.MAX_VALUE;\n\t\t\t\tvar startLifeTimeGradient=startLifeTimeGradient;\n\t\t\t\tfor (i=0,n=startLifeTimeGradient.gradientCount;i < n;i++)\n\t\t\t\tmaxStartLifeTime=Math.max(maxStartLifeTime,startLifeTimeGradient.getValueByIndex(i));\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tmaxStartLifeTime=Math.max(this.startLifetimeConstantMin,this.startLifetimeConstantMax);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tmaxStartLifeTime=-Number.MAX_VALUE;\n\t\t\t\tvar startLifeTimeGradientMin=startLifeTimeGradientMin;\n\t\t\t\tfor (i=0,n=startLifeTimeGradientMin.gradientCount;i < n;i++)\n\t\t\t\tmaxStartLifeTime=Math.max(maxStartLifeTime,startLifeTimeGradientMin.getValueByIndex(i));\n\t\t\t\tvar startLifeTimeGradientMax=startLifeTimeGradientMax;\n\t\t\t\tfor (i=0,n=startLifeTimeGradientMax.gradientCount;i < n;i++)\n\t\t\t\tmaxStartLifeTime=Math.max(maxStartLifeTime,startLifeTimeGradientMax.getValueByIndex(i));\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar minStartSpeed=NaN,maxStartSpeed=NaN;\n\t\tswitch (this.startSpeedType){\n\t\t\tcase 0:\n\t\t\t\tminStartSpeed=maxStartSpeed=this.startSpeedConstant;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tminStartSpeed=this.startLifetimeConstantMin;\n\t\t\t\tmaxStartSpeed=this.startLifetimeConstantMax;\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar minPosition,maxPosition,minDirection,maxDirection;\n\t\tif (this._shape && this._shape.enable){\n\t\t\t}else {\n\t\t\tminPosition=maxPosition=Vector3.ZERO;\n\t\t\tminDirection=Vector3.ZERO;\n\t\t\tmaxDirection=Vector3.UnitZ;\n\t\t};\n\t\tvar startMinVelocity=new Vector3(minDirection.x *minStartSpeed,minDirection.y *minStartSpeed,minDirection.z *minStartSpeed);\n\t\tvar startMaxVelocity=new Vector3(maxDirection.x *maxStartSpeed,maxDirection.y *maxStartSpeed,maxDirection.z *maxStartSpeed);\n\t\tif (this._velocityOverLifetime && this._velocityOverLifetime.enbale){\n\t\t\tvar lifeMinVelocity;\n\t\t\tvar lifeMaxVelocity;\n\t\t\tvar velocity=this._velocityOverLifetime.velocity;\n\t\t\tswitch (velocity.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tlifeMinVelocity=lifeMaxVelocity=velocity.constant;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tlifeMinVelocity=lifeMaxVelocity=new Vector3(velocity.gradientX.getAverageValue(),velocity.gradientY.getAverageValue(),velocity.gradientZ.getAverageValue());\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tlifeMinVelocity=velocity.constantMin;\n\t\t\t\t\tlifeMaxVelocity=velocity.constantMax;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tlifeMinVelocity=new Vector3(velocity.gradientXMin.getAverageValue(),velocity.gradientYMin.getAverageValue(),velocity.gradientZMin.getAverageValue());\n\t\t\t\t\tlifeMaxVelocity=new Vector3(velocity.gradientXMax.getAverageValue(),velocity.gradientYMax.getAverageValue(),velocity.gradientZMax.getAverageValue());\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t};\n\t\tvar positionScale,velocityScale;\n\t\tvar transform=this._owner.transform;\n\t\tvar worldPosition=transform.position;\n\t\tvar sizeScale=ShurikenParticleSystem._tempVector39;\n\t\tvar sizeScaleE=sizeScale.elements;\n\t\tvar renderMode=particleRender.renderMode;\n\t\tswitch (this.scaleMode){\n\t\t\tcase 0:;\n\t\t\t\tvar scale=transform.scale;\n\t\t\t\tpositionScale=scale;\n\t\t\t\tsizeScaleE[0]=scale.x;\n\t\t\t\tsizeScaleE[1]=scale.z;\n\t\t\t\tsizeScaleE[2]=scale.y;\n\t\t\t\t(renderMode===1)&& (velocityScale=scale);\n\t\t\t\tbreak ;\n\t\t\tcase 1:;\n\t\t\t\tvar localScale=transform.localScale;\n\t\t\t\tpositionScale=localScale;\n\t\t\t\tsizeScaleE[0]=localScale.x;\n\t\t\t\tsizeScaleE[1]=localScale.z;\n\t\t\t\tsizeScaleE[2]=localScale.y;\n\t\t\t\t(renderMode===1)&& (velocityScale=localScale);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tpositionScale=transform.scale;\n\t\t\t\tsizeScaleE[0]=sizeScaleE[1]=sizeScaleE[2]=1;\n\t\t\t\t(renderMode===1)&& (velocityScale=Vector3.ONE);\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar minStratPosition,maxStratPosition;\n\t\tif (this._velocityOverLifetime && this._velocityOverLifetime.enbale){\n\t\t\t}else {\n\t\t\tminStratPosition=new Vector3(startMinVelocity.x *maxStartLifeTime,startMinVelocity.y *maxStartLifeTime,startMinVelocity.z *maxStartLifeTime);\n\t\t\tmaxStratPosition=new Vector3(startMaxVelocity.x *maxStartLifeTime,startMaxVelocity.y *maxStartLifeTime,startMaxVelocity.z *maxStartLifeTime);\n\t\t\tif (this.scaleMode !=2){\n\t\t\t\tVector3.add(minPosition,minStratPosition,boundMin);\n\t\t\t\tVector3.multiply(positionScale,boundMin,boundMin);\n\t\t\t\tVector3.add(maxPosition,maxStratPosition,boundMax);\n\t\t\t\tVector3.multiply(positionScale,boundMax,boundMax);\n\t\t\t\t}else {\n\t\t\t\tVector3.multiply(positionScale,minPosition,boundMin);\n\t\t\t\tVector3.add(boundMin,minStratPosition,boundMin);\n\t\t\t\tVector3.multiply(positionScale,maxPosition,boundMax);\n\t\t\t\tVector3.add(boundMax,maxStratPosition,boundMax);\n\t\t\t}\n\t\t}\n\t\tswitch (this.simulationSpace){\n\t\t\tcase 0:\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tVector3.add(boundMin,worldPosition,boundMin);\n\t\t\t\tVector3.add(boundMax,worldPosition,boundMax);\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar maxSize=NaN,maxSizeY=NaN;\n\t\tswitch (this.startSizeType){\n\t\t\tcase 0:\n\t\t\t\tif (this.threeDStartSize){\n\t\t\t\t\tvar startSizeConstantSeparate=startSizeConstantSeparate;\n\t\t\t\t\tmaxSize=Math.max(startSizeConstantSeparate.x,startSizeConstantSeparate.y);\n\t\t\t\t\tif (renderMode===1)\n\t\t\t\t\t\tmaxSizeY=startSizeConstantSeparate.y;\n\t\t\t\t\t}else {\n\t\t\t\t\tmaxSize=this.startSizeConstant;\n\t\t\t\t\tif (renderMode===1)\n\t\t\t\t\t\tmaxSizeY=this.startSizeConstant;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tif (this.threeDStartSize){\n\t\t\t\t\tvar startSizeConstantMaxSeparate=startSizeConstantMaxSeparate;\n\t\t\t\t\tmaxSize=Math.max(startSizeConstantMaxSeparate.x,startSizeConstantMaxSeparate.y);\n\t\t\t\t\tif (renderMode===1)\n\t\t\t\t\t\tmaxSizeY=startSizeConstantMaxSeparate.y;\n\t\t\t\t\t}else {\n\t\t\t\t\tmaxSize=this.startSizeConstantMax;\n\t\t\t\t\tif (renderMode===1)\n\t\t\t\t\t\tmaxSizeY=this.startSizeConstantMax;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tif (this._sizeOverLifetime && this._sizeOverLifetime.enbale){\n\t\t\tvar size=this._sizeOverLifetime.size;\n\t\t\tmaxSize *=this._sizeOverLifetime.size.getMaxSizeInGradient();\n\t\t};\n\t\tvar threeDMaxSize=ShurikenParticleSystem._tempVector30;\n\t\tvar threeDMaxSizeE=threeDMaxSize.elements;\n\t\tvar rotSize=NaN,nonRotSize=NaN;\n\t\tswitch (renderMode){\n\t\t\tcase 0:\n\t\t\t\trotSize=maxSize *ShurikenParticleSystem.halfKSqrtOf2;\n\t\t\t\tVector3.scale(sizeScale,maxSize,threeDMaxSize);\n\t\t\t\tVector3.subtract(boundMin,threeDMaxSize,boundMin);\n\t\t\t\tVector3.add(boundMax,threeDMaxSize,boundMax);\n\t\t\t\tbreak ;\n\t\t\tcase 1:;\n\t\t\t\tvar maxStretchPosition=ShurikenParticleSystem._tempVector31;\n\t\t\t\tvar maxStretchVelocity=ShurikenParticleSystem._tempVector32;\n\t\t\t\tvar minStretchVelocity=ShurikenParticleSystem._tempVector33;\n\t\t\t\tvar minStretchPosition=ShurikenParticleSystem._tempVector34;\n\t\t\t\tif (this._velocityOverLifetime && this._velocityOverLifetime.enbale){\n\t\t\t\t\t}else {\n\t\t\t\t\tVector3.multiply(velocityScale,startMaxVelocity,maxStretchVelocity);\n\t\t\t\t\tVector3.multiply(velocityScale,startMinVelocity,minStretchVelocity);\n\t\t\t\t};\n\t\t\t\tvar sizeStretch=maxSizeY *particleRender.stretchedBillboardLengthScale;\n\t\t\t\tvar maxStretchLength=Vector3.scalarLength(maxStretchVelocity)*particleRender.stretchedBillboardSpeedScale+sizeStretch;\n\t\t\t\tvar minStretchLength=Vector3.scalarLength(minStretchVelocity)*particleRender.stretchedBillboardSpeedScale+sizeStretch;\n\t\t\t\tvar norMaxStretchVelocity=ShurikenParticleSystem._tempVector35;\n\t\t\t\tvar norMinStretchVelocity=ShurikenParticleSystem._tempVector36;\n\t\t\t\tVector3.normalize(maxStretchVelocity,norMaxStretchVelocity);\n\t\t\t\tVector3.scale(norMaxStretchVelocity,maxStretchLength,minStretchPosition);\n\t\t\t\tVector3.subtract(maxStratPosition,minStretchPosition,minStretchPosition);\n\t\t\t\tVector3.normalize(minStretchVelocity,norMinStretchVelocity);\n\t\t\t\tVector3.scale(norMinStretchVelocity,minStretchLength,maxStretchPosition);\n\t\t\t\tVector3.add(minStratPosition,maxStretchPosition,maxStretchPosition);\n\t\t\t\trotSize=maxSize *ShurikenParticleSystem.halfKSqrtOf2;\n\t\t\t\tVector3.scale(sizeScale,rotSize,threeDMaxSize);\n\t\t\t\tvar halfNorMaxStretchVelocity=ShurikenParticleSystem._tempVector37;\n\t\t\t\tvar halfNorMinStretchVelocity=ShurikenParticleSystem._tempVector38;\n\t\t\t\tVector3.scale(norMaxStretchVelocity,0.5,halfNorMaxStretchVelocity);\n\t\t\t\tVector3.scale(norMinStretchVelocity,0.5,halfNorMinStretchVelocity);\n\t\t\t\tVector3.multiply(halfNorMaxStretchVelocity,sizeScale,halfNorMaxStretchVelocity);\n\t\t\t\tVector3.multiply(halfNorMinStretchVelocity,sizeScale,halfNorMinStretchVelocity);\n\t\t\t\tVector3.add(boundMin,halfNorMinStretchVelocity,boundMin);\n\t\t\t\tVector3.min(boundMin,minStretchPosition,boundMin);\n\t\t\t\tVector3.subtract(boundMin,threeDMaxSize,boundMin);\n\t\t\t\tVector3.subtract(boundMax,halfNorMaxStretchVelocity,boundMax);\n\t\t\t\tVector3.max(boundMax,maxStretchPosition,boundMax);\n\t\t\t\tVector3.add(boundMax,threeDMaxSize,boundMax);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tmaxSize *=Math.cos(0.78539816339744830961566084581988);\n\t\t\t\tnonRotSize=maxSize *0.5;\n\t\t\t\tthreeDMaxSizeE[0]=sizeScale.x *nonRotSize;\n\t\t\t\tthreeDMaxSizeE[1]=sizeScale.z *nonRotSize;\n\t\t\t\tVector3.subtract(boundMin,threeDMaxSize,boundMin);\n\t\t\t\tVector3.add(boundMax,threeDMaxSize,boundMax);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tmaxSize *=Math.cos(0.78539816339744830961566084581988);\n\t\t\t\tnonRotSize=maxSize *0.5;\n\t\t\t\tVector3.scale(sizeScale,nonRotSize,threeDMaxSize);\n\t\t\t\tVector3.subtract(boundMin,threeDMaxSize,boundMin);\n\t\t\t\tVector3.add(boundMax,threeDMaxSize,boundMax);\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tthis._boundingBox.getCorners(this._boundingBoxCorners);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateEmission=function(){\n\t\tif (!Laya.stage.isVisibility||!this.isAlive)\n\t\t\treturn;\n\t\tif (this._simulateUpdate){\n\t\t\tthis._simulateUpdate=false;\n\t\t}\n\t\telse{\n\t\t\tvar elapsedTime=(this._startUpdateLoopCount!==Stat.loopCount && !this._isPaused)?Laya.timer.delta / 1000.0:0;\n\t\t\telapsedTime=Math.min(ShurikenParticleSystem._maxElapsedTime,elapsedTime);\n\t\t\tthis._updateParticles(elapsedTime);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateParticles=function(elapsedTime){\n\t\tif (this._ownerRender.renderMode===4 && !this._ownerRender.mesh)\n\t\t\treturn;\n\t\tthis._currentTime+=elapsedTime;\n\t\tthis._retireActiveParticles();\n\t\tthis._freeRetiredParticles();\n\t\tthis._totalDelayTime+=elapsedTime;\n\t\tif (this._totalDelayTime < this._playStartDelay){\n\t\t\treturn;\n\t\t}\n\t\tif (this._emission.enbale&&this._isEmitting &&!this._isPaused)\n\t\t\tthis._advanceTime(elapsedTime,this._currentTime);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateParticlesSimulationRestart=function(time){\n\t\tthis._firstActiveElement=0;\n\t\tthis._firstNewElement=0;\n\t\tthis._firstFreeElement=0;\n\t\tthis._firstRetiredElement=0;\n\t\tthis._burstsIndex=0;\n\t\tthis._frameRateTime=time;\n\t\tthis._emissionTime=0;\n\t\tthis._totalDelayTime=0;\n\t\tthis._currentTime=time;\n\t\tvar delayTime=time;\n\t\tif (delayTime < this._playStartDelay){\n\t\t\tthis._totalDelayTime=delayTime;\n\t\t\treturn;\n\t\t}\n\t\tif (this._emission.enbale)\n\t\t\tthis._advanceTime(time,time);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addUpdateEmissionToTimer=function(){\n\t\tLaya.timer.frameLoop(1,this,this._updateEmission);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeUpdateEmissionToTimer=function(){\n\t\tLaya.timer.clear(this,this._updateEmission);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onOwnerActiveHierarchyChanged=function(active){\n\t\tif (this._owner.displayedInStage){\n\t\t\tif (active)\n\t\t\t\tthis._addUpdateEmissionToTimer();\n\t\t\telse\n\t\t\tthis._removeUpdateEmissionToTimer();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._retireActiveParticles=function(){\n\t\tvar epsilon=0.0001;\n\t\twhile (this._firstActiveElement !=this._firstNewElement){\n\t\t\tvar index=this._firstActiveElement *this._floatCountPerVertex *this._vertexStride;\n\t\t\tvar timeIndex=index+this._timeIndex;\n\t\t\tvar particleAge=this._currentTime-this._vertices[timeIndex];\n\t\t\tif (particleAge+epsilon < this._vertices[index+this._startLifeTimeIndex])\n\t\t\t\tbreak ;\n\t\t\tthis._vertices[timeIndex]=this._drawCounter;\n\t\t\tthis._firstActiveElement++;\n\t\t\tif (this._firstActiveElement >=this._bufferMaxParticles)\n\t\t\t\tthis._firstActiveElement=0;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._freeRetiredParticles=function(){\n\t\twhile (this._firstRetiredElement !=this._firstActiveElement){\n\t\t\tvar age=this._drawCounter-this._vertices[this._firstRetiredElement *this._floatCountPerVertex *this._vertexStride+this._timeIndex];\n\t\t\tif (this.isPerformanceMode)\n\t\t\t\tif (age < 3)\n\t\t\tbreak ;\n\t\t\tthis._firstRetiredElement++;\n\t\t\tif (this._firstRetiredElement >=this._bufferMaxParticles)\n\t\t\t\tthis._firstRetiredElement=0;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._burst=function(fromTime,toTime){\n\t\tvar totalEmitCount=0;\n\t\tvar bursts=this._emission._bursts;\n\t\tfor (var n=bursts.length;this._burstsIndex < n;this._burstsIndex++){\n\t\t\tvar burst=bursts[this._burstsIndex];\n\t\t\tvar burstTime=burst.time;\n\t\t\tif (fromTime<=burstTime && burstTime < toTime){\n\t\t\t\tvar emitCount=0;\n\t\t\t\tif (this.autoRandomSeed){\n\t\t\t\t\temitCount=MathUtil.lerp(burst.minCount,burst.maxCount,Math.random());\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._rand.seed=this._randomSeeds[0];\n\t\t\t\t\temitCount=MathUtil.lerp(burst.minCount,burst.maxCount,this._rand.getFloat());\n\t\t\t\t\tthis._randomSeeds[0]=this._rand.seed;\n\t\t\t\t}\n\t\t\t\ttotalEmitCount+=emitCount;\n\t\t\t\t}else {\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\treturn totalEmitCount;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._advanceTime=function(elapsedTime,emitTime){\n\t\tvar i=0;\n\t\tvar lastEmissionTime=this._emissionTime;\n\t\tthis._emissionTime+=elapsedTime;\n\t\tvar totalEmitCount=0;\n\t\tif (this._emissionTime > this.duration){\n\t\t\tif (this.looping){\n\t\t\t\ttotalEmitCount+=this._burst(lastEmissionTime,this._emissionTime);\n\t\t\t\tthis._emissionTime-=this.duration;\n\t\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\tthis._burstsIndex=0;\n\t\t\t\ttotalEmitCount+=this._burst(0,this._emissionTime);\n\t\t\t\t}else {\n\t\t\t\ttotalEmitCount=Math.min(this.maxParticles-this.aliveParticleCount,totalEmitCount);\n\t\t\t\tfor (i=0;i < totalEmitCount;i++)\n\t\t\t\tthis.emit(emitTime);\n\t\t\t\tthis._isPlaying=false;\n\t\t\t\tthis.stop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t}else {\n\t\t\ttotalEmitCount+=this._burst(lastEmissionTime,this._emissionTime);\n\t\t}\n\t\ttotalEmitCount=Math.min(this.maxParticles-this.aliveParticleCount,totalEmitCount);\n\t\tfor (i=0;i < totalEmitCount;i++)\n\t\tthis.emit(emitTime);\n\t\tvar emissionRate=this.emission.emissionRate;\n\t\tif (emissionRate>0){\n\t\t\tvar minEmissionTime=1/emissionRate;\n\t\t\tthis._frameRateTime+=minEmissionTime;\n\t\t\tthis._frameRateTime=this._currentTime-(this._currentTime-this._frameRateTime)% this._maxStartLifetime;\n\t\t\twhile (this._frameRateTime <=emitTime){\n\t\t\t\tif (this.emit(this._frameRateTime))\n\t\t\t\t\tthis._frameRateTime+=minEmissionTime;\n\t\t\t\telse\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tthis._frameRateTime=Math.floor(emitTime / minEmissionTime)*minEmissionTime;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initBufferDatas=function(){\n\t\tif (this._vertexBuffer){\n\t\t\tthis._vertexBuffer.destroy();\n\t\t\tthis._indexBuffer.destroy();\n\t\t};\n\t\tvar render=this._ownerRender;\n\t\tvar renderMode=render.renderMode;\n\t\tif (renderMode!==-1 && this.maxParticles > 0){\n\t\t\tvar indices,i=0,j=0,m=0,indexOffset=0,perPartOffset=0,vertexDeclaration;;\n\t\t\tvar mesh=render.mesh;\n\t\t\tif (renderMode===4){\n\t\t\t\tif(mesh){\n\t\t\t\t\tvar vertexBufferCount=mesh._vertexBuffers.length;\n\t\t\t\t\tif (vertexBufferCount > 1){\n\t\t\t\t\t\tthrow new Error(\"ShurikenParticleSystem: submesh Count mesh be One or all subMeshes have the same vertexDeclaration.\");\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvertexDeclaration=VertexShurikenParticleMesh.vertexDeclaration;\n\t\t\t\t\t\tthis._floatCountPerVertex=vertexDeclaration.vertexStride/4;\n\t\t\t\t\t\tthis._startLifeTimeIndex=12;\n\t\t\t\t\t\tthis._timeIndex=16;\n\t\t\t\t\t\tthis._vertexStride=mesh._vertexBuffers[0].vertexCount;\n\t\t\t\t\t\tvar totalVertexCount=this._bufferMaxParticles *this._vertexStride;\n\t\t\t\t\t\tvar vbCount=Math.floor(totalVertexCount / 65535)+1;\n\t\t\t\t\t\tvar lastVBVertexCount=totalVertexCount % 65535;\n\t\t\t\t\t\tif (vbCount > 1){\n\t\t\t\t\t\t\tthrow new Error(\"ShurikenParticleSystem:the maxParticleCount multiply mesh vertexCount is large than 65535.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._vertexBuffer=VertexBuffer3D.create(vertexDeclaration,lastVBVertexCount,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\t\t\t\t\tthis._vertices=new Float32Array(this._floatCountPerVertex *lastVBVertexCount);\n\t\t\t\t\t\tthis._indexStride=mesh._indexBuffer.indexCount;\n\t\t\t\t\t\tvar indexDatas=mesh._indexBuffer.getData();\n\t\t\t\t\t\tvar indexCount=this._bufferMaxParticles *this._indexStride;\n\t\t\t\t\t\tthis._indexBuffer=IndexBuffer3D.create(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",indexCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\t\t\t\t\tindices=new Uint16Array(indexCount);\n\t\t\t\t\t\tindexOffset=0;\n\t\t\t\t\t\tfor (i=0;i < this._bufferMaxParticles;i++){\n\t\t\t\t\t\t\tvar indexValueOffset=i *this._vertexStride;\n\t\t\t\t\t\t\tfor (j=0,m=indexDatas.length;j < m;j++)\n\t\t\t\t\t\t\tindices[indexOffset++]=indexValueOffset+indexDatas[j];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._indexBuffer.setData(indices);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvertexDeclaration=VertexShurikenParticleBillboard.vertexDeclaration;\n\t\t\t\tthis._floatCountPerVertex=vertexDeclaration.vertexStride/4;\n\t\t\t\tthis._startLifeTimeIndex=7;\n\t\t\t\tthis._timeIndex=11;\n\t\t\t\tthis._vertexStride=4;\n\t\t\t\tthis._vertexBuffer=VertexBuffer3D.create(vertexDeclaration,this._bufferMaxParticles *this._vertexStride,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\t\t\tthis._vertices=new Float32Array(this._floatCountPerVertex *this._bufferMaxParticles *this._vertexStride);\n\t\t\t\tfor (i=0;i < this._bufferMaxParticles;i++){\n\t\t\t\t\tperPartOffset=i *this._floatCountPerVertex *this._vertexStride;\n\t\t\t\t\tthis._vertices[perPartOffset]=-0.5;\n\t\t\t\t\tthis._vertices[perPartOffset+1]=-0.5;\n\t\t\t\t\tthis._vertices[perPartOffset+2]=0;\n\t\t\t\t\tthis._vertices[perPartOffset+3]=1;\n\t\t\t\t\tperPartOffset+=this._floatCountPerVertex;\n\t\t\t\t\tthis._vertices[perPartOffset]=0.5;\n\t\t\t\t\tthis._vertices[perPartOffset+1]=-0.5;\n\t\t\t\t\tthis._vertices[perPartOffset+2]=1;\n\t\t\t\t\tthis._vertices[perPartOffset+3]=1;\n\t\t\t\t\tperPartOffset+=this._floatCountPerVertex\n\t\t\t\t\tthis._vertices[perPartOffset]=0.5;\n\t\t\t\t\tthis._vertices[perPartOffset+1]=0.5;\n\t\t\t\t\tthis._vertices[perPartOffset+2]=1;\n\t\t\t\t\tthis._vertices[perPartOffset+3]=0;\n\t\t\t\t\tperPartOffset+=this._floatCountPerVertex\n\t\t\t\t\tthis._vertices[perPartOffset]=-0.5;\n\t\t\t\t\tthis._vertices[perPartOffset+1]=0.5;\n\t\t\t\t\tthis._vertices[perPartOffset+2]=0;\n\t\t\t\t\tthis._vertices[perPartOffset+3]=0;\n\t\t\t\t}\n\t\t\t\tthis._indexStride=6;\n\t\t\t\tthis._indexBuffer=IndexBuffer3D.create(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._bufferMaxParticles *6,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\t\t\tindices=new Uint16Array(this._bufferMaxParticles *6);\n\t\t\t\tfor (i=0;i < this._bufferMaxParticles;i++){\n\t\t\t\t\tindexOffset=i *6;\n\t\t\t\t\tvar firstVertex=i *this._vertexStride,secondVertex=firstVertex+2;\n\t\t\t\t\tindices[indexOffset++]=firstVertex;\n\t\t\t\t\tindices[indexOffset++]=secondVertex;\n\t\t\t\t\tindices[indexOffset++]=firstVertex+1;\n\t\t\t\t\tindices[indexOffset++]=firstVertex;\n\t\t\t\t\tindices[indexOffset++]=firstVertex+3;\n\t\t\t\t\tindices[indexOffset++]=secondVertex;\n\t\t\t\t}\n\t\t\t\tthis._indexBuffer.setData(indices);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\t(this._owner.activeInHierarchy)&& (this._removeUpdateEmissionToTimer());\n\t\tthis._vertexBuffer.destroy();\n\t\tthis._indexBuffer.destroy();\n\t\tthis._emission._destroy();\n\t\tthis._owner=null;\n\t\tthis._vertices=null;\n\t\tthis._vertexBuffer=null;\n\t\tthis._indexBuffer=null;\n\t\tthis._emission=null;\n\t\tthis._shape=null;\n\t\tthis.startLifeTimeGradient=null;\n\t\tthis.startLifeTimeGradientMin=null;\n\t\tthis.startLifeTimeGradientMax=null;\n\t\tthis.startSizeConstantSeparate=null;\n\t\tthis.startSizeConstantMinSeparate=null;\n\t\tthis.startSizeConstantMaxSeparate=null;\n\t\tthis.startRotationConstantSeparate=null;\n\t\tthis.startRotationConstantMinSeparate=null;\n\t\tthis.startRotationConstantMaxSeparate=null;\n\t\tthis.startColorConstant=null;\n\t\tthis.startColorConstantMin=null;\n\t\tthis.startColorConstantMax=null;\n\t\tthis._velocityOverLifetime=null;\n\t\tthis._colorOverLifetime=null;\n\t\tthis._sizeOverLifetime=null;\n\t\tthis._rotationOverLifetime=null;\n\t\tthis._textureSheetAnimation=null;\n\t}\n\n\t/**\n\t*发射一个粒子。\n\t*/\n\t__proto.emit=function(time){\n\t\tvar position=ShurikenParticleSystem._tempPosition;\n\t\tvar direction=ShurikenParticleSystem._tempDirection;\n\t\tif (this._shape&&this._shape.enable){\n\t\t\tif (this.autoRandomSeed)\n\t\t\t\tthis._shape.generatePositionAndDirection(position,direction);\n\t\t\telse\n\t\t\tthis._shape.generatePositionAndDirection(position,direction,this._rand,this._randomSeeds);\n\t\t\t}else {\n\t\t\tvar positionE=position.elements;\n\t\t\tvar directionE=direction.elements;\n\t\t\tpositionE[0]=positionE[1]=positionE[2]=0;\n\t\t\tdirectionE[0]=directionE[1]=0;\n\t\t\tdirectionE[2]=1;\n\t\t}\n\t\treturn this.addParticle(position,direction,time);\n\t}\n\n\t//TODO:提前判断优化\n\t__proto.addParticle=function(position,direction,time){\n\t\tVector3.normalize(direction,direction);\n\t\tvar nextFreeParticle=this._firstFreeElement+1;\n\t\tif (nextFreeParticle >=this._bufferMaxParticles)\n\t\t\tnextFreeParticle=0;\n\t\tif (nextFreeParticle===this._firstRetiredElement)\n\t\t\treturn false;\n\t\tShurikenParticleData.create(this,this._ownerRender,this._owner.transform);\n\t\tvar particleAge=this._currentTime-time;\n\t\tif (particleAge >=ShurikenParticleData.startLifeTime)\n\t\t\treturn true;\n\t\tvar randomVelocityX=NaN,randomVelocityY=NaN,randomVelocityZ=NaN,randomColor=NaN,randomSize=NaN,randomRotation=NaN,randomTextureAnimation=NaN;\n\t\tvar needRandomVelocity=this._velocityOverLifetime && this._velocityOverLifetime.enbale;\n\t\tif (needRandomVelocity){\n\t\t\tvar velocityType=this._velocityOverLifetime.velocity.type;\n\t\t\tif (velocityType===2 || velocityType===3){\n\t\t\t\tif (this.autoRandomSeed){\n\t\t\t\t\trandomVelocityX=Math.random();\n\t\t\t\t\trandomVelocityY=Math.random();\n\t\t\t\t\trandomVelocityZ=Math.random();\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._rand.seed=this._randomSeeds[9];\n\t\t\t\t\trandomVelocityX=this._rand.getFloat();\n\t\t\t\t\trandomVelocityY=this._rand.getFloat();\n\t\t\t\t\trandomVelocityZ=this._rand.getFloat();\n\t\t\t\t\tthis._randomSeeds[9]=this._rand.seed;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tneedRandomVelocity=false;\n\t\t\t}\n\t\t\t}else {\n\t\t\tneedRandomVelocity=false;\n\t\t};\n\t\tvar needRandomColor=this._colorOverLifetime && this._colorOverLifetime.enbale;\n\t\tif (needRandomColor){\n\t\t\tvar colorType=this._colorOverLifetime.color.type;\n\t\t\tif (colorType===3){\n\t\t\t\tif (this.autoRandomSeed){\n\t\t\t\t\trandomColor=Math.random();\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._rand.seed=this._randomSeeds[10];\n\t\t\t\t\trandomColor=this._rand.getFloat();\n\t\t\t\t\tthis._randomSeeds[10]=this._rand.seed;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tneedRandomColor=false;\n\t\t\t}\n\t\t\t}else {\n\t\t\tneedRandomColor=false;\n\t\t};\n\t\tvar needRandomSize=this._sizeOverLifetime && this._sizeOverLifetime.enbale;\n\t\tif (needRandomSize){\n\t\t\tvar sizeType=this._sizeOverLifetime.size.type;\n\t\t\tif (sizeType===3){\n\t\t\t\tif (this.autoRandomSeed){\n\t\t\t\t\trandomSize=Math.random();\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._rand.seed=this._randomSeeds[11];\n\t\t\t\t\trandomSize=this._rand.getFloat();\n\t\t\t\t\tthis._randomSeeds[11]=this._rand.seed;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tneedRandomSize=false;\n\t\t\t}\n\t\t\t}else {\n\t\t\tneedRandomSize=false;\n\t\t};\n\t\tvar needRandomRotation=this._rotationOverLifetime && this._rotationOverLifetime.enbale;\n\t\tif (needRandomRotation){\n\t\t\tvar rotationType=this._rotationOverLifetime.angularVelocity.type;\n\t\t\tif (rotationType===2 || rotationType===3){\n\t\t\t\tif (this.autoRandomSeed){\n\t\t\t\t\trandomRotation=Math.random();\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._rand.seed=this._randomSeeds[12];\n\t\t\t\t\trandomRotation=this._rand.getFloat();\n\t\t\t\t\tthis._randomSeeds[12]=this._rand.seed;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tneedRandomRotation=false;\n\t\t\t}\n\t\t\t}else {\n\t\t\tneedRandomRotation=false;\n\t\t};\n\t\tvar needRandomTextureAnimation=this._textureSheetAnimation && this._textureSheetAnimation.enable;\n\t\tif (needRandomTextureAnimation){\n\t\t\tvar textureAnimationType=this._textureSheetAnimation.frame.type;\n\t\t\tif (textureAnimationType===3){\n\t\t\t\tif (this.autoRandomSeed){\n\t\t\t\t\trandomTextureAnimation=Math.random();\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._rand.seed=this._randomSeeds[15];\n\t\t\t\t\trandomTextureAnimation=this._rand.getFloat();\n\t\t\t\t\tthis._randomSeeds[15]=this._rand.seed;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tneedRandomTextureAnimation=false;\n\t\t\t}\n\t\t\t}else {\n\t\t\tneedRandomTextureAnimation=false;\n\t\t};\n\t\tvar startIndex=this._firstFreeElement *this._floatCountPerVertex *this._vertexStride;\n\t\tvar subU=ShurikenParticleData.startUVInfo[0];\n\t\tvar subV=ShurikenParticleData.startUVInfo[1];\n\t\tvar startU=ShurikenParticleData.startUVInfo[2];\n\t\tvar startV=ShurikenParticleData.startUVInfo[3];\n\t\tvar positionE=position.elements;\n\t\tvar directionE=direction.elements;\n\t\tvar meshVertices,meshVertexStride=0,meshPosOffset=0,meshCorOffset=0,meshUVOffset=0,meshVertexIndex=0;\n\t\tvar render=this._ownerRender;\n\t\tif (render.renderMode===4){\n\t\t\tvar meshVB=render.mesh._vertexBuffers[0];\n\t\t\tmeshVertices=meshVB.getData();\n\t\t\tvar meshVertexDeclaration=meshVB.vertexDeclaration;\n\t\t\tmeshPosOffset=meshVertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.POSITION0*/0).offset / 4;\n\t\t\tvar colorElement=meshVertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.COLOR0*/1);\n\t\t\tmeshCorOffset=colorElement?colorElement.offset / 4:-1;\n\t\t\tvar uvElement=meshVertexDeclaration.getVertexElementByUsage(/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2);\n\t\t\tmeshUVOffset=uvElement?uvElement.offset / 4:-1;\n\t\t\tmeshVertexStride=meshVertexDeclaration.vertexStride / 4;\n\t\t\tmeshVertexIndex=0;\n\t\t\t}else {\n\t\t\tthis._vertices[startIndex+2]=startU;\n\t\t\tthis._vertices[startIndex+3]=startV+subV;\n\t\t\tvar secondOffset=startIndex+this._floatCountPerVertex;\n\t\t\tthis._vertices[secondOffset+2]=startU+subU;\n\t\t\tthis._vertices[secondOffset+3]=startV+subV;\n\t\t\tvar thirdOffset=secondOffset+this._floatCountPerVertex;\n\t\t\tthis._vertices[thirdOffset+2]=startU+subU;\n\t\t\tthis._vertices[thirdOffset+3]=startV;\n\t\t\tvar fourthOffset=thirdOffset+this._floatCountPerVertex;\n\t\t\tthis._vertices[fourthOffset+2]=startU;\n\t\t\tthis._vertices[fourthOffset+3]=startV;\n\t\t}\n\t\tfor (var i=startIndex,n=startIndex+this._floatCountPerVertex *this._vertexStride;i < n;i+=this._floatCountPerVertex){\n\t\t\tvar offset=0;\n\t\t\tif (render.renderMode===4){\n\t\t\t\toffset=i;\n\t\t\t\tvar vertexOffset=meshVertexStride *(meshVertexIndex++);\n\t\t\t\tvar meshOffset=vertexOffset+meshPosOffset;\n\t\t\t\tthis._vertices[offset++]=meshVertices[meshOffset++];\n\t\t\t\tthis._vertices[offset++]=meshVertices[meshOffset++];\n\t\t\t\tthis._vertices[offset++]=meshVertices[meshOffset];\n\t\t\t\tif (meshCorOffset===-1){\n\t\t\t\t\tthis._vertices[offset++]=1.0;\n\t\t\t\t\tthis._vertices[offset++]=1.0;\n\t\t\t\t\tthis._vertices[offset++]=1.0;\n\t\t\t\t\tthis._vertices[offset++]=1.0;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tmeshOffset=vertexOffset+meshCorOffset;\n\t\t\t\t\tthis._vertices[offset++]=meshVertices[meshOffset++];\n\t\t\t\t\tthis._vertices[offset++]=meshVertices[meshOffset++];\n\t\t\t\t\tthis._vertices[offset++]=meshVertices[meshOffset++];\n\t\t\t\t\tthis._vertices[offset++]=meshVertices[meshOffset];\n\t\t\t\t}\n\t\t\t\tif (meshUVOffset===-1){\n\t\t\t\t\tthis._vertices[offset++]=0.0;\n\t\t\t\t\tthis._vertices[offset++]=0.0;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tmeshOffset=vertexOffset+meshUVOffset;\n\t\t\t\t\tthis._vertices[offset++]=startU+meshVertices[meshOffset++] *subU;\n\t\t\t\t\tthis._vertices[offset++]=startV+meshVertices[meshOffset] *subV;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\toffset=i+4;\n\t\t\t}\n\t\t\tthis._vertices[offset++]=positionE[0];\n\t\t\tthis._vertices[offset++]=positionE[1];\n\t\t\tthis._vertices[offset++]=positionE[2];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startLifeTime;\n\t\t\tthis._vertices[offset++]=directionE[0];\n\t\t\tthis._vertices[offset++]=directionE[1];\n\t\t\tthis._vertices[offset++]=directionE[2];\n\t\t\tthis._vertices[offset++]=time;\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startColor[0];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startColor[1];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startColor[2];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startColor[3];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startSize[0];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startSize[1];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startSize[2];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startRotation[0];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startRotation[1];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startRotation[2];\n\t\t\tthis._vertices[offset++]=ShurikenParticleData.startSpeed;\n\t\t\tneedRandomColor && (this._vertices[offset+1]=randomColor);\n\t\t\tneedRandomSize && (this._vertices[offset+2]=randomSize);\n\t\t\tneedRandomRotation && (this._vertices[offset+3]=randomRotation);\n\t\t\tneedRandomTextureAnimation && (this._vertices[offset+4]=randomTextureAnimation);\n\t\t\tif (needRandomVelocity){\n\t\t\t\tthis._vertices[offset+5]=randomVelocityX;\n\t\t\t\tthis._vertices[offset+6]=randomVelocityY;\n\t\t\t\tthis._vertices[offset+7]=randomVelocityZ;\n\t\t\t}\n\t\t\tswitch(this.simulationSpace){\n\t\t\t\tcase 0:\n\t\t\t\t\toffset+=8;\n\t\t\t\t\tthis._vertices[offset++]=ShurikenParticleData.simulationWorldPostion[0];\n\t\t\t\t\tthis._vertices[offset++]=ShurikenParticleData.simulationWorldPostion[1];\n\t\t\t\t\tthis._vertices[offset++]=ShurikenParticleData.simulationWorldPostion[2];\n\t\t\t\t\tthis._vertices[offset++]=ShurikenParticleData.simulationWorldRotation[0];\n\t\t\t\t\tthis._vertices[offset++]=ShurikenParticleData.simulationWorldRotation[1];\n\t\t\t\t\tthis._vertices[offset++]=ShurikenParticleData.simulationWorldRotation[2];\n\t\t\t\t\tthis._vertices[offset++]=ShurikenParticleData.simulationWorldRotation[3];\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"ShurikenParticleMaterial: SimulationSpace value is invalid.\");\n\t\t\t\t}\n\t\t}\n\t\tthis._firstFreeElement=nextFreeParticle;\n\t\treturn true;\n\t}\n\n\t__proto.addNewParticlesToVertexBuffer=function(){\n\t\tvar start=0;\n\t\tif (this._firstNewElement < this._firstFreeElement){\n\t\t\tstart=this._firstNewElement *this._vertexStride *this._floatCountPerVertex;\n\t\t\tthis._vertexBuffer.setData(this._vertices,start,start,(this._firstFreeElement-this._firstNewElement)*this._vertexStride *this._floatCountPerVertex);\n\t\t\t}else {\n\t\t\tstart=this._firstNewElement *this._vertexStride *this._floatCountPerVertex;\n\t\t\tthis._vertexBuffer.setData(this._vertices,start,start,(this._bufferMaxParticles-this._firstNewElement)*this._vertexStride *this._floatCountPerVertex);\n\t\t\tif (this._firstFreeElement > 0){\n\t\t\t\tthis._vertexBuffer.setData(this._vertices,0,0,this._firstFreeElement *this._vertexStride *this._floatCountPerVertex);\n\t\t\t}\n\t\t}\n\t\tthis._firstNewElement=this._firstFreeElement;\n\t}\n\n\t__proto._beforeRender=function(state){\n\t\tif (this._firstNewElement !=this._firstFreeElement)\n\t\t\tthis.addNewParticlesToVertexBuffer();\n\t\tthis._drawCounter++;\n\t\tif (this._firstActiveElement !=this._firstFreeElement){\n\t\t\tthis._vertexBuffer._bind();\n\t\t\tthis._indexBuffer._bind();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._render=function(state){\n\t\tvar indexCount=0;\n\t\tvar gl=WebGL.mainContext;\n\t\tif (this._firstActiveElement < this._firstFreeElement){\n\t\t\tindexCount=(this._firstFreeElement-this._firstActiveElement)*this._indexStride;\n\t\t\tgl.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,indexCount,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,2 *this._firstActiveElement *this._indexStride);\n\t\t\tStat.trianglesFaces+=indexCount / 3;\n\t\t\tStat.drawCall++;\n\t\t\t}else {\n\t\t\tindexCount=(this._bufferMaxParticles-this._firstActiveElement)*this._indexStride;\n\t\t\tgl.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,indexCount,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,2 *this._firstActiveElement *this._indexStride);\n\t\t\tStat.trianglesFaces+=indexCount / 3;\n\t\t\tStat.drawCall++;\n\t\t\tif (this._firstFreeElement > 0){\n\t\t\t\tindexCount=this._firstFreeElement *this._indexStride;\n\t\t\t\tgl.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,indexCount,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\t\t\tStat.trianglesFaces+=indexCount / 3;\n\t\t\t\tStat.drawCall++;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*开始发射粒子。\n\t*/\n\t__proto.play=function(){\n\t\tthis._burstsIndex=0;\n\t\tthis._isEmitting=true;\n\t\tthis._isPlaying=true;\n\t\tthis._isPaused=false;\n\t\tthis._emissionTime=0;\n\t\tthis._totalDelayTime=0;\n\t\tif (!this.autoRandomSeed){\n\t\t\tfor (var i=0,n=this._randomSeeds.length;i < n;i++)\n\t\t\tthis._randomSeeds[i]=this.randomSeed[0]+ShurikenParticleSystem._RANDOMOFFSET[i];\n\t\t}\n\t\tswitch (this.startDelayType){\n\t\t\tcase 0:\n\t\t\t\tthis._playStartDelay=this.startDelay;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tif (this.autoRandomSeed){\n\t\t\t\t\tthis._playStartDelay=MathUtil.lerp(this.startDelayMin,this.startDelayMax,Math.random());\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._rand.seed=this._randomSeeds[2];\n\t\t\t\t\tthis._playStartDelay=MathUtil.lerp(this.startDelayMin,this.startDelayMax,this._rand.getFloat());\n\t\t\t\t\tthis._randomSeeds[2]=this._rand.seed;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"Utils3D: startDelayType is invalid.\");\n\t\t\t}\n\t\tthis._frameRateTime=this._currentTime+this._playStartDelay;\n\t\tthis._startUpdateLoopCount=Stat.loopCount;\n\t\tthis.event(/*laya.events.Event.PLAYED*/\"played\");\n\t}\n\n\t/**\n\t*暂停发射粒子。\n\t*/\n\t__proto.pause=function(){\n\t\tthis._isPaused=true;\n\t\tthis.event(/*laya.events.Event.PAUSED*/\"paused\");\n\t}\n\n\t/**\n\t*通过指定时间增加粒子播放进度，并暂停播放。\n\t*@param time 进度时间.如果restart为true,粒子播放时间会归零后再更新进度。\n\t*@param restart 是否重置播放状态。\n\t*/\n\t__proto.simulate=function(time,restart){\n\t\t(restart===void 0)&& (restart=true);\n\t\tthis._simulateUpdate=true;\n\t\tif (restart){\n\t\t\tthis._updateParticlesSimulationRestart(time);\n\t\t}\n\t\telse{\n\t\t\tthis._isPaused=false;\n\t\t\tthis._updateParticles(time);\n\t\t}\n\t\tthis.pause();\n\t}\n\n\t/**\n\t*停止发射粒子。\n\t*/\n\t__proto.stop=function(){\n\t\tthis._burstsIndex=0;\n\t\tthis._isEmitting=false;\n\t\tthis._emissionTime=0;\n\t\tthis.event(/*laya.events.Event.STOPPED*/\"stopped\");\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar dest=destObject;\n\t\tdest.duration=this.duration;\n\t\tdest.looping=this.looping;\n\t\tdest.prewarm=this.prewarm;\n\t\tdest.startDelayType=this.startDelayType;\n\t\tdest.startDelay=this.startDelay;\n\t\tdest.startDelayMin=this.startDelayMin;\n\t\tdest.startDelayMax=this.startDelayMax;\n\t\tdest._maxStartLifetime=this._maxStartLifetime;\n\t\tdest.startLifetimeType=this.startLifetimeType;\n\t\tdest.startLifetimeConstant=this.startLifetimeConstant;\n\t\tthis.startLifeTimeGradient.cloneTo(dest.startLifeTimeGradient);\n\t\tdest.startLifetimeConstantMin=this.startLifetimeConstantMin;\n\t\tdest.startLifetimeConstantMax=this.startLifetimeConstantMax;\n\t\tthis.startLifeTimeGradientMin.cloneTo(dest.startLifeTimeGradientMin);\n\t\tthis.startLifeTimeGradientMax.cloneTo(dest.startLifeTimeGradientMax);\n\t\tdest.startSpeedType=this.startSpeedType;\n\t\tdest.startSpeedConstant=this.startSpeedConstant;\n\t\tdest.startSpeedConstantMin=this.startSpeedConstantMin;\n\t\tdest.startSpeedConstantMax=this.startSpeedConstantMax;\n\t\tdest.threeDStartSize=this.threeDStartSize;\n\t\tdest.startSizeType=this.startSizeType;\n\t\tdest.startSizeConstant=this.startSizeConstant;\n\t\tthis.startSizeConstantSeparate.cloneTo(dest.startSizeConstantSeparate);\n\t\tdest.startSizeConstantMin=this.startSizeConstantMin;\n\t\tdest.startSizeConstantMax=this.startSizeConstantMax;\n\t\tthis.startSizeConstantMinSeparate.cloneTo(dest.startSizeConstantMinSeparate);\n\t\tthis.startSizeConstantMaxSeparate.cloneTo(dest.startSizeConstantMaxSeparate);\n\t\tdest.threeDStartRotation=this.threeDStartRotation;\n\t\tdest.startRotationType=this.startRotationType;\n\t\tdest.startRotationConstant=this.startRotationConstant;\n\t\tthis.startRotationConstantSeparate.cloneTo(dest.startRotationConstantSeparate);\n\t\tdest.startRotationConstantMin=this.startRotationConstantMin;\n\t\tdest.startRotationConstantMax=this.startRotationConstantMax;\n\t\tthis.startRotationConstantMinSeparate.cloneTo(dest.startRotationConstantMinSeparate);\n\t\tthis.startRotationConstantMaxSeparate.cloneTo(dest.startRotationConstantMaxSeparate);\n\t\tdest.randomizeRotationDirection=this.randomizeRotationDirection;\n\t\tdest.startColorType=this.startColorType;\n\t\tthis.startColorConstant.cloneTo(dest.startColorConstant);\n\t\tthis.startColorConstantMin.cloneTo(dest.startColorConstantMin);\n\t\tthis.startColorConstantMax.cloneTo(dest.startColorConstantMax);\n\t\tdest.gravityModifier=this.gravityModifier;\n\t\tdest.simulationSpace=this.simulationSpace;\n\t\tdest.scaleMode=this.scaleMode;\n\t\tdest.playOnAwake=this.playOnAwake;\n\t\tdest.maxParticles=this.maxParticles;\n\t\t(this._emission)&& (dest._emission=this._emission.clone());\n\t\t(this.shape)&& (dest.shape=this.shape.clone());\n\t\t(this.velocityOverLifetime)&& (dest.velocityOverLifetime=this.velocityOverLifetime.clone());\n\t\t(this.colorOverLifetime)&& (dest.colorOverLifetime=this.colorOverLifetime.clone());\n\t\t(this.sizeOverLifetime)&& (dest.sizeOverLifetime=this.sizeOverLifetime.clone());\n\t\t(this.rotationOverLifetime)&& (dest.rotationOverLifetime=this.rotationOverLifetime.clone());\n\t\t(this.textureSheetAnimation)&& (dest.textureSheetAnimation=this.textureSheetAnimation.clone());\n\t\tdest.isPerformanceMode=this.isPerformanceMode;\n\t\tdest._isEmitting=this._isEmitting;\n\t\tdest._isPlaying=this._isPlaying;\n\t\tdest._isPaused=this._isPaused;\n\t\tdest._playStartDelay=this._playStartDelay;\n\t\tdest._frameRateTime=this._frameRateTime;\n\t\tdest._emissionTime=this._emissionTime;\n\t\tdest._totalDelayTime=this._totalDelayTime;\n\t\tdest._burstsIndex=this._burstsIndex;\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar dest=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(dest);\n\t\treturn dest;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getVertexBuffers=function(){\n\t\treturn null;\n\t}\n\n\t/**设置最大粒子数,注意:谨慎修改此属性，有性能损耗。*/\n\t/**获取最大粒子数。*/\n\t__getset(0,__proto,'maxParticles',function(){\n\t\treturn this._bufferMaxParticles-1;\n\t\t},function(value){\n\t\tvar newMaxParticles=value+1;\n\t\tif (newMaxParticles!==this._bufferMaxParticles){\n\t\t\tthis._bufferMaxParticles=newMaxParticles;\n\t\t\tthis._initBufferDatas();\n\t\t}\n\t});\n\n\t/**\n\t*是否正在发射。\n\t*/\n\t__getset(0,__proto,'isEmitting',function(){\n\t\treturn this._isEmitting;\n\t});\n\n\t/**\n\t*是否存活。\n\t*/\n\t__getset(0,__proto,'isAlive',function(){\n\t\tif (this._isPlaying || this.aliveParticleCount > 0)\n\t\t\treturn true;\n\t\treturn false;\n\t});\n\n\t/**\n\t*设置形状。\n\t*/\n\t/**\n\t*获取形状。\n\t*/\n\t__getset(0,__proto,'shape',function(){\n\t\treturn this._shape;\n\t\t},function(value){\n\t\tif (this._shape!==value){\n\t\t\tif (value&&value.enable)\n\t\t\t\tthis._ownerRender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SHAPE);\n\t\t\telse\n\t\t\tthis._ownerRender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SHAPE);\n\t\t\tthis._shape=value;\n\t\t}\n\t});\n\n\t/**\n\t*设置生命周期旋转,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@param value 生命周期旋转。\n\t*/\n\t/**\n\t*获取生命周期旋转,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@return 生命周期旋转。\n\t*/\n\t__getset(0,__proto,'rotationOverLifetime',function(){\n\t\treturn this._rotationOverLifetime;\n\t\t},function(value){\n\t\tvar render=this._ownerRender;\n\t\tif (value){\n\t\t\tvar rotation=value.angularVelocity;\n\t\t\tif (!rotation)\n\t\t\t\treturn;\n\t\t\tvar rotationSeparate=rotation.separateAxes;\n\t\t\tvar rotationType=rotation.type;\n\t\t\tif (value.enbale){\n\t\t\t\tif (rotationSeparate)\n\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMESEPERATE);\n\t\t\t\telse\n\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIME);\n\t\t\t\tswitch (rotationType){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECONSTANT);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECURVE);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCONSTANTS);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCURVES);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIME);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMESEPERATE);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECONSTANT);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECURVE);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCONSTANTS);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCURVES);\n\t\t\t}\n\t\t\tswitch (rotationType){\n\t\t\t\tcase 0:\n\t\t\t\t\tif (rotationSeparate){\n\t\t\t\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTSEPRARATE*/35,rotation.constantSeparate);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trender._setShaderValueNumber(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONST*/34,rotation.constant);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tif (rotationSeparate){\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTX*/37,rotation.gradientX._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTY*/38,rotation.gradientY._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZ*/39,rotation.gradientZ._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTW*/40,rotation.gradientW._elements);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENT*/36,rotation.gradient._elements);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tif (rotationSeparate){\n\t\t\t\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTSEPRARATE*/35,rotation.constantMinSeparate);\n\t\t\t\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAXSEPRARATE*/42,rotation.constantMaxSeparate);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trender._setShaderValueNumber(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONST*/34,rotation.constantMin);\n\t\t\t\t\t\trender._setShaderValueNumber(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAX*/41,rotation.constantMax);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tif (rotationSeparate){\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTX*/37,rotation.gradientXMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTXMAX*/44,rotation.gradientXMax._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTY*/38,rotation.gradientYMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTYMAX*/45,rotation.gradientYMax._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZ*/39,rotation.gradientZMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZMAX*/46,rotation.gradientZMax._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTW*/40,rotation.gradientWMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTWMAX*/47,rotation.gradientWMax._elements);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENT*/36,rotation.gradientMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTMAX*/43,rotation.gradientMax._elements);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIME);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMESEPERATE);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECONSTANT);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECURVE);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCONSTANTS);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCURVES);\n\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTSEPRARATE*/35,null);\n\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAXSEPRARATE*/42,null);\n\t\t\trender._setShaderValueNumber(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONST*/34,undefined);\n\t\t\trender._setShaderValueNumber(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAX*/41,undefined);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTX*/37,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTXMAX*/44,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTY*/38,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTYMAX*/45,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZ*/39,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZMAX*/46,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTW*/40,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTWMAX*/47,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENT*/36,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTMAX*/43,null);\n\t\t}\n\t\tthis._rotationOverLifetime=value;\n\t});\n\n\t/**\n\t*获取发射器。\n\t*/\n\t__getset(0,__proto,'emission',function(){\n\t\treturn this._emission;\n\t});\n\n\t/**\n\t*获取一次循环内的累计时间。\n\t*@return 一次循环内的累计时间。\n\t*/\n\t__getset(0,__proto,'emissionTime',function(){\n\t\treturn this._emissionTime > this.duration ? this.duration :this._emissionTime;\n\t});\n\n\t/**\n\t*粒子存活个数。\n\t*/\n\t__getset(0,__proto,'aliveParticleCount',function(){\n\t\tif (this._firstNewElement >=this._firstRetiredElement)\n\t\t\treturn this._firstNewElement-this._firstRetiredElement;\n\t\telse\n\t\treturn this._bufferMaxParticles-this._firstRetiredElement+this._firstNewElement;\n\t});\n\n\t/**\n\t*是否正在播放。\n\t*/\n\t__getset(0,__proto,'isPlaying',function(){\n\t\treturn this._isPlaying;\n\t});\n\n\t/**\n\t*是否已暂停。\n\t*/\n\t__getset(0,__proto,'isPaused',function(){\n\t\treturn this._isPaused;\n\t});\n\n\t/**\n\t*设置开始生命周期模式,0为固定时间，1为渐变时间，2为两个固定之间的随机插值,3为两个渐变时间的随机插值。\n\t*/\n\t/**\n\t*获取开始生命周期模式,0为固定时间，1为渐变时间，2为两个固定之间的随机插值,3为两个渐变时间的随机插值。\n\t*/\n\t__getset(0,__proto,'startLifetimeType',function(){\n\t\treturn this._startLifetimeType;\n\t\t},function(value){\n\t\tvar i=0,n=0;\n\t\tswitch (this.startLifetimeType){\n\t\t\tcase 0:\n\t\t\t\tthis._maxStartLifetime=this.startLifetimeConstant;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tthis._maxStartLifetime=-Number.MAX_VALUE;\n\t\t\t\tvar startLifeTimeGradient=startLifeTimeGradient;\n\t\t\t\tfor (i=0,n=startLifeTimeGradient.gradientCount;i < n;i++)\n\t\t\t\tthis._maxStartLifetime=Math.max(this._maxStartLifetime,startLifeTimeGradient.getValueByIndex(i));\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis._maxStartLifetime=Math.max(this.startLifetimeConstantMin,this.startLifetimeConstantMax);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis._maxStartLifetime=-Number.MAX_VALUE;\n\t\t\t\tvar startLifeTimeGradientMin=startLifeTimeGradientMin;\n\t\t\t\tfor (i=0,n=startLifeTimeGradientMin.gradientCount;i < n;i++)\n\t\t\t\tthis._maxStartLifetime=Math.max(this._maxStartLifetime,startLifeTimeGradientMin.getValueByIndex(i));\n\t\t\t\tvar startLifeTimeGradientMax=startLifeTimeGradientMax;\n\t\t\t\tfor (i=0,n=startLifeTimeGradientMax.gradientCount;i < n;i++)\n\t\t\t\tthis._maxStartLifetime=Math.max(this._maxStartLifetime,startLifeTimeGradientMax.getValueByIndex(i));\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tthis._startLifetimeType=value;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingSphere',function(){\n\t\treturn this._boundingSphere;\n\t});\n\n\t/**\n\t*设置开始生命周期，0模式,单位为秒。\n\t*/\n\t/**\n\t*获取开始生命周期，0模式,单位为秒。\n\t*/\n\t__getset(0,__proto,'startLifetimeConstant',function(){\n\t\treturn this._startLifetimeConstant;\n\t\t},function(value){\n\t\tif(this._startLifetimeType===0)\n\t\t\tthis._maxStartLifetime=value;\n\t\tthis._startLifetimeConstant=value;\n\t});\n\n\t/**\n\t*设置最小开始生命周期，2模式,单位为秒。\n\t*/\n\t/**\n\t*获取最小开始生命周期，2模式,单位为秒。\n\t*/\n\t__getset(0,__proto,'startLifetimeConstantMin',function(){\n\t\treturn this._startLifetimeConstantMin;\n\t\t},function(value){\n\t\tif (this._startLifetimeType===2)\n\t\t\tthis._maxStartLifetime=Math.max(value,this._startLifetimeConstantMax);\n\t\tthis._startLifetimeConstantMin=value;\n\t});\n\n\t/**\n\t*设置开始渐变生命周期，1模式,单位为秒。\n\t*/\n\t/**\n\t*获取开始渐变生命周期，1模式,单位为秒。\n\t*/\n\t__getset(0,__proto,'startLifeTimeGradient',function(){\n\t\treturn this._startLifeTimeGradient;\n\t\t},function(value){\n\t\tif (this._startLifetimeType===1){\n\t\t\tthis._maxStartLifetime=-Number.MAX_VALUE;\n\t\t\tfor (var i=0,n=value.gradientCount;i < n;i++)\n\t\t\tthis._maxStartLifetime=Math.max(this._maxStartLifetime,value.getValueByIndex(i));\n\t\t}\n\t\tthis._startLifeTimeGradient=value;\n\t});\n\n\t/**\n\t*设置最大开始生命周期，2模式,单位为秒。\n\t*/\n\t/**\n\t*获取最大开始生命周期，2模式,单位为秒。\n\t*/\n\t__getset(0,__proto,'startLifetimeConstantMax',function(){\n\t\treturn this._startLifetimeConstantMax;\n\t\t},function(value){\n\t\tif (this._startLifetimeType===2)\n\t\t\tthis._maxStartLifetime=Math.max(this._startLifetimeConstantMin,value);\n\t\tthis._startLifetimeConstantMax=value;\n\t});\n\n\t/**\n\t*设置开始渐变最小生命周期，3模式,单位为秒。\n\t*/\n\t/**\n\t*获取开始渐变最小生命周期，3模式,单位为秒。\n\t*/\n\t__getset(0,__proto,'startLifeTimeGradientMin',function(){\n\t\treturn this._startLifeTimeGradientMin;\n\t\t},function(value){\n\t\tif (this._startLifetimeType===3){\n\t\t\tvar i=0,n=0;\n\t\t\tthis._maxStartLifetime=-Number.MAX_VALUE;\n\t\t\tfor (i=0,n=value.gradientCount;i < n;i++)\n\t\t\tthis._maxStartLifetime=Math.max(this._maxStartLifetime,value.getValueByIndex(i));\n\t\t\tfor (i=0,n=this._startLifeTimeGradientMax.gradientCount;i < n;i++)\n\t\t\tthis._maxStartLifetime=Math.max(this._maxStartLifetime,this._startLifeTimeGradientMax.getValueByIndex(i));\n\t\t}\n\t\tthis._startLifeTimeGradientMin=value;\n\t});\n\n\t/**\n\t*设置开始渐变最大生命周期，3模式,单位为秒。\n\t*/\n\t/**\n\t*获取开始渐变最大生命周期，3模式,单位为秒。\n\t*/\n\t__getset(0,__proto,'startLifeTimeGradientMax',function(){\n\t\treturn this._startLifeTimeGradientMax;\n\t\t},function(value){\n\t\tif (this._startLifetimeType===3){\n\t\t\tvar i=0,n=0;\n\t\t\tthis._maxStartLifetime=-Number.MAX_VALUE;\n\t\t\tfor (i=0,n=this._startLifeTimeGradientMin.gradientCount;i < n;i++)\n\t\t\tthis._maxStartLifetime=Math.max(this._maxStartLifetime,this._startLifeTimeGradientMin.getValueByIndex(i));\n\t\t\tfor (i=0,n=value.gradientCount;i < n;i++)\n\t\t\tthis._maxStartLifetime=Math.max(this._maxStartLifetime,value.getValueByIndex(i));\n\t\t}\n\t\tthis._startLifeTimeGradientMax=value;\n\t});\n\n\t/**\n\t*设置生命周期速度,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@param value 生命周期速度.\n\t*/\n\t/**\n\t*获取生命周期速度,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@return 生命周期速度.\n\t*/\n\t__getset(0,__proto,'velocityOverLifetime',function(){\n\t\treturn this._velocityOverLifetime;\n\t\t},function(value){\n\t\tvar render=this._ownerRender;\n\t\tif (value){\n\t\t\tvar velocity=value.velocity;\n\t\t\tvar velocityType=velocity.type;\n\t\t\tif (value.enbale){\n\t\t\t\tswitch (velocityType){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECONSTANT);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECURVE);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCONSTANT);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCURVE);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECONSTANT);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECURVE);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCONSTANT);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCURVE);\n\t\t\t}\n\t\t\tswitch (velocityType){\n\t\t\t\tcase 0:\n\t\t\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONST*/13,velocity.constant);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTX*/14,velocity.gradientX._elements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTY*/15,velocity.gradientY._elements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZ*/16,velocity.gradientZ._elements);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONST*/13,velocity.constantMin);\n\t\t\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONSTMAX*/17,velocity.constantMax);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTX*/14,velocity.gradientXMin._elements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTXMAX*/18,velocity.gradientXMax._elements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTY*/15,velocity.gradientYMin._elements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTYMAX*/19,velocity.gradientYMax._elements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZ*/16,velocity.gradientZMin._elements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZMAX*/20,velocity.gradientZMax._elements);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\trender._setShaderValueInt(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLSPACETYPE*/21,value.space);\n\t\t\t}else {\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECONSTANT);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECURVE);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCONSTANT);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCURVE);\n\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONST*/13,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTX*/14,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTY*/15,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZ*/16,null);\n\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONST*/13,null);\n\t\t\trender._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONSTMAX*/17,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTX*/14,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTXMAX*/18,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTY*/15,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTYMAX*/19,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZ*/16,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZMAX*/20,null);\n\t\t\trender._setShaderValueInt(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLSPACETYPE*/21,undefined);\n\t\t}\n\t\tthis._velocityOverLifetime=value;\n\t});\n\n\t/**\n\t*设置生命周期颜色,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@param value 生命周期颜色\n\t*/\n\t/**\n\t*获取生命周期颜色,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@return 生命周期颜色\n\t*/\n\t__getset(0,__proto,'colorOverLifetime',function(){\n\t\treturn this._colorOverLifetime;\n\t\t},function(value){\n\t\tvar render=this._ownerRender;\n\t\tif (value){\n\t\t\tvar color=value.color;\n\t\t\tif (value.enbale){\n\t\t\t\tswitch (color.type){\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_COLOROVERLIFETIME);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RANDOMCOLOROVERLIFETIME);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_COLOROVERLIFETIME);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RANDOMCOLOROVERLIFETIME);\n\t\t\t}\n\t\t\tswitch (color.type){\n\t\t\t\tcase 1:;\n\t\t\t\t\tvar gradientColor=color.gradient;\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTALPHAS*/22,gradientColor._alphaElements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTCOLORS*/23,gradientColor._rgbElements);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:;\n\t\t\t\t\tvar minGradientColor=color.gradientMin;\n\t\t\t\t\tvar maxGradientColor=color.gradientMax;\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTALPHAS*/22,minGradientColor._alphaElements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTCOLORS*/23,minGradientColor._rgbElements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTALPHAS*/24,maxGradientColor._alphaElements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTCOLORS*/25,maxGradientColor._rgbElements);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_COLOROVERLIFETIME);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RANDOMCOLOROVERLIFETIME);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTALPHAS*/22,gradientColor._alphaElements);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTCOLORS*/23,gradientColor._rgbElements);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTALPHAS*/22,minGradientColor._alphaElements);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTCOLORS*/23,minGradientColor._rgbElements);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTALPHAS*/24,maxGradientColor._alphaElements);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTCOLORS*/25,maxGradientColor._rgbElements);\n\t\t}\n\t\tthis._colorOverLifetime=value;\n\t});\n\n\t/**\n\t*设置生命周期尺寸,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@param value 生命周期尺寸\n\t*/\n\t/**\n\t*获取生命周期尺寸,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@return 生命周期尺寸\n\t*/\n\t__getset(0,__proto,'sizeOverLifetime',function(){\n\t\treturn this._sizeOverLifetime;\n\t\t},function(value){\n\t\tvar render=this._ownerRender;\n\t\tif (value){\n\t\t\tvar size=value.size;\n\t\t\tvar sizeSeparate=size.separateAxes;\n\t\t\tvar sizeType=size.type;\n\t\t\tif (value.enbale){\n\t\t\t\tswitch (sizeType){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tif (sizeSeparate)\n\t\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVESEPERATE);\n\t\t\t\t\t\telse\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVE);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tif (sizeSeparate)\n\t\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVESSEPERATE);\n\t\t\t\t\t\telse\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVES);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVE);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVESEPERATE);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVES);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVESSEPERATE);\n\t\t\t}\n\t\t\tswitch (sizeType){\n\t\t\t\tcase 0:\n\t\t\t\t\tif (sizeSeparate){\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTX*/27,size.gradientX._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTY*/28,size.gradientY._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZ*/29,size.gradientZ._elements);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENT*/26,size.gradient._elements);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tif (sizeSeparate){\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTX*/27,size.gradientXMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTXMAX*/31,size.gradientXMax._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTY*/28,size.gradientYMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTYMAX*/32,size.gradientYMax._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZ*/29,size.gradientZMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZMAX*/33,size.gradientZMax._elements);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENT*/26,size.gradientMin._elements);\n\t\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientMax*/30,size.gradientMax._elements);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVE);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVESEPERATE);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVES);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVESSEPERATE);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTX*/27,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTXMAX*/31,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTY*/28,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTYMAX*/32,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZ*/29,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZMAX*/33,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENT*/26,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientMax*/30,null);\n\t\t}\n\t\tthis._sizeOverLifetime=value;\n\t});\n\n\t/**\n\t*设置生命周期纹理动画,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@param value 生命周期纹理动画。\n\t*/\n\t/**\n\t*获取生命周期纹理动画,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n\t*@return 生命周期纹理动画。\n\t*/\n\t__getset(0,__proto,'textureSheetAnimation',function(){\n\t\treturn this._textureSheetAnimation;\n\t\t},function(value){\n\t\tvar render=this._ownerRender;\n\t\tif (value){\n\t\t\tvar frameOverTime=value.frame;\n\t\t\tvar textureAniType=frameOverTime.type;\n\t\t\tif (value.enable){\n\t\t\t\tswitch (textureAniType){\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONCURVE);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trender._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONRANDOMCURVE);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONCURVE);\n\t\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONRANDOMCURVE);\n\t\t\t}\n\t\t\tif (textureAniType===1 || textureAniType===3){\n\t\t\t\trender._setShaderValueInt(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONCYCLES*/48,value.cycles);\n\t\t\t\tvar title=value.tiles;\n\t\t\t\tvar _uvLengthE=this._uvLength.elements;\n\t\t\t\t_uvLengthE[0]=1.0 / title.x;\n\t\t\t\t_uvLengthE[1]=1.0 / title.y;\n\t\t\t\trender._setShaderValueVector2(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONSUBUVLENGTH*/49,this._uvLength);\n\t\t\t}\n\t\t\tswitch (textureAniType){\n\t\t\t\tcase 1:\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTUVS*/50,frameOverTime.frameOverTimeData._elements);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTUVS*/50,frameOverTime.frameOverTimeDataMin._elements);\n\t\t\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTMAXUVS*/51,frameOverTime.frameOverTimeDataMax._elements);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONCURVE);\n\t\t\trender._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONRANDOMCURVE);\n\t\t\trender._setShaderValueInt(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONCYCLES*/48,undefined);\n\t\t\trender._setShaderValueVector2(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONSUBUVLENGTH*/49,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTUVS*/50,null);\n\t\t\trender._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTMAXUVS*/51,null);\n\t\t}\n\t\tthis._textureSheetAnimation=value;\n\t});\n\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn 1;\n\t});\n\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn this._indexBuffer?this._indexBuffer.indexCount / 3:0;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingBox',function(){\n\t\treturn this._boundingBox;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingBoxCorners',function(){\n\t\treturn this._boundingBoxCorners;\n\t});\n\n\tShurikenParticleSystem.halfKSqrtOf2=1.42 *0.5;\n\t__static(ShurikenParticleSystem,\n\t['_RANDOMOFFSET',function(){return this._RANDOMOFFSET=new Uint32Array([0x23571a3e,0xc34f56fe,0x13371337,0x12460f3b,0x6aed452e,0xdec4aea1,0x96aa4de3,0x8d2c8431,0xf3857f6f,0xe0fbd834,0x13740583,0x591bc05c,0x40eb95e4,0xbc524e5f,0xaf502044,0xa614b381,0x1034e524,0xfc524e5f]);},'_maxElapsedTime',function(){return this._maxElapsedTime=1.0 / 3.0;},'_tempVector30',function(){return this._tempVector30=new Vector3();},'_tempVector31',function(){return this._tempVector31=new Vector3();},'_tempVector32',function(){return this._tempVector32=new Vector3();},'_tempVector33',function(){return this._tempVector33=new Vector3();},'_tempVector34',function(){return this._tempVector34=new Vector3();},'_tempVector35',function(){return this._tempVector35=new Vector3();},'_tempVector36',function(){return this._tempVector36=new Vector3();},'_tempVector37',function(){return this._tempVector37=new Vector3();},'_tempVector38',function(){return this._tempVector38=new Vector3();},'_tempVector39',function(){return this._tempVector39=new Vector3();},'_tempPosition',function(){return this._tempPosition=new Vector3();},'_tempDirection',function(){return this._tempDirection=new Vector3();}\n\t]);\n\treturn ShurikenParticleSystem;\n})(GeometryFilter)\n\n\n/**\n*<code>ShurikenParticleRender</code> 类用于创建3D粒子渲染器。\n*/\n//class laya.d3.core.particleShuriKen.ShurikenParticleRender extends laya.d3.core.render.BaseRender\nvar ShurikenParticleRender=(function(_super){\n\tfunction ShurikenParticleRender(owner){\n\t\t/**@private */\n\t\t//this._defaultBoundBox=null;\n\t\t/**@private */\n\t\t//this._renderMode=0;\n\t\t/**@private */\n\t\t//this._mesh=null;\n\t\t/**拉伸广告牌模式摄像机速度缩放,暂不支持。*/\n\t\t//this.stretchedBillboardCameraSpeedScale=NaN;\n\t\t/**拉伸广告牌模式速度缩放。*/\n\t\t//this.stretchedBillboardSpeedScale=NaN;\n\t\t/**拉伸广告牌模式长度缩放。*/\n\t\t//this.stretchedBillboardLengthScale=NaN;\n\t\tthis._finalGravity=new Vector3();\n\t\tthis._tempRotationMatrix=new Matrix4x4();\n\t\tShurikenParticleRender.__super.call(this,owner);\n\t\tthis._defaultBoundBox=new BoundBox(new Vector3(),new Vector3());\n\t\tthis._renderMode=-1;\n\t\tthis.stretchedBillboardCameraSpeedScale=0.0;\n\t\tthis.stretchedBillboardSpeedScale=0.0;\n\t\tthis.stretchedBillboardLengthScale=1.0;\n\t}\n\n\t__class(ShurikenParticleRender,'laya.d3.core.particleShuriKen.ShurikenParticleRender',_super);\n\tvar __proto=ShurikenParticleRender.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._calculateBoundingBox=function(){\n\t\tvar minE=this._boundingBox.min.elements;\n\t\tminE[0]=-Number.MAX_VALUE;\n\t\tminE[1]=-Number.MAX_VALUE;\n\t\tminE[2]=-Number.MAX_VALUE;\n\t\tvar maxE=this._boundingBox.min.elements;\n\t\tmaxE[0]=Number.MAX_VALUE;\n\t\tmaxE[1]=Number.MAX_VALUE;\n\t\tmaxE[2]=Number.MAX_VALUE;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._calculateBoundingSphere=function(){\n\t\tvar oriBoundSphere=(this._owner).particleSystem._boundingSphere;\n\t\tvar maxScale=NaN;\n\t\tvar transform=this._owner.transform;\n\t\tvar scaleE=transform.scale.elements;\n\t\tvar scaleX=Math.abs(scaleE[0]);\n\t\tvar scaleY=Math.abs(scaleE[1]);\n\t\tvar scaleZ=Math.abs(scaleE[2]);\n\t\tif (scaleX >=scaleY && scaleX >=scaleZ)\n\t\t\tmaxScale=scaleX;\n\t\telse\n\t\tmaxScale=scaleY >=scaleZ ? scaleY :scaleZ;\n\t\tVector3.transformCoordinate(oriBoundSphere.center,transform.worldMatrix,this._boundingSphere.center);\n\t\tthis._boundingSphere.radius=oriBoundSphere.radius *maxScale;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._renderUpdate=function(projectionView){\n\t\tvar particleSystem=(this._owner).particleSystem;\n\t\tif (!Laya.stage.isVisibility||!particleSystem.isAlive)\n\t\t\treturn false;\n\t\tvar transform=this._owner.transform;\n\t\tswitch (particleSystem.simulationSpace){\n\t\t\tcase 0:\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tthis._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.WORLDPOSITION*/0,transform.position);\n\t\t\t\tthis._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.WORLDROTATION*/1,transform.rotation);\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"ShurikenParticleMaterial: SimulationSpace value is invalid.\");\n\t\t\t}\n\t\tswitch (particleSystem.scaleMode){\n\t\t\tcase 0:;\n\t\t\t\tvar scale=transform.scale;\n\t\t\t\tthis._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.POSITIONSCALE*/4,scale);\n\t\t\t\tthis._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SIZESCALE*/5,scale);\n\t\t\t\tbreak ;\n\t\t\tcase 1:;\n\t\t\t\tvar localScale=transform.localScale;\n\t\t\t\tthis._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.POSITIONSCALE*/4,localScale);\n\t\t\t\tthis._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SIZESCALE*/5,localScale);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.POSITIONSCALE*/4,transform.scale);\n\t\t\t\tthis._setShaderValueColor(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SIZESCALE*/5,Vector3.ONE);\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar finalGravityE=this._finalGravity.elements;\n\t\tvar gravityE=Physics.gravity.elements;\n\t\tvar gravityModifier=particleSystem.gravityModifier;\n\t\tfinalGravityE[0]=gravityE[0] *gravityModifier;\n\t\tfinalGravityE[1]=gravityE[1] *gravityModifier;\n\t\tfinalGravityE[2]=gravityE[2] *gravityModifier;\n\t\tthis._setShaderValueBuffer(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.GRAVITY*/7,finalGravityE);\n\t\tthis._setShaderValueInt(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SIMULATIONSPACE*/11,particleSystem.simulationSpace);\n\t\tthis._setShaderValueBool(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.THREEDSTARTROTATION*/8,particleSystem.threeDStartRotation);\n\t\tthis._setShaderValueInt(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SCALINGMODE*/6,particleSystem.scaleMode);\n\t\tthis._setShaderValueInt(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.STRETCHEDBILLBOARDLENGTHSCALE*/9,this.stretchedBillboardLengthScale);\n\t\tthis._setShaderValueInt(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.STRETCHEDBILLBOARDSPEEDSCALE*/10,this.stretchedBillboardSpeedScale);\n\t\tthis._setShaderValueNumber(/*laya.d3.core.particleShuriKen.ShuriKenParticle3D.CURRENTTIME*/12,particleSystem._currentTime);\n\t\tif (Laya3D.debugMode)\n\t\t\tthis._renderRenderableBoundBox();\n\t\treturn true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\t(this._mesh)&& (this._mesh._removeReference(),this._mesh=null);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'boundingBox',function(){\n\t\tif (!(this._owner).particleSystem.isAlive){\n\t\t\treturn this._defaultBoundBox;\n\t\t\t}else {\n\t\t\tif (this._boundingBoxNeedChange){\n\t\t\t\tthis._calculateBoundingBox();\n\t\t\t\tthis._boundingBoxNeedChange=false;\n\t\t\t}\n\t\t\treturn this._boundingBox;\n\t\t}\n\t});\n\n\t/**\n\t*设置渲染模式,0为BILLBOARD、1为STRETCHEDBILLBOARD、2为HORIZONTALBILLBOARD、3为VERTICALBILLBOARD、4为MESH。\n\t*@param value 渲染模式。\n\t*/\n\t/**\n\t*获取渲染模式。\n\t*@return 渲染模式。\n\t*/\n\t__getset(0,__proto,'renderMode',function(){\n\t\treturn this._renderMode;\n\t\t},function(value){\n\t\tif (this._renderMode!==value){\n\t\t\tswitch (this._renderMode){\n\t\t\t\tcase 0:\n\t\t\t\t\tthis._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_BILLBOARD);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_STRETCHEDBILLBOARD);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_HORIZONTALBILLBOARD);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_VERTICALBILLBOARD);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis._removeShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_MESH);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\tthis._renderMode=value;\n\t\t\tswitch (value){\n\t\t\t\tcase 0:\n\t\t\t\t\tthis._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_BILLBOARD);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_STRETCHEDBILLBOARD);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_HORIZONTALBILLBOARD);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_VERTICALBILLBOARD);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis._addShaderDefine(ShuriKenParticle3D.SHADERDEFINE_RENDERMODE_MESH);\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"ShurikenParticleRender: unknown renderMode Value.\");\n\t\t\t\t}\n\t\t\t(this._owner).particleSystem._initBufferDatas();\n\t\t}\n\t});\n\n\t/**\n\t*设置网格渲染模式所使用的Mesh,rendderMode为4时生效。\n\t*@param value 网格模式所使用Mesh。\n\t*/\n\t/**\n\t*获取网格渲染模式所使用的Mesh,rendderMode为4时生效。\n\t*@return 网格模式所使用Mesh。\n\t*/\n\t__getset(0,__proto,'mesh',function(){\n\t\treturn this._mesh\n\t\t},function(value){\n\t\tif (this._mesh!==value){\n\t\t\t(this._mesh)&& (this._mesh._removeReference());\n\t\t\tthis._mesh=value;\n\t\t\t(value)&& (value._addReference());\n\t\t\t(this._owner).particleSystem._initBufferDatas();\n\t\t}\n\t});\n\n\treturn ShurikenParticleRender;\n})(BaseRender)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.trail.TrailFilter extends laya.d3.core.GeometryFilter\nvar TrailFilter=(function(_super){\n\tfunction TrailFilter(owner){\n\t\tthis._owner=null;\n\t\tthis._trailRenderElements=null;\n\t\tthis._minVertexDistance=NaN;\n\t\tthis._widthMultiplier=NaN;\n\t\tthis._time=NaN;\n\t\tthis._widthCurve=null;\n\t\tthis._colorGradient=null;\n\t\tthis._textureMode=0;\n\t\tthis._curtime=0;\n\t\tthis._curSubTrailFinishCurTime=0;\n\t\tthis._curSubTrailFinished=false;\n\t\tthis._hasLifeSubTrail=false;\n\t\tthis._trailTotalLength=0;\n\t\tthis._trailSupplementLength=0;\n\t\tthis._trailDeadLength=0;\n\t\tthis._isStart=false;\n\t\tthis._trailRenderElementIndex=0;\n\t\tTrailFilter.__super.call(this);\n\t\tthis._curSubTrailFinishPosition=new Vector3();\n\t\tthis._curSubTrailFinishDirection=new Vector3();\n\t\tthis._owner=owner;\n\t\tthis._trailRenderElements=[];\n\t\tthis.addRenderElement();\n\t}\n\n\t__class(TrailFilter,'laya.d3.core.trail.TrailFilter',_super);\n\tvar __proto=TrailFilter.prototype;\n\t__proto.getRenderElementsCount=function(){\n\t\treturn this._trailRenderElements.length;\n\t}\n\n\t__proto.addRenderElement=function(){\n\t\tfor (var i=0;i < this._trailRenderElements.length;i++){\n\t\t\tif (this._trailRenderElements[i]._isDead==true){\n\t\t\t\tthis._trailRenderElements[i].reActivate();\n\t\t\t\treturn i;\n\t\t\t}\n\t\t};\n\t\tvar _trailRenderElement=new TrailRenderElement(this);\n\t\tthis._trailRenderElements.push(_trailRenderElement);\n\t\treturn this._trailRenderElements.length-1;\n\t}\n\n\t__proto.getRenderElement=function(index){\n\t\treturn this._trailRenderElements[index];\n\t}\n\n\t__proto._update=function(state){\n\t\tthis._curtime+=state.elapsedTime / 1000;\n\t\tthis._owner._render._setShaderValueNumber(/*laya.d3.core.trail.TrailSprite3D.CURTIME*/3,this._curtime);\n\t\tif (this._curSubTrailFinished){\n\t\t\tthis._curSubTrailFinished=false;\n\t\t\tthis._trailRenderElementIndex=this.addRenderElement();\n\t\t\tthis.event(/*laya.events.Event.TRAIL_FILTER_CHANGE*/\"trailfilterchange\",[this._trailRenderElementIndex,this._trailRenderElements[this._trailRenderElementIndex]]);\n\t\t}\n\t}\n\n\t__proto.reset=function(){\n\t\tfor (var i=0;i < this._trailRenderElements.length;i++){\n\t\t\tthis._trailRenderElements[i].reActivate();\n\t\t}\n\t\tthis._isStart=false;\n\t\tthis._hasLifeSubTrail=false;\n\t\tthis._curSubTrailFinished=false;\n\t\tthis._curSubTrailFinishCurTime=0;\n\t\tthis._trailTotalLength=0;\n\t\tthis._trailSupplementLength=0;\n\t\tthis._trailDeadLength=0;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\tfor (var i=0;i < this._trailRenderElements.length;i++){\n\t\t\tthis._trailRenderElements[i]._destroy();\n\t\t}\n\t\tthis._trailRenderElements=null;\n\t\tthis._widthCurve=null;\n\t\tthis._colorGradient=null;\n\t\tthis._curSubTrailFinishPosition=null;\n\t\tthis._curSubTrailFinishDirection=null;\n\t}\n\n\t/**\n\t*设置宽度倍数。\n\t*@param value 宽度倍数。\n\t*/\n\t/**\n\t*获取宽度倍数。\n\t*@return 宽度倍数。\n\t*/\n\t__getset(0,__proto,'widthMultiplier',function(){\n\t\treturn this._widthMultiplier;\n\t\t},function(value){\n\t\tthis._widthMultiplier=value;\n\t});\n\n\t/**\n\t*设置淡出时间。\n\t*@param value 淡出时间。\n\t*/\n\t/**\n\t*获取淡出时间。\n\t*@return 淡出时间。\n\t*/\n\t__getset(0,__proto,'time',function(){\n\t\treturn this._time;\n\t\t},function(value){\n\t\tthis._time=value;\n\t\tthis._owner._render._setShaderValueNumber(/*laya.d3.core.trail.TrailSprite3D.LIFETIME*/4,value);\n\t});\n\n\t/**\n\t*设置宽度曲线。\n\t*@param value 宽度曲线。\n\t*/\n\t/**\n\t*获取宽度曲线。\n\t*@return 宽度曲线。\n\t*/\n\t__getset(0,__proto,'widthCurve',function(){\n\t\treturn this._widthCurve;\n\t\t},function(value){\n\t\tthis._widthCurve=value;\n\t\tvar widthCurveFloatArray=new Float32Array(value.length *4);\n\t\tvar i=0,j=0,index=0;\n\t\tfor (i=0,j=value.length;i < j;i++){\n\t\t\twidthCurveFloatArray[index++]=value[i].time;\n\t\t\twidthCurveFloatArray[index++]=value[i].inTangent;\n\t\t\twidthCurveFloatArray[index++]=value[i].outTangent;\n\t\t\twidthCurveFloatArray[index++]=value[i].value;\n\t\t}\n\t\tthis._owner._render._setShaderValueBuffer(/*laya.d3.core.trail.TrailSprite3D.WIDTHCURVE*/5,widthCurveFloatArray);\n\t\tthis._owner._render._setShaderValueInt(/*laya.d3.core.trail.TrailSprite3D.WIDTHCURVEKEYLENGTH*/6,value.length);\n\t});\n\n\t/**\n\t*设置新旧顶点之间最小距离。\n\t*@param value 新旧顶点之间最小距离。\n\t*/\n\t/**\n\t*获取新旧顶点之间最小距离。\n\t*@return 新旧顶点之间最小距离。\n\t*/\n\t__getset(0,__proto,'minVertexDistance',function(){\n\t\treturn this._minVertexDistance;\n\t\t},function(value){\n\t\tthis._minVertexDistance=value;\n\t});\n\n\t/**\n\t*设置颜色梯度。\n\t*@param value 颜色梯度。\n\t*/\n\t/**\n\t*获取颜色梯度。\n\t*@return 颜色梯度。\n\t*/\n\t__getset(0,__proto,'colorGradient',function(){\n\t\treturn this._colorGradient;\n\t\t},function(value){\n\t\tthis._colorGradient=value;\n\t\tthis._owner._render._setShaderValueBuffer(/*laya.d3.core.trail.TrailSprite3D.GRADIENTCOLORKEY*/7,value._colorKeyData);\n\t\tthis._owner._render._setShaderValueBuffer(/*laya.d3.core.trail.TrailSprite3D.GRADIENTALPHAKEY*/8,value._alphaKeyData);\n\t\tif (value.mode==/*laya.d3.core.trail.module.GradientMode.Blend*/0){\n\t\t\tthis._owner._render._addShaderDefine(TrailSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND);\n\t\t}\n\t\telse{\n\t\t\tthis._owner._render._removeShaderDefine(TrailSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND);\n\t\t}\n\t});\n\n\t/**\n\t*设置纹理模式。\n\t*@param value 纹理模式。\n\t*/\n\t/**\n\t*获取纹理模式。\n\t*@return 纹理模式。\n\t*/\n\t__getset(0,__proto,'textureMode',function(){\n\t\treturn this._textureMode;\n\t\t},function(value){\n\t\tthis._textureMode=value;\n\t});\n\n\treturn TrailFilter;\n})(GeometryFilter)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.trail.TrailRenderer extends laya.d3.core.render.BaseRender\nvar TrailRenderer=(function(_super){\n\tfunction TrailRenderer(owner){\n\t\tTrailRenderer.__super.call(this,owner);\n\t}\n\n\t__class(TrailRenderer,'laya.d3.core.trail.TrailRenderer',_super);\n\tvar __proto=TrailRenderer.prototype;\n\t__proto._calculateBoundingBox=function(){\n\t\tvar minE=this._boundingBox.min.elements;\n\t\tminE[0]=-Number.MAX_VALUE;\n\t\tminE[1]=-Number.MAX_VALUE;\n\t\tminE[2]=-Number.MAX_VALUE;\n\t\tvar maxE=this._boundingBox.min.elements;\n\t\tmaxE[0]=Number.MAX_VALUE;\n\t\tmaxE[1]=Number.MAX_VALUE;\n\t\tmaxE[2]=Number.MAX_VALUE;\n\t}\n\n\t__proto._calculateBoundingSphere=function(){\n\t\tvar centerE=this._boundingSphere.center.elements;\n\t\tcenterE[0]=0;\n\t\tcenterE[1]=0;\n\t\tcenterE[2]=0;\n\t\tthis._boundingSphere.radius=Number.MAX_VALUE;\n\t}\n\n\t__proto._renderUpdate=function(projectionView){\n\t\treturn true;\n\t}\n\n\treturn TrailRenderer;\n})(BaseRender)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.domino.DominoFilter extends laya.d3.core.GeometryFilter\nvar DominoFilter=(function(_super){\n\tfunction DominoFilter(owner){\n\t\tthis._owner=null;\n\t\tthis.dominoCount=0;\n\t\tthis.DominoRenderElementMaxDominoCount=2000;\n\t\tthis._dominoRenderElements=null;\n\t\tDominoFilter.__super.call(this);\n\t\tthis.dominoPosition=[];\n\t\tthis._owner=owner;\n\t\tthis.initPositionsAndNormal();\n\t\tthis._dominoRenderElements=[];\n\t\tthis.addDominoRenderElement();\n\t}\n\n\t__class(DominoFilter,'laya.d3.extension.domino.DominoFilter',_super);\n\tvar __proto=DominoFilter.prototype;\n\t__proto.addDomino=function(position,rotation,scale){\n\t\t(position===void 0)&& (position=Vector3.ZERO);\n\t\t(rotation===void 0)&& (rotation=Quaternion.DEFAULT);\n\t\t(scale===void 0)&& (scale=Vector3.ZERO);\n\t\tvar curDominoRenderElement=this._dominoRenderElements[this._dominoRenderElements.length-1];\n\t\tif (curDominoRenderElement._curDominoCount >=this.DominoRenderElementMaxDominoCount){\n\t\t\tvar index=this.addDominoRenderElement();\n\t\t\tthis.event(/*laya.events.Event.DOMINO_FILTER_CHANGE*/\"dominofilterchange\",[index,this._dominoRenderElements[index]]);\n\t\t}\n\t\tcurDominoRenderElement=this._dominoRenderElements[this._dominoRenderElements.length-1];\n\t\tcurDominoRenderElement.addDomino(position,rotation,scale);\n\t}\n\n\t__proto.updateDomino=function(index,position,rotation,scale){\n\t\t(position===void 0)&& (position=Vector3.ZERO);\n\t\t(rotation===void 0)&& (rotation=Quaternion.DEFAULT);\n\t\t(scale===void 0)&& (scale=Vector3.ZERO);\n\t\tvar needUpdateDominoRenderElementId=Math.floor(index / this.DominoRenderElementMaxDominoCount);\n\t\tvar needUpdateDominoRenderElementIndex=index % this.DominoRenderElementMaxDominoCount;\n\t\tvar needUpdateDominoRenderElement=this._dominoRenderElements[needUpdateDominoRenderElementId];\n\t\tneedUpdateDominoRenderElement.updateDomino(needUpdateDominoRenderElementIndex,position,rotation,scale);\n\t}\n\n\t__proto.updateDominos=function(startIndex,count,keyFrames){\n\t\tvar endIndex=startIndex+count-1;\n\t\tvar startNeedUpdateDominoRenderElementId=Math.floor(startIndex / this.DominoRenderElementMaxDominoCount);\n\t\tvar endNeedUpdateDominoRenderElementId=Math.floor(endIndex / this.DominoRenderElementMaxDominoCount);\n\t\tvar startNeedUpdateDominoRenderElementIndex=startIndex % this.DominoRenderElementMaxDominoCount;\n\t\tvar endNeedUpdateDominoRenderElementIndex=endIndex % this.DominoRenderElementMaxDominoCount;\n\t\tvar needUpdateDominoRenderElementCount=endNeedUpdateDominoRenderElementId-startNeedUpdateDominoRenderElementId+1;\n\t\tvar needUpdateDominoRenderElement;\n\t\tif (needUpdateDominoRenderElementCount <=1){\n\t\t\tneedUpdateDominoRenderElement=this._dominoRenderElements[startNeedUpdateDominoRenderElementId];\n\t\t\tneedUpdateDominoRenderElement.updateDominos(startNeedUpdateDominoRenderElementIndex,count,keyFrames);\n\t\t\treturn;\n\t\t};\n\t\tvar keyFrameDatas;\n\t\tvar curStartIndex=0,curCount=0,curSliceIndex=0;\n\t\tfor (var i=0;i < needUpdateDominoRenderElementCount;i++){\n\t\t\tneedUpdateDominoRenderElement=this._dominoRenderElements[startNeedUpdateDominoRenderElementId+i];\n\t\t\tif (i==0){\n\t\t\t\tcurStartIndex=startNeedUpdateDominoRenderElementIndex;\n\t\t\t\tcurCount=this.DominoRenderElementMaxDominoCount-curStartIndex;\n\t\t\t\tkeyFrameDatas=keyFrames.slice(0,curCount);\n\t\t\t\tcurSliceIndex+=curCount;\n\t\t\t\t}else if (i==needUpdateDominoRenderElementCount-1){\n\t\t\t\tcurStartIndex=0;\n\t\t\t\tcurCount=endNeedUpdateDominoRenderElementIndex+1;\n\t\t\t\tkeyFrameDatas=keyFrames.slice(curSliceIndex,keyFrames.length);\n\t\t\t\t}else {\n\t\t\t\tcurStartIndex=0;\n\t\t\t\tcurCount=this.DominoRenderElementMaxDominoCount;\n\t\t\t\tkeyFrameDatas=keyFrames.slice(curSliceIndex,curSliceIndex+this.DominoRenderElementMaxDominoCount);\n\t\t\t\tcurSliceIndex+=this.DominoRenderElementMaxDominoCount;\n\t\t\t}\n\t\t\tneedUpdateDominoRenderElement.updateDominos(curStartIndex,curCount,keyFrameDatas);\n\t\t}\n\t}\n\n\t__proto.addDominoRenderElement=function(){\n\t\tvar _dominoRenderElement=new DominoRenderElement(this);\n\t\tthis._dominoRenderElements.push(_dominoRenderElement);\n\t\treturn this._dominoRenderElements.length-1;\n\t}\n\n\t__proto.getDominoRenderElementsCount=function(){\n\t\treturn this._dominoRenderElements.length;\n\t}\n\n\t__proto.getRenderElement=function(index){\n\t\treturn this._dominoRenderElements[index];\n\t}\n\n\t__proto._update=function(state){}\n\t__proto.initPositionsAndNormal=function(){\n\t\tif (DominoFilter._positions.length !=0 && DominoFilter._normals.length !=0){\n\t\t\treturn;\n\t\t}\n\t\tDominoFilter._positions.push(new Vector3(-0.5,0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,-0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,-0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,-0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,-0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,-0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,-0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,-0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,-0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,-0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,-0.5,0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(0.5,-0.5,-0.5));\n\t\tDominoFilter._positions.push(new Vector3(-0.5,-0.5,-0.5));\n\t\tDominoFilter._normals.push(new Vector3(0,1,0));\n\t\tDominoFilter._normals.push(new Vector3(0,1,0));\n\t\tDominoFilter._normals.push(new Vector3(0,1,0));\n\t\tDominoFilter._normals.push(new Vector3(0,1,0));\n\t\tDominoFilter._normals.push(new Vector3(0,-1,0));\n\t\tDominoFilter._normals.push(new Vector3(0,-1,0));\n\t\tDominoFilter._normals.push(new Vector3(0,-1,0));\n\t\tDominoFilter._normals.push(new Vector3(0,-1,0));\n\t\tDominoFilter._normals.push(new Vector3(-1,0,0));\n\t\tDominoFilter._normals.push(new Vector3(-1,0,0));\n\t\tDominoFilter._normals.push(new Vector3(-1,0,0));\n\t\tDominoFilter._normals.push(new Vector3(-1,0,0));\n\t\tDominoFilter._normals.push(new Vector3(1,0,0));\n\t\tDominoFilter._normals.push(new Vector3(1,0,0));\n\t\tDominoFilter._normals.push(new Vector3(1,0,0));\n\t\tDominoFilter._normals.push(new Vector3(1,0,0));\n\t\tDominoFilter._normals.push(new Vector3(0,0,1));\n\t\tDominoFilter._normals.push(new Vector3(0,0,1));\n\t\tDominoFilter._normals.push(new Vector3(0,0,1));\n\t\tDominoFilter._normals.push(new Vector3(0,0,1));\n\t\tDominoFilter._normals.push(new Vector3(0,0,-1));\n\t\tDominoFilter._normals.push(new Vector3(0,0,-1));\n\t\tDominoFilter._normals.push(new Vector3(0,0,-1));\n\t\tDominoFilter._normals.push(new Vector3(0,0,-1));\n\t}\n\n\tDominoFilter._positions=[];\n\tDominoFilter._normals=[];\n\treturn DominoFilter;\n})(GeometryFilter)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lineRender.LineFilter extends laya.d3.core.GeometryFilter\nvar LineFilter=(function(_super){\n\tfunction LineFilter(owner){\n\t\tthis._owner=null;\n\t\tthis._camera=null;\n\t\tthis._useWorldSpace=false;\n\t\tthis._widthMultiplier=0.02;\n\t\tthis._widthCurve=null;\n\t\tthis._colorGradient=null;\n\t\tthis._textureMode=0;\n\t\tthis._curFixedNum=0;\n\t\tthis._vertexBuffers=null;\n\t\tthis._maxVertexCount=512;\n\t\tthis._vertexCount=0;\n\t\tthis._vertices1=null;\n\t\tthis._vertexBuffer1=null;\n\t\tthis._verticesIndex1=0;\n\t\tthis._everyAddVerticeCount1=0;\n\t\tthis._floatCountPerVertices1=4;\n\t\tthis._vertices2=null;\n\t\tthis._vertexBuffer2=null;\n\t\tthis._verticesIndex2=0;\n\t\tthis._everyAddVerticeCount2=0;\n\t\tthis._floatCountPerVertices2=3;\n\t\tthis._vertices3=null;\n\t\tthis._vertexBuffer3=null;\n\t\tthis._verticesIndex3=0;\n\t\tthis._everyAddVerticeCount3=0;\n\t\tthis._floatCountPerVertices3=2;\n\t\tthis._delLength=0;\n\t\tthis._pointe=null;\n\t\tthis._pointAtoBVector3e=null;\n\t\tthis._everyToFirstDistance=null;\n\t\tthis._curTotalLength=0;\n\t\tLineFilter.__super.call(this);\n\t\tthis._positions=[];\n\t\tthis._normals=[];\n\t\tthis._firstPosition=new Vector3();\n\t\tthis._delVector3=new Vector3();\n\t\tthis._lastPosition=new Vector3();\n\t\tthis._pointAtoBVector3=new Vector3();\n\t\tthis._cameraToPointV3=new Vector3();\n\t\tthis._curDirection=new Vector3();\n\t\tthis._lastDirection=new Vector3();\n\t\tthis._fixedDirection=new Vector3();\n\t\tthis._owner=owner;\n\t\tthis._initData();\n\t\tthis._vertices1=new Float32Array(this._maxVertexCount *this._floatCountPerVertices1);\n\t\tthis._vertices2=new Float32Array(this._maxVertexCount *this._floatCountPerVertices2);\n\t\tthis._vertices3=new Float32Array(this._maxVertexCount *this._floatCountPerVertices3);\n\t\tthis._vertexBuffer1=new VertexBuffer3D(LineVertex.vertexDeclaration1,this._maxVertexCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer2=new VertexBuffer3D(LineVertex.vertexDeclaration2,this._maxVertexCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer3=new VertexBuffer3D(LineVertex.vertexDeclaration3,this._maxVertexCount,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffers=[];\n\t\tthis._vertexBuffers.push(this._vertexBuffer1);\n\t\tthis._vertexBuffers.push(this._vertexBuffer2);\n\t\tthis._vertexBuffers.push(this._vertexBuffer3);\n\t\tthis._everyToFirstDistance=new Float32Array(this._maxVertexCount / 2);\n\t}\n\n\t__class(LineFilter,'laya.d3.extension.lineRender.LineFilter',_super);\n\tvar __proto=LineFilter.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true})\n\t__proto.addPosition=function(position,normal){\n\t\tvar v30=new Vector3();\n\t\tposition.cloneTo(v30);\n\t\tthis._positions.push(v30);\n\t\tvar v31=new Vector3();\n\t\tnormal.cloneTo(v31);\n\t\tthis._normals.push(v31);\n\t\tthis._updateVertexBuffer1(v30);\n\t\tthis._vertexCount+=2;\n\t}\n\n\t__proto._updateVertexBuffer1=function(position){\n\t\tthis._everyAddVerticeCount1=0;\n\t\tthis._pointe=position.elements;\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[0];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[1];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[2];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=1.0;\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[0];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[1];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=this._pointe[2];\n\t\tthis._vertices1[this._verticesIndex1+this._everyAddVerticeCount1++]=0.0;\n\t\tthis._vertexBuffer1.setData(this._vertices1,this._verticesIndex1,this._verticesIndex1,this._everyAddVerticeCount1);\n\t\tthis._verticesIndex1+=this._everyAddVerticeCount1;\n\t}\n\n\t__proto._updateVertexBuffer2=function(){\n\t\tthis._verticesIndex2=0;\n\t\tfor (var i=this._curFixedNum;i < this._positions.length;i++){\n\t\t\tif (i==0){\n\t\t\t\tVector3.subtract(this._positions[1],this._positions[0],this._delVector3);\n\t\t\t\tVector3.cross(this._delVector3,this._normals[0],this._pointAtoBVector3);\n\t\t\t\tVector3.normalize(this._pointAtoBVector3,this._pointAtoBVector3);\n\t\t\t\tVector3.scale(this._pointAtoBVector3,this._widthMultiplier / 2,this._pointAtoBVector3);\n\t\t\t\tthis._everyToFirstDistance[i]=0;\n\t\t\t\tthis._updateVertices2(this._positions[0],0);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tVector3.subtract(this._positions[i],this._positions[i-1],this._delVector3);\n\t\t\t\tVector3.cross(this._delVector3,this._normals[i],this._pointAtoBVector3);\n\t\t\t\tVector3.normalize(this._pointAtoBVector3,this._pointAtoBVector3);\n\t\t\t\tVector3.scale(this._pointAtoBVector3,this._widthMultiplier / 2,this._pointAtoBVector3);\n\t\t\t\tthis._delLength=Vector3.scalarLength(this._delVector3);\n\t\t\t\tthis._curTotalLength=this._everyToFirstDistance[i]=this._curTotalLength+this._delLength;\n\t\t\t\tthis._updateVertices2(this._positions[i],i);\n\t\t\t}\n\t\t\tthis._curFixedNum=i+1;\n\t\t}\n\t\tthis._vertexBuffer2.setData(this._vertices2,0,0,this._verticesIndex2);\n\t}\n\n\t__proto._updateVertexBuffer3=function(){\n\t\tvar _uvIndex=0;\n\t\tvar _uvX=0.0;\n\t\tvar _uvX1=0.0;\n\t\tvar i=0,j=0;\n\t\tfor (i=0,j=this._vertexCount / 2;i < j;i++){\n\t\t\t_uvX=this._everyToFirstDistance[i] / this._curTotalLength;\n\t\t\t_uvX1=this._everyToFirstDistance[i];\n\t\t\tthis._vertices3[_uvIndex++]=_uvX;\n\t\t\tthis._vertices3[_uvIndex++]=_uvX1;\n\t\t\tthis._vertices3[_uvIndex++]=_uvX;\n\t\t\tthis._vertices3[_uvIndex++]=_uvX1;\n\t\t}\n\t\tthis._vertexBuffer3.setData(this._vertices3,0,0,this._vertexCount *2);\n\t}\n\n\t__proto._beforeRender=function(state){\n\t\tif (this._camera==null){\n\t\t\tthis._camera=state.camera;\n\t\t\treturn false;\n\t\t}\n\t\tif (this._vertexCount > 0){\n\t\t\tthis._updateVertexBuffer2();\n\t\t\tthis._updateVertexBuffer3();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t__proto._render=function(state){\n\t\tWebGL.mainContext.drawArrays(/*laya.webgl.WebGLContext.TRIANGLE_STRIP*/0x0005,0,this._vertexCount);\n\t\tStat.drawCall++;\n\t}\n\n\t__proto._updateVertices2=function(position,index){\n\t\tthis._everyAddVerticeCount2=0;\n\t\tthis._pointAtoBVector3e=this._pointAtoBVector3.elements;\n\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=this._pointAtoBVector3e[0];\n\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=this._pointAtoBVector3e[1];\n\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=this._pointAtoBVector3e[2];\n\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=-this._pointAtoBVector3e[0];\n\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=-this._pointAtoBVector3e[1];\n\t\tthis._vertices2[this._verticesIndex2+this._everyAddVerticeCount2++]=-this._pointAtoBVector3e[2];\n\t\tthis._verticesIndex2+=this._everyAddVerticeCount2;\n\t}\n\n\t__proto._initData=function(){\n\t\tthis.useWorldSpace=true;\n\t\tthis.widthMultiplier=0.02;\n\t\tthis.textureMode=0;\n\t\tvar widthKeyFrames=[];\n\t\tvar widthKeyFrame1=new TrailKeyFrame();\n\t\twidthKeyFrame1.time=0;\n\t\twidthKeyFrame1.inTangent=0;\n\t\twidthKeyFrame1.outTangent=0;\n\t\twidthKeyFrame1.value=1;\n\t\twidthKeyFrames.push(widthKeyFrame1);\n\t\tvar widthKeyFrame2=new TrailKeyFrame();\n\t\twidthKeyFrame2.time=1;\n\t\twidthKeyFrame2.inTangent=0;\n\t\twidthKeyFrame2.outTangent=0;\n\t\twidthKeyFrame2.value=1;\n\t\twidthKeyFrames.push(widthKeyFrame2);\n\t\tthis.widthCurve=widthKeyFrames;\n\t\tvar gradient=new Gradient();\n\t\tgradient.mode=/*laya.d3.core.trail.module.GradientMode.Blend*/0;\n\t\tvar colorKeys=[];\n\t\tvar colorKey1=new GradientColorKey();\n\t\tcolorKey1.time=0;\n\t\tcolorKey1.color=Color$1.WHITE;\n\t\tcolorKeys.push(colorKey1);\n\t\tvar colorKey2=new GradientColorKey();\n\t\tcolorKey2.time=1;\n\t\tcolorKey2.color=Color$1.WHITE;\n\t\tcolorKeys.push(colorKey2);\n\t\tvar alphaKeys=[];\n\t\tvar alphaKey1=new GradientAlphaKey();\n\t\talphaKey1.time=0;\n\t\talphaKey1.alpha=1;\n\t\talphaKeys.push(alphaKey1);\n\t\tvar alphaKey2=new GradientAlphaKey();\n\t\talphaKey2.time=1;\n\t\talphaKey2.alpha=1;\n\t\talphaKeys.push(alphaKey2);\n\t\tgradient.setKeys(colorKeys,alphaKeys);\n\t\tthis.colorGradient=gradient;\n\t}\n\n\t__proto._update=function(state){}\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index===0)\n\t\t\treturn this._vertexBuffer1;\n\t\telse\n\t\treturn null;\n\t}\n\n\t__proto._getVertexBuffers=function(){\n\t\treturn this._vertexBuffers;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\tthis._vertexBuffer1.destroy();\n\t\tthis._vertexBuffer2.destroy();\n\t\tthis._vertexBuffer3.destroy();\n\t\tthis._vertexBuffers=null;\n\t\tthis._vertices1=null;\n\t\tthis._vertices2=null;\n\t\tthis._vertices3=null;\n\t\tthis._owner=null;\n\t\tthis._camera=null;\n\t\tthis._widthCurve=null;\n\t\tthis._colorGradient=null;\n\t\tthis._positions=null;\n\t\tthis._normals=null;\n\t\tthis._firstPosition=null;\n\t\tthis._delVector3=null;\n\t\tthis._lastPosition=null;\n\t\tthis._pointAtoBVector3=null;\n\t\tthis._cameraToPointV3=null;\n\t\tthis._delVector3=null;\n\t\tthis._pointe=null;\n\t\tthis._pointAtoBVector3e=null;\n\t\tthis._curDirection=null;\n\t\tthis._lastDirection=null;\n\t\tthis._fixedDirection=null;\n\t\tthis._everyToFirstDistance=null;\n\t}\n\n\t/**\n\t*设置宽度曲线。\n\t*@param value 宽度曲线。\n\t*/\n\t/**\n\t*获取宽度曲线。\n\t*@return 宽度曲线。\n\t*/\n\t__getset(0,__proto,'widthCurve',function(){\n\t\treturn this._widthCurve;\n\t\t},function(value){\n\t\tthis._widthCurve=value;\n\t\tvar widthCurveFloatArray=new Float32Array(value.length *4);\n\t\tvar i=0,j=0,index=0;\n\t\tfor (i=0,j=value.length;i < j;i++){\n\t\t\twidthCurveFloatArray[index++]=value[i].time;\n\t\t\twidthCurveFloatArray[index++]=value[i].inTangent;\n\t\t\twidthCurveFloatArray[index++]=value[i].outTangent;\n\t\t\twidthCurveFloatArray[index++]=value[i].value;\n\t\t}\n\t\tthis._owner._render._setShaderValueBuffer(/*laya.d3.extension.lineRender.LineSprite3D.WIDTHCURVE*/3,widthCurveFloatArray);\n\t\tthis._owner._render._setShaderValueInt(/*laya.d3.extension.lineRender.LineSprite3D.WIDTHCURVEKEYLENGTH*/4,value.length);\n\t});\n\n\t/**\n\t*设置是否世界空间。\n\t*@param value 是否世界空间。\n\t*/\n\t/**\n\t*获取是否世界空间。\n\t*@return 是否世界空间。\n\t*/\n\t__getset(0,__proto,'useWorldSpace',function(){\n\t\treturn this._useWorldSpace;\n\t\t},function(value){\n\t\tthis._useWorldSpace=value;\n\t\tif (value){\n\t\t\tthis._owner._render._addShaderDefine(LineSprite3D.SHADERDEFINE_WORLDSPACE);\n\t\t}\n\t\telse{\n\t\t\tthis._owner._render._removeShaderDefine(LineSprite3D.SHADERDEFINE_WORLDSPACE);\n\t\t}\n\t});\n\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn 0;\n\t});\n\n\t/**\n\t*设置宽度倍数。\n\t*@param value 宽度倍数。\n\t*/\n\t/**\n\t*获取宽度倍数。\n\t*@return 宽度倍数。\n\t*/\n\t__getset(0,__proto,'widthMultiplier',function(){\n\t\treturn this._widthMultiplier;\n\t\t},function(value){\n\t\tthis._widthMultiplier=value;\n\t});\n\n\t/**\n\t*设置颜色梯度。\n\t*@param value 颜色梯度。\n\t*/\n\t/**\n\t*获取颜色梯度。\n\t*@return 颜色梯度。\n\t*/\n\t__getset(0,__proto,'colorGradient',function(){\n\t\treturn this._colorGradient;\n\t\t},function(value){\n\t\tthis._colorGradient=value;\n\t\tthis._owner._render._setShaderValueBuffer(/*laya.d3.extension.lineRender.LineSprite3D.GRADIENTCOLORKEY*/5,value._colorKeyData);\n\t\tthis._owner._render._setShaderValueBuffer(/*laya.d3.extension.lineRender.LineSprite3D.GRADIENTALPHAKEY*/6,value._alphaKeyData);\n\t\tif (value.mode==/*laya.d3.core.trail.module.GradientMode.Blend*/0){\n\t\t\tthis._owner._render._addShaderDefine(LineSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND);\n\t\t}\n\t\telse{\n\t\t\tthis._owner._render._removeShaderDefine(LineSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND);\n\t\t}\n\t});\n\n\t/**\n\t*设置纹理模式。\n\t*@param value 纹理模式。\n\t*/\n\t/**\n\t*获取纹理模式。\n\t*@return 纹理模式。\n\t*/\n\t__getset(0,__proto,'textureMode',function(){\n\t\treturn this._textureMode;\n\t\t},function(value){\n\t\tthis._textureMode=value;\n\t\tif (value==/*laya.d3.core.trail.module.TextureMode.Stretch*/0){\n\t\t\tthis._owner._render._addShaderDefine(LineSprite3D.SHADERDEFINE_TEXTUREMODE_STRETCH);\n\t\t}\n\t\telse{\n\t\t\tthis._owner._render._removeShaderDefine(LineSprite3D.SHADERDEFINE_TEXTUREMODE_STRETCH);\n\t\t}\n\t});\n\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn this._vertexBuffers.length;\n\t});\n\n\treturn LineFilter;\n})(GeometryFilter)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.domino.DominoRenderer extends laya.d3.core.render.BaseRender\nvar DominoRenderer=(function(_super){\n\tfunction DominoRenderer(owner){\n\t\tDominoRenderer.__super.call(this,owner);\n\t}\n\n\t__class(DominoRenderer,'laya.d3.extension.domino.DominoRenderer',_super);\n\tvar __proto=DominoRenderer.prototype;\n\t__proto._calculateBoundingBox=function(){\n\t\tvar minE=this._boundingBox.min.elements;\n\t\tminE[0]=-Number.MAX_VALUE;\n\t\tminE[1]=-Number.MAX_VALUE;\n\t\tminE[2]=-Number.MAX_VALUE;\n\t\tvar maxE=this._boundingBox.min.elements;\n\t\tmaxE[0]=Number.MAX_VALUE;\n\t\tmaxE[1]=Number.MAX_VALUE;\n\t\tmaxE[2]=Number.MAX_VALUE;\n\t}\n\n\t__proto._calculateBoundingSphere=function(){\n\t\tvar centerE=this._boundingSphere.center.elements;\n\t\tcenterE[0]=0;\n\t\tcenterE[1]=0;\n\t\tcenterE[2]=0;\n\t\tthis._boundingSphere.radius=Number.MAX_VALUE;\n\t}\n\n\t__proto._renderUpdate=function(projectionView){\n\t\tvar transform=this._owner.transform;\n\t\tif (transform){\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,transform.worldMatrix);\n\t\t\tvar projViewWorld=this._owner.getProjectionViewWorldMatrix(projectionView);\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projViewWorld);\n\t\t\t}else {\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,Matrix4x4.DEFAULT);\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projectionView);\n\t\t}\n\t\treturn true;\n\t}\n\n\treturn DominoRenderer;\n})(BaseRender)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lineRender.LineRenderer extends laya.d3.core.render.BaseRender\nvar LineRenderer=(function(_super){\n\tfunction LineRenderer(owner){\n\t\tLineRenderer.__super.call(this,owner);\n\t}\n\n\t__class(LineRenderer,'laya.d3.extension.lineRender.LineRenderer',_super);\n\tvar __proto=LineRenderer.prototype;\n\t__proto._calculateBoundingBox=function(){\n\t\tvar minE=this._boundingBox.min.elements;\n\t\tminE[0]=-Number.MAX_VALUE;\n\t\tminE[1]=-Number.MAX_VALUE;\n\t\tminE[2]=-Number.MAX_VALUE;\n\t\tvar maxE=this._boundingBox.min.elements;\n\t\tmaxE[0]=Number.MAX_VALUE;\n\t\tmaxE[1]=Number.MAX_VALUE;\n\t\tmaxE[2]=Number.MAX_VALUE;\n\t}\n\n\t__proto._calculateBoundingSphere=function(){\n\t\tvar centerE=this._boundingSphere.center.elements;\n\t\tcenterE[0]=0;\n\t\tcenterE[1]=0;\n\t\tcenterE[2]=0;\n\t\tthis._boundingSphere.radius=Number.MAX_VALUE;\n\t}\n\n\t__proto._renderUpdate=function(projectionView){\n\t\tvar transform=this._owner.transform;\n\t\tif (transform){\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,transform.worldMatrix);\n\t\t\tvar projViewWorld=this._owner.getProjectionViewWorldMatrix(projectionView);\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projViewWorld);\n\t\t\t}else {\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,Matrix4x4.DEFAULT);\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projectionView);\n\t\t}\n\t\treturn true;\n\t}\n\n\treturn LineRenderer;\n})(BaseRender)\n\n\n/**\n*@private\n*<code>GlitterTemplet</code> 类用于创建闪光数据模板。\n*/\n//class laya.d3.resource.tempelet.GlitterTemplet extends laya.d3.core.GeometryFilter\nvar GlitterTemplet=(function(_super){\n\tfunction GlitterTemplet(owner){\n\t\tthis._floatCountPerVertex=6;\n\t\t//顶点结构为Position(3个float)+UV(2个float)+Time(1个float)\n\t\tthis._owner=null;\n\t\tthis._vertices=null;\n\t\tthis._vertexBuffer=null;\n\t\tthis._firstActiveElement=0;\n\t\tthis._firstNewElement=0;\n\t\tthis._firstFreeElement=0;\n\t\tthis._firstRetiredElement=0;\n\t\tthis._currentTime=NaN;\n\t\tthis._drawCounter=0;\n\t\tthis.scLeft=null;\n\t\tthis.scRight=null;\n\t\tthis._numPositionMode=0;\n\t\tthis._numPositionVelocityMode=0;\n\t\tthis._lastTime=NaN;\n\t\tthis._needPatch=false;\n\t\tthis._lastPatchAddPos0=null;\n\t\tthis._lastPatchAddPos1=null;\n\t\tthis._lastPatchAddTime=NaN;\n\t\t/**声明周期。 */\n\t\tthis.lifeTime=NaN;\n\t\t/**最小分段距离。 */\n\t\tthis.minSegmentDistance=NaN;\n\t\t/**最小插值距离。 */\n\t\tthis.minInterpDistance=NaN;\n\t\t/**最大插值数量。 */\n\t\tthis.maxSlerpCount=0;\n\t\t/**最大段数。 */\n\t\tthis._maxSegments=0;\n\t\tGlitterTemplet.__super.call(this);\n\t\tthis._tempVector0=new Vector3();\n\t\tthis._tempVector1=new Vector3();\n\t\tthis._tempVector2=new Vector3();\n\t\tthis._tempVector3=new Vector3();\n\t\tthis._posModeLastPosition0=new Vector3();\n\t\tthis._posModeLastPosition1=new Vector3();\n\t\tthis._posModePosition0=new Vector3();\n\t\tthis._posModePosition1=new Vector3();\n\t\tthis._posVelModePosition0=new Vector3();\n\t\tthis._posVelModeVelocity0=new Vector3();\n\t\tthis._posVelModePosition1=new Vector3();\n\t\tthis._posVelModeVelocity1=new Vector3();\n\t\tthis._owner=owner;\n\t\tthis._lastTime=0\n\t\tthis._firstActiveElement=0;\n\t\tthis._firstNewElement=0;\n\t\tthis._firstFreeElement=0;\n\t\tthis._firstRetiredElement=0;\n\t\tthis._currentTime=0;\n\t\tthis._drawCounter=0;\n\t\tthis._needPatch=false;\n\t\tthis._lastPatchAddPos0=new Vector3();\n\t\tthis._lastPatchAddPos1=new Vector3();\n\t\tthis.scLeft=new SplineCurvePositionVelocity();\n\t\tthis.scRight=new SplineCurvePositionVelocity();\n\t\tthis.lifeTime=0.5;\n\t\tthis.minSegmentDistance=0.1;\n\t\tthis.minInterpDistance=0.6;\n\t\tthis.maxSlerpCount=128;\n\t\tthis._maxSegments=200;\n\t\tthis._owner.on(/*laya.events.Event.ACTIVE_IN_HIERARCHY_CHANGED*/\"activeinhierarchychanged\",this,this._onActiveHierarchyChanged);\n\t}\n\n\t__class(GlitterTemplet,'laya.d3.resource.tempelet.GlitterTemplet',_super);\n\tvar __proto=GlitterTemplet.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true})\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index===0)\n\t\t\treturn this._vertexBuffer;\n\t\telse\n\t\treturn null;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initialize=function(){\n\t\tthis._vertexBuffer=VertexBuffer3D.create(VertexGlitter.vertexDeclaration,this.maxSegments *2,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\tthis._vertices=new Float32Array(this.maxSegments *this._floatCountPerVertex *2);\n\t}\n\n\t__proto._onActiveHierarchyChanged=function(active){\n\t\tif (!active){\n\t\t\tthis._numPositionMode=0;\n\t\t\tthis._numPositionVelocityMode=0;\n\t\t\tthis._firstActiveElement=0;\n\t\t\tthis._firstNewElement=0;\n\t\t\tthis._firstFreeElement=0;\n\t\t\tthis._firstRetiredElement=0;\n\t\t\tthis._currentTime=0;\n\t\t\tthis._drawCounter=0;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateTextureCoordinates=function(){\n\t\tif (this._firstActiveElement < this._firstFreeElement){\n\t\t\tthis._updateSubTextureCoordinates(this._firstActiveElement,(this._firstFreeElement-this._firstActiveElement)*2);\n\t\t\t}else {\n\t\t\tthis._updateSubTextureCoordinates(this._firstActiveElement,(this.maxSegments-this._firstActiveElement)*2);\n\t\t\tif (this._firstFreeElement > 0)\n\t\t\t\tthis._updateSubTextureCoordinates(0,this._firstFreeElement *2);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateSubTextureCoordinates=function(start,count){\n\t\tvar startOffset=start *2;\n\t\tfor (var i=0;i < count;i+=2){\n\t\t\tvar vertexOffset=startOffset+i;\n\t\t\tvar upVertexOffset=vertexOffset *this._floatCountPerVertex;\n\t\t\tvar downVertexOffset=(vertexOffset+1)*this._floatCountPerVertex;\n\t\t\tthis._vertices[upVertexOffset+3]=this._vertices[downVertexOffset+3]=(this._vertices[upVertexOffset+5]-this._currentTime)/ this.lifeTime;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._retireActiveGlitter=function(){\n\t\tvar particleDuration=this.lifeTime;\n\t\tvar _floatCountOneSegement=this._floatCountPerVertex *2;\n\t\twhile (this._firstActiveElement !=this._firstNewElement){\n\t\t\tvar index=this._firstActiveElement *_floatCountOneSegement+5;\n\t\t\tvar particleAge=this._currentTime-this._vertices[index];\n\t\t\tif (particleAge < particleDuration)\n\t\t\t\tbreak ;\n\t\t\tthis._vertices[index]=this._drawCounter;\n\t\t\tthis._firstActiveElement++;\n\t\t\tif (this._firstActiveElement >=this.maxSegments)\n\t\t\t\tthis._firstActiveElement=0;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._freeRetiredGlitter=function(){\n\t\tvar _floatCountOneSegement=this._floatCountPerVertex *2;\n\t\twhile (this._firstRetiredElement !=this._firstActiveElement){\n\t\t\tvar age=this._drawCounter-this._vertices[this._firstRetiredElement *_floatCountOneSegement+5];\n\t\t\tif (age < 3)\n\t\t\t\tbreak ;\n\t\t\tthis._firstRetiredElement++;\n\t\t\tif (this._firstRetiredElement >=this.maxSegments)\n\t\t\t\tthis._firstRetiredElement=0;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calcVelocity=function(left,right,out){\n\t\tVector3.subtract(left,right,out);\n\t\tVector3.scale(out,0.5,out);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addNewGlitterSegementToVertexBuffer=function(){\n\t\tvar start=0;\n\t\tif (this._firstActiveElement < this._firstFreeElement){\n\t\t\tstart=this._firstActiveElement *2 *this._floatCountPerVertex;\n\t\t\tthis._vertexBuffer.setData(this._vertices,start,start,(this._firstFreeElement-this._firstActiveElement)*2 *this._floatCountPerVertex);\n\t\t\t}else {\n\t\t\tstart=this._firstActiveElement *2 *this._floatCountPerVertex;\n\t\t\tthis._vertexBuffer.setData(this._vertices,start,start,(this.maxSegments-this._firstActiveElement)*2 *this._floatCountPerVertex);\n\t\t\tif (this._firstFreeElement > 0){\n\t\t\t\tthis._vertexBuffer.setData(this._vertices,0,0,this._firstFreeElement *2 *this._floatCountPerVertex);\n\t\t\t}\n\t\t}\n\t\tthis._firstNewElement=this._firstFreeElement;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addGlitter=function(position0,position1,time){\n\t\tif (this._needPatch){\n\t\t\tthis._needPatch=false;\n\t\t\tthis._addGlitter(this._lastPatchAddPos0,this._lastPatchAddPos1,this._lastPatchAddTime);\n\t\t};\n\t\tvar nextFreeParticle=this._firstFreeElement+1;\n\t\tif (nextFreeParticle >=this.maxSegments){\n\t\t\tnextFreeParticle=0;\n\t\t\tposition0.cloneTo(this._lastPatchAddPos0);\n\t\t\tposition1.cloneTo(this._lastPatchAddPos1);\n\t\t\tthis._lastPatchAddTime=time;\n\t\t\tthis._needPatch=true;\n\t\t}\n\t\tif (nextFreeParticle===this._firstRetiredElement)\n\t\t\tconsole.log(\"GlitterTemplet:current segement count have large than maxSegments,please adjust the  value of maxSegments or add Glitter Vertex Frequency.\");\n\t\tvar position0e=position0.elements;\n\t\tvar position1e=position1.elements;\n\t\tvar j=0;\n\t\tvar positionIndex=this._firstFreeElement *this._floatCountPerVertex *2;\n\t\tfor (j=0;j < 3;j++)\n\t\tthis._vertices[positionIndex+j]=position0e[j];\n\t\tthis._vertices[positionIndex+3]=0.0;\n\t\tthis._vertices[positionIndex+4]=0.0;\n\t\tthis._vertices[positionIndex+5]=time;\n\t\tvar nextPositionIndex=positionIndex+this._floatCountPerVertex;\n\t\tfor (j=0;j < 3;j++)\n\t\tthis._vertices[nextPositionIndex+j]=position1e[j];\n\t\tthis._vertices[nextPositionIndex+3]=0.0;\n\t\tthis._vertices[nextPositionIndex+4]=1.0;\n\t\tthis._vertices[nextPositionIndex+5]=time;\n\t\tthis._firstFreeElement=nextFreeParticle;\n\t}\n\n\t/**\n\t*@private\n\t*更新闪光。\n\t*@param elapsedTime 间隔时间\n\t*/\n\t__proto._update=function(elapsedTime){\n\t\tthis._currentTime+=elapsedTime / 1000;\n\t\tthis._retireActiveGlitter();\n\t\tthis._freeRetiredGlitter();\n\t\tif (this._firstActiveElement==this._firstFreeElement)\n\t\t\tthis._currentTime=0;\n\t\tif (this._firstRetiredElement==this._firstActiveElement)\n\t\t\tthis._drawCounter=0;\n\t\tthis._updateTextureCoordinates();\n\t}\n\n\t//实时更新纹理坐标\n\t__proto._beforeRender=function(state){\n\t\tif (this._firstNewElement !=this._firstFreeElement){\n\t\t\tthis._addNewGlitterSegementToVertexBuffer();\n\t\t}\n\t\tthis._drawCounter++;\n\t\tif (this._firstActiveElement !=this._firstFreeElement){\n\t\t\tthis._vertexBuffer.bindWithIndexBuffer(null);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*@private\n\t*渲染闪光。\n\t*@param state 相关渲染状态\n\t*/\n\t__proto._render=function(state){\n\t\tvar drawVertexCount=0;\n\t\tvar glContext=WebGL.mainContext;\n\t\tif (this._firstActiveElement < this._firstFreeElement){\n\t\t\tdrawVertexCount=(this._firstFreeElement-this._firstActiveElement)*2;\n\t\t\tglContext.drawArrays(/*laya.webgl.WebGLContext.TRIANGLE_STRIP*/0x0005,this._firstActiveElement *2,drawVertexCount);\n\t\t\tStat.trianglesFaces+=drawVertexCount-2;\n\t\t\tStat.drawCall++;\n\t\t\t}else {\n\t\t\tdrawVertexCount=(this.maxSegments-this._firstActiveElement)*2;\n\t\t\tglContext.drawArrays(/*laya.webgl.WebGLContext.TRIANGLE_STRIP*/0x0005,this._firstActiveElement *2,drawVertexCount);\n\t\t\tStat.trianglesFaces+=drawVertexCount-2;\n\t\t\tStat.drawCall++;\n\t\t\tif (this._firstFreeElement > 0){\n\t\t\t\tdrawVertexCount=this._firstFreeElement *2;\n\t\t\t\tglContext.drawArrays(/*laya.webgl.WebGLContext.TRIANGLE_STRIP*/0x0005,0,drawVertexCount);\n\t\t\t\tStat.trianglesFaces+=drawVertexCount-2;\n\t\t\t\tStat.drawCall++;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*通过位置添加刀光。\n\t*@param position0 位置0。\n\t*@param position1 位置1。\n\t*/\n\t__proto.addVertexPosition=function(position0,position1){\n\t\tif (this._owner.activeInHierarchy){\n\t\t\tif (this._numPositionMode < 2){\n\t\t\t\tif (this._numPositionMode===0){\n\t\t\t\t\tposition0.cloneTo(this._posModeLastPosition0);\n\t\t\t\t\tposition1.cloneTo(this._posModeLastPosition1);\n\t\t\t\t\t}else {\n\t\t\t\t\tposition0.cloneTo(this._posModePosition0);\n\t\t\t\t\tposition1.cloneTo(this._posModePosition1);\n\t\t\t\t}\n\t\t\t\tthis._numPositionMode++;\n\t\t\t\t}else {\n\t\t\t\tvar v0=this._tempVector2;\n\t\t\t\tthis._calcVelocity(position0,this._posModeLastPosition0,v0);\n\t\t\t\tvar v1=this._tempVector3;\n\t\t\t\tthis._calcVelocity(position1,this._posModeLastPosition1,v1);\n\t\t\t\tthis.addVertexPositionVelocity(this._posModePosition0,v0,this._posModePosition1,v1);\n\t\t\t\tthis._posModePosition0.cloneTo(this._posModeLastPosition0);\n\t\t\t\tthis._posModePosition1.cloneTo(this._posModeLastPosition1);\n\t\t\t\tposition0.cloneTo(this._posModePosition0);\n\t\t\t\tposition1.cloneTo(this._posModePosition1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*通过位置和速度添加刀光。\n\t*@param position0 位置0。\n\t*@param velocity0 速度0。\n\t*@param position1 位置1。\n\t*@param velocity1 速度1。\n\t*/\n\t__proto.addVertexPositionVelocity=function(position0,velocity0,position1,velocity1){\n\t\tif (this._owner.activeInHierarchy){\n\t\t\tif (this._numPositionVelocityMode===0){\n\t\t\t\tthis._numPositionVelocityMode++;\n\t\t\t\t}else {\n\t\t\t\tvar d=this._tempVector0;\n\t\t\t\tVector3.subtract(position0,this._posVelModePosition0,d);\n\t\t\t\tvar distance0=Vector3.scalarLength(d);\n\t\t\t\tVector3.subtract(position1,this._posVelModePosition1,d);\n\t\t\t\tvar distance1=Vector3.scalarLength(d);\n\t\t\t\tvar slerpCount=0;\n\t\t\t\tvar minSegmentDistance=minSegmentDistance;\n\t\t\t\tif (distance0 < minSegmentDistance && distance1 < minSegmentDistance)\n\t\t\t\t\treturn;\n\t\t\t\tslerpCount=1+Math.floor(Math.max(distance0,distance1)/ this.minInterpDistance);\n\t\t\t\tif (slerpCount===1){\n\t\t\t\t\tthis._addGlitter(position0,position1,this._currentTime);\n\t\t\t\t\t}else {\n\t\t\t\t\tslerpCount=Math.min(slerpCount,this.maxSlerpCount);\n\t\t\t\t\tthis.scLeft.Init(this._posVelModePosition0,this._posVelModeVelocity0,position0,velocity0);\n\t\t\t\t\tthis.scRight.Init(this._posVelModePosition1,this._posVelModeVelocity1,position1,velocity1);\n\t\t\t\t\tvar segment=1.0 / slerpCount;\n\t\t\t\t\tvar addSegment=segment;\n\t\t\t\t\tvar timeOffset=this._currentTime-this._lastTime;\n\t\t\t\t\tfor (var i=1;i <=slerpCount;i++){\n\t\t\t\t\t\tvar pos0=this._tempVector0;\n\t\t\t\t\t\tthis.scLeft.Slerp(addSegment,pos0);\n\t\t\t\t\t\tvar pos1=this._tempVector1;\n\t\t\t\t\t\tthis.scRight.Slerp(addSegment,pos1);\n\t\t\t\t\t\tvar time=this._lastTime+timeOffset *i / slerpCount;\n\t\t\t\t\t\tthis._addGlitter(pos0,pos1,time);\n\t\t\t\t\t\taddSegment+=segment;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._lastTime=this._currentTime;\n\t\t\tposition0.cloneTo(this._posVelModePosition0);\n\t\t\tvelocity0.cloneTo(this._posVelModeVelocity0);\n\t\t\tposition1.cloneTo(this._posVelModePosition1);\n\t\t\tvelocity1.cloneTo(this._posVelModeVelocity1);\n\t\t}\n\t}\n\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\tthis._tempVector0=null;\n\t\tthis._tempVector1=null;\n\t\tthis._tempVector2=null;\n\t\tthis._tempVector3=null;\n\t\tthis._owner=null;\n\t\tthis._vertices=null;\n\t\tthis._vertexBuffer.destroy();\n\t\tthis._vertexBuffer=null;\n\t\tthis.scLeft=null;\n\t\tthis.scRight=null;\n\t\tthis._posModeLastPosition0=null;\n\t\tthis._posModeLastPosition1=null;\n\t\tthis._posModePosition0=null;\n\t\tthis._posModePosition1=null;\n\t\tthis._posVelModePosition0=null;\n\t\tthis._posVelModeVelocity0=null;\n\t\tthis._posVelModePosition1=null;\n\t\tthis._posVelModeVelocity1=null;\n\t\tthis._lastPatchAddPos0=null;\n\t\tthis._lastPatchAddPos1=null;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getVertexBuffers=function(){\n\t\treturn null;\n\t}\n\n\t/**设置最大分段数,注意:谨慎修改此属性，有性能损耗。*/\n\t/**获取最大分段数。*/\n\t__getset(0,__proto,'maxSegments',function(){\n\t\treturn this._maxSegments-1;\n\t\t},function(value){\n\t\tvar newMaxSegments=value+1;\n\t\tif (newMaxSegments!==this._maxSegments){\n\t\t\tthis._maxSegments=newMaxSegments;\n\t\t\tif (this._vertexBuffer){\n\t\t\t\tthis._vertexBuffer.destroy();\n\t\t\t}\n\t\t\tthis._initialize();\n\t\t}\n\t});\n\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn 1;\n\t});\n\n\t__getset(0,__proto,'triangleCount',function(){\n\t\tvar drawVertexCount=0;\n\t\tif (this._firstActiveElement < this._firstFreeElement){\n\t\t\tdrawVertexCount=(this._firstFreeElement-this._firstActiveElement)*2-2;\n\t\t\t}else {\n\t\t\tdrawVertexCount=(this.maxSegments-this._firstActiveElement)*2-2;\n\t\t\tdrawVertexCount+=this._firstFreeElement *2-2;\n\t\t}\n\t\treturn drawVertexCount;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingSphere',function(){\n\t\treturn Laya.superGet(GeometryFilter,this,'_originalBoundingSphere');\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingBox',function(){\n\t\treturn Laya.superGet(GeometryFilter,this,'_originalBoundingBox');\n\t});\n\n\treturn GlitterTemplet;\n})(GeometryFilter)\n\n\n/**\n*<code>TerrainFilter</code> 类用于创建TerrainFilter过滤器。\n*/\n//class laya.d3.terrain.TerrainFilter extends laya.d3.core.GeometryFilter\nvar TerrainFilter=(function(_super){\n\tfunction TerrainFilter(owner,chunkOffsetX,chunkOffsetZ,gridSize,terrainHeightData,heightDataWidth,heightDataHeight,cameraCoordinateInverse){\n\t\tthis._owner=null;\n\t\tthis._gridSize=NaN;\n\t\tthis.memorySize=0;\n\t\tthis._numberVertices=0;\n\t\tthis._maxNumberIndices=0;\n\t\tthis._currentNumberIndices=0;\n\t\tthis._numberTriangle=0;\n\t\tthis._vertexBuffer=null;\n\t\tthis._indexBuffer=null;\n\t\tthis._boundingSphere=null;\n\t\tthis._boundingBox=null;\n\t\tthis._indexArrayBuffer=null;\n\t\tthis._boundingBoxCorners=null;\n\t\tthis._leafs=null;\n\t\tthis._leafNum=0;\n\t\tthis._terrainHeightData=null;\n\t\tthis._terrainHeightDataWidth=0;\n\t\tthis._terrainHeightDataHeight=0;\n\t\tthis._chunkOffsetX=0;\n\t\tthis._chunkOffsetZ=0;\n\t\tthis._cameraCoordinateInverse=false;\n\t\tthis._cameraPos=null;\n\t\tthis._currentLOD=0;\n\t\t//LOD级别 4个叶子节点 第1个叶子的level<<24+第2个叶子的level<<16+第3个叶子的level<<8+第4个叶子的level\n\t\tthis._perspectiveFactor=NaN;\n\t\tthis._LODTolerance=0;\n\t\tTerrainFilter.__super.call(this);\n\t\tthis._owner=owner;\n\t\tthis._cameraPos=new Vector3();\n\t\tthis._chunkOffsetX=chunkOffsetX;\n\t\tthis._chunkOffsetZ=chunkOffsetZ;\n\t\tthis._gridSize=gridSize;\n\t\tthis._terrainHeightData=terrainHeightData;\n\t\tthis._terrainHeightDataWidth=heightDataWidth;\n\t\tthis._terrainHeightDataHeight=heightDataHeight;\n\t\tthis._leafNum=(TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM)*(TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM);\n\t\tthis._leafs=__newvec(this._leafNum);\n\t\tthis._cameraCoordinateInverse=cameraCoordinateInverse;\n\t\tfor (var i=0;i < this._leafNum;i++){\n\t\t\tthis._leafs[i]=new TerrainLeaf();\n\t\t}\n\t\tthis.recreateResource();\n\t}\n\n\t__class(TerrainFilter,'laya.d3.terrain.TerrainFilter',_super);\n\tvar __proto=TerrainFilter.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true})\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\tthis._owner=null;\n\t\tif (this._vertexBuffer)this._vertexBuffer.destroy();\n\t\tif (this._indexBuffer)this._indexBuffer.destroy();\n\t}\n\n\t__proto.recreateResource=function(){\n\t\tthis._currentNumberIndices=0;\n\t\tthis._numberTriangle=0;\n\t\tvar nLeafVertexCount=TerrainLeaf.LEAF_VERTEXT_COUNT;\n\t\tvar nLeafIndexCount=TerrainLeaf.LEAF_MAX_INDEX_COUNT;\n\t\tthis._numberVertices=nLeafVertexCount *this._leafNum;\n\t\tthis._maxNumberIndices=nLeafIndexCount *this._leafNum;\n\t\tthis._indexArrayBuffer=new Uint16Array(this._maxNumberIndices);\n\t\tvar vertexDeclaration=VertexPositionTerrain.vertexDeclaration;\n\t\tvar vertexFloatStride=vertexDeclaration.vertexStride / 4;\n\t\tvar vertices=new Float32Array(this._numberVertices *vertexFloatStride);\n\t\tvar nNum=TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM;\n\t\tvar i=0,x=0,z=0;\n\t\tfor (i=0;i < this._leafNum;i++){\n\t\t\tx=i % nNum;\n\t\t\tz=Math.floor(i / nNum);\n\t\t\tthis._leafs[i].calcVertextBuffer(this._chunkOffsetX,this._chunkOffsetZ,x *TerrainLeaf.LEAF_GRID_NUM,z *TerrainLeaf.LEAF_GRID_NUM,this._gridSize,vertices,i *TerrainLeaf.LEAF_PLANE_VERTEXT_COUNT,vertexFloatStride,this._terrainHeightData,this._terrainHeightDataWidth,this._terrainHeightDataHeight,this._cameraCoordinateInverse);\n\t\t}\n\t\tfor (i=0;i < this._leafNum;i++){\n\t\t\tx=i % nNum;\n\t\t\tz=Math.floor(i / nNum);\n\t\t\tthis._leafs[i].calcSkirtVertextBuffer(this._chunkOffsetX,this._chunkOffsetZ,x *TerrainLeaf.LEAF_GRID_NUM,z *TerrainLeaf.LEAF_GRID_NUM,this._gridSize,vertices,this._leafNum *TerrainLeaf.LEAF_PLANE_VERTEXT_COUNT+i *TerrainLeaf.LEAF_SKIRT_VERTEXT_COUNT,vertexFloatStride,this._terrainHeightData,this._terrainHeightDataWidth,this._terrainHeightDataHeight);\n\t\t}\n\t\tthis.assembleIndexInit();\n\t\tthis._vertexBuffer=new VertexBuffer3D(vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,false);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._maxNumberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,false);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(this._indexArrayBuffer);\n\t\tthis.memorySize=(this._vertexBuffer._byteLength+this._indexBuffer._byteLength)*2;\n\t\tthis.calcOriginalBoudingBoxAndSphere();\n\t}\n\n\t__proto.setLODLevel=function(leafsLODLevel){\n\t\tif (leafsLODLevel.length !=4)return true;\n\t\tvar nLOD=((leafsLODLevel[0]+1)<< 24)+((leafsLODLevel[1]+1)<< 16)+((leafsLODLevel[2]+1)<< 8)+(leafsLODLevel[3]+1);\n\t\tif (this._currentLOD==nLOD){\n\t\t\treturn false;\n\t\t}\n\t\tthis._currentLOD=nLOD;\n\t\treturn true;\n\t}\n\n\t__proto.assembleIndexInit=function(){\n\t\tthis._currentNumberIndices=0;\n\t\tthis._numberTriangle=0;\n\t\tvar nOffsetIndex=0;\n\t\tfor (var i=0;i < this._leafNum;i++){\n\t\t\tvar planeLODIndex=TerrainLeaf.getPlaneLODIndex(i,0);\n\t\t\tthis._indexArrayBuffer.set(planeLODIndex,nOffsetIndex);\n\t\t\tnOffsetIndex+=planeLODIndex.length;\n\t\t\tvar skirtLODIndex=TerrainLeaf.getSkirtLODIndex(i,0);\n\t\t\tthis._indexArrayBuffer.set(skirtLODIndex,nOffsetIndex);\n\t\t\tnOffsetIndex+=skirtLODIndex.length;\n\t\t\tthis._currentNumberIndices+=(planeLODIndex.length+skirtLODIndex.length);\n\t\t}\n\t\tthis._numberTriangle=this._currentNumberIndices / 3;\n\t}\n\n\t__proto.isNeedAssemble=function(camera,cameraPostion){\n\t\tvar perspectiveFactor=Math.min(camera.viewport.width,camera.viewport.height)/ (2 *Math.tan(Math.PI *camera.fieldOfView / 180.0));\n\t\tif (this._perspectiveFactor !=perspectiveFactor){\n\t\t\tthis._perspectiveFactor=perspectiveFactor;\n\t\t\treturn 1;\n\t\t}\n\t\tif (this._LODTolerance !=Terrain.LOD_TOLERANCE_VALUE){\n\t\t\tthis._LODTolerance=Terrain.LOD_TOLERANCE_VALUE;\n\t\t\treturn 1;\n\t\t}\n\t\tif (Vector3.equals(cameraPostion,this._cameraPos)==false){\n\t\t\tthis._cameraPos.x=cameraPostion.x;\n\t\t\tthis._cameraPos.y=cameraPostion.y;\n\t\t\tthis._cameraPos.z=cameraPostion.z;\n\t\t\treturn 2;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto.assembleIndex=function(camera,cameraPostion){\n\t\tvar nNeedType=this.isNeedAssemble(camera,cameraPostion);\n\t\tif (nNeedType > 0){\n\t\t\tfor (var i=0;i < this._leafNum;i++){\n\t\t\t\tTerrainFilter._TEMP_ARRAY_BUFFER[i]=this._leafs[i].determineLod(cameraPostion,this._perspectiveFactor,Terrain.LOD_TOLERANCE_VALUE,nNeedType==1);\n\t\t\t}\n\t\t\tif (this.setLODLevel(TerrainFilter._TEMP_ARRAY_BUFFER)){\n\t\t\t\tthis._currentNumberIndices=0;\n\t\t\t\tthis._numberTriangle=0;\n\t\t\t\tvar nOffsetIndex=0;\n\t\t\t\tfor (i=0;i < this._leafNum;i++){\n\t\t\t\t\tvar nLODLevel=TerrainFilter._TEMP_ARRAY_BUFFER[i];\n\t\t\t\t\tvar planeLODIndex=TerrainLeaf.getPlaneLODIndex(i,nLODLevel);\n\t\t\t\t\tthis._indexArrayBuffer.set(planeLODIndex,nOffsetIndex);\n\t\t\t\t\tnOffsetIndex+=planeLODIndex.length;\n\t\t\t\t\tvar skirtLODIndex=TerrainLeaf.getSkirtLODIndex(i,nLODLevel);\n\t\t\t\t\tthis._indexArrayBuffer.set(skirtLODIndex,nOffsetIndex);\n\t\t\t\t\tnOffsetIndex+=skirtLODIndex.length;\n\t\t\t\t\tthis._currentNumberIndices+=(planeLODIndex.length+skirtLODIndex.length);\n\t\t\t\t}\n\t\t\t\tthis._numberTriangle=this._currentNumberIndices / 3;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t__proto.calcOriginalBoudingBoxAndSphere=function(){\n\t\tvar sizeOfY=new Vector2(2147483647,-2147483647);\n\t\tfor (var i=0;i < this._leafNum;i++){\n\t\t\tsizeOfY.x=this._leafs[i]._sizeOfY.x < sizeOfY.x ? this._leafs[i]._sizeOfY.x :sizeOfY.x;\n\t\t\tsizeOfY.y=this._leafs[i]._sizeOfY.y > sizeOfY.y ? this._leafs[i]._sizeOfY.y :sizeOfY.y;\n\t\t};\n\t\tvar min=new Vector3(this._chunkOffsetX *TerrainLeaf.CHUNK_GRID_NUM *this._gridSize,sizeOfY.x,this._chunkOffsetZ *TerrainLeaf.CHUNK_GRID_NUM *this._gridSize);\n\t\tvar max=new Vector3((this._chunkOffsetX+1)*TerrainLeaf.CHUNK_GRID_NUM *this._gridSize,sizeOfY.y,(this._chunkOffsetZ+1)*TerrainLeaf.CHUNK_GRID_NUM *this._gridSize);\n\t\tif (TerrainLeaf.__ADAPT_MATRIX__){\n\t\t\tVector3.transformV3ToV3(min,TerrainLeaf.__ADAPT_MATRIX__,min);\n\t\t\tVector3.transformV3ToV3(max,TerrainLeaf.__ADAPT_MATRIX__,max);\n\t\t}\n\t\tthis._boundingBox=new BoundBox(min,max);\n\t\tvar size=new Vector3();\n\t\tVector3.subtract(max,min,size);\n\t\tVector3.scale(size,0.5,size);\n\t\tvar center=new Vector3();\n\t\tVector3.add(min,size,center);\n\t\tthis._boundingSphere=new BoundSphere(center,Vector3.scalarLength(size));\n\t\tthis._boundingBoxCorners=__newvec(8,null);\n\t\tthis._boundingBox.getCorners(this._boundingBoxCorners);\n\t}\n\n\t__proto.calcLeafBoudingBox=function(worldMatrix){\n\t\tfor (var i=0;i < this._leafNum;i++){\n\t\t\tthis._leafs[i].calcLeafBoudingBox(worldMatrix);\n\t\t}\n\t}\n\n\t__proto.calcLeafBoudingSphere=function(worldMatrix,maxScale){\n\t\tfor (var i=0;i < this._leafNum;i++){\n\t\t\tthis._leafs[i].calcLeafBoudingSphere(worldMatrix,maxScale);\n\t\t}\n\t}\n\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index==0){\n\t\t\treturn this._vertexBuffer;\n\t\t}\n\t\treturn null;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn this._indexBuffer;\n\t}\n\n\t__proto._beforeRender=function(state){\n\t\tthis._vertexBuffer._bind();\n\t\tthis._indexBuffer._bind();\n\t\tvar terrainMaterial=state.renderElement._material;\n\t\tif (terrainMaterial.blend==/*laya.d3.core.material.BaseMaterial.BLEND_DISABLE*/0){\n\t\t\tvar camera=state.camera;\n\t\t\tif (this.assembleIndex(camera,camera.position)){\n\t\t\t\tthis._indexBuffer.setData(this._indexArrayBuffer);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getVertexBuffers=function(){\n\t\treturn null;\n\t}\n\n\t__proto._render=function(state){\n\t\tWebGL.mainContext.drawElements(Terrain.RENDER_LINE_MODEL ? /*laya.webgl.WebGLContext.LINES*/0x0001 :/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._currentNumberIndices,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\tStat.trianglesFaces+=this._numberTriangle;\n\t\tStat.drawCall++;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingSphere',function(){\n\t\treturn this._boundingSphere;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'_originalBoundingBox',function(){\n\t\treturn this._boundingBox;\n\t});\n\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn this._numberVertices;\n\t});\n\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn this._numberTriangle;\n\t});\n\n\t__static(TerrainFilter,\n\t['_TEMP_ARRAY_BUFFER',function(){return this._TEMP_ARRAY_BUFFER=new Uint32Array(TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM *TerrainLeaf.CHUNK_GRID_NUM / TerrainLeaf.LEAF_GRID_NUM);}\n\t]);\n\treturn TerrainFilter;\n})(GeometryFilter)\n\n\n/**\n*<code>MeshRender</code> 类用于网格渲染器。\n*/\n//class laya.d3.terrain.TerrainRender extends laya.d3.core.render.BaseRender\nvar TerrainRender=(function(_super){\n\tfunction TerrainRender(owner){\n\t\t/**@private */\n\t\tthis._terrainSprite3DOwner=null;\n\t\tTerrainRender.__super.call(this,owner);\n\t\tthis._terrainSprite3DOwner=owner;\n\t}\n\n\t__class(TerrainRender,'laya.d3.terrain.TerrainRender',_super);\n\tvar __proto=TerrainRender.prototype;\n\t__proto._calculateBoundingSphere=function(){\n\t\tvar terrainFilter=this._terrainSprite3DOwner.terrainFilter;\n\t\tif (terrainFilter==null){\n\t\t\tthis._boundingSphere.toDefault();\n\t\t\t}else {\n\t\t\tvar meshBoundingSphere=terrainFilter._originalBoundingSphere;\n\t\t\tvar maxScale=NaN;\n\t\t\tvar transform=this._terrainSprite3DOwner.transform;\n\t\t\tvar scale=transform.scale;\n\t\t\tif (scale.x >=scale.y && scale.x >=scale.z)\n\t\t\t\tmaxScale=scale.x;\n\t\t\telse\n\t\t\tmaxScale=scale.y >=scale.z ? scale.y :scale.z;\n\t\t\tVector3.transformCoordinate(meshBoundingSphere.center,transform.worldMatrix,this._boundingSphere.center);\n\t\t\tthis._boundingSphere.radius=meshBoundingSphere.radius *maxScale;\n\t\t\tterrainFilter.calcLeafBoudingSphere(transform.worldMatrix,maxScale);\n\t\t}\n\t}\n\n\t__proto._calculateBoundingBox=function(){\n\t\tvar terrainFilter=this._terrainSprite3DOwner.terrainFilter;\n\t\tif (terrainFilter==null){\n\t\t\tthis._boundingBox.toDefault();\n\t\t\t}else {\n\t\t\tvar worldMat=this._terrainSprite3DOwner.transform.worldMatrix;\n\t\t\tvar corners=terrainFilter._boundingBoxCorners;\n\t\t\tfor (var i=0;i < 8;i++)\n\t\t\tVector3.transformCoordinate(corners[i],worldMat,BaseRender._tempBoundBoxCorners[i]);\n\t\t\tBoundBox.createfromPoints(BaseRender._tempBoundBoxCorners,this._boundingBox);\n\t\t\tterrainFilter.calcLeafBoudingBox(worldMat);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderUpdate=function(projectionView){\n\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,this._owner.transform.worldMatrix);\n\t\tvar projViewWorld=this._owner.getProjectionViewWorldMatrix(projectionView);\n\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projViewWorld);\n\t\treturn true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t\tthis._terrainSprite3DOwner=null;\n\t}\n\n\treturn TerrainRender;\n})(BaseRender)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.water.WaterRender extends laya.d3.core.render.BaseRender\nvar WaterRender=(function(_super){\n\tfunction WaterRender(owner){\n\t\tWaterRender.__super.call(this,owner);\n\t}\n\n\t__class(WaterRender,'laya.d3.water.WaterRender',_super);\n\tvar __proto=WaterRender.prototype;\n\t__proto._calculateBoundingSphere=function(){}\n\t__proto._calculateBoundingBox=function(){}\n\t__proto._destroy=function(){\n\t\t_super.prototype._destroy.call(this);\n\t}\n\n\treturn WaterRender;\n})(BaseRender)\n\n\n/**\n*<code>BaseScene</code> 类用于实现场景。\n*/\n//class laya.d3.core.scene.Scene extends laya.display.Sprite\nvar Scene=(function(_super){\n\tfunction Scene(){\n\t\tthis._time=0;\n\t\t/**@private */\n\t\t//this.__loaded=false;\n\t\t/**@private */\n\t\t//this._url=null;\n\t\t/**@private */\n\t\t//this._group=null;\n\t\t/**@private */\n\t\t//this._lightmaps=null;\n\t\t/**@private */\n\t\tthis._enableLightCount=3;\n\t\t/**@private */\n\t\t//this._renderTargetTexture=null;\n\t\t/**@private */\n\t\tthis._customRenderQueneIndex=11;\n\t\t/**@private */\n\t\t//this._lastCurrentTime=NaN;\n\t\t/**@private */\n\t\t//this._enableFog=false;\n\t\t/**@private */\n\t\t//this._enableDepthFog=false;\n\t\t/**@private */\n\t\t//this._fogStart=NaN;\n\t\t/**@private */\n\t\t//this._fogRange=NaN;\n\t\t/**@private */\n\t\t//this._fogColor=null;\n\t\t/**@private */\n\t\t//this._ambientColor=null;\n\t\t/**@private */\n\t\t//this._shaderValues=null;\n\t\t/**@private */\n\t\t//this._shaderDefineValue=0;\n\t\t/**@private */\n\t\t//this._cullingRendersLength=0;\n\t\t/**@private */\n\t\t//this._cullingRenders=null;\n\t\t/**@private */\n\t\t//this._dynamicBatchManager=null;\n\t\t/**是否启用灯光。*/\n\t\tthis.enableLight=true;\n\t\t/**四/八叉树的根节点。*/\n\t\t//this.treeRoot=null;\n\t\t/**四/八叉树的尺寸。*/\n\t\t//this.treeSize=null;\n\t\t/**四/八叉树的层数。*/\n\t\t//this.treeLevel=0;\n\t\t//阴影相关变量\n\t\t//this.parallelSplitShadowMaps=null;\n\t\t/**@private */\n\t\t//this._componentsMap=null;\n\t\t/**@private */\n\t\t//this._typeComponentsIndices=null;\n\t\t/**@private */\n\t\t//this._components=null;\n\t\tScene.__super.call(this);\n\t\tthis._renderState=new RenderState();\n\t\tthis._lights=[];\n\t\tthis._quenes=[];\n\t\tthis._cameraPool=[];\n\t\tthis._renderableSprite3Ds=[];\n\t\tthis.__loaded=true;\n\t\tthis._lightmaps=[];\n\t\tthis._shaderValues=new ValusArray();\n\t\tthis.parallelSplitShadowMaps=[];\n\t\tthis._dynamicBatchManager=new DynamicBatchManager();\n\t\tthis._cullingRenders=[];\n\t\tthis._cullingRendersLength=0;\n\t\tthis.enableFog=false;\n\t\tthis.fogStart=300;\n\t\tthis.fogRange=1000;\n\t\tthis.fogColor=new Vector3(0.7,0.7,0.7);\n\t\tthis.ambientColor=new Vector3(0.212,0.227,0.259);\n\t\t(WebGL.shaderHighPrecision)&& (this.addShaderDefine(ShaderCompile3D.SHADERDEFINE_HIGHPRECISION));\n\t\tthis.on(/*laya.events.Event.DISPLAY*/\"display\",this,this._display);\n\t\tthis.on(/*laya.events.Event.UNDISPLAY*/\"undisplay\",this,this._unDisplay);\n\t\tthis._componentsMap=[];\n\t\tthis._typeComponentsIndices=[];\n\t\tthis._components=[];\n\t}\n\n\t__class(Scene,'laya.d3.core.scene.Scene',_super);\n\tvar __proto=Scene.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.submit.ISubmit\":true,\"laya.resource.ICreateResource\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._setUrl=function(url){\n\t\tthis._url=url;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getGroup=function(){\n\t\treturn this._group;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setGroup=function(value){\n\t\tthis._group=value;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._display=function(){\n\t\tLaya.stage._scenes.push(this);\n\t\tLaya.stage._scenes.sort(Scene._sortScenes);\n\t\tfor (var i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar spr=this._childs[i];\n\t\t\t(spr.active)&& (spr._activeHierarchy());\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._unDisplay=function(){\n\t\tvar scenes=Laya.stage._scenes;\n\t\tscenes.splice(scenes.indexOf(this),1);\n\t\tfor (var i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar spr=this._childs[i];\n\t\t\t(spr.active)&& (spr._inActiveHierarchy());\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addChild3D=function(sprite3D){\n\t\tsprite3D.transform._onWorldTransform();\n\t\tsprite3D._setBelongScene(this);\n\t\t(this.displayedInStage && sprite3D.active)&& (sprite3D._activeHierarchy());\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeChild3D=function(sprite3D){\n\t\tsprite3D.transform.parent=null;\n\t\t(this.displayedInStage && sprite3D.active)&& (sprite3D._inActiveHierarchy());\n\t\tsprite3D._setUnBelongScene();\n\t}\n\n\t/**\n\t*初始化八叉树。\n\t*@param width 八叉树宽度。\n\t*@param height 八叉树高度。\n\t*@param depth 八叉树深度。\n\t*@param center 八叉树中心点\n\t*@param level 八叉树层级。\n\t*/\n\t__proto.initOctree=function(width,height,depth,center,level){\n\t\t(level===void 0)&& (level=6);\n\t\tthis.treeSize=new Vector3(width,height,depth);\n\t\tthis.treeLevel=level;\n\t\tthis.treeRoot=new OctreeNode(this,0);\n\t\tthis.treeRoot.init(center,this.treeSize);\n\t}\n\n\t/**\n\t*@private\n\t*场景相关渲染准备设置。\n\t*@param gl WebGL上下文。\n\t*@return state 渲染状态。\n\t*/\n\t__proto._prepareUpdateToRenderState=function(gl,state){\n\t\tstate.elapsedTime=this._lastCurrentTime ? this.timer.currTimer-this._lastCurrentTime :0;\n\t\tthis._lastCurrentTime=this.timer.currTimer;\n\t\tstate.scene=this;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._prepareSceneToRender=function(state){\n\t\tvar lightCount=this._lights.length;\n\t\tif (lightCount > 0){\n\t\t\tvar renderLightCount=0;\n\t\t\tfor (var i=0;i < lightCount;i++){\n\t\t\t\tif (!this._lights[i]._prepareToScene(state))\n\t\t\t\t\tcontinue ;\n\t\t\t\trenderLightCount++;\n\t\t\t\tif (renderLightCount >=this._enableLightCount)\n\t\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateChilds=function(state){\n\t\tfor (var i=0,n=this._childs.length;i < n;++i)\n\t\tthis._childs[i]._update(state);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._preRenderScene=function(gl,state,boundFrustum){\n\t\tvar view=state._viewMatrix;\n\t\tvar projection=state._projectionMatrix;\n\t\tvar projectionView=state._projectionViewMatrix;\n\t\tvar i=0,iNum=0;\n\t\tvar camera=state.camera;\n\t\tif (camera.useOcclusionCulling){\n\t\t\tif (this.treeRoot)\n\t\t\t\tFrustumCulling.renderObjectCullingOctree(boundFrustum,this,camera,view,projection,projectionView);\n\t\t\telse\n\t\t\tFrustumCulling.renderObjectCulling(boundFrustum,this,camera,view,projection,projectionView);\n\t\t\t}else {\n\t\t\tFrustumCulling.renderObjectCullingNoBoundFrustum(this,camera,view,projection,projectionView);\n\t\t}\n\t\tfor (i=0,iNum=this._quenes.length;i < iNum;i++)\n\t\t(this._quenes[i])&& (this._quenes[i]._preRender(state));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._clear=function(gl,state){\n\t\tvar viewport=state._viewport;\n\t\tvar camera=state.camera;\n\t\tvar vpX=viewport.x;\n\t\tvar vpY=camera.renderTargetSize.height-viewport.y-viewport.height;\n\t\tvar vpWidth=viewport.width;\n\t\tvar vpHeight=viewport.height;\n\t\tgl.viewport(vpX,vpY,vpWidth,vpHeight);\n\t\tvar flag=/*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100;\n\t\tvar renderTarget=camera.renderTarget;\n\t\tswitch (camera.clearFlag){\n\t\t\tcase /*laya.d3.core.BaseCamera.CLEARFLAG_SOLIDCOLOR*/0:;\n\t\t\t\tvar clearColor=camera.clearColor;\n\t\t\t\tif (clearColor){\n\t\t\t\t\tgl.enable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t\t\t\tgl.scissor(vpX,vpY,vpWidth,vpHeight);\n\t\t\t\t\tvar clearColorE=clearColor.elements;\n\t\t\t\t\tgl.clearColor(clearColorE[0],clearColorE[1],clearColorE[2],clearColorE[3]);\n\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.COLOR_BUFFER_BIT*/0x00004000;\n\t\t\t\t}\n\t\t\t\tif (renderTarget){\n\t\t\t\t\t(clearColor)|| (flag=/*laya.webgl.WebGLContext.COLOR_BUFFER_BIT*/0x00004000);\n\t\t\t\tswitch (renderTarget.depthStencilFormat){\n\t\t\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5:\n\t\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase /*laya.webgl.WebGLContext.STENCIL_INDEX8*/0x8D48:\n\t\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9:\n\t\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100;\n\t\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tgl.clear(flag);\n\t\t\tif (clearColor)\n\t\t\t\tgl.disable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t\tbreak ;\n\t\t\tcase /*laya.d3.core.BaseCamera.CLEARFLAG_SKY*/1:\n\t\t\tcase /*laya.d3.core.BaseCamera.CLEARFLAG_DEPTHONLY*/2:\n\t\t\tif (renderTarget){\n\t\t\t\tflag=/*laya.webgl.WebGLContext.COLOR_BUFFER_BIT*/0x00004000;\n\t\t\t\tswitch (renderTarget.depthStencilFormat){\n\t\t\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5:\n\t\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase /*laya.webgl.WebGLContext.STENCIL_INDEX8*/0x8D48:\n\t\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9:\n\t\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100;\n\t\t\t\t\t\tflag |=/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tgl.clear(flag);\n\t\t\tbreak ;\n\t\t\tcase /*laya.d3.core.BaseCamera.CLEARFLAG_NONE*/3:\n\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\tthrow new Error(\"BaseScene:camera clearFlag invalid.\");\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderScene=function(gl,state){\n\t\tvar camera=state.camera;\n\t\tvar i=0,n=0;\n\t\tvar queue;\n\t\tfor (i=0;i < 2;i++){\n\t\t\tqueue=this._quenes[i];\n\t\t\tif (queue){\n\t\t\t\tcamera.renderTarget ? queue._render(state,true):queue._render(state,false);\n\t\t\t}\n\t\t}\n\t\tif (camera.clearFlag===/*laya.d3.core.BaseCamera.CLEARFLAG_SKY*/1){\n\t\t\tvar sky=camera.sky;\n\t\t\tif (sky){\n\t\t\t\tWebGLContext.setCullFace(gl,false);\n\t\t\t\tWebGLContext.setDepthFunc(gl,/*laya.webgl.WebGLContext.LEQUAL*/0x0203);\n\t\t\t\tWebGLContext.setDepthMask(gl,false);\n\t\t\t\tsky._render(state);\n\t\t\t\tWebGLContext.setDepthFunc(gl,/*laya.webgl.WebGLContext.LESS*/0x0201);\n\t\t\t\tWebGLContext.setDepthMask(gl,true);\n\t\t\t}\n\t\t}\n\t\tfor (i=2,n=this._quenes.length;i < n;i++){\n\t\t\tqueue=this._quenes[i];\n\t\t\tif (queue){\n\t\t\t\tqueue._sortAlpha(state.camera.transform.position);\n\t\t\t\tcamera.renderTarget ? queue._render(state,true):queue._render(state,false);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._set3DRenderConfig=function(gl){\n\t\tgl.disable(/*laya.webgl.WebGLContext.BLEND*/0x0BE2);\n\t\tWebGLContext._blend=false;\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.SRC_ALPHA*/0x0302,/*laya.webgl.WebGLContext.ONE_MINUS_SRC_ALPHA*/0x0303);\n\t\tWebGLContext._sFactor=/*laya.webgl.WebGLContext.SRC_ALPHA*/0x0302;\n\t\tWebGLContext._dFactor=/*laya.webgl.WebGLContext.ONE_MINUS_SRC_ALPHA*/0x0303;\n\t\tgl.disable(/*laya.webgl.WebGLContext.DEPTH_TEST*/0x0B71);\n\t\tWebGLContext._depthTest=false;\n\t\tgl.enable(/*laya.webgl.WebGLContext.CULL_FACE*/0x0B44);\n\t\tWebGLContext._cullFace=true;\n\t\tgl.depthMask(1);\n\t\tWebGLContext._depthMask=true;\n\t\tgl.frontFace(/*laya.webgl.WebGLContext.CW*/0x0900);\n\t\tWebGLContext._frontFace=/*laya.webgl.WebGLContext.CW*/0x0900;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._set2DRenderConfig=function(gl){\n\t\tWebGLContext.setBlend(gl,true);\n\t\tWebGLContext.setBlendFunc(gl,/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE_MINUS_SRC_ALPHA*/0x0303);\n\t\tWebGLContext.setDepthTest(gl,false);\n\t\tWebGLContext.setCullFace(gl,false);\n\t\tWebGLContext.setDepthMask(gl,true);\n\t\tWebGLContext.setFrontFace(gl,/*laya.webgl.WebGLContext.CCW*/0x0901);\n\t\tgl.viewport(0,0,RenderState2D.width,RenderState2D.height);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,nodeData){\n\t\tvar lightMapsData=nodeData.customProps.lightmaps;\n\t\tvar lightMapCount=lightMapsData.length;\n\t\tvar lightmaps=this._lightmaps;\n\t\tlightmaps.length=lightMapCount;\n\t\tfor (var i=0;i < lightMapCount;i++)\n\t\tlightmaps[i]=Loader.getRes(innerResouMap[lightMapsData[i].replace(\".exr\",\".png\")]);\n\t\tthis.setlightmaps(lightmaps);\n\t\tvar ambientColorData=nodeData.customProps.ambientColor;\n\t\t(ambientColorData)&& (this.ambientColor=new Vector3(ambientColorData[0],ambientColorData[1],ambientColorData[2]));\n\t\tvar fogColorData=nodeData.customProps.fogColor;\n\t\t(fogColorData)&& (this.fogColor=new Vector3(fogColorData[0],fogColorData[1],fogColorData[2]));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addLight=function(light){\n\t\tif (this._lights.indexOf(light)< 0)this._lights.push(light);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeLight=function(light){\n\t\tvar index=this._lights.indexOf(light);\n\t\tindex >=0 && (this._lights.splice(index,1));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateScene=function(){\n\t\tvar renderState=this._renderState;\n\t\tthis._prepareUpdateToRenderState(WebGL.mainContext,renderState);\n\t\tthis._updateComponents(renderState);\n\t\tthis._updateChilds(renderState);\n\t\tthis._lateUpdateComponents(renderState);\n\t\tthis._time+=renderState.elapsedTime / 1000;\n\t\tthis._shaderValues.setValue(/*CLASS CONST:laya.d3.core.scene.Scene.TIME*/22,this._time);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateSceneConch=function(){\n\t\tvar renderState=this._renderState;\n\t\tthis._prepareUpdateToRenderState(WebGL.mainContext,renderState);\n\t\tthis._updateComponents(renderState);\n\t\tthis._lateUpdateComponents(renderState);\n\t\tthis._prepareSceneToRender(renderState);\n\t\tfor (var i=0,n=this._cameraPool.length;i < n;i++){\n\t\t\tvar camera=this._cameraPool[i];\n\t\t\trenderState.camera=camera;\n\t\t\tcamera._prepareCameraToRender();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._preRenderShadow=function(state,lightFrustum,shdowQueues,lightViewProjectMatrix,nPSSMNum){\n\t\tif (this.treeRoot){\n\t\t\tFrustumCulling.renderShadowObjectCullingOctree(this,lightFrustum,shdowQueues,lightViewProjectMatrix,nPSSMNum);\n\t\t\t}else {\n\t\t\tFrustumCulling.renderShadowObjectCulling(this,lightFrustum,shdowQueues,lightViewProjectMatrix,nPSSMNum);\n\t\t}\n\t\tfor (var i=0,iNum=shdowQueues.length;i < iNum;i++)\n\t\t(shdowQueues[i])&& (shdowQueues[i]._preRender(state));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderShadowMap=function(gl,state,sceneCamera){\n\t\tvar parallelSplitShadowMap=this.parallelSplitShadowMaps[0];\n\t\tparallelSplitShadowMap._calcAllLightCameraInfo(sceneCamera);\n\t\tvar pssmNum=parallelSplitShadowMap.PSSMNum;\n\t\tthis._preRenderShadow(state,parallelSplitShadowMap._lightCulling,parallelSplitShadowMap._shadowQuenes,parallelSplitShadowMap._lightVPMatrix[0],pssmNum);\n\t\tthis.addShaderDefine(ParallelSplitShadowMap.SHADERDEFINE_CAST_SHADOW);\n\t\tvar renderTarget,shadowQuene,lightCamera;\n\t\tif (pssmNum > 1){\n\t\t\tfor (var i=0;i < pssmNum;i++){\n\t\t\t\trenderTarget=parallelSplitShadowMap.getRenderTarget(i+1);\n\t\t\t\tparallelSplitShadowMap.beginRenderTarget(i+1);\n\t\t\t\tgl.clearColor(1,1,1,1);\n\t\t\t\tgl.clear(/*laya.webgl.WebGLContext.COLOR_BUFFER_BIT*/0x00004000 | /*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100);\n\t\t\t\tgl.viewport(0,0,renderTarget.width,renderTarget.height);\n\t\t\t\tstate.camera=lightCamera=parallelSplitShadowMap.getLightCamera(i);\n\t\t\t\tlightCamera._prepareCameraToRender();\n\t\t\t\tlightCamera._prepareCameraViewProject(lightCamera.viewMatrix,lightCamera.projectionMatrix);\n\t\t\t\tstate._projectionViewMatrix=parallelSplitShadowMap._lightVPMatrix[i+1];\n\t\t\t\tshadowQuene=parallelSplitShadowMap._shadowQuenes[i];\n\t\t\t\tshadowQuene._preRender(state);\n\t\t\t\tshadowQuene._renderShadow(state,false);\n\t\t\t\tparallelSplitShadowMap.endRenderTarget(i+1);\n\t\t\t}\n\t\t\t}else {\n\t\t\trenderTarget=parallelSplitShadowMap.getRenderTarget(1);\n\t\t\tparallelSplitShadowMap.beginRenderTarget(1);\n\t\t\tgl.clearColor(1,1,1,1);\n\t\t\tgl.clear(/*laya.webgl.WebGLContext.COLOR_BUFFER_BIT*/0x00004000 | /*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100);\n\t\t\tgl.viewport(0,0,renderTarget.width,renderTarget.height);\n\t\t\tstate.camera=lightCamera=parallelSplitShadowMap.getLightCamera(0);\n\t\t\tlightCamera._prepareCameraToRender();\n\t\t\tlightCamera._prepareCameraViewProject(lightCamera.viewMatrix,lightCamera.projectionMatrix);\n\t\t\tstate._projectionViewMatrix=parallelSplitShadowMap._lightVPMatrix[0];\n\t\t\tshadowQuene=parallelSplitShadowMap._shadowQuenes[0];\n\t\t\tshadowQuene._preRender(state);\n\t\t\tshadowQuene._renderShadow(state,true);\n\t\t\tparallelSplitShadowMap.endRenderTarget(1);\n\t\t}\n\t\tthis.removeShaderDefine(ParallelSplitShadowMap.SHADERDEFINE_CAST_SHADOW);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.addTreeNode=function(renderObj){\n\t\tthis.treeRoot.addTreeNode(renderObj);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.removeTreeNode=function(renderObj){\n\t\tif (!this.treeSize)return;\n\t\tif (renderObj._treeNode){\n\t\t\trenderObj._treeNode.removeObject(renderObj);\n\t\t}\n\t}\n\n\t/**\n\t*设置光照贴图。\n\t*@param value 光照贴图。\n\t*/\n\t__proto.setlightmaps=function(value){\n\t\tthis._lightmaps=value;\n\t\tfor (var i=0,n=this._renderableSprite3Ds.length;i < n;i++)\n\t\tthis._renderableSprite3Ds[i]._render._applyLightMapParams();\n\t}\n\n\t/**\n\t*获取光照贴图。\n\t*@return 获取光照贴图。\n\t*/\n\t__proto.getlightmaps=function(){\n\t\treturn this._lightmaps;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.addChildAt=function(node,index){\n\t\tif (!((node instanceof laya.d3.core.Sprite3D )))\n\t\t\tthrow new Error(\"Sprite3D:Node type must Sprite3D.\");\n\t\tif (!node || this.destroyed || node===this)return node;\n\t\tif ((node).zOrder)this._set$P(\"hasZorder\",true);\n\t\tif (index >=0 && index <=this._childs.length){\n\t\t\tif (node._parent===this){\n\t\t\t\tvar oldIndex=this.getChildIndex(node);\n\t\t\t\tthis._childs.splice(oldIndex,1);\n\t\t\t\tthis._childs.splice(index,0,node);\n\t\t\t\tif (this.conchModel){\n\t\t\t\t\tthis.conchModel.removeChild(node.conchModel);\n\t\t\t\t\tthis.conchModel.addChildAt(node.conchModel,index);\n\t\t\t\t}\n\t\t\t\tthis._childChanged();\n\t\t\t\t}else {\n\t\t\t\tnode.parent && node.parent.removeChild(node);\n\t\t\t\tthis._childs===Node.ARRAY_EMPTY && (this._childs=[]);\n\t\t\t\tthis._childs.splice(index,0,node);\n\t\t\t\tthis.conchModel && this.conchModel.addChildAt(node.conchModel,index);\n\t\t\t\tnode.parent=this;\n\t\t\t\tthis._addChild3D(node);\n\t\t\t}\n\t\t\treturn node;\n\t\t\t}else {\n\t\t\tthrow new Error(\"appendChildAt:The index is out of bounds\");\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.addChild=function(node){\n\t\tif (!((node instanceof laya.d3.core.Sprite3D )))\n\t\t\tthrow new Error(\"Sprite3D:Node type must Sprite3D.\");\n\t\tif (!node || this.destroyed || node===this)return node;\n\t\tif ((node).zOrder)this._set$P(\"hasZorder\",true);\n\t\tif (node._parent===this){\n\t\t\tvar index=this.getChildIndex(node);\n\t\t\tif (index!==this._childs.length-1){\n\t\t\t\tthis._childs.splice(index,1);\n\t\t\t\tthis._childs.push(node);\n\t\t\t\tif (this.conchModel){\n\t\t\t\t\tthis.conchModel.removeChild(node.conchModel);\n\t\t\t\t\tthis.conchModel.addChildAt(node.conchModel,this._childs.length-1);\n\t\t\t\t}\n\t\t\t\tthis._childChanged();\n\t\t\t}\n\t\t\t}else {\n\t\t\tnode.parent && node.parent.removeChild(node);\n\t\t\tthis._childs===Node.ARRAY_EMPTY && (this._childs=[]);\n\t\t\tthis._childs.push(node);\n\t\t\tthis.conchModel && this.conchModel.addChildAt(node.conchModel,this._childs.length-1);\n\t\t\tnode.parent=this;\n\t\t\tthis._childChanged();\n\t\t\tthis._addChild3D(node);\n\t\t}\n\t\treturn node;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.removeChildAt=function(index){\n\t\tvar node=this.getChildAt(index);\n\t\tif (node){\n\t\t\tthis._removeChild3D(node);\n\t\t\tthis._childs.splice(index,1);\n\t\t\tthis.conchModel && this.conchModel.removeChild(node.conchModel);\n\t\t\tnode.parent=null;\n\t\t}\n\t\treturn node;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.removeChildren=function(beginIndex,endIndex){\n\t\t(beginIndex===void 0)&& (beginIndex=0);\n\t\t(endIndex===void 0)&& (endIndex=0x7fffffff);\n\t\tif (this._childs && this._childs.length > 0){\n\t\t\tvar childs=this._childs;\n\t\t\tif (beginIndex===0 && endIndex >=n){\n\t\t\t\tvar arr=childs;\n\t\t\t\tthis._childs=Node.ARRAY_EMPTY;\n\t\t\t\t}else {\n\t\t\t\tarr=childs.splice(beginIndex,endIndex-beginIndex);\n\t\t\t}\n\t\t\tfor (var i=0,n=arr.length;i < n;i++){\n\t\t\t\tthis._removeChild3D(arr [i]);\n\t\t\t\tarr[i].parent=null;\n\t\t\t\tthis.conchModel && this.conchModel.removeChild(arr[i].conchModel);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.addFrustumCullingObject=function(renderObject){\n\t\tif (this.treeRoot){\n\t\t\tthis.addTreeNode(renderObject);\n\t\t\t}else {\n\t\t\tif (this._cullingRendersLength===this._cullingRenders.length)\n\t\t\t\tthis._cullingRenders.push(renderObject);\n\t\t\telse\n\t\t\tthis._cullingRenders[this._cullingRendersLength]=renderObject;\n\t\t\trenderObject._indexInSceneFrustumCullingObjects=this._cullingRendersLength++;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.removeFrustumCullingObject=function(renderObject){\n\t\tif (this.treeRoot){\n\t\t\tthis.removeTreeNode(renderObject);\n\t\t\t}else {\n\t\t\tthis._cullingRendersLength--;\n\t\t\tvar indexInSceneFrustumCullingObjects=renderObject._indexInSceneFrustumCullingObjects;\n\t\t\tif (indexInSceneFrustumCullingObjects!==this._cullingRendersLength){\n\t\t\t\tvar endRender=this._cullingRenders[this._cullingRendersLength];\n\t\t\t\tthis._cullingRenders[indexInSceneFrustumCullingObjects]=endRender;\n\t\t\t\tendRender._indexInSceneFrustumCullingObjects=indexInSceneFrustumCullingObjects;\n\t\t\t\trenderObject._indexInSceneFrustumCullingObjects=-1;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*获得某个渲染队列。\n\t*@param index 渲染队列索引。\n\t*@return 渲染队列。\n\t*/\n\t__proto.getRenderQueue=function(index){\n\t\tif (index < 3000)\n\t\t\treturn this._quenes[1] || (this._quenes[1]=new RenderQueue(this));\n\t\telse\n\t\treturn this._quenes[2] || (this._quenes[2]=new RenderQueue(this));\n\t}\n\n\t/**\n\t*添加渲染队列。\n\t*@param renderConfig 渲染队列配置文件。\n\t*/\n\t__proto.addRenderQuene=function(){\n\t\tthis._quenes[this._customRenderQueneIndex++]=new RenderQueue(this);\n\t}\n\n\t/**\n\t*增加shader宏定义。\n\t*@param define shader宏定义。\n\t*/\n\t__proto.addShaderDefine=function(define){\n\t\tthis._shaderDefineValue |=define;\n\t}\n\n\t/**\n\t*移除shader宏定义。\n\t*@param define shader宏定义。\n\t*/\n\t__proto.removeShaderDefine=function(define){\n\t\tthis._shaderDefineValue &=~define;\n\t}\n\n\t/**\n\t*添加指定类型脚本。\n\t*@param type 脚本类型。\n\t*@return 组件。\n\t*/\n\t__proto.addScript=function(type){\n\t\treturn this._addComponent(type);\n\t}\n\n\t/**\n\t*通过指定类型和类型索引获得脚本。\n\t*@param type 脚本类型。\n\t*@param typeIndex 脚本索引。\n\t*@return 脚本。\n\t*/\n\t__proto.getScriptByType=function(type,typeIndex){\n\t\t(typeIndex===void 0)&& (typeIndex=0);\n\t\treturn this._getComponentByType(type,typeIndex);\n\t}\n\n\t/**\n\t*通过指定类型获得所有脚本。\n\t*@param type 脚本类型。\n\t*@param scripts 脚本输出队列。\n\t*/\n\t__proto.getScriptsByType=function(type,scripts){\n\t\tthis._getComponentsByType(type,scripts);\n\t}\n\n\t/**\n\t*通过指定索引获得脚本。\n\t*@param index 索引。\n\t*@return 脚本。\n\t*/\n\t__proto.getScriptByIndex=function(index){\n\t\treturn this._getComponentByIndex(index);\n\t}\n\n\t/**\n\t*通过指定类型和类型索引移除脚本。\n\t*@param type 脚本类型。\n\t*@param typeIndex 类型索引。\n\t*/\n\t__proto.removeScriptByType=function(type,typeIndex){\n\t\t(typeIndex===void 0)&& (typeIndex=0);\n\t\tthis._removeComponentByType(type,typeIndex);\n\t}\n\n\t/**\n\t*通过指定类型移除所有脚本。\n\t*@param type 组件类型。\n\t*/\n\t__proto.removeScriptsByType=function(type){\n\t\tthis._removeComponentByType(type);\n\t}\n\n\t/**\n\t*移除全部脚本。\n\t*/\n\t__proto.removeAllScript=function(){\n\t\tthis._removeAllComponent();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.render=function(context,x,y){\n\t\t(Render._context.ctx)._renderKey=0;\n\t\tthis._childs.length > 0 && context.addRenderObject(this);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.renderSubmit=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar renderState=this._renderState;\n\t\tthis._set3DRenderConfig(gl);\n\t\tthis._prepareSceneToRender(this._renderState);\n\t\tvar i=0,n=0,camera;\n\t\tif (Laya3D.debugMode || OctreeNode.debugMode){\n\t\t\tfor (i=0,n=this._cameraPool.length;i < n;i++){\n\t\t\t\tcamera=this._cameraPool[i];\n\t\t\t\tLaya3D._debugPhasorSprite.begin(/*laya.webgl.WebGLContext.LINES*/0x0001,camera);\n\t\t\t\t(camera.activeInHierarchy)&& (camera._renderCamera(gl,renderState,this));\n\t\t\t\tLaya3D._debugPhasorSprite.end();\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (i=0,n=this._cameraPool.length;i < n;i++){\n\t\t\t\tcamera=this._cameraPool[i];\n\t\t\t\t(camera.activeInHierarchy)&& (camera._renderCamera(gl,renderState,this));\n\t\t\t}\n\t\t}\n\t\tthis._set2DRenderConfig(gl);\n\t\treturn 1;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar json=data[0]\n\t\tif (json.type!==\"Scene\")\n\t\t\tthrow new Error(\"Scene: the .lh file root type must be Scene,please use other function to  load  this file.\");\n\t\tvar innerResouMap=data[1];\n\t\tUtils3D._createNodeByJson(this,json,this,innerResouMap);\n\t\tthis.event(/*laya.events.Event.HIERARCHY_LOADED*/\"hierarchyloaded\",[this]);\n\t\tthis.__loaded=true;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._renderState=null;\n\t\tthis._lights=null;\n\t\tthis._lightmaps=null;\n\t\tthis._renderTargetTexture=null;\n\t\tthis._shaderValues=null;\n\t\tthis._cullingRenders=null;\n\t\tthis._dynamicBatchManager=null;\n\t\tthis._quenes=null;\n\t\tthis._cameraPool=null;\n\t\tthis._renderableSprite3Ds=null;\n\t\tthis.treeRoot=null;\n\t\tthis.treeSize=null;\n\t\tthis.parallelSplitShadowMaps=null;\n\t\tthis._typeComponentsIndices=null;\n\t\tthis._components=null;\n\t\tLoader.clearRes(this.url);\n\t\t(this.loaded)|| (Laya3D._cancelLoadByUrl(this.url));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.getRenderType=function(){\n\t\treturn 0;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.releaseRender=function(){}\n\t/**\n\t*@private\n\t*/\n\t__proto._addComponent=function(type){\n\t\tvar typeComponentIndex;\n\t\tvar index=this._componentsMap.indexOf(type);\n\t\tif (index===-1){\n\t\t\ttypeComponentIndex=[];\n\t\t\tthis._componentsMap.push(type);\n\t\t\tthis._typeComponentsIndices.push(typeComponentIndex);\n\t\t\t}else {\n\t\t\ttypeComponentIndex=this._typeComponentsIndices[index];\n\t\t\tif (this._components[typeComponentIndex[0]].isSingleton)\n\t\t\t\tthrow new Error(\"无法单实例创建\"+type+\"组件\"+\"，\"+type+\"组件已存在！\");\n\t\t};\n\t\tvar component=ClassUtils.getInstance(type);\n\t\ttypeComponentIndex.push(this._components.length);\n\t\tthis._components.push(component);\n\t\tvar _this=this;\n\t\tcomponent._initialize(_this);\n\t\treturn component;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeComponent=function(mapIndex,index){\n\t\tvar componentIndices=this._typeComponentsIndices[mapIndex];\n\t\tvar componentIndex=componentIndices[index];\n\t\tvar component=this._components[componentIndex];\n\t\tthis._components.splice(componentIndex,1);\n\t\tcomponentIndices.splice(index,1);\n\t\t(componentIndices.length===0)&& (this._typeComponentsIndices.splice(mapIndex,1),this._componentsMap.splice(mapIndex,1));\n\t\tfor (var i=0,n=this._componentsMap.length;i < n;i++){\n\t\t\tcomponentIndices=this._typeComponentsIndices[i];\n\t\t\tfor (var j=componentIndices.length-1;j >=0;j--){\n\t\t\t\tvar oldComponentIndex=componentIndices[j];\n\t\t\t\tif (oldComponentIndex > componentIndex)\n\t\t\t\t\tcomponentIndices[j]=--oldComponentIndex;\n\t\t\t\telse\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\tcomponent._destroy();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getComponentByType=function(type,typeIndex){\n\t\t(typeIndex===void 0)&& (typeIndex=0);\n\t\tvar mapIndex=this._componentsMap.indexOf(type);\n\t\tif (mapIndex===-1)\n\t\t\treturn null;\n\t\treturn this._components[this._typeComponentsIndices[mapIndex][typeIndex]];\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getComponentsByType=function(type,components){\n\t\tvar index=this._componentsMap.indexOf(type);\n\t\tif (index===-1){\n\t\t\tcomponents.length=0;\n\t\t\treturn;\n\t\t};\n\t\tvar typeComponents=this._typeComponentsIndices[index];\n\t\tvar count=typeComponents.length;\n\t\tcomponents.length=count;\n\t\tfor (var i=0;i < count;i++)\n\t\tcomponents[i]=this._components[typeComponents[i]];\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getComponentByIndex=function(index){\n\t\treturn this._components[index];\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeComponentByType=function(type,typeIndex){\n\t\t(typeIndex===void 0)&& (typeIndex=0);\n\t\tvar mapIndex=this._componentsMap.indexOf(type);\n\t\tif (mapIndex===-1)\n\t\t\treturn;\n\t\tthis._removeComponent(mapIndex,typeIndex);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeComponentsByType=function(type){\n\t\tvar mapIndex=this._componentsMap.indexOf(type);\n\t\tif (mapIndex===-1)\n\t\t\treturn;\n\t\tvar componentIndices=this._typeComponentsIndices[mapIndex];\n\t\tfor (var i=0,n=componentIndices.length;i < n;componentIndices.length < n ? n--:i++)\n\t\tthis._removeComponent(mapIndex,i);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeAllComponent=function(){\n\t\tfor (var i=0,n=this._componentsMap.length;i < n;this._componentsMap.length < n ? n--:i++)\n\t\tthis._removeComponentsByType(this._componentsMap[i]);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._updateComponents=function(state){\n\t\tfor (var i=0,n=this._components.length;i < n;i++){\n\t\t\tvar component=this._components[i];\n\t\t\t(!component.started)&& (component._start(state),component.started=true);\n\t\t\t(component.enable)&& (component._update(state));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._lateUpdateComponents=function(state){\n\t\tfor (var i=0;i < this._components.length;i++){\n\t\t\tvar component=this._components[i];\n\t\t\t(!component.started)&& (component._start(state),component.started=true);\n\t\t\t(component.enable)&& (component._lateUpdate(state));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._preRenderUpdateComponents=function(state){\n\t\tfor (var i=0;i < this._components.length;i++){\n\t\t\tvar component=this._components[i];\n\t\t\t(!component.started)&& (component._start(state),component.started=true);\n\t\t\t(component.enable)&& (component._preRenderUpdate(state));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._postRenderUpdateComponents=function(state){\n\t\tfor (var i=0;i < this._components.length;i++){\n\t\t\tvar component=this._components[i];\n\t\t\t(!component.started)&& (component._start(state),component.started=true);\n\t\t\t(component.enable)&& (component._postRenderUpdate(state));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_loaded',null,function(value){\n\t\tthis.__loaded=value;\n\t});\n\n\t/**\n\t*设置雾化颜色。\n\t*@param value 雾化颜色。\n\t*/\n\t/**\n\t*获取雾化颜色。\n\t*@return 雾化颜色。\n\t*/\n\t__getset(0,__proto,'fogColor',function(){\n\t\treturn this._fogColor;\n\t\t},function(value){\n\t\tthis._fogColor=value;\n\t\tthis._shaderValues.setValue(/*CLASS CONST:laya.d3.core.scene.Scene.FOGCOLOR*/0,value.elements);\n\t});\n\n\t/**\n\t*设置是否允许雾化。\n\t*@param value 是否允许雾化。\n\t*/\n\t/**\n\t*获取是否允许雾化。\n\t*@return 是否允许雾化。\n\t*/\n\t__getset(0,__proto,'enableFog',function(){\n\t\treturn this._enableFog;\n\t\t},function(value){\n\t\tif (this._enableFog!==value){\n\t\t\tthis._enableFog=value;\n\t\t\tif (value){\n\t\t\t\tthis.addShaderDefine(ShaderCompile3D.SHADERDEFINE_FOG);\n\t\t\t\tthis.removeShaderDefine(ShaderCompile3D.SAHDERDEFINE_DEPTHFOG);\n\t\t\t}else\n\t\t\tthis.removeShaderDefine(ShaderCompile3D.SHADERDEFINE_FOG);\n\t\t}\n\t});\n\n\t/**\n\t*获取资源的URL地址。\n\t*@return URL地址。\n\t*/\n\t__getset(0,__proto,'url',function(){\n\t\treturn this._url;\n\t});\n\n\t/**\n\t*获取是否已加载完成。\n\t*/\n\t__getset(0,__proto,'loaded',function(){\n\t\treturn this.__loaded;\n\t});\n\n\t__getset(0,__proto,'enableDepthFog',function(){\n\t\treturn this._enableDepthFog;\n\t\t},function(v){\n\t\tif (this._enableDepthFog !=v){\n\t\t\tthis._enableDepthFog=v;\n\t\t\tif (v){\n\t\t\t\tthis.addShaderDefine(ShaderCompile3D.SAHDERDEFINE_DEPTHFOG);\n\t\t\t\tthis.removeShaderDefine(ShaderCompile3D.SHADERDEFINE_FOG);\n\t\t\t\t}else {\n\t\t\t\tthis.removeShaderDefine(ShaderCompile3D.SAHDERDEFINE_DEPTHFOG);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*设置雾化起始位置。\n\t*@param value 雾化起始位置。\n\t*/\n\t/**\n\t*获取雾化起始位置。\n\t*@return 雾化起始位置。\n\t*/\n\t__getset(0,__proto,'fogStart',function(){\n\t\treturn this._fogStart;\n\t\t},function(value){\n\t\tthis._fogStart=value;\n\t\tthis._shaderValues.setValue(/*CLASS CONST:laya.d3.core.scene.Scene.FOGSTART*/1,value);\n\t});\n\n\t/**\n\t*设置雾化范围。\n\t*@param value 雾化范围。\n\t*/\n\t/**\n\t*获取雾化范围。\n\t*@return 雾化范围。\n\t*/\n\t__getset(0,__proto,'fogRange',function(){\n\t\treturn this._fogRange;\n\t\t},function(value){\n\t\tthis._fogRange=value;\n\t\tthis._shaderValues.setValue(/*CLASS CONST:laya.d3.core.scene.Scene.FOGRANGE*/2,value);\n\t});\n\n\t/**\n\t*设置环境光颜色。\n\t*@param value 环境光颜色。\n\t*/\n\t/**\n\t*获取环境光颜色。\n\t*@return 环境光颜色。\n\t*/\n\t__getset(0,__proto,'ambientColor',function(){\n\t\treturn this._ambientColor;\n\t\t},function(value){\n\t\tthis._ambientColor=value;\n\t\tthis._shaderValues.setValue(/*CLASS CONST:laya.d3.core.scene.Scene.AMBIENTCOLOR*/21,value.elements);\n\t});\n\n\t/**\n\t*获取当前场景。\n\t*@return 当前场景。\n\t*/\n\t__getset(0,__proto,'scene',function(){\n\t\treturn this;\n\t});\n\n\t/**\n\t*获取场景的可渲染精灵。\n\t*/\n\t__getset(0,__proto,'renderableSprite3Ds',function(){\n\t\treturn this._renderableSprite3Ds.slice();\n\t});\n\n\tScene._sortScenes=function(a,b){\n\t\tif (a.parent===Laya.stage && b.parent===Laya.stage){\n\t\t\tvar stageChildren=Laya.stage._childs;\n\t\t\treturn stageChildren.indexOf(a)-stageChildren.indexOf(b);\n\t\t\t}else if (a.parent!==Laya.stage && b.parent!==Laya.stage){\n\t\t\treturn Scene._sortScenes(a.parent,b.parent);\n\t\t\t}else {\n\t\t\treturn (a.parent===Laya.stage)?-1 :1;\n\t\t}\n\t}\n\n\tScene.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,Scene);\n\t}\n\n\tScene.FOGCOLOR=0;\n\tScene.FOGSTART=1;\n\tScene.FOGRANGE=2;\n\tScene.LIGHTDIRECTION=3;\n\tScene.LIGHTDIRCOLOR=4;\n\tScene.POINTLIGHTPOS=5;\n\tScene.POINTLIGHTRANGE=6;\n\tScene.POINTLIGHTATTENUATION=7;\n\tScene.POINTLIGHTCOLOR=8;\n\tScene.SPOTLIGHTPOS=9;\n\tScene.SPOTLIGHTDIRECTION=10;\n\tScene.SPOTLIGHTSPOT=11;\n\tScene.SPOTLIGHTRANGE=12;\n\tScene.SPOTLIGHTATTENUATION=13;\n\tScene.SPOTLIGHTCOLOR=14;\n\tScene.SHADOWDISTANCE=15;\n\tScene.SHADOWLIGHTVIEWPROJECT=16;\n\tScene.SHADOWMAPPCFOFFSET=17;\n\tScene.SHADOWMAPTEXTURE1=18;\n\tScene.SHADOWMAPTEXTURE2=19;\n\tScene.SHADOWMAPTEXTURE3=20;\n\tScene.AMBIENTCOLOR=21;\n\tScene.TIME=22;\n\treturn Scene;\n})(Sprite)\n\n\n/**\n*<code>Sprite3D</code> 类用于实现3D精灵。\n*/\n//class laya.d3.core.Sprite3D extends laya.d3.core.ComponentNode\nvar Sprite3D=(function(_super){\n\tfunction Sprite3D(name){\n\t\t/**@private */\n\t\t//this._projectionViewWorldMatrix=null;\n\t\t/**@private */\n\t\t//this._projectionViewWorldUpdateLoopCount=0;\n\t\t/**@private */\n\t\t//this._projectionViewWorldUpdateCamera=null;\n\t\t/**@private */\n\t\t//this._id=0;\n\t\t/**@private */\n\t\t//this.__loaded=false;\n\t\t/**@private */\n\t\t//this._url=null;\n\t\t/**@private */\n\t\t//this._group=null;\n\t\t/**@private */\n\t\t//this._active=false;\n\t\t/**@private */\n\t\t//this._activeInHierarchy=false;\n\t\t/**@private */\n\t\t//this._layer=null;\n\t\t/**@private */\n\t\t//this._shaderDefineValue=0;\n\t\t/**@private */\n\t\t//this._shaderValues=null;\n\t\t/**@private */\n\t\t//this._colliders=null;\n\t\t/**@private */\n\t\t//this._scene=null;\n\t\t/**@private */\n\t\t//this._transform=null;\n\t\t/**@private */\n\t\t//this._hierarchyAnimator=null;\n\t\t/**是否静态,静态包含一系列的静态处理。*/\n\t\t//this.isStatic=false;\n\t\tSprite3D.__super.call(this);\n\t\tthis.__loaded=true;\n\t\tthis._projectionViewWorldUpdateLoopCount=-1;\n\t\tthis._activeInHierarchy=false;\n\t\tthis._projectionViewWorldMatrix=new Matrix4x4();\n\t\tthis._shaderValues=new ValusArray();\n\t\tthis._colliders=[];\n\t\tthis._id=++Sprite3D._uniqueIDCounter;\n\t\tthis._transform=new Transform3D(this);\n\t\tthis.name=name ? name :\"Sprite3D-\"+Sprite3D._nameNumberCounter++;\n\t\tthis.layer=Layer.currentCreationLayer;\n\t\tthis.active=true;\n\t}\n\n\t__class(Sprite3D,'laya.d3.core.Sprite3D',_super);\n\tvar __proto=Sprite3D.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IUpdate\":true,\"laya.resource.ICreateResource\":true,\"laya.d3.core.IClone\":true})\n\t/**\n\t*@private\n\t*/\n\t__proto._setUrl=function(url){\n\t\tthis._url=url;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getGroup=function(){\n\t\treturn this._group;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setGroup=function(value){\n\t\tthis._group=value;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addChild3D=function(sprite3D){\n\t\tsprite3D.transform.parent=this.transform;\n\t\tif (this._hierarchyAnimator){\n\t\t\t(!sprite3D._hierarchyAnimator)&& (sprite3D._setHierarchyAnimator(this._hierarchyAnimator,null));\n\t\t\tthis._getAnimatorToLinkSprite3D(sprite3D,true,/*new vector.<>*/[sprite3D.name]);\n\t\t}\n\t\tif (this._scene){\n\t\t\tsprite3D._setBelongScene(this._scene);\n\t\t\t(this._activeInHierarchy && sprite3D._active)&& (sprite3D._activeHierarchy());\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._removeChild3D=function(sprite3D){\n\t\tsprite3D.transform.parent=null;\n\t\tif (this._scene){\n\t\t\t(this._activeInHierarchy && sprite3D._active)&& (sprite3D._inActiveHierarchy());\n\t\t\tsprite3D._setUnBelongScene();\n\t\t}\n\t\tif (this._hierarchyAnimator){\n\t\t\t((sprite3D._hierarchyAnimator==this._hierarchyAnimator))&& (sprite3D._clearHierarchyAnimator(this._hierarchyAnimator,null));\n\t\t\tthis._getAnimatorToLinkSprite3D(sprite3D,false,/*new vector.<>*/[sprite3D.name]);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._parseBaseCustomProps=function(customProps){\n\t\tvar loccalPosition=this.transform.localPosition;\n\t\tloccalPosition.fromArray(customProps.translate);\n\t\tthis.transform.localPosition=loccalPosition;\n\t\tvar localRotation=this.transform.localRotation;\n\t\tlocalRotation.fromArray(customProps.rotation);\n\t\tthis.transform.localRotation=localRotation;\n\t\tvar localScale=this.transform.localScale;\n\t\tlocalScale.fromArray(customProps.scale);\n\t\tthis.transform.localScale=localScale;\n\t\tvar layerData=customProps.layer;\n\t\t(layerData !=null)&& (this.layer=Layer.getLayerByNumber(layerData));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._parseCustomComponent=function(rootNode,innerResouMap,componentsData){\n\t\tfor (var k in componentsData){\n\t\t\tvar component=componentsData[k];\n\t\t\tswitch (k){\n\t\t\t\tcase \"Animator\":;\n\t\t\t\t\tvar animator=this.addComponent(Animator);\n\t\t\t\t\tif (component.avatarPath){\n\t\t\t\t\t\tanimator.avatar=Loader.getRes(innerResouMap[component.avatarPath]);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tvar avatarData=component.avatar;\n\t\t\t\t\t\tif (avatarData){\n\t\t\t\t\t\t\tanimator.avatar=Loader.getRes(innerResouMap[avatarData.path]);\n\t\t\t\t\t\t\tvar linkSprites=avatarData.linkSprites;\n\t\t\t\t\t\t\t(linkSprites)&& (rootNode.once(/*laya.events.Event.HIERARCHY_LOADED*/\"hierarchyloaded\",this,this._onRootNodeHierarchyLoaded,[animator,linkSprites]));\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tvar clipPaths=component.clipPaths;\n\t\t\t\t\tvar clipCount=clipPaths.length;\n\t\t\t\t\tfor (var i=0;i < clipCount;i++)\n\t\t\t\t\tanimator.addClip(Loader.getRes(innerResouMap[clipPaths[i]]));\n\t\t\t\t\tanimator.clip=Loader.getRes(innerResouMap[clipPaths[0]]);\n\t\t\t\t\tvar playOnWake=component.playOnWake;\n\t\t\t\t\t(playOnWake!==undefined)&& (animator.playOnWake=playOnWake);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"Rigidbody\":;\n\t\t\t\t\tvar rigidbody=this.addComponent(Rigidbody);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"SphereCollider\":;\n\t\t\t\t\tvar sphereCollider=this.addComponent(SphereCollider);\n\t\t\t\t\tsphereCollider.isTrigger=component.isTrigger;\n\t\t\t\t\tvar center=sphereCollider.center;\n\t\t\t\t\tcenter.fromArray(component.center);\n\t\t\t\t\tsphereCollider.center=center;\n\t\t\t\t\tsphereCollider.radius=component.radius;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"BoxCollider\":;\n\t\t\t\t\tvar boxCollider=this.addComponent(BoxCollider);\n\t\t\t\t\tboxCollider.isTrigger=component.isTrigger;\n\t\t\t\t\tboxCollider.center.fromArray(component.center);\n\t\t\t\t\tvar size=boxCollider.size;\n\t\t\t\t\tsize.fromArray(component.size);\n\t\t\t\t\tboxCollider.size=size;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"MeshCollider\":;\n\t\t\t\t\tvar meshCollider=this.addComponent(MeshCollider);\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onRootNodeHierarchyLoaded=function(animator,linkSprites){\n\t\tfor (var k in linkSprites){\n\t\t\tvar nodeOwner=this;\n\t\t\tvar path=linkSprites[k];\n\t\t\tfor (var j=0,m=path.length;j < m;j++){\n\t\t\t\tvar p=path[j];\n\t\t\t\tif (p===\"\"){\n\t\t\t\t\tbreak ;\n\t\t\t\t\t}else {\n\t\t\t\t\tnodeOwner=nodeOwner.getChildByName(p);\n\t\t\t\t\tif (!nodeOwner)\n\t\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t(nodeOwner)&& (animator.linkSprite3DToAvatarNode(k,nodeOwner));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setHierarchyAnimator=function(animator,parentAnimator){\n\t\tthis._changeHierarchyAnimator(animator);\n\t\tfor (var i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar child=this._childs[i];\n\t\t\t(child._hierarchyAnimator==parentAnimator)&& (child._setHierarchyAnimator(animator,parentAnimator));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._clearHierarchyAnimator=function(animator,parentAnimator){\n\t\tthis._changeHierarchyAnimator(parentAnimator);\n\t\tfor (var i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar child=this._childs[i];\n\t\t\t(child._hierarchyAnimator==animator)&& (child._clearHierarchyAnimator(animator,parentAnimator));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getAnimatorToLinkSprite3D=function(sprite3D,isLink,path){\n\t\tvar animator=this.getComponentByType(Animator);\n\t\tif (animator){\n\t\t\tif (animator.avatar){\n\t\t\t\t(animator.avatar._version)|| (sprite3D._setAnimatorToLinkAvatar(animator,isLink));\n\t\t\t\t}else {\n\t\t\t\tsprite3D._setAnimatorToLinkSprite3DNoAvatar(animator,isLink,path);\n\t\t\t}\n\t\t}\n\t\tif (this._parent && (this._parent instanceof laya.d3.core.Sprite3D )){\n\t\t\tpath.unshift(this._parent.name);\n\t\t\tvar p=this._parent;\n\t\t\t(p._hierarchyAnimator)&& (p._getAnimatorToLinkSprite3D(sprite3D,isLink,path));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setAnimatorToLinkSprite3DNoAvatar=function(animator,isLink,path){\n\t\tvar i=0,n=0;\n\t\tfor (i=0,n=animator.getClipCount();i < n;i++)\n\t\tanimator._handleSpriteOwnersBySprite(i,isLink,path,this);\n\t\tfor (i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar child=this._childs[i];\n\t\t\tvar index=path.length;\n\t\t\tpath.push(child.name);\n\t\t\tchild._setAnimatorToLinkSprite3DNoAvatar(animator,isLink,path);\n\t\t\tpath.splice(index,1);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._changeHierarchyAnimator=function(animator){\n\t\tthis._hierarchyAnimator=animator;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._isLinkSpriteToAnimationNode=function(animator,node,isLink){\n\t\tvar nodeIndex=animator._avatarNodes.indexOf(node);\n\t\tvar cacheSpriteToNodesMap=animator._cacheSpriteToNodesMap;\n\t\tif (isLink){\n\t\t\tthis._transform.dummy=node.transform;\n\t\t\tanimator._cacheNodesToSpriteMap[nodeIndex]=cacheSpriteToNodesMap.length;\n\t\t\tcacheSpriteToNodesMap.push(nodeIndex);\n\t\t\t}else {\n\t\t\tthis._transform.dummy=null;\n\t\t\tvar index=animator._cacheNodesToSpriteMap[nodeIndex];\n\t\t\tanimator._cacheNodesToSpriteMap[nodeIndex]=null;\n\t\t\tcacheSpriteToNodesMap.splice(index,1);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setBelongScene=function(scene){\n\t\tthis._scene=scene;\n\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t(this._childs [i])._setBelongScene(scene);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setUnBelongScene=function(){\n\t\tthis._scene=null;\n\t\tfor (var i=0,n=this._childs.length;i < n;i++)\n\t\t(this._childs [i])._setUnBelongScene();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._activeHierarchy=function(){\n\t\tvar i=0,n=0;\n\t\tthis._activeInHierarchy=true;\n\t\tthis._addSelfRenderObjects();\n\t\tfor (i=0,n=this._colliders.length;i < n;i++)\n\t\tthis._layer._addCollider(this._colliders[i]);\n\t\tthis.event(/*laya.events.Event.ACTIVE_IN_HIERARCHY_CHANGED*/\"activeinhierarchychanged\",true);\n\t\tfor (i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar child=this._childs [i];\n\t\t\t(child._active)&& (child._activeHierarchy());\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._inActiveHierarchy=function(){\n\t\tvar i=0,n=0;\n\t\tthis._activeInHierarchy=false;\n\t\tthis._clearSelfRenderObjects();\n\t\tfor (i=0,n=this._colliders.length;i < n;i++){\n\t\t\tvar col=this._colliders[i];\n\t\t\tcol._clearCollsionMap();\n\t\t\tthis._layer._removeCollider(col);\n\t\t}\n\t\tthis.event(/*laya.events.Event.ACTIVE_IN_HIERARCHY_CHANGED*/\"activeinhierarchychanged\",false);\n\t\tfor (i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar child=this._childs [i];\n\t\t\t(child._active)&& (child._inActiveHierarchy());\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.addComponent=function(type){\n\t\tvar typeComponentIndex;\n\t\tvar index=this._componentsMap.indexOf(type);\n\t\tif (index===-1){\n\t\t\ttypeComponentIndex=[];\n\t\t\tthis._componentsMap.push(type);\n\t\t\tthis._typeComponentsIndices.push(typeComponentIndex);\n\t\t\t}else {\n\t\t\ttypeComponentIndex=this._typeComponentsIndices[index];\n\t\t\tif (this._components[typeComponentIndex[0]].isSingleton)\n\t\t\t\tthrow new Error(\"无法单实例创建\"+type+\"组件\"+\"，\"+type+\"组件已存在！\");\n\t\t};\n\t\tvar component=ClassUtils.getInstance(type);\n\t\ttypeComponentIndex.push(this._components.length);\n\t\tthis._components.push(component);\n\t\tif ((component instanceof laya.d3.component.physics.Collider )){\n\t\t\tvar rigidbody=this.getComponentByType(Rigidbody);\n\t\t\t(rigidbody)&& ((component)._isRigidbody=true);\n\t\t\t(this._activeInHierarchy)&& (this._layer._addCollider(component));\n\t\t\tthis._colliders.push(component);\n\t\t\t}else if ((component instanceof laya.d3.component.Animator )){\n\t\t\tvar animator=component;\n\t\t\tthis._setHierarchyAnimator(animator,this._parent ? (this._parent)._hierarchyAnimator :null);\n\t\t\tthis._setAnimatorToLinkSprite3DNoAvatar(animator,true,/*new vector.<>*/[]);\n\t\t\t}else if ((component instanceof laya.d3.component.Rigidbody )){\n\t\t\tfor (var i=0,n=this._colliders.length;i < n;i++)\n\t\t\tthis._colliders[i]._setIsRigidbody(true);\n\t\t}\n\t\tif ((component instanceof laya.d3.component.Script ))\n\t\t\tthis._scripts.push(component);\n\t\tcomponent._initialize(this);\n\t\treturn component;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._removeComponent=function(mapIndex,index){\n\t\tvar i=0,n=0;\n\t\tvar componentIndices=this._typeComponentsIndices[mapIndex];\n\t\tvar componentIndex=componentIndices[index];\n\t\tvar component=this._components[componentIndex];\n\t\tif ((component instanceof laya.d3.component.physics.Collider )){\n\t\t\tvar colliderComponent=component;\n\t\t\t(this._activeInHierarchy)&& (this._layer._removeCollider(colliderComponent));\n\t\t\tthis._colliders.splice(this._colliders.indexOf(colliderComponent),1);\n\t\t\t}else if ((component instanceof laya.d3.component.Animator )){\n\t\t\tvar animator=component;\n\t\t\tthis._clearHierarchyAnimator(animator,this._parent ? (this._parent)._hierarchyAnimator :null);\n\t\t\t}else if ((component instanceof laya.d3.component.Rigidbody )){\n\t\t\tfor (i=0,n=this._colliders.length;i < n;i++){\n\t\t\t\tvar collider=this._colliders[i];\n\t\t\t\tcollider._setIsRigidbody(false);\n\t\t\t\tvar runtimeCollisonMap=collider._runtimeCollisonMap;\n\t\t\t\tvar runtimeCollisonTestMap=collider._runtimeCollisonTestMap;\n\t\t\t\tfor (var k in runtimeCollisonMap)\n\t\t\t\tdelete runtimeCollisonTestMap[k];\n\t\t\t}\n\t\t}\n\t\tthis._components.splice(componentIndex,1);\n\t\tif ((component instanceof laya.d3.component.Script ))\n\t\t\tthis._scripts.splice(this._scripts.indexOf(component),1);\n\t\tcomponentIndices.splice(index,1);\n\t\t(componentIndices.length===0)&& (this._typeComponentsIndices.splice(mapIndex,1),this._componentsMap.splice(mapIndex,1));\n\t\tfor (i=0,n=this._componentsMap.length;i < n;i++){\n\t\t\tcomponentIndices=this._typeComponentsIndices[i];\n\t\t\tfor (var j=componentIndices.length-1;j >=0;j--){\n\t\t\t\tvar oldComponentIndex=componentIndices[j];\n\t\t\t\tif (oldComponentIndex > componentIndex)\n\t\t\t\t\tcomponentIndices[j]=--oldComponentIndex;\n\t\t\t\telse\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\tcomponent._destroy();\n\t}\n\n\t/**\n\t*清理自身渲染物体，请重载此函数。\n\t*/\n\t__proto._clearSelfRenderObjects=function(){}\n\t/**\n\t*添加自身渲染物体，请重载此函数。\n\t*/\n\t__proto._addSelfRenderObjects=function(){}\n\t/**\n\t*@private\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,nodeData){}\n\t/**\n\t*更新子节点。\n\t*@param state 渲染相关状态。\n\t*/\n\t__proto._updateChilds=function(state){\n\t\tvar n=this._childs.length;\n\t\tif (n===0)return;\n\t\tfor (var i=0;i < n;++i)\n\t\tthis._childs[i]._update((state));\n\t}\n\n\t/**\n\t*排序函数。\n\t*@param state 渲染相关状态。\n\t*/\n\t__proto._getSortID=function(renderElement,material){\n\t\treturn material.id */*laya.d3.graphics.VertexDeclaration._maxVertexDeclarationBit*/1000+renderElement._getVertexBuffer().vertexDeclaration.id;\n\t}\n\n\t/**\n\t*更新\n\t*@param state 渲染相关状态\n\t*/\n\t__proto._update=function(state){\n\t\tstate.owner=this;\n\t\tif (this._activeInHierarchy){\n\t\t\tthis._updateComponents(state);\n\t\t\tthis._lateUpdateComponents(state);\n\t\t\tStat.spriteCount++;\n\t\t\tthis._childs.length && this._updateChilds(state);\n\t\t}\n\t}\n\n\t/**\n\t*获取投影视图世界矩阵。\n\t*@param projectionViewMatrix 投影视图矩阵。\n\t*@return 投影视图世界矩阵。\n\t*/\n\t__proto.getProjectionViewWorldMatrix=function(projectionViewMatrix){\n\t\tMatrix4x4.multiply(projectionViewMatrix,this.transform.worldMatrix,this._projectionViewWorldMatrix);\n\t\treturn this._projectionViewWorldMatrix;\n\t}\n\n\t/**\n\t*加载层级文件，并作为该节点的子节点。\n\t*@param url\n\t*/\n\t__proto.loadHierarchy=function(url){\n\t\tthis.addChild(laya.d3.core.Sprite3D.load(url));\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.addChildAt=function(node,index){\n\t\tif (!((node instanceof laya.d3.core.Sprite3D )))\n\t\t\tthrow new Error(\"Sprite3D:Node type must Sprite3D.\");\n\t\tif (!node || this.destroyed || node===this)return node;\n\t\tif ((node).zOrder)this._set$P(\"hasZorder\",true);\n\t\tif (index >=0 && index <=this._childs.length){\n\t\t\tif (node._parent===this){\n\t\t\t\tvar oldIndex=this.getChildIndex(node);\n\t\t\t\tthis._childs.splice(oldIndex,1);\n\t\t\t\tthis._childs.splice(index,0,node);\n\t\t\t\tif (this.conchModel){\n\t\t\t\t\tthis.conchModel.removeChild(node.conchModel);\n\t\t\t\t\tthis.conchModel.addChildAt(node.conchModel,index);\n\t\t\t\t}\n\t\t\t\tthis._childChanged();\n\t\t\t\t}else {\n\t\t\t\tnode.parent && node.parent.removeChild(node);\n\t\t\t\tthis._childs===Node.ARRAY_EMPTY && (this._childs=[]);\n\t\t\t\tthis._childs.splice(index,0,node);\n\t\t\t\tthis.conchModel && this.conchModel.addChildAt(node.conchModel,index);\n\t\t\t\tnode.parent=this;\n\t\t\t\tthis._addChild3D(node);\n\t\t\t}\n\t\t\treturn node;\n\t\t\t}else {\n\t\t\tthrow new Error(\"appendChildAt:The index is out of bounds\");\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.addChild=function(node){\n\t\tif (!((node instanceof laya.d3.core.Sprite3D )))\n\t\t\tthrow new Error(\"Sprite3D:Node type must Sprite3D.\");\n\t\tif (!node || this.destroyed || node===this)return node;\n\t\tif ((node).zOrder)this._set$P(\"hasZorder\",true);\n\t\tif (node._parent===this){\n\t\t\tvar index=this.getChildIndex(node);\n\t\t\tif (index!==this._childs.length-1){\n\t\t\t\tthis._childs.splice(index,1);\n\t\t\t\tthis._childs.push(node);\n\t\t\t\tif (this.conchModel){\n\t\t\t\t\tthis.conchModel.removeChild(node.conchModel);\n\t\t\t\t\tthis.conchModel.addChildAt(node.conchModel,this._childs.length-1);\n\t\t\t\t}\n\t\t\t\tthis._childChanged();\n\t\t\t}\n\t\t\t}else {\n\t\t\tnode.parent && node.parent.removeChild(node);\n\t\t\tthis._childs===Node.ARRAY_EMPTY && (this._childs=[]);\n\t\t\tthis._childs.push(node);\n\t\t\tthis.conchModel && this.conchModel.addChildAt(node.conchModel,this._childs.length-1);\n\t\t\tnode.parent=this;\n\t\t\tthis._childChanged();\n\t\t\tthis._addChild3D(node);\n\t\t}\n\t\treturn node;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.removeChildAt=function(index){\n\t\tvar node=this.getChildAt(index);\n\t\tif (node){\n\t\t\tthis._removeChild3D(node);\n\t\t\tthis._childs.splice(index,1);\n\t\t\tthis.conchModel && this.conchModel.removeChild(node.conchModel);\n\t\t\tnode.parent=null;\n\t\t}\n\t\treturn node;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.removeChildren=function(beginIndex,endIndex){\n\t\t(beginIndex===void 0)&& (beginIndex=0);\n\t\t(endIndex===void 0)&& (endIndex=0x7fffffff);\n\t\tif (this._childs && this._childs.length > 0){\n\t\t\tvar childs=this._childs;\n\t\t\tif (beginIndex===0 && endIndex >=n){\n\t\t\t\tvar arr=childs;\n\t\t\t\tthis._childs=Node.ARRAY_EMPTY;\n\t\t\t\t}else {\n\t\t\t\tarr=childs.splice(beginIndex,endIndex-beginIndex);\n\t\t\t}\n\t\t\tfor (var i=0,n=arr.length;i < n;i++){\n\t\t\t\tthis._removeChild3D(arr [i]);\n\t\t\t\tarr[i].parent=null;\n\t\t\t\tthis.conchModel && this.conchModel.removeChild(arr[i].conchModel);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar json=data[0];\n\t\tif (json.type!==\"Sprite3D\")\n\t\t\tthrow new Error(\"Sprite3D: The .lh file root type must be Sprite3D,please use other function to  load  this file.\");\n\t\tvar innerResouMap=data[1];\n\t\tUtils3D._createNodeByJson(this,json,this,innerResouMap);\n\t\tthis.event(/*laya.events.Event.HIERARCHY_LOADED*/\"hierarchyloaded\",[this]);\n\t\tthis.__loaded=true;\n\t}\n\n\t/**\n\t*克隆。\n\t*@param destObject 克隆源。\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tif (this.destroyed)\n\t\t\tthrow new Error(\"Sprite3D: Can't be cloned if the Sprite3D has destroyed.\");\n\t\tvar destSprite3D=destObject;\n\t\tdestSprite3D.name=this.name;\n\t\tdestSprite3D._destroyed=this._destroyed;\n\t\tdestSprite3D.timer=this.timer;\n\t\tdestSprite3D._$P=this._$P;\n\t\tdestSprite3D.active=this._active;\n\t\tvar destLocalPosition=destSprite3D.transform.localPosition;\n\t\tthis.transform.localPosition.cloneTo(destLocalPosition);\n\t\tdestSprite3D.transform.localPosition=destLocalPosition;\n\t\tvar destLocalRotation=destSprite3D.transform.localRotation;\n\t\tthis.transform.localRotation.cloneTo(destLocalRotation);\n\t\tdestSprite3D.transform.localRotation=destLocalRotation;\n\t\tvar destLocalScale=destSprite3D.transform.localScale;\n\t\tthis.transform.localScale.cloneTo(destLocalScale);\n\t\tdestSprite3D.transform.localScale=destLocalScale;\n\t\tdestSprite3D.isStatic=this.isStatic;\n\t\tvar i=0,n=0;\n\t\tfor (i=0,n=this._componentsMap.length;i < n;i++){\n\t\t\tvar destComponent=destSprite3D.addComponent(this._componentsMap[i]);\n\t\t\tthis._components[i]._cloneTo(destComponent);\n\t\t}\n\t\tfor (i=0,n=this._childs.length;i < n;i++)\n\t\tdestSprite3D.addChild(this._childs[i].clone());\n\t\tvar destAnimator=destSprite3D.getComponentByType(Animator);\n\t\tif (destAnimator){\n\t\t\tvar destLinkSpritesData=destAnimator._linkSpritesData;\n\t\t\tif (destLinkSpritesData){\n\t\t\t\tfor (var k in destLinkSpritesData){\n\t\t\t\t\tvar path=destLinkSpritesData[k];\n\t\t\t\t\tvar sp=destSprite3D;\n\t\t\t\t\tfor (var j=0,m=path.length;j < m;j++){\n\t\t\t\t\t\tsp=sp.getChildByName(path[j]);\n\t\t\t\t\t\tif (!sp)\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t\tif (sp){\n\t\t\t\t\t\tvar node=destAnimator._avatarNodeMap[k];\n\t\t\t\t\t\tsp._isLinkSpriteToAnimationNode(destAnimator,node,true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*克隆。\n\t*@return 克隆副本。\n\t*/\n\t__proto.clone=function(){\n\t\tvar destSprite3D=/*__JS__ */new this.constructor();\n\t\tthis.cloneTo(destSprite3D);\n\t\treturn destSprite3D;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\tlaya.display.Node.prototype.destroy.call(this,destroyChild);\n\t\tvar i=0,n=0;\n\t\tfor (i=0,n=this._components.length;i < n;i++)\n\t\tthis._components[i]._destroy();\n\t\tthis._components=null;\n\t\tthis._componentsMap=null;\n\t\tthis._typeComponentsIndices=null;\n\t\tthis._transform=null;\n\t\tthis._colliders=null;\n\t\tLoader.clearRes(this.url);\n\t\t(this.loaded)|| (Laya3D._cancelLoadByUrl(this.url));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._handleSpriteToAvatar=function(animator,isLink){\n\t\tvar i=0,n=0;\n\t\tvar avatarNodes=animator._avatarNodes;\n\t\tvar node=animator._avatarNodeMap[this.name];\n\t\tif (node && node.name===this.name && !this._transform.dummy)\n\t\t\tthis._isLinkSpriteToAnimationNode(animator,node,isLink);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setAnimatorToLinkAvatar=function(animator,isLink){\n\t\tthis._handleSpriteToAvatar(animator,isLink);\n\t\tfor (var i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar child=this._childs[i];\n\t\t\tchild._setAnimatorToLinkAvatar(animator,isLink);\n\t\t}\n\t}\n\n\t/**\n\t*获取在场景中是否激活。\n\t*@return 在场景中是否激活。\n\t*/\n\t__getset(0,__proto,'activeInHierarchy',function(){\n\t\treturn this._activeInHierarchy;\n\t});\n\n\t/**\n\t*@private\n\t*/\n\t__getset(0,__proto,'_loaded',null,function(value){\n\t\tthis.__loaded=value;\n\t});\n\n\t/**\n\t*设置是否激活。\n\t*@param value 是否激活。\n\t*/\n\t/**\n\t*获取自身是否激活。\n\t*@return 自身是否激活。\n\t*/\n\t__getset(0,__proto,'active',function(){\n\t\treturn this._active;\n\t\t},function(value){\n\t\tif (this._active!==value){\n\t\t\tthis._active=value;\n\t\t\tif (this._parent){\n\t\t\t\tif ((this._parent===this._scene && this._parent.displayedInStage)|| (this._parent)._activeInHierarchy){\n\t\t\t\t\tif (value)\n\t\t\t\t\t\tthis._activeHierarchy();\n\t\t\t\t\telse\n\t\t\t\t\tthis._inActiveHierarchy();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*获得组件的数量。\n\t*@return 组件数量。\n\t*/\n\t__getset(0,__proto,'componentsCount',function(){\n\t\treturn this._components.length;\n\t});\n\n\t/**\n\t*获取是否已加载完成。\n\t*/\n\t__getset(0,__proto,'loaded',function(){\n\t\treturn this.__loaded;\n\t});\n\n\t/**\n\t*获取唯一标识ID。\n\t*@return 唯一标识ID。\n\t*/\n\t__getset(0,__proto,'id',function(){\n\t\treturn this._id;\n\t});\n\n\t/**\n\t*获取资源的URL地址。\n\t*@return URL地址。\n\t*/\n\t__getset(0,__proto,'url',function(){\n\t\treturn this._url;\n\t});\n\n\t/**\n\t*设置蒙版。\n\t*@param value 蒙版。\n\t*/\n\t/**\n\t*获取蒙版。\n\t*@return 蒙版。\n\t*/\n\t__getset(0,__proto,'layer',function(){\n\t\treturn this._layer;\n\t\t},function(value){\n\t\tif (this._layer!==value){\n\t\t\tif (value){\n\t\t\t\tif (this._activeInHierarchy){\n\t\t\t\t\tvar i=0,n=this._colliders.length;\n\t\t\t\t\tif (this._layer){\n\t\t\t\t\t\tfor (i=0;i < n;i++)\n\t\t\t\t\t\tthis._layer._removeCollider(this._colliders[i]);\n\t\t\t\t\t}\n\t\t\t\t\tfor (i=0;i < n;i++)\n\t\t\t\t\tvalue._addCollider(this._colliders[i]);\n\t\t\t\t}\n\t\t\t\tthis._layer=value;\n\t\t\t\tthis.event(/*laya.events.Event.LAYER_CHANGED*/\"layerchanged\",value);\n\t\t\t\t}else {\n\t\t\t\tthrow new Error(\"Layer value can be null.\");\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*获得所属场景。\n\t*@return 场景。\n\t*/\n\t__getset(0,__proto,'scene',function(){\n\t\treturn this._scene;\n\t});\n\n\t/**\n\t*获取精灵变换。\n\t*/\n\t__getset(0,__proto,'transform',function(){\n\t\treturn this._transform;\n\t});\n\n\tSprite3D.instantiate=function(original,parent,worldPositionStays,position,rotation){\n\t\t(worldPositionStays===void 0)&& (worldPositionStays=true);\n\t\tvar destSprite3D=original.clone();\n\t\t(parent)&& (parent.addChild(destSprite3D));\n\t\tvar transform=destSprite3D.transform;\n\t\tif (worldPositionStays){\n\t\t\tvar worldMatrix=transform.worldMatrix;\n\t\t\toriginal.transform.worldMatrix.cloneTo(worldMatrix);\n\t\t\ttransform.worldMatrix=worldMatrix;\n\t\t\t}else {\n\t\t\t(position)&& (transform.position=position);\n\t\t\t(rotation)&& (transform.rotation=rotation);\n\t\t}\n\t\treturn destSprite3D;\n\t}\n\n\tSprite3D.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,Sprite3D);\n\t}\n\n\tSprite3D.WORLDMATRIX=0;\n\tSprite3D.MVPMATRIX=1;\n\tSprite3D._uniqueIDCounter=0;\n\tSprite3D._nameNumberCounter=0;\n\treturn Sprite3D;\n})(ComponentNode)\n\n\n/**\n*<code>BlinnPhongMaterial</code> 类用于实现Blinn-Phong材质。\n*/\n//class laya.d3.core.material.BlinnPhongMaterial extends laya.d3.core.material.BaseMaterial\nvar BlinnPhongMaterial=(function(_super){\n\tfunction BlinnPhongMaterial(){\n\t\t/**@private */\n\t\t//this._albedoColor=null;\n\t\t/**@private */\n\t\t//this._albedoIntensity=NaN;\n\t\t/**@private */\n\t\t//this._enableLighting=false;\n\t\tBlinnPhongMaterial.__super.call(this);\n\t\tthis.setShaderName(\"BLINNPHONG\");\n\t\tthis._albedoIntensity=1.0;\n\t\tthis._albedoColor=new Vector4(1.0,1.0,1.0,1.0);\n\t\tthis._setColor(6,new Vector4(1.0,1.0,1.0,1.0));\n\t\tthis._setColor(8,new Vector3(1.0,1.0,1.0));\n\t\tthis._setNumber(9,0.078125);\n\t\tthis._setColor(10,new Vector3(1.0,1.0,1.0));\n\t\tthis._setNumber(0,0.5);\n\t\tthis._setColor(11,new Vector4(1.0,1.0,0.0,0.0));\n\t\tthis._enableLighting=true;\n\t\tthis.renderMode=0;\n\t}\n\n\t__class(BlinnPhongMaterial,'laya.d3.core.material.BlinnPhongMaterial',_super);\n\tvar __proto=BlinnPhongMaterial.prototype;\n\t/**\n\t*禁用灯光。\n\t*/\n\t__proto.disableLight=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT | ShaderCompile3D.SHADERDEFINE_SPOTLIGHT | ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t}\n\n\t/**\n\t*禁用雾化。\n\t*/\n\t__proto.disableFog=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_FOG);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\t_super.prototype.cloneTo.call(this,destObject);\n\t\tvar destMaterial=destObject;\n\t\tdestMaterial._enableLighting=this._enableLighting;\n\t\tdestMaterial._albedoIntensity=this._albedoIntensity;\n\t\tthis._albedoColor.cloneTo(destMaterial._albedoColor);\n\t}\n\n\t/**\n\t*设置渲染模式。\n\t*@return 渲染模式。\n\t*/\n\t__getset(0,__proto,'renderMode',null,function(value){\n\t\tswitch (value){\n\t\t\tcase 0:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis._removeShaderDefine(BlinnPhongMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.alphaTest=true;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis._removeShaderDefine(BlinnPhongMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis._removeShaderDefine(BlinnPhongMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis._addShaderDefine(BlinnPhongMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"Material:renderMode value error.\");\n\t\t\t}\n\t\tthis._conchMaterial && this._conchMaterial.setRenderMode(value);\n\t});\n\n\t/**\n\t*设置法线贴图。\n\t*@param value 法线贴图。\n\t*/\n\t/**\n\t*获取法线贴图。\n\t*@return 法线贴图。\n\t*/\n\t__getset(0,__proto,'normalTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_NORMALMAP);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_NORMALMAP);\n\t\tthis._setTexture(2,value);\n\t});\n\n\t/**\n\t*设置反射颜色。\n\t*@param value 反射颜色。\n\t*/\n\t/**\n\t*获取反射颜色。\n\t*@return value 反射颜色。\n\t*/\n\t__getset(0,__proto,'reflectColor',function(){\n\t\treturn this._getColor(10);\n\t\t},function(value){\n\t\tthis._setColor(10,value);\n\t});\n\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(11);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t}\n\t\tthis._setColor(11,value);\n\t});\n\n\t/**\n\t*设置高光颜色。\n\t*@param value 高光颜色。\n\t*/\n\t/**\n\t*获取高光颜色。\n\t*@return 高光颜色。\n\t*/\n\t__getset(0,__proto,'specularColor',function(){\n\t\treturn this._getColor(8);\n\t\t},function(value){\n\t\tthis._setColor(8,value);\n\t});\n\n\t/**\n\t*设置漫反射颜色。\n\t*@param value 漫反射颜色。\n\t*/\n\t/**\n\t*获取漫反射颜色。\n\t*@return 漫反射颜色。\n\t*/\n\t__getset(0,__proto,'albedoColor',function(){\n\t\treturn this._albedoColor;\n\t\t},function(value){\n\t\tvar finalAlbedo=this._getColor(6);\n\t\tVector4.scale(value,this._albedoIntensity,finalAlbedo);\n\t\tthis._albedoColor=value;\n\t});\n\n\t/**\n\t*设置漫反射颜色。\n\t*@param value 漫反射颜色。\n\t*/\n\t/**\n\t*获取漫反射颜色。\n\t*@return 漫反射颜色。\n\t*/\n\t__getset(0,__proto,'albedoIntensity',function(){\n\t\treturn this._albedoIntensity;\n\t\t},function(value){\n\t\tif (this._albedoIntensity!==value){\n\t\t\tvar finalAlbedo=this._getColor(6);\n\t\t\tVector4.scale(this._albedoColor,value,finalAlbedo);\n\t\t\tthis._albedoIntensity=value;\n\t\t}\n\t});\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'albedoTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_DIFFUSEMAP);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_DIFFUSEMAP);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置高光强度,范围为0到1。\n\t*@param value 高光强度。\n\t*/\n\t/**\n\t*获取高光强度,范围为0到1。\n\t*@return 高光强度。\n\t*/\n\t__getset(0,__proto,'shininess',function(){\n\t\treturn this._getNumber(9);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(9,value);\n\t});\n\n\t/**\n\t*设置高光贴图，高光强度则从该贴图RGB值中获取,如果该值为空则从漫反射贴图的Alpha通道获取。\n\t*@param value 高光贴图。\n\t*/\n\t/**\n\t*获取高光贴图。\n\t*@return 高光贴图。\n\t*/\n\t__getset(0,__proto,'specularTexture',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_SPECULARMAP);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_SPECULARMAP);\n\t\tthis._setTexture(3,value);\n\t});\n\n\t/**\n\t*设置反射贴图。\n\t*@param value 反射贴图。\n\t*/\n\t/**\n\t*获取反射贴图。\n\t*@return 反射贴图。\n\t*/\n\t__getset(0,__proto,'reflectTexture',function(){\n\t\treturn this._getTexture(5);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_REFLECTMAP);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.BlinnPhongMaterial.SHADERDEFINE_REFLECTMAP);\n\t\tthis._setTexture(5,value);\n\t});\n\n\t/**\n\t*设置是否启用光照。\n\t*@param value 是否启用光照。\n\t*/\n\t/**\n\t*获取是否启用光照。\n\t*@return 是否启用光照。\n\t*/\n\t__getset(0,__proto,'enableLighting',function(){\n\t\treturn this._enableLighting;\n\t\t},function(value){\n\t\tif (this._enableLighting!==value){\n\t\t\tif (value)\n\t\t\t\tthis._removeDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT | ShaderCompile3D.SHADERDEFINE_SPOTLIGHT | ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t\t\telse\n\t\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT | ShaderCompile3D.SHADERDEFINE_SPOTLIGHT | ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t\t\tthis._enableLighting=value;\n\t\t}\n\t});\n\n\tBlinnPhongMaterial.__init__=function(){\n\t\tBlinnPhongMaterial.SHADERDEFINE_DIFFUSEMAP=BlinnPhongMaterial.shaderDefines.registerDefine(\"DIFFUSEMAP\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_NORMALMAP=BlinnPhongMaterial.shaderDefines.registerDefine(\"NORMALMAP\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_SPECULARMAP=BlinnPhongMaterial.shaderDefines.registerDefine(\"SPECULARMAP\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_REFLECTMAP=BlinnPhongMaterial.shaderDefines.registerDefine(\"REFLECTMAP\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_TILINGOFFSET=BlinnPhongMaterial.shaderDefines.registerDefine(\"TILINGOFFSET\");\n\t\tBlinnPhongMaterial.SHADERDEFINE_ADDTIVEFOG=BlinnPhongMaterial.shaderDefines.registerDefine(\"ADDTIVEFOG\");\n\t}\n\n\tBlinnPhongMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,BlinnPhongMaterial);\n\t}\n\n\tBlinnPhongMaterial.SPECULARSOURCE_DIFFUSEMAPALPHA=0;\n\tBlinnPhongMaterial.SPECULARSOURCE_SPECULARMAP=0;\n\tBlinnPhongMaterial.RENDERMODE_OPAQUE=0;\n\tBlinnPhongMaterial.RENDERMODE_CUTOUT=1;\n\tBlinnPhongMaterial.RENDERMODE_TRANSPARENT=2;\n\tBlinnPhongMaterial.RENDERMODE_ADDTIVE=3;\n\tBlinnPhongMaterial.SHADERDEFINE_DIFFUSEMAP=0;\n\tBlinnPhongMaterial.SHADERDEFINE_NORMALMAP=0;\n\tBlinnPhongMaterial.SHADERDEFINE_SPECULARMAP=0;\n\tBlinnPhongMaterial.SHADERDEFINE_REFLECTMAP=0;\n\tBlinnPhongMaterial.SHADERDEFINE_TILINGOFFSET=0;\n\tBlinnPhongMaterial.SHADERDEFINE_ADDTIVEFOG=0;\n\tBlinnPhongMaterial.ALBEDOTEXTURE=1;\n\tBlinnPhongMaterial.NORMALTEXTURE=2;\n\tBlinnPhongMaterial.SPECULARTEXTURE=3;\n\tBlinnPhongMaterial.EMISSIVETEXTURE=4;\n\tBlinnPhongMaterial.REFLECTTEXTURE=5;\n\tBlinnPhongMaterial.ALBEDOCOLOR=6;\n\tBlinnPhongMaterial.MATERIALSPECULAR=8;\n\tBlinnPhongMaterial.SHININESS=9;\n\tBlinnPhongMaterial.MATERIALREFLECT=10;\n\tBlinnPhongMaterial.TILINGOFFSET=11;\n\t__static(BlinnPhongMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new BlinnPhongMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn BlinnPhongMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.material.ExtendTerrainMaterial extends laya.d3.core.material.BaseMaterial\nvar ExtendTerrainMaterial=(function(_super){\n\t//NATIVE\n\tfunction ExtendTerrainMaterial(){\n\t\tExtendTerrainMaterial.__super.call(this);\n\t\tthis.setShaderName(\"ExtendTerrain\");\n\t\tthis.renderMode=1;\n\t}\n\n\t__class(ExtendTerrainMaterial,'laya.d3.core.material.ExtendTerrainMaterial',_super);\n\tvar __proto=ExtendTerrainMaterial.prototype;\n\t__proto._setDetailNum=function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM5);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM5);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM5);\n\t\t\t\tbreak ;\n\t\t\tcase 4:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM5);\n\t\t\t\tbreak ;\n\t\t\tcase 5:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM5);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.ExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t/**\n\t*设置禁受光照影响。\n\t*/\n\t__proto.disableLight=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT | ShaderCompile3D.SHADERDEFINE_SPOTLIGHT | ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t}\n\n\t__getset(0,__proto,'diffuseScaleOffset2',null,function(scaleOffset2){\n\t\tthis._setColor(7,scaleOffset2);\n\t});\n\n\t/**\n\t*设置splatAlpha贴图。\n\t*@param value splatAlpha贴图。\n\t*/\n\t/**\n\t*获取splatAlpha贴图。\n\t*@return splatAlpha贴图。\n\t*/\n\t__getset(0,__proto,'splatAlphaTexture',function(){\n\t\treturn this._getTexture(0);\n\t\t},function(value){\n\t\tthis._setTexture(0,value);\n\t});\n\n\t__getset(0,__proto,'diffuseScaleOffset3',null,function(scaleOffset3){\n\t\tthis._setColor(8,scaleOffset3);\n\t});\n\n\t/**\n\t*设置第一层贴图。\n\t*@param value 第一层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture1',null,function(value){\n\t\tthis._setTexture(1,value);\n\t\tthis._setDetailNum(1);\n\t});\n\n\t/**\n\t*设置渲染模式。\n\t*@return 渲染模式。\n\t*/\n\t__getset(0,__proto,'renderMode',null,function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.depthTest=0x0203;\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"ExtendTerrainMaterial:renderMode value error.\");\n\t\t\t}\n\t\tthis._conchMaterial && this._conchMaterial.setRenderMode(value);\n\t});\n\n\t/**\n\t*设置第二层贴图。\n\t*@param value 第二层贴图。\n\t*/\n\t/**\n\t*获取第二层贴图。\n\t*@return 第二层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture2',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tthis._setTexture(2,value);\n\t\tthis._setDetailNum(2);\n\t});\n\n\t__getset(0,__proto,'diffuseScaleOffset1',null,function(scaleOffset1){\n\t\tthis._setColor(6,scaleOffset1);\n\t});\n\n\t/**\n\t*设置第三层贴图。\n\t*@param value 第三层贴图。\n\t*/\n\t/**\n\t*获取第三层贴图。\n\t*@return 第三层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture3',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tthis._setTexture(3,value);\n\t\tthis._setDetailNum(3);\n\t});\n\n\t/**\n\t*设置第四层贴图。\n\t*@param value 第四层贴图。\n\t*/\n\t/**\n\t*获取第四层贴图。\n\t*@return 第四层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture4',function(){\n\t\treturn this._getTexture(4);\n\t\t},function(value){\n\t\tthis._setTexture(4,value);\n\t\tthis._setDetailNum(4);\n\t});\n\n\t/**\n\t*设置第五层贴图。\n\t*@param value 第五层贴图。\n\t*/\n\t/**\n\t*获取第五层贴图。\n\t*@return 第五层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture5',function(){\n\t\treturn this._getTexture(5);\n\t\t},function(value){\n\t\tthis._setTexture(5,value);\n\t\tthis._setDetailNum(5);\n\t});\n\n\t__getset(0,__proto,'diffuseScaleOffset4',null,function(scaleOffset4){\n\t\tthis._setColor(9,scaleOffset4);\n\t});\n\n\t__getset(0,__proto,'diffuseScaleOffset5',null,function(scaleOffset5){\n\t\tthis._setColor(10,scaleOffset5);\n\t});\n\n\t/**\n\t*设置反射率颜色。\n\t*@param value 反射率颜色。\n\t*/\n\t/**\n\t*获取反射率颜色。\n\t*@return 反射率颜色。\n\t*/\n\t__getset(0,__proto,'albedo',function(){\n\t\treturn this._getColor(14);\n\t\t},function(value){\n\t\tthis._setColor(14,value);\n\t});\n\n\t/**\n\t*设置环境光颜色。\n\t*@param value 环境光颜色\n\t*/\n\t/**\n\t*获取环境光颜色。\n\t*@return 环境光颜色。\n\t*/\n\t__getset(0,__proto,'ambientColor',function(){\n\t\treturn this._getColor(11);\n\t\t},function(value){\n\t\tthis._setColor(11,value);\n\t});\n\n\t/**\n\t*设置漫反射颜色。\n\t*@param value 漫反射颜色。\n\t*/\n\t/**\n\t*获取漫反射颜色。\n\t*@return 漫反射颜色。\n\t*/\n\t__getset(0,__proto,'diffuseColor',function(){\n\t\treturn this._getColor(12);\n\t\t},function(value){\n\t\tthis._setColor(12,value);\n\t});\n\n\t/**\n\t*设置高光颜色。\n\t*@param value 高光颜色。\n\t*/\n\t/**\n\t*获取高光颜色。\n\t*@return 高光颜色。\n\t*/\n\t__getset(0,__proto,'specularColor',function(){\n\t\treturn this._getColor(13);\n\t\t},function(value){\n\t\tthis._setColor(13,value);\n\t});\n\n\tExtendTerrainMaterial.__init__=function(){\n\t\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM1=ExtendTerrainMaterial.shaderDefines.registerDefine(\"ExtendTerrain_DETAIL_NUM1\");\n\t\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM2=ExtendTerrainMaterial.shaderDefines.registerDefine(\"ExtendTerrain_DETAIL_NUM2\");\n\t\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM3=ExtendTerrainMaterial.shaderDefines.registerDefine(\"ExtendTerrain_DETAIL_NUM3\");\n\t\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM4=ExtendTerrainMaterial.shaderDefines.registerDefine(\"ExtendTerrain_DETAIL_NUM4\");\n\t\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM5=ExtendTerrainMaterial.shaderDefines.registerDefine(\"ExtendTerrain_DETAIL_NUM5\");\n\t}\n\n\tExtendTerrainMaterial.RENDERMODE_OPAQUE=1;\n\tExtendTerrainMaterial.RENDERMODE_TRANSPARENT=2;\n\tExtendTerrainMaterial.SPLATALPHATEXTURE=0;\n\tExtendTerrainMaterial.DIFFUSETEXTURE1=1;\n\tExtendTerrainMaterial.DIFFUSETEXTURE2=2;\n\tExtendTerrainMaterial.DIFFUSETEXTURE3=3;\n\tExtendTerrainMaterial.DIFFUSETEXTURE4=4;\n\tExtendTerrainMaterial.DIFFUSETEXTURE5=5;\n\tExtendTerrainMaterial.DIFFUSESCALEOFFSET1=6;\n\tExtendTerrainMaterial.DIFFUSESCALEOFFSET2=7;\n\tExtendTerrainMaterial.DIFFUSESCALEOFFSET3=8;\n\tExtendTerrainMaterial.DIFFUSESCALEOFFSET4=9;\n\tExtendTerrainMaterial.DIFFUSESCALEOFFSET5=10;\n\tExtendTerrainMaterial.MATERIALAMBIENT=11;\n\tExtendTerrainMaterial.MATERIALDIFFUSE=12;\n\tExtendTerrainMaterial.MATERIALSPECULAR=13;\n\tExtendTerrainMaterial.MATERIALALBEDO=14;\n\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM1=0;\n\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM2=0;\n\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM3=0;\n\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM4=0;\n\tExtendTerrainMaterial.SHADERDEFINE_DETAIL_NUM5=0;\n\t__static(ExtendTerrainMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn ExtendTerrainMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.material.GlitterMaterial extends laya.d3.core.material.BaseMaterial\nvar GlitterMaterial=(function(_super){\n\tfunction GlitterMaterial(){\n\t\tGlitterMaterial.__super.call(this);\n\t\tthis.setShaderName(\"GLITTER\");\n\t\tthis.renderMode=1;\n\t\tthis._setColor(3,new Vector4(1.0,1.0,1.0,1.0));\n\t\tthis._setColor(2,new Vector4(1.0,1.0,1.0,1.0));\n\t}\n\n\t__class(GlitterMaterial,'laya.d3.core.material.GlitterMaterial',_super);\n\tvar __proto=GlitterMaterial.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.setShaderName=function(name){\n\t\t_super.prototype.setShaderName.call(this,name);\n\t}\n\n\t/**\n\t*设置渲染模式。\n\t*@return 渲染模式。\n\t*/\n\t__getset(0,__proto,'renderMode',null,function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=0;\n\t\t\t\tbreak ;\n\t\t\tcase 13:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tbreak ;\n\t\t\tcase 14:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tbreak ;\n\t\t\tcase 15:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tbreak ;\n\t\t\tcase 16:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tbreak ;\n\t\t\tcase 5:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tbreak ;\n\t\t\tcase 6:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tbreak ;\n\t\t\tcase 7:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tbreak ;\n\t\t\tcase 8:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tbreak ;\n\t\t\tcase 9:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tbreak ;\n\t\t\tcase 10:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tbreak ;\n\t\t\tcase 11:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tbreak ;\n\t\t\tcase 12:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"Material:renderMode value error.\");\n\t\t\t}\n\t\tthis._conchMaterial && this._conchMaterial.setRenderMode(value);\n\t});\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置反射率。\n\t*@param value 反射率。\n\t*/\n\t/**\n\t*获取反射率。\n\t*@return 反射率。\n\t*/\n\t__getset(0,__proto,'albedo',function(){\n\t\treturn this._getColor(2);\n\t\t},function(value){\n\t\tthis._setColor(2,value);\n\t});\n\n\t/**\n\t*设置颜色。\n\t*@param value 颜色。\n\t*/\n\t/**\n\t*获取颜色。\n\t*@return 漫反射颜色。\n\t*/\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._getColor(3);\n\t\t},function(value){\n\t\tthis._setColor(3,value);\n\t});\n\n\tGlitterMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,GlitterMaterial);\n\t}\n\n\tGlitterMaterial.RENDERMODE_OPAQUE=1;\n\tGlitterMaterial.RENDERMODE_OPAQUEDOUBLEFACE=2;\n\tGlitterMaterial.RENDERMODE_TRANSPARENT=13;\n\tGlitterMaterial.RENDERMODE_TRANSPARENTDOUBLEFACE=14;\n\tGlitterMaterial.RENDERMODE_ADDTIVE=15;\n\tGlitterMaterial.RENDERMODE_ADDTIVEDOUBLEFACE=16;\n\tGlitterMaterial.RENDERMODE_DEPTHREAD_TRANSPARENT=5;\n\tGlitterMaterial.RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE=6;\n\tGlitterMaterial.RENDERMODE_DEPTHREAD_ADDTIVE=7;\n\tGlitterMaterial.RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE=8;\n\tGlitterMaterial.RENDERMODE_NONDEPTH_TRANSPARENT=9;\n\tGlitterMaterial.RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE=10;\n\tGlitterMaterial.RENDERMODE_NONDEPTH_ADDTIVE=11;\n\tGlitterMaterial.RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE=12;\n\tGlitterMaterial.DIFFUSETEXTURE=1;\n\tGlitterMaterial.ALBEDO=2;\n\tGlitterMaterial.UNICOLOR=3;\n\t__static(GlitterMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new GlitterMaterial();}\n\t]);\n\treturn GlitterMaterial;\n})(BaseMaterial)\n\n\n//class laya.d3.shader.Shader3D extends laya.webgl.shader.BaseShader\nvar Shader3D=(function(_super){\n\tfunction Shader3D(vs,ps,attributeMap,sceneUniformMap,cameraUniformMap,spriteUniformMap,materialUniformMap,renderElementUniformMap){\n\t\t//this._attributeMap=null;\n\t\t//this._sceneUniformMap=null;\n\t\t//this._cameraUniformMap=null;\n\t\t//this._spriteUniformMap=null;\n\t\t//this._materialUniformMap=null;\n\t\t//this._renderElementUniformMap=null;\n\t\t//this._vs=null;\n\t\t//this._ps=null;\n\t\tthis._curActTexIndex=0;\n\t\t//this._reCompile=false;\n\t\t//this._vshader=null;\n\t\t//this._pshader=null;\n\t\tthis._program=null;\n\t\tthis._attributeParams=null;\n\t\tthis._uniformParams=null;\n\t\tthis._attributeParamsMap=[];\n\t\tthis._sceneUniformParamsMap=[];\n\t\tthis._cameraUniformParamsMap=[];\n\t\tthis._spriteUniformParamsMap=[];\n\t\tthis._materialUniformParamsMap=[];\n\t\tthis._renderElementUniformParamsMap=[];\n\t\t//this._id=0;\n\t\t/**@private */\n\t\t//this._uploadLoopCount=0;\n\t\t/**@private */\n\t\t//this._uploadRenderElement=null;\n\t\t/**@private */\n\t\t//this._uploadMaterial=null;\n\t\t/**@private */\n\t\t//this._uploadSprite3D=null;\n\t\t/**@private */\n\t\t//this._uploadCamera=null;\n\t\t/**@private */\n\t\t//this._uploadScene=null;\n\t\t/**@private */\n\t\t//this._uploadVertexBuffer=null;\n\t\tShader3D.__super.call(this);\n\t\tif ((!vs)|| (!ps))throw \"Shader Error\";\n\t\tthis._id=++Shader3D._count;\n\t\tthis._vs=vs;\n\t\tthis._ps=ps;\n\t\tthis._attributeMap=attributeMap;\n\t\tthis._sceneUniformMap=sceneUniformMap;\n\t\tthis._cameraUniformMap=cameraUniformMap;\n\t\tthis._spriteUniformMap=spriteUniformMap;\n\t\tthis._materialUniformMap=materialUniformMap;\n\t\tthis._renderElementUniformMap=renderElementUniformMap;\n\t\tthis.recreateResource();\n\t}\n\n\t__class(Shader3D,'laya.d3.shader.Shader3D',_super);\n\tvar __proto=Shader3D.prototype;\n\t__proto.recreateResource=function(){\n\t\tthis._compile();\n\t\tthis.completeCreate();\n\t\tthis.memorySize=0;\n\t}\n\n\t//忽略尺寸尺寸\n\t__proto.disposeResource=function(){\n\t\tWebGL.mainContext.deleteShader(this._vshader);\n\t\tWebGL.mainContext.deleteShader(this._pshader);\n\t\tWebGL.mainContext.deleteProgram(this._program);\n\t\tthis._vshader=this._pshader=this._program=null;\n\t\tthis._attributeParams=null;\n\t\tthis._uniformParams=null;\n\t\tthis.memorySize=0;\n\t\tthis._curActTexIndex=0;\n\t}\n\n\t__proto._compile=function(){\n\t\tif (!this._vs || !this._ps || this._attributeParams || this._uniformParams)\n\t\t\treturn;\n\t\tthis._reCompile=true;\n\t\tthis._attributeParams=[];\n\t\tthis._uniformParams=[];\n\t\tvar text=[this._vs,this._ps];\n\t\tvar result;\n\t\tvar gl=WebGL.mainContext;\n\t\tthis._program=gl.createProgram();\n\t\tthis._vshader=Shader3D._createShader(gl,text[0],/*laya.webgl.WebGLContext.VERTEX_SHADER*/0x8B31);\n\t\tthis._pshader=Shader3D._createShader(gl,text[1],/*laya.webgl.WebGLContext.FRAGMENT_SHADER*/0x8B30);\n\t\tgl.attachShader(this._program,this._vshader);\n\t\tgl.attachShader(this._program,this._pshader);\n\t\tgl.linkProgram(this._program);\n\t\tif (!Render.isConchApp && ShaderCompile3D.debugMode && !gl.getProgramParameter(this._program,/*laya.webgl.WebGLContext.LINK_STATUS*/0x8B82))\n\t\t\tthrow gl.getProgramInfoLog(this._program);\n\t\tvar one,i=0,j=0,n=0,location;\n\t\tvar attribNum=0;\n\t\tif (Render.isConchApp){\n\t\t\tattribNum=gl.getProgramParameterEx(this._vs,this._ps,\"\",/*laya.webgl.WebGLContext.ACTIVE_ATTRIBUTES*/0x8B89);\n\t\t}\n\t\telse{\n\t\t\tattribNum=gl.getProgramParameter(this._program,/*laya.webgl.WebGLContext.ACTIVE_ATTRIBUTES*/0x8B89);\n\t\t}\n\t\tfor (i=0;i < attribNum;i++){\n\t\t\tvar attrib=null;\n\t\t\tif (Render.isConchApp){\n\t\t\t\tattrib=gl.getActiveAttribEx(this._vs,this._ps,\"\",i);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tattrib=gl.getActiveAttrib(this._program,i);\n\t\t\t}\n\t\t\tlocation=gl.getAttribLocation(this._program,attrib.name);\n\t\t\tone={vartype:\"attribute\",ivartype:0,attrib:attrib,location:location,name:attrib.name,type:attrib.type,isArray:false,isSame:false,preValue:null,indexOfParams:0};\n\t\t\tthis._attributeParams.push(one);\n\t\t};\n\t\tvar nUniformNum=0;\n\t\tif (Render.isConchApp){\n\t\t\tnUniformNum=gl.getProgramParameterEx(this._vs,this._ps,\"\",/*laya.webgl.WebGLContext.ACTIVE_UNIFORMS*/0x8B86);\n\t\t}\n\t\telse{\n\t\t\tnUniformNum=gl.getProgramParameter(this._program,/*laya.webgl.WebGLContext.ACTIVE_UNIFORMS*/0x8B86);\n\t\t}\n\t\tfor (i=0;i < nUniformNum;i++){\n\t\t\tvar uniform=null;\n\t\t\tif (Render.isConchApp){\n\t\t\t\tuniform=gl.getActiveUniformEx(this._vs,this._ps,\"\",i);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tuniform=gl.getActiveUniform(this._program,i);\n\t\t\t}\n\t\t\tlocation=gl.getUniformLocation(this._program,uniform.name);\n\t\t\tone={vartype:\"uniform\",ivartype:1,attrib:attrib,location:location,name:uniform.name,type:uniform.type,isArray:false,isSame:false,preValue:null,indexOfParams:0};\n\t\t\tif (one.name.indexOf('[0]')> 0){\n\t\t\t\tone.name=one.name.substr(0,one.name.length-3);\n\t\t\t\tone.isArray=true;\n\t\t\t\tone.location=gl.getUniformLocation(this._program,one.name);\n\t\t\t}\n\t\t\tthis._uniformParams.push(one);\n\t\t}\n\t\tfor (i=0,n=this._attributeParams.length;i < n;i++){\n\t\t\tone=this._attributeParams[i];\n\t\t\tone.indexOfParams=i;\n\t\t\tone.index=1;\n\t\t\tone.value=[one.location,null];\n\t\t\tone.codename=one.name;\n\t\t\tone.name=(this._attributeMap[one.codename] !=null)? this._attributeMap[one.codename] :one.codename;\n\t\t\tthis._attributeParamsMap.push(one.name);\n\t\t\tthis._attributeParamsMap.push(one);\n\t\t\tone._this=this;\n\t\t\tone.uploadedValue=[];\n\t\t\tone.fun=this._attribute;\n\t\t}\n\t\tfor (i=0,n=this._uniformParams.length;i < n;i++){\n\t\t\tone=this._uniformParams[i];\n\t\t\tone.indexOfParams=i;\n\t\t\tone.index=1;\n\t\t\tone.value=[one.location,null];\n\t\t\tone.codename=one.name;\n\t\t\tif (this._sceneUniformMap[one.codename] !=null){\n\t\t\t\tone.name=this._sceneUniformMap[one.codename];\n\t\t\t\tthis._sceneUniformParamsMap.push(one.name);\n\t\t\t\tthis._sceneUniformParamsMap.push(one);\n\t\t\t\t}else if (this._cameraUniformMap[one.codename] !=null){\n\t\t\t\tone.name=this._cameraUniformMap[one.codename];\n\t\t\t\tthis._cameraUniformParamsMap.push(one.name);\n\t\t\t\tthis._cameraUniformParamsMap.push(one);\n\t\t\t\t}else if (this._spriteUniformMap[one.codename] !=null){\n\t\t\t\tone.name=this._spriteUniformMap[one.codename];\n\t\t\t\tthis._spriteUniformParamsMap.push(one.name);\n\t\t\t\tthis._spriteUniformParamsMap.push(one);\n\t\t\t\t}else if (this._materialUniformMap[one.codename] !=null){\n\t\t\t\tone.name=this._materialUniformMap[one.codename];\n\t\t\t\tthis._materialUniformParamsMap.push(one.name);\n\t\t\t\tthis._materialUniformParamsMap.push(one);\n\t\t\t\t}else if (this._renderElementUniformMap[one.codename] !=null){\n\t\t\t\tone.name=this._renderElementUniformMap[one.codename];\n\t\t\t\tthis._renderElementUniformParamsMap.push(one.name);\n\t\t\t\tthis._renderElementUniformParamsMap.push(one);\n\t\t\t\t}else {\n\t\t\t\tconsole.log(\"Shader:can't find uinform name:\"+one.codename+\" in shader file.\");\n\t\t\t}\n\t\t\tone._this=this;\n\t\t\tone.uploadedValue=[];\n\t\t\tswitch (one.type){\n\t\t\t\tcase /*laya.webgl.WebGLContext.INT*/0x1404:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform1iv :this._uniform1i;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT*/0x1406:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform1fv :this._uniform1f;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_VEC2*/0x8B50:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform_vec2v :this._uniform_vec2;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_VEC3*/0x8B51:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform_vec3v :this._uniform_vec3;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_VEC4*/0x8B52:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform_vec4v :this._uniform_vec4;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.SAMPLER_2D*/0x8B5E:\n\t\t\t\t\tone.fun=this._uniform_sampler2D;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.SAMPLER_CUBE*/0x8B60:\n\t\t\t\t\tone.fun=this._uniform_samplerCube;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_MAT4*/0x8B5C:\n\t\t\t\t\tone.fun=this._uniformMatrix4fv;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.BOOL*/0x8B56:\n\t\t\t\t\tone.fun=this._uniform1i;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_MAT2*/0x8B5A:\n\t\t\t\t\tone.fun=this._uinformMatrix2fv;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_MAT3*/0x8B5B:\n\t\t\t\t\tone.fun=this._uinformMatrix3fv;\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"compile shader err!\");\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t}\n\n\t__proto._attribute=function(one,value){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar enableAtributes=Buffer._enableAtributes;\n\t\tvar location=one.location;\n\t\t(enableAtributes[location])|| (gl.enableVertexAttribArray(location));\n\t\tgl.vertexAttribPointer(location,value[0],value[1],value[2],value[3],value[4]);\n\t\tenableAtributes[location]=Buffer._bindVertexBuffer;\n\t\treturn 1;\n\t}\n\n\t__proto._uniform1f=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value){\n\t\t\tWebGL.mainContext.uniform1f(one.location,uploadedValue[0]=value);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform1fv=function(one,value){\n\t\tif (value.length < 4){\n\t\t\tvar uploadedValue=one.uploadedValue;\n\t\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2] || uploadedValue[3]!==value[3]){\n\t\t\t\tWebGL.mainContext.uniform1fv(one.location,value);\n\t\t\t\tuploadedValue[0]=value[0];\n\t\t\t\tuploadedValue[1]=value[1];\n\t\t\t\tuploadedValue[2]=value[2];\n\t\t\t\tuploadedValue[3]=value[3];\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t}else {\n\t\t\tWebGL.mainContext.uniform1fv(one.location,value);\n\t\t\treturn 1;\n\t\t}\n\t}\n\n\t__proto._uniform_vec2=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1]){\n\t\t\tWebGL.mainContext.uniform2f(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec2v=function(one,value){\n\t\tif (value.length < 2){\n\t\t\tvar uploadedValue=one.uploadedValue;\n\t\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2] || uploadedValue[3]!==value[3]){\n\t\t\t\tWebGL.mainContext.uniform2fv(one.location,value);\n\t\t\t\tuploadedValue[0]=value[0];\n\t\t\t\tuploadedValue[1]=value[1];\n\t\t\t\tuploadedValue[2]=value[2];\n\t\t\t\tuploadedValue[3]=value[3];\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t}else {\n\t\t\tWebGL.mainContext.uniform2fv(one.location,value);\n\t\t\treturn 1;\n\t\t}\n\t}\n\n\t__proto._uniform_vec3=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2]){\n\t\t\tWebGL.mainContext.uniform3f(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1],uploadedValue[2]=value[2]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec3v=function(one,value){\n\t\tWebGL.mainContext.uniform3fv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_vec4=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2] || uploadedValue[3]!==value[3]){\n\t\t\tWebGL.mainContext.uniform4f(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1],uploadedValue[2]=value[2],uploadedValue[3]=value[3]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec4v=function(one,value){\n\t\tWebGL.mainContext.uniform4fv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniformMatrix2fv=function(one,value){\n\t\tWebGL.mainContext.uniformMatrix2fv(one.location,false,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniformMatrix3fv=function(one,value){\n\t\tWebGL.mainContext.uniformMatrix3fv(one.location,false,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniformMatrix4fv=function(one,value){\n\t\tWebGL.mainContext.uniformMatrix4fv(one.location,false,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uinformMatrix2fv=function(one,value){\n\t\tWebGL.mainContext.uniformMatrix2fv(one.location,false,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uinformMatrix3fv=function(one,value){\n\t\tWebGL.mainContext.uniformMatrix3fv(one.location,false,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform1i=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value){\n\t\t\tWebGL.mainContext.uniform1i(one.location,uploadedValue[0]=value);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform1iv=function(one,value){\n\t\tWebGL.mainContext.uniform1iv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_ivec2=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1]){\n\t\t\tWebGL.mainContext.uniform2i(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_ivec2v=function(one,value){\n\t\tWebGL.mainContext.uniform2iv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_vec3i=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2]){\n\t\t\tWebGL.mainContext.uniform3i(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1],uploadedValue[2]=value[2]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec3vi=function(one,value){\n\t\tWebGL.mainContext.uniform3iv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_vec4i=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2] || uploadedValue[3]!==value[3]){\n\t\t\tWebGL.mainContext.uniform4i(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1],uploadedValue[2]=value[2],uploadedValue[3]=value[3]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec4vi=function(one,value){\n\t\tWebGL.mainContext.uniform4iv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_sampler2D=function(one,texture){\n\t\tvar value=texture.source || texture.defaulteTexture.source;\n\t\tvar gl=WebGL.mainContext;\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]==null){\n\t\t\tif (this._curActTexIndex > 7)\n\t\t\t\tthrow new Error(\"Shader3D: shader support textures max count is 8,can't large than it.\");\n\t\t\tuploadedValue[0]=this._curActTexIndex;\n\t\t\tgl.uniform1i(one.location,this._curActTexIndex);\n\t\t\tgl.activeTexture(Shader3D._TEXTURES[this._curActTexIndex]);\n\t\t\tif (value)\n\t\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,value);\n\t\t\tthis._curActTexIndex++;\n\t\t\treturn 1;\n\t\t\t}else {\n\t\t\tgl.activeTexture(Shader3D._TEXTURES[uploadedValue[0]]);\n\t\t\tif (value)\n\t\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,value);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t__proto._uniform_samplerCube=function(one,texture){\n\t\tvar value=texture.source || texture.defaulteTexture.source;\n\t\tvar gl=WebGL.mainContext;\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]==null){\n\t\t\tif (this._curActTexIndex > 7)\n\t\t\t\tthrow new Error(\"Shader3D: shader support textures max count is 8,can't large than it.\");\n\t\t\tuploadedValue[0]=this._curActTexIndex;\n\t\t\tgl.uniform1i(one.location,this._curActTexIndex);\n\t\t\tgl.activeTexture(Shader3D._TEXTURES[this._curActTexIndex]);\n\t\t\tif (value)\n\t\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP*/0x8513,value);\n\t\t\telse\n\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP*/0x8513,SolidColorTextureCube.grayTexture.source);\n\t\t\tthis._curActTexIndex++;\n\t\t\treturn 1;\n\t\t\t}else {\n\t\t\tgl.activeTexture(Shader3D._TEXTURES[uploadedValue[0]]);\n\t\t\tif (value)\n\t\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP*/0x8513,value);\n\t\t\telse\n\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP*/0x8513,SolidColorTextureCube.grayTexture.source);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t__proto._noSetValue=function(one){\n\t\tconsole.log(\"no....:\"+one.name);\n\t}\n\n\t//throw new Error(\"upload shader err,must set value:\"+one.name);\n\t__proto.bind=function(){\n\t\tBaseShader.activeShader=this;\n\t\tBaseShader.bindShader=this;\n\t\tthis.activeResource();\n\t\treturn WebGLContext.UseProgram(this._program);\n\t}\n\n\t/**\n\t*按数组的定义提交\n\t*@param shaderValue 数组格式[name,value,...]\n\t*/\n\t__proto.uploadAttributes=function(attributeShaderValue,_bufferUsage){\n\t\tvar value;\n\t\tvar one,shaderCall=0;\n\t\tfor (var i=0,n=this._attributeParamsMap.length;i < n;i+=2){\n\t\t\tone=this._attributeParamsMap[i+1];\n\t\t\tvalue=attributeShaderValue[this._attributeParamsMap[i]];\n\t\t\tif (value !=null){\n\t\t\t\t_bufferUsage && _bufferUsage[one.name] && _bufferUsage[one.name].bind();\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t\t}\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\t/**\n\t*按数组的定义提交\n\t*@param shaderValue 数组格式[name,value,...]\n\t*/\n\t__proto.uploadAttributesX=function(attributeShaderValue,vb){\n\t\tvar value;\n\t\tvar one,shaderCall=0;\n\t\tfor (var i=0,n=this._attributeParamsMap.length;i < n;i+=2){\n\t\t\tone=this._attributeParamsMap[i+1];\n\t\t\tvalue=attributeShaderValue[this._attributeParamsMap[i]];\n\t\t\tif (value !=null){\n\t\t\t\tvb._bind();\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t\t}\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\t/**\n\t*按数组的定义提交\n\t*@param shaderValue 数组格式[name,value,...]\n\t*/\n\t__proto.uploadSceneUniforms=function(shaderValue){\n\t\tvar value;\n\t\tvar one,shaderCall=0;\n\t\tfor (var i=0,n=this._sceneUniformParamsMap.length;i < n;i+=2){\n\t\t\tone=this._sceneUniformParamsMap[i+1];\n\t\t\tvalue=shaderValue[this._sceneUniformParamsMap[i]];\n\t\t\tif (value !=null)\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\t/**\n\t*按数组的定义提交\n\t*@param shaderValue 数组格式[name,value,...]\n\t*/\n\t__proto.uploadCameraUniforms=function(shaderValue){\n\t\tvar value;\n\t\tvar one,shaderCall=0;\n\t\tfor (var i=0,n=this._cameraUniformParamsMap.length;i < n;i+=2){\n\t\t\tone=this._cameraUniformParamsMap[i+1];\n\t\t\tvalue=shaderValue[this._cameraUniformParamsMap[i]];\n\t\t\tif (value !=null)\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\t/**\n\t*按数组的定义提交\n\t*@param shaderValue 数组格式[name,value,...]\n\t*/\n\t__proto.uploadSpriteUniforms=function(shaderValue){\n\t\tvar value;\n\t\tvar one,shaderCall=0;\n\t\tfor (var i=0,n=this._spriteUniformParamsMap.length;i < n;i+=2){\n\t\t\tone=this._spriteUniformParamsMap[i+1];\n\t\t\tvalue=shaderValue[this._spriteUniformParamsMap[i]];\n\t\t\tif (value !=null)\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\t/**\n\t*按数组的定义提交\n\t*@param shaderValue 数组格式[name,value,...]\n\t*/\n\t__proto.uploadMaterialUniforms=function(shaderValue){\n\t\tvar value;\n\t\tvar one,shaderCall=0;\n\t\tfor (var i=0,n=this._materialUniformParamsMap.length;i < n;i+=2){\n\t\t\tone=this._materialUniformParamsMap[i+1];\n\t\t\tvalue=shaderValue[this._materialUniformParamsMap[i]];\n\t\t\tif (value !=null)\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\t/**\n\t*按数组的定义提交\n\t*@param shaderValue 数组格式[name,value,...]\n\t*/\n\t__proto.uploadRenderElementUniforms=function(shaderValue){\n\t\tvar value;\n\t\tvar one,shaderCall=0;\n\t\tfor (var i=0,n=this._renderElementUniformParamsMap.length;i < n;i+=2){\n\t\t\tone=this._renderElementUniformParamsMap[i+1];\n\t\t\tvalue=shaderValue[this._renderElementUniformParamsMap[i]];\n\t\t\tif (value !=null)\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\tShader3D.create=function(vs,ps,attributeMap,sceneUniformMap,cameraUniformMap,spriteUniformMap,materialUniformMap,renderElementUniformMap){\n\t\treturn new Shader3D(vs,ps,attributeMap,sceneUniformMap,cameraUniformMap,spriteUniformMap,materialUniformMap,renderElementUniformMap);\n\t}\n\n\tShader3D.addInclude=function(fileName,txt){\n\t\tShaderCompile.addInclude(fileName,txt);\n\t}\n\n\tShader3D._createShader=function(gl,str,type){\n\t\tvar shader=gl.createShader(type);\n\t\tgl.shaderSource(shader,str);\n\t\tgl.compileShader(shader);\n\t\tif (ShaderCompile3D.debugMode && !gl.getShaderParameter(shader,/*laya.webgl.WebGLContext.COMPILE_STATUS*/0x8B81))\n\t\t\tthrow gl.getShaderInfoLog(shader);\n\t\treturn shader;\n\t}\n\n\tShader3D.PERIOD_RENDERELEMENT=0;\n\tShader3D.PERIOD_MATERIAL=1;\n\tShader3D.PERIOD_SPRITE=2;\n\tShader3D.PERIOD_CAMERA=3;\n\tShader3D.PERIOD_SCENE=4;\n\tShader3D._TEXTURES=[ /*laya.webgl.WebGLContext.TEXTURE0*/0x84C0,/*laya.webgl.WebGLContext.TEXTURE1*/0x84C1,/*laya.webgl.WebGLContext.TEXTURE2*/0x84C2,/*laya.webgl.WebGLContext.TEXTURE3*/0x84C3,/*laya.webgl.WebGLContext.TEXTURE4*/0x84C4,/*laya.webgl.WebGLContext.TEXTURE5*/0x84C5,/*laya.webgl.WebGLContext.TEXTURE6*/0x84C6,/*laya.webgl.WebGLContext.TEXTURE7*/0x84C7];\n\tShader3D._count=0;\n\t__static(Shader3D,\n\t['shaderParamsMap',function(){return this.shaderParamsMap={\"float\":/*laya.webgl.WebGLContext.FLOAT*/0x1406,\"int\":/*laya.webgl.WebGLContext.INT*/0x1404,\"bool\":/*laya.webgl.WebGLContext.BOOL*/0x8B56,\"vec2\":/*laya.webgl.WebGLContext.FLOAT_VEC2*/0x8B50,\"vec3\":/*laya.webgl.WebGLContext.FLOAT_VEC3*/0x8B51,\"vec4\":/*laya.webgl.WebGLContext.FLOAT_VEC4*/0x8B52,\"ivec2\":/*laya.webgl.WebGLContext.INT_VEC2*/0x8B53,\"ivec3\":/*laya.webgl.WebGLContext.INT_VEC3*/0x8B54,\"ivec4\":/*laya.webgl.WebGLContext.INT_VEC4*/0x8B55,\"bvec2\":/*laya.webgl.WebGLContext.BOOL_VEC2*/0x8B57,\"bvec3\":/*laya.webgl.WebGLContext.BOOL_VEC3*/0x8B58,\"bvec4\":/*laya.webgl.WebGLContext.BOOL_VEC4*/0x8B59,\"mat2\":/*laya.webgl.WebGLContext.FLOAT_MAT2*/0x8B5A,\"mat3\":/*laya.webgl.WebGLContext.FLOAT_MAT3*/0x8B5B,\"mat4\":/*laya.webgl.WebGLContext.FLOAT_MAT4*/0x8B5C,\"sampler2D\":/*laya.webgl.WebGLContext.SAMPLER_2D*/0x8B5E,\"samplerCube\":/*laya.webgl.WebGLContext.SAMPLER_CUBE*/0x8B60};},'nameKey',function(){return this.nameKey=new StringKey();}\n\t]);\n\treturn Shader3D;\n})(BaseShader)\n\n\n//class laya.d3.core.material.PBRMaterial extends laya.d3.core.material.BaseMaterial\nvar PBRMaterial=(function(_super){\n\tfunction PBRMaterial(){\n\t\t/**@private */\n\t\tthis._transformUV=null;\n\t\tPBRMaterial.__super.call(this);\n\t\tif (!laya.d3.core.material.PBRMaterial.pbrlutTex){\n\t\t\tvar lutdt=Browser.window['__pbrlutdata'];\n\t\t\tif (!lutdt){\n\t\t\t\talert('no pbr lutdata, need pbrlut.js');\n\t\t\t\tthrow 'no pbr lutdata, need pbrlut.js';\n\t\t\t};\n\t\t\tvar luttex=DataTexture2D.create((new Uint32Array(lutdt)).buffer,256,256,/*laya.webgl.WebGLContext.NEAREST*/0x2600,/*laya.webgl.WebGLContext.NEAREST*/0x2600,false);\n\t\t\tlaya.d3.core.material.PBRMaterial.pbrlutTex=luttex;\n\t\t}\n\t\tthis._setTexture(4,laya.d3.core.material.PBRMaterial.pbrlutTex);\n\t\tthis.setShaderName(\"PBR\");\n\t\tthis._setNumber(0,0.5);\n\t\tthis.use_groundtruth=false;\n\t}\n\n\t__class(PBRMaterial,'laya.d3.core.material.PBRMaterial',_super);\n\tvar __proto=PBRMaterial.prototype;\n\t/**\n\t*禁用灯光。\n\t*/\n\t__proto.disableLight=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT | ShaderCompile3D.SHADERDEFINE_SPOTLIGHT | ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t}\n\n\t/**\n\t*禁用雾化。\n\t*/\n\t__proto.disableFog=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_FOG);\n\t}\n\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\t_super.prototype.onAsynLoaded.call(this,url,data,params);\n\t}\n\n\t/**\n\t*vdc算法产生的序列。这个比random要均匀一些。\n\t*/\n\t__proto.radicalInverse_VdC=function(bits){\n\t\tvar tmpUint=new Uint32Array(1);\n\t\treturn (function(bits){\n\t\t\tbits=(bits << 16)| (bits >>> 16);\n\t\t\tbits=((bits & 0x55555555)<< 1)| ((bits & 0xAAAAAAAA)>>> 1);\n\t\t\tbits=((bits & 0x33333333)<< 2)| ((bits & 0xCCCCCCCC)>>> 2);\n\t\t\tbits=((bits & 0x0F0F0F0F)<< 4)| ((bits & 0xF0F0F0F0)>>> 4);\n\t\t\tbits=((bits & 0x00FF00FF)<< 8)| ((bits & 0xFF00FF00)>>> 8);\n\t\t\ttmpUint[0]=bits;\n\t\t\treturn tmpUint[0] *2.3283064365386963e-10;\n\t\t})(bits);\n\t}\n\n\t/**\n\t*\n\t*/\n\t__proto.createHammersleyTex=function(w,h){\n\t\tvar ret=new Uint8Array(w *h *4);\n\t\tvar ri=0;\n\t\tvar ci=0;\n\t\tfor (ci=0;ci < w *h;ci++){\n\t\t\tvar v=this.radicalInverse_VdC(ci);\n\t\t\tret[ri++]=v *255;\n\t\t\tret[ri++]=0;\n\t\t\tret[ri++]=0;\n\t\t\tret[ri++]=255;\n\t\t}\n\t\treturn ret;\n\t}\n\n\t/**\n\t*设置法线贴图。\n\t*@param value 法线贴图。\n\t*/\n\t/**\n\t*获取法线贴图。\n\t*@return 法线贴图。\n\t*/\n\t__getset(0,__proto,'normalTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tthis._setTexture(2,value);\n\t});\n\n\t__getset(0,__proto,'has_tangent',null,function(v){\n\t\tthis._addShaderDefine(PBRMaterial.SHADERDEFINE_HAS_TANGENT);\n\t});\n\n\t/**\n\t*设置粗糙度的值，0为特别光滑，1为特别粗糙。\n\t*@param value 粗糙度。\n\t*/\n\t/**\n\t*获取粗糙度的值，0为特别光滑，1为特别粗糙。\n\t*@return 粗糙度的值。\n\t*/\n\t__getset(0,__proto,'roughness',function(){\n\t\treturn this._getNumber(6);\n\t\t},function(value){\n\t\tthis._setNumber(6,value);\n\t\tthis._addShaderDefine(PBRMaterial.SHADERDEFINE_FIX_ROUGHNESS);\n\t});\n\n\t__getset(0,__proto,'metaless',function(){\n\t\treturn this._getNumber(7);\n\t\t},function(v){\n\t\tthis._setNumber(7,v);\n\t\tthis._addShaderDefine(PBRMaterial.SHADERDEFINE_FIX_METALESS);\n\t});\n\n\t/**\n\t*设置PBRLUT贴图。\n\t*@param value PBRLUT贴图。\n\t*/\n\t/**\n\t*获取PBRLUT贴图。\n\t*@return PBRLUT贴图。\n\t*/\n\t__getset(0,__proto,'pbrlutTexture',function(){\n\t\treturn this._getTexture(4);\n\t\t},function(value){\n\t\tthis._setTexture(4,value);\n\t});\n\n\t__getset(0,__proto,'use_groundtruth',null,function(v){\n\t\tif (v){\n\t\t\tthis._addShaderDefine(PBRMaterial.SHADERDEFINE_USE_GROUNDTRUTH);\n\t\t\tif (!laya.d3.core.material.PBRMaterial.HammersleyNoiseTex){\n\t\t\t\tvar texdata=this.createHammersleyTex(32,32);\n\t\t\t\tlaya.d3.core.material.PBRMaterial.HammersleyNoiseTex=DataTexture2D.create(texdata.buffer,32,32,/*laya.webgl.WebGLContext.NEAREST*/0x2600,/*laya.webgl.WebGLContext.NEAREST*/0x2600,false);\n\t\t\t}\n\t\t\tthis._setTexture(15,PBRMaterial.HammersleyNoiseTex);\n\t\t\t}else {\n\t\t\tlaya.d3.core.material.PBRMaterial.HammersleyNoiseTex=null;\n\t\t\tthis._removeShaderDefine(PBRMaterial.SHADERDEFINE_USE_GROUNDTRUTH);\n\t\t}\n\t});\n\n\t/**\n\t*设置UV变换。\n\t*@param value UV变换。\n\t*/\n\t/**\n\t*获取UV变换。\n\t*@return UV变换。\n\t*/\n\t__getset(0,__proto,'transformUV',function(){\n\t\treturn this._transformUV;\n\t\t},function(value){\n\t\tthis._transformUV=value;\n\t\tthis._setMatrix4x4(8,value.matrix);\n\t\tif (this._conchMaterial){\n\t\t\tthis._conchMaterial.setShaderValue(8,value.matrix.elements,0);\n\t\t}\n\t});\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tthis._setTexture(1,value);\n\t});\n\n\t__getset(0,__proto,'renderMode',null,function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tbreak ;\n\t\t\tcase 13:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"PBRMaterial:renderMode value error.\");\n\t\t\t}\n\t});\n\n\t/**\n\t*设置pbr信息贴图。\n\t*@param value pbr信息贴图。\n\t*/\n\t/**\n\t*获取pbr信息贴图。\n\t*@return pbr信息贴图。\n\t*/\n\t__getset(0,__proto,'pbrInfoTexture',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tthis._setTexture(3,value);\n\t\tthis._addShaderDefine(PBRMaterial.SHADERDEFINE_HAS_PBRINFO);\n\t});\n\n\t__getset(0,__proto,'testClipZ',null,function(v){\n\t\tthis._addShaderDefine(PBRMaterial.SHADERDEFINE_TEST_CLIPZ);\n\t});\n\n\tPBRMaterial.__init__=function(){\n\t\tPBRMaterial.SHADERDEFINE_FIX_METALESS=PBRMaterial.shaderDefines.registerDefine(\"FIX_METALESS\");\n\t\tPBRMaterial.SHADERDEFINE_FIX_ROUGHNESS=PBRMaterial.shaderDefines.registerDefine(\"FIX_ROUGHNESS\");\n\t\tPBRMaterial.SHADERDEFINE_HAS_TANGENT=PBRMaterial.shaderDefines.registerDefine(\"HAS_TANGENT\");\n\t\tPBRMaterial.SHADERDEFINE_HAS_PBRINFO=PBRMaterial.shaderDefines.registerDefine(\"HAS_PBRINFO\");\n\t\tPBRMaterial.SHADERDEFINE_USE_GROUNDTRUTH=PBRMaterial.shaderDefines.registerDefine(\"USE_GROUNDTRUTH\");\n\t\tPBRMaterial.SHADERDEFINE_TEST_CLIPZ=PBRMaterial.shaderDefines.registerDefine(\"CLIPZ\");\n\t}\n\n\tPBRMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,PBRMaterial);\n\t}\n\n\tPBRMaterial.DIFFUSETEXTURE=1;\n\tPBRMaterial.NORMALTEXTURE=2;\n\tPBRMaterial.PBRINFOTEXTURE=3;\n\tPBRMaterial.PBRLUTTEXTURE=4;\n\tPBRMaterial.UVANIAGE=5;\n\tPBRMaterial.MATERIALROUGHNESS=6;\n\tPBRMaterial.MATERIALMETALESS=7;\n\tPBRMaterial.UVMATRIX=8;\n\tPBRMaterial.UVAGE=9;\n\tPBRMaterial.AOOBJPOS=14;\n\tPBRMaterial.HSNOISETEXTURE=15;\n\tPBRMaterial.SHADERDEFINE_FIX_ROUGHNESS=0;\n\tPBRMaterial.SHADERDEFINE_FIX_METALESS=0;\n\tPBRMaterial.SHADERDEFINE_HAS_TANGENT=0;\n\tPBRMaterial.SHADERDEFINE_TEST_CLIPZ=0;\n\tPBRMaterial.SHADERDEFINE_HAS_PBRINFO=0;\n\tPBRMaterial.SHADERDEFINE_USE_GROUNDTRUTH=0;\n\tPBRMaterial.RENDERMODE_OPAQUE=1;\n\tPBRMaterial.RENDERMODE_OPAQUEDOUBLEFACE=2;\n\tPBRMaterial.RENDERMODE_CUTOUT=3;\n\tPBRMaterial.RENDERMODE_CUTOUTDOUBLEFACE=4;\n\tPBRMaterial.RENDERMODE_TRANSPARENT=13;\n\tPBRMaterial.pbrlutTex=null;\n\tPBRMaterial.HammersleyNoiseTex=null;\n\t__static(PBRMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new PBRMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn PBRMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author WuTaiLang\n*/\n//class laya.d3.core.material.PBRSpecularMaterial extends laya.d3.core.material.BaseMaterial\nvar PBRSpecularMaterial=(function(_super){\n\tfunction PBRSpecularMaterial(){\n\t\tPBRSpecularMaterial.__super.call(this);\n\t\tthis.setShaderName(\"PBRSpecular\");\n\t\tthis._setColor(7,new Vector4(1.0,1.0,1.0,1.0));\n\t\tthis._setColor(9,new Vector4(0.0,0.0,0.0,0.0));\n\t\tthis._setColor(8,new Vector4(0.2,0.2,0.2,0.2));\n\t\tthis._setNumber(10,0.5);\n\t\tthis._setNumber(11,1.0);\n\t\tthis._setNumber(12,0);\n\t\tthis._setNumber(13,1.0);\n\t\tthis._setNumber(14,1.0);\n\t\tthis._setNumber(15,0.001);\n\t\tthis._setBool(16,false);\n\t\tthis._setNumber(0,0.5);\n\t}\n\n\t__class(PBRSpecularMaterial,'laya.d3.core.material.PBRSpecularMaterial',_super);\n\tvar __proto=PBRSpecularMaterial.prototype;\n\t/**\n\t*设置漫反射颜色。\n\t*@param value 漫反射颜色。\n\t*/\n\t/**\n\t*获取漫反射颜色。\n\t*@return 漫反射颜色。\n\t*/\n\t__getset(0,__proto,'albedoColor',function(){\n\t\treturn this._getColor(7);\n\t\t},function(value){\n\t\tthis._setColor(7,value);\n\t});\n\n\t/**\n\t*设置高光贴图。\n\t*@param value 高光贴图。\n\t*/\n\t/**\n\t*获取高光贴图。\n\t*@return 高光贴图。\n\t*/\n\t__getset(0,__proto,'specularTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_SPECULARTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_SPECULARTEXTURE);\n\t\tthis._setTexture(2,value);\n\t});\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'albedoTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_DIFFUSETEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_DIFFUSETEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置遮挡贴图。\n\t*@param value 遮挡贴图。\n\t*/\n\t/**\n\t*获取遮挡贴图。\n\t*@return 遮挡贴图。\n\t*/\n\t__getset(0,__proto,'occlusionTexture',function(){\n\t\treturn this._getTexture(5);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_OCCLUSIONTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_OCCLUSIONTEXTURE);\n\t\tthis._setTexture(5,value);\n\t});\n\n\t/**\n\t*设置法线贴图。\n\t*@param value 法线贴图。\n\t*/\n\t/**\n\t*获取法线贴图。\n\t*@return 法线贴图。\n\t*/\n\t__getset(0,__proto,'normalTexture',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_NORMALTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_NORMALTEXTURE);\n\t\tthis._setTexture(3,value);\n\t});\n\n\t/**\n\t*设置视差贴图。\n\t*@param value 视察贴图。\n\t*/\n\t/**\n\t*获取视差贴图。\n\t*@return 视察贴图。\n\t*/\n\t__getset(0,__proto,'parallaxTexture',function(){\n\t\treturn this._getTexture(4);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_PARALLAXTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_PARALLAXTEXTURE);\n\t\tthis._setTexture(4,value);\n\t});\n\n\t/**\n\t*设置放射颜色。\n\t*@param value 放射颜色。\n\t*/\n\t/**\n\t*获取放射颜色。\n\t*@return 放射颜色。\n\t*/\n\t__getset(0,__proto,'emissionColor',function(){\n\t\treturn this._getColor(9);\n\t\t},function(value){\n\t\tthis._setColor(9,value);\n\t});\n\n\t/**\n\t*设置法线贴图缩放系数。\n\t*@param value 法线贴图缩放系数。\n\t*/\n\t/**\n\t*获取法线贴图缩放系数。\n\t*@return 法线贴图缩放系数。\n\t*/\n\t__getset(0,__proto,'normalTextureScale',function(){\n\t\treturn this._getNumber(14);\n\t\t},function(value){\n\t\tthis._setNumber(14,value);\n\t});\n\n\t/**\n\t*设置视差贴图缩放系数。\n\t*@param value 视差缩放系数。\n\t*/\n\t/**\n\t*获取视差贴图缩放系数。\n\t*@return 视差缩放系数。\n\t*/\n\t__getset(0,__proto,'parallaxTextureScale',function(){\n\t\treturn this._getNumber(15);\n\t\t},function(value){\n\t\tvalue=Math.max(0.005,Math.min(0.08,value));\n\t\tthis._setNumber(15,value);\n\t});\n\n\t/**\n\t*设置遮挡贴图强度。\n\t*@param value 遮挡贴图强度,范围为0到1。\n\t*/\n\t/**\n\t*获取遮挡贴图强度。\n\t*@return 遮挡贴图强度,范围为0到1。\n\t*/\n\t__getset(0,__proto,'occlusionTextureStrength',function(){\n\t\treturn this._getNumber(13);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(13,value);\n\t});\n\n\t/**\n\t*设置高光颜色。\n\t*@param value 高光颜色。\n\t*/\n\t/**\n\t*获取高光颜色。\n\t*@return 高光颜色。\n\t*/\n\t__getset(0,__proto,'specularColor',function(){\n\t\treturn this._getColor(8);\n\t\t},function(value){\n\t\tthis._setColor(8,value);\n\t});\n\n\t/**\n\t*设置光滑度。\n\t*@param value 光滑度,范围为0到1。\n\t*/\n\t/**\n\t*获取光滑度。\n\t*@return 光滑度,范围为0到1。\n\t*/\n\t__getset(0,__proto,'smoothness',function(){\n\t\treturn this._getNumber(10);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(10,value);\n\t});\n\n\t/**\n\t*设置光滑度缩放系数。\n\t*@param value 光滑度缩放系数,范围为0到1。\n\t*/\n\t/**\n\t*获取光滑度缩放系数。\n\t*@return 光滑度缩放系数,范围为0到1。\n\t*/\n\t__getset(0,__proto,'smoothnessTextureScale',function(){\n\t\treturn this._getNumber(11);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(11,value);\n\t});\n\n\t/**\n\t*设置光滑度数据源。\n\t*@param value 光滑滑度数据源,0或1。\n\t*/\n\t/**\n\t*获取光滑度数据源\n\t*@return 光滑滑度数据源,0或1。\n\t*/\n\t__getset(0,__proto,'smoothnessSource',function(){\n\t\treturn this._getNumber(12);\n\t\t},function(value){\n\t\tif (value==1)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA);\n\t\telse{\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA);\n\t\t\tvalue=0;\n\t\t}\n\t\tthis._setNumber(12,value);\n\t});\n\n\t/**\n\t*设置是否激活放射属性。\n\t*@param value 是否激活放射属性\n\t*/\n\t/**\n\t*获取是否激活放射属性。\n\t*@return 是否激活放射属性。\n\t*/\n\t__getset(0,__proto,'enableEmission',function(){\n\t\treturn this._getBool(16);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_EMISSION);\n\t\telse{\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_EMISSION);\n\t\t}\n\t\tthis._setBool(16,value);\n\t});\n\n\t/**\n\t*设置放射贴图。\n\t*@param value 放射贴图。\n\t*/\n\t/**\n\t*获取放射贴图。\n\t*@return 放射贴图。\n\t*/\n\t__getset(0,__proto,'emissionTexture',function(){\n\t\treturn this._getTexture(6);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_EMISSIONTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_EMISSIONTEXTURE);\n\t\tthis._setTexture(6,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(17);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.PBRSpecularMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t}\n\t\tthis._setColor(17,value);\n\t});\n\n\tPBRSpecularMaterial.__init__=function(){\n\t\tPBRSpecularMaterial.SHADERDEFINE_DIFFUSETEXTURE=PBRSpecularMaterial.shaderDefines.registerDefine(\"DIFFUSETEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_SPECULARTEXTURE=PBRSpecularMaterial.shaderDefines.registerDefine(\"SPECULARTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA=PBRSpecularMaterial.shaderDefines.registerDefine(\"SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_NORMALTEXTURE=PBRSpecularMaterial.shaderDefines.registerDefine(\"NORMALTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_PARALLAXTEXTURE=PBRSpecularMaterial.shaderDefines.registerDefine(\"PARALLAXTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_OCCLUSIONTEXTURE=PBRSpecularMaterial.shaderDefines.registerDefine(\"OCCLUSIONTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_EMISSION=PBRSpecularMaterial.shaderDefines.registerDefine(\"EMISSION\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_EMISSIONTEXTURE=PBRSpecularMaterial.shaderDefines.registerDefine(\"EMISSIONTEXTURE\");\n\t\tPBRSpecularMaterial.SHADERDEFINE_TILINGOFFSET=PBRSpecularMaterial.shaderDefines.registerDefine(\"TILINGOFFSET\");\n\t}\n\n\tPBRSpecularMaterial.SmoothnessSource_MetallicGlossTexture_Alpha=0;\n\tPBRSpecularMaterial.SmoothnessSource_DiffuseTexture_Alpha=1;\n\tPBRSpecularMaterial.SHADERDEFINE_DIFFUSETEXTURE=0;\n\tPBRSpecularMaterial.SHADERDEFINE_NORMALTEXTURE=0;\n\tPBRSpecularMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA=0;\n\tPBRSpecularMaterial.SHADERDEFINE_SPECULARTEXTURE=0;\n\tPBRSpecularMaterial.SHADERDEFINE_OCCLUSIONTEXTURE=0;\n\tPBRSpecularMaterial.SHADERDEFINE_PARALLAXTEXTURE=0;\n\tPBRSpecularMaterial.SHADERDEFINE_EMISSION=0;\n\tPBRSpecularMaterial.SHADERDEFINE_EMISSIONTEXTURE=0;\n\tPBRSpecularMaterial.SHADERDEFINE_TILINGOFFSET=0;\n\tPBRSpecularMaterial.DIFFUSETEXTURE=1;\n\tPBRSpecularMaterial.SPECULARTEXTURE=2;\n\tPBRSpecularMaterial.NORMALTEXTURE=3;\n\tPBRSpecularMaterial.PARALLAXTEXTURE=4;\n\tPBRSpecularMaterial.OCCLUSIONTEXTURE=5;\n\tPBRSpecularMaterial.EMISSIONTEXTURE=6;\n\tPBRSpecularMaterial.DIFFUSECOLOR=7;\n\tPBRSpecularMaterial.SPECULARCOLOR=8;\n\tPBRSpecularMaterial.EMISSIONCOLOR=9;\n\tPBRSpecularMaterial.SMOOTHNESS=10;\n\tPBRSpecularMaterial.SMOOTHNESSSCALE=11;\n\tPBRSpecularMaterial.SMOOTHNESSSOURCE=12;\n\tPBRSpecularMaterial.OCCLUSIONSTRENGTH=13;\n\tPBRSpecularMaterial.NORMALSCALE=14;\n\tPBRSpecularMaterial.PARALLAXSCALE=15;\n\tPBRSpecularMaterial.ENABLEEMISSION=16;\n\tPBRSpecularMaterial.TILINGOFFSET=17;\n\t__static(PBRSpecularMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn PBRSpecularMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author WuTaiLang\n*/\n//class laya.d3.core.material.PBRStandardMaterial extends laya.d3.core.material.BaseMaterial\nvar PBRStandardMaterial=(function(_super){\n\tfunction PBRStandardMaterial(){\n\t\tPBRStandardMaterial.__super.call(this);\n\t\tthis.setShaderName(\"PBRStandard\");\n\t\tthis._setColor(7,new Vector4(1.0,1.0,1.0,1.0));\n\t\tthis._setColor(8,new Vector4(0.0,0.0,0.0,0.0));\n\t\tthis._setNumber(9,0.0);\n\t\tthis._setNumber(10,0.5);\n\t\tthis._setNumber(11,1.0);\n\t\tthis._setNumber(12,0);\n\t\tthis._setNumber(13,1.0);\n\t\tthis._setNumber(14,1.0);\n\t\tthis._setNumber(15,0.001);\n\t\tthis._setBool(16,false);\n\t\tthis._setNumber(0,0.5);\n\t}\n\n\t__class(PBRStandardMaterial,'laya.d3.core.material.PBRStandardMaterial',_super);\n\tvar __proto=PBRStandardMaterial.prototype;\n\t/**\n\t*设置漫反射颜色。\n\t*@param value 漫反射颜色。\n\t*/\n\t/**\n\t*获取漫反射颜色。\n\t*@return 漫反射颜色。\n\t*/\n\t__getset(0,__proto,'albedoColor',function(){\n\t\treturn this._getColor(7);\n\t\t},function(value){\n\t\tthis._setColor(7,value);\n\t});\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'albedoTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_DIFFUSETEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_DIFFUSETEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置是否激活放射属性。\n\t*@param value 是否激活放射属性\n\t*/\n\t/**\n\t*获取是否激活放射属性。\n\t*@return 是否激活放射属性。\n\t*/\n\t__getset(0,__proto,'enableEmission',function(){\n\t\treturn this._getBool(16);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_EMISSION);\n\t\telse {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_EMISSION);\n\t\t}\n\t\tthis._setBool(16,value);\n\t});\n\n\t/**\n\t*设置金属光滑度贴图。\n\t*@param value 金属光滑度贴图。\n\t*/\n\t/**\n\t*获取金属光滑度贴图。\n\t*@return 金属光滑度贴图。\n\t*/\n\t__getset(0,__proto,'metallicGlossTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_METALLICGLOSSTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_METALLICGLOSSTEXTURE);\n\t\tthis._setTexture(2,value);\n\t});\n\n\t/**\n\t*设置遮挡贴图。\n\t*@param value 遮挡贴图。\n\t*/\n\t/**\n\t*获取遮挡贴图。\n\t*@return 遮挡贴图。\n\t*/\n\t__getset(0,__proto,'occlusionTexture',function(){\n\t\treturn this._getTexture(5);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_OCCLUSIONTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_OCCLUSIONTEXTURE);\n\t\tthis._setTexture(5,value);\n\t});\n\n\t/**\n\t*设置法线贴图。\n\t*@param value 法线贴图。\n\t*/\n\t/**\n\t*获取法线贴图。\n\t*@return 法线贴图。\n\t*/\n\t__getset(0,__proto,'normalTexture',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_NORMALTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_NORMALTEXTURE);\n\t\tthis._setTexture(3,value);\n\t});\n\n\t/**\n\t*设置视差贴图。\n\t*@param value 视察贴图。\n\t*/\n\t/**\n\t*获取视差贴图。\n\t*@return 视察贴图。\n\t*/\n\t__getset(0,__proto,'parallaxTexture',function(){\n\t\treturn this._getTexture(4);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_PARALLAXTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_PARALLAXTEXTURE);\n\t\tthis._setTexture(4,value);\n\t});\n\n\t/**\n\t*设置放射颜色。\n\t*@param value 放射颜色。\n\t*/\n\t/**\n\t*获取放射颜色。\n\t*@return 放射颜色。\n\t*/\n\t__getset(0,__proto,'emissionColor',function(){\n\t\treturn this._getColor(8);\n\t\t},function(value){\n\t\tthis._setColor(8,value);\n\t});\n\n\t/**\n\t*设置法线贴图缩放系数。\n\t*@param value 法线贴图缩放系数。\n\t*/\n\t/**\n\t*获取法线贴图缩放系数。\n\t*@return 法线贴图缩放系数。\n\t*/\n\t__getset(0,__proto,'normalTextureScale',function(){\n\t\treturn this._getNumber(14);\n\t\t},function(value){\n\t\tthis._setNumber(14,value);\n\t});\n\n\t/**\n\t*设置视差贴图缩放系数。\n\t*@param value 视差缩放系数。\n\t*/\n\t/**\n\t*获取视差贴图缩放系数。\n\t*@return 视差缩放系数。\n\t*/\n\t__getset(0,__proto,'parallaxTextureScale',function(){\n\t\treturn this._getNumber(15);\n\t\t},function(value){\n\t\tvalue=Math.max(0.005,Math.min(0.08,value));\n\t\tthis._setNumber(15,value);\n\t});\n\n\t/**\n\t*设置遮挡贴图强度。\n\t*@param value 遮挡贴图强度,范围为0到1。\n\t*/\n\t/**\n\t*获取遮挡贴图强度。\n\t*@return 遮挡贴图强度,范围为0到1。\n\t*/\n\t__getset(0,__proto,'occlusionTextureStrength',function(){\n\t\treturn this._getNumber(13);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(13,value);\n\t});\n\n\t/**\n\t*设置金属度。\n\t*@param value 金属度,范围为0到1。\n\t*/\n\t/**\n\t*获取金属度。\n\t*@return 金属度,范围为0到1。\n\t*/\n\t__getset(0,__proto,'metallic',function(){\n\t\treturn this._getNumber(9);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(9,value);\n\t});\n\n\t/**\n\t*设置光滑度。\n\t*@param value 光滑度,范围为0到1。\n\t*/\n\t/**\n\t*获取光滑度。\n\t*@return 光滑度,范围为0到1。\n\t*/\n\t__getset(0,__proto,'smoothness',function(){\n\t\treturn this._getNumber(10);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(10,value);\n\t});\n\n\t/**\n\t*设置光滑度缩放系数。\n\t*@param value 光滑度缩放系数,范围为0到1。\n\t*/\n\t/**\n\t*获取光滑度缩放系数。\n\t*@return 光滑度缩放系数,范围为0到1。\n\t*/\n\t__getset(0,__proto,'smoothnessTextureScale',function(){\n\t\treturn this._getNumber(11);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(11,value);\n\t});\n\n\t/**\n\t*设置光滑度数据源。\n\t*@param value 光滑滑度数据源,0或1。\n\t*/\n\t/**\n\t*获取光滑度数据源\n\t*@return 光滑滑度数据源,0或1。\n\t*/\n\t__getset(0,__proto,'smoothnessSource',function(){\n\t\treturn this._getNumber(12);\n\t\t},function(value){\n\t\tif (value==1)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA);\n\t\telse {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA);\n\t\t\tvalue=0;\n\t\t}\n\t\tthis._setNumber(12,value);\n\t});\n\n\t/**\n\t*设置放射贴图。\n\t*@param value 放射贴图。\n\t*/\n\t/**\n\t*获取放射贴图。\n\t*@return 放射贴图。\n\t*/\n\t__getset(0,__proto,'emissionTexture',function(){\n\t\treturn this._getTexture(6);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_EMISSIONTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_EMISSIONTEXTURE);\n\t\tthis._setTexture(6,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(17);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.PBRStandardMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t}\n\t\tthis._setColor(17,value);\n\t});\n\n\tPBRStandardMaterial.__init__=function(){\n\t\tPBRStandardMaterial.SHADERDEFINE_DIFFUSETEXTURE=PBRStandardMaterial.shaderDefines.registerDefine(\"DIFFUSETEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_METALLICGLOSSTEXTURE=PBRStandardMaterial.shaderDefines.registerDefine(\"METALLICGLOSSTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA=PBRStandardMaterial.shaderDefines.registerDefine(\"SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA\");\n\t\tPBRStandardMaterial.SHADERDEFINE_NORMALTEXTURE=PBRStandardMaterial.shaderDefines.registerDefine(\"NORMALTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_PARALLAXTEXTURE=PBRStandardMaterial.shaderDefines.registerDefine(\"PARALLAXTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_OCCLUSIONTEXTURE=PBRStandardMaterial.shaderDefines.registerDefine(\"OCCLUSIONTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_EMISSION=PBRStandardMaterial.shaderDefines.registerDefine(\"EMISSION\");\n\t\tPBRStandardMaterial.SHADERDEFINE_EMISSIONTEXTURE=PBRStandardMaterial.shaderDefines.registerDefine(\"EMISSIONTEXTURE\");\n\t\tPBRStandardMaterial.SHADERDEFINE_TILINGOFFSET=PBRStandardMaterial.shaderDefines.registerDefine(\"TILINGOFFSET\");\n\t}\n\n\tPBRStandardMaterial.SmoothnessSource_MetallicGlossTexture_Alpha=0;\n\tPBRStandardMaterial.SmoothnessSource_DiffuseTexture_Alpha=1;\n\tPBRStandardMaterial.SHADERDEFINE_DIFFUSETEXTURE=0;\n\tPBRStandardMaterial.SHADERDEFINE_NORMALTEXTURE=0;\n\tPBRStandardMaterial.SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA=0;\n\tPBRStandardMaterial.SHADERDEFINE_METALLICGLOSSTEXTURE=0;\n\tPBRStandardMaterial.SHADERDEFINE_OCCLUSIONTEXTURE=0;\n\tPBRStandardMaterial.SHADERDEFINE_PARALLAXTEXTURE=0;\n\tPBRStandardMaterial.SHADERDEFINE_EMISSION=0;\n\tPBRStandardMaterial.SHADERDEFINE_EMISSIONTEXTURE=0;\n\tPBRStandardMaterial.SHADERDEFINE_TILINGOFFSET=0;\n\tPBRStandardMaterial.DIFFUSETEXTURE=1;\n\tPBRStandardMaterial.METALLICGLOSSTEXTURE=2;\n\tPBRStandardMaterial.NORMALTEXTURE=3;\n\tPBRStandardMaterial.PARALLAXTEXTURE=4;\n\tPBRStandardMaterial.OCCLUSIONTEXTURE=5;\n\tPBRStandardMaterial.EMISSIONTEXTURE=6;\n\tPBRStandardMaterial.DIFFUSECOLOR=7;\n\tPBRStandardMaterial.EMISSIONCOLOR=8;\n\tPBRStandardMaterial.METALLIC=9;\n\tPBRStandardMaterial.SMOOTHNESS=10;\n\tPBRStandardMaterial.SMOOTHNESSSCALE=11;\n\tPBRStandardMaterial.SMOOTHNESSSOURCE=12;\n\tPBRStandardMaterial.OCCLUSIONSTRENGTH=13;\n\tPBRStandardMaterial.NORMALSCALE=14;\n\tPBRStandardMaterial.PARALLAXSCALE=15;\n\tPBRStandardMaterial.ENABLEEMISSION=16;\n\tPBRStandardMaterial.TILINGOFFSET=17;\n\t__static(PBRStandardMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn PBRStandardMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.material.StandardMaterial extends laya.d3.core.material.BaseMaterial\nvar StandardMaterial=(function(_super){\n\tfunction StandardMaterial(){\n\t\t/**@private */\n\t\tthis._transformUV=null;\n\t\tStandardMaterial.__super.call(this);\n\t\tthis.setShaderName(\"SIMPLE\");\n\t\tthis._setColor(9,new Vector3(0.6,0.6,0.6));\n\t\tthis._setColor(10,new Vector3(1.0,1.0,1.0));\n\t\tthis._setColor(11,new Vector4(1.0,1.0,1.0,8.0));\n\t\tthis._setColor(12,new Vector3(1.0,1.0,1.0));\n\t\tthis._setColor(7,new Vector4(1.0,1.0,1.0,1.0));\n\t\tthis._setNumber(0,0.5);\n\t\tthis._setColor(15,new Vector4(1.0,1.0,0.0,0.0));\n\t\tthis.renderMode=1;\n\t}\n\n\t__class(StandardMaterial,'laya.d3.core.material.StandardMaterial',_super);\n\tvar __proto=StandardMaterial.prototype;\n\t/**\n\t*禁用灯光。\n\t*/\n\t__proto.disableLight=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT | ShaderCompile3D.SHADERDEFINE_SPOTLIGHT | ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t}\n\n\t/**\n\t*禁用雾化。\n\t*/\n\t__proto.disableFog=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_FOG);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar jsonData=data[0];\n\t\tif (jsonData.version){\n\t\t\t_super.prototype.onAsynLoaded.call(this,url,data,params);\n\t\t\t}else {\n\t\t\tvar textureMap=data[1];\n\t\t\tvar props=jsonData.props;\n\t\t\tfor (var prop in props)\n\t\t\tthis[prop]=props[prop];\n\t\t\tStandardMaterial._parseStandardMaterial(textureMap,this,jsonData);\n\t\t\tthis._endLoaded();\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\t_super.prototype.cloneTo.call(this,destObject);\n\t\tvar dest=destObject;\n\t\t(this._transformUV)&& (dest._transformUV=this._transformUV.clone());\n\t}\n\n\t/**\n\t*设置环境光颜色。\n\t*@param value 环境光颜色。\n\t*/\n\t__getset(0,__proto,'ambientColor',function(){\n\t\treturn this._getColor(9);\n\t\t},function(value){\n\t\tthis._setColor(9,value);\n\t});\n\n\t/**\n\t*设置环境贴图。\n\t*@param value 环境贴图。\n\t*/\n\t/**\n\t*获取环境贴图。\n\t*@return 环境贴图。\n\t*/\n\t__getset(0,__proto,'ambientTexture',function(){\n\t\treturn this._getTexture(5);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tthis._addShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_AMBIENTMAP);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_AMBIENTMAP);\n\t\t}\n\t\tthis._setTexture(5,value);\n\t});\n\n\t/**\n\t*设置渲染模式。\n\t*@return 渲染模式。\n\t*/\n\t__getset(0,__proto,'renderMode',null,function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.alphaTest=true;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 4:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=true;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 13:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 14:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 15:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 16:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 5:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 6:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 7:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 8:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 9:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 10:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 11:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 12:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(StandardMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"Material:renderMode value error.\");\n\t\t\t}\n\t\tthis._conchMaterial && this._conchMaterial.setRenderMode(value);\n\t});\n\n\t/**\n\t*设置反射颜色。\n\t*@param value 反射颜色。\n\t*/\n\t__getset(0,__proto,'reflectColor',function(){\n\t\treturn this._getColor(12);\n\t\t},function(value){\n\t\tthis._setColor(12,value);\n\t});\n\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(15);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t}\n\t\tthis._setColor(15,value);\n\t});\n\n\t/**\n\t*设置反射率。\n\t*@param value 反射率。\n\t*/\n\t__getset(0,__proto,'albedo',function(){\n\t\treturn this._getColor(7);\n\t\t},function(value){\n\t\tthis._setColor(7,value);\n\t});\n\n\t/**\n\t*设置漫反射光颜色。\n\t*@param value 漫反射光颜色。\n\t*/\n\t__getset(0,__proto,'diffuseColor',function(){\n\t\treturn this._getColor(10);\n\t\t},function(value){\n\t\tthis._setColor(10,value);\n\t});\n\n\t/**\n\t*设置反射率。\n\t*@param value 反射率。\n\t*/\n\t__getset(0,__proto,'albedoColor',function(){\n\t\treturn this._getColor(7);\n\t\t},function(value){\n\t\tthis._setColor(7,value);\n\t});\n\n\t/**\n\t*设置高光颜色。\n\t*@param value 高光颜色。\n\t*/\n\t__getset(0,__proto,'specularColor',function(){\n\t\treturn this._getColor(11);\n\t\t},function(value){\n\t\tthis._setColor(11,value);\n\t});\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tthis._addShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_DIFFUSEMAP);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_DIFFUSEMAP);\n\t\t}\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置法线贴图。\n\t*@param value 法线贴图。\n\t*/\n\t/**\n\t*获取法线贴图。\n\t*@return 法线贴图。\n\t*/\n\t__getset(0,__proto,'normalTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tthis._addShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_NORMALMAP);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_NORMALMAP);\n\t\t}\n\t\tthis._setTexture(2,value);\n\t});\n\n\t/**\n\t*设置高光贴图。\n\t*@param value 高光贴图。\n\t*/\n\t/**\n\t*获取高光贴图。\n\t*@return 高光贴图。\n\t*/\n\t__getset(0,__proto,'specularTexture',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tthis._addShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_SPECULARMAP);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_SPECULARMAP);\n\t\t}\n\t\tthis._setTexture(3,value);\n\t});\n\n\t/**\n\t*设置放射贴图。\n\t*@param value 放射贴图。\n\t*/\n\t/**\n\t*获取放射贴图。\n\t*@return 放射贴图。\n\t*/\n\t__getset(0,__proto,'emissiveTexture',function(){\n\t\treturn this._getTexture(4);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tthis._addShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_EMISSIVEMAP);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_EMISSIVEMAP);\n\t\t}\n\t\tthis._setTexture(4,value);\n\t});\n\n\t/**\n\t*设置反射贴图。\n\t*@param value 反射贴图。\n\t*/\n\t/**\n\t*获取反射贴图。\n\t*@return 反射贴图。\n\t*/\n\t__getset(0,__proto,'reflectTexture',function(){\n\t\treturn this._getTexture(6);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tthis._addShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_REFLECTMAP);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_REFLECTMAP);\n\t\t}\n\t\tthis._setTexture(6,value);\n\t});\n\n\t/**\n\t*设置UV变换。\n\t*@param value UV变换。\n\t*/\n\t/**\n\t*获取UV变换。\n\t*@return UV变换。\n\t*/\n\t__getset(0,__proto,'transformUV',function(){\n\t\treturn this._transformUV;\n\t\t},function(value){\n\t\tthis._transformUV=value;\n\t\tthis._setMatrix4x4(13,value.matrix);\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_UVTRANSFORM);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.material.StandardMaterial.SHADERDEFINE_UVTRANSFORM);\n\t\tif (this._conchMaterial){\n\t\t\tthis._conchMaterial.setShaderValue(13,value.matrix.elements,0);\n\t\t}\n\t});\n\n\tStandardMaterial.__init__=function(){\n\t\tStandardMaterial.SHADERDEFINE_DIFFUSEMAP=StandardMaterial.shaderDefines.registerDefine(\"DIFFUSEMAP\");\n\t\tStandardMaterial.SHADERDEFINE_NORMALMAP=StandardMaterial.shaderDefines.registerDefine(\"NORMALMAP\");\n\t\tStandardMaterial.SHADERDEFINE_SPECULARMAP=StandardMaterial.shaderDefines.registerDefine(\"SPECULARMAP\");\n\t\tStandardMaterial.SHADERDEFINE_EMISSIVEMAP=StandardMaterial.shaderDefines.registerDefine(\"EMISSIVEMAP\");\n\t\tStandardMaterial.SHADERDEFINE_AMBIENTMAP=StandardMaterial.shaderDefines.registerDefine(\"AMBIENTMAP\");\n\t\tStandardMaterial.SHADERDEFINE_REFLECTMAP=StandardMaterial.shaderDefines.registerDefine(\"REFLECTMAP\");\n\t\tStandardMaterial.SHADERDEFINE_UVTRANSFORM=StandardMaterial.shaderDefines.registerDefine(\"UVTRANSFORM\");\n\t\tStandardMaterial.SHADERDEFINE_TILINGOFFSET=StandardMaterial.shaderDefines.registerDefine(\"TILINGOFFSET\");\n\t\tStandardMaterial.SHADERDEFINE_ADDTIVEFOG=StandardMaterial.shaderDefines.registerDefine(\"ADDTIVEFOG\");\n\t}\n\n\tStandardMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,StandardMaterial);\n\t}\n\n\tStandardMaterial._parseStandardMaterial=function(textureMap,material,json){\n\t\tvar customProps=json.customProps;\n\t\tvar ambientColorValue=customProps.ambientColor;\n\t\tmaterial.ambientColor=new Vector3(ambientColorValue[0],ambientColorValue[1],ambientColorValue[2]);\n\t\tvar diffuseColorValue=customProps.diffuseColor;\n\t\tmaterial.diffuseColor=new Vector3(diffuseColorValue[0],diffuseColorValue[1],diffuseColorValue[2]);\n\t\tvar specularColorValue=customProps.specularColor;\n\t\tmaterial.specularColor=new Vector4(specularColorValue[0],specularColorValue[1],specularColorValue[2],specularColorValue[3]);\n\t\tvar reflectColorValue=customProps.reflectColor;\n\t\tmaterial.reflectColor=new Vector3(reflectColorValue[0],reflectColorValue[1],reflectColorValue[2]);\n\t\tvar albedoColorValue=customProps.albedoColor;\n\t\t(albedoColorValue)&& (material.albedo=new Vector4(albedoColorValue[0],albedoColorValue[1],albedoColorValue[2],albedoColorValue[3]));\n\t\tvar diffuseTexture=customProps.diffuseTexture.texture2D;\n\t\t(diffuseTexture)&& (material.diffuseTexture=Loader.getRes(textureMap[diffuseTexture]));\n\t\tvar normalTexture=customProps.normalTexture.texture2D;\n\t\t(normalTexture)&& (material.normalTexture=Loader.getRes(textureMap[normalTexture]));\n\t\tvar specularTexture=customProps.specularTexture.texture2D;\n\t\t(specularTexture)&& (material.specularTexture=Loader.getRes(textureMap[specularTexture]));\n\t\tvar emissiveTexture=customProps.emissiveTexture.texture2D;\n\t\t(emissiveTexture)&& (material.emissiveTexture=Loader.getRes(textureMap[emissiveTexture]));\n\t\tvar ambientTexture=customProps.ambientTexture.texture2D;\n\t\t(ambientTexture)&& (material.ambientTexture=Loader.getRes(textureMap[ambientTexture]));\n\t\tvar reflectTexture=customProps.reflectTexture.texture2D;\n\t\t(reflectTexture)&& (material.reflectTexture=Loader.getRes(textureMap[reflectTexture]));\n\t}\n\n\tStandardMaterial.RENDERMODE_OPAQUE=1;\n\tStandardMaterial.RENDERMODE_OPAQUEDOUBLEFACE=2;\n\tStandardMaterial.RENDERMODE_CUTOUT=3;\n\tStandardMaterial.RENDERMODE_CUTOUTDOUBLEFACE=4;\n\tStandardMaterial.RENDERMODE_TRANSPARENT=13;\n\tStandardMaterial.RENDERMODE_TRANSPARENTDOUBLEFACE=14;\n\tStandardMaterial.RENDERMODE_ADDTIVE=15;\n\tStandardMaterial.RENDERMODE_ADDTIVEDOUBLEFACE=16;\n\tStandardMaterial.RENDERMODE_DEPTHREAD_TRANSPARENT=5;\n\tStandardMaterial.RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE=6;\n\tStandardMaterial.RENDERMODE_DEPTHREAD_ADDTIVE=7;\n\tStandardMaterial.RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE=8;\n\tStandardMaterial.RENDERMODE_NONDEPTH_TRANSPARENT=9;\n\tStandardMaterial.RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE=10;\n\tStandardMaterial.RENDERMODE_NONDEPTH_ADDTIVE=11;\n\tStandardMaterial.RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE=12;\n\tStandardMaterial.SHADERDEFINE_DIFFUSEMAP=0;\n\tStandardMaterial.SHADERDEFINE_NORMALMAP=0;\n\tStandardMaterial.SHADERDEFINE_SPECULARMAP=0;\n\tStandardMaterial.SHADERDEFINE_EMISSIVEMAP=0;\n\tStandardMaterial.SHADERDEFINE_AMBIENTMAP=0;\n\tStandardMaterial.SHADERDEFINE_REFLECTMAP=0;\n\tStandardMaterial.SHADERDEFINE_UVTRANSFORM=0;\n\tStandardMaterial.SHADERDEFINE_TILINGOFFSET=0;\n\tStandardMaterial.SHADERDEFINE_ADDTIVEFOG=0;\n\tStandardMaterial.DIFFUSETEXTURE=1;\n\tStandardMaterial.NORMALTEXTURE=2;\n\tStandardMaterial.SPECULARTEXTURE=3;\n\tStandardMaterial.EMISSIVETEXTURE=4;\n\tStandardMaterial.AMBIENTTEXTURE=5;\n\tStandardMaterial.REFLECTTEXTURE=6;\n\tStandardMaterial.ALBEDO=7;\n\tStandardMaterial.UVANIAGE=8;\n\tStandardMaterial.MATERIALAMBIENT=9;\n\tStandardMaterial.MATERIALDIFFUSE=10;\n\tStandardMaterial.MATERIALSPECULAR=11;\n\tStandardMaterial.MATERIALREFLECT=12;\n\tStandardMaterial.UVMATRIX=13;\n\tStandardMaterial.UVAGE=14;\n\tStandardMaterial.TILINGOFFSET=15;\n\t__static(StandardMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new StandardMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn StandardMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.material.TerrainMaterial extends laya.d3.core.material.BaseMaterial\nvar TerrainMaterial=(function(_super){\n\tfunction TerrainMaterial(){\n\t\tthis._diffuseScale1=null;\n\t\tthis._diffuseScale2=null;\n\t\tthis._diffuseScale3=null;\n\t\tthis._diffuseScale4=null;\n\t\tTerrainMaterial.__super.call(this);\n\t\tthis.setShaderName(\"Terrain\");\n\t\tthis.renderMode=1;\n\t\tthis._diffuseScale1=new Vector2();\n\t\tthis._diffuseScale2=new Vector2();\n\t\tthis._diffuseScale3=new Vector2();\n\t\tthis._diffuseScale4=new Vector2();\n\t\tthis.ambientColor=new Vector3(0.6,0.6,0.6);\n\t\tthis.diffuseColor=new Vector3(1.0,1.0,1.0);\n\t\tthis.specularColor=new Vector4(0.2,0.2,0.2,32.0);\n\t}\n\n\t__class(TerrainMaterial,'laya.d3.core.material.TerrainMaterial',_super);\n\tvar __proto=TerrainMaterial.prototype;\n\t__proto.setDiffuseScale1=function(x,y){\n\t\tthis._diffuseScale1.x=x;\n\t\tthis._diffuseScale1.y=y;\n\t\tthis._setColor(6,this._diffuseScale1);\n\t}\n\n\t__proto.setDiffuseScale2=function(x,y){\n\t\tthis._diffuseScale2.x=x;\n\t\tthis._diffuseScale2.y=y;\n\t\tthis._setColor(7,this._diffuseScale2);\n\t}\n\n\t__proto.setDiffuseScale3=function(x,y){\n\t\tthis._diffuseScale3.x=x;\n\t\tthis._diffuseScale3.y=y;\n\t\tthis._setColor(8,this._diffuseScale3);\n\t}\n\n\t__proto.setDiffuseScale4=function(x,y){\n\t\tthis._diffuseScale4.x=x;\n\t\tthis._diffuseScale4.y=y;\n\t\tthis._setColor(9,this._diffuseScale4);\n\t}\n\n\t__proto.setDetailNum=function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tbreak ;\n\t\t\tcase 4:\n\t\t\t\tthis._addShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM4);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM1);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM2);\n\t\t\t\tthis._removeShaderDefine(laya.d3.core.material.TerrainMaterial.SHADERDEFINE_DETAIL_NUM3);\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t__proto.disableLight=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT | ShaderCompile3D.SHADERDEFINE_SPOTLIGHT | ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.setShaderName=function(name){\n\t\t_super.prototype.setShaderName.call(this,name);\n\t}\n\n\t/**\n\t*设置渲染模式。\n\t*@return 渲染模式。\n\t*/\n\t__getset(0,__proto,'renderMode',null,function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.depthTest=0x0203;\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"TerrainMaterial:renderMode value error.\");\n\t\t\t}\n\t\tthis._conchMaterial && this._conchMaterial.setRenderMode(value);\n\t});\n\n\t/**\n\t*设置第二层贴图。\n\t*@param value 第二层贴图。\n\t*/\n\t/**\n\t*获取第二层贴图。\n\t*@return 第二层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture2',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tthis._setTexture(3,value);\n\t});\n\n\t__getset(0,__proto,'ambientColor',function(){\n\t\treturn this._getColor(10);\n\t\t},function(value){\n\t\tthis._setColor(10,value);\n\t});\n\n\t/**\n\t*设置第四层贴图。\n\t*@param value 第四层贴图。\n\t*/\n\t/**\n\t*获取第四层贴图。\n\t*@return 第四层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture4',function(){\n\t\treturn this._getTexture(5);\n\t\t},function(value){\n\t\tthis._setTexture(5,value);\n\t});\n\n\t__getset(0,__proto,'diffuseColor',function(){\n\t\treturn this._getColor(11);\n\t\t},function(value){\n\t\tthis._setColor(11,value);\n\t});\n\n\t/**\n\t*设置第一层贴图。\n\t*@param value 第一层贴图。\n\t*/\n\t/**\n\t*获取第一层贴图。\n\t*@return 第一层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture1',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tthis._setTexture(2,value);\n\t});\n\n\t__getset(0,__proto,'specularColor',function(){\n\t\treturn this._getColor(12);\n\t\t},function(value){\n\t\tthis._setColor(12,value);\n\t});\n\n\t/**\n\t*设置第三层贴图。\n\t*@param value 第三层贴图。\n\t*/\n\t/**\n\t*获取第三层贴图。\n\t*@return 第三层贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture3',function(){\n\t\treturn this._getTexture(4);\n\t\t},function(value){\n\t\tthis._setTexture(4,value);\n\t});\n\n\t/**\n\t*设置splatAlpha贴图。\n\t*@param value splatAlpha贴图。\n\t*/\n\t/**\n\t*获取splatAlpha贴图。\n\t*@return splatAlpha贴图。\n\t*/\n\t__getset(0,__proto,'splatAlphaTexture',function(){\n\t\treturn this._getTexture(0);\n\t\t},function(value){\n\t\tthis._setTexture(0,value);\n\t});\n\n\t__getset(0,__proto,'normalTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tthis._setTexture(1,value);\n\t});\n\n\tTerrainMaterial.__init__=function(){\n\t\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM1=TerrainMaterial.shaderDefines.registerDefine(\"DETAIL_NUM1\");\n\t\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM2=TerrainMaterial.shaderDefines.registerDefine(\"DETAIL_NUM2\");\n\t\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM4=TerrainMaterial.shaderDefines.registerDefine(\"DETAIL_NUM4\");\n\t\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM3=TerrainMaterial.shaderDefines.registerDefine(\"DETAIL_NUM3\");\n\t}\n\n\tTerrainMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,TerrainMaterial);\n\t}\n\n\tTerrainMaterial.RENDERMODE_OPAQUE=1;\n\tTerrainMaterial.RENDERMODE_TRANSPARENT=2;\n\tTerrainMaterial.SPLATALPHATEXTURE=0;\n\tTerrainMaterial.NORMALTEXTURE=1;\n\tTerrainMaterial.DIFFUSETEXTURE1=2;\n\tTerrainMaterial.DIFFUSETEXTURE2=3;\n\tTerrainMaterial.DIFFUSETEXTURE3=4;\n\tTerrainMaterial.DIFFUSETEXTURE4=5;\n\tTerrainMaterial.DIFFUSESCALE1=6;\n\tTerrainMaterial.DIFFUSESCALE2=7;\n\tTerrainMaterial.DIFFUSESCALE3=8;\n\tTerrainMaterial.DIFFUSESCALE4=9;\n\tTerrainMaterial.MATERIALAMBIENT=10;\n\tTerrainMaterial.MATERIALDIFFUSE=11;\n\tTerrainMaterial.MATERIALSPECULAR=12;\n\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM1=0;\n\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM2=0;\n\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM3=0;\n\tTerrainMaterial.SHADERDEFINE_DETAIL_NUM4=0;\n\t__static(TerrainMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new TerrainMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn TerrainMaterial;\n})(BaseMaterial)\n\n\n//class laya.d3.core.material.WaterMaterial extends laya.d3.core.material.BaseMaterial\nvar WaterMaterial=(function(_super){\n\tfunction WaterMaterial(){\n\t\tthis._useVertexDeep=false;\n\t\tWaterMaterial.__super.call(this);\n\t\tthis.setShaderName(\"Water\");\n\t}\n\n\t__class(WaterMaterial,'laya.d3.core.material.WaterMaterial',_super);\n\tvar __proto=WaterMaterial.prototype;\n\t/**\n\t*禁用雾化。\n\t*/\n\t__proto.disableFog=function(){\n\t\tthis._addDisablePublicShaderDefine(ShaderCompile3D.SHADERDEFINE_FOG);\n\t}\n\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\t_super.prototype.onAsynLoaded.call(this,url,data,params);\n\t}\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置法线贴图。\n\t*@param value 法线贴图。\n\t*/\n\t/**\n\t*获取法线贴图。\n\t*@return 法线贴图。\n\t*/\n\t__getset(0,__proto,'normalTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tthis._setTexture(2,value);\n\t});\n\n\t__getset(0,__proto,'underWaterTexture',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tthis._setTexture(3,value);\n\t});\n\n\t__getset(0,__proto,'deepColorTexture',function(){\n\t\treturn this._getTexture(10);\n\t\t},function(v){\n\t\tthis._setTexture(10,v);\n\t});\n\n\t__getset(0,__proto,'useFoam',null,function(v){\n\t\tif (v){\n\t\t\tthis._addShaderDefine(WaterMaterial.SHADERDEFINE_USE_FOAM);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(WaterMaterial.SHADERDEFINE_USE_FOAM);\n\t\t}\n\t});\n\n\t__getset(0,__proto,'skyTexture',function(){\n\t\treturn this._getTexture(11);\n\t\t},function(v){\n\t\tthis._setTexture(11,v);\n\t});\n\n\t__getset(0,__proto,'deepScale',function(){\n\t\treturn this._getNumber(20);\n\t\t},function(v){\n\t\tthis._setNumber(20,v);\n\t});\n\n\t__getset(0,__proto,'detailTexture',function(){\n\t\treturn this._getTexture(9);\n\t\t},function(value){\n\t\tthis._setTexture(9,value);\n\t});\n\n\t__getset(0,__proto,'foamTexture',function(){\n\t\treturn this._getTexture(17);\n\t\t},function(v){\n\t\tthis._setTexture(17,v);\n\t});\n\n\t__getset(0,__proto,'waterInfoTexture',function(){\n\t\treturn this._getTexture(16);\n\t\t},function(v){\n\t\tthis._setTexture(16,v);\n\t});\n\n\t/**\n\t*对定点进行变换的纹理。现在不用\n\t*/\n\t__getset(0,__proto,'vertexDispTexture',function(){\n\t\treturn this._getTexture(4);\n\t\t},function(value){\n\t\tthis._setTexture(4,value);\n\t});\n\n\t__getset(0,__proto,'currentTm',function(){\n\t\treturn this._getNumber(8);\n\t\t},function(v){\n\t\tthis._setNumber(8,v);\n\t});\n\n\t__getset(0,__proto,'waveInfo',function(){\n\t\treturn this._getBuffer(12);\n\t\t},function(v){\n\t\tthis._setBuffer(12,v);\n\t});\n\n\t__getset(0,__proto,'waveInfoD',function(){\n\t\treturn this._getBuffer(13);\n\t\t},function(v){\n\t\tthis._setBuffer(13,v);\n\t});\n\n\t__getset(0,__proto,'waveMainDir',function(){\n\t\treturn this._getNumber(14);\n\t\t},function(deg){\n\t\tthis._setNumber(14,deg *Math.PI / 180);\n\t});\n\n\t__getset(0,__proto,'geoWaveUVScale',function(){\n\t\treturn this._getNumber(18);\n\t\t},function(v){\n\t\tthis._setNumber(18,v);\n\t});\n\n\t__getset(0,__proto,'windSpeed',function(){\n\t\treturn 0;\n\t\t},function(s){\n\t});\n\n\t__getset(0,__proto,'scrsize',null,function(v){\n\t\tthis._setBuffer(15,v);\n\t});\n\n\t__getset(0,__proto,'seaColor',function(){\n\t\treturn this._getBuffer(19);\n\t\t},function(v){\n\t\tthis._setBuffer(19,v);\n\t});\n\n\t__getset(0,__proto,'useVertexDeep',function(){\n\t\treturn this._useVertexDeep;\n\t\t},function(v){\n\t\tthis._useVertexDeep=v;\n\t\tif (v)\n\t\t\tthis._addShaderDefine(WaterMaterial.SHADERDEFINE_USEVERTEXHEIGHT);\n\t\telse {\n\t\t\tthis._removeShaderDefine(WaterMaterial.SHADERDEFINE_USEVERTEXHEIGHT);\n\t\t}\n\t});\n\n\t__getset(0,__proto,'windDir',function(){\n\t\treturn 0;\n\t\t},function(d){\n\t});\n\n\t__getset(0,__proto,'useRefractTexture',null,function(v){\n\t\tif (v){\n\t\t\tthis._addShaderDefine(WaterMaterial.SHADERDEFINE_USE_REFRACT_TEX);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(WaterMaterial.SHADERDEFINE_USE_REFRACT_TEX);\n\t\t}\n\t});\n\n\t__getset(0,__proto,'renderMode',null,function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tbreak ;\n\t\t\tcase 13:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"PBRMaterial:renderMode value error.\");\n\t\t\t}\n\t});\n\n\tWaterMaterial.__init__=function(){\n\t\tWaterMaterial.SHADERDEFINE_CUBE_ENV=WaterMaterial.shaderDefines.registerDefine(\"CUBE_ENV\");\n\t\tWaterMaterial.SHADERDEFINE_HDR_ENV=WaterMaterial.shaderDefines.registerDefine(\"HDR_ENV\");\n\t\tWaterMaterial.SHADERDEFINE_SHOW_NORMAL=WaterMaterial.shaderDefines.registerDefine(\"SHOW_NORMAL\");\n\t\tWaterMaterial.SHADERDEFINE_USEVERTEXHEIGHT=WaterMaterial.shaderDefines.registerDefine(\"USE_VERTEX_DEEPINFO\");\n\t\tWaterMaterial.SHADERDEFINE_USE_FOAM=WaterMaterial.shaderDefines.registerDefine(\"USE_FOAM\");\n\t\tWaterMaterial.SHADERDEFINE_USE_REFRACT_TEX=WaterMaterial.shaderDefines.registerDefine(\"USE_REFR_TEX\");\n\t}\n\n\tWaterMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,WaterMaterial);\n\t}\n\n\tWaterMaterial.DIFFUSETEXTURE=1;\n\tWaterMaterial.NORMALTEXTURE=2;\n\tWaterMaterial.UNDERWATERTEXTURE=3;\n\tWaterMaterial.VERTEXDISPTEXTURE=4;\n\tWaterMaterial.UVANIAGE=5;\n\tWaterMaterial.UVMATRIX=6;\n\tWaterMaterial.UVAGE=7;\n\tWaterMaterial.CURTM=8;\n\tWaterMaterial.DETAILTEXTURE=9;\n\tWaterMaterial.DEEPCOLORTEXTURE=10;\n\tWaterMaterial.SKYTEXTURE=11;\n\tWaterMaterial.WAVEINFO=12;\n\tWaterMaterial.WAVEINFOD=13;\n\tWaterMaterial.WAVEMAINDIR=14;\n\tWaterMaterial.SCRSIZE=15;\n\tWaterMaterial.WATERINFO=16;\n\tWaterMaterial.FOAMTEXTURE=17;\n\tWaterMaterial.GEOWAVE_UV_SCALE=18;\n\tWaterMaterial.SEA_COLOR=19;\n\tWaterMaterial.WAVEINFODEEPSCALE=20;\n\tWaterMaterial.SHADERDEFINE_SHOW_NORMAL=0;\n\tWaterMaterial.SHADERDEFINE_CUBE_ENV=0;\n\tWaterMaterial.SHADERDEFINE_HDR_ENV=0;\n\tWaterMaterial.SHADERDEFINE_USE_FOAM=0;\n\tWaterMaterial.SHADERDEFINE_USE_REFRACT_TEX=0;\n\tWaterMaterial.SHADERDEFINE_USEVERTEXHEIGHT=0;\n\tWaterMaterial.RENDERMODE_OPAQUE=1;\n\tWaterMaterial.RENDERMODE_OPAQUEDOUBLEFACE=2;\n\tWaterMaterial.RENDERMODE_CUTOUT=3;\n\tWaterMaterial.RENDERMODE_CUTOUTDOUBLEFACE=4;\n\tWaterMaterial.RENDERMODE_TRANSPARENT=13;\n\t__static(WaterMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new WaterMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn WaterMaterial;\n})(BaseMaterial)\n\n\n/**\n*<code>IndexBuffer3D</code> 类用于创建索引缓冲。\n*/\n//class laya.d3.graphics.IndexBuffer3D extends laya.webgl.utils.Buffer\nvar IndexBuffer3D=(function(_super){\n\tfunction IndexBuffer3D(indexType,indexCount,bufferUsage,canRead){\n\t\t/**@private */\n\t\tthis._indexType=null;\n\t\t/**@private */\n\t\tthis._indexTypeByteCount=0;\n\t\t/**@private */\n\t\tthis._indexCount=0;\n\t\t/**@private */\n\t\tthis._canRead=false;\n\t\t(bufferUsage===void 0)&& (bufferUsage=/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\t(canRead===void 0)&& (canRead=false);\n\t\tIndexBuffer3D.__super.call(this);\n\t\tthis._indexType=indexType;\n\t\tthis._indexCount=indexCount;\n\t\tthis._bufferUsage=bufferUsage;\n\t\tthis._bufferType=/*laya.webgl.WebGLContext.ELEMENT_ARRAY_BUFFER*/0x8893;\n\t\tthis._canRead=canRead;\n\t\tvar byteLength=0;\n\t\tif (indexType==/*CLASS CONST:laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\")\n\t\t\tthis._indexTypeByteCount=2;\n\t\telse if (indexType==/*CLASS CONST:laya.d3.graphics.IndexBuffer3D.INDEXTYPE_UBYTE*/\"ubyte\")\n\t\tthis._indexTypeByteCount=1;\n\t\telse\n\t\tthrow new Error(\"unidentification index type.\");\n\t\tbyteLength=this._indexTypeByteCount *indexCount;\n\t\tthis._byteLength=byteLength;\n\t\tthis._bind();\n\t\tBuffer._gl.bufferData(this._bufferType,byteLength,this._bufferUsage);\n\t\tif (canRead){\n\t\t\tif (indexType==/*CLASS CONST:laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\")\n\t\t\t\tthis._buffer=new Uint16Array(indexCount);\n\t\t\telse if (indexType==/*CLASS CONST:laya.d3.graphics.IndexBuffer3D.INDEXTYPE_UBYTE*/\"ubyte\")\n\t\t\tthis._buffer=new Uint8Array(indexCount);\n\t\t\tthis.memorySize=byteLength *2;\n\t\t\t}else {\n\t\t\tthis.memorySize=byteLength;\n\t\t}\n\t}\n\n\t__class(IndexBuffer3D,'laya.d3.graphics.IndexBuffer3D',_super);\n\tvar __proto=IndexBuffer3D.prototype;\n\t/**\n\t*设置数据。\n\t*@param data 索引数据。\n\t*@param bufferOffset 索引缓冲中的偏移。\n\t*@param dataStartIndex 索引数据的偏移。\n\t*@param dataCount 索引数据的数量。\n\t*/\n\t__proto.setData=function(data,bufferOffset,dataStartIndex,dataCount){\n\t\t(bufferOffset===void 0)&& (bufferOffset=0);\n\t\t(dataStartIndex===void 0)&& (dataStartIndex=0);\n\t\t(dataCount===void 0)&& (dataCount=4294967295);\n\t\tvar byteCount=0;\n\t\tif (this._indexType==/*CLASS CONST:laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\"){\n\t\t\tbyteCount=2;\n\t\t\tif (dataStartIndex!==0 || dataCount!==4294967295)\n\t\t\t\tdata=new Uint16Array(data.buffer,dataStartIndex *byteCount,dataCount);\n\t\t\t}else if (this._indexType==/*CLASS CONST:laya.d3.graphics.IndexBuffer3D.INDEXTYPE_UBYTE*/\"ubyte\"){\n\t\t\tbyteCount=1;\n\t\t\tif (dataStartIndex!==0 || dataCount!==4294967295)\n\t\t\t\tdata=new Uint8Array(data.buffer,dataStartIndex *byteCount,dataCount);\n\t\t}\n\t\tthis._bind();\n\t\tBuffer._gl.bufferSubData(this._bufferType,bufferOffset *byteCount,data);\n\t\tif (this._canRead){\n\t\t\tif (bufferOffset!==0 || dataStartIndex!==0 || dataCount!==4294967295){\n\t\t\t\tvar maxLength=this._buffer.length-bufferOffset;\n\t\t\t\tif (dataCount > maxLength)\n\t\t\t\t\tdataCount=maxLength;\n\t\t\t\tfor (var i=0;i < dataCount;i++)\n\t\t\t\tthis._buffer[bufferOffset+i]=data[i];\n\t\t\t\t}else {\n\t\t\t\tthis._buffer=data;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*获取索引数据。\n\t*@return 索引数据。\n\t*/\n\t__proto.getData=function(){\n\t\tif (this._canRead)\n\t\t\treturn this._buffer;\n\t\telse\n\t\tthrow new Error(\"Can't read data from VertexBuffer with only write flag!\");\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.disposeResource=function(){\n\t\t_super.prototype.disposeResource.call(this);\n\t\tthis._buffer=null;\n\t\tthis.memorySize=0;\n\t}\n\n\t/**\n\t*获取索引类型。\n\t*@return 索引类型。\n\t*/\n\t__getset(0,__proto,'indexType',function(){\n\t\treturn this._indexType;\n\t});\n\n\t/**\n\t*获取索引类型字节数量。\n\t*@return 索引类型字节数量。\n\t*/\n\t__getset(0,__proto,'indexTypeByteCount',function(){\n\t\treturn this._indexTypeByteCount;\n\t});\n\n\t/**\n\t*获取索引个数。\n\t*@return 索引个数。\n\t*/\n\t__getset(0,__proto,'indexCount',function(){\n\t\treturn this._indexCount;\n\t});\n\n\t/**\n\t*获取是否可读。\n\t*@return 是否可读。\n\t*/\n\t__getset(0,__proto,'canRead',function(){\n\t\treturn this._canRead;\n\t});\n\n\tIndexBuffer3D.INDEXTYPE_UBYTE=\"ubyte\";\n\tIndexBuffer3D.INDEXTYPE_USHORT=\"ushort\";\n\tIndexBuffer3D.create=function(indexType,indexCount,bufferUsage,canRead){\n\t\t(bufferUsage===void 0)&& (bufferUsage=/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\t(canRead===void 0)&& (canRead=false);\n\t\treturn new IndexBuffer3D(indexType,indexCount,bufferUsage,canRead);\n\t}\n\n\treturn IndexBuffer3D;\n})(Buffer)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.particleShuriKen.ShurikenParticleMaterial extends laya.d3.core.material.BaseMaterial\nvar ShurikenParticleMaterial=(function(_super){\n\tfunction ShurikenParticleMaterial(){\n\t\tShurikenParticleMaterial.__super.call(this);\n\t\tthis.setShaderName(\"PARTICLESHURIKEN\");\n\t\tthis.renderMode=6;\n\t}\n\n\t__class(ShurikenParticleMaterial,'laya.d3.core.particleShuriKen.ShurikenParticleMaterial',_super);\n\tvar __proto=ShurikenParticleMaterial.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar jsonData=data[0];\n\t\tif (jsonData.version){\n\t\t\t_super.prototype.onAsynLoaded.call(this,url,data,params);\n\t\t\t}else {\n\t\t\tvar textureMap=data[1];\n\t\t\tvar props=jsonData.props;\n\t\t\tfor (var prop in props)\n\t\t\tthis[prop]=props[prop];\n\t\t\tShurikenParticleMaterial._parseShurikenParticleMaterial(textureMap,this,jsonData);\n\t\t\tthis._endLoaded();\n\t\t}\n\t}\n\n\t/**\n\t*设置渲染模式。\n\t*@return 渲染模式。\n\t*/\n\t__getset(0,__proto,'renderMode',null,function(value){\n\t\tswitch (value){\n\t\t\tcase 1:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.alphaTest=true;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 4:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_OPAQUE*/2000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=0;\n\t\t\t\tthis.alphaTest=true;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 13:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 14:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 15:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 16:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=true;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 5:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 6:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 7:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 8:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthWrite=false;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 9:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 10:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=0x0303;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._removeShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 11:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=2;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tcase 12:\n\t\t\t\tthis.renderQueue=/*laya.d3.core.material.BaseMaterial.RENDERQUEUE_TRANSPARENT*/3000;\n\t\t\t\tthis.depthTest=0x0201;\n\t\t\t\tthis.cull=0;\n\t\t\t\tthis.blend=1;\n\t\t\t\tthis.srcBlend=0x0302;\n\t\t\t\tthis.dstBlend=1;\n\t\t\t\tthis.alphaTest=false;\n\t\t\t\tthis._addShaderDefine(ShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG);\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"Material:renderMode value error.\");\n\t\t\t}\n\t\tthis._conchMaterial && this._conchMaterial.setRenderMode(value);\n\t});\n\n\t/**\n\t*设置颜色。\n\t*@param value 颜色。\n\t*/\n\t/**\n\t*获取颜色。\n\t*@return 颜色。\n\t*/\n\t__getset(0,__proto,'tintColor',function(){\n\t\treturn this._getColor(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.particleShuriKen.ShurikenParticleMaterial.SHADERDEFINE_TINTCOLOR);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.particleShuriKen.ShurikenParticleMaterial.SHADERDEFINE_TINTCOLOR);\n\t\tthis._setColor(2,value);\n\t});\n\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(3);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.core.particleShuriKen.ShurikenParticleMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.core.particleShuriKen.ShurikenParticleMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.particleShuriKen.ShurikenParticleMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t}\n\t\tthis._setColor(3,value);\n\t});\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.particleShuriKen.ShurikenParticleMaterial.SHADERDEFINE_DIFFUSEMAP);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.particleShuriKen.ShurikenParticleMaterial.SHADERDEFINE_DIFFUSEMAP);\n\t\tthis._setTexture(1,value);\n\t});\n\n\tShurikenParticleMaterial.__init__=function(){\n\t\tShurikenParticleMaterial.SHADERDEFINE_DIFFUSEMAP=ShurikenParticleMaterial.shaderDefines.registerDefine(\"DIFFUSEMAP\");\n\t\tShurikenParticleMaterial.SHADERDEFINE_TINTCOLOR=ShurikenParticleMaterial.shaderDefines.registerDefine(\"TINTCOLOR\");\n\t\tShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG=ShurikenParticleMaterial.shaderDefines.registerDefine(\"ADDTIVEFOG\");\n\t\tShurikenParticleMaterial.SHADERDEFINE_TILINGOFFSET=ShurikenParticleMaterial.shaderDefines.registerDefine(\"TILINGOFFSET\");\n\t}\n\n\tShurikenParticleMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,ShurikenParticleMaterial);\n\t}\n\n\tShurikenParticleMaterial._parseShurikenParticleMaterial=function(textureMap,material,json){\n\t\tvar customProps=json.customProps;\n\t\tvar diffuseTexture=customProps.diffuseTexture.texture2D;\n\t\t(diffuseTexture)&& (material.diffuseTexture=Loader.getRes(textureMap[diffuseTexture]));\n\t\tvar tintColorValue=customProps.tintColor;\n\t\t(tintColorValue)&& (material.tintColor=new Vector4(tintColorValue[0],tintColorValue[1],tintColorValue[2],tintColorValue[3]));\n\t}\n\n\tShurikenParticleMaterial.RENDERMODE_OPAQUE=1;\n\tShurikenParticleMaterial.RENDERMODE_OPAQUEDOUBLEFACE=2;\n\tShurikenParticleMaterial.RENDERMODE_CUTOUT=3;\n\tShurikenParticleMaterial.RENDERMODE_CUTOUTDOUBLEFACE=4;\n\tShurikenParticleMaterial.RENDERMODE_TRANSPARENT=13;\n\tShurikenParticleMaterial.RENDERMODE_TRANSPARENTDOUBLEFACE=14;\n\tShurikenParticleMaterial.RENDERMODE_ADDTIVE=15;\n\tShurikenParticleMaterial.RENDERMODE_ADDTIVEDOUBLEFACE=16;\n\tShurikenParticleMaterial.RENDERMODE_DEPTHREAD_TRANSPARENT=5;\n\tShurikenParticleMaterial.RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE=6;\n\tShurikenParticleMaterial.RENDERMODE_DEPTHREAD_ADDTIVE=7;\n\tShurikenParticleMaterial.RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE=8;\n\tShurikenParticleMaterial.RENDERMODE_NONDEPTH_TRANSPARENT=9;\n\tShurikenParticleMaterial.RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE=10;\n\tShurikenParticleMaterial.RENDERMODE_NONDEPTH_ADDTIVE=11;\n\tShurikenParticleMaterial.RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE=12;\n\tShurikenParticleMaterial.SHADERDEFINE_DIFFUSEMAP=0;\n\tShurikenParticleMaterial.SHADERDEFINE_TINTCOLOR=0;\n\tShurikenParticleMaterial.SHADERDEFINE_TILINGOFFSET=0;\n\tShurikenParticleMaterial.SHADERDEFINE_ADDTIVEFOG=0;\n\tShurikenParticleMaterial.DIFFUSETEXTURE=1;\n\tShurikenParticleMaterial.TINTCOLOR=2;\n\tShurikenParticleMaterial.TILINGOFFSET=3;\n\t__static(ShurikenParticleMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new ShurikenParticleMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn ShurikenParticleMaterial;\n})(BaseMaterial)\n\n\n/**\n*<code>VertexBuffer3D</code> 类用于创建顶点缓冲。\n*/\n//class laya.d3.graphics.VertexBuffer3D extends laya.webgl.utils.Buffer\nvar VertexBuffer3D=(function(_super){\n\tfunction VertexBuffer3D(vertexDeclaration,vertexCount,bufferUsage,canRead){\n\t\t/**@private */\n\t\tthis._vertexDeclaration=null;\n\t\t/**@private */\n\t\tthis._vertexCount=0;\n\t\t/**@private */\n\t\tthis._canRead=false;\n\t\t(canRead===void 0)&& (canRead=false);\n\t\tVertexBuffer3D.__super.call(this);\n\t\tthis._vertexDeclaration=vertexDeclaration;\n\t\tthis._vertexCount=vertexCount;\n\t\tthis._bufferUsage=bufferUsage;\n\t\tthis._bufferType=/*laya.webgl.WebGLContext.ARRAY_BUFFER*/0x8892;\n\t\tthis._canRead=canRead;\n\t\tthis.memorySize=this._byteLength=this._vertexDeclaration.vertexStride *vertexCount;\n\t\tthis._bind();\n\t\tBuffer._gl.bufferData(this._bufferType,this._byteLength,this._bufferUsage);\n\t\tcanRead && (this._buffer=new Float32Array(this._byteLength / 4));\n\t}\n\n\t__class(VertexBuffer3D,'laya.d3.graphics.VertexBuffer3D',_super);\n\tvar __proto=VertexBuffer3D.prototype;\n\t/**\n\t*和索引缓冲一起绑定。\n\t*@param ib 索引缓冲。\n\t*/\n\t__proto.bindWithIndexBuffer=function(ib){\n\t\t(ib)&& (ib._bind());\n\t\tthis._bind();\n\t}\n\n\t/**\n\t*设置数据。\n\t*@param data 顶点数据。\n\t*@param bufferOffset 顶点缓冲中的偏移。\n\t*@param dataStartIndex 顶点数据的偏移。\n\t*@param dataCount 顶点数据的数量。\n\t*/\n\t__proto.setData=function(data,bufferOffset,dataStartIndex,dataCount){\n\t\t(bufferOffset===void 0)&& (bufferOffset=0);\n\t\t(dataStartIndex===void 0)&& (dataStartIndex=0);\n\t\t(dataCount===void 0)&& (dataCount=4294967295);\n\t\tif (dataStartIndex!==0 || dataCount!==4294967295)\n\t\t\tdata=new Float32Array(data.buffer,dataStartIndex *4,dataCount);\n\t\tthis._bind();\n\t\tBuffer._gl.bufferSubData(this._bufferType,bufferOffset *4,data);\n\t\tif (this._canRead){\n\t\t\tif (bufferOffset!==0 || dataStartIndex!==0 || dataCount!==4294967295){\n\t\t\t\tvar maxLength=this._buffer.length-bufferOffset;\n\t\t\t\tif (dataCount > maxLength)\n\t\t\t\t\tdataCount=maxLength;\n\t\t\t\tfor (var i=0;i < dataCount;i++)\n\t\t\t\tthis._buffer[bufferOffset+i]=data[i];\n\t\t\t\t}else {\n\t\t\t\tthis._buffer=data;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*获取顶点数据。\n\t*@return 顶点数据。\n\t*/\n\t__proto.getData=function(){\n\t\tif (this._canRead)\n\t\t\treturn this._buffer;\n\t\telse\n\t\tthrow new Error(\"Can't read data from VertexBuffer with only write flag!\");\n\t}\n\n\t/**销毁顶点缓冲。*/\n\t__proto.disposeResource=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar elements=this._vertexDeclaration.getVertexElements();\n\t\tvar enableAtributes=Buffer._enableAtributes;\n\t\tfor (var i=0,n=elements.length;i < n;i++){\n\t\t\tif (enableAtributes[i]===this._glBuffer){\n\t\t\t\tgl.disableVertexAttribArray(i);\n\t\t\t\tenableAtributes[i]=null;\n\t\t\t}\n\t\t}\n\t\t_super.prototype.disposeResource.call(this);\n\t\tthis._buffer=null;\n\t\tthis._vertexDeclaration=null;\n\t\tthis.memorySize=0;\n\t}\n\n\t/**\n\t*获取顶点结构声明。\n\t*@return 顶点结构声明。\n\t*/\n\t__getset(0,__proto,'vertexDeclaration',function(){\n\t\treturn this._vertexDeclaration;\n\t});\n\n\t/**\n\t*获取顶点个数。\n\t*@return 顶点个数。\n\t*/\n\t__getset(0,__proto,'vertexCount',function(){\n\t\treturn this._vertexCount;\n\t});\n\n\t/**\n\t*获取是否可读。\n\t*@return 是否可读。\n\t*/\n\t__getset(0,__proto,'canRead',function(){\n\t\treturn this._canRead;\n\t});\n\n\tVertexBuffer3D.create=function(vertexDeclaration,vertexCount,bufferUsage,canRead){\n\t\t(bufferUsage===void 0)&& (bufferUsage=/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\t(canRead===void 0)&& (canRead=false);\n\t\treturn new VertexBuffer3D(vertexDeclaration,vertexCount,bufferUsage,canRead);\n\t}\n\n\treturn VertexBuffer3D;\n})(Buffer)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.trail.TrailMaterial extends laya.d3.core.material.BaseMaterial\nvar TrailMaterial=(function(_super){\n\tfunction TrailMaterial(){\n\t\tTrailMaterial.__super.call(this);\n\t\tthis.setShaderName(\"Trail\");\n\t\tthis._setColor(2,new Vector4(1.0,1.0,1.0,1.0));\n\t}\n\n\t__class(TrailMaterial,'laya.d3.core.trail.TrailMaterial',_super);\n\tvar __proto=TrailMaterial.prototype;\n\t/**\n\t*设置颜色。\n\t*@param value 颜色。\n\t*/\n\t/**\n\t*获取颜色。\n\t*@return 颜色。\n\t*/\n\t__getset(0,__proto,'tintColor',function(){\n\t\treturn this._getColor(2);\n\t\t},function(value){\n\t\tthis._setColor(2,value);\n\t});\n\n\t/**\n\t*设置贴图。\n\t*@param value 贴图。\n\t*/\n\t/**\n\t*获取贴图。\n\t*@return 贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.core.trail.TrailMaterial.SHADERDEFINE_DIFFUSETEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.core.trail.TrailMaterial.SHADERDEFINE_DIFFUSETEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(3);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.core.trail.TrailMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.core.trail.TrailMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.core.trail.TrailMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t}\n\t\tthis._setColor(3,value);\n\t});\n\n\tTrailMaterial.__init__=function(){\n\t\tTrailMaterial.SHADERDEFINE_DIFFUSETEXTURE=TrailMaterial.shaderDefines.registerDefine(\"DIFFUSETEXTURE\");\n\t\tTrailMaterial.SHADERDEFINE_TILINGOFFSET=TrailMaterial.shaderDefines.registerDefine(\"TILINGOFFSET\");\n\t}\n\n\tTrailMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,TrailMaterial);\n\t}\n\n\tTrailMaterial.SHADERDEFINE_DIFFUSETEXTURE=0;\n\tTrailMaterial.SHADERDEFINE_TILINGOFFSET=0;\n\tTrailMaterial.DIFFUSETEXTURE=1;\n\tTrailMaterial.TINTCOLOR=2;\n\tTrailMaterial.TILINGOFFSET=3;\n\t__static(TrailMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new TrailMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn TrailMaterial;\n})(BaseMaterial)\n\n\n//class laya.d3.extension.cartoonRender.CartoonMaterial extends laya.d3.core.material.BaseMaterial\nvar CartoonMaterial=(function(_super){\n\tfunction CartoonMaterial(){\n\t\tCartoonMaterial.__super.call(this);\n\t\tthis.setShaderName(\"CartoonShader\");\n\t\tthis._setColor(5,new Vector4(0.6663285,0.6544118,1,1));\n\t\tthis._setNumber(6,0);\n\t\tthis._setNumber(7,0.7956449);\n\t\tthis._setNumber(8,0.9820514);\n\t\tthis._setNumber(9,1);\n\t}\n\n\t__class(CartoonMaterial,'laya.d3.extension.cartoonRender.CartoonMaterial',_super);\n\tvar __proto=CartoonMaterial.prototype;\n\t/**\n\t*设置高光贴图。\n\t*@param value 高光贴图。\n\t*/\n\t/**\n\t*获取高光贴图。\n\t*@return 高光贴图。\n\t*/\n\t__getset(0,__proto,'specularTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_SPECULARTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_SPECULARTEXTURE);\n\t\tthis._setTexture(2,value);\n\t});\n\n\t/**\n\t*设置漫反射贴图。\n\t*@param value 漫反射贴图。\n\t*/\n\t/**\n\t*获取漫反射贴图。\n\t*@return 漫反射贴图。\n\t*/\n\t__getset(0,__proto,'albedoTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_ALBEDOTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_ALBEDOTEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置阴影颜色。\n\t*@param value 阴影颜色。\n\t*/\n\t/**\n\t*获取阴影颜色。\n\t*@return 阴影颜色。\n\t*/\n\t__getset(0,__proto,'shadowColor',function(){\n\t\treturn this._getColor(5);\n\t\t},function(value){\n\t\tthis._setColor(5,value);\n\t});\n\n\t/**\n\t*设置阴影强度。\n\t*@param value 阴影强度,范围为0到1。\n\t*/\n\t/**\n\t*获取阴影强度。\n\t*@return 阴影强度,范围为0到1。\n\t*/\n\t__getset(0,__proto,'shadowIntensity',function(){\n\t\treturn this._getNumber(7);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(7,value);\n\t});\n\n\t/**\n\t*设置阴影范围。\n\t*@param value 阴影范围,范围为0到1。\n\t*/\n\t/**\n\t*获取阴影范围。\n\t*@return 阴影范围,范围为0到1。\n\t*/\n\t__getset(0,__proto,'shadowRange',function(){\n\t\treturn this._getNumber(6);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(6,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(4);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t}\n\t\tthis._setColor(4,value);\n\t});\n\n\t/**\n\t*设置高光范围。\n\t*@param value 高光范围,范围为0.9到1。\n\t*/\n\t/**\n\t*获取高光范围。\n\t*@return 高光范围,范围为0.9到1。\n\t*/\n\t__getset(0,__proto,'specularRange',function(){\n\t\treturn this._getNumber(8);\n\t\t},function(value){\n\t\tvalue=Math.max(0.9,Math.min(1.0,value));\n\t\tthis._setNumber(8,value);\n\t});\n\n\t/**\n\t*设置高光强度。\n\t*@param value 高光范围,范围为0到1。\n\t*/\n\t/**\n\t*获取高光强度。\n\t*@return 高光强度,范围为0到1。\n\t*/\n\t__getset(0,__proto,'specularIntensity',function(){\n\t\treturn this._getNumber(9);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(9,value);\n\t});\n\n\tCartoonMaterial.__init__=function(){\n\t\tCartoonMaterial.SHADERDEFINE_ALBEDOTEXTURE=CartoonMaterial.shaderDefines.registerDefine(\"DIFFUSETEXTURE\");\n\t\tCartoonMaterial.SHADERDEFINE_SPECULARTEXTURE=CartoonMaterial.shaderDefines.registerDefine(\"SPECULARTEXTURE\");\n\t}\n\n\tCartoonMaterial.initShader=function(){\n\t\tvar attributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WorldMat':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPos':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_AlbedoTexture':[ /*CLASS CONST:laya.d3.extension.cartoonRender.CartoonMaterial.ALBEDOTEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SpecularTexture':[ /*CLASS CONST:laya.d3.extension.cartoonRender.CartoonMaterial.SPECULARTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_ShadowColor':[ /*CLASS CONST:laya.d3.extension.cartoonRender.CartoonMaterial.SHADOWCOLOR*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_ShadowRange':[ /*CLASS CONST:laya.d3.extension.cartoonRender.CartoonMaterial.SHADOWRANGE*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_ShadowIntensity':[ /*CLASS CONST:laya.d3.extension.cartoonRender.CartoonMaterial.SHADOWINTENSITY*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SpecularRange':[ /*CLASS CONST:laya.d3.extension.cartoonRender.CartoonMaterial.SPECULARRANGE*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SpecularIntensity':[ /*CLASS CONST:laya.d3.extension.cartoonRender.CartoonMaterial.SPECULARINTENSITY*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Color':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]\n\t\t};\n\t\tvar cartoonShader=Shader3D.nameKey.add(\"CartoonShader\");\n\t\tvar vs=\"attribute vec4 a_Position;\\nattribute vec3 a_Normal;\\nattribute vec2 a_Texcoord0;\\n\\nuniform mat4 u_MvpMatrix;\\nuniform mat4 u_WorldMat;\\nuniform vec3 u_CameraPos;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec3 v_Normal;\\nvarying vec3 v_PositionWorld;\\nvarying vec3 v_ViewDir;\\n\\nvoid main()\\n{\\n\tgl_Position = u_MvpMatrix * a_Position;\\n\t\\n\tmat3 worldMat = mat3(u_WorldMat);\\n\tv_PositionWorld = (u_WorldMat * a_Position).xyz;\\n\tv_Normal = worldMat * a_Normal;\\n\tv_Texcoord0 = a_Texcoord0;\\n\t\\n\tv_ViewDir = u_CameraPos - v_PositionWorld;\\n}\";\n\t\tvar ps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nstruct DirectionLight\\n{\\n\tvec3 Color;\\n\tvec3 Direction;\\n};\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec3 v_Normal;\\nvarying vec3 v_PositionWorld;\\nvarying vec3 v_ViewDir;\\n\\n#ifdef ALBEDOTEXTURE\\n\tuniform sampler2D u_AlbedoTexture;\\n#endif\\n\\n#ifdef SPECULARTEXTURE\\n\tuniform sampler2D u_SpecularTexture;\\n#endif\\n\\nuniform vec4 u_ShadowColor;\\nuniform float u_ShadowRange;\\nuniform float u_ShadowIntensity;\\nuniform float u_SpecularRange;\\nuniform float u_SpecularIntensity;\\n\\nuniform DirectionLight u_DirectionLight;\\n\\nvoid main()\\n{\\n\tvec3 normal = normalize(v_Normal);\\n\tvec3 viewdir = normalize(v_ViewDir);\\n\tvec3 lightDir = normalize(u_DirectionLight.Direction);\\n\t\\n\tvec4 albedoTextureColor = vec4(1.0);\\n\t#ifdef ALBEDOTEXTURE\\n\t\talbedoTextureColor = texture2D(u_AlbedoTexture, v_Texcoord0);\\n\t#endif\\n\t\\n\tvec4 specularTextureColor = vec4(1.0); \\n\t#ifdef SPECULARTEXTURE\\n\t\tspecularTextureColor = texture2D(u_SpecularTexture, v_Texcoord0);\\n\t#endif\\n\t\\n\tspecularTextureColor = specularTextureColor;\\n\t\\n\t//specularTextureColor = vec4(1.0, 1.0, 1.0, 1.0);\\n\t\\n\tfloat specTexColorG = specularTextureColor.g;\\n\t\\n\t//Overlay BlendMode 叠加\\n\tvec3 albedoColor;\\n\talbedoColor.r = albedoTextureColor.r > 0.5 ? 1.0 - 2.0 * (1.0 - albedoTextureColor.r) * (1.0 - specTexColorG) : 2.0 * albedoTextureColor.r * specTexColorG;\\n\talbedoColor.g = albedoTextureColor.g > 0.5 ? 1.0 - 2.0 * (1.0 - albedoTextureColor.g) * (1.0 - specTexColorG) : 2.0 * albedoTextureColor.g * specTexColorG;\\n\talbedoColor.b = albedoTextureColor.b > 0.5 ? 1.0 - 2.0 * (1.0 - albedoTextureColor.b) * (1.0 - specTexColorG) : 2.0 * albedoTextureColor.b * specTexColorG;\\n\t\\n\talbedoColor = clamp(albedoColor, 0.0, 1.0);\\n\t\\n\tfloat nl = max(dot(normal, -lightDir), 0.0);\\n\t\\n\tfloat shadowValue = nl + specTexColorG - 0.5;\\n\tfloat shadow = step(shadowValue, u_ShadowRange);\\n\tif(u_ShadowRange > (shadowValue + 0.01))\\n\t\tshadow = 1.0;\\n\telse if(u_ShadowRange < (shadowValue - 0.01))\\n\t\tshadow = 0.0;\\n\telse\\n\t\tshadow = (u_ShadowRange - (shadowValue - 0.01)) / 0.02;\\n\t\t\\n\tshadow = clamp(shadow, 0.0, 1.0);\\n\t\\n\t//specularTextureColor.r 影响高光范围\\n\tfloat specular = step(u_SpecularRange, clamp(pow(nl, specularTextureColor.r), 0.0, 1.0));\\n\t//specularTextureColor.b 影响高光强度\\n\tspecular = step(0.1, specular * specularTextureColor.b);\\n\t\\n\tvec3 albedoAreaColor = (1.0 - shadow) * albedoColor;\\n\tvec3 shadowAreaColor = shadow * albedoColor * u_ShadowColor.rgb * u_ShadowIntensity;\\n\tvec3 speculAreaColor = (1.0 - shadow) * albedoColor * u_SpecularIntensity * specular;\\n\t\\n\tvec3 finalColor = albedoAreaColor + speculAreaColor + shadowAreaColor;\\n\t\\n\tgl_FragColor = vec4(finalColor, 1.0);\\n}\\n\";\n\t\tvar cartoonShaderCompile3D=ShaderCompile3D.add(cartoonShader,vs,ps,attributeMap,uniformMap);\n\t\tlaya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_ALBEDOTEXTURE=cartoonShaderCompile3D.registerMaterialDefine(\"ALBEDOTEXTURE\");\n\t\tlaya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_SPECULARTEXTURE=cartoonShaderCompile3D.registerMaterialDefine(\"SPECULARTEXTURE\");\n\t\tlaya.d3.extension.cartoonRender.CartoonMaterial.SHADERDEFINE_TILINGOFFSET=cartoonShaderCompile3D.registerMaterialDefine(\"TILINGOFFSET\");\n\t}\n\n\tCartoonMaterial.ALBEDOTEXTURE=1;\n\tCartoonMaterial.SPECULARTEXTURE=2;\n\tCartoonMaterial.TILINGOFFSET=4;\n\tCartoonMaterial.SHADOWCOLOR=5;\n\tCartoonMaterial.SHADOWRANGE=6;\n\tCartoonMaterial.SHADOWINTENSITY=7;\n\tCartoonMaterial.SPECULARRANGE=8;\n\tCartoonMaterial.SPECULARINTENSITY=9;\n\tCartoonMaterial.SHADERDEFINE_ALBEDOTEXTURE=0;\n\tCartoonMaterial.SHADERDEFINE_SPECULARTEXTURE=0;\n\tCartoonMaterial.SHADERDEFINE_TILINGOFFSET=0;\n\t__static(CartoonMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn CartoonMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.extension.cartoonRender.OutlineMaterial extends laya.d3.core.material.BaseMaterial\nvar OutlineMaterial=(function(_super){\n\tfunction OutlineMaterial(){\n\t\tOutlineMaterial.__super.call(this);\n\t\tthis.setShaderName(\"OutlineShader\");\n\t\tthis._setNumber(2,0.01581197);\n\t\tthis._setNumber(3,1);\n\t}\n\n\t__class(OutlineMaterial,'laya.d3.extension.cartoonRender.OutlineMaterial',_super);\n\tvar __proto=OutlineMaterial.prototype;\n\t/**\n\t*设置轮廓贴图。\n\t*@param value 轮廓贴图。\n\t*/\n\t/**\n\t*获取漫轮廓贴图。\n\t*@return 轮廓贴图。\n\t*/\n\t__getset(0,__proto,'outlineTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.cartoonRender.OutlineMaterial.SHADERDEFINE_OUTLINETEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.cartoonRender.OutlineMaterial.SHADERDEFINE_OUTLINETEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置轮廓宽度。\n\t*@param value 轮廓宽度,范围为0到0.05。\n\t*/\n\t/**\n\t*获取轮廓宽度。\n\t*@return 轮廓宽度,范围为0到0.05。\n\t*/\n\t__getset(0,__proto,'outlineWidth',function(){\n\t\treturn this._getNumber(2);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(0.05,value));\n\t\tthis._setNumber(2,value);\n\t});\n\n\t/**\n\t*设置轮廓亮度。\n\t*@param value 轮廓亮度,范围为0到1。\n\t*/\n\t/**\n\t*获取轮廓亮度。\n\t*@return 轮廓亮度,范围为0到1。\n\t*/\n\t__getset(0,__proto,'outlineLightness',function(){\n\t\treturn this._getNumber(3);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(3,value);\n\t});\n\n\tOutlineMaterial.__init__=function(){\n\t\tOutlineMaterial.SHADERDEFINE_OUTLINETEXTURE=OutlineMaterial.shaderDefines.registerDefine(\"OUTLINETEXTURE\");\n\t}\n\n\tOutlineMaterial.initShader=function(){\n\t\tvar attributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_OutlineTexture':[ /*CLASS CONST:laya.d3.extension.cartoonRender.OutlineMaterial.OUTLINETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_OutlineWidth':[ /*CLASS CONST:laya.d3.extension.cartoonRender.OutlineMaterial.OUTLINEWIDTH*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_OutlineLightness':[ /*CLASS CONST:laya.d3.extension.cartoonRender.OutlineMaterial.OUTLINELIGHTNESS*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1]\n\t\t};\n\t\tvar outlineShader=Shader3D.nameKey.add(\"OutlineShader\");\n\t\tvar vs=\"attribute vec4 a_Position;\\nattribute vec3 a_Normal;\\nattribute vec2 a_Texcoord0;\\n\\nuniform mat4 u_MvpMatrix;\\nuniform float u_OutlineWidth;\\n\\nvarying vec2 v_Texcoord0;\\n\\nvoid main()\\n{\\n\tv_Texcoord0 = a_Texcoord0;\\n\t\\n\tvec4 position = vec4(a_Position.xyz + a_Normal * u_OutlineWidth, 1.0);\\n\tgl_Position = u_MvpMatrix * position;\\n}\";\n\t\tvar ps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nstruct DirectionLight\\n{\\n\tvec3 Color;\\n\tvec3 Direction;\\n};\\n\\nvarying vec2 v_Texcoord0;\\n\\n#ifdef OUTLINETEXTURE\\n\tuniform sampler2D u_OutlineTexture;\\n#endif\\nuniform float u_OutlineLightness;\\n\\nvoid main()\\n{\\n\tvec4 outlineTextureColor = vec4(1.0);\\n\t#ifdef OUTLINETEXTURE\\n\t\toutlineTextureColor = texture2D(u_OutlineTexture, v_Texcoord0);\\n\t#endif\\n\t\\n\tvec3 finalColor = outlineTextureColor.rgb * u_OutlineLightness;\\n\t\\n\tgl_FragColor = vec4(finalColor,0.0);\\n}\\n\";\n\t\tvar outlineShaderCompile3D=ShaderCompile3D.add(outlineShader,vs,ps,attributeMap,uniformMap);\n\t\tlaya.d3.extension.cartoonRender.OutlineMaterial.SHADERDEFINE_OUTLINETEXTURE=outlineShaderCompile3D.registerMaterialDefine(\"OUTLINETEXTURE\");\n\t}\n\n\tOutlineMaterial.OUTLINETEXTURE=1;\n\tOutlineMaterial.OUTLINEWIDTH=2;\n\tOutlineMaterial.OUTLINELIGHTNESS=3;\n\tOutlineMaterial.SHADERDEFINE_OUTLINETEXTURE=0;\n\t__static(OutlineMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn OutlineMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.domino.DominoMaterial extends laya.d3.core.material.BaseMaterial\nvar DominoMaterial=(function(_super){\n\tfunction DominoMaterial(){\n\t\tDominoMaterial.__super.call(this);\n\t\tthis.setShaderName(\"DominoShader\");\n\t}\n\n\t__class(DominoMaterial,'laya.d3.extension.domino.DominoMaterial',_super);\n\tDominoMaterial.__init__=function(){}\n\tDominoMaterial.initShader=function(){\n\t\tvar attributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Color' :/*laya.d3.graphics.VertexElementUsage.COLOR0*/1\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WorldMat':[ /*laya.d3.core.Sprite3D.WORLDMATRIX*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPos':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_DirectionLight.Direction':[ /*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_DirectionLight.Color':[ /*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t};\n\t\tvar dominoShader=Shader3D.nameKey.add(\"DominoShader\");\n\t\tvar vs=\"attribute vec4 a_Position;\\nattribute vec3 a_Normal;\\nattribute vec2 a_Texcoord0;\\nattribute vec4 a_Color;\\n\\nuniform mat4 u_MvpMatrix;\\nuniform mat4 u_WorldMat;\\nuniform vec3 u_CameraPos;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec4 v_Color;\\nvarying vec3 v_PositionWorld;\\nvarying vec3 v_Normal;\\nvarying vec3 v_ViewDir;\\n\\nvoid main()\\n{\\n\tv_Texcoord0 = a_Texcoord0;\\n\tv_Color = a_Color;\\n\t\\n\tgl_Position = u_MvpMatrix * a_Position;\\n\t\\n\tv_Normal = mat3(u_WorldMat) * a_Normal;\\n\tv_PositionWorld = (u_WorldMat * a_Position).xyz;\\n\tv_ViewDir = u_CameraPos - v_PositionWorld;\\n}\";\n\t\tvar ps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nstruct DirectionLight\\n{\\n\tvec3 Color;\\n\tvec3 Direction;\\n};\\nuniform DirectionLight u_DirectionLight;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec4 v_Color;\\nvarying vec3 v_ViewDir; \\nvarying vec3 v_Normal;\\n\\nvoid LayaAirBlinnPhongDiectionLight (in vec3 normal, in vec3 viewDir, in DirectionLight light,out vec3 diffuseColor)\\n{\\n\tvec3 lightVec = normalize(light.Direction);\\n\t\\n\t//mediump vec3 h = normalize(viewDir-light.Direction);\\n\t//float nh = max (0.0, dot (h,normal));\\n\t\\n    lowp float ln = max (0.0, dot (-lightVec,normal));\\n\tdiffuseColor = light.Color * ln;\\n}\\n\\nvoid main()\\n{\\n\tvec3 diffuseColor;\\n\tvec3 normal = normalize(v_Normal);\\n\tvec3 viewDir = normalize(v_ViewDir);\\n\tLayaAirBlinnPhongDiectionLight(normal, viewDir, u_DirectionLight, diffuseColor);\\n\t\\n\tgl_FragColor.xyz = diffuseColor * v_Color.xyz * 2.0;\\n}\\n\\n\";\n\t\tvar dominoShaderCompile3D=ShaderCompile3D.add(dominoShader,vs,ps,attributeMap,uniformMap);\n\t}\n\n\t__static(DominoMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new DominoMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn DominoMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lineRender.LineMaterial extends laya.d3.core.material.BaseMaterial\nvar LineMaterial=(function(_super){\n\tfunction LineMaterial(){\n\t\tLineMaterial.__super.call(this);\n\t\tthis.setShaderName(\"LineShader\");\n\t\tthis._setColor(2,new Vector4(1.0,1.0,1.0,1.0));\n\t\tthis.cull=0;\n\t}\n\n\t__class(LineMaterial,'laya.d3.extension.lineRender.LineMaterial',_super);\n\tvar __proto=LineMaterial.prototype;\n\t/**\n\t*设置颜色。\n\t*@param value 颜色。\n\t*/\n\t/**\n\t*获取颜色。\n\t*@return 颜色。\n\t*/\n\t__getset(0,__proto,'tintColor',function(){\n\t\treturn this._getColor(2);\n\t\t},function(value){\n\t\tthis._setColor(2,value);\n\t});\n\n\t/**\n\t*设置贴图。\n\t*@param value 贴图。\n\t*/\n\t/**\n\t*获取贴图。\n\t*@return 贴图。\n\t*/\n\t__getset(0,__proto,'diffuseTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.lineRender.LineMaterial.SHADERDEFINE_DIFFUSETEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.lineRender.LineMaterial.SHADERDEFINE_DIFFUSETEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(3);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.lineRender.LineMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lineRender.LineMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lineRender.LineMaterial.SHADERDEFINE_TILINGOFFSET);\n\t\t}\n\t\tthis._setColor(3,value);\n\t});\n\n\tLineMaterial.__init__=function(){\n\t\tLineMaterial.SHADERDEFINE_DIFFUSETEXTURE=LineMaterial.shaderDefines.registerDefine(\"DIFFUSETEXTURE\");\n\t\tLineMaterial.SHADERDEFINE_TILINGOFFSET=LineMaterial.shaderDefines.registerDefine(\"TILINGOFFSET\");\n\t}\n\n\tLineMaterial.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,LineMaterial);\n\t}\n\n\tLineMaterial.initShader=function(){\n\t\tvar attributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_OffsetVector':/*laya.d3.graphics.VertexElementUsage.OFFSETVECTOR*/41,\n\t\t\t'a_Texcoord0X' :/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0X*/38,\n\t\t\t'a_Texcoord0X1' :/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0X1*/39,\n\t\t\t'a_Texcoord0Y' :/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0Y*/40\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VMatrix':[ /*laya.d3.core.BaseCamera.VIEWMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_PMatrix':[ /*laya.d3.core.BaseCamera.PROJECTMATRIX*/2,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_TilingOffset':[ /*CLASS CONST:laya.d3.extension.lineRender.LineMaterial.TILINGOFFSET*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MainTexture':[ /*CLASS CONST:laya.d3.extension.lineRender.LineMaterial.DIFFUSETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MainColor':[ /*CLASS CONST:laya.d3.extension.lineRender.LineMaterial.TINTCOLOR*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WidthCurve' :[ /*laya.d3.extension.lineRender.LineSprite3D.WIDTHCURVE*/3,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WidthCurveKeyLength' :[ /*laya.d3.extension.lineRender.LineSprite3D.WIDTHCURVEKEYLENGTH*/4,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_GradientColorkey' :[ /*laya.d3.extension.lineRender.LineSprite3D.GRADIENTCOLORKEY*/5,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_GradientAlphakey' :[ /*laya.d3.extension.lineRender.LineSprite3D.GRADIENTALPHAKEY*/6,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2]\n\t\t};\n\t\tvar lineShader=Shader3D.nameKey.add(\"LineShader\");\n\t\tvar vs=\"attribute vec3 a_Position;\\nattribute vec3 a_OffsetVector;\\nattribute float a_Texcoord0X;\\nattribute float a_Texcoord0X1;\\nattribute float a_Texcoord0Y;\\n\\nuniform mat4 u_MvpMatrix;\\nuniform mat4 u_VMatrix;\\nuniform mat4 u_PMatrix;\\n\\nuniform vec4 u_TilingOffset;\\n\\nuniform vec4 u_WidthCurve[10];\\nuniform int u_WidthCurveKeyLength;\\n\\nuniform vec4 u_GradientColorkey[10];\\nuniform vec2 u_GradientAlphakey[10];\\n\\nvarying vec4 v_Color;\\nvarying vec2 v_Texcoord0;\\n\\nfloat hermiteInterpolate(float t, float outTangent, float inTangent, float duration, float value1, float value2)\\n{\\n\tfloat t2 = t * t;\\n\tfloat t3 = t2 * t;\\n\tfloat a = 2.0 * t3 - 3.0 * t2 + 1.0;\\n\tfloat b = t3 - 2.0 * t2 + t;\\n\tfloat c = t3 - t2;\\n\tfloat d = -2.0 * t3 + 3.0 * t2;\\n\treturn a * value1 + b * outTangent * duration + c * inTangent * duration + d * value2;\\n}\\n\\nfloat getCurWidth(in float normalizeTime)\\n{\\n\tif(normalizeTime == 0.0){\\n\t\treturn u_WidthCurve[0].w;\\n\t}\\n\telse if(normalizeTime >= 1.0){\\n\t\treturn u_WidthCurve[u_WidthCurveKeyLength - 1].w;\\n\t}\\n\telse{\\n\t\tfor(int i = 0; i < 10; i ++ )\\n\t\t{\\n\t\t\tif(normalizeTime == u_WidthCurve[i].x)\\n\t\t\t{\\n\t\t\t\treturn u_WidthCurve[i].w;\\n\t\t\t}\\n\t\t\t\\n\t\t\tvec4 lastFrame = u_WidthCurve[i];\\n\t\t\tvec4 nextFrame = u_WidthCurve[i + 1];\\n\t\t\tif(normalizeTime > lastFrame.x && normalizeTime < nextFrame.x)\\n\t\t\t{\\n\t\t\t\tfloat duration = nextFrame.x - lastFrame.x;\\n\t\t\t\tfloat t = (normalizeTime - lastFrame.x) / duration;\\n\t\t\t\tfloat outTangent = lastFrame.z;\\n\t\t\t\tfloat inTangent = nextFrame.y;\\n\t\t\t\tfloat value1 = lastFrame.w;\\n\t\t\t\tfloat value2 = nextFrame.w;\\n\t\t\t\treturn hermiteInterpolate(t, outTangent, inTangent, duration, value1, value2);\\n\t\t\t}\\n\t\t}\t\\n\t}\\n}\t\\n\\nvec4 getColorFromGradientByBlend(in vec4 gradientColors[10], in vec2 gradientAlphas[10], in float normalizeTime)\\n{\\n\tvec4 color;\\n\tfor(int i = 1; i < 10; i++)\\n\t{\\n\t\tvec4 gradientColor = gradientColors[i];\\n\t\tfloat colorKey = gradientColor.w;\\n\t\tif(colorKey >= normalizeTime)\\n\t\t{\\n\t\t\tvec4 lastGradientColor = gradientColors[i-1];\\n\t\t\tfloat lastColorKey = lastGradientColor.w;\\n\t\t\tfloat age = (normalizeTime - lastColorKey) / (colorKey - lastColorKey);\\n\t\t\tcolor.rgb = mix(gradientColors[i-1].xyz, gradientColor.xyz, age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\tfor(int i = 1; i < 10; i++)\\n\t{\\n\t\tvec2 gradientAlpha = gradientAlphas[i];\\n\t\tfloat alphaKey = gradientAlpha.y;\\n\t\tif(alphaKey >= normalizeTime)\\n\t\t{\\n\t\t\tvec2 lastGradientAlpha = gradientAlphas[i-1];\\n\t\t\tfloat lastAlphaKey = lastGradientAlpha.y;\\n\t\t\tfloat age = (normalizeTime - lastAlphaKey) / (alphaKey - lastAlphaKey);\\n\t\t\tcolor.a = mix(lastGradientAlpha.x, gradientAlpha.x, age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn color;\\n}\\n\\nvec4 getColorFromGradientByFixed(in vec4 gradientColors[10], in vec2 gradientAlphas[10], in float normalizeTime)\\n{\\n\tvec4 color;\\n\tfor(int i = 0; i < 10; i++)\\n\t{\\n\t\tvec4 gradientColor = gradientColors[i];\\n\t\tif(gradientColor.w >= normalizeTime)\\n\t\t{\\n\t\t\tcolor.rgb = gradientColor.xyz;\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\tfor(int i = 0; i < 10; i++)\\n\t{\\n\t\tvec2 gradientAlpha = gradientAlphas[i];\\n\t\tif(gradientAlpha.y >= normalizeTime)\\n\t\t{\\n\t\t\tcolor.a = gradientAlpha.x;\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn color;\\n}\\n\\nvoid main()\\n{\\n\t#ifdef TEXTUREMODE_STRETCH\\n\t\tv_Texcoord0 = vec2(a_Texcoord0X, a_Texcoord0Y);\\n\t#else\\n\t\tv_Texcoord0 = vec2(a_Texcoord0X1, a_Texcoord0Y);\\n\t#endif\\n\t\\n\t#ifdef TILINGOFFSET\\n\t\tv_Texcoord0 = v_Texcoord0 * u_TilingOffset.xy + u_TilingOffset.zw;\\n\t#endif\\n\t\\n\t#ifdef GRADIENTMODE_BLEND\\n\t\tv_Color = getColorFromGradientByBlend(u_GradientColorkey, u_GradientAlphakey, a_Texcoord0X);\\n\t#else\\n\t\tv_Color = getColorFromGradientByFixed(u_GradientColorkey, u_GradientAlphakey, a_Texcoord0X);\\n\t#endif\\n\t\\n\t#ifdef WORLDSPACE\\n\t\tgl_Position = u_PMatrix * u_VMatrix * vec4(a_Position + a_OffsetVector * getCurWidth(a_Texcoord0X),1.0);\\n\t#else\\n\t\tgl_Position = u_MvpMatrix * vec4(a_Position + a_OffsetVector * getCurWidth(a_Texcoord0X),1.0);\\n\t#endif\\n}\";\n\t\tvar ps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nuniform sampler2D u_MainTexture;\\nuniform vec4 u_MainColor;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec4 v_Color;\\n\\nvoid main()\\n{\\n\tvec4 color = 2.0 * u_MainColor * v_Color;\\n\t#ifdef DIFFUSETEXTURE\\n\t\tvec4 mainTextureColor = texture2D(u_MainTexture, v_Texcoord0);\\n\t\tcolor *= mainTextureColor;\\n\t#endif\\n\tgl_FragColor = color;\\n}\\n\\n\";\n\t\tvar lineShaderCompile3D=ShaderCompile3D.add(lineShader,vs,ps,attributeMap,uniformMap);\n\t\tlaya.d3.extension.lineRender.LineMaterial.SHADERDEFINE_DIFFUSETEXTURE=lineShaderCompile3D.registerMaterialDefine(\"DIFFUSETEXTURE\");\n\t\tlaya.d3.extension.lineRender.LineMaterial.SHADERDEFINE_TILINGOFFSET=lineShaderCompile3D.registerMaterialDefine(\"TILINGOFFSET\");\n\t\tLineSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND=lineShaderCompile3D.registerSpriteDefine(\"GRADIENTMODE_BLEND\");\n\t\tLineSprite3D.SHADERDEFINE_TEXTUREMODE_STRETCH=lineShaderCompile3D.registerSpriteDefine(\"TEXTUREMODE_STRETCH\");\n\t\tLineSprite3D.SHADERDEFINE_WORLDSPACE=lineShaderCompile3D.registerSpriteDefine(\"WORLDSPACE\");\n\t}\n\n\tLineMaterial.SHADERDEFINE_DIFFUSETEXTURE=0;\n\tLineMaterial.SHADERDEFINE_TILINGOFFSET=0;\n\tLineMaterial.DIFFUSETEXTURE=1;\n\tLineMaterial.TINTCOLOR=2;\n\tLineMaterial.TILINGOFFSET=3;\n\t__static(LineMaterial,\n\t['defaultMaterial',function(){return this.defaultMaterial=new LineMaterial();},'shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn LineMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lulingmen.DissolveMaterial extends laya.d3.core.material.BaseMaterial\nvar DissolveMaterial=(function(_super){\n\tfunction DissolveMaterial(){\n\t\tDissolveMaterial.__super.call(this);\n\t\tthis.setShaderName(\"Dissolve\");\n\t\tthis._setColor(9,new Vector4(1,1,1,1));\n\t\tthis._setNumber(7,0.0);\n\t\tthis._setNumber(8,5.0);\n\t}\n\n\t__class(DissolveMaterial,'laya.d3.extension.lulingmen.DissolveMaterial',_super);\n\tvar __proto=DissolveMaterial.prototype;\n\t/**\n\t*设置基础颜色。\n\t*@param value 基础颜色。\n\t*/\n\t/**\n\t*获取基础颜色。\n\t*@return 基础颜色。\n\t*/\n\t__getset(0,__proto,'albedoColor',function(){\n\t\treturn this._getColor(9);\n\t\t},function(value){\n\t\tthis._setColor(9,value);\n\t});\n\n\t/**\n\t*设置主贴图。\n\t*@param value 主贴图。\n\t*/\n\t/**\n\t*获取主贴图。\n\t*@return 主贴图。\n\t*/\n\t__getset(0,__proto,'mainTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MAINTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MAINTEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置溶解速率。\n\t*@param value 溶解速率。\n\t*/\n\t/**\n\t*获取溶解速率。\n\t*@return 溶解速率。\n\t*/\n\t__getset(0,__proto,'dissolveSpeed',function(){\n\t\treturn this._getNumber(8);\n\t\t},function(value){\n\t\tthis._setNumber(8,value);\n\t});\n\n\t/**\n\t*设置主纹理平铺和偏移。\n\t*@param value 主纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取主纹理平铺和偏移。\n\t*@return 主纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(4);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MAINTILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MAINTILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MAINTILINGOFFSET);\n\t\t}\n\t\tthis._setColor(4,value);\n\t});\n\n\t/**\n\t*设置溶解贴图。\n\t*@param value 溶解贴图。\n\t*/\n\t/**\n\t*获取溶解贴图。\n\t*@return 溶解贴图。\n\t*/\n\t__getset(0,__proto,'dissolveTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_DISSOLVETEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_DISSOLVETEXTURE);\n\t\tthis._setTexture(2,value);\n\t});\n\n\t/**\n\t*设置遮罩贴图。\n\t*@param value 遮罩贴图。\n\t*/\n\t/**\n\t*获取遮罩贴图。\n\t*@return 遮罩贴图。\n\t*/\n\t__getset(0,__proto,'maskTexture',function(){\n\t\treturn this._getTexture(3);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MASKTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MASKTEXTURE);\n\t\tthis._setTexture(3,value);\n\t});\n\n\t/**\n\t*设置溶解纹理平铺和偏移。\n\t*@param value 溶解纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取溶解纹理平铺和偏移。\n\t*@return 溶解纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'dissolveTilingOffset',function(){\n\t\treturn this._getColor(5);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_DISSOLVETILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_DISSOLVETILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_DISSOLVETILINGOFFSET);\n\t\t}\n\t\tthis._setColor(5,value);\n\t});\n\n\t/**\n\t*设置遮罩纹理平铺和偏移。\n\t*@param value 遮罩纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取遮罩纹理平铺和偏移。\n\t*@return 遮罩纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'maskTilingOffset',function(){\n\t\treturn this._getColor(6);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MASKTILINGOFFSET);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MASKTILINGOFFSET);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MASKTILINGOFFSET);\n\t\t}\n\t\tthis._setColor(6,value);\n\t});\n\n\t/**\n\t*设置溶解值。\n\t*@param value 溶解值。\n\t*/\n\t/**\n\t*获取溶解值。\n\t*@return 溶解值。\n\t*/\n\t__getset(0,__proto,'dissolve',function(){\n\t\treturn this._getNumber(7);\n\t\t},function(value){\n\t\tthis._setNumber(7,value);\n\t});\n\n\tDissolveMaterial.__init__=function(){\n\t\tDissolveMaterial.SHADERDEFINE_MAINTEXTURE=DissolveMaterial.shaderDefines.registerDefine(\"MAINTEXTURE\");\n\t\tDissolveMaterial.SHADERDEFINE_DISSOLVETEXTURE=DissolveMaterial.shaderDefines.registerDefine(\"DISSOLVETEXTURE\");\n\t\tDissolveMaterial.SHADERDEFINE_MASKTEXTURE=DissolveMaterial.shaderDefines.registerDefine(\"MASKTEXTURE\");\n\t\tDissolveMaterial.SHADERDEFINE_MAINTILINGOFFSET=DissolveMaterial.shaderDefines.registerDefine(\"MAINTILINGOFFSET\");\n\t\tDissolveMaterial.SHADERDEFINE_DISSOLVETILINGOFFSET=DissolveMaterial.shaderDefines.registerDefine(\"DISSOLVETILINGOFFSET\");\n\t\tDissolveMaterial.SHADERDEFINE_MASKTILINGOFFSET=DissolveMaterial.shaderDefines.registerDefine(\"MASKTILINGOFFSET\");\n\t}\n\n\tDissolveMaterial.initShader=function(){\n\t\tvar attributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MainTexture':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.MAINTEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DissolveTexture':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.DISSOLVETEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaskTexture':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.MASKTEXTURE*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_BaseColor':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.BASECOLOR*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MainTilingOffset':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.MAINTILINGOFFSET*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DissolveTilingOffset':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.DISSOLVETILINGOFFSET*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaskTilingOffset':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.MASKTILINGOFFSET*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Dissolve':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.DISSOLVE*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_DissolveSpeed':[ /*CLASS CONST:laya.d3.extension.lulingmen.DissolveMaterial.DISSOLVESPEED*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1]\n\t\t};\n\t\tvar shader=Shader3D.nameKey.add(\"Dissolve\");\n\t\tvar vs=\"attribute vec4 a_Position;\\nattribute vec3 a_Normal;\\nattribute vec2 a_Texcoord0;\\n\\nuniform mat4 u_MvpMatrix;\\n\\nuniform vec4 u_MainTilingOffset;\\nuniform vec4 u_DissolveTilingOffset;\\nuniform vec4 u_MaskTilingOffset;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\nvarying vec2 v_Texcoord2;\\n\\nvoid main()\\n{\\n\tv_Texcoord0 = a_Texcoord0;\\n\t#ifdef MAINTILINGOFFSET\\n\t\tv_Texcoord0 = (vec2(v_Texcoord0.x, v_Texcoord0.y - 1.0) * u_MainTilingOffset.xy) + u_MainTilingOffset.zw;\\n\t\tv_Texcoord0 = vec2(v_Texcoord0.x, 1.0 + v_Texcoord0.y);\\n\t#endif\\n\t\\n\tv_Texcoord1 = a_Texcoord0;\\n\t#ifdef DISSOLVETILINGOFFSET\\n\t\tv_Texcoord1 = (vec2(v_Texcoord1.x, v_Texcoord1.y - 1.0) * u_DissolveTilingOffset.xy) + u_DissolveTilingOffset.zw;\\n\t\tv_Texcoord1 = vec2(v_Texcoord1.x, 1.0 + v_Texcoord1.y);\\n\t#endif\\n\t\\n\tv_Texcoord2 = a_Texcoord0;\\n\t\\n\tgl_Position = u_MvpMatrix * a_Position;\\n}\";\n\t\tvar ps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\nvarying vec2 v_Texcoord2;\\n\\n#ifdef MAINTEXTURE\\n\tuniform sampler2D u_MainTexture;\\n#endif\\n\\n#ifdef DISSOLVETEXTURE\\n\tuniform sampler2D u_DissolveTexture;\\n#endif\\n\\n#ifdef MASKTEXTURE\\n\tuniform sampler2D u_MaskTexture;\\n#endif\\n\\nuniform vec4 u_BaseColor;\\nuniform float u_Dissolve;\\nuniform float u_DissolveSpeed;\\n\\nvoid main()\\n{\\n\tvec4 mainColor = u_BaseColor;\\n\tmainColor.a = 1.0;\\n\t#ifdef MAINTEXTURE\\n\t\tmainColor *= texture2D(u_MainTexture, v_Texcoord0);\\n\t#endif\\n\t\\n\tvec4 dissolveColor = vec4(1.0);\\n\t#ifdef DISSOLVETEXTURE\\n\t\tdissolveColor = texture2D(u_DissolveTexture, v_Texcoord1);\\n\t#endif\\n\t\\n\tvec4 maskColor = vec4(1.0);\\n\t#ifdef MASKTEXTURE\\n\t\tmaskColor = texture2D(u_MaskTexture, v_Texcoord2);\\n\t#endif\\n\t\\n\tvec4 outColor = mix(vec4(0.0), mainColor, maskColor);\\n\tif(dissolveColor.a <= u_Dissolve){\\n\t\tfloat alpha = clamp(outColor.a - u_Dissolve * 2.0 + dissolveColor.a, 0.0, 1.0);\\n\t\talpha = pow(alpha, u_DissolveSpeed);\\n\t\toutColor.a = alpha;\\n\t}\\n\t\\n\tgl_FragColor = outColor;\\n}\\n\";\n\t\tvar shaderCompile3D=ShaderCompile3D.add(shader,vs,ps,attributeMap,uniformMap);\n\t\tlaya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MAINTEXTURE=shaderCompile3D.registerMaterialDefine(\"MAINTEXTURE\");\n\t\tlaya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_DISSOLVETEXTURE=shaderCompile3D.registerMaterialDefine(\"DISSOLVETEXTURE\");\n\t\tlaya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MASKTEXTURE=shaderCompile3D.registerMaterialDefine(\"MASKTEXTURE\");\n\t\tlaya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MAINTILINGOFFSET=shaderCompile3D.registerMaterialDefine(\"MAINTILINGOFFSET\");\n\t\tlaya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_DISSOLVETILINGOFFSET=shaderCompile3D.registerMaterialDefine(\"DISSOLVETILINGOFFSET\");\n\t\tlaya.d3.extension.lulingmen.DissolveMaterial.SHADERDEFINE_MASKTILINGOFFSET=shaderCompile3D.registerMaterialDefine(\"MASKTILINGOFFSET\");\n\t}\n\n\tDissolveMaterial.MAINTEXTURE=1;\n\tDissolveMaterial.DISSOLVETEXTURE=2;\n\tDissolveMaterial.MASKTEXTURE=3;\n\tDissolveMaterial.MAINTILINGOFFSET=4;\n\tDissolveMaterial.DISSOLVETILINGOFFSET=5;\n\tDissolveMaterial.MASKTILINGOFFSET=6;\n\tDissolveMaterial.DISSOLVE=7;\n\tDissolveMaterial.DISSOLVESPEED=8;\n\tDissolveMaterial.BASECOLOR=9;\n\tDissolveMaterial.SHADERDEFINE_MAINTEXTURE=0;\n\tDissolveMaterial.SHADERDEFINE_DISSOLVETEXTURE=0;\n\tDissolveMaterial.SHADERDEFINE_MASKTEXTURE=0;\n\tDissolveMaterial.SHADERDEFINE_MAINTILINGOFFSET=0;\n\tDissolveMaterial.SHADERDEFINE_DISSOLVETILINGOFFSET=0;\n\tDissolveMaterial.SHADERDEFINE_MASKTILINGOFFSET=0;\n\t__static(DissolveMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn DissolveMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lulingmen.MeshParticleMaterial extends laya.d3.core.material.BaseMaterial\nvar MeshParticleMaterial=(function(_super){\n\tfunction MeshParticleMaterial(){\n\t\tMeshParticleMaterial.__super.call(this);\n\t\tthis.setShaderName(\"MeshParticle\");\n\t\tthis._setColor(3,new Vector4(1,1,1,1));\n\t\tthis._setColor(4,new Vector4(1,1,1,1));\n\t\tthis._setNumber(5,1.0);\n\t\tthis._setNumber(6,1.0);\n\t}\n\n\t__class(MeshParticleMaterial,'laya.d3.extension.lulingmen.MeshParticleMaterial',_super);\n\tvar __proto=MeshParticleMaterial.prototype;\n\t__getset(0,__proto,'alpha',function(){\n\t\treturn this._getNumber(6);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(6,value);\n\t});\n\n\t/**\n\t*设置第一层贴图。\n\t*@param value 第一层贴图。\n\t*/\n\t/**\n\t*获取第一层贴图。\n\t*@return 第一层贴图。\n\t*/\n\t__getset(0,__proto,'mainTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_MAINTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_MAINTEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置第二层贴图。\n\t*@param value 第二层贴图。\n\t*/\n\t/**\n\t*获取第二层贴图。\n\t*@return 第二层贴图。\n\t*/\n\t__getset(0,__proto,'maskTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_MASKTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_MASKTEXTURE);\n\t\tthis._setTexture(2,value);\n\t});\n\n\t/**\n\t*设置基础颜色。\n\t*@param value 基础颜色。\n\t*/\n\t/**\n\t*获取基础颜色。\n\t*@return 基础颜色。\n\t*/\n\t__getset(0,__proto,'albedoColor',function(){\n\t\treturn this._getColor(3);\n\t\t},function(value){\n\t\tthis._setColor(3,value);\n\t});\n\n\t__getset(0,__proto,'intensity',function(){\n\t\treturn this._getNumber(5);\n\t\t},function(value){\n\t\tthis._setNumber(5,value);\n\t});\n\n\t/**\n\t*设置透明颜色。\n\t*@param value 透明颜色。\n\t*/\n\t/**\n\t*获取透明颜色。\n\t*@return 透明颜色。\n\t*/\n\t__getset(0,__proto,'alphaColor',function(){\n\t\treturn this._getColor(4);\n\t\t},function(value){\n\t\tthis._setColor(4,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(7);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t}\n\t\tthis._setColor(7,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'maskTilingOffset',function(){\n\t\treturn this._getColor(8);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t}\n\t\tthis._setColor(8,value);\n\t});\n\n\tMeshParticleMaterial.__init__=function(){\n\t\tMeshParticleMaterial.SHADERDEFINE_MAINTEXTURE=MeshParticleMaterial.shaderDefines.registerDefine(\"MAINTEXTURE\");\n\t\tMeshParticleMaterial.SHADERDEFINE_MASKTEXTURE=MeshParticleMaterial.shaderDefines.registerDefine(\"MASKTEXTURE\");\n\t\tMeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1=MeshParticleMaterial.shaderDefines.registerDefine(\"TILINGOFFSET1\");\n\t\tMeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2=MeshParticleMaterial.shaderDefines.registerDefine(\"TILINGOFFSET2\");\n\t}\n\n\tMeshParticleMaterial.initShader=function(){\n\t\tvar attributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Color':/*laya.d3.graphics.VertexElementUsage.COLOR0*/1,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MainTexture':[ /*CLASS CONST:laya.d3.extension.lulingmen.MeshParticleMaterial.MAINTEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaskTexture':[ /*CLASS CONST:laya.d3.extension.lulingmen.MeshParticleMaterial.MASKTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_BaseColor':[ /*CLASS CONST:laya.d3.extension.lulingmen.MeshParticleMaterial.BASECOLOR*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_AlphaColor':[ /*CLASS CONST:laya.d3.extension.lulingmen.MeshParticleMaterial.ALPHACOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Instensity':[ /*CLASS CONST:laya.d3.extension.lulingmen.MeshParticleMaterial.INTENSITY*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Alpha':[ /*CLASS CONST:laya.d3.extension.lulingmen.MeshParticleMaterial.ALPHA*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset1':[ /*CLASS CONST:laya.d3.extension.lulingmen.MeshParticleMaterial.TILINGOFFSET1*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset2':[ /*CLASS CONST:laya.d3.extension.lulingmen.MeshParticleMaterial.TILINGOFFSET2*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1]\n\t\t};\n\t\tvar shader=Shader3D.nameKey.add(\"MeshParticle\");\n\t\tvar vs=\"attribute vec4 a_Position;\\nattribute vec3 a_Normal;\\nattribute vec2 a_Texcoord0;\\nattribute vec4 a_Color;\\n\\nuniform mat4 u_MvpMatrix;\\n\\nuniform vec4 u_TilingOffset1;\\nuniform vec4 u_TilingOffset2;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\nvarying vec4 v_Color;\\n\\nvoid main()\\n{\\n\tv_Texcoord0 = a_Texcoord0;\\n\t#ifdef TILINGOFFSET1\\n\t\tv_Texcoord0 = (vec2(v_Texcoord0.x, v_Texcoord0.y - 1.0) * u_TilingOffset1.xy) + u_TilingOffset1.zw;\\n\t\tv_Texcoord0 = vec2(v_Texcoord0.x, 1.0 + v_Texcoord0.y);\\n\t#endif\\n\t\\n\tv_Texcoord1 = a_Texcoord0;\\n\t#ifdef TILINGOFFSET2\\n\t\tv_Texcoord1 = (vec2(v_Texcoord1.x, v_Texcoord1.y - 1.0) * u_TilingOffset2.xy) + u_TilingOffset2.zw;\\n\t\tv_Texcoord1 = vec2(v_Texcoord1.x, 1.0 + v_Texcoord1.y);\\n\t#endif\\n\t\\n\tv_Color = vec4(1.0);\\n\t#ifdef COLOR\\n\t\tv_Color = a_Color;\\n\t#endif\\n\t\\n\tgl_Position = u_MvpMatrix * a_Position;\\n}\";\n\t\tvar ps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\nvarying vec4 v_Color;\\n\\n#ifdef MAINTEXTURE\\n\tuniform sampler2D u_MainTexture;\\n#endif\\n\\n#ifdef MASKTEXTURE\\n\tuniform sampler2D u_MaskTexture;\\n#endif\\n\\nuniform vec4 u_BaseColor;\\nuniform vec4 u_AlphaColor;\\nuniform float u_Instensity;\\nuniform float u_Alpha;\\n\\nvoid main()\\n{\\n\tvec4 mainTextureColor = vec4(1.0);\\n\t#ifdef MAINTEXTURE\\n\t\tmainTextureColor = texture2D(u_MainTexture, v_Texcoord0);\\n\t#endif\\n\t\\n\tvec4 maskTextureColor = vec4(1.0);\\n\t#ifdef MASKTEXTURE\\n\t\tmaskTextureColor = texture2D(u_MaskTexture, v_Texcoord1);\\n\t#endif\\n\t\\n\tvec4 outColor = mix(vec4(0.0), mainTextureColor, maskTextureColor);\\n\t\\n\tgl_FragColor = 2.0 * outColor * u_BaseColor * u_AlphaColor * u_Instensity * v_Color;\\n\tgl_FragColor.a *= u_Alpha;\\n}\\n\";\n\t\tvar shaderCompile3D=ShaderCompile3D.add(shader,vs,ps,attributeMap,uniformMap);\n\t\tlaya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_MAINTEXTURE=shaderCompile3D.registerMaterialDefine(\"MAINTEXTURE\");\n\t\tlaya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_MASKTEXTURE=shaderCompile3D.registerMaterialDefine(\"MASKTEXTURE\");\n\t\tlaya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1=shaderCompile3D.registerMaterialDefine(\"TILINGOFFSET1\");\n\t\tlaya.d3.extension.lulingmen.MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2=shaderCompile3D.registerMaterialDefine(\"TILINGOFFSET2\");\n\t}\n\n\tMeshParticleMaterial.MAINTEXTURE=1;\n\tMeshParticleMaterial.MASKTEXTURE=2;\n\tMeshParticleMaterial.BASECOLOR=3;\n\tMeshParticleMaterial.ALPHACOLOR=4;\n\tMeshParticleMaterial.INTENSITY=5;\n\tMeshParticleMaterial.ALPHA=6;\n\tMeshParticleMaterial.TILINGOFFSET1=7;\n\tMeshParticleMaterial.TILINGOFFSET2=8;\n\tMeshParticleMaterial.SHADERDEFINE_MAINTEXTURE=0;\n\tMeshParticleMaterial.SHADERDEFINE_MASKTEXTURE=0;\n\tMeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1=0;\n\tMeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2=0;\n\t__static(MeshParticleMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn MeshParticleMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lulingmen.ParticleMaterial extends laya.d3.core.material.BaseMaterial\nvar ParticleMaterial=(function(_super){\n\tfunction ParticleMaterial(){\n\t\tParticleMaterial.__super.call(this);\n\t\tthis.setShaderName(\"Particle\");\n\t\tthis._setColor(3,new Vector4(1,1,1,1));\n\t\tthis._setColor(4,new Vector4(1,1,1,1));\n\t\tthis._setNumber(5,1.0);\n\t\tthis._setNumber(6,1.0);\n\t}\n\n\t__class(ParticleMaterial,'laya.d3.extension.lulingmen.ParticleMaterial',_super);\n\tvar __proto=ParticleMaterial.prototype;\n\t__getset(0,__proto,'alpha',function(){\n\t\treturn this._getNumber(6);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(6,value);\n\t});\n\n\t/**\n\t*设置基础颜色。\n\t*@param value 基础颜色。\n\t*/\n\t/**\n\t*获取基础颜色。\n\t*@return 基础颜色。\n\t*/\n\t__getset(0,__proto,'tintColor',function(){\n\t\treturn this._getColor(3);\n\t\t},function(value){\n\t\tthis._setColor(3,value);\n\t});\n\n\t/**\n\t*设置第一层贴图。\n\t*@param value 第一层贴图。\n\t*/\n\t/**\n\t*获取第一层贴图。\n\t*@return 第一层贴图。\n\t*/\n\t__getset(0,__proto,'mainTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(MeshParticleMaterial.SHADERDEFINE_MAINTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(MeshParticleMaterial.SHADERDEFINE_MAINTEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置第二层贴图。\n\t*@param value 第二层贴图。\n\t*/\n\t/**\n\t*获取第二层贴图。\n\t*@return 第二层贴图。\n\t*/\n\t__getset(0,__proto,'maskTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(MeshParticleMaterial.SHADERDEFINE_MASKTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(MeshParticleMaterial.SHADERDEFINE_MASKTEXTURE);\n\t\tthis._setTexture(2,value);\n\t});\n\n\t__getset(0,__proto,'intensity',function(){\n\t\treturn this._getNumber(5);\n\t\t},function(value){\n\t\tthis._setNumber(5,value);\n\t});\n\n\t/**\n\t*设置透明颜色。\n\t*@param value 透明颜色。\n\t*/\n\t/**\n\t*获取透明颜色。\n\t*@return 透明颜色。\n\t*/\n\t__getset(0,__proto,'alphaColor',function(){\n\t\treturn this._getColor(4);\n\t\t},function(value){\n\t\tthis._setColor(4,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(7);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t}\n\t\tthis._setColor(7,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'maskTilingOffset',function(){\n\t\treturn this._getColor(8);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(MeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t}\n\t\tthis._setColor(8,value);\n\t});\n\n\tParticleMaterial.__init__=function(){\n\t\tParticleMaterial.SHADERDEFINE_MAINTEXTURE=ParticleMaterial.shaderDefines.registerDefine(\"MAINTEXTURE\");\n\t\tParticleMaterial.SHADERDEFINE_MASKTEXTURE=ParticleMaterial.shaderDefines.registerDefine(\"MASKTEXTURE\");\n\t\tParticleMaterial.SHADERDEFINE_TILINGOFFSET1=ParticleMaterial.shaderDefines.registerDefine(\"TILINGOFFSET1\");\n\t\tParticleMaterial.SHADERDEFINE_TILINGOFFSET2=ParticleMaterial.shaderDefines.registerDefine(\"TILINGOFFSET2\");\n\t}\n\n\tParticleMaterial.initShader=function(){\n\t\tvar attributeMap={\n\t\t\t'a_CornerTextureCoordinate':/*laya.d3.graphics.VertexElementUsage.CORNERTEXTURECOORDINATE0*/17,\n\t\t\t'a_MeshPosition':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_MeshColor':/*laya.d3.graphics.VertexElementUsage.COLOR0*/1,\n\t\t\t'a_MeshTextureCoordinate':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2,\n\t\t\t'a_ShapePositionStartLifeTime':/*laya.d3.graphics.VertexElementUsage.SHAPEPOSITIONSTARTLIFETIME*/30,\n\t\t\t'a_DirectionTime':/*laya.d3.graphics.VertexElementUsage.DIRECTIONTIME*/32,\n\t\t\t'a_StartColor':/*laya.d3.graphics.VertexElementUsage.STARTCOLOR0*/19,\n\t\t\t'a_EndColor':/*laya.d3.graphics.VertexElementUsage.ENDCOLOR0*/23,\n\t\t\t'a_StartSize':/*laya.d3.graphics.VertexElementUsage.STARTSIZE*/20,\n\t\t\t'a_StartRotation0':/*laya.d3.graphics.VertexElementUsage.STARTROTATION*/22,\n\t\t\t'a_StartSpeed':/*laya.d3.graphics.VertexElementUsage.STARTSPEED*/31,\n\t\t\t'a_Random0':/*laya.d3.graphics.VertexElementUsage.RANDOM0*/34,\n\t\t\t'a_Random1':/*laya.d3.graphics.VertexElementUsage.RANDOM1*/35,\n\t\t\t'a_SimulationWorldPostion':/*laya.d3.graphics.VertexElementUsage.SIMULATIONWORLDPOSTION*/36,\n\t\t\t'a_SimulationWorldRotation':/*laya.d3.graphics.VertexElementUsage.SIMULATIONWORLDROTATION*/37\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_MainTexture':[ /*laya.d3.extension.lulingmen.MeshParticleMaterial.MAINTEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MaskTexture':[ /*laya.d3.extension.lulingmen.MeshParticleMaterial.MASKTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_BaseColor':[ /*laya.d3.extension.lulingmen.MeshParticleMaterial.BASECOLOR*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_AlphaColor':[ /*laya.d3.extension.lulingmen.MeshParticleMaterial.ALPHACOLOR*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Instensity':[ /*laya.d3.extension.lulingmen.MeshParticleMaterial.INTENSITY*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Alpha':[ /*laya.d3.extension.lulingmen.MeshParticleMaterial.ALPHA*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset1':[ /*laya.d3.extension.lulingmen.MeshParticleMaterial.TILINGOFFSET1*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset2':[ /*laya.d3.extension.lulingmen.MeshParticleMaterial.TILINGOFFSET2*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WorldPosition':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.WORLDPOSITION*/0,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_WorldRotation':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.WORLDROTATION*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_PositionScale':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.POSITIONSCALE*/4,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SizeScale':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SIZESCALE*/5,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ScalingMode':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SCALINGMODE*/6,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_Gravity':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.GRAVITY*/7,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ThreeDStartRotation':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.THREEDSTARTROTATION*/8,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_StretchedBillboardLengthScale':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.STRETCHEDBILLBOARDLENGTHSCALE*/9,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_StretchedBillboardSpeedScale':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.STRETCHEDBILLBOARDSPEEDSCALE*/10,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SimulationSpace':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SIMULATIONSPACE*/11,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CurrentTime':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.CURRENTTIME*/12,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ColorOverLifeGradientAlphas':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTALPHAS*/22,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ColorOverLifeGradientColors':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.COLOROVERLIFEGRADIENTCOLORS*/23,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MaxColorOverLifeGradientAlphas':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTALPHAS*/24,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_MaxColorOverLifeGradientColors':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTCOLORS*/25,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityConst':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONST*/13,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTX*/14,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTY*/15,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZ*/16,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityConstMax':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYCONSTMAX*/17,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientMaxX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTXMAX*/18,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientMaxY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTYMAX*/19,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLVelocityGradientMaxZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLVELOCITYGRADIENTZMAX*/20,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_VOLSpaceType':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.VOLSPACETYPE*/21,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradient':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENT*/26,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTX*/27,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTY*/28,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZ*/29,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientMax':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientMax*/30,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientMaxX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTXMAX*/31,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientMaxY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSIZEGRADIENTYMAX*/32,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_SOLSizeGradientMaxZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.SOLSizeGradientZMAX*/33,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityConst':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONST*/34,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityConstSeprarate':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTSEPRARATE*/35,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradient':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENT*/36,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTX*/37,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTY*/38,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZ*/39,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientW':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTW*/40,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityConstMax':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAX*/41,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityConstMaxSeprarate':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAXSEPRARATE*/42,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMax':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTMAX*/43,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMaxX':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTXMAX*/44,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMaxY':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTYMAX*/45,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMaxZ':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZMAX*/46,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_ROLAngularVelocityGradientMaxW':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTWMAX*/47,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_TSACycles':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONCYCLES*/48,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_TSASubUVLength':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONSUBUVLENGTH*/49,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_TSAGradientUVs':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTUVS*/50,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_TSAMaxGradientUVs':[ /*laya.d3.core.particleShuriKen.ShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTMAXUVS*/51,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_CameraPosition':[ /*laya.d3.core.BaseCamera.CAMERAPOS*/0,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_CameraDirection':[ /*laya.d3.core.BaseCamera.CAMERADIRECTION*/5,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_CameraUp':[ /*laya.d3.core.BaseCamera.CAMERAUP*/6,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_View':[ /*laya.d3.core.BaseCamera.VIEWMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_Projection':[ /*laya.d3.core.BaseCamera.PROJECTMATRIX*/2,/*laya.d3.shader.Shader3D.PERIOD_CAMERA*/3],\n\t\t\t'u_FogStart':[ /*laya.d3.core.scene.Scene.FOGSTART*/1,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogRange':[ /*laya.d3.core.scene.Scene.FOGRANGE*/2,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_FogColor':[ /*laya.d3.core.scene.Scene.FOGCOLOR*/0,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4]\n\t\t};\n\t\tvar PARTICLESHURIKEN=Shader3D.nameKey.add(\"Particle\");\n\t\tvar vs=\"#ifdef HIGHPRECISION\\n  precision highp float;\\n#else\\n  precision mediump float;\\n#endif\\n\\n#if defined(SPHERHBILLBOARD)||defined(STRETCHEDBILLBOARD)||defined(HORIZONTALBILLBOARD)||defined(VERTICALBILLBOARD)\\n\tattribute vec4 a_CornerTextureCoordinate;\\n#endif\\n#ifdef RENDERMODE_MESH\\n\tattribute vec3 a_MeshPosition;\\n\tattribute vec4 a_MeshColor;\\n\tattribute vec2 a_MeshTextureCoordinate;\\n\tvarying vec4 v_MeshColor;\\n#endif\\n\\nattribute vec4 a_ShapePositionStartLifeTime;\\nattribute vec4 a_DirectionTime;\\nattribute vec4 a_StartColor;\\nattribute vec3 a_StartSize;\\nattribute vec3 a_StartRotation0;\\nattribute float a_StartSpeed;\\n#if defined(COLOROVERLIFETIME)||defined(RANDOMCOLOROVERLIFETIME)||defined(SIZEOVERLIFETIMERANDOMCURVES)||defined(SIZEOVERLIFETIMERANDOMCURVESSEPERATE)||defined(ROTATIONOVERLIFETIMERANDOMCONSTANTS)||defined(ROTATIONOVERLIFETIMERANDOMCURVES)\\n  attribute vec4 a_Random0;\\n#endif\\n#if defined(TEXTURESHEETANIMATIONRANDOMCURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n  attribute vec4 a_Random1;\\n#endif\\nattribute vec3 a_SimulationWorldPostion;\\nattribute vec4 a_SimulationWorldRotation;\\n\\nvarying float v_Discard;\\nvarying vec4 v_Color;\\n#ifdef MAINTEXTURE\\n\tvarying vec2 v_TextureCoordinate;\\n\t#ifdef TILINGOFFSET1\\n\t\tuniform vec4 u_TilingOffset1;\\n\t#endif\\n#endif\\n\\n#ifdef MASKTEXTURE\\n\t#ifdef TILINGOFFSET2\\n\t\tuniform vec4 u_TilingOffset2;\\n\t#endif\\n#endif\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\n\\nuniform float u_CurrentTime;\\nuniform vec3 u_Gravity;\\n\\nuniform vec3 u_WorldPosition;\\nuniform vec4 u_WorldRotation;\\nuniform bool u_ThreeDStartRotation;\\nuniform int u_ScalingMode;\\nuniform vec3 u_PositionScale;\\nuniform vec3 u_SizeScale;\\nuniform mat4 u_View;\\nuniform mat4 u_Projection;\\n\\n#ifdef STRETCHEDBILLBOARD\\n\tuniform vec3 u_CameraPosition;\\n#endif\\nuniform vec3 u_CameraDirection;//TODO:只有几种广告牌模式需要用\\nuniform vec3 u_CameraUp;\\n\\nuniform  float u_StretchedBillboardLengthScale;\\nuniform  float u_StretchedBillboardSpeedScale;\\nuniform int u_SimulationSpace;\\n\\n#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n  uniform  int  u_VOLSpaceType;\\n#endif\\n#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)\\n  uniform  vec3 u_VOLVelocityConst;\\n#endif\\n#if defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n  uniform  vec2 u_VOLVelocityGradientX[4];//x为key,y为速度\\n  uniform  vec2 u_VOLVelocityGradientY[4];//x为key,y为速度\\n  uniform  vec2 u_VOLVelocityGradientZ[4];//x为key,y为速度\\n#endif\\n#ifdef VELOCITYOVERLIFETIMERANDOMCONSTANT\\n  uniform  vec3 u_VOLVelocityConstMax;\\n#endif\\n#ifdef VELOCITYOVERLIFETIMERANDOMCURVE\\n  uniform  vec2 u_VOLVelocityGradientMaxX[4];//x为key,y为速度\\n  uniform  vec2 u_VOLVelocityGradientMaxY[4];//x为key,y为速度\\n  uniform  vec2 u_VOLVelocityGradientMaxZ[4];//x为key,y为速度\\n#endif\\n\\n#ifdef COLOROVERLIFETIME\\n  uniform  vec4 u_ColorOverLifeGradientColors[4];//x为key,yzw为Color\\n  uniform  vec2 u_ColorOverLifeGradientAlphas[4];//x为key,y为Alpha\\n#endif\\n#ifdef RANDOMCOLOROVERLIFETIME\\n  uniform  vec4 u_ColorOverLifeGradientColors[4];//x为key,yzw为Color\\n  uniform  vec2 u_ColorOverLifeGradientAlphas[4];//x为key,y为Alpha\\n  uniform  vec4 u_MaxColorOverLifeGradientColors[4];//x为key,yzw为Color\\n  uniform  vec2 u_MaxColorOverLifeGradientAlphas[4];//x为key,y为Alpha\\n#endif\\n\\n\\n#if defined(SIZEOVERLIFETIMECURVE)||defined(SIZEOVERLIFETIMERANDOMCURVES)\\n  uniform  vec2 u_SOLSizeGradient[4];//x为key,y为尺寸\\n#endif\\n#ifdef SIZEOVERLIFETIMERANDOMCURVES\\n  uniform  vec2 u_SOLSizeGradientMax[4];//x为key,y为尺寸\\n#endif\\n#if defined(SIZEOVERLIFETIMECURVESEPERATE)||defined(SIZEOVERLIFETIMERANDOMCURVESSEPERATE)\\n  uniform  vec2 u_SOLSizeGradientX[4];//x为key,y为尺寸\\n  uniform  vec2 u_SOLSizeGradientY[4];//x为key,y为尺寸\\n  uniform  vec2 u_SOLSizeGradientZ[4];//x为key,y为尺寸\\n#endif\\n#ifdef SIZEOVERLIFETIMERANDOMCURVESSEPERATE\\n  uniform  vec2 u_SOLSizeGradientMaxX[4];//x为key,y为尺寸\\n  uniform  vec2 u_SOLSizeGradientMaxY[4];//x为key,y为尺寸\\n  uniform  vec2 u_SOLSizeGradientMaxZ[4];//x为key,y为尺寸\\n#endif\\n\\n\\n#ifdef ROTATIONOVERLIFETIME\\n  #if defined(ROTATIONOVERLIFETIMECONSTANT)||defined(ROTATIONOVERLIFETIMERANDOMCONSTANTS)\\n    uniform  float u_ROLAngularVelocityConst;\\n  #endif\\n  #ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n    uniform  float u_ROLAngularVelocityConstMax;\\n  #endif\\n  #if defined(ROTATIONOVERLIFETIMECURVE)||defined(ROTATIONOVERLIFETIMERANDOMCURVES)\\n    uniform  vec2 u_ROLAngularVelocityGradient[4];//x为key,y为旋转\\n  #endif\\n  #ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n    uniform  vec2 u_ROLAngularVelocityGradientMax[4];//x为key,y为旋转\\n  #endif\\n#endif\\n#ifdef ROTATIONOVERLIFETIMESEPERATE\\n  #if defined(ROTATIONOVERLIFETIMECONSTANT)||defined(ROTATIONOVERLIFETIMERANDOMCONSTANTS)\\n    uniform  vec3 u_ROLAngularVelocityConstSeprarate;\\n  #endif\\n  #ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n    uniform  vec3 u_ROLAngularVelocityConstMaxSeprarate;\\n  #endif\\n  #if defined(ROTATIONOVERLIFETIMECURVE)||defined(ROTATIONOVERLIFETIMERANDOMCURVES)\\n    uniform  vec2 u_ROLAngularVelocityGradientX[4];\\n    uniform  vec2 u_ROLAngularVelocityGradientY[4];\\n    uniform  vec2 u_ROLAngularVelocityGradientZ[4];\\n\tuniform  vec2 u_ROLAngularVelocityGradientW[4];\\n  #endif\\n  #ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n    uniform  vec2 u_ROLAngularVelocityGradientMaxX[4];\\n    uniform  vec2 u_ROLAngularVelocityGradientMaxY[4];\\n    uniform  vec2 u_ROLAngularVelocityGradientMaxZ[4];\\n\tuniform  vec2 u_ROLAngularVelocityGradientMaxW[4];\\n  #endif\\n#endif\\n\\n#if defined(TEXTURESHEETANIMATIONCURVE)||defined(TEXTURESHEETANIMATIONRANDOMCURVE)\\n  uniform  float u_TSACycles;\\n  uniform  vec2 u_TSASubUVLength;\\n  uniform  vec2 u_TSAGradientUVs[4];//x为key,y为frame\\n#endif\\n#ifdef TEXTURESHEETANIMATIONRANDOMCURVE\\n  uniform  vec2 u_TSAMaxGradientUVs[4];//x为key,y为frame\\n#endif\\n\\n#ifdef FOG\\n\tvarying vec3 v_PositionWorld;\\n#endif\\n\\nvec3 rotationByEuler(in vec3 vector,in vec3 rot)\\n{\\n\tfloat halfRoll = rot.z * 0.5;\\n    float halfPitch = rot.x * 0.5;\\n\tfloat halfYaw = rot.y * 0.5;\\n\\n\tfloat sinRoll = sin(halfRoll);\\n\tfloat cosRoll = cos(halfRoll);\\n\tfloat sinPitch = sin(halfPitch);\\n\tfloat cosPitch = cos(halfPitch);\\n\tfloat sinYaw = sin(halfYaw);\\n\tfloat cosYaw = cos(halfYaw);\\n\\n\tfloat quaX = (cosYaw * sinPitch * cosRoll) + (sinYaw * cosPitch * sinRoll);\\n\tfloat quaY = (sinYaw * cosPitch * cosRoll) - (cosYaw * sinPitch * sinRoll);\\n\tfloat quaZ = (cosYaw * cosPitch * sinRoll) - (sinYaw * sinPitch * cosRoll);\\n\tfloat quaW = (cosYaw * cosPitch * cosRoll) + (sinYaw * sinPitch * sinRoll);\\n\t\\n\t//vec4 q=vec4(quaX,quaY,quaZ,quaW);\\n\t//vec3 temp = cross(q.xyz, vector) + q.w * vector;\\n\t//return (cross(temp, -q.xyz) + dot(q.xyz,vector) * q.xyz + q.w * temp);\\n\t\\n\tfloat x = quaX + quaX;\\n    float y = quaY + quaY;\\n    float z = quaZ + quaZ;\\n    float wx = quaW * x;\\n    float wy = quaW * y;\\n    float wz = quaW * z;\\n\tfloat xx = quaX * x;\\n    float xy = quaX * y;\\n\tfloat xz = quaX * z;\\n    float yy = quaY * y;\\n    float yz = quaY * z;\\n    float zz = quaZ * z;\\n\\n    return vec3(((vector.x * ((1.0 - yy) - zz)) + (vector.y * (xy - wz))) + (vector.z * (xz + wy)),\\n                ((vector.x * (xy + wz)) + (vector.y * ((1.0 - xx) - zz))) + (vector.z * (yz - wx)),\\n                ((vector.x * (xz - wy)) + (vector.y * (yz + wx))) + (vector.z * ((1.0 - xx) - yy)));\\n\t\\n}\\n\\n//假定axis已经归一化\\nvec3 rotationByAxis(in vec3 vector,in vec3 axis, in float angle)\\n{\\n\tfloat halfAngle = angle * 0.5;\\n\tfloat sin = sin(halfAngle);\\n\t\\n\tfloat quaX = axis.x * sin;\\n\tfloat quaY = axis.y * sin;\\n\tfloat quaZ = axis.z * sin;\\n\tfloat quaW = cos(halfAngle);\\n\t\\n\t//vec4 q=vec4(quaX,quaY,quaZ,quaW);\\n\t//vec3 temp = cross(q.xyz, vector) + q.w * vector;\\n\t//return (cross(temp, -q.xyz) + dot(q.xyz,vector) * q.xyz + q.w * temp);\\n\t\\n\tfloat x = quaX + quaX;\\n    float y = quaY + quaY;\\n    float z = quaZ + quaZ;\\n    float wx = quaW * x;\\n    float wy = quaW * y;\\n    float wz = quaW * z;\\n\tfloat xx = quaX * x;\\n    float xy = quaX * y;\\n\tfloat xz = quaX * z;\\n    float yy = quaY * y;\\n    float yz = quaY * z;\\n    float zz = quaZ * z;\\n\\n    return vec3(((vector.x * ((1.0 - yy) - zz)) + (vector.y * (xy - wz))) + (vector.z * (xz + wy)),\\n                ((vector.x * (xy + wz)) + (vector.y * ((1.0 - xx) - zz))) + (vector.z * (yz - wx)),\\n                ((vector.x * (xz - wy)) + (vector.y * (yz + wx))) + (vector.z * ((1.0 - xx) - yy)));\\n\t\\n}\\n\\nvec3 rotationByQuaternions(in vec3 v,in vec4 q) \\n{\\n\treturn v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);\\n}\\n\\n \\n#if defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)||defined(SIZEOVERLIFETIMECURVE)||defined(SIZEOVERLIFETIMECURVESEPERATE)||defined(SIZEOVERLIFETIMERANDOMCURVES)||defined(SIZEOVERLIFETIMERANDOMCURVESSEPERATE)\\nfloat getCurValueFromGradientFloat(in vec2 gradientNumbers[4],in float normalizedAge)\\n{\\n\tfloat curValue;\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec2 gradientNumber=gradientNumbers[i];\\n\t\tfloat key=gradientNumber.x;\\n\t\tif(key>=normalizedAge)\\n\t\t{\\n\t\t\tvec2 lastGradientNumber=gradientNumbers[i-1];\\n\t\t\tfloat lastKey=lastGradientNumber.x;\\n\t\t\tfloat age=(normalizedAge-lastKey)/(key-lastKey);\\n\t\t\tcurValue=mix(lastGradientNumber.y,gradientNumber.y,age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn curValue;\\n}\\n#endif\\n\\n#if defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)||defined(ROTATIONOVERLIFETIMECURVE)||defined(ROTATIONOVERLIFETIMERANDOMCURVES)\\nfloat getTotalValueFromGradientFloat(in vec2 gradientNumbers[4],in float normalizedAge)\\n{\\n\tfloat totalValue=0.0;\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec2 gradientNumber=gradientNumbers[i];\\n\t\tfloat key=gradientNumber.x;\\n\t\tvec2 lastGradientNumber=gradientNumbers[i-1];\\n\t\tfloat lastValue=lastGradientNumber.y;\\n\t\t\\n\t\tif(key>=normalizedAge){\\n\t\t\tfloat lastKey=lastGradientNumber.x;\\n\t\t\tfloat age=(normalizedAge-lastKey)/(key-lastKey);\\n\t\t\ttotalValue+=(lastValue+mix(lastValue,gradientNumber.y,age))/2.0*a_ShapePositionStartLifeTime.w*(normalizedAge-lastKey);\\n\t\t\tbreak;\\n\t\t}\\n\t\telse{\\n\t\t\ttotalValue+=(lastValue+gradientNumber.y)/2.0*a_ShapePositionStartLifeTime.w*(key-lastGradientNumber.x);\\n\t\t}\\n\t}\\n\treturn totalValue;\\n}\\n#endif\\n\\n#if defined(COLOROVERLIFETIME)||defined(RANDOMCOLOROVERLIFETIME)\\nvec4 getColorFromGradient(in vec2 gradientAlphas[4],in vec4 gradientColors[4],in float normalizedAge)\\n{\\n\tvec4 overTimeColor;\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec2 gradientAlpha=gradientAlphas[i];\\n\t\tfloat alphaKey=gradientAlpha.x;\\n\t\tif(alphaKey>=normalizedAge)\\n\t\t{\\n\t\t\tvec2 lastGradientAlpha=gradientAlphas[i-1];\\n\t\t\tfloat lastAlphaKey=lastGradientAlpha.x;\\n\t\t\tfloat age=(normalizedAge-lastAlphaKey)/(alphaKey-lastAlphaKey);\\n\t\t\toverTimeColor.a=mix(lastGradientAlpha.y,gradientAlpha.y,age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\t\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec4 gradientColor=gradientColors[i];\\n\t\tfloat colorKey=gradientColor.x;\\n\t\tif(colorKey>=normalizedAge)\\n\t\t{\\n\t\t\tvec4 lastGradientColor=gradientColors[i-1];\\n\t\t\tfloat lastColorKey=lastGradientColor.x;\\n\t\t\tfloat age=(normalizedAge-lastColorKey)/(colorKey-lastColorKey);\\n\t\t\toverTimeColor.rgb=mix(gradientColors[i-1].yzw,gradientColor.yzw,age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn overTimeColor;\\n}\\n#endif\\n\\n\\n#if defined(TEXTURESHEETANIMATIONCURVE)||defined(TEXTURESHEETANIMATIONRANDOMCURVE)\\nfloat getFrameFromGradient(in vec2 gradientFrames[4],in float normalizedAge)\\n{\\n\tfloat overTimeFrame;\\n\tfor(int i=1;i<4;i++)\\n\t{\\n\t\tvec2 gradientFrame=gradientFrames[i];\\n\t\tfloat key=gradientFrame.x;\\n\t\tif(key>=normalizedAge)\\n\t\t{\\n\t\t\tvec2 lastGradientFrame=gradientFrames[i-1];\\n\t\t\tfloat lastKey=lastGradientFrame.x;\\n\t\t\tfloat age=(normalizedAge-lastKey)/(key-lastKey);\\n\t\t\toverTimeFrame=mix(lastGradientFrame.y,gradientFrame.y,age);\\n\t\t\tbreak;\\n\t\t}\\n\t}\\n\treturn floor(overTimeFrame);\\n}\\n#endif\\n\\n#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\nvec3 computeParticleLifeVelocity(in float normalizedAge)\\n{\\n  vec3 outLifeVelocity;\\n  #ifdef VELOCITYOVERLIFETIMECONSTANT\\n\t outLifeVelocity=u_VOLVelocityConst; \\n  #endif\\n  #ifdef VELOCITYOVERLIFETIMECURVE\\n     outLifeVelocity= vec3(getCurValueFromGradientFloat(u_VOLVelocityGradientX,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientY,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientZ,normalizedAge));\\n  #endif\\n  #ifdef VELOCITYOVERLIFETIMERANDOMCONSTANT\\n\t outLifeVelocity=mix(u_VOLVelocityConst,u_VOLVelocityConstMax,vec3(a_Random1.y,a_Random1.z,a_Random1.w)); \\n  #endif\\n  #ifdef VELOCITYOVERLIFETIMERANDOMCURVE\\n     outLifeVelocity=vec3(mix(getCurValueFromGradientFloat(u_VOLVelocityGradientX,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientMaxX,normalizedAge),a_Random1.y),\\n\t                 mix(getCurValueFromGradientFloat(u_VOLVelocityGradientY,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientMaxY,normalizedAge),a_Random1.z),\\n\t\t\t\t\t mix(getCurValueFromGradientFloat(u_VOLVelocityGradientZ,normalizedAge),getCurValueFromGradientFloat(u_VOLVelocityGradientMaxZ,normalizedAge),a_Random1.w));\\n  #endif\\n\t\t\t\t\t\\n  return outLifeVelocity;\\n} \\n#endif\\n\\nvec3 computeParticlePosition(in vec3 startVelocity, in vec3 lifeVelocity,in float age,in float normalizedAge,vec3 gravityVelocity,vec4 worldRotation)\\n{\\n   vec3 startPosition;\\n   vec3 lifePosition;\\n   #if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n\t#ifdef VELOCITYOVERLIFETIMECONSTANT\\n\t\t  startPosition=startVelocity*age;\\n\t\t  lifePosition=lifeVelocity*age;\\n\t#endif\\n\t#ifdef VELOCITYOVERLIFETIMECURVE\\n\t\t  startPosition=startVelocity*age;\\n\t\t  lifePosition=vec3(getTotalValueFromGradientFloat(u_VOLVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientZ,normalizedAge));\\n\t#endif\\n\t#ifdef VELOCITYOVERLIFETIMERANDOMCONSTANT\\n\t\t  startPosition=startVelocity*age;\\n\t\t  lifePosition=lifeVelocity*age;\\n\t#endif\\n\t#ifdef VELOCITYOVERLIFETIMERANDOMCURVE\\n\t\t  startPosition=startVelocity*age;\\n\t\t  lifePosition=vec3(mix(getTotalValueFromGradientFloat(u_VOLVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientMaxX,normalizedAge),a_Random1.y)\\n\t      ,mix(getTotalValueFromGradientFloat(u_VOLVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientMaxY,normalizedAge),a_Random1.z)\\n\t      ,mix(getTotalValueFromGradientFloat(u_VOLVelocityGradientZ,normalizedAge),getTotalValueFromGradientFloat(u_VOLVelocityGradientMaxZ,normalizedAge),a_Random1.w));\\n\t#endif\\n\t\\n\tvec3 finalPosition;\\n\tif(u_VOLSpaceType==0){\\n\t  if(u_ScalingMode!=2)\\n\t   finalPosition =rotationByQuaternions(u_PositionScale*(a_ShapePositionStartLifeTime.xyz+startPosition+lifePosition),worldRotation);\\n\t  else\\n\t   finalPosition =rotationByQuaternions(u_PositionScale*a_ShapePositionStartLifeTime.xyz+startPosition+lifePosition,worldRotation);\\n\t}\\n\telse{\\n\t  if(u_ScalingMode!=2)\\n\t    finalPosition = rotationByQuaternions(u_PositionScale*(a_ShapePositionStartLifeTime.xyz+startPosition),worldRotation)+lifePosition;\\n\t  else\\n\t    finalPosition = rotationByQuaternions(u_PositionScale*a_ShapePositionStartLifeTime.xyz+startPosition,worldRotation)+lifePosition;\\n\t}\\n  #else\\n\t startPosition=startVelocity*age;\\n\t vec3 finalPosition;\\n\t if(u_ScalingMode!=2)\\n\t   finalPosition = rotationByQuaternions(u_PositionScale*(a_ShapePositionStartLifeTime.xyz+startPosition),worldRotation);\\n\t else\\n\t   finalPosition = rotationByQuaternions(u_PositionScale*a_ShapePositionStartLifeTime.xyz+startPosition,worldRotation);\\n  #endif\\n  \\n  if(u_SimulationSpace==0)\\n    finalPosition=finalPosition+a_SimulationWorldPostion;\\n  else if(u_SimulationSpace==1) \\n    finalPosition=finalPosition+u_WorldPosition;\\n  \\n  finalPosition+=0.5*gravityVelocity*age;\\n \\n  return  finalPosition;\\n}\\n\\n\\nvec4 computeParticleColor(in vec4 color,in float normalizedAge)\\n{\\n\t#ifdef COLOROVERLIFETIME\\n\t  color*=getColorFromGradient(u_ColorOverLifeGradientAlphas,u_ColorOverLifeGradientColors,normalizedAge);\\n\t#endif\\n\t\\n\t#ifdef RANDOMCOLOROVERLIFETIME\\n\t  color*=mix(getColorFromGradient(u_ColorOverLifeGradientAlphas,u_ColorOverLifeGradientColors,normalizedAge),getColorFromGradient(u_MaxColorOverLifeGradientAlphas,u_MaxColorOverLifeGradientColors,normalizedAge),a_Random0.y);\\n\t#endif\\n\\n    return color;\\n}\\n\\nvec2 computeParticleSizeBillbard(in vec2 size,in float normalizedAge)\\n{\\n\t#ifdef SIZEOVERLIFETIMECURVE\\n\t\tsize*=getCurValueFromGradientFloat(u_SOLSizeGradient,normalizedAge);\\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMERANDOMCURVES\\n\t    size*=mix(getCurValueFromGradientFloat(u_SOLSizeGradient,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMax,normalizedAge),a_Random0.z); \\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMECURVESEPERATE\\n\t\tsize*=vec2(getCurValueFromGradientFloat(u_SOLSizeGradientX,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientY,normalizedAge));\\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMERANDOMCURVESSEPERATE\\n\t    size*=vec2(mix(getCurValueFromGradientFloat(u_SOLSizeGradientX,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxX,normalizedAge),a_Random0.z)\\n\t    ,mix(getCurValueFromGradientFloat(u_SOLSizeGradientY,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxY,normalizedAge),a_Random0.z));\\n\t#endif\\n\treturn size;\\n}\\n\\n#ifdef RENDERMODE_MESH\\nvec3 computeParticleSizeMesh(in vec3 size,in float normalizedAge)\\n{\\n\t#ifdef SIZEOVERLIFETIMECURVE\\n\t\tsize*=getCurValueFromGradientFloat(u_SOLSizeGradient,normalizedAge);\\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMERANDOMCURVES\\n\t    size*=mix(getCurValueFromGradientFloat(u_SOLSizeGradient,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMax,normalizedAge),a_Random0.z); \\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMECURVESEPERATE\\n\t\tsize*=vec3(getCurValueFromGradientFloat(u_SOLSizeGradientX,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientY,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientZ,normalizedAge));\\n\t#endif\\n\t#ifdef SIZEOVERLIFETIMERANDOMCURVESSEPERATE\\n\t    size*=vec3(mix(getCurValueFromGradientFloat(u_SOLSizeGradientX,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxX,normalizedAge),a_Random0.z)\\n\t    ,mix(getCurValueFromGradientFloat(u_SOLSizeGradientY,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxY,normalizedAge),a_Random0.z)\\n\t\t,mix(getCurValueFromGradientFloat(u_SOLSizeGradientZ,normalizedAge),getCurValueFromGradientFloat(u_SOLSizeGradientMaxZ,normalizedAge),a_Random0.z));\\n\t#endif\\n\treturn size;\\n}\\n#endif\\n\\nfloat computeParticleRotationFloat(in float rotation,in float age,in float normalizedAge)\\n{ \\n\t#ifdef ROTATIONOVERLIFETIME\\n\t\t#ifdef ROTATIONOVERLIFETIMECONSTANT\\n\t\t\tfloat ageRot=u_ROLAngularVelocityConst*age;\\n\t        rotation+=ageRot;\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMECURVE\\n\t\t\trotation+=getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge);\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n\t\t\tfloat ageRot=mix(u_ROLAngularVelocityConst,u_ROLAngularVelocityConstMax,a_Random0.w)*age;\\n\t        rotation+=ageRot;\\n\t    #endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n\t\t\trotation+=mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMax,normalizedAge),a_Random0.w);\\n\t\t#endif\\n\t#endif\\n\t#ifdef ROTATIONOVERLIFETIMESEPERATE\\n\t\t#ifdef ROTATIONOVERLIFETIMECONSTANT\\n\t\t\tfloat ageRot=u_ROLAngularVelocityConstSeprarate.z*age;\\n\t        rotation+=ageRot;\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMECURVE\\n\t\t\trotation+=getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge);\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n\t\t\tfloat ageRot=mix(u_ROLAngularVelocityConstSeprarate.z,u_ROLAngularVelocityConstMaxSeprarate.z,a_Random0.w)*age;\\n\t        rotation+=ageRot;\\n\t    #endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n\t\t\trotation+=mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMaxZ,normalizedAge),a_Random0.w));\\n\t\t#endif\\n\t#endif\\n\treturn rotation;\\n}\\n\\n\\n#if defined(RENDERMODE_MESH)&&(defined(ROTATIONOVERLIFETIME)||defined(ROTATIONOVERLIFETIMESEPERATE))\\nvec3 computeParticleRotationVec3(in vec3 rotation,in float age,in float normalizedAge)\\n{ \\n\t#ifdef ROTATIONOVERLIFETIME\\n\t#ifdef ROTATIONOVERLIFETIMECONSTANT\\n\t\t\tfloat ageRot=u_ROLAngularVelocityConst*age;\\n\t        rotation+=ageRot;\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMECURVE\\n\t\t\trotation+=getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge);\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n\t\t\tfloat ageRot=mix(u_ROLAngularVelocityConst,u_ROLAngularVelocityConstMax,a_Random0.w)*age;\\n\t        rotation+=ageRot;\\n\t    #endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n\t\t\trotation+=mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradient,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMax,normalizedAge),a_Random0.w);\\n\t\t#endif\\n\t#endif\\n\t#ifdef ROTATIONOVERLIFETIMESEPERATE\\n\t#ifdef ROTATIONOVERLIFETIMECONSTANT\\n\t\t\tvec3 ageRot=u_ROLAngularVelocityConstSeprarate*age;\\n\t        rotation+=ageRot;\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMECURVE\\n\t\t\trotation+=vec3(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge));\\n\t\t#endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCONSTANTS\\n\t\t\tvec3 ageRot=mix(u_ROLAngularVelocityConstSeprarate,u_ROLAngularVelocityConstMaxSeprarate,a_Random0.w)*age;\\n\t        rotation+=ageRot;\\n\t    #endif\\n\t\t#ifdef ROTATIONOVERLIFETIMERANDOMCURVES\\n\t\t\trotation+=vec3(mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientX,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMaxX,normalizedAge),a_Random0.w)\\n\t        ,mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientY,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMaxY,normalizedAge),a_Random0.w)\\n\t        ,mix(getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientZ,normalizedAge),getTotalValueFromGradientFloat(u_ROLAngularVelocityGradientMaxZ,normalizedAge),a_Random0.w));\\n\t\t#endif\\n\t#endif\\n\treturn rotation;\\n}\\n#endif\\n\\nvec2 computeParticleUV(in vec2 uv,in float normalizedAge)\\n{ \\n\t#ifdef TEXTURESHEETANIMATIONCURVE\\n\t\tfloat cycleNormalizedAge=normalizedAge*u_TSACycles;\\n\t\tfloat frame=getFrameFromGradient(u_TSAGradientUVs,cycleNormalizedAge-floor(cycleNormalizedAge));\\n\t\tfloat totalULength=frame*u_TSASubUVLength.x;\\n\t\tfloat floorTotalULength=floor(totalULength);\\n\t    uv.x+=totalULength-floorTotalULength;\\n\t\tuv.y+=floorTotalULength*u_TSASubUVLength.y;\\n    #endif\\n\t#ifdef TEXTURESHEETANIMATIONRANDOMCURVE\\n\t\tfloat cycleNormalizedAge=normalizedAge*u_TSACycles;\\n\t\tfloat uvNormalizedAge=cycleNormalizedAge-floor(cycleNormalizedAge);\\n\t    float frame=floor(mix(getFrameFromGradient(u_TSAGradientUVs,uvNormalizedAge),getFrameFromGradient(u_TSAMaxGradientUVs,uvNormalizedAge),a_Random1.x));\\n\t\tfloat totalULength=frame*u_TSASubUVLength.x;\\n\t\tfloat floorTotalULength=floor(totalULength);\\n\t    uv.x+=totalULength-floorTotalULength;\\n\t\tuv.y+=floorTotalULength*u_TSASubUVLength.y;\\n    #endif\\n\treturn uv;\\n}\\n\\nvoid main()\\n{\\n\tfloat age = u_CurrentTime - a_DirectionTime.w;\\n\tfloat normalizedAge = age/a_ShapePositionStartLifeTime.w;\\n\tvec3 lifeVelocity;\\n\tif(normalizedAge<1.0){ \\n\tvec3 startVelocity=a_DirectionTime.xyz*a_StartSpeed;\\n\t#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n\t\tlifeVelocity= computeParticleLifeVelocity(normalizedAge);//计算粒子生命周期速度\\n\t#endif \\n\tvec3 gravityVelocity=u_Gravity*age;\\n\t\\n\tvec4 worldRotation;\\n\tif(u_SimulationSpace==0)\\n\t\tworldRotation=a_SimulationWorldRotation;\\n\telse\\n\t\tworldRotation=u_WorldRotation;\\n\t\\n\tvec3 center=computeParticlePosition(startVelocity, lifeVelocity, age, normalizedAge,gravityVelocity,worldRotation);//计算粒子位置\\n   \\n   \\n   #ifdef SPHERHBILLBOARD\\n\t\tvec2 corner=a_CornerTextureCoordinate.xy;//Billboard模式z轴无效\\n        vec3 cameraUpVector =normalize(u_CameraUp);//TODO:是否外面归一化\\n        vec3 sideVector = normalize(cross(u_CameraDirection,cameraUpVector));\\n        vec3 upVector = normalize(cross(sideVector,u_CameraDirection));\\n\t    corner*=computeParticleSizeBillbard(a_StartSize.xy,normalizedAge);\\n\t\t#if defined(ROTATIONOVERLIFETIME)||defined(ROTATIONOVERLIFETIMESEPERATE)\\n\t\t\tif(u_ThreeDStartRotation){\\n\t\t\t\tvec3 rotation=vec3(a_StartRotation0.xy,computeParticleRotationFloat(a_StartRotation0.z,age,normalizedAge));\\n\t\t\t\tcenter += u_SizeScale.xzy*rotationByEuler(corner.x*sideVector+corner.y*upVector,rotation);\\n\t\t\t}\\n\t\t\telse{\\n\t\t\t\tfloat rot = computeParticleRotationFloat(a_StartRotation0.x, age,normalizedAge);\\n\t\t\t\tfloat c = cos(rot);\\n\t\t\t\tfloat s = sin(rot);\\n\t\t\t\tmat2 rotation= mat2(c, -s, s, c);\\n\t\t\t\tcorner=rotation*corner;\\n\t\t\t\tcenter += u_SizeScale.xzy*(corner.x*sideVector+corner.y*upVector);\\n\t\t\t}\\n\t\t#else\\n\t\t\tif(u_ThreeDStartRotation){\\n\t\t\t\tcenter += u_SizeScale.xzy*rotationByEuler(corner.x*sideVector+corner.y*upVector,a_StartRotation0);\\n\t\t\t}\\n\t\t\telse{\\n\t\t\t\tfloat c = cos(a_StartRotation0.x);\\n\t\t\t\tfloat s = sin(a_StartRotation0.x);\\n\t\t\t\tmat2 rotation= mat2(c, -s, s, c);\\n\t\t\t\tcorner=rotation*corner;\\n\t\t\t\tcenter += u_SizeScale.xzy*(corner.x*sideVector+corner.y*upVector);\\n\t\t\t}\\n\t\t#endif\\n   #endif\\n   \\n   #ifdef STRETCHEDBILLBOARD\\n\tvec2 corner=a_CornerTextureCoordinate.xy;//Billboard模式z轴无效\\n\tvec3 velocity;\\n\t#if defined(VELOCITYOVERLIFETIMECONSTANT)||defined(VELOCITYOVERLIFETIMECURVE)||defined(VELOCITYOVERLIFETIMERANDOMCONSTANT)||defined(VELOCITYOVERLIFETIMERANDOMCURVE)\\n\t    if(u_VOLSpaceType==0)\\n\t\t  velocity=rotationByQuaternions(u_SizeScale*(startVelocity+lifeVelocity),worldRotation)+gravityVelocity;\\n\t    else\\n\t\t  velocity=rotationByQuaternions(u_SizeScale*startVelocity,worldRotation)+lifeVelocity+gravityVelocity;\\n    #else\\n\t    velocity= rotationByQuaternions(u_SizeScale*startVelocity,worldRotation)+gravityVelocity;\\n    #endif\t\\n\t\tvec3 cameraUpVector = normalize(velocity);\\n\t\tvec3 direction = normalize(center-u_CameraPosition);\\n        vec3 sideVector = normalize(cross(direction,normalize(velocity)));\\n\t\t\\n\t\tsideVector=u_SizeScale.xzy*sideVector;\\n\t\tcameraUpVector=length(vec3(u_SizeScale.x,0.0,0.0))*cameraUpVector;\\n\t\t\\n\t    vec2 size=computeParticleSizeBillbard(a_StartSize.xy,normalizedAge);\\n\t\t\\n\t    const mat2 rotaionZHalfPI=mat2(0.0, -1.0, 1.0, 0.0);\\n\t    corner=rotaionZHalfPI*corner;\\n\t    corner.y=corner.y-abs(corner.y);\\n\t\t\\n\t    float speed=length(velocity);//TODO:\\n\t    center +=sign(u_SizeScale.x)*(sign(u_StretchedBillboardLengthScale)*size.x*corner.x*sideVector+(speed*u_StretchedBillboardSpeedScale+size.y*u_StretchedBillboardLengthScale)*corner.y*cameraUpVector);\\n   #endif\\n   \\n   #ifdef HORIZONTALBILLBOARD\\n\t\tvec2 corner=a_CornerTextureCoordinate.xy;//Billboard模式z轴无效\\n        const vec3 cameraUpVector=vec3(0.0,0.0,1.0);\\n\t    const vec3 sideVector = vec3(-1.0,0.0,0.0);\\n\t\t\\n\t\tfloat rot = computeParticleRotationFloat(a_StartRotation0.x, age,normalizedAge);\\n        float c = cos(rot);\\n        float s = sin(rot);\\n        mat2 rotation= mat2(c, -s, s, c);\\n\t    corner=rotation*corner*cos(0.78539816339744830961566084581988);//TODO:临时缩小cos45,不确定U3D原因\\n\t\tcorner*=computeParticleSizeBillbard(a_StartSize.xy,normalizedAge);\\n        center +=u_SizeScale.xzy*(corner.x*sideVector+ corner.y*cameraUpVector);\\n   #endif\\n   \\n   #ifdef VERTICALBILLBOARD\\n\t\tvec2 corner=a_CornerTextureCoordinate.xy;//Billboard模式z轴无效\\n        const vec3 cameraUpVector =vec3(0.0,1.0,0.0);\\n        vec3 sideVector = normalize(cross(u_CameraDirection,cameraUpVector));\\n\t\t\\n\t\tfloat rot = computeParticleRotationFloat(a_StartRotation0.x, age,normalizedAge);\\n        float c = cos(rot);\\n        float s = sin(rot);\\n        mat2 rotation= mat2(c, -s, s, c);\\n\t    corner=rotation*corner*cos(0.78539816339744830961566084581988);//TODO:临时缩小cos45,不确定U3D原因\\n\t\tcorner*=computeParticleSizeBillbard(a_StartSize.xy,normalizedAge);\\n        center +=u_SizeScale.xzy*(corner.x*sideVector+ corner.y*cameraUpVector);\\n   #endif\\n   \\n   #ifdef RENDERMODE_MESH\\n\t    vec3 size=computeParticleSizeMesh(a_StartSize,normalizedAge);\\n\t\t#if defined(ROTATIONOVERLIFETIME)||defined(ROTATIONOVERLIFETIMESEPERATE)\\n\t\t\tif(u_ThreeDStartRotation){\\n\t\t\t\tvec3 rotation=vec3(a_StartRotation0.xy,-computeParticleRotationFloat(a_StartRotation0.z, age,normalizedAge));\\n\t\t\t\tcenter+= rotationByQuaternions(u_SizeScale*rotationByEuler(a_MeshPosition*size,rotation),worldRotation);\\n\t\t\t}\\n\t\t\telse{\\n\t\t\t\t#ifdef ROTATIONOVERLIFETIME\\n\t\t\t\t\tfloat angle=computeParticleRotationFloat(a_StartRotation0.x, age,normalizedAge);\\n\t\t\t\t\tif(a_ShapePositionStartLifeTime.x!=0.0||a_ShapePositionStartLifeTime.y!=0.0){\\n\t\t\t\t\t\tcenter+= (rotationByQuaternions(rotationByAxis(u_SizeScale*a_MeshPosition*size,normalize(cross(vec3(0.0,0.0,1.0),vec3(a_ShapePositionStartLifeTime.xy,0.0))),angle),worldRotation));//已验证\\n\t\t\t\t\t}\\n\t\t\t\t\telse{\\n\t\t\t\t\t\t#ifdef SHAPE\\n\t\t\t\t\t\t\tcenter+= u_SizeScale.xzy*(rotationByQuaternions(rotationByAxis(a_MeshPosition*size,vec3(0.0,-1.0,0.0),angle),worldRotation));\\n\t\t\t\t\t\t#else\\n\t\t\t\t\t\t\tif(u_SimulationSpace==0)\\n\t\t\t\t\t\t\t\tcenter+=rotationByAxis(u_SizeScale*a_MeshPosition*size,vec3(0.0,0.0,-1.0),angle);//已验证\\n\t\t\t\t\t\t\telse if(u_SimulationSpace==1)\\n\t\t\t\t\t\t\t\tcenter+=rotationByQuaternions(u_SizeScale*rotationByAxis(a_MeshPosition*size,vec3(0.0,0.0,-1.0),angle),worldRotation);//已验证\\n\t\t\t\t\t\t#endif\\n\t\t\t\t\t}\\n\t\t\t\t#endif\\n\t\t\t\t#ifdef ROTATIONOVERLIFETIMESEPERATE\\n\t\t\t\t\t//TODO:是否应合并if(u_ThreeDStartRotation)分支代码,待测试\\n\t\t\t\t\tvec3 angle=computeParticleRotationVec3(vec3(0.0,0.0,a_StartRotation0.z), age,normalizedAge);\\n\t\t\t\t\tcenter+= (rotationByQuaternions(rotationByEuler(u_SizeScale*a_MeshPosition*size,vec3(angle.x,angle.y,angle.z)),worldRotation));//已验证\\n\t\t\t\t#endif\t\\n\t\t\t}\\n\t\t#else\\n\t\t\tif(u_ThreeDStartRotation){\\n\t\t\t\tcenter+= rotationByQuaternions(u_SizeScale*rotationByEuler(a_MeshPosition*size,a_StartRotation0),worldRotation);//已验证\\n\t\t\t}\\n\t\t\telse{\\n\t\t\t\tif(a_ShapePositionStartLifeTime.x!=0.0||a_ShapePositionStartLifeTime.y!=0.0){\\n\t\t\t\t\tif(u_SimulationSpace==0)\\n\t\t\t\t\t\tcenter+= rotationByAxis(u_SizeScale*a_MeshPosition*size,normalize(cross(vec3(0.0,0.0,1.0),vec3(a_ShapePositionStartLifeTime.xy,0.0))),a_StartRotation0.x);\\n\t\t\t\t\telse if(u_SimulationSpace==1)\\n\t\t\t\t\t\tcenter+= (rotationByQuaternions(u_SizeScale*rotationByAxis(a_MeshPosition*size,normalize(cross(vec3(0.0,0.0,1.0),vec3(a_ShapePositionStartLifeTime.xy,0.0))),a_StartRotation0.x),worldRotation));//已验证\\n\t\t\t\t}\\n\t\t\t\telse{\\n\t\t\t\t\t#ifdef SHAPE\\n\t\t\t\t\t\tif(u_SimulationSpace==0)\\n\t\t\t\t\t\t\tcenter+= u_SizeScale*rotationByAxis(a_MeshPosition*size,vec3(0.0,-1.0,0.0),a_StartRotation0.x);\\n\t\t\t\t\t\telse if(u_SimulationSpace==1)\\n\t\t\t\t\t\t\tcenter+= rotationByQuaternions(u_SizeScale*rotationByAxis(a_MeshPosition*size,vec3(0.0,-1.0,0.0),a_StartRotation0.x),worldRotation);\t\\n\t\t\t\t\t#else\\n\t\t\t\t\t\tif(u_SimulationSpace==0)\\n\t\t\t\t\t\t\tcenter+= rotationByAxis(u_SizeScale*a_MeshPosition*size,vec3(0.0,0.0,-1.0),a_StartRotation0.x);\\n\t\t\t\t\t\telse if(u_SimulationSpace==1)\\n\t\t\t\t\t\t\tcenter+= rotationByQuaternions(u_SizeScale*rotationByAxis(a_MeshPosition*size,vec3(0.0,0.0,-1.0),a_StartRotation0.x),worldRotation);//已验证\\n\t\t\t\t\t#endif\\n\t\t\t\t}\\n\t\t\t}\\n\t\t#endif\\n\t\tv_MeshColor=a_MeshColor;\\n   #endif\\n   \\n    gl_Position=u_Projection*u_View*vec4(center,1.0);\\n    v_Color = computeParticleColor(a_StartColor, normalizedAge);\\n\t#ifdef MAINTEXTURE\\n\t\t#if defined(SPHERHBILLBOARD)||defined(STRETCHEDBILLBOARD)||defined(HORIZONTALBILLBOARD)||defined(VERTICALBILLBOARD)\\n\t\t\tv_TextureCoordinate =computeParticleUV(a_CornerTextureCoordinate.zw, normalizedAge);\\n\t\t#endif\\n\t\t#ifdef RENDERMODE_MESH\\n\t\t\tv_TextureCoordinate =computeParticleUV(a_MeshTextureCoordinate, normalizedAge);\\n\t\t#endif\\n\t\t\\n\t\tv_Texcoord0 = v_TextureCoordinate;\\n\t\t#ifdef TILINGOFFSET1 \\n\t\t\tv_Texcoord0=vec2(v_TextureCoordinate.x,1.0-v_TextureCoordinate.y)*u_TilingOffset1.xy+vec2(u_TilingOffset1.z,-u_TilingOffset1.w);//需要特殊处理\\n\t\t\tv_Texcoord0=vec2(v_TextureCoordinate.x,1.0-v_TextureCoordinate.y);//需要特殊处理\\n\t\t#endif\\n\t\t\\n\t\tv_Texcoord1 = v_TextureCoordinate;\\n\t\t#ifdef TILINGOFFSET2 \\n\t\t\tv_Texcoord1=vec2(v_TextureCoordinate.x,1.0-v_TextureCoordinate.y)*u_TilingOffset2.xy+vec2(u_TilingOffset2.z,-u_TilingOffset2.w);//需要特殊处理\\n\t\t\tv_Texcoord1=vec2(v_TextureCoordinate.x,1.0-v_TextureCoordinate.y);//需要特殊处理\\n\t\t#endif\\n\t\t\\n\t#endif\\n    v_Discard=0.0;\\n\t  \\n\t#ifdef FOG\\n\t\tv_PositionWorld=center;\\n\t#endif\\n   }\\n   else\\n\t{\\n\t\tv_Discard=1.0;\\n\t}\\n}\\n\\n\";\n\t\tvar ps=\"#ifdef HIGHPRECISION\\n  precision highp float;\\n#else\\n  precision mediump float;\\n#endif\\n\\nvarying float v_Discard;\\nvarying vec4 v_Color;\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\n\\nuniform vec4 u_BaseColor;\\nuniform vec4 u_AlphaColor;\\nuniform float u_Instensity;\\nuniform float u_Alpha;\\n\\n#ifdef MAINTEXTURE\\n\tuniform sampler2D u_MainTexture;\\n#endif\\n\\n#ifdef MASKTEXTURE\\n\tuniform sampler2D u_MaskTexture;\\n#endif\\n\\n#ifdef RENDERMODE_MESH\\n\tvarying vec4 v_MeshColor;\\n#endif\\n\\n#ifdef FOG\\n\tvarying vec3 v_PositionWorld;\\n\tuniform vec3 u_CameraPosition;\\n\tuniform float u_FogStart;\\n\tuniform float u_FogRange;\\n\t#ifdef ADDTIVEFOG\\n\t#else\\n\t\tuniform vec3 u_FogColor;\\n\t#endif\\n#endif\\n\\n\\nvoid main()\\n{\t\\n\t#ifdef RENDERMODE_MESH\\n\t\tgl_FragColor=v_MeshColor;\\n\t#else\\n\t\tgl_FragColor=vec4(1.0);\t\\n\t#endif\\n\t\t\\n\tvec4 mainTextureColor = vec4(1.0);\\n\t#ifdef MAINTEXTURE\\n\t\tmainTextureColor = texture2D(u_MainTexture, v_Texcoord0);\\n\t#endif\\n\t\\n\tvec4 maskTextureColor = vec4(1.0);\\n\t#ifdef MASKTEXTURE\\n\t\tmaskTextureColor = texture2D(u_MaskTexture, v_Texcoord1);\\n\t#endif\\n\t\\n\tvec4 outColor = mix(vec4(0.0), mainTextureColor, maskTextureColor);\\n\t\\n\tgl_FragColor *= 2.0 * outColor * u_BaseColor * u_AlphaColor * v_Color * u_Instensity;\\n\tgl_FragColor.a *= u_Alpha;\\n\t\\n\t#ifdef FOG\\n\t\tvec3 toEye=u_CameraPosition-v_PositionWorld;\\n\t\tfloat toEyeLength=length(toEye);\\n\t\ttoEye/=toEyeLength;\\n\t\t\\n\t\tfloat lerpFact=clamp((toEyeLength-u_FogStart)/u_FogRange,0.0,1.0);\\n\t\t#ifdef ADDTIVEFOG\\n\t\t\tgl_FragColor.rgb=mix(gl_FragColor.rgb,vec3(0.0,0.0,0.0),lerpFact);\\n\t\t#else\\n\t\t\tgl_FragColor.rgb=mix(gl_FragColor.rgb,u_FogColor,lerpFact);\\n\t\t#endif\\n\t#endif\\n}\";\n\t\tvar shaderCompile=ShaderCompile3D.add(PARTICLESHURIKEN,vs,ps,attributeMap,uniformMap);\n\t\tMeshParticleMaterial.SHADERDEFINE_MAINTEXTURE=shaderCompile.registerMaterialDefine(\"MAINTEXTURE\");\n\t\tMeshParticleMaterial.SHADERDEFINE_MASKTEXTURE=shaderCompile.registerMaterialDefine(\"MASKTEXTURE\");\n\t\tMeshParticleMaterial.SHADERDEFINE_TILINGOFFSET1=shaderCompile.registerMaterialDefine(\"TILINGOFFSET1\");\n\t\tMeshParticleMaterial.SHADERDEFINE_TILINGOFFSET2=shaderCompile.registerMaterialDefine(\"TILINGOFFSET2\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_BILLBOARD=shaderCompile.registerSpriteDefine(\"SPHERHBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_STRETCHEDBILLBOARD=shaderCompile.registerSpriteDefine(\"STRETCHEDBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_HORIZONTALBILLBOARD=shaderCompile.registerSpriteDefine(\"HORIZONTALBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_VERTICALBILLBOARD=shaderCompile.registerSpriteDefine(\"VERTICALBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_COLOROVERLIFETIME=shaderCompile.registerSpriteDefine(\"COLOROVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RANDOMCOLOROVERLIFETIME=shaderCompile.registerSpriteDefine(\"RANDOMCOLOROVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECONSTANT=shaderCompile.registerSpriteDefine(\"VELOCITYOVERLIFETIMECONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECURVE=shaderCompile.registerSpriteDefine(\"VELOCITYOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCONSTANT=shaderCompile.registerSpriteDefine(\"VELOCITYOVERLIFETIMERANDOMCONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCURVE=shaderCompile.registerSpriteDefine(\"VELOCITYOVERLIFETIMERANDOMCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONCURVE=shaderCompile.registerSpriteDefine(\"TEXTURESHEETANIMATIONCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONRANDOMCURVE=shaderCompile.registerSpriteDefine(\"TEXTURESHEETANIMATIONRANDOMCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIME=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMESEPERATE=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMESEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECONSTANT=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMECONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECURVE=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCONSTANTS=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMERANDOMCONSTANTS\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCURVES=shaderCompile.registerSpriteDefine(\"ROTATIONOVERLIFETIMERANDOMCURVES\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVE=shaderCompile.registerSpriteDefine(\"SIZEOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVESEPERATE=shaderCompile.registerSpriteDefine(\"SIZEOVERLIFETIMECURVESEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVES=shaderCompile.registerSpriteDefine(\"SIZEOVERLIFETIMERANDOMCURVES\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVESSEPERATE=shaderCompile.registerSpriteDefine(\"SIZEOVERLIFETIMERANDOMCURVESSEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_MESH=shaderCompile.registerSpriteDefine(\"RENDERMODE_MESH\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SHAPE=shaderCompile.registerSpriteDefine(\"SHAPE\");\n\t}\n\n\tParticleMaterial.MAINTEXTURE=1;\n\tParticleMaterial.MASKTEXTURE=2;\n\tParticleMaterial.BASECOLOR=3;\n\tParticleMaterial.ALPHACOLOR=4;\n\tParticleMaterial.INTENSITY=5;\n\tParticleMaterial.ALPHA=6;\n\tParticleMaterial.TILINGOFFSET1=7;\n\tParticleMaterial.TILINGOFFSET2=8;\n\tParticleMaterial.SHADERDEFINE_MAINTEXTURE=0;\n\tParticleMaterial.SHADERDEFINE_MASKTEXTURE=0;\n\tParticleMaterial.SHADERDEFINE_TILINGOFFSET1=0;\n\tParticleMaterial.SHADERDEFINE_TILINGOFFSET2=0;\n\t__static(ParticleMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn ParticleMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lulingmen.UVSineMaterial extends laya.d3.core.material.BaseMaterial\nvar UVSineMaterial=(function(_super){\n\tfunction UVSineMaterial(){\n\t\tUVSineMaterial.__super.call(this);\n\t\tthis.setShaderName(\"UVSine\");\n\t\tthis._setColor(3,new Vector4(1,1,1,1));\n\t\tthis._setNumber(4,0.0);\n\t\tthis._setNumber(5,0.0);\n\t\tthis._setNumber(6,0.0);\n\t\tthis._setNumber(7,0.0);\n\t\tthis._setNumber(8,1.0);\n\t\tthis._setNumber(9,1.0);\n\t}\n\n\t__class(UVSineMaterial,'laya.d3.extension.lulingmen.UVSineMaterial',_super);\n\tvar __proto=UVSineMaterial.prototype;\n\t__getset(0,__proto,'alpha',function(){\n\t\treturn this._getNumber(9);\n\t\t},function(value){\n\t\tvalue=Math.max(0.0,Math.min(1.0,value));\n\t\tthis._setNumber(9,value);\n\t});\n\n\t/**\n\t*设置第一层贴图。\n\t*@param value 第一层贴图。\n\t*/\n\t/**\n\t*获取第一层贴图。\n\t*@return 第一层贴图。\n\t*/\n\t__getset(0,__proto,'baseTexture',function(){\n\t\treturn this._getTexture(1);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_BASETEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_BASETEXTURE);\n\t\tthis._setTexture(1,value);\n\t});\n\n\t/**\n\t*设置第一层滚动速度X。\n\t*@param value 第一层滚动速度X。\n\t*/\n\t/**\n\t*获取第一层滚动速度X。\n\t*@return 第一层滚动速度X。\n\t*/\n\t__getset(0,__proto,'baseScrollSpeedX',function(){\n\t\treturn this._getNumber(4);\n\t\t},function(value){\n\t\tthis._setNumber(4,value);\n\t});\n\n\t/**\n\t*设置第二层贴图。\n\t*@param value 第二层贴图。\n\t*/\n\t/**\n\t*获取第二层贴图。\n\t*@return 第二层贴图。\n\t*/\n\t__getset(0,__proto,'secondTexture',function(){\n\t\treturn this._getTexture(2);\n\t\t},function(value){\n\t\tif (value)\n\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_SECONDTEXTURE);\n\t\telse\n\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_SECONDTEXTURE);\n\t\tthis._setTexture(2,value);\n\t});\n\n\t__getset(0,__proto,'mMultiplier',function(){\n\t\treturn this._getNumber(8);\n\t\t},function(value){\n\t\tthis._setNumber(8,value);\n\t});\n\n\t/**\n\t*设置第一层滚动速度Y。\n\t*@param value 第一层滚动速度Y。\n\t*/\n\t/**\n\t*获取第一层滚动速度Y。\n\t*@return 第一层滚动速度Y。\n\t*/\n\t__getset(0,__proto,'baseScrollSpeedY',function(){\n\t\treturn this._getNumber(5);\n\t\t},function(value){\n\t\tthis._setNumber(5,value);\n\t});\n\n\t/**\n\t*设置基础颜色。\n\t*@param value 基础颜色。\n\t*/\n\t/**\n\t*获取基础颜色。\n\t*@return 基础颜色。\n\t*/\n\t__getset(0,__proto,'albedoColor',function(){\n\t\treturn this._getColor(3);\n\t\t},function(value){\n\t\tthis._setColor(3,value);\n\t});\n\n\t/**\n\t*设置第二层滚动速度X。\n\t*@param value 第二层滚动速度X。\n\t*/\n\t/**\n\t*获取第二层滚动速度X。\n\t*@return 第二层滚动速度X。\n\t*/\n\t__getset(0,__proto,'secondScrollSpeedX',function(){\n\t\treturn this._getNumber(6);\n\t\t},function(value){\n\t\tthis._setNumber(6,value);\n\t});\n\n\t/**\n\t*设置第二层滚动速度Y。\n\t*@param value 第二层滚动速度Y。\n\t*/\n\t/**\n\t*获取第二层滚动速度Y。\n\t*@return 第二层滚动速度Y。\n\t*/\n\t__getset(0,__proto,'secondScrollSpeedY',function(){\n\t\treturn this._getNumber(7);\n\t\t},function(value){\n\t\tthis._setNumber(7,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'tilingOffset',function(){\n\t\treturn this._getColor(10);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_TILINGOFFSET1);\n\t\t}\n\t\tthis._setColor(10,value);\n\t});\n\n\t/**\n\t*设置纹理平铺和偏移。\n\t*@param value 纹理平铺和偏移。\n\t*/\n\t/**\n\t*获取纹理平铺和偏移。\n\t*@return 纹理平铺和偏移。\n\t*/\n\t__getset(0,__proto,'detailTilingOffset',function(){\n\t\treturn this._getColor(11);\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar valueE=value.elements;\n\t\t\tif (valueE[0] !=1 || valueE[1] !=1 || valueE[2] !=0 || valueE[3] !=0)\n\t\t\t\tthis._addShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t\telse\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t\t}else {\n\t\t\tthis._removeShaderDefine(laya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_TILINGOFFSET2);\n\t\t}\n\t\tthis._setColor(11,value);\n\t});\n\n\tUVSineMaterial.__init__=function(){\n\t\tUVSineMaterial.SHADERDEFINE_BASETEXTURE=UVSineMaterial.shaderDefines.registerDefine(\"BASETEXTURE\");\n\t\tUVSineMaterial.SHADERDEFINE_SECONDTEXTURE=UVSineMaterial.shaderDefines.registerDefine(\"SECONDTEXTURE\");\n\t\tUVSineMaterial.SHADERDEFINE_TILINGOFFSET1=UVSineMaterial.shaderDefines.registerDefine(\"TILINGOFFSET1\");\n\t\tUVSineMaterial.SHADERDEFINE_TILINGOFFSET2=UVSineMaterial.shaderDefines.registerDefine(\"TILINGOFFSET2\");\n\t}\n\n\tUVSineMaterial.initShader=function(){\n\t\tvar attributeMap={\n\t\t\t'a_Position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_Normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'a_Color':/*laya.d3.graphics.VertexElementUsage.COLOR0*/1,\n\t\t\t'a_Texcoord0':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_MvpMatrix':[ /*laya.d3.core.Sprite3D.MVPMATRIX*/1,/*laya.d3.shader.Shader3D.PERIOD_SPRITE*/2],\n\t\t\t'u_Time':[ /*laya.d3.core.scene.Scene.TIME*/22,/*laya.d3.shader.Shader3D.PERIOD_SCENE*/4],\n\t\t\t'u_BaseTexture':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.BASETEXTURE*/1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SecondTexture':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.SECONDTEXTURE*/2,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_BaseColor':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.BASECOLOR*/3,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_BaseScrollSpeedX':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.BASESCROLLSPEEDX*/4,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_BaseScrollSpeedY':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.BASESCROLLSPEEDY*/5,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SecondScrollSpeedX':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.SECONDSCROLLSPEEDX*/6,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_SecondScrollSpeedY':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.SECONDSCROLLSPEEDY*/7,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_MMultiplier':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.MMULTIPLIER*/8,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_Alpha':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.ALPHA*/9,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset1':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.TILINGOFFSET1*/10,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_TilingOffset2':[ /*CLASS CONST:laya.d3.extension.lulingmen.UVSineMaterial.TILINGOFFSET2*/11,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1]\n\t\t};\n\t\tvar shader=Shader3D.nameKey.add(\"UVSine\");\n\t\tvar vs=\"attribute vec4 a_Position;\\nattribute vec3 a_Normal;\\nattribute vec2 a_Texcoord0;\\nattribute vec4 a_Color;\\n\\nuniform mat4 u_MvpMatrix;\\nuniform float u_Time;\\nuniform float u_BaseScrollSpeedX;\\nuniform float u_BaseScrollSpeedY;\\nuniform float u_SecondScrollSpeedX;\\nuniform float u_SecondScrollSpeedY;\\n\\nuniform vec4 u_TilingOffset1;\\nuniform vec4 u_TilingOffset2;\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\nvarying vec4 v_Color;\\n\\nvoid main()\\n{\\n\tv_Texcoord0 = a_Texcoord0;\\n\t#ifdef TILINGOFFSET1\\n\t\tv_Texcoord0 = (vec2(v_Texcoord0.x, v_Texcoord0.y - 1.0) * u_TilingOffset1.xy) + u_TilingOffset1.zw;\\n\t\tv_Texcoord0 = vec2(v_Texcoord0.x, 1.0 + v_Texcoord0.y);\\n\t#endif\\n\t\\n\tv_Texcoord1 = a_Texcoord0;\\n\t#ifdef TILINGOFFSET2\\n\t\tv_Texcoord1 = (vec2(v_Texcoord1.x, v_Texcoord1.y - 1.0) * u_TilingOffset2.xy) + u_TilingOffset2.zw;\\n\t\tv_Texcoord1 = vec2(v_Texcoord1.x, 1.0 + v_Texcoord1.y);\\n\t#endif\\n\t\\n\tv_Texcoord0 = v_Texcoord0 + vec2(fract(u_BaseScrollSpeedX * u_Time / 20.0), fract(-u_BaseScrollSpeedY * u_Time));\\n\tv_Texcoord1 = v_Texcoord1 + vec2(fract(u_SecondScrollSpeedX * u_Time / 20.0), fract(-u_SecondScrollSpeedY * u_Time));\\n\t\\n\tv_Color = vec4(1.0);\\n\t#ifdef COLOR\\n\t\tv_Color = a_Color;\\n\t#endif\\n\t\\n\tgl_Position = u_MvpMatrix * a_Position;\\n}\";\n\t\tvar ps=\"#ifdef FSHIGHPRECISION\\n\tprecision highp float;\\n#else\\n\tprecision mediump float;\\n#endif\\n\\nvarying vec2 v_Texcoord0;\\nvarying vec2 v_Texcoord1;\\nvarying vec4 v_Color;\\n\\n#ifdef BASETEXTURE\\n\tuniform sampler2D u_BaseTexture;\\n#endif\\n\\n#ifdef SECONDTEXTURE\\n\tuniform sampler2D u_SecondTexture;\\n#endif\\n\\nuniform vec4 u_BaseColor;\\nuniform float u_MMultiplier;\\nuniform float u_Alpha;\\n\\nvoid main()\\n{\\n\tvec4 baseTextureColor = vec4(1.0);\\n\t#ifdef BASETEXTURE\\n\t\tbaseTextureColor = texture2D(u_BaseTexture, v_Texcoord0);\\n\t#endif\\n\t\\n\tvec4 secondTextureColor = vec4(1.0);\\n\t#ifdef SECONDTEXTURE\\n\t\tsecondTextureColor = texture2D(u_SecondTexture, v_Texcoord1);\\n\t#endif\\n\t\\n\tgl_FragColor = baseTextureColor * secondTextureColor * u_BaseColor * u_MMultiplier * v_Color;\\n\tgl_FragColor.a *= u_Alpha;\\n}\\n\";\n\t\tvar shaderCompile3D=ShaderCompile3D.add(shader,vs,ps,attributeMap,uniformMap);\n\t\tlaya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_BASETEXTURE=shaderCompile3D.registerMaterialDefine(\"BASETEXTURE\");\n\t\tlaya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_SECONDTEXTURE=shaderCompile3D.registerMaterialDefine(\"SECONDTEXTURE\");\n\t\tlaya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_TILINGOFFSET1=shaderCompile3D.registerMaterialDefine(\"TILINGOFFSET1\");\n\t\tlaya.d3.extension.lulingmen.UVSineMaterial.SHADERDEFINE_TILINGOFFSET2=shaderCompile3D.registerMaterialDefine(\"TILINGOFFSET2\");\n\t}\n\n\tUVSineMaterial.BASETEXTURE=1;\n\tUVSineMaterial.SECONDTEXTURE=2;\n\tUVSineMaterial.BASECOLOR=3;\n\tUVSineMaterial.BASESCROLLSPEEDX=4;\n\tUVSineMaterial.BASESCROLLSPEEDY=5;\n\tUVSineMaterial.SECONDSCROLLSPEEDX=6;\n\tUVSineMaterial.SECONDSCROLLSPEEDY=7;\n\tUVSineMaterial.MMULTIPLIER=8;\n\tUVSineMaterial.ALPHA=9;\n\tUVSineMaterial.TILINGOFFSET1=10;\n\tUVSineMaterial.TILINGOFFSET2=11;\n\tUVSineMaterial.SHADERDEFINE_BASETEXTURE=0;\n\tUVSineMaterial.SHADERDEFINE_SECONDTEXTURE=0;\n\tUVSineMaterial.SHADERDEFINE_TILINGOFFSET1=0;\n\tUVSineMaterial.SHADERDEFINE_TILINGOFFSET2=0;\n\t__static(UVSineMaterial,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(BaseMaterial.shaderDefines);}\n\t]);\n\treturn UVSineMaterial;\n})(BaseMaterial)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.water.WaterDetailMaterial extends laya.d3.core.material.BaseMaterial\nvar WaterDetailMaterial=(function(_super){\n\tfunction WaterDetailMaterial(){\n\t\tthis._startTm=0;\n\t\tWaterDetailMaterial.__super.call(this);\n\t\tlaya.d3.water.WaterDetailMaterial.init();\n\t\tthis.setShaderName('WaterDetail');\n\t\tthis.cull=0;\n\t\tthis._startTm=Laya.timer.currTimer;\n\t}\n\n\t__class(WaterDetailMaterial,'laya.d3.water.WaterDetailMaterial',_super);\n\tvar __proto=WaterDetailMaterial.prototype;\n\t__getset(0,__proto,'currentTm',function(){\n\t\treturn this._getNumber(1);\n\t\t},function(v){\n\t\tthis._setNumber(1,v-this._startTm);\n\t});\n\n\t__getset(0,__proto,'waveInfo',function(){\n\t\treturn this._getBuffer(12);\n\t\t},function(v){\n\t\tthis._setBuffer(12,v);\n\t});\n\n\t__getset(0,__proto,'waveInfoD',function(){\n\t\treturn this._getBuffer(13);\n\t\t},function(v){\n\t\tthis._setBuffer(13,v);\n\t});\n\n\t__getset(0,__proto,'texWaveUVScale',function(){\n\t\treturn this._getNumber(15);\n\t\t},function(v){\n\t\tthis._setNumber(15,v);\n\t});\n\n\tWaterDetailMaterial.init=function(){\n\t\tif (laya.d3.water.WaterDetailMaterial._bInited)\n\t\t\treturn;\n\t\tlaya.d3.water.WaterDetailMaterial._bInited=true;\n\t\tvar attributeMap={\n\t\t\t'a_position':/*laya.d3.graphics.VertexElementUsage.POSITION0*/0,\n\t\t\t'a_normal':/*laya.d3.graphics.VertexElementUsage.NORMAL0*/3,\n\t\t\t'uv':/*laya.d3.graphics.VertexElementUsage.TEXTURECOORDINATE0*/2\n\t\t};\n\t\tvar uniformMap={\n\t\t\t'u_curTm':[1,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WaveInfo':[12,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'u_WaveInfoD':[13,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1],\n\t\t\t'TEXWAVE_UV_SCALE':[15,/*laya.d3.shader.Shader3D.PERIOD_MATERIAL*/1]\n\t\t};\n\t\tvar WaterDetail=Shader3D.nameKey.add(\"WaterDetail\");\n\t\tvar vs=\"\\nattribute vec3 a_position;\\nattribute vec3 a_normal;\\nattribute vec2 uv;\\n\\nvarying vec2 vUv;\\nvarying vec3 vWorldNorm;\\nvarying vec3 vWorldTangent;\\nvarying vec3 vWorldBinormal;\\n\\n\\nvoid main() {\\n\tvec3 pos = a_position;\\n\tif(pos.z!=0.)pos.y=pos.z;\\n\tpos.z=0.5;\\n\tgl_Position = vec4(pos,1.);\\n    vUv = uv;\\n\t//vWorldNorm = normalize((modelMat*vec4(a_normal,0.0)).xyz);\\n\t//vWorldTangent = normalize((modelMat*vec4(tangent,0.0)).xyz);\\n\t//vWorldBinormal = normalize((modelMat*vec4(binormal,0.0)).xyz);\\n}\\n\";\n\t\tvar ps=\"precision highp float;\\nprecision lowp int;\\n\\nconst float PI = 3.14159265358979323846264;\\nconst float _2PI = 6.2831853071796;\\nvarying vec2 vUv;\\nvarying vec3 vWorldNorm;\\nvarying vec3 vWorldTangent;\\nvarying vec3 vWorldBinormal;\\n\\nuniform float u_curTm;\\n\\n#include \\\"WaveFunction.glsl\\\"\\n\\nvoid main() {\\n\tvec3 wave_N,wave_B,wave_T;\\n\tcalcWave(u_curTm, vUv,wave_B,wave_T,wave_N);\\n\tgl_FragColor.rgb = normalize(wave_N)*0.5+vec3(0.5);// vec3(0.1,.4,0.1);\\n    gl_FragColor.a = 1.0;\\n}\\n\";\n\t\tvar shaderCompile=ShaderCompile3D.add(WaterDetail,vs,ps,attributeMap,uniformMap);\n\t}\n\n\tWaterDetailMaterial.CURTM=1;\n\tWaterDetailMaterial.WAVEINFO=12;\n\tWaterDetailMaterial.WAVEINFOD=13;\n\tWaterDetailMaterial.WAVEMAINDIR=14;\n\tWaterDetailMaterial.TEXWAVE_UV_SCALE=15;\n\tWaterDetailMaterial._bInited=false;\n\treturn WaterDetailMaterial;\n})(BaseMaterial)\n\n\n/**\n*<code>RigidAnimations</code> 类用于创建变换动画组件。\n*/\n//class laya.d3.component.animation.RigidAnimations extends laya.d3.component.animation.KeyframeAnimations\nvar RigidAnimations=(function(_super){\n\tfunction RigidAnimations(){\n\t\t/**@private */\n\t\tthis._animationSprites=null;\n\t\t/**@private */\n\t\tthis._animationSpritesInitLocalMatrix=null;\n\t\t/**@private */\n\t\tthis._tempCurAnimationData=null;\n\t\t/**@private */\n\t\tthis._curOriginalData=null;\n\t\t/**@private */\n\t\tthis._lastFrameIndex=-1;\n\t\t/**@private */\n\t\tthis._curAnimationDatas=null;\n\t\tRigidAnimations.__super.call(this);\n\t\tthis._animationSprites=[];\n\t\tthis._animationSpritesInitLocalMatrix=[];\n\t}\n\n\t__class(RigidAnimations,'laya.d3.component.animation.RigidAnimations',_super);\n\tvar __proto=RigidAnimations.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._init=function(){\n\t\tvar nodes=this._templet.getNodes(this.currentAnimationClipIndex);\n\t\tvar curParentSprite=this._owner;\n\t\tvar nodeLength=nodes.length;\n\t\tvar pathStart=0;\n\t\tvar extentDatas=new Uint16Array(this._templet.getPublicExtData());\n\t\tfor (var i=0;i < nodeLength;i++){\n\t\t\tvar hierarchys=extentDatas.slice(pathStart+1,pathStart+1+extentDatas[pathStart]);\n\t\t\tpathStart+=(extentDatas[pathStart]+1);\n\t\t\tfor (var j=1;j < hierarchys.length;j++){\n\t\t\t\tvar childIndex=hierarchys[j];\n\t\t\t\tcurParentSprite=curParentSprite._childs[hierarchys[j]];\n\t\t\t};\n\t\t\tvar curSprite=curParentSprite.getChildByName(nodes[i].name);\n\t\t\tif (!curSprite)\n\t\t\t\tbreak ;\n\t\t\tthis._animationSprites[i]=curSprite;\n\t\t\tvar localMatrix=this._animationSpritesInitLocalMatrix[i];\n\t\t\t(localMatrix)|| (localMatrix=this._animationSpritesInitLocalMatrix[i]=new Matrix4x4());\n\t\t\tcurSprite.transform.localMatrix.cloneTo(localMatrix);\n\t\t\tcurParentSprite=this._owner;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._animtionPlay=function(){\n\t\tif (this._templet.loaded)\n\t\t\tthis._init();\n\t\telse\n\t\tthis._templet.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._init);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._animtionStop=function(){\n\t\tthis._lastFrameIndex=-1;\n\t\tif (this._player.returnToZeroStopped){\n\t\t\tthis._curAnimationDatas=null;\n\t\t\tfor (var i=0;i < this._animationSprites.length;i++)\n\t\t\tthis._animationSprites[i].transform.localMatrix=this._animationSpritesInitLocalMatrix[i];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*摄像机动画作用函数。\n\t*/\n\t__proto._effectAnimation=function(nodes){\n\t\tfor (var nodeIndex=0,nodeLength=this._animationSprites.length;nodeIndex < nodeLength;nodeIndex++){\n\t\t\tvar sprite=this._animationSprites[nodeIndex];\n\t\t\tvar matrix=sprite.transform.localMatrix;\n\t\t\tvar matrixE=matrix.elements;\n\t\t\tfor (var i=0;i < 16;i++)\n\t\t\tmatrixE[i]=this._curAnimationDatas[nodeIndex *16+i];\n\t\t\tsprite.transform.localMatrix=matrix;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*初始化载入摄像机动画组件。\n\t*@param owner 所属精灵对象。\n\t*/\n\t__proto._load=function(owner){\n\t\t_super.prototype._load.call(this,owner);\n\t\tthis._player.on(/*laya.events.Event.STOPPED*/\"stopped\",this,this._animtionStop);\n\t\tthis._player.on(/*laya.events.Event.PLAYED*/\"played\",this,this._animtionPlay);\n\t}\n\n\t/**\n\t*@private\n\t*更新摄像机动画组件。\n\t*@param state 渲染状态。\n\t*/\n\t__proto._update=function(state){\n\t\tif (this._player.state!==/*laya.ani.AnimationState.playing*/2 || !this._templet || !this._templet.loaded)\n\t\t\treturn;\n\t\tvar rate=this._player.playbackRate *Laya.timer.scale;\n\t\tvar cachePlayRate=this._player.cachePlayRate;\n\t\tvar isCache=this._player.isCache && rate >=cachePlayRate;\n\t\tvar frameIndex=isCache ? this.currentFrameIndex :-1;\n\t\tif (frameIndex!==-1 && this._lastFrameIndex===frameIndex)\n\t\t\treturn;\n\t\tvar animationClipIndex=this.currentAnimationClipIndex;\n\t\tvar nodes=this._templet.getNodes(animationClipIndex);\n\t\tvar animationDatasCache=this._templet._animationDatasCache;\n\t\tif (isCache){\n\t\t\tvar cacheData=this._templet.getAnimationDataWithCache(cachePlayRate,animationDatasCache,animationClipIndex,frameIndex);\n\t\t\tif (cacheData){\n\t\t\t\tthis._curAnimationDatas=cacheData;\n\t\t\t\tthis._lastFrameIndex=frameIndex;\n\t\t\t\tthis._effectAnimation(nodes);\n\t\t\t\treturn;\n\t\t\t}\n\t\t};\n\t\tvar nodeFloatCount=nodes.length *16;\n\t\tif (isCache){\n\t\t\tthis._curAnimationDatas=new Float32Array(nodeFloatCount);\n\t\t\t}else{\n\t\t\t(this._tempCurAnimationData)|| (this._tempCurAnimationData=new Float32Array(nodeFloatCount));\n\t\t\tthis._curAnimationDatas=this._tempCurAnimationData;\n\t\t}\n\t\tthis._curOriginalData || (this._curOriginalData=new Float32Array(this._templet.getTotalkeyframesLength(animationClipIndex)));\n\t\tif (isCache)\n\t\t\tthis._templet.getOriginalData(animationClipIndex,this._curOriginalData,this._player._fullFrames[animationClipIndex],frameIndex,this._player.currentFrameTime);\n\t\telse\n\t\tthis._templet.getOriginalDataUnfixedRate(animationClipIndex,this._curOriginalData,this._player.currentPlayTime);\n\t\tUtils3D._computeRootAnimationData(nodes,this._curOriginalData,this._curAnimationDatas);\n\t\tif (isCache){\n\t\t\tthis._templet.setAnimationDataWithCache(cachePlayRate,animationDatasCache,animationClipIndex,frameIndex,this._curAnimationDatas);\n\t\t}\n\t\tthis._lastFrameIndex=frameIndex;\n\t\tthis._effectAnimation(nodes);\n\t}\n\n\t/**\n\t*@private\n\t*卸载组件时执行。\n\t*/\n\t__proto._unload=function(owner){\n\t\t_super.prototype._unload.call(this,owner);\n\t\tthis._animationSprites=null;\n\t\tthis._animationSpritesInitLocalMatrix=null;\n\t\tthis._tempCurAnimationData=null;\n\t\tthis._curOriginalData=null;\n\t\tthis._curAnimationDatas=null;\n\t}\n\n\t/**\n\t*设置url地址。\n\t*@param value 地址。\n\t*/\n\t__getset(0,__proto,'url',null,function(value){\n\t\tconsole.log(\"Warning: discard property,please use templet property instead.\");\n\t\tvar templet=Laya.loader.create(value,null,null,AnimationTemplet);\n\t\tif (this._templet!==templet){\n\t\t\tif (this._player.state!==/*laya.ani.AnimationState.stopped*/0)\n\t\t\t\tthis._player.stop(true);\n\t\t\tthis._templet=templet;\n\t\t\tthis._player.templet=templet;\n\t\t\tthis._curOriginalData=null;\n\t\t\tthis._curAnimationDatas=null;\n\t\t\tthis._tempCurAnimationData=null;\n\t\t\t(this._templet._animationDatasCache)|| (this._templet._animationDatasCache=[]);\n\t\t\tthis.event(/*laya.events.Event.ANIMATION_CHANGED*/\"animationchanged\",this);\n\t\t}\n\t});\n\n\t__getset(0,__proto,'templet',_super.prototype._$get_templet,function(value){\n\t\tif (this._templet!==value){\n\t\t\tif (this._player.state!==/*laya.ani.AnimationState.stopped*/0)\n\t\t\t\tthis._player.stop(true);\n\t\t\tthis._templet=value;\n\t\t\tthis._player.templet=value;\n\t\t\tthis._curOriginalData=null;\n\t\t\tthis._curAnimationDatas=null;\n\t\t\tthis._tempCurAnimationData=null;\n\t\t\t(this._templet._animationDatasCache)|| (this._templet._animationDatasCache=[]);\n\t\t\tthis.event(/*laya.events.Event.ANIMATION_CHANGED*/\"animationchanged\",this);\n\t\t}\n\t});\n\n\treturn RigidAnimations;\n})(KeyframeAnimations)\n\n\n/**\n*<code>SkinAnimations</code> 类用于创建蒙皮动画组件。\n*/\n//class laya.d3.component.animation.SkinAnimations extends laya.d3.component.animation.KeyframeAnimations\nvar SkinAnimations=(function(_super){\n\tfunction SkinAnimations(){\n\t\t/**@private */\n\t\tthis._tempCurAnimationData=null;\n\t\t/**@private */\n\t\tthis._tempCurBonesData=null;\n\t\t/**@private */\n\t\tthis._curOriginalData=null;\n\t\t/**@private */\n\t\tthis._lastFrameIndex=-1;\n\t\t/**@private */\n\t\tthis._curMeshAnimationData=null;\n\t\t/**@private */\n\t\tthis._curBonesDatas=null;\n\t\t/**@private */\n\t\tthis._curAnimationDatas=null;\n\t\t/**@private */\n\t\tthis._ownerMesh=null;\n\t\t/**@private */\n\t\tthis._boneIndexToMeshList=null;\n\t\t/**@private */\n\t\tthis._oldVersion=false;\n\t\tSkinAnimations.__super.call(this);\n\t\tthis._boneIndexToMeshList=[];\n\t}\n\n\t__class(SkinAnimations,'laya.d3.component.animation.SkinAnimations',_super);\n\tvar __proto=SkinAnimations.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._computeBoneIndexToMeshOnTemplet=function(){\n\t\tif (this._templet.loaded)\n\t\t\tthis._computeBoneIndexToMeshOnMesh();\n\t\telse\n\t\tthis._templet.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._computeBoneIndexToMeshOnMesh);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._computeBoneIndexToMeshOnMesh=function(){\n\t\tif (this._templet._aniVersion===\"LAYAANIMATION:02\")\n\t\t\tthis._oldVersion=false;\n\t\telse\n\t\tthis._oldVersion=true;\n\t\tvar mesh=(this._owner).meshFilter.sharedMesh;\n\t\tif (mesh.loaded)\n\t\t\tthis._computeBoneIndexToMesh(mesh);\n\t\telse\n\t\tmesh.on(/*laya.events.Event.LOADED*/\"loaded\",this,this._computeBoneIndexToMesh);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._computeBoneIndexToMesh=function(mesh){\n\t\tvar meshBoneNames=mesh._boneNames;\n\t\tif (meshBoneNames){\n\t\t\tvar binPoseCount=meshBoneNames.length;\n\t\t\tvar anis=this._templet._anis;\n\t\t\tfor (var i=0,n=anis.length;i < n;i++){\n\t\t\t\tvar boneIndexToMesh=this._boneIndexToMeshList[i];\n\t\t\t\t(boneIndexToMesh)|| (boneIndexToMesh=this._boneIndexToMeshList[i]=[]);\n\t\t\t\tboneIndexToMesh.length=binPoseCount;\n\t\t\t\tvar ani=anis[i];\n\t\t\t\tfor (var j=0;j < binPoseCount;j++)\n\t\t\t\tboneIndexToMesh[j]=ani.bone3DMap[meshBoneNames[j]];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._getAnimationDatasWithCache=function(rate,mesh,cacheDatas,aniIndex,frameIndex){\n\t\tvar aniDatas=cacheDatas[aniIndex];\n\t\tif (!aniDatas){\n\t\t\treturn null;\n\t\t\t}else {\n\t\t\tvar rateDatas=aniDatas[rate];\n\t\t\tif (!rateDatas)\n\t\t\t\treturn null;\n\t\t\telse {\n\t\t\t\tvar meshDatas=rateDatas[mesh.id];\n\t\t\t\tif (!meshDatas)\n\t\t\t\t\treturn null;\n\t\t\t\telse\n\t\t\t\treturn meshDatas[frameIndex];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._setAnimationDatasWithCache=function(rate,mesh,cacheDatas,aniIndex,frameIndex,animationDatas){\n\t\tvar aniDatas=(cacheDatas[aniIndex])|| (cacheDatas[aniIndex]={});\n\t\tvar rateDatas=(aniDatas[rate])|| (aniDatas[rate]={});\n\t\tvar meshDatas=(rateDatas[mesh.id])|| (rateDatas[mesh.id]=[]);\n\t\tmeshDatas[frameIndex]=animationDatas;\n\t}\n\n\t/**@private */\n\t__proto._onAnimationPlayMeshLoaded=function(){\n\t\tvar renderElements=this._ownerMesh.meshRender._renderElements;\n\t\tfor (var i=0,n=renderElements.length;i < n;i++)\n\t\trenderElements[i]._canDynamicBatch=false;\n\t}\n\n\t/**@private */\n\t__proto._onAnimationPlay=function(){\n\t\tthis._ownerMesh._render._addShaderDefine(SkinnedMeshSprite3D.SHADERDEFINE_BONE);\n\t\tvar mesh=this._ownerMesh.meshFilter.sharedMesh;\n\t\tif (mesh.loaded)\n\t\t\tthis._onAnimationPlayMeshLoaded();\n\t\telse\n\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._onAnimationPlayMeshLoaded);\n\t}\n\n\t/**@private */\n\t__proto._onAnimationStop=function(){\n\t\tthis._lastFrameIndex=-1;\n\t\tif (this._player.returnToZeroStopped){\n\t\t\tthis._curBonesDatas=null;\n\t\t\tthis._curAnimationDatas=null;\n\t\t\tthis._ownerMesh._render._removeShaderDefine(SkinnedMeshSprite3D.SHADERDEFINE_BONE);\n\t\t};\n\t\tvar renderElements=this._ownerMesh.meshRender._renderElements;\n\t\tfor (var i=0,n=renderElements.length;i < n;i++)\n\t\trenderElements[i]._canDynamicBatch=true;\n\t}\n\n\t/**\n\t*@private\n\t*初始化载入蒙皮动画组件。\n\t*@param owner 所属精灵对象。\n\t*/\n\t__proto._load=function(owner){\n\t\t_super.prototype._load.call(this,owner);\n\t\tthis._ownerMesh=(owner);\n\t\tthis._player.on(/*laya.events.Event.PLAYED*/\"played\",this,this._onAnimationPlay);\n\t\tthis._player.on(/*laya.events.Event.STOPPED*/\"stopped\",this,this._onAnimationStop);\n\t\t(this._owner).meshFilter.on(/*laya.events.Event.MESH_CHANGED*/\"meshchanged\",this,this._computeBoneIndexToMeshOnTemplet);\n\t}\n\n\t/**\n\t*@private\n\t*更新蒙皮动画组件。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._update=function(state){\n\t\tvar mesh=this._ownerMesh.meshFilter.sharedMesh;\n\t\tif (this._player.state!==/*laya.ani.AnimationState.playing*/2 || !this._templet || !this._templet.loaded || !mesh.loaded)\n\t\t\treturn;\n\t\tvar rate=this._player.playbackRate *Laya.timer.scale;\n\t\tvar cachePlayRate=this._player.cachePlayRate;\n\t\tvar isCache=this._player.isCache && rate >=cachePlayRate;\n\t\tvar frameIndex=isCache ? this.currentFrameIndex :-1;\n\t\tif (frameIndex!==-1 && this._lastFrameIndex===frameIndex)\n\t\t\treturn;\n\t\tvar animationClipIndex=this.currentAnimationClipIndex;\n\t\tvar boneDatasCache=this._templet._animationDatasCache[0];\n\t\tvar animationDatasCache=this._templet._animationDatasCache[1];\n\t\tif (isCache){\n\t\t\tvar cacheAnimationDatas=this._getAnimationDatasWithCache(cachePlayRate,mesh,animationDatasCache,animationClipIndex,frameIndex);\n\t\t\tif (cacheAnimationDatas){\n\t\t\t\tthis._curAnimationDatas=cacheAnimationDatas;\n\t\t\t\tthis._curBonesDatas=this._templet.getAnimationDataWithCache(cachePlayRate,boneDatasCache,animationClipIndex,frameIndex);\n\t\t\t\tthis._lastFrameIndex=frameIndex;\n\t\t\t\treturn;\n\t\t\t}\n\t\t};\n\t\tvar isCacheBonesDatas=false;\n\t\tif (isCache){\n\t\t\tthis._curBonesDatas=this._templet.getAnimationDataWithCache(cachePlayRate,boneDatasCache,animationClipIndex,frameIndex);\n\t\t\tisCacheBonesDatas=this._curBonesDatas ? true :false;\n\t\t};\n\t\tvar bones=this._templet.getNodes(animationClipIndex);\n\t\tvar boneFloatCount=bones.length *16;\n\t\tvar inverseAbsoluteBindPoses=mesh.InverseAbsoluteBindPoses;\n\t\tif (this._oldVersion)\n\t\t\t(this._curMeshAnimationData)|| (this._curMeshAnimationData=new Float32Array(boneFloatCount));\n\t\telse\n\t\t(this._curMeshAnimationData)|| (this._curMeshAnimationData=new Float32Array(inverseAbsoluteBindPoses.length *16));\n\t\tvar i=0,n=0,j=0;\n\t\tvar curSubAnimationDatas,subMesh,boneIndicesCount=0;\n\t\tvar subMeshCount=mesh.getSubMeshCount();\n\t\tif (isCache){\n\t\t\tthis._curAnimationDatas=[];\n\t\t\tthis._curAnimationDatas.length=subMeshCount;\n\t\t\tfor (i=0;i < subMeshCount;i++){\n\t\t\t\tcurSubAnimationDatas=this._curAnimationDatas[i]=[];\n\t\t\t\tsubMesh=mesh.getSubMesh(i);\n\t\t\t\tboneIndicesCount=subMesh._boneIndicesList.length;\n\t\t\t\tcurSubAnimationDatas.length=boneIndicesCount;\n\t\t\t\tfor (j=0;j < boneIndicesCount;j++)\n\t\t\t\tcurSubAnimationDatas[j]=new Float32Array(subMesh._boneIndicesList[j].length *16);\n\t\t\t}\n\t\t\t(isCacheBonesDatas)|| (this._curBonesDatas=new Float32Array(boneFloatCount));\n\t\t\t}else {\n\t\t\tif (!this._tempCurAnimationData){\n\t\t\t\tthis._tempCurAnimationData=[];\n\t\t\t\tthis._tempCurAnimationData.length=subMeshCount;\n\t\t\t\tfor (i=0;i < subMeshCount;i++){\n\t\t\t\t\tcurSubAnimationDatas=this._tempCurAnimationData[i]=[];\n\t\t\t\t\tsubMesh=mesh.getSubMesh(i);\n\t\t\t\t\tboneIndicesCount=subMesh._boneIndicesList.length;\n\t\t\t\t\tcurSubAnimationDatas.length=boneIndicesCount;\n\t\t\t\t\tfor (j=0;j < boneIndicesCount;j++)\n\t\t\t\t\tcurSubAnimationDatas[j]=new Float32Array(subMesh._boneIndicesList[j].length *16);\n\t\t\t\t}\n\t\t\t}\n\t\t\t(this._tempCurBonesData)|| (this._tempCurBonesData=new Float32Array(boneFloatCount));\n\t\t\tthis._curAnimationDatas=this._tempCurAnimationData;\n\t\t\tthis._curBonesDatas=this._tempCurBonesData;\n\t\t}\n\t\tthis._curOriginalData || (this._curOriginalData=new Float32Array(this._templet.getTotalkeyframesLength(animationClipIndex)));\n\t\tif (isCache)\n\t\t\tthis._templet.getOriginalData(animationClipIndex,this._curOriginalData,this._player._fullFrames[animationClipIndex],frameIndex,this._player.currentFrameTime);\n\t\telse\n\t\tthis._templet.getOriginalDataUnfixedRate(animationClipIndex,this._curOriginalData,this._player.currentPlayTime);\n\t\tif (this._oldVersion){\n\t\t\tif (isCache && isCacheBonesDatas)\n\t\t\t\tUtils3D._computeAnimationDatasByArrayAndMatrixFastOld(inverseAbsoluteBindPoses,this._curBonesDatas,this._curMeshAnimationData);\n\t\t\telse\n\t\t\tUtils3D._computeBoneAndAnimationDatasByBindPoseMatrxixOld(bones,this._curOriginalData,inverseAbsoluteBindPoses,this._curBonesDatas,this._curMeshAnimationData);\n\t\t\t}else {\n\t\t\tvar boneIndexToMesh=this._boneIndexToMeshList[animationClipIndex];\n\t\t\tif (isCache && isCacheBonesDatas)\n\t\t\t\tUtils3D._computeAnimationDatasByArrayAndMatrixFast(inverseAbsoluteBindPoses,this._curBonesDatas,this._curMeshAnimationData,boneIndexToMesh);\n\t\t\telse\n\t\t\tUtils3D._computeBoneAndAnimationDatasByBindPoseMatrxix(bones,this._curOriginalData,inverseAbsoluteBindPoses,this._curBonesDatas,this._curMeshAnimationData,boneIndexToMesh);\n\t\t}\n\t\tfor (i=0;i < subMeshCount;i++){\n\t\t\tvar boneIndicesList=mesh.getSubMesh(i)._boneIndicesList;\n\t\t\tboneIndicesCount=boneIndicesList.length;\n\t\t\tcurSubAnimationDatas=this._curAnimationDatas[i]\n\t\t\tfor (j=0;j < boneIndicesCount;j++)\n\t\t\tSkinAnimations._splitAnimationDatas(boneIndicesList[j],this._curMeshAnimationData,curSubAnimationDatas[j]);\n\t\t}\n\t\tif (isCache){\n\t\t\tthis._setAnimationDatasWithCache(cachePlayRate,mesh,animationDatasCache,animationClipIndex,frameIndex,this._curAnimationDatas);\n\t\t\t(isCacheBonesDatas)|| (this._templet.setAnimationDataWithCache(cachePlayRate,boneDatasCache,animationClipIndex,frameIndex,this._curBonesDatas));\n\t\t}\n\t\tthis._lastFrameIndex=frameIndex;\n\t}\n\n\t/**\n\t*@private\n\t*在渲染前更新蒙皮动画组件渲染参数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._preRenderUpdate=function(state){\n\t\tvar subMesh=state.renderElement.renderObj;\n\t\tif (this._curAnimationDatas)\n\t\t\tsubMesh._skinAnimationDatas=this._curAnimationDatas[subMesh._indexInMesh];\n\t\telse\n\t\tsubMesh._skinAnimationDatas=null;\n\t}\n\n\t/**\n\t*@private\n\t*卸载组件时执行\n\t*/\n\t__proto._unload=function(owner){\n\t\t(this.player.state==/*laya.ani.AnimationState.playing*/2)&& (this._ownerMesh._render._removeShaderDefine(SkinnedMeshSprite3D.SHADERDEFINE_BONE));\n\t\t(this._templet && !this._templet.loaded)&& (this._templet.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._computeBoneIndexToMeshOnMesh));\n\t\tvar mesh=this._ownerMesh.meshFilter.sharedMesh;\n\t\t(mesh.loaded)|| (mesh.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._onAnimationPlayMeshLoaded));\n\t\t_super.prototype._unload.call(this,owner);\n\t\tthis._tempCurAnimationData=null;\n\t\tthis._tempCurBonesData=null;\n\t\tthis._curOriginalData=null;\n\t\tthis._curMeshAnimationData=null;\n\t\tthis._curBonesDatas=null;\n\t\tthis._curAnimationDatas=null;\n\t\tthis._ownerMesh=null;\n\t}\n\n\t/**\n\t*获取骨骼数据。\n\t*@return 骨骼数据。\n\t*/\n\t__getset(0,__proto,'curBonesDatas',function(){\n\t\treturn this._curBonesDatas;\n\t});\n\n\t__getset(0,__proto,'templet',_super.prototype._$get_templet,function(value){\n\t\tif (this._templet!==value){\n\t\t\tif (this._player.state!==/*laya.ani.AnimationState.stopped*/0)\n\t\t\t\tthis._player.stop(true);\n\t\t\tthis._templet=value;\n\t\t\tthis._player.templet=value;\n\t\t\tthis._computeBoneIndexToMeshOnTemplet();\n\t\t\tthis._curOriginalData=null;\n\t\t\tthis._curMeshAnimationData=null;\n\t\t\tthis._tempCurBonesData=null;\n\t\t\tthis._tempCurAnimationData=null;\n\t\t\t(this._templet._animationDatasCache)|| (this._templet._animationDatasCache=[[],[]]);\n\t\t\tthis.event(/*laya.events.Event.ANIMATION_CHANGED*/\"animationchanged\",this);\n\t\t}\n\t});\n\n\tSkinAnimations._splitAnimationDatas=function(indices,bonesData,subAnimationDatas){\n\t\tfor (var i=0,n=indices.length,ii=0;i < n;i++){\n\t\t\tfor (var j=0;j < 16;j++,ii++){\n\t\t\t\tsubAnimationDatas[ii]=bonesData[(indices[i] << 4)+j];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn SkinAnimations;\n})(KeyframeAnimations)\n\n\n/**\n*<code>BoxCollider</code> 类用于创建盒子碰撞器。\n*/\n//class laya.d3.component.physics.BoxCollider extends laya.d3.component.physics.Collider\nvar BoxCollider=(function(_super){\n\tfunction BoxCollider(){\n\t\t/**@private */\n\t\tthis._size=null;\n\t\t/**@private */\n\t\tthis._transformOrientedBoundBox=null;\n\t\t/**中心点 */\n\t\tthis.center=null;\n\t\tBoxCollider.__super.call(this);\n\t\tthis._needUpdate=false;\n\t}\n\n\t__class(BoxCollider,'laya.d3.component.physics.BoxCollider',_super);\n\tvar __proto=BoxCollider.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._updateCollider=function(){\n\t\tif (this._needUpdate){\n\t\t\tvar obbMat=this._transformOrientedBoundBox.transformation;\n\t\t\tvar transform=(this._owner).transform;\n\t\t\tvar rotation=transform.rotation;\n\t\t\tvar scale=transform.scale;\n\t\t\tvar centerE=this.center.elements;\n\t\t\tif (centerE[0]===0.0 && centerE[1]===0.0 && centerE[2]===0.0){\n\t\t\t\tMatrix4x4.createAffineTransformation(transform.position,rotation,Vector3.ONE,obbMat);\n\t\t\t\t}else {\n\t\t\t\tVector3.multiply(this.center,scale,BoxCollider._deviationV3);\n\t\t\t\tVector3.transformQuat(BoxCollider._deviationV3,rotation,BoxCollider._deviationV3);\n\t\t\t\tVector3.add(transform.position,BoxCollider._deviationV3,BoxCollider._deviationV3);\n\t\t\t\tMatrix4x4.createAffineTransformation(BoxCollider._deviationV3,rotation,Vector3.ONE,obbMat);\n\t\t\t}\n\t\t\tthis._transformOrientedBoundBox.transformation=obbMat;\n\t\t\tvar extentsE=this._transformOrientedBoundBox.extents.elements;\n\t\t\tvar sizeE=this._size.elements;\n\t\t\tvar scaleE=scale.elements;\n\t\t\textentsE[0]=sizeE[0] *0.5 *scaleE[0];\n\t\t\textentsE[1]=sizeE[1] *0.5 *scaleE[1];\n\t\t\textentsE[2]=sizeE[2] *0.5 *scaleE[2];\n\t\t\tthis._needUpdate=false;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldMatrixChanged=function(){\n\t\tthis._needUpdate=true;\n\t\tfor (var k in this._runtimeCollisonMap){\n\t\t\tthis._runtimeCollisonTestMap[k]=true;\n\t\t\tthis._runtimeCollisonMap[k]._runtimeCollisonTestMap[this.id]=true;\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._initialize=function(owner){\n\t\tlaya.d3.component.Component3D.prototype._initialize.call(this,owner);\n\t\tthis._transformOrientedBoundBox=new OrientedBoundBox(new Vector3(),new Matrix4x4());\n\t\tthis._size=new Vector3();\n\t\tthis.center=new Vector3();\n\t\t(owner).transform.on(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatrixChanged);\n\t\tthis._needUpdate=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getType=function(){\n\t\treturn 1;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._collisonTo=function(other){\n\t\tswitch (other._getType()){\n\t\t\tcase 0:\n\t\t\t\treturn this.boundBox.containsSphere((other).boundSphere)!==/*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\treturn this.boundBox.containsOrientedBoundBox((other).boundBox)!==/*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\t\tbreak ;\n\t\t\tcase 2:;\n\t\t\t\tvar meshCollider=other;\n\t\t\t\tif (this.boundBox.containsBoundBox(meshCollider._boundBox)!==/*laya.d3.math.ContainmentType.Disjoint*/0){\n\t\t\t\t\tvar positions=(other).mesh._positions;\n\t\t\t\t\tfor (var i=0,n=positions.length;i < n;i++){\n\t\t\t\t\t\tif (this.boundBox.containsPoint(positions[i])===/*laya.d3.math.ContainmentType.Contains*/1)\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"BoxCollider:unknown collider type.\");\n\t\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._cloneTo=function(dest){\n\t\tvar destBoxCollider=dest;\n\t\tvar destSize=destBoxCollider.size;\n\t\tthis.size.cloneTo(destSize);\n\t\tdestBoxCollider.size=destSize;\n\t\tthis.center.cloneTo(destBoxCollider.center);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.raycast=function(ray,hitInfo,maxDistance){\n\t\t(maxDistance===void 0)&& (maxDistance=1.79e+308);\n\t\tthis._updateCollider();\n\t\tvar distance=this._transformOrientedBoundBox.intersectsRay(ray,hitInfo.position);\n\t\tif (distance!==-1 && distance <=maxDistance){\n\t\t\thitInfo.distance=distance;\n\t\t\thitInfo.sprite3D=this._owner;\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\thitInfo.distance=-1;\n\t\t\thitInfo.sprite3D=null;\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*从AABB碰撞盒设置center和Size。\n\t*@param boundBox 碰撞盒。\n\t*/\n\t__proto.setFromBoundBox=function(boundBox){\n\t\tOrientedBoundBox.createByBoundBox(boundBox,this._transformOrientedBoundBox);\n\t\tvar extents=this._transformOrientedBoundBox.extents;\n\t\tthis._size=new Vector3(extents.x *2,extents.y *2,extents.z *2);\n\t\tthis.center=new Vector3();\n\t\tVector3.add(boundBox.min,boundBox.max,this.center);\n\t\tVector3.scale(this.center,0.5,this.center);\n\t\tthis._needUpdate=true;\n\t}\n\n\t/**\n\t*获取包围盒子,只读,不允许修改。\n\t*@return 包围球。\n\t*/\n\t__getset(0,__proto,'boundBox',function(){\n\t\tthis._updateCollider();\n\t\treturn this._transformOrientedBoundBox;\n\t});\n\n\t/**\n\t*设置盒子碰撞器长宽高的一半。\n\t*@param 长宽高的一半。\n\t*/\n\t/**\n\t*获取盒子碰撞器长宽高的一半。\n\t*@return 长宽高的一半。\n\t*/\n\t__getset(0,__proto,'size',function(){\n\t\treturn this._size;\n\t\t},function(value){\n\t\tthis._size=value;\n\t\tthis._needUpdate=true;\n\t});\n\n\t__static(BoxCollider,\n\t['_deviationV3',function(){return this._deviationV3=new Vector3();},'_obbCenterV3',function(){return this._obbCenterV3=new Vector3();}\n\t]);\n\treturn BoxCollider;\n})(Collider)\n\n\n/**\n*<code>MeshCollider</code> 类用于创建网格碰撞器。\n*/\n//class laya.d3.component.physics.MeshCollider extends laya.d3.component.physics.Collider\nvar MeshCollider=(function(_super){\n\tfunction MeshCollider(){\n\t\t/**@private */\n\t\tthis._transformBoundingBox=null;\n\t\t/**@private */\n\t\tthis._mesh=null;\n\t\tMeshCollider.__super.call(this);\n\t\tthis._transformBoundingBox=new BoundBox(new Vector3(),new Vector3());\n\t\tthis._needUpdate=false;\n\t}\n\n\t__class(MeshCollider,'laya.d3.component.physics.MeshCollider',_super);\n\tvar __proto=MeshCollider.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._updateBoundBoxCollider=function(){\n\t\tif (this._needUpdate){\n\t\t\tvar worldMat=(this._owner).transform.worldMatrix;\n\t\t\tvar corners=this._mesh.boundingBoxCorners;\n\t\t\tfor (var i=0;i < 8;i++)\n\t\t\tVector3.transformCoordinate(corners[i],worldMat,MeshCollider._tempBoundBoxCorners[i]);\n\t\t\tBoundBox.createfromPoints(MeshCollider._tempBoundBoxCorners,this._transformBoundingBox);\n\t\t\tthis._needUpdate=false;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._raycastMesh=function(ray,sprite3D,outHitInfo,maxDistance){\n\t\t(maxDistance===void 0)&& (maxDistance=1.79e+308);\n\t\tvar worldMatrix=sprite3D.transform.worldMatrix;\n\t\tvar invertWorldMatrix=MeshCollider._tempMatrix4x40;\n\t\tworldMatrix.invert(invertWorldMatrix);\n\t\tvar rayOrigin=ray.origin;\n\t\tvar rayDirection=ray.direction;\n\t\tvar transformRay=MeshCollider._tempRay0;\n\t\tVector3.transformCoordinate(rayOrigin,invertWorldMatrix,transformRay.origin);\n\t\tVector3.TransformNormal(rayDirection,invertWorldMatrix,transformRay.direction);\n\t\tvar curMinDistance=Number.MAX_VALUE;\n\t\tfor (var i=0,n=this._mesh.getRenderElementsCount();i < n;i++){\n\t\t\tvar renderObj=this._mesh.getRenderElement(i);\n\t\t\tvar vertexBuffer=renderObj._getVertexBuffer(0);\n\t\t\tvar vertexDatas=vertexBuffer.getData();\n\t\t\tvar indexDatas=renderObj._getIndexBuffer().getData();\n\t\t\tvar elementRaycastHit=MeshCollider._tempRaycastHit;\n\t\t\tvar isHit=Picker.rayIntersectsPositionsAndIndices(transformRay,vertexDatas,vertexBuffer.vertexDeclaration,indexDatas,elementRaycastHit);\n\t\t\tif (isHit){\n\t\t\t\tVector3.transformCoordinate(elementRaycastHit.position,worldMatrix,elementRaycastHit.position);\n\t\t\t\tvar rayOriToPos=MeshCollider._tempVector30;\n\t\t\t\tVector3.subtract(rayOrigin,elementRaycastHit.position,rayOriToPos);\n\t\t\t\tvar distance=Vector3.scalarLength(rayOriToPos);\n\t\t\t\tif ((distance < maxDistance)&& (distance < curMinDistance)){\n\t\t\t\t\telementRaycastHit.distance=distance;\n\t\t\t\t\telementRaycastHit.sprite3D=sprite3D;\n\t\t\t\t\tvar trianglePositions=elementRaycastHit.trianglePositions;\n\t\t\t\t\tVector3.transformCoordinate(trianglePositions[0],worldMatrix,trianglePositions[0]);\n\t\t\t\t\tVector3.transformCoordinate(trianglePositions[1],worldMatrix,trianglePositions[1]);\n\t\t\t\t\tVector3.transformCoordinate(trianglePositions[2],worldMatrix,trianglePositions[2]);\n\t\t\t\t\tvar triangleNormals=elementRaycastHit.triangleNormals;\n\t\t\t\t\tVector3.transformCoordinate(triangleNormals[0],worldMatrix,triangleNormals[0]);\n\t\t\t\t\tVector3.transformCoordinate(triangleNormals[1],worldMatrix,triangleNormals[1]);\n\t\t\t\t\tVector3.transformCoordinate(triangleNormals[2],worldMatrix,triangleNormals[2]);\n\t\t\t\t\tcurMinDistance=distance;\n\t\t\t\t\telementRaycastHit.cloneTo(outHitInfo);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldMatrixChanged=function(){\n\t\tthis._needUpdate=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._initialize=function(owner){\n\t\tlaya.d3.component.Component3D.prototype._initialize.call(this,owner);\n\t\t(owner).transform.on(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatrixChanged);\n\t\tthis._needUpdate=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getType=function(){\n\t\treturn 2;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._collisonTo=function(other){\n\t\tvar i=0,n=0;\n\t\tvar positions=this.mesh._positions;\n\t\tswitch (other._getType()){\n\t\t\tcase 0:;\n\t\t\t\tvar otherSphere=other;\n\t\t\t\tif (Collision.sphereContainsBox(otherSphere.boundSphere,this._boundBox)!==/*laya.d3.math.ContainmentType.Disjoint*/0){\n\t\t\t\t\tfor (i=0,n=positions.length;i < n;i++){\n\t\t\t\t\t\tif (Collision.sphereContainsPoint(otherSphere.boundSphere,positions[i])===/*laya.d3.math.ContainmentType.Contains*/1)\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 1:;\n\t\t\t\tvar otherBox=other;\n\t\t\t\tif (otherBox.boundBox.containsBoundBox(this._boundBox)!==/*laya.d3.math.ContainmentType.Disjoint*/0){\n\t\t\t\t\tfor (i=0,n=positions.length;i < n;i++){\n\t\t\t\t\t\tif (otherBox.boundBox.containsPoint(positions[i])===/*laya.d3.math.ContainmentType.Contains*/1)\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak ;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\tcase 2:;\n\t\t\t\tvar otherMesh=other;\n\t\t\t\tif (Collision.intersectsBoxAndBox(otherMesh._boundBox,this._boundBox)!==/*laya.d3.math.ContainmentType.Contains*/1){\n\t\t\t\t\treturn true;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tthrow new Error(\"MeshCollider:unknown collider type.\");\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"MeshCollider:unknown collider type.\");\n\t\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._cloneTo=function(dest){\n\t\tvar destCollider=dest;\n\t\tdestCollider.mesh=this._mesh;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.raycast=function(ray,hitInfo,maxDistance){\n\t\t(maxDistance===void 0)&& (maxDistance=1.79e+308);\n\t\tif (this._mesh==null || !this._mesh.loaded)\n\t\t\treturn false;\n\t\tvar distance=Collision.intersectsRayAndBoxRD(ray,this._boundBox);\n\t\tif (distance!==-1 && distance <=maxDistance && this._raycastMesh(ray,this._owner,hitInfo,maxDistance)){\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\thitInfo.distance=-1;\n\t\t\thitInfo.sprite3D=null;\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*@private 只读,不允许修改。\n\t*/\n\t__getset(0,__proto,'_boundBox',function(){\n\t\tthis._updateBoundBoxCollider();\n\t\treturn this._transformBoundingBox;\n\t});\n\n\t/**\n\t*设置碰撞器网格。\n\t*@param value 碰撞其网格。\n\t*/\n\t/**\n\t*获取碰撞器网格。\n\t*@return 碰撞其网格。\n\t*/\n\t__getset(0,__proto,'mesh',function(){\n\t\treturn this._mesh;\n\t\t},function(value){\n\t\tthis._mesh=value;\n\t});\n\n\t__static(MeshCollider,\n\t['_tempRay0',function(){return this._tempRay0=new Ray(new Vector3(),new Vector3());},'_tempVector30',function(){return this._tempVector30=new Vector3();},'_tempMatrix4x40',function(){return this._tempMatrix4x40=new Matrix4x4();},'_tempRaycastHit',function(){return this._tempRaycastHit=new RaycastHit();},'_tempBoundBoxCorners',function(){return this._tempBoundBoxCorners=/*new vector.<>*/[new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3(),new Vector3()];}\n\t]);\n\treturn MeshCollider;\n})(Collider)\n\n\n/**\n*<code>SphereCollider</code> 类用于创建球碰撞器。\n*/\n//class laya.d3.component.physics.SphereCollider extends laya.d3.component.physics.Collider\nvar SphereCollider=(function(_super){\n\tfunction SphereCollider(){\n\t\t/**@private */\n\t\tthis._originalBoundSphere=null;\n\t\t/**@private */\n\t\tthis._transformBoundSphere=null;\n\t\tSphereCollider.__super.call(this);\n\t\tthis._needUpdate=false;\n\t}\n\n\t__class(SphereCollider,'laya.d3.component.physics.SphereCollider',_super);\n\tvar __proto=SphereCollider.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._updateCollider=function(){\n\t\tif (this._needUpdate){\n\t\t\tvar maxScale=NaN;\n\t\t\tvar transform=(this._owner).transform;\n\t\t\tvar scale=transform.scale;\n\t\t\tif (scale.x >=scale.y && scale.x >=scale.z)\n\t\t\t\tmaxScale=scale.x;\n\t\t\telse\n\t\t\tmaxScale=scale.y >=scale.z ? scale.y :scale.z;\n\t\t\tVector3.transformCoordinate(this._originalBoundSphere.center,transform.worldMatrix,this._transformBoundSphere.center);\n\t\t\tthis._transformBoundSphere.radius=this._originalBoundSphere.radius *maxScale;\n\t\t\tthis._needUpdate=false;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldMatrixChanged=function(){\n\t\tthis._needUpdate=true;\n\t\tfor (var k in this._runtimeCollisonMap){\n\t\t\tthis._runtimeCollisonTestMap[k]=true;\n\t\t\tthis._runtimeCollisonMap[k]._runtimeCollisonTestMap[this.id]=true;\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._initialize=function(owner){\n\t\tlaya.d3.component.Component3D.prototype._initialize.call(this,owner);\n\t\tthis._originalBoundSphere=new BoundSphere(new Vector3(0,0,0),0.5);\n\t\tthis._transformBoundSphere=new BoundSphere(new Vector3(0,0,0),0.5);\n\t\t(owner).transform.on(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatrixChanged);\n\t\tthis._needUpdate=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._getType=function(){\n\t\treturn 0;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._collisonTo=function(other){\n\t\tswitch (other._getType()){\n\t\t\tcase 0:\n\t\t\t\treturn Collision.sphereContainsSphere(this.boundSphere,(other).boundSphere)!==/*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\treturn (other).boundBox.containsSphere(this.boundSphere)!==/*laya.d3.math.ContainmentType.Disjoint*/0;\n\t\t\t\tbreak ;\n\t\t\tcase 2:;\n\t\t\t\tvar meshCollider=other;\n\t\t\t\tif (Collision.sphereContainsBox(this.boundSphere,meshCollider._boundBox)!==/*laya.d3.math.ContainmentType.Disjoint*/0){\n\t\t\t\t\tvar positions=meshCollider.mesh._positions;\n\t\t\t\t\tfor (var i=0,n=positions.length;i < n;i++){\n\t\t\t\t\t\tif (Collision.sphereContainsPoint(this.boundSphere,positions[i])===/*laya.d3.math.ContainmentType.Contains*/1)\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t\t}else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tthrow new Error(\"SphereCollider:unknown collider type.\");\n\t\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._cloneTo=function(dest){\n\t\tvar destCollider=dest;\n\t\tdestCollider.radius=this.radius;\n\t\tvar destCenter=destCollider.center;\n\t\tthis.center.cloneTo(destCenter);\n\t\tdestCollider.center=destCenter;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.raycast=function(ray,hitInfo,maxDistance){\n\t\t(maxDistance===void 0)&& (maxDistance=1.79e+308);\n\t\tthis._updateCollider();\n\t\tvar distance=this._transformBoundSphere.intersectsRayPoint(ray,hitInfo.position);\n\t\tif (distance!==-1 && distance <=maxDistance){\n\t\t\thitInfo.distance=distance;\n\t\t\thitInfo.sprite3D=this._owner;\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\thitInfo.distance=-1;\n\t\t\thitInfo.sprite3D=null;\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*设置中心点。\n\t*@param value 中心点。\n\t*/\n\t/**\n\t*获取中心点。\n\t*@return 中心点。\n\t*/\n\t__getset(0,__proto,'center',function(){\n\t\treturn this._originalBoundSphere.center;\n\t\t},function(value){\n\t\tthis._originalBoundSphere.center=value;\n\t});\n\n\t/**\n\t*设置半径。\n\t*@param value 半径。\n\t*/\n\t/**\n\t*获取半径。\n\t*@return 半径。\n\t*/\n\t__getset(0,__proto,'radius',function(){\n\t\treturn this._originalBoundSphere.radius;\n\t\t},function(value){\n\t\tthis._originalBoundSphere.radius=value;\n\t});\n\n\t/**\n\t*获取包围球,只读,不允许修改。\n\t*@return 包围球。\n\t*/\n\t__getset(0,__proto,'boundSphere',function(){\n\t\tthis._updateCollider();\n\t\treturn this._transformBoundSphere;\n\t});\n\n\treturn SphereCollider;\n})(Collider)\n\n\n//class laya.d3.resource.DataTexture2D extends laya.d3.resource.BaseTexture\nvar DataTexture2D=(function(_super){\n\tfunction DataTexture2D(){\n\t\tthis.simLodInfo=null;\n\t\t/**@private 文件路径全名。*/\n\t\tthis._src=null;\n\t\t/**@private Imagedata */\n\t\tthis._buffer=null;\n\t\tthis._mipmaps=null;\n\t\t/**@private 异步加载锁*/\n\t\tthis._recreateLock=false;\n\t\t/**@private 异步加载完成后是否需要释放（有可能在恢复过程中,再次被释放，用此变量做标记）*/\n\t\tthis._needReleaseAgain=false;\n\t\tDataTexture2D.__super.call(this);\n\t\tthis._type=/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1;\n\t}\n\n\t__class(DataTexture2D,'laya.d3.resource.DataTexture2D',_super);\n\tvar __proto=DataTexture2D.prototype;\n\t__proto.genDebugMipmaps=function(){\n\t\tvar ret=[];\n\t\tret.push(new Uint8Array((new Uint32Array(512 *256)).fill(0xff0000ff).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(256 *128)).fill(0xff0080ff).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(128 *64)).fill(0xff00ffff).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(64 *32)).fill(0xff00ff00).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(32 *16)).fill(0xff804000).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(16 *8)).fill(0xffff0000).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(8 *4)).fill(0xffff0080).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(4 *2)).fill(0x0).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(2 *1)).fill(0xff808080).buffer));\n\t\tret.push(new Uint8Array((new Uint32Array(1 *1)).fill(0xffffffff).buffer));\n\t\treturn ret;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onTextureLoaded=function(buff){}\n\t/**\n\t*@private\n\t*/\n\t__proto._createWebGlTexture=function(){\n\t\tif (!this._buffer && !this._mipmaps)\n\t\t\tthrow \"create GLTextur err:no data\";\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.getExtension(\"EXT_shader_texture_lod\");\n\t\tvar glTexture=this._source=gl.createTexture();\n\t\tvar w=this._width;\n\t\tvar h=this._height;\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,this._type,glTexture);\n\t\tif (this._mipmaps){\n\t\t\tif (laya.d3.resource.DataTexture2D.lodasatlas){\n\t\t\t\tvar infoi=0;\n\t\t\t\tgl.texImage2D(this._type,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,this._width,this._height,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,null);\n\t\t\t\tfor (var i=0;i < this._mipmaps.length;i++){\n\t\t\t\t\tif (this._mipmaps[i].byteLength !=cw *ch *4){\n\t\t\t\t\t\tthrow \"mipmap size error  level:\"+i;\n\t\t\t\t\t}\n\t\t\t\t\tgl.texSubImage2D(this._type,0,DataTexture2D.simLodRect[infoi++],DataTexture2D.simLodRect[infoi++],DataTexture2D.simLodRect[infoi++],DataTexture2D.simLodRect[infoi++],/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,new Uint8Array(this._mipmaps[i]));\n\t\t\t\t}\n\t\t\t\tthis.minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601;\n\t\t\t\tthis.magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601;\n\t\t\t\t}else {\n\t\t\t\tvar cw=this._width;\n\t\t\t\tvar ch=this._height;\n\t\t\t\tinfoi=0;\n\t\t\t\tgl.texImage2D(this._type,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,this._width,this._height,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,null);\n\t\t\t\tfor (i=0;i < this._mipmaps.length;i++){\n\t\t\t\t\tif (this._mipmaps[i].byteLength !=cw *ch *4){\n\t\t\t\t\t\tthrow \"mipmap size error  level:\"+i;\n\t\t\t\t\t}\n\t\t\t\t\tgl.texImage2D(this._type,i,/*laya.webgl.WebGLContext.RGBA*/0x1908,cw,ch,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,new Uint8Array(this._mipmaps[i]));\n\t\t\t\t\tcw /=2;\n\t\t\t\t\tch /=2;\n\t\t\t\t\tif (cw < 1)cw=1;\n\t\t\t\t\tif (ch < 1)ch=1;\n\t\t\t\t\tthis.minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703;\n\t\t\t\t\tthis.magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.mipmap=false;\n\t\t\t}else {\n\t\t\tgl.texImage2D(this._type,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,w,h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,new Uint8Array(this._buffer));\n\t\t};\n\t\tvar minFifter=this._minFifter;\n\t\tvar magFifter=this._magFifter;\n\t\tvar repeat=this._repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar isPot=Arith.isPOT(w,h);\n\t\tif (isPot){\n\t\t\tif (this._mipmap || this._mipmaps)\n\t\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\t\telse\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\t\tif (this._mipmaps)\n\t\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\telse\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\t\tthis._mipmap && gl.generateMipmap(this._type);\n\t\t\t}else {\n\t\t\tthrow \"data texture must be POT\";\n\t\t}\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tif (this.src && this.src.length > 0)\n\t\t\tthis._buffer=null;\n\t\tif (isPot)\n\t\t\tthis.memorySize=w *h *4 *(1+1 / 3);\n\t\telse\n\t\tthis.memorySize=w *h *4;\n\t\tthis._recreateLock=false;\n\t}\n\n\t/**\n\t*重新创建资源，如果异步创建中被强制释放再创建，则需等待释放完成后再重新加载创建。\n\t*/\n\t__proto.recreateResource=function(){\n\t\tif (!this._buffer && (this._src==null || this._src===\"\"))\n\t\t\treturn;\n\t\tthis._needReleaseAgain=false;\n\t\tif (!this._buffer && !this._mipmaps){\n\t\t\tthis._recreateLock=true;\n\t\t\tvar _this=this;\n\t\t\t}else {\n\t\t\tif (this._recreateLock){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._createWebGlTexture();\n\t\t\tthis.completeCreate();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar imgdata;\n\t\tif (params){\n\t\t\timgdata=params[0].call(this,data);\n\t\t}\n\t\tif (imgdata){\n\t\t\tthis._width=imgdata.width;\n\t\t\tthis._height=imgdata.height;\n\t\t\tthis._buffer=imgdata.data;\n\t\t}\n\t\tthis._src=url;\n\t\tthis._size=new Size(this._width,this._height);\n\t\tif (this._conchTexture){\n\t\t\talert('怎么给runtime传递datatexture数据');\n\t\t}else\n\t\tthis.activeResource();\n\t\tthis._endLoaded();\n\t}\n\n\t/**\n\t*返回图片像素。\n\t*@return 图片像素。\n\t*/\n\t__proto.getPixels=function(){\n\t\treturn new Uint8Array(this._buffer);\n\t}\n\n\t/**\n\t*销毁资源。\n\t*/\n\t__proto.disposeResource=function(){\n\t\tif (this._recreateLock){\n\t\t\tthis._needReleaseAgain=true;\n\t\t}\n\t\tif (this._source){\n\t\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\t\tthis._source=null;\n\t\t\tthis._buffer=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t/**\n\t*获取文件路径全名。\n\t*/\n\t__getset(0,__proto,'src',function(){\n\t\treturn this._src;\n\t});\n\n\tDataTexture2D.create=function(data,w,h,magfilter,minfilter,mipmap){\n\t\t(magfilter===void 0)&& (magfilter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t(minfilter===void 0)&& (minfilter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t(mipmap===void 0)&& (mipmap=true);\n\t\tif (!data || data.byteLength < (w *h *4))\n\t\t\tthrow 'DataTexture2D create error';\n\t\tvar ret=new DataTexture2D();\n\t\tret._buffer=data;\n\t\tret._width=w;\n\t\tret._height=h;\n\t\tret._mipmap=mipmap;\n\t\tret._magFifter=magfilter;\n\t\tret._minFifter=minfilter;\n\t\tret._size=new Size(ret._width,ret._height);\n\t\tif (ret._conchTexture){\n\t\t\talert('怎么给runtime传递datatexture数据');\n\t\t}else\n\t\tret.activeResource();\n\t\treturn ret;\n\t}\n\n\tDataTexture2D.load=function(url,w,h,magfilter,minfilter){\n\t\t(w===void 0)&& (w=0);\n\t\t(h===void 0)&& (h=0);\n\t\t(magfilter===void 0)&& (magfilter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t(minfilter===void 0)&& (minfilter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\tvar extension=Utils.getFileExtension(url);\n\t\tif (extension==='mipmaps'){\n\t\t\tvar ret=Laya.loader.create(url,null,null,DataTexture2D,[function(data){\n\t\t\t\tthis._mipmaps=[];\n\t\t\t\tvar szinfo=new Uint32Array(data);\n\t\t\t\tthis._width=szinfo[0];\n\t\t\t\tvar validw=512;\n\t\t\t\tif (laya.d3.resource.DataTexture2D.lodasatlas){\n\t\t\t\t\tthis._width *=2;\n\t\t\t\t\tvalidw=1024;\n\t\t\t\t}\n\t\t\t\tif (this._width !=validw){\n\t\t\t\t\tconsole.error(\"现在只支持512x256的环境贴图。当前的是\"+szinfo[0]);\n\t\t\t\t\tthrow \"现在只支持512x256的环境贴图。当前的是\"+szinfo[0];\n\t\t\t\t}\n\t\t\t\tthis._height=szinfo[1];\n\t\t\t\tvar curw=laya.d3.resource.DataTexture2D.lodasatlas ? this._width / 2 :this._width;\n\t\t\t\tvar curh=this._height;\n\t\t\t\tvar cursz=8;\n\t\t\t\twhile (true){\n\t\t\t\t\tvar curbufsz=curw *curh *4;\n\t\t\t\t\tif (cursz+curbufsz > data.byteLength){\n\t\t\t\t\t\tthrow \"load mipmaps data size error \";\n\t\t\t\t\t};\n\t\t\t\t\tvar tbuf=new Uint8Array(data,cursz,curbufsz);\n\t\t\t\t\tthis._mipmaps.push(tbuf);\n\t\t\t\t\tcursz+=curbufsz;\n\t\t\t\t\tif (curw==1 && curh==1){\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t\tcurw /=2;\n\t\t\t\t\tcurh /=2;\n\t\t\t\t\tif (curw < 1)curw=1;\n\t\t\t\t\tif (curh < 1)curh=1;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}]);\n\t\t\tif (laya.d3.resource.DataTexture2D.lodasatlas){\n\t\t\t\tret.simLodInfo=new Float32Array(40);\n\t\t\t\tfor (var i=0;i < ret.simLodInfo.length;){\n\t\t\t\t\tret.simLodInfo[i]=(DataTexture2D.simLodRect[i]+0.5)/ 1024;\n\t\t\t\t\ti++;\n\t\t\t\t\tret.simLodInfo[i]=(DataTexture2D.simLodRect[i]+0.5)/ 256;\n\t\t\t\t\ti++;\n\t\t\t\t\tret.simLodInfo[i]=Math.max(DataTexture2D.simLodRect[i]-1,0.1)/ 1024;\n\t\t\t\t\ti++;\n\t\t\t\t\tret.simLodInfo[i]=Math.max(DataTexture2D.simLodRect[i]-1.5,0.1)/ 256;\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ret;\n\t\t\t}else if (typeof(w)=='number'){\n\t\t\treturn Laya.loader.create(url,null,null,DataTexture2D,[function(data){\n\t\t\t\tthis._width=w;\n\t\t\t\tthis._height=h;\n\t\t\t\tthis._buffer=data;\n\t\t\t\treturn null;\n\t\t\t}]);\n\t\t\t}else if (typeof(w)=='function'){\n\t\t\treturn Laya.loader.create(url,null,null,DataTexture2D,[w]);\n\t\t\t}else {\n\t\t\tthrow new Error(\"unknown params.\");\n\t\t}\n\t}\n\n\tDataTexture2D.lodasatlas=false;\n\t__static(DataTexture2D,\n\t['simLodRect',function(){return this.simLodRect=new Uint32Array([\n\t\t0,0,512,256,\n\t\t512,0,256,128,\n\t\t512+256,0,128,64,\n\t\t512+256+128,0,64,32,\n\t\t512+256+128+64,0,32,16,\n\t\t512+256+128+64+32,0,16,8,\n\t\t512+256+128+64+32+16,0,8,4,\n\t\t512+256+128+64+32+16+8,0,4,2,\n\t\t512+256+128+64+32+16+8+4,0,2,1,\n\t\t512+256+128+64+32+16+8+4+2,0,1,1]);}\n\t]);\n\treturn DataTexture2D;\n})(BaseTexture)\n\n\n/**\n*@private\n*<code>PrimitiveMesh</code> 类用于创建基本网格的父类。\n*/\n//class laya.d3.resource.models.PrimitiveMesh extends laya.d3.resource.models.BaseMesh\nvar PrimitiveMesh=(function(_super){\n\tfunction PrimitiveMesh(){\n\t\tthis._numberVertices=0;\n\t\tthis._numberIndices=0;\n\t\tthis._vertexBuffer=null;\n\t\tthis._indexBuffer=null;\n\t\tPrimitiveMesh.__super.call(this);\n\t}\n\n\t__class(PrimitiveMesh,'laya.d3.resource.models.PrimitiveMesh',_super);\n\tvar __proto=PrimitiveMesh.prototype;\n\tLaya.imps(__proto,{\"laya.d3.core.render.IRenderable\":true})\n\t__proto._getVertexBuffer=function(index){\n\t\t(index===void 0)&& (index=0);\n\t\tif (index===0)\n\t\t\treturn this._vertexBuffer;\n\t\telse\n\t\treturn null;\n\t}\n\n\t__proto._getVertexBuffers=function(){\n\t\treturn null;\n\t}\n\n\t__proto._getIndexBuffer=function(){\n\t\treturn this._indexBuffer;\n\t}\n\n\t/**\n\t*获取网格顶点\n\t*@return 网格顶点。\n\t*/\n\t__proto._getPositions=function(){\n\t\tvar vertices=[];\n\t\tvar positionElement;\n\t\tvar vertexElements=this._vertexBuffer.vertexDeclaration.getVertexElements();\n\t\tvar j=0;\n\t\tfor (j=0;j < vertexElements.length;j++){\n\t\t\tvar vertexElement=vertexElements[j];\n\t\t\tif (vertexElement.elementFormat===/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\" && vertexElement.elementUsage===/*laya.d3.graphics.VertexElementUsage.POSITION0*/0){\n\t\t\t\tpositionElement=vertexElement;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t};\n\t\tvar verticesData=this._vertexBuffer.getData();\n\t\tfor (j=0;j < verticesData.length;j+=this._vertexBuffer.vertexDeclaration.vertexStride / 4){\n\t\t\tvar ofset=j+positionElement.offset / 4;\n\t\t\tvar position=new Vector3(verticesData[ofset+0],verticesData[ofset+1],verticesData[ofset+2]);\n\t\t\tvertices.push(position);\n\t\t}\n\t\treturn vertices;\n\t}\n\n\t__proto.getRenderElement=function(index){\n\t\treturn this;\n\t}\n\n\t__proto.getRenderElementsCount=function(){\n\t\treturn 1;\n\t}\n\n\t__proto.disposeResource=function(){\n\t\t(this._vertexBuffer)&& (this._vertexBuffer.destroy(),this._vertexBuffer=null);\n\t\t(this._indexBuffer)&& (this._indexBuffer.destroy(),this._indexBuffer=null);\n\t\tthis.memorySize=0;\n\t}\n\n\t__proto._beforeRender=function(state){\n\t\tthis._vertexBuffer._bind();\n\t\tthis._indexBuffer._bind();\n\t\treturn true;\n\t}\n\n\t__proto._render=function(state){\n\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._numberIndices,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\tStat.drawCall++;\n\t\tStat.trianglesFaces+=this._numberIndices / 3;\n\t}\n\n\t__getset(0,__proto,'_vertexBufferCount',function(){\n\t\treturn 1;\n\t});\n\n\t__getset(0,__proto,'triangleCount',function(){\n\t\treturn this._indexBuffer.indexCount / 3;\n\t});\n\n\treturn PrimitiveMesh;\n})(BaseMesh)\n\n\n/**\n*<code>Mesh</code> 类用于创建文件网格数据模板。\n*/\n//class laya.d3.resource.models.Mesh extends laya.d3.resource.models.BaseMesh\nvar Mesh=(function(_super){\n\tfunction Mesh(){\n\t\t/**@private */\n\t\tthis._materials=null;\n\t\t/**@private */\n\t\tthis._subMeshes=null;\n\t\t/**@private */\n\t\tthis._vertexBuffers=null;\n\t\t/**@private */\n\t\tthis._indexBuffer=null;\n\t\t/**@private */\n\t\tthis._boneNames=null;\n\t\t/**@private */\n\t\tthis._inverseBindPoses=null;\n\t\t/**@private */\n\t\tthis._skinnedDatas=null;\n\t\tMesh.__super.call(this);\n\t\tthis._subMeshes=[];\n\t\tthis._materials=[];\n\t\tthis._vertexBuffers=[];\n\t}\n\n\t__class(Mesh,'laya.d3.resource.models.Mesh',_super);\n\tvar __proto=Mesh.prototype;\n\t/**\n\t*获取网格顶点，并产生数据\n\t*@return 网格顶点。\n\t*/\n\t__proto._getPositions=function(){\n\t\tvar vertices=[];\n\t\tvar i=0,j=0,vertexBuffer,positionElement,vertexElements,vertexElement,ofset=0,verticesData;\n\t\tif (this._vertexBuffers.length!==0){\n\t\t\tvar vertexBufferCount=this._vertexBuffers.length;\n\t\t\tfor (i=0;i < vertexBufferCount;i++){\n\t\t\t\tvertexBuffer=this._vertexBuffers[i];\n\t\t\t\tvertexElements=vertexBuffer.vertexDeclaration.getVertexElements();\n\t\t\t\tfor (j=0;j < vertexElements.length;j++){\n\t\t\t\t\tvertexElement=vertexElements[j];\n\t\t\t\t\tif (vertexElement.elementFormat===/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\" && vertexElement.elementUsage===/*laya.d3.graphics.VertexElementUsage.POSITION0*/0){\n\t\t\t\t\t\tpositionElement=vertexElement;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tverticesData=vertexBuffer.getData();\n\t\t\t\tfor (j=0;j < verticesData.length;j+=vertexBuffer.vertexDeclaration.vertexStride / 4){\n\t\t\t\t\tofset=j+positionElement.offset / 4;\n\t\t\t\t\tvertices.push(new Vector3(verticesData[ofset+0],verticesData[ofset+1],verticesData[ofset+2]));\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tvar submesheCount=this._subMeshes.length;\n\t\t\tfor (i=0;i < submesheCount;i++){\n\t\t\t\tvar subMesh=this._subMeshes[i];\n\t\t\t\tvertexBuffer=subMesh._getVertexBuffer();\n\t\t\t\tvertexElements=vertexBuffer.vertexDeclaration.getVertexElements();\n\t\t\t\tfor (j=0;j < vertexElements.length;j++){\n\t\t\t\t\tvertexElement=vertexElements[j];\n\t\t\t\t\tif (vertexElement.elementFormat===/*laya.d3.graphics.VertexElementFormat.Vector3*/\"vector3\" && vertexElement.elementUsage===/*laya.d3.graphics.VertexElementUsage.POSITION0*/0){\n\t\t\t\t\t\tpositionElement=vertexElement;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tverticesData=vertexBuffer.getData();\n\t\t\t\tfor (j=0;j < verticesData.length;j+=vertexBuffer.vertexDeclaration.vertexStride / 4){\n\t\t\t\t\tofset=j+positionElement.offset / 4;\n\t\t\t\t\tvertices.push(new Vector3(verticesData[ofset+0],verticesData[ofset+1],verticesData[ofset+2]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn vertices;\n\t}\n\n\t/**\n\t*添加子网格（开发者禁止修改）。\n\t*@param subMesh 子网格。\n\t*/\n\t__proto._setSubMeshes=function(subMeshes){\n\t\tthis._subMeshes=subMeshes\n\t\tthis._subMeshCount=subMeshes.length;\n\t\tfor (var i=0;i < this._subMeshCount;i++)\n\t\tsubMeshes[i]._indexInMesh=i;\n\t\tthis._positions=this._getPositions();\n\t\tthis._generateBoundingObject();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tvar bufferData=data[0];\n\t\tvar textureMap=data[1];\n\t\tMeshReader.read(bufferData,this,this._materials,this._subMeshes,textureMap);\n\t\tthis.completeCreate();\n\t\tthis._endLoaded();\n\t}\n\n\t/**\n\t*获得子网格。\n\t*@param index 子网格索引。\n\t*@return 子网格。\n\t*/\n\t__proto.getSubMesh=function(index){\n\t\treturn this._subMeshes[index];\n\t}\n\n\t/**\n\t*获得子网格数量。\n\t*@return 子网格数量。\n\t*/\n\t__proto.getSubMeshCount=function(){\n\t\treturn this._subMeshes.length;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.getRenderElementsCount=function(){\n\t\treturn this._subMeshes.length;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.getRenderElement=function(index){\n\t\treturn this._subMeshes[index];\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.disposeResource=function(){\n\t\tfor (var i=0;i < this._subMeshes.length;i++)\n\t\tthis._subMeshes[i].dispose();\n\t\tthis._materials=null;\n\t\tthis._subMeshes=null;\n\t\tthis._vertexBuffers=null;\n\t\tthis._indexBuffer=null;\n\t\tthis._boneNames=null;\n\t\tthis._inverseBindPoses=null;\n\t}\n\n\t/**\n\t*获取材质队列的浅拷贝。\n\t*@return 材质队列的浅拷贝。\n\t*/\n\t__getset(0,__proto,'materials',function(){\n\t\treturn this._materials.slice();\n\t});\n\n\t/**\n\t*获取网格的全局默认绑定动作逆矩阵。\n\t*@return 网格的全局默认绑定动作逆矩阵。\n\t*/\n\t__getset(0,__proto,'InverseAbsoluteBindPoses',function(){\n\t\treturn this._inverseBindPoses;\n\t});\n\n\tMesh.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,Mesh);\n\t}\n\n\treturn Mesh;\n})(BaseMesh)\n\n\n/**\n*<code>RenderTarget</code> 类用于创建渲染目标。\n*/\n//class laya.d3.resource.RenderTexture extends laya.d3.resource.BaseTexture\nvar RenderTexture=(function(_super){\n\tfunction RenderTexture(width,height,surfaceFormat,surfaceType,depthStencilFormat,mipMap,repeat,minFifter,magFifter){\n\t\t/**@private */\n\t\tthis._alreadyResolved=false;\n\t\t/**@private */\n\t\tthis._surfaceFormat=0;\n\t\t/**@private */\n\t\tthis._surfaceType=0;\n\t\t/**@private */\n\t\tthis._depthStencilFormat=0;\n\t\t/**@private */\n\t\tthis._frameBuffer=null;\n\t\t/**@private */\n\t\tthis._depthStencilBuffer=null;\n\t\t(surfaceFormat===void 0)&& (surfaceFormat=/*laya.webgl.WebGLContext.RGBA*/0x1908);\n\t\t(surfaceType===void 0)&& (surfaceType=/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401);\n\t\t(depthStencilFormat===void 0)&& (depthStencilFormat=/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5);\n\t\t(mipMap===void 0)&& (mipMap=false);\n\t\t(repeat===void 0)&& (repeat=false);\n\t\t(minFifter===void 0)&& (minFifter=-1);\n\t\t(magFifter===void 0)&& (magFifter=-1);\n\t\tRenderTexture.__super.call(this);\n\t\tthis._type=/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1;\n\t\tthis._width=width;\n\t\tthis._height=height;\n\t\tthis._size=new Size(width,height);\n\t\tthis._surfaceFormat=surfaceFormat;\n\t\tthis._surfaceType=surfaceType;\n\t\tthis._depthStencilFormat=depthStencilFormat;\n\t\tif (Render.isConchWebGL && this._depthStencilFormat===/*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9){\n\t\t\tthis._depthStencilFormat=/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5;\n\t\t}\n\t\tthis._mipmap=mipMap;\n\t\tthis._repeat=repeat;\n\t\tthis._minFifter=minFifter;\n\t\tthis._magFifter=magFifter;\n\t\tthis.activeResource();\n\t\tthis._alreadyResolved=true;\n\t}\n\n\t__class(RenderTexture,'laya.d3.resource.RenderTexture',_super);\n\tvar __proto=RenderTexture.prototype;\n\t__proto.recreateResource=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tthis._frameBuffer=gl.createFramebuffer();\n\t\tthis._source=gl.createTexture();\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,this._type,this._source);\n\t\tgl.texImage2D(this._type,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,this._width,this._height,0,this._surfaceFormat,this._surfaceType,null);\n\t\tvar minFifter=this._minFifter;\n\t\tvar magFifter=this._magFifter;\n\t\tvar repeat=this._repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar isPot=Arith.isPOT(this._width,this._height);\n\t\tif (isPot){\n\t\t\tif (this._mipmap)\n\t\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\t\telse\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\t\tthis._mipmap && gl.generateMipmap(this._type);\n\t\t\t}else {\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t}\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,this._frameBuffer);\n\t\tgl.framebufferTexture2D(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,/*laya.webgl.WebGLContext.COLOR_ATTACHMENT0*/0x8CE0,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source,0);\n\t\tif (this._depthStencilFormat){\n\t\t\tthis._depthStencilBuffer=gl.createRenderbuffer();\n\t\t\tgl.bindRenderbuffer(/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilBuffer);\n\t\t\tgl.renderbufferStorage(/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilFormat,this._width,this._height);\n\t\t\tswitch (this._depthStencilFormat){\n\t\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5:\n\t\t\t\t\tgl.framebufferRenderbuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,/*laya.webgl.WebGLContext.DEPTH_ATTACHMENT*/0x8D00,/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilBuffer);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.STENCIL_INDEX8*/0x8D48:\n\t\t\t\t\tgl.framebufferRenderbuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,/*laya.webgl.WebGLContext.STENCIL_ATTACHMENT*/0x8D20,/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilBuffer);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9:\n\t\t\t\t\tgl.framebufferRenderbuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,/*laya.webgl.WebGLContext.DEPTH_STENCIL_ATTACHMENT*/0x821A,/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilBuffer);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,null);\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tgl.bindRenderbuffer(/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,null);\n\t\tthis.memorySize=this._width *this._height *4;\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*开始绑定。\n\t*/\n\t__proto.start=function(){\n\t\tWebGL.mainContext.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,this.frameBuffer);\n\t\tRenderTexture._currentRenderTarget=this;\n\t\tthis._alreadyResolved=false;\n\t}\n\n\t/**\n\t*结束绑定。\n\t*/\n\t__proto.end=function(){\n\t\tWebGL.mainContext.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,null);\n\t\tRenderTexture._currentRenderTarget=null;\n\t\tthis._alreadyResolved=true;\n\t}\n\n\t/**\n\t*获得像素数据。\n\t*@param x X像素坐标。\n\t*@param y Y像素坐标。\n\t*@param width 宽度。\n\t*@param height 高度。\n\t*@return 像素数据。\n\t*/\n\t__proto.getData=function(x,y,width,height){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,this._frameBuffer);\n\t\tvar canRead=(gl.checkFramebufferStatus(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40)===/*laya.webgl.WebGLContext.FRAMEBUFFER_COMPLETE*/0x8CD5);\n\t\tif (!canRead){\n\t\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,null);\n\t\t\treturn null;\n\t\t};\n\t\tvar pixels=new Uint8Array(this._width *this._height *4);\n\t\tgl.readPixels(x,y,width,height,this._surfaceFormat,this._surfaceType,pixels);\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,null);\n\t\treturn pixels;\n\t}\n\n\t/**\n\t*销毁资源。\n\t*/\n\t__proto.disposeResource=function(){\n\t\tif (this._frameBuffer){\n\t\t\tvar gl=WebGL.mainContext;\n\t\t\tgl.deleteTexture(this._source);\n\t\t\tgl.deleteFramebuffer(this._frameBuffer);\n\t\t\tgl.deleteRenderbuffer(this._depthStencilBuffer);\n\t\t\tthis._source=null;\n\t\t\tthis._frameBuffer=null;\n\t\t\tthis._depthStencilBuffer=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t/**\n\t*获取表面格式。\n\t*@return 表面格式。\n\t*/\n\t__getset(0,__proto,'surfaceFormat',function(){\n\t\treturn this._surfaceFormat;\n\t});\n\n\t/**\n\t*获取表面类型。\n\t*@return 表面类型。\n\t*/\n\t__getset(0,__proto,'surfaceType',function(){\n\t\treturn this._surfaceType;\n\t});\n\n\t/**\n\t*获取深度格式。\n\t*@return 深度格式。\n\t*/\n\t__getset(0,__proto,'depthStencilFormat',function(){\n\t\treturn this._depthStencilFormat;\n\t});\n\n\t/**\n\t*获取RenderTarget数据源,如果alreadyResolved等于false，则返回null。\n\t*@return RenderTarget数据源。\n\t*/\n\t__getset(0,__proto,'source',function(){\n\t\tif (this._alreadyResolved)\n\t\t\treturn Laya.superGet(BaseTexture,this,'source');\n\t\telse\n\t\treturn null;\n\t});\n\n\t__getset(0,__proto,'depthStencilBuffer',function(){\n\t\treturn this._depthStencilBuffer;\n\t});\n\n\t__getset(0,__proto,'frameBuffer',function(){\n\t\treturn this._frameBuffer;\n\t});\n\n\tRenderTexture._currentRenderTarget=null;\n\treturn RenderTexture;\n})(BaseTexture)\n\n\n/**\n*<code>SolidColorTexture2D</code> 二维纯色纹理。\n*/\n//class laya.d3.resource.SolidColorTexture2D extends laya.d3.resource.BaseTexture\nvar SolidColorTexture2D=(function(_super){\n\tfunction SolidColorTexture2D(color){\n\t\t/**@private */\n\t\tthis._color=null;\n\t\t/**@private */\n\t\tthis._pixels=null;\n\t\tSolidColorTexture2D.__super.call(this);\n\t\tthis._type=/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1;\n\t\tthis._width=1;\n\t\tthis._height=1;\n\t\tthis._size=new Size(this.width,this.height);\n\t\tthis._color=color;\n\t\tthis._pixels=new Uint8Array([color.x *255,color.y *255,color.z *255,color.w *255]);\n\t}\n\n\t__class(SolidColorTexture2D,'laya.d3.resource.SolidColorTexture2D',_super);\n\tvar __proto=SolidColorTexture2D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._createWebGlTexture=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar glTex=this._source=gl.createTexture();\n\t\tvar w=this._width;\n\t\tvar h=this._height;\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,this._type,glTex);\n\t\tgl.texImage2D(this._type,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,w,h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._pixels);\n\t\tvar minFifter=this._minFifter;\n\t\tvar magFifter=this._magFifter;\n\t\tvar repeat=this._repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar isPot=Arith.isPOT(w,h);\n\t\tif (isPot){\n\t\t\tif (this._mipmap)\n\t\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\t\telse\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\t\tthis._mipmap && gl.generateMipmap(this._type);\n\t\t\t}else {\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t}\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tif (isPot)\n\t\t\tthis.memorySize=w *h *4 *(1+1 / 3);\n\t\telse\n\t\tthis.memorySize=w *h *4;\n\t}\n\n\t/**\n\t*重新创建资源，如果异步创建中被强制释放再创建，则需等待释放完成后再重新加载创建。\n\t*/\n\t__proto.recreateResource=function(){\n\t\tthis._createWebGlTexture();\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*销毁资源。\n\t*/\n\t__proto.disposeResource=function(){\n\t\tif (this._source){\n\t\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\t\tthis._source=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t__static(SolidColorTexture2D,\n\t['magentaTexture',function(){return this.magentaTexture=new SolidColorTexture2D(new Vector4(1.0,0.0,1.0,1.0));},'grayTexture',function(){return this.grayTexture=new SolidColorTexture2D(new Vector4(0.5,0.5,0.5,1.0));}\n\t]);\n\treturn SolidColorTexture2D;\n})(BaseTexture)\n\n\n//class laya.d3.resource.SolidColorTextureCube extends laya.d3.resource.BaseTexture\nvar SolidColorTextureCube=(function(_super){\n\tfunction SolidColorTextureCube(color){\n\t\t/**@private */\n\t\tthis._color=null;\n\t\t/**@private */\n\t\tthis._pixels=null;\n\t\t/**@private */\n\t\tthis._texCount=6;\n\t\tSolidColorTextureCube.__super.call(this);\n\t\tthis._type=/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP*/0x8513;\n\t\tthis._width=1;\n\t\tthis._height=1;\n\t\tthis._size=new Size(this.width,this.height);\n\t\tthis._color=color;\n\t\tthis._pixels=new Uint8Array([color.x *255,color.y *255,color.z *255,color.w *255]);\n\t}\n\n\t__class(SolidColorTextureCube,'laya.d3.resource.SolidColorTextureCube',_super);\n\tvar __proto=SolidColorTextureCube.prototype;\n\t__proto._createWebGlTexture=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar glTex=this._source=gl.createTexture();\n\t\tvar w=this._width;\n\t\tvar h=this._height;\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,this._type,glTex);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_POSITIVE_X*/0x8515,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,w,h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._pixels);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_X*/0x8516,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,w,h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._pixels);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_POSITIVE_Y*/0x8517,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,w,h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._pixels);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_Y*/0x8518,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,w,h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._pixels);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_POSITIVE_Z*/0x8519,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,w,h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._pixels);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_Z*/0x851A,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,w,h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._pixels);\n\t\tvar minFifter=this.minFifter;\n\t\tvar magFifter=this.magFifter;\n\t\tvar repeat=this._repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar isPOT=Arith.isPOT(w,h);\n\t\tif (isPOT){\n\t\t\tif (this.mipmap)\n\t\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\t\telse\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\t\tthis.mipmap && gl.generateMipmap(this._type);\n\t\t\t}else {\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t}\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tif (isPOT)\n\t\t\tthis.memorySize=w *h *4 *(1+1 / 3)*this._texCount;\n\t\telse\n\t\tthis.memorySize=w *h *4 *this._texCount;\n\t}\n\n\t__proto.recreateResource=function(){\n\t\tthis._createWebGlTexture();\n\t\tthis.completeCreate();\n\t}\n\n\t//处理创建完成后相关操作\n\t__proto.disposeResource=function(){\n\t\tif (this._source){\n\t\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\t\tthis._source=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t__static(SolidColorTextureCube,\n\t['magentaTexture',function(){return this.magentaTexture=new SolidColorTextureCube(new Vector4(1.0,0.0,1.0,1.0));},'grayTexture',function(){return this.grayTexture=new SolidColorTextureCube(new Vector4(0.5,0.5,0.5,1.0));}\n\t]);\n\treturn SolidColorTextureCube;\n})(BaseTexture)\n\n\n/**\n*<code>Texture2D</code> 二维纹理。\n*/\n//class laya.d3.resource.Texture2D extends laya.d3.resource.BaseTexture\nvar Texture2D=(function(_super){\n\tfunction Texture2D(canRead,reapeat,format,mipmap){\n\t\t/**@private */\n\t\tthis._canRead=false;\n\t\t/**@private HTML Image*/\n\t\tthis._image=null;\n\t\t/**@private */\n\t\tthis._pixels=null;\n\t\t(canRead===void 0)&& (canRead=false);\n\t\t(reapeat===void 0)&& (reapeat=true);\n\t\t(format===void 0)&& (format=/*laya.webgl.WebGLContext.RGBA*/0x1908);\n\t\t(mipmap===void 0)&& (mipmap=true);\n\t\tTexture2D.__super.call(this);\n\t\tthis._type=/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1;\n\t\tthis._repeat=reapeat;\n\t\tthis._canRead=canRead;\n\t\tthis._format=format;\n\t\tthis._mipmap=mipmap;\n\t}\n\n\t__class(Texture2D,'laya.d3.resource.Texture2D',_super);\n\tvar __proto=Texture2D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._createWebGlTexture=function(){\n\t\tif (!this._image)\n\t\t\tthrow \"create GLTextur err:no data:\"+this._image;\n\t\tvar gl=WebGL.mainContext;\n\t\tvar glTexture=this._source=gl.createTexture();\n\t\tvar w=this._width;\n\t\tvar h=this._height;\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,this._type,glTexture);\n\t\tswitch (this._format){\n\t\t\tcase /*laya.webgl.WebGLContext.RGB*/0x1907:\n\t\t\tcase /*laya.webgl.WebGLContext.RGBA*/0x1908:\n\t\t\t\tif (this._canRead)\n\t\t\t\t\tgl.texImage2D(this._type,0,this._format,w,h,0,this._format,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._pixels);\n\t\t\t\telse\n\t\t\t\tgl.texImage2D(this._type,0,this._format,this._format,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._image);\n\t\t\t\tbreak ;\n\t\t\tcase WebGL.compressEtc1.COMPRESSED_RGB_ETC1_WEBGL:\n\t\t\t\tgl.compressedTexImage2D(this._type,0,this._format,this._width,this._height,0,this._image);\n\t\t\t\tbreak ;\n\t\t\t};\n\t\tvar minFifter=this._minFifter;\n\t\tvar magFifter=this._magFifter;\n\t\tvar repeat=this._repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar wrapModeU=this._wrapModeU==0 ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar wrapModeV=this._wrapModeV==0 ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar isPot=Arith.isPOT(w,h);\n\t\tif (isPot){\n\t\t\tif (this._mipmap)\n\t\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\t\telse\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,wrapModeU);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,wrapModeV);\n\t\t\tthis._mipmap && gl.generateMipmap(this._type);\n\t\t\t}else {\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t}\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tthis._image.onload=null;\n\t\tthis._image=null;\n\t\tif (isPot)\n\t\t\tthis.memorySize=w *h *4 *(1+1 / 3);\n\t\telse\n\t\tthis.memorySize=w *h *4;\n\t}\n\n\t/**\n\t*重新创建资源，如果异步创建中被强制释放再创建，则需等待释放完成后再重新加载创建。\n\t*/\n\t__proto.recreateResource=function(){\n\t\tthis._createWebGlTexture();\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tif (params){\n\t\t\tvar canRead=params[0];\n\t\t\t(canRead!==undefined)&& (this._canRead=canRead);\n\t\t\tvar repeat=params[1];\n\t\t\t(repeat!==undefined)&& (this._repeat=repeat);\n\t\t\tvar format=params[2];\n\t\t\t(format!==undefined)&& (this._format=format);\n\t\t\tvar mipmap=params[3];\n\t\t\t(mipmap!==undefined)&& (this._mipmap=mipmap);\n\t\t\tvar wrapModeU=params.wrapModeU;\n\t\t\t(wrapModeU!==undefined)&& (this._wrapModeU=wrapModeU);\n\t\t\tvar wrapModeV=params.wrapModeV;\n\t\t\t(wrapModeV!==undefined)&& (this._wrapModeV=wrapModeV);\n\t\t}\n\t\tswitch (this._format){\n\t\t\tcase /*laya.webgl.WebGLContext.RGB*/0x1907:\n\t\t\tcase /*laya.webgl.WebGLContext.RGBA*/0x1908:\n\t\t\t\tthis._image=data;\n\t\t\t\tvar w=data.width;\n\t\t\t\tvar h=data.height;\n\t\t\t\tthis._width=w;\n\t\t\t\tthis._height=h;\n\t\t\t\tthis._size=new Size(w,h);\n\t\t\t\tif (this._canRead){\n\t\t\t\t\tif (Render.isConchApp){\n\t\t\t\t\t\tif (/*__JS__ */data instanceof window.HTMLElement){\n\t\t\t\t\t\t\tthis._pixels=new Uint8Array(data.getImageData(0,0,w,h));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tBrowser.canvas.size(w,h);\n\t\t\t\t\t\tBrowser.canvas.clear();\n\t\t\t\t\t\tBrowser.context.drawImage(data,0,0,w,h);\n\t\t\t\t\t\tthis._pixels=new Uint8Array(Browser.context.getImageData(0,0,w,h).data.buffer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase WebGL.compressEtc1.COMPRESSED_RGB_ETC1_WEBGL:;\n\t\t\t\tvar readData=new Byte(data);\n\t\t\t\tvar magicNumber=readData.readUTFBytes(4);\n\t\t\t\tvar version=readData.readUTFBytes(2);\n\t\t\t\tvar dataType=readData.getInt16();\n\t\t\t\treadData.endian=/*laya.utils.Byte.BIG_ENDIAN*/\"bigEndian\";\n\t\t\t\tthis._width=readData.getInt16();\n\t\t\t\tthis._height=readData.getInt16();\n\t\t\t\tthis._size=new Size(this._width,this._height);\n\t\t\t\tvar originalWidth=readData.getInt16();\n\t\t\t\tvar originalHeight=readData.getInt16();\n\t\t\t\tthis._image=new Uint8Array(data,readData.pos);\n\t\t\t}\n\t\tthis.recreateResource();\n\t\tthis._endLoaded();\n\t}\n\n\t/**\n\t*返回图片像素。\n\t*@return 图片像素。\n\t*/\n\t__proto.getPixels=function(){\n\t\tif (this._canRead)\n\t\t\treturn this._pixels;\n\t\telse\n\t\tthrow new Error(\"Texture2D: must set texture canRead is true.\");\n\t}\n\n\t/**\n\t*销毁资源。\n\t*/\n\t__proto.disposeResource=function(){\n\t\tif (this._source){\n\t\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\t\tthis._source=null;\n\t\t\tthis._image=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t/**@private */\n\t__getset(0,__proto,'_src',function(){\n\t\treturn this.url;\n\t});\n\n\t/**@private */\n\t__getset(0,__proto,'src',function(){\n\t\treturn this.url;\n\t});\n\n\tTexture2D.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,Texture2D);\n\t}\n\n\treturn Texture2D;\n})(BaseTexture)\n\n\n//class laya.d3.resource.TextureCube extends laya.d3.resource.BaseTexture\nvar TextureCube=(function(_super){\n\tfunction TextureCube(){\n\t\t/**@private */\n\t\t//this._images=null;\n\t\tTextureCube.__super.call(this);\n\t\tthis._type=/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP*/0x8513;\n\t}\n\n\t__class(TextureCube,'laya.d3.resource.TextureCube',_super);\n\tvar __proto=TextureCube.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._onTextureLoaded=function(images){\n\t\tthis._images=images;\n\t\tvar minWidth=2147483647;\n\t\tvar minHeight=2147483647;\n\t\tfor (var i=0;i < 6;i++){\n\t\t\tvar image=images[i];\n\t\t\tminWidth=Math.min(minWidth,image.width);\n\t\t\tminHeight=Math.min(minHeight,image.height);\n\t\t}\n\t\tthis._width=minWidth;\n\t\tthis._height=minHeight;\n\t\tthis._size=new Size(minWidth,minHeight);\n\t}\n\n\t__proto._createWebGlTexture=function(){\n\t\tvar texCount=6;\n\t\tvar i=0;\n\t\tfor (i=0;i < texCount;i++){\n\t\t\tif (!this._images[i]){\n\t\t\t\tthrow \"create GLTextur err:no data:\"+this._images[i];\n\t\t\t}\n\t\t};\n\t\tvar gl=WebGL.mainContext;\n\t\tvar glTex=this._source=gl.createTexture();\n\t\tvar w=this._width;\n\t\tvar h=this._height;\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,this._type,glTex);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_POSITIVE_X*/0x8515,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._images[0]);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_X*/0x8516,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._images[1]);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_POSITIVE_Y*/0x8517,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._images[2]);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_Y*/0x8518,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._images[3]);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_POSITIVE_Z*/0x8519,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._images[4]);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_Z*/0x851A,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._images[5]);\n\t\tvar minFifter=this.minFifter;\n\t\tvar magFifter=this.magFifter;\n\t\tvar repeat=this._repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar isPOT=Arith.isPOT(w,h);\n\t\tif (isPOT){\n\t\t\tif (this.mipmap)\n\t\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\t\telse\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\t\tthis.mipmap && gl.generateMipmap(this._type);\n\t\t\t}else {\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\tgl.texParameteri(this._type,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t}\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tfor (i=0;i < 6;i++){\n\t\t\tthis._images[i].onload=null;\n\t\t\tthis._images[i]=null;\n\t\t}\n\t\tif (isPOT)\n\t\t\tthis.memorySize=w *h *4 *(1+1 / 3)*texCount;\n\t\telse\n\t\tthis.memorySize=w *h *4 *texCount;\n\t}\n\n\t__proto.recreateResource=function(){\n\t\tif (this._url==null)\n\t\t\treturn;\n\t\tthis._createWebGlTexture();\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onAsynLoaded=function(url,data,params){\n\t\tthis._onTextureLoaded(data);\n\t\tthis.activeResource();\n\t\tthis._endLoaded();\n\t}\n\n\t__proto.disposeResource=function(){\n\t\tif (this._source){\n\t\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\t\tthis._source=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'defaulteTexture',function(){\n\t\treturn SolidColorTextureCube.grayTexture;\n\t});\n\n\tTextureCube.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,TextureCube);\n\t}\n\n\treturn TextureCube;\n})(BaseTexture)\n\n\n/**\n*<code>SkinMeshRender</code> 类用于蒙皮渲染器。\n*/\n//class laya.d3.core.SkinnedMeshRender extends laya.d3.core.MeshRender\nvar SkinnedMeshRender=(function(_super){\n\tfunction SkinnedMeshRender(owner){\n\t\t/**@private */\n\t\t//this._cacheAvatar=null;\n\t\t/**@private */\n\t\t//this._cacheMesh=null;\n\t\t/**@private */\n\t\t//this._cacheAnimationNode=null;\n\t\t/**@private */\n\t\t//this._cacheAnimationNodeIndex=null;\n\t\t/**@private */\n\t\t//this._subSkinnedDatas=null;\n\t\t/**@private */\n\t\t//this._localBoundingBoxCorners=null;\n\t\t/**@private */\n\t\t//this._localBoundBox=null;\n\t\t/**@private */\n\t\t//this._cacheAnimator=null;\n\t\t/**@private */\n\t\t//this._rootIndex=0;\n\t\t/**@private */\n\t\t//this._rootBone=null;\n\t\t/**用于裁剪的包围球。 */\n\t\t//this.localBoundSphere=null;\n\t\t//.......................................兼容代码........................................\n\t\tthis._hasIndependentBound=true;\n\t\tSkinnedMeshRender.__super.call(this,owner);\n\t\tthis._owner.transform.off(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatNeedChange);\n\t\tthis._cacheAnimationNodeIndex=[];\n\t\tthis._cacheAnimationNode=[];\n\t\tthis._localBoundingBoxCorners=__newvec(8,null);\n\t\t(this._owner).meshFilter.on(/*laya.events.Event.MESH_CHANGED*/\"meshchanged\",this,this._$3__onMeshChanged);\n\t}\n\n\t__class(SkinnedMeshRender,'laya.d3.core.SkinnedMeshRender',_super);\n\tvar __proto=SkinnedMeshRender.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._getCacheAnimationNodes=function(){\n\t\tvar meshBoneNames=this._cacheMesh._boneNames;\n\t\tvar binPoseCount=meshBoneNames.length;\n\t\tthis._cacheAnimationNode.length=binPoseCount;\n\t\tthis._cacheAnimationNodeIndex.length=binPoseCount;\n\t\tvar avatarNodes=this._cacheAnimator._avatarNodes;\n\t\tvar nodeMap=this._cacheAnimator._avatarNodeMap;\n\t\tfor (var i=0;i < binPoseCount;i++){\n\t\t\tvar node=nodeMap[meshBoneNames[i]];\n\t\t\tthis._cacheAnimationNode[i]=node;\n\t\t\tthis._cacheAnimationNodeIndex[i]=avatarNodes.indexOf(node);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._offComputeBoneIndexToMeshEvent=function(avatar,mesh){\n\t\tif (avatar.loaded){\n\t\t\tif (!mesh.loaded)\n\t\t\t\tmesh.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._getCacheAnimationNodes);\n\t\t\t}else {\n\t\t\tavatar.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._computeBoneIndexToMeshWithAsyncMesh);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._computeBoneIndexToMeshWithAsyncAvatar=function(){\n\t\tif (this._cacheAvatar.loaded)\n\t\t\tthis._computeBoneIndexToMeshWithAsyncMesh();\n\t\telse\n\t\tthis._cacheAvatar.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._computeBoneIndexToMeshWithAsyncMesh);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._computeBoneIndexToMeshWithAsyncMesh=function(){\n\t\tif (this._cacheMesh.loaded)\n\t\t\tthis._getCacheAnimationNodes();\n\t\telse\n\t\tthis._cacheMesh.on(/*laya.events.Event.LOADED*/\"loaded\",this,this._getCacheAnimationNodes);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._$3__onMeshChanged=function(meshFilter,lastMesh,mesh){\n\t\tthis._cacheMesh=mesh;\n\t\t(lastMesh && !lastMesh.loaded)&& (mesh.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._onMeshLoaded));\n\t\tif (mesh.loaded)\n\t\t\tthis._onMeshLoaded(mesh);\n\t\telse\n\t\tmesh.on(/*laya.events.Event.LOADED*/\"loaded\",this,this._onMeshLoaded);\n\t\tif (this._cacheAvatar){\n\t\t\t(lastMesh)&& (this._offComputeBoneIndexToMeshEvent(this._cacheAvatar,lastMesh));\n\t\t\t(mesh)&& (this._computeBoneIndexToMeshWithAsyncAvatar());\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onMeshLoaded=function(mesh){\n\t\tvar subMeshCount=mesh.subMeshCount;\n\t\tthis._subSkinnedDatas=[];\n\t\tthis._subSkinnedDatas.length=subMeshCount;\n\t\tfor (var i=0;i < subMeshCount;i++){\n\t\t\tvar subMeshDatas=this._subSkinnedDatas[i]=[];\n\t\t\tvar boneIndicesList=mesh.getSubMesh(i)._boneIndicesList;\n\t\t\tfor (var j=0,m=boneIndicesList.length;j < m;j++)\n\t\t\tsubMeshDatas[j]=new Float32Array(boneIndicesList[j].length *16);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setCacheAnimator=function(animator){\n\t\tthis._cacheAnimator=animator;\n\t\t(this._rootBone)&& (this._rootIndex=animator._avatarNodes.indexOf(animator._avatarNodeMap[this._rootBone]));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setRootBone=function(name){\n\t\tthis._rootBone=name;\n\t\t(this._cacheAnimator)&& (this._rootIndex=this._cacheAnimator._avatarNodes.indexOf(this._cacheAnimator._avatarNodeMap[name]));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._setCacheAvatar=function(value){\n\t\tif (this._cacheAvatar!==value){\n\t\t\tif (this._cacheMesh){\n\t\t\t\t(this._cacheAvatar)&& (this._offComputeBoneIndexToMeshEvent(this._cacheAvatar,this._cacheMesh));\n\t\t\t\tthis._cacheAvatar=value;\n\t\t\t\tif (value){\n\t\t\t\t\tthis._addShaderDefine(SkinnedMeshSprite3D.SHADERDEFINE_BONE);\n\t\t\t\t\tthis._computeBoneIndexToMeshWithAsyncAvatar();\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tthis._cacheAvatar=value;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._calculateBoundingBox=function(){\n\t\tif (this._hasIndependentBound){\n\t\t\tif (this._cacheAnimator){\n\t\t\t\tvar ownerTrans=this._owner.transform;\n\t\t\t\tvar ownWorMat=ownerTrans.worldMatrix;\n\t\t\t\tif (this._cacheAnimator._canCache){\n\t\t\t\t\tvar curAvatarAnimationDatas=this._cacheAnimator._curAvatarNodeDatas;\n\t\t\t\t\tUtils3D.matrix4x4MultiplyMFM((this._cacheAnimator.owner).transform.worldMatrix,curAvatarAnimationDatas[this._rootIndex],ownWorMat);\n\t\t\t\t\t}else {\n\t\t\t\t\tUtils3D.matrix4x4MultiplyMFM((this._cacheAnimator.owner).transform.worldMatrix,this._cacheAnimator._avatarNodeMap[this._rootBone].transform.getWorldMatrix(),ownWorMat);\n\t\t\t\t}\n\t\t\t\townerTrans.worldMatrix=ownWorMat;\n\t\t\t\tvar rootBone=this._cacheAnimator._avatarNodeMap[this._rootBone];\n\t\t\t\tif (rootBone==null || this._localBoundBox==null)\n\t\t\t\t\tthis._boundingBox.toDefault();\n\t\t\t\telse\n\t\t\t\tthis._calculateBoundBoxByInitCorners(this._localBoundingBoxCorners);\n\t\t\t}\n\t\t\t}else {\n\t\t\t_super.prototype._calculateBoundingBox.call(this);\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._calculateBoundingSphere=function(){\n\t\tif (this._hasIndependentBound){\n\t\t\tif (this._cacheAnimator){\n\t\t\t\tvar ownerTrans=this._owner.transform;\n\t\t\t\tvar ownWorMat=ownerTrans.worldMatrix;\n\t\t\t\tif (this._cacheAnimator._canCache){\n\t\t\t\t\tvar curAvatarAnimationDatas=this._cacheAnimator._curAvatarNodeDatas;\n\t\t\t\t\tUtils3D.matrix4x4MultiplyMFM((this._cacheAnimator.owner).transform.worldMatrix,curAvatarAnimationDatas[this._rootIndex],ownWorMat);\n\t\t\t\t}else\n\t\t\t\tUtils3D.matrix4x4MultiplyMFM((this._cacheAnimator.owner).transform.worldMatrix,this._cacheAnimator._avatarNodeMap[this._rootBone].transform.getWorldMatrix(),ownWorMat);\n\t\t\t\townerTrans.worldMatrix=ownWorMat;\n\t\t\t\tvar rootBone=this._cacheAnimator._avatarNodeMap[this._rootBone];\n\t\t\t\tif (rootBone==null || this.localBoundSphere==null)\n\t\t\t\t\tthis._boundingSphere.toDefault();\n\t\t\t\telse\n\t\t\t\tthis._calculateBoundingSphereByInitSphere(this.localBoundSphere);\n\t\t\t}\n\t\t\t}else {\n\t\t\t_super.prototype._calculateBoundingSphere.call(this);\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._updateOctreeNode=function(){\n\t\tvar treeNode=this._treeNode;\n\t\tif (treeNode){\n\t\t\ttreeNode.updateObject(this);\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._renderUpdate=function(projectionView){\n\t\tvar projViewWorld;\n\t\tvar animator=this._cacheAnimator;\n\t\tvar subMeshCount=this._cacheMesh.subMeshCount;\n\t\tvar ownerTrans=this._owner.transform;\n\t\tif (animator){\n\t\t\tvar cache=animator._canCache;\n\t\t\tvar curAvatarAnimationDatas=this._cacheAnimator._curAvatarNodeDatas;\n\t\t\tvar aniOwner=animator.owner;\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,aniOwner._transform.worldMatrix);\n\t\t\tprojViewWorld=aniOwner.getProjectionViewWorldMatrix(projectionView);\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projViewWorld);\n\t\t\tif (this._cacheMesh && this._cacheMesh.loaded && this._cacheAvatar && this._cacheAvatar.loaded){\n\t\t\t\tvar i=0,n=0;\n\t\t\t\tvar inverseBindPoses=this._cacheMesh._inverseBindPoses;\n\t\t\t\tvar skinnedDatas=this._cacheMesh._skinnedDatas;\n\t\t\t\tif (cache){\n\t\t\t\t\tfor (i=0,n=inverseBindPoses.length;i < n;i++)\n\t\t\t\t\tUtils3D._mulMatrixArray(curAvatarAnimationDatas[this._cacheAnimationNodeIndex[i]],inverseBindPoses[i],skinnedDatas,i *16);\n\t\t\t\t\t}else {\n\t\t\t\t\tfor (i=0,n=inverseBindPoses.length;i < n;i++)\n\t\t\t\t\tUtils3D._mulMatrixArray(this._cacheAnimationNode[i].transform.getWorldMatrix(),inverseBindPoses[i],skinnedDatas,i *16);\n\t\t\t\t}\n\t\t\t\tfor (i=0;i < subMeshCount;i++){\n\t\t\t\t\tvar boneIndicesList=this._cacheMesh.getSubMesh(i)._boneIndicesList;\n\t\t\t\t\tvar boneIndicesCount=boneIndicesList.length;\n\t\t\t\t\tvar subSkinnedDatas=this._subSkinnedDatas[i];\n\t\t\t\t\tfor (var j=0;j < boneIndicesCount;j++)\n\t\t\t\t\tSkinnedMeshRender._splitAnimationDatas(boneIndicesList[j],skinnedDatas,subSkinnedDatas[j]);\n\t\t\t\t\t(this._renderElements [i])._skinAnimationDatas=subSkinnedDatas;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.WORLDMATRIX*/0,ownerTrans.worldMatrix);\n\t\t\tprojViewWorld=this._owner.getProjectionViewWorldMatrix(projectionView);\n\t\t\tthis._setShaderValueMatrix4x4(/*laya.d3.core.Sprite3D.MVPMATRIX*/1,projViewWorld);\n\t\t}\n\t\tif (Laya3D.debugMode)\n\t\t\tthis._renderRenderableBoundBox();\n\t\treturn true;\n\t}\n\n\t/**\n\t*设置包围球。\n\t*@param value\n\t*/\n\t/**\n\t*获取包围球。\n\t*@return 包围球。\n\t*/\n\t__getset(0,__proto,'localBoundBox',function(){\n\t\treturn this._localBoundBox;\n\t\t},function(value){\n\t\tthis._localBoundBox=value;\n\t\tvalue.getCorners(this._localBoundingBoxCorners);\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'boundingSphere',function(){\n\t\tthis._calculateBoundingSphere();\n\t\treturn this._boundingSphere;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'boundingBox',function(){\n\t\tthis._calculateBoundingBox();\n\t\treturn this._boundingBox;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'boundingBoxCenter',function(){\n\t\tvar boundBox=this.boundingBox;\n\t\tVector3.add(boundBox.min,boundBox.max,this._boundingBoxCenter);\n\t\tVector3.scale(this._boundingBoxCenter,0.5,this._boundingBoxCenter);\n\t\treturn this._boundingBoxCenter;\n\t});\n\n\tSkinnedMeshRender._splitAnimationDatas=function(indices,bonesData,subAnimationDatas){\n\t\tfor (var i=0,n=indices.length,ii=0;i < n;i++){\n\t\t\tvar index=indices[i] << 4;\n\t\t\tfor (var j=0;j < 16;j++,ii++)\n\t\t\tsubAnimationDatas[ii]=bonesData[index+j];\n\t\t}\n\t}\n\n\treturn SkinnedMeshRender;\n})(MeshRender)\n\n\n/**\n*<code>BaseCamera</code> 类用于创建摄像机的父类。\n*/\n//class laya.d3.core.BaseCamera extends laya.d3.core.Sprite3D\nvar BaseCamera=(function(_super){\n\tfunction BaseCamera(nearPlane,farPlane){\n\t\t/**@private */\n\t\t//this._tempVector3=null;\n\t\t/**@private 位置。*/\n\t\t//this._position=null;\n\t\t/**@private 向上向量。*/\n\t\t//this._up=null;\n\t\t/**@private 前向量。*/\n\t\t//this._forward=null;\n\t\t/**@private 右向量。*/\n\t\t//this._right=null;\n\t\t/**@private 渲染顺序。*/\n\t\t//this._renderingOrder=0;\n\t\t/**@private 渲染目标尺寸。*/\n\t\t//this._renderTargetSize=null;\n\t\t/**@private 近裁剪面。*/\n\t\t//this._nearPlane=NaN;\n\t\t/**@private 远裁剪面。*/\n\t\t//this._farPlane=NaN;\n\t\t/**@private 视野。*/\n\t\t//this._fieldOfView=NaN;\n\t\t/**@private 正交投影的垂直尺寸。*/\n\t\t//this._orthographicVerticalSize=NaN;\n\t\t/**@private 天空。*/\n\t\t//this._sky=null;\n\t\t/**@private */\n\t\t//this._orthographic=false;\n\t\t/**@private 渲染目标。*/\n\t\t//this._renderTarget=null;\n\t\t/**@private 是否使用用户自定义投影矩阵，如果使用了用户投影矩阵，摄像机投影矩阵相关的参数改变则不改变投影矩阵的值，需调用ResetProjectionMatrix方法。*/\n\t\t//this._useUserProjectionMatrix=false;\n\t\t/**@private 表明视口是否使用裁剪空间表达。*/\n\t\t//this._viewportExpressedInClipSpace=false;\n\t\t/**清楚标记。*/\n\t\t//this.clearFlag=0;\n\t\t/**摄像机的清除颜色。*/\n\t\t//this.clearColor=null;\n\t\t/**可视遮罩图层。 */\n\t\t//this.cullingMask=0;\n\t\t/**渲染时是否用遮挡剔除。 */\n\t\t//this.useOcclusionCulling=false;\n\t\tBaseCamera.__super.call(this);\n\t\t(nearPlane===void 0)&& (nearPlane=0.3);\n\t\t(farPlane===void 0)&& (farPlane=1000);\n\t\tthis._tempVector3=new Vector3();\n\t\tthis._position=new Vector3();\n\t\tthis._up=new Vector3();\n\t\tthis._forward=new Vector3();\n\t\tthis._right=new Vector3();\n\t\tthis._fieldOfView=60;\n\t\tthis._useUserProjectionMatrix=false;\n\t\tthis._orthographic=false;\n\t\tthis._viewportExpressedInClipSpace=true;\n\t\tthis._renderTargetSize=Size.fullScreen;\n\t\tthis._orthographicVerticalSize=10;\n\t\tthis.renderingOrder=0;\n\t\tthis._nearPlane=nearPlane;\n\t\tthis._farPlane=farPlane;\n\t\tthis.cullingMask=2147483647;\n\t\tthis.clearFlag=/*CLASS CONST:laya.d3.core.BaseCamera.CLEARFLAG_SOLIDCOLOR*/0;\n\t\tthis.useOcclusionCulling=true;\n\t\tthis._calculateProjectionMatrix();\n\t\tLaya.stage.on(/*laya.events.Event.RESIZE*/\"resize\",this,this._onScreenSizeChanged);\n\t}\n\n\t__class(BaseCamera,'laya.d3.core.BaseCamera',_super);\n\tvar __proto=BaseCamera.prototype;\n\t/**\n\t*通过RenderingOrder属性对摄像机机型排序。\n\t*/\n\t__proto._sortCamerasByRenderingOrder=function(){\n\t\tif (this._displayedInStage){\n\t\t\tvar cameraPool=this.scene._cameraPool;\n\t\t\tvar n=cameraPool.length-1;\n\t\t\tfor (var i=0;i < n;i++){\n\t\t\t\tif (cameraPool[i].renderingOrder > cameraPool[n].renderingOrder){\n\t\t\t\t\tvar tempCamera=cameraPool[i];\n\t\t\t\t\tcameraPool[i]=cameraPool[n];\n\t\t\t\t\tcameraPool[n]=tempCamera;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._calculateProjectionMatrix=function(){}\n\t/**\n\t*@private\n\t*/\n\t__proto._onScreenSizeChanged=function(){\n\t\tthis._calculateProjectionMatrix();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._prepareCameraToRender=function(){\n\t\tLayer._currentCameraCullingMask=this.cullingMask;\n\t\tvar cameraSV=this._shaderValues;\n\t\tcameraSV.setValue(/*CLASS CONST:laya.d3.core.BaseCamera.CAMERAPOS*/0,this.transform.position.elements);\n\t\tcameraSV.setValue(/*CLASS CONST:laya.d3.core.BaseCamera.CAMERADIRECTION*/5,this.forward.elements);\n\t\tcameraSV.setValue(/*CLASS CONST:laya.d3.core.BaseCamera.CAMERAUP*/6,this.up.elements);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._prepareCameraViewProject=function(viewMatrix,projectMatrix){\n\t\tvar cameraSV=this._shaderValues;\n\t\tcameraSV.setValue(/*CLASS CONST:laya.d3.core.BaseCamera.VIEWMATRIX*/1,viewMatrix.elements);\n\t\tcameraSV.setValue(/*CLASS CONST:laya.d3.core.BaseCamera.PROJECTMATRIX*/2,projectMatrix.elements);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._renderCamera=function(gl,state,scene){}\n\t/**\n\t*增加可视图层。\n\t*@param layer 图层。\n\t*/\n\t__proto.addLayer=function(layer){\n\t\tif (layer.number===29 || layer.number==30)\n\t\t\treturn;\n\t\tthis.cullingMask=this.cullingMask | layer.mask;\n\t}\n\n\t/**\n\t*移除可视图层。\n\t*@param layer 图层。\n\t*/\n\t__proto.removeLayer=function(layer){\n\t\tif (layer.number===29 || layer.number==30)\n\t\t\treturn;\n\t\tthis.cullingMask=this.cullingMask & ~layer.mask;\n\t}\n\n\t/**\n\t*增加所有图层。\n\t*/\n\t__proto.addAllLayers=function(){\n\t\tthis.cullingMask=2147483647;\n\t}\n\n\t/**\n\t*移除所有图层。\n\t*/\n\t__proto.removeAllLayers=function(){\n\t\tthis.cullingMask=0 | Layer.getLayerByNumber(29).mask | Layer.getLayerByNumber(30).mask;\n\t}\n\n\t__proto.ResetProjectionMatrix=function(){\n\t\tthis._useUserProjectionMatrix=false;\n\t\tthis._calculateProjectionMatrix();\n\t}\n\n\t/**\n\t*向前移动。\n\t*@param distance 移动距离。\n\t*/\n\t__proto.moveForward=function(distance){\n\t\tthis._tempVector3.elements[0]=this._tempVector3.elements[1]=0;\n\t\tthis._tempVector3.elements[2]=distance;\n\t\tthis.transform.translate(this._tempVector3);\n\t}\n\n\t/**\n\t*向右移动。\n\t*@param distance 移动距离。\n\t*/\n\t__proto.moveRight=function(distance){\n\t\tthis._tempVector3.elements[1]=this._tempVector3.elements[2]=0;\n\t\tthis._tempVector3.elements[0]=distance;\n\t\tthis.transform.translate(this._tempVector3);\n\t}\n\n\t/**\n\t*向上移动。\n\t*@param distance 移动距离。\n\t*/\n\t__proto.moveVertical=function(distance){\n\t\tthis._tempVector3.elements[0]=this._tempVector3.elements[2]=0;\n\t\tthis._tempVector3.elements[1]=distance;\n\t\tthis.transform.translate(this._tempVector3,false);\n\t}\n\n\t//}// BoundingFrustumWorldSpace\n\t__proto._addSelfRenderObjects=function(){\n\t\tvar cameraPool=this.scene._cameraPool;\n\t\tvar cmaeraCount=cameraPool.length;\n\t\tif (cmaeraCount > 0){\n\t\t\tfor (var i=cmaeraCount-1;i >=0;i--){\n\t\t\t\tif (this.renderingOrder <=cameraPool[i].renderingOrder){\n\t\t\t\t\tcameraPool.splice(i+1,0,this);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tcameraPool.push(this);\n\t\t\tif (this.scene.conchModel){\n\t\t\t\tthis.scene.conchModel.setCurrentCamera(this.conchModel);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._clearSelfRenderObjects=function(){\n\t\tvar cameraPool=this.scene._cameraPool;\n\t\tcameraPool.splice(cameraPool.indexOf(this),1);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t(this._sky)&& (this._sky.destroy());\n\t\tthis.renderTarget=null;\n\t\tLaya.stage.off(/*laya.events.Event.RESIZE*/\"resize\",this,this._onScreenSizeChanged);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t}\n\n\t/**设置天空。*/\n\t/**获取天空。*/\n\t__getset(0,__proto,'sky',function(){\n\t\treturn this._sky;\n\t\t},function(value){\n\t\tthis._sky=value;\n\t\tvalue._ownerCamera=this;\n\t});\n\n\t/**\n\t*获取前向量。\n\t*@return 前向量。\n\t*/\n\t__getset(0,__proto,'forward',function(){\n\t\tvar worldMatrixe=this.transform.worldMatrix.elements;\n\t\tvar forwarde=this._forward.elements;\n\t\tforwarde[0]=-worldMatrixe[8];\n\t\tforwarde[1]=-worldMatrixe[9];\n\t\tforwarde[2]=-worldMatrixe[10];\n\t\treturn this._forward;\n\t});\n\n\t/**获取位置。*/\n\t__getset(0,__proto,'position',function(){\n\t\tvar worldMatrixe=this.transform.worldMatrix.elements;\n\t\tvar positione=this._position.elements;\n\t\tpositione[0]=worldMatrixe[12];\n\t\tpositione[1]=worldMatrixe[13];\n\t\tpositione[2]=worldMatrixe[14];\n\t\treturn this._position;\n\t});\n\n\t/**\n\t*设置渲染场景的渲染目标。\n\t*@param value 渲染场景的渲染目标。\n\t*/\n\t/**\n\t*获取渲染场景的渲染目标。\n\t*@return 渲染场景的渲染目标。\n\t*/\n\t__getset(0,__proto,'renderTarget',function(){\n\t\treturn this._renderTarget;\n\t\t},function(value){\n\t\tthis._renderTarget=value;\n\t\tif (value !=null)\n\t\t\tthis._renderTargetSize=value.size;\n\t});\n\n\t/**\n\t*获取上向量。\n\t*@return 上向量。\n\t*/\n\t__getset(0,__proto,'up',function(){\n\t\tvar worldMatrixe=this.transform.worldMatrix.elements;\n\t\tvar upe=this._up.elements;\n\t\tupe[0]=worldMatrixe[4];\n\t\tupe[1]=worldMatrixe[5];\n\t\tupe[2]=worldMatrixe[6];\n\t\treturn this._up;\n\t});\n\n\t/**\n\t*获取右向量。\n\t*@return 右向量。\n\t*/\n\t__getset(0,__proto,'right',function(){\n\t\tvar worldMatrixe=this.transform.worldMatrix.elements;\n\t\tvar righte=this._right.elements;\n\t\trighte[0]=worldMatrixe[0];\n\t\trighte[1]=worldMatrixe[1];\n\t\trighte[2]=worldMatrixe[2];\n\t\treturn this._right;\n\t});\n\n\t/**\n\t*设置渲染目标的尺寸\n\t*@param value 渲染目标的尺寸。\n\t*/\n\t/**\n\t*获取渲染目标的尺寸\n\t*@return 渲染目标的尺寸。\n\t*/\n\t__getset(0,__proto,'renderTargetSize',function(){\n\t\treturn this._renderTargetSize;\n\t\t},function(value){\n\t\tif (this.renderTarget !=null && this._renderTargetSize !=value){}\n\t\t\tthis._renderTargetSize=value;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*设置视野。\n\t*@param value 视野。\n\t*/\n\t/**\n\t*获取视野。\n\t*@return 视野。\n\t*/\n\t__getset(0,__proto,'fieldOfView',function(){\n\t\treturn this._fieldOfView;\n\t\t},function(value){\n\t\tthis._fieldOfView=value;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*设置近裁面。\n\t*@param value 近裁面。\n\t*/\n\t/**\n\t*获取近裁面。\n\t*@return 近裁面。\n\t*/\n\t__getset(0,__proto,'nearPlane',function(){\n\t\treturn this._nearPlane;\n\t\t},function(value){\n\t\tthis._nearPlane=value;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*设置远裁面。\n\t*@param value 远裁面。\n\t*/\n\t/**\n\t*获取远裁面。\n\t*@return 远裁面。\n\t*/\n\t__getset(0,__proto,'farPlane',function(){\n\t\treturn this._farPlane;\n\t\t},function(vaule){\n\t\tthis._farPlane=vaule;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*设置是否正交投影矩阵。\n\t*@param 是否正交投影矩阵。\n\t*/\n\t/**\n\t*获取是否正交投影矩阵。\n\t*@return 是否正交投影矩阵。\n\t*/\n\t__getset(0,__proto,'orthographic',function(){\n\t\treturn this._orthographic;\n\t\t},function(vaule){\n\t\tthis._orthographic=vaule;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*设置正交投影垂直矩阵尺寸。\n\t*@param 正交投影垂直矩阵尺寸。\n\t*/\n\t/**\n\t*获取正交投影垂直矩阵尺寸。\n\t*@return 正交投影垂直矩阵尺寸。\n\t*/\n\t__getset(0,__proto,'orthographicVerticalSize',function(){\n\t\treturn this._orthographicVerticalSize;\n\t\t},function(vaule){\n\t\tthis._orthographicVerticalSize=vaule;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t__getset(0,__proto,'renderingOrder',function(){\n\t\treturn this._renderingOrder;\n\t\t},function(value){\n\t\tthis._renderingOrder=value;\n\t\tthis._sortCamerasByRenderingOrder();\n\t});\n\n\tBaseCamera.CAMERAPOS=0;\n\tBaseCamera.VIEWMATRIX=1;\n\tBaseCamera.PROJECTMATRIX=2;\n\tBaseCamera.VPMATRIX=3;\n\tBaseCamera.VPMATRIX_NO_TRANSLATE=4;\n\tBaseCamera.CAMERADIRECTION=5;\n\tBaseCamera.CAMERAUP=6;\n\tBaseCamera.ENVIRONMENTDIFFUSE=7;\n\tBaseCamera.ENVIRONMENTSPECULAR=8;\n\tBaseCamera.SIMLODINFO=9;\n\tBaseCamera.DIFFUSEIRRADMATR=10;\n\tBaseCamera.DIFFUSEIRRADMATG=11;\n\tBaseCamera.DIFFUSEIRRADMATB=12;\n\tBaseCamera.HDREXPOSURE=13;\n\tBaseCamera.RENDERINGTYPE_DEFERREDLIGHTING=\"DEFERREDLIGHTING\";\n\tBaseCamera.RENDERINGTYPE_FORWARDRENDERING=\"FORWARDRENDERING\";\n\tBaseCamera.CLEARFLAG_SOLIDCOLOR=0;\n\tBaseCamera.CLEARFLAG_SKY=1;\n\tBaseCamera.CLEARFLAG_DEPTHONLY=2;\n\tBaseCamera.CLEARFLAG_NONE=3;\n\t__static(BaseCamera,\n\t['_invertYScaleMatrix',function(){return this._invertYScaleMatrix=new Matrix4x4(1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,1);},'_invertYProjectionMatrix',function(){return this._invertYProjectionMatrix=new Matrix4x4();},'_invertYProjectionViewMatrix',function(){return this._invertYProjectionViewMatrix=new Matrix4x4();}\n\t]);\n\treturn BaseCamera;\n})(Sprite3D)\n\n\n/**\n*<code>RenderableSprite3D</code> 类用于可渲染3D精灵的父类，抽象类不允许实例。\n*/\n//class laya.d3.core.RenderableSprite3D extends laya.d3.core.Sprite3D\nvar RenderableSprite3D=(function(_super){\n\tfunction RenderableSprite3D(name){\n\t\t/**@private */\n\t\tthis._render=null;\n\t\t/**@private */\n\t\tthis._geometryFilter=null;\n\t\tRenderableSprite3D.__super.call(this,name)\n\t}\n\n\t__class(RenderableSprite3D,'laya.d3.core.RenderableSprite3D',_super);\n\tvar __proto=RenderableSprite3D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._addToInitStaticBatchManager=function(){}\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._setBelongScene=function(scene){\n\t\t_super.prototype._setBelongScene.call(this,scene);\n\t\tscene._renderableSprite3Ds.push(this);\n\t\tthis._render._applyLightMapParams();\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._setUnBelongScene=function(){\n\t\tvar renderableSprite3Ds=this._scene._renderableSprite3Ds;\n\t\tvar index=renderableSprite3Ds.indexOf(this);\n\t\trenderableSprite3Ds.splice(index,1);\n\t\tthis._render._removeShaderDefine(laya.d3.core.RenderableSprite3D.SAHDERDEFINE_LIGHTMAP);\n\t\t_super.prototype._setUnBelongScene.call(this);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._update=function(state){\n\t\tstate.owner=this;\n\t\tif (this._activeInHierarchy){\n\t\t\tthis._updateComponents(state);\n\t\t\tthis._render._updateOctreeNode();\n\t\t\tthis._lateUpdateComponents(state);\n\t\t\tStat.spriteCount++;\n\t\t\tthis._childs.length && this._updateChilds(state);\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._render._destroy();\n\t\tthis._render=null;\n\t}\n\n\tRenderableSprite3D.__init__=function(){\n\t\tRenderableSprite3D.SHADERDEFINE_SCALEOFFSETLIGHTINGMAPUV=RenderableSprite3D.shaderDefines.registerDefine(\"SCALEOFFSETLIGHTINGMAPUV\");\n\t\tRenderableSprite3D.SAHDERDEFINE_LIGHTMAP=RenderableSprite3D.shaderDefines.registerDefine(\"LIGHTMAP\");\n\t}\n\n\tRenderableSprite3D.SHADERDEFINE_SCALEOFFSETLIGHTINGMAPUV=0x2;\n\tRenderableSprite3D.SAHDERDEFINE_LIGHTMAP=0x4;\n\tRenderableSprite3D.LIGHTMAPSCALEOFFSET=2;\n\tRenderableSprite3D.LIGHTMAP=3;\n\t__static(RenderableSprite3D,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1();}\n\t]);\n\treturn RenderableSprite3D;\n})(Sprite3D)\n\n\n/**\n*<code>LightSprite</code> 类用于创建灯光的父类。\n*/\n//class laya.d3.core.light.LightSprite extends laya.d3.core.Sprite3D\nvar LightSprite=(function(_super){\n\tfunction LightSprite(){\n\t\t/**@private */\n\t\tthis._intensityColor=null;\n\t\t/**@private */\n\t\tthis._intensity=NaN;\n\t\t/**@private */\n\t\tthis._shadow=false;\n\t\t/**@private */\n\t\tthis._shadowFarPlane=0;\n\t\t/**@private */\n\t\tthis._shadowMapSize=0;\n\t\t/**@private */\n\t\tthis._shadowMapCount=0;\n\t\t/**@private */\n\t\tthis._shadowMapPCFType=0;\n\t\t/**@private */\n\t\tthis._parallelSplitShadowMap=null;\n\t\t/**@private */\n\t\tthis._lightmapBakedType=0;\n\t\t/**灯光颜色。 */\n\t\tthis.color=null;\n\t\tLightSprite.__super.call(this);\n\t\tthis._intensity=1.0;\n\t\tthis._intensityColor=new Vector3();\n\t\tthis.color=new Vector3(1.0,1.0,1.0);\n\t\tthis._shadow=false;\n\t\tthis._shadowFarPlane=8;\n\t\tthis._shadowMapSize=512;\n\t\tthis._shadowMapCount=1;\n\t\tthis._shadowMapPCFType=0;\n\t\tthis._lightmapBakedType=LightSprite.LIGHTMAPBAKEDTYPE_REALTIME;\n\t}\n\n\t__class(LightSprite,'laya.d3.core.light.LightSprite',_super);\n\tvar __proto=LightSprite.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,nodeData){\n\t\tvar colorData=customProps.color;\n\t\tvar colorE=this.color.elements;\n\t\tcolorE[0]=colorData[0];\n\t\tcolorE[1]=colorData[1];\n\t\tcolorE[2]=colorData[2];\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._addSelfRenderObjects=function(){\n\t\t(this.lightmapBakedType!==LightSprite.LIGHTMAPBAKEDTYPE_BAKED)&& (this._scene._addLight(this));\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._clearSelfRenderObjects=function(){\n\t\t(this.lightmapBakedType!==LightSprite.LIGHTMAPBAKEDTYPE_BAKED)&& (this._scene._removeLight(this));\n\t}\n\n\t/**\n\t*更新灯光相关渲染状态参数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._prepareToScene=function(state){\n\t\treturn false;\n\t}\n\n\t/**\n\t*设置灯光烘培类型。\n\t*/\n\t/**\n\t*获取灯光烘培类型。\n\t*/\n\t__getset(0,__proto,'lightmapBakedType',function(){\n\t\treturn this._lightmapBakedType;\n\t\t},function(value){\n\t\tif (this._lightmapBakedType!==value){\n\t\t\tthis._lightmapBakedType=value;\n\t\t\tif (this._activeInHierarchy){\n\t\t\t\tif (value!==LightSprite.LIGHTMAPBAKEDTYPE_BAKED)\n\t\t\t\t\tthis._scene._addLight(this);\n\t\t\t\telse\n\t\t\t\tthis._scene._removeLight(this);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*设置阴影PCF类型。\n\t*@param value PCF类型。\n\t*/\n\t/**\n\t*获取阴影PCF类型。\n\t*@return PCF类型。\n\t*/\n\t__getset(0,__proto,'shadowPCFType',function(){\n\t\treturn this._shadowMapPCFType;\n\t\t},function(value){\n\t\tthis._shadowMapPCFType=value;\n\t\t(this._parallelSplitShadowMap)&& (this._parallelSplitShadowMap.setPCFType(value));\n\t});\n\n\t/**\n\t*设置灯光强度。\n\t*@param value 灯光强度\n\t*/\n\t/**\n\t*获取灯光强度。\n\t*@return 灯光强度\n\t*/\n\t__getset(0,__proto,'intensity',function(){\n\t\treturn this._intensity;\n\t\t},function(value){\n\t\tthis._intensity=value;\n\t});\n\n\t/**\n\t*设置是否产生阴影。\n\t*@param value 是否产生阴影。\n\t*/\n\t/**\n\t*获取是否产生阴影。\n\t*@return 是否产生阴影。\n\t*/\n\t__getset(0,__proto,'shadow',function(){\n\t\treturn this._shadow;\n\t\t},function(value){\n\t\tthrow new Error(\"LightSprite: must override it.\");\n\t});\n\n\t/**\n\t*设置阴影最远范围。\n\t*@param value 阴影最远范围。\n\t*/\n\t/**\n\t*获取阴影最远范围。\n\t*@return 阴影最远范围。\n\t*/\n\t__getset(0,__proto,'shadowDistance',function(){\n\t\treturn this._shadowFarPlane;\n\t\t},function(value){\n\t\tthis._shadowFarPlane=value;\n\t\t(this._parallelSplitShadowMap)&& (this._parallelSplitShadowMap.setFarDistance(value));\n\t});\n\n\t/**\n\t*设置阴影分段数。\n\t*@param value 阴影分段数。\n\t*/\n\t/**\n\t*获取阴影分段数。\n\t*@return 阴影分段数。\n\t*/\n\t__getset(0,__proto,'shadowPSSMCount',function(){\n\t\treturn this._shadowMapCount;\n\t\t},function(value){\n\t\tthis._shadowMapCount=value;\n\t\t(this._parallelSplitShadowMap)&& (this._parallelSplitShadowMap.PSSMNum=value);\n\t});\n\n\t/**\n\t*设置阴影贴图尺寸。\n\t*@param value 阴影贴图尺寸。\n\t*/\n\t/**\n\t*获取阴影贴图尺寸。\n\t*@return 阴影贴图尺寸。\n\t*/\n\t__getset(0,__proto,'shadowResolution',function(){\n\t\treturn this._shadowMapSize;\n\t\t},function(value){\n\t\tthis._shadowMapSize=value;\n\t\t(this._parallelSplitShadowMap)&& (this._parallelSplitShadowMap.setShadowMapTextureSize(value));\n\t});\n\n\t/**\n\t*设置灯光的漫反射颜色。\n\t*@param value 灯光的漫反射颜色。\n\t*/\n\t/**\n\t*获取灯光的漫反射颜色。\n\t*@return 灯光的漫反射颜色。\n\t*/\n\t__getset(0,__proto,'diffuseColor',function(){\n\t\tconsole.log(\"LightSprite: discard property,please use color property instead.\");\n\t\treturn this.color;\n\t\t},function(value){\n\t\tconsole.log(\"LightSprite: discard property,please use color property instead.\");\n\t\tthis.color=value;\n\t});\n\n\tLightSprite.LIGHTMAPBAKEDTYPE_REALTIME=0;\n\tLightSprite.LIGHTMAPBAKEDTYPE_MIXED=1;\n\tLightSprite.LIGHTMAPBAKEDTYPE_BAKED=2;\n\treturn LightSprite;\n})(Sprite3D)\n\n\n/**\n*<code>Terrain</code> 类用于创建地块。\n*/\n//class laya.d3.terrain.Terrain extends laya.d3.core.Sprite3D\nvar Terrain=(function(_super){\n\tfunction Terrain(terrainRes){\n\t\tthis._terrainRes=null;\n\t\tthis._lightmapScaleOffset=null;\n\t\tTerrain.__super.call(this);\n\t\tthis._lightmapScaleOffset=new Vector4(1,1,0,0);\n\t\tif (terrainRes){\n\t\t\tthis._terrainRes=terrainRes;\n\t\t\tif (terrainRes.loaded)\n\t\t\t\tthis.buildTerrain(terrainRes);\n\t\t\telse\n\t\t\tterrainRes.once(/*laya.events.Event.LOADED*/\"loaded\",this,this.buildTerrain);\n\t\t}\n\t}\n\n\t__class(Terrain,'laya.d3.terrain.Terrain',_super);\n\tvar __proto=Terrain.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,json){\n\t\tthis.terrainRes=Loader.getRes(innerResouMap[customProps.dataPath]);\n\t\tvar lightmapIndex=customProps.lightmapIndex;\n\t\tif (lightmapIndex !=null)\n\t\t\tthis.setLightmapIndex(lightmapIndex);\n\t\tvar lightmapScaleOffsetArray=customProps.lightmapScaleOffset;\n\t\tif (lightmapScaleOffsetArray)\n\t\t\tthis.setLightmapScaleOffset(new Vector4(lightmapScaleOffsetArray[0],lightmapScaleOffsetArray[1],lightmapScaleOffsetArray[2],lightmapScaleOffsetArray[3]));\n\t}\n\n\t__proto.setLightmapIndex=function(value){\n\t\tfor (var i=0;i < this._childs.length;i++){\n\t\t\tvar terrainChunk=this._childs[i];\n\t\t\tterrainChunk.terrainRender.lightmapIndex=value;\n\t\t}\n\t}\n\n\t__proto.setLightmapScaleOffset=function(value){\n\t\tif (!value)return;\n\t\tvalue.cloneTo(this._lightmapScaleOffset);\n\t\tfor (var i=0;i < this._childs.length;i++){\n\t\t\tvar terrainChunk=this._childs[i];\n\t\t\tterrainChunk.terrainRender.lightmapScaleOffset=this._lightmapScaleOffset;\n\t\t}\n\t}\n\n\t__proto.disableLight=function(){\n\t\tfor (var i=0,n=this._childs.length;i < n;i++){\n\t\t\tvar terrainChunk=this._childs[i];\n\t\t\tfor (var j=0,m=terrainChunk._render.sharedMaterials.length;j < m;j++){\n\t\t\t\tvar terrainMaterial=terrainChunk._render.sharedMaterials [j];\n\t\t\t\tterrainMaterial.disableLight();\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.buildTerrain=function(terrainRes){\n\t\tvar chunkNumX=terrainRes._chunkNumX;\n\t\tvar chunkNumZ=terrainRes._chunkNumZ;\n\t\tvar heightData=terrainRes._heightData;\n\t\tvar n=0;\n\t\tfor (var i=0;i < chunkNumZ;i++){\n\t\t\tfor (var j=0;j < chunkNumX;j++){\n\t\t\t\tvar terrainChunk=new TerrainChunk(j,i,terrainRes._gridSize,heightData._terrainHeightData,heightData._width,heightData._height,terrainRes._cameraCoordinateInverse);\n\t\t\t\tvar chunkInfo=terrainRes._chunkInfos[n++];\n\t\t\t\tfor (var k=0;k < chunkInfo.alphaMap.length;k++){\n\t\t\t\t\tvar nNum=chunkInfo.detailID[k].length;\n\t\t\t\t\tvar sDetialTextureUrl1=(nNum > 0)? terrainRes._detailTextureInfos[chunkInfo.detailID[k][0]].diffuseTexture :null;\n\t\t\t\t\tvar sDetialTextureUrl2=(nNum > 1)? terrainRes._detailTextureInfos[chunkInfo.detailID[k][1]].diffuseTexture :null;\n\t\t\t\t\tvar sDetialTextureUrl3=(nNum > 2)? terrainRes._detailTextureInfos[chunkInfo.detailID[k][2]].diffuseTexture :null;\n\t\t\t\t\tvar sDetialTextureUrl4=(nNum > 3)? terrainRes._detailTextureInfos[chunkInfo.detailID[k][3]].diffuseTexture :null;\n\t\t\t\t\tvar detialScale1=(nNum > 0)? terrainRes._detailTextureInfos[chunkInfo.detailID[k][0]].scale :null;\n\t\t\t\t\tvar detialScale2=(nNum > 1)? terrainRes._detailTextureInfos[chunkInfo.detailID[k][1]].scale :null;\n\t\t\t\t\tvar detialScale3=(nNum > 2)? terrainRes._detailTextureInfos[chunkInfo.detailID[k][2]].scale :null;\n\t\t\t\t\tvar detialScale4=(nNum > 3)? terrainRes._detailTextureInfos[chunkInfo.detailID[k][3]].scale :null;\n\t\t\t\t\tterrainChunk.buildRenderElementAndMaterial(nNum,chunkInfo.normalMap,chunkInfo.alphaMap[k],sDetialTextureUrl1,sDetialTextureUrl2,sDetialTextureUrl3,sDetialTextureUrl4,terrainRes._materialInfo.ambientColor,terrainRes._materialInfo.diffuseColor,terrainRes._materialInfo.specularColor,detialScale1 ? detialScale1.x :1,detialScale1 ? detialScale1.y :1,detialScale2 ? detialScale2.x :1,detialScale2 ? detialScale2.y :1,detialScale3 ? detialScale3.x :1,detialScale3 ? detialScale3.y :1,detialScale4 ? detialScale4.x :1,detialScale4 ? detialScale4.y :1);\n\t\t\t\t}\n\t\t\t\tterrainChunk.terrainRender.receiveShadow=true;\n\t\t\t\tterrainChunk.terrainRender.lightmapScaleOffset=this._lightmapScaleOffset;\n\t\t\t\tthis.addChild(terrainChunk);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*获取地形X轴长度。\n\t*@return 地形X轴长度。\n\t*/\n\t__proto.width=function(){\n\t\treturn this._terrainRes._chunkNumX *TerrainLeaf.CHUNK_GRID_NUM *this._terrainRes._gridSize;\n\t}\n\n\t/**\n\t*获取地形Z轴长度。\n\t*@return 地形Z轴长度。\n\t*/\n\t__proto.depth=function(){\n\t\treturn this._terrainRes._chunkNumZ *TerrainLeaf.CHUNK_GRID_NUM *this._terrainRes._gridSize;\n\t}\n\n\t/**\n\t*获取地形高度。\n\t*@param x X轴坐标。\n\t*@param z Z轴坐标。\n\t*/\n\t__proto.getHeightXZ=function(x,z){\n\t\tif (!this._terrainRes || !this._terrainRes.loaded)\n\t\t\treturn NaN;\n\t\tx-=this.transform.position.x;\n\t\tz-=this.transform.position.z;\n\t\tif (!Terrain.__VECTOR3__){\n\t\t\tTerrain.__VECTOR3__=new Vector3();\n\t\t}\n\t\tTerrain.__VECTOR3__.elements[0]=x;\n\t\tTerrain.__VECTOR3__.elements[1]=0;\n\t\tTerrain.__VECTOR3__.elements[2]=z;\n\t\tVector3.transformV3ToV3(Terrain.__VECTOR3__,TerrainLeaf.__ADAPT_MATRIX_INV__,Terrain.__VECTOR3__);\n\t\tx=Terrain.__VECTOR3__.elements[0];\n\t\tz=Terrain.__VECTOR3__.elements[2];\n\t\tif (x < 0 || x > this.width()|| z < 0 || z > this.depth())\n\t\t\treturn NaN;\n\t\tvar gridSize=this._terrainRes._gridSize;\n\t\tvar nIndexX=parseInt(\"\"+x / gridSize);\n\t\tvar nIndexZ=parseInt(\"\"+z / gridSize);\n\t\tvar offsetX=x-nIndexX *gridSize;\n\t\tvar offsetZ=z-nIndexZ *gridSize;\n\t\tvar h1=NaN;\n\t\tvar h2=NaN;\n\t\tvar h3=NaN;\n\t\tvar u=NaN;\n\t\tvar v=NaN;\n\t\tvar heightData=this._terrainRes._heightData;\n\t\tif (offsetX+offsetZ > gridSize){\n\t\t\th1=heightData._terrainHeightData[(nIndexZ+1-1)*heightData._width+nIndexX+1];\n\t\t\th2=heightData._terrainHeightData[(nIndexZ+1-1)*heightData._width+nIndexX];\n\t\t\th3=heightData._terrainHeightData[(nIndexZ-1)*heightData._width+nIndexX+1];\n\t\t\tu=(gridSize-offsetX)/ gridSize;\n\t\t\tv=(gridSize-offsetZ)/ gridSize;\n\t\t\treturn h1+(h2-h1)*u+(h3-h1)*v;\n\t\t\t}else {\n\t\t\th1=heightData._terrainHeightData[Math.max(0.0,nIndexZ-1)*heightData._width+nIndexX];\n\t\t\th2=heightData._terrainHeightData[Math.min(heightData._width *heightData._height-1,(nIndexZ+1-1)*heightData._width+nIndexX)];\n\t\t\th3=heightData._terrainHeightData[Math.min(heightData._width *heightData._height-1,Math.max(0.0,nIndexZ-1)*heightData._width+nIndexX+1)];\n\t\t\tu=offsetX / gridSize;\n\t\t\tv=offsetZ / gridSize;\n\t\t\treturn h1+(h2-h1)*v+(h3-h1)*u;\n\t\t}\n\t}\n\n\t__getset(0,__proto,'terrainRes',null,function(value){\n\t\tif (value){\n\t\t\tthis._terrainRes=value;\n\t\t\tif (value.loaded)\n\t\t\t\tthis.buildTerrain(value);\n\t\t\telse\n\t\t\tvalue.once(/*laya.events.Event.LOADED*/\"loaded\",this,this.buildTerrain);\n\t\t}\n\t});\n\n\tTerrain.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,Terrain,null,1,false);\n\t}\n\n\tTerrain.RENDER_LINE_MODEL=false;\n\tTerrain.LOD_TOLERANCE_VALUE=4;\n\tTerrain.LOD_DISTANCE_FACTOR=2.0;\n\tTerrain.__VECTOR3__=null;\n\treturn Terrain;\n})(Sprite3D)\n\n\n/**\n*<code>Sphere</code> 类用于创建方体。\n*/\n//class laya.d3.resource.models.BoxMesh extends laya.d3.resource.models.PrimitiveMesh\nvar BoxMesh=(function(_super){\n\tfunction BoxMesh(long,width,height){\n\t\t/**@private */\n\t\tthis._long=NaN;\n\t\t/**@private */\n\t\tthis._width=NaN;\n\t\t/**@private */\n\t\tthis._height=NaN;\n\t\t(long===void 0)&& (long=1);\n\t\t(width===void 0)&& (width=1);\n\t\t(height===void 0)&& (height=1);\n\t\tBoxMesh.__super.call(this);\n\t\tthis._long=long;\n\t\tthis._width=width;\n\t\tthis._height=height;\n\t\tthis.activeResource();\n\t\tthis._positions=this._getPositions();\n\t\tthis._generateBoundingObject();\n\t}\n\n\t__class(BoxMesh,'laya.d3.resource.models.BoxMesh',_super);\n\tvar __proto=BoxMesh.prototype;\n\t__proto.recreateResource=function(){\n\t\tthis._numberVertices=24;\n\t\tthis._numberIndices=36;\n\t\tvar vertexDeclaration=VertexPositionNormalTexture.vertexDeclaration;\n\t\tvar vertexFloatStride=vertexDeclaration.vertexStride / 4;\n\t\tvar halfLong=this._long / 2;\n\t\tvar halfHeight=this._height / 2;\n\t\tvar halfWidth=this._width / 2;\n\t\tvar vertices=new Float32Array([\n\t\t-halfLong,halfHeight,-halfWidth,0,1,0,0,0,halfLong,halfHeight,-halfWidth,0,1,0,1,0,halfLong,halfHeight,halfWidth,0,1,0,1,1,-halfLong,halfHeight,halfWidth,0,1,0,0,1,\n\t\t-halfLong,-halfHeight,-halfWidth,0,-1,0,0,1,halfLong,-halfHeight,-halfWidth,0,-1,0,1,1,halfLong,-halfHeight,halfWidth,0,-1,0,1,0,-halfLong,-halfHeight,halfWidth,0,-1,0,0,0,\n\t\t-halfLong,halfHeight,-halfWidth,-1,0,0,0,0,-halfLong,halfHeight,halfWidth,-1,0,0,1,0,-halfLong,-halfHeight,halfWidth,-1,0,0,1,1,-halfLong,-halfHeight,-halfWidth,-1,0,0,0,1,\n\t\thalfLong,halfHeight,-halfWidth,1,0,0,1,0,halfLong,halfHeight,halfWidth,1,0,0,0,0,halfLong,-halfHeight,halfWidth,1,0,0,0,1,halfLong,-halfHeight,-halfWidth,1,0,0,1,1,\n\t\t-halfLong,halfHeight,halfWidth,0,0,1,0,0,halfLong,halfHeight,halfWidth,0,0,1,1,0,halfLong,-halfHeight,halfWidth,0,0,1,1,1,-halfLong,-halfHeight,halfWidth,0,0,1,0,1,\n\t\t-halfLong,halfHeight,-halfWidth,0,0,-1,1,0,halfLong,halfHeight,-halfWidth,0,0,-1,0,0,halfLong,-halfHeight,-halfWidth,0,0,-1,0,1,-halfLong,-halfHeight,-halfWidth,0,0,-1,1,1]);\n\t\tvar indices=new Uint16Array([\n\t\t0,1,2,2,3,0,\n\t\t4,7,6,6,5,4,\n\t\t8,9,10,10,11,8,\n\t\t12,15,14,14,13,12,\n\t\t16,17,18,18,19,16,\n\t\t20,23,22,22,21,20]);\n\t\tthis._vertexBuffer=new VertexBuffer3D(vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._numberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(indices);\n\t\tthis.memorySize=(this._vertexBuffer._byteLength+this._indexBuffer._byteLength)*2;\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*设置长度（改变此属性会重新生成顶点和索引）\n\t*@param value 长度\n\t*/\n\t/**\n\t*返回长度\n\t*@return 长\n\t*/\n\t__getset(0,__proto,'long',function(){\n\t\treturn this._long;\n\t\t},function(value){\n\t\tif (this._long!==value){\n\t\t\tthis._long=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置宽度（改变此属性会重新生成顶点和索引）\n\t*@param value 宽度\n\t*/\n\t/**\n\t*返回宽度\n\t*@return 宽\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._width;\n\t\t},function(value){\n\t\tif (this._width!==value){\n\t\t\tthis._width=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置高度（改变此属性会重新生成顶点和索引）\n\t*@param value 高度\n\t*/\n\t/**\n\t*返回高度\n\t*@return 高\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\treturn this._height;\n\t\t},function(value){\n\t\tif (this._height!==value){\n\t\t\tthis._height=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\treturn BoxMesh;\n})(PrimitiveMesh)\n\n\n/**\n*<code>CapsuleMesh</code> 类用于创建胶囊体。\n*/\n//class laya.d3.resource.models.CapsuleMesh extends laya.d3.resource.models.PrimitiveMesh\nvar CapsuleMesh=(function(_super){\n\tfunction CapsuleMesh(radius,height,stacks,slices){\n\t\t/**@private */\n\t\tthis._radius=NaN;\n\t\t/**@private */\n\t\tthis._height=NaN;\n\t\t/**@private */\n\t\tthis._slices=0;\n\t\t/**@private */\n\t\tthis._stacks=0;\n\t\t(radius===void 0)&& (radius=0.5);\n\t\t(height===void 0)&& (height=2);\n\t\t(stacks===void 0)&& (stacks=16);\n\t\t(slices===void 0)&& (slices=32);\n\t\tCapsuleMesh.__super.call(this);\n\t\tthis._radius=radius;\n\t\tthis._height=height < radius *2 ? radius *2 :height;\n\t\tthis._stacks=stacks;\n\t\tthis._slices=slices;\n\t\tthis.recreateResource();\n\t\tthis._positions=this._getPositions();\n\t\tthis._generateBoundingObject();\n\t}\n\n\t__class(CapsuleMesh,'laya.d3.resource.models.CapsuleMesh',_super);\n\tvar __proto=CapsuleMesh.prototype;\n\t__proto.recreateResource=function(){\n\t\tthis._numberVertices=(this._stacks+1)*(this.slices+1)*2+(this._slices+1)*2;\n\t\tthis._numberIndices=(3 *this._stacks *(this._slices+1))*2 *2+2 *this._slices *3;\n\t\tvar vertexDeclaration=VertexPositionNormalTexture.vertexDeclaration;\n\t\tvar vertexFloatStride=vertexDeclaration.vertexStride / 4;\n\t\tvar vertices=new Float32Array(this._numberVertices *vertexFloatStride);\n\t\tvar indices=new Uint16Array(this._numberIndices);\n\t\tvar stackAngle=(Math.PI / 2.0)/ this._stacks;\n\t\tvar sliceAngle=(Math.PI *2.0)/ this._slices;\n\t\tvar hcHeight=this._height / 2-this._radius;\n\t\tvar posX=0;\n\t\tvar posY=0;\n\t\tvar posZ=0;\n\t\tvar vc=0;\n\t\tvar ic=0;\n\t\tvar verticeCount=0;\n\t\tvar stack=0,slice=0;\n\t\tfor (stack=0;stack <=this._stacks;stack++){\n\t\t\tfor (slice=0;slice <=this._slices;slice++){\n\t\t\t\tposX=this._radius *Math.cos(stack *stackAngle)*Math.cos(slice *sliceAngle+Math.PI);\n\t\t\t\tposY=this._radius *Math.sin(stack *stackAngle);\n\t\t\t\tposZ=this._radius *Math.cos(stack *stackAngle)*Math.sin(slice *sliceAngle+Math.PI);\n\t\t\t\tvertices[vc++]=posX;\n\t\t\t\tvertices[vc++]=posY+hcHeight;\n\t\t\t\tvertices[vc++]=posZ;\n\t\t\t\tvertices[vc++]=posX;\n\t\t\t\tvertices[vc++]=posY;\n\t\t\t\tvertices[vc++]=posZ;\n\t\t\t\tvertices[vc++]=1-slice / this._slices;\n\t\t\t\tvertices[vc++]=(1-stack / this._stacks)*((Math.PI *this._radius / 2)/ (this._height+Math.PI *this._radius));\n\t\t\t\tif (stack < this._stacks){\n\t\t\t\t\tindices[ic++]=(stack *(this._slices+1))+slice+(this._slices+1);\n\t\t\t\t\tindices[ic++]=(stack *(this._slices+1))+slice;\n\t\t\t\t\tindices[ic++]=(stack *(this._slices+1))+slice+1;\n\t\t\t\t\tindices[ic++]=(stack *(this._slices+1))+slice+(this._slices);\n\t\t\t\t\tindices[ic++]=(stack *(this._slices+1))+slice;\n\t\t\t\t\tindices[ic++]=(stack *(this._slices+1))+slice+(this._slices+1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tverticeCount+=(this._stacks+1)*(this._slices+1);\n\t\tfor (stack=0;stack <=this._stacks;stack++){\n\t\t\tfor (slice=0;slice <=this._slices;slice++){\n\t\t\t\tposX=this._radius *Math.cos(stack *stackAngle)*Math.cos(slice *sliceAngle+Math.PI);\n\t\t\t\tposY=this._radius *Math.sin(-stack *stackAngle);\n\t\t\t\tposZ=this._radius *Math.cos(stack *stackAngle)*Math.sin(slice *sliceAngle+Math.PI);\n\t\t\t\tvertices[vc++]=posX;\n\t\t\t\tvertices[vc++]=posY-hcHeight;\n\t\t\t\tvertices[vc++]=posZ;\n\t\t\t\tvertices[vc++]=posX;\n\t\t\t\tvertices[vc++]=posY;\n\t\t\t\tvertices[vc++]=posZ;\n\t\t\t\tvertices[vc++]=1-slice / this._slices;\n\t\t\t\tvertices[vc++]=((stack / this._stacks)*(Math.PI *this._radius / 2)+(this._height+Math.PI *this._radius / 2))/ (this._height+Math.PI *this._radius);\n\t\t\t\tif (stack < this._stacks){\n\t\t\t\t\tindices[ic++]=verticeCount+(stack *(this._slices+1))+slice;\n\t\t\t\t\tindices[ic++]=verticeCount+(stack *(this._slices+1))+slice+(this._slices+1);\n\t\t\t\t\tindices[ic++]=verticeCount+(stack *(this._slices+1))+slice+1;\n\t\t\t\t\tindices[ic++]=verticeCount+(stack *(this._slices+1))+slice;\n\t\t\t\t\tindices[ic++]=verticeCount+(stack *(this._slices+1))+slice+(this._slices);\n\t\t\t\t\tindices[ic++]=verticeCount+(stack *(this._slices+1))+slice+(this._slices+1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tverticeCount+=(this._stacks+1)*(this._slices+1);\n\t\tfor (slice=0;slice <=this._slices;slice++){\n\t\t\tposX=this._radius *Math.cos(slice *sliceAngle+Math.PI);\n\t\t\tposY=hcHeight;\n\t\t\tposZ=this._radius *Math.sin(slice *sliceAngle+Math.PI);\n\t\t\tvertices[vc++]=posX;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=posX;\n\t\t\tvertices[vc++]=posY;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=-posY;\n\t\t\tvertices[vc++]=posZ;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=posZ;\n\t\t\tvertices[vc++]=posX;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=posX;\n\t\t\tvertices[vc++]=0;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=0;\n\t\t\tvertices[vc++]=posZ;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=posZ;\n\t\t\tvertices[vc++]=1-slice *1 / this._slices;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=1-slice *1 / this._slices;\n\t\t\tvertices[vc++]=(Math.PI *this._radius / 2)/ (this._height+Math.PI *this._radius);\n\t\t\tvertices[vc+(this._slices+1)*8-1]=(Math.PI *this._radius / 2+this._height)/ (this._height+Math.PI *this._radius);\n\t\t}\n\t\tfor (slice=0;slice < this._slices;slice++){\n\t\t\tindices[ic++]=slice+verticeCount+(this._slices+1);\n\t\t\tindices[ic++]=slice+verticeCount+1;\n\t\t\tindices[ic++]=slice+verticeCount;\n\t\t\tindices[ic++]=slice+verticeCount+(this._slices+1);\n\t\t\tindices[ic++]=slice+verticeCount+(this._slices+1)+1;\n\t\t\tindices[ic++]=slice+verticeCount+1;\n\t\t}\n\t\tverticeCount+=2 *(this._slices+1);\n\t\tthis._vertexBuffer=new VertexBuffer3D(vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._numberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(indices);\n\t\tthis.memorySize=(this._vertexBuffer._byteLength+this._indexBuffer._byteLength)*2;\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*设置半径（改变此属性会重新生成顶点和索引）\n\t*@param value 半径\n\t*/\n\t/**\n\t*返回半径\n\t*@return 半径\n\t*/\n\t__getset(0,__proto,'radius',function(){\n\t\treturn this._radius;\n\t\t},function(value){\n\t\tif (this._radius!==value){\n\t\t\tthis._radius=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置高度（改变此属性会重新生成顶点和索引）\n\t*@param value 高度\n\t*/\n\t/**\n\t*返回高度\n\t*@return 高度\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\treturn this._height;\n\t\t},function(value){\n\t\tif (this._height!==value){\n\t\t\tthis._height=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置高度分段（改变此属性会重新生成顶点和索引）\n\t*@param value高度分段\n\t*/\n\t/**\n\t*获取高度分段\n\t*@return 高度分段\n\t*/\n\t__getset(0,__proto,'stacks',function(){\n\t\treturn this._stacks;\n\t\t},function(value){\n\t\tif (this._stacks!==value){\n\t\t\tthis._stacks=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置宽度分段（改变此属性会重新生成顶点和索引）\n\t*@param value 宽度分段\n\t*/\n\t/**\n\t*获取宽度分段\n\t*@return 宽度分段\n\t*/\n\t__getset(0,__proto,'slices',function(){\n\t\treturn this._slices;\n\t\t},function(value){\n\t\tif (this._slices!==value){\n\t\t\tthis._slices=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\treturn CapsuleMesh;\n})(PrimitiveMesh)\n\n\n/**\n*<code>CylinderMesh</code> 类用于创建圆柱体。\n*/\n//class laya.d3.resource.models.CylinderMesh extends laya.d3.resource.models.PrimitiveMesh\nvar CylinderMesh=(function(_super){\n\tfunction CylinderMesh(radius,height,slices){\n\t\t/**@private */\n\t\tthis._radius=NaN;\n\t\t/**@private */\n\t\tthis._height=NaN;\n\t\t/**@private */\n\t\tthis._slices=0;\n\t\t(radius===void 0)&& (radius=0.5);\n\t\t(height===void 0)&& (height=2);\n\t\t(slices===void 0)&& (slices=32);\n\t\tCylinderMesh.__super.call(this);\n\t\tthis._radius=radius;\n\t\tthis._height=height;\n\t\tthis._slices=slices;\n\t\tthis.recreateResource();\n\t\tthis._positions=this._getPositions();\n\t\tthis._generateBoundingObject();\n\t}\n\n\t__class(CylinderMesh,'laya.d3.resource.models.CylinderMesh',_super);\n\tvar __proto=CylinderMesh.prototype;\n\t__proto.recreateResource=function(){\n\t\tthis._numberVertices=(this._slices+1+1)+(this._slices+1)*2+(this._slices+1+1);\n\t\tthis._numberIndices=3 *this._slices+6 *this._slices+3 *this._slices;\n\t\tvar vertexDeclaration=VertexPositionNormalTexture.vertexDeclaration;\n\t\tvar vertexFloatStride=vertexDeclaration.vertexStride / 4;\n\t\tvar vertices=new Float32Array(this._numberVertices *vertexFloatStride);\n\t\tvar indices=new Uint16Array(this._numberIndices);\n\t\tvar sliceAngle=(Math.PI *2.0)/ this._slices;\n\t\tvar halfHeight=this._height / 2;\n\t\tvar curAngle=0;\n\t\tvar verticeCount=0;\n\t\tvar posX=0;\n\t\tvar posY=0;\n\t\tvar posZ=0;\n\t\tvar vc=0;\n\t\tvar ic=0;\n\t\tfor (var tv=0;tv <=this._slices;tv++){\n\t\t\tif (tv===0){\n\t\t\t\tvertices[vc++]=0;\n\t\t\t\tvertices[vc++]=halfHeight;\n\t\t\t\tvertices[vc++]=0;\n\t\t\t\tvertices[vc++]=0;\n\t\t\t\tvertices[vc++]=1;\n\t\t\t\tvertices[vc++]=0;\n\t\t\t\tvertices[vc++]=0.5;\n\t\t\t\tvertices[vc++]=0.5;\n\t\t\t}\n\t\t\tcurAngle=tv *sliceAngle;\n\t\t\tposX=Math.cos(curAngle)*this._radius;\n\t\t\tposY=halfHeight;\n\t\t\tposZ=Math.sin(curAngle)*this._radius;\n\t\t\tvertices[vc++]=posX;\n\t\t\tvertices[vc++]=posY;\n\t\t\tvertices[vc++]=posZ;\n\t\t\tvertices[vc++]=0;\n\t\t\tvertices[vc++]=1;\n\t\t\tvertices[vc++]=0;\n\t\t\tvertices[vc++]=0.5+Math.cos(curAngle)*0.5;\n\t\t\tvertices[vc++]=0.5+Math.sin(curAngle)*0.5;\n\t\t}\n\t\tfor (var ti=0;ti < this._slices;ti++){\n\t\t\tindices[ic++]=0;\n\t\t\tindices[ic++]=ti+1;\n\t\t\tindices[ic++]=ti+2;\n\t\t}\n\t\tverticeCount+=this._slices+1+1;\n\t\tfor (var rv=0;rv <=this._slices;rv++){\n\t\t\tcurAngle=rv *sliceAngle;\n\t\t\tposX=Math.cos(curAngle+Math.PI)*this._radius;\n\t\t\tposY=halfHeight;\n\t\t\tposZ=Math.sin(curAngle+Math.PI)*this._radius;\n\t\t\tvertices[vc++]=posX;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=posX;\n\t\t\tvertices[vc++]=posY;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=-posY;\n\t\t\tvertices[vc++]=posZ;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=posZ;\n\t\t\tvertices[vc++]=posX;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=posX;\n\t\t\tvertices[vc++]=0;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=0;\n\t\t\tvertices[vc++]=posZ;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=posZ;\n\t\t\tvertices[vc++]=1-rv *1 / this._slices;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=1-rv *1 / this._slices;\n\t\t\tvertices[vc++]=0;\n\t\t\tvertices[vc+(this._slices+1)*8-1]=1;\n\t\t}\n\t\tvc+=(this._slices+1)*8;\n\t\tfor (var ri=0;ri < this._slices;ri++){\n\t\t\tindices[ic++]=ri+verticeCount+(this._slices+1);\n\t\t\tindices[ic++]=ri+verticeCount+1;\n\t\t\tindices[ic++]=ri+verticeCount;\n\t\t\tindices[ic++]=ri+verticeCount+(this._slices+1);\n\t\t\tindices[ic++]=ri+verticeCount+(this._slices+1)+1;\n\t\t\tindices[ic++]=ri+verticeCount+1;\n\t\t}\n\t\tverticeCount+=2 *(this._slices+1);\n\t\tfor (var bv=0;bv <=this._slices;bv++){\n\t\t\tif (bv===0){\n\t\t\t\tvertices[vc++]=0;\n\t\t\t\tvertices[vc++]=-halfHeight;\n\t\t\t\tvertices[vc++]=0;\n\t\t\t\tvertices[vc++]=0;\n\t\t\t\tvertices[vc++]=-1;\n\t\t\t\tvertices[vc++]=0;\n\t\t\t\tvertices[vc++]=0.5;\n\t\t\t\tvertices[vc++]=0.5;\n\t\t\t}\n\t\t\tcurAngle=bv *sliceAngle;\n\t\t\tposX=Math.cos(curAngle+Math.PI)*this._radius;\n\t\t\tposY=-halfHeight;\n\t\t\tposZ=Math.sin(curAngle+Math.PI)*this._radius;\n\t\t\tvertices[vc++]=posX;\n\t\t\tvertices[vc++]=posY;\n\t\t\tvertices[vc++]=posZ;\n\t\t\tvertices[vc++]=0;\n\t\t\tvertices[vc++]=-1;\n\t\t\tvertices[vc++]=0;\n\t\t\tvertices[vc++]=0.5+Math.cos(curAngle)*0.5;\n\t\t\tvertices[vc++]=0.5+Math.sin(curAngle)*0.5;\n\t\t}\n\t\tfor (var bi=0;bi < this._slices;bi++){\n\t\t\tindices[ic++]=0+verticeCount;\n\t\t\tindices[ic++]=bi+2+verticeCount;\n\t\t\tindices[ic++]=bi+1+verticeCount;\n\t\t}\n\t\tverticeCount+=this._slices+1+1;\n\t\tthis._vertexBuffer=new VertexBuffer3D(vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._numberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(indices);\n\t\tthis.memorySize=(this._vertexBuffer._byteLength+this._indexBuffer._byteLength)*2;\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*设置半径（改变此属性会重新生成顶点和索引）\n\t*@param value 半径\n\t*/\n\t/**\n\t*返回半径\n\t*@return 半径\n\t*/\n\t__getset(0,__proto,'radius',function(){\n\t\treturn this._radius;\n\t\t},function(value){\n\t\tif (this._radius!==value){\n\t\t\tthis._radius=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置高度（改变此属性会重新生成顶点和索引）\n\t*@param value 高度\n\t*/\n\t/**\n\t*返回高度\n\t*@return 高度\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\treturn this._height;\n\t\t},function(value){\n\t\tif (this._height!==value){\n\t\t\tthis._height=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置宽度分段（改变此属性会重新生成顶点和索引）\n\t*@param value 宽度分段\n\t*/\n\t/**\n\t*获取宽度分段\n\t*@return 宽度分段\n\t*/\n\t__getset(0,__proto,'slices',function(){\n\t\treturn this._slices;\n\t\t},function(value){\n\t\tif (this._slices!==value){\n\t\t\tthis._slices=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\treturn CylinderMesh;\n})(PrimitiveMesh)\n\n\n/**\n*<code>QuadMesh</code> 类用于创建平面。\n*/\n//class laya.d3.resource.models.PlaneMesh extends laya.d3.resource.models.PrimitiveMesh\nvar PlaneMesh=(function(_super){\n\tfunction PlaneMesh(long,width,stacks,slices){\n\t\t/**@private */\n\t\tthis._long=NaN;\n\t\t/**@private */\n\t\tthis._width=NaN;\n\t\t/**@private */\n\t\tthis._stacks=0;\n\t\t/**@private */\n\t\tthis._slices=0;\n\t\t(long===void 0)&& (long=10);\n\t\t(width===void 0)&& (width=10);\n\t\t(stacks===void 0)&& (stacks=10);\n\t\t(slices===void 0)&& (slices=10);\n\t\tPlaneMesh.__super.call(this);\n\t\tthis._long=long;\n\t\tthis._width=width;\n\t\tthis._stacks=stacks;\n\t\tthis._slices=slices;\n\t\tthis.activeResource();\n\t\tthis._positions=this._getPositions();\n\t\tthis._generateBoundingObject();\n\t}\n\n\t__class(PlaneMesh,'laya.d3.resource.models.PlaneMesh',_super);\n\tvar __proto=PlaneMesh.prototype;\n\t__proto.recreateResource=function(){\n\t\tthis._numberVertices=(this._stacks+1)*(this._slices+1);\n\t\tthis._numberIndices=this._stacks *this._slices *2 *3;\n\t\tvar indices=new Uint16Array(this._numberIndices);\n\t\tvar vertexDeclaration=VertexPositionNormalTexture.vertexDeclaration;\n\t\tvar vertexFloatStride=vertexDeclaration.vertexStride / 4;\n\t\tvar vertices=new Float32Array(this._numberVertices *vertexFloatStride);\n\t\tvar halfLong=this._long / 2;\n\t\tvar halfWidth=this._width / 2;\n\t\tvar stacksLong=this._long / this._stacks;\n\t\tvar slicesWidth=this._width / this._slices;\n\t\tvar verticeCount=0;\n\t\tfor (var i=0;i <=this._slices;i++){\n\t\t\tfor (var j=0;j <=this._stacks;j++){\n\t\t\t\tvertices[verticeCount++]=j *stacksLong-halfLong;\n\t\t\t\tvertices[verticeCount++]=0;\n\t\t\t\tvertices[verticeCount++]=i *slicesWidth-halfWidth;\n\t\t\t\tvertices[verticeCount++]=0;\n\t\t\t\tvertices[verticeCount++]=1;\n\t\t\t\tvertices[verticeCount++]=0;\n\t\t\t\tvertices[verticeCount++]=j *1 / this._stacks;\n\t\t\t\tvertices[verticeCount++]=i *1 / this._slices;\n\t\t\t}\n\t\t};\n\t\tvar indiceIndex=0;\n\t\tfor (i=0;i < this._slices;i++){\n\t\t\tfor (j=0;j < this._stacks;j++){\n\t\t\t\tindices[indiceIndex++]=(i+1)*(this._stacks+1)+j;\n\t\t\t\tindices[indiceIndex++]=i *(this._stacks+1)+j;\n\t\t\t\tindices[indiceIndex++]=(i+1)*(this._stacks+1)+j+1;\n\t\t\t\tindices[indiceIndex++]=i *(this._stacks+1)+j;\n\t\t\t\tindices[indiceIndex++]=i *(this._stacks+1)+j+1;\n\t\t\t\tindices[indiceIndex++]=(i+1)*(this._stacks+1)+j+1;\n\t\t\t}\n\t\t}\n\t\tthis._vertexBuffer=new VertexBuffer3D(vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._numberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(indices);\n\t\tthis.memorySize=(this._vertexBuffer._byteLength+this._indexBuffer._byteLength)*2;\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*设置长度（改变此属性会重新生成顶点和索引）\n\t*@param value 长度\n\t*/\n\t/**\n\t*返回长度\n\t*@return 长\n\t*/\n\t__getset(0,__proto,'long',function(){\n\t\treturn this._long;\n\t\t},function(value){\n\t\tif (this._long!==value){\n\t\t\tthis._long=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置宽度（改变此属性会重新生成顶点和索引）\n\t*@param value 宽度\n\t*/\n\t/**\n\t*返回宽度\n\t*@return 宽\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._width;\n\t\t},function(value){\n\t\tif (this._width!==value){\n\t\t\tthis._width=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置长度分段（改变此属性会重新生成顶点和索引）\n\t*@param value长度分段\n\t*/\n\t/**\n\t*获取长度分段\n\t*@return 长度分段\n\t*/\n\t__getset(0,__proto,'stacks',function(){\n\t\treturn this._stacks;\n\t\t},function(value){\n\t\tif (this._stacks!==value){\n\t\t\tthis._stacks=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置宽度分段（改变此属性会重新生成顶点和索引）\n\t*@param value 宽度分段\n\t*/\n\t/**\n\t*获取宽度分段\n\t*@return 宽度分段\n\t*/\n\t__getset(0,__proto,'slices',function(){\n\t\treturn this._slices;\n\t\t},function(value){\n\t\tif (this._slices!==value){\n\t\t\tthis._slices=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\treturn PlaneMesh;\n})(PrimitiveMesh)\n\n\n/**\n*<code>QuadMesh</code> 类用于创建四边形。\n*/\n//class laya.d3.resource.models.QuadMesh extends laya.d3.resource.models.PrimitiveMesh\nvar QuadMesh=(function(_super){\n\tfunction QuadMesh(long,width){\n\t\t/**@private */\n\t\tthis._long=NaN;\n\t\t/**@private */\n\t\tthis._width=NaN;\n\t\t(long===void 0)&& (long=1);\n\t\t(width===void 0)&& (width=1);\n\t\tQuadMesh.__super.call(this);\n\t\tthis._long=long;\n\t\tthis._width=width;\n\t\tthis.activeResource();\n\t\tthis._positions=this._getPositions();\n\t\tthis._generateBoundingObject();\n\t}\n\n\t__class(QuadMesh,'laya.d3.resource.models.QuadMesh',_super);\n\tvar __proto=QuadMesh.prototype;\n\t__proto.recreateResource=function(){\n\t\tthis._numberVertices=4;\n\t\tthis._numberIndices=6;\n\t\tvar vertexDeclaration=VertexPositionNormalTexture.vertexDeclaration;\n\t\tvar vertexFloatStride=vertexDeclaration.vertexStride / 4;\n\t\tvar halfLong=this._long / 2;\n\t\tvar halfWidth=this._width / 2;\n\t\tvar vertices=new Float32Array([\n\t\t-halfLong,halfWidth,0,0,0,1,0,0,halfLong,halfWidth,0,0,0,1,1,0,-halfLong,-halfWidth,0,0,0,1,0,1,halfLong,-halfWidth,0,0,0,1,1,1,]);\n\t\tvar indices=new Uint16Array([\n\t\t0,1,2,3,2,1,]);\n\t\tthis._vertexBuffer=new VertexBuffer3D(vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._numberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(indices);\n\t\tthis.memorySize=(this._vertexBuffer._byteLength+this._indexBuffer._byteLength)*2;\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*设置长度（改变此属性会重新生成顶点和索引）\n\t*@param value 长度\n\t*/\n\t/**\n\t*返回长度\n\t*@return 长\n\t*/\n\t__getset(0,__proto,'long',function(){\n\t\treturn this._long;\n\t\t},function(value){\n\t\tif (this._long!==value){\n\t\t\tthis._long=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置宽度（改变此属性会重新生成顶点和索引）\n\t*@param value 宽度\n\t*/\n\t/**\n\t*返回宽度\n\t*@return 宽\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._width;\n\t\t},function(value){\n\t\tif (this._width!==value){\n\t\t\tthis._width=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\treturn QuadMesh;\n})(PrimitiveMesh)\n\n\n/**\n*<code>Sphere</code> 类用于创建球体。\n*/\n//class laya.d3.resource.models.SphereMesh extends laya.d3.resource.models.PrimitiveMesh\nvar SphereMesh=(function(_super){\n\tfunction SphereMesh(radius,stacks,slices){\n\t\t/**@private */\n\t\tthis._radius=NaN;\n\t\t/**@private */\n\t\tthis._slices=0;\n\t\t/**@private */\n\t\tthis._stacks=0;\n\t\t(radius===void 0)&& (radius=0.5);\n\t\t(stacks===void 0)&& (stacks=32);\n\t\t(slices===void 0)&& (slices=32);\n\t\tSphereMesh.__super.call(this);\n\t\tthis._radius=radius;\n\t\tthis._stacks=stacks;\n\t\tthis._slices=slices;\n\t\tthis.activeResource();\n\t\tthis._positions=this._getPositions();\n\t\tthis._generateBoundingObject();\n\t}\n\n\t__class(SphereMesh,'laya.d3.resource.models.SphereMesh',_super);\n\tvar __proto=SphereMesh.prototype;\n\t__proto.recreateResource=function(){\n\t\tthis._numberVertices=(this._stacks+1)*(this._slices+1);\n\t\tthis._numberIndices=(3 *this._stacks *(this._slices+1))*2;\n\t\tvar indices=new Uint16Array(this._numberIndices);\n\t\tvar vertexDeclaration=VertexPositionNormalTexture.vertexDeclaration;\n\t\tvar vertexFloatStride=vertexDeclaration.vertexStride / 4;\n\t\tvar vertices=new Float32Array(this._numberVertices *vertexFloatStride);\n\t\tvar stackAngle=Math.PI / this._stacks;\n\t\tvar sliceAngle=(Math.PI *2.0)/ this._slices;\n\t\tvar vertexIndex=0;\n\t\tvar vertexCount=0;\n\t\tvar indexCount=0;\n\t\tfor (var stack=0;stack < (this._stacks+1);stack++){\n\t\t\tvar r=Math.sin(stack *stackAngle);\n\t\t\tvar y=Math.cos(stack *stackAngle);\n\t\t\tfor (var slice=0;slice < (this._slices+1);slice++){\n\t\t\t\tvar x=r *Math.sin(slice *sliceAngle+Math.PI *1 / 2);\n\t\t\t\tvar z=r *Math.cos(slice *sliceAngle+Math.PI *1 / 2);\n\t\t\t\tvertices[vertexCount+0]=x *this._radius;\n\t\t\t\tvertices[vertexCount+1]=y *this._radius;\n\t\t\t\tvertices[vertexCount+2]=z *this._radius;\n\t\t\t\tvertices[vertexCount+3]=x;\n\t\t\t\tvertices[vertexCount+4]=y;\n\t\t\t\tvertices[vertexCount+5]=z;\n\t\t\t\tvertices[vertexCount+6]=slice / this._slices;\n\t\t\t\tvertices[vertexCount+7]=stack / this._stacks;\n\t\t\t\tvertexCount+=vertexFloatStride;\n\t\t\t\tif (stack !=(this._stacks-1)){\n\t\t\t\t\tindices[indexCount++]=vertexIndex+(this._slices+1);\n\t\t\t\t\tindices[indexCount++]=vertexIndex;\n\t\t\t\t\tindices[indexCount++]=vertexIndex+1;\n\t\t\t\t\tindices[indexCount++]=vertexIndex+(this._slices);\n\t\t\t\t\tindices[indexCount++]=vertexIndex;\n\t\t\t\t\tindices[indexCount++]=vertexIndex+(this._slices+1);\n\t\t\t\t\tvertexIndex++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._vertexBuffer=new VertexBuffer3D(vertexDeclaration,this._numberVertices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._indexBuffer=new IndexBuffer3D(/*laya.d3.graphics.IndexBuffer3D.INDEXTYPE_USHORT*/\"ushort\",this._numberIndices,/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4,true);\n\t\tthis._vertexBuffer.setData(vertices);\n\t\tthis._indexBuffer.setData(indices);\n\t\tthis.memorySize=(this._vertexBuffer._byteLength+this._indexBuffer._byteLength)*2;\n\t\tthis.completeCreate();\n\t}\n\n\t/**\n\t*设置半径（改变此属性会重新生成顶点和索引）\n\t*@param value 半径\n\t*/\n\t/**\n\t*返回半径\n\t*@return 半径\n\t*/\n\t__getset(0,__proto,'radius',function(){\n\t\treturn this._radius;\n\t\t},function(value){\n\t\tif (this._radius!==value){\n\t\t\tthis._radius=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置宽度分段（改变此属性会重新生成顶点和索引）\n\t*@param value 宽度分段\n\t*/\n\t/**\n\t*获取宽度分段\n\t*@return 宽度分段\n\t*/\n\t__getset(0,__proto,'slices',function(){\n\t\treturn this._slices;\n\t\t},function(value){\n\t\tif (this._slices!==value){\n\t\t\tthis._slices=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\t/**\n\t*设置高度分段（改变此属性会重新生成顶点和索引）\n\t*@param value高度分段\n\t*/\n\t/**\n\t*获取高度分段\n\t*@return 高度分段\n\t*/\n\t__getset(0,__proto,'stacks',function(){\n\t\treturn this._stacks;\n\t\t},function(value){\n\t\tif (this._stacks!==value){\n\t\t\tthis._stacks=value;\n\t\t\tthis.releaseResource();\n\t\t\tthis.activeResource();\n\t\t}\n\t});\n\n\treturn SphereMesh;\n})(PrimitiveMesh)\n\n\n/**\n*<code>Camera</code> 类用于创建摄像机。\n*/\n//class laya.d3.core.Camera extends laya.d3.core.BaseCamera\nvar Camera=(function(_super){\n\tfunction Camera(aspectRatio,nearPlane,farPlane){\n\t\t/**@private */\n\t\t//this._aspectRatio=NaN;\n\t\t/**@private */\n\t\t//this._viewport=null;\n\t\t/**@private */\n\t\t//this._normalizedViewport=null;\n\t\t/**@private */\n\t\t//this._viewMatrix=null;\n\t\t/**@private */\n\t\t//this._projectionMatrix=null;\n\t\t/**@private */\n\t\t//this._projectionViewMatrix=null;\n\t\t/**@private */\n\t\t//this._boundFrustumUpdate=false;\n\t\t/**@private */\n\t\t//this._boundFrustum=null;\n\t\t/**@private */\n\t\t//this._orientedBoundBox=null;\n\t\t(aspectRatio===void 0)&& (aspectRatio=0);\n\t\t(nearPlane===void 0)&& (nearPlane=0.3);\n\t\t(farPlane===void 0)&& (farPlane=1000);\n\t\tthis._viewMatrix=new Matrix4x4();\n\t\tthis._projectionMatrix=new Matrix4x4();\n\t\tthis._projectionViewMatrix=new Matrix4x4();\n\t\tthis._viewport=new Viewport(0,0,0,0);\n\t\tthis._normalizedViewport=new Viewport(0,0,1,1);\n\t\tthis._aspectRatio=aspectRatio;\n\t\tthis._boundFrustumUpdate=true;\n\t\tthis._boundFrustum=new BoundFrustum(Matrix4x4.DEFAULT);\n\t\tCamera.__super.call(this,nearPlane,farPlane);\n\t\tthis.transform.on(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatrixChanged);\n\t}\n\n\t__class(Camera,'laya.d3.core.Camera',_super);\n\tvar __proto=Camera.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldMatrixChanged=function(){\n\t\tthis._boundFrustumUpdate=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,json){\n\t\tvar color=customProps.clearColor;\n\t\tthis.clearColor=new Vector4(color[0],color[1],color[2],color[3]);\n\t\tvar viewport=customProps.viewport;\n\t\tthis.normalizedViewport=new Viewport(viewport[0],viewport[1],viewport[2],viewport[3]);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._calculateProjectionMatrix=function(){\n\t\tif (!this._useUserProjectionMatrix){\n\t\t\tif (this._orthographic){\n\t\t\t\tvar halfWidth=this.orthographicVerticalSize *this.aspectRatio *0.5;\n\t\t\t\tvar halfHeight=this.orthographicVerticalSize *0.5;\n\t\t\t\tMatrix4x4.createOrthoOffCenterRH(-halfWidth,halfWidth,-halfHeight,halfHeight,this.nearPlane,this.farPlane,this._projectionMatrix);\n\t\t\t\t}else {\n\t\t\t\tMatrix4x4.createPerspective(3.1416 *this.fieldOfView / 180.0,this.aspectRatio,this.nearPlane,this.farPlane,this._projectionMatrix);\n\t\t\t}\n\t\t}\n\t\tthis._boundFrustumUpdate=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._update=function(state){\n\t\tif (this.conchModel){\n\t\t\tthis.conchModel.setViewMatrix(this.viewMatrix.elements);\n\t\t\tthis.conchModel.setProjectMatrix(this.projectionMatrix.elements);\n\t\t}\n\t\tlaya.d3.core.Sprite3D.prototype._update.call(this,state);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._renderCamera=function(gl,state,scene){\n\t\t(scene.parallelSplitShadowMaps[0])&& (scene._renderShadowMap(gl,state,this));\n\t\tstate.camera=this;\n\t\tthis._prepareCameraToRender();\n\t\tscene._preRenderUpdateComponents(state);\n\t\tvar viewMat,projectMat;\n\t\tviewMat=state._viewMatrix=this.viewMatrix;\n\t\tvar renderTar=this._renderTarget;\n\t\tif (renderTar){\n\t\t\trenderTar.start();\n\t\t\tMatrix4x4.multiply(BaseCamera._invertYScaleMatrix,this._projectionMatrix,BaseCamera._invertYProjectionMatrix);\n\t\t\tMatrix4x4.multiply(BaseCamera._invertYScaleMatrix,this.projectionViewMatrix,BaseCamera._invertYProjectionViewMatrix);\n\t\t\tprojectMat=state._projectionMatrix=BaseCamera._invertYProjectionMatrix;\n\t\t\tstate._projectionViewMatrix=BaseCamera._invertYProjectionViewMatrix;\n\t\t\t}else {\n\t\t\tprojectMat=state._projectionMatrix=this._projectionMatrix;\n\t\t\tstate._projectionViewMatrix=this.projectionViewMatrix;\n\t\t}\n\t\tthis._prepareCameraViewProject(viewMat,projectMat);\n\t\tstate._viewport=this.viewport;\n\t\tscene._preRenderScene(gl,state,this.boundFrustum);\n\t\tscene._clear(gl,state);\n\t\tscene._renderScene(gl,state);\n\t\tscene._postRenderUpdateComponents(state);\n\t\t(renderTar)&& (renderTar.end());\n\t}\n\n\t/**\n\t*计算从屏幕空间生成的射线。\n\t*@param point 屏幕空间的位置位置。\n\t*@return out 输出射线。\n\t*/\n\t__proto.viewportPointToRay=function(point,out){\n\t\tPicker.calculateCursorRay(point,this.viewport,this._projectionMatrix,this.viewMatrix,null,out);\n\t}\n\n\t/**\n\t*计算从裁切空间生成的射线。\n\t*@param point 裁切空间的位置。。\n\t*@return out 输出射线。\n\t*/\n\t__proto.normalizedViewportPointToRay=function(point,out){\n\t\tvar finalPoint=Camera._tempVector20;\n\t\tvar vp=this.viewport;\n\t\tvar nVpPosE=point.elements;\n\t\tvar vpPosE=finalPoint.elements;\n\t\tvpPosE[0]=nVpPosE[0] *vp.width;\n\t\tvpPosE[1]=nVpPosE[1] *vp.height;\n\t\tPicker.calculateCursorRay(finalPoint,this.viewport,this._projectionMatrix,this.viewMatrix,null,out);\n\t}\n\n\t/**\n\t*计算从世界空间准换三维坐标到屏幕空间。\n\t*@param position 世界空间的位置。\n\t*@return out 输出位置。\n\t*/\n\t__proto.worldToViewportPoint=function(position,out){\n\t\tMatrix4x4.multiply(this._projectionMatrix,this._viewMatrix,this._projectionViewMatrix);\n\t\tthis.viewport.project(position,this._projectionViewMatrix,out);\n\t\tvar outE=out.elements;\n\t\toutE[0]=outE[0] / Laya.stage.clientScaleX;\n\t\toutE[1]=outE[1] / Laya.stage.clientScaleY;\n\t}\n\n\t/**\n\t*计算从世界空间准换三维坐标到裁切空间。\n\t*@param position 世界空间的位置。\n\t*@return out 输出位置。\n\t*/\n\t__proto.worldToNormalizedViewportPoint=function(position,out){\n\t\tMatrix4x4.multiply(this._projectionMatrix,this._viewMatrix,this._projectionViewMatrix);\n\t\tthis.normalizedViewport.project(position,this._projectionViewMatrix,out);\n\t\tvar outE=out.elements;\n\t\toutE[0]=outE[0] / Laya.stage.clientScaleX;\n\t\toutE[1]=outE[1] / Laya.stage.clientScaleY;\n\t}\n\n\t/**\n\t*转换2D屏幕坐标系统到3D正交投影下的坐标系统，注:只有正交模型下有效。\n\t*@param source 源坐标。\n\t*@param out 输出坐标。\n\t*@return 是否转换成功。\n\t*/\n\t__proto.convertScreenCoordToOrthographicCoord=function(source,out){\n\t\tif (this._orthographic){\n\t\t\tvar clientWidth=RenderState.clientWidth;\n\t\t\tvar clientHeight=RenderState.clientHeight;\n\t\t\tvar ratioX=this.orthographicVerticalSize *this.aspectRatio / clientWidth;\n\t\t\tvar ratioY=this.orthographicVerticalSize / clientHeight;\n\t\t\tvar sE=source.elements;\n\t\t\tvar oE=out.elements;\n\t\t\toE[0]=(-clientWidth / 2+sE[0])*ratioX;\n\t\t\toE[1]=(clientHeight / 2-sE[1])*ratioY;\n\t\t\toE[2]=(this.nearPlane-this.farPlane)*(sE[2]+1)/ 2-this.nearPlane;\n\t\t\tVector3.transformCoordinate(out,this.transform.worldMatrix,out);\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*获取视图投影矩阵。\n\t*@return 视图投影矩阵。\n\t*/\n\t__getset(0,__proto,'projectionViewMatrix',function(){\n\t\tMatrix4x4.multiply(this.projectionMatrix,this.viewMatrix,this._projectionViewMatrix);\n\t\treturn this._projectionViewMatrix;\n\t});\n\n\t/**\n\t*设置横纵比。\n\t*@param value 横纵比。\n\t*/\n\t/**\n\t*获取横纵比。\n\t*@return 横纵比。\n\t*/\n\t__getset(0,__proto,'aspectRatio',function(){\n\t\tif (this._aspectRatio===0){\n\t\t\tvar vp=this.viewport;\n\t\t\treturn vp.width / vp.height;\n\t\t}\n\t\treturn this._aspectRatio;\n\t\t},function(value){\n\t\tif (value < 0)\n\t\t\tthrow new Error(\"Camera: the aspect ratio has to be a positive real number.\");\n\t\tthis._aspectRatio=value;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*获取摄像机视锥。\n\t*/\n\t__getset(0,__proto,'boundFrustum',function(){\n\t\tif (this._boundFrustumUpdate)\n\t\t\tthis._boundFrustum.matrix=this.projectionViewMatrix;\n\t\treturn this._boundFrustum;\n\t});\n\n\t__getset(0,__proto,'needViewport',function(){\n\t\tvar nVp=this.normalizedViewport;\n\t\treturn nVp.x===0 && nVp.y===0 && nVp.width===1 && nVp.height===1;\n\t});\n\n\t/**\n\t*设置屏幕空间的视口。\n\t*@param 屏幕空间的视口。\n\t*/\n\t/**\n\t*获取屏幕空间的视口。\n\t*@return 屏幕空间的视口。\n\t*/\n\t__getset(0,__proto,'viewport',function(){\n\t\tif (this._viewportExpressedInClipSpace){\n\t\t\tvar nVp=this._normalizedViewport;\n\t\t\tvar size=this.renderTargetSize;\n\t\t\tvar sizeW=size.width;\n\t\t\tvar sizeH=size.height;\n\t\t\tthis._viewport.x=nVp.x *sizeW;\n\t\t\tthis._viewport.y=nVp.y *sizeH;\n\t\t\tthis._viewport.width=nVp.width *sizeW;\n\t\t\tthis._viewport.height=nVp.height *sizeH;\n\t\t}\n\t\treturn this._viewport;\n\t\t},function(value){\n\t\tif (this.renderTarget !=null && (value.x < 0 || value.y < 0 || value.width==0 || value.height==0))\n\t\t\tthrow new Error(\"Camera: viewport size invalid.\",\"value\");\n\t\tthis._viewportExpressedInClipSpace=false;\n\t\tthis._viewport=value;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*设置裁剪空间的视口。\n\t*@return 裁剪空间的视口。\n\t*/\n\t/**\n\t*获取裁剪空间的视口。\n\t*@return 裁剪空间的视口。\n\t*/\n\t__getset(0,__proto,'normalizedViewport',function(){\n\t\tif (!this._viewportExpressedInClipSpace){\n\t\t\tvar vp=this._viewport;\n\t\t\tvar size=this.renderTargetSize;\n\t\t\tvar sizeW=size.width;\n\t\t\tvar sizeH=size.height;\n\t\t\tthis._normalizedViewport.x=vp.x / sizeW;\n\t\t\tthis._normalizedViewport.y=vp.y / sizeH;\n\t\t\tthis._normalizedViewport.width=vp.width / sizeW;\n\t\t\tthis._normalizedViewport.height=vp.height / sizeH;\n\t\t}\n\t\treturn this._normalizedViewport;\n\t\t},function(value){\n\t\tif (value.x < 0){\n\t\t\tvalue.x=0;\n\t\t\tconsole.warn(\"Camera: viewport.x must large than 0.0.\");\n\t\t}\n\t\tif (value.y < 0){\n\t\t\tvalue.y=0;\n\t\t\tconsole.warn(\"Camera: viewport.y must large than 0.0.\");\n\t\t}\n\t\tif (value.x+value.width > 1.0){\n\t\t\tvalue.width=1.0-value.x;\n\t\t\tconsole.warn(\"Camera: viewport.width + viewport.x must less than 1.0.\");\n\t\t}\n\t\tif ((value.y+value.height)> 1.0){\n\t\t\tvalue.height=1.0-value.y;\n\t\t\tconsole.warn(\"Camera: viewport.height + viewport.y must less than 1.0.\");\n\t\t}\n\t\tthis._viewportExpressedInClipSpace=true;\n\t\tthis._normalizedViewport=value;\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**设置投影矩阵。*/\n\t/**获取投影矩阵。*/\n\t__getset(0,__proto,'projectionMatrix',function(){\n\t\treturn this._projectionMatrix;\n\t\t},function(value){\n\t\tthis._projectionMatrix=value;\n\t\tthis._useUserProjectionMatrix=true;\n\t});\n\n\t/**\n\t*获取视图矩阵。\n\t*@return 视图矩阵。\n\t*/\n\t__getset(0,__proto,'viewMatrix',function(){\n\t\tthis.transform.worldMatrix.invert(this._viewMatrix);\n\t\treturn this._viewMatrix;\n\t});\n\n\t__static(Camera,\n\t['_tempVector20',function(){return this._tempVector20=new Vector2();}\n\t]);\n\treturn Camera;\n})(BaseCamera)\n\n\n/**\n*<code>Glitter</code> 类用于创建闪光。\n*/\n//class laya.d3.core.glitter.Glitter extends laya.d3.core.RenderableSprite3D\nvar Glitter=(function(_super){\n\t/**\n\t*创建一个 <code>Glitter</code> 实例。\n\t*@param settings 配置信息。\n\t*/\n\tfunction Glitter(){\n\t\tGlitter.__super.call(this);\n\t\tthis._render=new GlitterRender(this);\n\t\tthis._render.on(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",this,this._onMaterialChanged);\n\t\tvar material=new GlitterMaterial();\n\t\tthis._render.sharedMaterial=material;\n\t\tthis._geometryFilter=new GlitterTemplet(this);\n\t\tmaterial.renderMode=/*laya.d3.core.material.GlitterMaterial.RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE*/8;\n\t\tthis._changeRenderObject(0);\n\t}\n\n\t__class(Glitter,'laya.d3.core.glitter.Glitter',_super);\n\tvar __proto=Glitter.prototype;\n\t/**@private */\n\t__proto._changeRenderObject=function(index){\n\t\tvar renderObjects=this._render._renderElements;\n\t\tvar renderElement=renderObjects[index];\n\t\t(renderElement)|| (renderElement=renderObjects[index]=new RenderElement());\n\t\trenderElement._render=this._render;\n\t\tvar material=this._render.sharedMaterials[index];\n\t\t(material)|| (material=GlitterMaterial.defaultMaterial);\n\t\tvar element=this._geometryFilter;\n\t\trenderElement._mainSortID=0;\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=element;\n\t\trenderElement._material=material;\n\t\treturn renderElement;\n\t}\n\n\t/**@private */\n\t__proto._onMaterialChanged=function(_glitterRender,index,material){\n\t\tvar renderElementCount=_glitterRender._renderElements.length;\n\t\t(index < renderElementCount)&& this._changeRenderObject(index);\n\t}\n\n\t/**@private */\n\t__proto._clearSelfRenderObjects=function(){\n\t\tthis.scene.removeFrustumCullingObject(this._render);\n\t}\n\n\t/**@private */\n\t__proto._addSelfRenderObjects=function(){\n\t\tthis.scene.addFrustumCullingObject(this._render);\n\t}\n\n\t__proto._update=function(state){\n\t\t(this._geometryFilter)._update(state.elapsedTime);\n\t\t_super.prototype._update.call(this,state);\n\t}\n\n\t/**\n\t*通过位置添加刀光。\n\t*@param position0 位置0。\n\t*@param position1 位置1。\n\t*/\n\t__proto.addGlitterByPositions=function(position0,position1){\n\t\t(this._geometryFilter).addVertexPosition(position0,position1);\n\t}\n\n\t/**\n\t*通过位置和速度添加刀光。\n\t*@param position0 位置0。\n\t*@param velocity0 速度0。\n\t*@param position1 位置1。\n\t*@param velocity1 速度1。\n\t*/\n\t__proto.addGlitterByPositionsVelocitys=function(position0,velocity0,position1,velocity1){\n\t\t(this._geometryFilter).addVertexPositionVelocity(position0,velocity0,position1,velocity1);\n\t}\n\n\t__proto.cloneTo=function(destObject){\n\t\tvar destGlitter=destObject;\n\t\tvar destTemplet=destGlitter.templet;\n\t\tvar templet=this._geometryFilter;\n\t\tdestTemplet.lifeTime=templet.lifeTime;\n\t\tdestTemplet.minSegmentDistance=templet.minSegmentDistance;\n\t\tdestTemplet.minInterpDistance=templet.minInterpDistance;\n\t\tdestTemplet.maxSlerpCount=templet.maxSlerpCount;\n\t\tdestTemplet._maxSegments=templet._maxSegments;\n\t\tvar destGlitterRender=destGlitter._render;\n\t\tvar glitterRender=this._render;\n\t\tdestGlitterRender.sharedMaterials=glitterRender.sharedMaterials;\n\t\tdestGlitterRender.enable=glitterRender.enable;\n\t\tlaya.d3.core.Sprite3D.prototype.cloneTo.call(this,destObject);\n\t}\n\n\t/**\n\t*<p>销毁此对象。</p>\n\t*@param destroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._geometryFilter._destroy();\n\t\tthis._geometryFilter=null;\n\t}\n\n\t/**\n\t*获取闪光模板。\n\t*@return 闪光模板。\n\t*/\n\t__getset(0,__proto,'templet',function(){\n\t\treturn this._geometryFilter;\n\t});\n\n\t/**\n\t*获取刀光渲染器。\n\t*@return 刀光渲染器。\n\t*/\n\t__getset(0,__proto,'glitterRender',function(){\n\t\treturn this._render;\n\t});\n\n\tGlitter.CURRENTTIME=2;\n\tGlitter.DURATION=3;\n\treturn Glitter;\n})(RenderableSprite3D)\n\n\n/**\n*<code>DirectionLight</code> 类用于创建平行光。\n*/\n//class laya.d3.core.light.DirectionLight extends laya.d3.core.light.LightSprite\nvar DirectionLight=(function(_super){\n\tfunction DirectionLight(){\n\t\t/**@private */\n\t\tthis._direction=null;\n\t\t/**@private */\n\t\tthis._updateDirection=false;\n\t\tDirectionLight.__super.call(this);\n\t\tthis._updateDirection=false;\n\t\tthis._direction=new Vector3();\n\t\tthis.transform.on(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatrixChange);\n\t}\n\n\t__class(DirectionLight,'laya.d3.core.light.DirectionLight',_super);\n\tvar __proto=DirectionLight.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._initShadow=function(){\n\t\tif (this._shadow){\n\t\t\tthis._parallelSplitShadowMap=new ParallelSplitShadowMap();\n\t\t\tthis.scene.parallelSplitShadowMaps.push(this._parallelSplitShadowMap);\n\t\t\tthis.transform.worldMatrix.getForward(this._direction);\n\t\t\tVector3.normalize(this._direction,this._direction);\n\t\t\tthis._parallelSplitShadowMap.setInfo(this.scene,this._shadowFarPlane,this._direction,this._shadowMapSize,this._shadowMapCount,this._shadowMapPCFType);\n\t\t\t}else {\n\t\t\tvar parallelSplitShadowMaps=this.scene.parallelSplitShadowMaps;\n\t\t\tparallelSplitShadowMaps.splice(parallelSplitShadowMaps.indexOf(this._parallelSplitShadowMap),1);\n\t\t\tthis._parallelSplitShadowMap.disposeAllRenderTarget();\n\t\t\tthis._parallelSplitShadowMap=null;\n\t\t\tthis.scene.removeShaderDefine(ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM1);\n\t\t\tthis.scene.removeShaderDefine(ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM2);\n\t\t\tthis.scene.removeShaderDefine(ParallelSplitShadowMap.SHADERDEFINE_SHADOW_PSSM3);\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._addSelfRenderObjects=function(){\n\t\t_super.prototype._addSelfRenderObjects.call(this);\n\t\tthis._shadow && (this._initShadow());\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._clearSelfRenderObjects=function(){\n\t\tvar scene=this.scene;\n\t\tvar shaderValue=scene._shaderValues;\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,null);\n\t\tscene.removeShaderDefine(ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t}\n\n\t/**\n\t*更新平行光相关渲染状态参数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._prepareToScene=function(state){\n\t\tvar scene=state.scene;\n\t\tif (scene.enableLight && this._activeInHierarchy){\n\t\t\tvar shaderValue=scene._shaderValues;\n\t\t\tscene.addShaderDefine(ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t\t\tVector3.scale(this.color,this._intensity,this._intensityColor);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.LIGHTDIRCOLOR*/4,this._intensityColor.elements);\n\t\t\tthis.transform.worldMatrix.getForward(this._direction);\n\t\t\tVector3.normalize(this._direction,this._direction);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.LIGHTDIRECTION*/3,this._direction.elements);\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\tscene.removeShaderDefine(ShaderCompile3D.SHADERDEFINE_DIRECTIONLIGHT);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldMatrixChange=function(){\n\t\tthis._updateDirection=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'shadow',_super.prototype._$get_shadow,function(value){\n\t\tif (this._shadow!==value){\n\t\t\tthis._shadow=value;\n\t\t\t(this.scene)&& (this._initShadow());\n\t\t}\n\t});\n\n\t/**\n\t*设置平行光的方向。\n\t*@param value 平行光的方向。\n\t*/\n\t/**\n\t*获取平行光的方向。\n\t*@return 平行光的方向。\n\t*/\n\t__getset(0,__proto,'direction',function(){\n\t\tconsole.log(\"Warning: discard property,please use transform's property instead.\");\n\t\tif (this._updateDirection){\n\t\t\tthis.transform.worldMatrix.getForward(this._direction);\n\t\t\tVector3.normalize(this._direction,this._direction);\n\t\t\tthis._updateDirection=false;\n\t\t}\n\t\treturn this._direction;\n\t\t},function(value){\n\t\tconsole.log(\"Warning: discard property,please use transform's property instead.\");\n\t\tvar worldMatrix=this.transform.worldMatrix;\n\t\tworldMatrix.setForward(value);\n\t\tthis.transform.worldMatrix=worldMatrix;\n\t\tVector3.normalize(value,value);\n\t\tthis._direction=value;\n\t\t(this.shadow && this._parallelSplitShadowMap)&& (this._parallelSplitShadowMap._setGlobalParallelLightDir(this._direction));\n\t});\n\n\treturn DirectionLight;\n})(LightSprite)\n\n\n/**\n*<code>PointLight</code> 类用于创建点光。\n*/\n//class laya.d3.core.light.PointLight extends laya.d3.core.light.LightSprite\nvar PointLight=(function(_super){\n\tfunction PointLight(){\n\t\t/**@private */\n\t\tthis._range=NaN;\n\t\t/**@private */\n\t\tthis._attenuation=null;\n\t\tPointLight.__super.call(this);\n\t\tthis._range=6.0;\n\t\tthis._attenuation=new Vector3(0.6,0.6,0.6);\n\t}\n\n\t__class(PointLight,'laya.d3.core.light.PointLight',_super);\n\tvar __proto=PointLight.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._clearSelfRenderObjects=function(){\n\t\tvar scene=this.scene;\n\t\tvar shaderValue=scene._shaderValues;\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.POINTLIGHTCOLOR*/8,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.POINTLIGHTPOS*/5,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.POINTLIGHTRANGE*/6,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.POINTLIGHTATTENUATION*/7,null);\n\t\tscene.removeShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT);\n\t}\n\n\t/**\n\t*更新点光相关渲染状态参数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._prepareToScene=function(state){\n\t\tvar scene=state.scene;\n\t\tif (scene.enableLight && this._activeInHierarchy){\n\t\t\tvar shaderValue=scene._shaderValues;\n\t\t\tscene.addShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT);\n\t\t\tVector3.scale(this.color,this._intensity,this._intensityColor);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.POINTLIGHTCOLOR*/8,this._intensityColor.elements);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.POINTLIGHTPOS*/5,this.transform.position.elements);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.POINTLIGHTRANGE*/6,this.range);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.POINTLIGHTATTENUATION*/7,this.attenuation.elements);\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\tscene.removeShaderDefine(ShaderCompile3D.SHADERDEFINE_POINTLIGHT);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*设置点光的范围。\n\t*@param value 点光的范围。\n\t*/\n\t/**\n\t*获取点光的范围。\n\t*@return 点光的范围。\n\t*/\n\t__getset(0,__proto,'range',function(){\n\t\treturn this._range;\n\t\t},function(value){\n\t\tthis._range=value;\n\t});\n\n\t/**\n\t*设置点光的衰减。\n\t*@param value 点光的衰减。\n\t*/\n\t/**\n\t*获取点光的衰减。\n\t*@return 点光的衰减。\n\t*/\n\t__getset(0,__proto,'attenuation',function(){\n\t\treturn this._attenuation;\n\t\t},function(value){\n\t\tthis._attenuation=value;\n\t});\n\n\treturn PointLight;\n})(LightSprite)\n\n\n/**\n*<code>SpotLight</code> 类用于创建聚光。\n*/\n//class laya.d3.core.light.SpotLight extends laya.d3.core.light.LightSprite\nvar SpotLight=(function(_super){\n\tfunction SpotLight(){\n\t\t/**@private */\n\t\tthis._updateDirection=false;\n\t\t/**@private */\n\t\tthis._direction=null;\n\t\t/**@private */\n\t\tthis._spot=NaN;\n\t\t/**@private */\n\t\tthis._range=NaN;\n\t\t/**@private */\n\t\tthis._attenuation=null;\n\t\tSpotLight.__super.call(this);\n\t\tthis._updateDirection=false;\n\t\tthis.direction=new Vector3(0.0,-1.0,-1.0);\n\t\tthis._attenuation=new Vector3(0.6,0.6,0.6);\n\t\tthis._spot=96.0;\n\t\tthis._range=6.0;\n\t\tthis.transform.on(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatrixChange);\n\t}\n\n\t__class(SpotLight,'laya.d3.core.light.SpotLight',_super);\n\tvar __proto=SpotLight.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldMatrixChange=function(){\n\t\tthis._updateDirection=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._clearSelfRenderObjects=function(){\n\t\tvar scene=this.scene;\n\t\tvar shaderValue=scene._shaderValues;\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTCOLOR*/14,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTPOS*/9,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTDIRECTION*/10,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTRANGE*/12,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTSPOT*/11,null);\n\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTATTENUATION*/13,null);\n\t\tscene.removeShaderDefine(ShaderCompile3D.SHADERDEFINE_SPOTLIGHT);\n\t}\n\n\t/**\n\t*更新聚光相关渲染状态参数。\n\t*@param state 渲染状态参数。\n\t*/\n\t__proto._prepareToScene=function(state){\n\t\tvar scene=state.scene;\n\t\tif (scene.enableLight && this._activeInHierarchy){\n\t\t\tvar shaderValue=scene._shaderValues;\n\t\t\tscene.addShaderDefine(ShaderCompile3D.SHADERDEFINE_SPOTLIGHT);\n\t\t\tVector3.scale(this.color,this._intensity,this._intensityColor);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTCOLOR*/14,this._intensityColor.elements);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTPOS*/9,this.transform.position.elements);\n\t\t\tthis.transform.worldMatrix.getForward(this._direction);\n\t\t\tVector3.normalize(this._direction,this._direction);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTDIRECTION*/10,this._direction.elements);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTRANGE*/12,this.range);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTSPOT*/11,this.spot);\n\t\t\tshaderValue.setValue(/*laya.d3.core.scene.Scene.SPOTLIGHTATTENUATION*/13,this.attenuation.elements);\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\tscene.removeShaderDefine(ShaderCompile3D.SHADERDEFINE_SPOTLIGHT);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/**\n\t*设置聚光的聚光值。\n\t*@param value 聚光的聚光值。\n\t*/\n\t/**\n\t*获取聚光的聚光值。\n\t*@return 聚光的聚光值。\n\t*/\n\t__getset(0,__proto,'spot',function(){\n\t\treturn this._spot;\n\t\t},function(value){\n\t\tthis._spot=value;\n\t});\n\n\t/**\n\t*设置平行光的方向。\n\t*@param value 平行光的方向。\n\t*/\n\t/**\n\t*获取平行光的方向。\n\t*@return 平行光的方向。\n\t*/\n\t__getset(0,__proto,'direction',function(){\n\t\tconsole.log(\"Warning: discard property,please use transform's property instead.\");\n\t\tif (this._updateDirection){\n\t\t\tthis.transform.worldMatrix.getForward(this._direction);\n\t\t\tthis._updateDirection=false;\n\t\t}\n\t\treturn this._direction;\n\t\t},function(value){\n\t\tconsole.log(\"Warning: discard property,please use transform's property instead.\");\n\t\tvar worldMatrix=this.transform.worldMatrix;\n\t\tworldMatrix.setForward(value);\n\t\tthis.transform.worldMatrix=worldMatrix;\n\t\tthis._direction=value;\n\t});\n\n\t/**\n\t*设置聚光的范围。\n\t*@param value 聚光的范围值。\n\t*/\n\t/**\n\t*获取聚光的范围。\n\t*@return 聚光的范围值。\n\t*/\n\t__getset(0,__proto,'range',function(){\n\t\treturn this._range;\n\t\t},function(value){\n\t\tthis._range=value;\n\t});\n\n\t/**\n\t*设置聚光的衰减。\n\t*@param value 聚光的衰减。\n\t*/\n\t/**\n\t*获取聚光的衰减。\n\t*@return 聚光的衰减。\n\t*/\n\t__getset(0,__proto,'attenuation',function(){\n\t\treturn this._attenuation;\n\t\t},function(value){\n\t\tthis._attenuation=value;\n\t});\n\n\treturn SpotLight;\n})(LightSprite)\n\n\n/**\n*<code>MeshSprite3D</code> 类用于创建网格。\n*/\n//class laya.d3.core.MeshSprite3D extends laya.d3.core.RenderableSprite3D\nvar MeshSprite3D=(function(_super){\n\t/**\n\t*创建一个 <code>MeshSprite3D</code> 实例。\n\t*@param mesh 网格,同时会加载网格所用默认材质。\n\t*@param name 名字。\n\t*/\n\tfunction MeshSprite3D(mesh,name){\n\t\tMeshSprite3D.__super.call(this,name);\n\t\tthis._geometryFilter=new MeshFilter(this);\n\t\tthis._render=new MeshRender(this);\n\t\tthis._geometryFilter.on(/*laya.events.Event.MESH_CHANGED*/\"meshchanged\",this,this._onMeshChanged);\n\t\tthis._render.on(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",this,this._onMaterialChanged);\n\t\tif (mesh){\n\t\t\t(this._geometryFilter).sharedMesh=mesh;\n\t\t\tif ((mesh instanceof laya.d3.resource.models.Mesh ))\n\t\t\t\tif (mesh.loaded)\n\t\t\tthis._render.sharedMaterials=(mesh).materials;\n\t\t\telse\n\t\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._applyMeshMaterials);\n\t\t}\n\t}\n\n\t__class(MeshSprite3D,'laya.d3.core.MeshSprite3D',_super);\n\tvar __proto=MeshSprite3D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._changeRenderObjectByMesh=function(index){\n\t\tvar renderObjects=this._render._renderElements;\n\t\tvar renderElement=renderObjects[index];\n\t\t(renderElement)|| (renderElement=renderObjects[index]=new SubMeshRenderElement());\n\t\trenderElement._render=this._render;\n\t\tvar material=this._render.sharedMaterials[index];\n\t\t(material)|| (material=StandardMaterial.defaultMaterial);\n\t\tvar renderObj=(this._geometryFilter).sharedMesh.getRenderElement(index);\n\t\trenderElement._mainSortID=this._getSortID(renderObj,material);\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=renderObj;\n\t\trenderElement._material=material;\n\t\treturn renderElement;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._changeRenderObjectByMaterial=function(index,material){\n\t\tvar renderElement=this._render._renderElements[index];\n\t\t(material)|| (material=StandardMaterial.defaultMaterial);\n\t\tvar renderObj=(this._geometryFilter).sharedMesh.getRenderElement(index);\n\t\trenderElement._mainSortID=this._getSortID(renderObj,material);\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=renderObj;\n\t\trenderElement._material=material;\n\t\treturn renderElement;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._changeRenderObjectsByMesh=function(){\n\t\tvar renderElementsCount=(this._geometryFilter).sharedMesh.getRenderElementsCount();\n\t\tthis._render._renderElements.length=renderElementsCount;\n\t\tfor (var i=0;i < renderElementsCount;i++)\n\t\tthis._changeRenderObjectByMesh(i);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onMeshChanged=function(meshFilter){\n\t\tvar mesh=meshFilter.sharedMesh;\n\t\tif (mesh.loaded)\n\t\t\tthis._changeRenderObjectsByMesh();\n\t\telse\n\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._onMeshLoaded);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onMeshLoaded=function(sender){\n\t\t(sender===this.meshFilter.sharedMesh)&& (this._changeRenderObjectsByMesh());\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onMaterialChanged=function(meshRender,index,material){\n\t\tvar renderElementCount=this._render._renderElements.length;\n\t\t(index < renderElementCount)&& this._changeRenderObjectByMaterial(index,material);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._clearSelfRenderObjects=function(){\n\t\tthis.scene.removeFrustumCullingObject(this._render);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._addSelfRenderObjects=function(){\n\t\tthis.scene.addFrustumCullingObject(this._render);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,json){\n\t\tvar render=this.meshRender;\n\t\tvar lightmapIndex=customProps.lightmapIndex;\n\t\t(lightmapIndex !=null)&& (render.lightmapIndex=lightmapIndex);\n\t\tvar lightmapScaleOffsetArray=customProps.lightmapScaleOffset;\n\t\t(lightmapScaleOffsetArray)&& (render.lightmapScaleOffset=new Vector4(lightmapScaleOffsetArray[0],lightmapScaleOffsetArray[1],lightmapScaleOffsetArray[2],lightmapScaleOffsetArray[3]));\n\t\tvar meshPath,mesh;\n\t\tif (json.instanceParams){\n\t\t\tmeshPath=json.instanceParams.loadPath;\n\t\t\tif (meshPath){\n\t\t\t\tmesh=Loader.getRes(innerResouMap[meshPath]);\n\t\t\t\tthis.meshFilter.sharedMesh=mesh;\n\t\t\t\tif (mesh.loaded)\n\t\t\t\t\trender.sharedMaterials=mesh.materials;\n\t\t\t\telse\n\t\t\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._applyMeshMaterials);\n\t\t\t}\n\t\t\t}else {\n\t\t\tmeshPath=customProps.meshPath;\n\t\t\tif (meshPath){\n\t\t\t\tmesh=Loader.getRes(innerResouMap[meshPath]);\n\t\t\t\tthis.meshFilter.sharedMesh=mesh;\n\t\t\t};\n\t\t\tvar materials=customProps.materials;\n\t\t\tif (materials){\n\t\t\t\tvar sharedMaterials=render.sharedMaterials;\n\t\t\t\tvar materialCount=materials.length;\n\t\t\t\tsharedMaterials.length=materialCount;\n\t\t\t\tfor (var i=0;i < materialCount;i++)\n\t\t\t\tsharedMaterials[i]=Loader.getRes(innerResouMap[materials[i].path]);\n\t\t\t\trender.sharedMaterials=sharedMaterials;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._applyMeshMaterials=function(mesh){\n\t\tvar shaderMaterials=this._render.sharedMaterials;\n\t\tvar meshMaterials=mesh.materials;\n\t\tfor (var i=0,n=meshMaterials.length;i < n;i++)\n\t\t(shaderMaterials[i])|| (shaderMaterials[i]=meshMaterials[i]);\n\t\tthis._render.sharedMaterials=shaderMaterials;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._addToInitStaticBatchManager=function(){\n\t\tMeshSprite3D._staticBatchManager._addInitBatchSprite(this);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar meshSprite3D=destObject;\n\t\t(meshSprite3D._geometryFilter).sharedMesh=(this._geometryFilter).sharedMesh;\n\t\tvar meshRender=this._render;\n\t\tvar destMeshRender=meshSprite3D._render;\n\t\tdestMeshRender.enable=meshRender.enable;\n\t\tdestMeshRender.sharedMaterials=meshRender.sharedMaterials;\n\t\tdestMeshRender.castShadow=meshRender.castShadow;\n\t\tvar lightmapScaleOffset=meshRender.lightmapScaleOffset;\n\t\tlightmapScaleOffset && (destMeshRender.lightmapScaleOffset=lightmapScaleOffset.clone());\n\t\tdestMeshRender.lightmapIndex=meshRender.lightmapIndex;\n\t\tdestMeshRender.receiveShadow=meshRender.receiveShadow;\n\t\tdestMeshRender.sortingFudge=meshRender.sortingFudge;\n\t\tlaya.d3.core.Sprite3D.prototype.cloneTo.call(this,destObject);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\tvar mesh=this.meshFilter.sharedMesh;\n\t\t(mesh.loaded)|| (mesh.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._applyMeshMaterials));\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\t(this._geometryFilter)._destroy();\n\t}\n\n\t/**\n\t*获取网格过滤器。\n\t*@return 网格过滤器。\n\t*/\n\t__getset(0,__proto,'meshFilter',function(){\n\t\treturn this._geometryFilter;\n\t});\n\n\t/**\n\t*获取网格渲染器。\n\t*@return 网格渲染器。\n\t*/\n\t__getset(0,__proto,'meshRender',function(){\n\t\treturn this._render;\n\t});\n\n\tMeshSprite3D.__init__=function(){\n\t\tStaticBatchManager._staticBatchManagers.push(MeshSprite3D._staticBatchManager);\n\t}\n\n\tMeshSprite3D.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,MeshSprite3D);\n\t}\n\n\t__static(MeshSprite3D,\n\t['_staticBatchManager',function(){return this._staticBatchManager=new MeshSprite3DStaticBatchManager();}\n\t]);\n\treturn MeshSprite3D;\n})(RenderableSprite3D)\n\n\n/**\n*<code>ShuriKenParticle3D</code> 3D粒子。\n*/\n//class laya.d3.core.particleShuriKen.ShuriKenParticle3D extends laya.d3.core.RenderableSprite3D\nvar ShuriKenParticle3D=(function(_super){\n\t/**\n\t*创建一个 <code>Particle3D</code> 实例。\n\t*@param settings value 粒子配置。\n\t*/\n\tfunction ShuriKenParticle3D(material){\n\t\tShuriKenParticle3D.__super.call(this);\n\t\tthis._render=new ShurikenParticleRender(this);\n\t\tthis._render.on(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",this,this._onMaterialChanged);\n\t\tthis._geometryFilter=new ShurikenParticleSystem(this);\n\t\tthis._createRenderElement(0);\n\t\t(material)&& (this._render.sharedMaterial=material);\n\t}\n\n\t__class(ShuriKenParticle3D,'laya.d3.core.particleShuriKen.ShuriKenParticle3D',_super);\n\tvar __proto=ShuriKenParticle3D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._initParticleVelocity=function(gradientData){\n\t\tvar gradient=new GradientDataNumber();\n\t\tvar velocitysData=gradientData.velocitys;\n\t\tfor (var i=0,n=velocitysData.length;i < n;i++){\n\t\t\tvar valueData=velocitysData[i];\n\t\t\tgradient.add(valueData.key,valueData.value);\n\t\t}\n\t\treturn gradient;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initParticleColor=function(gradientColorData){\n\t\tvar gradientColor=new GradientDataColor();\n\t\tvar alphasData=gradientColorData.alphas;\n\t\tvar i=0,n=0;\n\t\tfor (i=0,n=alphasData.length;i < n;i++){\n\t\t\tvar alphaData=alphasData[i];\n\t\t\tgradientColor.addAlpha(alphaData.key,alphaData.value);\n\t\t};\n\t\tvar rgbsData=gradientColorData.rgbs;\n\t\tfor (i=0,n=rgbsData.length;i < n;i++){\n\t\t\tvar rgbData=rgbsData[i];\n\t\t\tvar rgbValue=rgbData.value;\n\t\t\tgradientColor.addRGB(rgbData.key,new Vector3(rgbValue[0],rgbValue[1],rgbValue[2]));\n\t\t}\n\t\treturn gradientColor;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initParticleSize=function(gradientSizeData){\n\t\tvar gradientSize=new GradientDataNumber();\n\t\tvar sizesData=gradientSizeData.sizes;\n\t\tfor (var i=0,n=sizesData.length;i < n;i++){\n\t\t\tvar valueData=sizesData[i];\n\t\t\tgradientSize.add(valueData.key,valueData.value);\n\t\t}\n\t\treturn gradientSize;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initParticleRotation=function(gradientData){\n\t\tvar gradient=new GradientDataNumber();\n\t\tvar angularVelocitysData=gradientData.angularVelocitys;\n\t\tfor (var i=0,n=angularVelocitysData.length;i < n;i++){\n\t\t\tvar valueData=angularVelocitysData[i];\n\t\t\tgradient.add(valueData.key,valueData.value / 180.0 *Math.PI);\n\t\t}\n\t\treturn gradient;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initParticleFrame=function(overTimeFramesData){\n\t\tvar overTimeFrame=new GradientDataInt();\n\t\tvar framesData=overTimeFramesData.frames;\n\t\tfor (var i=0,n=framesData.length;i < n;i++){\n\t\t\tvar frameData=framesData[i];\n\t\t\toverTimeFrame.add(frameData.key,frameData.value);\n\t\t}\n\t\treturn overTimeFrame;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._createRenderElement=function(index){\n\t\tvar elements=this._render._renderElements;\n\t\tvar element=elements[index]=new RenderElement();\n\t\telement._render=this._render;\n\t\tvar material=this._render.sharedMaterials[index];\n\t\t(material)|| (material=ShurikenParticleMaterial.defaultMaterial);\n\t\tvar renderable=this._geometryFilter;\n\t\telement._mainSortID=0;\n\t\telement._sprite3D=this;\n\t\telement.renderObj=renderable;\n\t\telement._material=material;\n\t}\n\n\t/**@private */\n\t__proto._onMaterialChanged=function(_particleRender,index,material){\n\t\tvar elements=_particleRender._renderElements;\n\t\tif (index < elements.length){\n\t\t\tvar element=elements[index];\n\t\t\telement._material=material || ShurikenParticleMaterial.defaultMaterial;\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._clearSelfRenderObjects=function(){\n\t\tthis.scene.removeFrustumCullingObject(this._render);\n\t}\n\n\t/**@private */\n\t__proto._addSelfRenderObjects=function(){\n\t\tthis.scene.addFrustumCullingObject(this._render);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,nodeData){\n\t\tvar anglelToRad=Math.PI / 180.0;\n\t\tvar i=0,n=0;\n\t\tvar particleRender=this.particleRender;\n\t\tvar material;\n\t\tvar materialData=customProps.material;\n\t\tif (materialData){\n\t\t\tmaterial=Loader.getRes(innerResouMap[materialData.path]);\n\t\t\t}else {\n\t\t\tvar materialPath=customProps.materialPath;\n\t\t\tif (materialPath){\n\t\t\t\tmaterial=Loader.getRes(innerResouMap[materialPath]);\n\t\t\t\t}else {\n\t\t\t\tmaterial=new ShurikenParticleMaterial();\n\t\t\t\tmaterial.diffuseTexture=innerResouMap ? Loader.getRes(innerResouMap[customProps.texturePath]):Texture2D.load(customProps.texturePath);\n\t\t\t}\n\t\t}\n\t\tparticleRender.sharedMaterial=material;\n\t\tvar meshPath=customProps.meshPath;\n\t\t(meshPath)&& (particleRender.mesh=Loader.getRes(innerResouMap[meshPath]));\n\t\tparticleRender.renderMode=customProps.renderMode;\n\t\tparticleRender.stretchedBillboardCameraSpeedScale=customProps.stretchedBillboardCameraSpeedScale;\n\t\tparticleRender.stretchedBillboardSpeedScale=customProps.stretchedBillboardSpeedScale;\n\t\tparticleRender.stretchedBillboardLengthScale=customProps.stretchedBillboardLengthScale;\n\t\tparticleRender.sortingFudge=customProps.sortingFudge ? customProps.sortingFudge :0.0;\n\t\tvar particleSystem=this.particleSystem;\n\t\tparticleSystem.isPerformanceMode=customProps.isPerformanceMode;\n\t\tparticleSystem.duration=customProps.duration;\n\t\tparticleSystem.looping=customProps.looping;\n\t\tparticleSystem.prewarm=customProps.prewarm;\n\t\tparticleSystem.startDelayType=customProps.startDelayType;\n\t\tparticleSystem.startDelay=customProps.startDelay;\n\t\tparticleSystem.startDelayMin=customProps.startDelayMin;\n\t\tparticleSystem.startDelayMax=customProps.startDelayMax;\n\t\tparticleSystem.startLifetimeType=customProps.startLifetimeType;\n\t\tparticleSystem.startLifetimeConstant=customProps.startLifetimeConstant;\n\t\tparticleSystem.startLifeTimeGradient=ShuriKenParticle3D._initStartLife(customProps.startLifetimeGradient);\n\t\tparticleSystem.startLifetimeConstantMin=customProps.startLifetimeConstantMin;\n\t\tparticleSystem.startLifetimeConstantMax=customProps.startLifetimeConstantMax;\n\t\tparticleSystem.startLifeTimeGradientMin=ShuriKenParticle3D._initStartLife(customProps.startLifetimeGradientMin);\n\t\tparticleSystem.startLifeTimeGradientMax=ShuriKenParticle3D._initStartLife(customProps.startLifetimeGradientMax);\n\t\tparticleSystem.startSpeedType=customProps.startSpeedType;\n\t\tparticleSystem.startSpeedConstant=customProps.startSpeedConstant;\n\t\tparticleSystem.startSpeedConstantMin=customProps.startSpeedConstantMin;\n\t\tparticleSystem.startSpeedConstantMax=customProps.startSpeedConstantMax;\n\t\tparticleSystem.threeDStartSize=customProps.threeDStartSize;\n\t\tparticleSystem.startSizeType=customProps.startSizeType;\n\t\tparticleSystem.startSizeConstant=customProps.startSizeConstant;\n\t\tvar startSizeConstantSeparateArray=customProps.startSizeConstantSeparate;\n\t\tvar startSizeConstantSeparateElement=particleSystem.startSizeConstantSeparate.elements;\n\t\tstartSizeConstantSeparateElement[0]=startSizeConstantSeparateArray[0];\n\t\tstartSizeConstantSeparateElement[1]=startSizeConstantSeparateArray[1];\n\t\tstartSizeConstantSeparateElement[2]=startSizeConstantSeparateArray[2];\n\t\tparticleSystem.startSizeConstantMin=customProps.startSizeConstantMin;\n\t\tparticleSystem.startSizeConstantMax=customProps.startSizeConstantMax;\n\t\tvar startSizeConstantMinSeparateArray=customProps.startSizeConstantMinSeparate;\n\t\tvar startSizeConstantMinSeparateElement=particleSystem.startSizeConstantMinSeparate.elements;\n\t\tstartSizeConstantMinSeparateElement[0]=startSizeConstantMinSeparateArray[0];\n\t\tstartSizeConstantMinSeparateElement[1]=startSizeConstantMinSeparateArray[1];\n\t\tstartSizeConstantMinSeparateElement[2]=startSizeConstantMinSeparateArray[2];\n\t\tvar startSizeConstantMaxSeparateArray=customProps.startSizeConstantMaxSeparate;\n\t\tvar startSizeConstantMaxSeparateElement=particleSystem.startSizeConstantMaxSeparate.elements;\n\t\tstartSizeConstantMaxSeparateElement[0]=startSizeConstantMaxSeparateArray[0];\n\t\tstartSizeConstantMaxSeparateElement[1]=startSizeConstantMaxSeparateArray[1];\n\t\tstartSizeConstantMaxSeparateElement[2]=startSizeConstantMaxSeparateArray[2];\n\t\tparticleSystem.threeDStartRotation=customProps.threeDStartRotation;\n\t\tparticleSystem.startRotationType=customProps.startRotationType;\n\t\tparticleSystem.startRotationConstant=customProps.startRotationConstant *anglelToRad;\n\t\tvar startRotationConstantSeparateArray=customProps.startRotationConstantSeparate;\n\t\tvar startRotationConstantSeparateElement=particleSystem.startRotationConstantSeparate.elements;\n\t\tstartRotationConstantSeparateElement[0]=startRotationConstantSeparateArray[0] *anglelToRad;\n\t\tstartRotationConstantSeparateElement[1]=startRotationConstantSeparateArray[1] *anglelToRad;\n\t\tstartRotationConstantSeparateElement[2]=startRotationConstantSeparateArray[2] *anglelToRad;\n\t\tparticleSystem.startRotationConstantMin=customProps.startRotationConstantMin *anglelToRad;\n\t\tparticleSystem.startRotationConstantMax=customProps.startRotationConstantMax *anglelToRad;\n\t\tvar startRotationConstantMinSeparateArray=customProps.startRotationConstantMinSeparate;\n\t\tvar startRotationConstantMinSeparateElement=particleSystem.startRotationConstantMinSeparate.elements;\n\t\tstartRotationConstantMinSeparateElement[0]=startRotationConstantMinSeparateArray[0] *anglelToRad;\n\t\tstartRotationConstantMinSeparateElement[1]=startRotationConstantMinSeparateArray[1] *anglelToRad;\n\t\tstartRotationConstantMinSeparateElement[2]=startRotationConstantMinSeparateArray[2] *anglelToRad;\n\t\tvar startRotationConstantMaxSeparateArray=customProps.startRotationConstantMaxSeparate;\n\t\tvar startRotationConstantMaxSeparateElement=particleSystem.startRotationConstantMaxSeparate.elements;\n\t\tstartRotationConstantMaxSeparateElement[0]=startRotationConstantMaxSeparateArray[0] *anglelToRad;\n\t\tstartRotationConstantMaxSeparateElement[1]=startRotationConstantMaxSeparateArray[1] *anglelToRad;\n\t\tstartRotationConstantMaxSeparateElement[2]=startRotationConstantMaxSeparateArray[2] *anglelToRad;\n\t\tparticleSystem.randomizeRotationDirection=customProps.randomizeRotationDirection;\n\t\tparticleSystem.startColorType=customProps.startColorType;\n\t\tvar startColorConstantArray=customProps.startColorConstant;\n\t\tvar startColorConstantElement=particleSystem.startColorConstant.elements;\n\t\tstartColorConstantElement[0]=startColorConstantArray[0];\n\t\tstartColorConstantElement[1]=startColorConstantArray[1];\n\t\tstartColorConstantElement[2]=startColorConstantArray[2];\n\t\tstartColorConstantElement[3]=startColorConstantArray[3];\n\t\tvar startColorConstantMinArray=customProps.startColorConstantMin;\n\t\tvar startColorConstantMinElement=particleSystem.startColorConstantMin.elements;\n\t\tstartColorConstantMinElement[0]=startColorConstantMinArray[0];\n\t\tstartColorConstantMinElement[1]=startColorConstantMinArray[1];\n\t\tstartColorConstantMinElement[2]=startColorConstantMinArray[2];\n\t\tstartColorConstantMinElement[3]=startColorConstantMinArray[3];\n\t\tvar startColorConstantMaxArray=customProps.startColorConstantMax;\n\t\tvar startColorConstantMaxElement=particleSystem.startColorConstantMax.elements;\n\t\tstartColorConstantMaxElement[0]=startColorConstantMaxArray[0];\n\t\tstartColorConstantMaxElement[1]=startColorConstantMaxArray[1];\n\t\tstartColorConstantMaxElement[2]=startColorConstantMaxArray[2];\n\t\tstartColorConstantMaxElement[3]=startColorConstantMaxArray[3];\n\t\tparticleSystem.gravityModifier=customProps.gravityModifier;\n\t\tparticleSystem.simulationSpace=customProps.simulationSpace;\n\t\tparticleSystem.scaleMode=customProps.scaleMode;\n\t\tparticleSystem.playOnAwake=customProps.playOnAwake;\n\t\tparticleSystem.maxParticles=customProps.maxParticles;\n\t\tvar autoRandomSeed=customProps.autoRandomSeed;\n\t\t(autoRandomSeed !=null)&& (particleSystem.autoRandomSeed=autoRandomSeed);\n\t\tvar randomSeed=customProps.randomSeed;\n\t\t(randomSeed !=null)&& (particleSystem.randomSeed[0]=randomSeed);\n\t\tvar emissionData=customProps.emission;\n\t\tvar emission=particleSystem.emission;\n\t\tif (emissionData){\n\t\t\temission.emissionRate=emissionData.emissionRate;\n\t\t\tvar burstsData=emissionData.bursts;\n\t\t\tif (burstsData)\n\t\t\t\tfor (i=0,n=burstsData.length;i < n;i++){\n\t\t\t\tvar brust=burstsData[i];\n\t\t\t\temission.addBurst(new Burst(brust.time,brust.min,brust.max));\n\t\t\t}\n\t\t\temission.enbale=emissionData.enable;\n\t\t\t}else {\n\t\t\temission.enbale=false;\n\t\t};\n\t\tvar shapeData=customProps.shape;\n\t\tif (shapeData){\n\t\t\tvar shape;\n\t\t\tswitch (shapeData.shapeType){\n\t\t\t\tcase 0:;\n\t\t\t\t\tvar sphereShape;\n\t\t\t\t\tshape=sphereShape=new SphereShape();\n\t\t\t\t\tsphereShape.radius=shapeData.sphereRadius;\n\t\t\t\t\tsphereShape.emitFromShell=shapeData.sphereEmitFromShell;\n\t\t\t\t\tsphereShape.randomDirection=shapeData.sphereRandomDirection;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:;\n\t\t\t\t\tvar hemiSphereShape;\n\t\t\t\t\tshape=hemiSphereShape=new HemisphereShape();\n\t\t\t\t\themiSphereShape.radius=shapeData.hemiSphereRadius;\n\t\t\t\t\themiSphereShape.emitFromShell=shapeData.hemiSphereEmitFromShell;\n\t\t\t\t\themiSphereShape.randomDirection=shapeData.hemiSphereRandomDirection;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:;\n\t\t\t\t\tvar coneShape;\n\t\t\t\t\tshape=coneShape=new ConeShape();\n\t\t\t\t\tconeShape.angle=shapeData.coneAngle *anglelToRad;\n\t\t\t\t\tconeShape.radius=shapeData.coneRadius;\n\t\t\t\t\tconeShape.length=shapeData.coneLength;\n\t\t\t\t\tconeShape.emitType=shapeData.coneEmitType;\n\t\t\t\t\tconeShape.randomDirection=shapeData.coneRandomDirection;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:;\n\t\t\t\t\tvar boxShape;\n\t\t\t\t\tshape=boxShape=new BoxShape();\n\t\t\t\t\tboxShape.x=shapeData.boxX;\n\t\t\t\t\tboxShape.y=shapeData.boxY;\n\t\t\t\t\tboxShape.z=shapeData.boxZ;\n\t\t\t\t\tboxShape.randomDirection=shapeData.boxRandomDirection;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 7:;\n\t\t\t\t\tvar circleShape;\n\t\t\t\t\tshape=circleShape=new CircleShape();\n\t\t\t\t\tcircleShape.radius=shapeData.circleRadius;\n\t\t\t\t\tcircleShape.arc=shapeData.circleArc *anglelToRad;\n\t\t\t\t\tcircleShape.emitFromEdge=shapeData.circleEmitFromEdge;\n\t\t\t\t\tcircleShape.randomDirection=shapeData.circleRandomDirection;\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :;\n\t\t\t\t\tvar tempShape;\n\t\t\t\t\tshape=tempShape=new CircleShape();\n\t\t\t\t\ttempShape.radius=shapeData.circleRadius;\n\t\t\t\t\ttempShape.arc=shapeData.circleArc *anglelToRad;\n\t\t\t\t\ttempShape.emitFromEdge=shapeData.circleEmitFromEdge;\n\t\t\t\t\ttempShape.randomDirection=shapeData.circleRandomDirection;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\tshape.enable=shapeData.enable;\n\t\t\tparticleSystem.shape=shape;\n\t\t};\n\t\tvar velocityOverLifetimeData=customProps.velocityOverLifetime;\n\t\tif (velocityOverLifetimeData){\n\t\t\tvar velocityData=velocityOverLifetimeData.velocity;\n\t\t\tvar velocity;\n\t\t\tswitch (velocityData.type){\n\t\t\t\tcase 0:;\n\t\t\t\t\tvar constantData=velocityData.constant;\n\t\t\t\t\tvelocity=GradientVelocity.createByConstant(new Vector3(constantData[0],constantData[1],constantData[2]));\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tvelocity=GradientVelocity.createByGradient(this._initParticleVelocity(velocityData.gradientX),this._initParticleVelocity(velocityData.gradientY),this._initParticleVelocity(velocityData.gradientZ));\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:;\n\t\t\t\t\tvar constantMinData=velocityData.constantMin;\n\t\t\t\t\tvar constantMaxData=velocityData.constantMax;\n\t\t\t\t\tvelocity=GradientVelocity.createByRandomTwoConstant(new Vector3(constantMinData[0],constantMinData[1],constantMinData[2]),new Vector3(constantMaxData[0],constantMaxData[1],constantMaxData[2]));\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tvelocity=GradientVelocity.createByRandomTwoGradient(this._initParticleVelocity(velocityData.gradientXMin),this._initParticleVelocity(velocityData.gradientXMax),this._initParticleVelocity(velocityData.gradientYMin),this._initParticleVelocity(velocityData.gradientYMax),this._initParticleVelocity(velocityData.gradientZMin),this._initParticleVelocity(velocityData.gradientZMax));\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar velocityOverLifetime=new VelocityOverLifetime(velocity);\n\t\t\tvelocityOverLifetime.space=velocityOverLifetimeData.space;\n\t\t\tvelocityOverLifetime.enbale=velocityOverLifetimeData.enable;\n\t\t\tparticleSystem.velocityOverLifetime=velocityOverLifetime;\n\t\t};\n\t\tvar colorOverLifetimeData=customProps.colorOverLifetime;\n\t\tif (colorOverLifetimeData){\n\t\t\tvar colorData=colorOverLifetimeData.color;\n\t\t\tvar color;\n\t\t\tswitch (colorData.type){\n\t\t\t\tcase 0:;\n\t\t\t\t\tvar constColorData=colorData.constant;\n\t\t\t\t\tcolor=GradientColor.createByConstant(new Vector4(constColorData[0],constColorData[1],constColorData[2],constColorData[3]));\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tcolor=GradientColor.createByGradient(this._initParticleColor(colorData.gradient));\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:;\n\t\t\t\t\tvar minConstColorData=colorData.constantMin;\n\t\t\t\t\tvar maxConstColorData=colorData.constantMax;\n\t\t\t\t\tcolor=GradientColor.createByRandomTwoConstant(new Vector4(minConstColorData[0],minConstColorData[1],minConstColorData[2],minConstColorData[3]),new Vector4(maxConstColorData[0],maxConstColorData[1],maxConstColorData[2],maxConstColorData[3]));\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tcolor=GradientColor.createByRandomTwoGradient(this._initParticleColor(colorData.gradientMin),this._initParticleColor(colorData.gradientMax));\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar colorOverLifetime=new ColorOverLifetime(color);\n\t\t\tcolorOverLifetime.enbale=colorOverLifetimeData.enable;\n\t\t\tparticleSystem.colorOverLifetime=colorOverLifetime;\n\t\t};\n\t\tvar sizeOverLifetimeData=customProps.sizeOverLifetime;\n\t\tif (sizeOverLifetimeData){\n\t\t\tvar sizeData=sizeOverLifetimeData.size;\n\t\t\tvar size;\n\t\t\tswitch (sizeData.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tif (sizeData.separateAxes){\n\t\t\t\t\t\tsize=GradientSize.createByGradientSeparate(this._initParticleSize(sizeData.gradientX),this._initParticleSize(sizeData.gradientY),this._initParticleSize(sizeData.gradientZ));\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tsize=GradientSize.createByGradient(this._initParticleSize(sizeData.gradient));\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tif (sizeData.separateAxes){\n\t\t\t\t\t\tvar constantMinSeparateData=sizeData.constantMinSeparate;\n\t\t\t\t\t\tvar constantMaxSeparateData=sizeData.constantMaxSeparate;\n\t\t\t\t\t\tsize=GradientSize.createByRandomTwoConstantSeparate(new Vector3(constantMinSeparateData[0],constantMinSeparateData[1],constantMinSeparateData[2]),new Vector3(constantMaxSeparateData[0],constantMaxSeparateData[1],constantMaxSeparateData[2]));\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tsize=GradientSize.createByRandomTwoConstant(sizeData.constantMin,sizeData.constantMax);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tif (sizeData.separateAxes){\n\t\t\t\t\t\tsize=GradientSize.createByRandomTwoGradientSeparate(this._initParticleSize(sizeData.gradientXMin),this._initParticleSize(sizeData.gradientYMin),this._initParticleSize(sizeData.gradientZMin),this._initParticleSize(sizeData.gradientXMax),this._initParticleSize(sizeData.gradientYMax),this._initParticleSize(sizeData.gradientZMax));\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tsize=GradientSize.createByRandomTwoGradient(this._initParticleSize(sizeData.gradientMin),this._initParticleSize(sizeData.gradientMax));\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar sizeOverLifetime=new SizeOverLifetime(size);\n\t\t\tsizeOverLifetime.enbale=sizeOverLifetimeData.enable;\n\t\t\tparticleSystem.sizeOverLifetime=sizeOverLifetime;\n\t\t};\n\t\tvar rotationOverLifetimeData=customProps.rotationOverLifetime;\n\t\tif (rotationOverLifetimeData){\n\t\t\tvar angularVelocityData=rotationOverLifetimeData.angularVelocity;\n\t\t\tvar angularVelocity;\n\t\t\tswitch (angularVelocityData.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tif (angularVelocityData.separateAxes){\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tangularVelocity=GradientAngularVelocity.createByConstant(angularVelocityData.constant *anglelToRad);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tif (angularVelocityData.separateAxes){\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tangularVelocity=GradientAngularVelocity.createByGradient(this._initParticleRotation(angularVelocityData.gradient));\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tif (angularVelocityData.separateAxes){\n\t\t\t\t\t\tvar minSep=angularVelocityData.constantMinSeparate;\n\t\t\t\t\t\tvar maxSep=angularVelocityData.constantMaxSeparate;\n\t\t\t\t\t\tangularVelocity=GradientAngularVelocity.createByRandomTwoConstantSeparate(new Vector3(minSep[0]*anglelToRad,minSep[1]*anglelToRad,minSep[2]*anglelToRad),new Vector3(maxSep[0]*anglelToRad,maxSep[1]*anglelToRad,maxSep[2]*anglelToRad));\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tangularVelocity=GradientAngularVelocity.createByRandomTwoConstant(angularVelocityData.constantMin *anglelToRad,angularVelocityData.constantMax *anglelToRad);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tif (angularVelocityData.separateAxes){\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tangularVelocity=GradientAngularVelocity.createByRandomTwoGradient(this._initParticleRotation(angularVelocityData.gradientMin),this._initParticleRotation(angularVelocityData.gradientMax));\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar rotationOverLifetime=new RotationOverLifetime(angularVelocity);\n\t\t\trotationOverLifetime.enbale=rotationOverLifetimeData.enable;\n\t\t\tparticleSystem.rotationOverLifetime=rotationOverLifetime;\n\t\t};\n\t\tvar textureSheetAnimationData=customProps.textureSheetAnimation;\n\t\tif (textureSheetAnimationData){\n\t\t\tvar frameData=textureSheetAnimationData.frame;\n\t\t\tvar frameOverTime;\n\t\t\tswitch (frameData.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tframeOverTime=FrameOverTime.createByConstant(frameData.constant);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tframeOverTime=FrameOverTime.createByOverTime(this._initParticleFrame(frameData.overTime));\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 2:\n\t\t\t\t\tframeOverTime=FrameOverTime.createByRandomTwoConstant(frameData.constantMin,frameData.constantMax);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 3:\n\t\t\t\t\tframeOverTime=FrameOverTime.createByRandomTwoOverTime(this._initParticleFrame(frameData.overTimeMin),this._initParticleFrame(frameData.overTimeMax));\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar startFrameData=textureSheetAnimationData.startFrame;\n\t\t\tvar startFrame;\n\t\t\tswitch (startFrameData.type){\n\t\t\t\tcase 0:\n\t\t\t\t\tstartFrame=StartFrame.createByConstant(startFrameData.constant);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase 1:\n\t\t\t\t\tstartFrame=StartFrame.createByRandomTwoConstant(startFrameData.constantMin,startFrameData.constantMax);\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar textureSheetAnimation=new TextureSheetAnimation(frameOverTime,startFrame);\n\t\t\ttextureSheetAnimation.enable=textureSheetAnimationData.enable;\n\t\t\tvar tilesData=textureSheetAnimationData.tiles;\n\t\t\ttextureSheetAnimation.tiles=new Vector2(tilesData[0],tilesData[1]);\n\t\t\ttextureSheetAnimation.type=textureSheetAnimationData.type;\n\t\t\ttextureSheetAnimation.randomRow=textureSheetAnimationData.randomRow;\n\t\t\tvar rowIndex=textureSheetAnimationData.rowIndex;\n\t\t\t(rowIndex!==undefined)&& (textureSheetAnimation.rowIndex=rowIndex);\n\t\t\ttextureSheetAnimation.cycles=textureSheetAnimationData.cycles;\n\t\t\tparticleSystem.textureSheetAnimation=textureSheetAnimation;\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._activeHierarchy=function(){\n\t\tlaya.d3.core.Sprite3D.prototype._activeHierarchy.call(this);\n\t\t(this.particleSystem.playOnAwake)&& (this.particleSystem.play());\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._inActiveHierarchy=function(){\n\t\tlaya.d3.core.Sprite3D.prototype._inActiveHierarchy.call(this);\n\t\t(this.particleSystem.isAlive)&& (this.particleSystem.simulate(0,true));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar destShuriKenParticle3D=destObject;\n\t\tvar destParticleSystem=destShuriKenParticle3D._geometryFilter;\n\t\t(this._geometryFilter).cloneTo(destParticleSystem);\n\t\tvar destParticleRender=destShuriKenParticle3D._render;\n\t\tvar particleRender=this._render;\n\t\tdestParticleRender.sharedMaterials=particleRender.sharedMaterials;\n\t\tdestParticleRender.enable=particleRender.enable;\n\t\tdestParticleRender.renderMode=particleRender.renderMode;\n\t\tdestParticleRender.mesh=particleRender.mesh;\n\t\tdestParticleRender.stretchedBillboardCameraSpeedScale=particleRender.stretchedBillboardCameraSpeedScale;\n\t\tdestParticleRender.stretchedBillboardSpeedScale=particleRender.stretchedBillboardSpeedScale;\n\t\tdestParticleRender.stretchedBillboardLengthScale=particleRender.stretchedBillboardLengthScale;\n\t\tdestParticleRender.sortingFudge=particleRender.sortingFudge;\n\t\tlaya.d3.core.Sprite3D.prototype.cloneTo.call(this,destObject);\n\t}\n\n\t/**\n\t*<p>销毁此对象。</p>\n\t*@param destroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\t(this._geometryFilter)._destroy();\n\t\tthis._geometryFilter=null;\n\t}\n\n\t/**\n\t*获取粒子系统。\n\t*@return 粒子系统。\n\t*/\n\t__getset(0,__proto,'particleSystem',function(){\n\t\treturn this._geometryFilter;\n\t});\n\n\t/**\n\t*获取粒子渲染器。\n\t*@return 粒子渲染器。\n\t*/\n\t__getset(0,__proto,'particleRender',function(){\n\t\treturn this._render;\n\t});\n\n\tShuriKenParticle3D.__init__=function(){\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_BILLBOARD=ShuriKenParticle3D.shaderDefines.registerDefine(\"SPHERHBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_STRETCHEDBILLBOARD=ShuriKenParticle3D.shaderDefines.registerDefine(\"STRETCHEDBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_HORIZONTALBILLBOARD=ShuriKenParticle3D.shaderDefines.registerDefine(\"HORIZONTALBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_VERTICALBILLBOARD=ShuriKenParticle3D.shaderDefines.registerDefine(\"VERTICALBILLBOARD\");\n\t\tShuriKenParticle3D.SHADERDEFINE_COLOROVERLIFETIME=ShuriKenParticle3D.shaderDefines.registerDefine(\"COLOROVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RANDOMCOLOROVERLIFETIME=ShuriKenParticle3D.shaderDefines.registerDefine(\"RANDOMCOLOROVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECONSTANT=ShuriKenParticle3D.shaderDefines.registerDefine(\"VELOCITYOVERLIFETIMECONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECURVE=ShuriKenParticle3D.shaderDefines.registerDefine(\"VELOCITYOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCONSTANT=ShuriKenParticle3D.shaderDefines.registerDefine(\"VELOCITYOVERLIFETIMERANDOMCONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCURVE=ShuriKenParticle3D.shaderDefines.registerDefine(\"VELOCITYOVERLIFETIMERANDOMCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONCURVE=ShuriKenParticle3D.shaderDefines.registerDefine(\"TEXTURESHEETANIMATIONCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONRANDOMCURVE=ShuriKenParticle3D.shaderDefines.registerDefine(\"TEXTURESHEETANIMATIONRANDOMCURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIME=ShuriKenParticle3D.shaderDefines.registerDefine(\"ROTATIONOVERLIFETIME\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMESEPERATE=ShuriKenParticle3D.shaderDefines.registerDefine(\"ROTATIONOVERLIFETIMESEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECONSTANT=ShuriKenParticle3D.shaderDefines.registerDefine(\"ROTATIONOVERLIFETIMECONSTANT\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECURVE=ShuriKenParticle3D.shaderDefines.registerDefine(\"ROTATIONOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCONSTANTS=ShuriKenParticle3D.shaderDefines.registerDefine(\"ROTATIONOVERLIFETIMERANDOMCURVES\");\n\t\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCURVES=ShuriKenParticle3D.shaderDefines.registerDefine(\"ROTATIONOVERLIFETIMERANDOMCURVES\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVE=ShuriKenParticle3D.shaderDefines.registerDefine(\"SIZEOVERLIFETIMECURVE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVESEPERATE=ShuriKenParticle3D.shaderDefines.registerDefine(\"SIZEOVERLIFETIMECURVESEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVES=ShuriKenParticle3D.shaderDefines.registerDefine(\"SIZEOVERLIFETIMERANDOMCURVES\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVESSEPERATE=ShuriKenParticle3D.shaderDefines.registerDefine(\"SIZEOVERLIFETIMERANDOMCURVESSEPERATE\");\n\t\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_MESH=ShuriKenParticle3D.shaderDefines.registerDefine(\"RENDERMODE_MESH\");\n\t\tShuriKenParticle3D.SHADERDEFINE_SHAPE=ShuriKenParticle3D.shaderDefines.registerDefine(\"SHAPE\");\n\t}\n\n\tShuriKenParticle3D.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,ShuriKenParticle3D);\n\t}\n\n\tShuriKenParticle3D._initStartLife=function(gradientData){\n\t\tvar gradient=new GradientDataNumber();\n\t\tvar startLifetimesData=gradientData.startLifetimes;\n\t\tfor (var i=0,n=startLifetimesData.length;i < n;i++){\n\t\t\tvar valueData=startLifetimesData[i];\n\t\t\tgradient.add(valueData.key,valueData.value);\n\t\t}\n\t\treturn gradient;\n\t}\n\n\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_BILLBOARD=0;\n\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_STRETCHEDBILLBOARD=0;\n\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_HORIZONTALBILLBOARD=0;\n\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_VERTICALBILLBOARD=0;\n\tShuriKenParticle3D.SHADERDEFINE_COLOROVERLIFETIME=0;\n\tShuriKenParticle3D.SHADERDEFINE_RANDOMCOLOROVERLIFETIME=0;\n\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECONSTANT=0;\n\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMECURVE=0;\n\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCONSTANT=0;\n\tShuriKenParticle3D.SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCURVE=0;\n\tShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONCURVE=0;\n\tShuriKenParticle3D.SHADERDEFINE_TEXTURESHEETANIMATIONRANDOMCURVE=0;\n\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIME=0;\n\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMESEPERATE=0;\n\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECONSTANT=0;\n\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMECURVE=0;\n\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCONSTANTS=0;\n\tShuriKenParticle3D.SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCURVES=0;\n\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVE=0;\n\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMECURVESEPERATE=0;\n\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVES=0;\n\tShuriKenParticle3D.SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVESSEPERATE=0;\n\tShuriKenParticle3D.SHADERDEFINE_RENDERMODE_MESH=0;\n\tShuriKenParticle3D.SHADERDEFINE_SHAPE=0;\n\tShuriKenParticle3D.WORLDPOSITION=0;\n\tShuriKenParticle3D.WORLDROTATION=1;\n\tShuriKenParticle3D.POSITIONSCALE=4;\n\tShuriKenParticle3D.SIZESCALE=5;\n\tShuriKenParticle3D.SCALINGMODE=6;\n\tShuriKenParticle3D.GRAVITY=7;\n\tShuriKenParticle3D.THREEDSTARTROTATION=8;\n\tShuriKenParticle3D.STRETCHEDBILLBOARDLENGTHSCALE=9;\n\tShuriKenParticle3D.STRETCHEDBILLBOARDSPEEDSCALE=10;\n\tShuriKenParticle3D.SIMULATIONSPACE=11;\n\tShuriKenParticle3D.CURRENTTIME=12;\n\tShuriKenParticle3D.VOLVELOCITYCONST=13;\n\tShuriKenParticle3D.VOLVELOCITYGRADIENTX=14;\n\tShuriKenParticle3D.VOLVELOCITYGRADIENTY=15;\n\tShuriKenParticle3D.VOLVELOCITYGRADIENTZ=16;\n\tShuriKenParticle3D.VOLVELOCITYCONSTMAX=17;\n\tShuriKenParticle3D.VOLVELOCITYGRADIENTXMAX=18;\n\tShuriKenParticle3D.VOLVELOCITYGRADIENTYMAX=19;\n\tShuriKenParticle3D.VOLVELOCITYGRADIENTZMAX=20;\n\tShuriKenParticle3D.VOLSPACETYPE=21;\n\tShuriKenParticle3D.COLOROVERLIFEGRADIENTALPHAS=22;\n\tShuriKenParticle3D.COLOROVERLIFEGRADIENTCOLORS=23;\n\tShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTALPHAS=24;\n\tShuriKenParticle3D.MAXCOLOROVERLIFEGRADIENTCOLORS=25;\n\tShuriKenParticle3D.SOLSIZEGRADIENT=26;\n\tShuriKenParticle3D.SOLSIZEGRADIENTX=27;\n\tShuriKenParticle3D.SOLSIZEGRADIENTY=28;\n\tShuriKenParticle3D.SOLSizeGradientZ=29;\n\tShuriKenParticle3D.SOLSizeGradientMax=30;\n\tShuriKenParticle3D.SOLSIZEGRADIENTXMAX=31;\n\tShuriKenParticle3D.SOLSIZEGRADIENTYMAX=32;\n\tShuriKenParticle3D.SOLSizeGradientZMAX=33;\n\tShuriKenParticle3D.ROLANGULARVELOCITYCONST=34;\n\tShuriKenParticle3D.ROLANGULARVELOCITYCONSTSEPRARATE=35;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENT=36;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTX=37;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTY=38;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZ=39;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTW=40;\n\tShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAX=41;\n\tShuriKenParticle3D.ROLANGULARVELOCITYCONSTMAXSEPRARATE=42;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTMAX=43;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTXMAX=44;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTYMAX=45;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTZMAX=46;\n\tShuriKenParticle3D.ROLANGULARVELOCITYGRADIENTWMAX=47;\n\tShuriKenParticle3D.TEXTURESHEETANIMATIONCYCLES=48;\n\tShuriKenParticle3D.TEXTURESHEETANIMATIONSUBUVLENGTH=49;\n\tShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTUVS=50;\n\tShuriKenParticle3D.TEXTURESHEETANIMATIONGRADIENTMAXUVS=51;\n\t__static(ShuriKenParticle3D,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(RenderableSprite3D.shaderDefines);}\n\t]);\n\treturn ShuriKenParticle3D;\n})(RenderableSprite3D)\n\n\n/**\n*<code>SkinnedMeshSprite3D</code> 类用于创建网格。\n*/\n//class laya.d3.core.SkinnedMeshSprite3D extends laya.d3.core.RenderableSprite3D\nvar SkinnedMeshSprite3D=(function(_super){\n\tfunction SkinnedMeshSprite3D(mesh,name){\n\t\t/**@private */\n\t\tthis._subMeshOffset=null;\n\t\tSkinnedMeshSprite3D.__super.call(this,name);\n\t\tthis._subMeshOffset=[];\n\t\tthis._geometryFilter=new MeshFilter(this);\n\t\tthis._render=new SkinnedMeshRender(this);\n\t\tthis._geometryFilter.on(/*laya.events.Event.MESH_CHANGED*/\"meshchanged\",this,this._onMeshChanged);\n\t\tthis._render.on(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",this,this._onMaterialChanged);\n\t\t(mesh)&& ((this._geometryFilter).sharedMesh=mesh);\n\t}\n\n\t__class(SkinnedMeshSprite3D,'laya.d3.core.SkinnedMeshSprite3D',_super);\n\tvar __proto=SkinnedMeshSprite3D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._changeRenderObjectByMesh=function(index){\n\t\tvar renderObjects=this._render._renderElements;\n\t\tvar renderElement=renderObjects[index];\n\t\t(renderElement)|| (renderElement=renderObjects[index]=new SubMeshRenderElement());\n\t\trenderElement._render=this._render;\n\t\tvar material=this._render.sharedMaterials[index];\n\t\t(material)|| (material=StandardMaterial.defaultMaterial);\n\t\tvar renderObj=(this._geometryFilter).sharedMesh.getRenderElement(index);\n\t\trenderElement._mainSortID=this._getSortID(renderObj,material);\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=renderObj;\n\t\trenderElement._material=material;\n\t\treturn renderElement;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._changeRenderObjectByMaterial=function(index,material){\n\t\tvar renderElement=this._render._renderElements[index];\n\t\t(material)|| (material=StandardMaterial.defaultMaterial);\n\t\tvar renderObj=(this._geometryFilter).sharedMesh.getRenderElement(index);\n\t\trenderElement._mainSortID=this._getSortID(renderObj,material);\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=renderObj;\n\t\trenderElement._material=material;\n\t\treturn renderElement;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._changeRenderObjectsByMesh=function(){\n\t\tvar renderElementsCount=(this._geometryFilter).sharedMesh.getRenderElementsCount();\n\t\tthis._render._renderElements.length=renderElementsCount;\n\t\tfor (var i=0;i < renderElementsCount;i++)\n\t\tthis._changeRenderObjectByMesh(i);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onMeshChanged=function(meshFilter){\n\t\tvar mesh=meshFilter.sharedMesh;\n\t\tif (mesh.loaded)\n\t\t\tthis._changeRenderObjectsByMesh();\n\t\telse\n\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._changeRenderObjectsByMesh);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onMaterialChanged=function(meshRender,index,material){\n\t\tvar renderElementCount=this._render._renderElements.length;\n\t\t(index < renderElementCount)&& this._changeRenderObjectByMaterial(index,material);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,json){\n\t\tvar render=this.skinnedMeshRender;\n\t\tvar lightmapIndex=customProps.lightmapIndex;\n\t\t(lightmapIndex !=null)&& (render.lightmapIndex=lightmapIndex);\n\t\tvar lightmapScaleOffsetArray=customProps.lightmapScaleOffset;\n\t\t(lightmapScaleOffsetArray)&& (render.lightmapScaleOffset=new Vector4(lightmapScaleOffsetArray[0],lightmapScaleOffsetArray[1],lightmapScaleOffsetArray[2],lightmapScaleOffsetArray[3]));\n\t\tvar meshPath,mesh;\n\t\tif (json.instanceParams){\n\t\t\tmeshPath=json.instanceParams.loadPath;\n\t\t\tif (meshPath){\n\t\t\t\tmesh=Loader.getRes(innerResouMap[meshPath]);\n\t\t\t\tthis.meshFilter.sharedMesh=mesh;\n\t\t\t\tif (mesh.loaded)\n\t\t\t\t\trender.sharedMaterials=mesh.materials;\n\t\t\t\telse\n\t\t\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._applyMeshMaterials);\n\t\t\t}\n\t\t\t}else {\n\t\t\tmeshPath=customProps.meshPath;\n\t\t\tif (meshPath){\n\t\t\t\tmesh=Loader.getRes(innerResouMap[meshPath]);\n\t\t\t\tthis.meshFilter.sharedMesh=mesh;\n\t\t\t};\n\t\t\tvar materials=customProps.materials;\n\t\t\tif (materials){\n\t\t\t\tvar sharedMaterials=render.sharedMaterials;\n\t\t\t\tvar materialCount=materials.length;\n\t\t\t\tsharedMaterials.length=materialCount;\n\t\t\t\tfor (var i=0;i < materialCount;i++)\n\t\t\t\tsharedMaterials[i]=Loader.getRes(innerResouMap[materials[i].path]);\n\t\t\t\trender.sharedMaterials=sharedMaterials;\n\t\t\t};\n\t\t\tvar rootBone=customProps.rootBone;\n\t\t\t(rootBone)&& (render._setRootBone(rootBone));\n\t\t\tvar boundBox=customProps.boundBox;\n\t\t\tif (boundBox){\n\t\t\t\tvar min=boundBox.min;\n\t\t\t\tvar max=boundBox.max;\n\t\t\t\tvar localBoundBox=new BoundBox(new Vector3(min[0],min[1],min[2]),new Vector3(max[0],max[1],max[2]));\n\t\t\t\trender.localBoundBox=localBoundBox;\n\t\t\t\t}else {\n\t\t\t\trender._hasIndependentBound=false;\n\t\t\t};\n\t\t\tvar boundSphere=customProps.boundSphere;\n\t\t\tif (boundSphere){\n\t\t\t\tvar center=boundSphere.center;\n\t\t\t\tvar localBoundSphere=new BoundSphere(new Vector3(center[0],center[1],center[2]),boundSphere.radius);\n\t\t\t\trender.localBoundSphere=localBoundSphere;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._changeHierarchyAnimator=function(animator){\n\t\tif (animator){\n\t\t\tvar render=this.skinnedMeshRender;\n\t\t\trender._setCacheAnimator(animator);\n\t\t\tvar avatar=animator.avatar;\n\t\t\t(avatar)&& (render._setCacheAvatar(avatar));\n\t\t}\n\t\tlaya.d3.core.Sprite3D.prototype._changeHierarchyAnimator.call(this,animator);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._clearSelfRenderObjects=function(){\n\t\tthis._scene.removeFrustumCullingObject(this._render);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._addSelfRenderObjects=function(){\n\t\tthis._scene.addFrustumCullingObject(this._render);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._applyMeshMaterials=function(mesh){\n\t\tvar shaderMaterials=this._render.sharedMaterials;\n\t\tvar meshMaterials=mesh.materials;\n\t\tfor (var i=0,n=meshMaterials.length;i < n;i++)\n\t\t(shaderMaterials[i])|| (shaderMaterials[i]=meshMaterials[i]);\n\t\tthis._render.sharedMaterials=shaderMaterials;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tvar meshSprite3D=destObject;\n\t\t(meshSprite3D._geometryFilter).sharedMesh=(this._geometryFilter).sharedMesh;\n\t\tvar meshRender=this._render;\n\t\tvar destMeshRender=meshSprite3D._render;\n\t\tdestMeshRender.enable=meshRender.enable;\n\t\tdestMeshRender.sharedMaterials=meshRender.sharedMaterials;\n\t\tdestMeshRender.castShadow=meshRender.castShadow;\n\t\tvar lightmapScaleOffset=meshRender.lightmapScaleOffset;\n\t\tlightmapScaleOffset && (destMeshRender.lightmapScaleOffset=lightmapScaleOffset.clone());\n\t\tdestMeshRender.receiveShadow=meshRender.receiveShadow;\n\t\tdestMeshRender.sortingFudge=meshRender.sortingFudge;\n\t\tdestMeshRender._rootBone=meshRender._rootBone;\n\t\tvar lbp=meshRender.localBoundSphere;\n\t\t(lbp)&& (destMeshRender.localBoundSphere=lbp.clone());\n\t\tvar lbb=meshRender.localBoundBox;\n\t\t(lbb)&& (destMeshRender.localBoundBox=lbb.clone());\n\t\tdestMeshRender._hasIndependentBound=meshRender._hasIndependentBound;\n\t\tlaya.d3.core.Sprite3D.prototype.cloneTo.call(this,destObject);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\t(this._geometryFilter)._destroy();\n\t}\n\n\t/**\n\t*获取网格过滤器。\n\t*@return 网格过滤器。\n\t*/\n\t__getset(0,__proto,'meshFilter',function(){\n\t\treturn this._geometryFilter;\n\t});\n\n\t/**\n\t*获取网格渲染器。\n\t*@return 网格渲染器。\n\t*/\n\t__getset(0,__proto,'skinnedMeshRender',function(){\n\t\treturn this._render;\n\t});\n\n\tSkinnedMeshSprite3D.__init__=function(){\n\t\tSkinnedMeshSprite3D.SHADERDEFINE_BONE=SkinnedMeshSprite3D.shaderDefines.registerDefine(\"BONE\");\n\t}\n\n\tSkinnedMeshSprite3D.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,SkinnedMeshSprite3D);\n\t}\n\n\tSkinnedMeshSprite3D.SHADERDEFINE_BONE=0x8;\n\tSkinnedMeshSprite3D.BONES=0;\n\t__static(SkinnedMeshSprite3D,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(RenderableSprite3D.shaderDefines);}\n\t]);\n\treturn SkinnedMeshSprite3D;\n})(RenderableSprite3D)\n\n\n/**\n*<code>Camera</code> 类用于创建VR摄像机。\n*/\n//class laya.d3.core.VRCamera extends laya.d3.core.BaseCamera\nvar VRCamera=(function(_super){\n\tfunction VRCamera(pupilDistande,leftAspectRatio,rightAspectRatio,nearPlane,farPlane){\n\t\t/**@private */\n\t\t//this._tempMatrix=null;\n\t\t/**@private 左横纵比。*/\n\t\t//this._leftAspectRatio=NaN;\n\t\t/**@private 在屏幕空间中摄像机的左视口。*/\n\t\t//this._leftViewport=null;\n\t\t/**@private 在裁剪空间中摄像机的视口。*/\n\t\t//this._leftNormalizedViewport=null;\n\t\t/**@private 左视图矩阵。*/\n\t\t//this._leftViewMatrix=null;\n\t\t/**@private 左投影矩阵。*/\n\t\t//this._leftProjectionMatrix=null;\n\t\t/**@private 左投影视图矩阵。*/\n\t\t//this._leftProjectionViewMatrix=null;\n\t\t/**@private 左横纵比。*/\n\t\t//this._rightAspectRatio=NaN;\n\t\t/**@private 在屏幕空间中摄像机的左视口。*/\n\t\t//this._rightViewport=null;\n\t\t/**@private 在裁剪空间中摄像机的视口。*/\n\t\t//this._rightNormalizedViewport=null;\n\t\t/**@private 左视图矩阵。*/\n\t\t//this._rightViewMatrix=null;\n\t\t/**@private 左投影矩阵。*/\n\t\t//this._rightProjectionMatrix=null;\n\t\t/**@private 左投影视图矩阵。*/\n\t\t//this._rightProjectionViewMatrix=null;\n\t\t/**@private 瞳距。*/\n\t\t//this._pupilDistande=0;\n\t\t/**@private */\n\t\t//this._leftBoundFrustumUpdate=false;\n\t\t/**@private */\n\t\t//this._rightBoundFrustumUpdate=false;\n\t\t/**@private */\n\t\t//this._leftBoundFrustum=null;\n\t\t/**@private */\n\t\t//this._rightBoundFrustum=null;\n\t\t(pupilDistande===void 0)&& (pupilDistande=0.1);\n\t\t(leftAspectRatio===void 0)&& (leftAspectRatio=0);\n\t\t(rightAspectRatio===void 0)&& (rightAspectRatio=0);\n\t\t(nearPlane===void 0)&& (nearPlane=0.3);\n\t\t(farPlane===void 0)&& (farPlane=1000);\n\t\tthis._tempMatrix=new Matrix4x4();\n\t\tthis._leftViewMatrix=new Matrix4x4();\n\t\tthis._leftProjectionMatrix=new Matrix4x4();\n\t\tthis._leftProjectionViewMatrix=new Matrix4x4();\n\t\tthis._leftViewport=new Viewport(0,0,0,0);\n\t\tthis._leftNormalizedViewport=new Viewport(0,0,0.5,1);\n\t\tthis._leftAspectRatio=leftAspectRatio;\n\t\tthis._rightViewMatrix=new Matrix4x4();\n\t\tthis._rightProjectionMatrix=new Matrix4x4();\n\t\tthis._rightProjectionViewMatrix=new Matrix4x4();\n\t\tthis._rightViewport=new Viewport(0,0,0,0);\n\t\tthis._rightNormalizedViewport=new Viewport(0.5,0,0.5,1);\n\t\tthis._rightAspectRatio=rightAspectRatio;\n\t\tthis._pupilDistande=pupilDistande;\n\t\tthis._leftBoundFrustumUpdate=true;\n\t\tthis._leftBoundFrustum=new BoundFrustum(Matrix4x4.DEFAULT);\n\t\tthis._rightBoundFrustumUpdate=true;\n\t\tthis._rightBoundFrustum=new BoundFrustum(Matrix4x4.DEFAULT);\n\t\tVRCamera.__super.call(this,nearPlane,farPlane);\n\t\tthis.transform.on(/*laya.events.Event.WORLDMATRIX_NEEDCHANGE*/\"worldmatrixneedchanged\",this,this._onWorldMatrixChanged);\n\t}\n\n\t__class(VRCamera,'laya.d3.core.VRCamera',_super);\n\tvar __proto=VRCamera.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._onWorldMatrixChanged=function(){\n\t\tthis._leftBoundFrustumUpdate=this._rightBoundFrustumUpdate=true;\n\t}\n\n\t/**\n\t*@private\n\t*计算瞳距。\n\t*/\n\t__proto._calculatePupilOffset=function(){\n\t\tvar offset=this._tempVector3;\n\t\tVector3.scale(this.right,this._pupilDistande / 2,offset);\n\t\treturn offset.elements;\n\t}\n\n\t/**\n\t*@private\n\t*计算左投影矩阵。\n\t*/\n\t__proto._calculateLeftProjectionMatrix=function(){\n\t\tif (!this._useUserProjectionMatrix){\n\t\t\tif (this._orthographic){\n\t\t\t\tvar leftHalfWidth=this.orthographicVerticalSize *this.leftAspectRatio *0.5;\n\t\t\t\tvar leftHalfHeight=this.orthographicVerticalSize *0.5;\n\t\t\t\tMatrix4x4.createOrthoOffCenterRH(-leftHalfWidth,leftHalfWidth,-leftHalfHeight,leftHalfHeight,this.nearPlane,this.farPlane,this._leftProjectionMatrix);\n\t\t\t\t}else {\n\t\t\t\tMatrix4x4.createPerspective(3.1416 *this.fieldOfView / 180.0,this.leftAspectRatio,this.nearPlane,this.farPlane,this._rightProjectionMatrix);\n\t\t\t}\n\t\t}\n\t\tthis._leftBoundFrustumUpdate=true;\n\t}\n\n\t/**\n\t*@private\n\t*计算右投影矩阵。\n\t*/\n\t__proto._calculateRightProjectionMatrix=function(){\n\t\tif (!this._useUserProjectionMatrix){\n\t\t\tif (this._orthographic){\n\t\t\t\tvar rightHalfWidth=this.orthographicVerticalSize *this.rightAspectRatio *0.5;\n\t\t\t\tvar rightHalfHeight=this.orthographicVerticalSize *0.5;\n\t\t\t\tMatrix4x4.createOrthoOffCenterRH(-rightHalfWidth,rightHalfWidth,rightHalfHeight,rightHalfHeight,this.nearPlane,this.farPlane,this._rightProjectionMatrix);\n\t\t\t\t}else {\n\t\t\t\tMatrix4x4.createPerspective(3.1416 *this.fieldOfView / 180.0,this.rightAspectRatio,this.nearPlane,this.farPlane,this._rightProjectionMatrix);\n\t\t\t}\n\t\t}\n\t\tthis._rightBoundFrustumUpdate=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._calculateProjectionMatrix=function(){\n\t\tif (!this._useUserProjectionMatrix){\n\t\t\tif (this._orthographic){\n\t\t\t\tvar leftHalfWidth=this.orthographicVerticalSize *this.leftAspectRatio *0.5;\n\t\t\t\tvar leftHalfHeight=this.orthographicVerticalSize *0.5;\n\t\t\t\tvar rightHalfWidth=this.orthographicVerticalSize *this.rightAspectRatio *0.5;\n\t\t\t\tvar rightHalfHeight=this.orthographicVerticalSize *0.5;\n\t\t\t\tMatrix4x4.createOrthoOffCenterRH(-leftHalfWidth,leftHalfWidth,-leftHalfHeight,leftHalfHeight,this.nearPlane,this.farPlane,this._leftProjectionMatrix);\n\t\t\t\tMatrix4x4.createOrthoOffCenterRH(-rightHalfWidth,rightHalfWidth,rightHalfHeight,rightHalfHeight,this.nearPlane,this.farPlane,this._rightProjectionMatrix);\n\t\t\t\t}else {\n\t\t\t\tMatrix4x4.createPerspective(3.1416 *this.fieldOfView / 180.0,this.leftAspectRatio,this.nearPlane,this.farPlane,this._leftProjectionMatrix);\n\t\t\t\tMatrix4x4.createPerspective(3.1416 *this.fieldOfView / 180.0,this.rightAspectRatio,this.nearPlane,this.farPlane,this._rightProjectionMatrix);\n\t\t\t}\n\t\t}\n\t\tthis._leftBoundFrustumUpdate=this._rightBoundFrustumUpdate=true;\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._renderCamera=function(gl,state,scene){\n\t\tstate.camera=this;\n\t\tthis._prepareCameraToRender();\n\t\tscene._preRenderUpdateComponents(state);\n\t\tvar leftViewMat,leftProjectMatrix;\n\t\tleftViewMat=state._viewMatrix=this.leftViewMatrix;\n\t\tvar renderTar=this._renderTarget;\n\t\tif (renderTar){\n\t\t\trenderTar.start();\n\t\t\tMatrix4x4.multiply(BaseCamera._invertYScaleMatrix,this._leftProjectionMatrix,BaseCamera._invertYProjectionMatrix);\n\t\t\tMatrix4x4.multiply(BaseCamera._invertYScaleMatrix,this.leftProjectionViewMatrix,BaseCamera._invertYProjectionViewMatrix);\n\t\t\tleftProjectMatrix=state._projectionMatrix=BaseCamera._invertYProjectionMatrix;\n\t\t\tstate._projectionViewMatrix=BaseCamera._invertYProjectionViewMatrix;\n\t\t\t}else {\n\t\t\tleftProjectMatrix=state._projectionMatrix=this._leftProjectionMatrix;\n\t\t\tstate._projectionViewMatrix=this.leftProjectionViewMatrix;\n\t\t}\n\t\tthis._prepareCameraViewProject(leftViewMat,leftProjectMatrix);\n\t\tstate._viewport=this.leftViewport;\n\t\tscene._preRenderScene(gl,state,this.leftBoundFrustum);\n\t\tscene._clear(gl,state);\n\t\tscene._renderScene(gl,state);\n\t\tvar rightViewMat,rightProjectMatrix;\n\t\trightViewMat=state._viewMatrix=this.rightViewMatrix;\n\t\tif (renderTar){\n\t\t\trenderTar.start();\n\t\t\tMatrix4x4.multiply(BaseCamera._invertYScaleMatrix,this._rightProjectionMatrix,BaseCamera._invertYProjectionMatrix);\n\t\t\tMatrix4x4.multiply(BaseCamera._invertYScaleMatrix,this.rightProjectionViewMatrix,BaseCamera._invertYProjectionViewMatrix);\n\t\t\tstate._projectionMatrix=BaseCamera._invertYProjectionMatrix;\n\t\t\trightProjectMatrix=state._projectionViewMatrix=BaseCamera._invertYProjectionViewMatrix;\n\t\t\t}else {\n\t\t\trightProjectMatrix=state._projectionMatrix=this._rightProjectionMatrix;\n\t\t\tstate._projectionViewMatrix=this.rightProjectionViewMatrix;\n\t\t}\n\t\tthis._prepareCameraViewProject(rightViewMat,rightProjectMatrix);\n\t\tstate._viewport=this.rightViewport;\n\t\tscene._preRenderScene(gl,state,this.rightBoundFrustum);\n\t\tscene._clear(gl,state);\n\t\tscene._renderScene(gl,state);\n\t\tscene._postRenderUpdateComponents(state);\n\t\t(renderTar)&& (renderTar.end());\n\t}\n\n\t/**\n\t*获取摄像机右视锥。\n\t*/\n\t__getset(0,__proto,'rightBoundFrustum',function(){\n\t\tif (this._rightBoundFrustumUpdate)\n\t\t\tthis._rightBoundFrustum.matrix=this.rightProjectionViewMatrix;\n\t\treturn this._rightBoundFrustum;\n\t});\n\n\t/**\n\t*获取裁剪空间的左视口。\n\t*@return 裁剪空间的左视口。\n\t*/\n\t__getset(0,__proto,'leftNormalizedViewport',function(){\n\t\tif (!this._viewportExpressedInClipSpace){\n\t\t\tvar vp=this._leftViewport;\n\t\t\tvar size=this.renderTargetSize;\n\t\t\tvar sizeW=size.width;\n\t\t\tvar sizeH=size.height;\n\t\t\tthis._leftNormalizedViewport.x=vp.x / sizeW;\n\t\t\tthis._leftNormalizedViewport.y=vp.y / sizeH;\n\t\t\tthis._leftNormalizedViewport.width=vp.width / sizeW;\n\t\t\tthis._leftNormalizedViewport.height=vp.height / sizeH;\n\t\t}\n\t\treturn this._leftNormalizedViewport;\n\t});\n\n\t/**\n\t*获取屏幕空间的右视口。\n\t*@return 屏幕空间的右视口。\n\t*/\n\t__getset(0,__proto,'rightViewport',function(){\n\t\tif (this._viewportExpressedInClipSpace){\n\t\t\tvar nVp=this._rightNormalizedViewport;\n\t\t\tvar size=this.renderTargetSize;\n\t\t\tvar sizeW=size.width;\n\t\t\tvar sizeH=size.height;\n\t\t\tthis._rightViewport.x=nVp.x *sizeW;\n\t\t\tthis._rightViewport.y=nVp.y *sizeH;\n\t\t\tthis._rightViewport.width=nVp.width *sizeW;\n\t\t\tthis._rightViewport.height=nVp.height *sizeH;\n\t\t}\n\t\treturn this._rightViewport;\n\t});\n\n\t/**\n\t*设置屏幕空间的视口。\n\t*@param 屏幕空间的视口。\n\t*/\n\t__getset(0,__proto,'viewport',null,function(value){\n\t\tif (this.renderTarget !=null && (value.x < 0 || value.y < 0 || value.width==0 || value.height==0))\n\t\t\tthrow new Error(\"VRCamera: viewport size invalid.\",\"value\");\n\t\tthis._viewportExpressedInClipSpace=false;\n\t\tthis._leftViewport=new Viewport(0,0,value.width / 2,value.height);\n\t\tthis._rightViewport=new Viewport(value.width / 2,0,value.width / 2,value.height);\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*获取左横纵比。\n\t*@return 左横纵比。\n\t*/\n\t__getset(0,__proto,'leftAspectRatio',function(){\n\t\tif (this._leftAspectRatio===0){\n\t\t\tvar lVp=this.leftViewport;\n\t\t\treturn lVp.width / lVp.height;\n\t\t}\n\t\treturn this._leftAspectRatio;\n\t});\n\n\t/**\n\t*获取右横纵比。\n\t*@return 右横纵比。\n\t*/\n\t__getset(0,__proto,'rightAspectRatio',function(){\n\t\tif (this._rightAspectRatio===0){\n\t\t\tvar rVp=this.rightViewport;\n\t\t\treturn rVp.width / rVp.height;\n\t\t}\n\t\treturn this._rightAspectRatio;\n\t});\n\n\t/**\n\t*设置横纵比。\n\t*@param value 横纵比。\n\t*/\n\t__getset(0,__proto,'aspectRatio',null,function(value){\n\t\tif (value < 0)\n\t\t\tthrow new Error(\"VRCamera: the aspect ratio has to be a positive real number.\");\n\t\tthis._leftAspectRatio=value;\n\t\tthis._rightAspectRatio=value;\n\t\tthis._calculateRightProjectionMatrix();\n\t});\n\n\t/**\n\t*获取裁剪空间的右视口。\n\t*@return 裁剪空间的右视口。\n\t*/\n\t__getset(0,__proto,'rightNormalizedViewport',function(){\n\t\tif (!this._viewportExpressedInClipSpace){\n\t\t\tvar vp=this._rightViewport;\n\t\t\tvar size=this.renderTargetSize;\n\t\t\tvar sizeW=size.width;\n\t\t\tvar sizeH=size.height;\n\t\t\tthis._rightNormalizedViewport.x=vp.x / sizeW;\n\t\t\tthis._rightNormalizedViewport.y=vp.y / sizeH;\n\t\t\tthis._rightNormalizedViewport.width=vp.width / sizeW;\n\t\t\tthis._rightNormalizedViewport.height=vp.height / sizeH;\n\t\t}\n\t\treturn this._rightNormalizedViewport;\n\t});\n\n\t/**\n\t*设置裁剪空间的视口。\n\t*@return 裁剪空间的视口。\n\t*/\n\t__getset(0,__proto,'normalizedViewport',null,function(value){\n\t\tif (value.x < 0 || value.y < 0 || (value.x+value.width)> 1 || (value.x+value.height)> 1)\n\t\t\tthrow new Error(\"VRCamera: viewport size invalid.\",\"value\");\n\t\tthis._viewportExpressedInClipSpace=true;\n\t\tthis._leftNormalizedViewport=new Viewport(0,0,value.width / 2,value.height);\n\t\tthis._rightNormalizedViewport=new Viewport(value.width / 2,0,value.width / 2,value.height);\n\t\tthis._calculateProjectionMatrix();\n\t});\n\n\t/**\n\t*获取屏幕空间的左视口。\n\t*@return 屏幕空间的左视口。\n\t*/\n\t__getset(0,__proto,'leftViewport',function(){\n\t\tif (this._viewportExpressedInClipSpace){\n\t\t\tvar nVp=this._leftNormalizedViewport;\n\t\t\tvar size=this.renderTargetSize;\n\t\t\tvar sizeW=size.width;\n\t\t\tvar sizeH=size.height;\n\t\t\tthis._leftViewport.x=nVp.x *sizeW;\n\t\t\tthis._leftViewport.y=nVp.y *sizeH;\n\t\t\tthis._leftViewport.width=nVp.width *sizeW;\n\t\t\tthis._leftViewport.height=nVp.height *sizeH;\n\t\t}\n\t\treturn this._leftViewport;\n\t});\n\n\t__getset(0,__proto,'needLeftViewport',function(){\n\t\tvar nVp=this.leftNormalizedViewport;\n\t\treturn nVp.x===0 && nVp.y===0 && nVp.width===1 && nVp.height===1;\n\t});\n\n\t__getset(0,__proto,'needRightViewport',function(){\n\t\tvar nVp=this.rightNormalizedViewport;\n\t\treturn nVp.x===0 && nVp.y===0 && nVp.width===1 && nVp.height===1;\n\t});\n\n\t/**\n\t*获取左视图矩阵。\n\t*@return 左视图矩阵。\n\t*/\n\t__getset(0,__proto,'leftViewMatrix',function(){\n\t\tvar offsetE=this._calculatePupilOffset();\n\t\tvar tempWorldMat=this._tempMatrix;\n\t\tthis.transform.worldMatrix.cloneTo(tempWorldMat);\n\t\tvar worldMatE=tempWorldMat.elements;\n\t\tworldMatE[12]-=offsetE[0];\n\t\tworldMatE[13]-=offsetE[1];\n\t\tworldMatE[14]-=offsetE[2];\n\t\ttempWorldMat.invert(this._leftViewMatrix);\n\t\treturn this._leftViewMatrix;\n\t});\n\n\t/**\n\t*获取右视图矩阵。\n\t*@return 右视图矩阵。\n\t*/\n\t__getset(0,__proto,'rightViewMatrix',function(){\n\t\tvar offsetE=this._calculatePupilOffset();\n\t\tvar tempWorldMat=this._tempMatrix;\n\t\tthis.transform.worldMatrix.cloneTo(tempWorldMat);\n\t\tvar worldMatE=tempWorldMat.elements;\n\t\tworldMatE[12]+=offsetE[0];\n\t\tworldMatE[13]+=offsetE[1];\n\t\tworldMatE[14]+=offsetE[2];\n\t\ttempWorldMat.invert(this._rightViewMatrix);\n\t\treturn this._rightViewMatrix;\n\t});\n\n\t/**\n\t*获取左投影矩阵。\n\t*@return 左投影矩阵。\n\t*/\n\t__getset(0,__proto,'leftProjectionMatrix',function(){\n\t\treturn this._leftProjectionMatrix;\n\t});\n\n\t/**\n\t*获取左投影视图矩阵。\n\t*@return 左投影视图矩阵。\n\t*/\n\t__getset(0,__proto,'leftProjectionViewMatrix',function(){\n\t\tMatrix4x4.multiply(this.leftProjectionMatrix,this.leftViewMatrix,this._leftProjectionViewMatrix);\n\t\treturn this._leftProjectionViewMatrix;\n\t});\n\n\t/**\n\t*获取右投影矩阵。\n\t*@return 右投影矩阵。\n\t*/\n\t__getset(0,__proto,'rightProjectionMatrix',function(){\n\t\treturn this._rightProjectionMatrix;\n\t});\n\n\t/**\n\t*获取右投影视图矩阵。\n\t*@return 右投影视图矩阵。\n\t*/\n\t__getset(0,__proto,'rightProjectionViewMatrix',function(){\n\t\tMatrix4x4.multiply(this.rightProjectionMatrix,this.rightViewMatrix,this._rightProjectionViewMatrix);\n\t\treturn this._rightProjectionViewMatrix;\n\t});\n\n\t/**\n\t*获取摄像机左视锥。\n\t*/\n\t__getset(0,__proto,'leftBoundFrustum',function(){\n\t\tif (this._leftBoundFrustumUpdate)\n\t\t\tthis._leftBoundFrustum.matrix=this.leftProjectionViewMatrix;\n\t\treturn this._leftBoundFrustum;\n\t});\n\n\treturn VRCamera;\n})(BaseCamera)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.core.trail.TrailSprite3D extends laya.d3.core.RenderableSprite3D\nvar TrailSprite3D=(function(_super){\n\tfunction TrailSprite3D(){\n\t\tTrailSprite3D.__super.call(this);\n\t\tthis._geometryFilter=new TrailFilter(this);\n\t\tthis._render=new TrailRenderer(this);\n\t\tthis._changeRenderObjectsByMaterial(this._render,0,TrailMaterial.defaultMaterial);\n\t\tthis._render.on(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",this,this._changeRenderObjectsByMaterial);\n\t\tthis._geometryFilter.on(/*laya.events.Event.TRAIL_FILTER_CHANGE*/\"trailfilterchange\",this,this._changeRenderObjectsByRenderElement);\n\t}\n\n\t__class(TrailSprite3D,'laya.d3.core.trail.TrailSprite3D',_super);\n\tvar __proto=TrailSprite3D.prototype;\n\t__proto._changeRenderObjectsByMaterial=function(sender,index,material){\n\t\tvar renderElementsCount=(this._geometryFilter).getRenderElementsCount();\n\t\tthis._render._renderElements.length=renderElementsCount;\n\t\tfor (var i=0;i < renderElementsCount;i++){\n\t\t\tthis._changeRenderObjectByMaterial(i,material);\n\t\t}\n\t}\n\n\t__proto._changeRenderObjectByMaterial=function(index,material){\n\t\tvar renderObjects=this._render._renderElements;\n\t\t(material)|| (material=TrailMaterial.defaultMaterial);\n\t\tvar renderElement=renderObjects[index];\n\t\t(renderElement)|| (renderElement=renderObjects[index]=new RenderElement());\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=(this._geometryFilter).getRenderElement(index);\n\t\trenderElement._render=this._render;\n\t\trenderElement._material=material;\n\t}\n\n\t__proto._changeRenderObjectsByRenderElement=function(index,trailRenderElement){\n\t\tvar renderObjects=this._render._renderElements;\n\t\tvar renderElement=renderObjects[index];\n\t\t(renderElement)|| (renderElement=renderObjects[index]=new RenderElement());\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=trailRenderElement;\n\t\trenderElement._render=this._render;\n\t\trenderElement._material=this._render.sharedMaterial;\n\t}\n\n\t/**@private */\n\t__proto._clearSelfRenderObjects=function(){\n\t\tthis.scene.removeFrustumCullingObject(this._render);\n\t}\n\n\t/**@private */\n\t__proto._addSelfRenderObjects=function(){\n\t\tthis.scene.addFrustumCullingObject(this._render);\n\t}\n\n\t__proto._update=function(state){\n\t\t_super.prototype._update.call(this,state);\n\t\t(this._geometryFilter)._update(state);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,json){\n\t\tvar render=this._render;\n\t\tvar filter=this._geometryFilter;\n\t\tvar i=0,j=0;\n\t\tvar materials=customProps.materials;\n\t\tif (materials){\n\t\t\tvar sharedMaterials=render.sharedMaterials;\n\t\t\tvar materialCount=materials.length;\n\t\t\tsharedMaterials.length=materialCount;\n\t\t\tfor (i=0;i < materialCount;i++)\n\t\t\tsharedMaterials[i]=Loader.getRes(innerResouMap[materials[i].path]);\n\t\t\trender.sharedMaterials=sharedMaterials;\n\t\t};\n\t\tvar props=json.props;\n\t\tfilter.time=props.time;\n\t\tfilter.minVertexDistance=props.minVertexDistance;\n\t\tfilter.widthMultiplier=props.widthMultiplier;\n\t\tfilter.textureMode=props.textureMode;\n\t\tvar _widthCurve=[];\n\t\tvar widthCurve=customProps.widthCurve;\n\t\tfor (i=0,j=widthCurve.length;i < j;i++){\n\t\t\tvar trailkeyframe=new TrailKeyFrame();\n\t\t\ttrailkeyframe.time=widthCurve[i].time;\n\t\t\ttrailkeyframe.inTangent=widthCurve[i].inTangent;\n\t\t\ttrailkeyframe.outTangent=widthCurve[i].outTangent;\n\t\t\ttrailkeyframe.value=widthCurve[i].value;\n\t\t\t_widthCurve.push(trailkeyframe);\n\t\t}\n\t\tfilter.widthCurve=_widthCurve;\n\t\tvar colorGradientNode=customProps.colorGradient;\n\t\tvar _colorGradient=new Gradient();\n\t\t_colorGradient.mode=colorGradientNode.mode;\n\t\tvar colorKeys=[];\n\t\tvar colorKey;\n\t\tvar _colorKeys=colorGradientNode.colorKeys;\n\t\tvar _colorKey;\n\t\tfor (i=0,j=_colorKeys.length;i < j;i++){\n\t\t\t_colorKey=_colorKeys[i];\n\t\t\tcolorKey=new GradientColorKey(new Color$1(_colorKey.value[0],_colorKey.value[1],_colorKey.value[2],1.0),_colorKey.time);\n\t\t\tcolorKeys.push(colorKey);\n\t\t};\n\t\tvar alphaKeys=[];\n\t\tvar alphaKey;\n\t\tvar _alphaKeys=colorGradientNode.alphaKeys;\n\t\tvar _alphaKey;\n\t\tfor (i=0,j=_alphaKeys.length;i < j;i++){\n\t\t\t_alphaKey=_alphaKeys[i];\n\t\t\talphaKey=new GradientAlphaKey(_alphaKey.value,_alphaKey.time);\n\t\t\talphaKeys.push(alphaKey);\n\t\t}\n\t\t_colorGradient.setKeys(colorKeys,alphaKeys);\n\t\tfilter.colorGradient=_colorGradient;\n\t}\n\n\t__proto.reset=function(){\n\t\tthis.trailFilter.reset();\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.cloneTo=function(destObject){\n\t\tlaya.d3.core.Sprite3D.prototype.cloneTo.call(this,destObject);\n\t\tvar i=0,j=0;\n\t\tvar _trailSprite3D=destObject;\n\t\tvar _trailFilter=_trailSprite3D.trailFilter;\n\t\t_trailFilter.time=this.trailFilter.time;\n\t\t_trailFilter.minVertexDistance=this.trailFilter.minVertexDistance;\n\t\t_trailFilter.widthMultiplier=this.trailFilter.widthMultiplier;\n\t\tvar widthCurve=this.trailFilter.widthCurve;\n\t\tvar _widthCurve=[];\n\t\tfor (i=0,j=widthCurve.length;i < j;i++){\n\t\t\tvar _keyFrame=new TrailKeyFrame();\n\t\t\twidthCurve[i].cloneTo(_keyFrame);\n\t\t\t_widthCurve.push(_keyFrame);\n\t\t}\n\t\t_trailFilter.widthCurve=_widthCurve;\n\t\tvar _colorGradient=new Gradient();\n\t\tthis.trailFilter.colorGradient.cloneTo(_colorGradient);\n\t\t_trailFilter.colorGradient=_colorGradient;\n\t\t_trailFilter.textureMode=this.trailFilter.textureMode;\n\t\tvar _trailRender=_trailSprite3D.trailRender;\n\t\t_trailRender.sharedMaterial=this.trailRender.sharedMaterial;\n\t}\n\n\t/**\n\t*<p>销毁此对象。</p>\n\t*@param destroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\t(this._geometryFilter)._destroy();\n\t\tthis._geometryFilter=null;\n\t}\n\n\t/**\n\t*获取Trail过滤器。\n\t*@return Trail过滤器。\n\t*/\n\t__getset(0,__proto,'trailFilter',function(){\n\t\treturn this._geometryFilter;\n\t});\n\n\t/**\n\t*获取Trail渲染器。\n\t*@return Trail渲染器。\n\t*/\n\t__getset(0,__proto,'trailRender',function(){\n\t\treturn this._render;\n\t});\n\n\tTrailSprite3D.__init__=function(){\n\t\tTrailSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND=TrailSprite3D.shaderDefines.registerDefine(\"GRADIENTMODE_BLEND\");\n\t}\n\n\tTrailSprite3D.CURTIME=3;\n\tTrailSprite3D.LIFETIME=4;\n\tTrailSprite3D.WIDTHCURVE=5;\n\tTrailSprite3D.WIDTHCURVEKEYLENGTH=6;\n\tTrailSprite3D.GRADIENTCOLORKEY=7;\n\tTrailSprite3D.GRADIENTALPHAKEY=8;\n\tTrailSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND=0;\n\t__static(TrailSprite3D,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(RenderableSprite3D.shaderDefines);}\n\t]);\n\treturn TrailSprite3D;\n})(RenderableSprite3D)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.domino.DominoSprite3D extends laya.d3.core.RenderableSprite3D\nvar DominoSprite3D=(function(_super){\n\tfunction DominoSprite3D(){\n\t\tDominoSprite3D.__super.call(this);\n\t\tthis._defaultScale=new Vector3(0.4,1.0,0.12);\n\t\tthis._geometryFilter=new DominoFilter(this);\n\t\tthis._render=new DominoRenderer(this);\n\t\tthis._changeRenderObjects(this._render,0,DominoMaterial.defaultMaterial);\n\t\tthis._render.on(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",this,this._changeRenderObjects);\n\t\tthis._geometryFilter.on(/*laya.events.Event.DOMINO_FILTER_CHANGE*/\"dominofilterchange\",this,this._changeRenderObjectsByRenderElement);\n\t}\n\n\t__class(DominoSprite3D,'laya.d3.extension.domino.DominoSprite3D',_super);\n\tvar __proto=DominoSprite3D.prototype;\n\t__proto.addDomino=function(position,rotation,scale){\n\t\t(position===void 0)&& (position=Vector3.ZERO);\n\t\t(rotation===void 0)&& (rotation=Quaternion.DEFAULT);\n\t\t(scale===void 0)&& (scale=this._defaultScale);\n\t\t(this._geometryFilter).addDomino(position,rotation,scale);\n\t}\n\n\t__proto.updateDomino=function(index,position,rotation,scale){\n\t\t(position===void 0)&& (position=Vector3.ZERO);\n\t\t(rotation===void 0)&& (rotation=Quaternion.DEFAULT);\n\t\t(scale===void 0)&& (scale=this._defaultScale);\n\t\t(this._geometryFilter).updateDomino(index,position,rotation,scale);\n\t}\n\n\t__proto.updateDominos=function(startIndex,count,keyFrames){\n\t\tif (count > keyFrames.length){\n\t\t\tthrow Error(\"Update domino count can't more than keyFrames Count!\");\n\t\t}\n\t\t(this._geometryFilter).updateDominos(startIndex,count,keyFrames);\n\t}\n\n\t__proto._changeRenderObjects=function(sender,index,material){\n\t\tvar renderElementsCount=(this._geometryFilter).getDominoRenderElementsCount();\n\t\tthis._render._renderElements.length=renderElementsCount;\n\t\tfor (var i=0;i < renderElementsCount;i++){\n\t\t\tthis._changeRenderObject(i,material);\n\t\t}\n\t}\n\n\t__proto._changeRenderObject=function(index,material){\n\t\tvar renderObjects=this._render._renderElements;\n\t\t(material)|| (material=DominoMaterial.defaultMaterial);\n\t\tvar renderElement=renderObjects[index];\n\t\t(renderElement)|| (renderElement=renderObjects[index]=new RenderElement());\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=(this._geometryFilter).getRenderElement(index);\n\t\trenderElement._render=this._render;\n\t\trenderElement._material=material;\n\t}\n\n\t__proto._changeRenderObjectsByRenderElement=function(index,dominoRenderElement){\n\t\tvar renderObjects=this._render._renderElements;\n\t\tvar renderElement=renderObjects[index];\n\t\t(renderElement)|| (renderElement=renderObjects[index]=new RenderElement());\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=dominoRenderElement;\n\t\trenderElement._render=this._render;\n\t\trenderElement._material=this._render.sharedMaterial ? this._render.sharedMaterial :DominoMaterial.defaultMaterial;\n\t}\n\n\t/**@private */\n\t__proto._clearSelfRenderObjects=function(){\n\t\tthis.scene.removeFrustumCullingObject(this._render);\n\t}\n\n\t/**@private */\n\t__proto._addSelfRenderObjects=function(){\n\t\tthis.scene.addFrustumCullingObject(this._render);\n\t}\n\n\t__proto._update=function(state){\n\t\t_super.prototype._update.call(this,state);\n\t\t(this._geometryFilter)._update(state);\n\t}\n\n\t/**\n\t*获取多米诺过滤器。\n\t*@return 多米诺过滤器。\n\t*/\n\t__getset(0,__proto,'dominoFilter',function(){\n\t\treturn this._geometryFilter;\n\t});\n\n\t/**\n\t*获取多米诺渲染器。\n\t*@return 多米诺渲染器。\n\t*/\n\t__getset(0,__proto,'dominoRender',function(){\n\t\treturn this._render;\n\t});\n\n\treturn DominoSprite3D;\n})(RenderableSprite3D)\n\n\n/**\n*...\n*@author\n*/\n//class laya.d3.extension.lineRender.LineSprite3D extends laya.d3.core.RenderableSprite3D\nvar LineSprite3D=(function(_super){\n\tfunction LineSprite3D(){\n\t\tLineSprite3D.__super.call(this);\n\t\tthis._position=new Vector3();\n\t\tthis._render=new LineRenderer(this);\n\t\tthis._geometryFilter=new LineFilter(this);\n\t\tthis._changeRenderObjects(this._render,0,LineMaterial.defaultMaterial);\n\t\tthis._render.on(/*laya.events.Event.MATERIAL_CHANGED*/\"materialchanged\",this,this._changeRenderObjects);\n\t}\n\n\t__class(LineSprite3D,'laya.d3.extension.lineRender.LineSprite3D',_super);\n\tvar __proto=LineSprite3D.prototype;\n\t__proto.addPosition=function(position,normal){\n\t\t(this._geometryFilter).addPosition(position,normal);\n\t}\n\n\t__proto._changeRenderObjects=function(sender,index,material){\n\t\tvar renderObjects=this._render._renderElements;\n\t\t(material)|| (material=LineMaterial.defaultMaterial);\n\t\tvar renderElement=renderObjects[index];\n\t\t(renderElement)|| (renderElement=renderObjects[index]=new RenderElement());\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=this._geometryFilter;\n\t\trenderElement._render=this._render;\n\t\trenderElement._material=material;\n\t}\n\n\t/**@private */\n\t__proto._clearSelfRenderObjects=function(){\n\t\tthis.scene.removeFrustumCullingObject(this._render);\n\t}\n\n\t/**@private */\n\t__proto._addSelfRenderObjects=function(){\n\t\tthis.scene.addFrustumCullingObject(this._render);\n\t}\n\n\t__proto._update=function(state){\n\t\t_super.prototype._update.call(this,state);\n\t\t(this._geometryFilter)._update(state);\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto._parseCustomProps=function(rootNode,innerResouMap,customProps,json){\n\t\tvar render=this._render;\n\t\tvar filter=this._geometryFilter;\n\t\tvar i=0,j=0;\n\t\tvar materials=customProps.materials;\n\t\tif (materials){\n\t\t\tvar sharedMaterials=render.sharedMaterials;\n\t\t\tvar materialCount=materials.length;\n\t\t\tsharedMaterials.length=materialCount;\n\t\t\tfor (i=0;i < materialCount;i++)\n\t\t\tsharedMaterials[i]=Loader.getRes(innerResouMap[materials[i].path]);\n\t\t\trender.sharedMaterials=sharedMaterials;\n\t\t};\n\t\tvar props=json.props;\n\t\tfilter.widthMultiplier=props.widthMultiplier;\n\t\tfilter.textureMode=props.textureMode;\n\t\tvar _widthCurve=[];\n\t\tvar widthCurve=customProps.widthCurve;\n\t\tfor (i=0,j=widthCurve.length;i < j;i++){\n\t\t\tvar trailkeyframe=new TrailKeyFrame();\n\t\t\ttrailkeyframe.time=widthCurve[i].time;\n\t\t\ttrailkeyframe.inTangent=widthCurve[i].inTangent;\n\t\t\ttrailkeyframe.outTangent=widthCurve[i].outTangent;\n\t\t\ttrailkeyframe.value=widthCurve[i].value;\n\t\t\t_widthCurve.push(trailkeyframe);\n\t\t}\n\t\tfilter.widthCurve=_widthCurve;\n\t\tvar colorGradientNode=customProps.colorGradient;\n\t\tvar _colorGradient=new Gradient();\n\t\t_colorGradient.mode=colorGradientNode.mode;\n\t\tvar colorKeys=[];\n\t\tvar colorKey;\n\t\tvar _colorKeys=colorGradientNode.colorKeys;\n\t\tvar _colorKey;\n\t\tfor (i=0,j=_colorKeys.length;i < j;i++){\n\t\t\t_colorKey=_colorKeys[i];\n\t\t\tcolorKey=new GradientColorKey(new Color$1(_colorKey.value[0],_colorKey.value[1],_colorKey.value[2],1.0),_colorKey.time);\n\t\t\tcolorKeys.push(colorKey);\n\t\t};\n\t\tvar alphaKeys=[];\n\t\tvar alphaKey;\n\t\tvar _alphaKeys=colorGradientNode.alphaKeys;\n\t\tvar _alphaKey;\n\t\tfor (i=0,j=_alphaKeys.length;i < j;i++){\n\t\t\t_alphaKey=_alphaKeys[i];\n\t\t\talphaKey=new GradientAlphaKey(_alphaKey.value,_alphaKey.time);\n\t\t\talphaKeys.push(alphaKey);\n\t\t}\n\t\t_colorGradient.setKeys(colorKeys,alphaKeys);\n\t\tfilter.colorGradient=_colorGradient;\n\t\tvar positions=customProps.positions;\n\t\tvar positionSize=positions.size;\n\t\tvar positionsValue=positions.values;\n\t\tvar position;\n\t\tfor (i=0;i < positionSize;i++){\n\t\t\tposition=positionsValue[i];\n\t\t\tthis._position.x=position[0];\n\t\t\tthis._position.y=position[1];\n\t\t\tthis._position.z=position[2];\n\t\t\tthis.addPosition(this._position);\n\t\t}\n\t}\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\t(this._geometryFilter)._destroy();\n\t\tthis._position=null;\n\t}\n\n\t/**\n\t*获取line过滤器。\n\t*@return line过滤器。\n\t*/\n\t__getset(0,__proto,'lineFilter',function(){\n\t\treturn this._geometryFilter;\n\t});\n\n\t/**\n\t*获取line渲染器。\n\t*@return line渲染器。\n\t*/\n\t__getset(0,__proto,'lineRender',function(){\n\t\treturn this._render;\n\t});\n\n\tLineSprite3D.__init__=function(){\n\t\tLineSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND=LineSprite3D.shaderDefines.registerDefine(\"GRADIENTMODE_BLEND\");\n\t\tLineSprite3D.SHADERDEFINE_TEXTUREMODE_STRETCH=LineSprite3D.shaderDefines.registerDefine(\"TEXTUREMODE\");\n\t\tLineSprite3D.SHADERDEFINE_WORLDSPACE=LineSprite3D.shaderDefines.registerDefine(\"WORLDSPACE\");\n\t}\n\n\tLineSprite3D.WIDTHCURVE=3;\n\tLineSprite3D.WIDTHCURVEKEYLENGTH=4;\n\tLineSprite3D.GRADIENTCOLORKEY=5;\n\tLineSprite3D.GRADIENTALPHAKEY=6;\n\tLineSprite3D.SHADERDEFINE_WORLDSPACE=0;\n\tLineSprite3D.SHADERDEFINE_GRADIENTMODE_BLEND=0;\n\tLineSprite3D.SHADERDEFINE_TEXTUREMODE_STRETCH=0;\n\t__static(LineSprite3D,\n\t['shaderDefines',function(){return this.shaderDefines=new ShaderDefines$1(RenderableSprite3D.shaderDefines);}\n\t]);\n\treturn LineSprite3D;\n})(RenderableSprite3D)\n\n\n/**\n*<code>TerrainChunk</code> 类用于创建地块。\n*/\n//class laya.d3.terrain.TerrainChunk extends laya.d3.core.RenderableSprite3D\nvar TerrainChunk=(function(_super){\n\t/**\n\t*创建一个 <code>MeshSprite3D</code> 实例。\n\t*@param mesh 网格,同时会加载网格所用默认材质。\n\t*@param name 名字。\n\t*/\n\tfunction TerrainChunk(chunkOffsetX,chunkOffsetZ,girdSize,terrainHeightData,heightDataWidth,heightDataHeight,cameraCoordinateInverse,name){\n\t\tTerrainChunk.__super.call(this,name);\n\t\tthis._geometryFilter=new TerrainFilter(this,chunkOffsetX,chunkOffsetZ,girdSize,terrainHeightData,heightDataWidth,heightDataHeight,cameraCoordinateInverse);\n\t\tthis._render=new TerrainRender(this);\n\t}\n\n\t__class(TerrainChunk,'laya.d3.terrain.TerrainChunk',_super);\n\tvar __proto=TerrainChunk.prototype;\n\t__proto.buildRenderElementAndMaterial=function(detailNum,normalMap,alphaMapUrl,detailUrl1,detailUrl2,detailUrl3,detailUrl4,ambientColor,diffuseColor,specularColor,sx1,sy1,sx2,sy2,sx3,sy3,sx4,sy4){\n\t\t(sx1===void 0)&& (sx1=1);\n\t\t(sy1===void 0)&& (sy1=1);\n\t\t(sx2===void 0)&& (sx2=1);\n\t\t(sy2===void 0)&& (sy2=1);\n\t\t(sx3===void 0)&& (sx3=1);\n\t\t(sy3===void 0)&& (sy3=1);\n\t\t(sx4===void 0)&& (sx4=1);\n\t\t(sy4===void 0)&& (sy4=1);\n\t\tvar terrainMaterial=new TerrainMaterial();\n\t\tif (diffuseColor)terrainMaterial.diffuseColor=diffuseColor;\n\t\tif (ambientColor)terrainMaterial.ambientColor=ambientColor;\n\t\tif (specularColor)terrainMaterial.specularColor=specularColor;\n\t\tterrainMaterial.splatAlphaTexture=Loader.getRes(alphaMapUrl);\n\t\tterrainMaterial.normalTexture=normalMap ? Loader.getRes(normalMap):null;\n\t\tterrainMaterial.diffuseTexture1=detailUrl1 ? Loader.getRes(detailUrl1):null;\n\t\tterrainMaterial.diffuseTexture2=detailUrl2 ? Loader.getRes(detailUrl2):null;\n\t\tterrainMaterial.diffuseTexture3=detailUrl3 ? Loader.getRes(detailUrl3):null;\n\t\tterrainMaterial.diffuseTexture4=detailUrl4 ? Loader.getRes(detailUrl4):null;\n\t\tterrainMaterial.setDiffuseScale1(sx1,sy1);\n\t\tterrainMaterial.setDiffuseScale2(sx2,sy2);\n\t\tterrainMaterial.setDiffuseScale3(sx3,sy3);\n\t\tterrainMaterial.setDiffuseScale4(sx4,sy4);\n\t\tterrainMaterial.setDetailNum(detailNum);\n\t\tif (this._render._renderElements.length !=0){\n\t\t\tterrainMaterial.renderMode=/*laya.d3.core.material.TerrainMaterial.RENDERMODE_TRANSPARENT*/2;\n\t\t};\n\t\tvar renderElement=new RenderElement();\n\t\trenderElement._mainSortID=0;\n\t\trenderElement._sprite3D=this;\n\t\trenderElement.renderObj=this._geometryFilter;\n\t\trenderElement._material=terrainMaterial;\n\t\tthis._render._materials.push(terrainMaterial);\n\t\tthis._render._renderElements.push(renderElement);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._clearSelfRenderObjects=function(){\n\t\tthis.scene.removeFrustumCullingObject(this._render);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._addSelfRenderObjects=function(){\n\t\tthis.scene.addFrustumCullingObject(this._render);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._applyMeshMaterials=function(mesh){\n\t\tvar shaderMaterials=this._render.sharedMaterials;\n\t\tvar meshMaterials=mesh.materials;\n\t\tfor (var i=0,n=meshMaterials.length;i < n;i++)\n\t\t(shaderMaterials[i])|| (shaderMaterials[i]=meshMaterials[i]);\n\t\tthis._render.sharedMaterials=shaderMaterials;\n\t}\n\n\t__proto.cloneTo=function(destObject){\n\t\tconsole.log(\"Terrain Chunk can't clone\");\n\t}\n\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this.destroyed)\n\t\t\treturn;\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\t(this._geometryFilter)._destroy();\n\t}\n\n\t/**\n\t*获取地形过滤器。\n\t*@return 地形过滤器。\n\t*/\n\t__getset(0,__proto,'terrainFilter',function(){\n\t\treturn this._geometryFilter;\n\t});\n\n\t/**\n\t*获取地形渲染器。\n\t*@return 地形渲染器。\n\t*/\n\t__getset(0,__proto,'terrainRender',function(){\n\t\treturn this._render;\n\t});\n\n\tTerrainChunk.load=function(url){\n\t\treturn Laya.loader.create(url,null,null,TerrainChunk,null,1,false);\n\t}\n\n\treturn TerrainChunk;\n})(RenderableSprite3D)\n\n\n/**\n*<code>TerrainMeshSprite3D</code> 类用于创建网格。\n*/\n//class laya.d3.core.MeshTerrainSprite3D extends laya.d3.core.MeshSprite3D\nvar MeshTerrainSprite3D=(function(_super){\n\tfunction MeshTerrainSprite3D(mesh,heightMap,name){\n\t\t/**@private */\n\t\tthis._minX=NaN;\n\t\t/**@private */\n\t\tthis._minZ=NaN;\n\t\t/**@private */\n\t\tthis._cellSize=null;\n\t\t/**@private */\n\t\tthis._heightMap=null;\n\t\tMeshTerrainSprite3D.__super.call(this,mesh,name);\n\t\tthis._heightMap=heightMap;\n\t\tthis._cellSize=new Vector2();\n\t}\n\n\t__class(MeshTerrainSprite3D,'laya.d3.core.MeshTerrainSprite3D',_super);\n\tvar __proto=MeshTerrainSprite3D.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._disableRotation=function(){\n\t\tvar rotation=this.transform.rotation;\n\t\trotation.elements[0]=0;\n\t\trotation.elements[1]=0;\n\t\trotation.elements[2]=0;\n\t\trotation.elements[3]=1;\n\t\tthis.transform.rotation=rotation;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getScaleX=function(){\n\t\tvar worldMat=this.transform.worldMatrix;\n\t\tvar worldMatE=worldMat.elements;\n\t\tvar m11=worldMatE[0];\n\t\tvar m12=worldMatE[1];\n\t\tvar m13=worldMatE[2];\n\t\treturn Math.sqrt((m11 *m11)+(m12 *m12)+(m13 *m13));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._getScaleZ=function(){\n\t\tvar worldMat=this.transform.worldMatrix;\n\t\tvar worldMatE=worldMat.elements;\n\t\tvar m31=worldMatE[8];\n\t\tvar m32=worldMatE[9];\n\t\tvar m33=worldMatE[10];\n\t\treturn Math.sqrt((m31 *m31)+(m32 *m32)+(m33 *m33));\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initCreateFromMesh=function(heightMapWidth,heightMapHeight){\n\t\tthis._heightMap=HeightMap.creatFromMesh(this.meshFilter.sharedMesh,heightMapWidth,heightMapHeight,this._cellSize);\n\t\tvar boundingBox=this.meshFilter.sharedMesh.boundingBox;\n\t\tvar min=boundingBox.min;\n\t\tvar max=boundingBox.max;\n\t\tthis._minX=min.x;\n\t\tthis._minZ=min.z;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._initCreateFromMeshHeightMap=function(texture,minHeight,maxHeight){\n\t\tvar _$this=this;\n\t\tvar boundingBox=this.meshFilter.sharedMesh.boundingBox;\n\t\tif (texture.loaded){\n\t\t\tthis._heightMap=HeightMap.createFromImage(texture,minHeight,maxHeight);\n\t\t\tthis._computeCellSize(boundingBox);\n\t\t\t}else {\n\t\t\ttexture.once(/*laya.events.Event.LOADED*/\"loaded\",null,function(){\n\t\t\t\t_$this._heightMap=HeightMap.createFromImage(texture,minHeight,maxHeight);\n\t\t\t\t_$this._computeCellSize(boundingBox);\n\t\t\t});\n\t\t};\n\t\tvar min=boundingBox.min;\n\t\tvar max=boundingBox.max;\n\t\tthis._minX=min.x;\n\t\tthis._minZ=min.z;\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._computeCellSize=function(boundingBox){\n\t\tvar min=boundingBox.min;\n\t\tvar max=boundingBox.max;\n\t\tvar minX=min.x;\n\t\tvar minZ=min.z;\n\t\tvar maxX=max.x;\n\t\tvar maxZ=max.z;\n\t\tvar widthSize=maxX-minX;\n\t\tvar heightSize=maxZ-minZ;\n\t\tthis._cellSize.elements[0]=widthSize / (this._heightMap.width-1);\n\t\tthis._cellSize.elements[1]=heightSize / (this._heightMap.height-1);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._update=function(state){\n\t\tthis._disableRotation();\n\t\tlaya.d3.core.RenderableSprite3D.prototype._update.call(this,state);\n\t}\n\n\t/**\n\t*获取地形高度。\n\t*@param x X轴坐标。\n\t*@param z Z轴坐标。\n\t*/\n\t__proto.getHeight=function(x,z){\n\t\tMeshTerrainSprite3D._tempVector3.elements[0]=x;\n\t\tMeshTerrainSprite3D._tempVector3.elements[1]=0;\n\t\tMeshTerrainSprite3D._tempVector3.elements[2]=z;\n\t\tthis._disableRotation();\n\t\tvar worldMat=this.transform.worldMatrix;\n\t\tworldMat.invert(MeshTerrainSprite3D._tempMatrix4x4);\n\t\tVector3.transformCoordinate(MeshTerrainSprite3D._tempVector3,MeshTerrainSprite3D._tempMatrix4x4,MeshTerrainSprite3D._tempVector3);\n\t\tx=MeshTerrainSprite3D._tempVector3.elements[0];\n\t\tz=MeshTerrainSprite3D._tempVector3.elements[2];\n\t\tvar c=(x-this._minX)/ this._cellSize.x;\n\t\tvar d=(z-this._minZ)/ this._cellSize.y;\n\t\tvar row=Math.floor(d);\n\t\tvar col=Math.floor(c);\n\t\tvar s=c-col;\n\t\tvar t=d-row;\n\t\tvar uy=NaN;\n\t\tvar vy=NaN;\n\t\tvar worldMatE=worldMat.elements;\n\t\tvar m21=worldMatE[4];\n\t\tvar m22=worldMatE[5];\n\t\tvar m23=worldMatE[6];\n\t\tvar scaleY=Math.sqrt((m21 *m21)+(m22 *m22)+(m23 *m23));\n\t\tvar translateY=worldMatE[13];\n\t\tvar h01=this._heightMap.getHeight(row,col+1);\n\t\tvar h10=this._heightMap.getHeight((row+1),col);\n\t\tif (isNaN(h01)|| isNaN(h10))\n\t\t\treturn NaN;\n\t\tif (s+t <=1.0){\n\t\t\tvar h00=this._heightMap.getHeight(row,col);\n\t\t\tif (isNaN(h00))\n\t\t\t\treturn NaN;\n\t\t\tuy=h01-h00;\n\t\t\tvy=h10-h00;\n\t\t\treturn (h00+s *uy+t *vy)*scaleY+translateY;\n\t\t\t}else {\n\t\t\tvar h11=this._heightMap.getHeight((row+1),col+1);\n\t\t\tif (isNaN(h11))\n\t\t\t\treturn NaN;\n\t\t\tuy=h10-h11;\n\t\t\tvy=h01-h11;\n\t\t\treturn (h11+(1.0-s)*uy+(1.0-t)*vy)*scaleY+translateY;\n\t\t}\n\t}\n\n\t/**\n\t*获取地形X轴最小位置。\n\t*@return 地形X轴最小位置。\n\t*/\n\t__getset(0,__proto,'minX',function(){\n\t\tvar worldMat=this.transform.worldMatrix;\n\t\tvar worldMatE=worldMat.elements;\n\t\treturn this._minX *this._getScaleX()+worldMatE[12];\n\t});\n\n\t/**\n\t*获取地形X轴长度。\n\t*@return 地形X轴长度。\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn (this._heightMap.width-1)*this._cellSize.x *this._getScaleX();\n\t});\n\n\t/**\n\t*获取地形Z轴最小位置。\n\t*@return 地形X轴最小位置。\n\t*/\n\t__getset(0,__proto,'minZ',function(){\n\t\tvar worldMat=this.transform.worldMatrix;\n\t\tvar worldMatE=worldMat.elements;\n\t\treturn this._minZ *this._getScaleZ()+worldMatE[14];\n\t});\n\n\t/**\n\t*获取地形Z轴长度。\n\t*@return 地形Z轴长度。\n\t*/\n\t__getset(0,__proto,'depth',function(){\n\t\treturn (this._heightMap.height-1)*this._cellSize.y *this._getScaleZ();\n\t});\n\n\tMeshTerrainSprite3D.createFromMesh=function(mesh,heightMapWidth,heightMapHeight,name){\n\t\tvar meshTerrainSprite3D=new MeshTerrainSprite3D(mesh,null,name);\n\t\tif (mesh.loaded)\n\t\t\tmeshTerrainSprite3D._initCreateFromMesh(heightMapWidth,heightMapHeight);\n\t\telse\n\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",meshTerrainSprite3D,meshTerrainSprite3D._initCreateFromMesh,[heightMapWidth,heightMapHeight]);\n\t\treturn meshTerrainSprite3D;\n\t}\n\n\tMeshTerrainSprite3D.createFromMeshAndHeightMap=function(mesh,texture,minHeight,maxHeight,name){\n\t\tvar meshTerrainSprite3D=new MeshTerrainSprite3D(mesh,null,name);\n\t\tif (mesh.loaded)\n\t\t\tmeshTerrainSprite3D._initCreateFromMeshHeightMap(texture,minHeight,maxHeight);\n\t\telse\n\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",meshTerrainSprite3D,meshTerrainSprite3D._initCreateFromMeshHeightMap,[texture,minHeight,maxHeight]);\n\t\treturn meshTerrainSprite3D;\n\t}\n\n\t__static(MeshTerrainSprite3D,\n\t['_tempVector3',function(){return this._tempVector3=new Vector3();},'_tempMatrix4x4',function(){return this._tempMatrix4x4=new Matrix4x4();}\n\t]);\n\treturn MeshTerrainSprite3D;\n})(MeshSprite3D)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.d3.water.WaterSprite extends laya.d3.core.MeshSprite3D\nvar WaterSprite=(function(_super){\n\tfunction WaterSprite(mesh,name){\n\t\tthis.mtl=null;\n\t\tthis.detailMtl=null;\n\t\tthis.mesh=null;\n\t\tthis.useRefrTex=true;\n\t\tthis.renderDetailWav=true;\n\t\tthis._stop=false;\n\t\tthis._texWave=null;\n\t\tthis._texRefract=null;\n\t\tthis._detailMesh=null;\n\t\t//贴图纹理的旋转矩阵\n\t\tthis._texWaveDegTest=0;\n\t\tthis._shownormal=false;\n\t\tthis._refractQueue=null;\n\t\tthis._waterLoaded=false;\n\t\tthis._waterFogStart=0;\n\t\tthis._waterFogRange=20;\n\t\tthis.startTm=0;\n\t\tthis.curTm=0;\n\t\tthis._syncObj=null;\n\t\tthis.afterDescLoaded=null;\n\t\tthis._geoWaveInfo=new Float32Array(WaterSprite._waveInfoEleNum *4);\n\t\tthis._geoWaveInfoDir=new Float32Array(2 *4);\n\t\tthis._texWaveInfo=new Float32Array(WaterSprite._waveInfoEleNum *15);\n\t\tthis._texWaveInfoDir=new Float32Array(2 *15);\n\t\tthis._texWaveTrans=new Float32Array(9);\n\t\tthis._refractObjStack=[];\n\t\tthis._refractObjecs=[];\n\t\tthis._scrSizeInfo=new Float32Array(2);\n\t\tthis._waterColor=new Vector3();\n\t\tWaterSprite.__super.call(this,mesh,name);\n\t\tthis.mtl=new WaterMaterial();\n\t\tthis.startTm=Laya.timer.currTimer;\n\t\tthis.curTm=0;\n\t}\n\n\t__class(WaterSprite,'laya.d3.water.WaterSprite',_super);\n\tvar __proto=WaterSprite.prototype;\n\t__proto._getWaveInfo=function(out,outdir,i,deg,L,Q,A){\n\t\tvar st=i *WaterSprite._waveInfoEleNum;\n\t\tvar dirst=i *2;\n\t\tvar r=deg *WaterSprite.deg2rad;\n\t\toutdir[dirst++]=Math.cos(r);\n\t\toutdir[dirst++]=Math.sin(r);\n\t\tout[st++]=Q;\n\t\tout[st++]=A;\n\t\tout[st++]=WaterSprite._2pi / L;\n\t\tout[st++]=7.846987702957 / Math.sqrt(L);\n\t}\n\n\t__proto.onDescLoaded=function(desc){\n\t\tvar _$this=this;\n\t\tvar mesh=Mesh.load(desc.mesh);\n\t\tthis._texWave=new RenderTexture(desc.detailTexSize[0],desc.detailTexSize[1],/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5,false,false);\n\t\tif(this.useRefrTex){\n\t\t\tthis._texRefract=new RenderTexture(desc.refracTexSize[0],desc.refracTexSize[1]);\n\t\t\tthis._texRefract.repeat=false;\n\t\t\tthis._texRefract.mipmap=true;\n\t\t\tthis.mtl.useRefractTexture=true;\n\t\t\t}else {\n\t\t\tthis.mtl.useRefractTexture=false;\n\t\t}\n\t\t(this._geometryFilter).sharedMesh=mesh;\n\t\tmesh.once(/*laya.events.Event.LOADED*/\"loaded\",this,this._applyMeshMaterials);\n\t\tmesh.on(/*laya.events.Event.LOADED*/\"loaded\",this,this.onMeshLoaded);\n\t\tif (desc.skyTexture.substr(desc.skyTexture.length-4).toLowerCase()==='.ltc'){\n\t\t\tthis.mtl.skyTexture=TextureCube.load(desc.skyTexture);\n\t\t\tthis.mtl._addShaderDefine(WaterMaterial.SHADERDEFINE_CUBE_ENV);\n\t\t\t}else {\n\t\t\tthis.mtl.skyTexture=Texture2D.load(desc.skyTexture);\n\t\t\tthis.mtl._removeShaderDefine(WaterMaterial.SHADERDEFINE_CUBE_ENV);\n\t\t}\n\t\tif (desc.hdrsky){\n\t\t\tthis.mtl._addShaderDefine(WaterMaterial.SHADERDEFINE_HDR_ENV);\n\t\t}\n\t\tif (desc.deepScale !=undefined)\n\t\t\tthis.mtl.deepScale=desc.deepScale;\n\t\tif (desc.useVertexDeep){\n\t\t\tthis.mtl.useVertexDeep=true;\n\t\t}\n\t\tthis.mtl.skyTexture.repeat=true;\n\t\tvar infotex=Texture2D.load(desc.infoTexture);\n\t\tinfotex.repeat=false;\n\t\tthis.mtl.waterInfoTexture=infotex;\n\t\tvar foamTex=Texture2D.load(desc.foamTexture);\n\t\tfoamTex.repeat=true;\n\t\tthis.mtl.foamTexture=foamTex;\n\t\tthis.mtl.renderMode=/*laya.d3.core.material.WaterMaterial.RENDERMODE_TRANSPARENT*/13;\n\t\tthis.mtl.waveMainDir=desc.geoWaveData[0].dir;\n\t\tthis.mtl.geoWaveUVScale=desc.geoWaveUVScale;\n\t\tthis._detailMesh=new QuadMesh(2,2);\n\t\tthis.detailMtl=new WaterDetailMaterial();\n\t\tthis.detailMtl.texWaveUVScale=desc.detailWaveUVScale;\n\t\tif (desc.geoWaveData.length !=4)throw \"error 3\";\n\t\tif (desc.detailData.length !=4)throw \"error 4\";\n\t\t(desc.geoWaveData).forEach(function(v,i){\n\t\t\t_$this._getWaveInfo(_$this._geoWaveInfo,_$this._geoWaveInfoDir,i,v.dir,v.L,v.Q,v.A);\n\t\t});\n\t\tvar kAmp_over_L=0.01;\n\t\t(desc.detailData).forEach(function(v,i){\n\t\t\t_$this._getWaveInfo(_$this._texWaveInfo,_$this._texWaveInfoDir,i,v.dir,v.L,1.5,v.L *kAmp_over_L);\n\t\t});\n\t\tthis._waterColor.x=desc.color[0]/255;this._waterColor.y=desc.color[1]/255;this._waterColor.z=desc.color[2]/255;\n\t\tthis.mtl.seaColor=new Float32Array([this._waterColor.x,this._waterColor.y,this._waterColor.z]);\n\t\tthis._waterFogStart=desc.fogStart;\n\t\tthis._waterFogRange=desc.fogRange;\n\t\tif (this.afterDescLoaded){\n\t\t\tthis.afterDescLoaded.call(this);\n\t\t}\n\t}\n\n\t__proto.onMeshLoaded=function(){\n\t\tthis._refractQueue=new RenderQueue(this._scene);\n\t\tthis._scrSizeInfo[0]=Laya.stage.width;\n\t\tthis._scrSizeInfo[1]=Laya.stage.height;\n\t\tthis.mtl.scrsize=this._scrSizeInfo;\n\t\tthis.meshRender.sharedMaterial=this.mtl;\n\t\tif (this._render._renderElements.length > 0){\n\t\t\tthis._render._renderElements[0]._onPreRenderFunction=this.onPreRender;\n\t\t\t}else {\n\t\t\tthrow \"error2\";\n\t\t}\n\t\tthis._waterLoaded=true;\n\t}\n\n\t__proto.stop=function(){\n\t\tthis._stop=!this._stop;\n\t}\n\n\t__proto.addRefractObj=function(obj){\n\t\tthis._refractObjStack.push(obj);\n\t\tthis._refractObjecs.push(obj);\n\t}\n\n\t/**\n\t*渲染之前，生成必要的数据。\n\t*@param state\n\t*/\n\t__proto.onPreRender=function(state){\n\t\tvar _$this=this;\n\t\tif (!this._waterLoaded)\n\t\t\treturn;\n\t\tif (this._refractObjStack.length){\n\t\t\tfor (var i=0;i < this._refractObjStack.length;i++){\n\t\t\t\tvar obj=this._refractObjStack[i];\n\t\t\t\tif (obj._render._renderElements.length){\n\t\t\t\t\tobj._render._renderElements.forEach(function(v){_$this._refractQueue._addRenderElement(v);});\n\t\t\t\t\tthis._refractObjStack.splice(i,1);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar gl=WebGL.mainContext;\n\t\tvar olddf=gl.getParameter(/*laya.webgl.WebGLContext.DEPTH_TEST*/0x0B71);\n\t\tvar oldcf=gl.getParameter(/*laya.webgl.WebGLContext.CULL_FACE*/0x0B44);\n\t\tvar oldvp=gl.getParameter(/*laya.webgl.WebGLContext.VIEWPORT*/0x0BA2);\n\t\tvar needRestoreVP=false;\n\t\tif(this.useRefrTex){\n\t\t\tthis._texRefract.start();\n\t\t\tneedRestoreVP=true;\n\t\t\tgl.viewport(0,0,this._texRefract.width,this._texRefract.height);\n\t\t\tgl.clearColor(this._waterColor.x,this._waterColor.y,this._waterColor.z,1.);\n\t\t\tgl.clear(/*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100 | /*laya.webgl.WebGLContext.COLOR_BUFFER_BIT*/0x00004000);\n\t\t\tthis._refractObjecs.forEach(function(v){\n\t\t\t\tv._renderUpdate(state._projectionViewMatrix);\n\t\t\t});\n\t\t\tthis._refractQueue._preRender(state);\n\t\t\tthis._refractQueue._render(state,false);\n\t\t\tthis._texRefract.end();\n\t\t\tthis._texRefract.repeat=true;\n\t\t}\n\t\tif(this.renderDetailWav){\n\t\t\tthis._texWave.start();\n\t\t\tgl.disable(/*laya.webgl.WebGLContext.DEPTH_TEST*/0x0B71);\n\t\t\tgl.disable(/*laya.webgl.WebGLContext.CULL_FACE*/0x0B44);\n\t\t\tneedRestoreVP=true;\n\t\t\tgl.viewport(0,0,WaterSprite.detailTexWidth,WaterSprite.detailTexHeight);\n\t\t\tvar re=this._detailMesh.getRenderElement(0);\n\t\t\tre._beforeRender(state);\n\t\t\tthis.detailMtl.currentTm=Laya.timer.currTimer;\n\t\t\tthis.detailMtl.waveInfo=this._texWaveInfo;\n\t\t\tthis.detailMtl.waveInfoD=this._texWaveInfoDir;\n\t\t\tvar detailShader=this.detailMtl._getShader(0,0,0);\n\t\t\tdetailShader.bind();\n\t\t\tvar vb=this._detailMesh._getVertexBuffer(0);\n\t\t\tdetailShader.uploadAttributes(vb.vertexDeclaration.shaderValues.data,null);\n\t\t\tthis.detailMtl._upload();\n\t\t\tre._render(state);\n\t\t\tthis._texWave.end();\n\t\t\tolddf && gl.enable(/*laya.webgl.WebGLContext.DEPTH_TEST*/0x0B71);\n\t\t\toldcf && gl.enable(/*laya.webgl.WebGLContext.CULL_FACE*/0x0B44);\n\t\t}\n\t\tif(needRestoreVP)\n\t\t\tgl.viewport(oldvp[0],oldvp[1],oldvp[2],oldvp[3]);\n\t\tif (this._syncObj){\n\t\t\tthis.mtl.detailTexture=this._syncObj._texWave;\n\t\t}else\n\t\tthis.mtl.detailTexture=this._texWave;\n\t\tthis.mtl.waveInfo=this._geoWaveInfo;\n\t\tthis.mtl.waveInfoD=this._geoWaveInfoDir;\n\t\tthis.mtl.underWaterTexture=this._texRefract;\n\t\tif (!this._stop){\n\t\t\tif (this._syncObj)this.curTm=this._syncObj.curTm;\n\t\t\telse this.curTm=Laya.timer.currTimer-this.startTm;\n\t\t\tthis.mtl._setNumber(/*laya.d3.core.material.WaterMaterial.CURTM*/8,this.curTm);\n\t\t}else {}\n\t\tif (/*__JS__ */window.shownormal && !this._shownormal){\n\t\t\tthis._shownormal=true;\n\t\t\tthis.mtl._addShaderDefine(WaterMaterial.SHADERDEFINE_SHOW_NORMAL);\n\t\t}\n\t\tif(/*__JS__ */window.shownormal && this._shownormal){\n\t\t\tthis._shownormal=false;\n\t\t\tthis.mtl._removeShaderDefine(WaterMaterial.SHADERDEFINE_SHOW_NORMAL);\n\t\t}\n\t}\n\n\t__proto._update=function(state){\n\t\tlaya.d3.core.RenderableSprite3D.prototype._update.call(this,state);\n\t}\n\n\t__getset(0,__proto,'src',null,function(v){\n\t\tvar ld=new Loader();\n\t\tld.on(/*laya.events.Event.COMPLETE*/\"complete\",this,this.onDescLoaded);\n\t\tld.load(v);\n\t});\n\n\t__getset(0,__proto,'syncObj',null,function(obj){\n\t\tthis._syncObj=obj;\n\t\tthis.renderDetailWav=false;\n\t});\n\n\tWaterSprite._waveInfoEleNum=4;\n\tWaterSprite.detailTexWidth=256;\n\tWaterSprite.detailTexHeight=256;\n\t__static(WaterSprite,\n\t['deg2rad',function(){return this.deg2rad=Math.PI / 180;},'_2pi',function(){return this._2pi=2 *Math.PI;}\n\t]);\n\treturn WaterSprite;\n})(MeshSprite3D)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.d3Plugin.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Component3D=laya.d3.component.Component3D,ComponentNode=laya.d3.core.ComponentNode,MeshTerrainSprite3D=laya.d3.core.MeshTerrainSprite3D;\n\tvar Sprite3D=laya.d3.core.Sprite3D;\n/**\n*<code>PathFinding</code> 类用于创建寻路。\n*/\n//class laya.d3.component.PathFind extends laya.d3.component.Component3D\nvar PathFind=(function(_super){\n\tfunction PathFind(){\n\t\t/**@private */\n\t\tthis._meshTerrainSprite3D=null;\n\t\t/**@private */\n\t\tthis._finder=null;\n\t\t/**@private */\n\t\tthis._setting=null;\n\t\t/**寻路网格。*/\n\t\tthis.grid=null;\n\t\tPathFind.__super.call(this);\n\t}\n\n\t__class(PathFind,'laya.d3.component.PathFind',_super);\n\tvar __proto=PathFind.prototype;\n\t/**\n\t*@private\n\t*初始化载入蒙皮动画组件。\n\t*@param owner 所属精灵对象。\n\t*/\n\t__proto._load=function(owner){\n\t\tif (! (owner instanceof laya.d3.core.MeshTerrainSprite3D ))\n\t\t\tthrow new Error(\"PathFinding: The owner must MeshTerrainSprite3D!\");\n\t\t_super.prototype._load.call(this,owner);\n\t\tthis._meshTerrainSprite3D=owner;\n\t}\n\n\t/**\n\t*寻找路径。\n\t*@param startX 开始X。\n\t*@param startZ 开始Z。\n\t*@param endX 结束X。\n\t*@param endZ 结束Z。\n\t*@return 路径。\n\t*/\n\t__proto.findPath=function(startX,startZ,endX,endZ){\n\t\tvar minX=this._meshTerrainSprite3D.minX;\n\t\tvar minZ=this._meshTerrainSprite3D.minZ;\n\t\tvar cellX=this._meshTerrainSprite3D.width / this.grid.width;\n\t\tvar cellZ=this._meshTerrainSprite3D.depth / this.grid.height;\n\t\tvar halfCellX=cellX / 2;\n\t\tvar halfCellZ=cellZ / 2;\n\t\tvar gridStartX=Math.floor((startX-minX)/ cellX);\n\t\tvar gridStartZ=Math.floor((startZ-minZ)/ cellZ);\n\t\tvar gridEndX=Math.floor((endX-minX)/ cellX);\n\t\tvar gridEndZ=Math.floor((endZ-minZ)/ cellZ);\n\t\tvar boundWidth=this.grid.width-1;\n\t\tvar boundHeight=this.grid.height-1;\n\t\t(gridStartX > boundWidth)&& (gridStartX=boundWidth);\n\t\t(gridStartZ > boundHeight)&& (gridStartZ=boundHeight);\n\t\t(gridStartX < 0)&& (gridStartX=0);\n\t\t(gridStartZ < 0)&& (gridStartZ=0);\n\t\t(gridEndX > boundWidth)&& (gridEndX=boundWidth);\n\t\t(gridEndZ > boundHeight)&& (gridEndZ=boundHeight);\n\t\t(gridEndX < 0)&& (gridEndX=0);\n\t\t(gridEndZ < 0)&& (gridEndZ=0);\n\t\tvar path=this._finder.findPath(gridStartX,gridStartZ,gridEndX,gridEndZ,this.grid);\n\t\tthis.grid.reset();\n\t\tfor (var i=1;i < path.length-1;i++){\n\t\t\tvar gridPos=path[i];\n\t\t\tgridPos[0]=gridPos[0] *cellX+halfCellX+minX;\n\t\t\tgridPos[1]=gridPos[1] *cellZ+halfCellZ+minZ;\n\t\t}\n\t\tif (path.length==1){\n\t\t\tpath[0][0]=endX;\n\t\t\tpath[0][1]=endX;\n\t\t\t}else if (path.length > 1){\n\t\t\tpath[0][0]=startX;\n\t\t\tpath[0][1]=startZ;\n\t\t\tpath[path.length-1][0]=endX;\n\t\t\tpath[path.length-1][1]=endZ;\n\t\t}\n\t\treturn path;\n\t}\n\n\t/**\n\t*设置寻路设置。\n\t*@param value 寻路设置。\n\t*/\n\t/**\n\t*获取寻路设置。\n\t*@return 寻路设置。\n\t*/\n\t__getset(0,__proto,'setting',function(){\n\t\treturn this._setting;\n\t\t},function(value){\n\t\t(value)&& (this._finder=new PathFinding.finders.AStarFinder(value));\n\t\tthis._setting=value;\n\t});\n\n\treturn PathFind;\n})(Component3D)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.debugtool.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Box=laya.ui.Box,Browser=laya.utils.Browser,Button=laya.ui.Button,Byte=laya.utils.Byte,CSSStyle=laya.display.css.CSSStyle;\n\tvar Component=laya.ui.Component,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar Filter=laya.filters.Filter,GrahamScan=laya.maths.GrahamScan,Graphics=laya.display.Graphics,HTMLCanvas=laya.resource.HTMLCanvas;\n\tvar Handler=laya.utils.Handler,HitArea=laya.utils.HitArea,Image=laya.ui.Image,Input=laya.display.Input,Label=laya.ui.Label;\n\tvar List=laya.ui.List,Loader=laya.net.Loader,LoaderManager=laya.net.LoaderManager,LocalStorage=laya.net.LocalStorage;\n\tvar MathUtil=laya.maths.MathUtil,Matrix=laya.maths.Matrix,Node=laya.display.Node,Point=laya.maths.Point,Pool=laya.utils.Pool;\n\tvar Rectangle=laya.maths.Rectangle,Render=laya.renders.Render,RenderContext=laya.renders.RenderContext,RenderSprite=laya.renders.RenderSprite;\n\tvar Resource=laya.resource.Resource,ResourceManager=laya.resource.ResourceManager,RunDriver=laya.utils.RunDriver;\n\tvar Sprite=laya.display.Sprite,Stage=laya.display.Stage,Stat=laya.utils.Stat,Style=laya.display.css.Style;\n\tvar Text=laya.display.Text,TextInput=laya.ui.TextInput,Texture=laya.resource.Texture,Timer=laya.utils.Timer;\n\tvar Tree=laya.ui.Tree,UIEvent=laya.ui.UIEvent,URL=laya.net.URL,Utils=laya.utils.Utils,View=laya.ui.View;\n//class laya.debug.data.Base64AtlasManager\nvar Base64AtlasManager=(function(){\n\tfunction Base64AtlasManager(){}\n\t__class(Base64AtlasManager,'laya.debug.data.Base64AtlasManager');\n\tBase64AtlasManager.replaceRes=function(uiO){\n\t\tBase64AtlasManager.base64.replaceRes(uiO);\n\t}\n\n\t__static(Base64AtlasManager,\n\t['dataO',function(){return this.dataO={\"comp/button1.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABRCAYAAAApS3MNAAABSUlEQVR4Xu3a0QmFMADFUJ1JXM0h3moPZ6qg4AoNeLqAIenFn65jjLE40w2sQkxvcAMI0eggRKSDEEJUDEQ4/COEiBiIYFiEEBEDEQyLECJiIIJhEUJEDEQwLEKIiIEIhkUIETEQwbAIISIGIhgWIUTEQATDIoSIGIhgWIQQEQMRDIsQImIggnEvYvv9IzjfxDiP/XlgJsTcCyDEXP/v14UQImIggmERQkQMRDAsQoiIgQiGRQgRMRDBsAghIgYiGBYhRMRABMMihIgYiGBYhBARAxEMixAiYiCCYRFCRAxEMCxCiIiBCMa7iAjPpzG8fY3kF0KIiIEIhkUIETEQwbAIISIGIhgWIUTEQATDIoSIGIhgWIQQEQMRDIsQImIggmERQkQMRDAsQoiIgQiGRQgRMRDBsAghIgYiGBYhRMRABMMihIgYiGBcGJiOHTRZjZAAAAAASUVORK5CYII=\",\"comp/line2.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAAG0lEQVQYV2NkoDJgpLJ5DIxtra3/qWko1V0IAJvgApS1libIAAAAAElFTkSuQmCC\",\"view/create.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAkCAYAAAC9itu8AAAAdElEQVQ4T2NkwAIWLFjwH5t4QkICIyM2CXQxmAHka/j///9mXDYxMjL6YtgwBDUg+w8crIT8MBQ0oEca55JvWNPS9xgu4tISzADyNfz///8MnrRkgmHDENSALWng9fRQ0DA40xLecglbWhpqGoZCMUNKUQkANAHAJVkE5XwAAAAASUVORK5CYII=\",\"view/rendertime.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAkCAYAAAC9itu8AAABeUlEQVQ4T+2Uv0tCURSAvyNdcwiXBlsaaomWFgeHlqAtCPsDJHwIiUtDSxERtErtmQ6CjkHo4FpDBQ0tbVFR0BYE0eQvOnFF7T17QlOTd3m88873OD8+rtA9uVzOBIPBlIisAwvd8B1QajQahXQ63bIx6QHFYrEEJHrv7qeqZhzHOfYA+Xw+Yow5B+YHoGwymdxW1QAQEFWNAk8i8uEDuZM3gUcLZIEJYNcNqWrVcZyd7p9t8jLwYIFTYBx47UHlcjmcSCQ+B5JtpU0LnAFj3br7kE+yTalb4BCYczVqoT3AjteW4T73FlgFNgY+1IGQz4hPLGCAI2DGbweu2Auw1Vmcqk4C+8DsEOgZOBCR9/6mVdU2vgIsAdOuIVwANRFpezatuahpTYVSop1m+y6pasm8NQqSvvW61KwslkSHuCRkgvErr0taiUXaal1Sr0siWRO/9HfpF+RN9nfpB/qqmrXrv7mktVhYVm5GLo1cct9LI5e8d84/3UvfAgdlKH0EO7MAAAAASUVORK5CYII=\",\"view/cache.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAkCAYAAABSSLCCAAAAcElEQVQ4T2NcsGDB/4SEBEYGBgYGYtmMxCpENhhsA6mA8f///5tHNTEwkBcQpIYcSD15kUtWigi51vR/jVYdOGUQy2YkViGywWSnvTOkhiAonkY1gZIRqSEHTntkRe4g10RWQIyWe5Bgo2O5R7dkBADztyP+yFzirAAAAABJRU5ErkJggg==\",\"comp/clip_selectBox.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAoCAYAAAAIeF9DAAAAsElEQVRoQ+3ZQQ0AMQzEwAuqEgh/Sj2pKObhIrBsrfLonHPu12MMTEGYFg+kIFaPgmA9ClIQzQDG0w0pCGYAw2khBcEMYDgtpCCYAQynhRQEM4DhtJCCYAYwnBZSEMwAhtNCCoIZwHBmd/tTh6IUBIrx/tRbiFWkIFaPFoL1KEhBNAMYTzekIJgBDKeFFAQzgOG0kIJgBjCcFlIQzACG00IKghnAcFpIQTADGE4LwYL8U/BE1dCJ3PsAAAAASUVORK5CYII=\",\"comp/label.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAASCAYAAACQCxruAAAAmElEQVRoQ+3aMQqAQBBDUef+hx4Zq1mrbPnhWylECHmghVZ397OOqqp97TlugdNzgEXFIaaFuwROt0LmBEay5aXb920+FjIpMJItLy1wvhUyKTCSLS8tcL4VMikwki0vLXC+FTIpMJItLy1wvhUyKTCSLS89wPP1Qeh8M0zy+84gMMbruqjA15OxbtjAu7mPa5bj0fb/A8cLgD4n/wQKNiIAAAAASUVORK5CYII=\",\"comp/clip_tree_arrow.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAQCAYAAAArij59AAAAwUlEQVQoU5WRPRKCMBCFWUt6vYQeB06RUDpoBbFDa7yDwm30FGi9dHnOMiQDBgvT5c3b7+0PRVEUlVV9A3NmzL6T//SRfMz5CgCdtVafjlmzaHAigAbM2tE8YVo1pf0yvABoc9D3wACgBbMKIgD4qqDJsqqlMV8VGL5n/88geCJKlijSMBXFZUNx/CSi9WwX1r7R99thzKKqkxXRbMUWSE2u2sEwHsxHCbrMVSq6N4xRD9HAvJstylEkarhurlqnfQC58YP5+CvQNwAAAABJRU5ErkJggg==\",\"view/bg_panel.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAMUlEQVRYR+3QQREAAAjDMGZk/l2CDD6pgl7SduexGCBAgAABAgQIECBAgAABAgS+BQ4oyStBhXcy5AAAAABJRU5ErkJggg==\",\"view/bg_top.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAMUlEQVRYR+3QQREAAAjDMKZp/rWBDD6pgl7SduexGCBAgAABAgQIECBAgAABAgS+BQ6WyDMhXMLeQgAAAABJRU5ErkJggg==\",\"view/clickselect.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAqCAYAAACDdWrxAAACfElEQVRIS8WVO2iTYRSGn5OWqpMOurg0VRBdVVCsg7GgDjpZECyirl4GEYfSgBlaB5VSpApdxCJIoeKgg7dKC21ALahIiyiKKUjxAiI4qCH1lRP/hPhfAnHpGZPv+c4573nP95ukO/xHmINmtq8RtswsPiipB/gAPAFem5nCbcSWKukIsD84/A2YBh4DL8ysWLkk0qOkDcD5GLF+Ac+Ap35ZHGjAdWB5gtJvgZFYVSWdBHaFwBlg1Mw8K0ngFiAbAm+a2XBij/6HpBbgBrAEmAVeAZ1AFU40QDCWrcBZL0/S4Vq4HtgB7DWzU5XyauDBMhhWz70ryVVdb2ZuhGpI2g1MODjfiMFrxZk3s9WNwJ6snHFxQUlXgXfAPeC5mf2O2Y5oqZLcMceCw1+AseCSSTP7mSiOpM3A7RixfvgYgAd+WUQcSSnfPWBlgtIvgf5YVSVdBA6GQF/mS2bmWcvbERmHJF+payFw0MzO1TWApKXBViwL3h5/Pk4AVTjRAMFY9njJXl6wLccrcD3wAHDUzBwuRw18JtbkbkFJruomM7sf2o4u4Jals/mFRgxeFcfBQm97UyOwM+WMiwums/k3QnMps+HWpuLIRC5TCrcRW2pbT35MRiY4XDRsVmiU5uJQIZfxb0k5Ij229eQPySJ287MLGO8Rd1M0XY6AO3LjzYVSy3fAH+VICL4a6o9VtTWbnzbYGKI+IrtQ6Ns2EFuq/5jOTnWD9f4DikeFvvbqhyg2Yzo3voJSy2fAjfEJMYPRQQ2caAAfC7AW2WkvrzU79dCwnRW4Hjgg6JrrbV9VKbkKw1Csyd2Ca7on1y2krHOub3t16//2n79SarbsH7BKtfejoCjmAAAAAElFTkSuQmCC\",\"view/resize.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAqCAYAAACDdWrxAAABeUlEQVRIS+2UvUpdURCFvxXRKJpIEBURsVAIiiBoaaGCjY2VLyH4MBaCPoWlnQlpI6SxsQmkURQL5eK/6JK57iuRnMPZtxAkuOFUhzWz96xvjcg8tluAT5LOQqJMHba/AgPAD0nOEtruAOaB6Lon6U+ucAoYTLe7Bb5XCm1/BCaAXqAVOAHyOkYn27PA5/TGWmXHxvBeT2i7TVIM4MUp7ZhGPlY3V/pVKUxEjAIjyac74LIAjK70PwCoyfYXYDJwyqDoHtiRdFOfql0naBgIrILF/ZIi1yH6h1XbYXCPpKOq7s34GEX7JB00m445YBzYlPSQ1dF2N7CaWN2W9DNXuJxAj1uGVeuVQtvh32LyuR34DexWCv+CfAXoBzYkHb8Boe1OSRcFkBdfNY18IQiUtFUpTJjNAPEFHVfAaQFyjZ3zNBzbQ8BSWkZViEbk1uIpjXR8AKbT7jwEvpVUqEk6L0pHLN5hSWWxeq7XjI/v6Sgz0vZ7Ov7DdDwCkcb1m86tSukAAAAASUVORK5CYII=\",\"view/clickanalyse.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAqCAYAAACDdWrxAAAC7UlEQVRIS5WWT2hUZxTFfyfGFolkoUVKrHQiEaX+IfgHa54UQzUqpWYhLbQU6ULNwgYXuog6yiiTgK2LgtAu6yqbFkpRBEURQzJEBN200NqKkxoDLnQhFUrizJU7vje8SSbzZr7FwDy+c75z7z3nfU80uMxMDin9JC0zewvYAHwIrAH65wWaWQuwOdy8CVgUHnBd0sUKoJktBbYC24B1QHMVNeck3ZWZrYhtXpUg/3/gS0kzDnT2/cDqpFqBUUnnK5pjZutDgo01Tr0g6XbVrprZypBgO9AUU/EK+ErSyzLQzC5XkTkCfBR7fl/Smeh/qasOlPRp9DAkOgp8H5P9o6SriUAnMrOzgNdswNeSntcL9IYNAQ8kHYuXU5Y6u8ZIupldAO5I+nkOsNb8wjk/ljTZKFCSvMbSMrPSiOpNx9uAz3UP4IbfWSsdrcDH4eZuYHF46LCk47PT8S6wG9gbJmRhlfoPSLrhJvdERJs7E+S73dZKmnagsx8JB50UEHdY3+x0dIUEO2qcekTSr/OlY21I4N5dEJMwA6yX9CKejqkqGn8DemPPb0v6YrZXpyS1xYbsRD3AtZjsk5IuJQKdyMyGAa/ZnbNR0tN6gd6wXwAP8SfV0jGnxki6mV1xyf4ubdTkPue/Jf3TEJCMNZFRMQLtyNwqvaTrSkdHZry1MFM8bLLPgY5U8/SyeYHvncotb5b1A/t8c2QGg3sT2WBLBbD95PiGogr9Ej0Gbap8r4ZJ5kR+MPhW7WdGd5npEFaa15IE+YWW5uklf2S6/1N7OnfasG+Ad5KiAfyVzwYfVDQnlc71YTaA8Ntrvtq/y2eDgapdTZ0a60UMhjdvmcCgWDClJge7npSBqfRYYY5M6U/M/NqO1mQ+G7xf4VUH5rNBOXtviLQfzH0afizop0fZroOJQCdKpcfyUKrZFhTpfDgU/F4nMNcH9gPwLJ8Nls3xarUaI+mp9NhTg5GJbPBZQyb3OReayP17rutmHPga1PpCOk+zrlEAAAAASUVORK5CYII=\",\"view/res.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAoCAYAAAD6xArmAAADwUlEQVRIS+3WT2gcdRQH8O/b2SwNC7l4MAEPvbilUkoPOUmLjSDrZn4hxYKH/kGwyB4tQogiu/N+GymyoWguhVBQKKkHQTHsW9fUQwqKp4AgtMXkInhILl4CkoTdmSe/6XZp2pntLli8uMedt9/3mze/33yW8Jw+9Jxy0TeYmV8FcFVVTxPRiwA6AP5U1TvZbHapUqn8nrawxGBVJWvtNVWdJ6K05h1V/dhaW08KT/wRM1sAVQCRqn5JRLdyudw9Iora7faJKIrKqnrBNSWiahAEC0+GHwpm5utEdD+KopsuBMDbzPxt0oqstRdV9Za7lslkzlar1Z8erzsUHATBJhG93C34fmJi4ly5XG6nzTEIgjoRzanqkrX2amowM98F8Fq3wK34PWb+Ii14cXExv7e3V6hWq78+axQrANwt/kVEl5j5h0G2IzMfUdWCtfa3R/VPzvhTAG8AOM/MfwwYehTANwB+ZOYPE4ODIDhJRJvMvD9IqLW2GEXRbSJ6AcBtZr6UGPzoS2Y+lc/nt+bm5v5Oa2CtvaKqywC8bs06M7+eGszMn7nTBqDOzPNpwcvLyyPb29vfAZh2Naq6Za0tpAbXarUzURS53eGKL1trv0oKZ+a3AHytqplMJlOOoui4tfaDvqOw1lZUtabubBOtqOqN0dHRB/v7++62XwHwDoB33dkAUGPmoO92e/yitXZeVT8BkE1acbdpPQiCj4hIBw52hQsLC8c6nc77AN4E8FK3yQ4R/Qzgc2b+Je0ZDPU+fjiZp1eXFD5U8CB7u+/DGybgXxnFMA3/m1GISGwegNMAeuYBuON53lKpVBrePBG5RkTuSPc1b2ZmZnDzRKRnHoDYvIODg3u5XM69/E8AKAO40G1aNcb0N6/ZbF5X1fsAbjpInXnGmETzGo3GRdew+0DPGmPSzRORTQA988bHx89NTk6mmtdoNGLziGjJ9/1085rN5l1VPWSeMSbVvLW1tXwYhoXp6en+5olIbB6A2Dzf9wcyb319/cju7m5hdnY22TwRic3zPO98qVQayLxWq3U0DMPYPGNMsnmrq6snx8bGNqempgYyT0SKzjoAsXnGmP7mNZvNU9lsdqtYLKaaJyJXABwyzxiTbp6IxOYRUd33/VTzNjY2RnZ2dnrmAdgyxqSbJyJnAMTmEdFl3/cTzROR2DzHk6qWiei4Maa/eSJScZY99FRXPM+7MTIy8iAMQ6/dbsfmEVHPPGPM4OaJiBtDqnmuqfuL4Pv+8Oa1Wq1jYRg+ZR6A2DxjzP/mPRupfwAf56Q4urCh6QAAAABJRU5ErkJggg==\",\"view/tab_panel.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAABICAYAAADyMAW8AAAAcUlEQVRYR+3WsQ3AMAhE0TCMeyTvP1tShRQo7lxYegxA8fUPLuac97VhwuKXKhTlFxRQ9GPDClawYvGEDwxIZu7pFRZXr4ACinY1ghWsYMX/NxWQr22edyvGGHt6hcV1NqGAon8QVrCCFYteISDnBuQB3xJuQcDkEngAAAAASUVORK5CYII=\",\"view/btn_close.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAqCAYAAACz+XvQAAACmUlEQVRIS7WWS0/bUBCFz7mJmyZxENm06mNVoVZC7LqGn9FNqy55/BSWSEhs2/4uuqFVoA150JLKJvGdaiIH2TfXNoKQpeP5PHPO3GMTK/5xxTwsAUWkBeBZ+qAByb/Zh4pIA8CL9NqY5Dj7vw9YA/ABwDsAfwB8ITnUIhF5CuATgNcAfgH4RnJSCkwLl6AA/lXBtLZQQxFxoTr6q6LOFl2WmuJAtcY7ZuXIixsczfRyTlPfhpSN7BpwBeBtFdQLFJE2gI8AXi7GBBBl3Fdnv5L87XbpWxuFfQbw3NXM0dQLLdrDIH3ylGTiLLYB8CS9lpCc3tmU+xzL1Z9lEXl/n06KavjowCiK1uM4fqMd1Ov1s3a7fZntZjabtSeTiQYHgiC4aLVavZwpbofT6TQYDAaH1tod3bMwDHc7nc5PLZrNZmG/3z8WkS1jzGm32z1oNBqjUqD+6YM2m81xFWyeNkUaulAAlyKyWdTZbdqUmZKFakEVrLRDV7P5zY6m3rQp6tA1AMC5tXY7he51Op0fdwbGcdwdDodHWc2MMdcL9wGM1tbW9sMw/L6UNm6HChuNRifW2g1XM0dTL3TJZS1KkkTDFbVaLQqCIJcm6k0URRpxuvg39Xo9rtzDh5zt1Z/lXq+32rR5dKC1dt0YM08bAGd65BxN1ZB52ojIBcl82rgdWmsDkocAdgDoW22X5DxtSIZJkhyT3AJwCuCAZD5tfCP7oMaYcRVs/tAiDT1QHX2zqLPbtCkzxYFqjXfM3GKXAR3NtC6nqTccioAeA84BbCuU5B4Af9r4gCLSBXCU1UxErjPuj0Rk3xiznDYuMIWdANhwNXM09UKXXNai9LtQ9y4yxuS/XUijr9L0lXBDMp82j370HhJdWvsftiHJYFPSIqEAAAAASUVORK5CYII=\",\"comp/combobox.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFsAAABCCAYAAAA476rKAAACfElEQVR4Xu3bMYsTURQF4PMmExgIWkgEU5hskyJYxGYKY5VS7NzCylL8Bftj3NbKQjuxTBWbaUwhKdIYLCJotlACA5m8kQTZZZkkeN9dbuNJOXPPu/DN5ZHkMa7dbpfgx0TAEdvEedeE2HbWxDa0JjaxLQUMe3HPJrahQECrNE3RarUOJheLBbIsq9znZAdgJ0mC4XCIer1eSa/Xa4xGI+R5TuwA272RTqeDfr9fuTeZTDCfz/dmONkK/cFggGazebnCcrnEeDw+uCKxFdiNRmO3nURRBO/9bvtYrVbEVpgejXa7XfR6PUynU8xms6O1nGzlU3DO7fbu7V5dlsf/0yO2ElsSJ7ZES1lLbCWgJE5siZaylthKQEmc2BItZS2xlYCSOLElWspaYisBJXFiS7SUtcRWAkrixJZoKWuJrQSUxIkt0VLWElsJKIkTW6L1t5an6wFooRGerofKBeZ4uh4IFxrj6XqoXECOp+sBaJoIT9c1esIsT9eFYFbl/J5tJc13agyliU1sWwHDbtyziW0oYNiKk22JfXJ6xnfXjcDdFttnb43a/b9tovQ5iG30/IltBL1tQ2xiGwoYtuJkE9tQILBV/ugl4rh2MF1sPJJP59fuc7IDsTe37mHz8Bki+MoKHhFqn9+j9vs7sQN9K7G89xRx837levHzG5Lph8p1TrZK3iF//ApxdLVI4YFk/BpA9Uc5sVXYwObOCfyDJ3AoUcIh+vIRtYuve1clthJ7G8/7p4hv30Xx6weSybuDKxL7BrARxcjTF0iyN4AviH0Tpto1ONlaQUGe2AIsbSmxtYKCPLEFWNpSYmsFBXliC7C0pZfY2oWY/zeBP8uaLni/AFTVAAAAAElFTkSuQmCC\",\"comp/textinput.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFsAAAAWCAYAAACv8OArAAAAZElEQVRYR+3UQQkAMAwEwcZI/LtsoSL2NTGwMByZ3b3HJQIDO3H+EdidNezQGjbsUiBs+dmwQ4EwZdmwQ4EwZdmwQ4EwZdmwQ4EwZdmwQ4EwZdmwQ4EwZdmwQ4EwZdmwQ4Ew9QBe0R29X9x+dwAAAABJRU5ErkJggg==\",\"comp/vscroll.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAhCAYAAAA/F0BXAAAAOklEQVRIS2N8+OzVf2YWFgYmJiYGcgHjqCEYQTcaJpipaTRMRsOEmDJmNJ2MppPRdEJMCIymE2JCCQAYonwDuu2VMAAAAABJRU5ErkJggg==\",\"comp/vscroll$down.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAzCAYAAABxCePHAAAC/klEQVRIS+2WS0wTURSG/zszBcrLFVvjio0LiAqRRDAmGpRodFE1MQQQkOKGqBujRo3ExLjB4MaKgDzUaGQhvoJGYwAjYoioERcuDGxYEIwPkBY6nWvObXuLnXZaSklYOIu5M/fxzZn/nvPPsInJKa5qGhRFQaIH+w8xSbcymtTd+gBFYXAdyjM9sf7ORxgGR0t5/j9jpkhq2t5B0xQwBrgqNsnJ9V0j4BzQdQNtNYXWkKz0NDiaXkBTFTCFoaWmCHVtQ+AGh+4z0HNiO2bmPNYQGiXQvkuPoaqqiIgi8Pl8eHBqtwlA86MKS6Cy8z1gjIFzjqcXHBEBlpBgRNuOd+HVlYqogJiQIChcg/BtW5k8SaSSkxPJ5PRPTttHfkI7kcghIpn8NYfp33NLXp+TnYG1OWvA3ox9499nPSjdkCsgHJxOIjc43VMrugL9dEUD4Oj/PA4CsUfDX/jOjbmisHTDCCzi4t4QgLDrQF+qTYOmqhgYGw9BvLpv0ZNjQwieaU9b7ZCDriFhSt3VBSZNartHA6aUJ7SK+jqO5n5pSp1HiqSw1e3Di0ypwBpiU1XsudwnTanraDEqrg2GmZLbGkJh2jQVZY29JlPqPe03JX/uxLE7Nk3DjjP3pCn1Ne7HrNsjdYoLQsmWYtNQ3NCBgeZKzLrn/foEoogbQgvSUmz4454P7VQikGhpHzGSZdVOUqqYTGli6gemZ9yJ+0lSTalk/TrxtQOYaBnESbTinokev4UG+p+9/xoyJQKQn8x7vf7JjEFZ1FJBBvuC12RINIdAwtkIQuksnxgHhKBUZ6scQtLSNyiWJpav47z9STjbjfJ8k5iVN0eEs911bhZjUTWpbR+RztZ6uFBERNCq1rfS2e43lFhDsjPscDS9lM7W4dyCquuvpbM9PFkq0iHm7mSl2yP+bj05uxdeXZe5FHOL6Xdr17nQ79bziwew4NXFqwUTMiaEtKBPwtZjnRi8WgXPglfqsyQITc60pwpAeNpH1GRZtRM0pWVVcTJM6S+dYaRsIf025wAAAABJRU5ErkJggg==\",\"comp/vscroll$bar.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAA/CAYAAAAGyyO8AAABYElEQVRYR+2Wv0sDMRTH30tarCg6dRWnQnFT6OiqoP+tk+Cig+AiHayDiNSlg+jgD47K1US+Lwm5s4o/mkElN1xy73KfcF/efTi+Ht3Y0X1Btw8FffdoLy3QSnuZ+HhwZe+exrS13hGGJYsTWSszN0rJ1zHDDbJ0eDYkgHjv5Nxub3TIGEsTY/xDVq6NAN7MfW2u2aCG1nQ0GEZIOXmp7Pw5BPDF+VaGIGQfbM6k0ng5kw8/wF/eJzP5JInZkjg2CSS8zk6vCys7Wb8r5qqsncAP+pdR1Lu9rvgVT4uYg+3F+PCtAzjzu/taKdKKBSS2/wkEMBg/Q+rB50zqzZb7ZPoD/GeZ1HySxGxJHJsEEl5nc22VmCFalpFJTjLKNUtFxlDfP72IogYAP8PPZekWM5OqjErFWpjjbxprABJRA/JYjOOOX4Bgo6bWGYKsfMg5k+lmy5n8uUxm8kkSs6Vw7Cstibc9Fv5vWQAAAABJRU5ErkJggg==\",\"comp/vscroll$up.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAzCAYAAABxCePHAAADF0lEQVRIS92WTUhUURTHz31vPv0KKmkXrtxUGNomkCANLdCUpEatJFuIClIEFRl9kGH0BYWQElLpotGKEJXAtKQooYUFpi1axLQZMCyyZJqv926cM2/uTM288emoUHfx3v16v3fuuef+72Hume/c7/cBAwaLKWaLBZjLPc0Zk0CSJGBs4SDOObDP7i9ckuXkIbLJRJDFFrJk2SGNvZNwy7ExoZEJLWnqfQ+4SlUFaHNs0gXpQhq6x0GWGe0Y7oCicGivyYsLigup7XgFJlkCJjFwNm2HqrZR4CqHoKLC3fr8GFAMpPLqEJhMoZjpay6Bnx4vpKfYoLx1kCwKBlXoOV78BygGsudCH1nwtNVBgHBBUFFzL1n0+Gx5YghOxhINiAbFG1uZODESxf+bJShKrulv8HUusp1G/IBz1qTZIGvdamBjU584Aopzs+lbDhwfFFgc2/imLq0fazgAHF5MumBtuh3YwJsPfGdeNqgY1qqqfcSprRLgr7rWZzWbwCTL8HLKFYEEgkrUn+eHIDzNbltBSG33O+jcnxNZmrYcw5Yc7hoXotRenRPyz0IgBzrGYkTp9qEtxiEV10eEKD08Wgh7bzwTonSvIV/soK5jd53rE6I0eGY3/PL5wWYxQ+nFgShRKqK6LqTwhJNEafRKNQHCcWK3WmDHqR5NlMoSQzAWUV+9vkBMsKXYLCSbs3Oe+SGqqupGrIL3h3YclifYkjo7yZ7izIzUUGrhnvXAzA+PURkR8xCwPnMVsCUVpW0bsiCUKOH9S0980JvaLJSQUTal9Q+9/RgRJQSgnvgCgdBkxkCKektSpC9cR0HCOQgiZUMI3njijwYg+COzLP9rkLr7E3Dn4Gbhp7BPDC+n0TkhlK2zJpccuSBIfVdsutVdt9U4pLbjtVC2B0cKYN/N50LZHh0rFGGguztV14aFsvWfLiVhSrVboaSlXyjbk/NlBNKFVLT0k7INX3KAx+sXfkBlKzjpJItGLlcmhmSkptAB83h9MTuCICxBRUkMwUmY5+uFPY7LmJ7GW05SZycsSos9xUsmSr8BfgGeWI6+BgEAAAAASUVORK5CYII=\",\"comp/button.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAABFCAYAAAAPWmvdAAABA0lEQVR4Xu3ZMRGDUBRFwXwfKSgxFhfRgAbUxEakkCEO3qmX+p9m5w7NW9v7cz18I4EFbeT1fwxtbgYtmEGDVgRC458GLQiExNKgBYGQWBq0IBASS4MWBEJiadCCQEgsDVoQCImlQQsCIbE0aEEgJJZW0Pbj64Q3hFvQhmL3CQ8atLlAKCwNWhAIiaVBCwIhsTRoQSAklgYtCITE0qAFgZBYGrQgEBJLgxYEQmJp0IJASCwNWhAIiaUVtOfrdMIbwi1oQ7H7hAcN2lwgFJYGLQiExNKgBYGQWBq0IBASS4MWBEJiadCCQEgsDVoQCImlQQsCIbE0aEEgJJYGLQiExNIC2g/MxaMp6CSauwAAAABJRU5ErkJggg==\",\"view/bg_tool.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAMklEQVRYR+3QQREAAAjDMCYG/DsEGXxSBb2ke7YeiwECBAgQIECAAAECBAgQIEDgW+AAAeIuAVS/mngAAAAASUVORK5CYII=\",\"comp/minBtn.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAA8CAYAAAB1odqiAAAArUlEQVRYR+3X0QmAMAwE0GQN19B9nM193CmiIH7ZXOAoRc/fpjl8jVDdOj/eOc8USBcXqUjLAtDQRMSOdHb3JatTYCZUXodIy10bGxTI1Lx6/YA0Ima6W2tKFcjmdpGKtCow7NBAdxozy+804Gfx/cDqbLzWDzs0ekNY4B9nOMEehMKTVIEEyKeFSKmc18+MppRtipJuYPCa1SkwEyqvo6Tlxm8bFEijvBt9n/QA/fOPydLHcUIAAAAASUVORK5CYII=\",\"view/zoom_out.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAoCAYAAAD6xArmAAACy0lEQVRIS92WQU8TQRTH/28oQkj0CL0QOMAJQkz4DkS6A+GA+A00Hrhj0uy8NiTwEdBPAOrB0Fnq3U8g6gkOSjxUjpCQCu08M5u2qaVAt7YmOqfNZPa3b9/+Z35L6NOgPnHx98Gbm5sTlUplA0AGQBpACcBBKpXazmaz3+5607YVM/MjEXlNRPdbASJyTkRrzPz+Nvg1MDNPAvgI4AGA10qpvHPuSCk17ZwLAazV4HPM/PUmeDvwSwBPAbxl5sf+RmYWZo7XMvOehwPYYebnScAnAMaVUrNhGH5pBefz+Rnn3GcAJ8w8kQT8E8A9AEMA/HXrqM9fMrO/bjvataJvFdd7/IaZfS9/67ExZpeIngB4xczPklQ8KSKHPmoispdKpXKjo6PHp6enU5VKxXhoV6moVXhnjpVS5wDOwjD81K7qG7e033lXV1cviMjvvDEAP0TkYHBwcKtarT4UkXcALolo1RhTaIV3dVYYY9aIyOfZDw9fMcYUm+FdgWvtYgCmBisrpRbCMPxQh3cNbgM3zJzvCdhDcrncuojMA8gy8/eegTvO8U0Lk87/UY9ve9h/BI6iyJ+1GyLScB4RHQDYDoKgO+dFURSfFQCuOQ9A7LwgCJI5r1gsTlar1YbznHP5crl8NDw8PK2Uip3n4QMDA3OLi4udO89a23Ce1jp2nrVWtNbxh7bWxs4jop0gCDp3XhRFJyIy7pybXV5ejp3XDN7f359RSsXO01p37jxrbey8i4uLoZGRkWvOa5q/1Fp37rx+VtxwntY6dl5zK6Io2hWR2Hla686dV0vFoY+aP8xFJJdOp49LpdIUEZkaNHkqfIWd5JiIzkXkLAiCZM7zO09EYueJyBgRxc4joi0ADeeJyOrS0lJvnBdFkf8xbDhPKbWSyWR647xCocC+53XnAVjQWvfGeS1wo7XunfOstesA5pVS2Uwm8w877xeHf444cscwYAAAAABJRU5ErkJggg==\",\"view/refresh2.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAA/CAYAAAAPIIPGAAAEIElEQVRYR+2XTUhjVxTH/+fGpBrGT/xoBQdFFMMQLNLNbLooLbaFzqKMUhCSZwsuhGG6KCNd6DuRLgqzmGVxUd8LUrpoYWZTKO1yNi2F1oVtceEHflSLqNEav8bklPuqgsl75sUPSsucTQj33v895+R/7y+XcA1B16CJ/6GoYRiDItKfzWZjExMTv5/XtoLlx2Kxm0qp1wH0AHgTwC4RfWRZ1mdewp6ig4ODN9Lp9CMieh+AchH41Lbtj92EXUUHBgaCh4eH3wJ4zSObGSLqtSzrZ9+ihmF8CODR8YIflFL3MplMNxF9IiJWIBC4Pz4+/ldR5RuG8QuAlwGsAWi3bTsVj8dvAWhOJpPfFPK2a/mGYewDeAHAV7Zt9+aK9PX1VYRCoVcApNxa4CX6J4B6AE9t2341V9QwjO8AvAFg27btytxxL9EvAbynJxNRj2VZX58sjMfjd4joyT9D9NiyrHf9iup+/gggBCALQPfxVwARAO8cWywD4LZt2z/5EtWT+vv774rIBIBSlx/mmT5dyWTyC9+WOpkYi8XalVIPRKQbwItEpHv9PRE9tCzrt6IsVcgyhcYLnv1CAkWXfxFBxzEXXXipq+8imz7P9CJdO3+N754y86A+vYFAIDY8PHw58DHzTQB54DNNs3jwMfONY6R4go+Z/YNvbGwsuLKyci74APQys3/wMfMZ8InIPaVUt4g44AuHw/eHhoaKAx8znwEfM6dGR0dviUizaZoXA59pmvtE5ICPmfPAx8wVABzwubXA1VLM7IBPRJ4mEok88DHzKfiY2R/4mPkUfCLSk0gkTsHHzHdE5Immnog8TiQS/sDHzK7gE5EIEZ2CTyl1e2RkxD/4TNO8S0Su4BORZ0qpftM0iwefaZrtAB4QkQM+AA74ADxk5ufgc78CfV99xdy61yMajUbfAvA5gJeKycZj7gqADygajf5xRYIn+6xoUbmCDM9I/LuidXV1qK2txdzcHPb39ZPAOwpmGgqFUFFRgerqauczm81iaWkJa2v64eLhU6+eKqXQ1NTkZOcWq6urWF5edh1zzZSI0NbWhvLyctdFBwcHmJ2dxe7urn/R+vp6J0sd6XQaCwsLqKysRGNjI9bX17G4uIhMRr8jiig/EokgHA7j6OgIU1NTjkBZWRl0f7e2tgo60LX8rq4u/UjC5uamU2ZuBAIBZ1O9mVsLXEU7OztRUlKCnZ0dTE9P54nqfmsnaNHJycm8cVfRlpYW1NTUOJN1pjrjk6iqqkJra6vzNZVKYWZmxp+oLq2jo8NpgQ7dx729PZSWlkKL6hARpwr9Q+aGp/m12Zubm6H9mhtacH5+HhsbG/4tdTJTZ9bQ0OD0LxgMOm7Y3t6GNv55R7XgMS3oH5cJ/y3Rq775V3X5bx8zSv8DuWzoa2vgb5tumbHGlerDAAAAAElFTkSuQmCC\",\"view/settings2.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAA/CAYAAAAPIIPGAAAD2ElEQVRYR+1Xz08bRxT+ZjAGYQoH4rS9IBJBQJEsUC8VKNdQtamUE0fLayqhKHeOaGbFkT8gFVLZtXzk1qqKSs4NUg8RXCIQVoOQ2jRFHHCwBRj2VW+zttY/14BXVaPOyR7NfPN9771536xACEOEgImPDHRhYaHv/Pz8kEMVjUbjq6urxVZhayo/lUo9chzndTabfWMYxkMAGx7QrG3bL5LJ5B0p5f1MJvNz7QENQdPp9LdE9CMAZrcHYAaoxJ8AvARwD8AtAI9t2/7JD9wQdH5+/q7jOLzx04DqeCelnFlbW/s9EJQXGIbxq8eQ//4mhPieiJjlEwBf8qQQYtOyLFZRNeqYJpPJWCQSeUBEzz3JrwqFwvT6+vo575ybm4vGYrFNAF8AICnlbKlU2sxms4Uych2oYRh5AJ9UFggxb1mW5aeSTqfTRLTmm3tv2/bAVUCfWpb1zA9qGAaHwD/XGjQU+WVGHU0Ug4ZSUjXFnwMwXVP8nP1RAPG2i5/Z+q9pKpWaFUL8wvNE9FUmk9m48jWtLWavofztNZTb124oN2neH1mTvmoo/pcfHDGtdZ9nLbw4rrW+nvGZpvlISvl6aWnpjWmaD4nINT4hxKxS6sXy8vIdx3HuK6XaMz6ttWt8QohDInKNTwjhJtWzlJdCiHtEdEtK+VgpFWx8Wuu7RMQbWxofEb0TQsxordszPq11Q+MjoidCCNf4AGxqrYONb2VlJVYsFh84jvPck/yKW5/W2jU+rXWUwdj4OBQcYzbCxcXF5sanlMoLIaqMTylVZXymaVYZHxG9N02zufE1AH2qlKoyPqUUh6AyFwgaivzyVehoorxkdL6k/MUPIEdE0/7i5zcUGx8Rxdsufmbrv6ZKqSrjM01z48rXtLbFeA3FNT4At6/dUIJ7V/MV/6HOn0gkvgbwA4DPbyLZ2/sWwHcikUj82SHAMqe3DMrv+I6Ofw9USonJyUlXzfb2NhzHaamsKdPBwUGcnp7i7OwMAwMDGBsbc4H29vaQz+fR09OD3t5eHB8f1x3QEJQBR0dHcXFx4QL39/dXbTw5OXEBI5EIcrlcHXBDUGYxPj6O7u7uljJLpRJ2d3ddNf7RVD6DlhkWCgUcHrof0YjH44jFYu5vnt/Z2QmWz0lhsHIMi8Wiu/HDF6T7mMDExAT6+vjR8iHGHA5/8uqYTk1Noaurq3L6/v4+jo6OqtgMDQ1hZGSkMnd5eYmtra3K/0DQg4ODivTyLg7B8PBw+6ChyC8f39FEMWgoJRVK8TPbjl/T2mruWEO5SYMNo/P/xaDfeB712U3YeXv/ALDwD+TbY8Dbd9BBAAAAAElFTkSuQmCC\",\"view/setting.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAkCAYAAAC9itu8AAACAklEQVQ4T5XUS4iOcRTH8c9xCeVeiiiXhSJRJFIusRO2lEtZKFlgY6GxZDUrk2TFwii22JJLlERRLKRQJmXBkHIb8+hM/2d6ememed93957n93v+55zf9/mHll9VVTNxopTPR8T3piTyT1VVs7AL9zEd+4roOn5gK25HxLfacAjL8A8TWw6ta28jorc2LMLhIu7Ds2Jah4XlRVci4mNUVTUDadiLFF/G5GL4iyOYjxsYMnQ1BDfxujk0VmJPecFAO4bV2Nk05Bqzz3Za6ut86JJDx2vN4Hbj3hjBbcOt4eCaQZXUj5daT4pGoNFimI1zpdYVEf2jsTQX+5MX5NaOFdFFJHzJ2bWI+FJv6SRWYACTWliqa68ioqc2LMWpwtJ7PCymzVhSWOqOiHeZdPachqNIcXdBJV/2B6cLa5cwZLjQYOkqnuNsOeEM1uJgE43xDBsaH9QQfJ21VNBoHfpBaWHLiKGLoeO1ZnAHkpcxgkvOeoeDa0FjTnNLEfF1PJamYkcR3YmIX6OxNA35Kb7BFKwvoqf4jeV4GRE/azQ2Yh4GMaGFpbr2OSKe1Ibse1MRJ84fimkxMqc0Pc55MrjsOYvZRoofNW6/vPUSwEQ+2+tPQ14h9fX4Ap+aQ2MB1pQTB9sx5K24qmnorKWCRvtDF0PHa+0suBaW0ry91O5mus3n/wHmQwUTIH+tVgAAAABJRU5ErkJggg==\",\"view/refresh.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAkCAYAAAC9itu8AAACiElEQVQ4T4WVS4iPYRTGf4/7/X6XcivXcktEUhTKQkqyYCOKjWyUhezFThbIlJ3LYrIRkoWGUhhhTMko4zJujYRpxgxHj9737/P3zfh239c57/uc5/zO+UQ3T0QsBRYCtZI+5jBVx0fEcGA6MA+YCXQCVyXddWwlISL6ARuARcXvhQPrJF3/nRARvYHtwLRuFLYCFyW15ITl6XTHvwIuJzlrgHrgiqSOiqSI2ANMAL4BxyW1R8RYYKSkp8Vb8w2HgD7AE0kXSozoD0wC2nPCAWAw0CyppiRhBzAD6MgJW4D5KdDFNeSkiJgFbEvONeYE698N2K0ArPsDMAZwguN+AmeKfZgLbAb6llj7A7gk6eFfnY6I0cDKpNc1tQFNwG1JvvFPp0sKXQ2sAGokveuJpVHAHGBJ4ul76vLNapbs9dYk6R8oU7driyztA2Z3w5L1n5LUnBPWptMd/xw4l+RscsHAeeNSZMloTAG+AIcltUXERPdB0qMylk4klu5LOlni2ABgqm3Oko4BQ4Fnko6WJOxPzlXg2wV4hv2czuOYhmsBsDf1rD7fYP0HkyyzZN0twHjACZmlI0WWFgM7e2DprKQ71SyNA9YDBnFYcq0RuOZ5/h9LdsVS6yV97YmlgYDn2X3wjUa7QdKLapY8015ePrWMJVtembhewLI0YWU4eZvck/Q525pXo4M/AY+TLMP40u+SuooseVjsitm/IakzItz5QcXhKSZsBCyrpdjlwuZwfSO8mLOkdYAHqFXSrRKWvErtXFdOcJcnp0AX96ZwuldQ5uxtTrD+VUmWWXqfujwk8eQ4f68rsuRG+d/gZVb9eIk9kPS6miXvIv91rNc12TXPc5MkTyO/AFhJCujHqZlCAAAAAElFTkSuQmCC\",\"comp/checkbox.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAqCAYAAACDdWrxAAABbUlEQVRIS+2TP0gCURzHv88GRYsrExyOo5cEQVEtWdQQpE4N0R+HxmirXXCrKYigqMF2IRqCQByaLJqNIFpyUIzu4rIwpExODy88ITD/cJ603Rsf7/OGz+/zI5TSEAE20cZRgBMySKni8XrbwICrWAwG2ESZIadFS53J0R25brCyHZNud1vbcRuPV7fDAOu9GXJatNSZHN2R6wb/PfJCrxOZCR8Gbk6hWc6Xg8PrcgBETMIVPdIGSjYG/NoOSHcfkLqDK3qsBSRIrgRAuBF1quUPEUPhYGMwb2dhywrqQ3F0Dt++jSokJMBdhmDO52pB2WwFP7OK8rgH9os99IgppNf3QWwMFP4RNHKALrmoflIj53l6CaWpRcBkgiIkYHl6gDTrh5JJg57v/kJ1YOUixw7jfWELxMpAKUmAXAR7tg3LZ7am3IbjKDBOvPiDqkUmcoj+9H1d7k3nmHdweBubB70ON9wRzQH8pVVQb+Q/zZAEfpwDCU4AAAAASUVORK5CYII=\",\"comp/btn_close.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAA8CAYAAAB1odqiAAAE6UlEQVRYR+3Y30+bVRgH8G/T0t/0Jy0USrIsC0E2GMKAVYcRpmSbEzIGZhqyxCxeceGVF3pjvJl/wYyJWZYY4hZBFnBuBBUW2ewYAxlsSMiyLKH8aEt/0vZtSxvM+562We15C6jlxr53zfO8z+ec5z2nOTmCk598tY19fAQs+Hlvz76QX1zpAwd+1NMNXzieU1QtFeKbvn4CXvqgC95wLKegRirC1e8GCPjh+53wMnRwedkG54aLG4yhSI/ycnPawHaKJ5M1MhGuXR8k4MX3OnjBx3NPcLX3DPfepSu3odfrYC4r5X7bVlbhcrnT4kdrjlA7xYLffj9EwJ6udnhCW9TEJ08XUgWTqE6n5XLdbk9G7MjhKmodrbwAfQPDBLxw7h1ecH3dDq/Xm1GYrZqceXIgGo0GJSXFvOCNmz8RsLv9NNyhKO+icTqc8Pl8acDLyWyr1Wo1DEYDbw2dXIz+4TsE7DzbBneQH2SruDZc8Pv9GSiLqVQq6Iv0WVe5TiHG4K1RAnaceguuYCTrCx63G4FAgAoqlUpodbqs7+sVEgyN/ELAs20t2Ajwgz6vF6FgMGtL5QoF1BoNL1qklODW6DgBT518gxcM+P1gQqFdLRqZXA6lSkVFWXDk198I2NZyAs7NMDXR7XRmYBKZjMuNMEzmljHQF46hUIrR8XsEbG228IJ+T/rGFkskkMoVHBgOBRGNRNI2vkpL/5YsODZhJeCbJ47D4WeoM4wyDLai5PsWiCUQJ2aXTN4pnswzqmS4e+8BAZstDbxg1qW3hyALTlinCPh6Uz1C0Rg2w/S/tz3UpaYWSgsgF4twf3IagvOXr297PR5YGuv+bd2s71sfzkCj1ULQe+3u9vraGlg0lw+LlZhMEIzUNu7vmYYFmz/9LJeTS9We+PIymaGl6wLizo2cokJDEawDNxLg+W7EHTkGjUWw/tBPwOMdnYg7nNQZep4/Q2B9jYspS0zQHjyUlrdTPJksNBrwYGiQgE3vtiNup4O2SSuOzk5y7z2ubYKyuBiaAwe5394XzxGw29Pi5iYLdeDCYgMmfxxOgKfPIG53UBNt049SBVNo4g864HRmxMz1x3hAIybv3CZg49ttiK/bqYneFRuCLldGYTY5OfPkQBR6PTRl6cfIVEtLivHw51ECNrS2Ir62zrtKfWtrCHo8acDLyWyrFVot1CYTbw2hqQRTY2MJsLk5K8hW8TkcCPp8GSiHqdVQG41ZtxUHTkwQ8NhrFsRXyUrke3wuF0L+TSooVxVCrc9+iBKWmvDodysB65saEFtZ5cX8Hi+YQDBrS2VKBVRa/jONqKwU05NTBKyrexWxlRUquOnfBBNidrVoZHIZClWF1DqisjLMzPxBwNraasRsdHDD6c7ApDIJVzTMRDJiRQb6EUNkLsPs7DwBa6qrELPZqCNzu/1pG1siEUOhkHK5wWAYkUg0La7T0U9tIrMZc/MLBKw+XImtZTrIMBFEouQkIBEXQJaYXXJ0O8WTeQXlZsw/XSRg1SsVvGDWpbuHIAsu/LlEwMrKCsQDAcQ93j2U2H2qUKuBUKnE4uISBF9f/Hj7wJwVhyordl/hH2Q+W1zCixoLOdNUj98Ei+byYbH5lnPkmJhL6O+18/c0/1m38/c0qVbm72nYVuTvadgu5O9pUtsif0+Tv6dhF8P/657mLz4NfQVdLmZiAAAAAElFTkSuQmCC\",\"comp/textarea.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFsAAAAXCAYAAABkrDOOAAAA4klEQVRoQ+3ZvQrCMBiF4e9rU+sPOErRqxDRe/KG9Fp0EAc3VzuIg1ML4uDmlkaaquDenMUTyJoDD+8W3ZyKlaoshSeogHOy1m1euOmoI1EU+auqQUf/8XHnnBzLp3jsWdaVJEnEGEPsADXU2Ifro8Gej/uSpqnHruvmaVegqirZX+4N9mIy8Nh13XEct7vE18RaK7vzjdiIFoiNUH5vEJvYQAHgFMsmNlAAOMWyiQ0UAE6xbGIDBYBTLJvYQAHgFMsmNlAAOMWyiQ0UAE79lM2fmrDy358a/q6Hhf68ng175QueKdEXxUGVVwAAAABJRU5ErkJggg==\",\"view/re.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAoCAYAAAD6xArmAAACpklEQVRIS+WWPUgcQRiG3+8O70QEUwTB1EJgsTGdRRrhOMjOtEtSRbBIBMFKuCtkZleES2uRQoWQJggKKW7Of7GyTRvBLkVShhS73OXMfWGOU85Es7uXs0m2XeZh+OZ95xnCHX10R1ykBvu+P5fP59+VSqVvf9pUarBS6jWAR0Q0rbWOboP3BCaiOQAHAKTW+vtN8L8BW96W4zjPPM/78Ss8FlypVEYajYbHzALAJIAHALJdoDWl1Esi4m74rWBmpiAI5pk5AHAvJj0VrXU5Fmyhvu+/AfA8YRxfaa1LsWDf92eZeSMJlJnXtdYvEo1Ca30G4GEH/ImI1lqt1nE+nz9vNBrLnVTY39uO4zxNdHgrKytjzWbzs13FzKfDw8PFxcXF8HL3Nscd8BEAN3HcgiCYbLVaHyyIiGaUUm+7R9JzQZRSo0T0BUCGmRd831/tBttK53K5zXK5/DV1pZVSG0Q0C2BXa/0kySEmKojWeoiZD4hoKpvNTiwtLX1MC7+1IFrrQWZeJaJxx3EKN5186lF0LwiC4DEz31dKvU+z69i7Ig0stnm9wv4zsDGm7bxCodBf5xlj2s5j5mkpZf+c1wHPEdFBGIbS87z+OO8S3EnAVhRFvTnv8PBwpF6ve0QkiGiSmX9znuu66ZxXq9XmAcQ6j5krUspkzqvVaqmcJ4SId54xxl6ZiZwHYN113WTOq1arZ0R05TwAa5lM5rher5/ncrllAPYl1HZeFEXJnLe3tzd2cXHRdh6A04GBgWKxWLxyXlcqjqIochPHbWdn58p5AGaEENec13NB9vf3R5vNZtt5RLTguu4159lKA9gUQqR3njHGHpx9tOxKKfvnvGq1OmQrC2AKwIQQon/OOzk5GQzD0I5hPIqi/jvPGNN2npTyH3feTzoJOzgswwlqAAAAAElFTkSuQmCC\",\"view/search.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAqCAYAAABcOxDuAAABX0lEQVRIS+3VsUrEQBAG4H9HiDZiJQg+gJVaiKAoWClYXWeZ7D6CtbWFr5Ai2ayQxkLQRgsLGwtBUQsRC6sDCxHxEIvIZSRwxRGSu83pNUe23c0H+89kR2AISwzBxAiinuctCSH2AawD+AFwRkR7QRC85CO0ur5SaoOZzwGM54A3IlrJw1aolPIewEJJUY+01jvde31RKeUMgNceXdLSWk9VQl3XnSWiZhnKzF9RFE1WQrPDUsonAHNFsBDiJAzDRmXUdd1tIjoFMJaDW0KI1TAMH61RpdQ0Mx8z8zMzHxLRAYBlAG0Al2ma7hpjHqxbqgNeAJgHcKW1XutEMeE4Ttv3/axXC1dh9XPgbZqmW8aYd9t3ohCVUt4BWARwkyTJZhzHH7Zgdq4MvQbw7ThOw/f9zypgKVoVsS7UX+C+v+kgeI0Oklrvb0Yw03rwlZW8Hnz14OvqjXrw1e/pPyfwCww91CttlMG7AAAAAElFTkSuQmCC\",\"view/save.png\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAoCAYAAAD6xArmAAAA1klEQVRIS+2VzQ3DIAyFwxwdoMMAA/VQ8ZByyEBhmA7QOVxxKLIaOcIoSZUfrlifHw/wM91Ky6zE7SZgANTaDEDhzYJ5odSMC7nA5U7+b4X2dVQr3ic4hHCTlMcY33xPZUUGcwBvdEJwjcfGGIQQ4rd2qenWA3hyAUuABwCP31NtN+i1v02qP4DicRybM885J2ceB/NCyUupfuLxBS4WbmKF9rNUv4p9gq21d0l5SunF91RWZDAH8EYnBNd4nDPPWitnXst0I6Leez+feVowEQ3e+wNk3ge7C/Qp3GfwkgAAAABJRU5ErkJggg==\"};},'base64',function(){return this.base64=new Base64Atlas(Base64AtlasManager.dataO);}\n\t]);\n\treturn Base64AtlasManager;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.DebugPanel\nvar DebugPanel=(function(){\n\tfunction DebugPanel(){\n\t\tthis.tShowObj=null;\n\t\tthis.preValueO={};\n\t\tthis.div=null;\n\t\tthis.debug_view=null;\n\t\tthis.height=300;\n\t\tthis.clickedHandler=null;\n\t\tthis.fromMe=false;\n\t\tthis._treeDataList=null;\n\t\tthis._init();\n\t}\n\n\t__class(DebugPanel,'laya.debug.DebugPanel');\n\tvar __proto=DebugPanel.prototype;\n\t__proto.removeNoDisplayKeys=function(arr){\n\t\tvar i=0;\n\t\tfor (i=arr.length-1;i >=0;i--){\n\t\t\tif (DebugPanel.noDisplayKeys[arr[i]]){\n\t\t\t\tarr.splice(i,1);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.updateShowKeys=function(){\n\t\tDebugPanel.tObjKeys.length=0;\n\t\tif (!this.tShowObj)\n\t\t\treturn;\n\t\tDebugPanel.tObjKeys=ClassTool.getObjectDisplayAbleKeys(this.tShowObj,DebugPanel.tObjKeys);\n\t\tif (this.tShowObj==Laya.stage){\n\t\t\tthis.removeNoDisplayKeys(DebugPanel.tObjKeys);\n\t\t}\n\t\tDebugPanel.tObjKeys.sort(MathUtil.sortSmallFirst);\n\t}\n\n\t__proto._init=function(){\n\t\tvar _$this=this;\n\t\tthis.div=Browser.document.createElement('div');\n\t\tBrowser.document.body.appendChild(this.div);\n\t\tthis.clickedHandler=new Handler(this,this.onClickSelected);\n\t\tthis.debug_view=Browser.window.layaair_debug_view;\n\t\tthis.debug_view.initLayaAirDebugView(this.div);\n\t\tthis.debug_view.tree.attachEvent(\"onSelect\",function(id){\n\t\t\tvar dataO;\n\t\t\tdataO=_$this.getDataByID(id,_$this._treeDataList[0]);\n\t\t\tif (dataO.target){\n\t\t\t\tDebugTool.showDisBound(dataO.target);\n\t\t\t\t_$this.showTargetInfo(dataO.target);\n\t\t\t}\n\t\t});\n\t\tthis.debug_view.setValueChangeHandler(function(data,new_value){\n\t\t\t_$this.onValueChange(data,new_value);\n\t\t});\n\t\tthis.debug_view.onRefresh(function(){\n\t\t\tDebugPanel.I.setRoot(Laya.stage);\n\t\t});\n\t\tthis.debug_view.onInspectElement(function(){\n\t\t\tClickSelectTool.I.beginClickSelect(_$this.clickedHandler);\n\t\t});\n\t\tthis.debug_view.onLogInfo(function(){\n\t\t\tconsole.log(_$this.tShowObj);\n\t\t});\n\t\tthis.debug_view.onPrintEnabledNodeChain(function(){\n\t\t\tDebugTool.traceDisMouseEnable(_$this.tShowObj);\n\t\t});\n\t\tthis.debug_view.onPrintSizeChain(function(){\n\t\t\tDebugTool.traceDisSizeChain(_$this.tShowObj);\n\t\t});\n\t\tthis.debug_view.onToggleVisibility(function(selectd){\n\t\t\tif (_$this.tShowObj){\n\t\t\t\t_$this.tShowObj.visible=_$this.debug_view.getVisibility();\n\t\t\t}\n\t\t});\n\t\tthis.debug_view.onToggleDebugBorder(function(selectd){\n\t\t\tif (!_$this.tShowObj)\n\t\t\t\treturn;\n\t\t\tSpriteRenderHook.showDisplayBorder(_$this.tShowObj,_$this.debug_view.getShowDebugBorder());\n\t\t});\n\t\tthis.debug_view.onToggleShowCurrentCache(function(selectd){\n\t\t\tCacheAnalyser.showRecacheSprite=_$this.debug_view.getShowCurrentCache();\n\t\t});\n\t\tthis.debug_view.onToggleShowAllCache(function(selectd){\n\t\t\tCacheAnalyser.showCacheSprite=_$this.debug_view.getShowAllCache();\n\t\t});\n\t\tthis.debug_view.onToggleShowAtlas(function(selectd){\n\t\t\tconsole.log(\"toggle show atlas:\",_$this.debug_view.getShowAtlas());\n\t\t\tif (_$this.debug_view.getShowAtlas()){\n\t\t\t\tAtlasTools.getInstance().start();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tAtlasTools.getInstance().end();\n\t\t\t}\n\t\t});\n\t\tJSTools.showToBody(this.div,0,0);\n\t\tLaya.stage.on(/*laya.events.Event.RESIZE*/\"resize\",this,this.adptPos);\n\t\tthis.adptPos();\n\t}\n\n\t__proto.onClickSelected=function(target){\n\t\tvar dataO;\n\t\tif (!this._treeDataList)\n\t\t\treturn;\n\t\tthis.debug_view.tree.selectItem(IDTools.getObjID(target));\n\t\tthis.debug_view.bounceUpInspectButton();\n\t}\n\n\t__proto.updateLoop=function(){\n\t\tif (this.tShowObj){\n\t\t\tthis.showTargetInfo(this.tShowObj);\n\t\t}\n\t}\n\n\t__proto.onSelectItem=function(obj){\n\t\tvar tTarget;\n\t\ttTarget=obj.target;\n\t\tthis.showTargetInfo(tTarget);\n\t}\n\n\t__proto.onValueChange=function(obj,newValue){\n\t\tif (obj[\"type\"]==\"number\"){\n\t\t\tnewValue=DebugPanel.mParseFloat(newValue);\n\t\t}\n\t\tif (obj[\"type\"]==\"boolean\"){\n\t\t\tnewValue=newValue.toString()==\"true\";\n\t\t}\n\t\tif (this.tShowObj){\n\t\t\tvar key;\n\t\t\tkey=obj[\"key\"];\n\t\t\tthis.preValueO[key]=this.tShowObj[key]=newValue;\n\t\t}\n\t}\n\n\t__proto.showTargetInfo=function(tTarget){\n\t\tif (!tTarget)\n\t\t\treturn;\n\t\tthis.debug_view.setVisibility(tTarget.visible);\n\t\tthis.debug_view.setShowDebugBorder(SpriteRenderHook.isDisplayShowBorder(tTarget));\n\t\tvar i=0,len=0;\n\t\tlen=DebugPanel.tObjKeys.length;\n\t\tvar key;\n\t\tif (this.tShowObj==tTarget){\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\tkey=DebugPanel.tObjKeys[i];\n\t\t\t\tif (this.preValueO[key] !=tTarget[key]){\n\t\t\t\t\tthis.debug_view.changeValueByLabel(key,tTarget[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.tShowObj=tTarget;\n\t\t\tthis.updateShowKeys();\n\t\t\tvar dataList;\n\t\t\tdataList=DebugPanel.getObjectData(tTarget);\n\t\t\tthis.debug_view.setContents(dataList);\n\t\t}\n\t\tfor (i=0;i < len;i++){\n\t\t\tkey=DebugPanel.tObjKeys[i];\n\t\t\tthis.preValueO[key]=tTarget[key];\n\t\t}\n\t}\n\n\t__proto.adptPos=function(){\n\t\tif (this.fromMe)return;\n\t\tthis.fromMe=true;\n\t\tJSTools.setPos(this.div,0,Browser.clientHeight-this.height);\n\t\tthis.debug_view.resize(Browser.clientWidth,this.height);\n\t\tif (!DebugPanel.overlay){\n\t\t\tLaya.stage.setScreenSize(Browser.clientWidth *Browser.pixelRatio,(Browser.clientHeight-this.height)*Browser.pixelRatio);\n\t\t}\n\t\tthis.fromMe=false;\n\t}\n\n\t__proto.setRoot=function(sprite){\n\t\tvar mtreeo;\n\t\tmtreeo=DebugPanel.getSpriteTreeArr(sprite);\n\t\tthis._treeDataList=[mtreeo];\n\t\tvar wraped;\n\t\twraped={};\n\t\twraped.id=0;\n\t\twraped.item=[mtreeo];\n\t\tthis.debug_view.setTree(wraped);\n\t\tLaya.timer.loop(500,this,this.updateLoop);\n\t}\n\n\t__proto.getDataByID=function(targetID,nodeO){\n\t\tif (!nodeO)\n\t\t\treturn null;\n\t\tif (targetID==nodeO.id)\n\t\t\treturn nodeO;\n\t\tvar childs;\n\t\tchilds=nodeO[\"item\"];\n\t\tif (!childs)\n\t\t\treturn null;\n\t\tvar i=0,len=0;\n\t\tlen=childs.length;\n\t\tvar tRst;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttRst=this.getDataByID(targetID,childs[i]);\n\t\t\tif (tRst)\n\t\t\t\treturn tRst;\n\t\t}\n\t\treturn null;\n\t}\n\n\t__proto.getDataByTarget=function(target,nodeO){\n\t\tif (!nodeO)\n\t\t\treturn null;\n\t\tif (target==nodeO.target)\n\t\t\treturn nodeO;\n\t\tvar childs;\n\t\tchilds=nodeO[\"item\"];\n\t\tif (!childs)\n\t\t\treturn null;\n\t\tvar i=0,len=0;\n\t\tlen=childs.length;\n\t\tvar tRst;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttRst=this.getDataByTarget(target,childs[i]);\n\t\t\tif (tRst)\n\t\t\t\treturn tRst;\n\t\t}\n\t\treturn null;\n\t}\n\n\tDebugPanel.init=function(underGame,bgColor){\n\t\t(underGame===void 0)&& (underGame=true);\n\t\t(bgColor===void 0)&& (bgColor=\"#ffffff\");\n\t\tif (!DebugPanel.I){\n\t\t\tDebugPanel.overlay=!underGame;\n\t\t\tDivScripts.init();\n\t\t\tDebugTool.initBasicFunctions();\n\t\t\tRenderSpriteHook.init();\n\t\t\tSpriteRenderHook.init();\n\t\t\tDebugPanel.I=new DebugPanel();\n\t\t\tDebugPanel.I.setRoot(Laya.stage);\n\t\t\tCacheAnalyser.showRecacheSprite=false;\n\t\t\tif (bgColor){\n\t\t\t\tDebugPanel.I.div.style.background=bgColor;\n\t\t\t}\n\t\t}\n\t}\n\n\tDebugPanel.getSpriteTreeArr=function(sprite){\n\t\tvar rst;\n\t\trst={};\n\t\trst[\"text\"]=\"\"+ClassTool.getNodeClassAndName(sprite);\n\t\trst.target=sprite;\n\t\tIDTools.idObj(sprite);\n\t\trst.id=IDTools.getObjID(sprite);\n\t\tvar childs;\n\t\tchilds=sprite._childs;\n\t\tvar i=0,len=0;\n\t\tlen=childs.length;\n\t\tvar tchild;\n\t\tvar childsList;\n\t\tchildsList=[];\n\t\trst[\"item\"]=childsList;\n\t\tfor (i=0;i < len;i++){\n\t\t\tchildsList.push(DebugPanel.getSpriteTreeArr(childs[i]));\n\t\t}\n\t\treturn rst;\n\t}\n\n\tDebugPanel.getObjectData=function(data){\n\t\tvar dataList;\n\t\tvar tData;\n\t\tvar key;\n\t\tvar tValue;\n\t\tvar tType;\n\t\tdataList=[];\n\t\tvar keys;\n\t\tkeys=DebugPanel.tObjKeys;\n\t\tvar i=0,len=0;\n\t\tlen=keys.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tkey=keys[i];\n\t\t\ttValue=data[key];\n\t\t\ttType=typeof(tValue);\n\t\t\tif (key.charAt(0)==\"_\")\n\t\t\t\tcontinue ;\n\t\t\tif (DebugPanel.displayTypes[tType]){\n\t\t\t\ttData={};\n\t\t\t\ttData[\"key\"]=key;\n\t\t\t\ttData[\"value\"]=tValue;\n\t\t\t\ttData[\"type\"]=tType;\n\t\t\t\tdataList.push(tData);\n\t\t\t}\n\t\t}\n\t\treturn dataList;\n\t}\n\n\tDebugPanel.mParseFloat=function(v){\n\t\tvar rst=NaN;\n\t\trst=parseFloat(v);\n\t\tif (isNaN(rst))\n\t\t\treturn 0;\n\t\treturn rst;\n\t}\n\n\tDebugPanel.I=null;\n\tDebugPanel.overlay=false;\n\tDebugPanel.ChildrenSign=\"item\";\n\tDebugPanel.LabelSign=\"text\";\n\tDebugPanel.tObjKeys=[];\n\t__static(DebugPanel,\n\t['displayTypes',function(){return this.displayTypes={\"boolean\":true,\"number\":true,\"string\":true};},'displayKeys',function(){return this.displayKeys=[[\"x\",\"number\"],[\"y\",\"number\"],[\"width\",\"number\"],[\"width\",\"number\"],[\"width\",\"number\"],[\"width\",\"number\"],[\"width\",\"number\"],[\"width\",\"number\"],[\"width\",\"number\"],[\"width\",\"number\"],[\"width\",\"number\"],];},'noDisplayKeys',function(){return this.noDisplayKeys={\"desginWidth\":true,\"desginHeight\":true };}\n\t]);\n\treturn DebugPanel;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-24 下午3:00:38\n*/\n//class laya.debug.DebugTool\nvar DebugTool=(function(){\n\tfunction DebugTool(){}\n\t__class(DebugTool,'laya.debug.DebugTool');\n\t__getset(1,DebugTool,'target',function(){\n\t\treturn DebugTool._target;\n\t\t},function(v){\n\t\tDebugTool._target=v;\n\t});\n\n\t__getset(1,DebugTool,'isThisShow',function(){\n\t\treturn false;\n\t});\n\n\t/**\n\t*设置是否显示帧率信息\n\t*@param value 是否显示true|false\n\t*/\n\t__getset(1,DebugTool,'showStatu',null,function(value){\n\t\tif (value){\n\t\t\tStat.show();\n\t\t}\n\t\telse{\n\t\t\tStat.hide();\n\t\t\tDebugTool.clearDebugLayer();\n\t\t}\n\t});\n\n\t/**\n\t*是否自动显示点击对象的边框\n\t*@param value\n\t*/\n\t__getset(1,DebugTool,'showBound',function(){\n\t\treturn DebugTool._showBound;\n\t\t},function(value){\n\t\tDebugTool._showBound=value;\n\t\tif (!DebugTool._showBound){\n\t\t\tDebugTool.clearDebugLayer();\n\t\t}\n\t});\n\n\tDebugTool.getMenuShowEvent=function(){\n\t\tif (Browser.onMobile){\n\t\t\treturn /*laya.events.Event.DOUBLE_CLICK*/\"doubleclick\";\n\t\t\t}else{\n\t\t\treturn /*laya.events.Event.RIGHT_CLICK*/\"rightclick\";\n\t\t}\n\t}\n\n\tDebugTool.init=function(cacheAnalyseEnable,loaderAnalyseEnable,createAnalyseEnable,renderAnalyseEnable,showCacheRec){\n\t\t(cacheAnalyseEnable===void 0)&& (cacheAnalyseEnable=true);\n\t\t(loaderAnalyseEnable===void 0)&& (loaderAnalyseEnable=true);\n\t\t(createAnalyseEnable===void 0)&& (createAnalyseEnable=true);\n\t\t(renderAnalyseEnable===void 0)&& (renderAnalyseEnable=true);\n\t\t(showCacheRec===void 0)&& (showCacheRec=false);\n\t\tDebugTool.enableCacheAnalyse=cacheAnalyseEnable;\n\t\tif (DebugTool.enableCacheAnalyse){\n\t\t\tRenderSpriteHook.init();\n\t\t}\n\t\tif (renderAnalyseEnable){\n\t\t\tSpriteRenderHook.init();\n\t\t}\n\t\tDebugTool.enableNodeCreateAnalyse=createAnalyseEnable;\n\t\tif (DebugTool.enableNodeCreateAnalyse){\n\t\t\tClassCreateHook.I.hookClass(Node);\n\t\t}\n\t\tif (loaderAnalyseEnable){\n\t\t\tLoaderHook.init();\n\t\t}\n\t\tCacheAnalyser.showCacheSprite=showCacheRec;\n\t\tNodeInfoPanel.init();\n\t\tDebugTool.initBasicFunctions();\n\t}\n\n\tDebugTool.initBasicFunctions=function(){\n\t\tDisplayHook.initMe();\n\t\tif (!DebugTool.debugLayer){\n\t\t\tDebugInfoLayer.init();\n\t\t\tDebugTool.debugLayer=DebugInfoLayer.I.graphicLayer;\n\t\t\tDebugTool.debugLayer.mouseEnabled=false;\n\t\t\tDebugTool.debugLayer.mouseThrough=true;\n\t\t\tDebugTool.showStatu=true;\n\t\t\tLaya.stage.on(/*laya.events.Event.KEY_DOWN*/\"keydown\",null,DebugTool.keyHandler);\n\t\t\tDebugTool.cmdToTypeO[ /*laya.renders.RenderSprite.IMAGE*/0x01]=\"IMAGE\";\n\t\t\tDebugTool.cmdToTypeO[ /*laya.renders.RenderSprite.ALPHA*/0x02]=\"ALPHA\";\n\t\t\tDebugTool.cmdToTypeO[ /*laya.renders.RenderSprite.TRANSFORM*/0x04]=\"TRANSFORM\";\n\t\t\tDebugTool.cmdToTypeO[ /*laya.renders.RenderSprite.CANVAS*/0x10]=\"CANVAS\";\n\t\t\tDebugTool.cmdToTypeO[ /*laya.renders.RenderSprite.GRAPHICS*/0x200]=\"GRAPHICS\";\n\t\t\tDebugTool.cmdToTypeO[ /*laya.renders.RenderSprite.CUSTOM*/0x400]=\"CUSTOM\";\n\t\t\tDebugTool.cmdToTypeO[ /*laya.renders.RenderSprite.CHILDS*/0x800]=\"CHILDS\";\n\t\t\tDebugExport.export();\n\t\t}\n\t}\n\n\tDebugTool.dTrace=function(str){\n\t\tif (DebugTool._traceFun !=null){\n\t\t\tDebugTool._traceFun(str);\n\t\t}\n\t\tconsole.log(str);\n\t}\n\n\tDebugTool.keyHandler=function(e){\n\t\tvar key;\n\t\tkey=String.fromCharCode(e.keyCode);\n\t\tif (!e.altKey)\n\t\t\treturn;\n\t\tswitch (e.keyCode){\n\t\t\tcase 38:\n\t\t\t\tDebugTool.showParent();\n\t\t\t\tbreak ;\n\t\t\tcase 40:\n\t\t\t\tDebugTool.showChild();\n\t\t\t\tbreak ;\n\t\t\tcase 37:\n\t\t\t\tDebugTool.showBrother(DebugTool.target,1);\n\t\t\t\tbreak ;\n\t\t\tcase 39:\n\t\t\t\tDebugTool.showBrother(DebugTool.target,-1);\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tDebugTool.dealCMDKey(key);\n\t}\n\n\tDebugTool.dealCMDKey=function(key){\n\t\tswitch (key){\n\t\t\tcase \"上\":\n\t\t\t\tDebugTool.showParent();\n\t\t\t\tbreak ;\n\t\t\tcase \"下\":\n\t\t\t\tDebugTool.showChild();\n\t\t\t\tbreak ;\n\t\t\tcase \"左\":\n\t\t\t\tDebugTool.showBrother(DebugTool.target,1);\n\t\t\t\tbreak ;\n\t\t\tcase \"右\":\n\t\t\t\tDebugTool.showBrother(DebugTool.target,-1);\n\t\t\t\tbreak ;\n\t\t\tcase \"B\":\n\t\t\t\tDebugTool.showAllBrother();\n\t\t\t\tbreak ;\n\t\t\tcase \"C\":\n\t\t\t\tDebugTool.showAllChild();\n\t\t\t\tbreak ;\n\t\t\tcase \"E\":\n\t\t\t\tDebugTool.traceDisMouseEnable();\n\t\t\t\tbreak ;\n\t\t\tcase \"S\":\n\t\t\t\tDebugTool.traceDisSizeChain();\n\t\t\t\tbreak ;\n\t\t\tcase \"D\":\n\t\t\t\tDisControlTool.downDis(DebugTool.target);\n\t\t\t\tbreak ;\n\t\t\tcase \"U\":\n\t\t\t\tDisControlTool.upDis(DebugTool.target);\n\t\t\t\tbreak ;\n\t\t\tcase \"N\":\n\t\t\t\tDebugTool.getNodeInfo();\n\t\t\t\tbreak ;\n\t\t\tcase \"M\":\n\t\t\t\tDebugTool.showAllUnderMosue();\n\t\t\t\tbreak ;\n\t\t\tcase \"I\":\n\t\t\t\tbreak ;\n\t\t\tcase \"O\":\n\t\t\t\tObjectCreateView.I.show();\n\t\t\t\tbreak ;\n\t\t\tcase \"L\":\n\t\t\t\tDisController.I.switchType();\n\t\t\t\tbreak ;\n\t\t\tcase \"Q\":\n\t\t\t\tDebugTool.showNodeInfo();\n\t\t\t\tbreak ;\n\t\t\tcase \"F\":\n\t\t\t\tDebugTool.showToolPanel();\n\t\t\t\tbreak ;\n\t\t\tcase \"P\":\n\t\t\t\tDebugTool.showToolFilter();\n\t\t\t\tbreak ;\n\t\t\tcase \"V\":\n\t\t\t\tDebugTool.selectNodeUnderMouse();\n\t\t\t\tbreak ;\n\t\t\tcase \"A\":\n\t\t\t\tif (NodeToolView.I.target){\n\t\t\t\t\tMouseEventAnalyser.analyseNode(NodeToolView.I.target);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase \"K\":\n\t\t\t\tNodeUtils.traceStage();\n\t\t\t\tbreak ;\n\t\t\tcase \"T\":\n\t\t\t\tDebugTool.switchNodeTree();\n\t\t\t\tbreak ;\n\t\t\tcase \"R\":\n\t\t\t\tRenderCostRankView.I.show();\n\t\t\t\tbreak ;\n\t\t\tcase \"X\":\n\t\t\t\tNodeTree.I.fresh();\n\t\t\t\tbreak ;\n\t\t\tcase \"mCMD\":\n\t\t\t\tDebugTool.traceCMD();\n\t\t\t\tbreak ;\n\t\t\tcase \"allCMD\":\n\t\t\t\tDebugTool.traceCMDR();\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\tDebugTool.switchNodeTree=function(){\n\t\tToolPanel.I.switchShow(/*laya.debug.view.nodeInfo.ToolPanel.Tree*/\"Tree\");\n\t}\n\n\tDebugTool.analyseMouseHit=function(){\n\t\tif (DebugTool.target)\n\t\t\tMouseEventAnalyser.analyseNode(DebugTool.target);\n\t}\n\n\tDebugTool.selectNodeUnderMouse=function(){\n\t\tDisplayHook.instance.selectDisUnderMouse();\n\t\tDebugTool.showDisBound();\n\t\treturn;\n\t}\n\n\tDebugTool.showToolPanel=function(){\n\t\tToolPanel.I.switchShow(/*laya.debug.view.nodeInfo.ToolPanel.Find*/\"Find\");\n\t}\n\n\tDebugTool.showToolFilter=function(){\n\t\tToolPanel.I.switchShow(/*laya.debug.view.nodeInfo.ToolPanel.Filter*/\"Filter\");\n\t}\n\n\tDebugTool.showNodeInfo=function(){\n\t\tif (NodeInfoPanel.I.isWorkState){\n\t\t\tNodeInfoPanel.I.recoverNodes();\n\t\t}\n\t\telse{\n\t\t\tNodeInfoPanel.I.showDisInfo(DebugTool.target);\n\t\t}\n\t}\n\n\tDebugTool.switchDisController=function(){\n\t\tif (DisController.I.target){\n\t\t\tDisController.I.target=null;\n\t\t}\n\t\telse{\n\t\t\tif (DebugTool.target){\n\t\t\t\tDisController.I.target=DebugTool.target;\n\t\t\t}\n\t\t}\n\t}\n\n\tDebugTool.showParent=function(sprite){\n\t\tif (!sprite)\n\t\t\tsprite=DebugTool.target;\n\t\tif (!sprite){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t}\n\t\tDebugTool.target=sprite.parent;\n\t\tDebugTool.autoWork();\n\t}\n\n\tDebugTool.showChild=function(sprite){\n\t\tif (!sprite)\n\t\t\tsprite=DebugTool.target;\n\t\tif (!sprite){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t}\n\t\tif (sprite.numChildren > 0){\n\t\t\tDebugTool.target=sprite.getChildAt(0);\n\t\t\tDebugTool.autoWork();\n\t\t}\n\t}\n\n\tDebugTool.showAllChild=function(sprite){\n\t\tif (!sprite)\n\t\t\tsprite=DebugTool.target;\n\t\tif (!sprite){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t}\n\t\tDebugTool.selectedNodes=DisControlTool.getAllChild(sprite);\n\t\tDebugTool.showSelected();\n\t}\n\n\tDebugTool.showAllUnderMosue=function(){\n\t\tDebugTool.selectedNodes=DisControlTool.getObjectsUnderGlobalPoint(Laya.stage);\n\t\tDebugTool.showSelected();\n\t}\n\n\tDebugTool.showParentChain=function(sprite){\n\t\tif (!sprite)\n\t\t\treturn;\n\t\tDebugTool.selectedNodes=[];\n\t\tvar tar;\n\t\ttar=sprite.parent;\n\t\twhile (tar){\n\t\t\tDebugTool.selectedNodes.push(tar);\n\t\t\ttar=tar.parent;\n\t\t}\n\t\tDebugTool.showSelected();\n\t}\n\n\tDebugTool.showAllBrother=function(sprite){\n\t\tif (!sprite)\n\t\t\tsprite=DebugTool.target;\n\t\tif (!sprite){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t}\n\t\tif (!sprite.parent)\n\t\t\treturn;\n\t\tDebugTool.selectedNodes=DisControlTool.getAllChild(sprite.parent);\n\t\tDebugTool.showSelected();\n\t}\n\n\tDebugTool.showBrother=function(sprite,dID){\n\t\t(dID===void 0)&& (dID=1);\n\t\tif (!sprite)\n\t\t\tsprite=DebugTool.target;\n\t\tif (!sprite){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t};\n\t\tvar p;\n\t\tp=sprite.parent;\n\t\tif (!p)\n\t\t\treturn;\n\t\tvar n=0;\n\t\tn=p.getChildIndex(sprite);\n\t\tn+=dID;\n\t\tif (n < 0)\n\t\t\tn+=p.numChildren;\n\t\tif (n >=p.numChildren)\n\t\t\tn-=p.numChildren;\n\t\tDebugTool.target=p.getChildAt(n);\n\t\tDebugTool.autoWork();\n\t}\n\n\tDebugTool.clearDebugLayer=function(){\n\t\tif (DebugTool.debugLayer.graphics)\n\t\t\tDebugTool.debugLayer.graphics.clear();\n\t}\n\n\tDebugTool.showSelected=function(){\n\t\tif (!DebugTool.autoShowSelected)\n\t\t\treturn;\n\t\tif (!DebugTool.selectedNodes || DebugTool.selectedNodes.length < 1)\n\t\t\treturn;\n\t\tconsole.log(\"selected:\",DebugTool.selectedNodes);\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tlen=DebugTool.selectedNodes.length;\n\t\tDebugTool.clearDebugLayer();\n\t\tfor (i=0;i < len;i++){\n\t\t\tDebugTool.showDisBound(DebugTool.selectedNodes[i],false);\n\t\t}\n\t}\n\n\tDebugTool.getClassCreateInfo=function(className){\n\t\treturn RunProfile.getRunInfo(className);\n\t}\n\n\tDebugTool.autoWork=function(){\n\t\tif (!DebugTool.isThisShow)\n\t\t\treturn;\n\t\tif (DebugTool.showBound)\n\t\t\tDebugTool.showDisBound();\n\t\tif (DebugTool.autoTraceSpriteInfo && DebugTool.target){\n\t\t\tTraceTool.traceSpriteInfo(DebugTool.target,DebugTool.autoTraceBounds,DebugTool.autoTraceSize,DebugTool.autoTraceTree);\n\t\t}\n\t\tif (!DebugTool.target)\n\t\t\treturn;\n\t\tif (DebugTool.autoTraceCMD){\n\t\t\tDebugTool.traceCMD();\n\t\t}\n\t\tif (DebugTool.autoTraceCMDR){\n\t\t\tDebugTool.traceCMDR();\n\t\t}\n\t\tif (DebugTool.autoTraceEnable){\n\t\t\tDebugTool.traceDisMouseEnable(DebugTool.target);\n\t\t}\n\t}\n\n\tDebugTool.traceDisMouseEnable=function(tar){\n\t\tconsole.log(\"----------------traceDisMouseEnable--------------------\");\n\t\tif (!tar)\n\t\t\ttar=DebugTool.target;\n\t\tif (!tar){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t};\n\t\tvar strArr;\n\t\tstrArr=[];\n\t\tDebugTool.selectedNodes=[];\n\t\twhile (tar){\n\t\t\tstrArr.push(ClassTool.getNodeClassAndName(tar)+\": mouseEnabled:\"+tar.mouseEnabled+\" hitFirst:\"+tar.hitTestPrior);\n\t\t\tDebugTool.selectedNodes.push(tar);\n\t\t\ttar=tar.parent;\n\t\t}\n\t\tconsole.log(strArr.join(\"\\n\"));\n\t\tDebugTool.showSelected();\n\t\treturn strArr.join(\"\\n\");\n\t}\n\n\tDebugTool.traceDisSizeChain=function(tar){\n\t\tconsole.log(\"---------------------traceDisSizeChain-------------------\");\n\t\tif (!tar)\n\t\t\ttar=DebugTool.target;\n\t\tif (!tar){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t}\n\t\tDebugTool.selectedNodes=[];\n\t\tvar strArr;\n\t\tstrArr=[];\n\t\twhile (tar){\n\t\t\tstrArr.push(ClassTool.getNodeClassAndName(tar)+\": x:\"+tar.x+\" y:\"+tar.y+\" w:\"+tar.width+\" h:\"+tar.height+\" scaleX:\"+tar.scaleX+\" scaleY:\"+tar.scaleY);\n\t\t\tDebugTool.selectedNodes.push(tar);\n\t\t\ttar=tar.parent;\n\t\t}\n\t\tconsole.log(strArr.join(\"\\n\"));\n\t\tDebugTool.showSelected();\n\t\treturn strArr.join(\"\\n\");\n\t}\n\n\tDebugTool.showDisBound=function(sprite,clearPre,color){\n\t\t(clearPre===void 0)&& (clearPre=true);\n\t\t(color===void 0)&& (color=\"#ff0000\");\n\t\tif (!sprite)\n\t\t\tsprite=DebugTool.target;\n\t\tif (!sprite){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t}\n\t\tif (clearPre)\n\t\t\tDebugTool.clearDebugLayer();\n\t\tvar pointList;\n\t\tpointList=sprite._getBoundPointsM(true);\n\t\tif (!pointList || pointList.length < 1)\n\t\t\treturn;\n\t\tpointList=GrahamScan.pListToPointList(pointList,true);\n\t\tWalkTools.walkArr(pointList,sprite.localToGlobal,sprite);\n\t\tpointList=GrahamScan.pointListToPlist(pointList);\n\t\tDebugTool._disBoundRec=Rectangle._getWrapRec(pointList,DebugTool._disBoundRec);\n\t\tDebugTool.debugLayer.graphics.drawRect(DebugTool._disBoundRec.x,DebugTool._disBoundRec.y,DebugTool._disBoundRec.width,DebugTool._disBoundRec.height,null,color);\n\t\tDebugInfoLayer.I.setTop();\n\t}\n\n\tDebugTool.showDisBoundToSprite=function(sprite,graphicSprite,color,lineWidth){\n\t\t(color===void 0)&& (color=\"#ff0000\");\n\t\t(lineWidth===void 0)&& (lineWidth=1);\n\t\tvar pointList;\n\t\tpointList=sprite._getBoundPointsM(true);\n\t\tif (!pointList || pointList.length < 1)\n\t\t\treturn;\n\t\tpointList=GrahamScan.pListToPointList(pointList,true);\n\t\tWalkTools.walkArr(pointList,sprite.localToGlobal,sprite);\n\t\tpointList=GrahamScan.pointListToPlist(pointList);\n\t\tDebugTool._disBoundRec=Rectangle._getWrapRec(pointList,DebugTool._disBoundRec);\n\t\tgraphicSprite.graphics.drawRect(DebugTool._disBoundRec.x,DebugTool._disBoundRec.y,DebugTool._disBoundRec.width,DebugTool._disBoundRec.height,null,color,lineWidth);\n\t}\n\n\tDebugTool.getNodeInfo=function(){\n\t\tDebugTool.counter.reset();\n\t\tWalkTools.walkTarget(Laya.stage,DebugTool.addNodeInfo);\n\t\tconsole.log(\"node info:\");\n\t\tDebugTool.counter.traceSelf();\n\t\treturn DebugTool.counter.data;\n\t}\n\n\tDebugTool.findByClass=function(className){\n\t\tDebugTool._classList=[];\n\t\tDebugTool._tFindClass=className;\n\t\tWalkTools.walkTarget(Laya.stage,DebugTool.addClassNode);\n\t\tDebugTool.selectedNodes=DebugTool._classList;\n\t\tDebugTool.showSelected();\n\t\treturn DebugTool._classList;\n\t}\n\n\tDebugTool.addClassNode=function(node){\n\t\tvar type;\n\t\ttype=node[\"constructor\"].name;\n\t\tif (type==DebugTool._tFindClass){\n\t\t\tDebugTool._classList.push(node);\n\t\t}\n\t}\n\n\tDebugTool.traceCMD=function(sprite){\n\t\tif (!sprite)\n\t\t\tsprite=DebugTool.target;\n\t\tif (!sprite){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn null;\n\t\t}\n\t\tconsole.log(\"self CMDs:\");\n\t\tconsole.log(sprite.graphics.cmds);\n\t\tvar renderSprite;\n\t\trenderSprite=RenderSprite.renders[sprite._renderType];\n\t\tconsole.log(\"renderSprite:\",renderSprite);\n\t\tDebugTool._rSpList.length=0;\n\t\twhile (renderSprite && renderSprite[\"_sign\"] > 0){\n\t\t\tDebugTool._rSpList.push(DebugTool.cmdToTypeO[renderSprite[\"_sign\"]]);\n\t\t\trenderSprite=renderSprite._next;\n\t\t}\n\t\tconsole.log(\"fun:\",DebugTool._rSpList.join(\",\"));\n\t\tDebugTool.counter.reset();\n\t\tDebugTool.addCMDs(sprite.graphics.cmds);\n\t\tDebugTool.counter.traceSelf();\n\t\treturn DebugTool.counter.data;\n\t}\n\n\tDebugTool.addCMDs=function(cmds){\n\t\tWalkTools.walkArr(cmds,DebugTool.addCMD);\n\t}\n\n\tDebugTool.addCMD=function(cmd){\n\t\tDebugTool.counter.add(cmd.callee);\n\t}\n\n\tDebugTool.traceCMDR=function(sprite){\n\t\tif (!sprite)\n\t\t\tsprite=DebugTool.target;\n\t\tif (!sprite){\n\t\t\tconsole.log(\"no targetAvalible\");\n\t\t\treturn 0;\n\t\t}\n\t\tDebugTool.counter.reset();\n\t\tWalkTools.walkTarget(sprite,DebugTool.getCMdCount);\n\t\tconsole.log(\"cmds include children\");\n\t\tDebugTool.counter.traceSelf();\n\t\treturn DebugTool.counter.data;\n\t}\n\n\tDebugTool.getCMdCount=function(target){\n\t\tif (!target)\n\t\t\treturn 0;\n\t\tif (! (target instanceof laya.display.Sprite ))\n\t\t\treturn 0;\n\t\tif (!target.graphics.cmds)\n\t\t\treturn 0;\n\t\tDebugTool.addCMDs(target.graphics.cmds);\n\t\tvar rst=target.graphics.cmds.length;\n\t\treturn rst;\n\t}\n\n\tDebugTool.addNodeInfo=function(node){\n\t\tvar type;\n\t\ttype=node[\"constructor\"].name;\n\t\tDebugTool.counter.add(type);\n\t}\n\n\tDebugTool.find=function(filter,ifShowSelected){\n\t\t(ifShowSelected===void 0)&& (ifShowSelected=true);\n\t\tvar rst;\n\t\trst=DebugTool.findTarget(Laya.stage,filter);\n\t\tDebugTool.selectedNodes=rst;\n\t\tif (DebugTool.selectedNodes){\n\t\t\tDebugTool.target=DebugTool.selectedNodes[0];\n\t\t}\n\t\tif (ifShowSelected)\n\t\t\tDebugTool.showSelected();\n\t\treturn rst;\n\t}\n\n\tDebugTool.findByName=function(name){\n\t\tDebugTool.nameFilter.name=name;\n\t\treturn DebugTool.find(DebugTool.nameFilter);\n\t}\n\n\tDebugTool.findNameStartWith=function(startStr){\n\t\tDebugTool.nameFilter.name=DebugTool.getStartWithFun(startStr);\n\t\treturn DebugTool.find(DebugTool.nameFilter);\n\t}\n\n\tDebugTool.findNameHas=function(hasStr,showSelected){\n\t\t(showSelected===void 0)&& (showSelected=true);\n\t\tDebugTool.nameFilter.name=DebugTool.getHasFun(hasStr);\n\t\treturn DebugTool.find(DebugTool.nameFilter,showSelected);\n\t}\n\n\tDebugTool.getStartWithFun=function(startStr){\n\t\tvar rst=function (str){\n\t\t\tif (!str)\n\t\t\t\treturn false;\n\t\t\tif (str.indexOf(startStr)==0)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t};\n\t\treturn rst;\n\t}\n\n\tDebugTool.getHasFun=function(hasStr){\n\t\tvar rst=function (str){\n\t\t\tif (!str)\n\t\t\t\treturn false;\n\t\t\tif (str.indexOf(hasStr)>=0)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t};\n\t\treturn rst;\n\t}\n\n\tDebugTool.findTarget=function(target,filter){\n\t\tvar rst=[];\n\t\tif (DebugTool.isFit(target,filter))\n\t\t\trst.push(target);\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar tChild;\n\t\tlen=target.numChildren;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttChild=target.getChildAt(i);\n\t\t\tif ((tChild instanceof laya.display.Sprite )){\n\t\t\t\trst=rst.concat(DebugTool.findTarget(tChild,filter));\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tDebugTool.findClassHas=function(target,str){\n\t\tvar rst=[];\n\t\tif (ClassTool.getClassName(target).indexOf(str)>=0)\n\t\t\trst.push(target);\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar tChild;\n\t\tlen=target.numChildren;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttChild=target.getChildAt(i);\n\t\t\tif ((tChild instanceof laya.display.Sprite )){\n\t\t\t\trst=rst.concat(DebugTool.findClassHas(tChild,str));\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tDebugTool.isFit=function(tar,filter){\n\t\tif (!tar)\n\t\t\treturn false;\n\t\tif (!filter)\n\t\t\treturn true;\n\t\tif ((typeof filter=='function')){\n\t\t\treturn (filter)(tar);\n\t\t};\n\t\tvar key;\n\t\tfor (key in filter){\n\t\t\tif ((typeof (filter[key])=='function')){\n\t\t\t\tif (!filter[key](tar[key]))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (tar[key] !=filter[key])\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tDebugTool.log=function(__args){\n\t\tvar args=arguments;\n\t\tvar arr;\n\t\tarr=DTrace.getArgArr(args);\n\t\tif (DebugTool._logFun!=null){\n\t\t\tDebugTool._logFun(arr.join(\" \"));\n\t\t}\n\t}\n\n\tDebugTool.enableCacheAnalyse=false;\n\tDebugTool.enableNodeCreateAnalyse=true;\n\tDebugTool._traceFun=null;\n\tDebugTool.debugLayer=null;\n\tDebugTool._target=null;\n\tDebugTool.selectedNodes=[];\n\tDebugTool.autoShowSelected=true;\n\tDebugTool._showBound=true;\n\tDebugTool._disBoundRec=null;\n\tDebugTool.autoTraceEnable=false;\n\tDebugTool.autoTraceBounds=false;\n\tDebugTool.autoTraceSize=false;\n\tDebugTool.autoTraceTree=true;\n\tDebugTool.autoTraceCMD=true;\n\tDebugTool.autoTraceCMDR=false;\n\tDebugTool.autoTraceSpriteInfo=true;\n\tDebugTool._classList=null;\n\tDebugTool._tFindClass=null;\n\tDebugTool._rSpList=[];\n\tDebugTool._logFun=null;\n\t__static(DebugTool,\n\t['text',function(){return this.text=new Stat();},'cmdToTypeO',function(){return this.cmdToTypeO={\n\t};},'counter',function(){return this.counter=new CountTool();},'nameFilter',function(){return this.nameFilter={\"name\":\"name\"};}\n\n\t]);\n\treturn DebugTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.divui.DivScripts\nvar DivScripts=(function(){\n\tfunction DivScripts(){}\n\t__class(DivScripts,'laya.debug.divui.DivScripts');\n\tDivScripts.init=function(){\n\t\tvar script;\n\t\tscript=Base64Tool.decodeToByte(DivScripts.data).readUTFBytes();\n\t\tLaya._runScript(script);\n\t}\n\n\tDivScripts.data=\"ZnVuY3Rpb24gZGh0bWx4RXZlbnQoZSx0LGkpe2UuYWRkRXZlbnRMaXN0ZW5lcj9lLmFkZEV2ZW50TGlzdGVuZXIodCxpLCExKTplLmF0dGFjaEV2ZW50JiZlLmF0dGFjaEV2ZW50KCJvbiIrdCxpKX1mdW5jdGlvbiBkaHRtbFhUcmVlT2JqZWN0KGUsdCxpLG4pe2lmKGRodG1seEV2ZW50LmluaXRUb3VjaCYmZGh0bWx4RXZlbnQuaW5pdFRvdWNoKCksX2lzSUUpdHJ5e2RvY3VtZW50LmV4ZWNDb21tYW5kKCJCYWNrZ3JvdW5kSW1hZ2VDYWNoZSIsITEsITApfWNhdGNoKG8pe30ib2JqZWN0IiE9dHlwZW9mIGU/dGhpcy5wYXJlbnRPYmplY3Q9ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoZSk6dGhpcy5wYXJlbnRPYmplY3Q9ZSx0aGlzLnBhcmVudE9iamVjdC5zdHlsZS5vdmVyZmxvdz0iaGlkZGVuIix0aGlzLl9pdGltX2RnPSEwLHRoaXMuZGxtdHI9IiwiLHRoaXMuZHJvcExvd2VyPSExLHRoaXMuZW5hYmxlSUVJbWFnZUZpeCghMCksdGhpcy54bWxzdGF0ZT0wLHRoaXMubXl0eXBlPSJ0cmVlIix0aGlzLnNtY2hlY2s9ITAsdGhpcy53aWR0aD10LHRoaXMuaGVpZ2h0PWksdGhpcy5yb290SWQ9bix0aGlzLmNoaWxkQ2FsYz1udWxsLHRoaXMuZGVmX2ltZ194PSIxOHB4Iix0aGlzLmRlZl9pbWdfeT0iMThweCIsdGhpcy5kZWZfbGluZV9pbWdfeD0iMThweCIsdGhpcy5kZWZfbGluZV9pbWdfeT0iMjRweCIsdGhpcy5fZHJhZ2dlZD1uZXcgQXJyYXksdGhpcy5fc2VsZWN0ZWQ9bmV3IEFycmF5LHRoaXMuc3R5bGVfcG9pbnRlcj0icG9pbnRlciIsdGhpcy5fYWltZ3M9ITAsdGhpcy5odG1sY0E9IiBbIix0aGlzLmh0bWxjQj0iXSIsdGhpcy5sV2luPXdpbmRvdyx0aGlzLmNNZW51PTAsdGhpcy5tbGl0ZW1zPTAsdGhpcy5pY29uVVJMPSIiLHRoaXMuZGFkbW9kZT0wLHRoaXMuc2xvd1BhcnNlPSExLHRoaXMuYXV0b1Njcm9sbD0hMCx0aGlzLmhmTW9kZT0wLHRoaXMubm9kZUN1dD1uZXcgQXJyYXksdGhpcy5YTUxzb3VyY2U9MCx0aGlzLlhNTGxvYWRpbmdXYXJuaW5nPTAsdGhpcy5faWRwdWxsPXt9LHRoaXMuX3B1bGxTaXplPTAsdGhpcy50cmVlTGluZXNPbj0hMCx0aGlzLnRzY2hlY2s9ITEsdGhpcy50aW1nZW49ITAsdGhpcy5kcGNweT0hMSx0aGlzLl9sZF9pZD1udWxsLHRoaXMuX2R5bkRlbGV0ZUJyYW5jaGVzPXt9LHRoaXMuX29pZV9vblhMRT1bXSx0aGlzLmltUGF0aD13aW5kb3cuZGh4X2dsb2JhbEltZ1BhdGh8fCIiLHRoaXMuY2hlY2tBcnJheT1uZXcgQXJyYXkoImljb25VbmNoZWNrQWxsLmdpZiIsImljb25DaGVja0FsbC5naWYiLCJpY29uQ2hlY2tHcmF5LmdpZiIsImljb25VbmNoZWNrRGlzLmdpZiIsImljb25DaGVja0Rpcy5naWYiLCJpY29uQ2hlY2tEaXMuZ2lmIiksdGhpcy5yYWRpb0FycmF5PW5ldyBBcnJheSgicmFkaW9fb2ZmLmdpZiIsInJhZGlvX29uLmdpZiIsInJhZGlvX29uLmdpZiIsInJhZGlvX29mZi5naWYiLCJyYWRpb19vbi5naWYiLCJyYWRpb19vbi5naWYiKSx0aGlzLmxpbmVBcnJheT1uZXcgQXJyYXkoImxpbmUyLmdpZiIsImxpbmUzLmdpZiIsImxpbmU0LmdpZiIsYmxhbmtfYmFzZTY0LGJsYW5rX2Jhc2U2NCwibGluZTEuZ2lmIiksdGhpcy5taW51c0FycmF5PW5ldyBBcnJheSgibWludXMyLmdpZiIsIm1pbnVzMy5naWYiLCJtaW51czQuZ2lmIiwiZGF0YTppbWFnZS9naWY7YmFzZTY0LFIwbEdPRGxoRWdBWUFKRUNBTEd2clo2ZG5mVDA5QUFBQUNINUJBRUFBQUlBTEFBQUFBQVNBQmdBQUFJY2xJK3B5KzBQbzV5MFdoc0NEV0IzbUdYZnd3SG1oYWJxeXJaVEFRQTciLCJtaW51czUuZ2lmIiksdGhpcy5wbHVzQXJyYXk9bmV3IEFycmF5KCJwbHVzMi5naWYiLCJwbHVzMy5naWYiLCJwbHVzNC5naWYiLCJkYXRhOmltYWdlL2dpZjtiYXNlNjQsUjBsR09EbGhFZ0FZQUpFQ0FLR2duN0d2cmZUMDlBQUFBQ0g1QkFFQUFBSUFMQUFBQUFBU0FCZ0FBQUljbEkrcHkrMFBvNXkwVW5CRHlIc0NMUUZmT0U2ZGhhYnF5clpKQVFBNyIsInBsdXM1LmdpZiIpLHRoaXMuaW1hZ2VBcnJheT1uZXcgQXJyYXkoImRhdGE6aW1hZ2UvZ2lmO2Jhc2U2NCxSMGxHT0RsaEVnQVNBS0VDQUplWGw3R3ZyZi8vLy8vLy95SDVCQUVLQUFJQUxBQUFBQUFTQUJJQUFBSXpsSStwQXUyOURBaTAxamlUWFJuTm0zVEhCNDVCYUoyZXVsQm94TENTL0s2d09OODBYcHQ2citCOUhrU2FJSVdFS1EwRkFEcz0iLCJkYXRhOmltYWdlL2dpZjtiYXNlNjQsUjBsR09EbGhFZ0FTQUtFQ0FKZVhsN0d2cmYvLy8vLy8veUg1QkFFS0FBSUFMQUFBQUFBU0FCSUFBQUl6bEkrcHl3Y1BtM21oV2drQ3NqQk92VmtpbUVsRzlabENCbFhkKzJYampMS2c1R3FvZVpYcXZzT1FYSy9palVaVEtWVUZBRHM9IiwiZGF0YTppbWFnZS9naWY7YmFzZTY0LFIwbEdPRGxoRWdBU0FLRUNBSmVYbDdHdnJmLy8vLy8vL3lINUJBRUtBQUlBTEFBQUFBQVNBQklBQUFJd2xJK3B5d2NQbTNtaFdna0NzakJPdlZraW1FbEc5WmxDdVlJWTZUWXMrNmJtSERPNGlnZmREM0dOaGhlVjBWUUFBRHM9IiksdGhpcy5jdXRJbWc9bmV3IEFycmF5KDAsMCwwKSx0aGlzLmN1dEltYWdlPSJidXRfY3V0LmdpZiIsZGh4NC5fZXZlbnRhYmxlKHRoaXMpLHRoaXMuaHRtbE5vZGU9bmV3IGRodG1sWFRyZWVJdGVtT2JqZWN0KHRoaXMucm9vdElkLCIiLDAsdGhpcyksdGhpcy5odG1sTm9kZS5odG1sTm9kZS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbMF0uc3R5bGUuZGlzcGxheT0ibm9uZSIsdGhpcy5odG1sTm9kZS5odG1sTm9kZS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbMF0uY2hpbGROb2Rlc1swXS5jbGFzc05hbWU9ImhpZGRlblJvdyIsdGhpcy5hbGxUcmVlPXRoaXMuX2NyZWF0ZVNlbGYoKSx0aGlzLmFsbFRyZWUuYXBwZW5kQ2hpbGQodGhpcy5odG1sTm9kZS5odG1sTm9kZSksZGh0bWx4LiRjdXN0b21TY3JvbGwmJmRodG1seC5DdXN0b21TY3JvbGwuZW5hYmxlKHRoaXMpLF9pc0ZGJiYodGhpcy5hbGxUcmVlLmNoaWxkTm9kZXNbMF0ud2lkdGg9IjEwMCUiLHRoaXMuYWxsVHJlZS5jaGlsZE5vZGVzWzBdLnN0eWxlLm92ZXJmbG93PSJoaWRkZW4iKTt2YXIgcj10aGlzO2lmKHRoaXMuYWxsVHJlZS5vbnNlbGVjdHN0YXJ0PW5ldyBGdW5jdGlvbigicmV0dXJuIGZhbHNlOyIpLF9pc01hY09TJiYodGhpcy5hbGxUcmVlLm9uY29udGV4dG1lbnU9ZnVuY3Rpb24oZSl7cmV0dXJuIHIuX2RvQ29udENsaWNrKGV8fHdpbmRvdy5ldmVudCwhMCl9KSx0aGlzLmFsbFRyZWUub25tb3VzZWRvd249ZnVuY3Rpb24oZSl7cmV0dXJuIHIuX2RvQ29udENsaWNrKGV8fHdpbmRvdy5ldmVudCl9LHRoaXMuWE1MTG9hZGVyPXRoaXMuX3BhcnNlWE1MVHJlZSxfaXNJRSYmdGhpcy5wcmV2ZW50SUVDYXNoaW5nKCEwKSx0aGlzLnNlbGVjdGlvbkJhcj1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJESVYiKSx0aGlzLnNlbGVjdGlvbkJhci5jbGFzc05hbWU9InNlbGVjdGlvbkJhciIsdGhpcy5zZWxlY3Rpb25CYXIuaW5uZXJIVE1MPSImbmJzcDsiLHRoaXMuc2VsZWN0aW9uQmFyLnN0eWxlLmRpc3BsYXk9Im5vbmUiLHRoaXMuYWxsVHJlZS5hcHBlbmRDaGlsZCh0aGlzLnNlbGVjdGlvbkJhciksd2luZG93LmFkZEV2ZW50TGlzdGVuZXImJndpbmRvdy5hZGRFdmVudExpc3RlbmVyKCJ1bmxvYWQiLGZ1bmN0aW9uKCl7dHJ5e3IuZGVzdHJ1Y3RvcigpfWNhdGNoKGUpe319LCExKSx3aW5kb3cuYXR0YWNoRXZlbnQmJndpbmRvdy5hdHRhY2hFdmVudCgib251bmxvYWQiLGZ1bmN0aW9uKCl7dHJ5e3IuZGVzdHJ1Y3RvcigpfWNhdGNoKGUpe319KSx0aGlzLnNldEltYWdlc1BhdGg9dGhpcy5zZXRJbWFnZVBhdGgsdGhpcy5zZXRJY29uc1BhdGg9dGhpcy5zZXRJY29uUGF0aCx0aGlzLnNldFNraW4oIm1hdGVyaWFsIiksZGh0bWx4LmltYWdlX3BhdGgpe3ZhciBsPWRodG1seC5pbWFnZV9wYXRoLHM9dGhpcy5wYXJlbnRPYmplY3QuY2xhc3NOYW1lLm1hdGNoKC9kaHh0cmVlX2RoeF8oW2Etel9dKikvaSk7bnVsbCE9cyYmbnVsbCE9c1sxXSYmKGwrPSJkaHh0cmVlXyIrc1sxXSsiLyIpLHRoaXMuc2V0SW1hZ2VQYXRoKGwpfXJldHVybiB0aGlzfWZ1bmN0aW9uIGNPYmplY3QoKXtyZXR1cm4gdGhpc31mdW5jdGlvbiBkaHRtbFhUcmVlSXRlbU9iamVjdChlLHQsaSxuLG8scil7cmV0dXJuIHRoaXMuaHRtbE5vZGU9IiIsdGhpcy5hY29sb3I9IiIsdGhpcy5zY29sb3I9IiIsdGhpcy50cj0wLHRoaXMuY2hpbGRzQ291bnQ9MCx0aGlzLnRlbXBET01NPTAsdGhpcy50ZW1wRE9NVT0wLHRoaXMuZHJhZ1NwYW49MCx0aGlzLmRyYWdNb3ZlPTAsdGhpcy5zcGFuPTAsdGhpcy5jbG9zZWJsZT0xLHRoaXMuY2hpbGROb2Rlcz1uZXcgQXJyYXksdGhpcy51c2VyRGF0YT1uZXcgY09iamVjdCx0aGlzLmNoZWNrc3RhdGU9MCx0aGlzLnRyZWVOb2Q9bix0aGlzLmxhYmVsPXQsdGhpcy5wYXJlbnRPYmplY3Q9aSx0aGlzLmFjdGlvbkhhbmRsZXI9byx0aGlzLmltYWdlcz1uZXcgQXJyYXkobi5pbWFnZUFycmF5WzBdLG4uaW1hZ2VBcnJheVsxXSxuLmltYWdlQXJyYXlbMl0pLHRoaXMuaWQ9bi5fZ2xvYmFsSWRTdG9yYWdlQWRkKGUsdGhpcyksdGhpcy50cmVlTm9kLmNoZWNrQm94T2ZmP3RoaXMuaHRtbE5vZGU9dGhpcy50cmVlTm9kLl9jcmVhdGVJdGVtKDEsdGhpcyxyKTp0aGlzLmh0bWxOb2RlPXRoaXMudHJlZU5vZC5fY3JlYXRlSXRlbSgwLHRoaXMsciksdGhpcy5odG1sTm9kZS5vYmpCZWxvbmc9dGhpcyx0aGlzfWZ1bmN0aW9uIGpzb25Qb2ludGVyKGUsdCl7dGhpcy5kPWUsdGhpcy5kcD10fWZ1bmN0aW9uIGRoeF9pbml0X3RyZWVzKCl7Zm9yKHZhciBlPWRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJkaXYiKSx0PTA7dDxlLmxlbmd0aDt0KyspImRodG1seFRyZWUiPT1lW3RdLmNsYXNzTmFtZSYmZGh0bWxYVHJlZUZyb21IVE1MKGVbdF0pfXZhciBibGFua19iYXNlNjQ9ImRhdGE6aW1hZ2UvZ2lmO2Jhc2U2NCxSMGxHT0RsaEVnQVNBSUFBQVAvLy8vLy8veUg1QkFVVUFBRUFMQUFBQUFBU0FCSUFBQUlQakkrcHkrMFBvNXkwMm91ejNwd1hBRHM9IjsidW5kZWZpbmVkIj09dHlwZW9mIHdpbmRvdy5kaHgmJih3aW5kb3cuZGh4PXdpbmRvdy5kaHg0PXt2ZXJzaW9uOiI1LjAiLHNraW46bnVsbCxsYXN0SWQ6MSxuZXdJZDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmxhc3RJZCsrfSx6aW06e2RhdGE6e30sc3RlcDo1LGZpcnN0OmZ1bmN0aW9uKCl7cmV0dXJuIDEwMH0sbGFzdDpmdW5jdGlvbigpe3ZhciBlPXRoaXMuZmlyc3QoKTtmb3IodmFyIHQgaW4gdGhpcy5kYXRhKWU9TWF0aC5tYXgoZSx0aGlzLmRhdGFbdF0pO3JldHVybiBlfSxyZXNlcnZlOmZ1bmN0aW9uKGUpe3JldHVybiB0aGlzLmRhdGFbZV09dGhpcy5sYXN0KCkrdGhpcy5zdGVwLHRoaXMuZGF0YVtlXX0sY2xlYXI6ZnVuY3Rpb24oZSl7bnVsbCE9dGhpcy5kYXRhW2VdJiYodGhpcy5kYXRhW2VdPW51bGwsZGVsZXRlIHRoaXMuZGF0YVtlXSl9fSxzMmI6ZnVuY3Rpb24oZSl7cmV0dXJuInN0cmluZyI9PXR5cGVvZiBlJiYoZT1lLnRvTG93ZXJDYXNlKCkpLDE9PWV8fDE9PWV8fCJ0cnVlIj09ZXx8IjEiPT1lfHwieWVzIj09ZXx8InkiPT1lfHwib24iPT1lfSxzMmo6ZnVuY3Rpb24ocyl7dmFyIG9iaj1udWxsO2RoeDQudGVtcD1udWxsO3RyeXtldmFsKCJkaHg0LnRlbXA9IitzKX1jYXRjaChlKXtkaHg0LnRlbXA9bnVsbH1yZXR1cm4gb2JqPWRoeDQudGVtcCxkaHg0LnRlbXA9bnVsbCxvYmp9LGFic0xlZnQ6ZnVuY3Rpb24oZSl7cmV0dXJuInN0cmluZyI9PXR5cGVvZiBlJiYoZT1kb2N1bWVudC5nZXRFbGVtZW50QnlJZChlKSksdGhpcy5nZXRPZmZzZXQoZSkubGVmdH0sYWJzVG9wOmZ1bmN0aW9uKGUpe3JldHVybiJzdHJpbmciPT10eXBlb2YgZSYmKGU9ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoZSkpLHRoaXMuZ2V0T2Zmc2V0KGUpLnRvcH0sX2FPZnM6ZnVuY3Rpb24oZSl7Zm9yKHZhciB0PTAsaT0wO2U7KXQrPXBhcnNlSW50KGUub2Zmc2V0VG9wKSxpKz1wYXJzZUludChlLm9mZnNldExlZnQpLGU9ZS5vZmZzZXRQYXJlbnQ7cmV0dXJue3RvcDp0LGxlZnQ6aX19LF9hT2ZzUmVjdDpmdW5jdGlvbihlKXt2YXIgdD1lLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLGk9ZG9jdW1lbnQuYm9keSxuPWRvY3VtZW50LmRvY3VtZW50RWxlbWVudCxvPXdpbmRvdy5wYWdlWU9mZnNldHx8bi5zY3JvbGxUb3B8fGkuc2Nyb2xsVG9wLHI9d2luZG93LnBhZ2VYT2Zmc2V0fHxuLnNjcm9sbExlZnR8fGkuc2Nyb2xsTGVmdCxsPW4uY2xpZW50VG9wfHxpLmNsaWVudFRvcHx8MCxzPW4uY2xpZW50TGVmdHx8aS5jbGllbnRMZWZ0fHwwLGE9dC50b3Arby1sLGQ9dC5sZWZ0K3ItcztyZXR1cm57dG9wOk1hdGgucm91bmQoYSksbGVmdDpNYXRoLnJvdW5kKGQpfX0sZ2V0T2Zmc2V0OmZ1bmN0aW9uKGUpe3JldHVybiBlLmdldEJvdW5kaW5nQ2xpZW50UmVjdD90aGlzLl9hT2ZzUmVjdChlKTp0aGlzLl9hT2ZzKGUpfSxfaXNPYmo6ZnVuY3Rpb24oZSl7cmV0dXJuIG51bGwhPWUmJiJvYmplY3QiPT10eXBlb2YgZSYmInVuZGVmaW5lZCI9PXR5cGVvZiBlLmxlbmd0aH0sX2NvcHlPYmo6ZnVuY3Rpb24oZSl7aWYodGhpcy5faXNPYmooZSkpe3ZhciB0PXt9O2Zvcih2YXIgaSBpbiBlKSJvYmplY3QiPT10eXBlb2YgZVtpXSYmbnVsbCE9ZVtpXT90W2ldPXRoaXMuX2NvcHlPYmooZVtpXSk6dFtpXT1lW2ldfWVsc2UgZm9yKHZhciB0PVtdLGk9MDtpPGUubGVuZ3RoO2krKykib2JqZWN0Ij09dHlwZW9mIGVbaV0mJm51bGwhPWVbaV0/dFtpXT10aGlzLl9jb3B5T2JqKGVbaV0pOnRbaV09ZVtpXTtyZXR1cm4gdH19LHdpbmRvdy5kaHg0LmlzSUU9bmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJNU0lFIik+PTB8fG5hdmlnYXRvci51c2VyQWdlbnQuaW5kZXhPZigiVHJpZGVudCIpPj0wLHdpbmRvdy5kaHg0LmlzSUU2PW51bGw9PXdpbmRvdy5YTUxIdHRwUmVxdWVzdCYmbmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJNU0lFIik+PTAsd2luZG93LmRoeDQuaXNJRTc9bmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJNU0lFIDcuMCIpPj0wJiZuYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoIlRyaWRlbnQiKTwwLHdpbmRvdy5kaHg0LmlzSUU4PW5hdmlnYXRvci51c2VyQWdlbnQuaW5kZXhPZigiTVNJRSA4LjAiKT49MCYmbmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJUcmlkZW50Iik+PTAsd2luZG93LmRoeDQuaXNJRTk9bmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJNU0lFIDkuMCIpPj0wJiZuYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoIlRyaWRlbnQiKT49MCx3aW5kb3cuZGh4NC5pc0lFMTA9bmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJNU0lFIDEwLjAiKT49MCYmbmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJUcmlkZW50Iik+PTAmJjEhPXdpbmRvdy5uYXZpZ2F0b3IucG9pbnRlckVuYWJsZWQsd2luZG93LmRoeDQuaXNJRTExPW5hdmlnYXRvci51c2VyQWdlbnQuaW5kZXhPZigiVHJpZGVudCIpPj0wJiYxPT13aW5kb3cubmF2aWdhdG9yLnBvaW50ZXJFbmFibGVkLHdpbmRvdy5kaHg0LmlzRWRnZT1uYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoIkVkZ2UiKT49MCx3aW5kb3cuZGh4NC5pc09wZXJhPW5hdmlnYXRvci51c2VyQWdlbnQuaW5kZXhPZigiT3BlcmEiKT49MCx3aW5kb3cuZGh4NC5pc0Nocm9tZT1uYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoIkNocm9tZSIpPj0wJiYhd2luZG93LmRoeDQuaXNFZGdlLHdpbmRvdy5kaHg0LmlzS0hUTUw9KG5hdmlnYXRvci51c2VyQWdlbnQuaW5kZXhPZigiU2FmYXJpIik+PTB8fG5hdmlnYXRvci51c2VyQWdlbnQuaW5kZXhPZigiS29ucXVlcm9yIik+PTApJiYhd2luZG93LmRoeDQuaXNFZGdlLHdpbmRvdy5kaHg0LmlzRkY9bmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJGaXJlZm94Iik+PTAsd2luZG93LmRoeDQuaXNJUGFkPW5hdmlnYXRvci51c2VyQWdlbnQuc2VhcmNoKC9pUGFkL2dpKT49MCx3aW5kb3cuZGh4NC5kbmQ9e2V2czp7fSxwX2VuOih3aW5kb3cuZGh4NC5pc0lFfHx3aW5kb3cuZGh4NC5pc0VkZ2UpJiYod2luZG93Lm5hdmlnYXRvci5wb2ludGVyRW5hYmxlZHx8d2luZG93Lm5hdmlnYXRvci5tc1BvaW50ZXJFbmFibGVkKSxfbVRvdWNoOmZ1bmN0aW9uKGUpe3JldHVybiB3aW5kb3cuZGh4NC5pc0lFMTAmJmUucG9pbnRlclR5cGU9PWUuTVNQT0lOVEVSX1RZUEVfTU9VU0V8fHdpbmRvdy5kaHg0LmlzSUUxMSYmIm1vdXNlIj09ZS5wb2ludGVyVHlwZXx8d2luZG93LmRoeDQuaXNFZGdlJiYibW91c2UiPT1lLnBvaW50ZXJUeXBlfSxfdG91Y2hPbjpmdW5jdGlvbihlKXtudWxsPT1lJiYoZT1kb2N1bWVudC5ib2R5KSxlLnN0eWxlLnRvdWNoQWN0aW9uPWUuc3R5bGUubXNUb3VjaEFjdGlvbj0iIixlPW51bGx9LF90b3VjaE9mZjpmdW5jdGlvbihlKXtudWxsPT1lJiYoZT1kb2N1bWVudC5ib2R5KSxlLnN0eWxlLnRvdWNoQWN0aW9uPWUuc3R5bGUubXNUb3VjaEFjdGlvbj0ibm9uZSIsZT1udWxsfX0sMT09d2luZG93Lm5hdmlnYXRvci5wb2ludGVyRW5hYmxlZD93aW5kb3cuZGh4NC5kbmQuZXZzPXtzdGFydDoicG9pbnRlcmRvd24iLG1vdmU6InBvaW50ZXJtb3ZlIixlbmQ6InBvaW50ZXJ1cCJ9OjE9PXdpbmRvdy5uYXZpZ2F0b3IubXNQb2ludGVyRW5hYmxlZD93aW5kb3cuZGh4NC5kbmQuZXZzPXtzdGFydDoiTVNQb2ludGVyRG93biIsbW92ZToiTVNQb2ludGVyTW92ZSIsZW5kOiJNU1BvaW50ZXJVcCJ9OiJ1bmRlZmluZWQiIT10eXBlb2Ygd2luZG93LmFkZEV2ZW50TGlzdGVuZXImJih3aW5kb3cuZGh4NC5kbmQuZXZzPXtzdGFydDoidG91Y2hzdGFydCIsbW92ZToidG91Y2htb3ZlIixlbmQ6InRvdWNoZW5kIn0pKSwidW5kZWZpbmVkIj09dHlwZW9mIHdpbmRvdy5kaHg0Ll9ldmVudGFibGUmJih3aW5kb3cuZGh4NC5fZXZlbnRhYmxlPWZ1bmN0aW9uKGUsdCl7cmV0dXJuImNsZWFyIj09dD8oZS5kZXRhY2hBbGxFdmVudHMoKSxlLmRoeGV2cz1udWxsLGUuYXR0YWNoRXZlbnQ9bnVsbCxlLmRldGFjaEV2ZW50PW51bGwsZS5jaGVja0V2ZW50PW51bGwsZS5jYWxsRXZlbnQ9bnVsbCxlLmRldGFjaEFsbEV2ZW50cz1udWxsLHZvaWQoZT1udWxsKSk6KGUuZGh4ZXZzPXtkYXRhOnt9fSxlLmF0dGFjaEV2ZW50PWZ1bmN0aW9uKGUsdCl7ZT1TdHJpbmcoZSkudG9Mb3dlckNhc2UoKSx0aGlzLmRoeGV2cy5kYXRhW2VdfHwodGhpcy5kaHhldnMuZGF0YVtlXT17fSk7dmFyIGk9d2luZG93LmRoeDQubmV3SWQoKTtyZXR1cm4gdGhpcy5kaHhldnMuZGF0YVtlXVtpXT10LGl9LGUuZGV0YWNoRXZlbnQ9ZnVuY3Rpb24oZSl7Zm9yKHZhciB0IGluIHRoaXMuZGh4ZXZzLmRhdGEpe3ZhciBpPTA7Zm9yKHZhciBuIGluIHRoaXMuZGh4ZXZzLmRhdGFbdF0pbj09ZT8odGhpcy5kaHhldnMuZGF0YVt0XVtuXT1udWxsLGRlbGV0ZSB0aGlzLmRoeGV2cy5kYXRhW3RdW25dKTppKys7MD09aSYmKHRoaXMuZGh4ZXZzLmRhdGFbdF09bnVsbCxkZWxldGUgdGhpcy5kaHhldnMuZGF0YVt0XSl9fSxlLmNoZWNrRXZlbnQ9ZnVuY3Rpb24oZSl7cmV0dXJuIGU9U3RyaW5nKGUpLnRvTG93ZXJDYXNlKCksbnVsbCE9dGhpcy5kaHhldnMuZGF0YVtlXX0sZS5jYWxsRXZlbnQ9ZnVuY3Rpb24oZSx0KXtpZihlPVN0cmluZyhlKS50b0xvd2VyQ2FzZSgpLG51bGw9PXRoaXMuZGh4ZXZzLmRhdGFbZV0pcmV0dXJuITA7dmFyIGk9ITA7Zm9yKHZhciBuIGluIHRoaXMuZGh4ZXZzLmRhdGFbZV0paT10aGlzLmRoeGV2cy5kYXRhW2VdW25dLmFwcGx5KHRoaXMsdCkmJmk7cmV0dXJuIGl9LGUuZGV0YWNoQWxsRXZlbnRzPWZ1bmN0aW9uKCl7Zm9yKHZhciBlIGluIHRoaXMuZGh4ZXZzLmRhdGEpe2Zvcih2YXIgdCBpbiB0aGlzLmRoeGV2cy5kYXRhW2VdKXRoaXMuZGh4ZXZzLmRhdGFbZV1bdF09bnVsbCxkZWxldGUgdGhpcy5kaHhldnMuZGF0YVtlXVt0XTt0aGlzLmRoeGV2cy5kYXRhW2VdPW51bGwsZGVsZXRlIHRoaXMuZGh4ZXZzLmRhdGFbZV19fSx2b2lkKGU9bnVsbCkpfSxkaHg0Ll9ldmVudGFibGUoZGh4NCkpLCJ1bmRlZmluZWQiPT10eXBlb2Ygd2luZG93LmRodG1seCYmKHdpbmRvdy5kaHRtbHg9e2V4dGVuZDpmdW5jdGlvbihlLHQpe2Zvcih2YXIgaSBpbiB0KWVbaV18fChlW2ldPXRbaV0pO3JldHVybiBlfSxleHRlbmRfYXBpOmZ1bmN0aW9uKGUsdCxpKXt2YXIgbj13aW5kb3dbZV07biYmKHdpbmRvd1tlXT1mdW5jdGlvbihlKXtpZihlJiYib2JqZWN0Ij09dHlwZW9mIGUmJiFlLnRhZ05hbWUpe3ZhciBpPW4uYXBwbHkodGhpcyx0Ll9pbml0P3QuX2luaXQoZSk6YXJndW1lbnRzKTtmb3IodmFyIG8gaW4gZGh0bWx4KXRbb10mJnRoaXNbdFtvXV0oZGh0bWx4W29dKTtmb3IodmFyIG8gaW4gZSl0W29dP3RoaXNbdFtvXV0oZVtvXSk6MD09PW8uaW5kZXhPZigib24iKSYmdGhpcy5hdHRhY2hFdmVudChvLGVbb10pfWVsc2UgdmFyIGk9bi5hcHBseSh0aGlzLGFyZ3VtZW50cyk7cmV0dXJuIHQuX3BhdGNoJiZ0Ll9wYXRjaCh0aGlzKSxpfHx0aGlzfSx3aW5kb3dbZV0ucHJvdG90eXBlPW4ucHJvdG90eXBlLGkmJmRodG1seC5leHRlbmQod2luZG93W2VdLnByb3RvdHlwZSxpKSl9LHVybDpmdW5jdGlvbihlKXtyZXR1cm4tMSE9ZS5pbmRleE9mKCI/Iik/IiYiOiI/In19KSxfaXNGRj0hMSxfaXNJRT0hMSxfaXNPcGVyYT0hMSxfaXNLSFRNTD0hMSxfaXNNYWNPUz0hMSxfaXNDaHJvbWU9ITEsX0ZGcnY9ITEsX0tIVE1McnY9ITEsX09wZXJhUnY9ITEsLTEhPW5hdmlnYXRvci51c2VyQWdlbnQuaW5kZXhPZigiTWFjaW50b3NoIikmJihfaXNNYWNPUz0hMCksbmF2aWdhdG9yLnVzZXJBZ2VudC50b0xvd2VyQ2FzZSgpLmluZGV4T2YoImNocm9tZSIpPi0xJiYoX2lzQ2hyb21lPSEwKSwtMSE9bmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJTYWZhcmkiKXx8LTEhPW5hdmlnYXRvci51c2VyQWdlbnQuaW5kZXhPZigiS29ucXVlcm9yIik/KF9LSFRNTHJ2PXBhcnNlRmxvYXQobmF2aWdhdG9yLnVzZXJBZ2VudC5zdWJzdHIobmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJTYWZhcmkiKSs3LDUpKSxfS0hUTUxydj41MjU/KF9pc0ZGPSEwLF9GRnJ2PTEuOSk6X2lzS0hUTUw9ITApOi0xIT1uYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoIk9wZXJhIik/KF9pc09wZXJhPSEwLF9PcGVyYVJ2PXBhcnNlRmxvYXQobmF2aWdhdG9yLnVzZXJBZ2VudC5zdWJzdHIobmF2aWdhdG9yLnVzZXJBZ2VudC5pbmRleE9mKCJPcGVyYSIpKzYsMykpKTotMSE9bmF2aWdhdG9yLmFwcE5hbWUuaW5kZXhPZigiTWljcm9zb2Z0Iik/KF9pc0lFPSEwLCgtMSE9bmF2aWdhdG9yLmFwcFZlcnNpb24uaW5kZXhPZigiTVNJRSA4LjAiKXx8LTEhPW5hdmlnYXRvci5hcHBWZXJzaW9uLmluZGV4T2YoIk1TSUUgOS4wIil8fC0xIT1uYXZpZ2F0b3IuYXBwVmVyc2lvbi5pbmRleE9mKCJNU0lFIDEwLjAiKXx8ZG9jdW1lbnQuZG9jdW1lbnRNb2RlPjcpJiYiQmFja0NvbXBhdCIhPWRvY3VtZW50LmNvbXBhdE1vZGUmJihfaXNJRT04KSk6Ik5ldHNjYXBlIj09bmF2aWdhdG9yLmFwcE5hbWUmJi0xIT1uYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoIlRyaWRlbnQiKT9faXNJRT04OihfaXNGRj0hMCxfRkZydj1wYXJzZUZsb2F0KG5hdmlnYXRvci51c2VyQWdlbnQuc3BsaXQoInJ2OiIpWzFdKSksInVuZGVmaW5lZCI9PXR5cGVvZiB3aW5kb3cuZGh0bWx4RXZlbnQsbnVsbD09ZGh0bWx4RXZlbnQudG91Y2hEZWxheSYmKGRodG1seEV2ZW50LnRvdWNoRGVsYXk9MmUzKSwidW5kZWZpbmVkIj09dHlwZW9mIGRodG1seEV2ZW50LmluaXRUb3VjaCYmKGRodG1seEV2ZW50LmluaXRUb3VjaD1mdW5jdGlvbigpe2Z1bmN0aW9uIGUoKXtpZihpKXt2YXIgZT1kb2N1bWVudC5jcmVhdGVFdmVudCgiSFRNTEV2ZW50cyIpO2UuaW5pdEV2ZW50KCJkYmxjbGljayIsITAsITApLGkuZGlzcGF0Y2hFdmVudChlKSx0PWk9bnVsbH19dmFyIHQsaSxuLG87ZGh0bWx4RXZlbnQoZG9jdW1lbnQuYm9keSwidG91Y2hzdGFydCIsZnVuY3Rpb24ocil7aT1yLnRvdWNoZXNbMF0udGFyZ2V0LG49ci50b3VjaGVzWzBdLmNsaWVudFgsbz1yLnRvdWNoZXNbMF0uY2xpZW50WSx0PXdpbmRvdy5zZXRUaW1lb3V0KGUsZGh0bWx4RXZlbnQudG91Y2hEZWxheSl9KSxkaHRtbHhFdmVudChkb2N1bWVudC5ib2R5LCJ0b3VjaG1vdmUiLGZ1bmN0aW9uKGUpe3QmJihNYXRoLmFicyhlLnRvdWNoZXNbMF0uY2xpZW50WC1uKT41MHx8TWF0aC5hYnMoZS50b3VjaGVzWzBdLmNsaWVudFktbyk+NTApJiYod2luZG93LmNsZWFyVGltZW91dCh0KSx0PWk9ITEpfSksZGh0bWx4RXZlbnQoZG9jdW1lbnQuYm9keSwidG91Y2hlbmQiLGZ1bmN0aW9uKGUpe3QmJih3aW5kb3cuY2xlYXJUaW1lb3V0KHQpLHQ9aT0hMSl9KSxkaHRtbHhFdmVudC5pbml0VG91Y2g9ZnVuY3Rpb24oKXt9fSksZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2RvQ29udENsaWNrPWZ1bmN0aW9uKGUsdCl7aWYoIXQmJjIhPWUuYnV0dG9uKXJldHVybiB0aGlzLl9hY01lbnUmJih0aGlzLl9hY01lbnUuaGlkZUNvbnRleHRNZW51P3RoaXMuX2FjTWVudS5oaWRlQ29udGV4dE1lbnUoKTp0aGlzLmNNZW51Ll9jb250ZXh0RW5kKCkpLCEwO2Zvcih2YXIgaT1faXNJRT9lLnNyY0VsZW1lbnQ6ZS50YXJnZXQ7aSYmIkJPRFkiIT1pLnRhZ05hbWUmJiFpLnBhcmVudE9iamVjdDspaT1pLnBhcmVudE5vZGU7aWYoIWl8fCFpLnBhcmVudE9iamVjdClyZXR1cm4hMDt2YXIgbj1pLnBhcmVudE9iamVjdDtpZih0aGlzLmNhbGxFdmVudCgib25SaWdodENsaWNrIixbbi5pZCxlXSl8fCgoZS5zcmNFbGVtZW50fHxlLnRhcmdldCkub25jb250ZXh0bWVudT1mdW5jdGlvbihlKXtyZXR1cm4oZXx8ZXZlbnQpLmNhbmNlbEJ1YmJsZT0hMCwhMX0pLHRoaXMuX2FjTWVudT1uLmNNZW51fHx0aGlzLmNNZW51LHRoaXMuX2FjTWVudSl7aWYoIXRoaXMuY2FsbEV2ZW50KCJvbkJlZm9yZUNvbnRleHRNZW51Iixbbi5pZF0pKXJldHVybiEwO2lmKF9pc01hY09TfHwoKGUuc3JjRWxlbWVudHx8ZS50YXJnZXQpLm9uY29udGV4dG1lbnU9ZnVuY3Rpb24oZSl7cmV0dXJuKGV8fGV2ZW50KS5jYW5jZWxCdWJibGU9ITAsITF9KSx0aGlzLl9hY01lbnUuc2hvd0NvbnRleHRNZW51KXt2YXIgbz13aW5kb3cuZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LHI9d2luZG93LmRvY3VtZW50LmJvZHksbD1uZXcgQXJyYXkoby5zY3JvbGxMZWZ0fHxyLnNjcm9sbExlZnQsby5zY3JvbGxUb3B8fHIuc2Nyb2xsVG9wKTtpZihfaXNJRSl2YXIgcz1lLmNsaWVudFgrbFswXSxhPWUuY2xpZW50WStsWzFdO2Vsc2UgdmFyIHM9ZS5wYWdlWCxhPWUucGFnZVk7dGhpcy5fYWNNZW51LnNob3dDb250ZXh0TWVudShzLTEsYS0xKSx0aGlzLmNvbnRleHRJRD1uLmlkLGUuY2FuY2VsQnViYmxlPSEwLHRoaXMuX2FjTWVudS5fc2tpcF9oaWRlPSEwfWVsc2UgaS5jb250ZXh0TWVudUlkPW4uaWQsaS5jb250ZXh0TWVudT10aGlzLl9hY01lbnUsaS5hPXRoaXMuX2FjTWVudS5fY29udGV4dFN0YXJ0LGkuYShpLGUpLGkuYT1udWxsO3JldHVybiExfXJldHVybiEwfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5lbmFibGVJRUltYWdlRml4PWZ1bmN0aW9uKGUpe2U/KHRoaXMuX2dldEltZz1mdW5jdGlvbigpe3ZhciBlPWRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoIkRJViIpO3JldHVybiBlLmlubmVySFRNTD0iJm5ic3A7IixlLmNsYXNzTmFtZT0iZGh4X2JnX2ltZ19maXgiLGV9LHRoaXMuX3NldFNyYz1mdW5jdGlvbihlLHQpe2Uuc3R5bGUuYmFja2dyb3VuZEltYWdlPSJ1cmwoIit0KyIpIn0sdGhpcy5fZ2V0U3JjPWZ1bmN0aW9uKGUpe3ZhciB0PWUuc3R5bGUuYmFja2dyb3VuZEltYWdlO3JldHVybiB0LnN1YnN0cig0LHQubGVuZ3RoLTUpLnJlcGxhY2UoLyheIil8KCIkKS9nLCIiKX0pOih0aGlzLl9nZXRJbWc9ZnVuY3Rpb24oZSl7cmV0dXJuIGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoZT09dGhpcy5yb290SWQ/ImRpdiI6ImltZyIpfSx0aGlzLl9zZXRTcmM9ZnVuY3Rpb24oZSx0KXtlLnNyYz10fSx0aGlzLl9nZXRTcmM9ZnVuY3Rpb24oZSl7cmV0dXJuIGUuc3JjfSl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLmRlc3RydWN0b3I9ZnVuY3Rpb24oKXtmb3IodmFyIGUgaW4gdGhpcy5faWRwdWxsKXt2YXIgdD10aGlzLl9pZHB1bGxbZV07dCYmKHQucGFyZW50T2JqZWN0PW51bGwsdC50cmVlTm9kPW51bGwsdC5jaGlsZE5vZGVzPW51bGwsdC5zcGFuPW51bGwsdC50ci5ub2RlbT1udWxsLHQudHI9bnVsbCx0Lmh0bWxOb2RlLm9iakJlbG9uZz1udWxsLHQuaHRtbE5vZGU9bnVsbCx0aGlzLl9pZHB1bGxbZV09bnVsbCl9dGhpcy5wYXJlbnRPYmplY3QuaW5uZXJIVE1MPSIiLHRoaXMuYWxsVHJlZS5vbnNlbGVjdHN0YXJ0PW51bGwsdGhpcy5hbGxUcmVlLm9uY29udGV4dG1lbnU9bnVsbCx0aGlzLmFsbFRyZWUub25tb3VzZWRvd249bnVsbDtmb3IodmFyIGUgaW4gdGhpcyl0aGlzW2VdPW51bGx9LGNPYmplY3QucHJvdG90eXBlPW5ldyBPYmplY3QsY09iamVjdC5wcm90b3R5cGUuY2xvbmU9ZnVuY3Rpb24oKXtmdW5jdGlvbiBlKCl7fXJldHVybiBlLnByb3RvdHlwZT10aGlzLG5ldyBlfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fZ2xvYmFsSWRTdG9yYWdlQWRkPWZ1bmN0aW9uKGUsdCl7cmV0dXJuIHRoaXMuX2dsb2JhbElkU3RvcmFnZUZpbmQoZSwxLDEpPyhlPWUrIl8iKyhuZXcgRGF0ZSkudmFsdWVPZigpLHRoaXMuX2dsb2JhbElkU3RvcmFnZUFkZChlLHQpKToodGhpcy5faWRwdWxsW2VdPXQsdGhpcy5fcHVsbFNpemUrKyxlKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2dsb2JhbElkU3RvcmFnZVN1Yj1mdW5jdGlvbihlKXt0aGlzLl9pZHB1bGxbZV0mJih0aGlzLl91bnNlbGVjdEl0ZW0odGhpcy5faWRwdWxsW2VdKSx0aGlzLl9pZHB1bGxbZV09bnVsbCx0aGlzLl9wdWxsU2l6ZS0tKSx0aGlzLl9sb2NrZXImJnRoaXMuX2xvY2tlcltlXSYmKHRoaXMuX2xvY2tlcltlXT0hMSl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLl9nbG9iYWxJZFN0b3JhZ2VGaW5kPWZ1bmN0aW9uKGUsdCxpLG4pe3ZhciBvPXRoaXMuX2lkcHVsbFtlXTtpZihvKXtpZihvLnVuUGFyc2VkJiYhaSYmdGhpcy5yZVBhcnNlKG8sMCksdGhpcy5fc3JuZCYmIW8uaHRtbE5vZGUmJnRoaXMuX2J1aWxkU1JORChvLGkpLG4mJnRoaXMuX2Vkc2Jwc0EpZm9yKHZhciByPTA7cjx0aGlzLl9lZHNicHNBLmxlbmd0aDtyKyspaWYodGhpcy5fZWRzYnBzQVtyXVsyXT09ZSlyZXR1cm4gZGh4NC5jYWxsRXZlbnQoIm9uZ2V0SXRlbUVycm9yIixbIlJlcXVlc3RlZCBpdGVtIHN0aWxsIGluIHBhcnNpbmcgcHJvY2Vzcy4iLGVdKSxudWxsO3JldHVybiBvfXJldHVybiB0aGlzLnNsb3dQYXJzZSYmMCE9ZSYmIXQ/dGhpcy5wcmVQYXJzZShlKTpudWxsfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fZHJhd05ld1RyPWZ1bmN0aW9uKGUsdCl7dmFyIGk9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgidHIiKSxuPWRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInRkIiksbz1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJ0ZCIpO3JldHVybiBuLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCIgIikpLG8uY29sU3Bhbj0zLG8uYXBwZW5kQ2hpbGQoZSksaS5hcHBlbmRDaGlsZChuKSxpLmFwcGVuZENoaWxkKG8pLGl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLnBhcnNlPWZ1bmN0aW9uKGUsdCxpKXtpZigic3RyaW5nIj09dHlwZW9mIHQmJihpPXQsdD1udWxsKSwianNvbiI9PT1pKXJldHVybiB0aGlzLl9sb2FkSlNPTk9iamVjdChlLHQpO2lmKCJjc3YiPT09aSlyZXR1cm4gdGhpcy5fbG9hZENTVlN0cmluZyhlLHQpO2lmKCJqc2FycmF5Ij09PWkpcmV0dXJuIHRoaXMuX2xvYWRKU0FycmF5KGUsdCk7dmFyIG49dGhpczt0aGlzLnBhcnNDb3VudHx8dGhpcy5jYWxsRXZlbnQoIm9uWExTIixbbixudWxsXSksdGhpcy54bWxzdGF0ZT0xLHRoaXMuWE1MTG9hZGVyKHtyZXNwb25zZVhNTDpkaHg0LmFqYXgucGFyc2UoZSl9LHQpfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fYXR0YWNoQ2hpbGROb2RlPWZ1bmN0aW9uKGUsdCxpLG4sbyxyLGwscyxhLGQsaCl7ZCYmZC5wYXJlbnRPYmplY3QmJihlPWQucGFyZW50T2JqZWN0KSwwPT1lLlhNTGxvYWQmJnRoaXMuWE1Mc291cmNlJiYhdGhpcy5YTUxsb2FkaW5nV2FybmluZyYmKGUuWE1MbG9hZD0xLHRoaXMuX2xvYWREeW5YTUwoZS5pZCkpO3ZhciBjPWUuY2hpbGRzQ291bnQsdT1lLmNoaWxkTm9kZXM7aWYoaCYmaC50ci5wcmV2aW91c1NpYmxpbmcmJihoLnRyLnByZXZpb3VzU2libGluZy5wcmV2aW91c1NpYmxpbmc/ZD1oLnRyLnByZXZpb3VzU2libGluZy5ub2RlbTpzPXMucmVwbGFjZSgiVE9QIiwiIikrIixUT1AiKSxkKXt2YXIgcCxfO2ZvcihwPTA7Yz5wO3ArKylpZih1W3BdPT1kKXtmb3IoXz1jO18hPXA7Xy0tKXVbMStfXT11W19dO2JyZWFrfXArKyxjPXB9aWYocylmb3IodmFyIG09cy5zcGxpdCgiLCIpLGc9MDtnPG0ubGVuZ3RoO2crKylzd2l0Y2gobVtnXSl7Y2FzZSJUT1AiOmZvcihlLmNoaWxkc0NvdW50PjAmJihkPW5ldyBPYmplY3QsZC50cj1lLmNoaWxkTm9kZXNbMF0udHIucHJldmlvdXNTaWJsaW5nKSxlLl9oYXNfdG9wPSEwLHA9YztwPjA7cC0tKXVbcF09dVtwLTFdO2M9MH12YXIgZjsoZj10aGlzLl9pZHB1bGxbdF0pJiYtMT09Zi5zcGFufHwoZj11W2NdPW5ldyBkaHRtbFhUcmVlSXRlbU9iamVjdCh0LGksZSx0aGlzLG4sMSksdD11W2NdLmlkLGUuY2hpbGRzQ291bnQrKyksZi5odG1sTm9kZXx8KGYubGFiZWw9aSxmLmh0bWxOb2RlPXRoaXMuX2NyZWF0ZUl0ZW0odGhpcy5jaGVja0JveE9mZj8xOjAsZiksZi5odG1sTm9kZS5vYmpCZWxvbmc9ZiksbyYmKGYuaW1hZ2VzWzBdPW8pLHImJihmLmltYWdlc1sxXT1yKSxsJiYoZi5pbWFnZXNbMl09bCk7dmFyIGI9dGhpcy5fZHJhd05ld1RyKGYuaHRtbE5vZGUpO2lmKCh0aGlzLlhNTGxvYWRpbmdXYXJuaW5nfHx0aGlzLl9oQWRJKSYmKGYuaHRtbE5vZGUucGFyZW50Tm9kZS5wYXJlbnROb2RlLnN0eWxlLmRpc3BsYXk9Im5vbmUiKSxkJiZkLnRyJiZkLnRyLm5leHRTaWJsaW5nP2UuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5pbnNlcnRCZWZvcmUoYixkLnRyLm5leHRTaWJsaW5nKTp0aGlzLnBhcnNpbmdPbj09ZS5pZD90aGlzLnBhcnNlZEFycmF5W3RoaXMucGFyc2VkQXJyYXkubGVuZ3RoXT1iOmUuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5hcHBlbmRDaGlsZChiKSxkJiYhZC5zcGFuJiYoZD1udWxsKSx0aGlzLlhNTHNvdXJjZSYmKGEmJjAhPWE/Zi5YTUxsb2FkPTA6Zi5YTUxsb2FkPTEpLGYudHI9YixiLm5vZGVtPWYsMD09ZS5pdGVtSWQmJihiLmNoaWxkTm9kZXNbMF0uY2xhc3NOYW1lPSJoaWRkZW5Sb3ciKSwoZS5fcl9sb2dpY3x8dGhpcy5fZnJidHIpJiZ0aGlzLl9zZXRTcmMoZi5odG1sTm9kZS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbMF0uY2hpbGROb2Rlc1sxXS5jaGlsZE5vZGVzWzBdLHRoaXMuaW1QYXRoK3RoaXMucmFkaW9BcnJheVswXSkscylmb3IodmFyIG09cy5zcGxpdCgiLCIpLGc9MDtnPG0ubGVuZ3RoO2crKylzd2l0Y2gobVtnXSl7Y2FzZSJTRUxFQ1QiOnRoaXMuc2VsZWN0SXRlbSh0LCExKTticmVhaztjYXNlIkNBTEwiOnRoaXMuc2VsZWN0SXRlbSh0LCEwKTticmVhaztjYXNlIkNISUxEIjpmLlhNTGxvYWQ9MDticmVhaztjYXNlIkNIRUNLRUQiOnRoaXMuWE1MbG9hZGluZ1dhcm5pbmc/dGhpcy5zZXRDaGVja0xpc3QrPXRoaXMuZGxtdHIrdDp0aGlzLnNldENoZWNrKHQsMSk7YnJlYWs7Y2FzZSJIQ0hFQ0tFRCI6dGhpcy5fc2V0Q2hlY2soZiwidW5zdXJlIik7YnJlYWs7Y2FzZSJPUEVOIjpmLm9wZW5NZT0xfWlmKCF0aGlzLlhNTGxvYWRpbmdXYXJuaW5nJiYodGhpcy5fZ2V0T3BlblN0YXRlKGUpPDAmJiF0aGlzLl9oQWRJJiZ0aGlzLm9wZW5JdGVtKGUuaWQpLGQmJih0aGlzLl9jb3JyZWN0UGx1cyhkKSx0aGlzLl9jb3JyZWN0TGluZShkKSksdGhpcy5fY29ycmVjdFBsdXMoZSksdGhpcy5fY29ycmVjdExpbmUoZSksdGhpcy5fY29ycmVjdFBsdXMoZiksZS5jaGlsZHNDb3VudD49MiYmKHRoaXMuX2NvcnJlY3RQbHVzKHVbZS5jaGlsZHNDb3VudC0yXSksdGhpcy5fY29ycmVjdExpbmUodVtlLmNoaWxkc0NvdW50LTJdKSksMiE9ZS5jaGlsZHNDb3VudCYmdGhpcy5fY29ycmVjdFBsdXModVswXSksdGhpcy50c2NoZWNrJiZ0aGlzLl9jb3JyZWN0Q2hlY2tTdGF0ZXMoZSksdGhpcy5fb25yYWRoKSlpZigxPT10aGlzLnhtbHN0YXRlKXt2YXIgdj10aGlzLm9uWExFO3RoaXMub25YTEU9ZnVuY3Rpb24oZSl7dGhpcy5fb25yYWRoKHQpLHYmJnYoZSl9fWVsc2UgdGhpcy5fb25yYWRoKHQpO3JldHVybiBmfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fcGFyc2VJdGVtPWZ1bmN0aW9uKGUsdCxpLG4pe3ZhciBvO2lmKHRoaXMuX3NybmQmJighdGhpcy5faWRwdWxsW289ZS5nZXQoImlkIildfHwhdGhpcy5faWRwdWxsW29dLnNwYW4pKXJldHVybiB2b2lkIHRoaXMuX2FkZEl0ZW1TUk5EKHQuaWQsbyxlKTt2YXIgcj1lLmdldF9hbGwoKTtpZigib2JqZWN0Ij09dHlwZW9mIHRoaXMud2FpdFVwZGF0ZVhNTCYmIXRoaXMud2FpdFVwZGF0ZVhNTFtyLmlkXSlyZXR1cm4gdm9pZCB0aGlzLl9wYXJzZShlLHIuaWQsMSk7bnVsbCE9PXIudGV4dCYmInVuZGVmaW5lZCIhPXR5cGVvZiByLnRleHR8fChyLnRleHQ9ZS5zdWIoIml0ZW10ZXh0Iiksci50ZXh0JiYoci50ZXh0PXIudGV4dC5jb250ZW50KCkpKTt2YXIgbD1bXTtpZihyLnNlbGVjdCYmbC5wdXNoKCJTRUxFQ1QiKSxyLnRvcCYmbC5wdXNoKCJUT1AiKSxyLmNhbGwmJih0aGlzLm5vZGVBc2tpbmdDYWxsPXIuaWQpLC0xPT1yLmNoZWNrZWQ/bC5wdXNoKCJIQ0hFQ0tFRCIpOnIuY2hlY2tlZCYmbC5wdXNoKCJDSEVDS0VEIiksci5vcGVuJiZsLnB1c2goIk9QRU4iKSx0aGlzLndhaXRVcGRhdGVYTUwpaWYodGhpcy5fZ2xvYmFsSWRTdG9yYWdlRmluZChyLmlkKSl2YXIgcz10aGlzLnVwZGF0ZUl0ZW0oci5pZCxyLnRleHQsci5pbTAsci5pbTEsci5pbTIsci5jaGVja2VkLHIuY2hpbGQpO2Vsc2V7MD09dGhpcy5ucGw/bC5wdXNoKCJUT1AiKTppPXQuY2hpbGROb2Rlc1t0aGlzLm5wbF07dmFyIHM9dGhpcy5fYXR0YWNoQ2hpbGROb2RlKHQsci5pZCxyLnRleHQsMCxyLmltMCxyLmltMSxyLmltMixsLmpvaW4oIiwiKSxyLmNoaWxkLDAsaSk7ci5pZD1zLmlkLGk9bnVsbH1lbHNlIHZhciBzPXRoaXMuX2F0dGFjaENoaWxkTm9kZSh0LHIuaWQsci50ZXh0LDAsci5pbTAsci5pbTEsci5pbTIsbC5qb2luKCIsIiksci5jaGlsZCxufHwwLGkpO2lmKHIudG9vbHRpcCYmKHMuc3Bhbi5wYXJlbnROb2RlLnBhcmVudE5vZGUudGl0bGU9ci50b29sdGlwKSxyLnN0eWxlJiYocy5zcGFuLnN0eWxlLmNzc1RleHQ/cy5zcGFuLnN0eWxlLmNzc1RleHQrPSI7IityLnN0eWxlOnMuc3Bhbi5zZXRBdHRyaWJ1dGUoInN0eWxlIixzLnNwYW4uZ2V0QXR0cmlidXRlKCJzdHlsZSIpKyI7ICIrci5zdHlsZSkpLHIucmFkaW8mJihzLl9yX2xvZ2ljPSEwKSxyLm5vY2hlY2tib3gpe3ZhciBhPXMuc3Bhbi5wYXJlbnROb2RlLnByZXZpb3VzU2libGluZy5wcmV2aW91c1NpYmxpbmc7YS5zdHlsZS5kaXNwbGF5PSJub25lIixzLm5vY2hlY2tib3g9ITB9ci5kaXNhYmxlZCYmKG51bGwhPXIuY2hlY2tlZCYmdGhpcy5fc2V0Q2hlY2socyxyLmNoZWNrZWQpLHRoaXMuZGlzYWJsZUNoZWNrYm94KHMsMSkpLHMuX2FjYz1yLmNoaWxkfHwwLHRoaXMucGFyc2VyRXh0ZW5zaW9uJiZ0aGlzLnBhcnNlckV4dGVuc2lvbi5fcGFyc2VFeHRlbnNpb24uY2FsbCh0aGlzLGUscix0P3QuaWQ6MCksdGhpcy5zZXRJdGVtQ29sb3IocyxyLmFDb2wsci5zQ29sKSwiMSI9PXIubG9ja2VkJiZ0aGlzLmxvY2tJdGVtKHMuaWQsITAsITApLChyLmltd2lkdGh8fHIuaW1oZWlnaHQpJiZ0aGlzLnNldEljb25TaXplKHIuaW13aWR0aCxyLmltaGVpZ2h0LHMpLCIwIiE9ci5jbG9zZWFibGUmJiIxIiE9ci5jbG9zZWFibGV8fHRoaXMuc2V0SXRlbUNsb3NlYWJsZShzLHIuY2xvc2VhYmxlKTt2YXIgZD0iIjtyLnRvcG9mZnNldCYmdGhpcy5zZXRJdGVtVG9wT2Zmc2V0KHMsci50b3BvZmZzZXQpLHRoaXMuc2xvd1BhcnNlJiYib2JqZWN0IiE9dHlwZW9mIHRoaXMud2FpdFVwZGF0ZVhNTD8oIXMuY2hpbGRzQ291bnQmJmUuc3ViX2V4aXN0cygiaXRlbSIpJiYocy51blBhcnNlZD1lLmNsb25lKCkpLGUuZWFjaCgidXNlcmRhdGEiLGZ1bmN0aW9uKGUpe3RoaXMuc2V0VXNlckRhdGEoci5pZCxlLmdldCgibmFtZSIpLGUuY29udGVudCgpKX0sdGhpcykpOmUuc3ViX2V4aXN0cygiaXRlbSIpJiYoZD10aGlzLl9wYXJzZShlLHIuaWQsMSkpLCIiIT1kJiYodGhpcy5ub2RlQXNraW5nQ2FsbD1kKSxlLmVhY2goInVzZXJkYXRhIixmdW5jdGlvbih0KXt0aGlzLnNldFVzZXJEYXRhKGUuZ2V0KCJpZCIpLHQuZ2V0KCJuYW1lIiksdC5jb250ZW50KCkpfSx0aGlzKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX3BhcnNlPWZ1bmN0aW9uKGUsdCxpLG4pe2lmKHRoaXMuX3NybmQmJiF0aGlzLnBhcmVudE9iamVjdC5vZmZzZXRIZWlnaHQpe3ZhciBvPXRoaXM7cmV0dXJuIHdpbmRvdy5zZXRUaW1lb3V0KGZ1bmN0aW9uKCl7by5fcGFyc2UoZSx0LGksbil9LDEwMCl9aWYoZS5leGlzdHMoKSl7aWYodGhpcy5za2lwTG9jaz0hMCwhdCl7dD1lLmdldCgiaWQiKSx0aGlzLl9keW5EZWxldGVCcmFuY2hlc1t0XSYmKHRoaXMuZGVsZXRlQ2hpbGRJdGVtcyh0KSx0aGlzLl9keW5EZWxldGVCcmFuY2hlc1t0XS0tLHRoaXMuX2R5bkRlbGV0ZUJyYW5jaGVzW3RdfHxkZWxldGUgdGhpcy5fZHluRGVsZXRlQnJhbmNoZXNbdF0pO3ZhciByPWUuZ2V0KCJkaHhfc2VjdXJpdHkiKTtyJiYoZGh0bWx4LnNlY3VyaXR5X2tleT1yKSxlLmdldCgicmFkaW8iKSYmKHRoaXMuaHRtbE5vZGUuX3JfbG9naWM9ITApLHRoaXMucGFyc2luZ09uPXQsdGhpcy5wYXJzZWRBcnJheT1uZXcgQXJyYXksdGhpcy5zZXRDaGVja0xpc3Q9IiIsdGhpcy5ub2RlQXNraW5nQ2FsbD0iIn12YXIgbD10aGlzLl9nbG9iYWxJZFN0b3JhZ2VGaW5kKHQpO2lmKCFsKXJldHVybiBkaHg0LmNhbGxFdmVudCgib25EYXRhU3RydWN0dXJlRXJyb3IiLFsiWE1MIHJlZmVycyB0byBub3QgZXhpc3RpbmcgcGFyZW50Il0pO2lmKHRoaXMucGFyc0NvdW50PXRoaXMucGFyc0NvdW50P3RoaXMucGFyc0NvdW50KzE6MSx0aGlzLlhNTGxvYWRpbmdXYXJuaW5nPTEsIWwuY2hpbGRzQ291bnR8fG58fHRoaXMuX2Vkc2Jwc3x8bC5faGFzX3RvcCl2YXIgcz0wO2Vsc2UgdmFyIHM9MDtpZih0aGlzLm5wbD0wLGUuZWFjaCgiaXRlbSIsZnVuY3Rpb24obixvKXtyZXR1cm4gbC5YTUxsb2FkPTEsdGhpcy5fcGFyc2VJdGVtKG4sbCwwLHMpLHRoaXMuX2Vkc2JwcyYmdGhpcy5ucGw9PXRoaXMuX2Vkc2Jwc0M/KHRoaXMuX2Rpc3RyaWJ1dGVkU3RhcnQoZSxvKzEsdCxpLGwuY2hpbGRzQ291bnQpLC0xKTp2b2lkIHRoaXMubnBsKyt9LHRoaXMsbiksIWkpe2lmKGUuZWFjaCgidXNlcmRhdGEiLGZ1bmN0aW9uKHQpe3RoaXMuc2V0VXNlckRhdGEoZS5nZXQoImlkIiksdC5nZXQoIm5hbWUiKSx0LmNvbnRlbnQoKSl9LHRoaXMpLGwuWE1MbG9hZD0xLHRoaXMud2FpdFVwZGF0ZVhNTCl7dGhpcy53YWl0VXBkYXRlWE1MPSExO2Zvcih2YXIgYT1sLmNoaWxkc0NvdW50LTE7YT49MDthLS0pbC5jaGlsZE5vZGVzW2FdLl9kbWFyayYmdGhpcy5kZWxldGVJdGVtKGwuY2hpbGROb2Rlc1thXS5pZCl9Zm9yKHZhciBhPSh0aGlzLl9nbG9iYWxJZFN0b3JhZ2VGaW5kKHRoaXMucGFyc2luZ09uKSwwKTthPHRoaXMucGFyc2VkQXJyYXkubGVuZ3RoO2ErKylsLmh0bWxOb2RlLmNoaWxkTm9kZXNbMF0uYXBwZW5kQ2hpbGQodGhpcy5wYXJzZWRBcnJheVthXSk7dGhpcy5wYXJzZWRBcnJheT1bXSx0aGlzLmxhc3RMb2FkZWRYTUxJZD10LHRoaXMuWE1MbG9hZGluZ1dhcm5pbmc9MDtmb3IodmFyIGQ9dGhpcy5zZXRDaGVja0xpc3Quc3BsaXQodGhpcy5kbG10ciksaD0wO2g8ZC5sZW5ndGg7aCsrKWRbaF0mJnRoaXMuc2V0Q2hlY2soZFtoXSwxKTt0aGlzLlhNTHNvdXJjZSYmdGhpcy50c2NoZWNrJiZ0aGlzLnNtY2hlY2smJmwuaWQhPXRoaXMucm9vdElkJiYoMD09PWwuY2hlY2tzdGF0ZT90aGlzLl9zZXRTdWJDaGVja2VkKDAsbCk6MT09PWwuY2hlY2tzdGF0ZSYmdGhpcy5fc2V0U3ViQ2hlY2tlZCgxLGwpKSx0aGlzLl9yZWRyYXdGcm9tKHRoaXMsbnVsbCxuKSxlLmdldCgib3JkZXIiKSYmIm5vbmUiIT1lLmdldCgib3JkZXIiKSYmdGhpcy5fcmVvcmRlckJyYW5jaChsLGUuZ2V0KCJvcmRlciIpLCEwKSwiIiE9dGhpcy5ub2RlQXNraW5nQ2FsbCYmdGhpcy5jYWxsRXZlbnQoIm9uQ2xpY2siLFt0aGlzLm5vZGVBc2tpbmdDYWxsLHRoaXMuZ2V0U2VsZWN0ZWRJdGVtSWQoKV0pLHRoaXMuX2JyYW5jaFVwZGF0ZSYmdGhpcy5fYnJhbmNoVXBkYXRlTmV4dChlKX1pZigxPT10aGlzLnBhcnNDb3VudCl7aWYodGhpcy5wYXJzaW5nT249bnVsbCx0aGlzLl9zcm5kJiZsLmlkIT10aGlzLnJvb3RJZCYmKHRoaXMucHJlcGFyZVNSKGwuaWQpLHRoaXMuWE1Mc291cmNlJiZ0aGlzLm9wZW5JdGVtKGwuaWQpKSxlLnRocm91Z2goIml0ZW0iLCJvcGVuIixudWxsLGZ1bmN0aW9uKGUpe3RoaXMub3Blbkl0ZW0oZS5nZXQoImlkIikpfSx0aGlzKSwhdGhpcy5fZWRzYnBzfHwhdGhpcy5fZWRzYnBzQS5sZW5ndGgpe3ZhciBjPXRoaXM7d2luZG93LnNldFRpbWVvdXQoZnVuY3Rpb24oKXtjLmNhbGxFdmVudCgib25YTEUiLFtjLHRdKX0sMSksdGhpcy54bWxzdGF0ZT0wfXRoaXMuc2tpcExvY2s9ITF9dGhpcy5wYXJzQ291bnQtLTt2YXIgYz10aGlzO3JldHVybiB0aGlzLl9lZHNicHMmJndpbmRvdy5zZXRUaW1lb3V0KGZ1bmN0aW9uKCl7Yy5fZGlzdHJpYnV0ZWRTdGVwKHQpfSx0aGlzLl9lZHNicHNEKSwhaSYmdGhpcy5vblhMRSYmdGhpcy5vblhMRSh0aGlzLHQpLHRoaXMubm9kZUFza2luZ0NhbGx9fSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fcmVkcmF3RnJvbT1mdW5jdGlvbihlLHQsaSxuKXtpZih0KW89dDtlbHNle3ZhciBvPWUuX2dsb2JhbElkU3RvcmFnZUZpbmQoZS5sYXN0TG9hZGVkWE1MSWQpO2lmKGUubGFzdExvYWRlZFhNTElkPS0xLCFvKXJldHVybiAwfWZvcih2YXIgcj0wLGw9aT9pLTE6MDtsPG8uY2hpbGRzQ291bnQ7bCsrKWlmKHRoaXMuX2JyYW5jaFVwZGF0ZSYmMSE9dGhpcy5fZ2V0T3BlblN0YXRlKG8pfHx0JiYxIT1ufHwoby5jaGlsZE5vZGVzW2xdLmh0bWxOb2RlLnBhcmVudE5vZGUucGFyZW50Tm9kZS5zdHlsZS5kaXNwbGF5PSIiKSwxPT1vLmNoaWxkTm9kZXNbbF0ub3Blbk1lJiYodGhpcy5fb3Blbkl0ZW0oby5jaGlsZE5vZGVzW2xdKSxvLmNoaWxkTm9kZXNbbF0ub3Blbk1lPTApLGUuX3JlZHJhd0Zyb20oZSxvLmNoaWxkTm9kZXNbbF0pLG51bGwhPXRoaXMuY2hpbGRDYWxjKXtpZigoby5jaGlsZE5vZGVzW2xdLnVuUGFyc2VkfHwhby5jaGlsZE5vZGVzW2xdLlhNTGxvYWQmJnRoaXMuWE1Mc291cmNlKSYmKG8uY2hpbGROb2Rlc1tsXS5fYWNjP28uY2hpbGROb2Rlc1tsXS5zcGFuLmlubmVySFRNTD1vLmNoaWxkTm9kZXNbbF0ubGFiZWwrdGhpcy5odG1sY0Erby5jaGlsZE5vZGVzW2xdLl9hY2MrdGhpcy5odG1sY0I6by5jaGlsZE5vZGVzW2xdLnNwYW4uaW5uZXJIVE1MPW8uY2hpbGROb2Rlc1tsXS5sYWJlbCksby5jaGlsZE5vZGVzW2xdLmNoaWxkTm9kZXMubGVuZ3RoJiZ0aGlzLmNoaWxkQ2FsYyl7aWYoMT09dGhpcy5jaGlsZENhbGMmJihvLmNoaWxkTm9kZXNbbF0uc3Bhbi5pbm5lckhUTUw9by5jaGlsZE5vZGVzW2xdLmxhYmVsK3RoaXMuaHRtbGNBK28uY2hpbGROb2Rlc1tsXS5jaGlsZHNDb3VudCt0aGlzLmh0bWxjQiksMj09dGhpcy5jaGlsZENhbGMpe3ZhciBzPW8uY2hpbGROb2Rlc1tsXS5jaGlsZHNDb3VudC0oby5jaGlsZE5vZGVzW2xdLnB1cmVDaGlsZHN8fDApO3MmJihvLmNoaWxkTm9kZXNbbF0uc3Bhbi5pbm5lckhUTUw9by5jaGlsZE5vZGVzW2xdLmxhYmVsK3RoaXMuaHRtbGNBK3MrdGhpcy5odG1sY0IpLG8ucHVyZUNoaWxkcz9vLnB1cmVDaGlsZHMrKzpvLnB1cmVDaGlsZHM9MX1pZigzPT10aGlzLmNoaWxkQ2FsYyYmKG8uY2hpbGROb2Rlc1tsXS5zcGFuLmlubmVySFRNTD1vLmNoaWxkTm9kZXNbbF0ubGFiZWwrdGhpcy5odG1sY0Erby5jaGlsZE5vZGVzW2xdLl9hY2MrdGhpcy5odG1sY0IpLDQ9PXRoaXMuY2hpbGRDYWxjKXt2YXIgcz1vLmNoaWxkTm9kZXNbbF0uX2FjYztzJiYoby5jaGlsZE5vZGVzW2xdLnNwYW4uaW5uZXJIVE1MPW8uY2hpbGROb2Rlc1tsXS5sYWJlbCt0aGlzLmh0bWxjQStzK3RoaXMuaHRtbGNCKX19ZWxzZSA0PT10aGlzLmNoaWxkQ2FsYyYmcisrO3IrPW8uY2hpbGROb2Rlc1tsXS5fYWNjLDM9PXRoaXMuY2hpbGRDYWxjJiZyKyt9by51blBhcnNlZHx8IW8uWE1MbG9hZCYmdGhpcy5YTUxzb3VyY2V8fChvLl9hY2M9ciksZS5fY29ycmVjdExpbmUobyksZS5fY29ycmVjdFBsdXMobyksdGhpcy5jaGlsZENhbGMmJiF0JiZlLl9maXhDaGlsZENvdW50TGFiZWwobyl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLl9jcmVhdGVTZWxmPWZ1bmN0aW9uKCl7dmFyIGU9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiZGl2Iik7cmV0dXJuIGUuY2xhc3NOYW1lPSJjb250YWluZXJUYWJsZVN0eWxlIixlLnN0eWxlLndpZHRoPXRoaXMud2lkdGgsZS5zdHlsZS5oZWlnaHQ9dGhpcy5oZWlnaHQsdGhpcy5wYXJlbnRPYmplY3QuYXBwZW5kQ2hpbGQoZSksZX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX3hjbG9zZUFsbD1mdW5jdGlvbihlKXtpZighZS51blBhcnNlZCl7aWYodGhpcy5yb290SWQhPWUuaWQpe2lmKCFlLmh0bWxOb2RlKXJldHVybjtmb3IodmFyIHQ9ZS5odG1sTm9kZS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXMsaT10Lmxlbmd0aCxuPTE7aT5uO24rKyl0W25dLnN0eWxlLmRpc3BsYXk9Im5vbmUiO3RoaXMuX2NvcnJlY3RQbHVzKGUpfWZvcih2YXIgbj0wO248ZS5jaGlsZHNDb3VudDtuKyspZS5jaGlsZE5vZGVzW25dLmNoaWxkc0NvdW50JiZ0aGlzLl94Y2xvc2VBbGwoZS5jaGlsZE5vZGVzW25dKX19LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLl94b3BlbkFsbD1mdW5jdGlvbihlKXt0aGlzLl9IaWRlU2hvdyhlLDIpO2Zvcih2YXIgdD0wO3Q8ZS5jaGlsZHNDb3VudDt0KyspdGhpcy5feG9wZW5BbGwoZS5jaGlsZE5vZGVzW3RdKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2NvcnJlY3RQbHVzPWZ1bmN0aW9uKGUpe2lmKGUuaHRtbE5vZGUpe3ZhciB0PWUuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbMF0ubGFzdENoaWxkLGk9ZS5odG1sTm9kZS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbMF0uY2hpbGROb2Rlc1syXS5jaGlsZE5vZGVzWzBdLG49dGhpcy5saW5lQXJyYXk7aWYodGhpcy5YTUxzb3VyY2UmJiFlLlhNTGxvYWQpe3ZhciBuPXRoaXMucGx1c0FycmF5O2lmKHRoaXMuX3NldFNyYyhpLHRoaXMuaWNvblVSTCtlLmltYWdlc1syXSksdGhpcy5fdHh0aW1nKXJldHVybiB0LmlubmVySFRNTD0iWytdIn1lbHNlIGlmKGUuY2hpbGRzQ291bnR8fGUudW5QYXJzZWQpaWYoZS5odG1sTm9kZS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbMV0mJiJub25lIiE9ZS5odG1sTm9kZS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbMV0uc3R5bGUuZGlzcGxheSl7aWYoIWUud3NpZ24pdmFyIG49dGhpcy5taW51c0FycmF5O2lmKHRoaXMuX3NldFNyYyhpLHRoaXMuaWNvblVSTCtlLmltYWdlc1sxXSksdGhpcy5fdHh0aW1nKXJldHVybiB0LmlubmVySFRNTD0iWy1dIn1lbHNle2lmKCFlLndzaWduKXZhciBuPXRoaXMucGx1c0FycmF5O2lmKHRoaXMuX3NldFNyYyhpLHRoaXMuaWNvblVSTCtlLmltYWdlc1syXSksdGhpcy5fdHh0aW1nKXJldHVybiB0LmlubmVySFRNTD0iWytdIn1lbHNlIHRoaXMuX3NldFNyYyhpLHRoaXMuaWNvblVSTCtlLmltYWdlc1swXSk7dmFyIG89MjtlLnRyZWVOb2QudHJlZUxpbmVzT24/KGUucGFyZW50T2JqZWN0JiYobz10aGlzLl9nZXRDb3VudFN0YXR1cyhlLmlkLGUucGFyZW50T2JqZWN0KSksdGhpcy5fc2V0U3JjKHQsdGhpcy5pbVBhdGgrbltvXSkpOnRoaXMuX3NldFNyYyh0LHRoaXMuaW1QYXRoK25bM10pfX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2NvcnJlY3RMaW5lPWZ1bmN0aW9uKGUpe2lmKGUuaHRtbE5vZGUpe3ZhciB0PWUucGFyZW50T2JqZWN0O2lmKHQpaWYoMCE9dGhpcy5fZ2V0TGluZVN0YXR1cyhlLmlkLHQpJiZ0aGlzLnRyZWVMaW5lc09uKWZvcih2YXIgaT0xO2k8PWUuY2hpbGRzQ291bnQmJmUuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzW2ldO2krKyllLmh0bWxOb2RlLmNoaWxkTm9kZXNbMF0uY2hpbGROb2Rlc1tpXS5jaGlsZE5vZGVzWzBdLnN0eWxlLmJhY2tncm91bmRJbWFnZT0idXJsKCIrdGhpcy5pbVBhdGgrdGhpcy5saW5lQXJyYXlbNV0rIikiLGUuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzW2ldLmNoaWxkTm9kZXNbMF0uc3R5bGUuYmFja2dyb3VuZFJlcGVhdD0icmVwZWF0LXkiO2Vsc2UgZm9yKHZhciBpPTE7aTw9ZS5jaGlsZHNDb3VudCYmZS5odG1sTm9kZS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbaV07aSsrKWUuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzW2ldLmNoaWxkTm9kZXNbMF0uc3R5bGUuYmFja2dyb3VuZEltYWdlPSIiLGUuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzW2ldLmNoaWxkTm9kZXNbMF0uc3R5bGUuYmFja2dyb3VuZFJlcGVhdD0iIn19LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLl9nZXRMaW5lU3RhdHVzPWZ1bmN0aW9uKGUsdCl7cmV0dXJuIHQuY2hpbGROb2Rlc1t0LmNoaWxkc0NvdW50LTFdLmlkPT1lPzA6MX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX0hpZGVTaG93PWZ1bmN0aW9uKGUsdCl7aWYoIXRoaXMuX2xvY2tlcnx8dGhpcy5za2lwTG9ja3x8IXRoaXMuX2xvY2tlcltlLmlkXSl7aWYodGhpcy5YTUxzb3VyY2UmJiFlLlhNTGxvYWQpe2lmKDE9PXQpcmV0dXJuO3JldHVybiBlLlhNTGxvYWQ9MSx2b2lkIHRoaXMuX2xvYWREeW5YTUwoZS5pZCl9ZS51blBhcnNlZCYmdGhpcy5yZVBhcnNlKGUpO3ZhciBpPWUuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzLG49aS5sZW5ndGg7aWYobj4xKXsibm9uZSI9PWlbMV0uc3R5bGUuZGlzcGxheSYmMSE9dHx8Mj09dD9ub2Rlc3R5bGU9IiI6KHRoaXMuYWxsVHJlZS5jaGlsZE5vZGVzWzBdLmJvcmRlcj0iMSIsdGhpcy5hbGxUcmVlLmNoaWxkTm9kZXNbMF0uYm9yZGVyPSIwIixub2Rlc3R5bGU9Im5vbmUiKTtmb3IodmFyIG89MTtuPm87bysrKWlbb10uc3R5bGUuZGlzcGxheT1ub2Rlc3R5bGV9dGhpcy5fY29ycmVjdFBsdXMoZSl9fSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fZ2V0T3BlblN0YXRlPWZ1bmN0aW9uKGUpe2lmKCFlLmh0bWxOb2RlKXJldHVybiAwO3ZhciB0PWUuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzO3JldHVybiB0Lmxlbmd0aDw9MT8wOiJub25lIiE9dFsxXS5zdHlsZS5kaXNwbGF5PzE6LTF9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLm9uUm93Q2xpY2syPWZ1bmN0aW9uKCl7dmFyIGU9dGhpcy5wYXJlbnRPYmplY3QudHJlZU5vZDtyZXR1cm4gZS5jYWxsRXZlbnQoIm9uRGJsQ2xpY2siLFt0aGlzLnBhcmVudE9iamVjdC5pZCxlXSk/KHRoaXMucGFyZW50T2JqZWN0LmNsb3NlYmxlJiYiMCIhPXRoaXMucGFyZW50T2JqZWN0LmNsb3NlYmxlP2UuX0hpZGVTaG93KHRoaXMucGFyZW50T2JqZWN0KTplLl9IaWRlU2hvdyh0aGlzLnBhcmVudE9iamVjdCwyKSxlLmNoZWNrRXZlbnQoIm9uT3BlbkVuZCIpJiYoZS54bWxzdGF0ZT8oZS5fb2llX29uWExFLnB1c2goZS5vblhMRSksZS5vblhMRT1lLl9lcG5GSGUpOmUuY2FsbEV2ZW50KCJvbk9wZW5FbmQiLFt0aGlzLnBhcmVudE9iamVjdC5pZCxlLl9nZXRPcGVuU3RhdGUodGhpcy5wYXJlbnRPYmplY3QpXSkpLCExKTohMX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUub25Sb3dDbGljaz1mdW5jdGlvbigpe3ZhciBlPXRoaXMucGFyZW50T2JqZWN0LnRyZWVOb2Q7cmV0dXJuIGUuY2FsbEV2ZW50KCJvbk9wZW5TdGFydCIsW3RoaXMucGFyZW50T2JqZWN0LmlkLGUuX2dldE9wZW5TdGF0ZSh0aGlzLnBhcmVudE9iamVjdCldKT8odGhpcy5wYXJlbnRPYmplY3QuY2xvc2VibGUmJiIwIiE9dGhpcy5wYXJlbnRPYmplY3QuY2xvc2VibGU/ZS5fSGlkZVNob3codGhpcy5wYXJlbnRPYmplY3QpOmUuX0hpZGVTaG93KHRoaXMucGFyZW50T2JqZWN0LDIpLHZvaWQoZS5jaGVja0V2ZW50KCJvbk9wZW5FbmQiKSYmKGUueG1sc3RhdGU/KGUuX29pZV9vblhMRS5wdXNoKGUub25YTEUpLGUub25YTEU9ZS5fZXBuRkhlKTplLmNhbGxFdmVudCgib25PcGVuRW5kIixbdGhpcy5wYXJlbnRPYmplY3QuaWQsZS5fZ2V0T3BlblN0YXRlKHRoaXMucGFyZW50T2JqZWN0KV0pKSkpOjB9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLmdldFNlbGVjdGVkSXRlbUlkPWZ1bmN0aW9uKCl7Zm9yKHZhciBlPW5ldyBBcnJheSx0PTA7dDx0aGlzLl9zZWxlY3RlZC5sZW5ndGg7dCsrKWVbdF09dGhpcy5fc2VsZWN0ZWRbdF0uaWQ7cmV0dXJuIGUuam9pbih0aGlzLmRsbXRyKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX3NlbGVjdEl0ZW09ZnVuY3Rpb24oZSx0KXtpZih0aGlzLmNoZWNrRXZlbnQoIm9uU2VsZWN0IikmJih0aGlzLl9vblNTQ0ZvbGQ9dGhpcy5nZXRTZWxlY3RlZEl0ZW1JZCgpKSx0aGlzLl9hbXNlbCYmdCYmKHQuY3RybEtleXx8dC5tZXRhS2V5fHx0LnNoaWZ0S2V5KXx8dGhpcy5fdW5zZWxlY3RJdGVtcygpLGUuaV9zZWwmJnRoaXMuX2Ftc2VsJiZ0JiYodC5jdHJsS2V5fHx0Lm1ldGFLZXkpKXRoaXMuX3Vuc2VsZWN0SXRlbShlKTtlbHNlIGlmKCEoZS5pX3NlbHx8dGhpcy5fYW1zZWxTJiYwIT10aGlzLl9zZWxlY3RlZC5sZW5ndGgmJnRoaXMuX3NlbGVjdGVkWzBdLnBhcmVudE9iamVjdCE9ZS5wYXJlbnRPYmplY3QpKWlmKHRoaXMuX2Ftc2VsJiZ0JiZ0LnNoaWZ0S2V5JiYwIT10aGlzLl9zZWxlY3RlZC5sZW5ndGgmJnRoaXMuX3NlbGVjdGVkW3RoaXMuX3NlbGVjdGVkLmxlbmd0aC0xXS5wYXJlbnRPYmplY3Q9PWUucGFyZW50T2JqZWN0KXt2YXIgaT10aGlzLl9nZXRJbmRleCh0aGlzLl9zZWxlY3RlZFt0aGlzLl9zZWxlY3RlZC5sZW5ndGgtMV0pLG49dGhpcy5fZ2V0SW5kZXgoZSk7aWYoaT5uKXt2YXIgbz1pO2k9bixuPW99Zm9yKHZhciByPWk7bj49cjtyKyspZS5wYXJlbnRPYmplY3QuY2hpbGROb2Rlc1tyXS5pX3NlbHx8dGhpcy5fbWFya0l0ZW0oZS5wYXJlbnRPYmplY3QuY2hpbGROb2Rlc1tyXSl9ZWxzZSB0aGlzLl9tYXJrSXRlbShlKTtpZih0aGlzLmNoZWNrRXZlbnQoIm9uU2VsZWN0Iikpe3ZhciBsPXRoaXMuZ2V0U2VsZWN0ZWRJdGVtSWQoKTtsIT10aGlzLl9vblNTQ0ZvbGQmJnRoaXMuY2FsbEV2ZW50KCJvblNlbGVjdCIsW2xdKX19LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLl9tYXJrSXRlbT1mdW5jdGlvbihlKXtlLnNjb2xvciYmKGUuc3Bhbi5zdHlsZS5jb2xvcj1lLnNjb2xvciksZS5zcGFuLmNsYXNzTmFtZT0ic2VsZWN0ZWRUcmVlUm93IixlLnNwYW4ucGFyZW50Tm9kZS5wYXJlbnROb2RlLmNsYXNzTmFtZT0ic2VsZWN0ZWRUcmVlUm93RnVsbCIsZS5pX3NlbD0hMCx0aGlzLl9zZWxlY3RlZFt0aGlzLl9zZWxlY3RlZC5sZW5ndGhdPWV9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLmdldEluZGV4QnlJZD1mdW5jdGlvbihlKXt2YXIgdD10aGlzLl9nbG9iYWxJZFN0b3JhZ2VGaW5kKGUpO3JldHVybiB0P3RoaXMuX2dldEluZGV4KHQpOm51bGx9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLl9nZXRJbmRleD1mdW5jdGlvbihlKXtmb3IodmFyIHQ9ZS5wYXJlbnRPYmplY3QsaT0wO2k8dC5jaGlsZHNDb3VudDtpKyspaWYodC5jaGlsZE5vZGVzW2ldPT1lKXJldHVybiBpfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fdW5zZWxlY3RJdGVtPWZ1bmN0aW9uKGUpe2lmKGUmJmUuaV9zZWwpe2Uuc3Bhbi5jbGFzc05hbWU9InN0YW5kYXJ0VHJlZVJvdyIsZS5zcGFuLnBhcmVudE5vZGUucGFyZW50Tm9kZS5jbGFzc05hbWU9IiIsZS5hY29sb3ImJihlLnNwYW4uc3R5bGUuY29sb3I9ZS5hY29sb3IpLGUuaV9zZWw9ITE7Zm9yKHZhciB0PTA7dDx0aGlzLl9zZWxlY3RlZC5sZW5ndGg7dCsrKWlmKCF0aGlzLl9zZWxlY3RlZFt0XS5pX3NlbCl7dGhpcy5fc2VsZWN0ZWQuc3BsaWNlKHQsMSk7YnJlYWt9fX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX3Vuc2VsZWN0SXRlbXM9ZnVuY3Rpb24oKXtmb3IodmFyIGU9MDtlPHRoaXMuX3NlbGVjdGVkLmxlbmd0aDtlKyspe3ZhciB0PXRoaXMuX3NlbGVjdGVkW2VdO3Quc3Bhbi5jbGFzc05hbWU9InN0YW5kYXJ0VHJlZVJvdyIsdC5zcGFuLnBhcmVudE5vZGUucGFyZW50Tm9kZS5jbGFzc05hbWU9IiIsdC5hY29sb3ImJih0LnNwYW4uc3R5bGUuY29sb3I9dC5hY29sb3IpLHQuaV9zZWw9ITF9dGhpcy5fc2VsZWN0ZWQ9bmV3IEFycmF5fSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5vblJvd1NlbGVjdD1mdW5jdGlvbihlLHQsaSl7ZT1lfHx3aW5kb3cuZXZlbnQ7dmFyIG49dGhpcy5wYXJlbnRPYmplY3Q7dCYmKG49dC5wYXJlbnRPYmplY3QpO3ZhciBvPW4udHJlZU5vZCxyPW8uZ2V0U2VsZWN0ZWRJdGVtSWQoKTtlJiZlLnNraXBVblNlbHx8by5fc2VsZWN0SXRlbShuLGUpLGl8fChuLmFjdGlvbkhhbmRsZXI/bi5hY3Rpb25IYW5kbGVyKG4uaWQscik6by5jYWxsRXZlbnQoIm9uQ2xpY2siLFtuLmlkLHJdKSl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLl9jcmVhdGVJdGVtPWZ1bmN0aW9uKGUsdCxpKXt2YXIgbj1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJ0YWJsZSIpO24uY2VsbFNwYWNpbmc9MCxuLmNlbGxQYWRkaW5nPTAsbi5ib3JkZXI9MCx0aGlzLmhmTW9kZSYmKG4uc3R5bGUudGFibGVMYXlvdXQ9ImZpeGVkIiksbi5zdHlsZS5tYXJnaW49MCxuLnN0eWxlLnBhZGRpbmc9MDt2YXIgbz1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJ0Ym9keSIpLHI9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgidHIiKSxsPWRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInRkIik7aWYobC5jbGFzc05hbWU9InN0YW5kYXJ0VHJlZUltYWdlIix0aGlzLl90eHRpbWcpe3ZhciBzPWRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImRpdiIpO2wuYXBwZW5kQ2hpbGQocykscy5jbGFzc05hbWU9ImRoeF90cmVlX3RleHRTaWduIn1lbHNle3ZhciBzPXRoaXMuX2dldEltZyh0LmlkKTtzLmJvcmRlcj0iMCIsIklNRyI9PXMudGFnTmFtZSYmKHMuYWxpZ249ImFic21pZGRsZSIpLGwuYXBwZW5kQ2hpbGQocykscy5zdHlsZS5wYWRkaW5nPTAscy5zdHlsZS5tYXJnaW49MCxzLnN0eWxlLndpZHRoPXRoaXMuZGVmX2xpbmVfaW1nX3h9dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgidGQiKSxkPXRoaXMuX2dldEltZyh0aGlzLmNCUk9mP3RoaXMucm9vdElkOnQuaWQpO2QuY2hlY2tlZD0wLHRoaXMuX3NldFNyYyhkLHRoaXMuaW1QYXRoK3RoaXMuY2hlY2tBcnJheVswXSksZC5zdHlsZS53aWR0aD0iMThweCIsZC5zdHlsZS5oZWlnaHQ9IjE4cHgiLGV8fChhLnN0eWxlLmRpc3BsYXk9Im5vbmUiKSxhLmFwcGVuZENoaWxkKGQpLHRoaXMuY0JST2Z8fCJJTUciIT1kLnRhZ05hbWV8fChkLmFsaWduPSJhYnNtaWRkbGUiKSxkLm9uY2xpY2s9dGhpcy5vbkNoZWNrQm94Q2xpY2ssZC50cmVlTm9kPXRoaXMsZC5wYXJlbnRPYmplY3Q9dCx3aW5kb3cuX0tIVE1McnY/YS53aWR0aD0iMTZweCI6YS53aWR0aD0iMjBweCI7dmFyIGg9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgidGQiKTtoLmNsYXNzTmFtZT0ic3RhbmRhcnRUcmVlSW1hZ2UiO3ZhciBjPXRoaXMuX2dldEltZyh0aGlzLnRpbWdlbj90LmlkOnRoaXMucm9vdElkKTtjLm9ubW91c2Vkb3duPXRoaXMuX3ByZXZlbnROc0RyYWcsYy5vbmRyYWdzdGFydD10aGlzLl9wcmV2ZW50TnNEcmFnLGMuYm9yZGVyPSIwIix0aGlzLl9haW1ncyYmKGMucGFyZW50T2JqZWN0PXQsCiJJTUciPT1jLnRhZ05hbWUmJihjLmFsaWduPSJhYnNtaWRkbGUiKSxjLm9uY2xpY2s9dGhpcy5vblJvd1NlbGVjdCksaXx8dGhpcy5fc2V0U3JjKGMsdGhpcy5pY29uVVJMK3RoaXMuaW1hZ2VBcnJheVswXSksaC5hcHBlbmRDaGlsZChjKSxjLnN0eWxlLnBhZGRpbmc9MCxjLnN0eWxlLm1hcmdpbj0wLHRoaXMudGltZ2VuPyhoLnN0eWxlLndpZHRoPWMuc3R5bGUud2lkdGg9dGhpcy5kZWZfaW1nX3gsYy5zdHlsZS5oZWlnaHQ9dGhpcy5kZWZfaW1nX3kpOihjLnN0eWxlLndpZHRoPSIwcHgiLGMuc3R5bGUuaGVpZ2h0PSIwcHgiLChfaXNPcGVyYXx8d2luZG93Ll9LSFRNTHJ2KSYmKGguc3R5bGUuZGlzcGxheT0ibm9uZSIpKTt2YXIgdT1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJ0ZCIpO3JldHVybiB1LmNsYXNzTmFtZT0iZGh4VGV4dENlbGwgc3RhbmRhcnRUcmVlUm93Iix0LnNwYW49ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic3BhbiIpLHQuc3Bhbi5jbGFzc05hbWU9InN0YW5kYXJ0VHJlZVJvdyIsdGhpcy5tbGl0ZW1zPyh0LnNwYW4uc3R5bGUud2lkdGg9dGhpcy5tbGl0ZW1zLHQuc3Bhbi5zdHlsZS5kaXNwbGF5PSJibG9jayIpOnUubm9XcmFwPSEwLGRoeDQuaXNJRTg/dS5zdHlsZS53aWR0aD0iOTk5OTlweCI6d2luZG93Ll9LSFRNTHJ2fHwodS5zdHlsZS53aWR0aD0iMTAwJSIpLHQuc3Bhbi5pbm5lckhUTUw9dC5sYWJlbCx1LmFwcGVuZENoaWxkKHQuc3BhbiksdS5wYXJlbnRPYmplY3Q9dCxsLnBhcmVudE9iamVjdD10LHUub25jbGljaz10aGlzLm9uUm93U2VsZWN0LGwub25jbGljaz10aGlzLm9uUm93Q2xpY2ssdS5vbmRibGNsaWNrPXRoaXMub25Sb3dDbGljazIsdGhpcy5ldHRpcCYmKHIudGl0bGU9dC5sYWJlbCksdGhpcy5kcmFnQW5kRHJvcE9mZiYmKHRoaXMuX2FpbWdzJiYodGhpcy5kcmFnZ2VyLmFkZERyYWdnYWJsZUl0ZW0oaCx0aGlzKSxoLnBhcmVudE9iamVjdD10KSx0aGlzLmRyYWdnZXIuYWRkRHJhZ2dhYmxlSXRlbSh1LHRoaXMpKSx0LnNwYW4uc3R5bGUucGFkZGluZ0xlZnQ9IjVweCIsdC5zcGFuLnN0eWxlLnBhZGRpbmdSaWdodD0iNXB4Iix1LnN0eWxlLnZlcnRpY2FsQWxpZ249IiIsdS5zdHlsZS5mb250U2l6ZT0iMTBwdCIsdS5zdHlsZS5jdXJzb3I9dGhpcy5zdHlsZV9wb2ludGVyLHIuYXBwZW5kQ2hpbGQobCksci5hcHBlbmRDaGlsZChhKSxyLmFwcGVuZENoaWxkKGgpLHIuYXBwZW5kQ2hpbGQodSksby5hcHBlbmRDaGlsZChyKSxuLmFwcGVuZENoaWxkKG8pLCh0aGlzLmVobHR8fHRoaXMuY2hlY2tFdmVudCgib25Nb3VzZUluIil8fHRoaXMuY2hlY2tFdmVudCgib25Nb3VzZU91dCIpKSYmKHIub25tb3VzZW1vdmU9dGhpcy5faXRlbU1vdXNlSW4scltfaXNJRT8ib25tb3VzZWxlYXZlIjoib25tb3VzZW91dCJdPXRoaXMuX2l0ZW1Nb3VzZU91dCksbn0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuc2V0T25SaWdodENsaWNrSGFuZGxlcj1mdW5jdGlvbihlKXt0aGlzLmF0dGFjaEV2ZW50KCJvblJpZ2h0Q2xpY2siLGUpfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5zZXRPbkNsaWNrSGFuZGxlcj1mdW5jdGlvbihlKXt0aGlzLmF0dGFjaEV2ZW50KCJvbkNsaWNrIixlKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuc2V0T25TZWxlY3RTdGF0ZUNoYW5nZT1mdW5jdGlvbihlKXt0aGlzLmF0dGFjaEV2ZW50KCJvblNlbGVjdCIsZSl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLnNldFhNTEF1dG9Mb2FkaW5nPWZ1bmN0aW9uKGUpe3RoaXMuWE1Mc291cmNlPWV9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLnNldE9uQ2hlY2tIYW5kbGVyPWZ1bmN0aW9uKGUpe3RoaXMuYXR0YWNoRXZlbnQoIm9uQ2hlY2siLGUpfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5zZXRPbk9wZW5IYW5kbGVyPWZ1bmN0aW9uKGUpe3RoaXMuYXR0YWNoRXZlbnQoIm9uT3BlblN0YXJ0IixlKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuc2V0T25PcGVuU3RhcnRIYW5kbGVyPWZ1bmN0aW9uKGUpe3RoaXMuYXR0YWNoRXZlbnQoIm9uT3BlblN0YXJ0IixlKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuc2V0T25PcGVuRW5kSGFuZGxlcj1mdW5jdGlvbihlKXt0aGlzLmF0dGFjaEV2ZW50KCJvbk9wZW5FbmQiLGUpfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5zZXRPbkRibENsaWNrSGFuZGxlcj1mdW5jdGlvbihlKXt0aGlzLmF0dGFjaEV2ZW50KCJvbkRibENsaWNrIixlKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUub3BlbkFsbEl0ZW1zPWZ1bmN0aW9uKGUpe3ZhciB0PXRoaXMuX2dsb2JhbElkU3RvcmFnZUZpbmQoZSk7cmV0dXJuIHQ/dm9pZCB0aGlzLl94b3BlbkFsbCh0KTowfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5nZXRPcGVuU3RhdGU9ZnVuY3Rpb24oZSl7dmFyIHQ9dGhpcy5fZ2xvYmFsSWRTdG9yYWdlRmluZChlKTtyZXR1cm4gdD90aGlzLl9nZXRPcGVuU3RhdGUodCk6IiJ9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLmNsb3NlQWxsSXRlbXM9ZnVuY3Rpb24oZSl7ZT09PXdpbmRvdy51bmRlZmluZWQmJihlPXRoaXMucm9vdElkKTt2YXIgdD10aGlzLl9nbG9iYWxJZFN0b3JhZ2VGaW5kKGUpO3JldHVybiB0Pyh0aGlzLl94Y2xvc2VBbGwodCksdGhpcy5hbGxUcmVlLmNoaWxkTm9kZXNbMF0uYm9yZGVyPSIxIix2b2lkKHRoaXMuYWxsVHJlZS5jaGlsZE5vZGVzWzBdLmJvcmRlcj0iMCIpKTowfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5zZXRVc2VyRGF0YT1mdW5jdGlvbihlLHQsaSl7dmFyIG49dGhpcy5fZ2xvYmFsSWRTdG9yYWdlRmluZChlLDAsITApO24mJigiaGludCI9PXQmJihuLmh0bWxOb2RlLmNoaWxkTm9kZXNbMF0uY2hpbGROb2Rlc1swXS50aXRsZT1pKSwidW5kZWZpbmVkIj09dHlwZW9mIG4udXNlckRhdGFbInRfIit0XSYmKG4uX3VzZXJkYXRhbGlzdD9uLl91c2VyZGF0YWxpc3QrPSIsIit0Om4uX3VzZXJkYXRhbGlzdD10KSxuLnVzZXJEYXRhWyJ0XyIrdF09aSl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLmdldFVzZXJEYXRhPWZ1bmN0aW9uKGUsdCl7dmFyIGk9dGhpcy5fZ2xvYmFsSWRTdG9yYWdlRmluZChlLDAsITApO2lmKGkpcmV0dXJuIGkudXNlckRhdGFbInRfIit0XX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuZ2V0SXRlbUNvbG9yPWZ1bmN0aW9uKGUpe3ZhciB0PXRoaXMuX2dsb2JhbElkU3RvcmFnZUZpbmQoZSk7aWYoIXQpcmV0dXJuIDA7dmFyIGk9bmV3IE9iamVjdDtyZXR1cm4gdC5hY29sb3ImJihpLmFjb2xvcj10LmFjb2xvciksdC5zY29sb3ImJihpLnNjb2xvcj10LnNjb2xvciksaX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuc2V0SXRlbUNvbG9yPWZ1bmN0aW9uKGUsdCxpKXtpZihlJiZlLnNwYW4pdmFyIG49ZTtlbHNlIHZhciBuPXRoaXMuX2dsb2JhbElkU3RvcmFnZUZpbmQoZSk7cmV0dXJuIG4/KG4uaV9zZWw/KGl8fHQpJiYobi5zcGFuLnN0eWxlLmNvbG9yPWl8fHQpOnQmJihuLnNwYW4uc3R5bGUuY29sb3I9dCksaSYmKG4uc2NvbG9yPWkpLHQmJihuLmFjb2xvcj10KSx2b2lkIDApOjB9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLnNldE9uTW91c2VJbkhhbmRsZXI9ZnVuY3Rpb24oZSl7dGhpcy5laGx0PSEwLHRoaXMuYXR0YWNoRXZlbnQoIm9uTW91c2VJbiIsZSl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLnNldE9uTW91c2VPdXRIYW5kbGVyPWZ1bmN0aW9uKGUpe3RoaXMuZWhsdD0hMCx0aGlzLmF0dGFjaEV2ZW50KCJvbk1vdXNlT3V0IixlKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuZW5hYmxlVHJlZUxpbmVzPWZ1bmN0aW9uKGUpe3RoaXMudHJlZUxpbmVzT249ZGh4NC5zMmIoZSl9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLm9wZW5JdGVtPWZ1bmN0aW9uKGUpe3RoaXMuc2tpcExvY2s9ITA7dmFyIHQ9dGhpcy5fZ2xvYmFsSWRTdG9yYWdlRmluZChlKTtyZXR1cm4gdD90aGlzLl9vcGVuSXRlbSh0KTowfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fb3Blbkl0ZW09ZnVuY3Rpb24oZSl7dmFyIHQ9dGhpcy5fZ2V0T3BlblN0YXRlKGUpO2lmKDA+dHx8dGhpcy5YTUxzb3VyY2UmJiFlLlhNTGxvYWQpe2lmKCF0aGlzLmNhbGxFdmVudCgib25PcGVuU3RhcnQiLFtlLmlkLHRdKSlyZXR1cm4gMDt0aGlzLl9IaWRlU2hvdyhlLDIpLHRoaXMuY2hlY2tFdmVudCgib25PcGVuRW5kIikmJih0aGlzLm9uWExFPT10aGlzLl9lcG5GSGUmJnRoaXMuX2VwbkZIZSh0aGlzLGUuaWQsITApLHRoaXMueG1sc3RhdGUmJnRoaXMuWE1Mc291cmNlPyh0aGlzLl9vaWVfb25YTEUucHVzaCh0aGlzLm9uWExFKSx0aGlzLm9uWExFPXRoaXMuX2VwbkZIZSk6dGhpcy5jYWxsRXZlbnQoIm9uT3BlbkVuZCIsW2UuaWQsdGhpcy5fZ2V0T3BlblN0YXRlKGUpXSkpfWVsc2UgdGhpcy5fc3JuZCYmdGhpcy5fSGlkZVNob3coZSwyKTtlLnBhcmVudE9iamVjdCYmIXRoaXMuX3NraXBfb3Blbl9wYXJlbnQmJnRoaXMuX29wZW5JdGVtKGUucGFyZW50T2JqZWN0KX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2dldEFsbEZhdEl0ZW1zPWZ1bmN0aW9uKGUpe2Zvcih2YXIgdD0iIixpPTA7aTxlLmNoaWxkc0NvdW50O2krKylpZihlLmNoaWxkTm9kZXNbaV0udW5QYXJzZWR8fGUuY2hpbGROb2Rlc1tpXS5jaGlsZHNDb3VudD4wKXtpZih0P3QrPXRoaXMuZGxtdHIrZS5jaGlsZE5vZGVzW2ldLmlkOnQ9IiIrZS5jaGlsZE5vZGVzW2ldLmlkLGUuY2hpbGROb2Rlc1tpXS51blBhcnNlZCl2YXIgbj10aGlzLl9nZXRBbGxGYXRJdGVtc1hNTChlLmNoaWxkTm9kZXNbaV0udW5QYXJzZWQsMSk7ZWxzZSB2YXIgbj10aGlzLl9nZXRBbGxGYXRJdGVtcyhlLmNoaWxkTm9kZXNbaV0pO24mJih0Kz10aGlzLmRsbXRyK24pfXJldHVybiB0fSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5zZWxlY3RJdGVtPWZ1bmN0aW9uKGUsdCxpKXt0PWRoeDQuczJiKHQpO3ZhciBuPXRoaXMuX2dsb2JhbElkU3RvcmFnZUZpbmQoZSk7aWYoIW58fCFuLnBhcmVudE9iamVjdClyZXR1cm4gMDt0aGlzLlhNTGxvYWRpbmdXYXJuaW5nP24ucGFyZW50T2JqZWN0Lm9wZW5NZT0xOnRoaXMuX29wZW5JdGVtKG4ucGFyZW50T2JqZWN0KTt2YXIgbz1udWxsO2kmJihvPW5ldyBPYmplY3Qsby5jdHJsS2V5PSEwLG4uaV9zZWwmJihvLnNraXBVblNlbD0hMCkpLHQ/dGhpcy5vblJvd1NlbGVjdChvLG4uaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzWzBdLmNoaWxkTm9kZXNbM10sITEpOnRoaXMub25Sb3dTZWxlY3QobyxuLmh0bWxOb2RlLmNoaWxkTm9kZXNbMF0uY2hpbGROb2Rlc1swXS5jaGlsZE5vZGVzWzNdLCEwKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2NvbXByZXNzQ2hpbGRMaXN0PWZ1bmN0aW9uKGUsdCl7ZS0tO2Zvcih2YXIgaT0wO2U+aTtpKyspMD09dFtpXSYmKHRbaV09dFtpKzFdLHRbaSsxXT0wKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2RlbGV0ZU5vZGU9ZnVuY3Rpb24oZSx0LGkpe2lmKCF0fHwhdC5wYXJlbnRPYmplY3QpcmV0dXJuIDA7dmFyIG49MCxvPTA7dC50ci5uZXh0U2libGluZyYmKG49dC50ci5uZXh0U2libGluZy5ub2RlbSksdC50ci5wcmV2aW91c1NpYmxpbmcmJihvPXQudHIucHJldmlvdXNTaWJsaW5nLm5vZGVtKTtmb3IodmFyIHI9dC5wYXJlbnRPYmplY3QsbD1yLmNoaWxkc0NvdW50LHM9ci5jaGlsZE5vZGVzLGE9MDtsPmE7YSsrKWlmKHNbYV0uaWQ9PWUpe2l8fHIuaHRtbE5vZGUuY2hpbGROb2Rlc1swXS5yZW1vdmVDaGlsZChzW2FdLnRyKSxzW2FdPTA7YnJlYWt9dGhpcy5fY29tcHJlc3NDaGlsZExpc3QobCxzKSxpfHxyLmNoaWxkc0NvdW50LS0sbiYmKHRoaXMuX2NvcnJlY3RQbHVzKG4pLHRoaXMuX2NvcnJlY3RMaW5lKG4pKSxvJiYodGhpcy5fY29ycmVjdFBsdXMobyksdGhpcy5fY29ycmVjdExpbmUobykpLHRoaXMudHNjaGVjayYmdGhpcy5fY29ycmVjdENoZWNrU3RhdGVzKHIpLGl8fHRoaXMuX2dsb2JhbElkU3RvcmFnZVJlY1N1Yih0KX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuZGVsZXRlQ2hpbGRJdGVtcz1mdW5jdGlvbihlKXt2YXIgdD10aGlzLl9nbG9iYWxJZFN0b3JhZ2VGaW5kKGUpO2lmKHQpZm9yKHZhciBpPXQuY2hpbGRzQ291bnQsbj0wO2k+bjtuKyspdGhpcy5fZGVsZXRlTm9kZSh0LmNoaWxkTm9kZXNbMF0uaWQsdC5jaGlsZE5vZGVzWzBdKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2dsb2JhbElkU3RvcmFnZVJlY1N1Yj1mdW5jdGlvbihlKXtmb3IodmFyIHQ9MDt0PGUuY2hpbGRzQ291bnQ7dCsrKXRoaXMuX2dsb2JhbElkU3RvcmFnZVJlY1N1YihlLmNoaWxkTm9kZXNbdF0pLHRoaXMuX2dsb2JhbElkU3RvcmFnZVN1YihlLmNoaWxkTm9kZXNbdF0uaWQpO3RoaXMuX2dsb2JhbElkU3RvcmFnZVN1YihlLmlkKTt2YXIgaT1lO2kuc3Bhbj1udWxsLGkudHIubm9kZW09bnVsbCxpLnRyPW51bGwsaS5odG1sTm9kZT1udWxsfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5fYXV0b1Njcm9sbD1mdW5jdGlvbihlLHQsaSl7dGhpcy5hdXRvU2Nyb2xsJiYoZSYmKHQ9ZGh4NC5hYnNUb3AoZSksaT1kaHg0LmFic1RvcCh0aGlzLmFsbFRyZWUpLXRoaXMuYWxsVHJlZS5zY3JvbGxUb3ApLHQtaS1wYXJzZUludCh0aGlzLmFsbFRyZWUuc2Nyb2xsVG9wKT5wYXJzZUludCh0aGlzLmFsbFRyZWUub2Zmc2V0SGVpZ2h0KS01MCYmKHRoaXMuYWxsVHJlZS5zY3JvbGxUb3A9cGFyc2VJbnQodGhpcy5hbGxUcmVlLnNjcm9sbFRvcCkrMjApLHQtaTxwYXJzZUludCh0aGlzLmFsbFRyZWUuc2Nyb2xsVG9wKSszMCYmKHRoaXMuYWxsVHJlZS5zY3JvbGxUb3A9cGFyc2VJbnQodGhpcy5hbGxUcmVlLnNjcm9sbFRvcCktMjApKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuZW5hYmxlVGV4dFNpZ25zPWZ1bmN0aW9uKGUpe3RoaXMuX3R4dGltZz1kaHg0LnMyYihlKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUucHJldmVudElFQ2FjaGluZz1mdW5jdGlvbihlKXtkaHg0LmFqYXguY2FjaGU9IWV9LGRodG1sWFRyZWVPYmplY3QucHJvdG90eXBlLnByZXZlbnRJRUNhc2hpbmc9ZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUucHJldmVudElFQ2FjaGluZyxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5zZXRJY29uU2l6ZT1mdW5jdGlvbihlLHQsaSl7aWYoaSl7aWYoaSYmaS5zcGFuKXZhciBuPWk7ZWxzZSB2YXIgbj10aGlzLl9nbG9iYWxJZFN0b3JhZ2VGaW5kKGkpO2lmKCFuKXJldHVybiAwO3ZhciBvPW4uc3Bhbi5wYXJlbnROb2RlLnByZXZpb3VzU2libGluZy5jaGlsZE5vZGVzWzBdO2UmJihvLnN0eWxlLndpZHRoPWUrInB4Iix3aW5kb3cuX0tIVE1McnYmJihvLnBhcmVudE5vZGUuc3R5bGUud2lkdGg9ZSsicHgiKSksdCYmKG8uc3R5bGUuaGVpZ2h0PXQrInB4Iix3aW5kb3cuX0tIVE1McnYmJihvLnBhcmVudE5vZGUuc3R5bGUuaGVpZ2h0PXQrInB4IikpfWVsc2UgdGhpcy5kZWZfaW1nX3g9ZSsicHgiLHRoaXMuZGVmX2ltZ195PXQrInB4In0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuZW5hYmxlU2luZ2xlUmFkaW9Nb2RlPWZ1bmN0aW9uKGUpe3RoaXMuX2ZyYnRycz1kaHg0LnMyYihlKX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUub3Blbk9uSXRlbUFkZGVkPWZ1bmN0aW9uKGUpe3RoaXMuX2hBZEk9IWRoeDQuczJiKGUpfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5vcGVuT25JdGVtQWRkaW5nPWZ1bmN0aW9uKGUpe3RoaXMuX2hBZEk9IWRoeDQuczJiKGUpfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5nZXRBbGxJdGVtc1dpdGhLaWRzPWZ1bmN0aW9uKCl7cmV0dXJuIHRoaXMuX2dldEFsbEZhdEl0ZW1zKHRoaXMuaHRtbE5vZGUpfSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5zZXRTa2luPWZ1bmN0aW9uKGUpe3ZhciB0PXRoaXMucGFyZW50T2JqZWN0LmNsYXNzTmFtZS5yZXBsYWNlKC9kaHh0cmVlX1teIF0qL2dpLCIiKTt0aGlzLnBhcmVudE9iamVjdC5jbGFzc05hbWU9dCsiIGRoeHRyZWVfIitlLCJkaHhfdGVycmFjZSIhPWUmJiJkaHhfd2ViIiE9ZSYmIm1hdGVyaWFsIiE9ZXx8dGhpcy5lbmFibGVUcmVlTGluZXMoITEpLCJtYXRlcmlhbCI9PWUmJnRoaXMuc2V0SWNvblNpemUoIjI1IiwiMjUiKX0sanNvblBvaW50ZXIucHJvdG90eXBlPXt0ZXh0OmZ1bmN0aW9uKCl7dmFyIGU9ZnVuY3Rpb24oZSl7Zm9yKHZhciBpPVtdLG49MDtuPGUubGVuZ3RoO24rKylpLnB1c2goInsiK3QoZVtuXSkrIn0iKTtyZXR1cm4gaS5qb2luKCIsIil9LHQ9ZnVuY3Rpb24oaSl7dmFyIG49W107Zm9yKHZhciBvIGluIGkpIm9iamVjdCI9PXR5cGVvZiBpW29dP28ubGVuZ3RoP24ucHVzaCgnIicrbysnIjpbJytlKGlbb10pKyJdIik6bi5wdXNoKCciJytvKyciOnsnK3QoaVtvXSkrIn0iKTpuLnB1c2goJyInK28rJyI6IicraVtvXSsnIicpO3JldHVybiBuLmpvaW4oIiwiKX07cmV0dXJuInsiK3QodGhpcy5kKSsifSJ9LGdldDpmdW5jdGlvbihlKXtyZXR1cm4gdGhpcy5kW2VdfSxleGlzdHM6ZnVuY3Rpb24oKXtyZXR1cm4hIXRoaXMuZH0sY29udGVudDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmQuY29udGVudH0sZWFjaDpmdW5jdGlvbihlLHQsaSl7dmFyIG49dGhpcy5kW2VdLG89bmV3IGpzb25Qb2ludGVyO2lmKG4pZm9yKHZhciByPTA7cjxuLmxlbmd0aDtyKyspby5kPW5bcl0sdC5hcHBseShpLFtvLHJdKX0sZ2V0X2FsbDpmdW5jdGlvbigpe3JldHVybiB0aGlzLmR9LHN1YjpmdW5jdGlvbihlKXtyZXR1cm4gbmV3IGpzb25Qb2ludGVyKHRoaXMuZFtlXSx0aGlzLmQpfSxzdWJfZXhpc3RzOmZ1bmN0aW9uKGUpe3JldHVybiEhdGhpcy5kW2VdfSxlYWNoX3g6ZnVuY3Rpb24oZSx0LGksbixvKXt2YXIgcj10aGlzLmRbZV0sbD1uZXcganNvblBvaW50ZXIoMCx0aGlzLmQpO2lmKHIpZm9yKG89b3x8MDtvPHIubGVuZ3RoO28rKylpZihyW29dW3RdJiYobC5kPXJbb10sLTE9PWkuYXBwbHkobixbbCxvXSkpKXJldHVybn0sdXA6ZnVuY3Rpb24oZSl7cmV0dXJuIG5ldyBqc29uUG9pbnRlcih0aGlzLmRwLHRoaXMuZCl9LHNldDpmdW5jdGlvbihlLHQpe3RoaXMuZFtlXT10fSxjbG9uZTpmdW5jdGlvbihlKXtyZXR1cm4gbmV3IGpzb25Qb2ludGVyKHRoaXMuZCx0aGlzLmRwKX0sdGhyb3VnaDpmdW5jdGlvbihlLHQsaSxuLG8pe3ZhciByPXRoaXMuZFtlXTtpZihyLmxlbmd0aClmb3IodmFyIGw9MDtsPHIubGVuZ3RoO2wrKyl7aWYobnVsbCE9cltsXVt0XSYmIiIhPXJbbF1bdF0mJighaXx8cltsXVt0XT09aSkpe3ZhciBzPW5ldyBqc29uUG9pbnRlcihyW2xdLHRoaXMuZCk7bi5hcHBseShvLFtzLGxdKX12YXIgYT10aGlzLmQ7dGhpcy5kPXJbbF0sdGhpcy5zdWJfZXhpc3RzKGUpJiZ0aGlzLnRocm91Z2goZSx0LGksbixvKSx0aGlzLmQ9YX19fSxkaHRtbFhUcmVlT2JqZWN0LnByb3RvdHlwZS5sb2FkSlNPTk9iamVjdD1mdW5jdGlvbihlLHQpe3JldHVybiB3aW5kb3cuY29uc29sZSYmd2luZG93LmNvbnNvbGUuaW5mbyYmd2luZG93LmNvbnNvbGUuaW5mbygibG9hZEpTT05PYmplY3Qgd2FzIGRlcHJlY2F0ZWQiLCJodHRwOi8vZG9jcy5kaHRtbHguY29tL21pZ3JhdGlvbl9faW5kZXguaHRtbCNtaWdyYXRpb25mcm9tNDN0bzQ0IiksdGhpcy5fbG9hZEpTT05PYmplY3QoZSx0KX0sZGh0bWxYVHJlZU9iamVjdC5wcm90b3R5cGUuX2xvYWRKU09OT2JqZWN0PWZ1bmN0aW9uKGUsdCl7dGhpcy5wYXJzQ291bnR8fHRoaXMuY2FsbEV2ZW50KCJvblhMUyIsW3RoaXMsbnVsbF0pLHRoaXMueG1sc3RhdGU9MTt2YXIgaT1uZXcganNvblBvaW50ZXIoZSk7dGhpcy5fcGFyc2UoaSksdGhpcy5fcD1pLHQmJnQoKX0sd2luZG93LmFkZEV2ZW50TGlzdGVuZXI/d2luZG93LmFkZEV2ZW50TGlzdGVuZXIoImxvYWQiLGRoeF9pbml0X3RyZWVzLCExKTp3aW5kb3cuYXR0YWNoRXZlbnQmJndpbmRvdy5hdHRhY2hFdmVudCgib25sb2FkIixkaHhfaW5pdF90cmVlcyk7dmFyIHN0eWxlPWRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoInN0eWxlIik7c3R5bGUuaW5uZXJIVE1MPSdAa2V5ZnJhbWVzIGRoeF9sb2FkZXJfcm90YXRlezEwMCV7dHJhbnNmb3JtOnJvdGF0ZSgzNjBkZWcpO319QGtleWZyYW1lcyBkaHhfbG9hZGVyX2Rhc2h7MCV7c3Ryb2tlLWRhc2hhcnJheToxLDIwMDtzdHJva2UtZGFzaG9mZnNldDowO301MCV7c3Ryb2tlLWRhc2hhcnJheTo4OSwyMDA7c3Ryb2tlLWRhc2hvZmZzZXQ6LTM1cHg7fTEwMCV7c3Ryb2tlLWRhc2hhcnJheTo4OSwyMDA7c3Ryb2tlLWRhc2hvZmZzZXQ6LTEyNHB4O319LmRodG1seE1lbnVfbWF0ZXJpYWxfTWlkZGxle3Bvc2l0aW9uOnJlbGF0aXZlO2hlaWdodDoyOHB4O2xpbmUtaGVpZ2h0OjI4cHg7YmFja2dyb3VuZC1jb2xvcjojZjVmNWY1O292ZXJmbG93OmhpZGRlbjtib3JkZXI6bm9uZTtmb250LXNpemU6MTRweDtmb250LWZhbWlseTpSb2JvdG8sQXJpYWwsSGVsdmV0aWNhO2NvbG9yOiM0MDQwNDA7LXdlYmtpdC11c2VyLXNlbGVjdDpub25lOy1raHRtbC11c2VyLXNlbGVjdDpub25lOy1tb3otdXNlci1zZWxlY3Q6bm9uZTstbXMtdXNlci1zZWxlY3Q6bm9uZTstby11c2VyLXNlbGVjdDpub25lO3VzZXItc2VsZWN0Om5vbmU7fS5kaHRtbHhNZW51X21hdGVyaWFsX01pZGRsZSBkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9Ub3BMZXZlbF9JdGVtX05vcm1hbCwuZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfVG9wTGV2ZWxfSXRlbV9EaXNhYmxlZCwuZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfVG9wTGV2ZWxfSXRlbV9TZWxlY3RlZHtwb3NpdGlvbjpyZWxhdGl2ZTtmbG9hdDpsZWZ0O2ZvbnQ6aW5oZXJpdDtoZWlnaHQ6MjhweDtsaW5lLWhlaWdodDoyOHB4O21hcmdpbjowO3BhZGRpbmc6MCA4cHg7Y3Vyc29yOmRlZmF1bHQ7d2hpdGUtc3BhY2U6bm93cmFwOy13ZWJraXQtdXNlci1zZWxlY3Q6bm9uZTsta2h0bWwtdXNlci1zZWxlY3Q6bm9uZTstbW96LXVzZXItc2VsZWN0Om5vbmU7LW1zLXVzZXItc2VsZWN0Om5vbmU7LW8tdXNlci1zZWxlY3Q6bm9uZTt1c2VyLXNlbGVjdDpub25lO30uZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfVG9wTGV2ZWxfSXRlbV9Ob3JtYWwgZGl2LnRvcF9sZXZlbF90ZXh0LC5kaHRtbHhNZW51X21hdGVyaWFsX01pZGRsZSBkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9Ub3BMZXZlbF9JdGVtX0Rpc2FibGVkIGRpdi50b3BfbGV2ZWxfdGV4dCwuZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfVG9wTGV2ZWxfSXRlbV9TZWxlY3RlZCBkaXYudG9wX2xldmVsX3RleHR7ZmxvYXQ6bGVmdDttYXJnaW46MCAzcHg7fS5kaHRtbHhNZW51X21hdGVyaWFsX01pZGRsZSBkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9Ub3BMZXZlbF9JdGVtX05vcm1hbCBpLC5kaHRtbHhNZW51X21hdGVyaWFsX01pZGRsZSBkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9Ub3BMZXZlbF9JdGVtX0Rpc2FibGVkIGksLmRodG1seE1lbnVfbWF0ZXJpYWxfTWlkZGxlIGRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1RvcExldmVsX0l0ZW1fU2VsZWN0ZWQgaXtoZWlnaHQ6aW5oZXJpdDtsaW5lLWhlaWdodDppbmhlcml0O2Zsb2F0OmxlZnQ7Y29sb3I6aW5oZXJpdDttYXJnaW46MCA0cHg7Zm9udC1zaXplOjEuMmVtO30uZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfVG9wTGV2ZWxfSXRlbV9EaXNhYmxlZHtjb2xvcjojYTZhNmE2O30uZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfVG9wTGV2ZWxfSXRlbV9TZWxlY3RlZHtiYWNrZ3JvdW5kLWNvbG9yOiNlYmViZWI7fS5kaHRtbHhNZW51X21hdGVyaWFsX01pZGRsZSBpbWcuZGh0bWx4TWVudV9Ub3BMZXZlbF9JdGVtX0ljb257ZmxvYXQ6bGVmdDttYXJnaW46NXB4IDNweCAwIDNweDt3aWR0aDoxOHB4O2hlaWdodDoxOHB4O2N1cnNvcjpkZWZhdWx0O30uZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LnRvcF9zZXB7cG9zaXRpb246cmVsYXRpdmU7ZmxvYXQ6bGVmdDtoZWlnaHQ6MjJweDt3aWR0aDowO2JvcmRlci1sZWZ0OjFweCBzb2xpZCAjZGZkZmRmO21hcmdpbjozcHggOHB4IDAgOHB4O2ZvbnQtc2l6ZToxcHg7b3ZlcmZsb3c6aGlkZGVuO2N1cnNvcjpkZWZhdWx0Oy13ZWJraXQtdXNlci1zZWxlY3Q6bm9uZTsta2h0bWwtdXNlci1zZWxlY3Q6bm9uZTstbW96LXVzZXItc2VsZWN0Om5vbmU7LW1zLXVzZXItc2VsZWN0Om5vbmU7LW8tdXNlci1zZWxlY3Q6bm9uZTt1c2VyLXNlbGVjdDpub25lO30uZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfVG9wTGV2ZWxfVGV4dF9yaWdodCwuZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfVG9wTGV2ZWxfVGV4dF9sZWZ0e3Bvc2l0aW9uOmFic29sdXRlO3RvcDowO2hlaWdodDoyOHB4O2xpbmUtaGVpZ2h0OjI4cHg7Y3Vyc29yOmRlZmF1bHQ7Zm9udC1zaXplOjE0cHg7Zm9udC1mYW1pbHk6Um9ib3RvLEFyaWFsLEhlbHZldGljYTtjb2xvcjojNDA0MDQwOy13ZWJraXQtdXNlci1zZWxlY3Q6bm9uZTsta2h0bWwtdXNlci1zZWxlY3Q6bm9uZTstbW96LXVzZXItc2VsZWN0Om5vbmU7LW1zLXVzZXItc2VsZWN0Om5vbmU7LW8tdXNlci1zZWxlY3Q6bm9uZTt1c2VyLXNlbGVjdDpub25lO30uZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUgZGl2LmRodG1seE1lbnVfVG9wTGV2ZWxfVGV4dF9yaWdodHtyaWdodDo2cHg7fS5kaHRtbHhNZW51X21hdGVyaWFsX01pZGRsZSBkaXYuZGh0bWx4TWVudV9Ub3BMZXZlbF9UZXh0X2xlZnR7bGVmdDo2cHg7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29ue3Bvc2l0aW9uOmFic29sdXRlO3BhZGRpbmc6NXB4IDA7YmFja2dyb3VuZC1jb2xvcjojZmFmYWZhO292ZXJmbG93OmhpZGRlbjtjdXJzb3I6ZGVmYXVsdDtsaW5lLWhlaWdodDpub3JtYWw7b3ZlcmZsb3cteTphdXRvOy13ZWJraXQtb3ZlcmZsb3ctc2Nyb2xsaW5nOnRvdWNoOy13ZWJraXQtdGFwLWhpZ2hsaWdodC1jb2xvcjpyZ2JhKDAsMCwwLDApO2JveC1zaGFkb3c6MCAxcHggM3B4IHJnYmEoMCwwLDAsMC4xMiksMCAxcHggMnB4IHJnYmEoMCwwLDAsMC4yNCk7LXdlYmtpdC11c2VyLXNlbGVjdDpub25lOy1raHRtbC11c2VyLXNlbGVjdDpub25lOy1tb3otdXNlci1zZWxlY3Q6bm9uZTstbXMtdXNlci1zZWxlY3Q6bm9uZTstby11c2VyLXNlbGVjdDpub25lO3VzZXItc2VsZWN0Om5vbmU7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRke3BhZGRpbmc6MDttYXJnaW46MDtsaW5lLWhlaWdodDpub3JtYWw7d2hpdGUtc3BhY2U6bm93cmFwO2ZvbnQtc2l6ZToxNHB4O2ZvbnQtZmFtaWx5OlJvYm90byxBcmlhbCxIZWx2ZXRpY2E7Y29sb3I6IzQwNDA0MDt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gdGQuc3ViX2l0ZW1faWNvbnt3aWR0aDoxOHB4O3RleHQtYWxpZ246Y2VudGVyO31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ZC5zdWJfaXRlbV9pY29uIGltZy5zdWJfaWNvbnttYXJnaW46NHB4IDZweCAwIDZweDt3aWR0aDoxOHB4O2hlaWdodDoxOHB4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ZC5zdWJfaXRlbV9pY29uIGl7d2lkdGg6MThweDtoZWlnaHQ6MzBweDtsaW5lLWhlaWdodDoyOXB4O21hcmdpbjowIDZweDtmb250LXNpemU6MS4yZW07dGV4dC1hbGlnbjpjZW50ZXI7Y29sb3I6aW5oZXJpdDt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gdGQuc3ViX2l0ZW1faWNvbiBkaXYuc3ViX2ljb257bWFyZ2luOjAgNnB4O3dpZHRoOjE4cHg7aGVpZ2h0OjMwcHg7bGluZS1oZWlnaHQ6MzBweDtiYWNrZ3JvdW5kLXBvc2l0aW9uOjAgNXB4O2JhY2tncm91bmQtcmVwZWF0Om5vLXJlcGVhdDtiYWNrZ3JvdW5kLWltYWdlOnVybCgiaW1ncy9kaHhtZW51X21hdGVyaWFsL2RoeG1lbnVfY2hyZC5wbmciKTt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gdGQuc3ViX2l0ZW1faWNvbiBkaXYuc3ViX2ljb24uY2hieF8we2JhY2tncm91bmQtcG9zaXRpb246MCA1cHg7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRkLnN1Yl9pdGVtX2ljb24gZGl2LnN1Yl9pY29uLmNoYnhfMXtiYWNrZ3JvdW5kLXBvc2l0aW9uOi0xOHB4IDVweDt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gdGQuc3ViX2l0ZW1faWNvbiBkaXYuc3ViX2ljb24ucmRidF8we2JhY2tncm91bmQtcG9zaXRpb246LTcycHggNXB4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ZC5zdWJfaXRlbV9pY29uIGRpdi5zdWJfaWNvbi5yZGJ0XzF7YmFja2dyb3VuZC1wb3NpdGlvbjotOTBweCA1cHg7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRkLnN1Yl9pdGVtX3RleHQgZGl2LnN1Yl9pdGVtX3RleHR7cG9zaXRpb246cmVsYXRpdmU7aGVpZ2h0OjMwcHg7bGluZS1oZWlnaHQ6MzBweDtwYWRkaW5nOjAgMjJweCAwIDFweDtvdmVyZmxvdzpoaWRkZW47fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRkLnN1Yl9pdGVtX2hre3BhZGRpbmc6MCAxMHB4IDAgOHB4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ZC5zdWJfaXRlbV9oayBkaXYuc3ViX2l0ZW1faGt7Y29sb3I6IzhkOGQ4ZDtmb250LXNpemU6MTJweDt0ZXh0LWFsaWduOnJpZ2h0O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ZCBkaXYuY29tcGxleF9hcnJvd3tmbG9hdDpyaWdodDt3aWR0aDoxMHB4O21hcmdpbjowIDFweCAwIDExcHg7aGVpZ2h0OjMwcHg7bGluZS1oZWlnaHQ6MzBweDtiYWNrZ3JvdW5kLWltYWdlOnVybCgiaW1ncy9kaHhtZW51X21hdGVyaWFsL2RoeG1lbnVfc3ViYXIucG5nIik7YmFja2dyb3VuZC1yZXBlYXQ6bm8tcmVwZWF0O2JhY2tncm91bmQtcG9zaXRpb246MCAxMHB4O292ZXJmbG93OmhpZGRlbjtmb250LXNpemU6MXB4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ZCBkaXYuY29tcGxleF9hcnJvd19sb2FkaW5ne3dpZHRoOjE2cHg7aGVpZ2h0OjMwcHg7bGluZS1oZWlnaHQ6MzBweDtiYWNrZ3JvdW5kLXBvc2l0aW9uOmNlbnRlciBjZW50ZXI7YmFja2dyb3VuZC1yZXBlYXQ6bm8tcmVwZWF0O2JhY2tncm91bmQtaW1hZ2U6dXJsKCJpbWdzL2RoeG1lbnVfbWF0ZXJpYWwvZGh4bWVudV9sb2FkZXIuZ2lmIik7ZmxvYXQ6cmlnaHQ7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRyLnN1Yl9pdGVtX3NlbGVjdGVkIHRke2JhY2tncm91bmQtY29sb3I6I2ViZWJlYjt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gdHIuc3ViX2l0ZW1fc2VsZWN0ZWQgdGQgZGl2LmNvbXBsZXhfYXJyb3d7YmFja2dyb3VuZC1wb3NpdGlvbjotMTBweCAxMHB4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ci5zdWJfaXRlbV9kaXMgdGQuc3ViX2l0ZW1faGsgZGl2LnN1Yl9pdGVtX2hre2NvbG9yOiNjMGMwYzA7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRyLnN1Yl9pdGVtX2RpcyB0ZCBkaXYuc3ViX2l0ZW1fdGV4dCxkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ci5zdWJfaXRlbV9kaXMgdGQgdGQuc3ViX2l0ZW1faWNvbiBpe2NvbG9yOiNhNmE2YTY7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRyLnN1Yl9pdGVtX2RpcyB0ZCBkaXYuY29tcGxleF9hcnJvd3tiYWNrZ3JvdW5kLXBvc2l0aW9uOi0yMHB4IDEwcHg7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRyLnN1Yl9pdGVtX2RpcyB0ZCBkaXYuc3ViX2ljb24uY2hieF8we2JhY2tncm91bmQtcG9zaXRpb246LTM2cHggNXB4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ci5zdWJfaXRlbV9kaXMgdGQgZGl2LnN1Yl9pY29uLmNoYnhfMXtiYWNrZ3JvdW5kLXBvc2l0aW9uOi01NHB4IDVweDt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gdHIuc3ViX2l0ZW1fZGlzIHRkIGRpdi5zdWJfaWNvbi5yZGJ0XzB7YmFja2dyb3VuZC1wb3NpdGlvbjotMTA4cHggNXB4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ci5zdWJfaXRlbV9kaXMgdGQgZGl2LnN1Yl9pY29uLnJkYnRfMXtiYWNrZ3JvdW5kLXBvc2l0aW9uOi0xMjZweCA1cHg7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRyLnN1Yl9pdGVtX2RpcyB0ZCBpe2NvbG9yOiNhNmE2YTY7fWRpdi5kaHRtbHhNZW51X21hdGVyaWFsX1N1YkxldmVsQXJlYV9Qb2x5Z29uIHRyLnN1Yl9zZXAgdGR7cGFkZGluZzo1cHggM3B4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiB0ci5zdWJfc2VwIHRkIGRpdi5zdWJfc2Vwe3Bvc2l0aW9uOnJlbGF0aXZlO2ZvbnQtc2l6ZToxcHg7bGluZS1oZWlnaHQ6MXB4O2hlaWdodDowO3dpZHRoOjEwMCU7Ym9yZGVyLXRvcDoxcHggc29saWQgI2RmZGZkZjt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX0Fycm93VXAsZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX0Fycm93VXBfT3ZlcixkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiBkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfQXJyb3dVcF9EaXNhYmxlZHtwb3NpdGlvbjpyZWxhdGl2ZTtmb250LXNpemU6MXB4O2JvcmRlci1ib3R0b206MXB4IHNvbGlkICNkZmRmZGY7YmFja2dyb3VuZC1pbWFnZTp1cmwoImltZ3MvZGh4bWVudV9tYXRlcmlhbC9kaHhtZW51X2Fycm93X3VwLnBuZyIpO2JhY2tncm91bmQtcmVwZWF0Om5vLXJlcGVhdDtiYWNrZ3JvdW5kLXBvc2l0aW9uOmNlbnRlciAycHg7cGFkZGluZzo4cHggMDttYXJnaW4tYm90dG9tOjNweDt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX0Fycm93VXBfRGlzYWJsZWR7YmFja2dyb3VuZC1pbWFnZTp1cmwoImltZ3MvZGh4bWVudV9tYXRlcmlhbC9kaHhtZW51X2Fycm93X3VwX2Rpcy5wbmciKTt9ZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX0Fycm93RG93bixkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiBkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfQXJyb3dEb3duX092ZXIsZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX1BvbHlnb24gZGl2LmRodG1seE1lbnVfbWF0ZXJpYWxfU3ViTGV2ZWxBcmVhX0Fycm93RG93bl9EaXNhYmxlZHtwb3NpdGlvbjpyZWxhdGl2ZTtmb250LXNpemU6MXB4O2JvcmRlci10b3A6MXB4IHNvbGlkICNkZmRmZGY7YmFja2dyb3VuZC1pbWFnZTp1cmwoImltZ3MvZGh4bWVudV9tYXRlcmlhbC9kaHhtZW51X2Fycm93X2Rvd24ucG5nIik7YmFja2dyb3VuZC1yZXBlYXQ6bm8tcmVwZWF0O2JhY2tncm91bmQtcG9zaXRpb246Y2VudGVyIDZweDtwYWRkaW5nOjhweCAwO21hcmdpbi10b3A6M3B4O31kaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfUG9seWdvbiBkaXYuZGh0bWx4TWVudV9tYXRlcmlhbF9TdWJMZXZlbEFyZWFfQXJyb3dEb3duX0Rpc2FibGVke2JhY2tncm91bmQtaW1hZ2U6dXJsKCJpbWdzL2RoeG1lbnVfbWF0ZXJpYWwvZGh4bWVudV9hcnJvd19kb3duX2Rpcy5wbmciKTt9aWZyYW1lLmRodG1seE1lbnVfSUU2Q292ZXJGaXhfbWF0ZXJpYWx7cG9zaXRpb246YWJzb2x1dGU7Ym9yZGVyOm5vbmU7YmFja2dyb3VuZDojMDAwO2ZpbHRlcjpwcm9naWQ6RFhJbWFnZVRyYW5zZm9ybS5NaWNyb3NvZnQuQWxwaGEob3BhY2l0eT0xMDApO30uZGh0bWx4TWVudV9tYXRlcmlhbF9NaWRkbGUuZGlyX2xlZnQgZGl2LmFsaWduX2xlZnR7ZmxvYXQ6bGVmdDt9LmRodG1seE1lbnVfbWF0ZXJpYWxfTWlkZGxlLmRpcl9sZWZ0IGRpdi5hbGlnbl9yaWdodHtmbG9hdDpyaWdodDt9LmRoeG1lbnVfc2tpbl9kZXRlY3R7cG9zaXRpb246YWJzb2x1dGU7bGVmdDowO3RvcDotMTAwcHg7bWFyZ2luOjA7cGFkZGluZzowO2JvcmRlcjowIHNvbGlkIHdoaXRlO3dpZHRoOjQwcHg7aGVpZ2h0OjEwcHg7b3ZlcmZsb3c6aGlkZGVuO31Aa2V5ZnJhbWVzIGRoeF9sb2FkZXJfcm90YXRlezEwMCV7dHJhbnNmb3JtOnJvdGF0ZSgzNjBkZWcpO319QGtleWZyYW1lcyBkaHhfbG9hZGVyX2Rhc2h7MCV7c3Ryb2tlLWRhc2hhcnJheToxLDIwMDtzdHJva2UtZGFzaG9mZnNldDowO301MCV7c3Ryb2tlLWRhc2hhcnJheTo4OSwyMDA7c3Ryb2tlLWRhc2hvZmZzZXQ6LTM1cHg7fTEwMCV7c3Ryb2tlLWRhc2hhcnJheTo4OSwyMDA7c3Ryb2tlLWRhc2hvZmZzZXQ6LTEyNHB4O319LmRlZmF1bHRUcmVlVGFibGV7bWFyZ2luOjA7cGFkZGluZzowO2JvcmRlcjowO30uY29udGFpbmVyVGFibGVTdHlsZXtvdmVyZmxvdzphdXRvOy13ZWJraXQtb3ZlcmZsb3ctc2Nyb2xsaW5nOnRvdWNoO3Bvc2l0aW9uOnJlbGF0aXZlO3RvcDowO2ZvbnQtc2l6ZToxMnB4Oy1raHRtbC11c2VyLXNlbGVjdDpub25lO30uY29udGFpbmVyVGFibGVTdHlsZVJUTCBzcGFue2RpcmVjdGlvbjpydGw7dW5pY29kZS1iaWRpOmJpZGktb3ZlcnJpZGU7fS5jb250YWluZXJUYWJsZVN0eWxlUlRMe2RpcmVjdGlvbjpydGw7b3ZlcmZsb3c6YXV0bztwb3NpdGlvbjpyZWxhdGl2ZTt0b3A6MDtmb250LXNpemU6MTJweDt9LnN0YW5kYXJ0VHJlZVJvd3tmb250LWZhbWlseTpSb2JvdG8sQXJpYWwsSGVsdmV0aWNhO2ZvbnQtc2l6ZTo7LW1vei11c2VyLXNlbGVjdDpub25lO2xpbmUtaGVpZ2h0OjI0cHg7fS5zZWxlY3RlZFRyZWVSb3d7Zm9udC1mYW1pbHk6Um9ib3RvLEFyaWFsLEhlbHZldGljYTtmb250LXNpemU6Oy1tb3otdXNlci1zZWxlY3Q6bm9uZTtiYWNrZ3JvdW5kLWNvbG9yOiNlZWU7Y29sb3I6IzM5Yzt9LmRoeHRyZWVfbWF0ZXJpYWwgLnNlbGVjdGVkVHJlZVJvd0Z1bGwgLmRoeFRleHRDZWxse2JhY2tncm91bmQtY29sb3I6I2VlZTtjb2xvcjojMzljO30uZHJhZ0FuZERyb3BSb3d7Y29sb3I6IzM5Yzt9LnN0YW5kYXJ0VHJlZVJvd19sb3J7dGV4dC1kZWNvcmF0aW9uOnVuZGVybGluZTtiYWNrZ3JvdW5kLWNvbG9yOjtmb250LWZhbWlseTpSb2JvdG8sQXJpYWwsSGVsdmV0aWNhO2ZvbnQtc2l6ZTo7LW1vei11c2VyLXNlbGVjdDpub25lO30uc3RhbmRhcnRUcmVlSW1hZ2V7aGVpZ2h0OjI0cHg7b3ZlcmZsb3c6aGlkZGVuO2JvcmRlcjowO3BhZGRpbmc6MDttYXJnaW46MDtmb250LXNpemU6MXB4O30uc3RhbmRhcnRUcmVlSW1hZ2UgaW1ne3dpZHRoOjE4cHg7aGVpZ2h0OjI0cHg7YmFja2dyb3VuZC1wb3NpdGlvbjpjZW50ZXIgY2VudGVyO2JhY2tncm91bmQtcmVwZWF0Om5vLXJlcGVhdDtib3JkZXI6MDtwYWRkaW5nOjA7bWFyZ2luOjA7Zm9udC1zaXplOjFweDstd2Via2l0LXVzZXItc2VsZWN0Om5vbmU7LWtodG1sLXVzZXItc2VsZWN0Om5vbmU7LW1vei11c2VyLXNlbGVjdDpub25lOy1tcy11c2VyLXNlbGVjdDpub25lOy1vLXVzZXItc2VsZWN0Om5vbmU7dXNlci1zZWxlY3Q6bm9uZTt9LmhpZGRlblJvd3t3aWR0aDoxcHg7b3ZlcmZsb3c6aGlkZGVuO30uZHJhZ1NwYW5EaXYsLmRyYWdTcGFuRGl2IHRke2ZvbnQtZmFtaWx5OlJvYm90byxBcmlhbCxIZWx2ZXRpY2E7Zm9udC1zaXplOjtsaW5lLWhlaWdodDo7dmVydGljYWwtYWxpZ246Y2VudGVyO2JhY2tncm91bmQtY29sb3I6d2hpdGU7ei1pbmRleDo5OTk7fS5kcmFnU3BhbkRpdiB0ZHtwYWRkaW5nOjVweDt9LmFfZGh4X2hpZGRlbl9pbnB1dHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6LTFweDtsZWZ0Oi0xcHg7d2lkdGg6MXB4O2hlaWdodDoxcHg7Ym9yZGVyOm5vbmU7YmFja2dyb3VuZDpub25lO30uYV9kaHhfaGlkZGVuX2lucHV0e3Bvc2l0aW9uOmFic29sdXRlO3RvcDotMXB4O2xlZnQ6LTFweDt3aWR0aDoxcHg7aGVpZ2h0OjFweDtib3JkZXI6bm9uZTtiYWNrZ3JvdW5kOm5vbmU7fS5zZWxlY3Rpb25CYXJ7dG9wOjA7YmFja2dyb3VuZC1jb2xvcjpibGFjaztwb3NpdGlvbjphYnNvbHV0ZTtvdmVyZmxvdzpoaWRkZW47aGVpZ2h0OjJweDt6LWluZGV4OjExO30uaW50cmVlZWRpdFJvd3tmb250LXNpemU6OHB0O2hlaWdodDoxNnB4O2JvcmRlcjoxcHggc29saWQgc2lsdmVyO3BhZGRpbmc6MDttYXJnaW46MDttYXJnaW4tbGVmdDo0cHg7LW1vei11c2VyLXNlbGVjdDp0ZXh0Oy1raHRtbC11c2VyLXNlbGVjdDp0ZXh0O30uZGh4X3RyZWVfdGV4dFNpZ257Zm9udC1zaXplOjhwdDtmb250LWZhbWlseTptb25vc3BhY2U7d2lkdGg6MjFweDtjb2xvcjo7cGFkZGluZzowO21hcmdpbjowO2N1cnNvcjpwb2ludGVyO3RleHQtYWxpZ246Y2VudGVyO30uZGh4X3RyZWVfb3BhY2l0eXtvcGFjaXR5OjA7ZmlsdGVyOnByb2dpZDpEWEltYWdlVHJhbnNmb3JtLk1pY3Jvc29mdC5BbHBoYShvcGFjaXR5PTApOy13ZWJraXQtdXNlci1zZWxlY3Q6bm9uZTsta2h0bWwtdXNlci1zZWxlY3Q6bm9uZTstbW96LXVzZXItc2VsZWN0Om5vbmU7LW1zLXVzZXItc2VsZWN0Om5vbmU7LW8tdXNlci1zZWxlY3Q6bm9uZTt1c2VyLXNlbGVjdDpub25lO30uZGh4X2JnX2ltZ19maXh7d2lkdGg6MThweDtoZWlnaHQ6MjRweDtiYWNrZ3JvdW5kLXJlcGVhdDpuby1yZXBlYXQ7YmFja2dyb3VuZC1wb3NpdGlvbjpjZW50ZXI7YmFja2dyb3VuZC1wb3NpdGlvbi14OmNlbnRlcjtiYWNrZ3JvdW5kLXBvc2l0aW9uLXk6Y2VudGVyO30uZGh4dHJlZV9za2luX2RldGVjdHtwb3NpdGlvbjphYnNvbHV0ZTtsZWZ0OjA7dG9wOi0xMDBweDttYXJnaW46MDtwYWRkaW5nOjA7Ym9yZGVyOjAgc29saWQgd2hpdGU7d2lkdGg6NDBweDtoZWlnaHQ6MTBweDtvdmVyZmxvdzpoaWRkZW47fScsZG9jdW1lbnQuaGVhZC5hcHBlbmRDaGlsZChzdHlsZSk7dmFyIGxheWFhaXJfZGVidWdfdmlldz17fTt3aW5kb3cubGF5YWFpcl9kZWJ1Z192aWV3PWxheWFhaXJfZGVidWdfdmlldyxsYXlhYWlyX2RlYnVnX3ZpZXcuaW5pdExheWFBaXJEZWJ1Z1ZpZXc9ZnVuY3Rpb24oZSl7ZS5zdHlsZS5ib3JkZXI9IjFweCBzb2xpZCBibGFjayI7dmFyIHQ9TWF0aC5taW4oMjUwLC4zKmUub2Zmc2V0V2lkdGgpLGk9JzxkaXYgY2xhc3M9InRvcC1iYW5uZXIiPlxuPC9kaXY+XG48ZGl2PlxuPGRpdiBzdHlsZT0ib3ZlcmZsb3c6aGlkZGVuOyBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjNDQ0OyBwYWRkaW5nOjVweCI+XG48ZGl2IHN0eWxlPSJmbG9hdDpsZWZ0Ij5cbjxidXR0b24gaWQ9Im5vZGVfZnVuY3Rpb25hbGl0eV9jb250cm9sIj7lrqHmn6XlhYPntKA8L2J1dHRvbj5cbjxidXR0b24gaWQ9InJlZnJlc2hfY29udHJvbCI+5Yi35pawPC9idXR0b24+XG48L2Rpdj5cbjxkaXYgc3R5bGU9ImZsb2F0OnJpZ2h0Ij5cbjxpbnB1dCB0eXBlPSJjaGVja2JveCIgaWQ9InNob3dfY3VycmVudF9jYWNoZV9jb250cm9sIj7mmL7npLrlvZPliY1jYWNoZemHjee7mDwvaW5wdXQ+XG48aW5wdXQgdHlwZT0iY2hlY2tib3giIGlkPSJzaG93X2FsbF9jYWNoZV9jb250cm9sIj7mmL7npLrmiYDmnIljYWNoZeWMuuWfnzwvaW5wdXQ+XG48aW5wdXQgdHlwZT0iY2hlY2tib3giIGlkPSJzaG93X2F0bGFzX2NvbnRyb2wiPuaYvuekuuWkp+WbvuWQiOmbhjwvaW5wdXQ+XG48L2Rpdj5cbjwvZGl2PlxuPGRpdiBjbGFzcz0iaGdyb3VwIj5cbjxkaXYgc3R5bGU9ImZsb2F0OmxlZnQ7d2lkdGg6Jyt0KydweDsgYm9yZGVyLXJpZ2h0OjFweCBzb2xpZCBibGFjayIgaWQ9InRyZWVfY29udGFpbmVyIj48L2Rpdj5cbjxkaXYgc3R5bGU9Im92ZXJmbG93OmhpZGRlbiI+XG48ZGl2IGlkPSJjb250ZW50X3Rvb2xiYXIiIHN0eWxlPSJ3aWR0aDoxMDAlO21hcmdpbjoxMHB4Ij48aW5wdXQgdHlwZT0iY2hlY2tib3giIGlkPSJ2aXNpYmlsaXR5X2NvbnRyb2wiPuWPr+ingTwvaW5wdXQ+XG48aW5wdXQgdHlwZT0iY2hlY2tib3giIGlkPSJzaG93X2JvcmRlcl9jb250cm9sIj7mmL7npLrovrnmoYY8L2lucHV0PlxuPGJ1dHRvbiBpZD0ibG9nX2luZm9fY29udHJvbCI+5omT5Y2w5Yiw5o6n5Yi25Y+wPC9idXR0b24+XG48YnV0dG9uIGlkPSJlbmFibGVkX25vZGVfY2hhaW5fY29udHJvbCI+ZW5hYmxl6ZO+PC9idXR0b24+XG48YnV0dG9uIGlkPSJzaXplX2NoYWluX2NvbnRyb2wiPnNpemXpk748L2J1dHRvbj5cbjwvZGl2PjxkaXYgc3R5bGU9Im92ZXJmbG93OmF1dG8iPjx0YWJsZSBpZD0iY29udGVudF90YWJsZSIgc3R5bGU9ImJvcmRlcjoxcHggc29saWQgI2NjY2NjYztib3JkZXItY29sbGFwc2U6Y29sbGFwc2UiPjwvdGFibGU+XG48L2Rpdj48L2Rpdj5cbjwvZGl2PlxuPC9kaXY+JztlLmlubmVySFRNTD1pLHRoaXMuY29udGFpbmVyPWUsdGhpcy50cmVlPW5ldyBkaHRtbFhUcmVlT2JqZWN0KHRyZWVfY29udGFpbmVyLCIxMDAlIiwiMTAwJSIsMCksbm9kZV9mdW5jdGlvbmFsaXR5X2NvbnRyb2wub25jbGljaz1mdW5jdGlvbihlKXtlLnN0b3BQcm9wYWdhdGlvbigpLGxheWFhaXJfZGVidWdfdmlldy5vbl9pbnNwZWN0X2VsZW1lbnRfY2FsbGJhY2soKSxub2RlX2Z1bmN0aW9uYWxpdHlfY29udHJvbC5zdHlsZS5iYWNrZ3JvdW5kQ29sb3I9IiNGRkYiLG5vZGVfZnVuY3Rpb25hbGl0eV9jb250cm9sLnN0eWxlLmNvbG9yPSJyZ2IoMTA3LCAxNjMsIDI1NSkifX0sbGF5YWFpcl9kZWJ1Z192aWV3LnNldFRyZWU9ZnVuY3Rpb24oZSl7Zm9yKHZhciB0PXRoaXMudHJlZS5nZXRBbGxJdGVtc1dpdGhLaWRzKCkuc3BsaXQoIiwiKSxpPVtdLG49MDtuPHQubGVuZ3RoO24rKyl7dmFyIG89dFtuXSxyPXRoaXMudHJlZS5nZXRPcGVuU3RhdGUobyk7MT09ciYmaS5wdXNoKG8pfXRoaXMudHJlZS5kZWxldGVDaGlsZEl0ZW1zKDApLHRoaXMudHJlZS5wYXJzZShlLCJqc29uIik7Zm9yKHZhciBuPTA7bjxpLmxlbmd0aDtuKyspdGhpcy50cmVlLm9wZW5JdGVtKGlbbl0pfSxsYXlhYWlyX2RlYnVnX3ZpZXcucmVzaXplPWZ1bmN0aW9uKGUsdCl7dGhpcy5jb250YWluZXIuc3R5bGUud2lkdGg9ZSsicHgiLHRoaXMuY29udGFpbmVyLnN0eWxlLmhlaWdodD10KyJweCI7dmFyIGk9dGhpcy5jb250YWluZXIub2Zmc2V0SGVpZ2h0LXRyZWVfY29udGFpbmVyLm9mZnNldFRvcDt0cmVlX2NvbnRhaW5lci5zdHlsZS5oZWlnaHQ9aSsicHgiLGNvbnRlbnRfdG9vbGJhci5zdHlsZS53aWR0aD1lLXRyZWVfY29udGFpbmVyLm9mZnNldFdpZHRoKyJweCIsY29udGVudF90YWJsZS5wYXJlbnRFbGVtZW50LnN0eWxlLmhlaWdodD1pLWNvbnRlbnRfdG9vbGJhci5vZmZzZXRIZWlnaHQtMjErInB4Iixjb250ZW50X3RhYmxlLnN0eWxlLndpZHRoPWUtdHJlZV9jb250YWluZXIub2Zmc2V0V2lkdGgtMTYrInB4In0sbGF5YWFpcl9kZWJ1Z192aWV3LmJvdW5jZVVwSW5zcGVjdEJ1dHRvbj1mdW5jdGlvbigpe25vZGVfZnVuY3Rpb25hbGl0eV9jb250cm9sLnN0eWxlLmJhY2tncm91bmRDb2xvcj0iYnV0dG9uZmFjZSIsbm9kZV9mdW5jdGlvbmFsaXR5X2NvbnRyb2wuc3R5bGUuY29sb3I9ImJsYWNrIn0sbGF5YWFpcl9kZWJ1Z192aWV3LnNldFZhbHVlSW5wdXRIYW5kbGVyPWZ1bmN0aW9uKGUpe3RoaXMudmFsdWVfaW5wdXRfY2FsbGJhY2s9ZX0sbGF5YWFpcl9kZWJ1Z192aWV3LnNldFZhbHVlQ2hhbmdlSGFuZGxlcj1mdW5jdGlvbihlKXt0aGlzLnZhbHVlX2NoYW5nZV9jYWxsYmFjaz1lfSxsYXlhYWlyX2RlYnVnX3ZpZXcuYWRkQ29udGVudD1mdW5jdGlvbihlKXt2YXIgdD1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJ0ciIpO3QuaW5uZXJIVE1MPSc8dGQgc3R5bGU9IndpZHRoOjEwMHB4O2ZvbnQtc2l6ZToxM3B4O2JvcmRlcjoxcHggc29saWQgI0NDQztwYWRkaW5nLWxlZnQ6MTBweCI+JytlLmtleSsnPC90ZD5cbjx0ZCBzdHlsZT0id2lkdGg6MjAwcHg7Ym9yZGVyOjFweCBzb2xpZCAjQ0NDOyI+PGlucHV0IHN0eWxlPSJib3JkZXI6bm9uZTt3aWR0aDoxMDAlO2hlaWdodDoyNXB4O3BhZGRpbmctbGVmdDoxMHB4OyIgdmFsdWU9JytlLnZhbHVlKyI+PC90ZD4iLGNvbnRlbnRfdGFibGUuYXBwZW5kQ2hpbGQodCk7dmFyIGk9dC5sYXN0RWxlbWVudENoaWxkLmxhc3RFbGVtZW50Q2hpbGQ7aS5kYXRhPWUsaS5vbmlucHV0PWZ1bmN0aW9uKGUpe3RoaXMudmFsdWVfaW5wdXRfY2FsbGJhY2smJnRoaXMudmFsdWVfaW5wdXRfY2FsbGJhY2soZS50YXJnZXQuZGF0YSxlLnRhcmdldC52YWx1ZSl9LmJpbmQodGhpcyksaS5vbmNoYW5nZT1mdW5jdGlvbihlKXt0aGlzLnZhbHVlX2NoYW5nZV9jYWxsYmFjayYmdGhpcy52YWx1ZV9jaGFuZ2VfY2FsbGJhY2soZS50YXJnZXQuZGF0YSxlLnRhcmdldC52YWx1ZSl9LmJpbmQodGhpcyl9LGxheWFhaXJfZGVidWdfdmlldy5zZXRDb250ZW50cz1mdW5jdGlvbihlKXtjb250ZW50X3RhYmxlLmlubmVySFRNTD0iIjtmb3IodmFyIHQ9MDt0PGUubGVuZ3RoO3QrKyl7dmFyIGk9ZVt0XTt0aGlzLmFkZENvbnRlbnQoaSl9fSxsYXlhYWlyX2RlYnVnX3ZpZXcuY2hhbmdlVmFsdWVBdD1mdW5jdGlvbihlLHQpe2NvbnRlbnRfdGFibGUuY2hpbGRyZW5bZV0ubGFzdEVsZW1lbnRDaGlsZC5maXJzdEVsZW1lbnRDaGlsZC52YWx1ZT10fSxsYXlhYWlyX2RlYnVnX3ZpZXcuY2hhbmdlVmFsdWVCeUxhYmVsPWZ1bmN0aW9uKGUsdCl7Zm9yKHZhciBpPWNvbnRlbnRfdGFibGUuY2hpbGRyZW4ubGVuZ3RoLTE7aT49MDtpLS0paWYoY29udGVudF90YWJsZS5jaGlsZHJlbltpXS5maXJzdEVsZW1lbnRDaGlsZC5pbm5lclRleHQ9PWUpe2NvbnRlbnRfdGFibGUuY2hpbGRyZW5baV0ubGFzdEVsZW1lbnRDaGlsZC5maXJzdEVsZW1lbnRDaGlsZC52YWx1ZT10O2JyZWFrfX0sbGF5YWFpcl9kZWJ1Z192aWV3LnNldFZpc2liaWxpdHk9ZnVuY3Rpb24oZSl7dmlzaWJpbGl0eV9jb250cm9sLmNoZWNrZWQ9ISFlfSxsYXlhYWlyX2RlYnVnX3ZpZXcuc2V0U2hvd0RlYnVnQm9yZGVyPWZ1bmN0aW9uKGUpe3Nob3dfYm9yZGVyX2NvbnRyb2wuY2hlY2tlZD0hIWV9LGxheWFhaXJfZGVidWdfdmlldy5nZXRWaXNpYmlsaXR5PWZ1bmN0aW9uKCl7cmV0dXJuIHZpc2liaWxpdHlfY29udHJvbC5jaGVja2VkfSxsYXlhYWlyX2RlYnVnX3ZpZXcuZ2V0U2hvd0RlYnVnQm9yZGVyPWZ1bmN0aW9uKCl7cmV0dXJuIHNob3dfYm9yZGVyX2NvbnRyb2wuY2hlY2tlZH0sbGF5YWFpcl9kZWJ1Z192aWV3LmdldFNob3dDdXJyZW50Q2FjaGU9ZnVuY3Rpb24oKXtyZXR1cm4gc2hvd19jdXJyZW50X2NhY2hlX2NvbnRyb2wuY2hlY2tlZH0sbGF5YWFpcl9kZWJ1Z192aWV3LmdldFNob3dBbGxDYWNoZT1mdW5jdGlvbigpe3JldHVybiBzaG93X2FsbF9jYWNoZV9jb250cm9sLmNoZWNrZWR9LGxheWFhaXJfZGVidWdfdmlldy5nZXRTaG93QXRsYXM9ZnVuY3Rpb24oKXtyZXR1cm4gc2hvd19hdGxhc19jb250cm9sLmNoZWNrZWR9LGxheWFhaXJfZGVidWdfdmlldy5vbkluc3BlY3RFbGVtZW50PWZ1bmN0aW9uKGUpe3RoaXMub25faW5zcGVjdF9lbGVtZW50X2NhbGxiYWNrPWV9LGxheWFhaXJfZGVidWdfdmlldy5vbkxvZ0luZm89ZnVuY3Rpb24oZSl7bG9nX2luZm9fY29udHJvbC5vbmNsaWNrPWV9LGxheWFhaXJfZGVidWdfdmlldy5vblJlZnJlc2g9ZnVuY3Rpb24oZSl7cmVmcmVzaF9jb250cm9sLm9uY2xpY2s9ZX0sbGF5YWFpcl9kZWJ1Z192aWV3Lm9uUHJpbnRFbmFibGVkTm9kZUNoYWluPWZ1bmN0aW9uKGUpe2VuYWJsZWRfbm9kZV9jaGFpbl9jb250cm9sLm9uY2xpY2s9ZX0sbGF5YWFpcl9kZWJ1Z192aWV3Lm9uUHJpbnRTaXplQ2hhaW49ZnVuY3Rpb24oZSl7c2l6ZV9jaGFpbl9jb250cm9sLm9uY2xpY2s9ZX0sbGF5YWFpcl9kZWJ1Z192aWV3Lm9uVG9nZ2xlVmlzaWJpbGl0eT1mdW5jdGlvbihlKXt2aXNpYmlsaXR5X2NvbnRyb2wub25jaGFuZ2U9ZX0sbGF5YWFpcl9kZWJ1Z192aWV3Lm9uVG9nZ2xlRGVidWdCb3JkZXI9ZnVuY3Rpb24oZSl7c2hvd19ib3JkZXJfY29udHJvbC5vbmNoYW5nZT1lfSxsYXlhYWlyX2RlYnVnX3ZpZXcub25Ub2dnbGVTaG93Q3VycmVudENhY2hlPWZ1bmN0aW9uKGUpe3Nob3dfY3VycmVudF9jYWNoZV9jb250cm9sLm9uY2hhbmdlPWV9LGxheWFhaXJfZGVidWdfdmlldy5vblRvZ2dsZVNob3dBbGxDYWNoZT1mdW5jdGlvbihlKXtzaG93X2FsbF9jYWNoZV9jb250cm9sLm9uY2hhbmdlPWV9LGxheWFhaXJfZGVidWdfdmlldy5vblRvZ2dsZVNob3dBdGxhcz1mdW5jdGlvbihlKXtzaG93X2F0bGFzX2NvbnRyb2wub25jaGFuZ2U9ZX07\";\n\treturn DivScripts;\n})()\n\n\n/**\n*tianpeng\n*@author\n*/\n//class laya.debug.tools.AtlasTools\nvar AtlasTools=(function(){\n\tfunction AtlasTools(){\n\t\tthis.mSprite=null;\n\t\tthis.mIndex=0;\n\t\tthis.mTextureDic={};\n\t}\n\n\t__class(AtlasTools,'laya.debug.tools.AtlasTools');\n\tvar __proto=AtlasTools.prototype;\n\t__proto.start=function(){\n\t\tif (!Render.isWebGL)return;\n\t\tif (this.mSprite==null){\n\t\t\tthis.mSprite=new Sprite();\n\t\t}\n\t\tLaya.stage.addChild(this.mSprite);\n\t\tthis.showNext();\n\t}\n\n\t__proto.end=function(){\n\t\tif (!Render.isWebGL)return;\n\t\tif (this.mSprite){\n\t\t\tLaya.stage.removeChild(this.mSprite);\n\t\t}\n\t}\n\n\t__proto.showNext=function(){\n\t\tif (!Render.isWebGL)return;\n\t\tif (this.mSprite==null){\n\t\t\tthis.mSprite=new Sprite();\n\t\t}\n\t\tLaya.stage.addChild(this.mSprite);\n\t\tthis.mIndex++;\n\t\tvar resManager;\n\t\t/*__JS__ */resManager=laya.webgl.atlas.AtlasResourceManager.instance;;\n\t\tvar tCount=resManager.getAtlaserCount();\n\t\tif (this.mIndex >=tCount){\n\t\t\tthis.mIndex=0;\n\t\t};\n\t\tvar tTexture;\n\t\tif (this.mTextureDic[this.mIndex]){\n\t\t\ttTexture=this.mTextureDic[this.mIndex];\n\t\t\t}else {\n\t\t\tvar tAtlaser=resManager.getAtlaserByIndex(this.mIndex);\n\t\t\tif (tAtlaser && tAtlaser.texture){\n\t\t\t\ttTexture=new Texture(tAtlaser.texture,null);\n\t\t\t\tthis.mTextureDic[this.mIndex]=tTexture;\n\t\t\t}\n\t\t}\n\t\tif (tTexture){\n\t\t\tthis.mSprite.graphics.clear();\n\t\t\tthis.mSprite.graphics.save();\n\t\t\tthis.mSprite.graphics.alpha(0.9);\n\t\t\tthis.mSprite.graphics.drawRect(0,0,1024,1024,\"#efefefe\");\n\t\t\tthis.mSprite.graphics.restore();\n\t\t\tthis.mSprite.graphics.drawTexture(tTexture,0,0,1024,1024);\n\t\t\tthis.mSprite.graphics.fillText((this.mIndex+1).toString()+\"/\"+tCount.toString(),25,100,\"40px Arial\",\"#ff0000\",\"left\");\n\t\t}\n\t}\n\n\tAtlasTools.getInstance=function(){\n\t\treturn AtlasTools.mInstance=AtlasTools.mInstance|| new AtlasTools();\n\t}\n\n\tAtlasTools.mInstance=null;\n\treturn AtlasTools;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.Base64Atlas\nvar Base64Atlas=(function(){\n\tfunction Base64Atlas(data,idKey){\n\t\tthis.data=null;\n\t\tthis.replaceO=null;\n\t\tthis.idKey=null;\n\t\tthis._loadedHandler=null;\n\t\tthis.data=data;\n\t\tif (!idKey)idKey=Math.random()+\"key\";\n\t\tthis.idKey=idKey;\n\t\tthis.init();\n\t}\n\n\t__class(Base64Atlas,'laya.debug.tools.Base64Atlas');\n\tvar __proto=Base64Atlas.prototype;\n\t//preLoad();\n\t__proto.init=function(){\n\t\tthis.replaceO={};\n\t\tvar key;\n\t\tfor (key in this.data){\n\t\t\tthis.replaceO[key]=this.idKey+\"/\"+key;\n\t\t}\n\t}\n\n\t__proto.getAdptUrl=function(url){\n\t\treturn this.replaceO[url];\n\t}\n\n\t__proto.preLoad=function(completeHandler){\n\t\tthis._loadedHandler=completeHandler;\n\t\tLaya.loader.load(Base64ImageTool.getPreloads(this.data),new Handler(this,this.preloadEnd));\n\t}\n\n\t__proto.preloadEnd=function(){\n\t\tvar key;\n\t\tfor (key in this.data){\n\t\t\tvar tx;\n\t\t\ttx=Laya.loader.getRes(this.data[key]);\n\t\t\tLoader.cacheRes(this.replaceO[key],tx);\n\t\t}\n\t\tif (this._loadedHandler){\n\t\t\tthis._loadedHandler.run();\n\t\t}\n\t}\n\n\t__proto.replaceRes=function(uiObj){\n\t\tObjectTools.replaceValue(uiObj,this.replaceO);\n\t}\n\n\treturn Base64Atlas;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.Base64ImageTool\nvar Base64ImageTool=(function(){\n\tfunction Base64ImageTool(){}\n\t__class(Base64ImageTool,'laya.debug.tools.Base64ImageTool');\n\tBase64ImageTool.getCanvasPic=function(img){\n\t\timg=img.bitmap;\n\t\tvar canvas=Browser.createElement(\"canvas\");\n\t\tvar ctx=canvas.getContext('2d');\n\t\tcanvas.height=img.height;\n\t\tcanvas.width=img.width;\n\t\tctx.drawImage(img.source,0,0);\n\t\treturn canvas;\n\t}\n\n\tBase64ImageTool.getBase64Pic=function(img){\n\t\treturn Base64ImageTool.getCanvasPic(img).toDataURL(\"image/png\");\n\t}\n\n\tBase64ImageTool.getPreloads=function(base64Data){\n\t\tvar rst;\n\t\trst=[];\n\t\tvar key;\n\t\tfor (key in base64Data){\n\t\t\trst.push({url:base64Data[key],type:/*laya.net.Loader.IMAGE*/\"image\" });\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn Base64ImageTool;\n})()\n\n\n/**\n*base64编码解码类\n*@author ww\n*/\n//class laya.debug.tools.Base64Tool\nvar Base64Tool=(function(){\n\tfunction Base64Tool(){}\n\t__class(Base64Tool,'laya.debug.tools.Base64Tool');\n\tBase64Tool.init=function(){\n\t\tif (Base64Tool.lookup)\n\t\t\treturn;\n\t\tBase64Tool.lookup=new Uint8Array(256)\n\t\tfor (var i=0;i < Base64Tool.chars.length;i++){\n\t\t\tBase64Tool.lookup[Base64Tool.chars.charCodeAt(i)]=i;\n\t\t}\n\t}\n\n\tBase64Tool.encode=function(arraybuffer){\n\t\tvar bytes=new Uint8Array(arraybuffer),i=0,len=bytes.length,base64=\"\";\n\t\tfor (i=0;i < len;i+=3){\n\t\t\tbase64+=Base64Tool.chars[bytes[i] >> 2];\n\t\t\tbase64+=Base64Tool.chars[((bytes[i] & 3)<< 4)| (bytes[i+1] >> 4)];\n\t\t\tbase64+=Base64Tool.chars[((bytes[i+1] & 15)<< 2)| (bytes[i+2] >> 6)];\n\t\t\tbase64+=Base64Tool.chars[bytes[i+2] & 63];\n\t\t}\n\t\tif ((len % 3)===2){\n\t\t\tbase64=base64.substring(0,base64.length-1)+\"=\";\n\t\t}\n\t\telse if (len % 3===1){\n\t\t\tbase64=base64.substring(0,base64.length-2)+\"==\";\n\t\t}\n\t\treturn base64;\n\t}\n\n\tBase64Tool.encodeStr=function(str){\n\t\tvar byte;\n\t\tbyte=new Byte();\n\t\tbyte.writeUTFString(str);\n\t\treturn Base64Tool.encodeByte(byte);\n\t}\n\n\tBase64Tool.encodeStr2=function(str){\n\t\tvar byte;\n\t\tbyte=new Byte();\n\t\tbyte.writeUTFBytes(str);\n\t\treturn Base64Tool.encodeByte(byte);\n\t}\n\n\tBase64Tool.encodeByte=function(byte,start,end){\n\t\t(start===void 0)&& (start=0);\n\t\t(end===void 0)&& (end=-1);\n\t\tif (end < 0){\n\t\t\tend=byte.length;\n\t\t}\n\t\treturn Base64Tool.encode(byte.buffer.slice(start,end));\n\t}\n\n\tBase64Tool.decodeToByte=function(base64){\n\t\treturn new Byte(Base64Tool.decode(base64));\n\t}\n\n\tBase64Tool.decode=function(base64){\n\t\tBase64Tool.init();\n\t\tvar bufferLength=base64.length *0.75,len=base64.length,i=0,p=0,encoded1=0,encoded2=0,encoded3=0,encoded4=0;\n\t\tif (base64[base64.length-1]===\"=\"){\n\t\t\tbufferLength--;\n\t\t\tif (base64[base64.length-2]===\"=\"){\n\t\t\t\tbufferLength--;\n\t\t\t}\n\t\t};\n\t\tvar arraybuffer=new ArrayBuffer(bufferLength),bytes=new Uint8Array(arraybuffer);\n\t\tfor (i=0;i < len;i+=4){\n\t\t\tencoded1=Base64Tool.lookup[base64.charCodeAt(i)];\n\t\t\tencoded2=Base64Tool.lookup[base64.charCodeAt(i+1)];\n\t\t\tencoded3=Base64Tool.lookup[base64.charCodeAt(i+2)];\n\t\t\tencoded4=Base64Tool.lookup[base64.charCodeAt(i+3)];\n\t\t\tbytes[p++]=(encoded1 << 2)| (encoded2 >> 4);\n\t\t\tbytes[p++]=((encoded2 & 15)<< 4)| (encoded3 >> 2);\n\t\t\tbytes[p++]=((encoded3 & 3)<< 6)| (encoded4 & 63);\n\t\t}\n\t\treturn arraybuffer;\n\t}\n\n\tBase64Tool.chars=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\tBase64Tool.lookup=null;\n\treturn Base64Tool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.CacheAnalyser\nvar CacheAnalyser=(function(){\n\tfunction CacheAnalyser(){}\n\t__class(CacheAnalyser,'laya.debug.tools.CacheAnalyser');\n\tvar __proto=CacheAnalyser.prototype;\n\t__proto.renderCanvas=function(sprite,time){\n\t\t(time===void 0)&& (time=0);\n\t\tif (!CacheAnalyser.showCacheSprite)return;\n\t\tif (DebugInfoLayer.I.isDebugItem(sprite))return;\n\t\tDebugTool.showDisBoundToSprite(sprite,DebugInfoLayer.I.cacheViewLayer,DebugConsts.CANVAS_REC_COLOR,4);\n\t}\n\n\t__proto.reCacheCanvas=function(sprite,time){\n\t\t(time===void 0)&& (time=0);\n\t\tif (!CacheAnalyser.showRecacheSprite)return;\n\t\tif (DebugInfoLayer.I.isDebugItem(sprite))return;\n\t\tvar info;\n\t\tinfo=CacheAnalyser.getNodeInfoByNode(sprite);\n\t\tinfo.addCount(time);\n\t\tCacheAnalyser.counter.addTime(sprite,time);\n\t\tif (!info.parent){\n\t\t\tDebugInfoLayer.I.nodeRecInfoLayer.addChild(info);\n\t\t}\n\t}\n\n\tCacheAnalyser.renderLoopBegin=function(){\n\t\tDebugInfoLayer.I.cacheViewLayer.graphics.clear();\n\t}\n\n\tCacheAnalyser.getNodeInfoByNode=function(node){\n\t\tIDTools.idObj(node);\n\t\tvar key=0;\n\t\tkey=IDTools.getObjID(node);\n\t\tif (!CacheAnalyser._nodeInfoDic[key]){\n\t\t\tCacheAnalyser._nodeInfoDic[key]=new ReCacheRecInfo();\n\t\t}\n\t\t(CacheAnalyser._nodeInfoDic [key]).setTarget(node);\n\t\treturn CacheAnalyser._nodeInfoDic[key];\n\t}\n\n\tCacheAnalyser._nodeInfoDic={};\n\tCacheAnalyser.showCacheSprite=false;\n\tCacheAnalyser.showRecacheSprite=true;\n\t__static(CacheAnalyser,\n\t['counter',function(){return this.counter=new ObjTimeCountTool();},'I',function(){return this.I=new CacheAnalyser();}\n\t]);\n\treturn CacheAnalyser;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2017-3-2 下午12:11:59\n*/\n//class laya.debug.tools.CallLaterTool\nvar CallLaterTool=(function(){\n\tfunction CallLaterTool(){\n\t\tthis._getHandler=null;\n\t\tthis._indexHandler=null;\n\t\tthis._pool=null;\n\t\tthis._laters=null;\n\t}\n\n\t__class(CallLaterTool,'laya.debug.tools.CallLaterTool');\n\tvar __proto=CallLaterTool.prototype;\n\t/**\n\t*延迟执行。\n\t*@param caller 执行域(this)。\n\t*@param method 定时器回调函数。\n\t*@param args 回调参数。\n\t*/\n\t__proto.callLater=function(caller,method,args){\n\t\tif (this._getHandler(caller,method)==null){\n\t\t\tCallLaterTool.oldCallLater.call(this,caller,method,args);\n\t\t\tif(CallLaterTool._isRecording){\n\t\t\t\tCallLaterTool._recordedCallLaters.push(this._laters[this._laters.length-1]);\n\t\t\t}\n\t\t}\n\t}\n\n\tCallLaterTool.initCallLaterRecorder=function(){\n\t\tif(CallLaterTool.oldCallLater)return;\n\t\tCallLaterTool.oldCallLater=Laya.timer[\"callLater\"];\n\t\tLaya.timer[\"callLater\"]=CallLaterTool[\"prototype\"][\"callLater\"];\n\t}\n\n\tCallLaterTool.beginRecordCallLater=function(){\n\t\tCallLaterTool.initCallLaterRecorder();\n\t\tCallLaterTool._isRecording=true;\n\t}\n\n\tCallLaterTool.runRecordedCallLaters=function(){\n\t\tCallLaterTool._isRecording=false;\n\t\tvar timer;\n\t\ttimer=Laya.timer;\n\t\tvar laters=timer[\"_laters\"];\n\t\tlaters=CallLaterTool._recordedCallLaters;\n\t\tfor (var i=0,n=laters.length-1;i <=n;i++){\n\t\t\tvar handler=laters[i];\n\t\t\tif(CallLaterTool._recordedCallLaters.indexOf(handler)<0)continue ;\n\t\t\thandler.method!==null && handler.run(false);\n\t\t\ttimer[\"_recoverHandler\"](handler);\n\t\t\tlaters.splice(i,1);\n\t\t}\n\t\tCallLaterTool._recordedCallLaters.length=0;\n\t}\n\n\tCallLaterTool._recordedCallLaters=[];\n\tCallLaterTool._isRecording=false;\n\tCallLaterTool.oldCallLater=null;\n\treturn CallLaterTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.CanvasTools\nvar CanvasTools=(function(){\n\tfunction CanvasTools(){}\n\t__class(CanvasTools,'laya.debug.tools.CanvasTools');\n\tCanvasTools.createCanvas=function(width,height){\n\t\tvar rst=new HTMLCanvas(\"2D\");\n\t\trst.getContext('2d');\n\t\trst.size(width,height);\n\t\treturn rst;\n\t}\n\n\tCanvasTools.renderSpriteToCanvas=function(sprite,canvas,offsetX,offsetY){\n\t\tRenderSprite.renders[sprite._renderType]._fun(sprite,canvas.context,offsetX,offsetY);\n\t}\n\n\tCanvasTools.getImageDataFromCanvas=function(canvas,x,y,width,height){\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\tif (width <=0)\n\t\t\twidth=canvas.width;\n\t\tif (height <=0)\n\t\t\theight=canvas.height;\n\t\tvar imgdata=canvas.context.getImageData(x,y,width,height);\n\t\treturn imgdata;\n\t}\n\n\tCanvasTools.getImageDataFromCanvasByRec=function(canvas,rec){\n\t\tvar imgdata=canvas.context.getImageData(rec.x,rec.y,rec.width,rec.height);\n\t\treturn imgdata;\n\t}\n\n\tCanvasTools.getDifferCount=function(imageData1,imageData2){\n\t\tvar data1=imageData1.data;\n\t\tvar data2=imageData2.data;\n\t\tvar differCount=0;\n\t\tdifferCount=0;\n\t\tCanvasTools.walkImageData(imageData1,myWalkFun);\n\t\treturn differCount;\n\t\tfunction myWalkFun (i,j,tarPos,data){\n\t\t\tif (!CanvasTools.isPoinSame(tarPos,data1,data2))differCount++;\n\t\t}\n\t}\n\n\tCanvasTools.getDifferRate=function(imageData1,imageData2){\n\t\treturn CanvasTools.getDifferCount(imageData1,imageData2)/(imageData1.width *imageData1.height);\n\t}\n\n\tCanvasTools.getCanvasDisRec=function(canvas){\n\t\tvar rst;\n\t\trst=new Rectangle;\n\t\tvar imgdata;\n\t\timgdata=CanvasTools.getImageDataFromCanvas(canvas,0,0);\n\t\tvar maxX=0;\n\t\tvar minX=0;\n\t\tvar maxY=0;\n\t\tvar minY=0;\n\t\tmaxX=maxY=0;\n\t\tminX=imgdata.width;\n\t\tminY=imgdata.height;\n\t\tvar i=0,iLen=0;\n\t\tvar j=0,jLen=0;\n\t\tiLen=imgdata.width;\n\t\tjLen=imgdata.height;\n\t\tvar data;\n\t\tdata=imgdata.data;\n\t\tvar tarPos=0;\n\t\tfor (j=0;j < jLen;j++){\n\t\t\tfor (i=0;i < iLen;i++){\n\t\t\t\tif (!CanvasTools.isEmptyPoint(data,tarPos)){\n\t\t\t\t\tif (minX > i)\n\t\t\t\t\t\tminX=i;\n\t\t\t\t\tif (maxX < i)\n\t\t\t\t\t\tmaxX=i;\n\t\t\t\t\tif (minY > j)\n\t\t\t\t\t\tminY=j;\n\t\t\t\t\tif (maxY < j)\n\t\t\t\t\t\tmaxY=j;\n\t\t\t\t}\n\t\t\t\ttarPos+=4;\n\t\t\t}\n\t\t}\n\t\trst.setTo(minX,minY,maxX-minX+1,maxY-minY+1);\n\t\treturn rst;\n\t}\n\n\tCanvasTools.fillCanvasRec=function(canvas,rec,color){\n\t\tvar ctx=canvas.context;\n\t\tctx.fillStyle=color;\n\t\tctx.fillRect(rec.x,rec.y,rec.width,rec.height);\n\t}\n\n\tCanvasTools.isEmptyPoint=function(data,pos){\n\t\tif (data[pos]==0 && data[pos+1]==0 && data[pos+2]==0 && data[pos+3]==0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tCanvasTools.isPoinSame=function(pos,data1,data2){\n\t\tif (data1[pos]==data2[pos] && data1[pos+1]==data2[pos+1] && data1[pos+2]==data2[pos+2] && data1[pos+3]==data2[pos+3]){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tCanvasTools.walkImageData=function(imgdata,walkFun){\n\t\tvar i=0,iLen=0;\n\t\tvar j=0,jLen=0;\n\t\tiLen=imgdata.width;\n\t\tjLen=imgdata.height;\n\t\tvar tarPos=0;\n\t\tvar data=imgdata.data;\n\t\tfor (i=0;i < iLen;i++){\n\t\t\tfor (j=0;j < jLen;j++){\n\t\t\t\twalkFun(i,j,tarPos,data);\n\t\t\t\ttarPos+=4;\n\t\t\t}\n\t\t}\n\t}\n\n\tCanvasTools.getSpriteByCanvas=function(canvas){\n\t\tvar rst;\n\t\trst=new Sprite();\n\t\trst.graphics.drawTexture(new Texture(canvas),0,0,canvas.width,canvas.height);\n\t\treturn rst;\n\t}\n\n\tCanvasTools.renderSpritesToCanvas=function(canvas,sprites,offx,offy,startIndex){\n\t\t(offx===void 0)&& (offx=0);\n\t\t(offy===void 0)&& (offy=0);\n\t\t(startIndex===void 0)&& (startIndex=0);\n\t\tvar i=0,len=0;\n\t\tlen=sprites.length;\n\t\tfor (i=startIndex;i < len;i++){\n\t\t\tCanvasTools.renderSpriteToCanvas(sprites[i],canvas,offx,offy);\n\t\t}\n\t}\n\n\tCanvasTools.clearCanvas=function(canvas){\n\t\tvar preWidth=NaN;\n\t\tvar preHeight=NaN;\n\t\tpreWidth=canvas.width;\n\t\tpreHeight=canvas.height;\n\t\tcanvas.size(preWidth+1,preHeight);\n\t\tcanvas.size(preWidth,preHeight);\n\t}\n\n\tCanvasTools.getImagePixels=function(x,y,width,data,colorLen){\n\t\t(colorLen===void 0)&& (colorLen=4);\n\t\tvar pos=0;\n\t\tpos=(x *width+y)*colorLen;\n\t\tvar i=0,len=0;\n\t\tvar rst;\n\t\trst=[];\n\t\tlen=colorLen;\n\t\tfor (i=0;i < len;i++){\n\t\t\trst.push(data[pos+i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn CanvasTools;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-23 下午2:24:04\n*/\n//class laya.debug.tools.ClassTool\nvar ClassTool=(function(){\n\tfunction ClassTool(){}\n\t__class(ClassTool,'laya.debug.tools.ClassTool');\n\tClassTool.defineProperty=function(obj,name,des){\n\t\t/*__JS__ */Object.defineProperty(obj,name,des);;\n\t}\n\n\tClassTool.getOwnPropertyDescriptor=function(obj,name){\n\t\tvar rst;\n\t\t/*__JS__ */rst=Object.getOwnPropertyDescriptor(obj,name);;\n\t\treturn rst;\n\t}\n\n\tClassTool.getOwnPropertyDescriptors=function(obj){\n\t\tvar rst;\n\t\t/*__JS__ */rst=Object.getOwnPropertyDescriptors(obj);;\n\t\treturn rst;\n\t}\n\n\tClassTool.getOwnPropertyNames=function(obj){\n\t\tvar rst;\n\t\t/*__JS__ */rst=Object.getOwnPropertyNames(obj);;\n\t\treturn rst;\n\t}\n\n\tClassTool.getObjectGetSetKeys=function(obj,rst){\n\t\tif (!rst)rst=[];\n\t\tvar keys;\n\t\tkeys=laya.debug.tools.ClassTool.getOwnPropertyNames(obj);\n\t\tvar key;\n\t\tfor (key in keys){\n\t\t\tkey=keys[key];\n\t\t\tif (key.indexOf(\"_$get_\")>=0){\n\t\t\t\tkey=key.replace(\"_$get_\",\"\");\n\t\t\t\trst.push(key);\n\t\t\t}\n\t\t}\n\t\tif (obj[\"__proto__\"]){\n\t\t\tClassTool.getObjectGetSetKeys(obj[\"__proto__\"],rst);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tClassTool.getObjectDisplayAbleKeys=function(obj,rst){\n\t\tif (!rst)rst=[];\n\t\tvar key;\n\t\tvar tValue;\n\t\tvar tType;\n\t\tfor (key in obj){\n\t\t\ttValue=obj[key];\n\t\t\ttType=typeof(tValue);\n\t\t\tif (key.charAt(0)==\"_\")continue ;\n\t\t\trst.push(key);\n\t\t}\n\t\tClassTool.getObjectGetSetKeys(obj,rst);\n\t\trst=ObjectTools.getNoSameArr(rst);\n\t\treturn rst;\n\t}\n\n\tClassTool.getClassName=function(tar){\n\t\tif ((typeof tar=='function'))return tar.name;\n\t\treturn tar[\"constructor\"].name;\n\t}\n\n\tClassTool.getNodeClassAndName=function(tar){\n\t\tif (!tar)return \"null\";\n\t\tvar rst;\n\t\tif (tar.name){\n\t\t\trst=ClassTool.getClassName(tar)+\"(\"+tar.name+\")\";\n\t\t\t}else{\n\t\t\trst=ClassTool.getClassName(tar);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tClassTool.getClassNameByClz=function(clz){\n\t\treturn clz[\"name\"];\n\t}\n\n\tClassTool.getClassByName=function(className){\n\t\tvar rst;\n\t\trst=Laya._runScript(className);\n\t\treturn rst;\n\t}\n\n\tClassTool.createObjByName=function(className){\n\t\tvar clz;\n\t\tclz=ClassTool.getClassByName(className);\n\t\treturn new clz();\n\t}\n\n\t__static(ClassTool,\n\t['displayTypes',function(){return this.displayTypes={\"boolean\":true,\"number\":true,\"string\":true };}\n\t]);\n\treturn ClassTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.ClickSelectTool\nvar ClickSelectTool=(function(){\n\tfunction ClickSelectTool(){\n\t\tthis.completeHandler=null;\n\t\tthis.tSelectTar=null;\n\t\tthis._selectTip=new Sprite();\n\t\tthis._selectTip.setBounds(new Rectangle(0,0,0,0));\n\t\tNotice.listen(/*laya.debug.tools.DisplayHook.ITEM_CLICKED*/\"ItemClicked\",this,this.itemClicked);\n\t}\n\n\t__class(ClickSelectTool,'laya.debug.tools.ClickSelectTool');\n\tvar __proto=ClickSelectTool.prototype;\n\t__proto.beginClickSelect=function(complete){\n\t\tthis.completeHandler=complete;\n\t\tClickSelectTool.isClickSelectState=true;\n\t\tthis.clickSelectChange();\n\t}\n\n\t__proto.clickSelectChange=function(){\n\t\tif (!Browser.onPC)return;\n\t\tthis.tSelectTar=null;\n\t\tthis.clearSelectTip();\n\t\tif (ClickSelectTool.isClickSelectState){\n\t\t\tLaya.timer.loop(200,this,this.updateSelectTar,null,true);\n\t\t\t}else{\n\t\t\tLaya.timer.clear(this,this.updateSelectTar);\n\t\t}\n\t}\n\n\t__proto.clearSelectTip=function(){\n\t\tthis._selectTip.removeSelf();\n\t}\n\n\t__proto.updateSelectTar=function(){\n\t\tthis.clearSelectTip();\n\t\tthis.tSelectTar=DisplayHook.instance.getDisUnderMouse();\n\t\tif (!this.tSelectTar){\n\t\t\treturn;\n\t\t}\n\t\tif (DebugInfoLayer.I.isDebugItem(this.tSelectTar))return;\n\t\tvar g;\n\t\tg=this._selectTip.graphics;\n\t\tg.clear();\n\t\tvar rec;\n\t\trec=NodeUtils.getGRec(this.tSelectTar);\n\t\tDebugInfoLayer.I.popLayer.addChild(this._selectTip);\n\t\tg.drawRect(0,0,rec.width,rec.height,null,DebugConsts.CLICK_SELECT_COLOR,2);\n\t\tthis._selectTip.pos(rec.x,rec.y);\n\t}\n\n\t__proto.itemClicked=function(tar){\n\t\tif (!ClickSelectTool.isClickSelectState)return;\n\t\tif (ClickSelectTool.ignoreDebugTool){\n\t\t\tif (DebugInfoLayer.I.isDebugItem(tar))return;\n\t\t}\n\t\tif ((tar instanceof laya.debug.uicomps.ContextMenuItem )|| (tar.parent instanceof laya.debug.uicomps.ContextMenuItem )){\n\t\t\treturn;\n\t\t}\n\t\tDebugTool.showDisBound(tar);\n\t\tif (this.completeHandler){\n\t\t\tthis.completeHandler.runWith(tar);\n\t\t}\n\t\tClickSelectTool.isClickSelectState=false;\n\t\tthis.clickSelectChange();\n\t}\n\n\t__getset(1,ClickSelectTool,'I',function(){\n\t\tif (!ClickSelectTool._I)ClickSelectTool._I=new ClickSelectTool();\n\t\treturn ClickSelectTool._I;\n\t});\n\n\tClickSelectTool._I=null;\n\tClickSelectTool.isClickSelectState=false;\n\tClickSelectTool.ignoreDebugTool=false;\n\treturn ClickSelectTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.ColorTool\nvar ColorTool=(function(){\n\tfunction ColorTool(){\n\t\tthis.red=NaN;\n\t\tthis.green=NaN;\n\t\tthis.blue=NaN;\n\t}\n\n\t__class(ColorTool,'laya.debug.tools.ColorTool');\n\tColorTool.toHexColor=function(color){\n\t\treturn Utils.toHexColor(color);\n\t}\n\n\tColorTool.getRGBByRGBStr=function(str){\n\t\tstr.charAt(0)=='#' && (str=str.substr(1));\n\t\tvar color=/*__JS__ */parseInt(str,16);\n\t\tvar flag=(str.length==8);\n\t\tvar _color;\n\t\t_color=[((0x00FF0000 & color)>> 16),((0x0000FF00 & color)>> 8),(0x000000FF & color)];\n\t\treturn _color;\n\t}\n\n\tColorTool.getColorBit=function(value){\n\t\tvar rst;\n\t\trst=Math.floor(value).toString(16);\n\t\trst=rst.length > 1 ? rst :\"0\"+rst;\n\t\treturn rst;\n\t}\n\n\tColorTool.getRGBStr=function(rgb){\n\t\treturn \"#\"+ColorTool.getColorBit(rgb[0])+ColorTool.getColorBit(rgb[1])+ColorTool.getColorBit(rgb[2]);\n\t}\n\n\tColorTool.traseHSB=function(hsb){\n\t\tconsole.log(\"hsb:\",hsb[0],hsb[1],hsb[2]);\n\t}\n\n\tColorTool.rgb2hsb=function(rgbR,rgbG,rgbB){\n\t\tvar rgb=[rgbR,rgbG,rgbB];\n\t\trgb.sort(MathTools.sortNumSmallFirst);\n\t\tvar max=rgb[2];\n\t\tvar min=rgb[0];\n\t\tvar hsbB=max / 255.0;\n\t\tvar hsbS=max==0 ? 0 :(max-min)/ max;\n\t\tvar hsbH=0;\n\t\tif(max==min){\n\t\t\thsbH=1;\n\t\t}\n\t\telse\n\t\tif (rgbR==0 && rgbG==0&&rgbB==0){\n\t\t}else\n\t\tif (max==rgbR && rgbG >=rgbB){\n\t\t\thsbH=(rgbG-rgbB)*60 / (max-min)+0;\n\t\t}\n\t\telse if (max==rgbR && rgbG < rgbB){\n\t\t\thsbH=(rgbG-rgbB)*60 / (max-min)+360;\n\t\t}\n\t\telse if (max==rgbG){\n\t\t\thsbH=(rgbB-rgbR)*60 / (max-min)+120;\n\t\t}\n\t\telse if (max==rgbB){\n\t\t\thsbH=(rgbR-rgbG)*60 / (max-min)+240;\n\t\t}\n\t\treturn [hsbH,hsbS,hsbB];\n\t}\n\n\tColorTool.hsb2rgb=function(h,s,v){\n\t\tvar r=0,g=0,b=0;\n\t\tvar i=Math.floor((h / 60)% 6);\n\t\tvar f=(h / 60)-i;\n\t\tvar p=v *(1-s);\n\t\tvar q=v *(1-f *s);\n\t\tvar t=v *(1-(1-f)*s);\n\t\tswitch (i){\n\t\t\tcase 0:\n\t\t\t\tr=v;\n\t\t\t\tg=t;\n\t\t\t\tb=p;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\tr=q;\n\t\t\t\tg=v;\n\t\t\t\tb=p;\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tr=p;\n\t\t\t\tg=v;\n\t\t\t\tb=t;\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tr=p;\n\t\t\t\tg=q;\n\t\t\t\tb=v;\n\t\t\t\tbreak ;\n\t\t\tcase 4:\n\t\t\t\tr=t;\n\t\t\t\tg=p;\n\t\t\t\tb=v;\n\t\t\t\tbreak ;\n\t\t\tcase 5:\n\t\t\t\tr=v;\n\t\t\t\tg=p;\n\t\t\t\tb=q;\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\tbreak ;\n\t\t\t}\n\t\treturn [Math.floor(r *255.0),Math.floor(g *255.0),Math.floor(b *255.0)];\n\t}\n\n\treturn ColorTool;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-29 下午12:53:31\n*/\n//class laya.debug.tools.CommonTools\nvar CommonTools=(function(){\n\tfunction CommonTools(){}\n\t__class(CommonTools,'laya.debug.tools.CommonTools');\n\tCommonTools.bind=function(fun,scope){\n\t\tvar rst;\n\t\t/*__JS__ */rst=fun.bind(scope);\n\t\treturn rst;\n\t}\n\n\tCommonTools.insertP=function(tar,x,y,scaleX,scaleY,rotation){\n\t\tvar nSp;\n\t\tnSp=new Sprite();\n\t\ttar.parent.addChild(nSp);\n\t\tnSp.x=x;\n\t\tnSp.y=y;\n\t\tnSp.scaleX=scaleX;\n\t\tnSp.scaleY=scaleY;\n\t\tnSp.rotation=rotation;\n\t\tnSp.addChild(tar);\n\t\tCommonTools.count++;\n\t\tnSp.name=\"insertP:\"+CommonTools.count;\n\t}\n\n\tCommonTools.insertChild=function(tar,x,y,scaleX,scaleY,rotation,color){\n\t\t(color===void 0)&& (color=\"#ff00ff\");\n\t\tvar nSp;\n\t\tnSp=new Sprite();\n\t\ttar.addChild(nSp);\n\t\tnSp.x=x;\n\t\tnSp.y=y;\n\t\tnSp.scaleX=scaleX;\n\t\tnSp.scaleY=scaleY;\n\t\tnSp.rotation=rotation;\n\t\tnSp.graphics.drawRect(0,0,20,20,color);\n\t\tnSp.name=\"child:\"+tar.numChildren;\n\t\treturn nSp;\n\t}\n\n\tCommonTools.createSprite=function(width,height,color){\n\t\t(color===void 0)&& (color=\"#ff0000\");\n\t\tvar sp;\n\t\tsp=new Sprite();\n\t\tsp.graphics.drawRect(0,0,width,height,color);\n\t\tsp.size(width,height);\n\t\treturn sp;\n\t}\n\n\tCommonTools.createBtn=function(txt,width,height){\n\t\t(width===void 0)&& (width=100);\n\t\t(height===void 0)&& (height=40);\n\t\tvar sp;\n\t\tsp=new Sprite();\n\t\tsp.size(width,height);\n\t\tsp.graphics.drawRect(0,0,sp.width,sp.height,\"#ff0000\");\n\t\tsp.graphics.fillText(txt,sp.width *0.5,sp.height *0.5,null,\"#ffff00\",\"center\");\n\t\treturn sp;\n\t}\n\n\tCommonTools.count=0;\n\treturn CommonTools;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-24 下午6:37:56\n*/\n//class laya.debug.tools.CountTool\nvar CountTool=(function(){\n\tfunction CountTool(){\n\t\tthis.data={};\n\t\tthis.preO={};\n\t\tthis.changeO={};\n\t\tthis.count=0;\n\t}\n\n\t__class(CountTool,'laya.debug.tools.CountTool');\n\tvar __proto=CountTool.prototype;\n\t__proto.reset=function(){\n\t\tthis.data={};\n\t\tthis.count=0;\n\t}\n\n\t__proto.add=function(name,num){\n\t\t(num===void 0)&& (num=1);\n\t\tthis.count++;\n\t\tif(!this.data.hasOwnProperty(name)){\n\t\t\tthis.data[name]=0;\n\t\t}\n\t\tthis.data[name]=this.data[name]+num;\n\t}\n\n\t__proto.getKeyCount=function(key){\n\t\tif(!this.data.hasOwnProperty(key)){\n\t\t\tthis.data[key]=0;\n\t\t}\n\t\treturn this.data[key];\n\t}\n\n\t__proto.getKeyChange=function(key){\n\t\tif (!this.changeO[key])return 0;\n\t\treturn this.changeO[key];\n\t}\n\n\t__proto.record=function(){\n\t\tvar key;\n\t\tfor (key in this.changeO){\n\t\t\tthis.changeO[key]=0;\n\t\t}\n\t\tfor (key in this.data){\n\t\t\tif (!this.preO[key])this.preO[key]=0;\n\t\t\tthis.changeO[key]=this.data[key]-this.preO[key];\n\t\t\tthis.preO[key]=this.data[key]\n\t\t}\n\t}\n\n\t__proto.getCount=function(dataO){\n\t\tvar rst=0;\n\t\tvar key;\n\t\tfor (key in dataO){\n\t\t\trst+=dataO[key];\n\t\t}\n\t\treturn rst;\n\t}\n\n\t__proto.traceSelf=function(dataO){\n\t\tif (!dataO)dataO=this.data;\n\t\tvar tCount=0;\n\t\ttCount=this.getCount(dataO);\n\t\tconsole.log(\"total:\"+tCount);\n\t\treturn \"total:\"+tCount+\"\\n\"+TraceTool.traceObj(dataO);\n\t}\n\n\t__proto.traceSelfR=function(dataO){\n\t\tif (!dataO)dataO=this.data;\n\t\tvar tCount=0;\n\t\ttCount=this.getCount(dataO);\n\t\tconsole.log(\"total:\"+tCount);\n\t\treturn \"total:\"+tCount+\"\\n\"+TraceTool.traceObjR(dataO);\n\t}\n\n\treturn CountTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.DebugConsts\nvar DebugConsts=(function(){\n\tfunction DebugConsts(){}\n\t__class(DebugConsts,'laya.debug.tools.DebugConsts');\n\tDebugConsts.CLICK_SELECT_COLOR=\"#ff0000\";\n\tDebugConsts.CANVAS_REC_COLOR=\"#FF00FF\";\n\tDebugConsts.RECACHE_REC_COLOR=\"#00ff00\";\n\tDebugConsts.SPRITE_REC_COLOR=\"#ff0000\";\n\tDebugConsts.SPRITE_REC_LINEWIDTH=2;\n\treturn DebugConsts;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-31 下午3:35:16\n*/\n//class laya.debug.tools.DebugExport\nvar DebugExport=(function(){\n\tfunction DebugExport(){}\n\t__class(DebugExport,'laya.debug.tools.DebugExport');\n\tDebugExport.export=function(){\n\t\tvar _window;\n\t\t/*__JS__ */_window=window;;\n\t\tvar key;\n\t\tfor(key in DebugExport._exportsDic){\n\t\t\t_window[key]=DebugExport._exportsDic[key];\n\t\t}\n\t}\n\n\t__static(DebugExport,\n\t['_exportsDic',function(){return this._exportsDic={\n\t\t\t\"DebugTool\":DebugTool,\n\t\t\t\"Watcher\":Watcher\n\t};}\n\n\t]);\n\treturn DebugExport;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.DebugTxt\nvar DebugTxt=(function(){\n\tfunction DebugTxt(){}\n\t__class(DebugTxt,'laya.debug.tools.DebugTxt');\n\tDebugTxt.init=function(){\n\t\tif (DebugTxt._txt)return;\n\t\tDebugTxt._txt=new Text();\n\t\tDebugTxt._txt.pos(100,100);\n\t\tDebugTxt._txt.color=\"#ff00ff\";\n\t\tDebugTxt._txt.zOrder=999;\n\t\tDebugTxt._txt.fontSize=24;\n\t\tDebugTxt._txt.text=\"debugTxt inited\";\n\t\tLaya.stage.addChild(DebugTxt._txt);\n\t}\n\n\tDebugTxt.getArgArr=function(arg){\n\t\tvar rst;\n\t\trst=[];\n\t\tvar i=0,len=arg.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\trst.push(arg[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tDebugTxt.dTrace=function(__arg){\n\t\tvar arg=arguments;\n\t\targ=DebugTxt.getArgArr(arg);\n\t\tvar str;\n\t\tstr=arg.join(\" \");\n\t\tif (DebugTxt._txt){\n\t\t\tDebugTxt._txt.text=str+\"\\n\"+DebugTxt._txt.text;\n\t\t}\n\t}\n\n\tDebugTxt.getTimeStr=function(){\n\t\tvar dateO=/*__JS__ */new Date();\n\t\treturn dateO.toTimeString();\n\t}\n\n\tDebugTxt.traceTime=function(msg){\n\t\tDebugTxt.dTrace(DebugTxt.getTimeStr());\n\t\tDebugTxt.dTrace(msg);\n\t}\n\n\tDebugTxt.show=function(__arg){\n\t\tvar arg=arguments;\n\t\targ=DebugTxt.getArgArr(arg);\n\t\tvar str;\n\t\tstr=arg.join(\" \");\n\t\tif (DebugTxt._txt){\n\t\t\tDebugTxt._txt.text=str;\n\t\t}\n\t}\n\n\tDebugTxt._txt=null;\n\tDebugTxt.I=null;\n\treturn DebugTxt;\n})()\n\n\n/**\n*本类用于显示对象值变化过程\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-23 上午10:41:50\n*/\n//class laya.debug.tools.DifferTool\nvar DifferTool=(function(){\n\tfunction DifferTool(sign,autoTrace){\n\t\tthis.autoTrace=true;\n\t\tthis.sign=\"\";\n\t\tthis.obj=null;\n\t\t(sign===void 0)&& (sign=\"\");\n\t\t(autoTrace===void 0)&& (autoTrace=true);\n\t\tthis.sign=sign;\n\t\tthis.autoTrace=autoTrace;\n\t}\n\n\t__class(DifferTool,'laya.debug.tools.DifferTool');\n\tvar __proto=DifferTool.prototype;\n\t__proto.update=function(data,msg){\n\t\tif(msg){\n\t\t\tconsole.log(msg);\n\t\t};\n\t\tvar tObj=ObjectTools.copyObj(data);\n\t\tif(!this.obj)this.obj={};\n\t\tvar rst;\n\t\trst=ObjectTools.differ(this.obj,tObj);\n\t\tthis.obj=tObj;\n\t\tif(this.autoTrace){\n\t\t\tconsole.log(this.sign+\" differ:\");\n\t\t\tObjectTools.traceDifferObj(rst);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tDifferTool.differ=function(sign,data,msg){\n\t\tif(!DifferTool._differO[sign])DifferTool._differO[sign]=new DifferTool(sign,true);\n\t\tvar tDiffer;\n\t\ttDiffer=DifferTool._differO[sign];\n\t\treturn tDiffer.update(data,msg);\n\t}\n\n\tDifferTool._differO={};\n\treturn DifferTool;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2016-1-14 下午4:32:47\n*/\n//class laya.debug.tools.DisController\nvar DisController=(function(){\n\tfunction DisController(){\n\t\tthis.arrowAxis=null;\n\t\tthis._target=null;\n\t\tthis.recInfo=null;\n\t\tDisController.init();\n\t\tthis.arrowAxis=new Axis();\n\t\tthis.arrowAxis.mouseEnabled=true;\n\t}\n\n\t__class(DisController,'laya.debug.tools.DisController');\n\tvar __proto=DisController.prototype;\n\t__proto.switchType=function(){\n\t\tthis.arrowAxis.switchType();\n\t}\n\n\t__proto.updateMe=function(){\n\t\tif(!this._target)return;\n\t\tthis.recInfo=RecInfo.getGlobalRecInfo(this._target,0,0,1,0,0,1);\n\t\tconsole.log(\"rotation:\",this.recInfo.rotation);\n\t\tconsole.log(\"pos:\",this.recInfo.x,this.recInfo.y);\n\t\tconsole.log(\"scale:\",this.recInfo.width,this.recInfo.height);\n\t\tthis.arrowAxis.x=this.recInfo.x;\n\t\tthis.arrowAxis.y=this.recInfo.y;\n\t\tthis.arrowAxis.rotation=this.recInfo.rotation;\n\t\tthis.arrowAxis.yAxis.rotation=this.recInfo.rotationV-this.recInfo.rotation;\n\t}\n\n\t__getset(0,__proto,'target',function(){\n\t\treturn this._target;\n\t\t},function(target){\n\t\tthis._target=target;\n\t\tif(target){\n\t\t\tDisController._container.addChild(this.arrowAxis);\n\t\t\tLaya.timer.loop(100,this,this.updateMe);\n\t\t\t}else{\n\t\t\tthis.arrowAxis.removeSelf();\n\t\t\tLaya.timer.clear(this,this.updateMe);\n\t\t}\n\t\tthis.arrowAxis.target=target;\n\t\tthis.updateMe();\n\t});\n\n\t__getset(0,__proto,'type',function(){\n\t\treturn this.arrowAxis.type;\n\t\t},function(lenType){\n\t\tthis.arrowAxis.type=lenType;\n\t});\n\n\tDisController.init=function(){\n\t\tif (DisController._container){\n\t\t\tDisControlTool.setTop(DisController._container);\n\t\t\treturn;\n\t\t};\n\t\tDisController._container=new Sprite();\n\t\tDisController._container.mouseEnabled=true;\n\t\tLaya.stage.addChild(DisController._container);\n\t}\n\n\tDisController._container=null;\n\t__static(DisController,\n\t['I',function(){return this.I=new DisController();}\n\t]);\n\treturn DisController;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-25 下午7:19:44\n*/\n//class laya.debug.tools.DisControlTool\nvar DisControlTool=(function(){\n\tfunction DisControlTool(){}\n\t__class(DisControlTool,'laya.debug.tools.DisControlTool');\n\tDisControlTool.getObjectsUnderPoint=function(sprite,x,y,rst,filterFun){\n\t\trst=rst?rst:[];\n\t\tif(filterFun!=null&&!filterFun(sprite))return rst;\n\t\tif (sprite.getBounds().contains(x,y)){\n\t\t\trst.push(sprite);\n\t\t\tvar tS;\n\t\t\tvar tempP=new Point();\n\t\t\ttempP.setTo(x,y);\n\t\t\ttempP=sprite.fromParentPoint(tempP);\n\t\t\tx=tempP.x;\n\t\t\ty=tempP.y;\n\t\t\tfor (var i=sprite._childs.length-1;i >-1;i--){\n\t\t\t\tvar child=sprite._childs[i];\n\t\t\t\tif((child instanceof laya.display.Sprite ))\n\t\t\t\t\tDisControlTool.getObjectsUnderPoint(child,x,y,rst,filterFun);\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tDisControlTool.getObjectsUnderGlobalPoint=function(sprite,filterFun){\n\t\tvar point=new Point();\n\t\tpoint.setTo(Laya.stage.mouseX,Laya.stage.mouseY);\n\t\tif(sprite.parent)\n\t\t\tpoint=(sprite.parent).globalToLocal(point);\n\t\treturn DisControlTool.getObjectsUnderPoint(sprite,point.x,point.y,null,filterFun);\n\t}\n\n\tDisControlTool.findFirstObjectsUnderGlobalPoint=function(){\n\t\tvar disList;\n\t\tdisList=DisControlTool.getObjectsUnderGlobalPoint(Laya.stage);\n\t\tif (!disList)return null;\n\t\tvar i=0,len=0;\n\t\tvar tDis;\n\t\tlen=disList.length;\n\t\tfor (i=len-1;i>=0;i--){\n\t\t\ttDis=disList[i];\n\t\t\tif (tDis && tDis.numChildren < 1){\n\t\t\t\treturn tDis;\n\t\t\t}\n\t\t}\n\t\treturn tDis;\n\t}\n\n\tDisControlTool.visibleAndEnableObjFun=function(tar){\n\t\treturn tar.visible&&tar.mouseEnabled;\n\t}\n\n\tDisControlTool.visibleObjFun=function(tar){\n\t\treturn tar.visible;\n\t}\n\n\tDisControlTool.getMousePoint=function(sprite){\n\t\tvar point=new Point();\n\t\tpoint.setTo(Laya.stage.mouseX,Laya.stage.mouseY);\n\t\tpoint=sprite.globalToLocal(point);\n\t\treturn point;\n\t}\n\n\tDisControlTool.isChildE=function(parent,child){\n\t\tif (!parent)return false;\n\t\twhile (child){\n\t\t\tif (child.parent==parent)return true;\n\t\t\tchild=child.parent;\n\t\t}\n\t\treturn false;\n\t}\n\n\tDisControlTool.isInTree=function(pNode,child){\n\t\treturn pNode==child || DisControlTool.isChildE(pNode,child);\n\t}\n\n\tDisControlTool.setTop=function(tar){\n\t\tif(tar&&tar.parent){\n\t\t\tvar tParent;\n\t\t\ttParent=tar.parent;\n\t\t\ttParent.setChildIndex(tar,tParent.numChildren-1);\n\t\t}\n\t}\n\n\tDisControlTool.clearItemRelativeInfo=function(item){\n\t\tvar Nan=\"NaN\";\n\t\titem.getLayout().left=Nan;\n\t\titem.getLayout().right=Nan;\n\t\titem.getLayout().top=Nan;\n\t\titem.getLayout().bottom=Nan;\n\t}\n\n\tDisControlTool.swap=function(tarA,tarB){\n\t\tif (tarA==tarB)return;\n\t\tvar iA=0;\n\t\tiA=tarA.parent.getChildIndex(tarA);\n\t\tvar iB=0;\n\t\tiB=tarB.parent.getChildIndex(tarB);\n\t\tvar bP;\n\t\tbP=tarB.parent;\n\t\ttarA.parent.addChildAt(tarB,iA);\n\t\tbP.addChildAt(tarA,iB);\n\t}\n\n\tDisControlTool.insertToTarParent=function(tarA,tars,after){\n\t\t(after===void 0)&& (after=false);\n\t\tvar tIndex=0;\n\t\tvar parent;\n\t\tif(!tarA)return;\n\t\tparent=tarA.parent;\n\t\tif(!parent)return;\n\t\ttIndex=parent.getChildIndex(tarA);\n\t\tif(after)tIndex++;\n\t\tDisControlTool.insertToParent(parent,tars,tIndex);\n\t}\n\n\tDisControlTool.insertToParent=function(parent,tars,index){\n\t\t(index===void 0)&& (index=-1);\n\t\tif(!parent)return;\n\t\tif(index<0)index=parent.numChildren;\n\t\tvar i=0,len=0;\n\t\tlen=tars.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tDisControlTool.transParent(tars[i],parent);\n\t\t\tparent.addChildAt(tars[i],index);\n\t\t}\n\t}\n\n\tDisControlTool.transParent=function(tar,newParent){\n\t\tif(!tar||!newParent)return;\n\t\tif(!tar.parent)return;\n\t\tvar preParent;\n\t\tpreParent=tar.parent;\n\t\tvar pos;\n\t\tpos=new Point(tar.x,tar.y);\n\t\tpos=preParent.localToGlobal(pos);\n\t\tpos=newParent.globalToLocal(pos);\n\t\ttar.pos(pos.x,pos.y);\n\t}\n\n\tDisControlTool.transPoint=function(nowParent,tarParent,point){\n\t\tpoint=nowParent.localToGlobal(point);\n\t\tpoint=tarParent.globalToLocal(point);\n\t\treturn point;\n\t}\n\n\tDisControlTool.removeItems=function(itemList){\n\t\tvar i=0,len=0;\n\t\tlen=itemList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\t(itemList [i]).removeSelf();\n\t\t}\n\t}\n\n\tDisControlTool.addItems=function(itemList,parent){\n\t\tvar i=0,len=0;\n\t\tlen=itemList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tparent.addChild(itemList[i]);\n\t\t}\n\t}\n\n\tDisControlTool.getAllChild=function(tar){\n\t\tif(!tar)return [];\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar rst=[];\n\t\tlen=tar.numChildren;\n\t\tfor(i=0;i<len;i++){\n\t\t\trst.push(tar.getChildAt(i));\n\t\t}\n\t\treturn rst;\n\t}\n\n\tDisControlTool.upDis=function(child){\n\t\tif(child&&child.parent){\n\t\t\tvar tParent;\n\t\t\ttParent=child.parent;\n\t\t\tvar newIndex=0;\n\t\t\tnewIndex=tParent.getChildIndex(child)+1;\n\t\t\tif(newIndex>=tParent.numChildren){\n\t\t\t\tnewIndex=tParent.numChildren-1;\n\t\t\t}\n\t\t\tconsole.log(\"setChildIndex:\"+newIndex);\n\t\t\ttParent.setChildIndex(child,newIndex);\n\t\t}\n\t}\n\n\tDisControlTool.downDis=function(child){\n\t\tif(child&&child.parent){\n\t\t\tvar tParent;\n\t\t\ttParent=child.parent;\n\t\t\tvar newIndex=0;\n\t\t\tnewIndex=tParent.getChildIndex(child)-1;\n\t\t\tif(newIndex<0)newIndex=0;\n\t\t\tconsole.log(\"setChildIndex:\"+newIndex);\n\t\t\ttParent.setChildIndex(child,newIndex);\n\t\t}\n\t}\n\n\tDisControlTool.setResizeAbleEx=function(node){\n\t\tvar clickItem;\n\t\tclickItem=node.getChildByName(\"resizeBtn\");\n\t\tif (clickItem){\n\t\t\tSimpleResizer.setResizeAble(clickItem,node);\n\t\t}\n\t}\n\n\tDisControlTool.setResizeAble=function(node){\n\t\tnode.on(/*laya.events.Event.CLICK*/\"click\",null,DisControlTool.resizeHandler,[node]);\n\t}\n\n\tDisControlTool.resizeHandler=function(tar){\n\t\tDisResizer.setUp(tar);\n\t}\n\n\tDisControlTool.setDragingItem=function(dragBar,tar){\n\t\tdragBar.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",null,DisControlTool.dragingHandler,[tar]);\n\t\ttar.on(/*laya.events.Event.DRAG_END*/\"dragend\",null,DisControlTool.dragingEnd,[tar]);\n\t}\n\n\tDisControlTool.dragingHandler=function(tar){\n\t\tif (tar){\n\t\t\ttar.startDrag();\n\t\t}\n\t}\n\n\tDisControlTool.dragingEnd=function(tar){\n\t\tDisControlTool.intFyDisPos(tar);\n\t\tconsole.log(tar.x,tar.y);\n\t}\n\n\tDisControlTool.showToStage=function(dis,offX,offY){\n\t\t(offX===void 0)&& (offX=0);\n\t\t(offY===void 0)&& (offY=0);\n\t\tvar rec=dis.getBounds();\n\t\tdis.x=Laya.stage.mouseX+offX;\n\t\tdis.y=Laya.stage.mouseY+offY;\n\t\tif (dis.x+rec.width > Laya.stage.width){\n\t\t\tdis.x-=rec.width+offX;\n\t\t}\n\t\tif (dis.y+rec.height > Laya.stage.height){\n\t\t\tdis.y-=rec.height+offY;\n\t\t}\n\t\tDisControlTool.intFyDisPos(dis);\n\t}\n\n\tDisControlTool.intFyDisPos=function(dis){\n\t\tif (!dis)return;\n\t\tdis.x=Math.round(dis.x);\n\t\tdis.y=Math.round(dis.y);\n\t}\n\n\tDisControlTool.showOnly=function(disList,showItem){\n\t\tvar i=0,len=0;\n\t\tlen=disList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tdisList[i].visible=disList[i]==showItem;\n\t\t}\n\t}\n\n\tDisControlTool.showOnlyByIndex=function(disList,index){\n\t\tDisControlTool.showOnly(disList,disList[index]);\n\t}\n\n\tDisControlTool.addOnly=function(disList,showItem,parent){\n\t\tvar i=0,len=0;\n\t\tlen=disList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tif (disList[i] !=showItem){\n\t\t\t\tdisList[i].removeSelf();\n\t\t\t\t}else{\n\t\t\t\tparent.addChild(disList[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tDisControlTool.addOnlyByIndex=function(disList,index,parent){\n\t\tDisControlTool.addOnly(disList,disList[index],parent);\n\t}\n\n\t__static(DisControlTool,\n\t['tempP',function(){return this.tempP=new Point();}\n\t]);\n\treturn DisControlTool;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-12-24 下午4:20:25\n*/\n//class laya.debug.tools.DisEditor\nvar DisEditor=(function(){\n\tfunction DisEditor(){\n\t\tthis.tar=null;\n\t\tthis.rec=new Sprite();\n\t\tthis.rootContainer=new Sprite();\n\t}\n\n\t__class(DisEditor,'laya.debug.tools.DisEditor');\n\tvar __proto=DisEditor.prototype;\n\t__proto.setTarget=function(target){\n\t\tthis.tar=target;\n\t\tvar g;\n\t\tg=this.rec.graphics;\n\t\tg.clear();\n\t\tvar bounds;\n\t\tbounds=this.tar.getSelfBounds();\n\t\tg.drawRect(bounds.x,bounds.y,bounds.width,bounds.height,null,\"#00ff00\");\n\t\tthis.createSameDisChain();\n\t\tLaya.stage.addChild(this.rootContainer);\n\t}\n\n\t__proto.createSameDisChain=function(){\n\t\tvar tParent;\n\t\tvar cpParent;\n\t\tvar preTar;\n\t\tpreTar=this.rec;\n\t\ttParent=this.tar;\n\t\twhile(tParent&&tParent!=Laya.stage){\n\t\t\tcpParent=new Sprite();\n\t\t\tcpParent.addChild(preTar);\n\t\t\tcpParent.x=tParent.x;\n\t\t\tcpParent.y=tParent.y;\n\t\t\tcpParent.scaleX=tParent.scaleX;\n\t\t\tcpParent.scaleY=tParent.scaleY;\n\t\t\tcpParent.rotation=tParent.rotation;\n\t\t\tcpParent.scrollRect=tParent.scrollRect;\n\t\t\tpreTar=cpParent;\n\t\t\ttParent=tParent.parent;\n\t\t}\n\t\tthis.rootContainer.removeChildren();\n\t\tthis.rootContainer.addChild(preTar);\n\t}\n\n\treturn DisEditor;\n})()\n\n\n/**\n*调试拾取显示对象类\n*@author ww\n*/\n//class laya.debug.tools.DisplayHook\nvar DisplayHook=(function(){\n\tfunction DisplayHook(){\n\t\tthis.mouseX=NaN;\n\t\tthis.mouseY=NaN;\n\t\tthis._stage=null;\n\t\tthis._target=null;\n\t\tthis.isGetting=false;\n\t\tthis._matrix=new Matrix();\n\t\tthis._point=new Point();\n\t\tthis._rect=new Rectangle();\n\t\tthis._event=Event.EMPTY;\n\t\tthis._stage=Laya.stage;\n\t\tthis.init(Render.context.canvas);\n\t}\n\n\t__class(DisplayHook,'laya.debug.tools.DisplayHook');\n\tvar __proto=DisplayHook.prototype;\n\t__proto.init=function(canvas){\n\t\tvar _$this=this;\n\t\tif (Browser.window.navigator.msPointerEnabled){\n\t\t\tcanvas.style['-ms-content-zooming']='none';\n\t\t\tcanvas.style['-ms-touch-action']='none';\n\t\t};\n\t\tvar _this=this;\n\t\tBrowser.document.addEventListener('mousedown',function(e){\n\t\t\t_$this._event._stoped=false;\n\t\t\tDisplayHook.isFirst=true;\n\t\t\t_this.check(_this._stage,e.offsetX,e.offsetY,_this.onMouseDown,true,false);\n\t\t},true);\n\t\tBrowser.document.addEventListener('touchstart',function(e){\n\t\t\t_$this._event._stoped=false;\n\t\t\tDisplayHook.isFirst=true;\n\t\t\tvar touches=e.changedTouches;\n\t\t\tfor (var i=0,n=touches.length;i < n;i++){\n\t\t\t\tvar touch=touches[i];\n\t\t\t\tinitEvent(touch,e);\n\t\t\t\t_this.check(_this._stage,_this.mouseX,_this.mouseY,_this.onMouseDown,true,false);\n\t\t\t}\n\t\t},true);\n\t\tfunction initEvent (e,event){\n\t\t\t_this._event._stoped=false;\n\t\t\t_this._event.nativeEvent=event || e;\n\t\t\t_this._target=null;\n\t\t\tif (e.offsetX){\n\t\t\t\t_this.mouseX=e.offsetX;\n\t\t\t\t_this.mouseY=e.offsetY;\n\t\t\t\t}else {\n\t\t\t\t_this.mouseX=e.clientX-Laya.stage.offset.x;\n\t\t\t\t_this.mouseY=e.clientY-Laya.stage.offset.y;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.onMouseMove=function(ele,hit){\n\t\tthis.sendEvent(ele,/*laya.events.Event.MOUSE_MOVE*/\"mousemove\");\n\t\treturn;\n\t\tif (hit && ele !=this._stage && ele!==this._target){\n\t\t\tif (this._target){\n\t\t\t\tif (this._target.$_MOUSEOVER){\n\t\t\t\t\tthis._target.$_MOUSEOVER=false;\n\t\t\t\t\tthis._target.event(/*laya.events.Event.MOUSE_OUT*/\"mouseout\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._target=ele;\n\t\t\tif (!ele.$_MOUSEOVER){\n\t\t\t\tele.$_MOUSEOVER=true;\n\t\t\t\tthis.sendEvent(ele,/*laya.events.Event.MOUSE_OVER*/\"mouseover\");\n\t\t\t}\n\t\t\t}else if (!hit && this._target && ele===this._target){\n\t\t\tthis._target=null;\n\t\t\tif (ele.$_MOUSEOVER){\n\t\t\t\tele.$_MOUSEOVER=false;\n\t\t\t\tthis.sendEvent(ele,/*laya.events.Event.MOUSE_OUT*/\"mouseout\");\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.onMouseUp=function(ele,hit){\n\t\thit && this.sendEvent(ele,/*laya.events.Event.MOUSE_UP*/\"mouseup\");\n\t}\n\n\t__proto.onMouseDown=function(ele,hit){\n\t\tif (hit){\n\t\t\tele.$_MOUSEDOWN=true;\n\t\t\tthis.sendEvent(ele,/*laya.events.Event.MOUSE_DOWN*/\"mousedown\");\n\t\t}\n\t}\n\n\t__proto.sendEvent=function(ele,type){\n\t\tif (!this._event._stoped){\n\t\t\tele.event(type,this._event.setTo(type,ele,ele));\n\t\t\tif (type===/*laya.events.Event.MOUSE_UP*/\"mouseup\" && ele.$_MOUSEDOWN){\n\t\t\t\tele.$_MOUSEDOWN=false;\n\t\t\t\tele.event(/*laya.events.Event.CLICK*/\"click\",this._event.setTo(/*laya.events.Event.CLICK*/\"click\",ele,ele));\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.selectDisUnderMouse=function(){\n\t\tDisplayHook.isFirst=true;\n\t\tthis.check(Laya.stage,Laya.stage.mouseX,Laya.stage.mouseY,null,true,false);\n\t\tSelectInfosView.I.setSelectTarget(DebugTool.target);\n\t}\n\n\t__proto.getDisUnderMouse=function(){\n\t\tthis.isGetting=true;\n\t\tDisplayHook.isFirst=true;\n\t\tDebugTool.target=null;\n\t\tthis.check(Laya.stage,Laya.stage.mouseX,Laya.stage.mouseY,null,true,false);\n\t\tthis.isGetting=false;\n\t\treturn DebugTool.target;\n\t}\n\n\t__proto.check=function(sp,mouseX,mouseY,callBack,hitTest,mouseEnable){\n\t\tif (sp==DebugTool.debugLayer)return false;\n\t\tif (sp==DebugInfoLayer.I)return false;\n\t\tif (this.isGetting && sp==DebugInfoLayer.I)return false;\n\t\tif (!sp.visible || sp.getSelfBounds().width<=0)return false;\n\t\tvar isHit=false;\n\t\tmouseEnable=true\n\t\tif (mouseEnable){\n\t\t\tvar graphicHit=false;\n\t\t\tif (hitTest){\n\t\t\t\tthis._rect=sp.getBounds();\n\t\t\t\tisHit=this._rect.contains(mouseX,mouseY);\n\t\t\t\tthis._point.setTo(mouseX,mouseY);\n\t\t\t\tsp.fromParentPoint(this._point);\n\t\t\t\tmouseX=this._point.x;\n\t\t\t\tmouseY=this._point.y;\n\t\t\t}\n\t\t\tif (isHit){\n\t\t\t\tvar flag=false;\n\t\t\t\tfor (var i=sp._childs.length-1;i >-1;i--){\n\t\t\t\t\tvar child=sp._childs[i];\n\t\t\t\t\t(flag=this.check(child,mouseX,mouseY,callBack,hitTest,true));\n\t\t\t\t\tif (flag)break ;\n\t\t\t\t}\n\t\t\t\tgraphicHit=sp.getGraphicBounds().contains(mouseX,mouseY);\n\t\t\t\tisHit=flag||graphicHit;\n\t\t\t\tif(isHit&&!flag&&DisplayHook.isFirst){\n\t\t\t\t\tDisplayHook.isFirst=false;\n\t\t\t\t\tif(! ((sp instanceof laya.debug.tools.debugUI.DButton ))){\n\t\t\t\t\t\tDebugTool.target=sp;\n\t\t\t\t\t\tif (!this.isGetting){\n\t\t\t\t\t\t\tDebugTool.autoWork();\n\t\t\t\t\t\t\tNotice.notify(\"ItemClicked\",sp);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn isHit;\n\t}\n\n\tDisplayHook.initMe=function(){\n\t\tif(!DisplayHook.instance){\n\t\t\tDisplayHook.instance=new DisplayHook();\n\t\t}\n\t}\n\n\tDisplayHook.ITEM_CLICKED=\"ItemClicked\";\n\tDisplayHook.instance=null;\n\tDisplayHook.isFirst=false;\n\treturn DisplayHook;\n})()\n\n\n/**\n*简单的显示对象对象池\n*从父容器上移除时即被视为可被重用\n*@author ww\n*@version 1.0\n*\n*@created 2015-11-13 下午8:05:13\n*/\n//class laya.debug.tools.DisPool\nvar DisPool=(function(){\n\tfunction DisPool(){}\n\t__class(DisPool,'laya.debug.tools.DisPool');\n\tDisPool.getDis=function(clz){\n\t\tvar clzName;\n\t\tclzName=ClassTool.getClassNameByClz(clz);\n\t\tif(!DisPool._objDic[clzName]){\n\t\t\tDisPool._objDic[clzName]=[];\n\t\t};\n\t\tvar disList;\n\t\tdisList=DisPool._objDic[clzName];\n\t\tvar i=0,len=0;\n\t\tlen=disList.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(!disList[i].parent){\n\t\t\t\treturn disList[i];\n\t\t\t}\n\t\t}\n\t\tdisList.push(new clz());\n\t\treturn disList[disList.length-1];\n\t}\n\n\tDisPool._objDic={};\n\treturn DisPool;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-28 上午10:39:47\n*/\n//class laya.debug.tools.DTrace\nvar DTrace=(function(){\n\tfunction DTrace(){}\n\t__class(DTrace,'laya.debug.tools.DTrace');\n\tDTrace.getArgArr=function(arg){\n\t\tvar rst;\n\t\trst=[];\n\t\tvar i=0,len=arg.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\trst.push(arg[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tDTrace.dTrace=function(__arg){\n\t\tvar arg=arguments;\n\t\targ=DTrace.getArgArr(arg);\n\t\targ.push(TraceTool.getCallLoc(2));\n\t\t/*__JS__ */console.log.apply(console,arg);\n\t\tvar str;\n\t\tstr=arg.join(\" \");\n\t}\n\n\tDTrace.timeStart=function(sign){\n\t\t/*__JS__ */console.time(sign);;\n\t}\n\n\tDTrace.timeEnd=function(sign){\n\t\t/*__JS__ */console.timeEnd(sign);;\n\t}\n\n\tDTrace.traceTable=function(data){\n\t\t/*__JS__ */console.table(data);;\n\t}\n\n\treturn DTrace;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.enginehook.ClassCreateHook\nvar ClassCreateHook=(function(){\n\tfunction ClassCreateHook(){\n\t\tthis.createInfo={};\n\t}\n\n\t__class(ClassCreateHook,'laya.debug.tools.enginehook.ClassCreateHook');\n\tvar __proto=ClassCreateHook.prototype;\n\t__proto.hookClass=function(clz){\n\t\tvar _$this=this;\n\t\tif (ClassCreateHook.isInited)return;\n\t\tClassCreateHook.isInited=true;\n\t\tvar createFun=function (sp){\n\t\t\t_$this.classCreated(sp,clz);\n\t\t}\n\t\tFunHook.hook(clz,\"call\",createFun);\n\t}\n\n\t__proto.classCreated=function(clz,oClass){\n\t\tvar key;\n\t\tkey=ClassTool.getNodeClassAndName(clz);\n\t\tvar depth=0;\n\t\tvar tClz;\n\t\ttClz=clz;\n\t\twhile (tClz && tClz !=oClass){\n\t\t\ttClz=tClz.__super;\n\t\t\tdepth++;\n\t\t}\n\t\tif (!ClassCreateHook.I.createInfo[key]){\n\t\t\tClassCreateHook.I.createInfo[key]=0;\n\t\t}\n\t\tClassCreateHook.I.createInfo[key]=ClassCreateHook.I.createInfo[key]+1;\n\t\tRunProfile.run(key,depth+6);\n\t}\n\n\t__proto.getClassCreateInfo=function(clz){\n\t\tvar key;\n\t\tkey=ClassTool.getClassName(clz);\n\t\treturn RunProfile.getRunInfo(key);\n\t}\n\n\tClassCreateHook.isInited=false;\n\t__static(ClassCreateHook,\n\t['I',function(){return this.I=new ClassCreateHook();}\n\t]);\n\treturn ClassCreateHook;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.enginehook.FunctionTimeHook\nvar FunctionTimeHook=(function(){\n\tfunction FunctionTimeHook(){}\n\t__class(FunctionTimeHook,'laya.debug.tools.enginehook.FunctionTimeHook');\n\tFunctionTimeHook.hookFun=function(obj,funName){\n\t\tif (!obj)return;\n\t\tif (obj.timeHooked)return;\n\t\tvar myKey;\n\t\tFunctionTimeHook.HookID++;\n\t\tmyKey=ClassTool.getNodeClassAndName(obj)+\".\"+funName+\"():\"+FunctionTimeHook.HookID;\n\t\tvar timePreFun=function (__args){\n\t\t\tvar args=arguments;\n\t\t\tFunctionTimeHook.funBegin(myKey);\n\t\t};\n\t\tvar timeEndFun=function (__args){\n\t\t\tvar args=arguments;\n\t\t\tFunctionTimeHook.funEnd(myKey);\n\t\t}\n\t\tobj.timeHooked=true;\n\t\tFunHook.hook(obj,funName,timePreFun,timeEndFun);\n\t}\n\n\tFunctionTimeHook.funBegin=function(funKey){\n\t\tFunctionTimeHook.funPre[funKey]=Browser.now();\n\t}\n\n\tFunctionTimeHook.funEnd=function(funKey){\n\t\tif (!FunctionTimeHook.funPre[funKey])FunctionTimeHook.funPre[funKey]=0;\n\t\tFunctionTimeHook.counter.add(funKey,Browser.now()-FunctionTimeHook.funPre[funKey]);\n\t}\n\n\tFunctionTimeHook.fresh=function(){\n\t\tFunctionTimeHook.funEnd(\"TotalSign\");\n\t\tFunctionTimeHook.counter.record();\n\t\tFunctionTimeHook.funBegin(\"TotalSign\");\n\t}\n\n\tFunctionTimeHook.HookID=1;\n\tFunctionTimeHook.funPre={};\n\tFunctionTimeHook.TotalSign=\"TotalSign\";\n\t__static(FunctionTimeHook,\n\t['counter',function(){return this.counter=new CountTool();}\n\t]);\n\treturn FunctionTimeHook;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.enginehook.RenderSpriteHook\nvar RenderSpriteHook=(function(){\n\tfunction RenderSpriteHook(){\n\t\t/**@private */\n\t\t//this._next=null;\n\t\t/**@private */\n\t\t//this._fun=null;\n\t\t//this._oldCanvas=null;\n\t}\n\n\t__class(RenderSpriteHook,'laya.debug.tools.enginehook.RenderSpriteHook');\n\tvar __proto=RenderSpriteHook.prototype;\n\t__proto.createRenderSprite=function(type,next){\n\t\tvar rst;\n\t\trst=RenderSpriteHook._preCreateFun(type,next);\n\t\tif (type==/*laya.renders.RenderSprite.CANVAS*/0x10){\n\t\t\trst[\"_oldCanvas\"]=rst._fun;\n\t\t\trst._fun=RenderSpriteHook.I._canvas;\n\t\t}\n\t\treturn rst;\n\t}\n\n\t__proto._canvas=function(sprite,context,x,y){\n\t\tif (!SpriteRenderForVisibleAnalyse.allowRendering)return;\n\t\tvar _cacheCanvas=sprite._$P.cacheCanvas;\n\t\tvar _next=this._next;\n\t\tif (!_cacheCanvas||SpriteRenderForVisibleAnalyse.isVisibleTesting){\n\t\t\t_next._fun.call(_next,sprite,context,x,y);\n\t\t\treturn;\n\t\t};\n\t\tvar preTime;\n\t\tpreTime=Browser.now();\n\t\tvar tx=_cacheCanvas.ctx;\n\t\tvar _repaint=sprite._needRepaint()|| (!tx);\n\t\tthis._oldCanvas(sprite,context,x,y);\n\t\tif (Config.showCanvasMark){\n\t\t}\n\t\tif (_repaint){\n\t\t\tCacheAnalyser.I.reCacheCanvas(sprite,Browser.now()-preTime);\n\t\t\t}else{\n\t\t\tCacheAnalyser.I.renderCanvas(sprite,Browser.now()-preTime);\n\t\t}\n\t}\n\n\tRenderSpriteHook.init=function(){\n\t\tif (RenderSpriteHook.I)return;\n\t\tRenderSpriteHook.I=new RenderSpriteHook();\n\t\tRenderSpriteHook._preCreateFun=RunDriver.createRenderSprite;\n\t\tRunDriver.createRenderSprite=RenderSpriteHook.I.createRenderSprite;\n\t}\n\n\tRenderSpriteHook.IMAGE=0x01;\n\tRenderSpriteHook.FILTERS=0x02;\n\tRenderSpriteHook.ALPHA=0x04;\n\tRenderSpriteHook.TRANSFORM=0x08;\n\tRenderSpriteHook.CANVAS=0x10;\n\tRenderSpriteHook.BLEND=0x20;\n\tRenderSpriteHook.CLIP=0x40;\n\tRenderSpriteHook.STYLE=0x80;\n\tRenderSpriteHook.GRAPHICS=0x100;\n\tRenderSpriteHook.CUSTOM=0x200;\n\tRenderSpriteHook.ENABLERENDERMERGE=0x400;\n\tRenderSpriteHook.CHILDS=0x800;\n\tRenderSpriteHook.INIT=0x11111;\n\tRenderSpriteHook.renders=[];\n\tRenderSpriteHook.I=null;\n\tRenderSpriteHook._preCreateFun=null;\n\treturn RenderSpriteHook;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse\nvar SpriteRenderForVisibleAnalyse=(function(){\n\tfunction SpriteRenderForVisibleAnalyse(){\n\t\t/**@private */\n\t\tthis._repaint=1;\n\t\tthis._renderType=1;\n\t\tthis._x=0;\n\t\tthis._y=0;\n\t\tthis.target=null;\n\t\tthis.isTargetRenderd=false;\n\t\tthis.preFun=null;\n\t\tthis._next=null;\n\t\tthis.pgraphic=RenderSprite[\"prototype\"][\"_graphics\"];\n\t\tthis.pimage=RenderSprite[\"prototype\"][\"_image\"];\n\t\tthis.pimage2=RenderSprite[\"prototype\"][\"_image2\"];\n\t}\n\n\t__class(SpriteRenderForVisibleAnalyse,'laya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse');\n\tvar __proto=SpriteRenderForVisibleAnalyse.prototype;\n\t__proto.setRenderHook=function(){\n\t\tSprite[\"prototype\"][\"render\"]=SpriteRenderForVisibleAnalyse.I.render;\n\t}\n\n\t/**\n\t*更新、呈现显示对象。\n\t*@param context 渲染的上下文引用。\n\t*@param x X轴坐标。\n\t*@param y Y轴坐标。\n\t*/\n\t__proto.render=function(context,x,y){\n\t\tvar me;\n\t\tme=this;\n\t\tif (DebugInfoLayer.I.isDebugItem(me))return;\n\t\tif (me==laya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse.I.target){\n\t\t\tlaya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse.allowRendering=true;\n\t\t\tlaya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse.I.isTargetRenderd=true;\n\t\t\tCanvasTools.clearCanvas(SpriteRenderForVisibleAnalyse.mainCanvas);\n\t\t}\n\t\tRenderSprite.renders[this._renderType]._fun(this,context,x+this._x,y+this._y);\n\t\tif (me==laya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse.I.target){\n\t\t\tSpriteRenderForVisibleAnalyse.tarRec=CanvasTools.getCanvasDisRec(laya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse.mainCanvas);\n\t\t\tconsole.log(\"rec\",SpriteRenderForVisibleAnalyse.tarRec.toString());\n\t\t\tif (SpriteRenderForVisibleAnalyse.tarRec.width >0&& SpriteRenderForVisibleAnalyse.tarRec.height > 0){\n\t\t\t\tSpriteRenderForVisibleAnalyse.isTarRecOK=true;\n\t\t\t\tSpriteRenderForVisibleAnalyse.preImageData=CanvasTools.getImageDataFromCanvasByRec(SpriteRenderForVisibleAnalyse.mainCanvas,SpriteRenderForVisibleAnalyse.tarRec);\n\t\t\t\tSpriteRenderForVisibleAnalyse.tarImageData=CanvasTools.getImageDataFromCanvasByRec(SpriteRenderForVisibleAnalyse.mainCanvas,SpriteRenderForVisibleAnalyse.tarRec);\n\t\t\t\t}else{\n\t\t\t\tconsole.log(\"tarRec Not OK:\",SpriteRenderForVisibleAnalyse.tarRec);\n\t\t\t}\n\t\t\t}else{\n\t\t\tif (SpriteRenderForVisibleAnalyse.isTarRecOK){\n\t\t\t\tSpriteRenderForVisibleAnalyse.tImageData=CanvasTools.getImageDataFromCanvasByRec(SpriteRenderForVisibleAnalyse.mainCanvas,SpriteRenderForVisibleAnalyse.tarRec);\n\t\t\t\tvar dRate=NaN;\n\t\t\t\tdRate=CanvasTools.getDifferRate(SpriteRenderForVisibleAnalyse.preImageData,SpriteRenderForVisibleAnalyse.tImageData);\n\t\t\t\tSpriteRenderForVisibleAnalyse.preImageData=SpriteRenderForVisibleAnalyse.tImageData;\n\t\t\t\tif (dRate > 0){\n\t\t\t\t\tVisibleAnalyser.addCoverNode(me,dRate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.analyseNode=function(node){\n\t\tVisibleAnalyser.resetCoverList();\n\t\tif (Sprite[\"prototype\"][\"render\"] !=SpriteRenderForVisibleAnalyse.I.render){\n\t\t\tthis.preFun=Sprite[\"prototype\"][\"render\"];\n\t\t}\n\t\tthis.target=node;\n\t\tSprite[\"prototype\"][\"render\"]=this.render;\n\t\tif (!SpriteRenderForVisibleAnalyse.tarCanvas)\n\t\t\tSpriteRenderForVisibleAnalyse.tarCanvas=CanvasTools.createCanvas(Laya.stage.width,Laya.stage.height);\n\t\tif (!SpriteRenderForVisibleAnalyse.mainCanvas)\n\t\t\tSpriteRenderForVisibleAnalyse.mainCanvas=CanvasTools.createCanvas(Laya.stage.width,Laya.stage.height);\n\t\tthis.isTargetRenderd=false;\n\t\tSpriteRenderForVisibleAnalyse.isVisibleTesting=true;\n\t\tSpriteRenderForVisibleAnalyse.allowRendering=false;\n\t\tCanvasTools.clearCanvas(SpriteRenderForVisibleAnalyse.mainCanvas);\n\t\tCanvasTools.clearCanvas(SpriteRenderForVisibleAnalyse.tarCanvas);\n\t\tSpriteRenderForVisibleAnalyse.isTarRecOK=false;\n\t\tvar ctx=new RenderContext(SpriteRenderForVisibleAnalyse.mainCanvas.width,SpriteRenderForVisibleAnalyse.mainCanvas.height,SpriteRenderForVisibleAnalyse.mainCanvas);\n\t\tSpriteRenderForVisibleAnalyse.mainCanvas=ctx.canvas;\n\t\tthis.render.call(Laya.stage,ctx,0,0);\n\t\tif (!SpriteRenderForVisibleAnalyse.isTarRecOK){\n\t\t\tSpriteRenderForVisibleAnalyse.coverRate=0;\n\t\t\t}else{\n\t\t\tSpriteRenderForVisibleAnalyse.coverRate=CanvasTools.getDifferRate(SpriteRenderForVisibleAnalyse.preImageData,SpriteRenderForVisibleAnalyse.tarImageData);\n\t\t}\n\t\tVisibleAnalyser.coverRate=SpriteRenderForVisibleAnalyse.coverRate;\n\t\tVisibleAnalyser.isTarRecOK=SpriteRenderForVisibleAnalyse.isTarRecOK;\n\t\tconsole.log(\"coverRate:\",SpriteRenderForVisibleAnalyse.coverRate);\n\t\tthis.isTargetRenderd=false;\n\t\tSpriteRenderForVisibleAnalyse.isVisibleTesting=false;\n\t\tSpriteRenderForVisibleAnalyse.allowRendering=true;\n\t\tSprite[\"prototype\"][\"render\"]=this.preFun;\n\t}\n\n\t__proto.noRenderMode=function(){\n\t\treturn;\n\t\tRenderSprite[\"prototype\"][\"_graphics\"]=this.m_graphics;\n\t\tRenderSprite[\"prototype\"][\"_image\"]=this.m_image;\n\t\tRenderSprite[\"prototype\"][\"_image2\"]=this.m_image2;\n\t}\n\n\t__proto.normalMode=function(){\n\t\tRenderSprite[\"prototype\"][\"_graphics\"]=this.pgraphic;\n\t\tRenderSprite[\"prototype\"][\"_image\"]=this.pimage;\n\t\tRenderSprite[\"prototype\"][\"_image2\"]=this.pimage2;\n\t}\n\n\t__proto.inits=function(){\n\t\tthis.noRenderMode();\n\t}\n\n\t__proto.m_graphics=function(sprite,context,x,y){\n\t\tif (laya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse.allowRendering){\n\t\t\tvar tf=sprite._style._tf;\n\t\t\tsprite._graphics && sprite._graphics._render(sprite,context,x-tf.translateX,y-tf.translateY);\n\t\t};\n\t\tvar next=this._next;\n\t\tnext._fun.call(next,sprite,context,x,y);\n\t}\n\n\t__proto.m_image=function(sprite,context,x,y){\n\t\tif (laya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse.allowRendering){\n\t\t\tvar style=sprite._style;\n\t\t\tcontext.ctx.drawTexture2(x,y,style._tf.translateX,style._tf.translateY,sprite.transform,style.alpha,style.blendMode,sprite._graphics._one);\n\t\t}\n\t}\n\n\t__proto.m_image2=function(sprite,context,x,y){\n\t\tif (laya.debug.tools.enginehook.SpriteRenderForVisibleAnalyse.allowRendering){\n\t\t\tvar tf=sprite._style._tf;\n\t\t\tcontext.ctx.drawTexture2(x,y,tf.translateX,tf.translateY,sprite.transform,1,null,sprite._graphics._one);\n\t\t}\n\t}\n\n\tSpriteRenderForVisibleAnalyse.tarCanvas=null;\n\tSpriteRenderForVisibleAnalyse.mainCanvas=null;\n\tSpriteRenderForVisibleAnalyse.preImageData=null;\n\tSpriteRenderForVisibleAnalyse.tImageData=null;\n\tSpriteRenderForVisibleAnalyse.tarImageData=null;\n\tSpriteRenderForVisibleAnalyse.tarRec=null;\n\tSpriteRenderForVisibleAnalyse.isTarRecOK=false;\n\tSpriteRenderForVisibleAnalyse.isVisibleTesting=false;\n\tSpriteRenderForVisibleAnalyse.allowRendering=true;\n\tSpriteRenderForVisibleAnalyse.coverRate=NaN;\n\t__static(SpriteRenderForVisibleAnalyse,\n\t['I',function(){return this.I=new SpriteRenderForVisibleAnalyse();}\n\t]);\n\treturn SpriteRenderForVisibleAnalyse;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.enginehook.SpriteRenderHook\nvar SpriteRenderHook=(function(){\n\tfunction SpriteRenderHook(){\n\t\t/**@private */\n\t\tthis._repaint=1;\n\t\tthis._renderType=1;\n\t\tthis._x=0;\n\t\tthis._y=0;\n\t}\n\n\t__class(SpriteRenderHook,'laya.debug.tools.enginehook.SpriteRenderHook');\n\tvar __proto=SpriteRenderHook.prototype;\n\t/**\n\t*更新、呈现显示对象。\n\t*@param context 渲染的上下文引用。\n\t*@param x X轴坐标。\n\t*@param y Y轴坐标。\n\t*/\n\t__proto.render=function(context,x,y){\n\t\tif ((this)==Laya.stage){\n\t\t\tCacheAnalyser.renderLoopBegin();\n\t\t};\n\t\tvar preTime=0;\n\t\tpreTime=Browser.now();\n\t\tStat.spriteCount++;\n\t\tif (this[\"ShowBorderSign\"]){\n\t\t\tDebugTool.showDisBoundToSprite(this,DebugInfoLayer.I.cacheViewLayer,DebugConsts.SPRITE_REC_COLOR,DebugConsts.SPRITE_REC_LINEWIDTH);\n\t\t}\n\t\tRenderSprite.renders[this._renderType]._fun(this,context,x+this._x,y+this._y);\n\t\tthis._repaint=0;\n\t\tRenderAnalyser.I.render(this,Browser.now()-preTime);\n\t}\n\n\tSpriteRenderHook.init=function(){\n\t\tif (SpriteRenderHook.I)return;\n\t\tSpriteRenderHook.I=new SpriteRenderHook();\n\t\tSpriteRenderHook.setRenderHook();\n\t}\n\n\tSpriteRenderHook.setRenderHook=function(){\n\t\tSprite[\"prototype\"][\"render\"]=SpriteRenderHook.I.render;\n\t}\n\n\tSpriteRenderHook.showDisplayBorder=function(sprite,ifShowBorder){\n\t\t(ifShowBorder===void 0)&& (ifShowBorder=true);\n\t\tsprite[\"ShowBorderSign\"]=ifShowBorder;\n\t}\n\n\tSpriteRenderHook.isDisplayShowBorder=function(sprite){\n\t\treturn sprite[\"ShowBorderSign\"];\n\t}\n\n\tSpriteRenderHook.I=null;\n\tSpriteRenderHook.ShowBorderSign=\"ShowBorderSign\";\n\treturn SpriteRenderHook;\n})()\n\n\n/**\n*本类调用原生observe接口，仅支持部分浏览器，chrome有效\n*变化输出为异步方式,所以无法跟踪到是什么函数导致变化\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-26 上午9:35:45\n*/\n//class laya.debug.tools.exp.Observer\nvar Observer=(function(){\n\tfunction Observer(){}\n\t__class(Observer,'laya.debug.tools.exp.Observer');\n\tObserver.observe=function(obj,callBack){\n\t\t/*__JS__ */Object.observe(obj,callBack);\n\t}\n\n\tObserver.unobserve=function(obj,callBack){\n\t\t/*__JS__ */Object.unobserve(obj,callBack);\n\t}\n\n\tObserver.observeDiffer=function(obj,sign,msg){\n\t\t(msg===void 0)&& (msg=\"obDiffer\");\n\t\tvar differFun=function (){\n\t\t\tDifferTool.differ(sign,obj,msg);\n\t\t}\n\t\tObserver.observe(obj,differFun);\n\t}\n\n\treturn Observer;\n})()\n\n\n/**\n*本类调用原生watch接口，仅火狐有效\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-26 上午9:48:18\n*/\n//class laya.debug.tools.exp.Watch\nvar Watch=(function(){\n\tfunction Watch(){}\n\t__class(Watch,'laya.debug.tools.exp.Watch');\n\tWatch.watch=function(obj,name,callBack){\n\t\t/*__JS__ */obj.watch(name,callBack);\n\t}\n\n\tWatch.unwatch=function(obj,name,callBack){\n\t\t/*__JS__ */obj.unwatch(name,callBack);\n\t}\n\n\treturn Watch;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-30 下午1:06:56\n*/\n//class laya.debug.tools.FilterTool\nvar FilterTool=(function(){\n\tfunction FilterTool(){}\n\t__class(FilterTool,'laya.debug.tools.FilterTool');\n\tFilterTool.getArrByFilter=function(arr,filterFun){\n\t\tvar i=0,len=arr.length;\n\t\tvar rst=[];\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(filterFun(arr[i]))rst.push(arr[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tFilterTool.getArr=function(arr,sign,value){\n\t\tvar i=0,len=arr.length;\n\t\tvar rst=[];\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(arr[i][sign]==value)rst.push(arr[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn FilterTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.GetSetProfile\nvar GetSetProfile=(function(){\n\tfunction GetSetProfile(){}\n\t__class(GetSetProfile,'laya.debug.tools.GetSetProfile');\n\tGetSetProfile.removeNoDisplayKeys=function(arr){\n\t\tvar i=0;\n\t\tfor (i=arr.length-1;i >=0;i--){\n\t\t\tif (GetSetProfile.noDisplayKeys[arr[i]]){\n\t\t\t\tarr.splice(i,1);\n\t\t\t}\n\t\t}\n\t}\n\n\tGetSetProfile.getClassCount=function(className){\n\t\treturn GetSetProfile.countDic[className];\n\t}\n\n\tGetSetProfile.addClassCount=function(className){\n\t\tif (!GetSetProfile.countDic[className]){\n\t\t\tGetSetProfile.countDic[className]=1;\n\t\t}\n\t\telse {\n\t\t\tGetSetProfile.countDic[className]=GetSetProfile.countDic[className]+1;\n\t\t}\n\t}\n\n\tGetSetProfile.init=function(){\n\t\tif (GetSetProfile._inited)\n\t\t\treturn;\n\t\tGetSetProfile._inited=true;\n\t\tvar createFun=function (sp){\n\t\t\tGetSetProfile.classCreated(sp);\n\t\t}\n\t\tFunHook.hook(Node,\"call\",null,createFun);\n\t\tGetSetProfile.handlerO={};\n\t\tGetSetProfile.handlerO[\"get\"]=function (target,key,receiver){\n\t\t\tconsole.log(\"get\",target,key,receiver);\n\t\t\treturn /*__JS__ */Reflect.get(target,key,receiver);\n\t\t};\n\t\tGetSetProfile.handlerO[\"set\"]=function (target,key,value,receiver){\n\t\t\tconsole.log(\"set\",target,key,value,receiver);\n\t\t\treturn /*__JS__ */Reflect.set(target,key,value,receiver);\n\t\t}\n\t}\n\n\tGetSetProfile.classCreated=function(obj,oClas){\n\t\tif (GetSetProfile.fromMe)\n\t\t\treturn;\n\t\tvar className;\n\t\tclassName=ClassTool.getClassName(obj);\n\t\tGetSetProfile.addClassCount(className);\n\t\tGetSetProfile.addClassCount(\"ALL\");\n\t\tIDTools.idObj(obj);\n\t\tvar classDes;\n\t\tclassDes=GetSetProfile.hookClassDic[className];\n\t\tif (!classDes){\n\t\t\tGetSetProfile.profileClass(obj[\"constructor\"]);\n\t\t\tclassDes=GetSetProfile.hookClassDic[className];\n\t\t\tif (!classDes)\n\t\t\t\treturn;\n\t\t}\n\t\tGetSetProfile.hookObj2(obj,classDes);\n\t}\n\n\tGetSetProfile.hookObj=function(obj,keys){\n\t\tvar handler=GetSetProfile.handlerO;\n\t\t/*__JS__ */new Proxy(obj,handler);\n\t}\n\n\tGetSetProfile.hookObj2=function(obj,keys){\n\t\tvar i=0,len=0;\n\t\tlen=keys.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tGetSetProfile.hookVar(obj,keys[i]);\n\t\t}\n\t}\n\n\tGetSetProfile.profileClass=function(clz){\n\t\tvar className;\n\t\tclassName=ClassTool.getClassName(clz);\n\t\tGetSetProfile.fromMe=true;\n\t\tvar tO=new clz();\n\t\tGetSetProfile.fromMe=false;\n\t\tvar keys;\n\t\tkeys=ClassTool.getObjectDisplayAbleKeys(tO);\n\t\tkeys=ObjectTools.getNoSameArr(keys);\n\t\tvar i=0,len=0;\n\t\tlen=keys.length;\n\t\tvar tV;\n\t\tvar key;\n\t\tfor (i=len-1;i >=0;i--){\n\t\t\tkey=keys[i];\n\t\t\ttV=tO[key];\n\t\t\tif ((typeof tV=='function')){\n\t\t\t\tkeys.splice(i,1);\n\t\t\t}\n\t\t}\n\t\tlen=keys.length;\n\t\tGetSetProfile.removeNoDisplayKeys(keys);\n\t\tGetSetProfile.hookClassDic[className]=keys;\n\t}\n\n\tGetSetProfile.hookPrototype=function(tO,key){\n\t\tconsole.log(\"hook:\",key);\n\t\ttry {\n\t\t\tGetSetProfile.hookVar(tO,key);\n\t\t}\n\t\tcatch (e){\n\t\t\tconsole.log(\"fail\",key);\n\t\t}\n\t}\n\n\tGetSetProfile.reportCall=function(obj,name,type){\n\t\tIDTools.idObj(obj);\n\t\tvar objID=0;\n\t\tobjID=IDTools.getObjID(obj);\n\t\tvar className;\n\t\tclassName=ClassTool.getClassName(obj);\n\t\tGetSetProfile.recordInfo(className,name,type,objID);\n\t\tGetSetProfile.recordInfo(\"ALL\",name,type,objID);\n\t}\n\n\tGetSetProfile.recordInfo=function(className,name,type,objID){\n\t\tvar propCallsDic;\n\t\tif (!GetSetProfile.infoDic[className]){\n\t\t\tGetSetProfile.infoDic[className]={};\n\t\t}\n\t\tpropCallsDic=GetSetProfile.infoDic[className];\n\t\tvar propCalls;\n\t\tif (!propCallsDic[name]){\n\t\t\tpropCallsDic[name]={};\n\t\t}\n\t\tpropCalls=propCallsDic[name];\n\t\tvar propCallO;\n\t\tif (!propCalls[type]){\n\t\t\tpropCalls[type]={};\n\t\t}\n\t\tpropCallO=propCalls[type];\n\t\tif (!propCallO[objID]){\n\t\t\tpropCallO[objID]=1;\n\t\t\tif (!propCallO[\"objCount\"]){\n\t\t\t\tpropCallO[\"objCount\"]=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpropCallO[\"objCount\"]=propCallO[\"objCount\"]+1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tpropCallO[objID]=propCallO[objID]+1;\n\t\t}\n\t\tif (!propCallO[\"count\"]){\n\t\t\tpropCallO[\"count\"]=1;\n\t\t}\n\t\telse {\n\t\t\tpropCallO[\"count\"]=propCallO[\"count\"]+1;\n\t\t}\n\t}\n\n\tGetSetProfile.showInfo=function(){\n\t\tvar rstO;\n\t\trstO={};\n\t\tvar rstO1;\n\t\trstO1={};\n\t\tvar arr;\n\t\tarr=[];\n\t\tvar arr1;\n\t\tarr1=[];\n\t\tvar className;\n\t\tvar keyName;\n\t\tvar type;\n\t\tfor (className in GetSetProfile.infoDic){\n\t\t\tvar tClassO;\n\t\t\tvar tClassO1;\n\t\t\ttClassO=GetSetProfile.infoDic[className];\n\t\t\trstO[className]=tClassO1={};\n\t\t\tfor (keyName in tClassO){\n\t\t\t\tvar tKeyO;\n\t\t\t\tvar tKeyO1;\n\t\t\t\ttKeyO=tClassO[keyName];\n\t\t\t\ttClassO1[keyName]=tKeyO1={};\n\t\t\t\tfor(type in tKeyO){\n\t\t\t\t\tvar tDataO;\n\t\t\t\t\tvar tDataO1;\n\t\t\t\t\ttDataO=tKeyO[type];\n\t\t\t\t\ttDataO[\"rate\"]=tDataO[\"objCount\"] / GetSetProfile.getClassCount(className);\n\t\t\t\t\ttKeyO1[type]=tDataO[\"rate\"];\n\t\t\t\t\tvar tSKey;\n\t\t\t\t\ttSKey=className+\"_\"+keyName+\"_\"+type;\n\t\t\t\t\trstO1[tSKey]=tDataO[\"rate\"];\n\t\t\t\t\tif (className==\"ALL\"){\n\t\t\t\t\t\tif (type==\"get\"){\n\t\t\t\t\t\t\tarr.push([tSKey,tDataO[\"rate\"],tDataO[\"count\"]]);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tarr1.push([tSKey,tDataO[\"rate\"],tDataO[\"count\"]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconsole.log(GetSetProfile.infoDic);\n\t\tconsole.log(GetSetProfile.countDic);\n\t\tconsole.log(rstO);\n\t\tconsole.log(rstO1);\n\t\tconsole.log(\"nodeCount:\",GetSetProfile.getClassCount(\"ALL\"));\n\t\tconsole.log(\"sort by rate\");\n\t\tGetSetProfile.showStaticInfo(arr,arr1,\"1\");\n\t\tconsole.log(\"sort by count\");\n\t\tGetSetProfile.showStaticInfo(arr,arr1,\"2\");\n\t}\n\n\tGetSetProfile.showStaticInfo=function(arr,arr1,sortKey){\n\t\tconsole.log(\"get:\");\n\t\tGetSetProfile.showStaticArray(arr,sortKey);\n\t\tconsole.log(\"set:\");\n\t\tGetSetProfile.showStaticArray(arr1,sortKey);\n\t}\n\n\tGetSetProfile.showStaticArray=function(arr,sortKey){\n\t\t(sortKey===void 0)&& (sortKey=\"1\");\n\t\tarr.sort(MathUtil.sortByKey(sortKey,true,true));\n\t\tvar i=0,len=0;\n\t\tlen=arr.length;\n\t\tvar tArr;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttArr=arr[i];\n\t\t\tconsole.log(tArr[0],Math.floor(tArr[1]*100),tArr[2]);\n\t\t}\n\t}\n\n\tGetSetProfile.hookVar=function(obj,name,setHook,getHook){\n\t\tif (!setHook)\n\t\t\tsetHook=[];\n\t\tif (!getHook)\n\t\t\tgetHook=[];\n\t\tvar preO=obj;\n\t\tvar preValue;\n\t\tvar newKey=\"___@\"+newKey;\n\t\tvar des;\n\t\tdes=ClassTool.getOwnPropertyDescriptor(obj,name);\n\t\tvar ndes={};\n\t\tvar mSet=function (value){\n\t\t\tpreValue=value;\n\t\t};\n\t\tvar mGet=function (){\n\t\t\treturn preValue;\n\t\t};\n\t\tvar mSet1=function (value){\n\t\t\tvar _t=/*__JS__ */this;\n\t\t\tGetSetProfile.reportCall(_t,name,\"set\");\n\t\t};\n\t\tvar mGet1=function (){\n\t\t\tvar _t=/*__JS__ */this;\n\t\t\tGetSetProfile.reportCall(_t,name,\"get\");\n\t\t\treturn preValue;\n\t\t}\n\t\tgetHook.push(mGet1);\n\t\tsetHook.push(mSet1);\n\t\twhile (!des && obj[\"__proto__\"]){\n\t\t\tobj=obj[\"__proto__\"];\n\t\t\tdes=ClassTool.getOwnPropertyDescriptor(obj,name);\n\t\t}\n\t\tif (des){\n\t\t\tndes.set=des.set ? des.set :mSet;\n\t\t\tndes.get=des.get ? des.get :mGet;\n\t\t\tif (!des.get){\n\t\t\t\tpreValue=preO[name];\n\t\t\t}\n\t\t\tndes.enumerable=des.enumerable;\n\t\t\tsetHook.push(ndes.set);\n\t\t\tgetHook.push(ndes.get);\n\t\t\tFunHook.hookFuns(ndes,\"set\",setHook);\n\t\t\tFunHook.hookFuns(ndes,\"get\",getHook,getHook.length-1);\n\t\t\tClassTool.defineProperty(preO,name,ndes);\n\t\t}\n\t\tif (!des){\n\t\t\tndes.set=mSet;\n\t\t\tndes.get=mGet;\n\t\t\tpreValue=preO[name];\n\t\t\tsetHook.push(ndes.set);\n\t\t\tgetHook.push(ndes.get);\n\t\t\tFunHook.hookFuns(ndes,\"set\",setHook);\n\t\t\tFunHook.hookFuns(ndes,\"get\",getHook,getHook.length-1);\n\t\t\tClassTool.defineProperty(preO,name,ndes);\n\t\t}\n\t}\n\n\tGetSetProfile._inited=false;\n\tGetSetProfile.handlerO=null;\n\tGetSetProfile.ALL=\"ALL\";\n\tGetSetProfile.countDic={};\n\tGetSetProfile.fromMe=false;\n\tGetSetProfile.hookClassDic={};\n\tGetSetProfile.infoDic={};\n\t__static(GetSetProfile,\n\t['noDisplayKeys',function(){return this.noDisplayKeys={\"conchModel\":true};}\n\t]);\n\treturn GetSetProfile;\n})()\n\n\n/**\n*本类用于在对象的函数上挂钩子\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-23 下午1:13:13\n*/\n//class laya.debug.tools.hook.FunHook\nvar FunHook=(function(){\n\tfunction FunHook(){}\n\t__class(FunHook,'laya.debug.tools.hook.FunHook');\n\tFunHook.hook=function(obj,funName,preFun,aftFun){\n\t\tFunHook.hookFuns(obj,funName,[preFun,obj[funName],aftFun],1);\n\t}\n\n\tFunHook.hookAllFun=function(obj){\n\t\tvar key;\n\t\tvar arr;\n\t\tarr=ClassTool.getOwnPropertyNames(obj);\n\t\tfor(key in arr){\n\t\t\tkey=arr[key];\n\t\t\tif (FunHook.special[key])continue ;\n\t\t\tconsole.log(\"try hook:\",key);\n\t\t\tif((typeof (obj[key])=='function')){\n\t\t\t\tconsole.log(\"hook:\",key);\n\t\t\t\tFunHook.hookFuns(obj,key,[FunHook.getTraceMsg(\"call:\"+key),obj[key]],1);\n\t\t\t}\n\t\t}\n\t\tif(obj[\"__proto__\"]){\n\t\t\tFunHook.hookAllFun(obj[\"__proto__\"]);\n\t\t\t}else{\n\t\t\tconsole.log(\"end:\",obj);\n\t\t}\n\t}\n\n\tFunHook.getTraceMsg=function(msg){\n\t\tvar rst;\n\t\trst=function (){\n\t\t\tconsole.log(msg);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tFunHook.hookFuns=function(obj,funName,funList,rstI){\n\t\t(rstI===void 0)&& (rstI=-1);\n\t\tvar _preFun=obj[funName];\n\t\tvar newFun;\n\t\tnewFun=function (__args){\n\t\t\tvar args=arguments;\n\t\t\tvar rst;\n\t\t\tvar i=0;\n\t\t\tvar len=0;\n\t\t\tlen=funList.length;\n\t\t\tfor(i=0;i<len;i++){\n\t\t\t\tif(!funList[i])continue ;\n\t\t\t\tif(i==rstI){\n\t\t\t\t\trst=funList[i].apply(this,args);\n\t\t\t\t\t}else{\n\t\t\t\t\tfunList[i].apply(this,args);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rst;\n\t\t};\n\t\tnewFun[\"pre\"]=_preFun;\n\t\tobj[funName]=newFun;\n\t}\n\n\tFunHook.removeHook=function(obj,funName){\n\t\tif(obj[funName].pre!=null){\n\t\t\tobj[funName]=obj[funName].pre;\n\t\t}\n\t}\n\n\tFunHook.debugHere=function(){\n\t\t/*__JS__ */debugger;;\n\t}\n\n\tFunHook.traceLoc=function(level,msg){\n\t\t(level===void 0)&& (level=0);\n\t\t(msg===void 0)&& (msg=\"\");\n\t\tconsole.log(msg,\"fun loc:\",TraceTool.getCallLoc(3+level));\n\t}\n\n\tFunHook.getLocFun=function(level,msg){\n\t\t(level===void 0)&& (level=0);\n\t\t(msg===void 0)&& (msg=\"\");\n\t\tlevel+=1;\n\t\tvar rst;\n\t\trst=function (){\n\t\t\tFunHook.traceLoc(level,msg);\n\t\t}\n\t\treturn rst;\n\t}\n\n\t__static(FunHook,\n\t['special',function(){return this.special={\n\t\t\t\"length\":true,\n\t\t\t\"name\":true,\n\t\t\t\"arguments\":true,\n\t\t\t\"caller\":true,\n\t\t\t\"prototype\":true,\n\t\t\t\"is\":true,\n\t\t\t\"isExtensible\":true,\n\t\t\t\"isFrozen\":true,\n\t\t\t\"isSealed\":true,\n\t\t\t\"preventExtensions\":true,\n\t\t\t\"seal\":true,\n\t\t\t\"unobserve\":true,\n\t\t\t\"apply\":true,\n\t\t\t\"call\":true,\n\t\t\t\"bind\":true,\n\t\t\t\"freeze\":true,\n\t\t\t\"unobserve\":true\n\t};}\n\n\t]);\n\treturn FunHook;\n})()\n\n\n/**\n*本类用于监控对象 set get 函数的调用\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-23 下午2:52:48\n*/\n//class laya.debug.tools.hook.VarHook\nvar VarHook=(function(){\n\tfunction VarHook(){}\n\t__class(VarHook,'laya.debug.tools.hook.VarHook');\n\tVarHook.hookVar=function(obj,name,setHook,getHook){\n\t\tif(!setHook)setHook=[];\n\t\tif(!getHook)getHook=[];\n\t\tvar preO=obj;\n\t\tvar preValue=obj[name];\n\t\tvar des;\n\t\tdes=ClassTool.getOwnPropertyDescriptor(obj,name);\n\t\tvar ndes={};\n\t\tvar mSet=function (value){\n\t\t\tconsole.log(\"var hook set \"+name+\":\",value);\n\t\t\tpreValue=value;\n\t\t};\n\t\tvar mGet=function (){\n\t\t\tconsole.log(\"var hook get\"+name+\":\",preValue);\n\t\t\treturn preValue;\n\t\t}\n\t\tif(des){\n\t\t\tndes.set=mSet;\n\t\t\tndes.get=mGet;\n\t\t\tndes.enumerable=des.enumerable;\n\t\t\tsetHook.push(ndes.set);\n\t\t\tgetHook.push(ndes.get);\n\t\t\tFunHook.hookFuns(ndes,\"set\",setHook);\n\t\t\tFunHook.hookFuns(ndes,\"get\",getHook,getHook.length-1);\n\t\t\tClassTool.defineProperty(obj,name,ndes);\n\t\t\treturn;\n\t\t}\n\t\twhile(!des&&obj[\"__proto__\"]){\n\t\t\tobj=obj[\"__proto__\"];\n\t\t\tdes=ClassTool.getOwnPropertyDescriptor(obj,name);\n\t\t}\n\t\tif (des){\n\t\t\tndes.set=des.set?des.set:mSet;\n\t\t\tndes.get=des.get?des.get:mGet;\n\t\t\tndes.enumerable=des.enumerable;\n\t\t\tsetHook.push(ndes.set);\n\t\t\tgetHook.push(ndes.get);\n\t\t\tFunHook.hookFuns(ndes,\"set\",setHook);\n\t\t\tFunHook.hookFuns(ndes,\"get\",getHook,getHook.length-1);\n\t\t\tClassTool.defineProperty(preO,name,ndes);\n\t\t}\n\t\tif(!des){\n\t\t\tconsole.log(\"get des fail add directly\");\n\t\t\tndes.set=mSet;\n\t\t\tndes.get=mGet;\n\t\t\tsetHook.push(ndes.set);\n\t\t\tgetHook.push(ndes.get);\n\t\t\tFunHook.hookFuns(ndes,\"set\",setHook);\n\t\t\tFunHook.hookFuns(ndes,\"get\",getHook,getHook.length-1);\n\t\t\tClassTool.defineProperty(obj,name,ndes);\n\t\t}\n\t}\n\n\tVarHook.getLocFun=function(msg,level){\n\t\t(msg===void 0)&& (msg=\"\");\n\t\t(level===void 0)&& (level=0);\n\t\tlevel+=1;\n\t\tvar rst;\n\t\trst=function (){\n\t\t\tFunHook.traceLoc(level,msg);\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn VarHook;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-29 上午9:45:33\n*/\n//class laya.debug.tools.IDTools\nvar IDTools=(function(){\n\tfunction IDTools(){\n\t\tthis.tID=1;\n\t}\n\n\t__class(IDTools,'laya.debug.tools.IDTools');\n\tvar __proto=IDTools.prototype;\n\t__proto.getID=function(){\n\t\treturn this.tID++;\n\t}\n\n\tIDTools.getAID=function(){\n\t\treturn IDTools._ID.getID();\n\t}\n\n\tIDTools.idObjE=function(obj,sign){\n\t\t(sign===void 0)&& (sign=\"default\");\n\t\tif (obj[\"_M_id_\"])return obj;\n\t\tif(!sign){\n\t\t\tsign=\"default\";\n\t\t}\n\t\tif(!IDTools._idDic[sign]){\n\t\t\tIDTools._idDic[sign]=new IDTools();\n\t\t}\n\t\tobj[\"_M_id_\"]=IDTools._idDic[sign].getAID();\n\t\treturn obj;\n\t}\n\n\tIDTools.setObjID=function(obj,id){\n\t\tobj[\"_M_id_\"]=id;\n\t\treturn obj;\n\t}\n\n\tIDTools.idObj=function(obj){\n\t\tif (obj[\"_M_id_\"])return obj;\n\t\tobj[\"_M_id_\"]=IDTools.getAID();\n\t\treturn obj;\n\t}\n\n\tIDTools.getObjID=function(obj){\n\t\tif(!obj)return-1;\n\t\treturn obj[\"_M_id_\"];\n\t}\n\n\tIDTools.idSign=\"_M_id_\";\n\t__static(IDTools,\n\t['_ID',function(){return this._ID=new IDTools();},'_idDic',function(){return this._idDic={\"default\":new IDTools()};}\n\t]);\n\treturn IDTools;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-11-27 上午9:58:59\n*/\n//class laya.debug.tools.JsonTool\nvar JsonTool=(function(){\n\tfunction JsonTool(){}\n\t__class(JsonTool,'laya.debug.tools.JsonTool');\n\tJsonTool.getJsonString=function(obj,singleLine,split,depth,Width){\n\t\t(singleLine===void 0)&& (singleLine=true);\n\t\t(split===void 0)&& (split=\"\\n\");\n\t\t(depth===void 0)&& (depth=0);\n\t\t(Width===void 0)&& (Width=4);\n\t\tvar preStr=\"\";\n\t\tpreStr=JsonTool.getEmptyStr(depth*Width);\n\t\tvar rst;\n\t\tvar keyValues;\n\t\tkeyValues={};\n\t\tvar tKey;\n\t\tvar tValue;\n\t\tvar type;\n\t\tvar keys;\n\t\tkeys=[];\n\t\tfor(tKey in obj){\n\t\t\tkeys.push(tKey);\n\t\t\ttValue=obj[tKey];\n\t\t\tif(JsonTool.singleLineKey[tKey]){\n\t\t\t\tkeyValues[tKey]=JsonTool.getValueStr(tValue,true,split,depth+1,Width);\n\t\t\t\t}else{\n\t\t\t\tkeyValues[tKey]=JsonTool.getValueStr(tValue,singleLine,split,depth+1,Width);\n\t\t\t}\n\t\t};\n\t\tvar i=0,len=0;\n\t\tlen=keys.length;\n\t\tkeys.sort();\n\t\tkeys=keys.reverse();\n\t\tvar keyPreStr;\n\t\tkeyPreStr=JsonTool.getEmptyStr((depth+1)*Width);\n\t\tif(singleLine){\n\t\t\tsplit=\"\";\n\t\t\tpreStr=\"\";\n\t\t\tkeyPreStr=\"\";\n\t\t};\n\t\tvar keyValueStrArr;\n\t\tkeyValueStrArr=[];\n\t\tfor(i=0;i<len;i++){\n\t\t\ttKey=keys[i];\n\t\t\tkeyValueStrArr.push(keyPreStr+JsonTool.wrapValue(tKey)+\":\"+keyValues[tKey]);\n\t\t}\n\t\trst=\"{\"+split+keyValueStrArr.join(\",\"+split)+split+preStr+\"}\";\n\t\treturn rst;\n\t}\n\n\tJsonTool.wrapValue=function(value,wraper){\n\t\t(wraper===void 0)&& (wraper=\"\\\"\");\n\t\treturn wraper+value+wraper;\n\t}\n\n\tJsonTool.getArrStr=function(arr,singleLine,split,depth,Width){\n\t\t(singleLine===void 0)&& (singleLine=true);\n\t\t(split===void 0)&& (split=\"\\n\");\n\t\t(depth===void 0)&& (depth=0);\n\t\t(Width===void 0)&& (Width=4);\n\t\tvar rst;\n\t\tvar i=0,len=0;\n\t\tlen=arr.length;\n\t\tvar valueStrArr;\n\t\tvalueStrArr=[];\n\t\tfor(i=0;i<len;i++){\n\t\t\tvalueStrArr.push(JsonTool.getValueStr(arr[i],singleLine,split,depth+1,Width));\n\t\t};\n\t\tvar preStr=\"\";\n\t\tpreStr=JsonTool.getEmptyStr((depth+1)*Width);\n\t\tif(singleLine){\n\t\t\tsplit=\"\";\n\t\t\tpreStr=\"\";\n\t\t}\n\t\trst=\"[\"+split+preStr+valueStrArr.join(\",\"+split+preStr)+\"]\";\n\t\treturn rst;\n\t}\n\n\tJsonTool.quote=function(string){\n\t\tJsonTool.escapable.lastIndex=0;\n\t\treturn JsonTool.escapable.test(string)? '\"'+string.replace(JsonTool.escapable,function(a){\n\t\t\tvar c=JsonTool.meta[a];\n\t\t\treturn typeof c==='string' ? c :\n\t\t\t'\\\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);\n\t\t})+'\"' :'\"'+string+'\"';\n\t}\n\n\tJsonTool.getValueStr=function(tValue,singleLine,split,depth,Width){\n\t\t(singleLine===void 0)&& (singleLine=true);\n\t\t(split===void 0)&& (split=\"\\n\");\n\t\t(depth===void 0)&& (depth=0);\n\t\t(Width===void 0)&& (Width=0);\n\t\tvar rst;\n\t\tif((typeof tValue=='string')){\n\t\t\trst=JsonTool.quote(tValue);\n\t\t\t}else if(tValue==null){\n\t\t\trst=\"null\";\n\t\t\t}else if((typeof tValue=='number')|| ((typeof tValue=='number')&& Math.floor(tValue)==tValue)|| (typeof tValue=='boolean')){\n\t\t\trst=tValue;\n\t\t\t}else if((tValue instanceof Array)){\n\t\t\trst=JsonTool.getArrStr(tValue,singleLine,split,depth,Width);\n\t\t\t}else if((typeof tValue=='object')){\n\t\t\trst=JsonTool.getJsonString(tValue,singleLine,split,depth,Width);\n\t\t\t}else{\n\t\t\trst=tValue;\n\t\t}\n\t\treturn rst;\n\t}\n\n\tJsonTool.getEmptyStr=function(width){\n\t\tif(!JsonTool.emptyDic.hasOwnProperty(width)){\n\t\t\tvar i=0;\n\t\t\tvar len=0;\n\t\t\tlen=width;\n\t\t\tvar rst;\n\t\t\trst=\"\";\n\t\t\tfor(i=0;i<len;i++){\n\t\t\t\trst+=\" \";\n\t\t\t}\n\t\t\tJsonTool.emptyDic[width]=rst;\n\t\t}\n\t\treturn JsonTool.emptyDic[width];\n\t}\n\n\tJsonTool.emptyDic={};\n\t__static(JsonTool,\n\t['singleLineKey',function(){return this.singleLineKey={\n\t\t\t\"props\":true\n\t\t};},'escapable',function(){return this.escapable=/[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;},'meta',function(){return this.meta = {   \n\t\t'\\b':'\\\\b',\n\t\t'\\t':'\\\\t',\n\t\t'\\n':'\\\\n',\n\t\t'\\f':'\\\\f',\n\t\t'\\r':'\\\\r',\n\t\t'\"' :'\\\\\"',\n\t\t'\\\\':'\\\\\\\\'\n};}\n\n\n]);\nreturn JsonTool;\n})()\n\n\n/**\n*本类用于操作html对象\n*@author ww\n*/\n//class laya.debug.tools.JSTools\nvar JSTools=(function(){\n\tfunction JSTools(){}\n\t__class(JSTools,'laya.debug.tools.JSTools');\n\tJSTools.showToBody=function(el,x,y){\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\tBrowser.document.body.appendChild(el);\n\t\tvar style;\n\t\tstyle=el.style;\n\t\tstyle.position=\"absolute\";\n\t\tstyle.top=y+\"px\";\n\t\tstyle.left=x+\"px\";\n\t}\n\n\tJSTools.showToParent=function(el,x,y,parent){\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\tparent.appendChild(el);\n\t\tvar style;\n\t\tstyle=el.style;\n\t\tstyle.position=\"absolute\";\n\t\tstyle.top=y+\"px\";\n\t\tstyle.left=x+\"px\";\n\t}\n\n\tJSTools.addToBody=function(el){\n\t\tBrowser.document.body.appendChild(el);\n\t}\n\n\tJSTools.setPos=function(el,x,y){\n\t\tvar style;\n\t\tstyle=el.style;\n\t\tstyle.top=y+\"px\";\n\t\tstyle.left=x+\"px\";\n\t}\n\n\tJSTools.setSize=function(el,width,height){\n\t\tvar style;\n\t\tstyle=el.style;\n\t\tstyle.width=width+\"px\";\n\t\tstyle.height=height+\"px\";\n\t}\n\n\tJSTools.setTransform=function(el,mat){\n\t\tvar style;\n\t\tstyle=el.style;\n\t\tstyle.transformOrigin=style.webkitTransformOrigin=style.msTransformOrigin=style.mozTransformOrigin=style.oTransformOrigin=\"0px 0px 0px\";\n\t\tstyle.transform=style.webkitTransform=style.msTransform=style.mozTransform=style.oTransform=\"matrix(\"+mat.toString()+\")\";\n\t}\n\n\tJSTools.noMouseEvent=function(el){\n\t\tvar style;\n\t\tstyle=el.style;\n\t\tstyle[\"pointer-events\"]=\"none\";\n\t}\n\n\tJSTools.setMouseEnable=function(el,enable){\n\t\tvar style;\n\t\tstyle=el.style;\n\t\tstyle[\"pointer-events\"]=enable?\"auto\":\"none\";\n\t}\n\n\tJSTools.setZIndex=function(el,zIndex){\n\t\tvar style;\n\t\tstyle=el.style;\n\t\tstyle[\"z-index\"]=zIndex;\n\t}\n\n\tJSTools.showAboveSprite=function(el,sprite,dx,dy){\n\t\t(dx===void 0)&& (dx=0);\n\t\t(dy===void 0)&& (dy=0);\n\t\tvar pos;\n\t\tpos=new Point();\n\t\tpos=sprite.localToGlobal(pos);\n\t\tpos.x+=dx;\n\t\tpos.y+=dy;\n\t\tpos.x+=Laya.stage.offset.x;\n\t\tpos.y+=Laya.stage.offset.y;\n\t\tJSTools.showToBody(el,pos.x,pos.y);\n\t}\n\n\tJSTools.removeElement=function(el){\n\t\tBrowser.removeElement(el);\n\t}\n\n\tJSTools.isElementInDom=function(el){\n\t\treturn el && el.parentNode;\n\t}\n\n\tJSTools.getImageSpriteByFile=function(file,width,height){\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\tvar reader;\n\t\t/*__JS__ */reader=new FileReader();;\n\t\treader.readAsDataURL(file);\n\t\tvar sprite;\n\t\tsprite=new Sprite();\n\t\treader.onload=function (e){\n\t\t\tvar txt;\n\t\t\ttxt=new Texture();\n\t\t\ttxt.load(reader.result);\n\t\t\tsprite.graphics.drawTexture(txt,0,0,width,height);\n\t\t}\n\t\treturn sprite;\n\t}\n\n\tJSTools.getPixelRatio=function(){\n\t\tif (JSTools._pixelRatio > 0)return JSTools._pixelRatio;\n\t\tvar canvas=Browser.createElement(\"canvas\");\n\t\tvar context=canvas.getContext('2d');\n\t\tvar devicePixelRatio=Browser.window.devicePixelRatio || 1;\n\t\tvar backingStoreRatio=context.webkitBackingStorePixelRatio ||\n\t\tcontext.mozBackingStorePixelRatio ||\n\t\tcontext.msBackingStorePixelRatio ||\n\t\tcontext.oBackingStorePixelRatio ||\n\t\tcontext.backingStorePixelRatio || 1;\n\t\tvar ratio=devicePixelRatio / backingStoreRatio;\n\t\tconsole.log(\"pixelRatioc:\",ratio);\n\t\tJSTools._pixelRatio=ratio;\n\t\treturn ratio;\n\t}\n\n\tJSTools._pixelRatio=-1;\n\treturn JSTools;\n})()\n\n\n/**\n*布局工具类,目前只支持水平方向布局\n*@author ww\n*/\n//class laya.debug.tools.layout.Layouter\nvar Layouter=(function(){\n\tfunction Layouter(){\n\t\t/**\n\t\t*布局用的数据，与布局方法有关\n\t\t*/\n\t\tthis.data=null;\n\t\t/**\n\t\t*布局涉及的对象\n\t\t*/\n\t\tthis._items=null;\n\t\t/**\n\t\t*布局用的函数\n\t\t*/\n\t\tthis.layoutFun=null;\n\t\t/**\n\t\t*布局起始x\n\t\t*/\n\t\tthis._sX=0;\n\t\t/**\n\t\t*布局宽\n\t\t*/\n\t\tthis._width=0;\n\t}\n\n\t__class(Layouter,'laya.debug.tools.layout.Layouter');\n\tvar __proto=Layouter.prototype;\n\t__proto.layout=function(){\n\t\tthis.layoutFun(this._width,this._items,this.data,this._sX);\n\t}\n\n\t/**\n\t*重新布局\n\t*\n\t*/\n\t__proto.changed=function(){\n\t\tLaya.timer.callLater(this,this.layout);\n\t}\n\n\t/**\n\t*根据当前的对象状态计算位置大小\n\t*\n\t*/\n\t__proto.calSize=function(){\n\t\tvar i=0,len=0;\n\t\tvar tItem;\n\t\ttItem=this.items[0];\n\t\tthis._sX=tItem.x;\n\t\tvar maxX=NaN;\n\t\tmaxX=this._sX+tItem.width;\n\t\tlen=this.items.length;\n\t\tfor (i=1;i < len;i++){\n\t\t\ttItem=this.items[i];\n\t\t\tif (this._sX > tItem.x){\n\t\t\t\tthis._sX=tItem.x;\n\t\t\t}\n\t\t\tif (maxX < tItem.x+tItem.width){\n\t\t\t\tmaxX=tItem.x+tItem.width;\n\t\t\t}\n\t\t}\n\t\tthis._width=maxX-this._sX;\n\t}\n\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._width;\n\t\t},function(v){\n\t\tthis._width=v;\n\t\tthis.changed();\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\treturn this._sX;\n\t\t},function(v){\n\t\tthis._sX=v;\n\t\tthis.changed();\n\t});\n\n\t__getset(0,__proto,'items',function(){\n\t\treturn this._items;\n\t\t},function(arr){\n\t\tthis._items=arr;\n\t\tthis.calSize();\n\t});\n\n\treturn Layouter;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.layout.LayoutFuns\nvar LayoutFuns=(function(){\n\tfunction LayoutFuns(){}\n\t__class(LayoutFuns,'laya.debug.tools.layout.LayoutFuns');\n\tLayoutFuns.sameWidth=function(totalWidth,items,data,sX){\n\t\t(sX===void 0)&& (sX=0);\n\t\tvar dWidth=0;\n\t\tif (data && data.dWidth)\n\t\t\tdWidth=data.dWidth;\n\t\tvar perWidth=NaN;\n\t\tperWidth=(totalWidth-(items.length-1)*dWidth)/ items.length;\n\t\tvar tItem;\n\t\tvar i=0,len=0;\n\t\tvar tX=NaN;\n\t\ttX=sX;\n\t\tlen=items.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttItem=items[i];\n\t\t\ttItem.x=tX;\n\t\t\ttItem.width=perWidth;\n\t\t\ttX+=dWidth+perWidth;\n\t\t}\n\t}\n\n\tLayoutFuns.getSameWidthLayout=function(items,dWidth){\n\t\tvar data;\n\t\tdata={};\n\t\tdata.dWidth=dWidth;\n\t\treturn LayoutFuns.getLayouter(items,data,laya.debug.tools.layout.LayoutFuns.sameWidth);\n\t}\n\n\tLayoutFuns.getLayouter=function(items,data,fun){\n\t\tvar layouter;\n\t\tlayouter=new Layouter();\n\t\tlayouter.items=items;\n\t\tlayouter.data=data;\n\t\tlayouter.layoutFun=fun;\n\t\treturn layouter;\n\t}\n\n\tLayoutFuns.sameDis=function(totalWidth,items,data,sX){\n\t\t(sX===void 0)&& (sX=0);\n\t\tvar dWidth=NaN;\n\t\tdWidth=totalWidth;\n\t\tvar tItem;\n\t\tvar i=0,len=0;\n\t\tlen=items.length;\n\t\tLayoutFuns.prepareForLayoutWidth(totalWidth,items);\n\t\tfor (i=0;i < len;i++){\n\t\t\ttItem=items[i];\n\t\t\tdWidth-=tItem.width;\n\t\t}\n\t\tif (items.length > 1)\n\t\t\tdWidth=dWidth / (items.length-1);\n\t\tvar tX=NaN;\n\t\ttX=sX;\n\t\tlen=items.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttItem=items[i];\n\t\t\ttItem.x=tX;\n\t\t\ttX+=dWidth+tItem.width;\n\t\t}\n\t}\n\n\tLayoutFuns.getSameDisLayout=function(items,rateSame){\n\t\t(rateSame===void 0)&& (rateSame=false);\n\t\tvar data;\n\t\tdata={};\n\t\tif (rateSame){\n\t\t\tvar i=0,len=0;\n\t\t\tlen=items.length;\n\t\t\tvar tItem;\n\t\t\tvar totalWidth=NaN;\n\t\t\ttotalWidth=0;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\ttItem=items[i];\n\t\t\t\ttotalWidth+=tItem.width;\n\t\t\t}\n\t\t\ttotalWidth=tItem.x+tItem.width;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\ttItem=items[i];\n\t\t\t\tLayoutFuns.setItemRate(tItem,tItem.width / totalWidth);\n\t\t\t}\n\t\t}\n\t\treturn LayoutFuns.getLayouter(items,data,laya.debug.tools.layout.LayoutFuns.sameDis);\n\t}\n\n\tLayoutFuns.fullFill=function(totalWidth,items,data,sX){\n\t\t(sX===void 0)&& (sX=0);\n\t\tvar dL=0,dR=0;\n\t\tif (data){\n\t\t\tif (data.dL)\n\t\t\t\tdL=data.dL;\n\t\t\tif (data.dR)\n\t\t\t\tdR=data.dR;\n\t\t};\n\t\tvar item;\n\t\tvar i=0,len=0;\n\t\tlen=items.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\titem=items[i];\n\t\t\titem.x=sX+dL;\n\t\t\titem.width=totalWidth-dL-dR;\n\t\t}\n\t}\n\n\tLayoutFuns.getFullFillLayout=function(items,dL,dR){\n\t\t(dL===void 0)&& (dL=0);\n\t\t(dR===void 0)&& (dR=0);\n\t\tvar data;\n\t\tdata={};\n\t\tdata.dL=dL;\n\t\tdata.dR=dR;\n\t\treturn LayoutFuns.getLayouter(items,data,laya.debug.tools.layout.LayoutFuns.fullFill);\n\t}\n\n\tLayoutFuns.fixPos=function(totalWidth,items,data,sX){\n\t\t(sX===void 0)&& (sX=0);\n\t\tvar dLen=0;\n\t\tvar poss=[];\n\t\tvar isRate=false;\n\t\tif (data){\n\t\t\tif (data.dLen)\n\t\t\t\tdLen=data.dLen;\n\t\t\tif (data.poss)\n\t\t\t\tposs=data.poss;\n\t\t\tif (data.isRate)\n\t\t\t\tisRate=data.isRate;\n\t\t};\n\t\tvar item;\n\t\tvar i=0,len=0;\n\t\tlen=poss.length;\n\t\tvar tX=NaN;\n\t\ttX=sX;\n\t\tvar tValue=NaN;\n\t\tvar preItem;\n\t\tpreItem=null;\n\t\tfor (i=0;i < len;i++){\n\t\t\titem=items[i];\n\t\t\ttValue=sX+poss[i];\n\t\t\tif (isRate){\n\t\t\t\ttValue=sX+poss[i] *totalWidth;\n\t\t\t}\n\t\t\titem.x=tValue;\n\t\t\tif (preItem){\n\t\t\t\tpreItem.width=item.x-dLen-preItem.x;\n\t\t\t}\n\t\t\tpreItem=item;\n\t\t};\n\t\tvar lastItem;\n\t\tlastItem=items[items.length-1];\n\t\tlastItem.width=sX+totalWidth-dLen-lastItem.x;\n\t}\n\n\tLayoutFuns.getFixPos=function(items,dLen,isRate,poss){\n\t\t(dLen===void 0)&& (dLen=0);\n\t\t(isRate===void 0)&& (isRate=false);\n\t\tvar data;\n\t\tdata={};\n\t\tvar layout;\n\t\tlayout=LayoutFuns.getLayouter(items,data,LayoutFuns.fixPos);\n\t\tvar i=0,len=0;\n\t\tvar sX=NaN;\n\t\tvar totalWidth=NaN;\n\t\tsX=layout.x;\n\t\ttotalWidth=layout.width;\n\t\tif (!poss){\n\t\t\tposs=[];\n\t\t\tlen=items.length;\n\t\t\tvar tValue=NaN;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\ttValue=items[i].x-sX;\n\t\t\t\tif (isRate){\n\t\t\t\t\ttValue=tValue / totalWidth;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t}\n\t\t\t\tposs.push(tValue);\n\t\t\t}\n\t\t}\n\t\tdata.dLen=dLen;\n\t\tdata.poss=poss;\n\t\tdata.isRate=isRate;\n\t\treturn layout;\n\t}\n\n\tLayoutFuns.clearItemsRelativeInfo=function(items){\n\t\tvar i=0,len=0;\n\t\tlen=items.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tLayoutFuns.clearItemRelativeInfo(items[i]);\n\t\t}\n\t}\n\n\tLayoutFuns.clearItemRelativeInfo=function(item){\n\t\tvar Nan=\"NaN\";\n\t\titem.getLayout().left=Nan;\n\t\titem.getLayout().right=Nan;\n\t}\n\n\tLayoutFuns.prepareForLayoutWidth=function(totalWidth,items){\n\t\tvar i=0,len=0;\n\t\tlen=items.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tLayoutFuns.prepareItemForLayoutWidth(totalWidth,items[i]);\n\t\t}\n\t}\n\n\tLayoutFuns.getSumWidth=function(items){\n\t\tvar sum=NaN;\n\t\tsum=0;\n\t\tvar i=0,len=0;\n\t\tlen=items.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tsum+=items[i].width;\n\t\t}\n\t\treturn sum;\n\t}\n\n\tLayoutFuns.prepareItemForLayoutWidth=function(totalWidth,item){\n\t\tif (LayoutFuns.getItemRate(item)> 0){\n\t\t\titem.width=totalWidth *LayoutFuns.getItemRate(item);\n\t\t}\n\t}\n\n\tLayoutFuns.setItemRate=function(item,rate){\n\t\titem[\"layoutRate\"]=rate;\n\t}\n\n\tLayoutFuns.getItemRate=function(item){\n\t\treturn item[\"layoutRate\"] ? item[\"layoutRate\"] :-1;\n\t}\n\n\tLayoutFuns.setItemFreeSize=function(item,free){\n\t\t(free===void 0)&& (free=true);\n\t\titem[\"layoutFreeSize\"]=free;\n\t}\n\n\tLayoutFuns.isItemFreeSize=function(item){\n\t\treturn item[\"layoutFreeSize\"];\n\t}\n\n\tLayoutFuns.lockedDis=function(totalWidth,items,data,sX){\n\t\t(sX===void 0)&& (sX=0);\n\t\tvar dists;\n\t\tdists=data.dists;\n\t\tvar sumDis=NaN;\n\t\tsumDis=data.sumDis;\n\t\tvar sumWidth=NaN;\n\t\tvar i=0,len=0;\n\t\tvar tItem;\n\t\tvar preItem;\n\t\tLayoutFuns.prepareForLayoutWidth(totalWidth,items);\n\t\tsumWidth=LayoutFuns.getSumWidth(items);\n\t\tvar dWidth=NaN;\n\t\tdWidth=totalWidth-sumDis-sumWidth;\n\t\tvar freeItem;\n\t\tfreeItem=LayoutFuns.getFreeItem(items);\n\t\tif(freeItem){\n\t\t\tfreeItem.width+=dWidth;\n\t\t}\n\t\tpreItem=items[0];\n\t\tpreItem.x=sX;\n\t\tlen=items.length;\n\t\tfor(i=1;i<len;i++){\n\t\t\ttItem=items[i];\n\t\t\ttItem.x=preItem.x+preItem.width+dists[i-1];\n\t\t\tpreItem=tItem;\n\t\t}\n\t}\n\n\tLayoutFuns.getFreeItem=function(items){\n\t\tvar i=0,len=0;\n\t\tlen=items.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tif(LayoutFuns.isItemFreeSize(items[i])){\n\t\t\t\treturn items[i];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tLayoutFuns.getLockedDis=function(items){\n\t\tvar data;\n\t\tdata={};\n\t\tvar dists;\n\t\tvar i=0,len=0;\n\t\tvar tItem;\n\t\tvar preItem;\n\t\tvar sumDis=NaN;\n\t\tsumDis=0;\n\t\tvar tDis=NaN;\n\t\tpreItem=items[0];\n\t\tdists=[];\n\t\tlen=items.length;\n\t\tfor(i=1;i<len;i++){\n\t\t\ttItem=items[i];\n\t\t\ttDis=tItem.x-preItem.x-preItem.width;\n\t\t\tdists.push(tDis);\n\t\t\tsumDis+=tDis;\n\t\t\tpreItem=tItem;\n\t\t}\n\t\tdata.dists=dists;\n\t\tdata.sumDis=sumDis;\n\t\treturn LayoutFuns.getLayouter(items,data,laya.debug.tools.layout.LayoutFuns.lockedDis);\n\t}\n\n\tLayoutFuns.RateSign=\"layoutRate\";\n\tLayoutFuns.FreeSizeSign=\"layoutFreeSize\";\n\treturn LayoutFuns;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-11-9 下午3:26:01\n*/\n//class laya.debug.tools.LayoutTools\nvar LayoutTools=(function(){\n\tfunction LayoutTools(){}\n\t__class(LayoutTools,'laya.debug.tools.LayoutTools');\n\tLayoutTools.layoutToXCount=function(items,xCount,dx,dY,sx,sy){\n\t\t(xCount===void 0)&& (xCount=1);\n\t\t(dx===void 0)&& (dx=0);\n\t\t(dY===void 0)&& (dY=0);\n\t\t(sx===void 0)&& (sx=0);\n\t\t(sy===void 0)&& (sy=0);\n\t\tvar tX=NaN,tY=NaN;\n\t\tvar tItem;\n\t\tvar i=0,len=0;\n\t\tvar tCount=0;\n\t\tvar maxHeight=0;\n\t\ttCount=0;\n\t\tmaxHeight=0;\n\t\ttX=sx;\n\t\ttY=sy;\n\t\tlen=items.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttItem=items[i];\n\t\t\ttItem.x=tX;\n\t\t\ttItem.y=tY;\n\t\t\tif (tItem.height > maxHeight){\n\t\t\t\tmaxHeight=tItem.height;\n\t\t\t}\n\t\t\ttCount++;\n\t\t\tif (tCount >=xCount){\n\t\t\t\ttCount=tCount % xCount;\n\t\t\t\ttItem.y+=maxHeight+dY;\n\t\t\t\tmaxHeight=0;\n\t\t\t\t}else{\n\t\t\t\ttX+=tItem.width+dx;\n\t\t\t}\n\t\t}\n\t}\n\n\tLayoutTools.layoutToWidth=function(items,width,dX,dY,sx,sy){\n\t\tvar tX=NaN,tY=NaN;\n\t\tvar tItem;\n\t\tvar i=0,len=0;\n\t\ttX=sx;\n\t\ttY=sy;\n\t\tlen=items.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\ttItem=items[i];\n\t\t\tif(tX+tItem.width+dX>width){\n\t\t\t\ttX=sx;\n\t\t\t\ttY+=dY+tItem.height;\n\t\t\t\t}else{\n\t\t\t}\n\t\t\ttItem.x=tX;\n\t\t\ttItem.y=tY;\n\t\t\ttX+=dX+tItem.width;\n\t\t}\n\t}\n\n\treturn LayoutTools;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.MathTools\nvar MathTools=(function(){\n\tfunction MathTools(){}\n\t__class(MathTools,'laya.debug.tools.MathTools');\n\tMathTools.sortBigFirst=function(a,b){\n\t\tif (a==b)\n\t\t\treturn 0;\n\t\treturn b > a ? 1 :-1;\n\t}\n\n\tMathTools.sortSmallFirst=function(a,b){\n\t\tif (a==b)\n\t\t\treturn 0;\n\t\treturn b > a ?-1 :1;\n\t}\n\n\tMathTools.sortNumBigFirst=function(a,b){\n\t\treturn parseFloat(b)-parseFloat(a);\n\t}\n\n\tMathTools.sortNumSmallFirst=function(a,b){\n\t\treturn parseFloat(a)-parseFloat(b);\n\t}\n\n\tMathTools.sortByKey=function(key,bigFirst,forceNum){\n\t\t(bigFirst===void 0)&& (bigFirst=false);\n\t\t(forceNum===void 0)&& (forceNum=true);\n\t\tvar _sortFun;\n\t\tif (bigFirst){\n\t\t\t_sortFun=forceNum ? MathTools.sortNumBigFirst :MathTools.sortBigFirst;\n\t\t\t}else {\n\t\t\t_sortFun=forceNum ? MathTools.sortNumSmallFirst :MathTools.sortSmallFirst;\n\t\t}\n\t\treturn function (a,b){\n\t\t\treturn _sortFun(a[key],b[key]);\n\t\t};\n\t}\n\n\treturn MathTools;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.MouseEventAnalyser\nvar MouseEventAnalyser=(function(){\n\tfunction MouseEventAnalyser(){}\n\t__class(MouseEventAnalyser,'laya.debug.tools.MouseEventAnalyser');\n\tMouseEventAnalyser.analyseNode=function(node){\n\t\tDebugTool.showDisBound(node,true);\n\t\tvar _node;\n\t\t_node=node;\n\t\tObjectTools.clearObj(MouseEventAnalyser.infoO);\n\t\tObjectTools.clearObj(MouseEventAnalyser.nodeO);\n\t\tObjectTools.clearObj(MouseEventAnalyser.hitO);\n\t\tvar nodeList;\n\t\tnodeList=[];\n\t\twhile (node){\n\t\t\tIDTools.idObj(node);\n\t\t\tMouseEventAnalyser.nodeO[IDTools.getObjID(node)]=node;\n\t\t\tnodeList.push(node);\n\t\t\tnode=node.parent;\n\t\t}\n\t\tMouseEventAnalyser.check(Laya.stage,Laya.stage.mouseX,Laya.stage.mouseY,null);\n\t\tvar canStr;\n\t\tif (MouseEventAnalyser.hitO[IDTools.getObjID(_node)]){\n\t\t\tconsole.log(\"can hit\");\n\t\t\tcanStr=\"can hit\";\n\t\t}\n\t\telse{\n\t\t\tconsole.log(\"can't hit\");\n\t\t\tcanStr=\"can't hit\";\n\t\t};\n\t\tvar i=0,len=0;\n\t\tnodeList=nodeList.reverse();\n\t\tlen=nodeList.length;\n\t\tvar rstTxts;\n\t\trstTxts=[\"[分析对象]:\"+ClassTool.getNodeClassAndName(_node)+\":\"+canStr];\n\t\tfor (i=0;i < len;i++){\n\t\t\tnode=nodeList[i];\n\t\t\tif (MouseEventAnalyser.hitO[IDTools.getObjID(node)]){\n\t\t\t\tconsole.log(\"can hit:\",ClassTool.getNodeClassAndName(node));\n\t\t\t\tconsole.log(\"原因:\",MouseEventAnalyser.infoO[IDTools.getObjID(node)]);\n\t\t\t\trstTxts.push(\"can hit:\"+\" \"+ClassTool.getNodeClassAndName(node));\n\t\t\t\trstTxts.push(\"原因:\"+\" \"+MouseEventAnalyser.infoO[IDTools.getObjID(node)]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconsole.log(\"can't hit:\"+ClassTool.getNodeClassAndName(node));\n\t\t\t\tconsole.log(\"原因:\",MouseEventAnalyser.infoO[IDTools.getObjID(node)] ? MouseEventAnalyser.infoO[IDTools.getObjID(node)] :\"鼠标事件在父级已停止派发\");\n\t\t\t\trstTxts.push(\"can't hit:\"+\" \"+ClassTool.getNodeClassAndName(node));\n\t\t\t\trstTxts.push(\"原因:\"+\" \"+(MouseEventAnalyser.infoO[IDTools.getObjID(node)] ? MouseEventAnalyser.infoO[IDTools.getObjID(node)] :\"鼠标事件在父级已停止派发\"));\n\t\t\t}\n\t\t};\n\t\tvar rstStr;\n\t\trstStr=rstTxts.join(\"\\n\");\n\t\tToolPanel.I.showTxtInfo(rstStr);\n\t}\n\n\tMouseEventAnalyser.check=function(sp,mouseX,mouseY,callBack){\n\t\tIDTools.idObj(sp);\n\t\tvar isInAnlyseChain=false;\n\t\tisInAnlyseChain=MouseEventAnalyser.nodeO[IDTools.getObjID(sp)];\n\t\tMouseEventAnalyser._point.setTo(mouseX,mouseY);\n\t\tsp.fromParentPoint(MouseEventAnalyser._point);\n\t\tmouseX=MouseEventAnalyser._point.x;\n\t\tmouseY=MouseEventAnalyser._point.y;\n\t\tvar scrollRect=sp.scrollRect;\n\t\tif (scrollRect){\n\t\t\tMouseEventAnalyser._rect.setTo(scrollRect.x,scrollRect.y,scrollRect.width,scrollRect.height);\n\t\t\tvar isHit=MouseEventAnalyser._rect.contains(mouseX,mouseY);\n\t\t\tif (!isHit){\n\t\t\t\tif (isInAnlyseChain){\n\t\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(sp)]=\"scrollRect没有包含鼠标\"+MouseEventAnalyser._rect.toString()+\":\"+mouseX+\",\"+mouseY;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t\tvar i=0,len=0;\n\t\tvar cList;\n\t\tcList=sp._childs;\n\t\tlen=cList.length;\n\t\tvar child;\n\t\tvar childInChain;\n\t\tchildInChain=null;\n\t\tfor (i=0;i < len;i++){\n\t\t\tchild=cList[i];\n\t\t\tIDTools.idObj(child);\n\t\t\tif (MouseEventAnalyser.nodeO[IDTools.getObjID(child)]){\n\t\t\t\tchildInChain=child;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t};\n\t\tvar coverByOthers=false;\n\t\tcoverByOthers=childInChain ? true :false;\n\t\tvar flag=false;\n\t\tif (sp.hitTestPrior && !sp.mouseThrough && !MouseEventAnalyser.hitTest(sp,mouseX,mouseY)){\n\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(sp)]=\"hitTestPrior=true，宽高区域不包含鼠标:\"+\":\"+mouseX+\",\"+mouseY+\" size:\"+sp.width+\",\"+sp.height;\n\t\t\treturn false;\n\t\t}\n\t\tfor (i=sp._childs.length-1;i >-1;i--){\n\t\t\tchild=sp._childs[i];\n\t\t\tif (child==childInChain){\n\t\t\t\tif (!childInChain.mouseEnabled){\n\t\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(childInChain)]=\"mouseEnabled=false\";\n\t\t\t\t}\n\t\t\t\tif (!childInChain.visible){\n\t\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(childInChain)]=\"visible=false\";\n\t\t\t\t}\n\t\t\t\tcoverByOthers=false;\n\t\t\t}\n\t\t\tif (child.mouseEnabled && child.visible){\n\t\t\t\tflag=MouseEventAnalyser.check(child,mouseX ,mouseY,callBack);\n\t\t\t\tif (flag){\n\t\t\t\t\tMouseEventAnalyser.hitO[IDTools.getObjID(sp)]=true;\n\t\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(sp)]=\"子对象被击中\";\n\t\t\t\t\tif (child==childInChain){\n\t\t\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(sp)]=\"子对象被击中,\"+\"击中对象在分析链中\";\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(sp)]=\"子对象被击中,\"+\"击中对象不在分析链中\";\n\t\t\t\t\t\tif (coverByOthers){\n\t\t\t\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(childInChain)]=\"被兄弟节点挡住,兄弟节点信息:\"+ClassTool.getNodeClassAndName(child)+\",\"+child.getBounds().toString();\n\t\t\t\t\t\t\tDebugTool.showDisBound(child,false,\"#ffff00\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (child==childInChain){\n\t\t\t\t\t\tcoverByOthers=false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar mHitRect=new Rectangle();\n\t\tvar graphicHit=false;\n\t\tgraphicHit=sp.getGraphicBounds().contains(mouseX,mouseY);\n\t\tif (sp.width > 0 && sp.height > 0){\n\t\t\tvar hitRect=MouseEventAnalyser._rect;\n\t\t\tif (!sp.mouseThrough){\n\t\t\t\tif (sp.hitArea)\n\t\t\t\t\thitRect=sp.hitArea;\n\t\t\t\telse\n\t\t\t\thitRect.setTo(0,0,sp.width,sp.height);\n\t\t\t\tmHitRect.copyFrom(hitRect);\n\t\t\t\tisHit=hitRect.contains(mouseX,mouseY);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tisHit=graphicHit;\n\t\t\t\tmHitRect.copyFrom(sp.getGraphicBounds());\n\t\t\t}\n\t\t\tif (isHit){\n\t\t\t\tMouseEventAnalyser.hitO[IDTools.getObjID(sp)]=true;\n\t\t\t}\n\t\t\t}else{\n\t\t}\n\t\tif (!isHit){\n\t\t\tif (graphicHit){\n\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(sp)]=\"子对象未包含鼠标，实际绘图区域包含鼠标，设置的宽高区域不包含鼠标:\"+\":\"+mouseX+\",\"+mouseY+\" hitRec:\"+mHitRect.toString()+\" graphicBounds:\"+sp.getGraphicBounds().toString()+\"，设置mouseThrough=true或将宽高设置到实际绘图区域可解决问题\";\n\t\t\t\t}else{\n\t\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(sp)]=\"子对象未包含鼠标，实际绘图区域不包含鼠标，设置的宽高区域不包含鼠标:\"+\":\"+mouseX+\",\"+mouseY+\" hitRec:\"+mHitRect.toString()+\" graphicBounds:\"+sp.getGraphicBounds().toString();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tMouseEventAnalyser.infoO[IDTools.getObjID(sp)]=\"自身区域被击中\";\n\t\t}\n\t\treturn isHit;\n\t}\n\n\tMouseEventAnalyser.hitTest=function(sp,mouseX,mouseY){\n\t\tvar isHit=false;\n\t\tif ((sp.hitArea instanceof laya.utils.HitArea )){\n\t\t\treturn sp.hitArea.isHit(mouseX,mouseY);\n\t\t}\n\t\tif (sp.width > 0 && sp.height > 0 || sp.mouseThrough || sp.hitArea){\n\t\t\tvar hitRect=MouseEventAnalyser._rect;\n\t\t\tif (!sp.mouseThrough){\n\t\t\t\tif (sp.hitArea)hitRect=sp.hitArea;\n\t\t\t\telse hitRect.setTo(0,0,sp.width,sp.height);\n\t\t\t\tisHit=hitRect.contains(mouseX,mouseY);\n\t\t\t\t}else {\n\t\t\t\tisHit=sp.getGraphicBounds().contains(mouseX,mouseY);\n\t\t\t}\n\t\t}\n\t\treturn isHit;\n\t}\n\n\tMouseEventAnalyser.infoO={};\n\tMouseEventAnalyser.nodeO={};\n\tMouseEventAnalyser.hitO={};\n\t__static(MouseEventAnalyser,\n\t['_matrix',function(){return this._matrix=new Matrix();},'_point',function(){return this._point=new Point();},'_rect',function(){return this._rect=new Rectangle();}\n\t]);\n\treturn MouseEventAnalyser;\n})()\n\n\n/**\n*本类提供obj相关的一些操作\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-21 下午2:03:36\n*/\n//class laya.debug.tools.ObjectTools\nvar ObjectTools=(function(){\n\tfunction ObjectTools(){}\n\t__class(ObjectTools,'laya.debug.tools.ObjectTools');\n\tObjectTools.getFlatKey=function(tKey,aKey){\n\t\tif(tKey==\"\")return aKey;\n\t\treturn tKey+ObjectTools.sign+aKey;\n\t}\n\n\tObjectTools.flatObj=function(obj,rst,tKey){\n\t\t(tKey===void 0)&& (tKey=\"\");\n\t\trst=rst?rst:{};\n\t\tvar key;\n\t\tvar tValue;\n\t\tfor(key in obj){\n\t\t\tif((typeof (obj[key])=='object')){\n\t\t\t\tObjectTools.flatObj(obj[key],rst,ObjectTools.getFlatKey(tKey,key));\n\t\t\t\t}else{\n\t\t\t\ttValue=obj[key];\n\t\t\t\trst[ObjectTools.getFlatKey(tKey,key)]=obj[key];\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.recoverObj=function(obj){\n\t\tvar rst={};\n\t\tvar tKey;\n\t\tfor(tKey in obj){\n\t\t\tObjectTools.setKeyValue(rst,tKey,obj[tKey]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.differ=function(objA,objB){\n\t\tvar tKey;\n\t\tvar valueA;\n\t\tvar valueB;\n\t\tobjA=ObjectTools.flatObj(objA);\n\t\tobjB=ObjectTools.flatObj(objB);\n\t\tvar rst={};\n\t\tfor(tKey in objA){\n\t\t\tif(!objB.hasOwnProperty(tKey)){\n\t\t\t\trst[tKey]=\"被删除\";\n\t\t\t}\n\t\t}\n\t\tfor(tKey in objB){\n\t\t\tif(objB[tKey]!=objA[tKey]){\n\t\t\t\trst[tKey]={\"pre\":objA[tKey],\"now\":objB[tKey]};\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.traceDifferObj=function(obj){\n\t\tvar key;\n\t\tvar tO;\n\t\tfor(key in obj){\n\t\t\tif((typeof (obj[key])=='string')){\n\t\t\t\tconsole.log(key+\":\",obj[key]);\n\t\t\t\t}else{\n\t\t\t\ttO=obj[key];\n\t\t\t\tconsole.log(key+\":\",\"now:\",tO[\"now\"],\"pre:\",tO[\"pre\"]);\n\t\t\t}\n\t\t}\n\t}\n\n\tObjectTools.setKeyValue=function(obj,flatKey,value){\n\t\tif(flatKey.indexOf(ObjectTools.sign)>=0){\n\t\t\tvar keys=flatKey.split(ObjectTools.sign);\n\t\t\tvar tKey;\n\t\t\twhile(keys.length>1){\n\t\t\t\ttKey=keys.shift();\n\t\t\t\tif(!obj[tKey]){\n\t\t\t\t\tobj[tKey]={};\n\t\t\t\t\tconsole.log(\"addKeyObj:\",tKey);\n\t\t\t\t}\n\t\t\t\tobj=obj[tKey];\n\t\t\t\tif(!obj){\n\t\t\t\t\tconsole.log(\"wrong flatKey:\",flatKey);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tobj[keys.shift()]=value;\n\t\t\t}else{\n\t\t\tobj[flatKey]=value;\n\t\t}\n\t}\n\n\tObjectTools.clearObj=function(obj){\n\t\tvar key;\n\t\tfor (key in obj){\n\t\t\tdelete obj[key];\n\t\t}\n\t}\n\n\tObjectTools.copyObjFast=function(obj){\n\t\tvar jsStr;\n\t\tjsStr=laya.debug.tools.ObjectTools.getJsonString(obj);\n\t\treturn laya.debug.tools.ObjectTools.getObj(jsStr);\n\t}\n\n\tObjectTools.copyObj=function(obj){\n\t\tif((obj instanceof Array))return ObjectTools.copyArr(obj);\n\t\tvar rst={};\n\t\tvar key;\n\t\tfor(key in obj){\n\t\t\tif(obj[key]===null||obj[key]===undefined){\n\t\t\t\trst[key]=obj[key];\n\t\t\t}else\n\t\t\tif(((obj[key])instanceof Array)){\n\t\t\t\trst[key]=ObjectTools.copyArr(obj[key]);\n\t\t\t}\n\t\t\telse\n\t\t\tif((typeof (obj[key])=='object')){\n\t\t\t\trst[key]=ObjectTools.copyObj(obj[key]);\n\t\t\t\t}else{\n\t\t\t\trst[key]=obj[key];\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.copyArr=function(arr){\n\t\tvar rst;\n\t\trst=[];\n\t\tvar i=0,len=0;\n\t\tlen=arr.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\trst.push(ObjectTools.copyObj(arr[i]));\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.concatArr=function(src,a){\n\t\tif (!a)return src;\n\t\tif (!src)return a;\n\t\tvar i=0,len=a.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tsrc.push(a[i]);\n\t\t}\n\t\treturn src;\n\t}\n\n\tObjectTools.insertArrToArr=function(src,insertArr,pos){\n\t\t(pos===void 0)&& (pos=0);\n\t\tif (pos < 0)pos=0;\n\t\tif (pos > src.length)pos=src.length;\n\t\tvar preLen=src.length;\n\t\tvar i=0,len=0;\n\t\tsrc.length+=insertArr.length;\n\t\tvar moveLen=0;\n\t\tmoveLen=insertArr.length;\n\t\tfor (i=src.length-1;i >=pos;i--){\n\t\t\tsrc[i]=src[i-moveLen];\n\t\t}\n\t\tlen=insertArr.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tsrc[pos+i]=insertArr[i];\n\t\t}\n\t\treturn src;\n\t}\n\n\tObjectTools.clearArr=function(arr){\n\t\tif (!arr)return arr;\n\t\tarr.length=0;\n\t\treturn arr;\n\t}\n\n\tObjectTools.removeFromArr=function(arr,item){\n\t\tvar i=0,len=0;\n\t\tlen=arr.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(arr[i]==item){\n\t\t\t\tarr[i].splice(i,1);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\tObjectTools.setValueArr=function(src,v){\n\t\tsrc || (src=[]);\n\t\tsrc.length=0;\n\t\treturn ObjectTools.concatArr(src,v);\n\t}\n\n\tObjectTools.getFrom=function(rst,src,count){\n\t\tvar i=0;\n\t\tfor (i=0;i < count;i++){\n\t\t\trst.push(src[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.getFromR=function(rst,src,count){\n\t\tvar i=0;\n\t\tfor (i=0;i < count;i++){\n\t\t\trst.push(src.pop());\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.enableDisplayTree=function(dis){\n\t\twhile (dis){\n\t\t\tdis.mouseEnabled=true;\n\t\t\tdis=dis.parent;\n\t\t}\n\t}\n\n\tObjectTools.getJsonString=function(obj){\n\t\tvar rst;\n\t\t/*__JS__ */rst=JSON.stringify(obj);\n\t\treturn rst;\n\t}\n\n\tObjectTools.getObj=function(jsonStr){\n\t\tvar rst;\n\t\t/*__JS__ */rst=JSON.parse(jsonStr);\n\t\treturn rst;\n\t}\n\n\tObjectTools.getKeyArr=function(obj){\n\t\tvar rst;\n\t\tvar key;\n\t\trst=[];\n\t\tfor(key in obj){\n\t\t\trst.push(key);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.getObjValues=function(dataList,key){\n\t\tvar rst;\n\t\tvar i=0,len=0;\n\t\tlen=dataList.length;\n\t\trst=[];\n\t\tfor(i=0;i<len;i++){\n\t\t\trst.push(dataList[i][key]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.hasKeys=function(obj,keys){\n\t\tvar i=0,len=0;\n\t\tlen=keys.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(!obj.hasOwnProperty(keys[i]))return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tObjectTools.copyValueByArr=function(tar,src,keys){\n\t\tvar i=0,len=keys.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(!(src[keys[i]]===null))\n\t\t\t\ttar[keys[i]]=src[keys[i]];\n\t\t}\n\t}\n\n\tObjectTools.getNoSameArr=function(arr){\n\t\tvar i=0,len=0;\n\t\tvar rst;\n\t\trst=[];\n\t\tvar tItem;\n\t\tlen=arr.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttItem=arr[i];\n\t\t\tif (rst.indexOf(tItem)< 0){\n\t\t\t\trst.push(tItem);\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.insertValue=function(tar,src){\n\t\tvar key;\n\t\tfor (key in src){\n\t\t\ttar[key]=src[key];\n\t\t}\n\t}\n\n\tObjectTools.replaceValue=function(obj,replaceO){\n\t\tvar key;\n\t\tfor(key in obj){\n\t\t\tif(replaceO.hasOwnProperty(obj[key])){\n\t\t\t\tobj[key]=replaceO[obj[key]];\n\t\t\t}\n\t\t\tif((typeof (obj[key])=='object')){\n\t\t\t\tObjectTools.replaceValue(obj[key],replaceO);\n\t\t\t}\n\t\t}\n\t}\n\n\tObjectTools.setKeyValues=function(items,key,value){\n\t\tvar i=0,len=0;\n\t\tlen=items.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\titems[i][key]=value;\n\t\t}\n\t}\n\n\tObjectTools.findItemPos=function(items,sign,value){\n\t\tvar i=0,len=0;\n\t\tlen=items.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(items[i][sign]==value){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn-1;\n\t}\n\n\tObjectTools.setObjValue=function(obj,key,value){\n\t\tobj[key]=value;\n\t\treturn obj;\n\t}\n\n\tObjectTools.setAutoTypeValue=function(obj,key,value){\n\t\tif(obj.hasOwnProperty(key)){\n\t\t\tif(ObjectTools.isNumber(obj[key])){\n\t\t\t\tobj[key]=parseFloat(value);\n\t\t\t\t}else{\n\t\t\t\tobj[key]=value;\n\t\t\t}\n\t\t\t}else{\n\t\t\tobj[key]=value;\n\t\t}\n\t\treturn obj;\n\t}\n\n\tObjectTools.getAutoValue=function(value){\n\t\tvar tFloat=parseFloat(value);\n\t\tif(typeof(value)==\"string\"){\n\t\t\tif(tFloat+\"\"===StringTool.trimSide(value))return tFloat;\n\t\t}\n\t\treturn value;\n\t}\n\n\tObjectTools.isNumber=function(value){\n\t\treturn (parseFloat(value)==value);\n\t}\n\n\tObjectTools.isNaNS=function(value){\n\t\treturn (value.toString()==\"NaN\");\n\t}\n\n\tObjectTools.isNaN=function(value){\n\t\tif(typeof(value)==\"number\")return false;\n\t\tif(typeof(value)==\"string\"){\n\t\t\tif(parseFloat(value).toString()!=\"NaN\"){\n\t\t\t\tif(parseFloat(value)==value){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tObjectTools.getStrTypedValue=function(value){\n\t\tif(value==\"false\"){\n\t\t\treturn false;\n\t\t}else\n\t\tif(value==\"true\"){\n\t\t\treturn true;\n\t\t}else\n\t\tif(value==\"null\"){\n\t\t\treturn null;\n\t\t}else\n\t\tif(value==\"undefined\"){\n\t\t\treturn null;\n\t\t\t}else{\n\t\t\treturn ObjectTools.getAutoValue(value);\n\t\t}\n\t}\n\n\tObjectTools.createKeyValueDic=function(dataList,keySign){\n\t\tvar rst;\n\t\trst={};\n\t\tvar i=0,len=0;\n\t\tlen=dataList.length;\n\t\tvar tItem;\n\t\tvar tKey;\n\t\tfor(i=0;i<len;i++){\n\t\t\ttItem=dataList[i];\n\t\t\ttKey=tItem[keySign];\n\t\t\trst[tKey]=tItem;\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectTools.sign=\"_\";\n\treturn ObjectTools;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.ObjTimeCountTool\nvar ObjTimeCountTool=(function(){\n\tfunction ObjTimeCountTool(){\n\t\tthis.timeDic={};\n\t\tthis.resultDic={};\n\t\tthis.countDic={};\n\t\tthis.resultCountDic={};\n\t\tthis.nodeDic={};\n\t\tthis.resultNodeDic={};\n\t}\n\n\t__class(ObjTimeCountTool,'laya.debug.tools.ObjTimeCountTool');\n\tvar __proto=ObjTimeCountTool.prototype;\n\t__proto.addTime=function(sprite,time){\n\t\tIDTools.idObj(sprite);\n\t\tvar key=0;\n\t\tkey=IDTools.getObjID(sprite);\n\t\tif (!this.timeDic.hasOwnProperty(key)){\n\t\t\tthis.timeDic[key]=0;\n\t\t}\n\t\tthis.timeDic[key]=this.timeDic[key]+time;\n\t\tif (!this.countDic.hasOwnProperty(key)){\n\t\t\tthis.countDic[key]=0;\n\t\t}\n\t\tthis.countDic[key]=this.countDic[key]+1;\n\t\tthis.nodeDic[key]=sprite;\n\t}\n\n\t__proto.getTime=function(sprite){\n\t\tIDTools.idObj(sprite);\n\t\tvar key=0;\n\t\tkey=IDTools.getObjID(sprite);\n\t\tif (!this.resultDic[key])return 0;\n\t\treturn this.resultDic[key];\n\t}\n\n\t__proto.getCount=function(sprite){\n\t\tIDTools.idObj(sprite);\n\t\tvar key=0;\n\t\tkey=IDTools.getObjID(sprite);\n\t\treturn this.resultCountDic[key];\n\t}\n\n\t__proto.reset=function(){\n\t\tvar key;\n\t\tfor (key in this.timeDic){\n\t\t\tthis.timeDic[key]=0;\n\t\t\tthis.countDic[key]=0;\n\t\t}\n\t\tObjectTools.clearObj(this.nodeDic);\n\t}\n\n\t__proto.updates=function(){\n\t\tObjectTools.clearObj(this.resultDic);\n\t\tObjectTools.insertValue(this.resultDic,this.timeDic);\n\t\tObjectTools.clearObj(this.resultCountDic);\n\t\tObjectTools.insertValue(this.resultCountDic,this.countDic);\n\t\tObjectTools.insertValue(this.resultNodeDic,this.nodeDic);\n\t\tthis.reset();\n\t}\n\n\treturn ObjTimeCountTool;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-12-23 下午12:00:48\n*/\n//class laya.debug.tools.RecInfo\nvar RecInfo=(function(){\n\tfunction RecInfo(){\n\t\tthis.oX=0;\n\t\tthis.oY=0;\n\t\tthis.hX=1;\n\t\tthis.hY=0;\n\t\tthis.vX=0;\n\t\tthis.vY=1;\n\t}\n\n\t__class(RecInfo,'laya.debug.tools.RecInfo');\n\tvar __proto=RecInfo.prototype;\n\t__proto.initByPoints=function(oPoint,ePoint,vPoint){\n\t\tthis.oX=oPoint.x;\n\t\tthis.oY=oPoint.y;\n\t\tthis.hX=ePoint.x;\n\t\tthis.hY=ePoint.y;\n\t\tthis.vX=vPoint.x;\n\t\tthis.vY=vPoint.y;\n\t}\n\n\t__getset(0,__proto,'rotation',function(){\n\t\treturn this.rotationRad/Math.PI*180;\n\t});\n\n\t__getset(0,__proto,'width',function(){\n\t\treturn Math.sqrt((this.hX-this.oX)*(this.hX-this.oX)+(this.hY-this.oY)*(this.hY-this.oY));\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\treturn this.oX;\n\t});\n\n\t__getset(0,__proto,'rotationRadV',function(){\n\t\tvar dx=this.vX-this.oX;\n\t\tvar dy=this.vY-this.oY;\n\t\treturn Math.atan2(dy,dx);\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\treturn this.oY;\n\t});\n\n\t__getset(0,__proto,'rotationRad',function(){\n\t\tvar dx=this.hX-this.oX;\n\t\tvar dy=this.hY-this.oY;\n\t\treturn Math.atan2(dy,dx);\n\t});\n\n\t__getset(0,__proto,'height',function(){\n\t\treturn Math.sqrt((this.vX-this.oX)*(this.vX-this.oX)+(this.vY-this.oY)*(this.vY-this.oY));\n\t});\n\n\t__getset(0,__proto,'rotationV',function(){\n\t\treturn this.rotationRadV/Math.PI*180;\n\t});\n\n\tRecInfo.createByPoints=function(oPoint,ePoint,vPoint){\n\t\tvar rst;\n\t\trst=new RecInfo();\n\t\trst.initByPoints(oPoint,ePoint,vPoint);\n\t\treturn rst;\n\t}\n\n\tRecInfo.getGlobalPoints=function(sprite,x,y){\n\t\treturn sprite.localToGlobal(new Point(x,y));\n\t}\n\n\tRecInfo.getGlobalRecInfo=function(sprite,x0,y0,x1,y1,x2,y2){\n\t\t(x0===void 0)&& (x0=0);\n\t\t(y0===void 0)&& (y0=0);\n\t\t(x1===void 0)&& (x1=1);\n\t\t(y1===void 0)&& (y1=0);\n\t\t(x2===void 0)&& (x2=0);\n\t\t(y2===void 0)&& (y2=1);\n\t\treturn RecInfo.createByPoints(RecInfo.getGlobalPoints(sprite,x0,y0),RecInfo.getGlobalPoints(sprite,x1,y1),RecInfo.getGlobalPoints(sprite,x2,y2));\n\t}\n\n\treturn RecInfo;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.RenderAnalyser\nvar RenderAnalyser=(function(){\n\tfunction RenderAnalyser(){\n\t\tthis.timeDic={};\n\t\tthis.resultDic={};\n\t\tthis.countDic={};\n\t\tthis.resultCountDic={};\n\t\tthis.nodeDic={};\n\t\tthis.isWorking=false;\n\t\tthis.working=true;\n\t}\n\n\t__class(RenderAnalyser,'laya.debug.tools.RenderAnalyser');\n\tvar __proto=RenderAnalyser.prototype;\n\t__proto.render=function(sprite,time){\n\t\tthis.addTime(sprite,time);\n\t}\n\n\t__proto.addTime=function(sprite,time){\n\t\tIDTools.idObj(sprite);\n\t\tvar key=0;\n\t\tkey=IDTools.getObjID(sprite);\n\t\tif (!this.timeDic.hasOwnProperty(key)){\n\t\t\tthis.timeDic[key]=0;\n\t\t}\n\t\tthis.timeDic[key]=this.timeDic[key]+time;\n\t\tif (!this.countDic.hasOwnProperty(key)){\n\t\t\tthis.countDic[key]=0;\n\t\t}\n\t\tthis.countDic[key]=this.countDic[key]+1;\n\t\tthis.nodeDic[key]=sprite;\n\t}\n\n\t__proto.getTime=function(sprite){\n\t\tIDTools.idObj(sprite);\n\t\tvar key=0;\n\t\tkey=IDTools.getObjID(sprite);\n\t\tif (!this.resultDic[key])return 0;\n\t\treturn this.resultDic[key];\n\t}\n\n\t__proto.getCount=function(sprite){\n\t\tIDTools.idObj(sprite);\n\t\tvar key=0;\n\t\tkey=IDTools.getObjID(sprite);\n\t\treturn this.resultCountDic[key];\n\t}\n\n\t__proto.reset=function(){\n\t\tvar key;\n\t\tfor (key in this.timeDic){\n\t\t\tthis.timeDic[key]=0;\n\t\t\tthis.countDic[key]=0;\n\t\t}\n\t\tObjectTools.clearObj(this.nodeDic);\n\t}\n\n\t__proto.updates=function(){\n\t\tObjectTools.clearObj(this.resultDic);\n\t\tObjectTools.insertValue(this.resultDic,this.timeDic);\n\t\tObjectTools.clearObj(this.resultCountDic);\n\t\tObjectTools.insertValue(this.resultCountDic,this.countDic);\n\t\tthis.reset();\n\t}\n\n\t__getset(0,__proto,'working',null,function(v){\n\t\tthis.isWorking=v;\n\t\tif (v){\n\t\t\tLaya.timer.loop(NodeConsts.RenderCostMaxTime,this,this.updates);\n\t\t\t}else{\n\t\t\tLaya.timer.clear(this,this.updates);\n\t\t}\n\t});\n\n\t__static(RenderAnalyser,\n\t['I',function(){return this.I=new RenderAnalyser();}\n\t]);\n\treturn RenderAnalyser;\n})()\n\n\n/**\n*本类用于调整对象的宽高以及坐标\n*@author ww\n*/\n//class laya.debug.tools.resizer.DisResizer\nvar DisResizer=(function(){\n\tfunction DisResizer(){}\n\t__class(DisResizer,'laya.debug.tools.resizer.DisResizer');\n\tDisResizer.init=function(){\n\t\tif (DisResizer._up)return;\n\t\tDisResizer._up=new AutoFillRec(\"T\");\n\t\tDisResizer._up.height=2;\n\t\tDisResizer._up.type=0;\n\t\tDisResizer._down=new AutoFillRec(\"T\");\n\t\tDisResizer._down.height=2;\n\t\tDisResizer._down.type=0;\n\t\tDisResizer._left=new AutoFillRec(\"R\");\n\t\tDisResizer._left.width=2;\n\t\tDisResizer._left.type=1;\n\t\tDisResizer._right=new AutoFillRec(\"R\");\n\t\tDisResizer._right.width=2;\n\t\tDisResizer._right.type=1;\n\t\tDisResizer._barList=[DisResizer._up,DisResizer._down,DisResizer._left,DisResizer._right];\n\t\tDisResizer.addEvent();\n\t}\n\n\tDisResizer.stageDown=function(e){\n\t\tvar target;\n\t\ttarget=e.target;\n\t\tif (DisResizer._tar && DisControlTool.isInTree(DisResizer._tar,target)){\n\t\t\treturn;\n\t\t}\n\t\tDisResizer.clear();\n\t}\n\n\tDisResizer.clear=function(){\n\t\tDisResizer._tar=null;\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",null,DisResizer.stageDown);\n\t\tDisControlTool.removeItems(DisResizer._barList);\n\t\tDisResizer.clearDragEvents();\n\t}\n\n\tDisResizer.addEvent=function(){\n\t\tvar i=0,len=0;\n\t\tvar tBar;\n\t\tlen=DisResizer._barList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttBar=DisResizer._barList[i];\n\t\t\ttBar.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",null,DisResizer.barDown);\n\t\t}\n\t}\n\n\tDisResizer.barDown=function(e){\n\t\tDisResizer.clearDragEvents();\n\t\tDisResizer.tBar=e.target;\n\t\tif (!DisResizer.tBar)return;\n\t\tvar area;\n\t\tarea=new Rectangle();\n\t\tif (DisResizer.tBar.type==0){\n\t\t\tarea.x=DisResizer.tBar.x;\n\t\t\tarea.width=0;\n\t\t\tarea.y=DisResizer.tBar.y-200;\n\t\t\tarea.height=400;\n\t\t\t}else{\n\t\t\tarea.x=DisResizer.tBar.x-200;\n\t\t\tarea.width=400;\n\t\t\tarea.y=0;\n\t\t\tarea.height=0;\n\t\t};\n\t\tvar option;\n\t\toption={};\n\t\toption.area=area;\n\t\tDisResizer.tBar.record();\n\t\tDisResizer.tBar.startDrag(area);\n\t\tDisResizer.tBar.on(/*laya.events.Event.DRAG_MOVE*/\"dragmove\",null,DisResizer.draging);\n\t\tDisResizer.tBar.on(/*laya.events.Event.DRAG_END*/\"dragend\",null,DisResizer.dragEnd);\n\t}\n\n\tDisResizer.draging=function(e){\n\t\tconsole.log(\"draging\");\n\t\tif (!DisResizer.tBar)return;\n\t\tif (!DisResizer._tar)return;\n\t\tswitch(DisResizer.tBar){\n\t\t\tcase DisResizer._left:\n\t\t\t\tDisResizer._tar.x+=DisResizer.tBar.getDx();\n\t\t\t\tDisResizer._tar.width-=DisResizer.tBar.getDx();\n\t\t\t\tDisResizer._up.width-=DisResizer.tBar.getDx();\n\t\t\t\tDisResizer._down.width-=DisResizer.tBar.getDx();\n\t\t\t\tDisResizer._right.x-=DisResizer.tBar.getDx();\n\t\t\t\tDisResizer.tBar.x-=DisResizer.tBar.getDx();\n\t\t\t\tbreak ;\n\t\t\tcase DisResizer._right:\n\t\t\t\tDisResizer._tar.width+=DisResizer.tBar.getDx();\n\t\t\t\tDisResizer._up.width+=DisResizer.tBar.getDx();\n\t\t\t\tDisResizer._down.width+=DisResizer.tBar.getDx();\n\t\t\t\tbreak ;\n\t\t\tcase DisResizer._up:\n\t\t\t\tDisResizer._tar.y+=DisResizer.tBar.getDy();\n\t\t\t\tDisResizer._tar.height-=DisResizer.tBar.getDy();\n\t\t\t\tDisResizer._right.height-=DisResizer.tBar.getDy();\n\t\t\t\tDisResizer._left.height-=DisResizer.tBar.getDy();\n\t\t\t\tDisResizer._down.y-=DisResizer.tBar.getDy();\n\t\t\t\tDisResizer.tBar.y-=DisResizer.tBar.getDy();\n\t\t\t\tbreak ;\n\t\t\tcase DisResizer._down:\n\t\t\t\tDisResizer._tar.height+=DisResizer.tBar.getDy();\n\t\t\t\tDisResizer._right.height+=DisResizer.tBar.getDy();\n\t\t\t\tDisResizer._left.height+=DisResizer.tBar.getDy();\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tDisResizer.tBar.record();\n\t}\n\n\tDisResizer.dragEnd=function(e){\n\t\tconsole.log(\"dragEnd\");\n\t\tDisResizer.clearDragEvents();\n\t\tDisResizer.updates();\n\t}\n\n\tDisResizer.clearDragEvents=function(){\n\t\tif (!DisResizer.tBar)return;\n\t\tDisResizer.tBar.off(/*laya.events.Event.DRAG_MOVE*/\"dragmove\",null,DisResizer.draging);\n\t\tDisResizer.tBar.off(/*laya.events.Event.DRAG_END*/\"dragend\",null,DisResizer.dragEnd);\n\t}\n\n\tDisResizer.setUp=function(dis,force){\n\t\t(force===void 0)&& (force=false);\n\t\tif (force && dis==DisResizer._tar){\n\t\t\treturn;\n\t\t};\n\t\tDisControlTool.removeItems(DisResizer._barList);\n\t\tif (DisResizer._tar==dis){\n\t\t\tDisResizer._tar=null;\n\t\t\tDisResizer.clearDragEvents();\n\t\t\tif(!force)\n\t\t\t\treturn;\n\t\t}\n\t\tDisResizer._tar=dis;\n\t\tDisResizer.updates();\n\t\tDisControlTool.addItems(DisResizer._barList,dis);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",null,DisResizer.stageDown);\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_UP*/\"mouseup\",null,DisResizer.stageDown);\n\t}\n\n\tDisResizer.updates=function(){\n\t\tvar dis;\n\t\tdis=DisResizer._tar;\n\t\tif(!dis)return;\n\t\tvar bounds;\n\t\tbounds=new Rectangle(0,0,dis.width,dis.height);\n\t\tDisResizer._up.x=bounds.x;\n\t\tDisResizer._up.y=bounds.y;\n\t\tDisResizer._up.width=bounds.width;\n\t\tDisResizer._down.x=bounds.x;\n\t\tDisResizer._down.y=bounds.y+bounds.height-2;\n\t\tDisResizer._down.width=bounds.width;\n\t\tDisResizer._left.x=bounds.x;\n\t\tDisResizer._left.y=bounds.y;\n\t\tDisResizer._left.height=bounds.height;\n\t\tDisResizer._right.x=bounds.x+bounds.width-2;\n\t\tDisResizer._right.y=bounds.y;\n\t\tDisResizer._right.height=bounds.height;\n\t}\n\n\tDisResizer.Side=2;\n\tDisResizer.Vertical=1;\n\tDisResizer.Horizon=0;\n\tDisResizer._up=null;\n\tDisResizer._down=null;\n\tDisResizer._left=null;\n\tDisResizer._right=null;\n\tDisResizer._barList=null;\n\tDisResizer._tar=null;\n\tDisResizer.barWidth=2;\n\tDisResizer.useGetBounds=false;\n\tDisResizer.tBar=null;\n\treturn DisResizer;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.resizer.SimpleResizer\nvar SimpleResizer=(function(){\n\tfunction SimpleResizer(){}\n\t__class(SimpleResizer,'laya.debug.tools.resizer.SimpleResizer');\n\tSimpleResizer.setResizeAble=function(clickItem,tar,minWidth,minHeight){\n\t\t(minWidth===void 0)&& (minWidth=150);\n\t\t(minHeight===void 0)&& (minHeight=150);\n\t\tclickItem.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",null,SimpleResizer.onMouseDown,[tar,minWidth,minHeight]);\n\t}\n\n\tSimpleResizer.onMouseDown=function(tar,minWidth,minHeight,e){\n\t\tSimpleResizer.clearEvents();\n\t\tif (!tar)return;\n\t\tSimpleResizer.preMousePoint.setTo(Laya.stage.mouseX,Laya.stage.mouseY);\n\t\tSimpleResizer.preTarSize.setTo(tar.width,tar.height);\n\t\tSimpleResizer.preScale.setTo(1,1);\n\t\tvar rTar;\n\t\trTar=tar;\n\t\twhile (rTar&&rTar!=Laya.stage){\n\t\t\tSimpleResizer.preScale.x *=rTar.scaleX;\n\t\t\tSimpleResizer.preScale.y *=rTar.scaleY;\n\t\t\trTar=rTar.parent;\n\t\t}\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_UP*/\"mouseup\",null,SimpleResizer.onMouseMoveEnd);\n\t\tLaya.timer.loop(100,null,SimpleResizer.onMouseMoving,[tar,minWidth,minHeight]);\n\t}\n\n\tSimpleResizer.onMouseMoving=function(tar,minWidth,minHeight,e){\n\t\tvar tWidth=(Laya.stage.mouseX-SimpleResizer.preMousePoint.x)/ SimpleResizer.preScale.x+SimpleResizer.preTarSize.x;\n\t\tvar tHeight=(Laya.stage.mouseY-SimpleResizer.preMousePoint.y)/SimpleResizer.preScale.y+SimpleResizer.preTarSize.y;\n\t\ttar.width=tWidth > minWidth?tWidth:minWidth;\n\t\ttar.height=tHeight>minHeight?tHeight:minHeight;\n\t}\n\n\tSimpleResizer.onMouseMoveEnd=function(e){\n\t\tSimpleResizer.clearEvents();\n\t}\n\n\tSimpleResizer.clearEvents=function(){\n\t\tLaya.timer.clear(null,SimpleResizer.onMouseMoving);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",null,SimpleResizer.onMouseMoveEnd);\n\t}\n\n\t__static(SimpleResizer,\n\t['preMousePoint',function(){return this.preMousePoint=new Point();},'preTarSize',function(){return this.preTarSize=new Point();},'preScale',function(){return this.preScale=new Point();}\n\t]);\n\treturn SimpleResizer;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.ResTools\nvar ResTools=(function(){\n\tfunction ResTools(){}\n\t__class(ResTools,'laya.debug.tools.ResTools');\n\tResTools.getCachedResList=function(){\n\t\tif (Render.isWebGL){\n\t\t\treturn ResTools.getWebGlResList();\n\t\t\t}else{\n\t\t\treturn ResTools.getCanvasResList();\n\t\t}\n\t}\n\n\tResTools.getWebGlResList=function(){\n\t\tvar rst;\n\t\trst=[];\n\t\tvar tResource;\n\t\tvar _resources;\n\t\t_resources=ResourceManager.currentResourceManager[\"_resources\"];\n\t\tfor(var i=0;i <_resources.length;i++){\n\t\t\ttResource=_resources[i];\n\t\t\tif(ClassTool.getClassName(tResource)==\"WebGLImage\"){\n\t\t\t\tvar url=tResource[\"src\"];\n\t\t\t\tif(url&&url.indexOf(\"data:image/png;base64\")<0)\n\t\t\t\t\trst.push(url);\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tResTools.getCanvasResList=function(){\n\t\tvar picDic;\n\t\tpicDic={};\n\t\tvar dataO;\n\t\tdataO=Loader.loadedMap;\n\t\tResTools.collectPics(dataO,picDic);\n\t\treturn ResTools.getArrFromDic(picDic);\n\t}\n\n\tResTools.getArrFromDic=function(dic){\n\t\tvar key;\n\t\tvar rst;\n\t\trst=[];\n\t\tfor (key in dic){\n\t\t\trst.push(key);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tResTools.collectPics=function(dataO,picDic){\n\t\tif (!dataO)return;\n\t\tvar key;\n\t\tvar tTexture;\n\t\tfor (key in dataO){\n\t\t\ttTexture=dataO[key];\n\t\t\tif (tTexture){\n\t\t\t\tif (tTexture.bitmap&&tTexture.bitmap.src){\n\t\t\t\t\tvar url=tTexture.bitmap.src;\n\t\t\t\t\tif(url.indexOf(\"data:image/png;base64\")<0)\n\t\t\t\t\t\tpicDic[tTexture.bitmap.src]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn ResTools;\n})()\n\n\n/**\n*类实例创建分析工具\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-25 下午3:31:46\n*/\n//class laya.debug.tools.RunProfile\nvar RunProfile=(function(){\n\tfunction RunProfile(){}\n\t__class(RunProfile,'laya.debug.tools.RunProfile');\n\tRunProfile.run=function(funName,callLen){\n\t\t(callLen===void 0)&& (callLen=3);\n\t\tvar tCount;\n\t\tif(!RunProfile.infoDic.hasOwnProperty(funName)){\n\t\t\tRunProfile.infoDic[funName]=new CountTool();\n\t\t}\n\t\ttCount=RunProfile.infoDic[funName];\n\t\tvar msg;\n\t\tmsg=TraceTool.getCallLoc(callLen)+\"\\n\"+TraceTool.getCallStack(1,callLen-3);\n\t\ttCount.add(msg);\n\t\tif(RunProfile._runShowDic[funName]){\n\t\t\tconsole.log(\"Create:\"+funName);\n\t\t\tconsole.log(msg);\n\t\t}\n\t}\n\n\tRunProfile.showClassCreate=function(funName){\n\t\tRunProfile._runShowDic[funName]=true;\n\t}\n\n\tRunProfile.hideClassCreate=function(funName){\n\t\tRunProfile._runShowDic[funName]=false;\n\t}\n\n\tRunProfile.getRunInfo=function(funName){\n\t\tvar rst;\n\t\trst=RunProfile.infoDic[funName];\n\t\tif(rst){\n\t\t}\n\t\treturn RunProfile.infoDic[funName];\n\t}\n\n\tRunProfile.runTest=function(fun,count,sign){\n\t\t(sign===void 0)&& (sign=\"runTest\");\n\t\tDTrace.timeStart(sign);\n\t\tvar i=0;\n\t\tfor(i=0;i<count;i++){\n\t\t\tfun();\n\t\t}\n\t\tDTrace.timeEnd(sign);\n\t}\n\n\tRunProfile.runTest2=function(fun,count,sign){\n\t\t(sign===void 0)&& (sign=\"runTest\");\n\t\tvar preTime=NaN;\n\t\tpreTime=Browser.now();\n\t\tvar i=0;\n\t\tfor(i=0;i<count;i++){\n\t\t\tfun();\n\t\t}\n\t\treturn Browser.now()-preTime;\n\t}\n\n\tRunProfile.infoDic={};\n\tRunProfile._runShowDic={};\n\treturn RunProfile;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2016-6-24 下午6:07:30\n*/\n//class laya.debug.tools.SingleTool\nvar SingleTool=(function(){\n\tfunction SingleTool(){\n\t\tthis._objDic={};\n\t}\n\n\t__class(SingleTool,'laya.debug.tools.SingleTool');\n\tvar __proto=SingleTool.prototype;\n\t__proto.getArr=function(sign){\n\t\tvar dic;\n\t\tdic=this.getTypeDic(\"Array\");\n\t\tif(!dic[sign])dic[sign]=[];\n\t\treturn dic[sign];\n\t}\n\n\t__proto.getObject=function(sign){\n\t\tvar dic;\n\t\tdic=this.getTypeDic(\"Object\");\n\t\tif(!dic[sign])dic[sign]={};\n\t\treturn dic[sign];\n\t}\n\n\t__proto.getByClass=function(sign,clzSign,clz){\n\t\tvar dic;\n\t\tdic=this.getTypeDic(clzSign);\n\t\tif(!dic[sign])dic[sign]=new clz();\n\t\treturn dic[sign];\n\t}\n\n\t__proto.getTypeDic=function(type){\n\t\tif(!this._objDic[type])this._objDic[type]={};\n\t\treturn this._objDic[type];\n\t}\n\n\t__static(SingleTool,\n\t['I',function(){return this.I=new SingleTool();}\n\t]);\n\treturn SingleTool;\n})()\n\n\n/**\n*一些字符串操作函数\n*@author ww\n*\n*/\n//class laya.debug.tools.StringTool\nvar StringTool=(function(){\n\tfunction StringTool(){}\n\t__class(StringTool,'laya.debug.tools.StringTool');\n\tStringTool.toUpCase=function(str){\n\t\treturn str.toUpperCase();\n\t}\n\n\tStringTool.toLowCase=function(str){\n\t\treturn str.toLowerCase();\n\t}\n\n\tStringTool.toUpHead=function(str){\n\t\tvar rst;\n\t\tif(str.length<=1)return str.toUpperCase();\n\t\trst=str.charAt(0).toUpperCase()+str.substr(1);\n\t\treturn rst;\n\t}\n\n\tStringTool.toLowHead=function(str){\n\t\tvar rst;\n\t\tif(str.length<=1)return str.toLowerCase();\n\t\trst=str.charAt(0).toLowerCase()+str.substr(1);\n\t\treturn rst;\n\t}\n\n\tStringTool.packageToFolderPath=function(packageName){\n\t\tvar rst;\n\t\trst=packageName.replace(\".\",\"/\");\n\t\treturn rst;\n\t}\n\n\tStringTool.insert=function(str,iStr,index){\n\t\treturn str.substring(0,index)+iStr+str.substr(index);\n\t}\n\n\tStringTool.insertAfter=function(str,iStr,tarStr,isLast){\n\t\t(isLast===void 0)&& (isLast=false);\n\t\tvar i=0;\n\t\tif(isLast){\n\t\t\ti=str.lastIndexOf(tarStr);\n\t\t\t}else{\n\t\t\ti=str.indexOf(tarStr);\n\t\t}\n\t\tif(i>=0){\n\t\t\treturn StringTool.insert(str,iStr,i+tarStr.length);\n\t\t}\n\t\treturn str;\n\t}\n\n\tStringTool.insertBefore=function(str,iStr,tarStr,isLast){\n\t\t(isLast===void 0)&& (isLast=false);\n\t\tvar i=0;\n\t\tif(isLast){\n\t\t\ti=str.lastIndexOf(tarStr);\n\t\t\t}else{\n\t\t\ti=str.indexOf(tarStr);\n\t\t}\n\t\tif(i>=0){\n\t\t\treturn StringTool.insert(str,iStr,i);\n\t\t}\n\t\treturn str;\n\t}\n\n\tStringTool.insertParamToFun=function(funStr,params){\n\t\tvar oldParam;\n\t\toldParam=StringTool.getParamArr(funStr);\n\t\tvar inserStr;\n\t\tinserStr=params.join(\",\");\n\t\tif(oldParam.length>0){\n\t\t\tinserStr=\",\"+inserStr;\n\t\t}\n\t\treturn StringTool.insertBefore(funStr,inserStr,\")\",true);\n\t}\n\n\tStringTool.trim=function(str,vList){\n\t\tif(!vList){\n\t\t\tvList=[\" \",\"\\r\",\"\\n\",\"\\t\",String.fromCharCode(65279)];\n\t\t};\n\t\tvar rst;\n\t\tvar i=0;\n\t\tvar len=0;\n\t\trst=str;\n\t\tlen=vList.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\trst=StringTool.getReplace(rst,vList[i],\"\");\n\t\t}\n\t\treturn rst;\n\t}\n\n\tStringTool.isEmpty=function(str){\n\t\tif(str.length<1)return true;\n\t\treturn StringTool.emptyStrDic.hasOwnProperty(str);\n\t}\n\n\tStringTool.trimLeft=function(str){\n\t\tvar i=0;\n\t\ti=0;\n\t\tvar len=0;\n\t\tlen=str.length;\n\t\twhile(StringTool.isEmpty(str.charAt(i))&&i<len){\n\t\t\ti++;\n\t\t}\n\t\tif(i<len){\n\t\t\treturn str.substr(i);\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tStringTool.trimRight=function(str){\n\t\tvar i=0;\n\t\ti=str.length-1;\n\t\twhile(StringTool.isEmpty(str.charAt(i))&&i>=0){\n\t\t\ti--;\n\t\t};\n\t\tvar rst;\n\t\trst=str.substring(0,i)\n\t\tif(i>=0){\n\t\t\treturn str.substring(0,i+1);\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tStringTool.trimSide=function(str){\n\t\tvar rst;\n\t\trst=StringTool.trimLeft(str);\n\t\trst=StringTool.trimRight(rst);\n\t\treturn rst;\n\t}\n\n\tStringTool.isOkFileName=function(fileName){\n\t\tif(laya.debug.tools.StringTool.trimSide(fileName)==\"\")return false;\n\t\tvar i=0,len=0;\n\t\tlen=fileName.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(StringTool.specialChars[fileName.charAt(i)])return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tStringTool.trimButEmpty=function(str){\n\t\treturn StringTool.trim(str,[\"\\r\",\"\\n\",\"\\t\"]);\n\t}\n\n\tStringTool.removeEmptyStr=function(strArr){\n\t\tvar i=0;\n\t\ti=strArr.length-1;\n\t\tvar str;\n\t\tfor(i=i;i>=0;i--){\n\t\t\tstr=strArr[i];\n\t\t\tstr=laya.debug.tools.StringTool.trimSide(str);\n\t\t\tif(StringTool.isEmpty(str)){\n\t\t\t\tstrArr.splice(i,1);\n\t\t\t\t}else{\n\t\t\t\tstrArr[i]=str;\n\t\t\t}\n\t\t}\n\t\treturn strArr;\n\t}\n\n\tStringTool.ifNoAddToTail=function(str,sign){\n\t\tif(str.indexOf(sign)>=0){\n\t\t\treturn str;\n\t\t}\n\t\treturn str+sign;\n\t}\n\n\tStringTool.trimEmptyLine=function(str){\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar tLines;\n\t\tvar tLine;\n\t\ttLines=str.split(\"\\n\");\n\t\tfor(i=tLines.length-1;i>=0;i--){\n\t\t\ttLine=tLines[i];\n\t\t\tif(StringTool.isEmptyLine(tLine)){\n\t\t\t\ttLines.splice(i,1);\n\t\t\t}\n\t\t}\n\t\treturn tLines.join(\"\\n\");\n\t}\n\n\tStringTool.isEmptyLine=function(str){\n\t\tstr=laya.debug.tools.StringTool.trim(str);\n\t\tif(str==\"\")return true;\n\t\treturn false;\n\t}\n\n\tStringTool.removeCommentLine=function(lines){\n\t\tvar rst;\n\t\trst=[];\n\t\tvar i=0;\n\t\tvar tLine;\n\t\tvar adptLine;\n\t\ti=0;\n\t\tvar len=0;\n\t\tvar index=0;\n\t\tlen=lines.length;\n\t\twhile(i<len){\n\t\t\tadptLine=tLine=lines[i];\n\t\t\tindex=tLine.indexOf(\"/**\");\n\t\t\tif(index>=0){\n\t\t\t\tadptLine=tLine.substring(0,index-1);\n\t\t\t\tStringTool.addIfNotEmpty(rst,adptLine);\n\t\t\t\twhile(i<len){\n\t\t\t\t\ttLine=lines[i];\n\t\t\t\t\tindex=tLine.indexOf(\"*/\");\n\t\t\t\t\tif(index>=0){\n\t\t\t\t\t\tadptLine=tLine.substring(index+2);\n\t\t\t\t\t\tStringTool.addIfNotEmpty(rst,adptLine);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\t}else if(tLine.indexOf(\"//\")>=0){\n\t\t\t\tif(laya.debug.tools.StringTool.trim(tLine).indexOf(\"//\")==0){\n\t\t\t\t\t}else{\n\t\t\t\t\tStringTool.addIfNotEmpty(rst,adptLine);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tStringTool.addIfNotEmpty(rst,adptLine);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn rst;\n\t}\n\n\tStringTool.addIfNotEmpty=function(arr,str){\n\t\tif(!str)return;\n\t\tvar tStr;\n\t\ttStr=StringTool.trim(str);\n\t\tif(tStr!=\"\"){\n\t\t\tarr.push(str);\n\t\t}\n\t}\n\n\tStringTool.trimExt=function(str,vars){\n\t\tvar rst;\n\t\trst=StringTool.trim(str);\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tlen=vars.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\trst=StringTool.getReplace(rst,vars[i],\"\");\n\t\t}\n\t\treturn rst;\n\t}\n\n\tStringTool.getBetween=function(str,left,right,ifMax){\n\t\t(ifMax===void 0)&& (ifMax=false);\n\t\tif(!str)return \"\";\n\t\tif(!left)return \"\";\n\t\tif(!right)return \"\";\n\t\tvar lId=0;\n\t\tvar rId=0;\n\t\tlId=str.indexOf(left);\n\t\tif(lId<0)return\"\";\n\t\tif(ifMax){\n\t\t\trId=str.lastIndexOf(right);\n\t\t\tif(rId<lId)return \"\";\n\t\t\t}else{\n\t\t\trId=str.indexOf(right,lId+1);\n\t\t}\n\t\tif(rId<0)return \"\";\n\t\treturn str.substring(lId+left.length,rId);\n\t}\n\n\tStringTool.getSplitLine=function(line,split){\n\t\t(split===void 0)&& (split=\" \");\n\t\treturn line.split(split);\n\t}\n\n\tStringTool.getLeft=function(str,sign){\n\t\tvar i=0;\n\t\ti=str.indexOf(sign);\n\t\treturn str.substr(0,i);\n\t}\n\n\tStringTool.getRight=function(str,sign){\n\t\tvar i=0;\n\t\ti=str.indexOf(sign);\n\t\treturn str.substr(i+1);\n\t}\n\n\tStringTool.delelteItem=function(arr){\n\t\twhile (arr.length>0){\n\t\t\tif(arr[0]==\"\"){\n\t\t\t\tarr.shift();\n\t\t\t\t}else{\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}\n\n\tStringTool.getWords=function(line){\n\t\tvar rst=StringTool.getSplitLine(line);\n\t\tStringTool.delelteItem(rst);\n\t\treturn rst;\n\t}\n\n\tStringTool.getLinesI=function(startLine,endLine,lines){\n\t\tvar i=0;\n\t\tvar rst=[];\n\t\tfor(i=startLine;i<=endLine;i++){\n\t\t\trst.push(lines[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tStringTool.structfy=function(str,inWidth,removeEmpty){\n\t\t(inWidth===void 0)&& (inWidth=4);\n\t\t(removeEmpty===void 0)&& (removeEmpty=true);\n\t\tif(removeEmpty){\n\t\t\tstr=laya.debug.tools.StringTool.trimEmptyLine(str);\n\t\t};\n\t\tvar lines;\n\t\tvar tIn=0;\n\t\ttIn=0;\n\t\tvar tInStr;\n\t\ttInStr=StringTool.getEmptyStr(0);\n\t\tlines=str.split(\"\\n\");\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar tLineStr;\n\t\tlen=lines.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\ttLineStr=lines[i];\n\t\t\ttLineStr=laya.debug.tools.StringTool.trimLeft(tLineStr);\n\t\t\ttLineStr=laya.debug.tools.StringTool.trimRight(tLineStr);\n\t\t\ttIn+=StringTool.getPariCount(tLineStr);\n\t\t\tif(tLineStr.indexOf(\"}\")>=0){\n\t\t\t\ttInStr=StringTool.getEmptyStr(tIn*inWidth);\n\t\t\t}\n\t\t\ttLineStr=tInStr+tLineStr;\n\t\t\tlines[i]=tLineStr;\n\t\t\ttInStr=StringTool.getEmptyStr(tIn*inWidth);\n\t\t}\n\t\treturn lines.join(\"\\n\");\n\t}\n\n\tStringTool.getEmptyStr=function(width){\n\t\tif(!StringTool.emptyDic.hasOwnProperty(width)){\n\t\t\tvar i=0;\n\t\t\tvar len=0;\n\t\t\tlen=width;\n\t\t\tvar rst;\n\t\t\trst=\"\";\n\t\t\tfor(i=0;i<len;i++){\n\t\t\t\trst+=\" \";\n\t\t\t}\n\t\t\tStringTool.emptyDic[width]=rst;\n\t\t}\n\t\treturn StringTool.emptyDic[width];\n\t}\n\n\tStringTool.getPariCount=function(str,inChar,outChar){\n\t\t(inChar===void 0)&& (inChar=\"{\");\n\t\t(outChar===void 0)&& (outChar=\"}\");\n\t\tvar varDic;\n\t\tvarDic={};\n\t\tvarDic[inChar]=1;\n\t\tvarDic[outChar]=-1;\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar tChar;\n\t\tlen=str.length;\n\t\tvar rst=0;\n\t\trst=0;\n\t\tfor(i=0;i<len;i++){\n\t\t\ttChar=str.charAt(i);\n\t\t\tif(varDic.hasOwnProperty(tChar)){\n\t\t\t\trst+=varDic[tChar];\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tStringTool.readInt=function(str,startI){\n\t\t(startI===void 0)&& (startI=0);\n\t\tvar rst=NaN;\n\t\trst=0;\n\t\tvar tNum=0;\n\t\tvar tC;\n\t\tvar i=0;\n\t\tvar isBegin=false;\n\t\tisBegin=false;\n\t\tvar len=0;\n\t\tlen=str.length;\n\t\tfor(i=startI;i<len;i++){\n\t\t\ttC=str.charAt(i);\n\t\t\tif(Number(tC)>0||tC==\"0\"){\n\t\t\t\trst=10*rst+Number(tC);\n\t\t\t\tif(rst>0)isBegin=true;\n\t\t\t\t}else{\n\t\t\t\tif(isBegin)return rst;\n\t\t\t}\n\t\t}\n\t\treturn rst;\n\t}\n\n\tStringTool.getReplace=function(str,oStr,nStr){\n\t\tif(!str)return \"\";\n\t\tvar rst;\n\t\trst=str.replace(new RegExp(oStr,\"g\"),nStr);\n\t\treturn rst;\n\t}\n\n\tStringTool.getWordCount=function(str,findWord){\n\t\tvar rg=new RegExp(findWord,\"g\")\n\t\treturn str.match(rg).length;\n\t}\n\n\tStringTool.getResolvePath=function(path,basePath){\n\t\tif(StringTool.isAbsPath(path)){\n\t\t\treturn path;\n\t\t};\n\t\tvar tSign;\n\t\ttSign=\"\\\\\";\n\t\tif(basePath.indexOf(\"/\")>=0){\n\t\t\ttSign=\"/\";\n\t\t}\n\t\tif(basePath.charAt(basePath.length-1)==tSign){\n\t\t\tbasePath=basePath.substr(0,basePath.length-1);\n\t\t};\n\t\tvar parentSign;\n\t\tparentSign=\"..\"+tSign;\n\t\tvar tISign;\n\t\ttISign=\".\"+tSign;\n\t\tvar pCount=0;\n\t\tpCount=StringTool.getWordCount(path,parentSign);\n\t\tpath=laya.debug.tools.StringTool.getReplace(path,parentSign,\"\");\n\t\tpath=laya.debug.tools.StringTool.getReplace(path,tISign,\"\");\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tlen=pCount;\n\t\tvar iPos=0;\n\t\tfor(i=0;i<len;i++){\n\t\t\tbasePath=StringTool.removeLastSign(path,tSign);\n\t\t}\n\t\treturn basePath+tSign+path;\n\t}\n\n\tStringTool.isAbsPath=function(path){\n\t\tif(path.indexOf(\":\")>=0)return true;\n\t\treturn false;\n\t}\n\n\tStringTool.removeLastSign=function(str,sign){\n\t\tvar iPos=0;\n\t\tiPos=str.lastIndexOf(sign);\n\t\tstr=str.substring(0,iPos);\n\t\treturn str;\n\t}\n\n\tStringTool.getParamArr=function(str){\n\t\tvar paramStr;\n\t\tparamStr=laya.debug.tools.StringTool.getBetween(str,\"(\",\")\",true);\n\t\tif(StringTool.trim(paramStr).length<1)return [];\n\t\treturn paramStr.split(\",\");\n\t}\n\n\tStringTool.copyStr=function(str){\n\t\treturn str.substring();\n\t}\n\n\tStringTool.ArrayToString=function(arr){\n\t\tvar rst;\n\t\trst=\"[{items}]\".replace(new RegExp(\"\\\\{items\\\\}\",\"g\"),StringTool.getArrayItems(arr));\n\t\treturn rst;\n\t}\n\n\tStringTool.getArrayItems=function(arr){\n\t\tvar rst;\n\t\tif(arr.length<1)return \"\";\n\t\trst=StringTool.parseItem(arr[0]);\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tlen=arr.length;\n\t\tfor(i=1;i<len;i++){\n\t\t\trst+=\",\"+StringTool.parseItem(arr[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tStringTool.parseItem=function(item){\n\t\tvar rst;\n\t\trst=\"\\\"\"+item+\"\\\"\";\n\t\treturn \"\";\n\t}\n\n\tStringTool.initAlphaSign=function(){\n\t\tif (StringTool.alphaSigns)return;\n\t\tStringTool.alphaSigns={};\n\t\tStringTool.addSign(\"a\",\"z\",StringTool.alphaSigns);\n\t\tStringTool.addSign(\"A\",\"Z\",StringTool.alphaSigns);\n\t\tStringTool.addSign(\"0\",\"9\",StringTool.alphaSigns);\n\t}\n\n\tStringTool.addSign=function(ss,e,tar){\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar s=0;\n\t\ts=ss.charCodeAt(0);\n\t\tlen=e.charCodeAt(0);\n\t\tfor(i=s;i<=len;i++){\n\t\t\ttar[String.fromCharCode(i)]=true;\n\t\t\tconsole.log(\"add :\"+String.fromCharCode(i));\n\t\t}\n\t}\n\n\tStringTool.isPureAlphaNum=function(str){\n\t\tStringTool.initAlphaSign();\n\t\tif (!str)return true;\n\t\tvar i=0,len=0;\n\t\tlen=str.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tif (!StringTool.alphaSigns[str.charAt(i)])return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tStringTool.emptyDic={};\n\tStringTool.alphaSigns=null;\n\t__static(StringTool,\n\t['emptyStrDic',function(){return this.emptyStrDic={\n\t\t\t\" \":true,\n\t\t\t\"\\r\":true,\n\t\t\t\"\\n\":true,\n\t\t\t\"\\t\":true\n\t};},'specialChars',function(){return this.specialChars={\"*\":true,\"&\":true,\"%\":true,\"#\":true,\"?\":true};}\n\n\t]);\n\treturn StringTool;\n})()\n\n\n/**\n*全局时间速率控制类\n*@author ww\n*/\n//class laya.debug.tools.TimerControlTool\nvar TimerControlTool=(function(){\n\tfunction TimerControlTool(){}\n\t__class(TimerControlTool,'laya.debug.tools.TimerControlTool');\n\tTimerControlTool.now=function(){\n\t\tif (TimerControlTool._timeRate !=1)return TimerControlTool.getRatedNow();\n\t\treturn Date.now();\n\t}\n\n\tTimerControlTool.getRatedNow=function(){\n\t\tvar dTime=NaN;\n\t\tdTime=TimerControlTool.getNow()-TimerControlTool._startTime;\n\t\treturn dTime *TimerControlTool._timeRate+TimerControlTool._startTime;\n\t}\n\n\tTimerControlTool.getNow=function(){\n\t\treturn Date.now();\n\t}\n\n\tTimerControlTool.setTimeRate=function(rate){\n\t\tif (TimerControlTool._browerNow==null)TimerControlTool._browerNow=Browser[\"now\"];\n\t\tTimerControlTool._startTime=TimerControlTool.getNow();\n\t\tTimerControlTool._timeRate=rate;\n\t\tif (rate !=1){\n\t\t\tBrowser[\"now\"]=TimerControlTool.now;\n\t\t\t}else{\n\t\t\tif(TimerControlTool._browerNow!=null)\n\t\t\t\tBrowser[\"now\"]=TimerControlTool._browerNow;\n\t\t}\n\t}\n\n\tTimerControlTool.recoverRate=function(){\n\t\tTimerControlTool.setTimeRate(1);\n\t}\n\n\tTimerControlTool._startTime=NaN;\n\tTimerControlTool._timeRate=1;\n\tTimerControlTool._browerNow=null;\n\treturn TimerControlTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.TimeTool\nvar TimeTool=(function(){\n\tfunction TimeTool(){}\n\t__class(TimeTool,'laya.debug.tools.TimeTool');\n\tTimeTool.getTime=function(sign,update){\n\t\t(update===void 0)&& (update=true);\n\t\tif (!TimeTool.timeDic[sign]){\n\t\t\tTimeTool.timeDic[sign]=0;\n\t\t};\n\t\tvar tTime=NaN;\n\t\ttTime=Browser.now();\n\t\tvar rst=NaN;\n\t\trst=tTime-TimeTool.timeDic[sign];\n\t\tTimeTool.timeDic[sign]=tTime;\n\t\treturn rst;\n\t}\n\n\tTimeTool.runAllCallLater=function(){\n\t\tif(TimeTool._deep>0)debugger;\n\t\tTimeTool._deep++;\n\t\tvar timer;\n\t\ttimer=Laya.timer;\n\t\tvar laters=timer[\"_laters\"];\n\t\tfor (var i=0,n=laters.length-1;i <=n;i++){\n\t\t\tvar handler=laters[i];\n\t\t\tif(handler){\n\t\t\t\thandler.method!==null && handler.run(false);\n\t\t\t\ttimer[\"_recoverHandler\"](handler);\n\t\t\t\t}else{\n\t\t\t\tdebugger;\n\t\t\t}\n\t\t\ti===n && (n=laters.length-1);\n\t\t}\n\t\tlaters.length=0;\n\t\tTimeTool._deep--;\n\t}\n\n\tTimeTool.timeDic={};\n\tTimeTool._deep=0;\n\treturn TimeTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.TouchDebugTools\nvar TouchDebugTools=(function(){\n\tfunction TouchDebugTools(){}\n\t__class(TouchDebugTools,'laya.debug.tools.TouchDebugTools');\n\tTouchDebugTools.getTouchIDs=function(events){\n\t\tvar rst;\n\t\trst=[];\n\t\tvar i=0,len=0;\n\t\tlen=events.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\trst.push(events[i].identifier||0);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tTouchDebugTools.traceTouchIDs=function(msg,events){\n\t\tDebugTxt.dTrace(msg+\":\"+TouchDebugTools.getTouchIDs(events).join(\",\"));\n\t}\n\n\treturn TouchDebugTools;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-25 上午10:48:54\n*/\n//class laya.debug.tools.TraceTool\nvar TraceTool=(function(){\n\tfunction TraceTool(){}\n\t__class(TraceTool,'laya.debug.tools.TraceTool');\n\tTraceTool.closeAllLog=function(){\n\t\tvar logFun;\n\t\tlogFun=TraceTool.emptyLog;\n\t\tBrowser.window.console.log=logFun;\n\t}\n\n\tTraceTool.emptyLog=function(){}\n\tTraceTool.traceObj=function(obj){\n\t\tTraceTool.tempArr.length=0;\n\t\tvar key;\n\t\tfor(key in obj){\n\t\t\tTraceTool.tempArr.push(key+\":\"+obj[key]);\n\t\t};\n\t\tvar rst;\n\t\trst=TraceTool.tempArr.join(\"\\n\");\n\t\tconsole.log(rst);\n\t\treturn rst;\n\t}\n\n\tTraceTool.traceObjR=function(obj){\n\t\tTraceTool.tempArr.length=0;\n\t\tvar key;\n\t\tfor(key in obj){\n\t\t\tTraceTool.tempArr.push(obj[key]+\":\"+key);\n\t\t};\n\t\tvar rst;\n\t\trst=TraceTool.tempArr.join(\"\\n\");\n\t\tconsole.log(rst);\n\t\treturn rst;\n\t}\n\n\tTraceTool.traceSize=function(tar){\n\t\tDebugTool.dTrace(\"Size: x:\"+tar.x+\" y:\"+tar.y+\" w:\"+tar.width+\" h:\"+tar.height+\" scaleX:\"+tar.scaleX+\" scaleY:\"+tar.scaleY);\n\t}\n\n\tTraceTool.traceSplit=function(msg){\n\t\tconsole.log(\"---------------------\"+msg+\"---------------------------\");\n\t}\n\n\tTraceTool.group=function(gName){\n\t\t/*__JS__ */console.group(gName);;\n\t}\n\n\tTraceTool.groupEnd=function(){\n\t\t/*__JS__ */console.groupEnd();;\n\t}\n\n\tTraceTool.getCallStack=function(life,s){\n\t\t(life===void 0)&& (life=1);\n\t\t(s===void 0)&& (s=1);\n\t\tvar caller;\n\t\tcaller=TraceTool.getCallStack;\n\t\tcaller=caller.caller.caller;\n\t\tvar msg;\n\t\tmsg=\"\";\n\t\twhile(caller&&life>0){\n\t\t\tif(s<=0){\n\t\t\t\tmsg+=caller+\"<-\";\n\t\t\t\tlife--;\n\t\t\t\t}else{\n\t\t\t}\n\t\t\tcaller=caller.caller;\n\t\t\ts--;\n\t\t}\n\t\treturn msg;\n\t}\n\n\tTraceTool.getCallLoc=function(index){\n\t\t(index===void 0)&& (index=2);\n\t\tvar loc;\n\t\ttry {\n\t\t\tTraceTool.Erroer.i++;\n\t\t\t}catch (e){\n\t\t\tvar arr;\n\t\t\tarr=e.stack.replace(/Error\\n/).split(/\\n/);\n\t\t\tif (arr[index]){\n\t\t\t\tloc=arr[index].replace(/^\\s+|\\s+$/,\"\");\n\t\t\t\t}else{\n\t\t\t\tloc=\"unknow\";\n\t\t\t}\n\t\t}\n\t\treturn loc;\n\t}\n\n\tTraceTool.traceCallStack=function(){\n\t\tvar loc;\n\t\ttry {\n\t\t\tTraceTool.Erroer.i++;\n\t\t\t}catch (e){\n\t\t\tloc=e.stack;\n\t\t}\n\t\tconsole.log(loc);\n\t\treturn loc;\n\t}\n\n\tTraceTool.getPlaceHolder=function(len){\n\t\tif(!TraceTool.holderDic.hasOwnProperty(len)){\n\t\t\tvar rst;\n\t\t\trst=\"\";\n\t\t\tvar i=0;\n\t\t\tfor(i=0;i<len;i++){\n\t\t\t\trst+=\"-\";\n\t\t\t}\n\t\t\tTraceTool.holderDic[len]=rst;\n\t\t}\n\t\treturn TraceTool.holderDic[len];\n\t}\n\n\tTraceTool.traceTree=function(tar,depth,isFirst){\n\t\t(depth===void 0)&& (depth=0);\n\t\t(isFirst===void 0)&& (isFirst=true);\n\t\tif(isFirst){\n\t\t\tconsole.log(\"traceTree\");\n\t\t}\n\t\tif(!tar)return;\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tif(tar.numChildren<1){\n\t\t\tconsole.log(tar);\n\t\t\treturn;\n\t\t}\n\t\tTraceTool.group(tar);\n\t\tlen=tar.numChildren;\n\t\tdepth++;\n\t\tfor(i=0;i<len;i++){\n\t\t\tTraceTool.traceTree(tar.getChildAt(i),depth,false);\n\t\t}\n\t\tTraceTool.groupEnd();\n\t}\n\n\tTraceTool.getClassName=function(tar){\n\t\treturn tar[\"constructor\"].name;\n\t}\n\n\tTraceTool.traceSpriteInfo=function(tar,showBounds,showSize,showTree){\n\t\t(showBounds===void 0)&& (showBounds=true);\n\t\t(showSize===void 0)&& (showSize=true);\n\t\t(showTree===void 0)&& (showTree=true);\n\t\tif(!((tar instanceof laya.display.Sprite ))){\n\t\t\tconsole.log(\"not Sprite\");\n\t\t\treturn;\n\t\t}\n\t\tif(!tar){\n\t\t\tconsole.log(\"null Sprite\");\n\t\t\treturn;\n\t\t}\n\t\tTraceTool.traceSplit(\"traceSpriteInfo\");\n\t\tDebugTool.dTrace(laya.debug.tools.TraceTool.getClassName(tar)+\":\"+tar.name);\n\t\tif(showTree){\n\t\t\tTraceTool.traceTree(tar);\n\t\t\t}else{\n\t\t\tconsole.log(tar);\n\t\t}\n\t\tif(showSize){\n\t\t\tTraceTool.traceSize(tar);\n\t\t}\n\t\tif(showBounds){\n\t\t\tconsole.log(\"bounds:\"+tar.getBounds());\n\t\t}\n\t}\n\n\tTraceTool.tempArr=[];\n\tTraceTool.Erroer=null;\n\tTraceTool.holderDic={};\n\treturn TraceTool;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.UVTools\nvar UVTools$1=(function(){\n\tfunction UVTools(){}\n\t__class(UVTools,'laya.debug.tools.UVTools',null,'UVTools$1');\n\tUVTools.getUVByRec=function(x,y,width,height){\n\t\treturn [x,y,x+width,y,x+width,y+height,x,y+height];\n\t}\n\n\tUVTools.getRecFromUV=function(uv){\n\t\tvar rst;\n\t\trst=new Rectangle(uv[0],uv[1],uv[2]-uv[0],uv[5]-uv[1]);\n\t\treturn rst;\n\t}\n\n\tUVTools.isUVRight=function(uv){\n\t\tif(uv[0]!=uv[6])return false;\n\t\tif(uv[1]!=uv[3])return false;\n\t\tif(uv[2]!=uv[4])return false;\n\t\tif(uv[5]!=uv[7])return false;\n\t\treturn true;\n\t}\n\n\tUVTools.getTextureRec=function(texture){\n\t\tvar rst;\n\t\trst=UVTools.getRecFromUV(texture.uv);\n\t\trst.x*=texture.bitmap.width;\n\t\trst.y*=texture.bitmap.height;\n\t\trst.width*=texture.bitmap.width;\n\t\trst.height*=texture.bitmap.height;\n\t\treturn rst;\n\t}\n\n\treturn UVTools;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-12-30 下午5:12:53\n*/\n//class laya.debug.tools.ValueChanger\nvar ValueChanger=(function(){\n\tfunction ValueChanger(){\n\t\tthis.target=null;\n\t\tthis.key=null;\n\t\tthis._tValue=NaN;\n\t\tthis.preValue=0;\n\t}\n\n\t__class(ValueChanger,'laya.debug.tools.ValueChanger');\n\tvar __proto=ValueChanger.prototype;\n\t__proto.record=function(){\n\t\tthis.preValue=this.value;\n\t}\n\n\t__proto.showValueByAdd=function(addValue){\n\t\tthis.value=this.preValue+addValue;\n\t}\n\n\t__proto.showValueByScale=function(scale){\n\t\tthis.value=this.preValue *scale;\n\t}\n\n\t__proto.recover=function(){\n\t\tthis.value=this.preValue;\n\t}\n\n\t__proto.dispose=function(){\n\t\tthis.target=null;\n\t}\n\n\t__getset(0,__proto,'value',function(){\n\t\tif(this.target){\n\t\t\tthis._tValue=this.target[this.key];\n\t\t}\n\t\treturn this._tValue;\n\t\t},function(nValue){\n\t\tthis._tValue=nValue;\n\t\tif(this.target){\n\t\t\tthis.target[this.key]=nValue;\n\t\t}\n\t});\n\n\t__getset(0,__proto,'dValue',function(){\n\t\treturn this.value-this.preValue;\n\t});\n\n\t__getset(0,__proto,'scaleValue',function(){\n\t\treturn this.value/this.preValue;\n\t});\n\n\tValueChanger.create=function(target,key){\n\t\tvar rst;\n\t\trst=new ValueChanger();\n\t\trst.target=target;\n\t\trst.key=key;\n\t\treturn rst;\n\t}\n\n\treturn ValueChanger;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.VisibleAnalyser\nvar VisibleAnalyser=(function(){\n\tfunction VisibleAnalyser(){}\n\t__class(VisibleAnalyser,'laya.debug.tools.VisibleAnalyser');\n\tVisibleAnalyser.analyseTarget=function(node){\n\t\tvar isInstage=false;\n\t\tisInstage=node.displayedInStage;\n\t\tvar gRec;\n\t\tgRec=NodeUtils.getGRec(node);\n\t\tvar stageRec=new Rectangle();\n\t\tstageRec.setTo(0,0,Laya.stage.width,Laya.stage.height);\n\t\tvar isInVisibleRec=false;\n\t\tvar visibleRec;\n\t\tvisibleRec=stageRec.intersection(gRec);\n\t\tif (visibleRec.width > 0 && visibleRec.height > 0){\n\t\t\tisInVisibleRec=true;\n\t\t}\n\t\telse{\n\t\t\tisInVisibleRec=false;\n\t\t};\n\t\tvar gAlpha=NaN;\n\t\tgAlpha=NodeUtils.getGAlpha(node);\n\t\tvar gVisible=false;\n\t\tgVisible=NodeUtils.getGVisible(node);\n\t\tvar msg;\n\t\tmsg=\"\";\n\t\tmsg+=\"isInstage:\"+isInstage+\"\\n\";\n\t\tmsg+=\"isInVisibleRec:\"+isInVisibleRec+\"\\n\";\n\t\tmsg+=\"gVisible:\"+gVisible+\"\\n\";\n\t\tmsg+=\"gAlpha:\"+gAlpha+\"\\n\";\n\t\tif (isInstage && isInVisibleRec && gVisible && gAlpha > 0){\n\t\t\tif (Render.isWebGL){\n\t\t\t\tVisibleAnalyser.anlyseRecVisible(node);\n\t\t\t\t}else{\n\t\t\t\tSpriteRenderForVisibleAnalyse.I.analyseNode(node);\n\t\t\t}\n\t\t\tmsg+=\"coverRate:\"+VisibleAnalyser.coverRate+\"\\n\";\n\t\t\tif (VisibleAnalyser._coverList.length > 0){\n\t\t\t\tLaya.timer.once(1000,null,VisibleAnalyser.showListLater);\n\t\t\t}\n\t\t}\n\t\tconsole.log(msg);\n\t\tOutPutView.I.showTxt(msg);\n\t}\n\n\tVisibleAnalyser.showListLater=function(){\n\t\tNodeListPanelView.I.showList(VisibleAnalyser._coverList);\n\t}\n\n\tVisibleAnalyser.isCoverByBrother=function(node){\n\t\tvar parent=node.parent;\n\t\tif (!parent)\n\t\t\treturn;\n\t\tvar _childs;\n\t\t_childs=parent._childs;\n\t\tvar index=0;\n\t\tindex=_childs.indexOf(node);\n\t\tif (index < 0)\n\t\t\treturn;\n\t\tvar i=0,len=0;\n\t\tvar canvas;\n\t\tvar rec;\n\t\trec=parent.getSelfBounds();\n\t\tif (rec.width <=0 || rec.height <=0)\n\t\t\treturn;\n\t}\n\n\tVisibleAnalyser.anlyseRecVisible=function(node){\n\t\tVisibleAnalyser.isNodeWalked=false;\n\t\tVisibleAnalyser._analyseTarget=node;\n\t\tif (!VisibleAnalyser.mainCanvas)\n\t\t\tVisibleAnalyser.mainCanvas=CanvasTools.createCanvas(Laya.stage.width,Laya.stage.height);\n\t\tCanvasTools.clearCanvas(VisibleAnalyser.mainCanvas);\n\t\tVisibleAnalyser.tColor=1;\n\t\tVisibleAnalyser.resetCoverList();\n\t\tWalkTools.walkTargetEX(Laya.stage,VisibleAnalyser.recVisibleWalker,null,VisibleAnalyser.filterFun);\n\t\tif (!VisibleAnalyser.isTarRecOK){\n\t\t\tVisibleAnalyser.coverRate=0;\n\t\t}\n\t\telse{\n\t\t\tVisibleAnalyser.coverRate=CanvasTools.getDifferRate(VisibleAnalyser.preImageData,VisibleAnalyser.tarImageData);\n\t\t}\n\t\tconsole.log(\"coverRate:\",VisibleAnalyser.coverRate);\n\t}\n\n\tVisibleAnalyser.getRecArea=function(rec){\n\t\treturn rec.width *rec.height;\n\t}\n\n\tVisibleAnalyser.addCoverNode=function(node,coverRate){\n\t\tvar data;\n\t\tdata={};\n\t\tdata.path=node;\n\t\tdata.label=ClassTool.getNodeClassAndName(node)+\":\"+coverRate;\n\t\tdata.coverRate=coverRate;\n\t\tVisibleAnalyser._coverList.push(data);\n\t\tconsole.log(\"coverByNode:\",node,coverRate);\n\t}\n\n\tVisibleAnalyser.resetCoverList=function(){\n\t\tVisibleAnalyser._coverList.length=0;\n\t}\n\n\tVisibleAnalyser.recVisibleWalker=function(node){\n\t\tif (node==VisibleAnalyser._analyseTarget){\n\t\t\tVisibleAnalyser.isNodeWalked=true;\n\t\t\tVisibleAnalyser.tarRec.copyFrom(NodeUtils.getGRec(node));\n\t\t\tconsole.log(\"tarRec:\",VisibleAnalyser.tarRec.toString());\n\t\t\tif (VisibleAnalyser.tarRec.width > 0 && VisibleAnalyser.tarRec.height > 0){\n\t\t\t\tVisibleAnalyser.isTarRecOK=true;\n\t\t\t\tVisibleAnalyser.tColor++;\n\t\t\t\tCanvasTools.fillCanvasRec(VisibleAnalyser.mainCanvas,VisibleAnalyser.tarRec,ColorTool.toHexColor(VisibleAnalyser.tColor));\n\t\t\t\tVisibleAnalyser.preImageData=CanvasTools.getImageDataFromCanvasByRec(VisibleAnalyser.mainCanvas,VisibleAnalyser.tarRec);\n\t\t\t\tVisibleAnalyser.tarImageData=CanvasTools.getImageDataFromCanvasByRec(VisibleAnalyser.mainCanvas,VisibleAnalyser.tarRec);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconsole.log(\"tarRec Not OK:\",VisibleAnalyser.tarRec);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (VisibleAnalyser.isTarRecOK){\n\t\t\t\tvar tRec;\n\t\t\t\ttRec=NodeUtils.getGRec(node);\n\t\t\t\tVisibleAnalyser.interRec=VisibleAnalyser.tarRec.intersection(tRec,VisibleAnalyser.interRec);\n\t\t\t\tif (VisibleAnalyser.interRec && VisibleAnalyser.interRec.width > 0 && VisibleAnalyser.interRec.height > 0){\n\t\t\t\t\tVisibleAnalyser.tColor++;\n\t\t\t\t\tCanvasTools.fillCanvasRec(VisibleAnalyser.mainCanvas,tRec,ColorTool.toHexColor(VisibleAnalyser.tColor));\n\t\t\t\t\tVisibleAnalyser.tImageData=CanvasTools.getImageDataFromCanvasByRec(VisibleAnalyser.mainCanvas,VisibleAnalyser.tarRec);\n\t\t\t\t\tvar dRate=NaN;\n\t\t\t\t\tdRate=CanvasTools.getDifferRate(VisibleAnalyser.preImageData,VisibleAnalyser.tImageData);\n\t\t\t\t\tVisibleAnalyser.preImageData=VisibleAnalyser.tImageData;\n\t\t\t\t\tVisibleAnalyser.addCoverNode(node,dRate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tVisibleAnalyser.filterFun=function(node){\n\t\tif (node.visible==false)\n\t\t\treturn false;\n\t\tif (node.alpha < 0)\n\t\t\treturn false;\n\t\tif (DebugInfoLayer.I.isDebugItem(node))return false;\n\t\treturn true;\n\t}\n\n\tVisibleAnalyser.isNodeWalked=false;\n\tVisibleAnalyser._analyseTarget=null;\n\tVisibleAnalyser.isTarRecOK=false;\n\tVisibleAnalyser.mainCanvas=null;\n\tVisibleAnalyser.preImageData=null;\n\tVisibleAnalyser.tImageData=null;\n\tVisibleAnalyser.tarImageData=null;\n\tVisibleAnalyser.coverRate=NaN;\n\tVisibleAnalyser.tColor=0;\n\tVisibleAnalyser._coverList=[];\n\t__static(VisibleAnalyser,\n\t['tarRec',function(){return this.tarRec=new Rectangle();},'interRec',function(){return this.interRec=new Rectangle();}\n\t]);\n\treturn VisibleAnalyser;\n})()\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-24 下午6:15:01\n*/\n//class laya.debug.tools.WalkTools\nvar WalkTools=(function(){\n\tfunction WalkTools(){}\n\t__class(WalkTools,'laya.debug.tools.WalkTools');\n\tWalkTools.walkTarget=function(target,fun,_this){\n\t\tfun.apply(_this,[target]);\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar tChild;\n\t\tlen=target.numChildren;\n\t\tfor(i=0;i<len;i++){\n\t\t\ttChild=target.getChildAt(i);\n\t\t\tWalkTools.walkTarget(tChild,fun,tChild);\n\t\t}\n\t}\n\n\tWalkTools.walkTargetEX=function(target,fun,_this,filterFun){\n\t\tif (filterFun !=null && !filterFun(target))return;\n\t\tfun.apply(_this,[target]);\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tvar tChild;\n\t\tvar childs;\n\t\tchilds=target._childs;\n\t\tlen=childs.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\ttChild=childs[i];\n\t\t\tWalkTools.walkTarget(tChild,fun,tChild);\n\t\t}\n\t}\n\n\tWalkTools.walkChildren=function(target,fun,_this){\n\t\tif(!target||target.numChildren<1)return;\n\t\tWalkTools.walkArr(DisControlTool.getAllChild(target),fun,_this);\n\t}\n\n\tWalkTools.walkArr=function(arr,fun,_this){\n\t\tif(!arr)return;\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tlen=arr.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tfun.apply(_this,[arr[i],i]);\n\t\t}\n\t}\n\n\treturn WalkTools;\n})()\n\n\n/**\n*本类用于监控对象值变化\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-23 下午4:18:27\n*/\n//class laya.debug.tools.Watcher\nvar Watcher=(function(){\n\tfunction Watcher(){}\n\t__class(Watcher,'laya.debug.tools.Watcher');\n\tWatcher.watch=function(obj,name,funs){\n\t\tVarHook.hookVar(obj,name,funs);\n\t}\n\n\tWatcher.traceChange=function(obj,name,sign){\n\t\t(sign===void 0)&& (sign=\"var changed:\");\n\t\tVarHook.hookVar(obj,name,[Watcher.getTraceValueFun(name),VarHook.getLocFun(sign)]);\n\t}\n\n\tWatcher.debugChange=function(obj,name){\n\t\tVarHook.hookVar(obj,name,[VarHook.getLocFun(\"debug loc\"),FunHook.debugHere]);\n\t}\n\n\tWatcher.differChange=function(obj,name,sign,msg){\n\t\t(msg===void 0)&& (msg=\"\");\n\t\tVarHook.hookVar(obj,name,[Watcher.getDifferFun(obj,name,sign,msg)]);\n\t}\n\n\tWatcher.getDifferFun=function(obj,name,sign,msg){\n\t\t(msg===void 0)&& (msg=\"\");\n\t\tvar rst;\n\t\trst=function (){\n\t\t\tDifferTool.differ(sign,obj[name],msg);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tWatcher.traceValue=function(value){\n\t\tconsole.log(\"value:\",value);\n\t}\n\n\tWatcher.getTraceValueFun=function(name){\n\t\tvar rst;\n\t\trst=function (value){\n\t\t\tconsole.log(\"set \"+name+\" :\",value);\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn Watcher;\n})()\n\n\n/**\n*XML转Object类\n*@author ww\n*\n*/\n//class laya.debug.tools.XML2Object\nvar XML2Object=(function(){\n\tfunction XML2Object(){}\n\t__class(XML2Object,'laya.debug.tools.XML2Object');\n\t__getset(1,XML2Object,'arrays',function(){\n\t\tif(!XML2Object._arrays){\n\t\t\tXML2Object._arrays=[];\n\t\t}\n\t\treturn XML2Object._arrays;\n\t\t},function(a){\n\t\tXML2Object._arrays=a;\n\t});\n\n\tXML2Object.parse=function(node,isFirst){\n\t\t(isFirst===void 0)&& (isFirst=true);\n\t\tvar obj={};\n\t\tif(isFirst)\n\t\t\tobj.Name=node.localName;\n\t\tvar numOfChilds=node.children.length;\n\t\tvar childs=[];\n\t\tvar children={};\n\t\tobj.c=children;\n\t\tobj.cList=childs;\n\t\tfor(var i=0;i<numOfChilds;i++){\n\t\t\tvar childNode=node.children[i];\n\t\t\tvar childNodeName=childNode.localName;\n\t\t\tvar value;\n\t\t\tvar numOfAttributes\n\t\t\tvalue=XML2Object.parse(childNode,true);\n\t\t\tchilds.push(value);\n\t\t\tif(children[childNodeName]){\n\t\t\t\tif(XML2Object.getTypeof(children[childNodeName])==\"array\"){\n\t\t\t\t\tchildren[childNodeName].push(value);\n\t\t\t\t\t}else {\n\t\t\t\t\tchildren[childNodeName]=[children[childNodeName],value];\n\t\t\t\t}\n\t\t\t\t}else if(XML2Object.isArray(childNodeName)){\n\t\t\t\tchildren[childNodeName]=[value];\n\t\t\t\t}else {\n\t\t\t\tchildren[childNodeName]=value;\n\t\t\t}\n\t\t}\n\t\tnumOfAttributes=0;\n\t\tif(node.attributes){\n\t\t\tnumOfAttributes=node.attributes.length;\n\t\t\tvar prop={};\n\t\t\tobj.p=prop;\n\t\t\tfor(i=0;i<numOfAttributes;i++){\n\t\t\t\tprop[node.attributes[i].name.toString()]=String(node.attributes[i].nodeValue);\n\t\t\t}\n\t\t}\n\t\tif(numOfChilds==0){\n\t\t\tif(numOfAttributes==0){\n\t\t\t\tobj=\"\";\n\t\t\t}else {}\n\t\t}\n\t\treturn obj;\n\t}\n\n\tXML2Object.getArr=function(v){\n\t\tif(!v)return [];\n\t\tif(XML2Object.getTypeof(v)==\"array\")return v;\n\t\treturn [v];\n\t}\n\n\tXML2Object.isArray=function(nodeName){\n\t\tvar numOfArrays=XML2Object._arrays ? XML2Object._arrays.length :0;\n\t\tfor(var i=0;i<numOfArrays;i++){\n\t\t\tif(nodeName==XML2Object._arrays[i]){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tXML2Object.getTypeof=function(o){\n\t\tif(typeof(o)==\"object\"){\n\t\t\tif(o.length==null){\n\t\t\t\treturn \"object\";\n\t\t\t\t}else if(typeof(o.length)==\"number\"){\n\t\t\t\treturn \"array\";\n\t\t\t\t}else {\n\t\t\t\treturn \"object\";\n\t\t\t}\n\t\t\t}else {\n\t\t\treturn typeof(o);\n\t\t}\n\t}\n\n\tXML2Object._arrays=null;\n\treturn XML2Object;\n})()\n\n\n/**\n*XML转Object类\n*@author ww\n*\n*/\n//class laya.debug.tools.XML2ObjectNodejs\nvar XML2ObjectNodejs=(function(){\n\tfunction XML2ObjectNodejs(){}\n\t__class(XML2ObjectNodejs,'laya.debug.tools.XML2ObjectNodejs');\n\t__getset(1,XML2ObjectNodejs,'arrays',function(){\n\t\tif(!XML2ObjectNodejs._arrays){\n\t\t\tXML2ObjectNodejs._arrays=[];\n\t\t}\n\t\treturn XML2ObjectNodejs._arrays;\n\t\t},function(a){\n\t\tXML2ObjectNodejs._arrays=a;\n\t});\n\n\tXML2ObjectNodejs.parse=function(node,isFirst){\n\t\t(isFirst===void 0)&& (isFirst=true);\n\t\tvar obj={};\n\t\tif(isFirst)\n\t\t\tobj.Name=node.localName;\n\t\tvar numOfChilds=node[XML2ObjectNodejs.ChildrenSign]?node[XML2ObjectNodejs.ChildrenSign].length:0;\n\t\tvar childs=[];\n\t\tvar children={};\n\t\tobj.c=children;\n\t\tobj.cList=childs;\n\t\tfor(var i=0;i<numOfChilds;i++){\n\t\t\tvar childNode=node[XML2ObjectNodejs.ChildrenSign][i];\n\t\t\tvar childNodeName=childNode.localName;\n\t\t\tvar value;\n\t\t\tvar numOfAttributes=0\n\t\t\tif (!childNodeName)continue ;\n\t\t\tvalue=XML2ObjectNodejs.parse(childNode,true);\n\t\t\tchilds.push(value);\n\t\t\tif(children[childNodeName]){\n\t\t\t\tif(XML2ObjectNodejs.getTypeof(children[childNodeName])==\"array\"){\n\t\t\t\t\tchildren[childNodeName].push(value);\n\t\t\t\t\t}else {\n\t\t\t\t\tchildren[childNodeName]=[children[childNodeName],value];\n\t\t\t\t}\n\t\t\t\t}else if(XML2ObjectNodejs.isArray(childNodeName)){\n\t\t\t\tchildren[childNodeName]=[value];\n\t\t\t\t}else {\n\t\t\t\tchildren[childNodeName]=value;\n\t\t\t}\n\t\t}\n\t\tnumOfAttributes=0;\n\t\tif(node.attributes){\n\t\t\tnumOfAttributes=node.attributes.length;\n\t\t\tvar prop={};\n\t\t\tobj.p=prop;\n\t\t\tfor(i=0;i<numOfAttributes;i++){\n\t\t\t\tprop[node.attributes[i].name.toString()]=String(node.attributes[i].nodeValue);\n\t\t\t}\n\t\t}\n\t\tif(numOfChilds==0){\n\t\t\tif(numOfAttributes==0){\n\t\t\t}else {}\n\t\t}\n\t\treturn obj;\n\t}\n\n\tXML2ObjectNodejs.getArr=function(v){\n\t\tif(!v)return [];\n\t\tif(XML2ObjectNodejs.getTypeof(v)==\"array\")return v;\n\t\treturn [v];\n\t}\n\n\tXML2ObjectNodejs.isArray=function(nodeName){\n\t\tvar numOfArrays=XML2ObjectNodejs._arrays ? XML2ObjectNodejs._arrays.length :0;\n\t\tfor(var i=0;i<numOfArrays;i++){\n\t\t\tif(nodeName==XML2ObjectNodejs._arrays[i]){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tXML2ObjectNodejs.getTypeof=function(o){\n\t\tif(typeof(o)==\"object\"){\n\t\t\tif(o.length==null){\n\t\t\t\treturn \"object\";\n\t\t\t\t}else if(typeof(o.length)==\"number\"){\n\t\t\t\treturn \"array\";\n\t\t\t\t}else {\n\t\t\t\treturn \"object\";\n\t\t\t}\n\t\t\t}else {\n\t\t\treturn typeof(o);\n\t\t}\n\t}\n\n\tXML2ObjectNodejs._arrays=null;\n\tXML2ObjectNodejs.ChildrenSign=\"childNodes\";\n\treturn XML2ObjectNodejs;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.menus.NodeMenu\nvar NodeMenu=(function(){\n\tfunction NodeMenu(){\n\t\tthis._tar=null;\n\t\tthis._menu=null;\n\t\tthis._shareBtns=[\n\t\t\"信息面板\",\n\t\t\"边框\",\n\t\t\"进入节点\",\n\t\t\"树定位\",\n\t\t\"Enable链\",\n\t\t\"Size链\",\n\t\t\"节点工具\",\n\t\t\"可见分析\",\n\t\t\"输出到控制台\"];\n\t\tthis._menuItems=[\"隐藏节点\"];\n\t\tthis._menuHide=null;\n\t\tthis._menuItemsHide=[\"显示节点\"];\n\t\tthis._menu1=null;\n\t\tthis._menuItems1=[\"输出到控制台\"];\n\t}\n\n\t__class(NodeMenu,'laya.debug.view.nodeInfo.menus.NodeMenu');\n\tvar __proto=NodeMenu.prototype;\n\t__proto.showNodeMenu=function(node){\n\t\tif (!node._style){\n\t\t\tDebugTool.log(\"该节点已不存在，请刷新列表\");\n\t\t\treturn;\n\t\t}\n\t\tthis._tar=node;\n\t\tif (!this._menu){\n\t\t\tthis._menuItems=this._menuItems.concat(this._shareBtns);\n\t\t\tthis._menu=ContextMenu.createMenuByArray(this._menuItems);\n\t\t\tthis._menu.on(/*laya.events.Event.SELECT*/\"select\",this,this.onEmunSelect);\n\t\t\tthis._menuItemsHide=this._menuItemsHide.concat(this._shareBtns);\n\t\t\tthis._menuHide=ContextMenu.createMenuByArray(this._menuItemsHide);\n\t\t\tthis._menuHide.on(/*laya.events.Event.SELECT*/\"select\",this,this.onEmunSelect);\n\t\t}\n\t\tif (node.visible){\n\t\t\tthis._menu.show();\n\t\t}\n\t\telse{\n\t\t\tthis._menuHide.show();\n\t\t}\n\t}\n\n\t__proto.nodeDoubleClick=function(node){\n\t\tNodeToolView.I.showByNode(node);\n\t}\n\n\t__proto.setNodeListDoubleClickAction=function(list){\n\t\tif (Browser.onMobile)return;\n\t\tlist.on(/*laya.events.Event.DOUBLE_CLICK*/\"doubleclick\",this,this.onListDoubleClick,[list]);\n\t}\n\n\t__proto.onListDoubleClick=function(list){\n\t\tif (list.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=list.selectedItem.path;\n\t\t\tlaya.debug.view.nodeInfo.menus.NodeMenu.I.nodeDoubleClick(tarNode);\n\t\t}\n\t}\n\n\t__proto.setNodeListAction=function(list){\n\t\tlist.on(DebugTool.getMenuShowEvent(),this,this.onListRightClick,[list]);\n\t}\n\n\t//setNodeListDoubleClickAction(list);\n\t__proto.onListRightClick=function(list){\n\t\tif (list.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=list.selectedItem.path;\n\t\t\tlaya.debug.view.nodeInfo.menus.NodeMenu.I.objRightClick(tarNode);\n\t\t}\n\t}\n\n\t__proto.objRightClick=function(obj){\n\t\tif ((obj instanceof laya.display.Sprite )){\n\t\t\tlaya.debug.view.nodeInfo.menus.NodeMenu.I.showNodeMenu(obj);\n\t\t}\n\t\telse if ((typeof obj=='object')){\n\t\t\tlaya.debug.view.nodeInfo.menus.NodeMenu.I.showObjectMenu(obj);\n\t\t}\n\t}\n\n\t__proto.showObjectMenu=function(obj){\n\t\tthis._tar=obj;\n\t\tif (!this._menu1){\n\t\t\tthis._menu1=ContextMenu.createMenuByArray(this._menuItems1);\n\t\t\tthis._menu1.on(/*laya.events.Event.SELECT*/\"select\",this,this.onEmunSelect);\n\t\t}\n\t\tthis._menu1.show();\n\t}\n\n\t__proto.onEmunSelect=function(e){\n\t\tvar data=(e.target).data;\n\t\tif ((typeof data=='string')){\n\t\t\tvar key;\n\t\t\tkey=data;\n\t\t\tswitch (key){\n\t\t\t\tcase \"信息面板\":\n\t\t\t\t\tObjectInfoView.showObject(this._tar);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"边框\":\n\t\t\t\t\tDebugTool.showDisBound(this._tar);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"输出到控制台\":\n\t\t\t\t\tconsole.log(this._tar);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"树节点\":\n\t\t\t\t\tToolPanel.I.showNodeTree(this._tar);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"进入节点\":\n\t\t\t\t\tToolPanel.I.showNodeTree(this._tar);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"树定位\":\n\t\t\t\t\tToolPanel.I.showSelectInStage(this._tar);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"Enable链\":\n\t\t\t\t\tOutPutView.I.dTrace(DebugTool.traceDisMouseEnable(this._tar));\n\t\t\t\t\tSelectInfosView.I.setSelectList(DebugTool.selectedNodes);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"Size链\":\n\t\t\t\t\tOutPutView.I.dTrace(DebugTool.traceDisSizeChain(this._tar));\n\t\t\t\t\tSelectInfosView.I.setSelectList(DebugTool.selectedNodes);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"节点工具\":\n\t\t\t\t\tNodeToolView.I.showByNode(this._tar);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"显示节点\":\n\t\t\t\t\tthis._tar.visible=true;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"隐藏节点\":\n\t\t\t\t\tthis._tar.visible=false;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"可见分析\":\n\t\t\t\t\tif (this._tar){\n\t\t\t\t\t\tVisibleAnalyser.analyseTarget(this._tar);\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t}\n\n\t__getset(1,NodeMenu,'I',function(){\n\t\tif (!NodeMenu._I)\n\t\t\tNodeMenu._I=new NodeMenu();\n\t\treturn NodeMenu._I;\n\t});\n\n\tNodeMenu._I=null;\n\treturn NodeMenu;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.NodeConsts\nvar NodeConsts=(function(){\n\tfunction NodeConsts(){}\n\t__class(NodeConsts,'laya.debug.view.nodeInfo.NodeConsts');\n\tNodeConsts.defaultFitlerStr=\"x,y,width,height,scaleX,scaleY,alpha,renderCost\";\n\tNodeConsts.RenderCostMaxTime=3000;\n\treturn NodeConsts;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.NodeUtils\nvar NodeUtils=(function(){\n\tfunction NodeUtils(){}\n\t__class(NodeUtils,'laya.debug.view.nodeInfo.NodeUtils');\n\tNodeUtils.getFilterdTree=function(sprite,keys){\n\t\tif (!keys)\n\t\t\tkeys=NodeUtils.defaultKeys;\n\t\tvar me;\n\t\tme={};\n\t\tvar key;\n\t\tvar i=0,len=0;\n\t\tlen=keys.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tkey=keys[i];\n\t\t\tme[key]=sprite[key];\n\t\t};\n\t\tvar cList;\n\t\tvar tChild;\n\t\tcList=sprite._childs;\n\t\tlen=cList.length;\n\t\tvar mClist;\n\t\tmClist=[];\n\t\tfor (i=0;i < len;i++){\n\t\t\ttChild=cList[i];\n\t\t\tmClist.push(NodeUtils.getFilterdTree(tChild,keys));\n\t\t}\n\t\tme.childs=mClist;\n\t\treturn me;\n\t}\n\n\tNodeUtils.getPropertyDesO=function(tValue,keys){\n\t\tif (!keys)\n\t\t\tkeys=NodeUtils.defaultKeys;\n\t\tvar rst={};\n\t\tif ((typeof tValue=='object')){\n\t\t\trst.label=\"\"+ClassTool.getNodeClassAndName(tValue);\n\t\t}\n\t\telse{\n\t\t\trst.label=\"\"+tValue;\n\t\t}\n\t\trst.type=\"\";\n\t\trst.path=tValue;\n\t\trst.childs=[];\n\t\trst.isDirectory=false;\n\t\tvar key;\n\t\tvar i=0,len=0;\n\t\tvar tChild;\n\t\tif ((tValue instanceof laya.display.Node )){\n\t\t\trst.des=ClassTool.getNodeClassAndName(tValue);\n\t\t\trst.isDirectory=true;\n\t\t\tlen=keys.length;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\tkey=keys[i];\n\t\t\t\ttChild=NodeUtils.getPropertyDesO(tValue[key],keys);\n\t\t\t\tif (tValue.hasOwnProperty(key)){\n\t\t\t\t\ttChild.label=\"\"+key+\":\"+tChild.des;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttChild.label=\"\"+key+\":\"+ObjectInfoView.getNodeValue(tValue,key);\n\t\t\t\t}\n\t\t\t\trst.childs.push(tChild);\n\t\t\t}\n\t\t\tkey=\"_childs\";\n\t\t\ttChild=NodeUtils.getPropertyDesO(tValue[key],keys);\n\t\t\ttChild.label=\"\"+key+\":\"+tChild.des;\n\t\t\ttChild.isChilds=true;\n\t\t\trst.childs.push(tChild);\n\t\t}\n\t\telse if ((tValue instanceof Array)){\n\t\t\trst.des=\"Array[\"+(tValue).length+\"]\";\n\t\t\trst.isDirectory=true;\n\t\t\tvar tList;\n\t\t\ttList=tValue;\n\t\t\tlen=tList.length;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\ttChild=NodeUtils.getPropertyDesO(tList[i],keys);\n\t\t\t\ttChild.label=\"\"+i+\":\"+tChild.des;\n\t\t\t\trst.childs.push(tChild);\n\t\t\t}\n\t\t}\n\t\telse if ((typeof tValue=='object')){\n\t\t\trst.des=ClassTool.getNodeClassAndName(tValue);\n\t\t\trst.isDirectory=true;\n\t\t\tfor (key in tValue){\n\t\t\t\ttChild=NodeUtils.getPropertyDesO(tValue[key],keys);\n\t\t\t\ttChild.label=\"\"+key+\":\"+tChild.des;\n\t\t\t\trst.childs.push(tChild);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\trst.des=\"\"+tValue;\n\t\t}\n\t\trst.hasChild=rst.childs.length > 0;\n\t\treturn rst;\n\t}\n\n\tNodeUtils.adptShowKeys=function(keys){\n\t\tvar i=0,len=0;\n\t\tlen=keys.length;\n\t\tfor (i=len-1;i >=0;i--){\n\t\t\tkeys[i]=StringTool.trimSide(keys[i]);\n\t\t\tif (keys[i].length < 1){\n\t\t\t\tkeys.splice(i,1);\n\t\t\t}\n\t\t}\n\t\treturn keys;\n\t}\n\n\tNodeUtils.getNodeTreeData=function(sprite,keys){\n\t\tNodeUtils.adptShowKeys(keys);\n\t\tvar treeO;\n\t\ttreeO=NodeUtils.getPropertyDesO(sprite,keys);\n\t\tvar treeArr;\n\t\ttreeArr=[];\n\t\tNodeUtils.getTreeArr(treeO,treeArr);\n\t\treturn treeArr;\n\t}\n\n\tNodeUtils.getTreeArr=function(treeO,arr,add){\n\t\t(add===void 0)&& (add=true);\n\t\tif (add)\n\t\t\tarr.push(treeO);\n\t\tvar tArr=treeO.childs;\n\t\tvar i=0,len=tArr.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tif (!add){\n\t\t\t\ttArr[i].nodeParent=null;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttArr[i].nodeParent=treeO;\n\t\t\t}\n\t\t\tif (tArr[i].isDirectory){\n\t\t\t\tNodeUtils.getTreeArr(tArr[i],arr);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarr.push(tArr[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tNodeUtils.traceStage=function(){\n\t\tconsole.log(NodeUtils.getFilterdTree(Laya.stage,null));\n\t\tconsole.log(\"treeArr:\",NodeUtils.getNodeTreeData(Laya.stage,null));\n\t}\n\n\tNodeUtils.getNodeCount=function(node,visibleRequire){\n\t\t(visibleRequire===void 0)&& (visibleRequire=false);\n\t\tif (visibleRequire){\n\t\t\tif (!node.visible)return 0;\n\t\t};\n\t\tvar rst=0;\n\t\trst=1;\n\t\tvar i=0,len=0;\n\t\tvar cList;\n\t\tcList=node._childs;\n\t\tlen=cList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\trst+=NodeUtils.getNodeCount(cList[i],visibleRequire);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tNodeUtils.getGVisible=function(node){\n\t\twhile (node){\n\t\t\tif (!node.visible)return false;\n\t\t\tnode=node.parent;\n\t\t}\n\t\treturn true;\n\t}\n\n\tNodeUtils.getGAlpha=function(node){\n\t\tvar rst=NaN;\n\t\trst=1;\n\t\twhile (node){\n\t\t\trst *=node.alpha;\n\t\t\tnode=node.parent;\n\t\t}\n\t\treturn rst;\n\t}\n\n\tNodeUtils.getGPos=function(node){\n\t\tvar point;\n\t\tpoint=new Point();\n\t\tnode.localToGlobal(point);\n\t\treturn point;\n\t}\n\n\tNodeUtils.getGRec=function(node){\n\t\tvar pointList;\n\t\tpointList=node._getBoundPointsM(true);\n\t\tif (!pointList || pointList.length < 1)\n\t\t\treturn Rectangle.TEMP.setTo(0,0,0,0);\n\t\tpointList=GrahamScan.pListToPointList(pointList,true);\n\t\tWalkTools.walkArr(pointList,node.localToGlobal,node);\n\t\tpointList=GrahamScan.pointListToPlist(pointList);\n\t\tvar _disBoundRec;\n\t\t_disBoundRec=Rectangle._getWrapRec(pointList,_disBoundRec);\n\t\treturn _disBoundRec;\n\t}\n\n\tNodeUtils.getGGraphicRec=function(node){\n\t\tvar pointList;\n\t\tpointList=node.getGraphicBounds()._getBoundPoints();\n\t\tif (!pointList || pointList.length < 1)\n\t\t\treturn Rectangle.TEMP.setTo(0,0,0,0);\n\t\tpointList=GrahamScan.pListToPointList(pointList,true);\n\t\tWalkTools.walkArr(pointList,node.localToGlobal,node);\n\t\tpointList=GrahamScan.pointListToPlist(pointList);\n\t\tvar _disBoundRec;\n\t\t_disBoundRec=Rectangle._getWrapRec(pointList,_disBoundRec);\n\t\treturn _disBoundRec;\n\t}\n\n\tNodeUtils.getNodeCmdCount=function(node){\n\t\tvar rst=0;\n\t\tif (node.graphics){\n\t\t\tif (node.graphics.cmds){\n\t\t\t\trst=node.graphics.cmds.length;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (node.graphics._one){\n\t\t\t\t\trst=1;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\trst=0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\trst=0;\n\t\t}\n\t\treturn rst;\n\t}\n\n\tNodeUtils.getNodeCmdTotalCount=function(node){\n\t\tvar rst=0;\n\t\tvar i=0,len=0;\n\t\tvar cList;\n\t\tcList=node._childs;\n\t\tlen=cList.length;\n\t\trst=NodeUtils.getNodeCmdCount(node);\n\t\tfor (i=0;i < len;i++){\n\t\t\trst+=NodeUtils.getNodeCmdTotalCount(cList[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tNodeUtils.getRenderNodeCount=function(node){\n\t\tif (node.cacheAs !=\"none\")return 1;\n\t\tvar rst=0;\n\t\tvar i=0,len=0;\n\t\tvar cList;\n\t\tcList=node._childs;\n\t\tlen=cList.length;\n\t\trst=1;\n\t\tfor (i=0;i < len;i++){\n\t\t\trst+=NodeUtils.getRenderNodeCount(cList[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tNodeUtils.getReFreshRenderNodeCount=function(node){\n\t\tvar rst=0;\n\t\tvar i=0,len=0;\n\t\tvar cList;\n\t\tcList=node._childs;\n\t\tlen=cList.length;\n\t\trst=1;\n\t\tfor (i=0;i < len;i++){\n\t\t\trst+=NodeUtils.getRenderNodeCount(cList[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\tNodeUtils.showCachedSpriteRecs=function(){\n\t\tNodeUtils.g=DebugInfoLayer.I.graphicLayer.graphics;\n\t\tNodeUtils.g.clear();\n\t\tWalkTools.walkTarget(Laya.stage,NodeUtils.drawCachedBounds,null);\n\t}\n\n\tNodeUtils.drawCachedBounds=function(sprite){\n\t\tif (sprite.cacheAs==\"none\")return;\n\t\tif (DebugInfoLayer.I.isDebugItem(sprite))return;\n\t\tvar rec;\n\t\trec=NodeUtils.getGRec(sprite);\n\t\tNodeUtils.g.drawRect(rec.x,rec.y,rec.width,rec.height,null,\"#0000ff\",2);\n\t}\n\n\tNodeUtils.g=null;\n\t__static(NodeUtils,\n\t['defaultKeys',function(){return this.defaultKeys=[\"x\",\"y\",\"width\",\"height\"];}\n\t]);\n\treturn NodeUtils;\n})()\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.StyleConsts\nvar StyleConsts=(function(){\n\tfunction StyleConsts(){}\n\t__class(StyleConsts,'laya.debug.view.StyleConsts');\n\tStyleConsts.setViewScale=function(view){\n\t\tview.scaleX=view.scaleY=StyleConsts.PanelScale;\n\t}\n\n\t__static(StyleConsts,\n\t['PanelScale',function(){return this.PanelScale=Browser.onPC?1:Browser.pixelRatio;}\n\t]);\n\treturn StyleConsts;\n})()\n\n\n/**\n*本类用于模块间消息传递\n*@author ww\n*/\n//class laya.debug.tools.Notice extends laya.events.EventDispatcher\nvar Notice=(function(_super){\n\tfunction Notice(){\n\t\tNotice.__super.call(this);\n\t}\n\n\t__class(Notice,'laya.debug.tools.Notice',_super);\n\tNotice.notify=function(type,data){\n\t\tNotice.I.event(type,data);\n\t}\n\n\tNotice.listen=function(type,_scope,fun,args,cancelBefore){\n\t\t(cancelBefore===void 0)&& (cancelBefore=false);\n\t\tif(cancelBefore)Notice.cancel(type,_scope,fun);\n\t\tNotice.I.on(type,_scope,fun,args);\n\t}\n\n\tNotice.cancel=function(type,_scope,fun){\n\t\tNotice.I.off(type,_scope,fun);\n\t}\n\n\t__static(Notice,\n\t['I',function(){return this.I=new Notice();}\n\t]);\n\treturn Notice;\n})(EventDispatcher)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.enginehook.LoaderHook extends laya.net.LoaderManager\nvar LoaderHook=(function(_super){\n\tfunction LoaderHook(){\n\t\tLoaderHook.__super.call(this);\n\t}\n\n\t__class(LoaderHook,'laya.debug.tools.enginehook.LoaderHook',_super);\n\tvar __proto=LoaderHook.prototype;\n\t__proto.checkUrls=function(url){\n\t\tvar tarUrl;\n\t\tif ((typeof url=='string')){\n\t\t\ttarUrl=url;\n\t\t\t}else{\n\t\t\ttarUrl=url.url;\n\t\t}\n\t\tif (LoaderHook.preFails[tarUrl]){\n\t\t\tif (LoaderHook.enableFailDebugger){\n\t\t\t\tdebugger;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.chekUrlList=function(urls){\n\t\tvar i=0,len=0;\n\t\tlen=urls.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tthis.checkUrls(urls[i]);\n\t\t}\n\t}\n\n\t__proto.load=function(url,complete,progress,type,priority,cache,group,ignoreCache){\n\t\t(priority===void 0)&& (priority=1);\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tif ((url instanceof Array)){\n\t\t\tthis.chekUrlList(url);\n\t\t\t}else{\n\t\t\tthis.checkUrls(url);\n\t\t}\n\t\treturn _super.prototype.load.call(this,url,complete,progress,type,priority,cache,group,ignoreCache);\n\t}\n\n\tLoaderHook.init=function(){\n\t\tif (LoaderHook.isInited)return;\n\t\tLoaderHook.isInited=true;\n\t\tLaya.loader=new LoaderHook();\n\t\tLaya.loader.on(/*laya.events.Event.ERROR*/\"error\",null,LoaderHook.onFail);\n\t\tLoaderHook.preFails=LocalStorage.getJSON(\"LoadFailItems\");\n\t\tif (!LoaderHook.preFails)LoaderHook.preFails={};\n\t}\n\n\tLoaderHook.onFail=function(failFile){\n\t\tOutPutView.I.dTrace(\"LoadFail:\"+failFile);\n\t\tLoaderHook.nowFails[failFile]=true;\n\t\tLocalStorage.setJSON(\"LoadFailItems\",LoaderHook.nowFails);\n\t}\n\n\tLoaderHook.resetFails=function(){\n\t\tLoaderHook.nowFails={};\n\t\tLocalStorage.setJSON(\"LoadFailItems\",LoaderHook.nowFails);\n\t}\n\n\tLoaderHook.preFails={};\n\tLoaderHook.nowFails={};\n\tLoaderHook.enableFailDebugger=true;\n\tLoaderHook.FailSign=\"LoadFailItems\";\n\tLoaderHook.isInited=false;\n\treturn LoaderHook;\n})(LoaderManager)\n\n\n/**\n*颜色选取类\n*@author ww\n*/\n//class laya.debug.tools.ColorSelector extends laya.display.Sprite\nvar ColorSelector=(function(_super){\n\tfunction ColorSelector(){\n\t\tthis.sideColor=null;\n\t\tthis.mainColor=null;\n\t\tthis.demoColor=null;\n\t\tthis.posSp=null;\n\t\tthis.hPos=null;\n\t\tthis.container=null;\n\t\tthis.isChanging=false;\n\t\tthis.tColor=null;\n\t\tthis.tH=NaN;\n\t\tColorSelector.__super.call(this);\n\t\tthis.container=this;\n\t\tthis.createUI();\n\t}\n\n\t__class(ColorSelector,'laya.debug.tools.ColorSelector',_super);\n\tvar __proto=ColorSelector.prototype;\n\t__proto.createUI=function(){\n\t\tthis.sideColor=new Sprite();\n\t\tthis.container.addChild(this.sideColor);\n\t\tthis.posSp=new Sprite();\n\t\tthis.posSp.pos(100,100);\n\t\tthis.posSp.graphics.drawCircle(0,0,5,null,\"#ff0000\");\n\t\tthis.posSp.graphics.drawCircle(0,0,6,null,\"#ffff00\");\n\t\tthis.posSp.autoSize=true;\n\t\tthis.posSp.cacheAsBitmap=true;\n\t\tthis.sideColor.addChild(this.posSp);\n\t\tthis.sideColor.pos(0,0);\n\t\tthis.sideColor.size(150,150);\n\t\tthis.sideColor.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.sideColorClick);\n\t\tvar i=0;\n\t\tthis.mainColor=new Sprite();\n\t\tvar g;\n\t\tg=this.mainColor.graphics;\n\t\tvar h=NaN;\n\t\tvar s=NaN;\n\t\tvar b=NaN;\n\t\tvar rgb;\n\t\tfor (i=0;i < 150;i++){\n\t\t\trgb=ColorTool.hsb2rgb(i/150*360,1,1);\n\t\t\tg.drawLine(0,i,20,i,ColorTool.getRGBStr(rgb));\n\t\t}\n\t\tthis.mainColor.pos(150+10,0);\n\t\tthis.mainColor.size(20,i);\n\t\tthis.mainColor.cacheAsBitmap=true;\n\t\tthis.hPos=new Sprite();\n\t\tthis.hPos.graphics.drawPie(0,0,10,-10,10,\"#ff0000\");\n\t\tthis.hPos.x=this.mainColor.x+22;\n\t\tthis.container.addChild(this.hPos);\n\t\tthis.container.addChild(this.mainColor);\n\t\tthis.mainColor.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.mainColorClick);\n\t\tthis.demoColor=new Sprite();\n\t\tthis.demoColor.pos(this.sideColor.x,this.sideColor.y+this.sideColor.height+10);\n\t\tthis.demoColor.size(150,20);\n\t\tthis.container.addChild(this.demoColor);\n\t\tthis.setColorByRGBStr(\"#099599\");\n\t\tthis.posSp.on(/*laya.events.Event.DRAG_MOVE*/\"dragmove\",this,this.posDraging);\n\t}\n\n\t// posSp.on(Event.MOUSE_DOWN,this,posMouseDown);\n\t__proto.posMouseDown=function(e){}\n\t__proto.posDraging=function(){\n\t\tthis.updatePosSpAndShowColor();\n\t}\n\n\t__proto.posDragEnd=function(){\n\t\tthis.isChanging=false;\n\t\tthis.updatePosSpAndShowColor();\n\t}\n\n\t__proto.setColorByRGBStr=function(rgbStr){\n\t\tvar rgb;\n\t\trgb=ColorTool.getRGBByRGBStr(rgbStr);\n\t\tthis.setColor(rgb[0],rgb[1],rgb[2]);\n\t}\n\n\t__proto.setColor=function(red,green,blue,notice){\n\t\t(notice===void 0)&& (notice=true);\n\t\tvar hsb;\n\t\thsb=ColorTool.rgb2hsb(red,green,blue);\n\t\tvar tRGB;\n\t\ttRGB=ColorTool.hsb2rgb(hsb[0],hsb[1],hsb[2]);\n\t\tthis.setColorByHSB(hsb[0],hsb[1],hsb[2],notice);\n\t}\n\n\t__proto.setColorByHSB=function(h,s,b,notice){\n\t\t(notice===void 0)&& (notice=true);\n\t\tthis.hPos.y=this.mainColor.y+h/360*150;\n\t\tthis.posSp.x=s *150;\n\t\tthis.posSp.y=(1-b)*150;\n\t\tthis.updateSideColor(h,notice);\n\t}\n\n\t__proto.sideColorClick=function(e){\n\t\tthis.isChanging=true;\n\t\tthis.posSp.startDrag();\n\t\tthis.updatePosSpAndShowColor();\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.sideColorMouseUp);\n\t\tLaya.stage.once(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.sideColorMouseUp);\n\t}\n\n\t__proto.sideColorMouseUp=function(e){\n\t\tthis.isChanging=false;\n\t\tthis.updatePosSpAndShowColor();\n\t}\n\n\t__proto.updatePosSpAndShowColor=function(){\n\t\tthis.posSp.x=this.sideColor.mouseX;\n\t\tthis.posSp.y=this.sideColor.mouseY;\n\t\tif(this.posSp.x<0)this.posSp.x=0;\n\t\tif(this.posSp.y<0)this.posSp.y=0;\n\t\tif(this.posSp.x>150)this.posSp.x=150;\n\t\tif(this.posSp.y>150)this.posSp.y=150;\n\t\tthis.updateDemoColor();\n\t}\n\n\t__proto.updateDemoColor=function(notice){\n\t\t(notice===void 0)&& (notice=true);\n\t\tvar h=NaN;\n\t\tvar s=NaN;\n\t\tvar b=NaN;\n\t\th=this.tH;\n\t\ts=this.posSp.x / 150;\n\t\tb=1-this.posSp.y / 150;\n\t\tthis.tColor=ColorTool.hsb2rgb(h,s,b);\n\t\tvar g;\n\t\tg=this.demoColor.graphics;\n\t\tg.clear();\n\t\tg.drawRect(0,0,this.demoColor.width,this.demoColor.height,ColorTool.getRGBStr(this.tColor));\n\t\tif(this.isChanging)return;\n\t\tif(notice)\n\t\t\tthis.event(\"ColorChanged\",this);\n\t}\n\n\t__proto.mainColorClick=function(e){\n\t\tvar yPos=NaN;\n\t\tyPos=this.mainColor.mouseY;\n\t\tthis.hPos.y=yPos+this.mainColor.y;\n\t\tvar h=NaN;\n\t\th=yPos / 150 *360;\n\t\tthis.updateSideColor(h);\n\t}\n\n\t__proto.updateSideColor=function(h,notice){\n\t\t(notice===void 0)&& (notice=true);\n\t\tthis.tH=h;\n\t\tvar s=NaN;\n\t\tvar b=NaN;\n\t\tvar g;\n\t\tg=this.sideColor.graphics;\n\t\tg.clear();\n\t\tthis.sideColor.cacheAsBitmap=false;\n\t\tvar rgb;\n\t\trgb=ColorTool.hsb2rgb(h,1,1);\n\t\tvar gradient=Browser.context.createLinearGradient(0,0,80,0);\n\t\tgradient.addColorStop(0,\"white\");\n\t\tgradient.addColorStop(1,ColorTool.getRGBStr(rgb));\n\t\tthis.sideColor.graphics.drawRect(0,0,150,150,gradient);\n\t\tthis.sideColor.graphics.loadImage(\"comp/colorpicker_overlay.png\",0,0);\n\t\tthis.sideColor.size(150,150);\n\t\tthis.sideColor.cacheAsBitmap=true;\n\t\tthis.updateDemoColor(notice);\n\t}\n\n\tColorSelector.COLOR_CHANGED=\"ColorChanged\";\n\tColorSelector.COLOR_CLEARED=\"COLOR_CLEARED\";\n\tColorSelector.RecWidth=150;\n\treturn ColorSelector;\n})(Sprite)\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-12-30 下午1:59:34\n*/\n//class laya.debug.tools.comps.Arrow extends laya.display.Sprite\nvar Arrow=(function(_super){\n\tfunction Arrow(){\n\t\tArrow.__super.call(this);\n\t\tthis.drawMe();\n\t}\n\n\t__class(Arrow,'laya.debug.tools.comps.Arrow',_super);\n\tvar __proto=Arrow.prototype;\n\t__proto.drawMe=function(){\n\t\tvar g;\n\t\tg=this.graphics;\n\t\tg.clear();\n\t\tg.drawLine(0,0,-1,-1,\"#ff0000\");\n\t\tg.drawLine(0,0,1,-1,\"#ff0000\");\n\t}\n\n\treturn Arrow;\n})(Sprite)\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-12-30 下午2:03:32\n*/\n//class laya.debug.tools.comps.ArrowLine extends laya.display.Sprite\nvar ArrowLine=(function(_super){\n\tfunction ArrowLine(sign){\n\t\tthis.lineLen=160;\n\t\tthis.arrowLen=10;\n\t\tthis.sign=\"Y\";\n\t\tthis._targetChanger=null;\n\t\tthis._isMoving=false;\n\t\tthis.lenControl=new Rect();\n\t\tthis.rotationControl=new Rect();\n\t\tthis.lenChanger=ValueChanger.create(this,\"lineLen\");\n\t\tthis.lenControlXChanger=ValueChanger.create(this.lenControl,\"x\");\n\t\t(sign===void 0)&& (sign=\"X\");\n\t\tArrowLine.__super.call(this);\n\t\tthis.sign=sign;\n\t\tthis.addChild(this.lenControl);\n\t\tthis.addChild(this.rotationControl);\n\t\tthis.lenControl.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.controlMouseDown);\n\t\tthis.drawMe();\n\t}\n\n\t__class(ArrowLine,'laya.debug.tools.comps.ArrowLine',_super);\n\tvar __proto=ArrowLine.prototype;\n\t__proto.drawMe=function(){\n\t\tvar g;\n\t\tg=this.graphics;\n\t\tg.clear();\n\t\tg.drawLine(0,0,this.lineLen,0,\"#ffff00\");\n\t\tg.drawLine(this.lineLen,0,this.lineLen-this.arrowLen,-this.arrowLen,\"#ff0000\");\n\t\tg.drawLine(this.lineLen,0,this.lineLen-this.arrowLen,this.arrowLen,\"#ff0000\");\n\t\tg.fillText(this.sign,50,-5,\"\",\"#ff0000\",\"left\");\n\t\tif(this._isMoving&&this._targetChanger){\n\t\t\tg.fillText(this._targetChanger.key+\":\"+this._targetChanger.value.toFixed(2),this.lineLen-15,-25,\"\",\"#ffff00\",\"center\");\n\t\t}\n\t\tthis.lenControl.posTo(this.lineLen-15,0);\n\t\tthis.rotationControl.posTo(this.lineLen+10,0);\n\t\tthis.size(this.arrowLen,this.lineLen);\n\t}\n\n\t__proto.clearMoveEvents=function(){\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.stageMouseMove);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.stageMouseUp);\n\t}\n\n\t__proto.controlMouseDown=function(e){\n\t\tthis.clearMoveEvents();\n\t\tthis.lenControlXChanger.record();\n\t\tthis.lenChanger.record();\n\t\tif(this.targetChanger){\n\t\t\tthis.targetChanger.record();\n\t\t}\n\t\tthis._isMoving=true;\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.stageMouseMove);\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.stageMouseUp);\n\t}\n\n\t__proto.stageMouseMove=function(e){\n\t\tthis.lenControlXChanger.value=this.mouseX;\n\t\tthis.lenChanger.showValueByScale(this.lenControlXChanger.scaleValue);\n\t\tif(this.targetChanger){\n\t\t\tthis.targetChanger.showValueByScale(this.lenControlXChanger.scaleValue);\n\t\t}\n\t\tthis.drawMe();\n\t}\n\n\t__proto.stageMouseUp=function(e){\n\t\tthis._isMoving=false;\n\t\tthis.noticeChange();\n\t\tthis.clearMoveEvents();\n\t\tthis.lenControlXChanger.recover();\n\t\tthis.lenChanger.recover();\n\t\tthis.drawMe();\n\t}\n\n\t__proto.noticeChange=function(){\n\t\tvar dLen=NaN;\n\t\tdLen=this.lenChanger.dValue;\n\t\tconsole.log(\"lenChange:\",dLen);\n\t}\n\n\t__getset(0,__proto,'targetChanger',function(){\n\t\treturn this._targetChanger;\n\t\t},function(changer){\n\t\tif(this._targetChanger){\n\t\t\tthis._targetChanger.dispose();\n\t\t}\n\t\tthis._targetChanger=changer;\n\t});\n\n\treturn ArrowLine;\n})(Sprite)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.comps.AutoSizeRec extends laya.display.Sprite\nvar AutoSizeRec=(function(_super){\n\tfunction AutoSizeRec(type){\n\t\tthis.type=0;\n\t\tthis._color=\"#ffffff\";\n\t\tthis.preX=NaN;\n\t\tthis.preY=NaN;\n\t\tAutoSizeRec.__super.call(this);\n\t}\n\n\t__class(AutoSizeRec,'laya.debug.tools.comps.AutoSizeRec',_super);\n\tvar __proto=AutoSizeRec.prototype;\n\t__proto.setColor=function(color){\n\t\tthis._color=color;\n\t\tthis.reRender();\n\t}\n\n\t__proto.changeSize=function(){\n\t\tthis.reRender();\n\t}\n\n\t__proto.reRender=function(){\n\t\tvar g=this.graphics;\n\t\tg.clear();\n\t\tg.drawRect(0,0,this.width,this.height,this._color);\n\t}\n\n\t__proto.record=function(){\n\t\tthis.preX=this.x;\n\t\tthis.preY=this.y;\n\t}\n\n\t__proto.getDx=function(){\n\t\treturn this.x-this.preX;\n\t}\n\n\t__proto.getDy=function(){\n\t\treturn this.y-this.preY;\n\t}\n\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Sprite,this,'height',value);\n\t\tthis.changeSize();\n\t});\n\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Sprite,this,'width',value);\n\t\tthis.changeSize();\n\t});\n\n\treturn AutoSizeRec;\n})(Sprite)\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-12-30 下午2:37:05\n*/\n//class laya.debug.tools.comps.Axis extends laya.display.Sprite\nvar Axis=(function(_super){\n\tfunction Axis(){\n\t\tthis._target=null;\n\t\tthis._lenType=\n\t\t[\n\t\t[\"width\",\"height\"],\n\t\t[\"scaleX\",\"scaleY\"]];\n\t\tthis._type=1;\n\t\tthis.xAxis=new ArrowLine(\"X\");\n\t\tthis.yAxis=new ArrowLine(\"Y\");\n\t\tthis.controlBox=new Rect();\n\t\tthis._point=new Point();\n\t\tthis.oPoint=new Point();\n\t\tthis.myRotationChanger=ValueChanger.create(this,\"rotation\");\n\t\tthis.targetRotationChanger=ValueChanger.create(null,\"rotation\");\n\t\tthis.stageMouseRotationChanger=new ValueChanger();\n\t\tAxis.__super.call(this);\n\t\tthis.mouseEnabled=true;\n\t\tthis.size(1,1);\n\t\tthis.initMe();\n\t\tthis.xAxis.rotationControl.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.controlMouseDown);\n\t\tthis.yAxis.rotationControl.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.controlMouseDown);\n\t\tthis.controlBox.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.controlBoxMouseDown);\n\t\tthis.on(/*laya.events.Event.DRAG_MOVE*/\"dragmove\",this,this.dragging);\n\t}\n\n\t__class(Axis,'laya.debug.tools.comps.Axis',_super);\n\tvar __proto=Axis.prototype;\n\t__proto.updateChanges=function(){\n\t\tif(this._target){\n\t\t\tvar params;\n\t\t\tparams=this._lenType[this._type];\n\t\t\tthis.xAxis.targetChanger=ValueChanger.create(this._target,params[0]);\n\t\t\tthis.yAxis.targetChanger=ValueChanger.create(this._target,params[1]);\n\t\t}\n\t}\n\n\t__proto.switchType=function(){\n\t\tthis._type++;\n\t\tthis._type=this._type%this._lenType.length;\n\t\tthis.type=this._type;\n\t}\n\n\t__proto.controlBoxMouseDown=function(e){\n\t\tthis.startDrag();\n\t}\n\n\t__proto.dragging=function(){\n\t\tif (this._target){\n\t\t\tthis._point.setTo(this.x,this.y);\n\t\t\tDisControlTool.transPoint(this.parent,this._target.parent,this._point);\n\t\t\tthis._target.pos(this._point.x,this._point.y);\n\t\t}\n\t}\n\n\t__proto.initMe=function(){\n\t\tthis.addChild(this.xAxis);\n\t\tthis.addChild(this.yAxis);\n\t\tthis.yAxis.rotation=90;\n\t\tthis.addChild(this.controlBox);\n\t\tthis.controlBox.posTo(0,0);\n\t}\n\n\t__proto.clearMoveEvents=function(){\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.stageMouseMove);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.stageMouseUp);\n\t}\n\n\t__proto.controlMouseDown=function(e){\n\t\tthis.targetRotationChanger.target=this.target;\n\t\tthis.clearMoveEvents();\n\t\tthis.oPoint.setTo(0,0);\n\t\tthis.myRotationChanger.record();\n\t\tthis.oPoint=this.localToGlobal(this.oPoint);\n\t\tthis.stageMouseRotationChanger.value=this.getStageMouseRatation();\n\t\tthis.stageMouseRotationChanger.record();\n\t\tthis.targetRotationChanger.record();\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.stageMouseMove);\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.stageMouseUp);\n\t}\n\n\t__proto.getStageMouseRatation=function(){\n\t\treturn MathUtil.getRotation(this.oPoint.x,this.oPoint.y,Laya.stage.mouseX,Laya.stage.mouseY);\n\t}\n\n\t__proto.stageMouseMove=function(e){\n\t\tthis.stageMouseRotationChanger.value=this.getStageMouseRatation();\n\t\tvar dRotation=NaN;\n\t\tdRotation=-this.stageMouseRotationChanger.dValue;\n\t\tif(this.target){\n\t\t\tthis.targetRotationChanger.showValueByAdd(dRotation);\n\t\t\t}else{\n\t\t\tthis.myRotationChanger.showValueByAdd(dRotation);\n\t\t}\n\t}\n\n\t__proto.stageMouseUp=function(e){\n\t\tthis.noticeChange();\n\t\tthis.clearMoveEvents();\n\t}\n\n\t__proto.noticeChange=function(){\n\t\tconsole.log(\"rotate:\",-this.stageMouseRotationChanger.dValue);\n\t}\n\n\t__getset(0,__proto,'target',function(){\n\t\treturn this._target;\n\t\t},function(tar){\n\t\tthis._target=tar;\n\t\tthis.updateChanges();\n\t});\n\n\t__getset(0,__proto,'type',function(){\n\t\treturn this._type;\n\t\t},function(lenType){\n\t\tthis._type=lenType;\n\t\tthis.updateChanges();\n\t});\n\n\treturn Axis;\n})(Sprite)\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-12-30 下午3:23:06\n*/\n//class laya.debug.tools.comps.Rect extends laya.display.Sprite\nvar Rect=(function(_super){\n\tfunction Rect(){\n\t\tthis.recWidth=10;\n\t\tRect.__super.call(this);\n\t\tthis.drawMe();\n\t}\n\n\t__class(Rect,'laya.debug.tools.comps.Rect',_super);\n\tvar __proto=Rect.prototype;\n\t__proto.drawMe=function(){\n\t\tvar g;\n\t\tg=this.graphics;\n\t\tg.clear();\n\t\tg.drawRect(0,0,this.recWidth,this.recWidth,\"#22ff22\");\n\t\tthis.size(this.recWidth,this.recWidth);\n\t}\n\n\t__proto.posTo=function(x,y){\n\t\tthis.x=x-this.recWidth*0.5;\n\t\tthis.y=y-this.recWidth*0.5;\n\t}\n\n\treturn Rect;\n})(Sprite)\n\n\n//class laya.debug.tools.DragBox extends laya.display.Sprite\nvar DragBox=(function(_super){\n\tfunction DragBox(type){\n\t\tthis._box=null;\n\t\tthis._target=null;\n\t\tthis._currDir=null;\n\t\t/**0-无，1-水平，2-垂直，3-全部*/\n\t\tthis._type=0;\n\t\tthis.fixScale=NaN;\n\t\tDragBox.__super.call(this);\n\t\tthis._left=this.drawBlock();\n\t\tthis._right=this.drawBlock();\n\t\tthis._top=this.drawBlock();\n\t\tthis._bottom=this.drawBlock();\n\t\tthis._topLeft=this.drawBlock();\n\t\tthis._topRight=this.drawBlock();\n\t\tthis._bottomLeft=this.drawBlock();\n\t\tthis._bottomRight=this.drawBlock();\n\t\tthis._lastPoint=new Point();\n\t\tthis._type=type=3;\n\t\tthis.addChild(this._box=this.drawBorder(0,0,0xff0000));\n\t\tif (type==1 || type==3){\n\t\t\tthis.addChild(this._left);\n\t\t\tthis.addChild(this._right);\n\t\t}\n\t\tif (type==2 || type==3){\n\t\t\tthis.addChild(this._top);\n\t\t\tthis.addChild(this._bottom);\n\t\t}\n\t\tif (type==3){\n\t\t\tthis.addChild(this._topLeft);\n\t\t\tthis.addChild(this._topRight);\n\t\t\tthis.addChild(this._bottomLeft);\n\t\t\tthis.addChild(this._bottomRight);\n\t\t}\n\t\tthis.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onMouseDown);\n\t\tthis.mouseThrough=true;\n\t}\n\n\t__class(DragBox,'laya.debug.tools.DragBox',_super);\n\tvar __proto=DragBox.prototype;\n\t__proto.onMouseDown=function(e){\n\t\tthis._currDir=e.target;\n\t\tif(e.nativeEvent.shiftKey){\n\t\t\tthis.initFixScale();\n\t\t}\n\t\tif (this._currDir !=this){\n\t\t\tthis._lastPoint.x=Laya.stage.mouseX;\n\t\t\tthis._lastPoint.y=Laya.stage.mouseY;\n\t\t\tLaya.stage.on(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.onMouseMove);\n\t\t\tLaya.stage.on(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onMouseUp);\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n\n\t__proto.onMouseUp=function(e){\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.onMouseMove);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onMouseUp);\n\t}\n\n\t__proto.initFixScale=function(){\n\t\tthis.fixScale=this._target.height / this._target.width;\n\t}\n\n\t__proto.onMouseMove=function(e){\n\t\tvar scale=1;\n\t\tvar tx=(Laya.stage.mouseX-this._lastPoint.x)/ scale;\n\t\tvar ty=(Laya.stage.mouseY-this._lastPoint.y)/ scale;\n\t\tvar sameScale=false;\n\t\tvar adptX=NaN;\n\t\tvar adptY=NaN;\n\t\tif(e.nativeEvent.shiftKey){\n\t\t\tif(this.fixScale<0)this.initFixScale();\n\t\t\tadptY=tx *this.fixScale;\n\t\t\tadptX=ty/this.fixScale;\n\t\t\tsameScale=true;\n\t\t\tswitch(this._currDir){\n\t\t\t\tcase this._topLeft:\n\t\t\t\tcase this._bottomLeft:\n\t\t\t\t\tthis._currDir=this._left;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase this._topRight:\n\t\t\t\tcase this._bottomRight:\n\t\t\t\t\tthis._currDir=this._right;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\tif (tx !=0 || ty !=0){\n\t\t\tthis._lastPoint.x+=tx *scale;\n\t\t\tthis._lastPoint.y+=ty *scale;\n\t\t\tvar tw=tx / this._target.scaleX;\n\t\t\tvar th=ty / this._target.scaleY;\n\t\t\tif (this._currDir==this._left){\n\t\t\t\tthis._target.x+=tx;\n\t\t\t\tthis._target.width-=tw;\n\t\t\t\tif (sameScale){\n\t\t\t\t\tthis._target.height=this._target.width*this.fixScale;\n\t\t\t\t}\n\t\t\t\t}else if (this._currDir==this._right){\n\t\t\t\tthis._target.width+=tw;\n\t\t\t\tif (sameScale){\n\t\t\t\t\tthis._target.height=this._target.width*this.fixScale;\n\t\t\t\t}\n\t\t\t\t}else if (this._currDir==this._top){\n\t\t\t\tthis._target.y+=ty;\n\t\t\t\tthis._target.height-=th;\n\t\t\t\tif (sameScale){\n\t\t\t\t\tthis._target.width=this._target.height/this.fixScale;\n\t\t\t\t}\n\t\t\t\t}else if (this._currDir==this._bottom){\n\t\t\t\tthis._target.height+=th;\n\t\t\t\tif (sameScale){\n\t\t\t\t\tthis._target.width=this._target.height/this.fixScale;\n\t\t\t\t}\n\t\t\t\t}else if (this._currDir==this._topLeft){\n\t\t\t\tthis._target.x+=tx;\n\t\t\t\tthis._target.y+=ty;\n\t\t\t\tthis._target.width-=tw;\n\t\t\t\tthis._target.height-=th;\n\t\t\t\t}else if (this._currDir==this._topRight){\n\t\t\t\tthis._target.y+=ty;\n\t\t\t\tthis._target.width+=tw;\n\t\t\t\tthis._target.height-=th;\n\t\t\t\t}else if (this._currDir==this._bottomLeft){\n\t\t\t\tthis._target.x+=tx;\n\t\t\t\tthis._target.width-=tw;\n\t\t\t\tthis._target.height+=th;\n\t\t\t\t}else if (this._currDir==this._bottomRight){\n\t\t\t\tthis._target.width+=tw;\n\t\t\t\tthis._target.height+=th;\n\t\t\t}\n\t\t\tif (this._target.width < 1){\n\t\t\t\tthis._target.width=1;\n\t\t\t}\n\t\t\tif (this._target.height < 1){\n\t\t\t\tthis._target.height=1;\n\t\t\t}\n\t\t\tthis._target.width=Math.round(this._target.width);\n\t\t\tthis._target.x=Math.round(this._target.x);\n\t\t\tthis._target.y=Math.round(this._target.y);\n\t\t\tthis._target.height=Math.round(this._target.height);\n\t\t\tthis.refresh();\n\t\t}\n\t}\n\n\t/**画矩形*/\n\t__proto.drawBorder=function(width,height,color,alpha){\n\t\t(alpha===void 0)&& (alpha=1);\n\t\tvar box=new Sprite();\n\t\tvar g=box.graphics;\n\t\tg.clear();\n\t\tg.drawRect(0,0,width,height,null,\"#\"+color);\n\t\treturn box;\n\t}\n\n\t/**画矩形*/\n\t__proto.drawBlock=function(){\n\t\tvar box=new Sprite();\n\t\tvar g=box.graphics;\n\t\tg.clear();\n\t\tbox.width=DragBox.BLOCK_WIDTH;\n\t\tbox.height=DragBox.BLOCK_WIDTH;\n\t\tg.drawRect(-DragBox.BLOCK_WIDTH *0.5,-DragBox.BLOCK_WIDTH *0.5,DragBox.BLOCK_WIDTH,DragBox.BLOCK_WIDTH,\"#ffffff\",\"#ff0000\",1);\n\t\tbox.mouseEnabled=true;\n\t\tbox.mouseThrough=true;\n\t\treturn box;\n\t}\n\n\t/**设置对象*/\n\t__proto.setTarget=function(target){\n\t\tthis._target=target;\n\t\tthis.refresh();\n\t}\n\n\t__proto.refresh=function(){\n\t\tthis.changePoint();\n\t\tthis.changeSize();\n\t}\n\n\t__proto.changePoint=function(){\n\t\tvar p=this._target.localToGlobal(new Point());\n\t\tvar np=(this.parent).globalToLocal(p);\n\t\tthis.x=np.x;\n\t\tthis.y=np.y;\n\t}\n\n\t/**设置大小*/\n\t__proto.changeSize=function(){\n\t\tvar width=this._target.width *this._target.scaleX;\n\t\tvar height=this._target.height *this._target.scaleY;\n\t\tconsole.log(\"change size\");\n\t\tthis.rotation=this._target.rotation;\n\t\tif (this._box.width !=width || this._box.height !=height){\n\t\t\tthis._box.graphics.clear();\n\t\t\tthis._box.graphics.drawRect(0,0,Math.abs(width),Math.abs(height),null,\"#ff0000\");\n\t\t\tthis._box.size(width,height);\n\t\t\tthis.size(width,height);\n\t\t\tthis._box.scaleX=Math.abs(this._box.scaleX)*(this._target.scaleX > 0 ? 1 :-1);\n\t\t\tthis._box.scaleY=Math.abs(this._box.scaleY)*(this._target.scaleY > 0 ? 1 :-1);\n\t\t\tthis._left.x=0;\n\t\t\tthis._left.y=height *0.5;\n\t\t\tthis._right.x=width;\n\t\t\tthis._right.y=height *0.5;\n\t\t\tthis._top.x=width *0.5;\n\t\t\tthis._top.y=0;\n\t\t\tthis._bottom.x=width *0.5;\n\t\t\tthis._bottom.y=height;\n\t\t\tthis._topLeft.x=this._topLeft.y=0;\n\t\t\tthis._topRight.x=width;\n\t\t\tthis._topRight.y=0;\n\t\t\tthis._bottomLeft.x=0;\n\t\t\tthis._bottomLeft.y=height;\n\t\t\tthis._bottomRight.x=width;\n\t\t\tthis._bottomRight.y=height;\n\t\t}\n\t}\n\n\tDragBox.BLOCK_WIDTH=6;\n\treturn DragBox;\n})(Sprite)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.DebugInfoLayer extends laya.display.Sprite\nvar DebugInfoLayer=(function(_super){\n\tfunction DebugInfoLayer(){\n\t\tthis.nodeRecInfoLayer=null;\n\t\tthis.lineLayer=null;\n\t\tthis.txtLayer=null;\n\t\tthis.popLayer=null;\n\t\tthis.graphicLayer=null;\n\t\tthis.cacheViewLayer=null;\n\t\tDebugInfoLayer.__super.call(this);\n\t\tthis.nodeRecInfoLayer=new Sprite();\n\t\tthis.lineLayer=new Sprite();\n\t\tthis.txtLayer=new Sprite();\n\t\tthis.popLayer=new Sprite();\n\t\tthis.graphicLayer=new Sprite();\n\t\tthis.cacheViewLayer=new Sprite();\n\t\tthis.nodeRecInfoLayer.name=\"nodeRecInfoLayer\";\n\t\tthis.lineLayer.name=\"lineLayer\";\n\t\tthis.txtLayer.name=\"txtLayer\";\n\t\tthis.popLayer.name=\"popLayer\";\n\t\tthis.graphicLayer.name=\"graphicLayer\";\n\t\tthis.cacheViewLayer.name=\"cacheViewLayer\";\n\t\tthis.addChild(this.lineLayer);\n\t\tthis.addChild(this.cacheViewLayer);\n\t\tthis.addChild(this.nodeRecInfoLayer);\n\t\tthis.addChild(this.txtLayer);\n\t\tthis.addChild(this.popLayer);\n\t\tthis.addChild(this.graphicLayer);\n\t\tDebugInfoLayer.I=this;\n\t\tthis.zOrder=999;\n\t\tLaya.stage.on(/*laya.events.Event.DOUBLE_CLICK*/\"doubleclick\",this,this.setTop);\n\t}\n\n\t__class(DebugInfoLayer,'laya.debug.view.nodeInfo.DebugInfoLayer',_super);\n\tvar __proto=DebugInfoLayer.prototype;\n\t__proto.setTop=function(){\n\t\tDisControlTool.setTop(this);\n\t}\n\n\t__proto.isDebugItem=function(sprite){\n\t\treturn DisControlTool.isInTree(this,sprite);\n\t}\n\n\tDebugInfoLayer.init=function(){\n\t\tif (!DebugInfoLayer.I){\n\t\t\tnew DebugInfoLayer();\n\t\t\tLaya.stage.addChild(DebugInfoLayer.I);\n\t\t}\n\t}\n\n\tDebugInfoLayer.I=null;\n\treturn DebugInfoLayer;\n})(Sprite)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.NodeInfoPanel extends laya.display.Sprite\nvar NodeInfoPanel=(function(_super){\n\tfunction NodeInfoPanel(){\n\t\tthis._stateDic={};\n\t\tthis.isWorkState=false;\n\t\tNodeInfoPanel.__super.call(this);\n\t}\n\n\t__class(NodeInfoPanel,'laya.debug.view.nodeInfo.NodeInfoPanel',_super);\n\tvar __proto=NodeInfoPanel.prototype;\n\t__proto.showDisInfo=function(node){\n\t\tthis.recoverNodes();\n\t\tNodeInfosItem.showDisInfos(node);\n\t\tthis.showOnly(node);\n\t\tthis.isWorkState=true;\n\t}\n\n\t__proto.showOnly=function(node){\n\t\tif (!node)\n\t\t\treturn;\n\t\tthis.hideBrothers(node);\n\t\tthis.showOnly(node.parent);\n\t}\n\n\t__proto.recoverNodes=function(){\n\t\tNodeInfosItem.hideAllInfos();\n\t\tvar key;\n\t\tvar data;\n\t\tvar tTar;\n\t\tfor (key in this._stateDic){\n\t\t\tdata=this._stateDic[key];\n\t\t\ttTar=data[\"target\"];\n\t\t\tif (tTar){\n\t\t\t\ttry{\n\t\t\t\t\ttTar.visible=data.visible;\n\t\t\t\t\t}catch (e){\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.isWorkState=false;\n\t}\n\n\t__proto.hideOtherChain=function(node){\n\t\tif (!node)\n\t\t\treturn;\n\t\twhile (node){\n\t\t\tthis.hideBrothers(node);\n\t\t\tnode=node.parent;\n\t\t}\n\t}\n\n\t__proto.hideChilds=function(node){\n\t\tif (!node)\n\t\t\treturn;\n\t\tvar i=0,len=0;\n\t\tvar cList;\n\t\tcList=node._childs;\n\t\tlen=cList.length;\n\t\tvar tChild;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttChild=cList[i];\n\t\t\tif (tChild==NodeInfosItem.NodeInfoContainer)continue ;\n\t\t\tthis.saveNodeInfo(tChild);\n\t\t\ttChild.visible=false;\n\t\t}\n\t}\n\n\t__proto.hideBrothers=function(node){\n\t\tif (!node)\n\t\t\treturn;\n\t\tvar p;\n\t\tp=node.parent;\n\t\tif (!p)\n\t\t\treturn;\n\t\tvar i=0,len=0;\n\t\tvar cList;\n\t\tcList=p._childs;\n\t\tlen=cList.length;\n\t\tvar tChild;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttChild=cList[i];\n\t\t\tif (tChild==NodeInfosItem.NodeInfoContainer)continue ;\n\t\t\tif (tChild !=node){\n\t\t\t\tthis.saveNodeInfo(tChild);\n\t\t\t\ttChild.visible=false;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.saveNodeInfo=function(node){\n\t\tIDTools.idObj(node);\n\t\tif(this._stateDic.hasOwnProperty(IDTools.getObjID(node)))return;\n\t\tvar data;\n\t\tdata={};\n\t\tdata.target=node;\n\t\tdata.visible=node.visible;\n\t\tthis._stateDic[IDTools.getObjID(node)]=data;\n\t}\n\n\t__proto.recoverNodeInfo=function(node){\n\t\tIDTools.idObj(node);\n\t\tif (this._stateDic.hasOwnProperty(IDTools.getObjID(node))){\n\t\t\tvar data;\n\t\t\tdata=this._stateDic[IDTools.getObjID(node)];\n\t\t\tnode[\"visible\"]=data.visible;\n\t\t}\n\t}\n\n\tNodeInfoPanel.init=function(){\n\t\tif (!NodeInfoPanel.I){\n\t\t\tNodeInfoPanel.I=new NodeInfoPanel();\n\t\t\tNodeInfosItem.init();\n\t\t\tToolPanel.init();\n\t\t}\n\t}\n\n\tNodeInfoPanel.I=null;\n\treturn NodeInfoPanel;\n})(Sprite)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.NodeInfosItem extends laya.display.Sprite\nvar NodeInfosItem=(function(_super){\n\tfunction NodeInfosItem(){\n\t\t//addChild(_infoTxt);\n\t\tthis._infoTxt=null;\n\t\tthis._tar=null;\n\t\tNodeInfosItem.__super.call(this);\n\t\tthis._infoTxt=new Text();\n\t\tthis._infoTxt.color=\"#ff0000\";\n\t\tthis._infoTxt.bgColor=\"#00ff00\";\n\t\tthis._infoTxt.fontSize=12;\n\t}\n\n\t__class(NodeInfosItem,'laya.debug.view.nodeInfo.NodeInfosItem',_super);\n\tvar __proto=NodeInfosItem.prototype;\n\t__proto.removeSelf=function(){\n\t\tthis._infoTxt.removeSelf();\n\t\treturn laya.display.Node.prototype.removeSelf.call(this);\n\t}\n\n\t__proto.showToUI=function(){\n\t\tNodeInfosItem.NodeInfoContainer.nodeRecInfoLayer.addChild(this);\n\t\tthis._infoTxt.removeSelf();\n\t\tNodeInfosItem.NodeInfoContainer.txtLayer.addChild(this._infoTxt);\n\t\tthis.findOkPos();\n\t}\n\n\t__proto.randomAPos=function(r){\n\t\tthis._infoTxt.x=this.x+Laya.stage.width*Math.random();\n\t\tthis._infoTxt.y=this.y+r *Math.random();\n\t}\n\n\t__proto.findOkPos=function(){\n\t\tvar len=0;\n\t\tlen=20;\n\t\tthis.randomAPos(len);\n\t\treturn;\n\t\tvar count=0;\n\t\tcount=1;\n\t\twhile (!this.isPosOk()){\n\t\t\tcount++;\n\t\t\tif (count >=500){\n\t\t\t\tlen+=10;\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tthis.randomAPos(len);\n\t\t}\n\t}\n\n\t__proto.isPosOk=function(){\n\t\tvar tParent;\n\t\ttParent=NodeInfosItem.NodeInfoContainer.nodeRecInfoLayer;\n\t\tvar i=0,len=0;\n\t\tvar cList;\n\t\tcList=tParent._childs;\n\t\tlen=cList.length;\n\t\tvar tChild;\n\t\tvar mRec;\n\t\tmRec=this._infoTxt.getBounds();\n\t\tif (mRec.x < 0)return false;\n\t\tif (mRec.y < 0)return false;\n\t\tif (mRec.right > Laya.stage.width)return false;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttChild=cList[i];\n\t\t\tif (tChild==this._infoTxt)continue ;\n\t\t\tif (mRec.intersects(tChild.getBounds()))return false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t__proto.showInfo=function(node){\n\t\tthis._tar=node;\n\t\tif (!node)return;\n\t\tNodeInfosItem._txts.length=0;\n\t\tvar i=0,len=0;\n\t\tvar tKey;\n\t\tlen=NodeInfosItem.showValues.length;\n\t\tif (node.name){\n\t\t\tNodeInfosItem._txts.push(ClassTool.getClassName(node)+\"(\"+node.name+\")\");\n\t\t\t}else{\n\t\t\tNodeInfosItem._txts.push(ClassTool.getClassName(node));\n\t\t}\n\t\tfor (i=0;i < len;i++){\n\t\t\ttKey=NodeInfosItem.showValues[i];\n\t\t\tNodeInfosItem._txts.push(tKey+\":\"+NodeInfosItem.getNodeValue(node,tKey));\n\t\t}\n\t\tthis._infoTxt.text=NodeInfosItem._txts.join(\"\\n\");\n\t\tthis.graphics.clear();\n\t\tvar pointList;\n\t\tpointList=node._getBoundPointsM(true);\n\t\tif(!pointList||pointList.length<1)return;\n\t\tpointList=GrahamScan.pListToPointList(pointList,true);\n\t\tWalkTools.walkArr(pointList,node.localToGlobal,node);\n\t\tpointList=GrahamScan.pointListToPlist(pointList);\n\t\tNodeInfosItem._disBoundRec=Rectangle._getWrapRec(pointList,NodeInfosItem._disBoundRec);\n\t\tthis.graphics.drawRect(0,0,NodeInfosItem._disBoundRec.width,NodeInfosItem._disBoundRec.height,null,\"#00ffff\");\n\t\tthis.pos(NodeInfosItem._disBoundRec.x,NodeInfosItem._disBoundRec.y);\n\t}\n\n\t__proto.fresh=function(){\n\t\tthis.showInfo(this._tar);\n\t}\n\n\t__proto.clearMe=function(){\n\t\tthis._tar=null;\n\t}\n\n\t__proto.recover=function(){\n\t\tPool.recover(\"NodeInfosItem\",this);\n\t}\n\n\tNodeInfosItem.init=function(){\n\t\tif (!NodeInfosItem.NodeInfoContainer){\n\t\t\tDebugInfoLayer.init();\n\t\t\tNodeInfosItem.NodeInfoContainer=DebugInfoLayer.I;\n\t\t\tLaya.stage.addChild(NodeInfosItem.NodeInfoContainer);\n\t\t}\n\t}\n\n\tNodeInfosItem.getNodeInfoByNode=function(node){\n\t\tIDTools.idObj(node);\n\t\tvar key=0;\n\t\tkey=IDTools.getObjID(node);\n\t\tif (!NodeInfosItem._nodeInfoDic[key]){\n\t\t\tNodeInfosItem._nodeInfoDic[key]=new NodeInfosItem();\n\t\t}\n\t\treturn NodeInfosItem._nodeInfoDic[key];\n\t}\n\n\tNodeInfosItem.hideAllInfos=function(){\n\t\tvar key;\n\t\tvar tInfo;\n\t\tfor (key in NodeInfosItem._nodeInfoDic){\n\t\t\ttInfo=NodeInfosItem._nodeInfoDic[key];\n\t\t\ttInfo.removeSelf();\n\t\t}\n\t\tNodeInfosItem.clearRelations();\n\t}\n\n\tNodeInfosItem.showNodeInfo=function(node){\n\t\tvar nodeInfo;\n\t\tnodeInfo=NodeInfosItem.getNodeInfoByNode(node);\n\t\tnodeInfo.showInfo(node);\n\t\tnodeInfo.showToUI();\n\t}\n\n\tNodeInfosItem.showDisInfos=function(node){\n\t\tvar _node;\n\t\t_node=node;\n\t\tif (!node)\n\t\t\treturn;\n\t\twhile (node){\n\t\t\tNodeInfosItem.showNodeInfo(node);\n\t\t\tnode=node.parent;\n\t\t}\n\t\tDisControlTool.setTop(NodeInfosItem.NodeInfoContainer);\n\t\tNodeInfosItem.apdtTxtInfoPoss(_node);\n\t\tNodeInfosItem.updateRelations();\n\t}\n\n\tNodeInfosItem.apdtTxtInfoPoss=function(node){\n\t\tvar disList;\n\t\tdisList=[];\n\t\twhile (node){\n\t\t\tdisList.push(node);\n\t\t\tnode=node.parent;\n\t\t};\n\t\tvar i=0,len=0;\n\t\tvar tInfo;\n\t\tvar tTxt;\n\t\tlen=disList.length;\n\t\tvar xPos=NaN;\n\t\txPos=Laya.stage.width-150;\n\t\tvar heightLen=0;\n\t\theightLen=100;\n\t\tnode=disList[0];\n\t\tif (node){\n\t\t\ttInfo=NodeInfosItem.getNodeInfoByNode(node);\n\t\t\tif (tInfo){\n\t\t\t\ttTxt=tInfo._infoTxt;\n\t\t\t\txPos=Laya.stage.width-tTxt.width-10;\n\t\t\t\theightLen=tTxt.height+10;\n\t\t\t}\n\t\t}\n\t\tdisList=disList.reverse();\n\t\tfor (i=0;i < len;i++){\n\t\t\tnode=disList[i];\n\t\t\ttInfo=NodeInfosItem.getNodeInfoByNode(node);\n\t\t\tif (tInfo){\n\t\t\t\ttTxt=tInfo._infoTxt;\n\t\t\t\ttTxt.pos(xPos,heightLen *i);\n\t\t\t}\n\t\t}\n\t}\n\n\tNodeInfosItem.clearRelations=function(){\n\t\tvar g;\n\t\tg=NodeInfosItem.NodeInfoContainer.lineLayer.graphics;\n\t\tg.clear();\n\t}\n\n\tNodeInfosItem.updateRelations=function(){\n\t\tvar g;\n\t\tg=NodeInfosItem.NodeInfoContainer.lineLayer.graphics;\n\t\tg.clear();\n\t\tvar key;\n\t\tvar tInfo;\n\t\tfor (key in NodeInfosItem._nodeInfoDic){\n\t\t\ttInfo=NodeInfosItem._nodeInfoDic[key];\n\t\t\tif (tInfo.parent){\n\t\t\t\tg.drawLine(tInfo.x,tInfo.y,tInfo._infoTxt.x,tInfo._infoTxt.y,\"#0000ff\");\n\t\t\t}\n\t\t}\n\t}\n\n\tNodeInfosItem.getNodeValue=function(node,key){\n\t\tvar rst;\n\t\tNodeInfosItem._nodePoint.setTo(0,0);\n\t\tswitch(key){\n\t\t\tcase \"x\":\n\t\t\t\trst=node[\"x\"]+\" (g:\"+node.localToGlobal(NodeInfosItem._nodePoint).x+\")\"\n\t\t\t\tbreak ;\n\t\t\tcase \"y\":\n\t\t\t\trst=node[\"y\"]+\" (g:\"+node.localToGlobal(NodeInfosItem._nodePoint).y+\")\"\n\t\t\t\tbreak ;\n\t\t\tdefault :\n\t\t\t\trst=node[key];\n\t\t\t}\n\t\treturn rst;\n\t}\n\n\tNodeInfosItem.NodeInfoContainer=null;\n\tNodeInfosItem._nodeInfoDic={};\n\tNodeInfosItem._txts=[];\n\t__static(NodeInfosItem,\n\t['showValues',function(){return this.showValues=[\"x\",\"y\",\"scaleX\",\"scaleY\",\"width\",\"height\",\"visible\",\"mouseEnabled\"];},'_disBoundRec',function(){return this._disBoundRec=new Rectangle();},'_nodePoint',function(){return this._nodePoint=new Point();}\n\t]);\n\treturn NodeInfosItem;\n})(Sprite)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.recinfos.NodeRecInfo extends laya.display.Sprite\nvar NodeRecInfo=(function(_super){\n\tfunction NodeRecInfo(){\n\t\tthis.txt=null;\n\t\tthis._tar=null;\n\t\tthis.recColor=\"#00ff00\";\n\t\tNodeRecInfo.__super.call(this);\n\t\tthis.txt=new Text();\n\t\tthis.txt.color=\"#ff0000\";\n\t\tthis.txt.bgColor=\"#00ff00\";\n\t\tthis.txt.fontSize=12;\n\t\tthis.addChild(this.txt);\n\t}\n\n\t__class(NodeRecInfo,'laya.debug.view.nodeInfo.recinfos.NodeRecInfo',_super);\n\tvar __proto=NodeRecInfo.prototype;\n\t__proto.setInfo=function(str){\n\t\tthis.txt.text=str;\n\t}\n\n\t__proto.setTarget=function(tar){\n\t\tthis._tar=tar;\n\t}\n\n\t__proto.showInfo=function(node){\n\t\tthis._tar=node;\n\t\tif (!node)return;\n\t\tif(!node._$P)return;\n\t\tthis.graphics.clear();\n\t\tvar pointList;\n\t\tpointList=node._getBoundPointsM(true);\n\t\tif(!pointList||pointList.length<1)return;\n\t\tpointList=GrahamScan.pListToPointList(pointList,true);\n\t\tWalkTools.walkArr(pointList,node.localToGlobal,node);\n\t\tpointList=GrahamScan.pointListToPlist(pointList);\n\t\tNodeRecInfo._disBoundRec=Rectangle._getWrapRec(pointList,NodeRecInfo._disBoundRec);\n\t\tthis.graphics.drawRect(0,0,NodeRecInfo._disBoundRec.width,NodeRecInfo._disBoundRec.height,null,DebugConsts.RECACHE_REC_COLOR,2);\n\t\tthis.pos(NodeRecInfo._disBoundRec.x,NodeRecInfo._disBoundRec.y);\n\t}\n\n\t__proto.fresh=function(){\n\t\tthis.showInfo(this._tar);\n\t}\n\n\t__proto.clearMe=function(){\n\t\tthis._tar=null;\n\t}\n\n\t__static(NodeRecInfo,\n\t['_disBoundRec',function(){return this._disBoundRec=new Rectangle();}\n\t]);\n\treturn NodeRecInfo;\n})(Sprite)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.ToolPanel extends laya.display.Sprite\nvar ToolPanel=(function(_super){\n\tfunction ToolPanel(){\n\t\tToolPanel.__super.call(this);\n\t\tBase64AtlasManager.base64.preLoad(Handler.create(this,this.showToolBar));\n\t\tContextMenu.init();\n\t\tDisResizer.init();\n\t\tvar tipManager;\n\t\ttipManager=new TipManagerForDebug();\n\t}\n\n\t__class(ToolPanel,'laya.debug.view.nodeInfo.ToolPanel',_super);\n\tvar __proto=ToolPanel.prototype;\n\t//Laya.timer.once(1000,this,showToolBar);\n\t__proto.showToolBar=function(){\n\t\tDebugPanelView.I.show();\n\t}\n\n\t__proto.createViews=function(){\n\t\tToolPanel.typeClassDic[\"Find\"]=FindView;\n\t\tToolPanel.typeClassDic[\"Filter\"]=FilterView;\n\t\tToolPanel.typeClassDic[\"TxtInfo\"]=TxtInfoView;\n\t\tToolPanel.typeClassDic[\"Tree\"]=NodeTreeView;\n\t}\n\n\t__proto.switchShow=function(type){\n\t\tvar view;\n\t\tview=this.getView(type);\n\t\tif (view){\n\t\t\tview.switchShow();\n\t\t}\n\t}\n\n\t__proto.getView=function(type){\n\t\tvar view;\n\t\tview=ToolPanel.viewDic[type];\n\t\tif (!view && ToolPanel.typeClassDic[type]){\n\t\t\tview=ToolPanel.viewDic[type]=new ToolPanel.typeClassDic[type]();\n\t\t}\n\t\treturn view;\n\t}\n\n\t__proto.showTxtInfo=function(txt){\n\t\tOutPutView.I.showTxt(txt);\n\t}\n\n\t__proto.showNodeTree=function(node){\n\t\tNodeTree.I.setDis(node);\n\t\tDebugPanelView.I.switchToTree();\n\t}\n\n\t__proto.showSelectInStage=function(node){\n\t\tNodeTree.I.showSelectInStage(node);\n\t\tDebugPanelView.I.switchToTree();\n\t}\n\n\t__proto.showSelectItems=function(selectList){\n\t\tDebugPanelView.I.swichToSelect();\n\t\tSelectInfosView.I.setSelectList(selectList);\n\t}\n\n\tToolPanel.init=function(){\n\t\tif (!ToolPanel.I)ToolPanel.I=new ToolPanel();\n\t}\n\n\tToolPanel.I=null;\n\tToolPanel.viewDic={};\n\tToolPanel.Find=\"Find\";\n\tToolPanel.Filter=\"Filter\";\n\tToolPanel.TxtInfo=\"TxtInfo\";\n\tToolPanel.Tree=\"Tree\";\n\t__static(ToolPanel,\n\t['typeClassDic',function(){return this.typeClassDic={\n\t};}\n\n\t]);\n\treturn ToolPanel;\n})(Sprite)\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-9-29 上午11:17:35\n*/\n//class laya.debug.tools.debugUI.DButton extends laya.display.Text\nvar DButton=(function(_super){\n\tfunction DButton(){\n\t\tDButton.__super.call(this);\n\t\tthis.bgColor=\"#ffff00\";\n\t\tthis.wordWrap=false;\n\t\tthis.mouseEnabled=true;\n\t}\n\n\t__class(DButton,'laya.debug.tools.debugUI.DButton',_super);\n\treturn DButton;\n})(Text)\n\n\n/**\n*自动根据大小填充自己全部区域的显示对象\n*@author ww\n*/\n//class laya.debug.tools.resizer.AutoFillRec extends laya.ui.Component\nvar AutoFillRec=(function(_super){\n\tfunction AutoFillRec(type){\n\t\tthis.type=0;\n\t\tthis.preX=NaN;\n\t\tthis.preY=NaN;\n\t\tAutoFillRec.__super.call(this);\n\t}\n\n\t__class(AutoFillRec,'laya.debug.tools.resizer.AutoFillRec',_super);\n\tvar __proto=AutoFillRec.prototype;\n\t//super(type);\n\t__proto.changeSize=function(){\n\t\t_super.prototype.changeSize.call(this);\n\t\tvar g=this.graphics;\n\t\tg.clear();\n\t\tg.drawRect(0,0,this.width,this.height,\"#33c5f5\");\n\t}\n\n\t__proto.record=function(){\n\t\tthis.preX=this.x;\n\t\tthis.preY=this.y;\n\t}\n\n\t__proto.getDx=function(){\n\t\treturn this.x-this.preX;\n\t}\n\n\t__proto.getDy=function(){\n\t\treturn this.y-this.preY;\n\t}\n\n\treturn AutoFillRec;\n})(Component)\n\n\n/**鼠标提示管理类*/\n//class laya.debug.tools.TipManagerForDebug extends laya.ui.Component\nvar TipManagerForDebug=(function(_super){\n\tfunction TipManagerForDebug(){\n\t\tthis._tipBox=null;\n\t\tthis._tipText=null;\n\t\tthis._defaultTipHandler=null;\n\t\tTipManagerForDebug.__super.call(this);\n\t\tthis._tipBox=new Component();\n\t\tthis._tipBox.addChild(this._tipText=new Text());\n\t\tthis._tipText.x=this._tipText.y=5;\n\t\tthis._tipText.color=TipManagerForDebug.tipTextColor;\n\t\tthis._defaultTipHandler=this.showDefaultTip;\n\t\tLaya.stage.on(/*laya.ui.UIEvent.SHOW_TIP*/\"showtip\",this,this.onStageShowTip);\n\t\tLaya.stage.on(/*laya.ui.UIEvent.HIDE_TIP*/\"hidetip\",this,this.onStageHideTip);\n\t}\n\n\t__class(TipManagerForDebug,'laya.debug.tools.TipManagerForDebug',_super);\n\tvar __proto=TipManagerForDebug.prototype;\n\t__proto.onStageHideTip=function(e){\n\t\tLaya.timer.clear(this,this.showTip);\n\t\tthis.closeAll();\n\t\tthis.removeSelf();\n\t}\n\n\t__proto.onStageShowTip=function(data){\n\t\tLaya.timer.once(TipManagerForDebug.tipDelay,this,this.showTip,[data],true);\n\t}\n\n\t__proto.showTip=function(tip){\n\t\tif ((typeof tip=='string')){\n\t\t\tvar text=String(tip);\n\t\t\tif (Boolean(text)){\n\t\t\t\tthis._defaultTipHandler(text);\n\t\t\t}\n\t\t\t}else if ((tip instanceof laya.utils.Handler )){\n\t\t\t(tip).run();\n\t\t\t}else if ((typeof tip=='function')){\n\t\t\t(tip).apply();\n\t\t}\n\t\tif (true){\n\t\t\tLaya.stage.on(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.onStageMouseMove);\n\t\t\tLaya.stage.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onStageMouseDown);\n\t\t}\n\t\tthis.onStageMouseMove(null);\n\t}\n\n\t__proto.onStageMouseDown=function(e){\n\t\tthis.closeAll();\n\t}\n\n\t__proto.onStageMouseMove=function(e){\n\t\tthis.showToStage(this,TipManagerForDebug.offsetX,TipManagerForDebug.offsetY);\n\t}\n\n\t__proto.showToStage=function(dis,offX,offY){\n\t\t(offX===void 0)&& (offX=0);\n\t\t(offY===void 0)&& (offY=0);\n\t\tvar rec=dis.getBounds();\n\t\tdis.x=Laya.stage.mouseX+offX;\n\t\tdis.y=Laya.stage.mouseY+offY;\n\t\tif (dis.x+rec.width > Laya.stage.width){\n\t\t\tdis.x-=rec.width+offX;\n\t\t}\n\t\tif (dis.y+rec.height > Laya.stage.height){\n\t\t\tdis.y-=rec.height+offY;\n\t\t}\n\t}\n\n\t/**关闭所有鼠标提示*/\n\t__proto.closeAll=function(){\n\t\tLaya.timer.clear(this,this.showTip);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.onStageMouseMove);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onStageMouseDown);\n\t\tthis.removeChildren();\n\t}\n\n\t__proto.showDisTip=function(tip){\n\t\tthis.addChild(tip);\n\t\tthis.showToStage(this);\n\t\tLaya.stage.addChild(this);\n\t}\n\n\t__proto.showDefaultTip=function(text){\n\t\tthis._tipText.text=text;\n\t\tvar g=this._tipBox.graphics;\n\t\tg.clear();\n\t\tg.drawRect(0,0,this._tipText.width+10,this._tipText.height+10,TipManagerForDebug.tipBackColor);\n\t\tthis.addChild(this._tipBox);\n\t\tthis.showToStage(this);\n\t\tLaya.stage.addChild(this);\n\t}\n\n\t/**默认鼠标提示函数*/\n\t__getset(0,__proto,'defaultTipHandler',function(){\n\t\treturn this._defaultTipHandler;\n\t\t},function(value){\n\t\tthis._defaultTipHandler=value;\n\t});\n\n\tTipManagerForDebug.offsetX=10;\n\tTipManagerForDebug.offsetY=15;\n\tTipManagerForDebug.tipTextColor=\"#ffffff\";\n\tTipManagerForDebug.tipBackColor=\"#111111\";\n\tTipManagerForDebug.tipDelay=200;\n\treturn TipManagerForDebug;\n})(Component)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.UIViewBase extends laya.ui.Component\nvar UIViewBase=(function(_super){\n\tfunction UIViewBase(){\n\t\tthis.minHandler=null;\n\t\tthis.maxHandler=null;\n\t\tthis.isFirstShow=true;\n\t\tthis.dis=null;\n\t\tUIViewBase.__super.call(this);\n\t\tthis.dis=this;\n\t\tthis.minHandler=new Handler(this,this.close);\n\t\tthis.maxHandler=new Handler(this,this.show);\n\t\tthis.createPanel();\n\t\tif (this.dis){\n\t\t\tthis.dis.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.bringToTop);\n\t\t\tthis.dis.cacheAsBitmap=true;\n\t\t}\n\t}\n\n\t__class(UIViewBase,'laya.debug.view.nodeInfo.views.UIViewBase',_super);\n\tvar __proto=UIViewBase.prototype;\n\t__proto.show=function(){\n\t\tDebugInfoLayer.I.setTop();\n\t\tDebugInfoLayer.I.popLayer.addChild(this.dis);\n\t\tif (this.isFirstShow){\n\t\t\tthis.firstShowFun();\n\t\t\tthis.isFirstShow=false;\n\t\t}\n\t}\n\n\t__proto.firstShowFun=function(){\n\t\tthis.dis.x=(Laya.stage.width-this.dis.width)*0.5;\n\t\tthis.dis.y=(Laya.stage.height-this.dis.height)*0.5;\n\t\tDisControlTool.intFyDisPos(this.dis);\n\t}\n\n\t__proto.bringToTop=function(){\n\t\tDisControlTool.setTop(this.dis);\n\t}\n\n\t__proto.switchShow=function(){\n\t\tif (this.dis.parent){\n\t\t\tthis.close();\n\t\t\t}else{\n\t\t\tthis.show();\n\t\t}\n\t}\n\n\t__proto.close=function(){\n\t\tthis.dis.removeSelf();\n\t}\n\n\t__proto.createPanel=function(){}\n\t__proto.getInput=function(){\n\t\tvar input;\n\t\tinput=new DInput();\n\t\tinput.size(200,30);\n\t\tinput.fontSize=30;\n\t\treturn input;\n\t}\n\n\t__proto.getButton=function(){\n\t\tvar btn;\n\t\tbtn=new DButton();\n\t\tbtn.size(40,30);\n\t\tbtn.fontSize=30;\n\t\treturn btn;\n\t}\n\n\treturn UIViewBase;\n})(Component)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.recinfos.ReCacheRecInfo extends laya.debug.view.nodeInfo.recinfos.NodeRecInfo\nvar ReCacheRecInfo=(function(_super){\n\tfunction ReCacheRecInfo(){\n\t\tthis.isWorking=false;\n\t\tthis.count=0;\n\t\tthis.mTime=0;\n\t\tReCacheRecInfo.__super.call(this);\n\t\tthis.txt.fontSize=12;\n\t}\n\n\t__class(ReCacheRecInfo,'laya.debug.view.nodeInfo.recinfos.ReCacheRecInfo',_super);\n\tvar __proto=ReCacheRecInfo.prototype;\n\t__proto.addCount=function(time){\n\t\t(time===void 0)&& (time=0);\n\t\tthis.count++;\n\t\tthis.mTime+=time;\n\t\tif (!this.isWorking){\n\t\t\tthis.working=true;\n\t\t}\n\t}\n\n\t__proto.updates=function(){\n\t\tif (!this._tar[\"displayedInStage\"]){\n\t\t\tthis.working=false;\n\t\t\tthis.removeSelf();\n\t\t}\n\t\tthis.txt.text=ClassTool.getNodeClassAndName(this._tar)+\"\\n\"+\"reCache:\"+this.count+\"\\ntime:\"+this.mTime;\n\t\tif (this.count > 0){\n\t\t\tthis.fresh();\n\t\t\tLaya.timer.clear(this,this.removeSelfLater);\n\t\t\t}else{\n\t\t\tthis.working=false;\n\t\t\tLaya.timer.once(3000,this,this.removeSelfLater);\n\t\t}\n\t\tthis.count=0;\n\t\tthis.mTime=0;\n\t}\n\n\t__proto.removeSelfLater=function(){\n\t\tthis.working=false;\n\t\tthis.removeSelf();\n\t}\n\n\t__getset(0,__proto,'working',null,function(v){\n\t\tthis.isWorking=v;\n\t\tif (v){\n\t\t\tLaya.timer.loop(1000,this,this.updates);\n\t\t\t}else{\n\t\t\tLaya.timer.clear(this,this.updates);\n\t\t}\n\t});\n\n\tReCacheRecInfo.showTime=3000;\n\treturn ReCacheRecInfo;\n})(NodeRecInfo)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.tools.debugUI.DInput extends laya.display.Input\nvar DInput=(function(_super){\n\tfunction DInput(){\n\t\tDInput.__super.call(this);\n\t\tthis.bgColor=\"#11ff00\";\n\t}\n\n\t__class(DInput,'laya.debug.tools.debugUI.DInput',_super);\n\treturn DInput;\n})(Input)\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2015-10-24 下午2:58:37\n*/\n//class laya.debug.uicomps.ContextMenu extends laya.ui.Box\nvar ContextMenu=(function(_super){\n\tfunction ContextMenu(){\n\t\tthis._tY=0;\n\t\tContextMenu.__super.call(this);\n\t\tStyleConsts.setViewScale(this);\n\t}\n\n\t__class(ContextMenu,'laya.debug.uicomps.ContextMenu',_super);\n\tvar __proto=ContextMenu.prototype;\n\t__proto.addItem=function(item){\n\t\tthis.addChild(item);\n\t\titem.y=this._tY;\n\t\tthis._tY+=item.height;\n\t\titem.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onClick);\n\t}\n\n\t__proto.onClick=function(e){\n\t\tthis.event(/*laya.events.Event.SELECT*/\"select\",e);\n\t\tthis.removeSelf();\n\t}\n\n\t__proto.show=function(posX,posY){\n\t\t(posX===void 0)&& (posX=-999);\n\t\t(posY===void 0)&& (posY=-999);\n\t\tLaya.timer.once(100,this,ContextMenu.showMenu,[this,posX,posY]);\n\t}\n\n\tContextMenu.init=function(){\n\t\tLaya.stage.on(/*laya.events.Event.CLICK*/\"click\",null,ContextMenu.cleanMenu);\n\t}\n\n\tContextMenu.cleanMenu=function(e){\n\t\tvar i=0;\n\t\tvar len=0;\n\t\tlen=ContextMenu._menuList.length;\n\t\tfor(i=0;i<len;i++){\n\t\t\tif(ContextMenu._menuList[i]){\n\t\t\t\tContextMenu._menuList[i].removeSelf();\n\t\t\t}\n\t\t}\n\t\tContextMenu._menuList.length=0;\n\t}\n\n\tContextMenu.showMenu=function(menu,posX,posY){\n\t\t(posX===void 0)&& (posX=-999);\n\t\t(posY===void 0)&& (posY=-999);\n\t\tContextMenu.cleanMenu();\n\t\tContextMenu.adptMenu(menu);\n\t\tLaya.stage.addChild(menu);\n\t\tDisControlTool.showToStage(menu);\n\t\tif (posX !=-999 && posY !=-999){\n\t\t\tmenu.pos(posX,posY);\n\t\t}\n\t\tContextMenu._menuList.push(menu);\n\t}\n\n\tContextMenu.createMenu=function(__args){\n\t\tvar args=arguments;\n\t\treturn ContextMenu.createMenuByArray(args);\n\t}\n\n\tContextMenu.createMenuByArray=function(args){\n\t\tvar menu=new ContextMenu();\n\t\tvar separatorBefore=false;\n\t\tvar item;\n\t\tfor (var i=0,n=args.length;i < n;i++){\n\t\t\tvar obj=args[i];\n\t\t\tvar info={};\n\t\t\tif ((typeof obj=='string')){\n\t\t\t\tinfo.label=obj;\n\t\t\t\t}else {\n\t\t\t\tinfo=obj;\n\t\t\t}\n\t\t\tif (info.label !=\"\"){\n\t\t\t\titem=new ContextMenuItem(info.label,separatorBefore);\n\t\t\t\titem.data=obj;\n\t\t\t\tmenu.addItem(item);\n\t\t\t\tseparatorBefore=false;\n\t\t\t\t}else {\n\t\t\t\titem=new ContextMenuItem(\"\",separatorBefore);\n\t\t\t\titem.data=obj;\n\t\t\t\tmenu.addItem(item);\n\t\t\t\tseparatorBefore=true;\n\t\t\t}\n\t\t}\n\t\tmenu.zOrder=9999;\n\t\treturn menu;\n\t}\n\n\tContextMenu.adptMenu=function(menu){\n\t\tvar tWidth=80;\n\t\tvar maxWidth=80;\n\t\tvar i=0,len=menu.numChildren;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttWidth=(menu.getChildAt(i)).width;\n\t\t\tif (maxWidth < tWidth){\n\t\t\t\tmaxWidth=tWidth;\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < len;i++){\n\t\t\t(menu.getChildAt(i)).width=maxWidth;\n\t\t}\n\t}\n\n\tContextMenu._menuList=[];\n\treturn ContextMenu;\n})(Box)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.uicomps.ContextMenuItem extends laya.ui.Button\nvar ContextMenuItem=(function(_super){\n\tfunction ContextMenuItem(txt,isSeparator){\n\t\tthis.data=null;\n\t\tthis.img=null;\n\t\tContextMenuItem.__super.call(this);\n\t\tif(!this.img)this.img=new Image();\n\t\tif(txt!=\"\"){\n\t\t\tthis.label=txt;\n\t\t\tthis.name=txt;\n\t\t\t}else{\n\t\t\tthis.label=\"------\";\n\t\t\tthis.height=5;\n\t\t\tthis.mouseEnabled=false;\n\t\t\tthis.img.skin=Base64AtlasManager.base64.getAdptUrl(\"comp/line2.png\");\n\t\t\tthis.img.sizeGrid=\"0,2,0,2\";\n\t\t\tthis.addChild(this.img);\n\t\t}\n\t\tthis.labelColors=\"#000000,#000000,#000000,#000000\";\n\t\tthis._text.x=10;\n\t\tthis._text.padding=[-2,0,0,0];\n\t\tthis._text.align=\"left\";\n\t\tthis._text.wordWrap=false;\n\t\tthis._text.typeset();\n\t\tthis.width=this._text.width+25;\n\t\tthis.sizeGrid=\"3,3,3,3\";\n\t\tthis.skin=Base64AtlasManager.base64.getAdptUrl(\"comp/button1.png\");\n\t}\n\n\t__class(ContextMenuItem,'laya.debug.uicomps.ContextMenuItem',_super);\n\tvar __proto=ContextMenuItem.prototype;\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(v){\n\t\tLaya.superSet(Button,this,'width',v);\n\t\tthis.img.width=this.width;\n\t\tthis.img.x=0;\n\t});\n\n\treturn ContextMenuItem;\n})(Button)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.CacheRankView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar CacheRankView=(function(_super){\n\tfunction CacheRankView(){\n\t\tthis.view=null;\n\t\tCacheRankView.__super.call(this);\n\t}\n\n\t__class(CacheRankView,'laya.debug.view.nodeInfo.views.CacheRankView',_super);\n\tvar __proto=CacheRankView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new Rank();\n\t\tthis.view.top=this.view.bottom=this.view.left=this.view.right=0;\n\t\tthis.addChild(this.view);\n\t\tNodeMenu.I.setNodeListAction(this.view.itemList);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.freshBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.fresh);\n\t\tthis.view.itemList.scrollBar.hide=true;\n\t\tthis.view.autoUpdate.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onAutoUpdateChange);\n\t\tthis.dis=this;\n\t\tthis.view.itemList.array=[];\n\t\tthis.onAutoUpdateChange();\n\t\tthis.fresh();\n\t}\n\n\t__proto.onRightClick=function(){\n\t\tvar list;\n\t\tlist=this.view.itemList;\n\t\tif (list.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=list.selectedItem.path;\n\t\t\tNodeMenu.I.objRightClick(tarNode);\n\t\t}\n\t}\n\n\t__proto.onAutoUpdateChange=function(){\n\t\tthis.autoUpdate=this.view.autoUpdate.selected;\n\t}\n\n\t__proto.fresh=function(){\n\t\tCacheAnalyser.counter.updates();\n\t\tthis.view.title.text=\"ReCache排行\";\n\t\tif (!DebugTool.enableCacheAnalyse){\n\t\t\tthis.view.title.text=\"ReCache排行(未开启)\";\n\t\t\tthis.view.title.toolTip=\"DebugTool.init(true)可开启该功能\";\n\t\t};\n\t\tvar nodeDic;\n\t\tnodeDic=CacheAnalyser.counter.resultNodeDic;\n\t\tvar key;\n\t\tvar tNode;\n\t\tvar tData;\n\t\tvar dataList;\n\t\tdataList=[];\n\t\tfor (key in nodeDic){\n\t\t\ttNode=nodeDic[key];\n\t\t\tif (CacheRankView.filterDebugNodes && DisControlTool.isInTree(DebugInfoLayer.I,tNode))continue ;\n\t\t\tif (CacheAnalyser.counter.getCount(tNode)<=0)continue ;\n\t\t\ttData={};\n\t\t\ttData.time=CacheAnalyser.counter.getCount(tNode);\n\t\t\ttData.path=tNode;\n\t\t\ttData.label=ClassTool.getNodeClassAndName(tNode)+\":\"+tData.time;\n\t\t\tdataList.push(tData);\n\t\t}\n\t\tdataList.sort(MathTools.sortByKey(\"time\",true,true));\n\t\tthis.view.itemList.array=dataList;\n\t}\n\n\t__getset(0,__proto,'autoUpdate',null,function(v){\n\t\tLaya.timer.clear(this,this.fresh);\n\t\tif (v){\n\t\t\tthis.fresh();\n\t\t\tLaya.timer.loop(NodeConsts.RenderCostMaxTime,this,this.fresh);\n\t\t}\n\t});\n\n\t__getset(1,CacheRankView,'I',function(){\n\t\tif (!CacheRankView._I)\n\t\t\tCacheRankView._I=new CacheRankView();\n\t\treturn CacheRankView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tCacheRankView._I=null;\n\tCacheRankView.filterDebugNodes=true;\n\treturn CacheRankView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.DebugPanelView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar DebugPanelView=(function(_super){\n\tfunction DebugPanelView(){\n\t\tthis.view=null;\n\t\tthis.dragIcon=null;\n\t\tthis.tSelectTar=null;\n\t\tthis._selectTip=new Sprite();\n\t\tDebugPanelView.__super.call(this);\n\t\tthis._selectTip.setBounds(new Rectangle(0,0,0,0));\n\t}\n\n\t__class(DebugPanelView,'laya.debug.view.nodeInfo.views.DebugPanelView',_super);\n\tvar __proto=DebugPanelView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new DebugPage();\n\t\tthis.dis=this.view;\n\t\tthis.view.minBtn.minHandler=this.minHandler;\n\t\tthis.view.minBtn.maxHandler=this.maxHandler;\n\t\tthis.view.minBtn.tar=this.view;\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tDisControlTool.setDragingItem(this.view.tab,this.view);\n\t\tDisControlTool.setDragingItem(this.view.clearBtn,this.view);\n\t\tthis.clickSelectChange();\n\t\tthis.view.selectWhenClick.on(/*laya.events.Event.CHANGE*/\"change\",this,this.clickSelectChange);\n\t\tNotice.listen(/*laya.debug.tools.DisplayHook.ITEM_CLICKED*/\"ItemClicked\",this,this.itemClicked);\n\t\tStyleConsts.setViewScale(this.view);\n\t\tthis.dragIcon=this.view.dragIcon;\n\t\tthis.dragIcon.removeSelf();\n\t\tthis.view.mouseAnalyseBtn.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.mouseAnalyserMouseDown);\n\t\tthis.dragIcon.on(/*laya.events.Event.DRAG_END*/\"dragend\",this,this.mouseAnalyserDragEnd);\n\t\tthis.view.clearBtn.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.clearBtnClick);\n\t}\n\n\t__proto.clearBtnClick=function(){\n\t\tDebugTool.clearDebugLayer();\n\t}\n\n\t__proto.mouseAnalyserMouseDown=function(){\n\t\tvar gPos=DebugPanelView.tempPos;\n\t\tgPos.setTo(0,0);\n\t\tgPos=this.view.mouseAnalyseBtn.localToGlobal(gPos);\n\t\tthis.dragIcon.pos(gPos.x,gPos.y);\n\t\tthis.dragIcon.mouseEnabled=false;\n\t\tLaya.stage.addChild(this.dragIcon);\n\t\tthis.dragIcon.startDrag();\n\t}\n\n\t__proto.mouseAnalyserDragEnd=function(){\n\t\tthis.dragIcon.removeSelf();\n\t\tthis.selectTarget(DisplayHook.instance.getDisUnderMouse());\n\t\tNodeToolView.I.showByNode(DisplayHook.instance.getDisUnderMouse(),false);\n\t}\n\n\t//}\n\t__proto.switchToTree=function(){\n\t\tthis.view.tab.selectedIndex=0;\n\t}\n\n\t__proto.swichToSelect=function(){\n\t\tthis.view.tab.selectedIndex=1;\n\t}\n\n\t__proto.itemClicked=function(tar){\n\t\tif (!DebugPanelView.isClickSelectState)return;\n\t\tif (DebugPanelView.ignoreDebugTool){\n\t\t\tif (DebugInfoLayer.I.isDebugItem(tar))return;\n\t\t}\n\t\tif ((tar instanceof laya.debug.uicomps.ContextMenuItem )|| (tar.parent instanceof laya.debug.uicomps.ContextMenuItem )){\n\t\t\treturn;\n\t\t}\n\t\tToolPanel.I.showSelectInStage(tar);\n\t\tNodeToolView.I.showByNode(tar,false);\n\t\tthis.view.selectWhenClick.selected=false;\n\t\tDebugTool.showDisBound(tar);\n\t\tthis.clickSelectChange();\n\t}\n\n\t__proto.selectTarget=function(tar){\n\t\tif (!tar)return;\n\t\tToolPanel.I.showSelectInStage(tar);\n\t\tDebugTool.showDisBound(tar);\n\t}\n\n\t__proto.clickSelectChange=function(){\n\t\tDebugPanelView.isClickSelectState=this.view.selectWhenClick.selected;\n\t\tif (!Browser.onPC)return;\n\t\tthis.tSelectTar=null;\n\t\tthis.clearSelectTip();\n\t\tif (DebugPanelView.isClickSelectState){\n\t\t\tLaya.timer.loop(200,this,this.updateSelectTar,null,true);\n\t\t\t}else{\n\t\t\tLaya.timer.clear(this,this.updateSelectTar);\n\t\t}\n\t}\n\n\t__proto.clearSelectTip=function(){\n\t\tthis._selectTip.removeSelf();\n\t}\n\n\t__proto.updateSelectTar=function(){\n\t\tthis.clearSelectTip();\n\t\tthis.tSelectTar=DisplayHook.instance.getDisUnderMouse();\n\t\tif (!this.tSelectTar){\n\t\t\treturn;\n\t\t}\n\t\tif (DebugInfoLayer.I.isDebugItem(this.tSelectTar))return;\n\t\tvar g;\n\t\tg=this._selectTip.graphics;\n\t\tg.clear();\n\t\tvar rec;\n\t\trec=NodeUtils.getGRec(this.tSelectTar);\n\t\tDebugInfoLayer.I.popLayer.addChild(this._selectTip);\n\t\tg.drawRect(0,0,rec.width,rec.height,null,\"#00ffff\",2);\n\t\tthis._selectTip.pos(rec.x,rec.y);\n\t}\n\n\t__getset(1,DebugPanelView,'I',function(){\n\t\tif (!DebugPanelView._I)DebugPanelView._I=new DebugPanelView();\n\t\treturn DebugPanelView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tDebugPanelView._I=null;\n\tDebugPanelView.ignoreDebugTool=true;\n\tDebugPanelView.isClickSelectState=false;\n\t__static(DebugPanelView,\n\t['tempPos',function(){return this.tempPos=new Point();}\n\t]);\n\treturn DebugPanelView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.FilterView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar FilterView=(function(_super){\n\tfunction FilterView(){\n\t\tthis.input=null;\n\t\tFilterView.__super.call(this);\n\t}\n\n\t__class(FilterView,'laya.debug.view.nodeInfo.views.FilterView',_super);\n\tvar __proto=FilterView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.input=new Input();\n\t\tthis.input.size(400,500);\n\t\tthis.input.multiline=true;\n\t\tthis.input.bgColor=\"#ff00ff\";\n\t\tthis.input.fontSize=24;\n\t\tthis.addChild(this.input);\n\t}\n\n\t__proto.show=function(){\n\t\tthis.input.text=NodeInfosItem.showValues.join(\"\\n\");\n\t\t_super.prototype.show.call(this);\n\t}\n\n\t__proto.close=function(){\n\t\t_super.prototype.close.call(this);\n\t\tNodeInfosItem.showValues=this.input.text.split(\"\\n\");\n\t}\n\n\treturn FilterView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.FindSmallView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar FindSmallView=(function(_super){\n\tfunction FindSmallView(){\n\t\tthis.view=null;\n\t\tFindSmallView.__super.call(this);\n\t}\n\n\t__class(FindSmallView,'laya.debug.view.nodeInfo.views.FindSmallView',_super);\n\tvar __proto=FindSmallView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new FindNodeSmall();\n\t\tStyleConsts.setViewScale(this.view);\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tthis.view.typeSelect.selectedIndex=1;\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.findBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onFind);\n\t\tthis.dis=this.view;\n\t}\n\n\t__proto.onFind=function(){\n\t\tvar key;\n\t\tkey=this.view.findTxt.text;\n\t\tkey=StringTool.trimSide(key);\n\t\tvar nodeList;\n\t\tif (this.view.typeSelect.selectedIndex==0){\n\t\t\tnodeList=DebugTool.findNameHas(key,false);\n\t\t\t}else{\n\t\t\tnodeList=DebugTool.findClassHas(Laya.stage,key);\n\t\t}\n\t\tToolPanel.I.showSelectItems(nodeList);\n\t\tthis.close();\n\t}\n\n\t__getset(1,FindSmallView,'I',function(){\n\t\tif (!FindSmallView._I)FindSmallView._I=new FindSmallView();\n\t\treturn FindSmallView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tFindSmallView._I=null;\n\treturn FindSmallView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.FindView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar FindView=(function(_super){\n\tfunction FindView(){\n\t\tthis.view=null;\n\t\tFindView.__super.call(this);\n\t}\n\n\t__class(FindView,'laya.debug.view.nodeInfo.views.FindView',_super);\n\tvar __proto=FindView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new FindNode();\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tthis.view.result.scrollBar.hide=true;\n\t\tthis.view.result.array=[];\n\t\tthis.view.typeSelect.selectedIndex=1;\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.findBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onFind);\n\t\tNodeMenu.I.setNodeListAction(this.view.result);\n\t\tthis.dis=this.view;\n\t}\n\n\t__proto.onRightClick=function(){\n\t\tvar list;\n\t\tlist=this.view.result;\n\t\tif (list.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=list.selectedItem.path;\n\t\t\tNodeMenu.I.objRightClick(tarNode);\n\t\t}\n\t}\n\n\t//}\n\t__proto.onFind=function(){\n\t\tvar key;\n\t\tkey=this.view.findTxt.text;\n\t\tkey=StringTool.trimSide(key);\n\t\tvar nodeList;\n\t\tif (this.view.typeSelect.selectedIndex==0){\n\t\t\tnodeList=DebugTool.findNameHas(key,false);\n\t\t\t}else{\n\t\t\tnodeList=DebugTool.findClassHas(Laya.stage,key);\n\t\t}\n\t\tthis.showFindResult(nodeList);\n\t}\n\n\t__proto.showFindResult=function(nodeList){\n\t\tif (!nodeList)return;\n\t\tvar i=0,len=0;\n\t\tlen=nodeList.length;\n\t\tvar showList;\n\t\tshowList=[];\n\t\tvar tData;\n\t\tvar tSprite;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttSprite=nodeList[i];\n\t\t\ttData={};\n\t\t\ttData.label=ClassTool.getNodeClassAndName(tSprite);\n\t\t\ttData.path=tSprite;\n\t\t\tshowList.push(tData);\n\t\t}\n\t\tthis.view.result.array=showList;\n\t}\n\n\t__getset(1,FindView,'I',function(){\n\t\tif (!FindView._I)FindView._I=new FindView();\n\t\treturn FindView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tFindView._I=null;\n\treturn FindView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.NodeListPanelView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar NodeListPanelView=(function(_super){\n\tfunction NodeListPanelView(){\n\t\tthis.view=null;\n\t\tNodeListPanelView.__super.call(this);\n\t}\n\n\t__class(NodeListPanelView,'laya.debug.view.nodeInfo.views.NodeListPanelView',_super);\n\tvar __proto=NodeListPanelView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new NodeListPanel();\n\t\tthis.addChild(this.view);\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tNodeMenu.I.setNodeListAction(this.view.itemList);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.itemList.scrollBar.hide=true;\n\t\tthis.dis=this;\n\t\tthis.view.itemList.array=[];\n\t}\n\n\t//fresh();\n\t__proto.showList=function(list){\n\t\tthis.view.itemList.array=list;\n\t\tthis.show();\n\t}\n\n\t__getset(1,NodeListPanelView,'I',function(){\n\t\tif (!NodeListPanelView._I)\n\t\t\tNodeListPanelView._I=new NodeListPanelView();\n\t\treturn NodeListPanelView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tNodeListPanelView._I=null;\n\tNodeListPanelView.filterDebugNodes=true;\n\treturn NodeListPanelView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.NodeToolView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar NodeToolView=(function(_super){\n\tfunction NodeToolView(){\n\t\tthis.view=null;\n\t\tthis.dragIcon=null;\n\t\tthis._tar=null;\n\t\tNodeToolView.__super.call(this);\n\t}\n\n\t__class(NodeToolView,'laya.debug.view.nodeInfo.views.NodeToolView',_super);\n\tvar __proto=NodeToolView.prototype;\n\t__proto.show=function(){\n\t\tthis.showByNode();\n\t}\n\n\t__proto.createPanel=function(){\n\t\tthis.view=new NodeTool();\n\t\tthis.addChild(this.view);\n\t\tthis.view.on(/*laya.events.Event.CLICK*/\"click\",this,this.onBtnClick);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onCloseBtn);\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tthis.dis=this.view;\n\t\tthis.view.freshBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onFreshBtn);\n\t\tthis.dragIcon=this.view.dragIcon;\n\t\tthis.dragIcon.removeSelf();\n\t\tthis.dragIcon.on(/*laya.events.Event.DRAG_END*/\"dragend\",this,this.mouseAnalyserDragEnd);\n\t\tthis.view.mouseAnalyseBtn.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.mouseAnalyserMouseDown);\n\t}\n\n\t__proto.mouseAnalyserMouseDown=function(){\n\t\tvar gPos=NodeToolView.tempPos;\n\t\tgPos.setTo(0,0);\n\t\tgPos=this.view.mouseAnalyseBtn.localToGlobal(gPos);\n\t\tthis.dragIcon.pos(gPos.x,gPos.y);\n\t\tthis.dragIcon.mouseEnabled=false;\n\t\tLaya.stage.addChild(this.dragIcon);\n\t\tthis.dragIcon.startDrag();\n\t}\n\n\t__proto.mouseAnalyserDragEnd=function(){\n\t\tthis.dragIcon.removeSelf();\n\t\tif (laya.debug.view.nodeInfo.views.NodeToolView.I.target){\n\t\t\tMouseEventAnalyser.analyseNode(laya.debug.view.nodeInfo.views.NodeToolView.I.target);\n\t\t}\n\t}\n\n\t__proto.onFreshBtn=function(){\n\t\tif (!this._tar)return;\n\t\tthis._tar.reCache();\n\t\tthis._tar.repaint();\n\t}\n\n\t__proto.onCloseBtn=function(){\n\t\tthis.close();\n\t}\n\n\t__proto.onBtnClick=function(e){\n\t\tif (!this._tar)return;\n\t\tvar tar;\n\t\ttar=e.target;\n\t\tconsole.log(\"onBtnClick:\",tar);\n\t\tvar txt;\n\t\ttxt=(tar).label;\n\t\tswitch(txt){\n\t\t\tcase \"父链\":\n\t\t\t\tDebugTool.showParentChain(this._tar);\n\t\t\t\tSelectInfosView.I.setSelectList(DebugTool.selectedNodes);\n\t\t\t\tbreak ;\n\t\t\tcase \"子\":\n\t\t\t\tDebugTool.showAllChild(this._tar);\n\t\t\t\tSelectInfosView.I.setSelectList(DebugTool.selectedNodes);\n\t\t\t\tbreak ;\n\t\t\tcase \"兄弟\":\n\t\t\t\tDebugTool.showAllBrother(this._tar);\n\t\t\t\tSelectInfosView.I.setSelectList(DebugTool.selectedNodes);\n\t\t\t\tbreak ;\n\t\t\tcase \"Enable链\":\n\t\t\t\tOutPutView.I.dTrace(DebugTool.traceDisMouseEnable(this._tar));\n\t\t\t\tSelectInfosView.I.setSelectList(DebugTool.selectedNodes);\n\t\t\t\tbreak ;\n\t\t\tcase \"Size链\":\n\t\t\t\tOutPutView.I.dTrace(DebugTool.traceDisSizeChain(this._tar));\n\t\t\t\tSelectInfosView.I.setSelectList(DebugTool.selectedNodes);\n\t\t\t\tbreak ;\n\t\t\tcase \"隐藏旁支\":\n\t\t\t\tNodeInfoPanel.I.recoverNodes();\n\t\t\t\tNodeInfoPanel.I.hideOtherChain(this._tar);\n\t\t\t\tbreak ;\n\t\t\tcase \"隐藏兄弟\":\n\t\t\t\tNodeInfoPanel.I.recoverNodes();\n\t\t\t\tNodeInfoPanel.I.hideBrothers(this._tar);\n\t\t\t\tbreak ;\n\t\t\tcase \"隐藏子\":\n\t\t\t\tNodeInfoPanel.I.recoverNodes();\n\t\t\t\tNodeInfoPanel.I.hideChilds(this._tar);\n\t\t\t\tbreak ;\n\t\t\tcase \"恢复\":\n\t\t\t\tNodeInfoPanel.I.recoverNodes();\n\t\t\t\tbreak ;\n\t\t\tcase \"节点树定位\":\n\t\t\t\tToolPanel.I.showSelectInStage(this._tar);\n\t\t\t\tbreak ;\n\t\t\tcase \"显示边框\":\n\t\t\t\tDebugTool.showDisBound(this._tar);\n\t\t\t\tbreak ;\n\t\t\tcase \"输出到控制台\":\n\t\t\t\tconsole.log(this._tar);\n\t\t\t\tbreak ;\n\t\t\tcase \"显示切换\":\n\t\t\t\tthis._tar.visible=!this._tar.visible;\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t__proto.showByNode=function(node,ifShow){\n\t\t(ifShow===void 0)&& (ifShow=true);\n\t\tif (!node)node=Laya.stage;\n\t\tif(ifShow)\n\t\t\t_super.prototype.show.call(this);\n\t\tthis._tar=node;\n\t\tthis.fresh();\n\t}\n\n\t__proto.fresh=function(){\n\t\tif (!this._tar)return;\n\t\tthis.view.tarTxt.text=ClassTool.getNodeClassAndName(this._tar);\n\t}\n\n\t__getset(0,__proto,'target',function(){\n\t\treturn this._tar;\n\t});\n\n\t__getset(1,NodeToolView,'I',function(){\n\t\tif (!NodeToolView._I)NodeToolView._I=new NodeToolView();\n\t\treturn NodeToolView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tNodeToolView._I=null;\n\t__static(NodeToolView,\n\t['tempPos',function(){return this.tempPos=new Point();}\n\t]);\n\treturn NodeToolView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.NodeTreeSettingView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar NodeTreeSettingView=(function(_super){\n\tfunction NodeTreeSettingView(){\n\t\tthis.view=null;\n\t\tthis._handler=null;\n\t\tNodeTreeSettingView.__super.call(this);\n\t}\n\n\t__class(NodeTreeSettingView,'laya.debug.view.nodeInfo.views.NodeTreeSettingView',_super);\n\tvar __proto=NodeTreeSettingView.prototype;\n\t__proto.createPanel=function(){\n\t\t_super.prototype.createPanel.call(this);\n\t\tthis.view=new NodeTreeSetting();\n\t\tStyleConsts.setViewScale(this.view);\n\t\tthis.addChild(this.view);\n\t\tthis.inits();\n\t\tthis.dis=this.view;\n\t}\n\n\t__proto.show=function(){\n\t\t_super.prototype.show.call(this);\n\t}\n\n\t__proto.showSetting=function(filters,callBack,tar){\n\t\tif ((tar instanceof laya.display.Node )){\n\t\t\tthis.view.showTxt.text=NodeConsts.defaultFitlerStr.split(\",\").join(\"\\n\");\n\t\t\t}else{\n\t\t\tthis.view.showTxt.text=filters.join(\"\\n\");\n\t\t}\n\t\tthis._handler=callBack;\n\t\tthis.show();\n\t}\n\n\t__proto.inits=function(){\n\t\tthis.view.okBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onOkBtn);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onCloseBtn);\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tthis.dis=this.view;\n\t}\n\n\t__proto.onCloseBtn=function(){\n\t\tthis.close();\n\t}\n\n\t__proto.onOkBtn=function(){\n\t\tthis.close();\n\t\tvar showArr;\n\t\tshowArr=this.view.showTxt.text.split(\"\\n\");\n\t\tif (this._handler){\n\t\t\tthis._handler.runWith([showArr]);\n\t\t\tthis._handler=null\n\t\t}\n\t}\n\n\t__getset(1,NodeTreeSettingView,'I',function(){\n\t\tif (!NodeTreeSettingView._I)NodeTreeSettingView._I=new NodeTreeSettingView();\n\t\treturn NodeTreeSettingView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tNodeTreeSettingView._I=null;\n\treturn NodeTreeSettingView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.NodeTreeView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar NodeTreeView=(function(_super){\n\tfunction NodeTreeView(){\n\t\tthis.nodeTree=null;\n\t\tNodeTreeView.__super.call(this);\n\t}\n\n\t__class(NodeTreeView,'laya.debug.view.nodeInfo.views.NodeTreeView',_super);\n\tvar __proto=NodeTreeView.prototype;\n\t__proto.show=function(){\n\t\tthis.showByNode();\n\t}\n\n\t__proto.showByNode=function(node){\n\t\tif (!node)node=Laya.stage;\n\t\tthis.nodeTree.setDis(node);\n\t}\n\n\t//super.show();\n\t__proto.createPanel=function(){\n\t\t_super.prototype.createPanel.call(this);\n\t\tif (!this.nodeTree)this.nodeTree=new NodeTree();\n\t\tthis.dis=null;\n\t\tvar view;\n\t\tview=this.nodeTree;\n\t\tview.top=view.bottom=view.left=view.right=0;\n\t\tthis.addChild(view);\n\t\tthis.showByNode(Laya.stage);\n\t}\n\n\t__proto.showSelectInStage=function(node){\n\t\tthis.showByNode(Laya.stage);\n\t\tthis.nodeTree.selectByNode(node);\n\t}\n\n\treturn NodeTreeView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.ObjectCreateView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar ObjectCreateView=(function(_super){\n\tfunction ObjectCreateView(){\n\t\tthis.view=null;\n\t\tthis._menu=null;\n\t\tthis._menuItems=[\"统计详情\",\"增量详情\"];\n\t\tthis._tSelectKey=null;\n\t\tthis.preInfo={};\n\t\tObjectCreateView.__super.call(this);\n\t\tObjectCreateView._I=this;\n\t}\n\n\t__class(ObjectCreateView,'laya.debug.view.nodeInfo.views.ObjectCreateView',_super);\n\tvar __proto=ObjectCreateView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new ObjectCreate();\n\t\tthis.view.top=this.view.bottom=this.view.left=this.view.right=0;\n\t\tthis.addChild(this.view);\n\t\tthis.view.itemList.on(DebugTool.getMenuShowEvent(),this,this.onRightClick);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.freshBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.fresh);\n\t\tthis.view.itemList.scrollBar.hide=true;\n\t\tthis._menu=ContextMenu.createMenuByArray(this._menuItems);\n\t\tthis._menu.on(/*laya.events.Event.SELECT*/\"select\",this,this.onEmunSelect);\n\t\tthis.fresh();\n\t}\n\n\t__proto.onEmunSelect=function(e){\n\t\tif (!this._tSelectKey)return;\n\t\tvar data=(e.target).data;\n\t\tif ((typeof data=='string')){\n\t\t\tvar key;\n\t\t\tkey=data;\n\t\t\tvar count;\n\t\t\tswitch (key){\n\t\t\t\tcase \"统计详情\":\n\t\t\t\t\tcount=RunProfile.getRunInfo(this._tSelectKey);\n\t\t\t\t\tif (count){\n\t\t\t\t\t\tOutPutView.I.showTxt(this._tSelectKey+\" createInfo:\\n\"+count.traceSelfR());\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"增量详情\":\n\t\t\t\t\tcount=RunProfile.getRunInfo(this._tSelectKey);\n\t\t\t\t\tif (count){\n\t\t\t\t\t\tOutPutView.I.showTxt(this._tSelectKey+\" createInfo:\\n\"+count.traceSelfR(count.changeO));\n\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t}\n\n\t__proto.onRightClick=function(){\n\t\tvar list;\n\t\tlist=this.view.itemList;\n\t\tif (list.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=list.selectedItem.path;\n\t\t\tthis._tSelectKey=tarNode;\n\t\t\tif (this._tSelectKey){\n\t\t\t\tthis._menu.show();\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.show=function(){\n\t\tthis.fresh();\n\t}\n\n\t__proto.fresh=function(){\n\t\tvar dataO;\n\t\tdataO=ClassCreateHook.I.createInfo;\n\t\tvar key;\n\t\tvar dataList;\n\t\tdataList=[];\n\t\tvar tData;\n\t\tvar count;\n\t\tfor (key in dataO){\n\t\t\tif (!this.preInfo[key])\n\t\t\t\tthis.preInfo[key]=0;\n\t\t\ttData={};\n\t\t\ttData.path=key;\n\t\t\ttData.count=dataO[key];\n\t\t\ttData.add=dataO[key]-this.preInfo[key];\n\t\t\tif (tData.add > 0){\n\t\t\t\ttData.label=key+\":\"+dataO[key]+\" +\"+tData.add;\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttData.label=key+\":\"+dataO[key];\n\t\t\t}\n\t\t\tcount=RunProfile.getRunInfo(key);\n\t\t\tif (count){\n\t\t\t\tcount.record();\n\t\t\t}\n\t\t\ttData.rank=tData.add *1000+tData.count;\n\t\t\tthis.preInfo[key]=dataO[key];\n\t\t\tdataList.push(tData);\n\t\t}\n\t\tdataList.sort(MathTools.sortByKey(\"rank\",true,true));\n\t\tthis.view.itemList.array=dataList;\n\t}\n\n\t__getset(1,ObjectCreateView,'I',function(){\n\t\tif (!ObjectCreateView._I)\n\t\t\tObjectCreateView._I=new ObjectCreateView();\n\t\treturn ObjectCreateView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tObjectCreateView._I=null;\n\treturn ObjectCreateView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.ObjectInfoView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar ObjectInfoView=(function(_super){\n\tfunction ObjectInfoView(){\n\t\tthis.view=null;\n\t\tthis.showKeys=[\"x\",\"y\",\"width\",\"height\",\"renderCost\"];\n\t\tthis._closeSettingHandler=null;\n\t\tthis._tar=null;\n\t\tObjectInfoView.__super.call(this);\n\t}\n\n\t__class(ObjectInfoView,'laya.debug.view.nodeInfo.views.ObjectInfoView',_super);\n\tvar __proto=ObjectInfoView.prototype;\n\t__proto.createPanel=function(){\n\t\t_super.prototype.createPanel.call(this);\n\t\tthis.view=new ObjectInfo();\n\t\tStyleConsts.setViewScale(this.view);\n\t\tthis.addChild(this.view);\n\t\tthis.inits();\n\t}\n\n\t__proto.inits=function(){\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.settingBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onSettingBtn);\n\t\tthis.view.autoUpdate.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onAutoUpdateChange);\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tDisControlTool.setResizeAbleEx(this.view);\n\t\tthis._closeSettingHandler=new Handler(this,this.closeSetting);\n\t\tthis.dis=this.view;\n\t}\n\n\t__proto.onAutoUpdateChange=function(){\n\t\tthis.autoUpdate=this.view.autoUpdate.selected;\n\t}\n\n\t__proto.onSettingBtn=function(){\n\t\tNodeTreeSettingView.I.showSetting(this.showKeys,this._closeSettingHandler,this._tar);\n\t}\n\n\t__proto.reset=function(){\n\t\tthis.showKeys=[\"x\",\"y\",\"width\",\"height\",\"renderCost\"];\n\t}\n\n\t__proto.closeSetting=function(newKeys){\n\t\tthis.showKeys=newKeys;\n\t\tthis.fresh();\n\t}\n\n\t__proto.showObjectInfo=function(obj){\n\t\tthis._tar=obj;\n\t\tthis.fresh();\n\t\tthis.show();\n\t\tthis.onAutoUpdateChange();\n\t}\n\n\t__proto.fresh=function(){\n\t\tif (!this._tar){\n\t\t\tthis.view.showTxt.text=\"\";\n\t\t\tthis.view.title.text=\"未选中对象\";\n\t\t}\n\t\telse{\n\t\t\tthis.view.title.text=ClassTool.getNodeClassAndName(this._tar);\n\t\t\tthis.view.showTxt.text=ObjectInfoView.getObjValueStr(this._tar,this.showKeys,false);\n\t\t}\n\t}\n\n\t__proto.freshKeyInfos=function(){\n\t\tthis.fresh();\n\t}\n\n\t__proto.close=function(){\n\t\t_super.prototype.close.call(this);\n\t\tthis.autoUpdate=false;\n\t\tPool.recover(\"ObjectInfoView\",this);\n\t}\n\n\t__proto.show=function(){\n\t\t_super.prototype.show.call(this);\n\t}\n\n\t__getset(0,__proto,'autoUpdate',null,function(v){\n\t\tLaya.timer.clear(this,this.freshKeyInfos);\n\t\tif (v){\n\t\t\tLaya.timer.loop(2000,this,this.freshKeyInfos);\n\t\t}\n\t});\n\n\tObjectInfoView.getObjValueStr=function(obj,keys,withTitle){\n\t\t(withTitle===void 0)&& (withTitle=true);\n\t\tvar i=0,len=0;\n\t\tvar tKey;\n\t\tObjectInfoView._txts.length=0;\n\t\tlen=keys.length;\n\t\tif (withTitle){\n\t\t\tif (obj.name){\n\t\t\t\tObjectInfoView._txts.push(ClassTool.getClassName(obj)+\"(\"+obj.name+\")\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tObjectInfoView._txts.push(ClassTool.getClassName(obj));\n\t\t\t}\n\t\t}\n\t\tfor (i=0;i < len;i++){\n\t\t\ttKey=keys[i];\n\t\t\tObjectInfoView._txts.push(tKey+\":\"+ObjectInfoView.getNodeValue(obj,tKey));\n\t\t}\n\t\treturn ObjectInfoView._txts.join(\"\\n\");\n\t}\n\n\tObjectInfoView.getNodeValue=function(node,key){\n\t\tvar rst;\n\t\tif ((node instanceof laya.display.Sprite )){\n\t\t\tvar tNode;\n\t\t\ttNode=node;\n\t\t\tswitch (key){\n\t\t\t\tcase \"gRec\":\n\t\t\t\t\trst=NodeUtils.getGRec(tNode).toString();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"gAlpha\":\n\t\t\t\t\trst=NodeUtils.getGAlpha(tNode)+\"\";\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"cmdCount\":\n\t\t\t\t\trst=NodeUtils.getNodeCmdCount(tNode)+\"\";\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"cmdAll\":\n\t\t\t\t\trst=NodeUtils.getNodeCmdTotalCount(tNode)+\"\";\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"nodeAll\":\n\t\t\t\t\trst=\"\"+NodeUtils.getNodeCount(tNode);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"nodeVisible\":\n\t\t\t\t\trst=\"\"+NodeUtils.getNodeCount(tNode,true);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"nodeRender\":\n\t\t\t\t\trst=\"\"+NodeUtils.getRenderNodeCount(tNode);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"nodeReCache\":\n\t\t\t\t\trst=\"\"+NodeUtils.getReFreshRenderNodeCount(tNode);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"renderCost\":\n\t\t\t\t\trst=\"\"+RenderAnalyser.I.getTime(tNode);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"renderCount\":\n\t\t\t\t\trst=\"\"+RenderAnalyser.I.getCount(tNode);\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\trst=node[key]+\"\";\n\t\t\t\t}\n\t\t}\n\t\telse{\n\t\t\trst=node[key]+\"\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tObjectInfoView.showObject=function(obj){\n\t\tvar infoView;\n\t\tinfoView=Pool.getItemByClass(\"ObjectInfoView\",ObjectInfoView);\n\t\tinfoView.reset();\n\t\tinfoView.showObjectInfo(obj);\n\t}\n\n\tObjectInfoView._txts=[];\n\treturn ObjectInfoView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.OutPutView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar OutPutView=(function(_super){\n\tfunction OutPutView(){\n\t\tthis.view=null;\n\t\tOutPutView.__super.call(this);\n\t\tDebugTool._logFun=OutPutView.log;\n\t}\n\n\t__class(OutPutView,'laya.debug.view.nodeInfo.views.OutPutView',_super);\n\tvar __proto=OutPutView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new OutPut();\n\t\tDisControlTool.setDragingItem(this.view.txt,this.view);\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tStyleConsts.setViewScale(this.view);\n\t\tthis.view.txt.textField.overflow=Text.SCROLL;\n\t\tthis.view.txt.textField.wordWrap=true;\n\t\tthis.view.on(/*laya.events.Event.MOUSE_WHEEL*/\"mousewheel\",this,this.mouseWheel);\n\t\tthis.view.txt.text=\"\";\n\t\tDisControlTool.setResizeAbleEx(this.view);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.clearBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onClearBtn);\n\t\tthis.dis=this.view;\n\t}\n\n\t__proto.onClearBtn=function(){\n\t\tthis.clearText();\n\t}\n\n\t__proto.mouseWheel=function(e){\n\t\tthis.view.txt.textField.scrollY-=e.delta*10;\n\t}\n\n\t__proto.showTxt=function(str){\n\t\tthis.view.txt.text=str;\n\t\tthis.show();\n\t\tthis.view.txt.textField.scrollY=this.view.txt.textField.maxScrollY;\n\t}\n\n\t__proto.clearText=function(){\n\t\tthis.view.txt.text=\"\";\n\t}\n\n\t__proto.dTrace=function(__arg){\n\t\tvar arg=arguments;\n\t\tif (this.view.txt.textField.scrollY > 1000){\n\t\t\tthis.view.txt.text=\"\";\n\t\t};\n\t\tvar str;\n\t\tvar i=0,len=0;\n\t\tlen=arg.length;\n\t\tstr=arg[0];\n\t\tfor (i=1;i < len;i++){\n\t\t\tstr+=\" \"+arg[i];\n\t\t}\n\t\tthis.addStr(str);\n\t}\n\n\t__proto.addStr=function(str){\n\t\tthis.view.txt.text+=\"\\n\"+str;\n\t\tthis.show();\n\t\tthis.view.txt.textField.scrollY=this.view.txt.textField.maxScrollY;\n\t}\n\n\t__getset(1,OutPutView,'I',function(){\n\t\tif (!OutPutView._I)OutPutView._I=new OutPutView();\n\t\treturn OutPutView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tOutPutView.log=function(str){\n\t\tOutPutView.I.addStr(str);\n\t}\n\n\tOutPutView._I=null;\n\treturn OutPutView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.RenderCostRankView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar RenderCostRankView=(function(_super){\n\tfunction RenderCostRankView(){\n\t\tthis.view=null;\n\t\tRenderCostRankView.__super.call(this);\n\t}\n\n\t__class(RenderCostRankView,'laya.debug.view.nodeInfo.views.RenderCostRankView',_super);\n\tvar __proto=RenderCostRankView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new Rank();\n\t\tthis.view.top=this.view.bottom=this.view.left=this.view.right=0;\n\t\tthis.addChild(this.view);\n\t\tNodeMenu.I.setNodeListAction(this.view.itemList);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.freshBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.fresh);\n\t\tthis.view.itemList.scrollBar.hide=true;\n\t\tthis.view.autoUpdate.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onAutoUpdateChange);\n\t\tthis.dis=this;\n\t\tthis.view.itemList.array=[];\n\t\tthis.onAutoUpdateChange();\n\t\tthis.fresh();\n\t\tLaya.timer.once(5000,this,this.fresh);\n\t}\n\n\t__proto.onRightClick=function(){\n\t\tvar list;\n\t\tlist=this.view.itemList;\n\t\tif (list.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=list.selectedItem.path;\n\t\t\tNodeMenu.I.objRightClick(tarNode);\n\t\t}\n\t}\n\n\t__proto.onAutoUpdateChange=function(){\n\t\tthis.autoUpdate=this.view.autoUpdate.selected;\n\t}\n\n\t__proto.fresh=function(){\n\t\tthis.view.title.text=\"渲染用时排行(\"+NodeConsts.RenderCostMaxTime+\"ms)\";\n\t\tvar nodeDic;\n\t\tnodeDic=RenderAnalyser.I.nodeDic;\n\t\tvar key;\n\t\tvar tNode;\n\t\tvar tData;\n\t\tvar dataList;\n\t\tdataList=[];\n\t\tfor (key in nodeDic){\n\t\t\ttNode=nodeDic[key];\n\t\t\tif (RenderCostRankView.filterDebugNodes && DisControlTool.isInTree(DebugInfoLayer.I,tNode))continue ;\n\t\t\tif (RenderAnalyser.I.getTime(tNode)<=0)continue ;\n\t\t\ttData={};\n\t\t\ttData.time=RenderAnalyser.I.getTime(tNode);\n\t\t\tif (RenderCostRankView.filterDebugNodes && tNode==Laya.stage){\n\t\t\t\ttData.time-=RenderAnalyser.I.getTime(DebugInfoLayer.I);\n\t\t\t}\n\t\t\ttData.path=tNode;\n\t\t\ttData.label=ClassTool.getNodeClassAndName(tNode)+\":\"+tData.time;\n\t\t\tdataList.push(tData);\n\t\t}\n\t\tdataList.sort(MathTools.sortByKey(\"time\",true,true));\n\t\tthis.view.itemList.array=dataList;\n\t}\n\n\t__getset(0,__proto,'autoUpdate',null,function(v){\n\t\tLaya.timer.clear(this,this.fresh);\n\t\tif (v){\n\t\t\tthis.fresh();\n\t\t\tLaya.timer.loop(NodeConsts.RenderCostMaxTime,this,this.fresh);\n\t\t}\n\t});\n\n\t__getset(1,RenderCostRankView,'I',function(){\n\t\tif (!RenderCostRankView._I)\n\t\t\tRenderCostRankView._I=new RenderCostRankView();\n\t\treturn RenderCostRankView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tRenderCostRankView._I=null;\n\tRenderCostRankView.filterDebugNodes=true;\n\treturn RenderCostRankView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.ResRankView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar ResRankView=(function(_super){\n\tfunction ResRankView(){\n\t\tthis.view=null;\n\t\tResRankView.__super.call(this);\n\t}\n\n\t__class(ResRankView,'laya.debug.view.nodeInfo.views.ResRankView',_super);\n\tvar __proto=ResRankView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new Rank();\n\t\tthis.view.top=this.view.bottom=this.view.left=this.view.right=0;\n\t\tthis.addChild(this.view);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.freshBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.fresh);\n\t\tthis.view.itemList.scrollBar.hide=true;\n\t\tthis.view.autoUpdate.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onAutoUpdateChange);\n\t\tthis.dis=this;\n\t\tthis.view.itemList.array=[];\n\t\tthis.view.itemList.on(/*laya.events.Event.RIGHT_CLICK*/\"rightclick\",this,this.onRightClick);\n\t\tthis.onAutoUpdateChange();\n\t\tthis.fresh();\n\t}\n\n\t__proto.onRightClick=function(){\n\t\tvar list;\n\t\tlist=this.view.itemList;\n\t\tif (list.selectedItem){\n\t\t\tconsole.log(list.selectedItem[\"url\"]);\n\t\t}\n\t}\n\n\t__proto.onAutoUpdateChange=function(){\n\t\tthis.autoUpdate=this.view.autoUpdate.selected;\n\t}\n\n\t__proto.fresh=function(){\n\t\tthis.view.title.text=\"图片缓存列表\";\n\t\tvar resList;\n\t\tresList=ResTools.getCachedResList();\n\t\tvar key;\n\t\tvar tNode;\n\t\tvar tData;\n\t\tvar dataList;\n\t\tdataList=[];\n\t\tvar i=0,len=0;\n\t\tlen=resList.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttData={};\n\t\t\tvar tUrl;\n\t\t\ttUrl=resList[i];\n\t\t\ttUrl=tUrl.replace(URL.rootPath,\"\")\n\t\t\ttData.label=tUrl;\n\t\t\ttData.url=tUrl;\n\t\t\tdataList.push(tData);\n\t\t}\n\t\tthis.view.itemList.array=dataList;\n\t}\n\n\t__getset(0,__proto,'autoUpdate',null,function(v){\n\t\tLaya.timer.clear(this,this.fresh);\n\t\tif (v){\n\t\t\tthis.fresh();\n\t\t\tLaya.timer.loop(NodeConsts.RenderCostMaxTime,this,this.fresh);\n\t\t}\n\t});\n\n\t__getset(1,ResRankView,'I',function(){\n\t\tif (!ResRankView._I)\n\t\t\tResRankView._I=new ResRankView();\n\t\treturn ResRankView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tResRankView._I=null;\n\tResRankView.filterDebugNodes=true;\n\treturn ResRankView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.SelectInfosView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar SelectInfosView=(function(_super){\n\tfunction SelectInfosView(){\n\t\tthis.showKeys=[];\n\t\tthis.view=null;\n\t\tthis.fliterTxt=null;\n\t\tthis.itemList=null;\n\t\tSelectInfosView.__super.call(this);\n\t\tSelectInfosView._I=this;\n\t\tthis.setSelectList(null);\n\t}\n\n\t__class(SelectInfosView,'laya.debug.view.nodeInfo.views.SelectInfosView',_super);\n\tvar __proto=SelectInfosView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new SelectInfos();\n\t\tthis.addChild(this.view);\n\t\tthis.view.top=this.view.bottom=this.view.left=this.view.right=0;\n\t\tNodeMenu.I.setNodeListAction(this.view.selectList);\n\t\tthis.view.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.close);\n\t\tthis.view.selectList.scrollBar.hide=true;\n\t\tthis.dis=null;\n\t\tthis.view.findBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onFindBtn);\n\t\tthis.fliterTxt=this.view.fliterTxt;\n\t\tthis.view.fliterTxt.on(/*laya.events.Event.ENTER*/\"enter\",this,this.onFliterTxtChange);\n\t\tthis.view.fliterTxt.on(/*laya.events.Event.BLUR*/\"blur\",this,this.onFliterTxtChange);\n\t}\n\n\t__proto.onFliterTxtChange=function(e){\n\t\tvar key;\n\t\tkey=this.fliterTxt.text;\n\t\tif (key==\"\"){\n\t\t\tif (this.showKeys.length !=0){\n\t\t\t\tthis.showKeys.length=0;\n\t\t\t\tthis.fresh();\n\t\t\t}\n\t\t}else\n\t\tif (key !=this.showKeys.join(\",\")){\n\t\t\tthis.showKeys=key.split(\",\");\n\t\t\tthis.fresh();\n\t\t}\n\t}\n\n\t__proto.onFindBtn=function(){\n\t\tFindSmallView.I.show();\n\t}\n\n\t__proto.onRightClick=function(){\n\t\tvar list;\n\t\tlist=this.view.selectList;\n\t\tif (list.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=list.selectedItem.path;\n\t\t\tNodeMenu.I.objRightClick(tarNode);\n\t\t}\n\t}\n\n\t//}\n\t__proto.setSelectTarget=function(node){\n\t\tif (!node)return;\n\t\tthis.setSelectList([node]);\n\t}\n\n\t__proto.setSelectList=function(list){\n\t\tthis.itemList=list;\n\t\tthis.fresh();\n\t}\n\n\t//show();\n\t__proto.fresh=function(){\n\t\tvar list;\n\t\tlist=this.itemList;\n\t\tif (!list || list.length < 1){\n\t\t\tthis.view.selectList.array=[];\n\t\t\treturn;\n\t\t};\n\t\tvar i=0,len=0;\n\t\tvar tDis;\n\t\tvar tData;\n\t\tlen=list.length;\n\t\tvar disList;\n\t\tdisList=[];\n\t\tfor (i=0;i < len;i++){\n\t\t\ttDis=list[i];\n\t\t\ttData={};\n\t\t\ttData.label=this.getLabelTxt(tDis);\n\t\t\ttData.path=tDis;\n\t\t\tdisList.push(tData);\n\t\t}\n\t\tthis.view.selectList.array=disList;\n\t}\n\n\t__proto.getLabelTxt=function(item){\n\t\tvar rst;\n\t\trst=ClassTool.getNodeClassAndName(item);\n\t\tvar i=0,len=0;\n\t\tlen=this.showKeys.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\trst+=\",\"+ObjectInfoView.getNodeValue(item,this.showKeys[i]);\n\t\t}\n\t\treturn rst;\n\t}\n\n\t__getset(1,SelectInfosView,'I',function(){\n\t\tif (!SelectInfosView._I)SelectInfosView._I=new SelectInfosView();\n\t\treturn SelectInfosView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tSelectInfosView._I=null;\n\treturn SelectInfosView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.ToolBarView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar ToolBarView=(function(_super){\n\tfunction ToolBarView(){\n\t\tthis.view=null;\n\t\tToolBarView.__super.call(this);\n\t}\n\n\t__class(ToolBarView,'laya.debug.view.nodeInfo.views.ToolBarView',_super);\n\tvar __proto=ToolBarView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.view=new ToolBar();\n\t\tthis.addChild(this.view);\n\t\tDisControlTool.setDragingItem(this.view.bg,this.view);\n\t\tthis.view.on(/*laya.events.Event.CLICK*/\"click\",this,this.onBtnClick);\n\t\tthis.view.minBtn.minHandler=this.minHandler;\n\t\tthis.view.minBtn.maxHandler=this.maxHandler;\n\t\tthis.view.minBtn.tar=this.view;\n\t\tthis.clickSelectChange();\n\t\tthis.view.selectWhenClick.on(/*laya.events.Event.CHANGE*/\"change\",this,this.clickSelectChange);\n\t\tNotice.listen(/*laya.debug.tools.DisplayHook.ITEM_CLICKED*/\"ItemClicked\",this,this.itemClicked);\n\t\tthis.dis=this.view;\n\t}\n\n\t__proto.itemClicked=function(tar){\n\t\tif (!ToolBarView.isClickSelectState)return;\n\t\tif (DisControlTool.isInTree(this.view.selectWhenClick,tar))return;\n\t\tif (ToolBarView.ignoreDebugTool){\n\t\t\tif (DebugInfoLayer.I.isDebugItem(tar))return;\n\t\t}\n\t}\n\n\t__proto.clickSelectChange=function(){\n\t\tToolBarView.isClickSelectState=this.view.selectWhenClick.selected;\n\t}\n\n\t__proto.firstShowFun=function(){\n\t\tthis.dis.x=Laya.stage.width-this.dis.width-20;\n\t\tthis.dis.y=5;\n\t}\n\n\t__proto.onBtnClick=function(e){\n\t\tswitch(e.target){\n\t\t\tcase this.view.treeBtn:\n\t\t\t\tToolPanel.I.switchShow(/*laya.debug.view.nodeInfo.ToolPanel.Tree*/\"Tree\");\n\t\t\t\tbreak ;\n\t\t\tcase this.view.findBtn:\n\t\t\t\tToolPanel.I.switchShow(/*laya.debug.view.nodeInfo.ToolPanel.Find*/\"Find\");\n\t\t\t\tbreak ;\n\t\t\tcase this.view.clearBtn:\n\t\t\t\tDebugTool.clearDebugLayer();\n\t\t\t\tbreak ;\n\t\t\tcase this.view.rankBtn:\n\t\t\t\tRenderCostRankView.I.show();\n\t\t\t\tbreak ;\n\t\t\tcase this.view.nodeRankBtn:\n\t\t\t\tObjectCreateView.I.show();\n\t\t\t\tbreak ;\n\t\t\tcase this.view.cacheBtn:\n\t\t\t\tNodeUtils.showCachedSpriteRecs();\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t__getset(1,ToolBarView,'I',function(){\n\t\tif (!ToolBarView._I)ToolBarView._I=new ToolBarView();\n\t\treturn ToolBarView._I;\n\t},laya.debug.view.nodeInfo.views.UIViewBase._$SET_I);\n\n\tToolBarView._I=null;\n\tToolBarView.ignoreDebugTool=true;\n\tToolBarView.isClickSelectState=false;\n\treturn ToolBarView;\n})(UIViewBase)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.views.TxtInfoView extends laya.debug.view.nodeInfo.views.UIViewBase\nvar TxtInfoView=(function(_super){\n\tfunction TxtInfoView(){\n\t\tthis.input=null;\n\t\tthis.btn=null;\n\t\tTxtInfoView.__super.call(this);\n\t}\n\n\t__class(TxtInfoView,'laya.debug.view.nodeInfo.views.TxtInfoView',_super);\n\tvar __proto=TxtInfoView.prototype;\n\t__proto.createPanel=function(){\n\t\tthis.input=new Input();\n\t\tthis.input.size(200,400);\n\t\tthis.input.multiline=true;\n\t\tthis.input.bgColor=\"#ff00ff\";\n\t\tthis.input.fontSize=12;\n\t\tthis.input.wordWrap=true;\n\t\tthis.addChild(this.input);\n\t\tthis.btn=this.getButton();\n\t\tthis.btn.text=\"关闭\";\n\t\tthis.btn.size(50,20);\n\t\tthis.btn.align=\"center\";\n\t\tthis.btn.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onCloseBtn);\n\t\tthis.btn.pos(5,this.input.height+5);\n\t\tthis.addChild(this.btn);\n\t}\n\n\t__proto.showInfo=function(txt){\n\t\tthis.input.text=txt;\n\t\tthis.show();\n\t}\n\n\t__proto.show=function(){\n\t\tDebugInfoLayer.I.setTop();\n\t\tDebugInfoLayer.I.popLayer.addChild(this);\n\t\tthis.x=(Laya.stage.width-this.width);\n\t\tthis.y=0;\n\t}\n\n\t__proto.onCloseBtn=function(){\n\t\tthis.close();\n\t}\n\n\treturn TxtInfoView;\n})(UIViewBase)\n\n\n//class laya.debug.ui.debugui.CodeUsedResUI extends laya.ui.View\nvar CodeUsedResUI=(function(_super){\n\tfunction CodeUsedResUI(){\n\t\tthis.tab=null;\n\t\tCodeUsedResUI.__super.call(this);\n\t}\n\n\t__class(CodeUsedResUI,'laya.debug.ui.debugui.CodeUsedResUI',_super);\n\tvar __proto=CodeUsedResUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(CodeUsedResUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(CodeUsedResUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":359,\"y\":91,\"skin\":\"comp/button1.png\"},\"type\":\"Image\"},{\"props\":{\"x\":309,\"y\":283,\"skin\":\"comp/line2.png\"},\"type\":\"Image\"},{\"type\":\"Tab\",\"child\":[{\"props\":{\"skin\":\"view/create.png\",\"label\":\"  对象创建\",\"width\":70,\"height\":17,\"name\":\"item0\"},\"type\":\"CheckBox\"},{\"props\":{\"x\":70,\"skin\":\"view/rendertime.png\",\"label\":\"渲染用时\",\"width\":70,\"height\":19,\"name\":\"item1\"},\"type\":\"CheckBox\"},{\"props\":{\"x\":140,\"skin\":\"view/cache.png\",\"label\":\"Cache\",\"width\":70,\"height\":16,\"name\":\"item2\"},\"type\":\"CheckBox\"}],\"props\":{\"x\":76,\"y\":210,\"selectedIndex\":0,\"var\":\"tab\"}}],\"props\":{\"width\":600,\"height\":400,\"base64pic\":true}};}\n\t]);\n\treturn CodeUsedResUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.comps.ListItemUI extends laya.ui.View\nvar ListItemUI=(function(_super){\n\tfunction ListItemUI(){\n\t\tListItemUI.__super.call(this);\n\t}\n\n\t__class(ListItemUI,'laya.debug.ui.debugui.comps.ListItemUI',_super);\n\tvar __proto=ListItemUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(ListItemUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(ListItemUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"props\":{\"base64pic\":true,\"width\":244,\"height\":19},\"child\":[{\"type\":\"Clip\",\"props\":{\"y\":-1,\"skin\":\"comp/clip_selectBox.png\",\"clipY\":2,\"height\":19,\"name\":\"selectBox\",\"left\":2,\"right\":2,\"x\":0}},{\"type\":\"Label\",\"props\":{\"x\":25,\"text\":\"render\",\"color\":\"#dcea36\",\"width\":77,\"height\":17,\"name\":\"label\",\"y\":2,\"fontSize\":12}},{\"type\":\"Clip\",\"props\":{\"skin\":\"comp/clip_tree_arrow.png\",\"clipY\":2,\"name\":\"arrow\",\"x\":8,\"y\":4,\"mouseEnabled\":false}}]};}\n\t]);\n\treturn ListItemUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.comps.RankListItemUI extends laya.ui.View\nvar RankListItemUI=(function(_super){\n\tfunction RankListItemUI(){\n\t\tRankListItemUI.__super.call(this);\n\t}\n\n\t__class(RankListItemUI,'laya.debug.ui.debugui.comps.RankListItemUI',_super);\n\tvar __proto=RankListItemUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(RankListItemUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(RankListItemUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"y\":-1,\"skin\":\"comp/clip_selectBox.png\",\"clipY\":2,\"height\":19,\"name\":\"selectBox\",\"left\":0,\"right\":0,\"x\":0},\"type\":\"Clip\"},{\"props\":{\"text\":\"render\",\"color\":\"#a0a0a0\",\"height\":15,\"name\":\"label\",\"y\":2,\"left\":11,\"right\":5,\"fontSize\":12,\"x\":11,\"width\":163},\"type\":\"Label\"}],\"props\":{\"width\":179,\"height\":19}};}\n\t]);\n\treturn RankListItemUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.DebugPanelUI extends laya.ui.View\nvar DebugPanelUI=(function(_super){\n\tfunction DebugPanelUI(){\n\t\tthis.bg=null;\n\t\tthis.minBtn=null;\n\t\tthis.treePanel=null;\n\t\tthis.selectWhenClick=null;\n\t\tthis.profilePanel=null;\n\t\tthis.resizeBtn=null;\n\t\tthis.mouseAnalyseBtn=null;\n\t\tthis.dragIcon=null;\n\t\tthis.clearBtn=null;\n\t\tthis.selectPanel=null;\n\t\tthis.tab=null;\n\t\tDebugPanelUI.__super.call(this);\n\t}\n\n\t__class(DebugPanelUI,'laya.debug.ui.debugui.DebugPanelUI',_super);\n\tvar __proto=DebugPanelUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(DebugPanelUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.nodetree.MinBtnComp\",MinBtnComp);\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.views.NodeTreeView\",NodeTreeView);\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.nodetree.Profile\",Profile);\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.views.SelectInfosView\",SelectInfosView);\n\t}\n\n\t__static(DebugPanelUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"props\":{\"base64pic\":true,\"width\":260,\"height\":400},\"child\":[{\"type\":\"Image\",\"props\":{\"x\":205,\"y\":254,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"}},{\"type\":\"Image\",\"props\":{\"y\":0,\"skin\":\"view/bg_top.png\",\"left\":0,\"right\":0}},{\"type\":\"MinBtnComp\",\"props\":{\"y\":-3,\"var\":\"minBtn\",\"runtime\":\"laya.debug.view.nodeInfo.nodetree.MinBtnComp\",\"right\":-3,\"x\":207}},{\"type\":\"NodeTree\",\"props\":{\"left\":0,\"right\":0,\"top\":32,\"bottom\":0,\"name\":\"节点树\",\"var\":\"treePanel\",\"runtime\":\"laya.debug.view.nodeInfo.views.NodeTreeView\"}},{\"type\":\"CheckBox\",\"props\":{\"x\":8,\"y\":9,\"skin\":\"view/clickselect.png\",\"toolTip\":\"点击选取\",\"var\":\"selectWhenClick\",\"mouseEnabled\":true,\"width\":14,\"height\":14}},{\"type\":\"Profile\",\"props\":{\"name\":\"性能\",\"top\":32,\"right\":0,\"left\":0,\"bottom\":0,\"var\":\"profilePanel\",\"runtime\":\"laya.debug.view.nodeInfo.nodetree.Profile\"}},{\"type\":\"Button\",\"props\":{\"x\":169,\"y\":247,\"skin\":\"view/resize.png\",\"right\":2,\"bottom\":2,\"name\":\"resizeBtn\",\"var\":\"resizeBtn\",\"stateNum\":3}},{\"type\":\"Clip\",\"props\":{\"y\":9,\"skin\":\"view/clickanalyse.png\",\"var\":\"mouseAnalyseBtn\",\"toolTip\":\"拖动选取\",\"left\":33,\"x\":33,\"clipY\":3}},{\"type\":\"Clip\",\"props\":{\"y\":0,\"skin\":\"view/clickanalyse.png\",\"var\":\"dragIcon\",\"x\":33,\"clipY\":3}},{\"type\":\"Button\",\"props\":{\"y\":7,\"skin\":\"view/res.png\",\"stateNum\":2,\"toolTip\":\"清除边框\",\"var\":\"clearBtn\",\"right\":34,\"x\":184}},{\"type\":\"SelectInfos\",\"props\":{\"top\":32,\"left\":0,\"right\":0,\"bottom\":0,\"name\":\"选中\",\"var\":\"selectPanel\",\"runtime\":\"laya.debug.view.nodeInfo.views.SelectInfosView\"}},{\"type\":\"Tab\",\"props\":{\"x\":59,\"y\":0,\"name\":\"tab\",\"var\":\"tab\",\"selectedIndex\":0},\"child\":[{\"type\":\"Button\",\"props\":{\"skin\":\"view/tab_panel.png\",\"label\":\"节点\",\"width\":42,\"height\":32,\"name\":\"item0\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":42,\"skin\":\"view/tab_panel.png\",\"label\":\"查询\",\"width\":42,\"height\":32,\"name\":\"item1\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":84,\"skin\":\"view/tab_panel.png\",\"label\":\"性能\",\"width\":42,\"height\":32,\"name\":\"item2\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}}]}]};}\n\t]);\n\treturn DebugPanelUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.FindNodeSmallUI extends laya.ui.View\nvar FindNodeSmallUI=(function(_super){\n\tfunction FindNodeSmallUI(){\n\t\tthis.bg=null;\n\t\tthis.closeBtn=null;\n\t\tthis.title=null;\n\t\tthis.typeSelect=null;\n\t\tthis.findTxt=null;\n\t\tthis.findBtn=null;\n\t\tFindNodeSmallUI.__super.call(this);\n\t}\n\n\t__class(FindNodeSmallUI,'laya.debug.ui.debugui.FindNodeSmallUI',_super);\n\tvar __proto=FindNodeSmallUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(FindNodeSmallUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(FindNodeSmallUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":185,\"y\":234,\"skin\":\"view/bg_tool.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\"},\"type\":\"Image\"},{\"props\":{\"x\":185,\"y\":15,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":2,\"right\":2},\"type\":\"Button\"},{\"props\":{\"x\":6,\"y\":4,\"text\":\"查找对象\",\"width\":67,\"height\":20,\"color\":\"#288edf\",\"var\":\"title\"},\"type\":\"Label\"},{\"props\":{\"x\":60,\"y\":81,\"skin\":\"comp/combobox.png\",\"labels\":\"name,class\",\"width\":63,\"height\":21,\"var\":\"typeSelect\",\"sizeGrid\":\"5,35,5,5\",\"labelColors\":\"#a0a0a0,#fffff,#ffffff#fffff\"},\"type\":\"ComboBox\"},{\"props\":{\"x\":27,\"y\":83,\"text\":\"类型\",\"width\":27,\"height\":20,\"color\":\"#288edf\",\"align\":\"right\"},\"type\":\"Label\"},{\"props\":{\"x\":7,\"y\":40,\"text\":\"包含内容\",\"width\":47,\"height\":20,\"color\":\"#288edf\",\"align\":\"right\"},\"type\":\"Label\"},{\"props\":{\"x\":60,\"y\":37,\"skin\":\"comp/textinput.png\",\"text\":\"Sprite\",\"width\":164,\"height\":22,\"var\":\"findTxt\",\"sizeGrid\":\"5,5,5,5\",\"color\":\"#a0a0a0\"},\"type\":\"TextInput\"},{\"props\":{\"x\":158,\"y\":79,\"skin\":\"comp/button.png\",\"label\":\"查找\",\"width\":65,\"height\":23,\"var\":\"findBtn\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"},\"type\":\"Button\"}],\"props\":{\"base64pic\":true,\"width\":233,\"height\":120}};}\n\t]);\n\treturn FindNodeSmallUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.FindNodeUI extends laya.ui.View\nvar FindNodeUI=(function(_super){\n\tfunction FindNodeUI(){\n\t\tthis.bg=null;\n\t\tthis.closeBtn=null;\n\t\tthis.title=null;\n\t\tthis.typeSelect=null;\n\t\tthis.findTxt=null;\n\t\tthis.result=null;\n\t\tthis.findBtn=null;\n\t\tFindNodeUI.__super.call(this);\n\t}\n\n\t__class(FindNodeUI,'laya.debug.ui.debugui.FindNodeUI',_super);\n\tvar __proto=FindNodeUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(FindNodeUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.uicomps.RankListItem\",RankListItem);\n\t}\n\n\t__static(FindNodeUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":185,\"y\":234,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"},\"type\":\"Image\"},{\"props\":{\"x\":185,\"y\":15,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":2,\"right\":2},\"type\":\"Button\"},{\"props\":{\"x\":6,\"y\":4,\"text\":\"查找对象\",\"width\":67,\"height\":20,\"color\":\"#88ef19\",\"var\":\"title\"},\"type\":\"Label\"},{\"props\":{\"x\":52,\"y\":75,\"skin\":\"comp/combobox.png\",\"labels\":\"name,class\",\"width\":63,\"height\":21,\"var\":\"typeSelect\",\"sizeGrid\":\"5,35,5,5\",\"labelColors\":\"#a0a0a0,#fffff,#ffffff#fffff\"},\"type\":\"ComboBox\"},{\"props\":{\"x\":10,\"y\":77,\"text\":\"类型\",\"width\":27,\"height\":20,\"color\":\"#88ef19\",\"align\":\"right\"},\"type\":\"Label\"},{\"props\":{\"x\":7,\"y\":34,\"text\":\"包含内容\",\"width\":47,\"height\":20,\"color\":\"#88ef19\",\"align\":\"right\"},\"type\":\"Label\"},{\"props\":{\"x\":59,\"y\":31,\"skin\":\"comp/textinput.png\",\"text\":\"Sprite\",\"width\":131,\"height\":22,\"var\":\"findTxt\",\"sizeGrid\":\"5,5,5,5\",\"color\":\"#a0a0a0\"},\"type\":\"TextInput\"},{\"type\":\"List\",\"child\":[{\"type\":\"RankListItem\",\"props\":{\"y\":30,\"left\":5,\"right\":5,\"name\":\"render\",\"x\":30,\"runtime\":\"laya.debug.uicomps.RankListItem\"}}],\"props\":{\"x\":6,\"y\":106,\"width\":188,\"height\":180,\"vScrollBarSkin\":\"comp/vscroll.png\",\"var\":\"result\"}},{\"props\":{\"x\":125,\"y\":73,\"skin\":\"comp/button.png\",\"label\":\"查找\",\"width\":65,\"height\":23,\"var\":\"findBtn\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"},\"type\":\"Button\"}],\"props\":{\"width\":200,\"height\":300,\"base64pic\":true}};}\n\t]);\n\treturn FindNodeUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.MinBtnCompUI extends laya.ui.View\nvar MinBtnCompUI=(function(_super){\n\tfunction MinBtnCompUI(){\n\t\tthis.minBtn=null;\n\t\tthis.maxUI=null;\n\t\tthis.bg=null;\n\t\tthis.maxBtn=null;\n\t\tMinBtnCompUI.__super.call(this);\n\t}\n\n\t__class(MinBtnCompUI,'laya.debug.ui.debugui.MinBtnCompUI',_super);\n\tvar __proto=MinBtnCompUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(MinBtnCompUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(MinBtnCompUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":7,\"y\":8,\"skin\":\"comp/minBtn.png\",\"stateNum\":\"3\",\"var\":\"minBtn\",\"width\":22,\"height\":20,\"toolTip\":\"最小化\"},\"type\":\"Button\"},{\"type\":\"Box\",\"child\":[{\"props\":{\"x\":0,\"y\":0,\"skin\":\"view/bg_panel.png\",\"var\":\"bg\",\"width\":36,\"height\":36,\"sizeGrid\":\"5,5,5,5\"},\"type\":\"Image\"},{\"props\":{\"x\":6,\"y\":8,\"skin\":\"view/zoom_out.png\",\"stateNum\":\"2\",\"var\":\"maxBtn\"},\"type\":\"Button\"}],\"props\":{\"var\":\"maxUI\"}}],\"props\":{\"width\":36,\"height\":36,\"base64pic\":true}};}\n\t]);\n\treturn MinBtnCompUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.NodeListPanelUI extends laya.ui.View\nvar NodeListPanelUI=(function(_super){\n\tfunction NodeListPanelUI(){\n\t\tthis.bg=null;\n\t\tthis.closeBtn=null;\n\t\tthis.title=null;\n\t\tthis.itemList=null;\n\t\tNodeListPanelUI.__super.call(this);\n\t}\n\n\t__class(NodeListPanelUI,'laya.debug.ui.debugui.NodeListPanelUI',_super);\n\tvar __proto=NodeListPanelUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(NodeListPanelUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.uicomps.RankListItem\",RankListItem);\n\t}\n\n\t__static(NodeListPanelUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":235,\"y\":284,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"},\"type\":\"Image\"},{\"props\":{\"x\":204,\"y\":32,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":2,\"right\":2,\"visible\":true},\"type\":\"Button\"},{\"props\":{\"x\":10,\"y\":6,\"text\":\"节点信息\",\"width\":147,\"height\":16,\"color\":\"#288edf\",\"var\":\"title\"},\"type\":\"Label\"},{\"type\":\"List\",\"child\":[{\"type\":\"RankListItem\",\"props\":{\"left\":5,\"right\":5,\"name\":\"render\",\"runtime\":\"laya.debug.uicomps.RankListItem\"}}],\"props\":{\"vScrollBarSkin\":\"comp/vscroll.png\",\"var\":\"itemList\",\"left\":2,\"right\":2,\"top\":26,\"bottom\":0,\"repeatX\":1,\"x\":20}}],\"props\":{\"width\":200,\"height\":300}};}\n\t]);\n\treturn NodeListPanelUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.NodeToolUI extends laya.ui.View\nvar NodeToolUI=(function(_super){\n\tfunction NodeToolUI(){\n\t\tthis.bg=null;\n\t\tthis.closeBtn=null;\n\t\tthis.tarTxt=null;\n\t\tthis.freshBtn=null;\n\t\tthis.mouseAnalyseBtn=null;\n\t\tthis.dragIcon=null;\n\t\tNodeToolUI.__super.call(this);\n\t}\n\n\t__class(NodeToolUI,'laya.debug.ui.debugui.NodeToolUI',_super);\n\tvar __proto=NodeToolUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(NodeToolUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(NodeToolUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"props\":{\"base64pic\":true,\"width\":200,\"height\":341},\"child\":[{\"type\":\"Image\",\"props\":{\"x\":195,\"y\":244,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"}},{\"type\":\"Label\",\"props\":{\"x\":9,\"y\":5,\"text\":\"当前选中对象\",\"width\":67,\"height\":16,\"color\":\"#a0a0a0\"}},{\"type\":\"Button\",\"props\":{\"x\":195,\"y\":25,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":2,\"right\":2}},{\"type\":\"Label\",\"props\":{\"x\":10,\"y\":25,\"text\":\"当前对象\",\"width\":67,\"height\":16,\"color\":\"#a0a0a0\",\"var\":\"tarTxt\"}},{\"type\":\"Button\",\"props\":{\"x\":15,\"y\":65,\"skin\":\"comp/button.png\",\"label\":\"父链\",\"width\":39,\"height\":23,\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":66,\"y\":65,\"skin\":\"comp/button.png\",\"label\":\"子\",\"width\":35,\"height\":23,\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":112,\"y\":65,\"skin\":\"comp/button.png\",\"label\":\"兄弟\",\"width\":49,\"height\":23,\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":13,\"y\":117,\"skin\":\"comp/button.png\",\"label\":\"Enable链\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":100,\"y\":117,\"skin\":\"comp/button.png\",\"label\":\"Size链\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Label\",\"props\":{\"x\":14,\"y\":97,\"text\":\"节点链信息\",\"width\":67,\"height\":16,\"color\":\"#a0a0a0\"}},{\"type\":\"Label\",\"props\":{\"x\":15,\"y\":45,\"text\":\"对象选取\",\"width\":67,\"height\":16,\"color\":\"#a0a0a0\"}},{\"type\":\"Label\",\"props\":{\"x\":16,\"y\":145,\"text\":\"节点显示\",\"width\":67,\"height\":16,\"color\":\"#a0a0a0\"}},{\"type\":\"Button\",\"props\":{\"x\":13,\"y\":164,\"skin\":\"comp/button.png\",\"label\":\"隐藏旁支\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":100,\"y\":164,\"skin\":\"comp/button.png\",\"label\":\"隐藏兄弟\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":13,\"y\":197,\"skin\":\"comp/button.png\",\"label\":\"隐藏子\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":99,\"y\":197,\"skin\":\"comp/button.png\",\"label\":\"恢复\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Label\",\"props\":{\"x\":15,\"y\":228,\"text\":\"其他\",\"width\":67,\"height\":16,\"color\":\"#a0a0a0\"}},{\"type\":\"Button\",\"props\":{\"x\":12,\"y\":247,\"skin\":\"comp/button.png\",\"label\":\"节点树定位\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":99,\"y\":247,\"skin\":\"comp/button.png\",\"label\":\"显示边框\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Label\",\"props\":{\"x\":12,\"y\":315,\"text\":\"Alt+A分析鼠标能否够点中对象\",\"width\":173,\"height\":16,\"color\":\"#a0a0a0\"}},{\"type\":\"Button\",\"props\":{\"x\":156,\"y\":1,\"skin\":\"view/refresh2.png\",\"var\":\"freshBtn\",\"left\":156,\"toolTip\":\"recache节点\"}},{\"type\":\"Button\",\"props\":{\"x\":12,\"y\":279,\"skin\":\"comp/button.png\",\"label\":\"输出到控制台\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Button\",\"props\":{\"x\":99,\"y\":279,\"skin\":\"comp/button.png\",\"label\":\"显示切换\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"}},{\"type\":\"Clip\",\"props\":{\"y\":44,\"skin\":\"view/clickanalyse.png\",\"var\":\"mouseAnalyseBtn\",\"toolTip\":\"拖动到对象上方判断是否能够点中\",\"left\":84,\"x\":84,\"clipY\":3}},{\"type\":\"Clip\",\"props\":{\"y\":35,\"skin\":\"view/clickanalyse.png\",\"var\":\"dragIcon\",\"x\":94,\"clipY\":3}}]};}\n\t]);\n\treturn NodeToolUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.NodeTreeSettingUI extends laya.ui.View\nvar NodeTreeSettingUI=(function(_super){\n\tfunction NodeTreeSettingUI(){\n\t\tthis.bg=null;\n\t\tthis.showTxt=null;\n\t\tthis.okBtn=null;\n\t\tthis.closeBtn=null;\n\t\tNodeTreeSettingUI.__super.call(this);\n\t}\n\n\t__class(NodeTreeSettingUI,'laya.debug.ui.debugui.NodeTreeSettingUI',_super);\n\tvar __proto=NodeTreeSettingUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(NodeTreeSettingUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(NodeTreeSettingUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":0,\"y\":0,\"skin\":\"view/bg_panel.png\",\"left\":0,\"top\":0,\"bottom\":0,\"right\":0,\"var\":\"bg\",\"width\":200,\"height\":300,\"sizeGrid\":\"5,5,5,5\"},\"type\":\"Image\"},{\"props\":{\"x\":9,\"y\":7,\"text\":\"要显示的属性\",\"width\":76,\"height\":16,\"color\":\"#ffffff\",\"align\":\"left\"},\"type\":\"Label\"},{\"props\":{\"x\":6,\"y\":29,\"skin\":\"comp/textinput.png\",\"text\":\"x\\\\ny\\\\nwidth\\\\nheight\",\"width\":188,\"height\":230,\"multiline\":true,\"var\":\"showTxt\",\"color\":\"#a0a0a0\",\"sizeGrid\":\"5,5,5,5\"},\"type\":\"TextInput\"},{\"props\":{\"x\":57,\"y\":269,\"skin\":\"comp/button.png\",\"label\":\"确定\",\"var\":\"okBtn\",\"mouseEnabled\":\"true\",\"labelColors\":\"#ffffff,#ffffff,#ffffff,#ffffff\"},\"type\":\"Button\"},{\"props\":{\"x\":175,\"y\":5,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\"},\"type\":\"Button\"}],\"props\":{\"base64pic\":true,\"width\":200,\"height\":300}};}\n\t]);\n\treturn NodeTreeSettingUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.NodeTreeUI extends laya.ui.View\nvar NodeTreeUI=(function(_super){\n\tfunction NodeTreeUI(){\n\t\tthis.nodeTree=null;\n\t\tthis.controlBar=null;\n\t\tthis.settingBtn=null;\n\t\tthis.freshBtn=null;\n\t\tthis.fliterTxt=null;\n\t\tthis.closeBtn=null;\n\t\tthis.ifShowProps=null;\n\t\tNodeTreeUI.__super.call(this);\n\t}\n\n\t__class(NodeTreeUI,'laya.debug.ui.debugui.NodeTreeUI',_super);\n\tvar __proto=NodeTreeUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(NodeTreeUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.uicomps.TreeListItem\",TreeListItem);\n\t}\n\n\t__static(NodeTreeUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"props\":{\"width\":200,\"height\":260,\"base64pic\":true},\"child\":[{\"type\":\"Image\",\"props\":{\"x\":-22,\"y\":-47,\"skin\":\"view/bg_panel.png\",\"width\":211,\"height\":206,\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"sizeGrid\":\"5,5,5,5\"}},{\"props\":{\"y\":0,\"skin\":\"view/bg_tool.png\",\"left\":0,\"right\":0},\"type\":\"Image\"},{\"type\":\"Tree\",\"props\":{\"x\":0,\"scrollBarSkin\":\"comp/vscroll.png\",\"width\":195,\"height\":229,\"var\":\"nodeTree\",\"left\":0,\"right\":0,\"top\":38,\"bottom\":20},\"child\":[{\"type\":\"ListItem\",\"props\":{\"y\":0,\"name\":\"render\",\"left\":0,\"right\":0,\"runtime\":\"laya.debug.uicomps.TreeListItem\"}}]},{\"type\":\"Box\",\"props\":{\"x\":3,\"y\":5,\"var\":\"controlBar\",\"left\":3,\"right\":3,\"top\":5,\"height\":23},\"child\":[{\"type\":\"Button\",\"props\":{\"x\":6,\"skin\":\"view/setting.png\",\"stateNum\":3,\"var\":\"settingBtn\",\"toolTip\":\"设置显示的属性\",\"y\":6}},{\"type\":\"Button\",\"props\":{\"y\":6,\"skin\":\"view/refresh.png\",\"var\":\"freshBtn\",\"left\":30,\"toolTip\":\"刷新数据\"}},{\"type\":\"TextInput\",\"props\":{\"y\":0,\"skin\":\"view/bg_top.png\",\"height\":22,\"var\":\"fliterTxt\",\"left\":53,\"right\":0,\"color\":\"#a0a0a0\"}},{\"type\":\"Button\",\"props\":{\"x\":172,\"y\":2,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"right\":1,\"visible\":false}}]},{\"props\":{\"y\":243,\"skin\":\"comp/checkbox.png\",\"label\":\"显示属性\",\"var\":\"ifShowProps\",\"bottom\":3,\"selected\":true,\"visible\":true,\"x\":2,\"width\":70,\"height\":14,\"labelColors\":\"#a0a0a0,#fffff,#ffffff,#fffff\"},\"type\":\"CheckBox\"}]};}\n\t]);\n\treturn NodeTreeUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.ObjectCreateUI extends laya.ui.View\nvar ObjectCreateUI=(function(_super){\n\tfunction ObjectCreateUI(){\n\t\tthis.bg=null;\n\t\tthis.closeBtn=null;\n\t\tthis.itemList=null;\n\t\tthis.freshBtn=null;\n\t\tObjectCreateUI.__super.call(this);\n\t}\n\n\t__class(ObjectCreateUI,'laya.debug.ui.debugui.ObjectCreateUI',_super);\n\tvar __proto=ObjectCreateUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(ObjectCreateUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.uicomps.RankListItem\",RankListItem);\n\t}\n\n\t__static(ObjectCreateUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":215,\"y\":264,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"},\"type\":\"Image\"},{\"props\":{\"x\":184,\"y\":12,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":2,\"right\":2,\"visible\":false},\"type\":\"Button\"},{\"props\":{\"x\":11,\"y\":5,\"text\":\"对象创建统计\",\"width\":83,\"height\":16,\"color\":\"#288edf\"},\"type\":\"Label\"},{\"type\":\"List\",\"child\":[{\"type\":\"RankListItem\",\"props\":{\"y\":0,\"left\":5,\"right\":5,\"name\":\"render\",\"runtime\":\"laya.debug.uicomps.RankListItem\"}}],\"props\":{\"vScrollBarSkin\":\"comp/vscroll.png\",\"var\":\"itemList\",\"top\":26,\"bottom\":5,\"left\":5,\"right\":5,\"repeatX\":1}},{\"props\":{\"y\":1,\"skin\":\"view/refresh2.png\",\"var\":\"freshBtn\",\"toolTip\":\"刷新数据\",\"right\":1,\"x\":178},\"type\":\"Button\"}],\"props\":{\"width\":200,\"height\":300,\"base64pic\":true}};}\n\t]);\n\treturn ObjectCreateUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.ObjectInfoUI extends laya.ui.View\nvar ObjectInfoUI=(function(_super){\n\tfunction ObjectInfoUI(){\n\t\tthis.bg=null;\n\t\tthis.title=null;\n\t\tthis.showTxt=null;\n\t\tthis.closeBtn=null;\n\t\tthis.autoUpdate=null;\n\t\tthis.settingBtn=null;\n\t\tObjectInfoUI.__super.call(this);\n\t}\n\n\t__class(ObjectInfoUI,'laya.debug.ui.debugui.ObjectInfoUI',_super);\n\tvar __proto=ObjectInfoUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(ObjectInfoUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(ObjectInfoUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":-1,\"y\":0,\"skin\":\"view/bg_panel.png\",\"left\":-1,\"right\":1,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"},\"type\":\"Image\"},{\"props\":{\"x\":7,\"y\":5,\"text\":\"对象类型\",\"width\":67,\"height\":20,\"color\":\"#ffffff\",\"var\":\"title\",\"left\":7,\"right\":6},\"type\":\"Label\"},{\"props\":{\"x\":2,\"skin\":\"comp/textinput.png\",\"text\":\"属性内容\",\"width\":196,\"height\":228,\"left\":2,\"right\":2,\"var\":\"showTxt\",\"top\":25,\"bottom\":20,\"editable\":false,\"multiline\":true,\"sizeGrid\":\"5,5,5,5\",\"color\":\"#a0a0a0\"},\"type\":\"TextArea\"},{\"props\":{\"x\":178,\"y\":4,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":4,\"right\":2},\"type\":\"Button\"},{\"props\":{\"skin\":\"comp/checkbox.png\",\"label\":\"自动刷新属性\",\"var\":\"autoUpdate\",\"bottom\":2,\"x\":3,\"labelColors\":\"#a0a0a0,#fffff,#ffffff,#fffff\"},\"type\":\"CheckBox\"},{\"props\":{\"x\":164,\"skin\":\"view/setting.png\",\"stateNum\":\"3\",\"var\":\"settingBtn\",\"y\":6,\"top\":6,\"right\":24,\"toolTip\":\"设置显示属性\"},\"type\":\"Button\"},{\"props\":{\"x\":179,\"y\":257,\"skin\":\"view/resize.png\",\"right\":2,\"bottom\":2,\"name\":\"resizeBtn\",\"stateNum\":3},\"type\":\"Button\"}],\"props\":{\"base64pic\":true,\"width\":200,\"height\":200}};}\n\t]);\n\treturn ObjectInfoUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.OutPutUI extends laya.ui.View\nvar OutPutUI=(function(_super){\n\tfunction OutPutUI(){\n\t\tthis.bg=null;\n\t\tthis.txt=null;\n\t\tthis.closeBtn=null;\n\t\tthis.clearBtn=null;\n\t\tOutPutUI.__super.call(this);\n\t}\n\n\t__class(OutPutUI,'laya.debug.ui.debugui.OutPutUI',_super);\n\tvar __proto=OutPutUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(OutPutUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){}\n\t__static(OutPutUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"props\":{\"width\":300,\"height\":200,\"base64pic\":true},\"child\":[{\"type\":\"Image\",\"props\":{\"x\":205,\"y\":254,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"}},{\"type\":\"Label\",\"props\":{\"skin\":\"comp/textarea.png\",\"text\":\"TextArea\",\"color\":\"#a0a0a0\",\"var\":\"txt\",\"left\":5,\"right\":5,\"top\":22,\"bottom\":5,\"mouseEnabled\":true,\"sizeGrid\":\"3,3,3,3\"}},{\"type\":\"Button\",\"props\":{\"x\":185,\"y\":15,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":2,\"right\":2}},{\"props\":{\"x\":253,\"y\":1,\"skin\":\"view/re.png\",\"stateNum\":\"2\",\"var\":\"clearBtn\",\"right\":25},\"type\":\"Button\"},{\"props\":{\"x\":169,\"y\":247,\"skin\":\"view/resize.png\",\"right\":2,\"bottom\":2,\"name\":\"resizeBtn\",\"stateNum\":3},\"type\":\"Button\"}]};}\n\t]);\n\treturn OutPutUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.ProfileUI extends laya.ui.View\nvar ProfileUI=(function(_super){\n\tfunction ProfileUI(){\n\t\tthis.renderPanel=null;\n\t\tthis.createPanel=null;\n\t\tthis.cachePanel=null;\n\t\tthis.tab=null;\n\t\tthis.resPanel=null;\n\t\tProfileUI.__super.call(this);\n\t}\n\n\t__class(ProfileUI,'laya.debug.ui.debugui.ProfileUI',_super);\n\tvar __proto=ProfileUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(ProfileUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.views.RenderCostRankView\",RenderCostRankView);\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.views.ObjectCreateView\",ObjectCreateView);\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.views.CacheRankView\",CacheRankView);\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.views.ResRankView\",ResRankView);\n\t}\n\n\t__static(ProfileUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"props\":{\"width\":260,\"height\":329,\"base64pic\":true},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":0,\"skin\":\"view/bg_tool.png\",\"right\":0,\"left\":0}},{\"type\":\"Rank\",\"props\":{\"var\":\"renderPanel\",\"top\":29,\"runtime\":\"laya.debug.view.nodeInfo.views.RenderCostRankView\",\"right\":0,\"name\":\"渲染用时\",\"left\":0,\"bottom\":0}},{\"type\":\"ObjectCreate\",\"props\":{\"var\":\"createPanel\",\"top\":29,\"runtime\":\"laya.debug.view.nodeInfo.views.ObjectCreateView\",\"right\":0,\"name\":\"对象创建统计\",\"left\":0,\"bottom\":0}},{\"type\":\"Rank\",\"props\":{\"x\":10,\"var\":\"cachePanel\",\"top\":29,\"runtime\":\"laya.debug.view.nodeInfo.views.CacheRankView\",\"right\":0,\"name\":\"cache用时\",\"left\":0,\"bottom\":0}},{\"type\":\"Tab\",\"props\":{\"y\":9,\"x\":7,\"width\":191,\"var\":\"tab\",\"selectedIndex\":0,\"height\":19},\"child\":[{\"type\":\"CheckBox\",\"props\":{\"y\":0,\"x\":0,\"width\":50,\"skin\":\"view/create.png\",\"name\":\"item0\",\"labelColors\":\"#a0a0a0,#ffffff,#ffffff,#ffffff\",\"label\":\"  对象\",\"height\":17}},{\"type\":\"CheckBox\",\"props\":{\"y\":0,\"x\":55,\"width\":50,\"skin\":\"view/rendertime.png\",\"name\":\"item1\",\"labelColors\":\"#a0a0a0,#ffffff,#ffffff,#ffffff\",\"label\":\" 渲染\",\"height\":19}},{\"type\":\"CheckBox\",\"props\":{\"y\":0,\"x\":110,\"width\":50,\"skin\":\"view/cache.png\",\"name\":\"item2\",\"labelColors\":\"#a0a0a0,#ffffff,#ffffff,#ffffff\",\"label\":\" 重绘\",\"height\":16}},{\"type\":\"CheckBox\",\"props\":{\"y\":0,\"x\":165,\"width\":50,\"skin\":\"view/cache.png\",\"name\":\"item3\",\"labelColors\":\"#a0a0a0,#ffffff,#ffffff,#ffffff\",\"label\":\" 资源\",\"height\":16}}]},{\"type\":\"Rank\",\"props\":{\"y\":40,\"x\":50,\"var\":\"resPanel\",\"top\":29,\"runtime\":\"laya.debug.view.nodeInfo.views.ResRankView\",\"right\":0,\"name\":\"资源缓存\",\"left\":0,\"bottom\":0}}]};}\n\t]);\n\treturn ProfileUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.RankUI extends laya.ui.View\nvar RankUI=(function(_super){\n\tfunction RankUI(){\n\t\tthis.bg=null;\n\t\tthis.closeBtn=null;\n\t\tthis.title=null;\n\t\tthis.itemList=null;\n\t\tthis.autoUpdate=null;\n\t\tthis.freshBtn=null;\n\t\tRankUI.__super.call(this);\n\t}\n\n\t__class(RankUI,'laya.debug.ui.debugui.RankUI',_super);\n\tvar __proto=RankUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(RankUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.uicomps.RankListItem\",RankListItem);\n\t}\n\n\t__static(RankUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":225,\"y\":274,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"},\"type\":\"Image\"},{\"props\":{\"x\":194,\"y\":22,\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":2,\"right\":2,\"visible\":false},\"type\":\"Button\"},{\"props\":{\"x\":8,\"y\":5,\"text\":\"渲染用时表(3000ms)\",\"width\":109,\"height\":16,\"color\":\"#288edf\",\"var\":\"title\"},\"type\":\"Label\"},{\"type\":\"List\",\"child\":[{\"type\":\"RankListItem\",\"props\":{\"left\":5,\"right\":5,\"name\":\"render\",\"runtime\":\"laya.debug.uicomps.RankListItem\"}}],\"props\":{\"vScrollBarSkin\":\"comp/vscroll.png\",\"var\":\"itemList\",\"left\":2,\"right\":2,\"top\":26,\"bottom\":25,\"repeatX\":1,\"x\":10,\"y\":10}},{\"props\":{\"skin\":\"comp/checkbox.png\",\"label\":\"自动刷新属性\",\"var\":\"autoUpdate\",\"bottom\":3,\"selected\":false,\"visible\":true,\"left\":2,\"labelColors\":\"#a0a0a0,#fffff,#ffffff,#fffff\"},\"type\":\"CheckBox\"},{\"props\":{\"y\":1,\"skin\":\"view/refresh2.png\",\"var\":\"freshBtn\",\"toolTip\":\"刷新数据\",\"right\":1},\"type\":\"Button\"}],\"props\":{\"width\":200,\"height\":300}};}\n\t]);\n\treturn RankUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.SelectInfosUI extends laya.ui.View\nvar SelectInfosUI=(function(_super){\n\tfunction SelectInfosUI(){\n\t\tthis.bg=null;\n\t\tthis.closeBtn=null;\n\t\tthis.selectList=null;\n\t\tthis.findBtn=null;\n\t\tthis.fliterTxt=null;\n\t\tSelectInfosUI.__super.call(this);\n\t}\n\n\t__class(SelectInfosUI,'laya.debug.ui.debugui.SelectInfosUI',_super);\n\tvar __proto=SelectInfosUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(SelectInfosUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.uicomps.RankListItem\",RankListItem);\n\t}\n\n\t__static(SelectInfosUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"child\":[{\"props\":{\"x\":205,\"y\":254,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"},\"type\":\"Image\"},{\"props\":{\"skin\":\"view/btn_close.png\",\"var\":\"closeBtn\",\"top\":32,\"visible\":false,\"right\":2},\"type\":\"Button\"},{\"props\":{\"x\":7,\"y\":36,\"text\":\"当前选中列表\",\"width\":83,\"height\":16,\"color\":\"#288edf\"},\"type\":\"Label\"},{\"type\":\"List\",\"child\":[{\"type\":\"RankListItem\",\"props\":{\"left\":5,\"right\":5,\"name\":\"render\",\"runtime\":\"laya.debug.uicomps.RankListItem\"}}],\"props\":{\"vScrollBarSkin\":\"comp/vscroll.png\",\"var\":\"selectList\",\"left\":5,\"right\":5,\"top\":56,\"bottom\":25,\"repeatX\":1,\"x\":20}},{\"props\":{\"x\":6,\"text\":\"Alt+V选取鼠标下的对象\",\"width\":189,\"height\":16,\"color\":\"#a0a0a0\",\"bottom\":3},\"type\":\"Label\"},{\"type\":\"Image\",\"props\":{\"y\":0,\"skin\":\"view/bg_tool.png\",\"left\":0,\"right\":0}},{\"type\":\"Clip\",\"props\":{\"y\":6,\"skin\":\"view/search.png\",\"clipY\":2,\"var\":\"findBtn\",\"right\":5,\"toolTip\":\"查找\",\"x\":174}},{\"type\":\"TextInput\",\"props\":{\"y\":6,\"skin\":\"view/bg_top.png\",\"height\":22,\"var\":\"fliterTxt\",\"left\":8,\"right\":45,\"color\":\"#a0a0a0\",\"x\":8,\"width\":147}}],\"props\":{\"width\":200,\"height\":300,\"base64pic\":true}};}\n\t]);\n\treturn SelectInfosUI;\n})(View)\n\n\n//class laya.debug.ui.debugui.ToolBarUI extends laya.ui.View\nvar ToolBarUI=(function(_super){\n\tfunction ToolBarUI(){\n\t\tthis.bg=null;\n\t\tthis.treeBtn=null;\n\t\tthis.findBtn=null;\n\t\tthis.minBtn=null;\n\t\tthis.selectWhenClick=null;\n\t\tthis.clearBtn=null;\n\t\tthis.rankBtn=null;\n\t\tthis.nodeRankBtn=null;\n\t\tthis.cacheBtn=null;\n\t\tToolBarUI.__super.call(this);\n\t}\n\n\t__class(ToolBarUI,'laya.debug.ui.debugui.ToolBarUI',_super);\n\tvar __proto=ToolBarUI.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\tthis.createView(ToolBarUI.uiView);\n\t}\n\n\t__proto.viewMapRegists=function(){\n\t\tView.regComponent(\"laya.debug.view.nodeInfo.nodetree.MinBtnComp\",MinBtnComp);\n\t}\n\n\t__static(ToolBarUI,\n\t['uiView',function(){return this.uiView={\"type\":\"View\",\"props\":{\"base64pic\":true,\"width\":250,\"height\":30},\"child\":[{\"type\":\"Image\",\"props\":{\"x\":195,\"y\":244,\"skin\":\"view/bg_panel.png\",\"left\":0,\"right\":0,\"top\":0,\"bottom\":0,\"var\":\"bg\",\"sizeGrid\":\"5,5,5,5\"}},{\"type\":\"Button\",\"props\":{\"x\":2,\"y\":6,\"skin\":\"view/save.png\",\"stateNum\":2,\"var\":\"treeBtn\",\"toolTip\":\"节点树\"}},{\"type\":\"Button\",\"props\":{\"x\":25,\"y\":6,\"skin\":\"view/save.png\",\"stateNum\":2,\"var\":\"findBtn\",\"toolTip\":\"查找面板\"}},{\"type\":\"MinBtnComp\",\"props\":{\"x\":218,\"y\":-3,\"var\":\"minBtn\",\"runtime\":\"laya.debug.view.nodeInfo.nodetree.MinBtnComp\"}},{\"type\":\"CheckBox\",\"props\":{\"x\":124,\"y\":8,\"skin\":\"comp/checkbox.png\",\"label\":\"点击选取\",\"var\":\"selectWhenClick\",\"labelColors\":\"#a0a0a0,#fffff,#ffffff,#fffff\"}},{\"type\":\"Button\",\"props\":{\"x\":193,\"y\":5,\"skin\":\"view/res.png\",\"stateNum\":2,\"toolTip\":\"清除边框\",\"var\":\"clearBtn\"}},{\"type\":\"Button\",\"props\":{\"x\":49,\"y\":6,\"skin\":\"view/save.png\",\"stateNum\":2,\"var\":\"rankBtn\",\"toolTip\":\"渲染用时排行\"}},{\"type\":\"Button\",\"props\":{\"x\":72,\"y\":6,\"skin\":\"view/save.png\",\"stateNum\":2,\"var\":\"nodeRankBtn\",\"toolTip\":\"创建对象排行\"}},{\"type\":\"Button\",\"props\":{\"x\":94,\"y\":6,\"skin\":\"view/save.png\",\"stateNum\":2,\"var\":\"cacheBtn\",\"toolTip\":\"cache对象\"}}]};}\n\t]);\n\treturn ToolBarUI;\n})(View)\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2016-7-6 上午9:42:46\n*/\n//class laya.debug.uicomps.ListBase extends laya.ui.List\nvar ListBase=(function(_super){\n\tfunction ListBase(){\n\t\tListBase.__super.call(this);\n\t}\n\n\t__class(ListBase,'laya.debug.uicomps.ListBase',_super);\n\tvar __proto=ListBase.prototype;\n\t__getset(0,__proto,'selectedIndex',_super.prototype._$get_selectedIndex,function(value){\n\t\tif (this._selectedIndex !=value){\n\t\t\tthis._selectedIndex=value;\n\t\t\tthis.changeSelectStatus();\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t\tthis.selectHandler && this.selectHandler.runWith(value);\n\t\t}\n\t\tif (this.selectEnable && this._scrollBar){\n\t\t\tvar numX=this._isVertical ? this.repeatX :this.repeatY;\n\t\t\tif (value < this._startIndex || (value+numX > this._startIndex+this.repeatX *this.repeatY)){\n\t\t\t\tthis.scrollTo(value);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn ListBase;\n})(List)\n\n\n/**\n*\n*@author ww\n*@version 1.0\n*\n*@created 2016-7-6 上午9:49:47\n*/\n//class laya.debug.uicomps.TreeBase extends laya.ui.Tree\nvar TreeBase=(function(_super){\n\tfunction TreeBase(){\n\t\tTreeBase.__super.call(this);\n\t}\n\n\t__class(TreeBase,'laya.debug.uicomps.TreeBase',_super);\n\tvar __proto=TreeBase.prototype;\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._list=new ListBase());\n\t\tthis._list.renderHandler=Handler.create(this,this.renderItem,null,false);\n\t\tthis._list.repeatX=1;\n\t\tthis._list.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onListChange);\n\t}\n\n\treturn TreeBase;\n})(Tree)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.uicomps.RankListItem extends laya.debug.ui.debugui.comps.RankListItemUI\nvar RankListItem=(function(_super){\n\tfunction RankListItem(){\n\t\tRankListItem.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(RankListItemUI.uiView);\n\t\tthis.createView(RankListItemUI.uiView);\n\t}\n\n\t__class(RankListItem,'laya.debug.uicomps.RankListItem',_super);\n\tvar __proto=RankListItem.prototype;\n\t__proto.createChildren=function(){}\n\treturn RankListItem;\n})(RankListItemUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.uicomps.TreeListItem extends laya.debug.ui.debugui.comps.ListItemUI\nvar TreeListItem=(function(_super){\n\tfunction TreeListItem(){\n\t\tTreeListItem.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(ListItemUI.uiView);\n\t\tthis.createView(ListItemUI.uiView);\n\t}\n\n\t__class(TreeListItem,'laya.debug.uicomps.TreeListItem',_super);\n\tvar __proto=TreeListItem.prototype;\n\t__proto.createChildren=function(){}\n\treturn TreeListItem;\n})(ListItemUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.DebugPage extends laya.debug.ui.debugui.DebugPanelUI\nvar DebugPage=(function(_super){\n\tfunction DebugPage(){\n\t\tthis.views=null;\n\t\tDebugPage.__super.call(this);\n\t\tthis.msRec=new Rectangle();\n\t\tBase64AtlasManager.replaceRes(DebugPanelUI.uiView);\n\t\tthis.createView(DebugPanelUI.uiView);\n\t\tDisControlTool.setResizeAbleEx(this);\n\t\tthis.views=[this.treePanel,this.selectPanel,this.profilePanel];\n\t\tthis.tab.selectedIndex=0;\n\t\tthis.tabChange();\n\t\tthis.tab.on(/*laya.events.Event.CHANGE*/\"change\",this,this.tabChange);\n\t\tthis.changeSize();\n\t}\n\n\t__class(DebugPage,'laya.debug.view.nodeInfo.nodetree.DebugPage',_super);\n\tvar __proto=DebugPage.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t}\n\n\t__proto.tabChange=function(){\n\t\tDisControlTool.addOnlyByIndex(this.views,this.tab.selectedIndex,this);\n\t\tDisControlTool.setTop(this.resizeBtn);\n\t}\n\n\t__proto.changeSize=function(){\n\t\tif (this.width < 245){\n\t\t\tthis.width=245;\n\t\t}\n\t\tif (this.height < 100){\n\t\t\tthis.height=200;\n\t\t}\n\t\tlaya.ui.Component.prototype.changeSize.call(this);\n\t\tthis.msRec.setTo(0,0,this.width,this.height);\n\t\tthis.scrollRect=this.msRec;\n\t}\n\n\treturn DebugPage;\n})(DebugPanelUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.FindNode extends laya.debug.ui.debugui.FindNodeUI\nvar FindNode=(function(_super){\n\tfunction FindNode(){\n\t\tFindNode.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(FindNodeUI.uiView);\n\t\tthis.createView(FindNodeUI.uiView);\n\t}\n\n\t__class(FindNode,'laya.debug.view.nodeInfo.nodetree.FindNode',_super);\n\tvar __proto=FindNode.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t}\n\n\treturn FindNode;\n})(FindNodeUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.FindNodeSmall extends laya.debug.ui.debugui.FindNodeSmallUI\nvar FindNodeSmall=(function(_super){\n\tfunction FindNodeSmall(){\n\t\tFindNodeSmall.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(FindNodeSmallUI.uiView);\n\t\tthis.createView(FindNodeSmallUI.uiView);\n\t}\n\n\t__class(FindNodeSmall,'laya.debug.view.nodeInfo.nodetree.FindNodeSmall',_super);\n\tvar __proto=FindNodeSmall.prototype;\n\t__proto.createChildren=function(){}\n\treturn FindNodeSmall;\n})(FindNodeSmallUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.MinBtnComp extends laya.debug.ui.debugui.MinBtnCompUI\nvar MinBtnComp=(function(_super){\n\tfunction MinBtnComp(){\n\t\tthis.tar=null;\n\t\tthis.minHandler=null;\n\t\tthis.maxHandler=null;\n\t\tthis.prePos=new Point();\n\t\tMinBtnComp.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(MinBtnCompUI.uiView);\n\t\tthis.createView(MinBtnCompUI.uiView);\n\t\tthis.init();\n\t}\n\n\t__class(MinBtnComp,'laya.debug.view.nodeInfo.nodetree.MinBtnComp',_super);\n\tvar __proto=MinBtnComp.prototype;\n\t__proto.createChildren=function(){}\n\t__proto.init=function(){\n\t\tthis.minBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onMinBtn);\n\t\tthis.maxBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onMaxBtn);\n\t\tthis.minState=false;\n\t\tthis.maxUI.removeSelf();\n\t\tDisControlTool.setDragingItem(this.bg,this.maxUI);\n\t}\n\n\t__proto.onMaxBtn=function(){\n\t\tthis.maxUI.removeSelf();\n\t\tif (this.maxHandler){\n\t\t\tthis.maxHandler.run();\n\t\t}\n\t\tif (this.tar){\n\t\t\tthis.tar.x+=this.maxUI.x-this.prePos.x;\n\t\t\tthis.tar.y+=this.maxUI.y-this.prePos.y;\n\t\t}\n\t}\n\n\t__proto.onMinBtn=function(){\n\t\tif (!this.displayedInStage)return;\n\t\tvar tPos;\n\t\ttPos=Point.TEMP;\n\t\ttPos.setTo(0,0);\n\t\ttPos=this.localToGlobal(tPos);\n\t\ttPos=DebugInfoLayer.I.popLayer.globalToLocal(tPos);\n\t\tthis.maxUI.pos(tPos.x,tPos.y);\n\t\tDebugInfoLayer.I.popLayer.addChild(this.maxUI);\n\t\tif (this.tar){\n\t\t\tthis.prePos.setTo(tPos.x,tPos.y);\n\t\t}\n\t\tif (this.minHandler){\n\t\t\tthis.minHandler.run();\n\t\t}\n\t}\n\n\t__getset(0,__proto,'minState',null,function(v){\n\t});\n\n\treturn MinBtnComp;\n})(MinBtnCompUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.NodeListPanel extends laya.debug.ui.debugui.NodeListPanelUI\nvar NodeListPanel=(function(_super){\n\tfunction NodeListPanel(){\n\t\tNodeListPanel.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(NodeListPanelUI.uiView);\n\t\tthis.createView(NodeListPanelUI.uiView);\n\t}\n\n\t__class(NodeListPanel,'laya.debug.view.nodeInfo.nodetree.NodeListPanel',_super);\n\tvar __proto=NodeListPanel.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t}\n\n\treturn NodeListPanel;\n})(NodeListPanelUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.NodeTool extends laya.debug.ui.debugui.NodeToolUI\nvar NodeTool=(function(_super){\n\tfunction NodeTool(){\n\t\tNodeTool.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(NodeToolUI.uiView);\n\t\tthis.createView(NodeToolUI.uiView);\n\t}\n\n\t__class(NodeTool,'laya.debug.view.nodeInfo.nodetree.NodeTool',_super);\n\tvar __proto=NodeTool.prototype;\n\t__proto.createChildren=function(){}\n\treturn NodeTool;\n})(NodeToolUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.NodeTree extends laya.debug.ui.debugui.NodeTreeUI\nvar NodeTree=(function(_super){\n\tfunction NodeTree(){\n\t\tthis.showProps=false;\n\t\tthis._closeSettingHandler=null;\n\t\tthis._tar=null;\n\t\tNodeTree.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(NodeTreeUI.uiView);\n\t\tView.regComponent(\"Tree\",TreeBase);\n\t\tthis.createView(NodeTreeUI.uiView);\n\t\tView.regComponent(\"Tree\",Tree);\n\t\tthis.inits();\n\t\tNodeTree.I=this;\n\t}\n\n\t__class(NodeTree,'laya.debug.view.nodeInfo.nodetree.NodeTree',_super);\n\tvar __proto=NodeTree.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t}\n\n\t__proto.inits=function(){\n\t\tthis.nodeTree.list.scrollBar.hide=true;\n\t\tthis.nodeTree.list.selectEnable=true;\n\t\tthis.settingBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onSettingBtn);\n\t\tthis.freshBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.fresh);\n\t\tthis.closeBtn.on(/*laya.events.Event.CLICK*/\"click\",this,this.onCloseBtn);\n\t\tthis.fliterTxt.on(/*laya.events.Event.ENTER*/\"enter\",this,this.onFliterTxtChange);\n\t\tthis.fliterTxt.on(/*laya.events.Event.BLUR*/\"blur\",this,this.onFliterTxtChange);\n\t\tNodeMenu.I.setNodeListAction(this.nodeTree.list);\n\t\tthis.nodeTree.list.on(/*laya.events.Event.CLICK*/\"click\",this,this.onListClick,[this.nodeTree.list]);\n\t\tthis.nodeTree.renderHandler=new Handler(this,this.treeRender);\n\t\tthis._closeSettingHandler=new Handler(this,this.closeSetting);\n\t\tthis.onIfShowPropsChange();\n\t\tthis.ifShowProps.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onIfShowPropsChange);\n\t}\n\n\t__proto.onIfShowPropsChange=function(){\n\t\tthis.showProps=this.ifShowProps.selected;\n\t\tthis.fresh();\n\t}\n\n\t__proto.onListClick=function(list){\n\t\tif (list.selectedItem){\n\t\t\tif (list.selectedItem.isDirectory){\n\t\t\t\tlist.selectedItem.isOpen=!list.selectedItem.isOpen;\n\t\t\t\tthis.nodeTree.fresh();\n\t\t\t}\n\t\t}\n\t}\n\n\t//}\n\t__proto.onFindBtn=function(){\n\t\tFindSmallView.I.show();\n\t}\n\n\t__proto.onCloseBtn=function(){\n\t\tthis.removeSelf();\n\t}\n\n\t__proto.onTreeDoubleClick=function(e){\n\t\tif (this.nodeTree.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=this.nodeTree.selectedItem.path;\n\t\t\tNodeMenu.I.objRightClick(tarNode);\n\t\t}\n\t}\n\n\t//}\n\t__proto.onTreeRightMouseDown=function(e){\n\t\tif (this.nodeTree.selectedItem){\n\t\t\tvar tarNode;\n\t\t\ttarNode=this.nodeTree.selectedItem.path;\n\t\t\tNodeMenu.I.objRightClick(tarNode);\n\t\t}\n\t}\n\n\t//}\n\t__proto.onSettingBtn=function(){\n\t\tNodeTreeSettingView.I.showSetting(NodeTree.showKeys,this._closeSettingHandler,this._tar);\n\t}\n\n\t__proto.closeSetting=function(newKeys){\n\t\tNodeTree.showKeys=newKeys;\n\t\tthis.fresh();\n\t}\n\n\t__proto.onFliterTxtChange=function(e){\n\t\tvar key;\n\t\tkey=this.fliterTxt.text;\n\t\tif (key==\"\")return;\n\t\tif (key !=NodeTree.showKeys.join(\",\")){\n\t\t\tNodeTree.showKeys=key.split(\",\");\n\t\t\tthis.fresh();\n\t\t}\n\t\treturn;\n\t\tthis.selecteByFile(key);\n\t}\n\n\t__proto.selecteByFile=function(key){\n\t\tvar arr;\n\t\tarr=this.nodeTree.source;\n\t\tvar rsts;\n\t\trsts=DebugTool.findNameHas(key,false);\n\t\tif (rsts && rsts.length > 0){\n\t\t\tvar tar;\n\t\t\ttar=rsts[0];\n\t\t\tthis.parseOpen(arr,tar);\n\t\t}\n\t}\n\n\t__proto.showSelectInStage=function(node){\n\t\tthis.setDis(Laya.stage);\n\t\tthis.selectByNode(node);\n\t}\n\n\t__proto.selectByNode=function(node){\n\t\tif (!node)return;\n\t\tvar arr;\n\t\tarr=this.nodeTree.source;\n\t\tthis.parseOpen(arr,node);\n\t}\n\n\t__proto.showNodeList=function(nodeList){\n\t\tif (!nodeList)return;\n\t\tvar i=0,len=0;\n\t\tlen=nodeList.length;\n\t\tvar showList;\n\t\tshowList=[];\n\t\tvar tData;\n\t\tvar tSprite;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttSprite=nodeList[i];\n\t\t\ttData={};\n\t\t\ttData.label=ClassTool.getNodeClassAndName(tSprite);\n\t\t\ttData.path=tSprite;\n\t\t\tshowList.push(tData);\n\t\t}\n\t\tthis.nodeTree.array=showList;\n\t}\n\n\t__proto.parseOpen=function(tree,node){\n\t\tif (tree.length < 1)return;\n\t\tif (!node)return;\n\t\tvar i=0,len=0;\n\t\tlen=tree.length;\n\t\tvar tItem;\n\t\tfor(i=0;i<len;i++){\n\t\t\ttItem=tree[i];\n\t\t\tif(tItem.path==node){\n\t\t\t\tvar sItem;\n\t\t\t\tsItem=tItem;\n\t\t\t\twhile (tItem){\n\t\t\t\t\ttItem.isOpen=true;\n\t\t\t\t\tthis.nodeTree.fresh();\n\t\t\t\t\ttItem=tItem.nodeParent;\n\t\t\t\t}\n\t\t\t\tthis.nodeTree.selectedItem=sItem;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取数据源中指定键名的值。\n\t*/\n\t__proto.getFilterSource=function(array,result,key){\n\t\tkey=key.toLocaleLowerCase();\n\t\tvar item;\n\t\t/*for each*/for(var $each_item in array){\n\t\t\titem=array[$each_item];\n\t\t\tif (item.isDirectory && String(item.label).toLowerCase().indexOf(key)>-1){\n\t\t\t\titem.x=0;\n\t\t\t\tresult.push(item);\n\t\t\t}\n\t\t\tif (item.child && item.child.length > 0){\n\t\t\t\tthis.getFilterSource(item.child,result,key);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.onControlDown=function(){\n\t\tthis.startDrag();\n\t}\n\n\t__proto.setDis=function(sprite){\n\t\tthis._tar=sprite;\n\t\tthis.fresh();\n\t}\n\n\t__proto.fresh=function(){\n\t\tvar preTar;\n\t\tif (this.nodeTree.selectedItem){\n\t\t\tvar tItem;\n\t\t\ttItem=this.nodeTree.selectedItem;\n\t\t\twhile (tItem && (! (tItem.path instanceof laya.display.Sprite ))){\n\t\t\t\ttItem=tItem.nodeParent;\n\t\t\t}\n\t\t\tif (tItem && tItem.path){\n\t\t\t\tpreTar=tItem.path;\n\t\t\t}\n\t\t}\n\t\tif (!this._tar){\n\t\t\tthis.nodeTree.array=[];\n\t\t\t}else{\n\t\t\tthis.nodeTree.array=NodeUtils.getNodeTreeData(this._tar,this.showProps?NodeTree.showKeys:NodeTree.emptyShowKey);\n\t\t}\n\t\tif (preTar){\n\t\t\tthis.selectByNode(preTar);\n\t\t}\n\t}\n\n\t__proto.treeRender=function(cell,index){\n\t\tvar item=cell.dataSource;\n\t\tif (item){\n\t\t\tvar isDirectory=item.child || item.isDirectory;\n\t\t\tvar label=cell.getChildByName(\"label\");\n\t\t\tif ((item.path instanceof laya.display.Node )){\n\t\t\t\tlabel.color=\"#09a4f6\";\n\t\t\t\t}else{\n\t\t\t\tif (item.isChilds){\n\t\t\t\t\tlabel.color=\"#00ff11\";\n\t\t\t\t\t}else{\n\t\t\t\t\tlabel.color=\"#838bc5\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tNodeTree.I=null;\n\tNodeTree.emptyShowKey=[];\n\t__static(NodeTree,\n\t['showKeys',function(){return this.showKeys=[\"x\",\"y\",\"width\",\"height\",\"renderCost\"];}\n\t]);\n\treturn NodeTree;\n})(NodeTreeUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.NodeTreeSetting extends laya.debug.ui.debugui.NodeTreeSettingUI\nvar NodeTreeSetting=(function(_super){\n\tfunction NodeTreeSetting(){\n\t\tNodeTreeSetting.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(NodeTreeSettingUI.uiView);\n\t\tthis.createView(NodeTreeSettingUI.uiView);\n\t}\n\n\t__class(NodeTreeSetting,'laya.debug.view.nodeInfo.nodetree.NodeTreeSetting',_super);\n\tvar __proto=NodeTreeSetting.prototype;\n\t//inits();\n\t__proto.createChildren=function(){}\n\treturn NodeTreeSetting;\n})(NodeTreeSettingUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.ObjectCreate extends laya.debug.ui.debugui.ObjectCreateUI\nvar ObjectCreate=(function(_super){\n\tfunction ObjectCreate(){\n\t\tObjectCreate.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(ObjectCreateUI.uiView);\n\t\tthis.createView(ObjectCreateUI.uiView);\n\t}\n\n\t__class(ObjectCreate,'laya.debug.view.nodeInfo.nodetree.ObjectCreate',_super);\n\tvar __proto=ObjectCreate.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t}\n\n\treturn ObjectCreate;\n})(ObjectCreateUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.ObjectInfo extends laya.debug.ui.debugui.ObjectInfoUI\nvar ObjectInfo=(function(_super){\n\tfunction ObjectInfo(){\n\t\tObjectInfo.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(ObjectInfoUI.uiView);\n\t\tthis.createView(ObjectInfoUI.uiView);\n\t}\n\n\t__class(ObjectInfo,'laya.debug.view.nodeInfo.nodetree.ObjectInfo',_super);\n\tvar __proto=ObjectInfo.prototype;\n\t__proto.createChildren=function(){}\n\treturn ObjectInfo;\n})(ObjectInfoUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.OutPut extends laya.debug.ui.debugui.OutPutUI\nvar OutPut=(function(_super){\n\tfunction OutPut(){\n\t\tOutPut.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(OutPutUI.uiView);\n\t\tthis.createView(OutPutUI.uiView);\n\t}\n\n\t__class(OutPut,'laya.debug.view.nodeInfo.nodetree.OutPut',_super);\n\tvar __proto=OutPut.prototype;\n\t__proto.createChildren=function(){}\n\treturn OutPut;\n})(OutPutUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.Profile extends laya.debug.ui.debugui.ProfileUI\nvar Profile=(function(_super){\n\tfunction Profile(){\n\t\tthis.views=null;\n\t\tProfile.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(ProfileUI.uiView);\n\t\tthis.createView(ProfileUI.uiView);\n\t\tthis.views=[this.createPanel,this.renderPanel,this.cachePanel,this.resPanel];\n\t\tthis.tab.selectedIndex=0;\n\t\tthis.tabChange();\n\t\tthis.tab.on(/*laya.events.Event.CHANGE*/\"change\",this,this.tabChange);\n\t}\n\n\t__class(Profile,'laya.debug.view.nodeInfo.nodetree.Profile',_super);\n\tvar __proto=Profile.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t}\n\n\t__proto.tabChange=function(){\n\t\tDisControlTool.addOnlyByIndex(this.views,this.tab.selectedIndex,this);\n\t}\n\n\treturn Profile;\n})(ProfileUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.Rank extends laya.debug.ui.debugui.RankUI\nvar Rank=(function(_super){\n\tfunction Rank(){\n\t\tRank.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(RankUI.uiView);\n\t\tthis.createView(RankUI.uiView);\n\t}\n\n\t__class(Rank,'laya.debug.view.nodeInfo.nodetree.Rank',_super);\n\tvar __proto=Rank.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t}\n\n\treturn Rank;\n})(RankUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.SelectInfos extends laya.debug.ui.debugui.SelectInfosUI\nvar SelectInfos=(function(_super){\n\tfunction SelectInfos(){\n\t\tSelectInfos.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(SelectInfosUI.uiView);\n\t\tthis.createView(SelectInfosUI.uiView);\n\t}\n\n\t__class(SelectInfos,'laya.debug.view.nodeInfo.nodetree.SelectInfos',_super);\n\tvar __proto=SelectInfos.prototype;\n\t__proto.createChildren=function(){\n\t\tthis.viewMapRegists();\n\t}\n\n\treturn SelectInfos;\n})(SelectInfosUI)\n\n\n/**\n*...\n*@author ww\n*/\n//class laya.debug.view.nodeInfo.nodetree.ToolBar extends laya.debug.ui.debugui.ToolBarUI\nvar ToolBar=(function(_super){\n\tfunction ToolBar(){\n\t\tToolBar.__super.call(this);\n\t\tBase64AtlasManager.replaceRes(ToolBarUI.uiView);\n\t\tthis.createView(ToolBarUI.uiView);\n\t}\n\n\t__class(ToolBar,'laya.debug.view.nodeInfo.nodetree.ToolBar',_super);\n\tvar __proto=ToolBar.prototype;\n\t__proto.createChildren=function(){}\n\treturn ToolBar;\n})(ToolBarUI)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.device.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Bitmap=laya.resource.Bitmap,Browser=laya.utils.Browser,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar Handler=laya.utils.Handler,Rectangle=laya.maths.Rectangle,Render=laya.renders.Render,Sprite=laya.display.Sprite;\n\tvar Stage=laya.display.Stage,Texture=laya.resource.Texture,Utils=laya.utils.Utils,WebGL=laya.webgl.WebGL;\n\tvar WebGLContext=laya.webgl.WebGLContext;\n/**\n*使用前可用<code>supported</code>查看浏览器支持。\n*/\n//class laya.device.geolocation.Geolocation\nvar Geolocation=(function(){\n\tfunction Geolocation(){}\n\t__class(Geolocation,'laya.device.geolocation.Geolocation');\n\tGeolocation.getCurrentPosition=function(onSuccess,onError){\n\t\tGeolocation.navigator.geolocation.getCurrentPosition(function(pos){\n\t\t\tGeolocation.position.setPosition(pos);\n\t\t\tonSuccess.runWith(Geolocation.position);\n\t\t},\n\t\tfunction(error){\n\t\t\tonError.runWith(error);\n\t\t\t},{\n\t\t\tenableHighAccuracy :laya.device.geolocation.Geolocation.enableHighAccuracy,\n\t\t\ttimeout :laya.device.geolocation.Geolocation.timeout,\n\t\t\tmaximumAge :laya.device.geolocation.Geolocation.maximumAge\n\t\t});\n\t}\n\n\tGeolocation.watchPosition=function(onSuccess,onError){\n\t\treturn Geolocation.navigator.geolocation.watchPosition(function(pos){\n\t\t\tGeolocation.position.setPosition(pos);\n\t\t\tonSuccess.runWith(Geolocation.position);\n\t\t},\n\t\tfunction(error){\n\t\t\tonError.runWith(error);\n\t\t\t},{\n\t\t\tenableHighAccuracy :Geolocation.enableHighAccuracy,\n\t\t\ttimeout :Geolocation.timeout,\n\t\t\tmaximumAge :Geolocation.maximumAge\n\t\t});\n\t}\n\n\tGeolocation.clearWatch=function(id){\n\t\tGeolocation.navigator.geolocation.clearWatch(id);\n\t}\n\n\tGeolocation.PERMISSION_DENIED=1;\n\tGeolocation.POSITION_UNAVAILABLE=2;\n\tGeolocation.TIMEOUT=3;\n\tGeolocation.enableHighAccuracy=false;\n\tGeolocation.maximumAge=0;\n\t__static(Geolocation,\n\t['navigator',function(){return this.navigator=Browser.window.navigator;},'position',function(){return this.position=new GeolocationInfo();},'supported',function(){return this.supported=!!Geolocation.navigator.geolocation;},'timeout',function(){return this.timeout=1E10;}\n\t]);\n\treturn Geolocation;\n})()\n\n\n//class laya.device.geolocation.GeolocationInfo\nvar GeolocationInfo=(function(){\n\tfunction GeolocationInfo(){\n\t\tthis.pos=null;\n\t\tthis.coords=null;\n\t}\n\n\t__class(GeolocationInfo,'laya.device.geolocation.GeolocationInfo');\n\tvar __proto=GeolocationInfo.prototype;\n\t__proto.setPosition=function(pos){\n\t\tthis.pos=pos;\n\t\tthis.coords=pos.coords;\n\t}\n\n\t__getset(0,__proto,'heading',function(){\n\t\treturn this.coords.heading;\n\t});\n\n\t__getset(0,__proto,'latitude',function(){\n\t\treturn this.coords.latitude;\n\t});\n\n\t__getset(0,__proto,'altitudeAccuracy',function(){\n\t\treturn this.coords.altitudeAccuracy;\n\t});\n\n\t__getset(0,__proto,'longitude',function(){\n\t\treturn this.coords.longitude;\n\t});\n\n\t__getset(0,__proto,'altitude',function(){\n\t\treturn this.coords.altitude;\n\t});\n\n\t__getset(0,__proto,'accuracy',function(){\n\t\treturn this.coords.accuracy;\n\t});\n\n\t__getset(0,__proto,'speed',function(){\n\t\treturn this.coords.speed;\n\t});\n\n\t__getset(0,__proto,'timestamp',function(){\n\t\treturn this.pos.timestamp;\n\t});\n\n\treturn GeolocationInfo;\n})()\n\n\n/**\n*Media用于捕捉摄像头和麦克风。可以捕捉任意之一，或者同时捕捉两者。<code>getCamera</code>前可以使用<code>supported()</code>检查当前浏览器是否支持。\n*<b>NOTE:</b>\n*<p>目前Media在移动平台只支持Android，不支持IOS。只可在FireFox完整地使用，Chrome测试时无法捕捉视频。</p>\n*/\n//class laya.device.media.Media\nvar Media=(function(){\n\tfunction Media(){}\n\t__class(Media,'laya.device.media.Media');\n\tMedia.supported=function(){\n\t\treturn !!Browser.window.navigator.getUserMedia;\n\t}\n\n\tMedia.getMedia=function(options,onSuccess,onError){\n\t\tif (Browser.window.navigator.getUserMedia){\n\t\t\tBrowser.window.navigator.getUserMedia(options,function(stream){\n\t\t\t\tonSuccess.runWith(Browser.window.URL.createObjectURL(stream));\n\t\t\t\t},function(err){\n\t\t\t\tonError.runWith(err);\n\t\t\t});\n\t\t}\n\t}\n\n\tMedia.__init$=function(){\n\t\t/*__JS__ */navigator.getUserMedia=navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;;\n\t}\n\n\treturn Media;\n})()\n\n\n/**\n*加速度x/y/z的单位均为m/s²。\n*在硬件（陀螺仪）不支持的情况下，alpha、beta和gamma值为null。\n*\n*@author Survivor\n*/\n//class laya.device.motion.AccelerationInfo\nvar AccelerationInfo=(function(){\n\tfunction AccelerationInfo(){\n\t\t/**\n\t\t*x轴上的加速度值。\n\t\t*/\n\t\tthis.x=NaN;\n\t\t/**\n\t\t*y轴上的加速度值。\n\t\t*/\n\t\tthis.y=NaN;\n\t\t/**\n\t\t*z轴上的加速度值。\n\t\t*/\n\t\tthis.z=NaN;\n\t}\n\n\t__class(AccelerationInfo,'laya.device.motion.AccelerationInfo');\n\treturn AccelerationInfo;\n})()\n\n\n/**\n*保存旋转信息的类。请勿修改本类的属性。\n*@author Survivor\n*/\n//class laya.device.motion.RotationInfo\nvar RotationInfo=(function(){\n\tfunction RotationInfo(){\n\t\t/**\n\t\t*<p>\n\t\t*指示设备是否可以提供绝对方位数据（指向地球坐标系），或者设备决定的任意坐标系。\n\t\t*关于坐标系参见<i>https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained</i>。\n\t\t*</p>\n\t\t*需要注意的是，IOS环境下，该值始终为false。即使如此，你依旧可以从<code>alpha</code>中取得正确的值。\n\t\t*/\n\t\tthis.absolute=false;\n\t\t/**\n\t\t*Z轴旋转角度，其值范围从0至360。\n\t\t*若<code>absolute</code>为true或者在IOS中，alpha值是从北方到当前设备方向的角度值。\n\t\t*/\n\t\tthis.alpha=NaN;\n\t\t/**\n\t\t*X轴旋转角度,其值范围从-180至180。代表设备从前至后的运动。\n\t\t*/\n\t\tthis.beta=NaN;\n\t\t/**\n\t\t*Y轴旋转角度，其值范围从-90至90。代表设备从左至右的运动。\n\t\t*/\n\t\tthis.gamma=NaN;\n\t\t/**\n\t\t*罗盘数据的精确度（角度）。仅IOS可用。\n\t\t*/\n\t\tthis.compassAccuracy=NaN;\n\t}\n\n\t__class(RotationInfo,'laya.device.motion.RotationInfo');\n\treturn RotationInfo;\n})()\n\n\n/**\n*Accelerator.instance获取唯一的Accelerator引用，请勿调用构造函数。\n*\n*<p>\n*listen()的回调处理器接受四个参数：\n*<ol>\n*<li><b>acceleration</b>:表示用户给予设备的加速度。</li>\n*<li><b>accelerationIncludingGravity</b>:设备受到的总加速度（包含重力）。</li>\n*<li><b>rotationRate</b>:设备的自转速率。</li>\n*<li><b>interval</b>:加速度获取的时间间隔（毫秒）。</li>\n*</ol>\n*</p>\n*<p>\n*<b>NOTE</b><br/>\n*如，rotationRate的alpha在apple和moz文档中都是z轴旋转角度，但是实测是x轴旋转角度。为了使各属性表示的值与文档所述相同，实际值与其他属性进行了对调。\n*其中：\n*<ul>\n*<li>alpha使用gamma值。</li>\n*<li>beta使用alpha值。</li>\n*<li>gamma使用beta。</li>\n*</ul>\n*目前孰是孰非尚未可知，以此为注。\n*</p>\n*/\n//class laya.device.motion.Accelerator extends laya.events.EventDispatcher\nvar Accelerator=(function(_super){\n\tfunction Accelerator(singleton){\n\t\tAccelerator.__super.call(this);\n\t\t/*__JS__ */this.onDeviceOrientationChange=this.onDeviceOrientationChange.bind(this);\n\t}\n\n\t__class(Accelerator,'laya.device.motion.Accelerator',_super);\n\tvar __proto=Accelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tBrowser.window.addEventListener('devicemotion',this.onDeviceOrientationChange);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tBrowser.window.removeEventListener('devicemotion',this.onDeviceOrientationChange)\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\t__proto.onDeviceOrientationChange=function(e){\n\t\tvar interval=e.interval;\n\t\tAccelerator.acceleration.x=e.acceleration.x;\n\t\tAccelerator.acceleration.y=e.acceleration.y;\n\t\tAccelerator.acceleration.z=e.acceleration.z;\n\t\tAccelerator.accelerationIncludingGravity.x=e.accelerationIncludingGravity.x;\n\t\tAccelerator.accelerationIncludingGravity.y=e.accelerationIncludingGravity.y;\n\t\tAccelerator.accelerationIncludingGravity.z=e.accelerationIncludingGravity.z;\n\t\tAccelerator.rotationRate.alpha=e.rotationRate.gamma *-1;\n\t\tAccelerator.rotationRate.beta=e.rotationRate.alpha *-1;\n\t\tAccelerator.rotationRate.gamma=e.rotationRate.beta;\n\t\tif (Browser.onAndroid){\n\t\t\tif (Accelerator.onChrome){\n\t\t\t\tAccelerator.rotationRate.alpha *=180 / Math.PI;\n\t\t\t\tAccelerator.rotationRate.beta *=180 / Math.PI;\n\t\t\t\tAccelerator.rotationRate.gamma *=180 / Math.PI;\n\t\t\t}\n\t\t\tAccelerator.acceleration.x *=-1;\n\t\t\tAccelerator.accelerationIncludingGravity.x *=-1;\n\t\t}\n\t\telse if (Browser.onIOS){\n\t\t\tAccelerator.acceleration.y *=-1;\n\t\t\tAccelerator.acceleration.z *=-1;\n\t\t\tAccelerator.accelerationIncludingGravity.y *=-1;\n\t\t\tAccelerator.accelerationIncludingGravity.z *=-1;\n\t\t\tinterval *=1000;\n\t\t}\n\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\",[Accelerator.acceleration,Accelerator.accelerationIncludingGravity,Accelerator.rotationRate,interval]);\n\t}\n\n\t__getset(1,Accelerator,'instance',function(){Accelerator._instance=Accelerator._instance|| new Accelerator(0)\n\t\treturn Accelerator._instance;\n\t},laya.events.EventDispatcher._$SET_instance);\n\n\tAccelerator.getTransformedAcceleration=function(acceleration){Accelerator.transformedAcceleration=Accelerator.transformedAcceleration|| new AccelerationInfo();\n\t\tAccelerator.transformedAcceleration.z=acceleration.z;\n\t\tif (Browser.window.orientation==90){\n\t\t\tAccelerator.transformedAcceleration.x=acceleration.y;\n\t\t\tAccelerator.transformedAcceleration.y=-acceleration.x;\n\t\t}\n\t\telse if (Browser.window.orientation==-90){\n\t\t\tAccelerator.transformedAcceleration.x=-acceleration.y;\n\t\t\tAccelerator.transformedAcceleration.y=acceleration.x;\n\t\t}\n\t\telse if (!Browser.window.orientation){\n\t\t\tAccelerator.transformedAcceleration.x=acceleration.x;\n\t\t\tAccelerator.transformedAcceleration.y=acceleration.y;\n\t\t}\n\t\telse if (Browser.window.orientation==180){\n\t\t\tAccelerator.transformedAcceleration.x=-acceleration.x;\n\t\t\tAccelerator.transformedAcceleration.y=-acceleration.y;\n\t\t};\n\t\tvar tx=NaN;\n\t\tif (Laya.stage.canvasDegree==-90){\n\t\t\ttx=Accelerator.transformedAcceleration.x;\n\t\t\tAccelerator.transformedAcceleration.x=-Accelerator.transformedAcceleration.y;\n\t\t\tAccelerator.transformedAcceleration.y=tx;\n\t\t}\n\t\telse if (Laya.stage.canvasDegree==90){\n\t\t\ttx=Accelerator.transformedAcceleration.x;\n\t\t\tAccelerator.transformedAcceleration.x=Accelerator.transformedAcceleration.y;\n\t\t\tAccelerator.transformedAcceleration.y=-tx;\n\t\t}\n\t\treturn Accelerator.transformedAcceleration;\n\t}\n\n\tAccelerator._instance=null;\n\tAccelerator.transformedAcceleration=null;\n\t__static(Accelerator,\n\t['acceleration',function(){return this.acceleration=new AccelerationInfo();},'accelerationIncludingGravity',function(){return this.accelerationIncludingGravity=new AccelerationInfo();},'rotationRate',function(){return this.rotationRate=new RotationInfo();},'onChrome',function(){return this.onChrome=(Browser.userAgent.indexOf(\"Chrome\")>-1);}\n\t]);\n\treturn Accelerator;\n})(EventDispatcher)\n\n\n/**\n*使用Gyroscope.instance获取唯一的Gyroscope引用，请勿调用构造函数。\n*\n*<p>\n*listen()的回调处理器接受两个参数：\n*<code>function onOrientationChange(absolute:Boolean,info:RotationInfo):void</code>\n*<ol>\n*<li><b>absolute</b>:指示设备是否可以提供绝对方位数据（指向地球坐标系），或者设备决定的任意坐标系。关于坐标系参见<i>https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained</i>。</li>\n*<li><b>info</b>:<code>RotationInfo</code>类型参数，保存设备的旋转值。</li>\n*</ol>\n*</p>\n*\n*<p>\n*浏览器兼容性参见：<i>http://caniuse.com/#search=deviceorientation</i>\n*</p>\n*/\n//class laya.device.motion.Gyroscope extends laya.events.EventDispatcher\nvar Gyroscope=(function(_super){\n\tfunction Gyroscope(singleton){\n\t\tGyroscope.__super.call(this);\n\t\t/*__JS__ */this.onDeviceOrientationChange=this.onDeviceOrientationChange.bind(this);\n\t}\n\n\t__class(Gyroscope,'laya.device.motion.Gyroscope',_super);\n\tvar __proto=Gyroscope.prototype;\n\t/**\n\t*监视陀螺仪运动。\n\t*@param observer 回调函数接受一个Boolean类型的<code>absolute</code>和<code>GyroscopeInfo</code>类型参数。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tBrowser.window.addEventListener('deviceorientation',this.onDeviceOrientationChange);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消指定处理器对陀螺仪的监视。\n\t*@param observer\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tBrowser.window.removeEventListener('deviceorientation',this.onDeviceOrientationChange);\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\t__proto.onDeviceOrientationChange=function(e){\n\t\tGyroscope.info.alpha=e.alpha;\n\t\tGyroscope.info.beta=e.beta;\n\t\tGyroscope.info.gamma=e.gamma;\n\t\tif (e.webkitCompassHeading){\n\t\t\tGyroscope.info.alpha=e.webkitCompassHeading *-1;\n\t\t\tGyroscope.info.compassAccuracy=e.webkitCompassAccuracy;\n\t\t}\n\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\",[e.absolute,Gyroscope.info]);\n\t}\n\n\t__getset(1,Gyroscope,'instance',function(){Gyroscope._instance=Gyroscope._instance|| new Gyroscope(0);\n\t\treturn Gyroscope._instance;\n\t},laya.events.EventDispatcher._$SET_instance);\n\n\tGyroscope._instance=null;\n\t__static(Gyroscope,\n\t['info',function(){return this.info=new RotationInfo();}\n\t]);\n\treturn Gyroscope;\n})(EventDispatcher)\n\n\n/**\n*Shake只能在支持此操作的设备上有效。\n*\n*@author Survivor\n*/\n//class laya.device.Shake extends laya.events.EventDispatcher\nvar Shake=(function(_super){\n\tfunction Shake(){\n\t\tthis.throushold=0;\n\t\tthis.shakeInterval=0;\n\t\tthis.callback=null;\n\t\tthis.lastX=NaN;\n\t\tthis.lastY=NaN;\n\t\tthis.lastZ=NaN;\n\t\tthis.lastMillSecond=NaN;\n\t\tShake.__super.call(this);\n\t}\n\n\t__class(Shake,'laya.device.Shake',_super);\n\tvar __proto=Shake.prototype;\n\t/**\n\t*开始响应设备摇晃。\n\t*@param throushold 响应的瞬时速度阈值，轻度摇晃的值约在5~10间。\n\t*@param timeout 设备摇晃的响应间隔时间。\n\t*@param callback 在设备摇晃触发时调用的处理器。\n\t*/\n\t__proto.start=function(throushold,interval){\n\t\tthis.throushold=throushold;\n\t\tthis.shakeInterval=interval;\n\t\tthis.lastX=this.lastY=this.lastZ=NaN;\n\t\tAccelerator.instance.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onShake);\n\t}\n\n\t/**\n\t*停止响应设备摇晃。\n\t*/\n\t__proto.stop=function(){\n\t\tAccelerator.instance.off(/*laya.events.Event.CHANGE*/\"change\",this,this.onShake);\n\t}\n\n\t__proto.onShake=function(acceleration,accelerationIncludingGravity,rotationRate,interval){\n\t\tif(isNaN(this.lastX)){\n\t\t\tthis.lastX=accelerationIncludingGravity.x;\n\t\t\tthis.lastY=accelerationIncludingGravity.y;\n\t\t\tthis.lastZ=accelerationIncludingGravity.z;\n\t\t\tthis.lastMillSecond=Browser.now();\n\t\t\treturn;\n\t\t};\n\t\tvar deltaX=Math.abs(this.lastX-accelerationIncludingGravity.x);\n\t\tvar deltaY=Math.abs(this.lastY-accelerationIncludingGravity.y);\n\t\tvar deltaZ=Math.abs(this.lastZ-accelerationIncludingGravity.z);\n\t\tif(this.isShaked(deltaX,deltaY,deltaZ)){\n\t\t\tvar deltaMillSecond=Browser.now()-this.lastMillSecond;\n\t\t\tif (deltaMillSecond > this.shakeInterval){\n\t\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t\t\tthis.lastMillSecond=Browser.now();\n\t\t\t}\n\t\t}\n\t\tthis.lastX=accelerationIncludingGravity.x;\n\t\tthis.lastY=accelerationIncludingGravity.y;\n\t\tthis.lastZ=accelerationIncludingGravity.z;\n\t}\n\n\t// 通过任意两个分量判断是否满足摇晃设定。\n\t__proto.isShaked=function(deltaX,deltaY,deltaZ){\n\t\treturn (deltaX > this.throushold && deltaY > this.throushold)||\n\t\t(deltaX > this.throushold && deltaZ > this.throushold)||\n\t\t(deltaY > this.throushold && deltaZ > this.throushold)\n\t}\n\n\t__getset(1,Shake,'instance',function(){Shake._instance=Shake._instance|| new Shake();\n\t\treturn Shake._instance;\n\t},laya.events.EventDispatcher._$SET_instance);\n\n\tShake._instance=null;\n\treturn Shake;\n})(EventDispatcher)\n\n\n/**\n*<code>Video</code>将视频显示到Canvas上。<code>Video</code>可能不会在所有浏览器有效。\n*<p>关于Video支持的所有事件参见：<i>http://www.w3school.com.cn/tags/html_ref_audio_video_dom.asp</i>。</p>\n*<p>\n*<b>注意：</b><br/>\n*在PC端可以在任何时机调用<code>play()</code>因此，可以在程序开始运行时就使Video开始播放。但是在移动端，只有在用户第一次触碰屏幕后才可以调用play()，所以移动端不可能在程序开始运行时就自动开始播放Video。\n*</p>\n*\n*<p>MDN Video链接： <i>https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video</i></p>\n*/\n//class laya.device.media.Video extends laya.display.Sprite\nvar Video=(function(_super){\n\tfunction Video(width,height){\n\t\tthis.htmlVideo=null;\n\t\tthis.videoElement=null;\n\t\tthis.internalTexture=null;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tVideo.__super.call(this);\n\t\tif (Render.isWebGL)\n\t\t\tthis.htmlVideo=new WebGLVideo();\n\t\telse\n\t\tthis.htmlVideo=new HtmlVideo();\n\t\tthis.videoElement=this.htmlVideo.getVideo();\n\t\tthis.videoElement.layaTarget=this;\n\t\tthis.internalTexture=new Texture(this.htmlVideo);\n\t\tthis.videoElement.addEventListener(\"abort\",Video.onAbort);\n\t\tthis.videoElement.addEventListener(\"canplay\",Video.onCanplay);\n\t\tthis.videoElement.addEventListener(\"canplaythrough\",Video.onCanplaythrough);\n\t\tthis.videoElement.addEventListener(\"durationchange\",Video.onDurationchange);\n\t\tthis.videoElement.addEventListener(\"emptied\",Video.onEmptied);\n\t\tthis.videoElement.addEventListener(\"error\",Video.onError);\n\t\tthis.videoElement.addEventListener(\"loadeddata\",Video.onLoadeddata);\n\t\tthis.videoElement.addEventListener(\"loadedmetadata\",Video.onLoadedmetadata);\n\t\tthis.videoElement.addEventListener(\"loadstart\",Video.onLoadstart);\n\t\tthis.videoElement.addEventListener(\"pause\",Video.onPause);\n\t\tthis.videoElement.addEventListener(\"play\",Video.onPlay);\n\t\tthis.videoElement.addEventListener(\"playing\",Video.onPlaying);\n\t\tthis.videoElement.addEventListener(\"progress\",Video.onProgress);\n\t\tthis.videoElement.addEventListener(\"ratechange\",Video.onRatechange);\n\t\tthis.videoElement.addEventListener(\"seeked\",Video.onSeeked);\n\t\tthis.videoElement.addEventListener(\"seeking\",Video.onSeeking);\n\t\tthis.videoElement.addEventListener(\"stalled\",Video.onStalled);\n\t\tthis.videoElement.addEventListener(\"suspend\",Video.onSuspend);\n\t\tthis.videoElement.addEventListener(\"timeupdate\",Video.onTimeupdate);\n\t\tthis.videoElement.addEventListener(\"volumechange\",Video.onVolumechange);\n\t\tthis.videoElement.addEventListener(\"waiting\",Video.onWaiting);\n\t\tthis.videoElement.addEventListener(\"ended\",this.onPlayComplete['bind'](this));\n\t\tthis.size(width,height);\n\t\tif (Browser.onMobile){\n\t\t\t/*__JS__ */this.onDocumentClick=this.onDocumentClick.bind(this);\n\t\t\tBrowser.document.addEventListener(\"touchend\",this.onDocumentClick);\n\t\t}\n\t}\n\n\t__class(Video,'laya.device.media.Video',_super);\n\tvar __proto=Video.prototype;\n\t__proto.onPlayComplete=function(e){\n\t\tLaya.timer.clear(this,this.renderCanvas);\n\t\tthis.event(\"ended\");\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif (url.indexOf(\"blob:\")==0)\n\t\t\tthis.videoElement.src=url;\n\t\telse\n\t\tthis.htmlVideo.setSource(url,laya.device.media.Video.MP4);\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tthis.videoElement.play();\n\t\tLaya.timer.frameLoop(1,this,this.renderCanvas);\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tthis.videoElement.pause();\n\t\tLaya.timer.clear(this,this.renderCanvas);\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tthis.videoElement.load();\n\t}\n\n\t/**\n\t*检测是否支持播放指定格式视频。\n\t*@param type 参数为Video.MP4 / Video.OGG / Video.WEBM之一。\n\t*@return 表示支持的级别。可能的值：\n\t*<ul>\n\t*<li>\"probably\"，Video.SUPPORT_PROBABLY-浏览器最可能支持该音频/视频类型</li>\n\t*<li>\"maybe\"，Video.SUPPORT_MAYBY-浏览器也许支持该音频/视频类型</li>\n\t*<li>\"\"，Video.SUPPORT_NO-（空字符串）浏览器不支持该音频/视频类型</li>\n\t*</ul>\n\t*/\n\t__proto.canPlayType=function(type){\n\t\tvar typeString;\n\t\tswitch (type){\n\t\t\tcase laya.device.media.Video.MP4:\n\t\t\t\ttypeString=\"video/mp4\";\n\t\t\t\tbreak ;\n\t\t\tcase laya.device.media.Video.OGG:\n\t\t\t\ttypeString=\"video/ogg\";\n\t\t\t\tbreak ;\n\t\t\tcase laya.device.media.Video.WEBM:\n\t\t\t\ttypeString=\"video/webm\";\n\t\t\t\tbreak ;\n\t\t\t}\n\t\treturn this.videoElement.canPlayType(typeString);\n\t}\n\n\t__proto.renderCanvas=function(){\n\t\tif (this.readyState===0)\n\t\t\treturn;\n\t\tif (Render.isWebGL)\n\t\t\tthis.htmlVideo['updateTexture']();\n\t\tthis.graphics.clear();\n\t\tthis.graphics.drawTexture(this.internalTexture,0,0,this.width,this.height);\n\t}\n\n\t__proto.onDocumentClick=function(){\n\t\tthis.videoElement.play();\n\t\tthis.videoElement.pause();\n\t\tBrowser.document.removeEventListener(\"touchend\",this.onDocumentClick);\n\t}\n\n\t__proto.size=function(width,height){\n\t\t_super.prototype.size.call(this,width,height)\n\t\tthis.videoElement.width=width / Browser.pixelRatio;\n\t\tif (this.paused)this.renderCanvas();\n\t\treturn this;\n\t}\n\n\t/**\n\t*销毁内部事件绑定。\n\t*/\n\t__proto.destroy=function(detroyChildren){\n\t\t(detroyChildren===void 0)&& (detroyChildren=true);\n\t\t_super.prototype.destroy.call(this,detroyChildren);\n\t\tthis.videoElement.removeEventListener(\"abort\",Video.onAbort);\n\t\tthis.videoElement.removeEventListener(\"canplay\",Video.onCanplay);\n\t\tthis.videoElement.removeEventListener(\"canplaythrough\",Video.onCanplaythrough);\n\t\tthis.videoElement.removeEventListener(\"durationchange\",Video.onDurationchange);\n\t\tthis.videoElement.removeEventListener(\"emptied\",Video.onEmptied);\n\t\tthis.videoElement.removeEventListener(\"error\",Video.onError);\n\t\tthis.videoElement.removeEventListener(\"loadeddata\",Video.onLoadeddata);\n\t\tthis.videoElement.removeEventListener(\"loadedmetadata\",Video.onLoadedmetadata);\n\t\tthis.videoElement.removeEventListener(\"loadstart\",Video.onLoadstart);\n\t\tthis.videoElement.removeEventListener(\"pause\",Video.onPause);\n\t\tthis.videoElement.removeEventListener(\"play\",Video.onPlay);\n\t\tthis.videoElement.removeEventListener(\"playing\",Video.onPlaying);\n\t\tthis.videoElement.removeEventListener(\"progress\",Video.onProgress);\n\t\tthis.videoElement.removeEventListener(\"ratechange\",Video.onRatechange);\n\t\tthis.videoElement.removeEventListener(\"seeked\",Video.onSeeked);\n\t\tthis.videoElement.removeEventListener(\"seeking\",Video.onSeeking);\n\t\tthis.videoElement.removeEventListener(\"stalled\",Video.onStalled);\n\t\tthis.videoElement.removeEventListener(\"suspend\",Video.onSuspend);\n\t\tthis.videoElement.removeEventListener(\"timeupdate\",Video.onTimeupdate);\n\t\tthis.videoElement.removeEventListener(\"volumechange\",Video.onVolumechange);\n\t\tthis.videoElement.removeEventListener(\"waiting\",Video.onWaiting);\n\t\tthis.videoElement.removeEventListener(\"ended\",this.onPlayComplete);\n\t\tthis.pause();\n\t\tthis.videoElement=null;\n\t}\n\n\t__proto.syncVideoPosition=function(){\n\t\tvar stage=Laya.stage;\n\t\tvar rec;\n\t\trec=Utils.getGlobalPosAndScale(this);\n\t\tvar a=stage._canvasTransform.a,d=stage._canvasTransform.d;\n\t\tvar x=rec.x *stage.clientScaleX *a+stage.offset.x;\n\t\tvar y=rec.y *stage.clientScaleY *d+stage.offset.y;\n\t\tthis.videoElement.style.left=x+'px';;\n\t\tthis.videoElement.style.top=y+'px';\n\t\tthis.videoElement.width=this.width / Browser.pixelRatio;\n\t\tthis.videoElement.height=this.height / Browser.pixelRatio;\n\t}\n\n\t/**\n\t*buffered 属性返回 TimeRanges(JS)对象。TimeRanges 对象表示用户的音视频缓冲范围。缓冲范围指的是已缓冲音视频的时间范围。如果用户在音视频中跳跃播放，会得到多个缓冲范围。\n\t*<p>buffered.length返回缓冲范围个数。如获取第一个缓冲范围则是buffered.start(0)和buffered.end(0)。以秒计。</p>\n\t*@return TimeRanges(JS)对象\n\t*/\n\t__getset(0,__proto,'buffered',function(){\n\t\treturn this.videoElement.buffered;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\treturn this.videoElement.videoWidth;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.currentSrc;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\treturn this.videoElement.currentTime;\n\t\t},function(value){\n\t\tthis.videoElement.currentTime=value;\n\t\tthis.renderCanvas();\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoElement.ended;\n\t});\n\n\t/**\n\t*设置和获取当前音量。\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\treturn this.videoElement.volume;\n\t\t},function(value){\n\t\tthis.videoElement.volume=value;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\treturn this.videoElement.videoHeight;\n\t});\n\n\t/**\n\t*表示视频元素的就绪状态：\n\t*<ul>\n\t*<li>0=HAVE_NOTHING-没有关于音频/视频是否就绪的信息</li>\n\t*<li>1=HAVE_METADATA-关于音频/视频就绪的元数据</li>\n\t*<li>2=HAVE_CURRENT_DATA-关于当前播放位置的数据是可用的，但没有足够的数据来播放下一帧/毫秒</li>\n\t*<li>3=HAVE_FUTURE_DATA-当前及至少下一帧的数据是可用的</li>\n\t*<li>4=HAVE_ENOUGH_DATA-可用数据足以开始播放</li>\n\t*</ul>\n\t*/\n\t__getset(0,__proto,'readyState',function(){\n\t\treturn this.videoElement.readyState;\n\t});\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this.videoElement.duration;\n\t});\n\n\t/**\n\t*返回表示音频/视频错误状态的 MediaError（JS）对象。\n\t*/\n\t__getset(0,__proto,'error',function(){\n\t\treturn this.videoElement.error;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*preload 属性设置或返回是否在页面加载后立即加载视频。可赋值如下：\n\t*<ul>\n\t*<li>auto 指示一旦页面加载，则开始加载视频。</li>\n\t*<li>metadata 指示当页面加载后仅加载音频/视频的元数据。</li>\n\t*<li>none 指示页面加载后不应加载音频/视频。</li>\n\t*</ul>\n\t*/\n\t__getset(0,__proto,'preload',function(){\n\t\treturn this.videoElement.preload;\n\t\t},function(value){\n\t\tthis.videoElement.preload=value;\n\t});\n\n\t/**\n\t*参见 <i>http://www.w3school.com.cn/tags/av_prop_seekable.asp</i>。\n\t*/\n\t__getset(0,__proto,'seekable',function(){\n\t\treturn this.videoElement.seekable;\n\t});\n\n\t/**\n\t*seeking 属性返回用户目前是否在音频/视频中寻址。\n\t*寻址中（Seeking）指的是用户在音频/视频中移动/跳跃到新的位置。\n\t*/\n\t__getset(0,__proto,'seeking',function(){\n\t\treturn this.videoElement.seeking;\n\t});\n\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Sprite,this,'height',value);\n\t\tif (this.paused)this.renderCanvas();\n\t});\n\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tthis.videoElement.width=this.width / Browser.pixelRatio;\n\t\tLaya.superSet(Sprite,this,'width',value);\n\t\tif (this.paused)this.renderCanvas();\n\t});\n\n\tVideo.onAbort=function(e){e.target.layaTarget.event(\"abort\")}\n\tVideo.onCanplay=function(e){e.target.layaTarget.event(\"canplay\")}\n\tVideo.onCanplaythrough=function(e){e.target.layaTarget.event(\"canplaythrough\")}\n\tVideo.onDurationchange=function(e){e.target.layaTarget.event(\"durationchange\")}\n\tVideo.onEmptied=function(e){e.target.layaTarget.event(\"emptied\")}\n\tVideo.onError=function(e){e.target.layaTarget.event(\"error\")}\n\tVideo.onLoadeddata=function(e){e.target.layaTarget.event(\"loadeddata\")}\n\tVideo.onLoadedmetadata=function(e){e.target.layaTarget.event(\"loadedmetadata\")}\n\tVideo.onLoadstart=function(e){e.target.layaTarget.event(\"loadstart\")}\n\tVideo.onPause=function(e){e.target.layaTarget.event(\"pause\")}\n\tVideo.onPlay=function(e){e.target.layaTarget.event(\"play\")}\n\tVideo.onPlaying=function(e){e.target.layaTarget.event(\"playing\")}\n\tVideo.onProgress=function(e){e.target.layaTarget.event(\"progress\")}\n\tVideo.onRatechange=function(e){e.target.layaTarget.event(\"ratechange\")}\n\tVideo.onSeeked=function(e){e.target.layaTarget.event(\"seeked\")}\n\tVideo.onSeeking=function(e){e.target.layaTarget.event(\"seeking\")}\n\tVideo.onStalled=function(e){e.target.layaTarget.event(\"stalled\")}\n\tVideo.onSuspend=function(e){e.target.layaTarget.event(\"suspend\")}\n\tVideo.onTimeupdate=function(e){e.target.layaTarget.event(\"timeupdate\")}\n\tVideo.onVolumechange=function(e){e.target.layaTarget.event(\"volumechange\")}\n\tVideo.onWaiting=function(e){e.target.layaTarget.event(\"waiting\")}\n\tVideo.MP4=1;\n\tVideo.OGG=2;\n\tVideo.CAMERA=4;\n\tVideo.WEBM=8;\n\tVideo.SUPPORT_PROBABLY=\"probably\";\n\tVideo.SUPPORT_MAYBY=\"maybe\";\n\tVideo.SUPPORT_NO=\"\";\n\treturn Video;\n})(Sprite)\n\n\n/**\n*@private\n*/\n//class laya.device.media.HtmlVideo extends laya.resource.Bitmap\nvar HtmlVideo=(function(_super){\n\tfunction HtmlVideo(){\n\t\tthis.video=null;\n\t\tHtmlVideo.__super.call(this);\n\t\tthis._w=1;\n\t\tthis._h=1;\n\t\tthis.createDomElement();\n\t}\n\n\t__class(HtmlVideo,'laya.device.media.HtmlVideo',_super);\n\tvar __proto=HtmlVideo.prototype;\n\t__proto.createDomElement=function(){\n\t\tvar _$this=this;\n\t\tthis._source=this.video=Browser.createElement(\"video\");\n\t\tvar style=this.video.style;\n\t\tstyle.position='absolute';\n\t\tstyle.top='0px';\n\t\tstyle.left='0px';\n\t\tthis.video.addEventListener(\"loadedmetadata\",(function(){\n\t\t\tthis._w=_$this.video.videoWidth;\n\t\t\tthis._h=_$this.video.videoHeight;\n\t\t})['bind'](this));\n\t}\n\n\t__proto.setSource=function(url,extension){\n\t\twhile(this.video.childElementCount)\n\t\tthis.video.firstChild.remove();\n\t\tif (extension & Video.MP4)\n\t\t\tthis.appendSource(url,\"video/mp4\");\n\t\tif (extension & Video.OGG)\n\t\t\tthis.appendSource(url+\".ogg\",\"video/ogg\");\n\t}\n\n\t__proto.appendSource=function(source,type){\n\t\tvar sourceElement=Browser.createElement(\"source\");\n\t\tsourceElement.src=source;\n\t\tsourceElement.type=type;\n\t\tthis.video.appendChild(sourceElement);\n\t}\n\n\t__proto.getVideo=function(){\n\t\treturn this.video;\n\t}\n\n\tHtmlVideo.create=function(){\n\t\treturn new HtmlVideo();\n\t}\n\n\treturn HtmlVideo;\n})(Bitmap)\n\n\n/**\n*@private\n*/\n//class laya.device.media.WebGLVideo extends laya.device.media.HtmlVideo\nvar WebGLVideo=(function(_super){\n\tfunction WebGLVideo(){\n\t\tthis.gl=null;\n\t\tthis.preTarget=null;\n\t\tthis.preTexture=null;\n\t\tWebGLVideo.__super.call(this);\n\t\tif(Browser.onIPhone)\n\t\t\treturn;\n\t\tthis.gl=WebGL.mainContext;\n\t\tthis._source=this.gl.createTexture();\n\t\tthis.preTarget=WebGLContext.curBindTexTarget;\n\t\tthis.preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(this.gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source);\n\t\tthis.gl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\tthis.gl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\tthis.gl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\tthis.gl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t(this.preTarget && this.preTexture)&& (WebGLContext.bindTexture(this.gl,this.preTarget,this.preTexture));\n\t}\n\n\t__class(WebGLVideo,'laya.device.media.WebGLVideo',_super);\n\tvar __proto=WebGLVideo.prototype;\n\t__proto.updateTexture=function(){\n\t\tif(Browser.onIPhone)\n\t\t\treturn;\n\t\tWebGLContext.bindTexture(this.gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source);\n\t\tthis.gl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGB*/0x1907,/*laya.webgl.WebGLContext.RGB*/0x1907,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this.video);\n\t}\n\n\treturn WebGLVideo;\n})(HtmlVideo)\n\n\n\tLaya.__init([Media]);\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.filter.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Color=laya.utils.Color,ColorFilterAction=laya.filters.ColorFilterAction;\n\tvar ColorFilterActionGL=laya.filters.webgl.ColorFilterActionGL,Filter=laya.filters.Filter,FilterActionGL=laya.filters.webgl.FilterActionGL;\n\tvar Matrix=laya.maths.Matrix,Rectangle=laya.maths.Rectangle,Render=laya.renders.Render,RenderContext=laya.renders.RenderContext;\n\tvar RenderTarget2D=laya.webgl.resource.RenderTarget2D,RunDriver=laya.utils.RunDriver,ShaderDefines2D=laya.webgl.shader.d2.ShaderDefines2D;\n\tvar Sprite=laya.display.Sprite,Texture=laya.resource.Texture,Value2D=laya.webgl.shader.d2.value.Value2D;\n/**\n*默认的FILTER,什么都不做\n*@private\n*/\n//class laya.filters.FilterAction\nvar FilterAction=(function(){\n\tfunction FilterAction(){\n\t\tthis.data=null;\n\t}\n\n\t__class(FilterAction,'laya.filters.FilterAction');\n\tvar __proto=FilterAction.prototype;\n\tLaya.imps(__proto,{\"laya.filters.IFilterAction\":true})\n\t__proto.apply=function(data){\n\t\treturn null;\n\t}\n\n\treturn FilterAction;\n})()\n\n\n/**\n*@private\n*/\n//class laya.filters.WebGLFilter\nvar WebGLFilter=(function(){\n\tfunction WebGLFilter(){}\n\t__class(WebGLFilter,'laya.filters.WebGLFilter');\n\tWebGLFilter.enable=function(){\n\t\tif (WebGLFilter.isInit)return;\n\t\tWebGLFilter.isInit=true;\n\t\tif (!Render.isWebGL)return;\n\t\tRunDriver.createFilterAction=function (type){\n\t\t\tvar action;\n\t\t\tswitch (type){\n\t\t\t\tcase /*laya.filters.Filter.COLOR*/0x20:\n\t\t\t\t\taction=new ColorFilterActionGL();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.filters.Filter.BLUR*/0x10:\n\t\t\t\t\taction=new BlurFilterActionGL();\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.filters.Filter.GLOW*/0x08:\n\t\t\t\t\taction=new GlowFilterActionGL();\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\treturn action;\n\t\t}\n\t}\n\n\tWebGLFilter.isInit=false;\n\tWebGLFilter.__init$=function(){\n\t\tBlurFilterActionGL;\n\t\tColorFilterActionGL;\n\t\tGlowFilterActionGL;\n\t\tRender;\n\t\tRunDriver;{\n\t\t\tRunDriver.createFilterAction=function (type){\n\t\t\t\tvar action;\n\t\t\t\tswitch (type){\n\t\t\t\t\tcase /*laya.filters.Filter.BLUR*/0x10:\n\t\t\t\t\t\taction=new FilterAction();\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase /*laya.filters.Filter.GLOW*/0x08:\n\t\t\t\t\t\taction=new FilterAction();\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase /*laya.filters.Filter.COLOR*/0x20:\n\t\t\t\t\t\taction=new ColorFilterAction();\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\treturn action;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn WebGLFilter;\n})()\n\n\n/**\n*模糊滤镜\n*/\n//class laya.filters.BlurFilter extends laya.filters.Filter\nvar BlurFilter=(function(_super){\n\tfunction BlurFilter(strength){\n\t\t/**模糊滤镜的强度(值越大，越不清晰 */\n\t\tthis.strength=NaN;\n\t\tthis.strength_sig2_2sig2_gauss1=[];\n\t\tBlurFilter.__super.call(this);\n\t\t(strength===void 0)&& (strength=4);\n\t\tif (Render.isWebGL)WebGLFilter.enable();\n\t\tthis.strength=strength;\n\t\tthis._action=RunDriver.createFilterAction(0x10);\n\t\tthis._action.data=this;\n\t}\n\n\t__class(BlurFilter,'laya.filters.BlurFilter',_super);\n\tvar __proto=BlurFilter.prototype;\n\t/**\n\t*@private 通知微端\n\t*/\n\t__proto.callNative=function(sp){\n\t\tsp.conchModel &&sp.conchModel.blurFilter&&sp.conchModel.blurFilter(this.strength);\n\t}\n\n\t/**\n\t*@private\n\t*当前滤镜对应的操作器\n\t*/\n\t__getset(0,__proto,'action',function(){\n\t\treturn this._action;\n\t});\n\n\t/**\n\t*@private\n\t*当前滤镜的类型\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn 0x10;\n\t});\n\n\treturn BlurFilter;\n})(Filter)\n\n\n/**\n*发光滤镜(也可以当成阴影滤使用）\n*/\n//class laya.filters.GlowFilter extends laya.filters.Filter\nvar GlowFilter=(function(_super){\n\tfunction GlowFilter(color,blur,offX,offY){\n\t\t/**滤镜的颜色*/\n\t\tthis._color=null;\n\t\tGlowFilter.__super.call(this);\n\t\tthis._elements=new Float32Array(9);\n\t\t(blur===void 0)&& (blur=4);\n\t\t(offX===void 0)&& (offX=6);\n\t\t(offY===void 0)&& (offY=6);\n\t\tif (Render.isWebGL){\n\t\t\tWebGLFilter.enable();\n\t\t}\n\t\tthis._color=new Color(color);\n\t\tthis.blur=Math.min(blur,20);\n\t\tthis.offX=offX;\n\t\tthis.offY=offY;\n\t\tthis._action=RunDriver.createFilterAction(0x08);\n\t\tthis._action.data=this;\n\t}\n\n\t__class(GlowFilter,'laya.filters.GlowFilter',_super);\n\tvar __proto=GlowFilter.prototype;\n\t/**@private */\n\t__proto.getColor=function(){\n\t\treturn this._color._color;\n\t}\n\n\t/**\n\t*@private 通知微端\n\t*/\n\t__proto.callNative=function(sp){\n\t\tsp.conchModel &&sp.conchModel.glowFilter&&sp.conchModel.glowFilter(this._color.strColor,this._elements[4],this._elements[5],this._elements[6]);\n\t}\n\n\t/**\n\t*@private\n\t*滤镜类型\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn 0x08;\n\t});\n\n\t/**@private */\n\t__getset(0,__proto,'action',function(){\n\t\treturn this._action;\n\t});\n\n\t/**@private */\n\t/**@private */\n\t__getset(0,__proto,'offY',function(){\n\t\treturn this._elements[6];\n\t\t},function(value){\n\t\tthis._elements[6]=value;\n\t});\n\n\t/**@private */\n\t/**@private */\n\t__getset(0,__proto,'offX',function(){\n\t\treturn this._elements[5];\n\t\t},function(value){\n\t\tthis._elements[5]=value;\n\t});\n\n\t/**@private */\n\t/**@private */\n\t__getset(0,__proto,'blur',function(){\n\t\treturn this._elements[4];\n\t\t},function(value){\n\t\tthis._elements[4]=value;\n\t});\n\n\treturn GlowFilter;\n})(Filter)\n\n\n/**\n*@private\n*/\n//class laya.filters.webgl.BlurFilterActionGL extends laya.filters.webgl.FilterActionGL\nvar BlurFilterActionGL=(function(_super){\n\tfunction BlurFilterActionGL(){\n\t\tthis.data=null;\n\t\tBlurFilterActionGL.__super.call(this);\n\t}\n\n\t__class(BlurFilterActionGL,'laya.filters.webgl.BlurFilterActionGL',_super);\n\tvar __proto=BlurFilterActionGL.prototype;\n\t__proto.setValueMix=function(shader){\n\t\tshader.defines.add(this.data.type);\n\t\tvar o=shader;\n\t}\n\n\t__proto.apply3d=function(scope,sprite,context,x,y){\n\t\tvar b=scope.getValue(\"bounds\");\n\t\tvar shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);\n\t\tshaderValue.setFilters([this.data]);\n\t\tvar tMatrix=Matrix.EMPTY;\n\t\ttMatrix.identity();\n\t\tcontext.ctx.drawTarget(scope,0,0,b.width,b.height,Matrix.EMPTY,\"src\",shaderValue);\n\t\tshaderValue.setFilters(null);\n\t}\n\n\t__proto.setValue=function(shader){\n\t\tshader.strength=this.data.strength;\n\t\tvar sigma=this.data.strength/3.0;\n\t\tvar sigma2=sigma*sigma;\n\t\tthis.data.strength_sig2_2sig2_gauss1[0]=this.data.strength;\n\t\tthis.data.strength_sig2_2sig2_gauss1[1]=sigma2;\n\t\tthis.data.strength_sig2_2sig2_gauss1[2]=2.0*sigma2;\n\t\tthis.data.strength_sig2_2sig2_gauss1[3]=1.0/(2.0*Math.PI*sigma2);\n\t\tshader.strength_sig2_2sig2_gauss1=this.data.strength_sig2_2sig2_gauss1;\n\t}\n\n\t__getset(0,__proto,'typeMix',function(){return /*laya.filters.Filter.BLUR*/0x10;});\n\treturn BlurFilterActionGL;\n})(FilterActionGL)\n\n\n/**\n*@private\n*/\n//class laya.filters.webgl.GlowFilterActionGL extends laya.filters.webgl.FilterActionGL\nvar GlowFilterActionGL=(function(_super){\n\tfunction GlowFilterActionGL(){\n\t\tthis.data=null;\n\t\tthis._initKey=false;\n\t\tthis._textureWidth=0;\n\t\tthis._textureHeight=0;\n\t\tGlowFilterActionGL.__super.call(this);\n\t}\n\n\t__class(GlowFilterActionGL,'laya.filters.webgl.GlowFilterActionGL',_super);\n\tvar __proto=GlowFilterActionGL.prototype;\n\tLaya.imps(__proto,{\"laya.filters.IFilterActionGL\":true})\n\t__proto.setValueMix=function(shader){}\n\t__proto.apply3d=function(scope,sprite,context,x,y){\n\t\tvar b=scope.getValue(\"bounds\");\n\t\tscope.addValue(\"color\",this.data.getColor());\n\t\tvar w=b.width,h=b.height;\n\t\tthis._textureWidth=w;\n\t\tthis._textureHeight=h;\n\t\tvar shaderValue;\n\t\tvar mat=Matrix.TEMP;\n\t\tmat.identity();\n\t\tshaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);\n\t\tshaderValue.setFilters([this.data]);\n\t\tcontext.ctx.drawTarget(scope,0,0,this._textureWidth,this._textureHeight,mat,\"src\",shaderValue,null);\n\t\tshaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);\n\t\tcontext.ctx.drawTarget(scope,0,0,this._textureWidth,this._textureHeight,mat,\"src\",shaderValue);\n\t\treturn null;\n\t}\n\n\t__proto.setSpriteWH=function(sprite){\n\t\tthis._textureWidth=sprite.width;\n\t\tthis._textureHeight=sprite.height;\n\t}\n\n\t__proto.setValue=function(shader){\n\t\tshader.u_offsetX=this.data.offX;\n\t\tshader.u_offsetY=-this.data.offY;\n\t\tshader.u_strength=1.0;\n\t\tshader.u_blurX=this.data.blur;\n\t\tshader.u_blurY=this.data.blur;\n\t\tshader.u_textW=this._textureWidth;\n\t\tshader.u_textH=this._textureHeight;\n\t\tshader.u_color=this.data.getColor();\n\t}\n\n\t__getset(0,__proto,'typeMix',function(){return /*laya.filters.Filter.GLOW*/0x08;});\n\tGlowFilterActionGL.tmpTarget=function(scope,sprite,context,x,y){\n\t\tvar b=scope.getValue(\"bounds\");\n\t\tvar out=scope.getValue(\"out\");\n\t\tout.end();\n\t\tvar tmpTarget=RenderTarget2D.create(b.width,b.height);\n\t\ttmpTarget.start();\n\t\tvar color=scope.getValue(\"color\");\n\t\tif (color){\n\t\t\ttmpTarget.clear(color[0],color[1],color[2],0);\n\t\t}\n\t\tscope.addValue(\"tmpTarget\",tmpTarget);\n\t}\n\n\tGlowFilterActionGL.startOut=function(scope,sprite,context,x,y){\n\t\tvar tmpTarget=scope.getValue(\"tmpTarget\");\n\t\ttmpTarget.end();\n\t\tvar out=scope.getValue(\"out\");\n\t\tout.start();\n\t\tvar color=scope.getValue(\"color\");\n\t\tif (color){\n\t\t\tout.clear(color[0],color[1],color[2],0);\n\t\t}\n\t}\n\n\tGlowFilterActionGL.recycleTarget=function(scope,sprite,context,x,y){\n\t\tvar src=scope.getValue(\"src\");\n\t\tvar tmpTarget=scope.getValue(\"tmpTarget\");\n\t\ttmpTarget.recycle();\n\t}\n\n\treturn GlowFilterActionGL;\n})(FilterActionGL)\n\n\n\tLaya.__init([WebGLFilter]);\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.html.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,CSSStyle=laya.display.css.CSSStyle,ClassUtils=laya.utils.ClassUtils;\n\tvar Event=laya.events.Event,HTMLChar=laya.utils.HTMLChar,Loader=laya.net.Loader,Node=laya.display.Node,Rectangle=laya.maths.Rectangle;\n\tvar Render=laya.renders.Render,RenderContext=laya.renders.RenderContext,RenderSprite=laya.renders.RenderSprite;\n\tvar Sprite=laya.display.Sprite,Stat=laya.utils.Stat,Text=laya.display.Text,Texture=laya.resource.Texture;\n\tvar URL=laya.net.URL,Utils=laya.utils.Utils;\n/**\n*@private\n*/\n//class laya.html.utils.HTMLParse\nvar HTMLParse=(function(){\n\tfunction HTMLParse(){}\n\t__class(HTMLParse,'laya.html.utils.HTMLParse');\n\tHTMLParse.parse=function(ower,xmlString,url){\n\t\txmlString=xmlString.replace(/<br>/g,\"<br/>\");\n\t\txmlString=\"<root>\"+xmlString+\"</root>\";\n\t\txmlString=xmlString.replace(HTMLParse.spacePattern,HTMLParse.char255);\n\t\tvar xml=Utils.parseXMLFromString(xmlString);\n\t\tHTMLParse._parseXML(ower,xml.childNodes[0].childNodes,url);\n\t}\n\n\tHTMLParse._parseXML=function(parent,xml,url,href){\n\t\tvar i=0,n=0;\n\t\tif (xml.join || xml.item){\n\t\t\tfor (i=0,n=xml.length;i < n;++i){\n\t\t\t\tHTMLParse._parseXML(parent,xml[i],url,href);\n\t\t\t}\n\t\t\t}else {\n\t\t\tvar node;\n\t\t\tvar nodeName;\n\t\t\tif (xml.nodeType==3){\n\t\t\t\tvar txt;\n\t\t\t\tif ((parent instanceof laya.html.dom.HTMLDivElement )){\n\t\t\t\t\tif (xml.nodeName==null){\n\t\t\t\t\t\txml.nodeName=\"#text\";\n\t\t\t\t\t}\n\t\t\t\t\tnodeName=xml.nodeName.toLowerCase();\n\t\t\t\t\ttxt=xml.textContent.replace(/^\\s+|\\s+$/g,'');\n\t\t\t\t\tif (txt.length > 0){\n\t\t\t\t\t\tnode=ClassUtils.getInstance(nodeName);\n\t\t\t\t\t\tif (node){\n\t\t\t\t\t\t\tparent.addChild(node);\n\t\t\t\t\t\t\t((node).innerTEXT=txt.replace(HTMLParse.char255AndOneSpacePattern,\" \"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttxt=xml.textContent.replace(/^\\s+|\\s+$/g,'');\n\t\t\t\t\tif (txt.length > 0){\n\t\t\t\t\t\t((parent).innerTEXT=txt.replace(HTMLParse.char255AndOneSpacePattern,\" \"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t\t}else {\n\t\t\t\tnodeName=xml.nodeName.toLowerCase();\n\t\t\t\tif (nodeName==\"#comment\")return;\n\t\t\t\tnode=ClassUtils.getInstance(nodeName);\n\t\t\t\tif (node){\n\t\t\t\t\tnode=parent.addChild(node);\n\t\t\t\t\t(node).URI=url;\n\t\t\t\t\t(node).href=href;\n\t\t\t\t\tvar attributes=xml.attributes;\n\t\t\t\t\tif (attributes && attributes.length > 0){\n\t\t\t\t\t\tfor (i=0,n=attributes.length;i < n;++i){\n\t\t\t\t\t\t\tvar attribute=attributes[i];\n\t\t\t\t\t\t\tvar attrName=attribute.nodeName;\n\t\t\t\t\t\t\tvar value=attribute.value;\n\t\t\t\t\t\t\tnode._setAttributes(attrName,value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tHTMLParse._parseXML(node,xml.childNodes,url,(node).href);\n\t\t\t\t\t}else {\n\t\t\t\t\tHTMLParse._parseXML(parent,xml.childNodes,url,href);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tHTMLParse.char255=String.fromCharCode(255);\n\tHTMLParse.spacePattern=/&nbsp;|&#160;/g;\n\tHTMLParse.char255AndOneSpacePattern=new RegExp(String.fromCharCode(255)+\"|(\\\\s+)\",\"g\");\n\treturn HTMLParse;\n})()\n\n\n/**\n*@private\n*HTML的布局类\n*对HTML的显示对象进行排版\n*/\n//class laya.html.utils.Layout\nvar Layout=(function(){\n\tfunction Layout(){}\n\t__class(Layout,'laya.html.utils.Layout');\n\tLayout.later=function(element){\n\t\tif (Layout._will==null){\n\t\t\tLayout._will=[];\n\t\t\tLaya.stage.frameLoop(1,null,function(){\n\t\t\t\tif (Layout._will.length < 1)\n\t\t\t\t\treturn;\n\t\t\t\tfor (var i=0;i < Layout._will.length;i++){\n\t\t\t\t\tlaya.html.utils.Layout.layout(Layout._will[i]);\n\t\t\t\t}\n\t\t\t\tLayout._will.length=0;\n\t\t\t});\n\t\t}\n\t\tLayout._will.push(element);\n\t}\n\n\tLayout.layout=function(element){\n\t\tif (!element || !element._style)return null;\n\t\tif ((element._style._type & /*laya.display.css.CSSStyle.ADDLAYOUTED*/0x200)===0)\n\t\t\treturn null;\n\t\telement.getStyle()._type &=~ /*laya.display.css.CSSStyle.ADDLAYOUTED*/0x200;\n\t\tvar arr=Layout._multiLineLayout(element);\n\t\tif (Render.isConchApp&&element[\"layaoutCallNative\"]){\n\t\t\t(element).layaoutCallNative();\n\t\t}\n\t\treturn arr;\n\t}\n\n\tLayout._multiLineLayout=function(element){\n\t\tif (Text.RightToLeft)return Layout._multiLineLayout2(element);\n\t\tvar elements=new Array;\n\t\telement._addChildsToLayout(elements);\n\t\tvar i=0,n=elements.length,j=0;\n\t\tvar style=element._getCSSStyle();\n\t\tvar letterSpacing=style.letterSpacing;\n\t\tvar leading=style.leading;\n\t\tvar lineHeight=style.lineHeight;\n\t\tvar widthAuto=style._widthAuto()|| !style.wordWrap;\n\t\tvar width=widthAuto ? 999999 :element.width;\n\t\tvar height=element.height;\n\t\tvar maxWidth=0;\n\t\tvar exWidth=style.italic ? style.fontSize / 3 :0;\n\t\tvar align=style._getAlign();\n\t\tvar valign=style._getValign();\n\t\tvar endAdjust=valign!==0 || align!==0 || lineHeight !=0;\n\t\tvar oneLayout;\n\t\tvar x=0;\n\t\tvar y=0;\n\t\tvar w=0;\n\t\tvar h=0;\n\t\tvar tBottom=0;\n\t\tvar lines=new Array;\n\t\tvar curStyle;\n\t\tvar curPadding;\n\t\tvar curLine=lines[0]=new LayoutLine();\n\t\tvar newLine=false,nextNewline=false;\n\t\tvar htmlWord;\n\t\tvar sprite;\n\t\tcurLine.h=0;\n\t\tif (style.italic)\n\t\t\twidth-=style.fontSize / 3;\n\t\tvar tWordWidth=0;\n\t\tvar tLineFirstKey=true;\n\t\tfunction addLine (){\n\t\t\tcurLine.y=y;\n\t\t\ty+=curLine.h+leading;\n\t\t\tif (curLine.h==0)y+=lineHeight;\n\t\t\tcurLine.mWidth=tWordWidth;\n\t\t\ttWordWidth=0;\n\t\t\tcurLine=new LayoutLine();\n\t\t\tlines.push(curLine);\n\t\t\tcurLine.h=0;\n\t\t\tx=0;\n\t\t\ttLineFirstKey=true;\n\t\t\tnewLine=false;\n\t\t}\n\t\tfor (i=0;i < n;i++){\n\t\t\toneLayout=elements[i];\n\t\t\tif (oneLayout==null){\n\t\t\t\tif (!tLineFirstKey){\n\t\t\t\t\tx+=Layout.DIV_ELEMENT_PADDING;\n\t\t\t\t}\n\t\t\t\tcurLine.wordStartIndex=curLine.elements.length;\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\ttLineFirstKey=false;\n\t\t\tif ((oneLayout instanceof laya.html.dom.HTMLBrElement )){\n\t\t\t\taddLine();\n\t\t\t\tcurLine.y=y;\n\t\t\t\tcontinue ;\n\t\t\t\t}else if (oneLayout._isChar()){\n\t\t\t\thtmlWord=oneLayout;\n\t\t\t\tif (!htmlWord.isWord){\n\t\t\t\t\tif (lines.length > 0 && (x+w)> width && curLine.wordStartIndex > 0){\n\t\t\t\t\t\tvar tLineWord=0;\n\t\t\t\t\t\ttLineWord=curLine.elements.length-curLine.wordStartIndex+1;\n\t\t\t\t\t\tcurLine.elements.length=curLine.wordStartIndex;\n\t\t\t\t\t\ti-=tLineWord;\n\t\t\t\t\t\taddLine();\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t}\n\t\t\t\t\tnewLine=false;\n\t\t\t\t\ttWordWidth+=htmlWord.width;\n\t\t\t\t\t}else {\n\t\t\t\t\tnewLine=nextNewline || (htmlWord.char==='\\n');\n\t\t\t\t\tcurLine.wordStartIndex=curLine.elements.length;\n\t\t\t\t}\n\t\t\t\tw=htmlWord.width+letterSpacing;\n\t\t\t\th=htmlWord.height;\n\t\t\t\tnextNewline=false;\n\t\t\t\tnewLine=newLine || ((x+w)> width);\n\t\t\t\tnewLine && addLine();\n\t\t\t\tcurLine.minTextHeight=Math.min(curLine.minTextHeight,oneLayout.height);\n\t\t\t\t}else {\n\t\t\t\tcurStyle=oneLayout._getCSSStyle();\n\t\t\t\tsprite=oneLayout;\n\t\t\t\tcurPadding=curStyle.padding;\n\t\t\t\tcurStyle._getCssFloat()===0 || (endAdjust=true);\n\t\t\t\tnewLine=nextNewline || curStyle.lineElement;\n\t\t\t\tw=sprite.width *sprite._style._tf.scaleX+curPadding[1]+curPadding[3]+letterSpacing;\n\t\t\t\th=sprite.height *sprite._style._tf.scaleY+curPadding[0]+curPadding[2];\n\t\t\t\tnextNewline=curStyle.lineElement;\n\t\t\t\tnewLine=newLine || ((x+w)> width && curStyle.wordWrap);\n\t\t\t\tnewLine && addLine();\n\t\t\t}\n\t\t\tcurLine.elements.push(oneLayout);\n\t\t\tcurLine.h=Math.max(curLine.h,h);\n\t\t\toneLayout.x=x;\n\t\t\toneLayout.y=y;\n\t\t\tx+=w;\n\t\t\tcurLine.w=x-letterSpacing;\n\t\t\tcurLine.y=y;\n\t\t\tmaxWidth=Math.max(x+exWidth,maxWidth);\n\t\t}\n\t\ty=curLine.y+curLine.h;\n\t\tif (endAdjust){\n\t\t\tvar tY=0;\n\t\t\tvar tWidth=width;\n\t\t\tif (widthAuto && element.width > 0){\n\t\t\t\ttWidth=element.width;\n\t\t\t}\n\t\t\tfor (i=0,n=lines.length;i < n;i++){\n\t\t\t\tlines[i].updatePos(0,tWidth,i,tY,align,valign,lineHeight);\n\t\t\t\ttY+=Math.max(lineHeight,lines[i].h+leading);\n\t\t\t}\n\t\t\ty=tY;\n\t\t}\n\t\twidthAuto && (element.width=maxWidth);\n\t\t(y > element.height)&& (element.height=y);\n\t\treturn [maxWidth,y];\n\t}\n\n\tLayout._multiLineLayout2=function(element){\n\t\tvar elements=new Array;\n\t\telement._addChildsToLayout(elements);\n\t\tvar i=0,n=elements.length,j=0;\n\t\tvar style=element._getCSSStyle();\n\t\tvar letterSpacing=style.letterSpacing;\n\t\tvar leading=style.leading;\n\t\tvar lineHeight=style.lineHeight;\n\t\tvar widthAuto=style._widthAuto()|| !style.wordWrap;\n\t\tvar width=widthAuto ? 999999 :element.width;\n\t\tvar height=element.height;\n\t\tvar maxWidth=0;\n\t\tvar exWidth=style.italic ? style.fontSize / 3 :0;\n\t\tvar align=2-style._getAlign();\n\t\tvar valign=style._getValign();\n\t\tvar endAdjust=valign!==0 || align!==0 || lineHeight !=0;\n\t\tvar oneLayout;\n\t\tvar x=0;\n\t\tvar y=0;\n\t\tvar w=0;\n\t\tvar h=0;\n\t\tvar tBottom=0;\n\t\tvar lines=new Array;\n\t\tvar curStyle;\n\t\tvar curPadding;\n\t\tvar curLine=lines[0]=new LayoutLine();\n\t\tvar newLine=false,nextNewline=false;\n\t\tvar htmlWord;\n\t\tvar sprite;\n\t\tcurLine.h=0;\n\t\tif (style.italic)\n\t\t\twidth-=style.fontSize / 3;\n\t\tvar tWordWidth=0;\n\t\tvar tLineFirstKey=true;\n\t\tfunction addLine (){\n\t\t\tcurLine.y=y;\n\t\t\ty+=curLine.h+leading;\n\t\t\tif (curLine.h==0)y+=lineHeight;\n\t\t\tcurLine.mWidth=tWordWidth;\n\t\t\ttWordWidth=0;\n\t\t\tcurLine=new LayoutLine();\n\t\t\tlines.push(curLine);\n\t\t\tcurLine.h=0;\n\t\t\tx=0;\n\t\t\ttLineFirstKey=true;\n\t\t\tnewLine=false;\n\t\t}\n\t\tfor (i=0;i < n;i++){\n\t\t\toneLayout=elements[i];\n\t\t\tif (oneLayout==null){\n\t\t\t\tif (!tLineFirstKey){\n\t\t\t\t\tx+=Layout.DIV_ELEMENT_PADDING;\n\t\t\t\t}\n\t\t\t\tcurLine.wordStartIndex=curLine.elements.length;\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\ttLineFirstKey=false;\n\t\t\tif ((oneLayout instanceof laya.html.dom.HTMLBrElement )){\n\t\t\t\taddLine();\n\t\t\t\tcurLine.y=y;\n\t\t\t\tcontinue ;\n\t\t\t\t}else if (oneLayout._isChar()){\n\t\t\t\thtmlWord=oneLayout;\n\t\t\t\tif (!htmlWord.isWord){\n\t\t\t\t\tif (lines.length > 0 && (x+w)> width && curLine.wordStartIndex > 0){\n\t\t\t\t\t\tvar tLineWord=0;\n\t\t\t\t\t\ttLineWord=curLine.elements.length-curLine.wordStartIndex+1;\n\t\t\t\t\t\tcurLine.elements.length=curLine.wordStartIndex;\n\t\t\t\t\t\ti-=tLineWord;\n\t\t\t\t\t\taddLine();\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t}\n\t\t\t\t\tnewLine=false;\n\t\t\t\t\ttWordWidth+=htmlWord.width;\n\t\t\t\t\t}else {\n\t\t\t\t\tnewLine=nextNewline || (htmlWord.char==='\\n');\n\t\t\t\t\tcurLine.wordStartIndex=curLine.elements.length;\n\t\t\t\t}\n\t\t\t\tw=htmlWord.width+letterSpacing;\n\t\t\t\th=htmlWord.height;\n\t\t\t\tnextNewline=false;\n\t\t\t\tnewLine=newLine || ((x+w)> width);\n\t\t\t\tnewLine && addLine();\n\t\t\t\tcurLine.minTextHeight=Math.min(curLine.minTextHeight,oneLayout.height);\n\t\t\t\t}else {\n\t\t\t\tcurStyle=oneLayout._getCSSStyle();\n\t\t\t\tsprite=oneLayout;\n\t\t\t\tcurPadding=curStyle.padding;\n\t\t\t\tcurStyle._getCssFloat()===0 || (endAdjust=true);\n\t\t\t\tnewLine=nextNewline || curStyle.lineElement;\n\t\t\t\tw=sprite.width *sprite._style._tf.scaleX+curPadding[1]+curPadding[3]+letterSpacing;\n\t\t\t\th=sprite.height *sprite._style._tf.scaleY+curPadding[0]+curPadding[2];\n\t\t\t\tnextNewline=curStyle.lineElement;\n\t\t\t\tnewLine=newLine || ((x+w)> width && curStyle.wordWrap);\n\t\t\t\tnewLine && addLine();\n\t\t\t}\n\t\t\tcurLine.elements.push(oneLayout);\n\t\t\tcurLine.h=Math.max(curLine.h,h);\n\t\t\toneLayout.x=x;\n\t\t\toneLayout.y=y;\n\t\t\tx+=w;\n\t\t\tcurLine.w=x-letterSpacing;\n\t\t\tcurLine.y=y;\n\t\t\tmaxWidth=Math.max(x+exWidth,maxWidth);\n\t\t}\n\t\ty=curLine.y+curLine.h;\n\t\tif (endAdjust){\n\t\t\tvar tY=0;\n\t\t\tvar tWidth=width;\n\t\t\tfor (i=0,n=lines.length;i < n;i++){\n\t\t\t\tlines[i].updatePos(0,tWidth,i,tY,align,valign,lineHeight);\n\t\t\t\ttY+=Math.max(lineHeight,lines[i].h+leading);\n\t\t\t}\n\t\t\ty=tY;\n\t\t}\n\t\twidthAuto && (element.width=maxWidth);\n\t\t(y > element.height)&& (element.height=y);\n\t\tfor (i=0,n=lines.length;i < n;i++){\n\t\t\tlines[i].revertOrder(width);\n\t\t}\n\t\treturn [maxWidth,y];\n\t}\n\n\tLayout._will=null;\n\tLayout.DIV_ELEMENT_PADDING=0;\n\treturn Layout;\n})()\n\n\n/**\n*@private\n*/\n//class laya.html.utils.LayoutLine\nvar LayoutLine=(function(){\n\tfunction LayoutLine(){\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tthis.w=0;\n\t\tthis.h=0;\n\t\tthis.wordStartIndex=0;\n\t\tthis.minTextHeight=99999;\n\t\tthis.mWidth=0;\n\t\tthis.elements=new Array;\n\t}\n\n\t__class(LayoutLine,'laya.html.utils.LayoutLine');\n\tvar __proto=LayoutLine.prototype;\n\t/**\n\t*底对齐（默认）\n\t*@param left\n\t*@param width\n\t*@param dy\n\t*@param align 水平\n\t*@param valign 垂直\n\t*@param lineHeight 行高\n\t*/\n\t__proto.updatePos=function(left,width,lineNum,dy,align,valign,lineHeight){\n\t\tvar w=0;\n\t\tvar one\n\t\tif (this.elements.length > 0){\n\t\t\tone=this.elements[this.elements.length-1];\n\t\t\tw=one.x+one.width-this.elements[0].x;\n\t\t};\n\t\tvar dx=0,ddy=NaN;\n\t\talign===/*laya.display.css.CSSStyle.ALIGN_CENTER*/1 && (dx=(width-w)/ 2);\n\t\talign===/*laya.display.css.CSSStyle.ALIGN_RIGHT*/2 && (dx=(width-w));\n\t\tlineHeight===0 || valign !=0 || (valign=1);\n\t\tfor (var i=0,n=this.elements.length;i < n;i++){\n\t\t\tone=this.elements[i];\n\t\t\tvar tCSSStyle=one._getCSSStyle();\n\t\t\tdx!==0 && (one.x+=dx);\n\t\t\tswitch (tCSSStyle._getValign()){\n\t\t\t\tcase 0:\n\t\t\t\t\tone.y=dy;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.display.css.CSSStyle.VALIGN_MIDDLE*/1:;\n\t\t\t\t\tvar tMinTextHeight=0;\n\t\t\t\t\tif (this.minTextHeight !=99999){\n\t\t\t\t\t\ttMinTextHeight=this.minTextHeight;\n\t\t\t\t\t};\n\t\t\t\t\tvar tBottomLineY=(tMinTextHeight+lineHeight)/ 2;\n\t\t\t\t\ttBottomLineY=Math.max(tBottomLineY,this.h);\n\t\t\t\t\tif ((one instanceof laya.html.dom.HTMLImageElement )){\n\t\t\t\t\t\tddy=dy+tBottomLineY-one.height;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tddy=dy+tBottomLineY-one.height;\n\t\t\t\t\t}\n\t\t\t\t\tone.y=ddy;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.display.css.CSSStyle.VALIGN_BOTTOM*/2:\n\t\t\t\t\tone.y=dy+(lineHeight-one.height);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*布局反向,目前用于将ltr模式布局转为rtl模式布局\n\t*/\n\t__proto.revertOrder=function(width){\n\t\tvar one\n\t\tif (this.elements.length > 0){\n\t\t\tvar i=0,len=0;\n\t\t\tlen=this.elements.length;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\tone=this.elements[i];\n\t\t\t\tone.x=width-one.x-one.width;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn LayoutLine;\n})()\n\n\n/**\n*@private\n*/\n//class laya.html.dom.HTMLElement extends laya.display.Sprite\nvar HTMLElement=(function(_super){\n\tfunction HTMLElement(){\n\t\tthis.URI=null;\n\t\tthis._href=null;\n\t\tHTMLElement.__super.call(this);\n\t\tthis._text=HTMLElement._EMPTYTEXT;\n\t\tthis.setStyle(new CSSStyle(this));\n\t\tthis._getCSSStyle().valign=\"middle\";\n\t\tthis.mouseEnabled=true;\n\t}\n\n\t__class(HTMLElement,'laya.html.dom.HTMLElement',_super);\n\tvar __proto=HTMLElement.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto.layaoutCallNative=function(){\n\t\tvar n=0;\n\t\tif (this._childs &&(n=this._childs.length)> 0){\n\t\t\tfor (var i=0;i < n;i++){\n\t\t\t\tthis._childs[i].layaoutCallNative && this._childs[i].layaoutCallNative();\n\t\t\t}\n\t\t};\n\t\tvar word=this._getWords();\n\t\tword ? laya.html.dom.HTMLElement.fillWords(this,word,0,0,this.style.font,this.style.color,this.style.underLine,this.style.stroke,this.style.strokeColor):this.graphics.clear();\n\t}\n\n\t__proto.appendChild=function(c){\n\t\treturn this.addChild(c);\n\t}\n\n\t/**\n\t*rtl模式的getWords函數\n\t*/\n\t__proto._getWords2=function(){\n\t\tvar txt=this._text.text;\n\t\tif (!txt || txt.length===0)\n\t\t\treturn null;\n\t\tvar i=0,n=0;\n\t\tvar realWords;\n\t\tvar drawWords;\n\t\tif (!this._text.drawWords){\n\t\t\trealWords=txt.split(\" \");\n\t\t\tn=realWords.length-1;\n\t\t\tdrawWords=[];\n\t\t\tfor (i=0;i < n;i++){\n\t\t\t\tdrawWords.push(realWords[i],\" \")\n\t\t\t}\n\t\t\tif(n>=0)\n\t\t\t\tdrawWords.push(realWords[n]);\n\t\t\tthis._text.drawWords=drawWords;\n\t\t\t}else{\n\t\t\tdrawWords=this._text.drawWords;\n\t\t};\n\t\tvar words=this._text.words;\n\t\tif (words && words.length===drawWords.length)\n\t\t\treturn words;\n\t\twords===null && (this._text.words=words=[]);\n\t\twords.length=drawWords.length;\n\t\tvar size;\n\t\tvar style=this.style;\n\t\tvar fontStr=style.font;\n\t\tfor (i=0,n=drawWords.length;i < n;i++){\n\t\t\tsize=Utils.measureText(drawWords[i],fontStr);\n\t\t\tvar tHTMLChar=words[i]=new HTMLChar(drawWords[i],size.width,size.height || style.fontSize,style);\n\t\t\tif (tHTMLChar.char.length > 1){\n\t\t\t\ttHTMLChar.charNum=tHTMLChar.char;\n\t\t\t}\n\t\t\tif (this.href){\n\t\t\t\tvar tSprite=new Sprite();\n\t\t\t\tthis.addChild(tSprite);\n\t\t\t\ttHTMLChar.setSprite(tSprite);\n\t\t\t}\n\t\t}\n\t\treturn words;\n\t}\n\n\t__proto._getWords=function(){\n\t\tif (!Text.CharacterCache)return this._getWords2();\n\t\tvar txt=this._text.text;\n\t\tif (!txt || txt.length===0)\n\t\t\treturn null;\n\t\tvar words=this._text.words;\n\t\tif (words && words.length===txt.length)\n\t\t\treturn words;\n\t\twords===null && (this._text.words=words=[]);\n\t\twords.length=txt.length;\n\t\tvar size;\n\t\tvar style=this.style;\n\t\tvar fontStr=style.font;\n\t\tvar startX=0;\n\t\tfor (var i=0,n=txt.length;i < n;i++){\n\t\t\tsize=Utils.measureText(txt.charAt(i),fontStr);\n\t\t\tvar tHTMLChar=words[i]=new HTMLChar(txt.charAt(i),size.width,size.height||style.fontSize,style);\n\t\t\tif (this.href){\n\t\t\t\tvar tSprite=new Sprite();\n\t\t\t\tthis.addChild(tSprite);\n\t\t\t\ttHTMLChar.setSprite(tSprite);\n\t\t\t}\n\t\t}\n\t\treturn words;\n\t}\n\n\t__proto.showLinkSprite=function(){\n\t\tvar words=this._text.words;\n\t\tif (words){\n\t\t\tvar tLinkSpriteList=[];\n\t\t\tvar tSprite;\n\t\t\tvar tHtmlChar;\n\t\t\tfor (var i=0;i < words.length;i++){\n\t\t\t\ttHtmlChar=words[i];\n\t\t\t\ttSprite=new Sprite();\n\t\t\t\ttSprite.graphics.drawRect(0,0,tHtmlChar.width,tHtmlChar.height,\"#ff0000\");\n\t\t\t\ttSprite.width=tHtmlChar.width;\n\t\t\t\ttSprite.height=tHtmlChar.height;\n\t\t\t\tthis.addChild(tSprite);\n\t\t\t\ttLinkSpriteList.push(tSprite);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._layoutLater=function(){\n\t\tvar style=this.style;\n\t\tif ((style._type & /*laya.display.css.CSSStyle.ADDLAYOUTED*/0x200))return;\n\t\tif (style.widthed(this)&& (this._childs.length>0 || this._getWords()!=null)&& style.block){\n\t\t\tLayout.later(this);\n\t\t\tstyle._type |=/*laya.display.css.CSSStyle.ADDLAYOUTED*/0x200;\n\t\t}\n\t\telse{\n\t\t\tthis.parent && (this.parent)._layoutLater();\n\t\t}\n\t}\n\n\t__proto._setAttributes=function(name,value){\n\t\tswitch (name){\n\t\t\tcase 'style':\n\t\t\t\tthis.style.cssText(value);\n\t\t\t\treturn;\n\t\t\tcase 'class':\n\t\t\t\tthis.className=value;\n\t\t\t\treturn;\n\t\t\t}\n\t\t_super.prototype._setAttributes.call(this,name,value);\n\t}\n\n\t__proto.updateHref=function(){\n\t\tif (this._href !=null){\n\t\t\tvar words=this._getWords();\n\t\t\tif (words){\n\t\t\t\tvar tHTMLChar;\n\t\t\t\tvar tSprite;\n\t\t\t\tfor (var i=0;i < words.length;i++){\n\t\t\t\t\ttHTMLChar=words[i];\n\t\t\t\t\ttSprite=tHTMLChar.getSprite();\n\t\t\t\t\tif (tSprite){\n\t\t\t\t\t\ttSprite.size(tHTMLChar.width,tHTMLChar.height);\n\t\t\t\t\t\ttSprite.on(/*laya.events.Event.CLICK*/\"click\",this,this.onLinkHandler);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.onLinkHandler=function(e){\n\t\tswitch(e.type){\n\t\t\tcase /*laya.events.Event.CLICK*/\"click\":;\n\t\t\t\tvar target=this;\n\t\t\t\twhile (target){\n\t\t\t\t\ttarget.event(/*laya.events.Event.LINK*/\"link\",[this.href]);\n\t\t\t\t\ttarget=target.parent;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t__proto.formatURL=function(url){\n\t\tif (!this.URI)return url;\n\t\treturn URL.formatURL(url,this.URI ? this.URI.path :null);\n\t}\n\n\t__getset(0,__proto,'href',function(){\n\t\treturn this._href;\n\t\t},function(url){\n\t\tthis._href=url;\n\t\tif (url !=null){\n\t\t\tthis._getCSSStyle().underLine=1;\n\t\t\tthis.updateHref();\n\t\t}\n\t});\n\n\t__getset(0,__proto,'color',null,function(value){\n\t\tthis.style.color=value;\n\t});\n\n\t__getset(0,__proto,'onClick',null,function(value){\n\t\tvar fn;\n\t\tLaya._runScript(\"fn=function(event){\"+value+\";}\");\n\t\tthis.on(/*laya.events.Event.CLICK*/\"click\",this,fn);\n\t});\n\n\t__getset(0,__proto,'id',null,function(value){\n\t\tHTMLDocument.document.setElementById(value,this);\n\t});\n\n\t__getset(0,__proto,'innerTEXT',function(){\n\t\treturn this._text.text;\n\t\t},function(value){\n\t\tthis.text=value;\n\t});\n\n\t__getset(0,__proto,'style',function(){\n\t\treturn this._style;\n\t});\n\n\t__getset(0,__proto,'text',function(){\n\t\treturn this._text.text;\n\t\t},function(value){\n\t\tif (this._text==HTMLElement._EMPTYTEXT){\n\t\t\tthis._text={text:value,words:null};\n\t\t}\n\t\telse{\n\t\t\tthis._text.text=value;\n\t\t\tthis._text.words && (this._text.words.length=0);\n\t\t}\n\t\tRender.isConchApp && this.layaoutCallNative();\n\t\tthis._renderType |=/*laya.renders.RenderSprite.CHILDS*/0x800;\n\t\tthis.repaint();\n\t\tthis.updateHref();\n\t});\n\n\t__getset(0,__proto,'parent',_super.prototype._$get_parent,function(value){\n\t\tif ((value instanceof laya.html.dom.HTMLElement )){\n\t\t\tvar p=value;\n\t\t\tthis.URI || (this.URI=p.URI);\n\t\t\tthis.style.inherit(p.style);\n\t\t}\n\t\tLaya.superSet(Sprite,this,'parent',value);\n\t});\n\n\t__getset(0,__proto,'className',null,function(value){\n\t\tthis.style.attrs(HTMLDocument.document.styleSheets['.'+value]);\n\t});\n\n\tHTMLElement.fillWords=function(ele,words,x,y,font,color,underLine,stroke,strokeColor){\n\t\tele.graphics.clear();\n\t\tfor (var i=0,n=words.length;i < n;i++){\n\t\t\tvar a=words[i];\n\t\t\tif (stroke > 0){\n\t\t\t\tele.graphics.fillBorderText(a.char,a.x+x,a.y+y,font,color,strokeColor,stroke,'left');\n\t\t\t}\n\t\t\telse {\n\t\t\t\tele.graphics.fillText(a.char,a.x+x,a.y+y,font,color,'left',underLine);\n\t\t\t}\n\t\t}\n\t}\n\n\tHTMLElement._EMPTYTEXT={text:null,words:null};\n\treturn HTMLElement;\n})(Sprite)\n\n\n/**\n*@private\n*/\n//class laya.html.dom.HTMLBrElement extends laya.html.dom.HTMLElement\nvar HTMLBrElement=(function(_super){\n\tfunction HTMLBrElement(){\n\t\tHTMLBrElement.__super.call(this);\n\t\tthis.style.lineElement=true;\n\t\tthis.style.block=true;\n\t}\n\n\t__class(HTMLBrElement,'laya.html.dom.HTMLBrElement',_super);\n\treturn HTMLBrElement;\n})(HTMLElement)\n\n\n/**\n*DIV标签\n*/\n//class laya.html.dom.HTMLDivElement extends laya.html.dom.HTMLElement\nvar HTMLDivElement=(function(_super){\n\tfunction HTMLDivElement(){\n\t\t/**实际内容的高 */\n\t\tthis.contextHeight=NaN;\n\t\t/**实际内容的宽 */\n\t\tthis.contextWidth=NaN;\n\t\tHTMLDivElement.__super.call(this);\n\t\tthis.style.block=true;\n\t\tthis.style.lineElement=true;\n\t\tthis.style.width=200;\n\t\tthis.style.height=200;\n\t\tHTMLStyleElement;\n\t}\n\n\t__class(HTMLDivElement,'laya.html.dom.HTMLDivElement',_super);\n\tvar __proto=HTMLDivElement.prototype;\n\t/**\n\t*追加内容，解析并对显示对象排版\n\t*@param text\n\t*/\n\t__proto.appendHTML=function(text){\n\t\tHTMLParse.parse(this,text,this.URI);\n\t\tthis.layout();\n\t}\n\n\t/**\n\t*@private\n\t*@param out\n\t*@return\n\t*/\n\t__proto._addChildsToLayout=function(out){\n\t\tvar words=this._getWords();\n\t\tif (words==null && this._childs.length==0)return false;\n\t\twords && words.forEach(function(o){\n\t\t\tout.push(o);\n\t\t});\n\t\tvar tFirstKey=true;\n\t\tfor (var i=0,len=this._childs.length;i < len;i++){\n\t\t\tvar o=this._childs[i];\n\t\t\tif (tFirstKey){\n\t\t\t\ttFirstKey=false;\n\t\t\t\t}else {\n\t\t\t\tout.push(null);\n\t\t\t}\n\t\t\to._addToLayout(out)\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t*@private\n\t*@param out\n\t*/\n\t__proto._addToLayout=function(out){\n\t\tthis.layout();\n\t}\n\n\t/**\n\t*@private\n\t*对显示内容进行排版\n\t*/\n\t__proto.layout=function(){\n\t\tif (!this.style)return;\n\t\tthis.style._type |=/*laya.display.css.CSSStyle.ADDLAYOUTED*/0x200;\n\t\tvar tArray=Layout.layout(this);\n\t\tif (tArray){\n\t\t\tif (!this._$P.mHtmlBounds)this._set$P(\"mHtmlBounds\",new Rectangle());\n\t\t\tvar tRectangle=this._$P.mHtmlBounds;\n\t\t\ttRectangle.x=tRectangle.y=0;\n\t\t\ttRectangle.width=this.contextWidth=tArray[0];\n\t\t\ttRectangle.height=this.contextHeight=tArray[1];\n\t\t\tthis.setBounds(tRectangle);\n\t\t}\n\t}\n\n\t/**\n\t*获取对象的高\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\tif (this._height)return this._height;\n\t\treturn this.contextHeight;\n\t},_super.prototype._$set_height);\n\n\t/**\n\t*设置标签内容\n\t*/\n\t__getset(0,__proto,'innerHTML',null,function(text){\n\t\tthis.destroyChildren();\n\t\tthis.appendHTML(text);\n\t});\n\n\t/**\n\t*获取对象的宽\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\tif (this._width)return this._width;\n\t\treturn this.contextWidth;\n\t\t},function(value){\n\t\tvar changed=false;\n\t\tif (value===0){\n\t\t\tchanged=value !=this._width;\n\t\t\t}else{\n\t\t\tchanged=value !=this.width;\n\t\t}\n\t\tLaya.superSet(HTMLElement,this,'width',value);\n\t\tif(changed)\n\t\t\tthis.layout();\n\t});\n\n\treturn HTMLDivElement;\n})(HTMLElement)\n\n\n/**\n*@private\n*/\n//class laya.html.dom.HTMLDocument extends laya.html.dom.HTMLElement\nvar HTMLDocument=(function(_super){\n\tfunction HTMLDocument(){\n\t\tthis.all=new Array;\n\t\tthis.styleSheets=CSSStyle.styleSheets;\n\t\tHTMLDocument.__super.call(this);\n\t}\n\n\t__class(HTMLDocument,'laya.html.dom.HTMLDocument',_super);\n\tvar __proto=HTMLDocument.prototype;\n\t__proto.getElementById=function(id){\n\t\treturn this.all[id];\n\t}\n\n\t__proto.setElementById=function(id,e){\n\t\tthis.all[id]=e;\n\t}\n\n\t__static(HTMLDocument,\n\t['document',function(){return this.document=new HTMLDocument();}\n\t]);\n\treturn HTMLDocument;\n})(HTMLElement)\n\n\n/**\n*@private\n*/\n//class laya.html.dom.HTMLImageElement extends laya.html.dom.HTMLElement\nvar HTMLImageElement=(function(_super){\n\tfunction HTMLImageElement(){\n\t\tthis._tex=null;\n\t\tthis._url=null;\n\t\tthis._renderArgs=[];\n\t\tHTMLImageElement.__super.call(this);\n\t\tthis.style.block=true;\n\t}\n\n\t__class(HTMLImageElement,'laya.html.dom.HTMLImageElement',_super);\n\tvar __proto=HTMLImageElement.prototype;\n\t__proto._addToLayout=function(out){\n\t\t!this._style.absolute && out.push(this);\n\t}\n\n\t__proto.render=function(context,x,y){\n\t\tif (!this._tex || !this._tex.loaded || !this._tex.loaded || this._width < 1 || this._height < 1)return;\n\t\tStat.spriteCount++;\n\t\tthis._renderArgs[0]=this._tex;\n\t\tthis._renderArgs[1]=this.x;\n\t\tthis._renderArgs[2]=this.y;\n\t\tthis._renderArgs[3]=this.width || this._tex.width;\n\t\tthis._renderArgs[4]=this.height || this._tex.height;\n\t\tcontext.ctx.drawTexture2(x,y,this.style.translateX,this.style.translateY,this.transform,this.style.alpha,this.style.blendMode,this._renderArgs);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.layaoutCallNative=function(){\n\t\tvar n=0;\n\t\tif (this._childs &&(n=this._childs.length)> 0){\n\t\t\tfor (var i=0;i < n;i++){\n\t\t\t\tthis._childs[i].layaoutCallNative && this._childs[i].layaoutCallNative();\n\t\t\t}\n\t\t}\n\t}\n\n\t__getset(0,__proto,'src',null,function(url){\n\t\tvar _$this=this;\n\t\turl=this.formatURL(url);\n\t\tif (this._url==url)return;\n\t\tthis._url=url;\n\t\tvar tex=this._tex=Loader.getRes(url);\n\t\tif (!tex){\n\t\t\tthis._tex=tex=new Texture();\n\t\t\ttex.load(url);\n\t\t\tLoader.cacheRes(url,tex);\n\t\t}\n\t\tfunction onloaded (){\n\t\t\tif (!_$this._style)return;\n\t\t\tvar style=_$this._style;\n\t\t\tvar w=style.widthed(_$this)?-1:_$this._tex.width;\n\t\t\tvar h=style.heighted(_$this)?-1:_$this._tex.height;\n\t\t\tif (!style.widthed(_$this)&& _$this._width !=_$this._tex.width){\n\t\t\t\t_$this.width=_$this._tex.width;\n\t\t\t\t_$this.parent && (_$this.parent)._layoutLater();\n\t\t\t}\n\t\t\tif (!style.heighted(_$this)&& _$this._height !=_$this._tex.height){\n\t\t\t\t_$this.height=_$this._tex.height;\n\t\t\t\t_$this.parent && (_$this.parent)._layoutLater();\n\t\t\t}\n\t\t\tif (Render.isConchApp){\n\t\t\t\t_$this._renderArgs[0]=_$this._tex;\n\t\t\t\t_$this._renderArgs[1]=_$this.x;\n\t\t\t\t_$this._renderArgs[2]=_$this.y;\n\t\t\t\t_$this._renderArgs[3]=_$this.width || _$this._tex.width;\n\t\t\t\t_$this._renderArgs[4]=_$this.height || _$this._tex.height;\n\t\t\t\t_$this.graphics.drawTexture(_$this._tex,0,0,_$this._renderArgs[3],_$this._renderArgs[4]);\n\t\t\t}\n\t\t\t_$this.repaint();\n\t\t\t_$this.parentRepaint();\n\t\t}\n\t\ttex.loaded?onloaded():tex.on(/*laya.events.Event.LOADED*/\"loaded\",null,onloaded);\n\t});\n\n\treturn HTMLImageElement;\n})(HTMLElement)\n\n\n/**\n*@private\n*/\n//class laya.html.dom.HTMLLinkElement extends laya.html.dom.HTMLElement\nvar HTMLLinkElement=(function(_super){\n\tfunction HTMLLinkElement(){\n\t\tthis.type=null;\n\t\tHTMLLinkElement.__super.call(this);\n\t\tthis.visible=false;\n\t}\n\n\t__class(HTMLLinkElement,'laya.html.dom.HTMLLinkElement',_super);\n\tvar __proto=HTMLLinkElement.prototype;\n\t__proto._onload=function(data){\n\t\tswitch(this.type){\n\t\t\tcase 'text/css':\n\t\t\t\tCSSStyle.parseCSS(data,this.URI);\n\t\t\t\tbreak ;\n\t\t\t}\n\t}\n\n\t__getset(0,__proto,'href',_super.prototype._$get_href,function(url){\n\t\tvar _$this=this;\n\t\turl=this.formatURL(url);\n\t\tthis.URI=new URL(url);\n\t\tvar l=new Loader();\n\t\tl.once(/*laya.events.Event.COMPLETE*/\"complete\",null,function(data){\n\t\t\t_$this._onload(data);\n\t\t});\n\t\tl.load(url,/*laya.net.Loader.TEXT*/\"text\");\n\t});\n\n\tHTMLLinkElement._cuttingStyle=new RegExp(\"((@keyframes[\\\\s\\\\t]+|)(.+))[\\\\t\\\\n\\\\r\\\\\\s]*{\",\"g\");\n\treturn HTMLLinkElement;\n})(HTMLElement)\n\n\n/**\n*@private\n*/\n//class laya.html.dom.HTMLStyleElement extends laya.html.dom.HTMLElement\nvar HTMLStyleElement=(function(_super){\n\tfunction HTMLStyleElement(){\n\t\tHTMLStyleElement.__super.call(this);\n\t\tthis.visible=false;\n\t}\n\n\t__class(HTMLStyleElement,'laya.html.dom.HTMLStyleElement',_super);\n\tvar __proto=HTMLStyleElement.prototype;\n\t/**\n\t*解析样式\n\t*/\n\t__getset(0,__proto,'text',_super.prototype._$get_text,function(value){\n\t\tCSSStyle.parseCSS(value,null);\n\t});\n\n\treturn HTMLStyleElement;\n})(HTMLElement)\n\n\n/**\n*iframe标签类，目前用于加载外并解析数据\n*/\n//class laya.html.dom.HTMLIframeElement extends laya.html.dom.HTMLDivElement\nvar HTMLIframeElement=(function(_super){\n\tfunction HTMLIframeElement(){\n\t\tHTMLIframeElement.__super.call(this);\n\t\tthis._getCSSStyle().valign=\"middle\";\n\t}\n\n\t__class(HTMLIframeElement,'laya.html.dom.HTMLIframeElement',_super);\n\tvar __proto=HTMLIframeElement.prototype;\n\t/**\n\t*加载html文件，并解析数据\n\t*@param url\n\t*/\n\t__getset(0,__proto,'href',_super.prototype._$get_href,function(url){\n\t\tvar _$this=this;\n\t\turl=this.formatURL(url);\n\t\tvar l=new Loader();\n\t\tl.once(/*laya.events.Event.COMPLETE*/\"complete\",null,function(data){\n\t\t\tvar pre=_$this.URI;\n\t\t\t_$this.URI=new URL(url);\n\t\t\t_$this.innerHTML=data;\n\t\t\t!pre || (_$this.URI=pre);\n\t\t});\n\t\tl.load(url,/*laya.net.Loader.TEXT*/\"text\");\n\t});\n\n\treturn HTMLIframeElement;\n})(HTMLDivElement)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.hwmini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar Sound=laya.media.Sound,SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,TTMiniAdapter=laya.tt.mini.TTMiniAdapter;\n\tvar URL=laya.net.URL,Utils=laya.utils.Utils;\n//class laya.hw.mini.HWMiniAdapter\nvar HWMiniAdapter=(function(){\n\tfunction HWMiniAdapter(){}\n\t__class(HWMiniAdapter,'laya.hw.mini.HWMiniAdapter');\n\tHWMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tHWMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (HWMiniAdapter._inited)return;\n\t\tHWMiniAdapter._inited=true;\n\t\tHWMiniAdapter.window=/*__JS__ */window;\n\t\tif(!HWMiniAdapter.window.hasOwnProperty(\"hbs\"))\n\t\t\treturn;\n\t\tHWMiniAdapter.isZiYu=isSon;\n\t\tHWMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tHWMiniAdapter.EnvConfig={};\n\t\ttry{\n\t\t\t/*__JS__ */laya.webgl.resource.WebGLCanvas.premulAlpha=true;\n\t\t\t}catch(e){\n\t\t}\n\t\tif(!HWMiniAdapter.isZiYu){\n\t\t\tMiniFileMgr$9.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$9.existDir(MiniFileMgr$9.fileNativeDir,Handler.create(HWMiniAdapter,HWMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tHWMiniAdapter.systemInfo=HWMiniAdapter.window.hbs.getSystemInfoSync();\n\t\tif (HWMiniAdapter.systemInfo.system.toLowerCase()==='ios 10.1.1'){\n\t\t\ttry{\n\t\t\t\t/*__JS__ */laya.webgl.resource.WebGLCharImage.canUseCanvas=false;\n\t\t\t\t}catch(e){\n\t\t\t}\n\t\t}\n\t\tHWMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tHWMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tHWMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tHWMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tHWMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=HWMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=HWMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=HWMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$9['_createInputElement'];\n\t\tHWMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$9.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$9.prototype._loadImage;\n\t\tConfig.useRetinalCanvas=true;\n\t}\n\n\tHWMiniAdapter.measureText=function(str){\n\t\tvar tempObj=HWMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tHWMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"binary\";\n\t\treturn \"utf8\";\n\t}\n\n\tHWMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$9.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$9.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tHWMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$9.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tHWMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$9.deleteAll();\n\t}\n\n\tHWMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$9.isLocalNativeFile(fileUrl);\n\t}\n\n\tHWMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$9.getFileInfo(fileUrl);\n\t}\n\n\tHWMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$9.filesListObj;\n\t}\n\n\tHWMiniAdapter.exitMiniProgram=function(){\n\t\tHWMiniAdapter.window.hbs.exitMiniProgram();\n\t}\n\n\tHWMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr$9.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr$9.fakeObj=JSON.parse(data.data)||{};\n\t\t}\n\t}\n\n\tHWMiniAdapter.pixelRatio=function(){\n\t\tif (!HWMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tHWMiniAdapter.EnvConfig.pixelRatioInt=HWMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn HWMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn HWMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tHWMiniAdapter.createElement=function(type){\n\t\tif (type==\"textarea\" || type==\"input\"){\n\t\t\treturn HWMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=HWMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn HWMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tHWMiniAdapter.onCreateInput=function(type){\n\t\tvar node=HWMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$9.inputFocus;\n\t\tnode.blur=MiniInput$9.inputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tHWMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tHWMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.hw.mini.HWMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tHWMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tHWMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$9.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$9.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tHWMiniAdapter.window.hbs.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tHWMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$9.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$9.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tHWMiniAdapter.window.hbs.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tHWMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.hw.mini.HWMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tHWMiniAdapter.window.hbs.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tHWMiniAdapter.EnvConfig=null;\n\tHWMiniAdapter.window=null;\n\tHWMiniAdapter._preCreateElement=null;\n\tHWMiniAdapter._inited=false;\n\tHWMiniAdapter.systemInfo=null;\n\tHWMiniAdapter.isZiYu=false;\n\tHWMiniAdapter.isPosMsgYu=false;\n\tHWMiniAdapter.autoCacheFile=true;\n\tHWMiniAdapter.minClearSize=(5 *1024 *1024);\n\tHWMiniAdapter.subNativeFiles=null;\n\tHWMiniAdapter.subNativeheads=[];\n\tHWMiniAdapter.subMaps=[];\n\tHWMiniAdapter.AutoCacheDownFile=false;\n\tHWMiniAdapter._measureText=null;\n\tHWMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tHWMiniAdapter.idx=1;\n\t__static(HWMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"wxlocal\"];}\n\t]);\n\treturn HWMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.hw.mini.MiniFileMgr\nvar MiniFileMgr$9=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.hw.mini.MiniFileMgr',null,'MiniFileMgr$9');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=HWMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(HWMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(HWMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (MiniFileMgr.filesListObj[readyUrl]){\n\t\t\t\t\t\tif (MiniFileMgr.filesListObj[readyUrl]==MiniFileMgr.fakeObj[readyUrl]){\n\t\t\t\t\t\t\tdelete MiniFileMgr.fakeObj[readyUrl];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete MiniFileMgr.filesListObj[readyUrl];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((HWMiniAdapter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\"wx.qlogo.cn\")==-1 && readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\tif(HWMiniAdapter.window.navigator.userAgent.indexOf('MiniGame')<0){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > HWMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tHWMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > HWMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tHWMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=HWMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.hw.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.hw.mini.MiniFileMgr.filesListObj && laya.hw.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.hw.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.hw.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.fakeObj[fileurlkey].md5==MiniFileMgr.filesListObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!HWMiniAdapter.isZiYu &&HWMiniAdapter.isPosMsgYu && HWMiniAdapter.window.hbs.postMessage){\n\t\t\tHWMiniAdapter.window.hbs.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tfilesListStr=MiniFileMgr.fs.readFileSync(fileUrl,encoding);\n\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=HWMiniAdapter.window.hbs.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=HWMiniAdapter.window.hbs.getFileSystemManager();},'wxdown',function(){return this.wxdown=HWMiniAdapter.window.hbs.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.hw.mini.MiniImage\nvar MiniImage$9=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.hw.mini.MiniImage',null,'MiniImage$9');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (HWMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$9.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$9.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$9.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (HWMiniAdapter.subNativeFiles && HWMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in HWMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=HWMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tHWMiniAdapter.subNativeheads=HWMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tHWMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(HWMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && HWMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=HWMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$9.getFileInfo(url)){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(HWMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$9.downOtherFiles(encodeURI(url),new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(HWMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$9.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$9.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(HWMiniAdapter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr$9.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$9.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tdelete MiniFileMgr$9.filesListObj[sourceUrl];\n\t\t\tdelete MiniFileMgr$9.fakeObj[sourceUrl];\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.hw.mini.MiniInput\nvar MiniInput$9=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.hw.mini.MiniInput',null,'MiniInput$9');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\tHWMiniAdapter.window.hbs.onWindowResize && HWMiniAdapter.window.hbs.onWindowResize(function(res){\n\t\t\tHWMiniAdapter.window.dispatchEvent && HWMiniAdapter.window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$9;\n\t\tSoundManager._musicClass=MiniSound$9;\n\t\tvar model=HWMiniAdapter.systemInfo.model;\n\t\tvar system=HWMiniAdapter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.inputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tHWMiniAdapter.window.hbs.offKeyboardConfirm();\n\t\tHWMiniAdapter.window.hbs.offKeyboardInput();\n\t\tHWMiniAdapter.window.hbs.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tHWMiniAdapter.window.hbs.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\")\n\t\t\tlaya.hw.mini.MiniInput.inputEnter();\n\t\t})\n\t\tHWMiniAdapter.window.hbs.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.hw.mini.MiniInput.inputEnter();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(){\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.inputblur=function(){\n\t\tMiniInput.hideKeyboard();\n\t}\n\n\tMiniInput.hideKeyboard=function(){\n\t\tHWMiniAdapter.window.hbs.offKeyboardConfirm();\n\t\tHWMiniAdapter.window.hbs.offKeyboardInput();\n\t\tHWMiniAdapter.window.hbs.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.hw.mini.MiniLocation\nvar MiniLocation$9=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.hw.mini.MiniLocation',null,'MiniLocation$9');\n\tMiniLocation.__init__=function(){\n\t\tHWMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tHWMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tHWMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tHWMiniAdapter.window.hbs.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.tt.mini.MiniVideo\nvar MiniVideo$7=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=TTMiniAdapter.window.tt.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.tt.mini.MiniVideo',null,'MiniVideo$7');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n/**@private **/\n//class laya.hw.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$9=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.hw.mini.MiniAccelerator',_super,'MiniAccelerator$9');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tHWMiniAdapter.window.hbs.onAccelerometerChange(laya.hw.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tHWMiniAdapter.window.hbs.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.hw.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$9=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.hw.mini.MiniLoader',_super,'MiniLoader$9');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=HWMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tHWMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(HWMiniAdapter.isZiYu && !MiniFileMgr$9.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(HWMiniAdapter.isZiYu && MiniFileMgr$9.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$9.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$9.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr$9.isLocalNativeFile(url)){\n\t\t\t\t\tif (HWMiniAdapter.subNativeFiles && HWMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in HWMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=HWMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tHWMiniAdapter.subNativeheads=HWMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tHWMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(HWMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && HWMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=HWMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(type==/*laya.net.Loader.SOUND*/\"sound\"){\n\t\t\t\t\t\tthisLoader._loadSound(url);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tMiniFileMgr$9.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(HWMiniAdapter.window.hbs.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !HWMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tif(type==/*laya.net.Loader.SOUND*/\"sound\"){\n\t\t\t\t\t\tthisLoader._loadSound(url);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tHWMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$9.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$9.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tHWMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$9.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$9.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$9.downFiles(encodeURI(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$9.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$9.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$9.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),URL.formatURL(url));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*private\n\t*@param url\n\t**/\n\t__proto._loadSound=function(url){\n\t\tvar thisLoader=this;\n\t\tvar fileNativeUrl;\n\t\tif (MiniFileMgr$9.isLocalNativeFile(url)){\n\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\tvar tempUrl=url;\n\t\t\tif(tempStr !=\"\" && (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1))\n\t\t\t\tfileNativeUrl=url.split(tempStr)[1];\n\t\t\tif(!fileNativeUrl){\n\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t}\n\t\t\tlaya.hw.mini.MiniLoader.onDownLoadCallBack(url,thisLoader,0);\n\t\t\t}else{\n\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\tif (!MiniFileMgr$9.isLocalNativeFile(url)&& (tempurl.indexOf(\"http://\")==-1 && tempurl.indexOf(\"https://\")==-1)|| (tempurl.indexOf(HWMiniAdapter.window.hbs.env.USER_DATA_PATH)!=-1)){\n\t\t\t\tlaya.hw.mini.MiniLoader.onDownLoadCallBack(url,thisLoader,0);\n\t\t\t\t}else{\n\t\t\t\tMiniFileMgr$9.downOtherFiles(encodeURI(tempurl),Handler.create(MiniLoader,laya.hw.mini.MiniLoader.onDownLoadCallBack,[tempurl,thisLoader]),tempurl);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onDownLoadCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(HWMiniAdapter.autoCacheFile){\n\t\t\t\tif(!tempFilePath){\n\t\t\t\t\tif (MiniFileMgr$9.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tvar fileObj=MiniFileMgr$9.getFileInfo(sourceUrl);\n\t\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$9.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsourceUrl=fileNativeUrl;\n\t\t\tvar sound=new SoundManager._soundClass();\n\t\t\tsound.load(encodeURI(sourceUrl));\n\t\t\tthisLoader.onLoaded(sound);\n\t\t\t}else{\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load sound failed\");\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=HWMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!HWMiniAdapter.isZiYu &&HWMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\" && HWMiniAdapter.window.hbs){\n\t\t\t\tHWMiniAdapter.window.hbs.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tconsole.log(\"-----------本地加载失败，尝试外网加载----url:\"+url);\n\t\t\tHWMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.hw.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$9=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.hw.mini.MiniSound',_super,'MiniSound$9');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$9.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$9.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$9.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(HWMiniAdapter.autoCacheFile&&MiniFileMgr$9.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!HWMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$9.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (HWMiniAdapter.subNativeFiles && HWMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in HWMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=HWMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tHWMiniAdapter.subNativeheads=HWMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tHWMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(HWMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && HWMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=HWMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$9.downOtherFiles(encodeURI(url),Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(HWMiniAdapter.autoCacheFile){\n\t\t\t\tif (MiniFileMgr$9.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$9.getFileInfo(sourceUrl);\n\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$9.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tfileNativeUrl=encodeURI(sourceUrl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=encodeURI(sourceUrl);\n\t\t\t}\n\t\t\tthis._sound.onCanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\tthis._sound.onError(MiniSound.bindToThis(this.onError,this));\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tthis._sound.offError(null);\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis._sound.offCanplay(null);\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(HWMiniAdapter.autoCacheFile&&MiniFileMgr$9.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr$9.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr$9.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=encodeURI(this.url);\n\t\t};\n\t\tvar channel=new MiniSoundChannel$9(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t\tif(this._sound){\n\t\t\tthis._sound.destroy();\n\t\t\tthis._sound=null;\n\t\t}\n\t\tthis.url=this.readyUrl=null;\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn HWMiniAdapter.window.hbs.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.hw.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$9=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onEnded(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.hw.mini.MiniSoundChannel',_super,'MiniSoundChannel$9');\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tthis._audio.offEnded(null);\n\t\tthis._audio.destroy();\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',null,function(time){\n\t\tif(this._audio){\n\t\t\tthis._audio.startTime=time;\n\t\t}\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.particle.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar BlendMode=laya.webgl.canvas.BlendMode,Event=laya.events.Event,HTMLCanvas=laya.resource.HTMLCanvas;\n\tvar Handler=laya.utils.Handler,IndexBuffer2D=laya.webgl.utils.IndexBuffer2D,Loader=laya.net.Loader,MathUtil=laya.maths.MathUtil;\n\tvar Matrix=laya.maths.Matrix,Render=laya.renders.Render,RenderContext=laya.renders.RenderContext,RenderSprite=laya.renders.RenderSprite;\n\tvar Shader=laya.webgl.shader.Shader,Sprite=laya.display.Sprite,Stat=laya.utils.Stat,Texture=laya.resource.Texture;\n\tvar Utils=laya.utils.Utils,Value2D=laya.webgl.shader.d2.value.Value2D,VertexBuffer2D=laya.webgl.utils.VertexBuffer2D;\n\tvar WebGL=laya.webgl.WebGL,WebGLContext=laya.webgl.WebGLContext;\n/**\n*<code>EmitterBase</code> 类是粒子发射器类\n*/\n//class laya.particle.emitter.EmitterBase\nvar EmitterBase=(function(){\n\tfunction EmitterBase(){\n\t\t/**\n\t\t*积累的帧时间\n\t\t*/\n\t\tthis._frameTime=0;\n\t\t/**\n\t\t*粒子发射速率\n\t\t*/\n\t\tthis._emissionRate=60;\n\t\t/**\n\t\t*当前剩余发射时间\n\t\t*/\n\t\tthis._emissionTime=0;\n\t\t/**\n\t\t*发射粒子最小时间间隔\n\t\t*/\n\t\tthis.minEmissionTime=1 / 60;\n\t\t/**@private */\n\t\tthis._particleTemplate=null;\n\t}\n\n\t__class(EmitterBase,'laya.particle.emitter.EmitterBase');\n\tvar __proto=EmitterBase.prototype;\n\t/**\n\t*开始发射粒子\n\t*@param duration 发射持续的时间(秒)\n\t*/\n\t__proto.start=function(duration){\n\t\t(duration===void 0)&& (duration=2147483647);\n\t\tif (this._emissionRate !=0)\n\t\t\tthis._emissionTime=duration;\n\t}\n\n\t/**\n\t*停止发射粒子\n\t*@param clearParticles 是否清理当前的粒子\n\t*/\n\t__proto.stop=function(){\n\t\tthis._emissionTime=0;\n\t}\n\n\t/**\n\t*清理当前的活跃粒子\n\t*@param clearTexture 是否清理贴图数据,若清除贴图数据将无法再播放\n\t*/\n\t__proto.clear=function(){\n\t\tthis._emissionTime=0;\n\t}\n\n\t/**\n\t*发射一个粒子\n\t*\n\t*/\n\t__proto.emit=function(){}\n\t/**\n\t*时钟前进\n\t*@param passedTime 前进时间\n\t*\n\t*/\n\t__proto.advanceTime=function(passedTime){\n\t\t(passedTime===void 0)&& (passedTime=1);\n\t\tthis._emissionTime-=passedTime;\n\t\tif (this._emissionTime < 0)return;\n\t\tthis._frameTime+=passedTime;\n\t\tif (this._frameTime < this.minEmissionTime)return;\n\t\twhile (this._frameTime > this.minEmissionTime){\n\t\t\tthis._frameTime-=this.minEmissionTime;\n\t\t\tthis.emit();\n\t\t}\n\t}\n\n\t/**\n\t*设置粒子粒子模板\n\t*@param particleTemplate 粒子模板\n\t*\n\t*/\n\t__getset(0,__proto,'particleTemplate',null,function(particleTemplate){\n\t\tthis._particleTemplate=particleTemplate;\n\t});\n\n\t/**\n\t*设置粒子发射速率\n\t*@param emissionRate 粒子发射速率 (个/秒)\n\t*/\n\t/**\n\t*获取粒子发射速率\n\t*@return 发射速率 粒子发射速率 (个/秒)\n\t*/\n\t__getset(0,__proto,'emissionRate',function(){\n\t\treturn this._emissionRate;\n\t\t},function(_emissionRate){\n\t\tif (_emissionRate <=0)return;\n\t\tthis._emissionRate=_emissionRate;\n\t\t(_emissionRate > 0)&& (this.minEmissionTime=1 / _emissionRate);\n\t});\n\n\treturn EmitterBase;\n})()\n\n\n/**\n*@private\n*/\n//class laya.particle.ParticleData\nvar ParticleData=(function(){\n\tfunction ParticleData(){\n\t\tthis.position=null;\n\t\tthis.velocity=null;\n\t\tthis.startColor=null;\n\t\tthis.endColor=null;\n\t\tthis.sizeRotation=null;\n\t\tthis.radius=null;\n\t\tthis.radian=null;\n\t\tthis.durationAddScale=NaN;\n\t\tthis.time=NaN;\n\t}\n\n\t__class(ParticleData,'laya.particle.ParticleData');\n\tParticleData.Create=function(settings,position,velocity,time){\n\t\tvar particleData=new ParticleData();\n\t\tparticleData.position=position;\n\t\tMathUtil.scaleVector3(velocity,settings.emitterVelocitySensitivity,ParticleData._tempVelocity);\n\t\tvar horizontalVelocity=MathUtil.lerp(settings.minHorizontalVelocity,settings.maxHorizontalVelocity,Math.random());\n\t\tvar horizontalAngle=Math.random()*Math.PI *2;\n\t\tParticleData._tempVelocity[0]+=horizontalVelocity *Math.cos(horizontalAngle);\n\t\tParticleData._tempVelocity[2]+=horizontalVelocity *Math.sin(horizontalAngle);\n\t\tParticleData._tempVelocity[1]+=MathUtil.lerp(settings.minVerticalVelocity,settings.maxVerticalVelocity,Math.random());\n\t\tparticleData.velocity=ParticleData._tempVelocity;\n\t\tparticleData.startColor=ParticleData._tempStartColor;\n\t\tparticleData.endColor=ParticleData._tempEndColor;\n\t\tvar i=0;\n\t\tif (settings.disableColor){\n\t\t\tfor (i=0;i < 4;i++){\n\t\t\t\tparticleData.startColor[i]=1;\n\t\t\t\tparticleData.endColor[i]=1;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (settings.colorComponentInter){\n\t\t\t\tfor (i=0;i < 4;i++){\n\t\t\t\t\tparticleData.startColor[i]=MathUtil.lerp(settings.minStartColor[i],settings.maxStartColor[i],Math.random());\n\t\t\t\t\tparticleData.endColor[i]=MathUtil.lerp(settings.minEndColor[i],settings.maxEndColor[i],Math.random());\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tMathUtil.lerpVector4(settings.minStartColor,settings.maxStartColor,Math.random(),particleData.startColor);\n\t\t\t\tMathUtil.lerpVector4(settings.minEndColor,settings.maxEndColor,Math.random(),particleData.endColor);\n\t\t\t}\n\t\t}\n\t\tparticleData.sizeRotation=ParticleData._tempSizeRotation;\n\t\tvar sizeRandom=Math.random();\n\t\tparticleData.sizeRotation[0]=MathUtil.lerp(settings.minStartSize,settings.maxStartSize,sizeRandom);\n\t\tparticleData.sizeRotation[1]=MathUtil.lerp(settings.minEndSize,settings.maxEndSize,sizeRandom);\n\t\tparticleData.sizeRotation[2]=MathUtil.lerp(settings.minRotateSpeed,settings.maxRotateSpeed,Math.random());\n\t\tparticleData.radius=ParticleData._tempRadius;\n\t\tvar radiusRandom=Math.random();\n\t\tparticleData.radius[0]=MathUtil.lerp(settings.minStartRadius,settings.maxStartRadius,radiusRandom);\n\t\tparticleData.radius[1]=MathUtil.lerp(settings.minEndRadius,settings.maxEndRadius,radiusRandom);\n\t\tparticleData.radian=ParticleData._tempRadian;\n\t\tparticleData.radian[0]=MathUtil.lerp(settings.minHorizontalStartRadian,settings.maxHorizontalStartRadian,Math.random());\n\t\tparticleData.radian[1]=MathUtil.lerp(settings.minVerticalStartRadian,settings.maxVerticalStartRadian,Math.random());\n\t\tvar useEndRadian=settings.useEndRadian;\n\t\tparticleData.radian[2]=useEndRadian?MathUtil.lerp(settings.minHorizontalEndRadian,settings.maxHorizontalEndRadian,Math.random()):particleData.radian[0];\n\t\tparticleData.radian[3]=useEndRadian?MathUtil.lerp(settings.minVerticalEndRadian,settings.maxVerticalEndRadian,Math.random()):particleData.radian[1];\n\t\tparticleData.durationAddScale=settings.ageAddScale *Math.random();\n\t\tparticleData.time=time;\n\t\treturn particleData;\n\t}\n\n\t__static(ParticleData,\n\t['_tempVelocity',function(){return this._tempVelocity=new Float32Array(3);},'_tempStartColor',function(){return this._tempStartColor=new Float32Array(4);},'_tempEndColor',function(){return this._tempEndColor=new Float32Array(4);},'_tempSizeRotation',function(){return this._tempSizeRotation=new Float32Array(3);},'_tempRadius',function(){return this._tempRadius=new Float32Array(2);},'_tempRadian',function(){return this._tempRadian=new Float32Array(4);}\n\t]);\n\treturn ParticleData;\n})()\n\n\n/**\n*@private\n*/\n//class laya.particle.ParticleEmitter\nvar ParticleEmitter=(function(){\n\tfunction ParticleEmitter(templet,particlesPerSecond,initialPosition){\n\t\tthis._templet=null;\n\t\tthis._timeBetweenParticles=NaN;\n\t\tthis._previousPosition=null;\n\t\tthis._timeLeftOver=0;\n\t\tthis._tempVelocity=new Float32Array([0,0,0]);\n\t\tthis._tempPosition=new Float32Array([0,0,0]);\n\t\tthis._templet=templet;\n\t\tthis._timeBetweenParticles=1.0 / particlesPerSecond;\n\t\tthis._previousPosition=initialPosition;\n\t}\n\n\t__class(ParticleEmitter,'laya.particle.ParticleEmitter');\n\tvar __proto=ParticleEmitter.prototype;\n\t__proto.update=function(elapsedTime,newPosition){\n\t\telapsedTime=elapsedTime / 1000;\n\t\tif (elapsedTime > 0){\n\t\t\tMathUtil.subtractVector3(newPosition,this._previousPosition,this._tempVelocity);\n\t\t\tMathUtil.scaleVector3(this._tempVelocity,1 / elapsedTime,this._tempVelocity);\n\t\t\tvar timeToSpend=this._timeLeftOver+elapsedTime;\n\t\t\tvar currentTime=-this._timeLeftOver;\n\t\t\twhile (timeToSpend > this._timeBetweenParticles){\n\t\t\t\tcurrentTime+=this._timeBetweenParticles;\n\t\t\t\ttimeToSpend-=this._timeBetweenParticles;\n\t\t\t\tMathUtil.lerpVector3(this._previousPosition,newPosition,currentTime / elapsedTime,this._tempPosition);\n\t\t\t\tthis._templet.addParticleArray(this._tempPosition,this._tempVelocity);\n\t\t\t}\n\t\t\tthis._timeLeftOver=timeToSpend;\n\t\t}\n\t\tthis._previousPosition[0]=newPosition[0];\n\t\tthis._previousPosition[1]=newPosition[1];\n\t\tthis._previousPosition[2]=newPosition[2];\n\t}\n\n\treturn ParticleEmitter;\n})()\n\n\n/**\n*<code>ParticleSettings</code> 类是粒子配置数据类\n*/\n//class laya.particle.ParticleSetting\nvar ParticleSetting=(function(){\n\tfunction ParticleSetting(){\n\t\t/**贴图*/\n\t\tthis.textureName=null;\n\t\t/**贴图个数,默认为1可不设置*/\n\t\tthis.textureCount=1;\n\t\t/**最大同屏粒子个数，最大饱和粒子数为maxPartices-1。注意:WebGL模式下释放粒子时间为最大声明周期，可能会出现释放延迟,实际看到的同屏粒子数小于该数值，如连续喷发出现中断，请调大该数值。*/\n\t\tthis.maxPartices=100;\n\t\t/**粒子持续时间(单位:秒）*/\n\t\tthis.duration=1;\n\t\t/**如果大于0，某些粒子的持续时间会小于其他粒子,并具有随机性(单位:无）*/\n\t\tthis.ageAddScale=0;\n\t\t/**粒子受发射器速度的敏感度（需在自定义发射器中编码设置）*/\n\t\tthis.emitterVelocitySensitivity=1;\n\t\t/**最小开始尺寸（单位：2D像素、3D坐标）*/\n\t\tthis.minStartSize=100;\n\t\t/**最大开始尺寸（单位：2D像素、3D坐标）*/\n\t\tthis.maxStartSize=100;\n\t\t/**最小结束尺寸（单位：2D像素、3D坐标）*/\n\t\tthis.minEndSize=100;\n\t\t/**最大结束尺寸（单位：2D像素、3D坐标）*/\n\t\tthis.maxEndSize=100;\n\t\t/**最小水平速度（单位：2D像素、3D坐标）*/\n\t\tthis.minHorizontalVelocity=0;\n\t\t/**最大水平速度（单位：2D像素、3D坐标）*/\n\t\tthis.maxHorizontalVelocity=0;\n\t\t/**最小垂直速度（单位：2D像素、3D坐标）*/\n\t\tthis.minVerticalVelocity=0;\n\t\t/**最大垂直速度（单位：2D像素、3D坐标）*/\n\t\tthis.maxVerticalVelocity=0;\n\t\t/**等于1时粒子从出生到消亡保持一致的速度，等于0时粒子消亡时速度为0，大于1时粒子会保持加速（单位：无）*/\n\t\tthis.endVelocity=1;\n\t\t/**最小旋转速度（单位：2D弧度/秒、3D弧度/秒）*/\n\t\tthis.minRotateSpeed=0;\n\t\t/**最大旋转速度（单位：2D弧度/秒、3D弧度/秒）*/\n\t\tthis.maxRotateSpeed=0;\n\t\t/**最小开始半径（单位：2D像素、3D坐标）*/\n\t\tthis.minStartRadius=0;\n\t\t/**最大开始半径（单位：2D像素、3D坐标）*/\n\t\tthis.maxStartRadius=0;\n\t\t/**最小结束半径（单位：2D像素、3D坐标）*/\n\t\tthis.minEndRadius=0;\n\t\t/**最大结束半径（单位：2D像素、3D坐标）*/\n\t\tthis.maxEndRadius=0;\n\t\t/**最小水平开始弧度（单位：2D弧度、3D弧度）*/\n\t\tthis.minHorizontalStartRadian=0;\n\t\t/**最大水平开始弧度（单位：2D弧度、3D弧度）*/\n\t\tthis.maxHorizontalStartRadian=0;\n\t\t/**最小垂直开始弧度（单位：2D弧度、3D弧度）*/\n\t\tthis.minVerticalStartRadian=0;\n\t\t/**最大垂直开始弧度（单位：2D弧度、3D弧度）*/\n\t\tthis.maxVerticalStartRadian=0;\n\t\t/**是否使用结束弧度,false为结束时与起始弧度保持一致,true为根据minHorizontalEndRadian、maxHorizontalEndRadian、minVerticalEndRadian、maxVerticalEndRadian计算结束弧度。*/\n\t\tthis.useEndRadian=true;\n\t\t/**最小水平结束弧度（单位：2D弧度、3D弧度）*/\n\t\tthis.minHorizontalEndRadian=0;\n\t\t/**最大水平结束弧度（单位：2D弧度、3D弧度）*/\n\t\tthis.maxHorizontalEndRadian=0;\n\t\t/**最小垂直结束弧度（单位：2D弧度、3D弧度）*/\n\t\tthis.minVerticalEndRadian=0;\n\t\t/**最大垂直结束弧度（单位：2D弧度、3D弧度）*/\n\t\tthis.maxVerticalEndRadian=0;\n\t\t/**false代表RGBA整体插值，true代表RGBA逐分量插值*/\n\t\tthis.colorComponentInter=false;\n\t\t/**false代表使用参数颜色数据，true代表使用原图颜色数据*/\n\t\tthis.disableColor=false;\n\t\t/**混合模式，待调整，引擎中暂无BlendState抽象*/\n\t\tthis.blendState=0;\n\t\t/**发射器类型,\"point\",\"box\",\"sphere\",\"ring\"*/\n\t\tthis.emitterType=\"null\";\n\t\t/**发射器发射速率*/\n\t\tthis.emissionRate=0;\n\t\t/**球发射器半径*/\n\t\tthis.sphereEmitterRadius=1;\n\t\t/**球发射器速度*/\n\t\tthis.sphereEmitterVelocity=0;\n\t\t/**球发射器速度随机值*/\n\t\tthis.sphereEmitterVelocityAddVariance=0;\n\t\t/**环发射器半径*/\n\t\tthis.ringEmitterRadius=30;\n\t\t/**环发射器速度*/\n\t\tthis.ringEmitterVelocity=0;\n\t\t/**环发射器速度随机值*/\n\t\tthis.ringEmitterVelocityAddVariance=0;\n\t\t/**环发射器up向量，0代表X轴,1代表Y轴,2代表Z轴*/\n\t\tthis.ringEmitterUp=2;\n\t\tthis.gravity=new Float32Array([0,0,0]);\n\t\tthis.minStartColor=new Float32Array([1,1,1,1]);\n\t\tthis.maxStartColor=new Float32Array([1,1,1,1]);\n\t\tthis.minEndColor=new Float32Array([1,1,1,1]);\n\t\tthis.maxEndColor=new Float32Array([1,1,1,1]);\n\t\tthis.pointEmitterPosition=new Float32Array([0,0,0]);\n\t\tthis.pointEmitterPositionVariance=new Float32Array([0,0,0]);\n\t\tthis.pointEmitterVelocity=new Float32Array([0,0,0]);\n\t\tthis.pointEmitterVelocityAddVariance=new Float32Array([0,0,0]);\n\t\tthis.boxEmitterCenterPosition=new Float32Array([0,0,0]);\n\t\tthis.boxEmitterSize=new Float32Array([0,0,0]);\n\t\tthis.boxEmitterVelocity=new Float32Array([0,0,0]);\n\t\tthis.boxEmitterVelocityAddVariance=new Float32Array([0,0,0]);\n\t\tthis.sphereEmitterCenterPosition=new Float32Array([0,0,0]);\n\t\tthis.ringEmitterCenterPosition=new Float32Array([0,0,0]);\n\t\tthis.positionVariance=new Float32Array([0,0,0]);\n\t}\n\n\t__class(ParticleSetting,'laya.particle.ParticleSetting');\n\tParticleSetting.checkSetting=function(setting){\n\t\tvar key;\n\t\tfor (key in ParticleSetting._defaultSetting){\n\t\t\tif (!setting.hasOwnProperty(key)){\n\t\t\t\tsetting[key]=ParticleSetting._defaultSetting[key];\n\t\t\t}\n\t\t}\n\t\tsetting.endVelocity=+setting.endVelocity;\n\t\tsetting.gravity[0]=+setting.gravity[0];\n\t\tsetting.gravity[1]=+setting.gravity[1];\n\t\tsetting.gravity[2]=+setting.gravity[2];\n\t}\n\n\t__static(ParticleSetting,\n\t['_defaultSetting',function(){return this._defaultSetting=new ParticleSetting();}\n\t]);\n\treturn ParticleSetting;\n})()\n\n\n/**\n*\n*<code>ParticleTemplateBase</code> 类是粒子模板基类\n*\n*/\n//class laya.particle.ParticleTemplateBase\nvar ParticleTemplateBase=(function(){\n\tfunction ParticleTemplateBase(){\n\t\t/**\n\t\t*粒子配置数据\n\t\t*/\n\t\tthis.settings=null;\n\t\t/**\n\t\t*粒子贴图\n\t\t*/\n\t\tthis.texture=null;\n\t}\n\n\t__class(ParticleTemplateBase,'laya.particle.ParticleTemplateBase');\n\tvar __proto=ParticleTemplateBase.prototype;\n\t/**\n\t*添加一个粒子\n\t*@param position 粒子位置\n\t*@param velocity 粒子速度\n\t*\n\t*/\n\t__proto.addParticleArray=function(position,velocity){}\n\treturn ParticleTemplateBase;\n})()\n\n\n/**\n*@private\n*/\n//class laya.particle.particleUtils.CanvasShader\nvar CanvasShader=(function(){\n\tfunction CanvasShader(){\n\t\tthis.u_Duration=NaN;\n\t\tthis.u_EndVelocity=NaN;\n\t\tthis.u_Gravity=null;\n\t\tthis.a_Position=null;\n\t\tthis.a_Velocity=null;\n\t\tthis.a_StartColor=null;\n\t\tthis.a_EndColor=null;\n\t\tthis.a_SizeRotation=null;\n\t\tthis.a_Radius=null;\n\t\tthis.a_Radian=null;\n\t\tthis.a_AgeAddScale=NaN;\n\t\tthis.gl_Position=null;\n\t\tthis.v_Color=null;\n\t\tthis.oSize=NaN;\n\t\tthis._color=new Float32Array(4);\n\t\tthis._position=new Float32Array(3);\n\t}\n\n\t__class(CanvasShader,'laya.particle.particleUtils.CanvasShader');\n\tvar __proto=CanvasShader.prototype;\n\t__proto.getLen=function(position){\n\t\treturn Math.sqrt(position[0] *position[0]+position[1] *position[1]+position[2] *position[2]);\n\t}\n\n\t__proto.ComputeParticlePosition=function(position,velocity,age,normalizedAge){\n\t\tthis._position[0]=position[0];\n\t\tthis._position[1]=position[1];\n\t\tthis._position[2]=position[2];\n\t\tvar startVelocity=this.getLen(velocity);\n\t\tvar endVelocity=startVelocity *this.u_EndVelocity;\n\t\tvar velocityIntegral=startVelocity *normalizedAge+(endVelocity-startVelocity)*normalizedAge *normalizedAge / 2.0;\n\t\tvar lenVelocity=NaN;\n\t\tlenVelocity=this.getLen(velocity);\n\t\tvar i=0,len=0;\n\t\tlen=3;\n\t\tfor (i=0;i < len;i++){\n\t\t\tthis._position[i]=this._position[i]+(velocity[i] / lenVelocity)*velocityIntegral *this.u_Duration;\n\t\t\tthis._position[i]+=this.u_Gravity[i] *age *normalizedAge;\n\t\t};\n\t\tvar radius=MathUtil.lerp(this.a_Radius[0],this.a_Radius[1],normalizedAge);\n\t\tvar radianHorizontal=MathUtil.lerp(this.a_Radian[0],this.a_Radian[2],normalizedAge);\n\t\tvar radianVertical=MathUtil.lerp(this.a_Radian[1],this.a_Radian[3],normalizedAge);\n\t\tvar r=Math.cos(radianVertical)*radius;\n\t\tthis._position[1]+=Math.sin(radianVertical)*radius;\n\t\tthis._position[0]+=Math.cos(radianHorizontal)*r;\n\t\tthis._position[2]+=Math.sin(radianHorizontal)*r;\n\t\treturn new Float32Array([this._position[0],this._position[1],0.0,1.0]);\n\t}\n\n\t__proto.ComputeParticleSize=function(startSize,endSize,normalizedAge){\n\t\tvar size=MathUtil.lerp(startSize,endSize,normalizedAge);\n\t\treturn size;\n\t}\n\n\t__proto.ComputeParticleRotation=function(rot,age){\n\t\treturn rot *age;\n\t}\n\n\t__proto.ComputeParticleColor=function(startColor,endColor,normalizedAge){\n\t\tvar rst=this._color;\n\t\tMathUtil.lerpVector4(startColor,endColor,normalizedAge,rst);\n\t\trst[3]=rst[3]*normalizedAge *(1.0-normalizedAge)*(1.0-normalizedAge)*6.7;\n\t\treturn rst;\n\t}\n\n\t__proto.clamp=function(value,min,max){\n\t\tif(value<min)return min;\n\t\tif(value>max)return max;\n\t\treturn value;\n\t}\n\n\t__proto.getData=function(age){\n\t\tage *=1.0+this.a_AgeAddScale;\n\t\tvar normalizedAge=this.clamp(age / this.u_Duration,0.0,1.0);\n\t\tthis.gl_Position=this.ComputeParticlePosition(this.a_Position,this.a_Velocity,age,normalizedAge);\n\t\tvar pSize=this.ComputeParticleSize(this.a_SizeRotation[0],this.a_SizeRotation[1],normalizedAge);\n\t\tvar rotation=this.ComputeParticleRotation(this.a_SizeRotation[2],age);\n\t\tthis.v_Color=this.ComputeParticleColor(this.a_StartColor,this.a_EndColor,normalizedAge);\n\t\tvar matric=new Matrix();\n\t\tvar scale=NaN;\n\t\tscale=pSize/this.oSize*2;\n\t\tmatric.scale(scale,scale);\n\t\tmatric.rotate(rotation);\n\t\tmatric.setTranslate(this.gl_Position[0],-this.gl_Position[1]);\n\t\tvar alpha=NaN;\n\t\talpha=this.v_Color[3];\n\t\treturn [this.v_Color,alpha,matric,this.v_Color[0]*alpha,this.v_Color[1]*alpha,this.v_Color[2]*alpha];\n\t}\n\n\treturn CanvasShader;\n})()\n\n\n/**\n*\n*@private\n*\n*@created 2015-8-25 下午3:41:07\n*/\n//class laya.particle.particleUtils.CMDParticle\nvar CMDParticle=(function(){\n\tfunction CMDParticle(){\n\t\t/**\n\t\t*最大帧\n\t\t*/\n\t\tthis.maxIndex=0;\n\t\t/**\n\t\t*帧命令数组\n\t\t*/\n\t\tthis.cmds=null;\n\t\t/**\n\t\t*粒子id\n\t\t*/\n\t\tthis.id=0;\n\t}\n\n\t__class(CMDParticle,'laya.particle.particleUtils.CMDParticle');\n\tvar __proto=CMDParticle.prototype;\n\t__proto.setCmds=function(cmds){\n\t\tthis.cmds=cmds;\n\t\tthis.maxIndex=cmds.length-1;\n\t}\n\n\treturn CMDParticle;\n})()\n\n\n//class laya.particle.particleUtils.PicTool\nvar PicTool=(function(){\n\tfunction PicTool(){}\n\t__class(PicTool,'laya.particle.particleUtils.PicTool');\n\tPicTool.getCanvasPic=function(img,color){\n\t\timg=img.bitmap;\n\t\tvar canvas=new HTMLCanvas(\"2D\");\n\t\tvar ctx=canvas.getContext('2d');\n\t\tcanvas.size(img.width,img.height);\n\t\tvar red=(color >> 16 & 0xFF);\n\t\tvar green=(color >> 8 & 0xFF);\n\t\tvar blue=(color & 0xFF);\n\t\tif(Render.isConchApp){\n\t\t\tctx.setFilter(red/255,green/255,blue/255,0);\n\t\t}\n\t\tctx.drawImage(img.source,0,0);\n\t\tif (!Render.isConchApp){\n\t\t\tvar imgdata=ctx.getImageData(0,0,canvas.width,canvas.height);\n\t\t\tvar data=imgdata.data;\n\t\t\tfor (var i=0,n=data.length;i < n;i+=4){\n\t\t\t\tif (data[i+3]==0)continue ;\n\t\t\t\tdata[i] *=red/255;\n\t\t\t\tdata[i+1] *=green/255;\n\t\t\t\tdata[i+2] *=blue/255;\n\t\t\t}\n\t\t\tctx.putImageData(imgdata,0,0);\n\t\t}\n\t\treturn canvas;\n\t}\n\n\tPicTool.getRGBPic=function(img){\n\t\tvar rst;\n\t\trst=[new Texture(PicTool.getCanvasPic(img,0xFF0000)),new Texture(PicTool.getCanvasPic(img,0x00FF00)),new Texture(PicTool.getCanvasPic(img,0x0000FF))];\n\t\treturn rst;\n\t}\n\n\treturn PicTool;\n})()\n\n\n/**\n*\n*@private\n*/\n//class laya.particle.emitter.Emitter2D extends laya.particle.emitter.EmitterBase\nvar Emitter2D=(function(_super){\n\tfunction Emitter2D(_template){\n\t\tthis.setting=null;\n\t\tthis._posRange=null;\n\t\tthis._canvasTemplate=null;\n\t\tthis._emitFun=null;\n\t\tEmitter2D.__super.call(this);\n\t\tthis.template=_template;\n\t}\n\n\t__class(Emitter2D,'laya.particle.emitter.Emitter2D',_super);\n\tvar __proto=Emitter2D.prototype;\n\t__proto.emit=function(){\n\t\t_super.prototype.emit.call(this);\n\t\tif(this._emitFun!=null)\n\t\t\tthis._emitFun();\n\t}\n\n\t__proto.getRandom=function(value){\n\t\treturn (Math.random()*2-1)*value;\n\t}\n\n\t__proto.webGLEmit=function(){\n\t\tvar pos=new Float32Array(3);\n\t\tpos[0]=this.getRandom(this._posRange[0]);\n\t\tpos[1]=this.getRandom(this._posRange[1]);\n\t\tpos[2]=this.getRandom(this._posRange[2]);\n\t\tvar v=new Float32Array(3);\n\t\tv[0]=0;\n\t\tv[1]=0;\n\t\tv[2]=0;\n\t\tthis._particleTemplate.addParticleArray(pos,v);\n\t}\n\n\t__proto.canvasEmit=function(){\n\t\tvar pos=new Float32Array(3);\n\t\tpos[0]=this.getRandom(this._posRange[0]);\n\t\tpos[1]=this.getRandom(this._posRange[1]);\n\t\tpos[2]=this.getRandom(this._posRange[2]);\n\t\tvar v=new Float32Array(3);\n\t\tv[0]=0;\n\t\tv[1]=0;\n\t\tv[2]=0;\n\t\tthis._particleTemplate.addParticleArray(pos,v);\n\t}\n\n\t__getset(0,__proto,'template',function(){\n\t\treturn this._particleTemplate;\n\t\t},function(template){\n\t\tthis._particleTemplate=template;\n\t\tif (!template){\n\t\t\tthis._emitFun=null;\n\t\t\tthis.setting=null;\n\t\t\tthis._posRange=null;\n\t\t};\n\t\tthis.setting=template.settings;\n\t\tthis._posRange=this.setting.positionVariance;\n\t\tif((this._particleTemplate instanceof laya.particle.ParticleTemplate2D )){\n\t\t\tthis._emitFun=this.webGLEmit;\n\t\t}else\n\t\tif((this._particleTemplate instanceof laya.particle.ParticleTemplateCanvas )){\n\t\t\tthis._canvasTemplate=template;\n\t\t\tthis._emitFun=this.canvasEmit;\n\t\t}\n\t});\n\n\treturn Emitter2D;\n})(EmitterBase)\n\n\n/**\n*@private\n*/\n//class laya.particle.ParticleTemplateWebGL extends laya.particle.ParticleTemplateBase\nvar ParticleTemplateWebGL=(function(_super){\n\tfunction ParticleTemplateWebGL(parSetting){\n\t\tthis._vertices=null;\n\t\tthis._vertexBuffer=null;\n\t\tthis._indexBuffer=null;\n\t\tthis._floatCountPerVertex=29;\n\t\t//0~3为CornerTextureCoordinate,4~6为Position,7~9Velocity,10到13为StartColor,14到17为EndColor,18到20位SizeRotation，21到22位Radius,23到26位Radian，27为DurationAddScaleShaderValue,28为Time\n\t\tthis._firstActiveElement=0;\n\t\tthis._firstNewElement=0;\n\t\tthis._firstFreeElement=0;\n\t\tthis._firstRetiredElement=0;\n\t\tthis._currentTime=0;\n\t\tthis._drawCounter=0;\n\t\tParticleTemplateWebGL.__super.call(this);\n\t\tthis.settings=parSetting;\n\t}\n\n\t__class(ParticleTemplateWebGL,'laya.particle.ParticleTemplateWebGL',_super);\n\tvar __proto=ParticleTemplateWebGL.prototype;\n\t__proto.initialize=function(){\n\t\tthis._vertices=new Float32Array(this.settings.maxPartices *this._floatCountPerVertex *4);\n\t\tvar particleOffset=0;\n\t\tfor (var i=0;i < this.settings.maxPartices;i++){\n\t\t\tvar random=Math.random();\n\t\t\tvar cornerYSegement=this.settings.textureCount ? 1.0 / this.settings.textureCount :1.0;\n\t\t\tvar cornerY=NaN;\n\t\t\tfor (cornerY=0;cornerY < this.settings.textureCount;cornerY+=cornerYSegement){\n\t\t\t\tif (random < cornerY+cornerYSegement)\n\t\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tparticleOffset=i *this._floatCountPerVertex *4;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *0+0]=-1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *0+1]=-1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *0+2]=0;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *0+3]=cornerY;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *1+0]=1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *1+1]=-1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *1+2]=1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *1+3]=cornerY;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *2+0]=1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *2+1]=1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *2+2]=1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *2+3]=cornerY+cornerYSegement;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *3+0]=-1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *3+1]=1;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *3+2]=0;\n\t\t\tthis._vertices[particleOffset+this._floatCountPerVertex *3+3]=cornerY+cornerYSegement;\n\t\t}\n\t}\n\n\t__proto.loadContent=function(){}\n\t__proto.update=function(elapsedTime){\n\t\tthis._currentTime+=elapsedTime / 1000;\n\t\tthis.retireActiveParticles();\n\t\tthis.freeRetiredParticles();\n\t\tif (this._firstActiveElement==this._firstFreeElement)\n\t\t\tthis._currentTime=0;\n\t\tif (this._firstRetiredElement==this._firstActiveElement)\n\t\t\tthis._drawCounter=0;\n\t}\n\n\t__proto.retireActiveParticles=function(){\n\t\tvar epsilon=0.0001;\n\t\tvar particleDuration=this.settings.duration;\n\t\twhile (this._firstActiveElement !=this._firstNewElement){\n\t\t\tvar offset=this._firstActiveElement *this._floatCountPerVertex *4;\n\t\t\tvar index=offset+28;\n\t\t\tvar particleAge=this._currentTime-this._vertices[index];\n\t\t\tparticleAge *=(1.0+this._vertices[offset+27]);\n\t\t\tif (particleAge+epsilon < particleDuration)\n\t\t\t\tbreak ;\n\t\t\tthis._vertices[index]=this._drawCounter;\n\t\t\tthis._firstActiveElement++;\n\t\t\tif (this._firstActiveElement >=this.settings.maxPartices)\n\t\t\t\tthis._firstActiveElement=0;\n\t\t}\n\t}\n\n\t__proto.freeRetiredParticles=function(){\n\t\twhile (this._firstRetiredElement !=this._firstActiveElement){\n\t\t\tvar age=this._drawCounter-this._vertices[this._firstRetiredElement *this._floatCountPerVertex *4+28];\n\t\t\tif (age < 3)\n\t\t\t\tbreak ;\n\t\t\tthis._firstRetiredElement++;\n\t\t\tif (this._firstRetiredElement >=this.settings.maxPartices)\n\t\t\t\tthis._firstRetiredElement=0;\n\t\t}\n\t}\n\n\t__proto.addNewParticlesToVertexBuffer=function(){}\n\t__proto.addParticleArray=function(position,velocity){\n\t\tvar nextFreeParticle=this._firstFreeElement+1;\n\t\tif (nextFreeParticle >=this.settings.maxPartices)\n\t\t\tnextFreeParticle=0;\n\t\tif (nextFreeParticle===this._firstRetiredElement)\n\t\t\treturn;\n\t\tvar particleData=ParticleData.Create(this.settings,position,velocity,this._currentTime);\n\t\tvar startIndex=this._firstFreeElement *this._floatCountPerVertex *4;\n\t\tfor (var i=0;i < 4;i++){\n\t\t\tvar j=0,offset=0;\n\t\t\tfor (j=0,offset=4;j < 3;j++)\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.position[j];\n\t\t\tfor (j=0,offset=7;j < 3;j++)\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.velocity[j];\n\t\t\tfor (j=0,offset=10;j < 4;j++)\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.startColor[j];\n\t\t\tfor (j=0,offset=14;j < 4;j++)\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.endColor[j];\n\t\t\tfor (j=0,offset=18;j < 3;j++)\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.sizeRotation[j];\n\t\t\tfor (j=0,offset=21;j < 2;j++)\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.radius[j];\n\t\t\tfor (j=0,offset=23;j < 4;j++)\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+offset+j]=particleData.radian[j];\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+27]=particleData.durationAddScale;\n\t\t\tthis._vertices[startIndex+i *this._floatCountPerVertex+28]=particleData.time;\n\t\t}\n\t\tthis._firstFreeElement=nextFreeParticle;\n\t}\n\n\treturn ParticleTemplateWebGL;\n})(ParticleTemplateBase)\n\n\n/**\n*@private\n*/\n//class laya.particle.ParticleTemplateCanvas extends laya.particle.ParticleTemplateBase\nvar ParticleTemplateCanvas=(function(_super){\n\tfunction ParticleTemplateCanvas(particleSetting){\n\t\t/**\n\t\t*是否处于可播放状态\n\t\t*/\n\t\tthis._ready=false;\n\t\t/**\n\t\t*贴图列表\n\t\t*/\n\t\tthis.textureList=[];\n\t\t/**\n\t\t*粒子列表\n\t\t*/\n\t\tthis.particleList=[];\n\t\t/**\n\t\t*贴图中心偏移x\n\t\t*/\n\t\tthis.pX=0;\n\t\t/**\n\t\t*贴图中心偏移y\n\t\t*/\n\t\tthis.pY=0;\n\t\t/**\n\t\t*当前活跃的粒子\n\t\t*/\n\t\tthis.activeParticles=[];\n\t\t/**\n\t\t*粒子pool\n\t\t*/\n\t\tthis.deadParticles=[];\n\t\t/**\n\t\t*粒子播放进度列表\n\t\t*/\n\t\tthis.iList=[];\n\t\t/**\n\t\t*粒子系统使用的最大粒子数\n\t\t*/\n\t\tthis._maxNumParticles=0;\n\t\t/**\n\t\t*纹理的宽度\n\t\t*/\n\t\tthis.textureWidth=NaN;\n\t\t/**\n\t\t*宽度倒数\n\t\t*/\n\t\tthis.dTextureWidth=NaN;\n\t\t/**\n\t\t*是否支持颜色变化\n\t\t*/\n\t\tthis.colorChange=true;\n\t\t/**\n\t\t*采样步长\n\t\t*/\n\t\tthis.step=1/60;\n\t\tthis.canvasShader=new CanvasShader();\n\t\tParticleTemplateCanvas.__super.call(this);\n\t\tthis.settings=particleSetting;\n\t\tthis._maxNumParticles=particleSetting.maxPartices;\n\t\tthis.texture=new Texture();\n\t\tthis.texture.on(/*laya.events.Event.LOADED*/\"loaded\",this,this._textureLoaded);\n\t\tthis.texture.load(particleSetting.textureName);\n\t}\n\n\t__class(ParticleTemplateCanvas,'laya.particle.ParticleTemplateCanvas',_super);\n\tvar __proto=ParticleTemplateCanvas.prototype;\n\t__proto._textureLoaded=function(e){\n\t\tthis.setTexture(this.texture);\n\t\tthis._ready=true;\n\t}\n\n\t__proto.clear=function(clearTexture){\n\t\t(clearTexture===void 0)&& (clearTexture=true);\n\t\tthis.deadParticles.length=0;\n\t\tthis.activeParticles.length=0;\n\t\tthis.textureList.length=0;\n\t}\n\n\t/**\n\t*设置纹理\n\t*@param texture\n\t*\n\t*/\n\t__proto.setTexture=function(texture){\n\t\tthis.texture=texture;\n\t\tthis.textureWidth=texture.width;\n\t\tthis.dTextureWidth=1/this.textureWidth;\n\t\tthis.pX=-texture.width*0.5;\n\t\tthis.pY=-texture.height*0.5;\n\t\tthis.textureList=ParticleTemplateCanvas.changeTexture(texture,this.textureList);\n\t\tthis.particleList.length=0;\n\t\tthis.deadParticles.length=0;\n\t\tthis.activeParticles.length=0;\n\t}\n\n\t/**\n\t*创建一个粒子数据\n\t*@return\n\t*\n\t*/\n\t__proto._createAParticleData=function(position,velocity){\n\t\tthis.canvasShader.u_EndVelocity=this.settings.endVelocity;\n\t\tthis.canvasShader.u_Gravity=this.settings.gravity;\n\t\tthis.canvasShader.u_Duration=this.settings.duration;\n\t\tvar particle;\n\t\tparticle=ParticleData.Create(this.settings,position,velocity,0);\n\t\tthis.canvasShader.a_Position=particle.position;\n\t\tthis.canvasShader.a_Velocity=particle.velocity;\n\t\tthis.canvasShader.a_StartColor=particle.startColor;\n\t\tthis.canvasShader.a_EndColor=particle.endColor;\n\t\tthis.canvasShader.a_SizeRotation=particle.sizeRotation;\n\t\tthis.canvasShader.a_Radius=particle.radius;\n\t\tthis.canvasShader.a_Radian=particle.radian;\n\t\tthis.canvasShader.a_AgeAddScale=particle.durationAddScale;\n\t\tthis.canvasShader.oSize=this.textureWidth;\n\t\tvar rst=new CMDParticle();\n\t\tvar i=0,len=this.settings.duration/(1+particle.durationAddScale);\n\t\tvar params=[];\n\t\tvar mStep=NaN;\n\t\tfor(i=0;i<len;i+=this.step){\n\t\t\tparams.push(this.canvasShader.getData(i));\n\t\t}\n\t\trst.id=this.particleList.length;\n\t\tthis.particleList.push(rst);\n\t\trst.setCmds(params);\n\t\treturn rst;\n\t}\n\n\t__proto.addParticleArray=function(position,velocity){\n\t\tif(!this._ready)return;\n\t\tvar tParticle;\n\t\tif(this.particleList.length<this._maxNumParticles){\n\t\t\ttParticle=this._createAParticleData(position,velocity);\n\t\t\tthis.iList[tParticle.id]=0;\n\t\t\tthis.activeParticles.push(tParticle);\n\t\t\t}else{\n\t\t\tif(this.deadParticles.length>0){\n\t\t\t\ttParticle=this.deadParticles.pop();\n\t\t\t\tthis.iList[tParticle.id]=0;\n\t\t\t\tthis.activeParticles.push(tParticle);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.advanceTime=function(passedTime){\n\t\t(passedTime===void 0)&& (passedTime=1);\n\t\tif(!this._ready)return;\n\t\tvar particleList=this.activeParticles;\n\t\tvar pool=this.deadParticles;\n\t\tvar i=0,len=particleList.length;\n\t\tvar tcmd;\n\t\tvar tI=0;\n\t\tvar iList=this.iList;\n\t\tfor(i=len-1;i>-1;i--){\n\t\t\ttcmd=particleList[i];\n\t\t\ttI=iList[tcmd.id];\n\t\t\tif(tI>=tcmd.maxIndex){\n\t\t\t\ttI=0;\n\t\t\t\tparticleList.splice(i,1);\n\t\t\t\tpool.push(tcmd);\n\t\t\t\t}else{\n\t\t\t\ttI+=1;\n\t\t\t}\n\t\t\tiList[tcmd.id]=tI;\n\t\t}\n\t}\n\n\t__proto.render=function(context,x,y){\n\t\tif(!this._ready)return;\n\t\tif(this.activeParticles.length<1)return;\n\t\tif (this.textureList.length < 2)return;\n\t\tif (this.settings.disableColor){\n\t\t\tthis.noColorRender(context,x,y);\n\t\t\t}else{\n\t\t\tthis.canvasRender(context,x,y);\n\t\t}\n\t}\n\n\t__proto.noColorRender=function(context,x,y){\n\t\tvar particleList=this.activeParticles;\n\t\tvar i=0,len=particleList.length;\n\t\tvar tcmd;\n\t\tvar tParam;\n\t\tvar tAlpha=NaN;\n\t\tvar px=this.pX,py=this.pY;\n\t\tvar pw=-px*2,ph=-py*2;\n\t\tvar tI=0;\n\t\tvar textureList=this.textureList;\n\t\tvar iList=this.iList;\n\t\tvar preAlpha=NaN;\n\t\tcontext.translate(x,y);\n\t\tpreAlpha=context.ctx.globalAlpha;\n\t\tfor(i=0;i<len;i++){\n\t\t\ttcmd=particleList[i];\n\t\t\ttI=iList[tcmd.id];\n\t\t\ttParam=tcmd.cmds[tI];\n\t\t\tif (!tParam)continue ;\n\t\t\tif ((tAlpha=tParam[1])<=0.01)continue ;\n\t\t\tcontext.setAlpha(preAlpha*tAlpha);\n\t\t\tcontext.drawTextureWithTransform(this.texture,px,py,pw,ph,tParam[2],1);\n\t\t}\n\t\tcontext.setAlpha(preAlpha);\n\t\tcontext.translate(-x,-y);\n\t}\n\n\t__proto.canvasRender=function(context,x,y){\n\t\tvar particleList=this.activeParticles;\n\t\tvar i=0,len=particleList.length;\n\t\tvar tcmd;\n\t\tvar tParam;\n\t\tvar tAlpha=NaN;\n\t\tvar px=this.pX,py=this.pY;\n\t\tvar pw=-px*2,ph=-py*2;\n\t\tvar tI=0;\n\t\tvar textureList=this.textureList;\n\t\tvar iList=this.iList;\n\t\tvar preAlpha=NaN;\n\t\tvar preB;\n\t\tcontext.translate(x,y);\n\t\tpreAlpha=context.ctx.globalAlpha;\n\t\tpreB=context.ctx.globalCompositeOperation;\n\t\tcontext.blendMode(\"lighter\");\n\t\tfor(i=0;i<len;i++){\n\t\t\ttcmd=particleList[i];\n\t\t\ttI=iList[tcmd.id];\n\t\t\ttParam=tcmd.cmds[tI];\n\t\t\tif (!tParam)continue ;\n\t\t\tif ((tAlpha=tParam[1])<=0.01)continue ;\n\t\t\tcontext.save();\n\t\t\tcontext.transformByMatrix(tParam[2]);\n\t\t\tif(tParam[3]>0.01){\n\t\t\t\tcontext.setAlpha(preAlpha*tParam[3]);\n\t\t\t\tcontext.drawTexture(textureList[0],px,py,pw,ph);\n\t\t\t}\n\t\t\tif(tParam[4]>0.01){\n\t\t\t\tcontext.setAlpha(preAlpha*tParam[4]);\n\t\t\t\tcontext.drawTexture(textureList[1],px,py,pw,ph);\n\t\t\t}\n\t\t\tif(tParam[5]>0.01){\n\t\t\t\tcontext.setAlpha(preAlpha*tParam[5]);\n\t\t\t\tcontext.drawTexture(textureList[2],px,py,pw,ph);\n\t\t\t}\n\t\t\tcontext.restore();\n\t\t}\n\t\tcontext.setAlpha(preAlpha);\n\t\tcontext.translate(-x,-y);\n\t\tcontext.blendMode(preB);\n\t}\n\n\tParticleTemplateCanvas.changeTexture=function(texture,rst,settings){\n\t\tif(!rst)rst=[];\n\t\trst.length=0;\n\t\tif (settings&&settings.disableColor){\n\t\t\trst.push(texture,texture,texture);\n\t\t\t}else{\n\t\t\tUtils.copyArray(rst,PicTool.getRGBPic(texture));\n\t\t}\n\t\treturn rst;\n\t}\n\n\treturn ParticleTemplateCanvas;\n})(ParticleTemplateBase)\n\n\n/**\n*@private\n*/\n//class laya.particle.ParticleTemplate2D extends laya.particle.ParticleTemplateWebGL\nvar ParticleTemplate2D=(function(_super){\n\tfunction ParticleTemplate2D(parSetting){\n\t\tthis._vertexBuffer2D=null;\n\t\tthis._indexBuffer2D=null;\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tthis._blendFn=null;\n\t\tthis._startTime=0;\n\t\tthis.sv=new ParticleShaderValue();\n\t\tParticleTemplate2D.__super.call(this,parSetting);\n\t\tvar _this=this;\n\t\tLaya.loader.load(this.settings.textureName,Handler.create(null,function(texture){\n\t\t\t(texture.bitmap).enableMerageInAtlas=false;\n\t\t\t_this.texture=texture;\n\t\t}));\n\t\tthis.sv.u_Duration=this.settings.duration;\n\t\tthis.sv.u_Gravity=this.settings.gravity;\n\t\tthis.sv.u_EndVelocity=this.settings.endVelocity;\n\t\tthis._blendFn=BlendMode.fns[parSetting.blendState];\n\t\tthis.initialize();\n\t\tthis._vertexBuffer=this._vertexBuffer2D=VertexBuffer2D.create(-1,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\tthis._indexBuffer=this._indexBuffer2D=IndexBuffer2D.create(/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\tthis.loadContent();\n\t}\n\n\t__class(ParticleTemplate2D,'laya.particle.ParticleTemplate2D',_super);\n\tvar __proto=ParticleTemplate2D.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.submit.ISubmit\":true})\n\t__proto.getRenderType=function(){return-111}\n\t__proto.releaseRender=function(){}\n\t__proto.addParticleArray=function(position,velocity){\n\t\tposition[0]+=this.x;\n\t\tposition[1]+=this.y;\n\t\t_super.prototype.addParticleArray.call(this,position,velocity);\n\t}\n\n\t__proto.loadContent=function(){\n\t\tvar indexes=new Uint16Array(this.settings.maxPartices *6);\n\t\tfor (var i=0;i < this.settings.maxPartices;i++){\n\t\t\tindexes[i *6+0]=(i *4+0);\n\t\t\tindexes[i *6+1]=(i *4+1);\n\t\t\tindexes[i *6+2]=(i *4+2);\n\t\t\tindexes[i *6+3]=(i *4+0);\n\t\t\tindexes[i *6+4]=(i *4+2);\n\t\t\tindexes[i *6+5]=(i *4+3);\n\t\t}\n\t\tthis._indexBuffer2D.clear();\n\t\tthis._indexBuffer2D.append(indexes);\n\t\tthis._indexBuffer2D.upload();\n\t}\n\n\t__proto.addNewParticlesToVertexBuffer=function(){\n\t\tthis._vertexBuffer2D.clear();\n\t\tthis._vertexBuffer2D.append(this._vertices);\n\t\tvar start=0;\n\t\tif (this._firstNewElement < this._firstFreeElement){\n\t\t\tstart=this._firstNewElement *4 *this._floatCountPerVertex *4;\n\t\t\tthis._vertexBuffer2D.subUpload(start,start,start+(this._firstFreeElement-this._firstNewElement)*4 *this._floatCountPerVertex *4);\n\t\t\t}else {\n\t\t\tstart=this._firstNewElement *4 *this._floatCountPerVertex *4;\n\t\t\tthis._vertexBuffer2D.subUpload(start,start,start+(this.settings.maxPartices-this._firstNewElement)*4 *this._floatCountPerVertex *4);\n\t\t\tif (this._firstFreeElement > 0){\n\t\t\t\tthis._vertexBuffer2D.setNeedUpload();\n\t\t\t\tthis._vertexBuffer2D.subUpload(0,0,this._firstFreeElement *4 *this._floatCountPerVertex *4);\n\t\t\t}\n\t\t}\n\t\tthis._firstNewElement=this._firstFreeElement;\n\t}\n\n\t__proto.renderSubmit=function(){\n\t\tif (this.texture&&this.texture.loaded){\n\t\t\tthis.update(Laya.timer.delta);\n\t\t\tthis.sv.u_CurrentTime=this._currentTime;\n\t\t\tif (this._firstNewElement !=this._firstFreeElement){\n\t\t\t\tthis.addNewParticlesToVertexBuffer();\n\t\t\t}\n\t\t\tthis.blend();\n\t\t\tif (this._firstActiveElement !=this._firstFreeElement){\n\t\t\t\tvar gl=WebGL.mainContext;\n\t\t\t\tthis._vertexBuffer2D.bind(this._indexBuffer2D);\n\t\t\t\tthis.sv.u_texture=this.texture.source;\n\t\t\t\tthis.sv.upload();\n\t\t\t\tif (this._firstActiveElement < this._firstFreeElement){\n\t\t\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,(this._firstFreeElement-this._firstActiveElement)*6,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._firstActiveElement *6 *2);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,(this.settings.maxPartices-this._firstActiveElement)*6,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._firstActiveElement *6 *2);\n\t\t\t\t\tif (this._firstFreeElement > 0)\n\t\t\t\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._firstFreeElement *6,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,0);\n\t\t\t\t}\n\t\t\t\tStat.drawCall++;\n\t\t\t}\n\t\t\tthis._drawCounter++;\n\t\t}\n\t\treturn 1;\n\t}\n\n\t__proto.blend=function(){\n\t\tif (BlendMode.activeBlendFunction!==this._blendFn){\n\t\t\tvar gl=WebGL.mainContext;\n\t\t\tgl.enable(/*laya.webgl.WebGLContext.BLEND*/0x0BE2);\n\t\t\tthis._blendFn(gl);\n\t\t\tBlendMode.activeBlendFunction=this._blendFn;\n\t\t}\n\t}\n\n\t__proto.dispose=function(){\n\t\tthis._vertexBuffer2D.dispose();\n\t\tthis._indexBuffer2D.dispose();\n\t}\n\n\tParticleTemplate2D.activeBlendType=-1;\n\treturn ParticleTemplate2D;\n})(ParticleTemplateWebGL)\n\n\n/**\n*@private\n*/\n//class laya.particle.shader.value.ParticleShaderValue extends laya.webgl.shader.d2.value.Value2D\nvar ParticleShaderValue=(function(_super){\n\tfunction ParticleShaderValue(){\n\t\tthis.a_CornerTextureCoordinate=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,0];\n\t\tthis.a_Position=[3,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,16];\n\t\tthis.a_Velocity=[3,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,28];\n\t\tthis.a_StartColor=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,40];\n\t\tthis.a_EndColor=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,56];\n\t\tthis.a_SizeRotation=[3,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,72];\n\t\tthis.a_Radius=[2,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,84];\n\t\tthis.a_Radian=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,92];\n\t\tthis.a_AgeAddScale=[1,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,108];\n\t\tthis.a_Time=[1,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,116,112];\n\t\tthis.u_CurrentTime=NaN;\n\t\tthis.u_Duration=NaN;\n\t\tthis.u_Gravity=null;\n\t\t//v3\n\t\tthis.u_EndVelocity=NaN;\n\t\tthis.u_texture=null;\n\t\tParticleShaderValue.__super.call(this,0,0);\n\t}\n\n\t__class(ParticleShaderValue,'laya.particle.shader.value.ParticleShaderValue',_super);\n\tvar __proto=ParticleShaderValue.prototype;\n\t__proto.upload=function(){\n\t\tthis.refresh();\n\t\tParticleShaderValue.pShader.upload(this);\n\t}\n\n\t__static(ParticleShaderValue,\n\t['pShader',function(){return this.pShader=new ParticleShader();}\n\t]);\n\treturn ParticleShaderValue;\n})(Value2D)\n\n\n/**\n*<code>Particle2D</code> 类是2D粒子播放类\n*\n*/\n//class laya.particle.Particle2D extends laya.display.Sprite\nvar Particle2D=(function(_super){\n\tfunction Particle2D(setting){\n\t\t/**@private */\n\t\tthis._matrix4=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];\n\t\t/**@private */\n\t\tthis._particleTemplate=null;\n\t\t/**@private */\n\t\tthis._canvasTemplate=null;\n\t\t/**@private */\n\t\tthis._emitter=null;\n\t\t/**是否自动播放*/\n\t\tthis.autoPlay=true;\n\t\tParticle2D.__super.call(this);\n\t\tif (setting)this.setParticleSetting(setting);\n\t}\n\n\t__class(Particle2D,'laya.particle.Particle2D',_super);\n\tvar __proto=Particle2D.prototype;\n\t/**\n\t*加载粒子文件\n\t*@param url 粒子文件地址\n\t*/\n\t__proto.load=function(url){\n\t\tLaya.loader.load(url,Handler.create(this,this.setParticleSetting),null,/*laya.net.Loader.JSON*/\"json\");\n\t}\n\n\t/**\n\t*设置粒子配置数据\n\t*@param settings 粒子配置数据\n\t*/\n\t__proto.setParticleSetting=function(setting){\n\t\tvar _$this=this;\n\t\tif (!setting)return this.stop();\n\t\tParticleSetting.checkSetting(setting);\n\t\tif(/*__JS__ */!window.ConchParticleTemplate2D||Render.isWebGL)this.customRenderEnable=true;\n\t\tif (Render.isWebGL){\n\t\t\tthis._particleTemplate=new ParticleTemplate2D(setting);\n\t\t\tthis.graphics._saveToCmd(Render.context._drawParticle,[this._particleTemplate]);\n\t\t}\n\t\telse if (Render.isConchApp&&/*__JS__ */window.ConchParticleTemplate2D){\n\t\t\tthis._particleTemplate=/*__JS__ */new ConchParticleTemplate2D();\n\t\t\tvar _this=this;\n\t\t\tLaya.loader.load(setting.textureName,Handler.create(null,function(texture){\n\t\t\t\t/*__JS__ */_this._particleTemplate.texture=texture;\n\t\t\t\t_this._particleTemplate.settings=setting;\n\t\t\t\tif (Render.isConchNode){\n\t\t\t\t\t/*__JS__ */_this.graphics.drawParticle(_this._particleTemplate);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t_this.graphics._saveToCmd(Render.context._drawParticle,[_$this._particleTemplate]);\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis._emitter={start:function (){}};\n\t\t\t/*__JS__ */this.play=this._particleTemplate.play.bind(this._particleTemplate);\n\t\t\t/*__JS__ */this.stop=this._particleTemplate.stop.bind(this._particleTemplate);\n\t\t\tif (this.autoPlay)this.play();\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tthis._particleTemplate=this._canvasTemplate=new ParticleTemplateCanvas(setting);\n\t\t}\n\t\tif (!this._emitter){\n\t\t\tthis._emitter=new Emitter2D(this._particleTemplate);\n\t\t\t}else {\n\t\t\t(this._emitter).template=this._particleTemplate;\n\t\t}\n\t\tif (this.autoPlay){\n\t\t\tthis.emitter.start();\n\t\t\tthis.play();\n\t\t}\n\t}\n\n\t/**\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.timer.frameLoop(1,this,this._loop);\n\t}\n\n\t/**\n\t*停止\n\t*/\n\t__proto.stop=function(){\n\t\tthis.timer.clear(this,this._loop);\n\t}\n\n\t/**@private */\n\t__proto._loop=function(){\n\t\tthis.advanceTime(1 / 60);\n\t}\n\n\t/**\n\t*时钟前进\n\t*@param passedTime 时钟前进时间\n\t*/\n\t__proto.advanceTime=function(passedTime){\n\t\t(passedTime===void 0)&& (passedTime=1);\n\t\tif (this._canvasTemplate){\n\t\t\tthis._canvasTemplate.advanceTime(passedTime);\n\t\t}\n\t\tif (this._emitter){\n\t\t\tthis._emitter.advanceTime(passedTime);\n\t\t}\n\t}\n\n\t__proto.customRender=function(context,x,y){\n\t\tif (Render.isWebGL){\n\t\t\tthis._matrix4[0]=context.ctx._curMat.a;\n\t\t\tthis._matrix4[1]=context.ctx._curMat.b;\n\t\t\tthis._matrix4[4]=context.ctx._curMat.c;\n\t\t\tthis._matrix4[5]=context.ctx._curMat.d;\n\t\t\tthis._matrix4[12]=context.ctx._curMat.tx;\n\t\t\tthis._matrix4[13]=context.ctx._curMat.ty;\n\t\t\tvar sv=(this._particleTemplate).sv;\n\t\t\tsv.u_mmat=this._matrix4;\n\t\t}\n\t\tif (this._canvasTemplate){\n\t\t\tthis._canvasTemplate.render(context,x,y);\n\t\t}\n\t}\n\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif ((this._particleTemplate instanceof laya.particle.ParticleTemplate2D ))\n\t\t\t(this._particleTemplate).dispose();\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t}\n\n\t/**\n\t*设置 粒子文件地址\n\t*@param path 粒子文件地址\n\t*/\n\t__getset(0,__proto,'url',null,function(url){\n\t\tthis.load(url);\n\t});\n\n\t/**\n\t*获取粒子发射器\n\t*/\n\t__getset(0,__proto,'emitter',function(){\n\t\treturn this._emitter;\n\t});\n\n\treturn Particle2D;\n})(Sprite)\n\n\n/**\n*@private\n*/\n//class laya.particle.shader.ParticleShader extends laya.webgl.shader.Shader\nvar ParticleShader=(function(_super){\n\tfunction ParticleShader(){\n\t\tParticleShader.__super.call(this,ParticleShader.vs,ParticleShader.ps,\"ParticleShader\");\n\t}\n\n\t__class(ParticleShader,'laya.particle.shader.ParticleShader',_super);\n\t__static(ParticleShader,\n\t['vs',function(){return this.vs=\"attribute vec4 a_CornerTextureCoordinate;\\nattribute vec3 a_Position;\\nattribute vec3 a_Velocity;\\nattribute vec4 a_StartColor;\\nattribute vec4 a_EndColor;\\nattribute vec3 a_SizeRotation;\\nattribute vec2 a_Radius;\\nattribute vec4 a_Radian;\\nattribute float a_AgeAddScale;\\nattribute float a_Time;\\n\\nvarying vec4 v_Color;\\nvarying vec2 v_TextureCoordinate;\\n\\nuniform float u_CurrentTime;\\nuniform float u_Duration;\\nuniform float u_EndVelocity;\\nuniform vec3 u_Gravity;\\n\\n#ifdef PARTICLE3D\\n uniform mat4 u_WorldMat;\\n uniform mat4 u_View;\\n uniform mat4 u_Projection;\\n uniform vec2 u_ViewportScale;\\n#else\\n uniform vec2 size;\\n uniform mat4 mmat;\\n uniform mat4 u_mmat;\\n#endif\\n\\nvec4 ComputeParticlePosition(in vec3 position, in vec3 velocity,in float age,in float normalizedAge)\\n{\\n\\n   float startVelocity = length(velocity);//起始标量速度\\n   float endVelocity = startVelocity * u_EndVelocity;//结束标量速度\\n\\n   float velocityIntegral = startVelocity * normalizedAge +(endVelocity - startVelocity) * normalizedAge *normalizedAge/2.0;//计算当前速度的标量（单位空间），vt=v0*t+(1/2)*a*(t^2)\\n   \\n   vec3 addPosition = normalize(velocity) * velocityIntegral * u_Duration;//计算受自身速度影响的位置，转换标量到矢量    \\n   addPosition += u_Gravity * age * normalizedAge;//计算受重力影响的位置\\n   \\n   float radius=mix(a_Radius.x, a_Radius.y, normalizedAge); //计算粒子受半径和角度影响（无需计算角度和半径时，可用宏定义优化屏蔽此计算）\\n   float radianHorizontal =mix(a_Radian.x,a_Radian.z,normalizedAge);\\n   float radianVertical =mix(a_Radian.y,a_Radian.w,normalizedAge);\\n   \\n   float r =cos(radianVertical)* radius;\\n   addPosition.y += sin(radianVertical) * radius;\\n\t\\n   addPosition.x += cos(radianHorizontal) *r;\\n   addPosition.z += sin(radianHorizontal) *r;\\n  \\n   #ifdef PARTICLE3D\\n   position+=addPosition;\\n    return  u_Projection*u_View*u_WorldMat*(vec4(position, 1.0));\\n   #else\\n   addPosition.y=-addPosition.y;//2D粒子位置更新需要取负，2D粒子坐标系Y轴正向朝上\\n   position+=addPosition;\\n    return  vec4(position,1.0);\\n   #endif\\n}\\n\\nfloat ComputeParticleSize(in float startSize,in float endSize, in float normalizedAge)\\n{    \\n    float size = mix(startSize, endSize, normalizedAge);\\n    \\n\t#ifdef PARTICLE3D\\n    //Project the size into screen coordinates.\\n     return size * u_Projection[1][1];\\n\t#else\\n\t return size;\\n\t#endif\\n}\\n\\nmat2 ComputeParticleRotation(in float rot,in float age)\\n{    \\n    float rotation =rot * age;\\n    //计算2x2旋转矩阵.\\n    float c = cos(rotation);\\n    float s = sin(rotation);\\n    return mat2(c, -s, s, c);\\n}\\n\\nvec4 ComputeParticleColor(in vec4 startColor,in vec4 endColor,in float normalizedAge)\\n{\\n\tvec4 color=mix(startColor,endColor,normalizedAge);\\n    //硬编码设置，使粒子淡入很快，淡出很慢,6.7的缩放因子把置归一在0到1之间，可以谷歌x*(1-x)*(1-x)*6.7的制图表\\n    color.a *= normalizedAge * (1.0-normalizedAge) * (1.0-normalizedAge) * 6.7;\\n   \\n    return color;\\n}\\n\\nvoid main()\\n{\\n   float age = u_CurrentTime - a_Time;\\n   age *= 1.0 + a_AgeAddScale;\\n   float normalizedAge = clamp(age / u_Duration,0.0,1.0);\\n   gl_Position = ComputeParticlePosition(a_Position, a_Velocity, age, normalizedAge);//计算粒子位置\\n   float pSize = ComputeParticleSize(a_SizeRotation.x,a_SizeRotation.y, normalizedAge);\\n   mat2 rotation = ComputeParticleRotation(a_SizeRotation.z, age);\\n\t\\n   #ifdef PARTICLE3D\\n\tgl_Position.xy += (rotation*a_CornerTextureCoordinate.xy) * pSize * u_ViewportScale;\\n   #else\\n    mat4 mat=u_mmat*mmat;\\n    gl_Position=vec4((mat*gl_Position).xy,0.0,1.0);\\n\tgl_Position.xy += (rotation*a_CornerTextureCoordinate.xy) * pSize*vec2(mat[0][0],mat[1][1]);\\n    gl_Position=vec4((gl_Position.x/size.x-0.5)*2.0,(0.5-gl_Position.y/size.y)*2.0,0.0,1.0);\\n   #endif\\n   \\n   v_Color = ComputeParticleColor(a_StartColor,a_EndColor, normalizedAge);\\n   v_TextureCoordinate =a_CornerTextureCoordinate.zw;\\n}\\n\\n\";},'ps',function(){return this.ps=\"#ifdef FSHIGHPRECISION\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n\\nvarying vec4 v_Color;\\nvarying vec2 v_TextureCoordinate;\\nuniform sampler2D u_texture;\\n\\nvoid main()\\n{\t\\n\tgl_FragColor=texture2D(u_texture,v_TextureCoordinate)*v_Color;\\n\tgl_FragColor.xyz *= v_Color.w;\\n}\";}\n\t]);\n\treturn ParticleShader;\n})(Shader)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.pathfinding.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.core.DiagonalMovement\nvar DiagonalMovement=(function(){\n\tfunction DiagonalMovement(){}\n\t__class(DiagonalMovement,'PathFinding.core.DiagonalMovement');\n\tDiagonalMovement.Always=1;\n\tDiagonalMovement.Never=2;\n\tDiagonalMovement.IfAtMostOneObstacle=3;\n\tDiagonalMovement.OnlyWhenNoObstacles=4;\n\treturn DiagonalMovement;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.core.Grid\nvar Grid=(function(){\n\tfunction Grid(width_or_matrix,height,matrix){\n\t\tthis.width=0;\n\t\tthis.height=0;\n\t\tthis.nodes=null;\n\t\tvar width=0;\n\t\tif ((typeof width_or_matrix=='number')){\n\t\t\twidth=width_or_matrix;\n\t\t}\n\t\telse{\n\t\t\theight=width_or_matrix.length;\n\t\t\twidth=width_or_matrix[0].length;\n\t\t\tmatrix=width_or_matrix;\n\t\t}\n\t\tthis.width=width;\n\t\tthis.height=height;\n\t\tthis.nodes=this._buildNodes(width,height,matrix);\n\t}\n\n\t__class(Grid,'PathFinding.core.Grid');\n\tvar __proto=Grid.prototype;\n\t/**\n\t*Build and return the nodes.\n\t*@private\n\t*@param {number}width\n\t*@param {number}height\n\t*@param {Array<Array<number|boolean>>}[matrix]-A 0-1 matrix representing\n\t*the walkable status of the nodes.\n\t*@see Grid\n\t*/\n\t__proto._buildNodes=function(width,height,matrix){\n\t\tvar i=0,j=0,nodes=[];\n\t\tfor (i=0;i < height;++i){\n\t\t\tnodes[i]=[];\n\t\t\tfor (j=0;j < width;++j){\n\t\t\t\tnodes[i][j]=new Node$1(j,i);\n\t\t\t}\n\t\t}\n\t\tif (matrix==null){\n\t\t\treturn nodes;\n\t\t}\n\t\tif (matrix.length !=height || matrix[0].length !=width){\n\t\t\tthrow new Error('Matrix size does not fit');\n\t\t}\n\t\tfor (i=0;i < height;++i){\n\t\t\tfor (j=0;j < width;++j){\n\t\t\t\tif (matrix[i][j]){\n\t\t\t\t\tnodes[i][j].walkable=false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nodes;\n\t}\n\n\t__proto.getNodeAt=function(x,y){\n\t\treturn this.nodes[y][x];\n\t}\n\n\t/**\n\t*Determine whether the node at the given position is walkable.\n\t*(Also returns false if the position is outside the grid.)\n\t*@param {number}x-The x coordinate of the node.\n\t*@param {number}y-The y coordinate of the node.\n\t*@return {boolean}-The walkability of the node.\n\t*/\n\t__proto.isWalkableAt=function(x,y){\n\t\treturn this.isInside(x,y)&& this.nodes[y][x].walkable;\n\t}\n\n\t/**\n\t*Determine whether the position is inside the grid.\n\t*XXX:`grid.isInside(x,y)` is wierd to read.\n\t*It should be `(x,y)is inside grid`,but I failed to find a better\n\t*name for this method.\n\t*@param {number}x\n\t*@param {number}y\n\t*@return {boolean}\n\t*/\n\t__proto.isInside=function(x,y){\n\t\treturn (x >=0 && x < this.width)&& (y >=0 && y < this.height);\n\t}\n\n\t/**\n\t*Set whether the node on the given position is walkable.\n\t*NOTE:throws exception if the coordinate is not inside the grid.\n\t*@param {number}x-The x coordinate of the node.\n\t*@param {number}y-The y coordinate of the node.\n\t*@param {boolean}walkable-Whether the position is walkable.\n\t*/\n\t__proto.setWalkableAt=function(x,y,walkable){\n\t\tthis.nodes[y][x].walkable=walkable;\n\t}\n\n\t/**\n\t*Get the neighbors of the given node.\n\t*\n\t*offsets diagonalOffsets:\n\t*+---+---+---++---+---+---+\n\t*| | 0 | | | 0 | | 1 |\n\t*+---+---+---++---+---+---+\n\t*| 3 | | 1 | | | | |\n\t*+---+---+---++---+---+---+\n\t*| | 2 | | | 3 | | 2 |\n\t*+---+---+---++---+---+---+\n\t*\n\t*When allowDiagonal is true,if offsets[i] is valid,then\n\t*diagonalOffsets[i] and\n\t*diagonalOffsets[(i+1)% 4] is valid.\n\t*@param {Node}node\n\t*@param {diagonalMovement}diagonalMovement\n\t*/\n\t__proto.getNeighbors=function(node,diagonalMovement){\n\t\tvar x=node.x,y=node.y,neighbors=[],s0=false,d0=false,s1=false,d1=false,s2=false,d2=false,s3=false,d3=false,nodes=this.nodes;\n\t\tif (this.isWalkableAt(x,y-1)){\n\t\t\tneighbors.push(nodes[y-1][x]);\n\t\t\ts0=true;\n\t\t}\n\t\tif (this.isWalkableAt(x+1,y)){\n\t\t\tneighbors.push(nodes[y][x+1]);\n\t\t\ts1=true;\n\t\t}\n\t\tif (this.isWalkableAt(x,y+1)){\n\t\t\tneighbors.push(nodes[y+1][x]);\n\t\t\ts2=true;\n\t\t}\n\t\tif (this.isWalkableAt(x-1,y)){\n\t\t\tneighbors.push(nodes[y][x-1]);\n\t\t\ts3=true;\n\t\t}\n\t\tif (diagonalMovement==DiagonalMovement.Never){\n\t\t\treturn neighbors;\n\t\t}\n\t\tif (diagonalMovement==DiagonalMovement.OnlyWhenNoObstacles){\n\t\t\td0=s3 && s0;\n\t\t\td1=s0 && s1;\n\t\t\td2=s1 && s2;\n\t\t\td3=s2 && s3;\n\t\t}\n\t\telse if (diagonalMovement==DiagonalMovement.IfAtMostOneObstacle){\n\t\t\td0=s3 || s0;\n\t\t\td1=s0 || s1;\n\t\t\td2=s1 || s2;\n\t\t\td3=s2 || s3;\n\t\t}\n\t\telse if (diagonalMovement==DiagonalMovement.Always){\n\t\t\td0=true;\n\t\t\td1=true;\n\t\t\td2=true;\n\t\t\td3=true;\n\t\t}\n\t\telse{\n\t\t\tthrow new Error('Incorrect value of diagonalMovement');\n\t\t}\n\t\tif (d0 && this.isWalkableAt(x-1,y-1)){\n\t\t\tneighbors.push(nodes[y-1][x-1]);\n\t\t}\n\t\tif (d1 && this.isWalkableAt(x+1,y-1)){\n\t\t\tneighbors.push(nodes[y-1][x+1]);\n\t\t}\n\t\tif (d2 && this.isWalkableAt(x+1,y+1)){\n\t\t\tneighbors.push(nodes[y+1][x+1]);\n\t\t}\n\t\tif (d3 && this.isWalkableAt(x-1,y+1)){\n\t\t\tneighbors.push(nodes[y+1][x-1]);\n\t\t}\n\t\treturn neighbors;\n\t}\n\n\t/**\n\t*Get a clone of this grid.\n\t*@return {Grid}Cloned grid.\n\t*/\n\t__proto.clone=function(){\n\t\tvar i=0,j=0,\n\t\twidth=this.width,height=this.height,thisNodes=this.nodes,\n\t\tnewGrid=new Grid(width,height),newNodes=[];\n\t\tfor (i=0;i < height;++i){\n\t\t\tnewNodes[i]=[];\n\t\t\tfor (j=0;j < width;++j){\n\t\t\t\tnewNodes[i][j]=new Node$1(j,i,thisNodes[i][j].walkable);\n\t\t\t}\n\t\t}\n\t\tnewGrid.nodes=newNodes;\n\t\treturn newGrid;\n\t}\n\n\t__proto.reset=function(){\n\t\tvar _node;\n\t\tfor (var i=0;i < this.height;++i){\n\t\t\tfor (var j=0;j < this.width;++j){\n\t\t\t\t_node=this.nodes[i][j];\n\t\t\t\t_node.g=0;\n\t\t\t\t_node.f=0;\n\t\t\t\t_node.h=0;\n\t\t\t\t_node.by=0;\n\t\t\t\t_node.parent=null;\n\t\t\t\t_node.opened=null;\n\t\t\t\t_node.closed=null;\n\t\t\t\t_node.tested=null;\n\t\t\t}\n\t\t}\n\t}\n\n\tGrid.createGridFromAStarMap=function(texture){\n\t\tvar textureWidth=texture.width;\n\t\tvar textureHeight=texture.height;\n\t\tvar pixelsInfo=texture.getPixels();\n\t\tvar aStarArr=[];\n\t\tvar index=0;\n\t\tfor (var w=0;w < textureWidth;w++){\n\t\t\tvar colaStarArr=aStarArr[w]=[];\n\t\t\tfor (var h=0;h < textureHeight;h++){\n\t\t\t\tvar r=pixelsInfo[index++];\n\t\t\t\tvar g=pixelsInfo[index++];\n\t\t\t\tvar b=pixelsInfo[index++];\n\t\t\t\tvar a=pixelsInfo[index++];\n\t\t\t\tif (r==255 && g==255 && b==255 && a==255)\n\t\t\t\t\tcolaStarArr[h]=1;\n\t\t\t\telse {\n\t\t\t\t\tcolaStarArr[h]=0;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar gird=new Grid(textureWidth,textureHeight,aStarArr);\n\t\treturn gird;\n\t}\n\n\treturn Grid;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.core.Heuristic\nvar Heuristic=(function(){\n\tfunction Heuristic(){}\n\t__class(Heuristic,'PathFinding.core.Heuristic');\n\tHeuristic.manhattan=function(dx,dy){\n\t\treturn dx+dy;\n\t}\n\n\tHeuristic.euclidean=function(dx,dy){\n\t\treturn Math.sqrt(dx *dx+dy *dy);\n\t}\n\n\tHeuristic.octile=function(dx,dy){\n\t\tvar F=Math.SQRT2-1;\n\t\treturn (dx < dy)? F *dx+dy :F *dy+dx;\n\t}\n\n\tHeuristic.chebyshev=function(dx,dy){\n\t\treturn Math.max(dx,dy);\n\t}\n\n\treturn Heuristic;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.core.Node\nvar Node$1=(function(){\n\tfunction Node(x,y,walkable){\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tthis.g=0;\n\t\tthis.f=0;\n\t\tthis.h=0;\n\t\tthis.by=0;\n\t\tthis.parent=null;\n\t\tthis.opened=null;\n\t\tthis.closed=null;\n\t\tthis.tested=null;\n\t\tthis.retainCount=null;\n\t\tthis.walkable=false;\n\t\t(walkable===void 0)&& (walkable=true);\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.walkable=walkable;\n\t}\n\n\t__class(Node,'PathFinding.core.Node',null,'Node$1');\n\treturn Node;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.core.Util\nvar Util=(function(){\n\tfunction Util(){}\n\t__class(Util,'PathFinding.core.Util');\n\tUtil.backtrace=function(node){\n\t\tvar path=[[node.x,node.y]];\n\t\twhile (node.parent){\n\t\t\tnode=node.parent;\n\t\t\tpath.push([node.x,node.y]);\n\t\t}\n\t\treturn path.reverse();\n\t}\n\n\tUtil.biBacktrace=function(nodeA,nodeB){\n\t\tvar pathA=Util.backtrace(nodeA),pathB=Util.backtrace(nodeB);\n\t\treturn pathA.concat(pathB.reverse());\n\t}\n\n\tUtil.pathLength=function(path){\n\t\tvar i=0,sum=0,a=0,b=0,dx=0,dy=0;\n\t\tfor (i=1;i < path.length;++i){\n\t\t\ta=path[i-1];\n\t\t\tb=path[i];\n\t\t\tdx=a[0]-b[0];\n\t\t\tdy=a[1]-b[1];\n\t\t\tsum+=Math.sqrt(dx *dx+dy *dy);\n\t\t}\n\t\treturn sum;\n\t}\n\n\tUtil.interpolate=function(x0,y0,x1,y1){\n\t\tvar abs=Math.abs,line=[],sx=0,sy=0,dx=0,dy=0,err=0,e2=0;\n\t\tdx=abs(x1-x0);\n\t\tdy=abs(y1-y0);\n\t\tsx=(x0 < x1)? 1 :-1;\n\t\tsy=(y0 < y1)? 1 :-1;\n\t\terr=dx-dy;\n\t\twhile (true){\n\t\t\tline.push([x0,y0]);\n\t\t\tif (x0==x1 && y0==y1){\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\te2=2 *err;\n\t\t\tif (e2 >-dy){\n\t\t\t\terr=err-dy;\n\t\t\t\tx0=x0+sx;\n\t\t\t}\n\t\t\tif (e2 < dx){\n\t\t\t\terr=err+dx;\n\t\t\t\ty0=y0+sy;\n\t\t\t}\n\t\t}\n\t\treturn line;\n\t}\n\n\tUtil.expandPath=function(path){\n\t\tvar expanded=[],len=path.length,coord0,coord1,interpolated,interpolatedLen=0,i=0,j=0;\n\t\tif (len < 2){\n\t\t\treturn expanded;\n\t\t}\n\t\tfor (i=0;i < len-1;++i){\n\t\t\tcoord0=path[i];\n\t\t\tcoord1=path[i+1];\n\t\t\tinterpolated=Util.interpolate(coord0[0],coord0[1],coord1[0],coord1[1]);\n\t\t\tinterpolatedLen=interpolated.length;\n\t\t\tfor (j=0;j < interpolatedLen-1;++j){\n\t\t\t\texpanded.push(interpolated[j]);\n\t\t\t}\n\t\t}\n\t\texpanded.push(path[len-1]);\n\t\treturn expanded;\n\t}\n\n\tUtil.smoothenPath=function(grid,path){\n\t\tvar len=path.length,x0=path[0][0],\n\t\ty0=path[0][1],\n\t\tx1=path[len-1][0],\n\t\ty1=path[len-1][1],\n\t\tsx=0,sy=0,\n\t\tex=0,ey=0,\n\t\tnewPath,i=0,j=0,coord,line,testCoord,blocked=false,lastValidCoord;\n\t\tsx=x0;\n\t\tsy=y0;\n\t\tnewPath=[[sx,sy]];\n\t\tfor (i=2;i < len;++i){\n\t\t\tcoord=path[i];\n\t\t\tex=coord[0];\n\t\t\tey=coord[1];\n\t\t\tline=Util.interpolate(sx,sy,ex,ey);\n\t\t\tblocked=false;\n\t\t\tfor (j=1;j < line.length;++j){\n\t\t\t\ttestCoord=line[j];\n\t\t\t\tif (!grid.isWalkableAt(testCoord[0],testCoord[1])){\n\t\t\t\t\tblocked=true;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (blocked){\n\t\t\t\tlastValidCoord=path[i-1];\n\t\t\t\tnewPath.push(lastValidCoord);\n\t\t\t\tsx=lastValidCoord[0];\n\t\t\t\tsy=lastValidCoord[1];\n\t\t\t}\n\t\t}\n\t\tnewPath.push([x1,y1]);\n\t\treturn newPath;\n\t}\n\n\tUtil.compressPath=function(path){\n\t\tif (path.length < 3){\n\t\t\treturn path;\n\t\t};\n\t\tvar compressed=[],sx=path[0][0],\n\t\tsy=path[0][1],\n\t\tpx=path[1][0],\n\t\tpy=path[1][1],\n\t\tdx=px-sx,\n\t\tdy=py-sy,\n\t\tlx=0,ly=0,ldx=0,ldy=0,sq=NaN,i=0;\n\t\tsq=Math.sqrt(dx *dx+dy *dy);\n\t\tdx /=sq;\n\t\tdy /=sq;\n\t\tcompressed.push([sx,sy]);\n\t\tfor (i=2;i < path.length;i++){\n\t\t\tlx=px;\n\t\t\tly=py;\n\t\t\tldx=dx;\n\t\t\tldy=dy;\n\t\t\tpx=path[i][0];\n\t\t\tpy=path[i][1];\n\t\t\tdx=px-lx;\n\t\t\tdy=py-ly;\n\t\t\tsq=Math.sqrt(dx *dx+dy *dy);\n\t\t\tdx /=sq;\n\t\t\tdy /=sq;\n\t\t\tif (dx!==ldx || dy!==ldy){\n\t\t\t\tcompressed.push([lx,ly]);\n\t\t\t}\n\t\t}\n\t\tcompressed.push([px,py]);\n\t\treturn compressed;\n\t}\n\n\treturn Util;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.finders.AStarFinder\nvar AStarFinder=(function(){\n\tfunction AStarFinder(opt){\n\t\tthis.allowDiagonal=false;\n\t\tthis.dontCrossCorners=false;\n\t\tthis.heuristic=null;\n\t\tthis.weight=0;\n\t\tthis.diagonalMovement=0;\n\t\topt=opt || {};\n\t\tthis.allowDiagonal=opt.allowDiagonal;\n\t\tthis.dontCrossCorners=opt.dontCrossCorners;\n\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\tthis.weight=opt.weight || 1;\n\t\tthis.diagonalMovement=opt.diagonalMovement;\n\t\tif (!this.diagonalMovement){\n\t\t\tif (!this.allowDiagonal){\n\t\t\t\tthis.diagonalMovement=DiagonalMovement.Never;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (this.dontCrossCorners){\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.OnlyWhenNoObstacles;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.IfAtMostOneObstacle;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.diagonalMovement===DiagonalMovement.Never){\n\t\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\t}\n\t\telse{\n\t\t\tthis.heuristic=opt.heuristic || Heuristic.octile;\n\t\t}\n\t}\n\n\t__class(AStarFinder,'PathFinding.finders.AStarFinder');\n\tvar __proto=AStarFinder.prototype;\n\t/**\n\t*Find and return the the path.\n\t*@return {Array<Array<number>>}The path,including both start and\n\t*end positions.\n\t*/\n\t__proto.findPath=function(startX,startY,endX,endY,grid){\n\t\tvar openList=new Heap(function(nodeA,nodeB){\n\t\t\treturn nodeA.f-nodeB.f;\n\t\t}),startNode=grid.getNodeAt(startX,startY),endNode=grid.getNodeAt(endX,endY),heuristic=this.heuristic,diagonalMovement=this.diagonalMovement,weight=this.weight,abs=Math.abs,SQRT2=Math.SQRT2,node,neighbors,neighbor,i=0,l=0,x=0,y=0,ng=0;\n\t\tstartNode.g=0;\n\t\tstartNode.f=0;\n\t\topenList.push(startNode);\n\t\tstartNode.opened=true;\n\t\twhile (!openList.empty()){\n\t\t\tnode=openList.pop();\n\t\t\tnode.closed=true;\n\t\t\tif (node===endNode){\n\t\t\t\treturn Util.backtrace(endNode);\n\t\t\t}\n\t\t\tneighbors=grid.getNeighbors(node,diagonalMovement);\n\t\t\tfor (i=0,l=neighbors.length;i < l;++i){\n\t\t\t\tneighbor=neighbors[i];\n\t\t\t\tif (neighbor.closed){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tx=neighbor.x;\n\t\t\t\ty=neighbor.y;\n\t\t\t\tng=node.g+((x-node.x===0 || y-node.y===0)? 1 :SQRT2);\n\t\t\t\tif (!neighbor.opened || ng < neighbor.g){\n\t\t\t\t\tneighbor.g=ng;\n\t\t\t\t\tneighbor.h=neighbor.h || weight *heuristic(abs(x-endX),abs(y-endY));\n\t\t\t\t\tneighbor.f=neighbor.g+neighbor.h;\n\t\t\t\t\tneighbor.parent=node;\n\t\t\t\t\tif (!neighbor.opened){\n\t\t\t\t\t\topenList.push(neighbor);\n\t\t\t\t\t\tneighbor.opened=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\topenList.updateItem(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [];\n\t}\n\n\treturn AStarFinder;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.BiAStarFinder\nvar BiAStarFinder=(function(){\n\tfunction BiAStarFinder(opt){\n\t\tthis.allowDiagonal=false;\n\t\tthis.dontCrossCorners=false;\n\t\tthis.diagonalMovement=0;\n\t\tthis.heuristic=null;\n\t\tthis.weight=0;\n\t\topt=opt || {};\n\t\tthis.allowDiagonal=opt.allowDiagonal;\n\t\tthis.dontCrossCorners=opt.dontCrossCorners;\n\t\tthis.diagonalMovement=opt.diagonalMovement;\n\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\tthis.weight=opt.weight || 1;\n\t\tif (!this.diagonalMovement){\n\t\t\tif (!this.allowDiagonal){\n\t\t\t\tthis.diagonalMovement=DiagonalMovement.Never;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (this.dontCrossCorners){\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.OnlyWhenNoObstacles;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.IfAtMostOneObstacle;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.diagonalMovement==DiagonalMovement.Never){\n\t\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\t}\n\t\telse{\n\t\t\tthis.heuristic=opt.heuristic || Heuristic.octile;\n\t\t}\n\t}\n\n\t__class(BiAStarFinder,'PathFinding.finders.BiAStarFinder');\n\tvar __proto=BiAStarFinder.prototype;\n\t/**\n\t*Find and return the the path.\n\t*@return {Array<Array<number>>}The path,including both start and\n\t*end positions.\n\t*/\n\t__proto.findPath=function(startX,startY,endX,endY,grid){\n\t\tvar cmp=function (nodeA,nodeB){\n\t\t\treturn nodeA.f-nodeB.f;\n\t\t};\n\t\tvar startOpenList=new Heap(cmp),endOpenList=new Heap(cmp),startNode=grid.getNodeAt(startX,startY),endNode=grid.getNodeAt(endX,endY),heuristic=this.heuristic,diagonalMovement=this.diagonalMovement,weight=this.weight,abs=Math.abs,SQRT2=Math.SQRT2,node,neighbors,neighbor,i=0,l=0,x=0,y=0,ng=0,BY_START=1,BY_END=2;\n\t\tstartNode.g=0;\n\t\tstartNode.f=0;\n\t\tstartOpenList.push(startNode);\n\t\tstartNode.opened=BY_START;\n\t\tendNode.g=0;\n\t\tendNode.f=0;\n\t\tendOpenList.push(endNode);\n\t\tendNode.opened=BY_END;\n\t\twhile (!startOpenList.empty()&& !endOpenList.empty()){\n\t\t\tnode=startOpenList.pop();\n\t\t\tnode.closed=true;\n\t\t\tneighbors=grid.getNeighbors(node,diagonalMovement);\n\t\t\tfor (i=0,l=neighbors.length;i < l;++i){\n\t\t\t\tneighbor=neighbors[i];\n\t\t\t\tif (neighbor.closed){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tif (neighbor.opened===BY_END){\n\t\t\t\t\treturn Util.biBacktrace(node,neighbor);\n\t\t\t\t}\n\t\t\t\tx=neighbor.x;\n\t\t\t\ty=neighbor.y;\n\t\t\t\tng=node.g+((x-node.x===0 || y-node.y===0)? 1 :SQRT2);\n\t\t\t\tif (!neighbor.opened || ng < neighbor.g){\n\t\t\t\t\tneighbor.g=ng;\n\t\t\t\t\tneighbor.h=neighbor.h || weight *heuristic(abs(x-endX),abs(y-endY));\n\t\t\t\t\tneighbor.f=neighbor.g+neighbor.h;\n\t\t\t\t\tneighbor.parent=node;\n\t\t\t\t\tif (!neighbor.opened){\n\t\t\t\t\t\tstartOpenList.push(neighbor);\n\t\t\t\t\t\tneighbor.opened=BY_START;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstartOpenList.updateItem(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode=endOpenList.pop();\n\t\t\tnode.closed=true;\n\t\t\tneighbors=grid.getNeighbors(node,diagonalMovement);\n\t\t\tfor (i=0,l=neighbors.length;i < l;++i){\n\t\t\t\tneighbor=neighbors[i];\n\t\t\t\tif (neighbor.closed){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tif (neighbor.opened===BY_START){\n\t\t\t\t\treturn Util.biBacktrace(neighbor,node);\n\t\t\t\t}\n\t\t\t\tx=neighbor.x;\n\t\t\t\ty=neighbor.y;\n\t\t\t\tng=node.g+((x-node.x===0 || y-node.y===0)? 1 :SQRT2);\n\t\t\t\tif (!neighbor.opened || ng < neighbor.g){\n\t\t\t\t\tneighbor.g=ng;\n\t\t\t\t\tneighbor.h=neighbor.h || weight *heuristic(abs(x-startX),abs(y-startY));\n\t\t\t\t\tneighbor.f=neighbor.g+neighbor.h;\n\t\t\t\t\tneighbor.parent=node;\n\t\t\t\t\tif (!neighbor.opened){\n\t\t\t\t\t\tendOpenList.push(neighbor);\n\t\t\t\t\t\tneighbor.opened=BY_END;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tendOpenList.updateItem(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [];\n\t}\n\n\treturn BiAStarFinder;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.finders.BiBreadthFirstFinder\nvar BiBreadthFirstFinder=(function(){\n\tfunction BiBreadthFirstFinder(opt){\n\t\tthis.allowDiagonal=false;\n\t\tthis.dontCrossCorners=false;\n\t\tthis.heuristic=null;\n\t\tthis.weight=0;\n\t\tthis.diagonalMovement=0;\n\t\topt=opt || {};\n\t\tthis.allowDiagonal=opt.allowDiagonal;\n\t\tthis.dontCrossCorners=opt.dontCrossCorners;\n\t\tthis.diagonalMovement=opt.diagonalMovement;\n\t\tif (!this.diagonalMovement){\n\t\t\tif (!this.allowDiagonal){\n\t\t\t\tthis.diagonalMovement=DiagonalMovement.Never;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (this.dontCrossCorners){\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.OnlyWhenNoObstacles;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.IfAtMostOneObstacle;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t__class(BiBreadthFirstFinder,'PathFinding.finders.BiBreadthFirstFinder');\n\tvar __proto=BiBreadthFirstFinder.prototype;\n\t/**\n\t*Find and return the the path.\n\t*@return {Array<Array<number>>}The path,including both start and\n\t*end positions.\n\t*/\n\t__proto.findPath=function(startX,startY,endX,endY,grid){\n\t\tvar startNode=grid.getNodeAt(startX,startY),endNode=grid.getNodeAt(endX,endY),startOpenList=[],endOpenList=[],neighbors,neighbor,node,diagonalMovement=this.diagonalMovement,BY_START=0,BY_END=1,i=0,l=0;\n\t\tstartOpenList.push(startNode);\n\t\tstartNode.opened=true;\n\t\tstartNode.by=BY_START;\n\t\tendOpenList.push(endNode);\n\t\tendNode.opened=true;\n\t\tendNode.by=BY_END;\n\t\twhile (startOpenList.length && endOpenList.length){\n\t\t\tnode=startOpenList.shift();\n\t\t\tnode.closed=true;\n\t\t\tneighbors=grid.getNeighbors(node,diagonalMovement);\n\t\t\tfor (i=0,l=neighbors.length;i < l;++i){\n\t\t\t\tneighbor=neighbors[i];\n\t\t\t\tif (neighbor.closed){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tif (neighbor.opened){\n\t\t\t\t\tif (neighbor.by===BY_END){\n\t\t\t\t\t\treturn Util.biBacktrace(node,neighbor);\n\t\t\t\t\t}\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tstartOpenList.push(neighbor);\n\t\t\t\tneighbor.parent=node;\n\t\t\t\tneighbor.opened=true;\n\t\t\t\tneighbor.by=BY_START;\n\t\t\t}\n\t\t\tnode=endOpenList.shift();\n\t\t\tnode.closed=true;\n\t\t\tneighbors=grid.getNeighbors(node,diagonalMovement);\n\t\t\tfor (i=0,l=neighbors.length;i < l;++i){\n\t\t\t\tneighbor=neighbors[i];\n\t\t\t\tif (neighbor.closed){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tif (neighbor.opened){\n\t\t\t\t\tif (neighbor.by===BY_START){\n\t\t\t\t\t\treturn Util.biBacktrace(neighbor,node);\n\t\t\t\t\t}\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tendOpenList.push(neighbor);\n\t\t\t\tneighbor.parent=node;\n\t\t\t\tneighbor.opened=true;\n\t\t\t\tneighbor.by=BY_END;\n\t\t\t}\n\t\t}\n\t\treturn [];\n\t}\n\n\treturn BiBreadthFirstFinder;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.finders.BreadthFirstFinder\nvar BreadthFirstFinder=(function(){\n\tfunction BreadthFirstFinder(opt){\n\t\tthis.allowDiagonal=false;\n\t\tthis.dontCrossCorners=false;\n\t\tthis.heuristic=null;\n\t\tthis.weight=0;\n\t\tthis.diagonalMovement=0;\n\t\topt=opt || {};\n\t\tthis.allowDiagonal=opt.allowDiagonal;\n\t\tthis.dontCrossCorners=opt.dontCrossCorners;\n\t\tthis.diagonalMovement=opt.diagonalMovement;\n\t\tif (!this.diagonalMovement){\n\t\t\tif (!this.allowDiagonal){\n\t\t\t\tthis.diagonalMovement=DiagonalMovement.Never;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (this.dontCrossCorners){\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.OnlyWhenNoObstacles;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.IfAtMostOneObstacle;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t__class(BreadthFirstFinder,'PathFinding.finders.BreadthFirstFinder');\n\tvar __proto=BreadthFirstFinder.prototype;\n\t/**\n\t*Find and return the the path.\n\t*@return {Array<Array<number>>}The path,including both start and\n\t*end positions.\n\t*/\n\t__proto.findPath=function(startX,startY,endX,endY,grid){\n\t\tvar openList=[],diagonalMovement=this.diagonalMovement,startNode=grid.getNodeAt(startX,startY),endNode=grid.getNodeAt(endX,endY),neighbors,neighbor,node,i=0,l=0;\n\t\topenList.push(startNode);\n\t\tstartNode.opened=true;\n\t\twhile (openList.length){\n\t\t\tnode=openList.shift();\n\t\t\tnode.closed=true;\n\t\t\tif (node===endNode){\n\t\t\t\treturn Util.backtrace(endNode);\n\t\t\t}\n\t\t\tneighbors=grid.getNeighbors(node,diagonalMovement);\n\t\t\tfor (i=0,l=neighbors.length;i < l;++i){\n\t\t\t\tneighbor=neighbors[i];\n\t\t\t\tif (neighbor.closed || neighbor.opened){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\topenList.push(neighbor);\n\t\t\t\tneighbor.opened=true;\n\t\t\t\tneighbor.parent=node;\n\t\t\t}\n\t\t}\n\t\treturn [];\n\t}\n\n\treturn BreadthFirstFinder;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.finders.IDAStarFinder\nvar IDAStarFinder=(function(){\n\tfunction IDAStarFinder(opt){\n\t\tthis.allowDiagonal=false;\n\t\tthis.dontCrossCorners=false;\n\t\tthis.heuristic=null;\n\t\tthis.weight=0;\n\t\tthis.diagonalMovement=0;\n\t\tthis.trackRecursion=false;\n\t\tthis.timeLimit=NaN;\n\t\topt=opt || {};\n\t\tthis.allowDiagonal=opt.allowDiagonal;\n\t\tthis.dontCrossCorners=opt.dontCrossCorners;\n\t\tthis.diagonalMovement=opt.diagonalMovement;\n\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\tthis.weight=opt.weight || 1;\n\t\tthis.trackRecursion=opt.trackRecursion || false;\n\t\tthis.timeLimit=opt.timeLimit || Infinity;\n\t\tif (!this.diagonalMovement){\n\t\t\tif (!this.allowDiagonal){\n\t\t\t\tthis.diagonalMovement=DiagonalMovement.Never;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (this.dontCrossCorners){\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.OnlyWhenNoObstacles;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.IfAtMostOneObstacle;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.diagonalMovement===DiagonalMovement.Never){\n\t\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\t}\n\t\telse{\n\t\t\tthis.heuristic=opt.heuristic || Heuristic.octile;\n\t\t}\n\t}\n\n\t__class(IDAStarFinder,'PathFinding.finders.IDAStarFinder');\n\tvar __proto=IDAStarFinder.prototype;\n\t/**\n\t*Find and return the the path. When an empty array is returned,either\n\t*no path is possible,or the maximum execution time is reached.\n\t*\n\t*@return {Array<Array<number>>}The path,including both start and\n\t*end positions.\n\t*/\n\t__proto.findPath=function(startX,startY,endX,endY,grid){\n\t\tvar _$this=this;\n\t\tvar nodesVisited=0;\n\t\tvar startTime=new Date().getTime();\n\t\tvar h=function (a,b){\n\t\t\treturn _$this.heuristic(Math.abs(b.x-a.x),Math.abs(b.y-a.y));\n\t\t};\n\t\tvar cost=function (a,b){\n\t\t\treturn (a.x===b.x || a.y===b.y)? 1 :Math.SQRT2;\n\t\t};\n\t\tvar search=function (node,g,cutoff,route,depth){\n\t\t\tnodesVisited++;\n\t\t\tif (_$this.timeLimit > 0 && new Date().getTime()-startTime > _$this.timeLimit *1000){\n\t\t\t\treturn Infinity;\n\t\t\t};\n\t\t\tvar f=g+h(node,end)*_$this.weight;\n\t\t\tif (f > cutoff){\n\t\t\t\treturn f;\n\t\t\t}\n\t\t\tif (node==end){\n\t\t\t\troute[depth]=[node.x,node.y];\n\t\t\t\treturn node;\n\t\t\t};\n\t\t\tvar min=0,t=0,k=0,neighbour;\n\t\t\tvar neighbours=grid.getNeighbors(node,_$this.diagonalMovement);\n\t\t\tfor (k=0,min=Infinity;neighbour=neighbours[k];++k){\n\t\t\t\tif (_$this.trackRecursion){\n\t\t\t\t\tneighbour.retainCount=neighbour.retainCount+1 || 1;\n\t\t\t\t\tif (neighbour.tested !=true){\n\t\t\t\t\t\tneighbour.tested=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt=search(neighbour,g+cost(node,neighbour),cutoff,route,depth+1);\n\t\t\t\tif ((t instanceof PathFinding.core.Node )){\n\t\t\t\t\troute[depth]=[node.x,node.y];\n\t\t\t\t\treturn t;\n\t\t\t\t}\n\t\t\t\tif (_$this.trackRecursion && (--neighbour.retainCount)===0){\n\t\t\t\t\tneighbour.tested=false;\n\t\t\t\t}\n\t\t\t\tif (t < min){\n\t\t\t\t\tmin=t;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn min;\n\t\t};\n\t\tvar start=grid.getNodeAt(startX,startY);\n\t\tvar end=grid.getNodeAt(endX,endY);\n\t\tvar cutOff=h(start,end);\n\t\tvar j=0,route,t=0;\n\t\tfor (j=0;true;++j){\n\t\t\troute=[];\n\t\t\tt=search(start,0,cutOff,route,0);\n\t\t\tif (t==Infinity){\n\t\t\t\troute=[];\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tif ((t instanceof PathFinding.core.Node )){\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tcutOff=t;\n\t\t}\n\t\treturn route;\n\t}\n\n\treturn IDAStarFinder;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.JumpPointFinderBase\nvar JumpPointFinderBase=(function(){\n\tfunction JumpPointFinderBase(opt){\n\t\tthis.grid=null;\n\t\tthis.openList=null;\n\t\tthis.startNode=null;\n\t\tthis.endNode=null;\n\t\tthis.heuristic=null;\n\t\tthis.trackJumpRecursion=false;\n\t\topt=opt || {};\n\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\tthis.trackJumpRecursion=opt.trackJumpRecursion || false;\n\t}\n\n\t__class(JumpPointFinderBase,'PathFinding.finders.JumpPointFinderBase');\n\tvar __proto=JumpPointFinderBase.prototype;\n\t/**\n\t*Find and return the path.\n\t*@return {Array<Array<number>>}The path,including both start and\n\t*end positions.\n\t*/\n\t__proto.findPath=function(startX,startY,endX,endY,grid){\n\t\tvar openList=this.openList=new Heap(function(nodeA,nodeB){\n\t\t\treturn nodeA.f-nodeB.f;\n\t\t}),startNode=this.startNode=grid.getNodeAt(startX,startY),endNode=this.endNode=grid.getNodeAt(endX,endY),node;\n\t\tthis.grid=grid;\n\t\tstartNode.g=0;\n\t\tstartNode.f=0;\n\t\topenList.push(startNode);\n\t\tstartNode.opened=true;\n\t\twhile (!openList.empty()){\n\t\t\tnode=openList.pop();\n\t\t\tnode.closed=true;\n\t\t\tif (node==endNode){\n\t\t\t\treturn Util.expandPath(Util.backtrace(endNode));\n\t\t\t}\n\t\t\tthis._identifySuccessors(node);\n\t\t}\n\t\treturn [];\n\t}\n\n\t/**\n\t*Identify successors for the given node. Runs a jump point search in the\n\t*direction of each available neighbor,adding any points found to the open\n\t*list.\n\t*@protected\n\t*/\n\t__proto._identifySuccessors=function(node){\n\t\tvar grid=this.grid,heuristic=this.heuristic,openList=this.openList,endX=this.endNode.x,endY=this.endNode.y,neighbors,neighbor,jumpPoint,i=0,l=0,x=node.x,y=node.y,jx=0,jy=0,dx=0,dy=0,d=0,ng=0,jumpNode,abs=Math.abs,max=Math.max;\n\t\tneighbors=this._findNeighbors(node);\n\t\tfor (i=0,l=neighbors.length;i < l;++i){\n\t\t\tneighbor=neighbors[i];\n\t\t\tjumpPoint=this._jump(neighbor[0],neighbor[1],x,y);\n\t\t\tif (jumpPoint){\n\t\t\t\tjx=jumpPoint[0];\n\t\t\t\tjy=jumpPoint[1];\n\t\t\t\tjumpNode=grid.getNodeAt(jx,jy);\n\t\t\t\tif (jumpNode.closed){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\td=Heuristic.octile(abs(jx-x),abs(jy-y));\n\t\t\t\tng=node.g+d;\n\t\t\t\tif (!jumpNode.opened || ng < jumpNode.g){\n\t\t\t\t\tjumpNode.g=ng;\n\t\t\t\t\tjumpNode.h=jumpNode.h || heuristic(abs(jx-endX),abs(jy-endY));\n\t\t\t\t\tjumpNode.f=jumpNode.g+jumpNode.h;\n\t\t\t\t\tjumpNode.parent=node;\n\t\t\t\t\tif (!jumpNode.opened){\n\t\t\t\t\t\topenList.push(jumpNode);\n\t\t\t\t\t\tjumpNode.opened=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\topenList.updateItem(jumpNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._jump=function(x,y,px,py){\n\t\treturn [];\n\t}\n\n\t__proto._findNeighbors=function(node){\n\t\treturn [];\n\t}\n\n\treturn JumpPointFinderBase;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.JumpPointFinder\nvar JumpPointFinder=(function(){\n\t/**\n\t*Path finder using the Jump Point Search algorithm\n\t*@param {Object}opt\n\t*@param {function}opt.heuristic Heuristic function to estimate the distance\n\t*(defaults to manhattan).\n\t*@param {DiagonalMovement}opt.diagonalMovement Condition under which diagonal\n\t*movement will be allowed.\n\t*/\n\tfunction JumpPointFinder(opt){}\n\t__class(JumpPointFinder,'PathFinding.finders.JumpPointFinder');\n\treturn JumpPointFinder;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.finders.TraceFinder\nvar TraceFinder=(function(){\n\tfunction TraceFinder(opt){\n\t\tthis.allowDiagonal=false;\n\t\tthis.dontCrossCorners=false;\n\t\tthis.diagonalMovement=0;\n\t\tthis.heuristic=null;\n\t\topt=opt || {};\n\t\tthis.allowDiagonal=opt.allowDiagonal;\n\t\tthis.dontCrossCorners=opt.dontCrossCorners;\n\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\tthis.diagonalMovement=opt.diagonalMovement;\n\t\tif (!this.diagonalMovement){\n\t\t\tif (!this.allowDiagonal){\n\t\t\t\tthis.diagonalMovement=DiagonalMovement.Never;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (this.dontCrossCorners){\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.OnlyWhenNoObstacles;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.diagonalMovement=DiagonalMovement.IfAtMostOneObstacle;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this.diagonalMovement==DiagonalMovement.Never){\n\t\t\tthis.heuristic=opt.heuristic || Heuristic.manhattan;\n\t\t}\n\t\telse{\n\t\t\tthis.heuristic=opt.heuristic || Heuristic.octile;\n\t\t}\n\t}\n\n\t__class(TraceFinder,'PathFinding.finders.TraceFinder');\n\tvar __proto=TraceFinder.prototype;\n\t__proto.findPath=function(startX,startY,endX,endY,grid){\n\t\tvar openList=new Heap(function(nodeA,nodeB){\n\t\t\treturn nodeA.f-nodeB.f;\n\t\t}),startNode=grid.getNodeAt(startX,startY),endNode=grid.getNodeAt(endX,endY),heuristic=this.heuristic,allowDiagonal=this.allowDiagonal,dontCrossCorners=this.dontCrossCorners,abs=Math.abs,SQRT2=Math.SQRT2,node,neighbors,neighbor,i=0,l=0,x=0,y=0,ng=0;\n\t\tstartNode.g=0;\n\t\tstartNode.f=0;\n\t\topenList.push(startNode);\n\t\tstartNode.opened=true;\n\t\twhile (!openList.empty()){\n\t\t\tnode=openList.pop();\n\t\t\tnode.closed=true;\n\t\t\tif (node===endNode){\n\t\t\t\treturn Util.backtrace(endNode);\n\t\t\t}\n\t\t\tneighbors=grid.getNeighbors(node,this.diagonalMovement);\n\t\t\tfor (i=0,l=neighbors.length;i < l;++i){\n\t\t\t\tneighbor=neighbors[i];\n\t\t\t\tif (neighbor.closed){\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tx=neighbor.x;\n\t\t\t\ty=neighbor.y;\n\t\t\t\tng=node.g+((x-node.x===0 || y-node.y===0)? 1 :SQRT2);\n\t\t\t\tif (!neighbor.opened || ng < neighbor.g){\n\t\t\t\t\tneighbor.g=ng *l / 9;\n\t\t\t\t\tneighbor.h=neighbor.h || heuristic(abs(x-endX),abs(y-endY));\n\t\t\t\t\tneighbor.f=neighbor.g+neighbor.h;\n\t\t\t\t\tneighbor.parent=node;\n\t\t\t\t\tif (!neighbor.opened){\n\t\t\t\t\t\topenList.push(neighbor);\n\t\t\t\t\t\tneighbor.opened=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\topenList.updateItem(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [];\n\t}\n\n\treturn TraceFinder;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.libs.Heap\nvar Heap=(function(){\n\tfunction Heap(cmp){\n\t\tthis.cmp=null;\n\t\tthis.nodes=null;\n\t\tthis.heapFunction=new HeapFunction();\n\t\tthis.cmp=cmp !=null ? cmp :this.heapFunction.defaultCmp;\n\t\tthis.nodes=[];\n\t}\n\n\t__class(Heap,'PathFinding.libs.Heap');\n\tvar __proto=Heap.prototype;\n\t__proto.push=function(x){\n\t\treturn this.heapFunction.heappush(this.nodes,x,this.cmp);\n\t}\n\n\t__proto.pop=function(){\n\t\treturn this.heapFunction.heappop(this.nodes,this.cmp);\n\t}\n\n\t__proto.peek=function(){\n\t\treturn this.nodes[0];\n\t}\n\n\t__proto.contains=function(x){\n\t\treturn this.nodes.indexOf(x)!==-1;\n\t}\n\n\t__proto.replace=function(x){\n\t\treturn this.heapFunction.heapreplace(this.nodes,x,this.cmp);\n\t}\n\n\t__proto.pushpop=function(x){\n\t\treturn this.heapFunction.heappushpop(this.nodes,x,this.cmp);\n\t}\n\n\t__proto.heapify=function(){\n\t\treturn this.heapFunction.heapify(this.nodes,this.cmp);\n\t}\n\n\t__proto.updateItem=function(x){\n\t\treturn this.heapFunction.updateItem(this.nodes,x,this.cmp);\n\t}\n\n\t__proto.clear=function(){\n\t\treturn this.nodes=[];\n\t}\n\n\t__proto.empty=function(){\n\t\treturn this.nodes.length===0;\n\t}\n\n\t__proto.size=function(){\n\t\treturn this.nodes.length;\n\t}\n\n\t__proto.clone=function(){\n\t\tvar heap=new Heap();\n\t\theap.nodes=this.nodes.slice(0);\n\t\treturn heap;\n\t}\n\n\t__proto.toArray=function(){\n\t\treturn this.nodes.slice(0);\n\t}\n\n\treturn Heap;\n})()\n\n\n/**\n*...\n*@author dongketao\n*/\n//class PathFinding.libs.HeapFunction\nvar HeapFunction=(function(){\n\tfunction HeapFunction(){\n\t\t//};\n\t\tthis.defaultCmp=function(x,y){\n\t\t\tif (x < y){\n\t\t\t\treturn-1;\n\t\t\t}\n\t\t\tif (x > y){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t__class(HeapFunction,'PathFinding.libs.HeapFunction');\n\tvar __proto=HeapFunction.prototype;\n\t//};\n\t__proto.insort=function(a,x,lo,hi,cmp){\n\t\tvar mid=NaN;\n\t\tif (lo==null){\n\t\t\tlo=0;\n\t\t}\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tif (lo < 0){\n\t\t\tthrow new Error('lo must be non-negative');\n\t\t}\n\t\tif (hi==null){\n\t\t\thi=a.length;\n\t\t}\n\t\twhile (lo < hi){\n\t\t\tmid=Math.floor((lo+hi)/ 2);\n\t\t\tif (cmp(x,a[mid])< 0){\n\t\t\t\thi=mid;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlo=mid+1;\n\t\t\t}\n\t\t}\n\t\treturn ([].splice.apply(a,[lo,lo-lo].concat(x)),x);\n\t}\n\n\t//};\n\t__proto.heappush=function(array,item,cmp){\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tarray.push(item);\n\t\treturn this._siftdown(array,0,array.length-1,cmp);\n\t}\n\n\t//};\n\t__proto.heappop=function(array,cmp){\n\t\tvar lastelt,returnitem;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tlastelt=array.pop();\n\t\tif (array.length){\n\t\t\treturnitem=array[0];\n\t\t\tarray[0]=lastelt;\n\t\t\tthis._siftup(array,0,cmp);\n\t\t}\n\t\telse{\n\t\t\treturnitem=lastelt;\n\t\t}\n\t\treturn returnitem;\n\t}\n\n\t//};\n\t__proto.heapreplace=function(array,item,cmp){\n\t\tvar returnitem;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\treturnitem=array[0];\n\t\tarray[0]=item;\n\t\tthis._siftup(array,0,cmp);\n\t\treturn returnitem;\n\t}\n\n\t//};\n\t__proto.heappushpop=function(array,item,cmp){\n\t\tvar _ref;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tif (array.length && cmp(array[0],item)< 0){\n\t\t\t_ref=[array[0],item],item=_ref[0],array[0]=_ref[1];\n\t\t\tthis._siftup(array,0,cmp);\n\t\t}\n\t\treturn item;\n\t}\n\n\t//};\n\t__proto.heapify=function(array,cmp){\n\t\tvar i=0,_i=0,_j=0,_len=0,_ref,_ref1,_results,_results1;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\t_ref1=(function(){\n\t\t\t_results1=[];\n\t\t\tfor (_j=0,_ref=Math.floor(array.length / 2);0 <=_ref ? _j < _ref :_j > _ref;0 <=_ref ? _j++:_j--){\n\t\t\t\t_results1.push(_j);\n\t\t\t}\n\t\t\treturn _results1;\n\t\t}).apply(this).reverse();\n\t\t_results=[];\n\t\tfor (_i=0,_len=_ref1.length;_i < _len;_i++){\n\t\t\ti=_ref1[_i];\n\t\t\t_results.push(this._siftup(array,i,cmp));\n\t\t}\n\t\treturn _results;\n\t}\n\n\t//};\n\t__proto.updateItem=function(array,item,cmp){\n\t\tvar pos=0;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tpos=array.indexOf(item);\n\t\tif (pos===-1){\n\t\t\treturn null;\n\t\t}\n\t\tthis._siftdown(array,0,pos,cmp);\n\t\treturn this._siftup(array,pos,cmp);\n\t}\n\n\t//};\n\t__proto.nlargest=function(array,n,cmp){\n\t\tvar elem,result,_i=0,_len=0,_ref;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tresult=array.slice(0,n);\n\t\tif (!result.length){\n\t\t\treturn result;\n\t\t}\n\t\tthis.heapify(result,cmp);\n\t\t_ref=array.slice(n);\n\t\tfor (_i=0,_len=_ref.length;_i < _len;_i++){\n\t\t\telem=_ref[_i];\n\t\t\tthis.heappushpop(result,elem,cmp);\n\t\t}\n\t\treturn result.sort(cmp).reverse();\n\t}\n\n\t//};\n\t__proto.nsmallest=function(array,n,cmp){\n\t\tvar elem,i,los,result,_i=0,_j=0,_len,_ref,_ref1,_results;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tif (n *10 <=array.length){\n\t\t\tresult=array.slice(0,n).sort(cmp);\n\t\t\tif (!result.length){\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tlos=result[result.length-1];\n\t\t\t_ref=array.slice(n);\n\t\t\tfor (_i=0,_len=_ref.length;_i < _len;_i++){\n\t\t\t\telem=_ref[_i];\n\t\t\t\tif (cmp(elem,los)< 0){\n\t\t\t\t\tthis.insort(result,elem,0,null,cmp);\n\t\t\t\t\tresult.pop();\n\t\t\t\t\tlos=result[result.length-1];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\tthis.heapify(array,cmp);\n\t\t_results=[];\n\t\tfor (i=_j=0,_ref1=Math.min(n,array.length);0 <=_ref1 ? _j < _ref1 :_j > _ref1;i=0 <=_ref1 ?++_j :--_j){\n\t\t\t_results.push(this.heappop(array,cmp));\n\t\t}\n\t\treturn _results;\n\t}\n\n\t//};\n\t__proto._siftdown=function(array,startpos,pos,cmp){\n\t\tvar newitem,parent,parentpos=0;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tnewitem=array[pos];\n\t\twhile (pos > startpos){\n\t\t\tparentpos=(pos-1)>> 1;\n\t\t\tparent=array[parentpos];\n\t\t\tif (cmp(newitem,parent)< 0){\n\t\t\t\tarray[pos]=parent;\n\t\t\t\tpos=parentpos;\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tbreak ;\n\t\t}\n\t\treturn array[pos]=newitem;\n\t}\n\n\t//};\n\t__proto._siftup=function(array,pos,cmp){\n\t\tvar childpos=0,endpos=0,newitem,rightpos=0,startpos=0;\n\t\tif (cmp==null){\n\t\t\tcmp=this.defaultCmp;\n\t\t}\n\t\tendpos=array.length;\n\t\tstartpos=pos;\n\t\tnewitem=array[pos];\n\t\tchildpos=2 *pos+1;\n\t\twhile (childpos < endpos){\n\t\t\trightpos=childpos+1;\n\t\t\tif (rightpos < endpos && !(cmp(array[childpos],array[rightpos])< 0)){\n\t\t\t\tchildpos=rightpos;\n\t\t\t}\n\t\t\tarray[pos]=array[childpos];\n\t\t\tpos=childpos;\n\t\t\tchildpos=2 *pos+1;\n\t\t}\n\t\tarray[pos]=newitem;\n\t\treturn this._siftdown(array,startpos,pos,cmp);\n\t}\n\n\treturn HeapFunction;\n})()\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.BestFirstFinder extends PathFinding.finders.AStarFinder\nvar BestFirstFinder=(function(_super){\n\tfunction BestFirstFinder(opt){\n\t\tBestFirstFinder.__super.call(this,opt);\n\t\tvar orig=this.heuristic;\n\t\tthis.heuristic=function (dx,dy){\n\t\t\treturn orig(dx,dy)*1000000;\n\t\t};\n\t}\n\n\t__class(BestFirstFinder,'PathFinding.finders.BestFirstFinder',_super);\n\treturn BestFirstFinder;\n})(AStarFinder)\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.BiBestFirstFinder extends PathFinding.finders.BiAStarFinder\nvar BiBestFirstFinder=(function(_super){\n\tfunction BiBestFirstFinder(opt){\n\t\tBiBestFirstFinder.__super.call(this,opt);\n\t\tvar orig=this.heuristic;\n\t\tthis.heuristic=function (dx,dy){\n\t\t\treturn orig(dx,dy)*1000000;\n\t\t};\n\t}\n\n\t__class(BiBestFirstFinder,'PathFinding.finders.BiBestFirstFinder',_super);\n\treturn BiBestFirstFinder;\n})(BiAStarFinder)\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.BiDijkstraFinder extends PathFinding.finders.BiAStarFinder\nvar BiDijkstraFinder=(function(_super){\n\tfunction BiDijkstraFinder(opt){\n\t\tBiDijkstraFinder.__super.call(this,opt);\n\t\tthis.heuristic=function (dx,dy){\n\t\t\treturn 0;\n\t\t};\n\t}\n\n\t__class(BiDijkstraFinder,'PathFinding.finders.BiDijkstraFinder',_super);\n\treturn BiDijkstraFinder;\n})(BiAStarFinder)\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.DijkstraFinder extends PathFinding.finders.AStarFinder\nvar DijkstraFinder=(function(_super){\n\tfunction DijkstraFinder(opt){\n\t\tDijkstraFinder.__super.call(this,opt);\n\t\tthis.heuristic=function (dx,dy){\n\t\t\treturn 0;\n\t\t};\n\t}\n\n\t__class(DijkstraFinder,'PathFinding.finders.DijkstraFinder',_super);\n\treturn DijkstraFinder;\n})(AStarFinder)\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.JPFAlwaysMoveDiagonally extends PathFinding.finders.JumpPointFinderBase\nvar JPFAlwaysMoveDiagonally=(function(_super){\n\tfunction JPFAlwaysMoveDiagonally(opt){\n\t\tJPFAlwaysMoveDiagonally.__super.call(this,opt);\n\t}\n\n\t__class(JPFAlwaysMoveDiagonally,'PathFinding.finders.JPFAlwaysMoveDiagonally',_super);\n\tvar __proto=JPFAlwaysMoveDiagonally.prototype;\n\t/**\n\t*Search recursively in the direction (parent-> child),stopping only when a\n\t*jump point is found.\n\t*@protected\n\t*@return {Array<Array<number>>}The x,y coordinate of the jump point\n\t*found,or null if not found\n\t*/\n\t__proto._jump=function(x,y,px,py){\n\t\tvar grid=this.grid,dx=x-px,dy=y-py;\n\t\tif (!grid.isWalkableAt(x,y)){\n\t\t\treturn null;\n\t\t}\n\t\tif (this.trackJumpRecursion==true){\n\t\t\tgrid.getNodeAt(x,y).tested=true;\n\t\t}\n\t\tif (grid.getNodeAt(x,y)==this.endNode){\n\t\t\treturn [x,y];\n\t\t}\n\t\tif (dx!==0 && dy!==0){\n\t\t\tif ((grid.isWalkableAt(x-dx,y+dy)&& !grid.isWalkableAt(x-dx,y))|| (grid.isWalkableAt(x+dx,y-dy)&& !grid.isWalkableAt(x,y-dy))){\n\t\t\t\treturn [x,y];\n\t\t\t}\n\t\t\tif (this._jump(x+dx,y,x,y)|| this._jump(x,y+dy,x,y)){\n\t\t\t\treturn [x,y];\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (dx!==0){\n\t\t\t\tif ((grid.isWalkableAt(x+dx,y+1)&& !grid.isWalkableAt(x,y+1))|| (grid.isWalkableAt(x+dx,y-1)&& !grid.isWalkableAt(x,y-1))){\n\t\t\t\t\treturn [x,y];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif ((grid.isWalkableAt(x+1,y+dy)&& !grid.isWalkableAt(x+1,y))|| (grid.isWalkableAt(x-1,y+dy)&& !grid.isWalkableAt(x-1,y))){\n\t\t\t\t\treturn [x,y];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this._jump(x+dx,y+dy,x,y);\n\t}\n\n\t/**\n\t*Find the neighbors for the given node. If the node has a parent,\n\t*prune the neighbors based on the jump point search algorithm,otherwise\n\t*return all available neighbors.\n\t*@return {Array<Array<number>>}The neighbors found.\n\t*/\n\t__proto._findNeighbors=function(node){\n\t\tvar parent=node.parent,x=node.x,y=node.y,grid=this.grid,px=0,py=0,nx=0,ny=0,dx=0,dy=0,neighbors=[],neighborNodes,neighborNode,i=0,l=0;\n\t\tif (parent){\n\t\t\tpx=parent.x;\n\t\t\tpy=parent.y;\n\t\t\tdx=(x-px)/ Math.max(Math.abs(x-px),1);\n\t\t\tdy=(y-py)/ Math.max(Math.abs(y-py),1);\n\t\t\tif (dx!==0 && dy!==0){\n\t\t\t\tif (grid.isWalkableAt(x,y+dy)){\n\t\t\t\t\tneighbors.push([x,y+dy]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\tneighbors.push([x+dx,y]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x+dx,y+dy)){\n\t\t\t\t\tneighbors.push([x+dx,y+dy]);\n\t\t\t\t}\n\t\t\t\tif (!grid.isWalkableAt(x-dx,y)){\n\t\t\t\t\tneighbors.push([x-dx,y+dy]);\n\t\t\t\t}\n\t\t\t\tif (!grid.isWalkableAt(x,y-dy)){\n\t\t\t\t\tneighbors.push([x+dx,y-dy]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (dx===0){\n\t\t\t\t\tif (grid.isWalkableAt(x,y+dy)){\n\t\t\t\t\t\tneighbors.push([x,y+dy]);\n\t\t\t\t\t}\n\t\t\t\t\tif (!grid.isWalkableAt(x+1,y)){\n\t\t\t\t\t\tneighbors.push([x+1,y+dy]);\n\t\t\t\t\t}\n\t\t\t\t\tif (!grid.isWalkableAt(x-1,y)){\n\t\t\t\t\t\tneighbors.push([x-1,y+dy]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\t\tneighbors.push([x+dx,y]);\n\t\t\t\t\t}\n\t\t\t\t\tif (!grid.isWalkableAt(x,y+1)){\n\t\t\t\t\t\tneighbors.push([x+dx,y+1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (!grid.isWalkableAt(x,y-1)){\n\t\t\t\t\t\tneighbors.push([x+dx,y-1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tneighborNodes=grid.getNeighbors(node,DiagonalMovement.Always);\n\t\t\tfor (i=0,l=neighborNodes.length;i < l;++i){\n\t\t\t\tneighborNode=neighborNodes[i];\n\t\t\t\tneighbors.push([neighborNode.x,neighborNode.y]);\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}\n\n\treturn JPFAlwaysMoveDiagonally;\n})(JumpPointFinderBase)\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.JPFMoveDiagonallyIfAtMostOneObstacle extends PathFinding.finders.JumpPointFinderBase\nvar JPFMoveDiagonallyIfAtMostOneObstacle=(function(_super){\n\tfunction JPFMoveDiagonallyIfAtMostOneObstacle(opt){\n\t\tJPFMoveDiagonallyIfAtMostOneObstacle.__super.call(this,opt);\n\t}\n\n\t__class(JPFMoveDiagonallyIfAtMostOneObstacle,'PathFinding.finders.JPFMoveDiagonallyIfAtMostOneObstacle',_super);\n\tvar __proto=JPFMoveDiagonallyIfAtMostOneObstacle.prototype;\n\t/**\n\t*Search recursively in the direction (parent-> child),stopping only when a\n\t*jump point is found.\n\t*@protected\n\t*@return {Array<Array<number>>}The x,y coordinate of the jump point\n\t*found,or null if not found\n\t*/\n\t__proto._jump=function(x,y,px,py){\n\t\tvar grid=this.grid,dx=x-px,dy=y-py;\n\t\tif (!grid.isWalkableAt(x,y)){\n\t\t\treturn null;\n\t\t}\n\t\tif (this.trackJumpRecursion===true){\n\t\t\tgrid.getNodeAt(x,y).tested=true;\n\t\t}\n\t\tif (grid.getNodeAt(x,y)==this.endNode){\n\t\t\treturn [x,y];\n\t\t}\n\t\tif (dx!==0 && dy!==0){\n\t\t\tif ((grid.isWalkableAt(x-dx,y+dy)&& !grid.isWalkableAt(x-dx,y))|| (grid.isWalkableAt(x+dx,y-dy)&& !grid.isWalkableAt(x,y-dy))){\n\t\t\t\treturn [x,y];\n\t\t\t}\n\t\t\tif (this._jump(x+dx,y,x,y)|| this._jump(x,y+dy,x,y)){\n\t\t\t\treturn [x,y];\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (dx!==0){\n\t\t\t\tif ((grid.isWalkableAt(x+dx,y+1)&& !grid.isWalkableAt(x,y+1))|| (grid.isWalkableAt(x+dx,y-1)&& !grid.isWalkableAt(x,y-1))){\n\t\t\t\t\treturn [x,y];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif ((grid.isWalkableAt(x+1,y+dy)&& !grid.isWalkableAt(x+1,y))|| (grid.isWalkableAt(x-1,y+dy)&& !grid.isWalkableAt(x-1,y))){\n\t\t\t\t\treturn [x,y];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (grid.isWalkableAt(x+dx,y)|| grid.isWalkableAt(x,y+dy)){\n\t\t\treturn this._jump(x+dx,y+dy,x,y);\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t*Find the neighbors for the given node. If the node has a parent,\n\t*prune the neighbors based on the jump point search algorithm,otherwise\n\t*return all available neighbors.\n\t*@return {Array<Array<number>>}The neighbors found.\n\t*/\n\t__proto._findNeighbors=function(node){\n\t\tvar parent=node.parent,x=node.x,y=node.y,grid=this.grid,px=0,py=0,nx=0,ny=0,dx=0,dy=0,neighbors=[],neighborNodes,neighborNode,i=0,l=0;\n\t\tif (parent){\n\t\t\tpx=parent.x;\n\t\t\tpy=parent.y;\n\t\t\tdx=(x-px)/ Math.max(Math.abs(x-px),1);\n\t\t\tdy=(y-py)/ Math.max(Math.abs(y-py),1);\n\t\t\tif (dx!==0 && dy!==0){\n\t\t\t\tif (grid.isWalkableAt(x,y+dy)){\n\t\t\t\t\tneighbors.push([x,y+dy]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\tneighbors.push([x+dx,y]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x,y+dy)|| grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\tneighbors.push([x+dx,y+dy]);\n\t\t\t\t}\n\t\t\t\tif (!grid.isWalkableAt(x-dx,y)&& grid.isWalkableAt(x,y+dy)){\n\t\t\t\t\tneighbors.push([x-dx,y+dy]);\n\t\t\t\t}\n\t\t\t\tif (!grid.isWalkableAt(x,y-dy)&& grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\tneighbors.push([x+dx,y-dy]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (dx===0){\n\t\t\t\t\tif (grid.isWalkableAt(x,y+dy)){\n\t\t\t\t\t\tneighbors.push([x,y+dy]);\n\t\t\t\t\t\tif (!grid.isWalkableAt(x+1,y)){\n\t\t\t\t\t\t\tneighbors.push([x+1,y+dy]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!grid.isWalkableAt(x-1,y)){\n\t\t\t\t\t\t\tneighbors.push([x-1,y+dy]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\t\tneighbors.push([x+dx,y]);\n\t\t\t\t\t\tif (!grid.isWalkableAt(x,y+1)){\n\t\t\t\t\t\t\tneighbors.push([x+dx,y+1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!grid.isWalkableAt(x,y-1)){\n\t\t\t\t\t\t\tneighbors.push([x+dx,y-1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tneighborNodes=grid.getNeighbors(node,DiagonalMovement.IfAtMostOneObstacle);\n\t\t\tfor (i=0,l=neighborNodes.length;i < l;++i){\n\t\t\t\tneighborNode=neighborNodes[i];\n\t\t\t\tneighbors.push([neighborNode.x,neighborNode.y]);\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}\n\n\treturn JPFMoveDiagonallyIfAtMostOneObstacle;\n})(JumpPointFinderBase)\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.JPFMoveDiagonallyIfNoObstacles extends PathFinding.finders.JumpPointFinderBase\nvar JPFMoveDiagonallyIfNoObstacles=(function(_super){\n\tfunction JPFMoveDiagonallyIfNoObstacles(opt){\n\t\tJPFMoveDiagonallyIfNoObstacles.__super.call(this,opt);\n\t}\n\n\t__class(JPFMoveDiagonallyIfNoObstacles,'PathFinding.finders.JPFMoveDiagonallyIfNoObstacles',_super);\n\tvar __proto=JPFMoveDiagonallyIfNoObstacles.prototype;\n\t/**\n\t*Search recursively in the direction (parent-> child),stopping only when a\n\t*jump point is found.\n\t*@protected\n\t*@return {Array<Array<number>>}The x,y coordinate of the jump point\n\t*found,or null if not found\n\t*/\n\t__proto._jump=function(x,y,px,py){\n\t\tvar grid=this.grid,dx=x-px,dy=y-py;\n\t\tif (!grid.isWalkableAt(x,y)){\n\t\t\treturn null;\n\t\t}\n\t\tif (this.trackJumpRecursion===true){\n\t\t\tgrid.getNodeAt(x,y).tested=true;\n\t\t}\n\t\tif (grid.getNodeAt(x,y)===this.endNode){\n\t\t\treturn [x,y];\n\t\t}\n\t\tif (dx!==0 && dy!==0){\n\t\t\tif (this._jump(x+dx,y,x,y)|| this._jump(x,y+dy,x,y)){\n\t\t\t\treturn [x,y];\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (dx!==0){\n\t\t\t\tif ((grid.isWalkableAt(x,y-1)&& !grid.isWalkableAt(x-dx,y-1))|| (grid.isWalkableAt(x,y+1)&& !grid.isWalkableAt(x-dx,y+1))){\n\t\t\t\t\treturn [x,y];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (dy!==0){\n\t\t\t\tif ((grid.isWalkableAt(x-1,y)&& !grid.isWalkableAt(x-1,y-dy))|| (grid.isWalkableAt(x+1,y)&& !grid.isWalkableAt(x+1,y-dy))){\n\t\t\t\t\treturn [x,y];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (grid.isWalkableAt(x+dx,y)&& grid.isWalkableAt(x,y+dy)){\n\t\t\treturn this._jump(x+dx,y+dy,x,y);\n\t\t}\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t/**\n\t*Find the neighbors for the given node. If the node has a parent,\n\t*prune the neighbors based on the jump point search algorithm,otherwise\n\t*return all available neighbors.\n\t*@return {Array<Array<number>>}The neighbors found.\n\t*/\n\t__proto._findNeighbors=function(node){\n\t\tvar parent=node.parent,x=node.x,y=node.y,grid=this.grid,px=0,py=0,nx=0,ny=0,dx=0,dy=0,neighbors=[],neighborNodes,neighborNode,i=0,l=0;\n\t\tif (parent){\n\t\t\tpx=parent.x;\n\t\t\tpy=parent.y;\n\t\t\tdx=(x-px)/ Math.max(Math.abs(x-px),1);\n\t\t\tdy=(y-py)/ Math.max(Math.abs(y-py),1);\n\t\t\tif (dx!==0 && dy!==0){\n\t\t\t\tif (grid.isWalkableAt(x,y+dy)){\n\t\t\t\t\tneighbors.push([x,y+dy]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\tneighbors.push([x+dx,y]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x,y+dy)&& grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\tneighbors.push([x+dx,y+dy]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tvar isNextWalkable=false;\n\t\t\t\tif (dx!==0){\n\t\t\t\t\tisNextWalkable=grid.isWalkableAt(x+dx,y);\n\t\t\t\t\tvar isTopWalkable=grid.isWalkableAt(x,y+1);\n\t\t\t\t\tvar isBottomWalkable=grid.isWalkableAt(x,y-1);\n\t\t\t\t\tif (isNextWalkable){\n\t\t\t\t\t\tneighbors.push([x+dx,y]);\n\t\t\t\t\t\tif (isTopWalkable){\n\t\t\t\t\t\t\tneighbors.push([x+dx,y+1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isBottomWalkable){\n\t\t\t\t\t\t\tneighbors.push([x+dx,y-1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isTopWalkable){\n\t\t\t\t\t\tneighbors.push([x,y+1]);\n\t\t\t\t\t}\n\t\t\t\t\tif (isBottomWalkable){\n\t\t\t\t\t\tneighbors.push([x,y-1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (dy!==0){\n\t\t\t\t\tisNextWalkable=grid.isWalkableAt(x,y+dy);\n\t\t\t\t\tvar isRightWalkable=grid.isWalkableAt(x+1,y);\n\t\t\t\t\tvar isLeftWalkable=grid.isWalkableAt(x-1,y);\n\t\t\t\t\tif (isNextWalkable){\n\t\t\t\t\t\tneighbors.push([x,y+dy]);\n\t\t\t\t\t\tif (isRightWalkable){\n\t\t\t\t\t\t\tneighbors.push([x+1,y+dy]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isLeftWalkable){\n\t\t\t\t\t\t\tneighbors.push([x-1,y+dy]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isRightWalkable){\n\t\t\t\t\t\tneighbors.push([x+1,y]);\n\t\t\t\t\t}\n\t\t\t\t\tif (isLeftWalkable){\n\t\t\t\t\t\tneighbors.push([x-1,y]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tneighborNodes=grid.getNeighbors(node,DiagonalMovement.OnlyWhenNoObstacles);\n\t\t\tfor (i=0,l=neighborNodes.length;i < l;++i){\n\t\t\t\tneighborNode=neighborNodes[i];\n\t\t\t\tneighbors.push([neighborNode.x,neighborNode.y]);\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}\n\n\treturn JPFMoveDiagonallyIfNoObstacles;\n})(JumpPointFinderBase)\n\n\n/**\n*...\n*@author ...\n*/\n//class PathFinding.finders.JPFNeverMoveDiagonally extends PathFinding.finders.JumpPointFinderBase\nvar JPFNeverMoveDiagonally=(function(_super){\n\tfunction JPFNeverMoveDiagonally(opt){\n\t\tJPFNeverMoveDiagonally.__super.call(this,opt);\n\t}\n\n\t__class(JPFNeverMoveDiagonally,'PathFinding.finders.JPFNeverMoveDiagonally',_super);\n\tvar __proto=JPFNeverMoveDiagonally.prototype;\n\t/**\n\t*Search recursively in the direction (parent-> child),stopping only when a\n\t*jump point is found.\n\t*@protected\n\t*@return {Array<Array<number>>}The x,y coordinate of the jump point\n\t*found,or null if not found\n\t*/\n\t__proto._jump=function(x,y,px,py){\n\t\tvar grid=this.grid,dx=x-px,dy=y-py;\n\t\tif (!grid.isWalkableAt(x,y)){\n\t\t\treturn null;\n\t\t}\n\t\tif (this.trackJumpRecursion===true){\n\t\t\tgrid.getNodeAt(x,y).tested=true;\n\t\t}\n\t\tif (grid.getNodeAt(x,y)==this.endNode){\n\t\t\treturn [x,y];\n\t\t}\n\t\tif (dx!==0){\n\t\t\tif ((grid.isWalkableAt(x,y-1)&& !grid.isWalkableAt(x-dx,y-1))|| (grid.isWalkableAt(x,y+1)&& !grid.isWalkableAt(x-dx,y+1))){\n\t\t\t\treturn [x,y];\n\t\t\t}\n\t\t}\n\t\telse if (dy!==0){\n\t\t\tif ((grid.isWalkableAt(x-1,y)&& !grid.isWalkableAt(x-1,y-dy))|| (grid.isWalkableAt(x+1,y)&& !grid.isWalkableAt(x+1,y-dy))){\n\t\t\t\treturn [x,y];\n\t\t\t}\n\t\t\tif (this._jump(x+1,y,x,y)|| this._jump(x-1,y,x,y)){\n\t\t\t\treturn [x,y];\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tthrow new Error(\"Only horizontal and vertical movements are allowed\");\n\t\t}\n\t\treturn this._jump(x+dx,y+dy,x,y);\n\t}\n\n\t/**\n\t*Find the neighbors for the given node. If the node has a parent,\n\t*prune the neighbors based on the jump point search algorithm,otherwise\n\t*return all available neighbors.\n\t*@return {Array<Array<number>>}The neighbors found.\n\t*/\n\t__proto._findNeighbors=function(node){\n\t\tvar parent=node.parent,x=node.x,y=node.y,grid=this.grid,px=0,py=0,nx=0,ny=0,dx=0,dy=0,neighbors=[],neighborNodes,neighborNode,i=0,l=0;\n\t\tif (parent){\n\t\t\tpx=parent.x;\n\t\t\tpy=parent.y;\n\t\t\tdx=(x-px)/ Math.max(Math.abs(x-px),1);\n\t\t\tdy=(y-py)/ Math.max(Math.abs(y-py),1);\n\t\t\tif (dx!==0){\n\t\t\t\tif (grid.isWalkableAt(x,y-1)){\n\t\t\t\t\tneighbors.push([x,y-1]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x,y+1)){\n\t\t\t\t\tneighbors.push([x,y+1]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x+dx,y)){\n\t\t\t\t\tneighbors.push([x+dx,y]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (dy!==0){\n\t\t\t\tif (grid.isWalkableAt(x-1,y)){\n\t\t\t\t\tneighbors.push([x-1,y]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x+1,y)){\n\t\t\t\t\tneighbors.push([x+1,y]);\n\t\t\t\t}\n\t\t\t\tif (grid.isWalkableAt(x,y+dy)){\n\t\t\t\t\tneighbors.push([x,y+dy]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tneighborNodes=grid.getNeighbors(node,DiagonalMovement.Never);\n\t\t\tfor (i=0,l=neighborNodes.length;i < l;++i){\n\t\t\t\tneighborNode=neighborNodes[i];\n\t\t\t\tneighbors.push([neighborNode.x,neighborNode.y]);\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}\n\n\treturn JPFNeverMoveDiagonally;\n})(JumpPointFinderBase)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.qqmini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,URL=laya.net.URL,Utils=laya.utils.Utils;\n/**@private **/\n//class laya.qq.mini.MiniFileMgr\nvar MiniFileMgr$7=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.qq.mini.MiniFileMgr',null,'MiniFileMgr$7');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=QQMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(QQMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(QQMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((QQMiniAdapter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\"wx.qlogo.cn\")==-1 && readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\tif(QQMiniAdapter.window.navigator.userAgent.indexOf('MiniGame')<0){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > QQMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tQQMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > QQMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tQQMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=QQMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.qq.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tif (!fileObj){\n\t\t\tMiniFileMgr.onSaveFile(readyUrl,\"\",false,encoding,callBack);\n\t\t\treturn;\n\t\t};\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.qq.mini.MiniFileMgr.filesListObj && laya.qq.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.qq.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.qq.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.fakeObj[fileurlkey].md5==MiniFileMgr.filesListObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!QQMiniAdapter.isZiYu &&QQMiniAdapter.isPosMsgYu && QQMiniAdapter.window.qq.postMessage){\n\t\t\tQQMiniAdapter.window.qq.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tfilesListStr=MiniFileMgr.fs.readFileSync(fileUrl,encoding);\n\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=QQMiniAdapter.window.qq.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=QQMiniAdapter.window.qq.getFileSystemManager();},'wxdown',function(){return this.wxdown=QQMiniAdapter.window.qq.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.qq.mini.MiniImage\nvar MiniImage$7=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.qq.mini.MiniImage',null,'MiniImage$7');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (QQMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$7.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$7.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$7.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (QQMiniAdapter.subNativeFiles && QQMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in QQMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=QQMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tQQMiniAdapter.subNativeheads=QQMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tQQMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(QQMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && QQMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=QQMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$7.getFileInfo(url)){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(QQMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$7.downOtherFiles(encodeURI(url),new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(QQMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$7.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$7.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(QQMiniAdapter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr$7.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$7.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tdelete MiniFileMgr$7.fakeObj[sourceUrl];\n\t\t\tdelete MiniFileMgr$7.filesListObj[sourceUrl];\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.qq.mini.MiniInput\nvar MiniInput$7=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.qq.mini.MiniInput',null,'MiniInput$7');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\t/*__JS__ */qq.onWindowResize && /*__JS__ */qq.onWindowResize(function(res){\n\t\t\t/*__JS__ */window.dispatchEvent && /*__JS__ */window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$7;\n\t\tSoundManager._musicClass=MiniSound$7;\n\t\tvar model=QQMiniAdapter.systemInfo.model;\n\t\tvar system=QQMiniAdapter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tQQMiniAdapter.window.qq.offKeyboardConfirm();\n\t\tQQMiniAdapter.window.qq.offKeyboardInput();\n\t\tQQMiniAdapter.window.qq.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tQQMiniAdapter.window.qq.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.qq.mini.MiniInput.inputEnter();\n\t\t})\n\t\tQQMiniAdapter.window.qq.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.qq.mini.MiniInput.inputEnter();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(){\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){\n\t\tMiniInput.hideKeyboard();\n\t}\n\n\tMiniInput.hideKeyboard=function(){\n\t\tQQMiniAdapter.window.qq.offKeyboardConfirm();\n\t\tQQMiniAdapter.window.qq.offKeyboardInput();\n\t\tQQMiniAdapter.window.qq.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.qq.mini.MiniLocalStorage\nvar MiniLocalStorage$7=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.qq.mini.MiniLocalStorage',null,'MiniLocalStorage$7');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\ttry{\n\t\t\t/*__JS__ */qq.setStorageSync(key,value);\n\t\t}\n\t\tcatch(error){\n\t\t\t/*__JS__ */qq.setStorage({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\treturn /*__JS__ */qq.getStorageSync(key);\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,value);\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\treturn MiniLocalStorage.getItem(key);\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\t/*__JS__ */qq.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\t/*__JS__ */qq.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=/*__JS__ */qq.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.qq.mini.MiniLocation\nvar MiniLocation$7=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.qq.mini.MiniLocation',null,'MiniLocation$7');\n\tMiniLocation.__init__=function(){\n\t\tQQMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tQQMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tQQMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tQQMiniAdapter.window.qq.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.qq.mini.MiniVideo\nvar MiniVideo$5=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=QQMiniAdapter.window.qq.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.qq.mini.MiniVideo',null,'MiniVideo$5');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n//class laya.qq.mini.QQMiniAdapter\nvar QQMiniAdapter=(function(){\n\tfunction QQMiniAdapter(){}\n\t__class(QQMiniAdapter,'laya.qq.mini.QQMiniAdapter');\n\tQQMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tQQMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (QQMiniAdapter._inited)return;\n\t\tQQMiniAdapter._inited=true;\n\t\tQQMiniAdapter.window=/*__JS__ */window;\n\t\tif(!QQMiniAdapter.window.hasOwnProperty(\"qq\"))\n\t\t\treturn;\n\t\tif(QQMiniAdapter.window.navigator.userAgent.indexOf('MiniGame')<0)return;\n\t\tQQMiniAdapter.isZiYu=isSon;\n\t\tQQMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tQQMiniAdapter.EnvConfig={};\n\t\ttry{\n\t\t\t/*__JS__ */laya.webgl.resource.WebGLCanvas.premulAlpha=true;\n\t\t\t}catch(e){\n\t\t}\n\t\tif(!QQMiniAdapter.isZiYu){\n\t\t\tMiniFileMgr$7.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$7.existDir(MiniFileMgr$7.fileNativeDir,Handler.create(QQMiniAdapter,QQMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tQQMiniAdapter.systemInfo=QQMiniAdapter.window.qq.getSystemInfoSync();\n\t\tif (QQMiniAdapter.systemInfo.system.toLowerCase()==='ios 10.1.1'){\n\t\t\ttry{\n\t\t\t\t/*__JS__ */laya.webgl.resource.WebGLCharImage.canUseCanvas=false;\n\t\t\t\t}catch(e){\n\t\t\t}\n\t\t}\n\t\tQQMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tQQMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tQQMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tQQMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tQQMiniAdapter.window.CanvasRenderingContext2D=function (){\n\t\t};\n\t\tQQMiniAdapter.window.CanvasRenderingContext2D.prototype=QQMiniAdapter.window.qq.createCanvas().getContext('2d').__proto__;\n\t\tQQMiniAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tQQMiniAdapter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=QQMiniAdapter.pixelRatio;\n\t\tQQMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=QQMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=QQMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=QQMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$7['_createInputElement'];\n\t\tQQMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$7.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$7.prototype._loadImage;\n\t\tLocalStorage._baseClass=MiniLocalStorage$7;\n\t\tMiniLocalStorage$7.__init__();\n\t\tQQMiniAdapter.onReciveData();\n\t\tConfig.useRetinalCanvas=true;\n\t}\n\n\tQQMiniAdapter.onReciveData=function(){\n\t\tif(laya.qq.mini.QQMiniAdapter.isZiYu){\n\t\t\tQQMiniAdapter.window.qq.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$7.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr$7.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$7.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr$7.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tQQMiniAdapter.measureText=function(str){\n\t\tvar tempObj=QQMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tQQMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tQQMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$7.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$7.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tQQMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$7.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tQQMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$7.deleteAll();\n\t}\n\n\tQQMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$7.isLocalNativeFile(fileUrl);\n\t}\n\n\tQQMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$7.getFileInfo(fileUrl);\n\t}\n\n\tQQMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$7.filesListObj;\n\t}\n\n\tQQMiniAdapter.exitMiniProgram=function(){\n\t\tQQMiniAdapter.window.qq.exitMiniProgram();\n\t}\n\n\tQQMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr$7.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr$7.fakeObj=JSON.parse(data.data);\n\t\t}\n\t}\n\n\tQQMiniAdapter.pixelRatio=function(){\n\t\tif (!QQMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tQQMiniAdapter.EnvConfig.pixelRatioInt=QQMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn QQMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn QQMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tQQMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (QQMiniAdapter.idx==1){\n\t\t\t\tif(QQMiniAdapter.isZiYu){\n\t\t\t\t\t_source=QQMiniAdapter.window.sharedCanvas;\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=QQMiniAdapter.window.canvas;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=QQMiniAdapter.window.qq.createCanvas();\n\t\t\t}\n\t\t\tQQMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn QQMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=QQMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn QQMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tQQMiniAdapter.onCreateInput=function(type){\n\t\tvar node=QQMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$7.wxinputFocus;\n\t\tnode.blur=MiniInput$7.wxinputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tQQMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tQQMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.qq.mini.QQMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tQQMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tQQMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$7.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$7.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tQQMiniAdapter.window.qq.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tQQMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$7.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$7.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tQQMiniAdapter.window.qq.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tQQMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.qq.mini.QQMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tQQMiniAdapter.window.qq.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tQQMiniAdapter.EnvConfig=null;\n\tQQMiniAdapter.window=null;\n\tQQMiniAdapter._preCreateElement=null;\n\tQQMiniAdapter._inited=false;\n\tQQMiniAdapter.systemInfo=null;\n\tQQMiniAdapter.isZiYu=false;\n\tQQMiniAdapter.isPosMsgYu=false;\n\tQQMiniAdapter.autoCacheFile=true;\n\tQQMiniAdapter.minClearSize=(5 *1024 *1024);\n\tQQMiniAdapter.subNativeFiles=null;\n\tQQMiniAdapter.subNativeheads=[];\n\tQQMiniAdapter.subMaps=[];\n\tQQMiniAdapter.AutoCacheDownFile=false;\n\tQQMiniAdapter._measureText=null;\n\tQQMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tQQMiniAdapter.idx=1;\n\t__static(QQMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"wxlocal\"];}\n\t]);\n\treturn QQMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.qq.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$7=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.qq.mini.MiniAccelerator',_super,'MiniAccelerator$7');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tQQMiniAdapter.window.qq.onAccelerometerChange(laya.qq.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tQQMiniAdapter.window.qq.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.qq.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$7=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.qq.mini.MiniLoader',_super,'MiniLoader$7');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=QQMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tQQMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(QQMiniAdapter.isZiYu && !MiniFileMgr$7.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(QQMiniAdapter.isZiYu && MiniFileMgr$7.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$7.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$7.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr$7.isLocalNativeFile(url)){\n\t\t\t\t\tif (QQMiniAdapter.subNativeFiles && QQMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in QQMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=QQMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tQQMiniAdapter.subNativeheads=QQMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tQQMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(QQMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && QQMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=QQMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr$7.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(QQMiniAdapter.window.qq.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !QQMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tQQMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$7.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$7.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tQQMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$7.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$7.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$7.downFiles(encodeURI(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,cache);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$7.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$7.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$7.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),URL.formatURL(url));\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=QQMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!QQMiniAdapter.isZiYu &&QQMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\" && QQMiniAdapter.window.qq){\n\t\t\t\tQQMiniAdapter.window.qq.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tconsole.log(\"-----------本地加载失败，尝试外网加载----\");\n\t\t\tQQMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.qq.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$7=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.qq.mini.MiniSound',_super,'MiniSound$7');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$7.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$7.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$7.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(QQMiniAdapter.autoCacheFile&&MiniFileMgr$7.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!QQMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$7.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (QQMiniAdapter.subNativeFiles && QQMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in QQMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=QQMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tQQMiniAdapter.subNativeheads=QQMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tQQMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(QQMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && QQMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=QQMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$7.downOtherFiles(url,Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(QQMiniAdapter.autoCacheFile){\n\t\t\t\tvar fileObj=MiniFileMgr$7.getFileInfo(sourceUrl);\n\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$7.getFileNativePath(fileMd5Name);\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t}\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\tthis._sound.onCanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\tthis._sound.onError(MiniSound.bindToThis(this.onError,this));\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\ttry{\n\t\t\tconsole.log(\"-----1---------------minisound-----id:\"+MiniSound._id);\n\t\t\tconsole.log(error);\n\t\t}\n\t\tcatch(error){\n\t\t\tconsole.log(\"-----2---------------minisound-----id:\"+MiniSound._id);\n\t\t\tconsole.log(error);\n\t\t}\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tthis._sound.offError(null);\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis._sound.offCanplay(null);\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(QQMiniAdapter.autoCacheFile&&MiniFileMgr$7.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr$7.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr$7.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=this.url;\n\t\t};\n\t\tvar channel=new MiniSoundChannel$7(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn QQMiniAdapter.window.qq.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.qq.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$7=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onEnded(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.qq.mini.MiniSoundChannel',_super,'MiniSoundChannel$7');\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.pause();\n\t\tthis._audio.offEnded(null);\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',null,function(time){\n\t\tif(this._audio){\n\t\t\tthis._audio.startTime=time;\n\t\t}\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.quickgamemini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,URL=laya.net.URL,Utils=laya.utils.Utils;\n/**@private **/\n//class laya.qg.mini.MiniFileMgr\nvar MiniFileMgr$3=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.qg.mini.MiniFileMgr',null,'MiniFileMgr$3');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=QGMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(QGMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.filesListObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(QGMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,callBack,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((QGMiniAdapter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\"qlogo.cn\")==-1 && readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tif(QGMiniAdapter.window.navigator.userAgent.indexOf('MiniGame')<0 && QGMiniAdapter.window.navigator.userAgent.indexOf('OPPO')<0){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > QGMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tQGMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > QGMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tQGMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=QGMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.qg.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.qg.mini.MiniFileMgr.filesListObj && laya.qg.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.qg.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.qg.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!QGMiniAdapter.isZiYu &&QGMiniAdapter.isPosMsgYu){\n\t\t\tQGMiniAdapter.window.qg.postMessage && QGMiniAdapter.window.qg.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tMiniFileMgr.fs.readFile({\n\t\t\t\tfilePath:fileUrl,\n\t\t\t\tencoding:encoding,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tfilesListStr=data.data;\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t\t\t},\n\t\t\t\tfail:function (){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=/*__JS__ */qg.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=QGMiniAdapter.window.qg.getFileSystemManager();},'wxdown',function(){return this.wxdown=QGMiniAdapter.window.qg.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.qg.mini.MiniImage\nvar MiniImage$3=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.qg.mini.MiniImage',null,'MiniImage$3');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tvar urlHeader=QGMiniAdapter.window.qg.env.USER_DATA_PATH;\n\t\tif (url.indexOf(urlHeader)!=-1 || url.indexOf(urlHeader)!=-1){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t}\n\t\tif (QGMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$3.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf('http://usr/')==-1&&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)){\n\t\t\t\tif(MiniFileMgr$3.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$3.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (QGMiniAdapter.subNativeFiles && QGMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in QGMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=QGMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tQGMiniAdapter.subNativeheads=QGMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tQGMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(QGMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && QGMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=QGMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$3.getFileInfo(url)){\n\t\t\tif (url.indexOf('http://usr/')==-1&&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)){\n\t\t\t\tif(QGMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$3.downOtherFiles(encodeURI(url),new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(QGMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$3.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$3.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(QGMiniAdapter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr$3.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$3.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.qg.mini.MiniInput\nvar MiniInput$3=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.qg.mini.MiniInput',null,'MiniInput$3');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\tQGMiniAdapter.window.qg.onWindowResize && QGMiniAdapter.window.qg.onWindowResize(function(res){\n\t\t\tQGMiniAdapter.window.dispatchEvent && QGMiniAdapter.window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$3;\n\t\tSoundManager._musicClass=MiniSound$3;\n\t\tvar model=QGMiniAdapter.systemInfo.model;\n\t\tvar system=QGMiniAdapter.systemInfo.system;\n\t\tif(model && model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system && (system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1)){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){}\n\tMiniInput.wxinputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tQGMiniAdapter.window.qg.showKeyboard({\n\t\t\tdefaultValue:_inputTarget.text,\n\t\t\tmaxLength:_inputTarget.maxChars,\n\t\t\tmultiple:_inputTarget.multiline,\n\t\t\tconfirmHold:true,\n\t\t\tconfirmType:'done',\n\t\t\tsuccess:function (res){\n\t\t\t},\n\t\t\tfail:function (res){}\n\t\t});\n\t\tQGMiniAdapter.window.qg.onKeyboardComplete(function(res){\n\t\t\tQGMiniAdapter.window.qg.offKeyboardComplete();\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (_inputTarget._restrictPattern){\n\t\t\t\tstr=str.replace(/\\u2006|\\x27/g,\"\");\n\t\t\t\tif (_inputTarget._restrictPattern.test(str)){\n\t\t\t\t\tstr=str.replace(_inputTarget._restrictPattern,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.qg.mini.MiniInput.inputEnter(true);\n\t\t});\n\t\tQGMiniAdapter.window.qg.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (_inputTarget._restrictPattern){\n\t\t\t\tstr=str.replace(/\\u2006|\\x27/g,\"\");\n\t\t\t\tif (_inputTarget._restrictPattern.test(str)){\n\t\t\t\t\tstr=str.replace(_inputTarget._restrictPattern,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.qg.mini.MiniInput.inputEnter(true);\n\t\t})\n\t\tQGMiniAdapter.window.qg.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.qg.mini.MiniInput.inputEnter(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_inputTarget._restrictPattern){\n\t\t\t\tstr=str.replace(/\\u2006|\\x27/g,\"\");\n\t\t\t\tif (_inputTarget._restrictPattern.test(str)){\n\t\t\t\t\tstr=str.replace(_inputTarget._restrictPattern,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.qg.mini.MiniInput.inputEnter(false);\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(isBool){\n\t\tif(isBool){\n\t\t\tMiniInput.hideKeyboard();\n\t\t}\n\t\tif(!Input['inputElement'].target)\n\t\t\treturn;\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){}\n\tMiniInput.hideKeyboard=function(){\n\t\tQGMiniAdapter.window.qg.offKeyboardConfirm();\n\t\tQGMiniAdapter.window.qg.offKeyboardInput();\n\t\tQGMiniAdapter.window.qg.hideKeyboard({\n\t\t\tsuccess:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.qg.mini.MiniLocalStorage\nvar MiniLocalStorage$3=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.qg.mini.MiniLocalStorage',null,'MiniLocalStorage$3');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\tQGMiniAdapter.window.qg.setStorageSync(key,value);\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\treturn QGMiniAdapter.window.qg.getStorageSync(key);\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\ttry{\n\t\t\tMiniLocalStorage.setItem(key,JSON.stringify(value));\n\t\t}\n\t\tcatch(error){\n\t\t\tMiniLocalStorage.setItem(key,value);\n\t\t}\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\tvar tempData=MiniLocalStorage.getItem(key);\n\t\ttry{\n\t\t\treturn JSON.parse(tempData);\n\t\t}\n\t\tcatch(error){\n\t\t\treturn tempData;\n\t\t}\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\tQGMiniAdapter.window.qg.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\tQGMiniAdapter.window.qg.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=QGMiniAdapter.window.qg.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.qg.mini.MiniLocation\nvar MiniLocation$3=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.qg.mini.MiniLocation',null,'MiniLocation$3');\n\tMiniLocation.__init__=function(){\n\t\tQGMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tQGMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tQGMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tQGMiniAdapter.window.qg.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.qg.mini.MiniVideo\nvar MiniVideo$1=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.videoW=NaN;\n\t\tthis.videoH=NaN;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoW=width;\n\t\tthis.videoH=height;\n\t}\n\n\t__class(MiniVideo,'laya.qg.mini.MiniVideo',null,'MiniVideo$1');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tthis.videoend=true;\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement){\n\t\t\tthis.videoElement=QGMiniAdapter.window.qg.createVideo({width:this.videoW,height:this.videoH,autoplay:true,src:url});\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t\t}else{\n\t\t\tthis.videoElement.src=url;\n\t\t}\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n//class laya.qg.mini.QGMiniAdapter\nvar QGMiniAdapter=(function(){\n\tfunction QGMiniAdapter(){}\n\t__class(QGMiniAdapter,'laya.qg.mini.QGMiniAdapter');\n\tQGMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tQGMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (QGMiniAdapter._inited)return;\n\t\tQGMiniAdapter._inited=true;\n\t\tQGMiniAdapter.window=/*__JS__ */window;\n\t\tif(!QGMiniAdapter.window.hasOwnProperty('qg'))\n\t\t\treturn;\n\t\tif(QGMiniAdapter.window.navigator.userAgent.indexOf('OPPO')<0)return;\n\t\tQGMiniAdapter.isZiYu=isSon;\n\t\tQGMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tQGMiniAdapter.EnvConfig={};\n\t\ttry{\n\t\t\t/*__JS__ */laya.webgl.resource.WebGLCanvas.premulAlpha=true;\n\t\t\t}catch(e){\n\t\t}\n\t\tif(!QGMiniAdapter.isZiYu){\n\t\t\tif(!/*__JS__ */qg){\n\t\t\t\tconsole.log(\"======qg null======================\");\n\t\t\t}\n\t\t\tif(!/*__JS__ */qg.env){\n\t\t\t\tconsole.log(\"======qg.env  null======================\");\n\t\t\t}\n\t\t\tMiniFileMgr$3.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$3.existDir(MiniFileMgr$3.fileNativeDir,Handler.create(QGMiniAdapter,QGMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tQGMiniAdapter.window.qg.getSystemInfo({\n\t\t\tsuccess:function (data){\n\t\t\t\tQGMiniAdapter.systemInfo=data;\n\t\t\t}\n\t\t});\n\t\tQGMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tQGMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tQGMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tQGMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tQGMiniAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tQGMiniAdapter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=QGMiniAdapter.pixelRatio;\n\t\tQGMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=QGMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=QGMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=QGMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$3['_createInputElement'];\n\t\tQGMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$3.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$3.prototype._loadImage;\n\t\tQGMiniAdapter.onReciveData();\n\t\tConfig.useRetinalCanvas=true;\n\t}\n\n\tQGMiniAdapter.onReciveData=function(){\n\t\tif(laya.qg.mini.QGMiniAdapter.isZiYu && QGMiniAdapter.window.qg.onMessage){\n\t\t\tQGMiniAdapter.window.qg.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$3.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr$3.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$3.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr$3.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tQGMiniAdapter.measureText=function(str){\n\t\tvar tempObj=QGMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tQGMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tQGMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$3.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$3.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tQGMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$3.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tQGMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$3.deleteAll();\n\t}\n\n\tQGMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$3.isLocalNativeFile(fileUrl);\n\t}\n\n\tQGMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$3.getFileInfo(fileUrl);\n\t}\n\n\tQGMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$3.filesListObj;\n\t}\n\n\tQGMiniAdapter.exitMiniProgram=function(){\n\t\tQGMiniAdapter.window.qg.exitMiniProgram();\n\t}\n\n\tQGMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode)\n\t\t\tMiniFileMgr$3.filesListObj=JSON.parse(data.data);\n\t}\n\n\tQGMiniAdapter.pixelRatio=function(){\n\t\tif (!QGMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tQGMiniAdapter.systemInfo.pixelRatio=QGMiniAdapter.window.devicePixelRatio;\n\t\t\t\tQGMiniAdapter.EnvConfig.pixelRatioInt=QGMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn QGMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn QGMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tQGMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (QGMiniAdapter.idx==1){\n\t\t\t\tif(QGMiniAdapter.isZiYu){\n\t\t\t\t\t_source=QGMiniAdapter.window.document.createElement(\"canvas\");\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=QGMiniAdapter.window.__canvas;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=QGMiniAdapter.window.document.createElement(\"canvas\");\n\t\t\t}\n\t\t\tQGMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn QGMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=QGMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn QGMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tQGMiniAdapter.onCreateInput=function(type){\n\t\tvar node=QGMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$3.wxinputFocus;\n\t\tnode.blur=MiniInput$3.wxinputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tQGMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tQGMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.qg.mini.QGMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tQGMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tQGMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$3.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$3.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tQGMiniAdapter.window.qg.postMessage && QGMiniAdapter.window.qg.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tQGMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$3.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$3.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tQGMiniAdapter.window.qg.postMessage && QGMiniAdapter.window.qg.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tQGMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.qg.mini.QGMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tQGMiniAdapter.window.qg.postMessage && QGMiniAdapter.window.qg.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tQGMiniAdapter.EnvConfig=null;\n\tQGMiniAdapter.window=null;\n\tQGMiniAdapter._preCreateElement=null;\n\tQGMiniAdapter._inited=false;\n\tQGMiniAdapter.systemInfo={};\n\tQGMiniAdapter.isZiYu=false;\n\tQGMiniAdapter.isPosMsgYu=false;\n\tQGMiniAdapter.autoCacheFile=true;\n\tQGMiniAdapter.minClearSize=(5 *1024 *1024);\n\tQGMiniAdapter.subNativeFiles=null;\n\tQGMiniAdapter.subNativeheads=[];\n\tQGMiniAdapter.subMaps=[];\n\tQGMiniAdapter.AutoCacheDownFile=false;\n\tQGMiniAdapter._measureText=null;\n\tQGMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tQGMiniAdapter.idx=1;\n\t__static(QGMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"qgfile\"];}\n\t]);\n\treturn QGMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.qg.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$3=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.qg.mini.MiniAccelerator',_super,'MiniAccelerator$3');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onAccelerometerChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tQGMiniAdapter.window.qg.onAccelerometerChange(laya.qg.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tQGMiniAdapter.window.qg.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.qg.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$3=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.qg.mini.MiniLoader',_super,'MiniLoader$3');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (!url){\n\t\t\tthisLoader.onLoaded(null);\n\t\t\treturn;\n\t\t}\n\t\turl=URL.customFormat(url);\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(thisLoader._url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=QGMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tQGMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(QGMiniAdapter.isZiYu && !MiniFileMgr$3.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(QGMiniAdapter.isZiYu && MiniFileMgr$3.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$3.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$3.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr$3.isLocalNativeFile(url)){\n\t\t\t\t\tif (QGMiniAdapter.subNativeFiles && QGMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in QGMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=QGMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tQGMiniAdapter.subNativeheads=QGMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tQGMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(QGMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && QGMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=QGMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr$3.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(QGMiniAdapter.window.qg.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !QGMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tQGMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$3.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$3.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tQGMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$3.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$3.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$3.downFiles(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,cache);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$3.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$3.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$3.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),URL.formatURL(url));\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=QGMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!QGMiniAdapter.isZiYu &&QGMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\"){\n\t\t\t\tQGMiniAdapter.window.qg.postMessage && QGMiniAdapter.window.qg.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tconsole.log(\"-----------本地加载失败，尝试外网加载----\");\n\t\t\tQGMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.qg.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$3=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t\tthis._sound=MiniSound._createSound();\n\t}\n\n\t__class(MiniSound,'laya.qg.mini.MiniSound',_super,'MiniSound$3');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$3.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$3.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$3.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif(QGMiniAdapter.autoCacheFile&&MiniFileMgr$3.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!QGMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$3.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (QGMiniAdapter.subNativeFiles && QGMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in QGMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=QGMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tQGMiniAdapter.subNativeheads=QGMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tQGMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(QGMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && QGMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=QGMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tif((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)\n\t\t\t\t\t\t|| url.indexOf(QGMiniAdapter.window.my.env.USER_DATA_PATH)!=-1){\n\t\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else\n\t\t\t\t\tMiniFileMgr$3.downOtherFiles(url,Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(QGMiniAdapter.autoCacheFile){\n\t\t\t\tif (MiniFileMgr$3.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$3.getFileInfo(sourceUrl);\n\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$3.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tfileNativeUrl=encodeURI(sourceUrl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tif(!this.url)return null;\n\t\tvar channel=new MiniSoundChannel$3(this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tif (this._sound){\n\t\t\tthis._sound.destroy();\n\t\t\tthis._sound=null;\n\t\t\tthis.readyUrl=this.url=null;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tif(MiniSound._audioCache.length){\n\t\t\treturn MiniSound._audioCache.pop();\n\t\t\t}else{\n\t\t\tMiniSound._id++;\n\t\t\treturn QGMiniAdapter.window.qg.createInnerAudioContext();\n\t\t}\n\t}\n\n\tMiniSound._id=0;\n\tMiniSound._audioCache=[];\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.qg.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$3=(function(_super){\n\tfunction MiniSoundChannel(miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\tthis._onCanplay=null;\n\t\tthis._onError=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=miniSound._sound;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\tthis._onCanplay=MiniSoundChannel.bindToThis(this.onCanPlay,this);\n\t\tthis._onError=MiniSoundChannel.bindToThis(this.onError,this);\n\t\tthis.addEventListener();\n\t}\n\n\t__class(MiniSoundChannel,'laya.qg.mini.MiniSoundChannel',_super,'MiniSoundChannel$3');\n\tvar __proto=MiniSoundChannel.prototype;\n\t__proto.addEventListener=function(){\n\t\tthis._audio.onError(this._onError);\n\t\tthis._audio.onCanplay(this._onCanplay);\n\t}\n\n\t//_audio.onEnded(_onEnd);\n\t__proto.offEventListener=function(){\n\t\tthis._audio.offError(this._onError);\n\t\tthis._audio.offCanplay(this._onCanplay);\n\t\tthis._audio.offEnded(this._onEnd);\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\tconsole.log(\"-----1---------------minisound-----url:\",this.url);\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",[error]);\n\t\tif(!this._audio)return;\n\t\tthis._miniSound.dispose();\n\t\tthis.offEventListener();\n\t\tthis._audio=this._miniSound=null;\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tif(!this._audio)return;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis.offEventListener();\n\t\tthis._audio.onEnded(this._onEnd);\n\t\tif (!this.isStopped){\n\t\t\tthis.play()\n\t\t\t}else{\n\t\t\tthis.stop();\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tif(!this._audio || !this._audio.src)return;\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\t_super.prototype.stop.call(this);\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tif (!this.loop){\n\t\t\tthis.offEventListener();\n\t\t\tthis._miniSound.dispose();\n\t\t\tthis._miniSound=null;\n\t\t\tthis._audio=null;\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tif(!this._audio)return;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',function(){\n\t\tif(!this._audio)return 0;\n\t\treturn this._audio.startTime;\n\t\t},function(time){\n\t\tif(!this._audio)return;\n\t\tthis._audio.startTime=time;\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\tif(!this._audio)return false;\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tif(!this._audio)return;\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this._audio)return false;\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tif(!this._audio)return;\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.tbmini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,ResourceVersion=laya.net.ResourceVersion;\n\tvar RunDriver=laya.utils.RunDriver,SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager;\n\tvar URL=laya.net.URL,Utils=laya.utils.Utils;\n/**@private **/\n//class laya.tb.mini.MiniFileMgr\nvar MiniFileMgr$10=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.tb.mini.MiniFileMgr',null,'MiniFileMgr$10');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=TBMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(TBMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.isSubNativeFile=function(url){\n\t\tfor(var i=0,sz=TBMiniAdapter.subNativeheads.length;i<sz;i++){\n\t\t\tif(url.indexOf(TBMiniAdapter.subNativeheads[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif(!data.hasOwnProperty(\"statusCode\")){\n\t\t\t\t\tdata.statusCode=200;\n\t\t\t\t}\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.apFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding,isAutoClear);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif(!data.hasOwnProperty(\"statusCode\")){\n\t\t\t\t\tdata.statusCode=200;\n\t\t\t\t}\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif (isSaveFile && readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.apFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.apFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.apFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding,cacheFile){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(cacheFile===void 0)&& (cacheFile=false);\n\t\tif(Browser.window.hasOwnProperty(\"my\")){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,cacheFile,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,cacheFile);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > TBMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tTBMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > TBMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tTBMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=TBMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.tb.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.tb.mini.MiniFileMgr.filesListObj && laya.tb.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.tb.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.tb.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.filesListObj[fileurlkey].md5==MiniFileMgr.fakeObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!TBMiniAdapter.isZiYu &&TBMiniAdapter.isPosMsgYu && TBMiniAdapter.window.my.postMessage){\n\t\t\tTBMiniAdapter.window.my.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.error==10025)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tMiniFileMgr.fs.readFile({\n\t\t\t\tfilePath:fileUrl,\n\t\t\t\tencoding:encoding,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tfilesListStr=data.data;\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t\t\t},\n\t\t\t\tfail:function (){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=TBMiniAdapter.window.my.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=TBMiniAdapter.window.my.getFileSystemManager();},'wxdown',function(){return this.wxdown=TBMiniAdapter.window.my.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.tb.mini.MiniImage\nvar MiniImage$10=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.tb.mini.MiniImage',null,'MiniImage$10');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\turl=URL.formatURL(url);\n\t\tif (MiniFileMgr$10.isLocalNativeFile(url)|| (url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)){\n\t\t\tif (url.indexOf(TBMiniAdapter.window.my.env.USER_DATA_PATH)!=-1){\n\t\t\t\tMiniImage.onCreateImage(url,thisLoader,false,url);\n\t\t\t\t}else{\n\t\t\t\tif(MiniFileMgr$10.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$10.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}\n\t\t\t}else{\n\t\t\tMiniImage.onCreateImage(url,thisLoader,false,encodeURI(url));\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif (!isLocal){\n\t\t\tif (tempFilePath !=\"\"){\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t}else{\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif (MiniFileMgr$10.isSubNativeFile(sourceUrl)){\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=TBMiniAdapter.baseDir+sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl];\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tdelete MiniFileMgr$10.filesListObj[sourceUrl];\n\t\t\tdelete MiniFileMgr$10.fakeObj[sourceUrl];\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.tb.mini.MiniInput\nvar MiniInput$10=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.tb.mini.MiniInput',null,'MiniInput$10');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tSoundManager._soundClass=MiniSound$10;\n\t\tSoundManager._musicClass=MiniSound$10;\n\t\tvar model=TBMiniAdapter.systemInfo.model;\n\t\tvar system=TBMiniAdapter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\treturn;\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tTBMiniAdapter.window.my.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tTBMiniAdapter.window.my.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.tb.mini.MiniInput.inputEnter(true);\n\t\t})\n\t\tTBMiniAdapter.window.my.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.tb.mini.MiniInput.inputEnter(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(isBool){\n\t\treturn\n\t\tif(isBool){\n\t\t\tMiniInput.hideKeyboard();\n\t\t}\n\t\tif(!Input['inputElement'].target)\n\t\t\treturn;\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){}\n\tMiniInput.hideKeyboard=function(){\n\t\treturn\n\t\tTBMiniAdapter.window.my.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.tb.mini.MiniLocalStorage\nvar MiniLocalStorage$9=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.tb.mini.MiniLocalStorage',null,'MiniLocalStorage$9');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\ttry{\n\t\t\tTBMiniAdapter.window.my.setStorageSync({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t\tcatch(error){\n\t\t\tTBMiniAdapter.window.my.setStorage({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\tvar data=TBMiniAdapter.window.my.getStorageSync({\"key\":key});\n\t\tif (data.success)\n\t\t\treturn data.data;\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,value);\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\treturn MiniLocalStorage.getItem(key);\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\tTBMiniAdapter.window.my.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\tTBMiniAdapter.window.my.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=TBMiniAdapter.window.my.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.tb.mini.MiniLocation\nvar MiniLocation$10=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.tb.mini.MiniLocation',null,'MiniLocation$10');\n\tMiniLocation.__init__=function(){\n\t\tTBMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tTBMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tTBMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tTBMiniAdapter.window.my.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.tb.mini.MiniVideo\nvar MiniVideo$8=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=TBMiniAdapter.window.my.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.tb.mini.MiniVideo',null,'MiniVideo$8');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n//class laya.tb.mini.TBMiniAdapter\nvar TBMiniAdapter=(function(){\n\tfunction TBMiniAdapter(){}\n\t__class(TBMiniAdapter,'laya.tb.mini.TBMiniAdapter');\n\tTBMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tTBMiniAdapter.init=function(){\n\t\tif (TBMiniAdapter._inited)return;\n\t\tTBMiniAdapter._inited=true;\n\t\tTBMiniAdapter.window=/*__JS__ */window;\n\t\tvar u=TBMiniAdapter.window.navigator.userAgent;\n\t\tif(!(u.indexOf('TB')>-1 || u.indexOf('Taobao')>-1 || u.indexOf('TM/')>-1))\n\t\t\treturn;\n\t\tTBMiniAdapter.EnvConfig={};\n\t\tMiniFileMgr$10.setNativeFileDir(\"/layaairGame\");\n\t\tMiniFileMgr$10.existDir(MiniFileMgr$10.fileNativeDir,Handler.create(TBMiniAdapter,TBMiniAdapter.onMkdirCallBack));\n\t\tTBMiniAdapter.systemInfo=TBMiniAdapter.window.my.getSystemInfoSync();\n\t\tTBMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tTBMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tTBMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tTBMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tTBMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=TBMiniAdapter.createElement;\n\t\tTBMiniAdapter.window.CanvasRenderingContext2D=function (){};\n\t\tTBMiniAdapter.window.CanvasRenderingContext2D.prototype=TBMiniAdapter._preCreateElement('canvas').getContext('2d').__proto__;\n\t\tTBMiniAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tRunDriver.createShaderCondition=TBMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=TBMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$10['_createInputElement'];\n\t\tTBMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$10.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$10.prototype._loadImage;\n\t\tLocalStorage._baseClass=MiniLocalStorage$9;\n\t\tMiniLocalStorage$9.__init__();\n\t\tConfig.useRetinalCanvas=true;\n\t}\n\n\tTBMiniAdapter.measureText=function(str){\n\t\tvar tempObj=TBMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tTBMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tTBMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$10.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$10.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tTBMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$10.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tTBMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$10.deleteAll();\n\t}\n\n\tTBMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$10.isLocalNativeFile(fileUrl);\n\t}\n\n\tTBMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$10.getFileInfo(fileUrl);\n\t}\n\n\tTBMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$10.filesListObj;\n\t}\n\n\tTBMiniAdapter.exitMiniProgram=function(){\n\t\tTBMiniAdapter.window.my.exitMiniProgram();\n\t}\n\n\tTBMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr$10.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr$10.fakeObj=JSON.parse(data.data);\n\t\t}\n\t}\n\n\tTBMiniAdapter.pixelRatio=function(){\n\t\tif (!TBMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tTBMiniAdapter.EnvConfig.pixelRatioInt=TBMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn TBMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn TBMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tTBMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (TBMiniAdapter.idx==1){\n\t\t\t\t_source=TBMiniAdapter.window.canvas.getRealCanvas();\n\t\t\t\t}else {\n\t\t\t\t_source=TBMiniAdapter._preCreateElement(type);\n\t\t\t}\n\t\t\t(!_source.style)&& (_source.style={});\n\t\t\tTBMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn TBMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=TBMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn TBMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tTBMiniAdapter.onCreateInput=function(type){\n\t\tvar node=TBMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$10.wxinputFocus;\n\t\tnode.blur=MiniInput$10.wxinputblur;\n\t\tnode.value=0;\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\treturn node;\n\t}\n\n\tTBMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tTBMiniAdapter.EnvConfig=null;\n\tTBMiniAdapter.window=null;\n\tTBMiniAdapter._preCreateElement=null;\n\tTBMiniAdapter._inited=false;\n\tTBMiniAdapter.systemInfo=null;\n\tTBMiniAdapter.isPosMsgYu=false;\n\tTBMiniAdapter.autoCacheFile=true;\n\tTBMiniAdapter.minClearSize=(5 *1024 *1024);\n\tTBMiniAdapter.subNativeFiles={};\n\tTBMiniAdapter.subNativeheads=[];\n\tTBMiniAdapter.subMaps=[];\n\tTBMiniAdapter.AutoCacheDownFile=false;\n\tTBMiniAdapter.baseDir=\"pages/index/\";\n\tTBMiniAdapter._measureText=null;\n\tTBMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tTBMiniAdapter.idx=1;\n\t__static(TBMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\"];}\n\t]);\n\treturn TBMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.tb.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$10=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.tb.mini.MiniAccelerator',_super,'MiniAccelerator$10');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tTBMiniAdapter.window.my.onAccelerometerChange(laya.tb.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tTBMiniAdapter.window.my.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tb.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$10=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.tb.mini.MiniLoader',_super,'MiniLoader$10');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t}\n\t\tif (MiniFileMgr$10.isLocalNativeFile(url)&& !MiniFileMgr$10.getFileInfo(url)){\n\t\t\tif (TBMiniAdapter.subNativeFiles && TBMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in TBMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=TBMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tTBMiniAdapter.subNativeheads=TBMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tTBMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(TBMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && TBMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=TBMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar encoding=TBMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tTBMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif (!MiniFileMgr$10.getFileInfo(url)){\n\t\t\t\tif (MiniFileMgr$10.isLocalNativeFile(url)){\n\t\t\t\t\tif (MiniFileMgr$10.isSubNativeFile(url)){\n\t\t\t\t\t\tMiniFileMgr$10.readFile(ResourceVersion.addVersionPrefix(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\t}else\n\t\t\t\t\tMiniFileMgr$10.readFile(TBMiniAdapter.baseDir+ResourceVersion.addVersionPrefix(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\t\tfileObj=MiniFileMgr$10.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$10.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1))){\n\t\t\t\t\t\t\tMiniFileMgr$10.readFile(TBMiniAdapter.baseDir+url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$10.downFiles(encodeURI(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,TBMiniAdapter.AutoCacheDownFile);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$10.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$10.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$10.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=TBMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tthisLoader.onError && thisLoader.onError(data);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tb.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$10=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t\tthis._sound=MiniSound._createSound();\n\t}\n\n\t__class(MiniSound,'laya.tb.mini.MiniSound',_super,'MiniSound$10');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$10.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$10.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$10.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif(TBMiniAdapter.autoCacheFile&&MiniFileMgr$10.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!TBMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$10.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (TBMiniAdapter.subNativeFiles && TBMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in TBMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=TBMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tTBMiniAdapter.subNativeheads=TBMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tTBMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(TBMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && TBMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=TBMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tif ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)\n\t\t\t\t\t\t|| url.indexOf(TBMiniAdapter.window.my.env.USER_DATA_PATH)!=-1){\n\t\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tMiniFileMgr$10.downOtherFiles(url,Handler.create(this,this.onDownLoadCallBack,[url]),url,TBMiniAdapter.autoCacheFile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode && this._sound){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(TBMiniAdapter.autoCacheFile){\n\t\t\t\tif(tempFilePath==\"\"){\n\t\t\t\t\tif (MiniFileMgr$10.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL._basePath;\n\t\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (MiniFileMgr$10.isSubNativeFile(fileNativeUrl)){\n\t\t\t\t\t\t\tfileNativeUrl=fileNativeUrl;\n\t\t\t\t\t\t}else\n\t\t\t\t\t\tfileNativeUrl=TBMiniAdapter.baseDir+fileNativeUrl;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tvar fileObj=MiniFileMgr$10.getFileInfo(sourceUrl);\n\t\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$10.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (sourceUrl.indexOf(\"http://\")==-1\n\t\t\t\t\t\t\t\t&& sourceUrl.indexOf(\"https://\")==-1\n\t\t\t\t\t\t\t&& sourceUrl.indexOf(TBMiniAdapter.window.my.env.USER_DATA_PATH)==-1){\n\t\t\t\t\t\t\t\tfileNativeUrl=TBMiniAdapter.baseDir+sourceUrl;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t}\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tif((MiniFileMgr$10.isLocalNativeFile(sourceUrl)&& !MiniFileMgr$10.isSubNativeFile(sourceUrl))||\n\t\t\t\t\t(\n\t\t\t\tsourceUrl.indexOf(\"http://\")==-1\n\t\t\t\t&&sourceUrl.indexOf(\"https://\")==-1\n\t\t\t\t&&sourceUrl.indexOf(TBMiniAdapter.window.my.env.USER_DATA_PATH)==-1)){\n\t\t\t\t\tsourceUrl=TBMiniAdapter.baseDir+sourceUrl;\n\t\t\t\t}\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tif(!this.url)return null;\n\t\tvar channel=new MiniSoundChannel$10(this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.isStopped=false;\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tif (this._sound){\n\t\t\tthis._sound.src=\"\";\n\t\t\tMiniSound._audioCache.push(this._sound);\n\t\t\tthis._sound=null;\n\t\t\tthis.readyUrl=this.url=null;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tif(MiniSound._audioCache.length){\n\t\t\treturn MiniSound._audioCache.pop();\n\t\t\t}else{\n\t\t\tMiniSound._id++;\n\t\t\treturn TBMiniAdapter.window.my.createInnerAudioContext();\n\t\t}\n\t}\n\n\tMiniSound._id=0;\n\tMiniSound._audioCache=[];\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tb.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$10=(function(_super){\n\tfunction MiniSoundChannel(miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\tthis._onCanplay=null;\n\t\tthis._onError=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=miniSound._sound;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\tthis._onCanplay=MiniSoundChannel.bindToThis(this.onCanPlay,this);\n\t\tthis._onError=MiniSoundChannel.bindToThis(this.onError,this);\n\t\tthis.addEventListener();\n\t}\n\n\t__class(MiniSoundChannel,'laya.tb.mini.MiniSoundChannel',_super,'MiniSoundChannel$10');\n\tvar __proto=MiniSoundChannel.prototype;\n\t__proto.addEventListener=function(){\n\t\tthis._audio.onError(this._onError);\n\t\tthis._audio.onCanplay(this._onCanplay);\n\t}\n\n\t//_audio.onEnded(_onEnd);\n\t__proto.offEventListener=function(){\n\t\tthis._audio.offError(this._onError);\n\t\tthis._audio.offCanplay(this._onCanplay);\n\t\tthis._audio.offEnded(this._onEnd);\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\tconsole.log(\"-----1---------------minisound-----url:\",this.url);\n\t\tconsole.log(error);\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tif(!this._audio)return;\n\t\tthis._miniSound.dispose();\n\t\tthis.offEventListener();\n\t\tthis._audio=this._miniSound=null;\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tif(!this._audio)return;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis.offEventListener();\n\t\tthis._audio.onEnded(this._onEnd);\n\t\tif (!this.isStopped){\n\t\t\tthis.play()\n\t\t\t}else{\n\t\t\tthis.stop();\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tif(!this._audio)return;\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\t_super.prototype.stop.call(this);\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tif (!this.loop){\n\t\t\tthis.offEventListener();\n\t\t\tthis._miniSound.dispose();\n\t\t\tthis._miniSound=null;\n\t\t\tthis._audio=null;\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tif(!this._audio)return;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',function(){\n\t\tif(!this._audio)return 0;\n\t\treturn this._audio.startTime;\n\t\t},function(time){\n\t\tif(!this._audio)return;\n\t\tthis._audio.startTime=time;\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\tif(!this._audio)return false;\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tif(!this._audio)return;\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this._audio)return false;\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tif(!this._audio)return;\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.tbplugin.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,ResourceVersion=laya.net.ResourceVersion;\n\tvar RunDriver=laya.utils.RunDriver,SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager;\n\tvar URL=laya.net.URL,Utils=laya.utils.Utils;\n/**@private **/\n//class laya.tbplugin.mini.MiniFileMgr\nvar MiniFileMgr$11=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.tbplugin.mini.MiniFileMgr',null,'MiniFileMgr$11');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=TBPluginAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(TBPluginAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif(!data.hasOwnProperty(\"statusCode\")){\n\t\t\t\t\tdata.statusCode=200;\n\t\t\t\t}\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.apFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding,isAutoClear);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif(!data.hasOwnProperty(\"statusCode\")){\n\t\t\t\t\tdata.statusCode=200;\n\t\t\t\t}\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif (isSaveFile && readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.apFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.apFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.apFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding,cacheFile){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(cacheFile===void 0)&& (cacheFile=false);\n\t\tif(Browser.window.hasOwnProperty(\"my\")){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,cacheFile,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,cacheFile);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > TBPluginAdapter.minClearSize)\n\t\t\t\t\t\t\t\tTBPluginAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > TBPluginAdapter.minClearSize)\n\t\t\t\t\t\t\tTBPluginAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=TBPluginAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.tbplugin.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.tbplugin.mini.MiniFileMgr.filesListObj && laya.tbplugin.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.tbplugin.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.tbplugin.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.filesListObj[fileurlkey].md5==MiniFileMgr.fakeObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!TBPluginAdapter.isZiYu &&TBPluginAdapter.isPosMsgYu && TBPluginAdapter.window.my.postMessage){\n\t\t\tTBPluginAdapter.window.my.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.error==10025)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tMiniFileMgr.fs.readFile({\n\t\t\t\tfilePath:fileUrl,\n\t\t\t\tencoding:encoding,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tfilesListStr=data.data;\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t\t\t},\n\t\t\t\tfail:function (){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=TBPluginAdapter.window.my.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=TBPluginAdapter.window.my.getFileSystemManager();},'wxdown',function(){return this.wxdown=TBPluginAdapter.window.my.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.tbplugin.mini.MiniImage\nvar MiniImage$11=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.tbplugin.mini.MiniImage',null,'MiniImage$11');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\turl=URL.formatURL(url);\n\t\tif (MiniFileMgr$11.isLocalNativeFile(url)|| (url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)){\n\t\t\tif (url.indexOf(TBPluginAdapter.window.my.env.USER_DATA_PATH)!=-1){\n\t\t\t\tMiniImage.onCreateImage(url,thisLoader,false,url);\n\t\t\t\t}else{\n\t\t\t\tif(MiniFileMgr$11.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$11.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}\n\t\t\t}else{\n\t\t\tMiniImage.onCreateImage(url,thisLoader,false,encodeURI(url));\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif (!isLocal){\n\t\t\tif (tempFilePath !=\"\"){\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t}else{\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}\n\t\t}\n\t\telse\n\t\tfileNativeUrl=TBPluginAdapter.baseDir+sourceUrl;\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl];\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tdelete MiniFileMgr$11.filesListObj[sourceUrl];\n\t\t\tdelete MiniFileMgr$11.fakeObj[sourceUrl];\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.tbplugin.mini.MiniInput\nvar MiniInput$11=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.tbplugin.mini.MiniInput',null,'MiniInput$11');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tSoundManager._soundClass=MiniSound$11;\n\t\tSoundManager._musicClass=MiniSound$11;\n\t\tvar model=TBPluginAdapter.systemInfo.model;\n\t\tvar system=TBPluginAdapter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\treturn;\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tTBPluginAdapter.window.my.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tTBPluginAdapter.window.my.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.tbplugin.mini.MiniInput.inputEnter(true);\n\t\t})\n\t\tTBPluginAdapter.window.my.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.tbplugin.mini.MiniInput.inputEnter(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(isBool){\n\t\treturn\n\t\tif(isBool){\n\t\t\tMiniInput.hideKeyboard();\n\t\t}\n\t\tif(!Input['inputElement'].target)\n\t\t\treturn;\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){}\n\tMiniInput.hideKeyboard=function(){\n\t\treturn\n\t\tTBPluginAdapter.window.my.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.tbplugin.mini.MiniLocalStorage\nvar MiniLocalStorage$10=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.tbplugin.mini.MiniLocalStorage',null,'MiniLocalStorage$10');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\ttry{\n\t\t\tTBPluginAdapter.window.my.setStorageSync({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t\tcatch(error){\n\t\t\tTBPluginAdapter.window.my.setStorage({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\tvar data=TBPluginAdapter.window.my.getStorageSync({\"key\":key});\n\t\tif (data.success)\n\t\t\treturn data.data;\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,value);\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\treturn MiniLocalStorage.getItem(key);\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\tTBPluginAdapter.window.my.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\tTBPluginAdapter.window.my.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=TBPluginAdapter.window.my.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.tbplugin.mini.MiniLocation\nvar MiniLocation$11=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.tbplugin.mini.MiniLocation',null,'MiniLocation$11');\n\tMiniLocation.__init__=function(){\n\t\tTBPluginAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tTBPluginAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tTBPluginAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tTBPluginAdapter.window.my.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.tbplugin.mini.MiniVideo\nvar MiniVideo$9=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=TBPluginAdapter.window.my.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.tbplugin.mini.MiniVideo',null,'MiniVideo$9');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n//class laya.tbplugin.mini.TBPluginAdapter\nvar TBPluginAdapter=(function(){\n\tfunction TBPluginAdapter(){}\n\t__class(TBPluginAdapter,'laya.tbplugin.mini.TBPluginAdapter');\n\tTBPluginAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tTBPluginAdapter.init=function(){\n\t\tif (TBPluginAdapter._inited)return;\n\t\tTBPluginAdapter._inited=true;\n\t\tTBPluginAdapter.window=/*__JS__ */window;\n\t\tvar u=TBPluginAdapter.window.navigator.userAgent;\n\t\tif(!(u.indexOf('TB')>-1 || u.indexOf('Taobao')>-1 || u.indexOf('TM/')>-1))\n\t\t\treturn;\n\t\tTBPluginAdapter.EnvConfig={};\n\t\tMiniFileMgr$11.setNativeFileDir(\"/layaairGame\");\n\t\tMiniFileMgr$11.existDir(MiniFileMgr$11.fileNativeDir,Handler.create(TBPluginAdapter,TBPluginAdapter.onMkdirCallBack));\n\t\tTBPluginAdapter.systemInfo=TBPluginAdapter.window.my.getSystemInfoSync();\n\t\tTBPluginAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tTBPluginAdapter.window.logtime=function (str){\n\t\t};\n\t\tTBPluginAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tTBPluginAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tTBPluginAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=TBPluginAdapter.createElement;\n\t\tTBPluginAdapter.window.CanvasRenderingContext2D=function (){};\n\t\tTBPluginAdapter.window.CanvasRenderingContext2D.prototype=TBPluginAdapter._preCreateElement('canvas').getContext('2d').__proto__;\n\t\tTBPluginAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tRunDriver.createShaderCondition=TBPluginAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=TBPluginAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$11['_createInputElement'];\n\t\tTBPluginAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$11.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$11.prototype._loadImage;\n\t\tLocalStorage._baseClass=MiniLocalStorage$10;\n\t\tMiniLocalStorage$10.__init__();\n\t\tConfig.useRetinalCanvas=true;\n\t}\n\n\tTBPluginAdapter.measureText=function(str){\n\t\tvar tempObj=TBPluginAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tTBPluginAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tTBPluginAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$11.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$11.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tTBPluginAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$11.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tTBPluginAdapter.removeAll=function(){\n\t\tMiniFileMgr$11.deleteAll();\n\t}\n\n\tTBPluginAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$11.isLocalNativeFile(fileUrl);\n\t}\n\n\tTBPluginAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$11.getFileInfo(fileUrl);\n\t}\n\n\tTBPluginAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$11.filesListObj;\n\t}\n\n\tTBPluginAdapter.exitMiniProgram=function(){\n\t\tTBPluginAdapter.window.my.exitMiniProgram();\n\t}\n\n\tTBPluginAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr$11.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr$11.fakeObj=JSON.parse(data.data);\n\t\t}\n\t}\n\n\tTBPluginAdapter.pixelRatio=function(){\n\t\tif (!TBPluginAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tTBPluginAdapter.EnvConfig.pixelRatioInt=TBPluginAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn TBPluginAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn TBPluginAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tTBPluginAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (TBPluginAdapter.idx==1){\n\t\t\t\t_source=TBPluginAdapter.window.canvas.getRealCanvas();\n\t\t\t\tif(!TBPluginAdapter.window.my.isIDE){\n\t\t\t\t\tvar originfun=_source.getContext;\n\t\t\t\t\t_source.getContext=function (type){\n\t\t\t\t\t\tvar gl=originfun.apply(_source,[type]);\n\t\t\t\t\t\tgl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,false);\n\t\t\t\t\t\treturn gl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=TBPluginAdapter._preCreateElement(type);\n\t\t\t}\n\t\t\t(!_source.style)&& (_source.style={});\n\t\t\tTBPluginAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn TBPluginAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=TBPluginAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn TBPluginAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tTBPluginAdapter.onCreateInput=function(type){\n\t\tvar node=TBPluginAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$11.wxinputFocus;\n\t\tnode.blur=MiniInput$11.wxinputblur;\n\t\tnode.value=0;\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\treturn node;\n\t}\n\n\tTBPluginAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tTBPluginAdapter.EnvConfig=null;\n\tTBPluginAdapter.window=null;\n\tTBPluginAdapter._preCreateElement=null;\n\tTBPluginAdapter._inited=false;\n\tTBPluginAdapter.systemInfo=null;\n\tTBPluginAdapter.isPosMsgYu=false;\n\tTBPluginAdapter.autoCacheFile=false;\n\tTBPluginAdapter.minClearSize=(5 *1024 *1024);\n\tTBPluginAdapter.AutoCacheDownFile=false;\n\tTBPluginAdapter.baseDir=\"component/\";\n\tTBPluginAdapter._measureText=null;\n\tTBPluginAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tTBPluginAdapter.idx=1;\n\t__static(TBPluginAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\"];}\n\t]);\n\treturn TBPluginAdapter;\n})()\n\n\n/**@private **/\n//class laya.tbplugin.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$11=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.tbplugin.mini.MiniAccelerator',_super,'MiniAccelerator$11');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tTBPluginAdapter.window.my.onAccelerometerChange(laya.tbplugin.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tTBPluginAdapter.window.my.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tbplugin.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$11=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.tbplugin.mini.MiniLoader',_super,'MiniLoader$11');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=TBPluginAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tTBPluginAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif (!MiniFileMgr$11.getFileInfo(url)){\n\t\t\t\tif (MiniFileMgr$11.isLocalNativeFile(url)){\n\t\t\t\t\tif (TBPluginAdapter.subNativeFiles && TBPluginAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in TBPluginAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=TBPluginAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tTBPluginAdapter.subNativeheads=TBPluginAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tTBPluginAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(TBPluginAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && TBPluginAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=TBPluginAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr$11.readFile(TBPluginAdapter.baseDir+ResourceVersion.addVersionPrefix(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tfileObj=MiniFileMgr$11.getFileInfo(url);\n\t\t\t\tif(fileObj){\n\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\tMiniFileMgr$11.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\tTBPluginAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$11.isLocalNativeFile(url))){\n\t\t\t\t\t\tMiniFileMgr$11.readFile(TBPluginAdapter.baseDir+url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tMiniFileMgr$11.downFiles(encodeURI(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,TBPluginAdapter.AutoCacheDownFile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$11.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$11.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$11.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=TBPluginAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tthisLoader.onError && thisLoader.onError(data);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tbplugin.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$11=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t\tthis._sound=MiniSound._createSound();\n\t}\n\n\t__class(MiniSound,'laya.tbplugin.mini.MiniSound',_super,'MiniSound$11');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",\"Not support play sound\");\n\t\treturn;\n\t\tif (!MiniFileMgr$11.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$11.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$11.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif(TBPluginAdapter.autoCacheFile&&MiniFileMgr$11.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!TBPluginAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$11.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (TBPluginAdapter.subNativeFiles && TBPluginAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in TBPluginAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=TBPluginAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tTBPluginAdapter.subNativeheads=TBPluginAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tTBPluginAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(TBPluginAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && TBPluginAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=TBPluginAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tif ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)\n\t\t\t\t\t\t|| url.indexOf(TBPluginAdapter.window.my.env.USER_DATA_PATH)!=-1){\n\t\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tMiniFileMgr$11.downOtherFiles(url,Handler.create(this,this.onDownLoadCallBack,[url]),url,TBPluginAdapter.autoCacheFile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode && this._sound){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(TBPluginAdapter.autoCacheFile){\n\t\t\t\tif(tempFilePath==\"\"){\n\t\t\t\t\tif (MiniFileMgr$11.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL._basePath;\n\t\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfileNativeUrl=TBPluginAdapter.baseDir+fileNativeUrl;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tvar fileObj=MiniFileMgr$11.getFileInfo(sourceUrl);\n\t\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$11.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif (sourceUrl.indexOf(\"http://\")==-1\n\t\t\t\t\t\t\t\t&& sourceUrl.indexOf(\"https://\")==-1\n\t\t\t\t\t\t\t&& sourceUrl.indexOf(TBPluginAdapter.window.my.env.USER_DATA_PATH)==-1){\n\t\t\t\t\t\t\t\tfileNativeUrl=TBPluginAdapter.baseDir+sourceUrl;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t}\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tif(MiniFileMgr$11.isLocalNativeFile(sourceUrl)||\n\t\t\t\t\t(\n\t\t\t\tsourceUrl.indexOf(\"http://\")==-1\n\t\t\t\t&&sourceUrl.indexOf(\"https://\")==-1\n\t\t\t\t&&sourceUrl.indexOf(TBPluginAdapter.window.my.env.USER_DATA_PATH)==-1)){\n\t\t\t\t\tsourceUrl=TBPluginAdapter.baseDir+sourceUrl;\n\t\t\t\t}\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\treturn null;\n\t\tvar channel=new MiniSoundChannel$11(this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.isStopped=false;\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tif (this._sound){\n\t\t\tthis._sound.src=\"\";\n\t\t\tMiniSound._audioCache.push(this._sound);\n\t\t\tthis._sound=null;\n\t\t\tthis.readyUrl=this.url=null;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\treturn null;\n\t}\n\n\tMiniSound._id=0;\n\tMiniSound._audioCache=[];\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tbplugin.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$11=(function(_super){\n\tfunction MiniSoundChannel(miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\tthis._onCanplay=null;\n\t\tthis._onError=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=miniSound._sound;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\tthis._onCanplay=MiniSoundChannel.bindToThis(this.onCanPlay,this);\n\t\tthis._onError=MiniSoundChannel.bindToThis(this.onError,this);\n\t\tthis.addEventListener();\n\t}\n\n\t__class(MiniSoundChannel,'laya.tbplugin.mini.MiniSoundChannel',_super,'MiniSoundChannel$11');\n\tvar __proto=MiniSoundChannel.prototype;\n\t__proto.addEventListener=function(){\n\t\tthis._audio.onError(this._onError);\n\t\tthis._audio.onCanplay(this._onCanplay);\n\t}\n\n\t//_audio.onEnded(_onEnd);\n\t__proto.offEventListener=function(){\n\t\tthis._audio.offError(this._onError);\n\t\tthis._audio.offCanplay(this._onCanplay);\n\t\tthis._audio.offEnded(this._onEnd);\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\tconsole.log(\"-----1---------------minisound-----url:\",this.url);\n\t\tconsole.log(error);\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tif(!this._audio)return;\n\t\tthis._miniSound.dispose();\n\t\tthis.offEventListener();\n\t\tthis._audio=this._miniSound=null;\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tif(!this._audio)return;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis.offEventListener();\n\t\tthis._audio.onEnded(this._onEnd);\n\t\tif (!this.isStopped){\n\t\t\tthis.play()\n\t\t\t}else{\n\t\t\tthis.stop();\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tif(!this._audio)return;\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\t_super.prototype.stop.call(this);\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tif (!this.loop){\n\t\t\tthis.offEventListener();\n\t\t\tthis._miniSound.dispose();\n\t\t\tthis._miniSound=null;\n\t\t\tthis._audio=null;\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tif(!this._audio)return;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',function(){\n\t\tif(!this._audio)return 0;\n\t\treturn this._audio.startTime;\n\t\t},function(time){\n\t\tif(!this._audio)return;\n\t\tthis._audio.startTime=time;\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\tif(!this._audio)return false;\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tif(!this._audio)return;\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this._audio)return false;\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tif(!this._audio)return;\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.tiledmap.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,HTMLCanvas=laya.resource.HTMLCanvas,Handler=laya.utils.Handler,Loader=laya.net.Loader;\n\tvar Point=laya.maths.Point,Rectangle=laya.maths.Rectangle,Render=laya.renders.Render,RenderContext=laya.renders.RenderContext;\n\tvar Sprite=laya.display.Sprite,Texture=laya.resource.Texture;\n/**\n*tiledMap是整个地图的核心\n*地图以层级来划分地图（例如：地表层，植被层，建筑层）\n*每层又以分块（GridSprite)来处理显示对象，只显示在视口区域的区\n*每块又包括N*N个格子（tile)\n*格子类型又分为动画格子跟图片格子两种\n*@author ...\n*/\n//class laya.map.TiledMap\nvar TiledMap=(function(){\n\tvar GRect,TileMapAniData,TileSet;\n\tfunction TiledMap(){\n\t\t//json数据\n\t\tthis._jsonData=null;\n\t\t//存放地图中用到的所有子纹理数据\n\t\tthis._tileTexSetArr=[];\n\t\t//主纹理数据，主要在释放纹理资源时使用\n\t\tthis._texArray=[];\n\t\t//地图信息中的一些基本数据\n\t\tthis._x=0;\n\t\t//地图的坐标\n\t\tthis._y=0;\n\t\t//_height=_mapTileH *_mapH\n\t\tthis._width=0;\n\t\t//地图的宽度\n\t\tthis._height=0;\n\t\t//地图的高度\n\t\tthis._mapW=0;\n\t\t//地图的横向格子数\n\t\tthis._mapH=0;\n\t\t//地图的竖向格子数\n\t\tthis._mapTileW=0;\n\t\t//tile的宽度\n\t\tthis._mapTileH=0;\n\t\t//地图的显示对象\n\t\tthis._mapSprite=null;\n\t\t//地图的显示对象\n\t\tthis._layerArray=[];\n\t\t//这里保存所有的MapLayer对象\n\t\tthis._renderLayerArray=[];\n\t\t//这里保存需要渲染的MapLayer对象\n\t\tthis._gridArray=[];\n\t\t//地图块相关的\n\t\tthis._showGridKey=false;\n\t\t//是否显示块边界线（用来调试用）\n\t\tthis._totalGridNum=0;\n\t\t//一层中的GridSprite的总数\n\t\tthis._gridW=0;\n\t\t//地图的横向块数\n\t\tthis._gridH=0;\n\t\t//地图的坚向块数\n\t\tthis._gridWidth=450;\n\t\t//块的默认宽度\n\t\tthis._gridHeight=450;\n\t\t//块的默认高度\n\t\tthis._jsonLoader=null;\n\t\t//用来加载JSON文件用的LOADER\n\t\tthis._loader=null;\n\t\t//用来加载纹理数据用的LOADER\n\t\tthis._tileSetArray=[];\n\t\t//用来存放还需要哪些儿纹理等待加载\n\t\tthis._currTileSet=null;\n\t\t//正在加载的纹理需要的数据源\n\t\tthis._completeHandler=null;\n\t\t//上次视口显示的块范围\n\t\tthis._index=0;\n\t\tthis._animationDic={};\n\t\t//需要创建的动画数据\n\t\tthis._properties=null;\n\t\t//当前地图的自定义属性\n\t\tthis._tileProperties={};\n\t\t//图块属性\n\t\tthis._tileProperties2={};\n\t\t//默认的地图类型（具体要看JSON文件）\n\t\tthis._orientation=\"orthogonal\";\n\t\t//默认的tile渲染顺序（具体要看JSON文件）\n\t\tthis._renderOrder=\"right-down\";\n\t\t//调试用的颜色组合\n\t\tthis._colorArray=[\"FF\",\"00\",\"33\",\"66\"];\n\t\t//缩放相关的操作\n\t\tthis._scale=1;\n\t\tthis._pivotScaleX=0.5;\n\t\tthis._pivotScaleY=0.5;\n\t\tthis._centerX=0;\n\t\tthis._centerY=0;\n\t\t/**@private */\n\t\tthis._viewPortX=0;\n\t\t/**@private */\n\t\tthis._viewPortY=0;\n\t\tthis._viewPortWidth=0;\n\t\tthis._viewPortHeight=0;\n\t\t//是否开启线性取样\n\t\tthis._enableLinear=true;\n\t\t//资源的相对路径\n\t\tthis._resPath=null;\n\t\tthis._pathArray=null;\n\t\t//把地图限制在显示区域\n\t\tthis._limitRange=false;\n\t\t/**\n\t\t*快速更新模式是否不可用\n\t\t*/\n\t\tthis._fastDirty=true;\n\t\t/**\n\t\t*是否自动缓存没有动画的地块\n\t\t*/\n\t\tthis.autoCache=true;\n\t\t/**\n\t\t*自动缓存类型,地图较大时建议使用normal\n\t\t*/\n\t\tthis.autoCacheType=\"normal\";\n\t\t/**\n\t\t*是否合并图层,开启合并图层时，图层属性内可添加layer属性，运行时将会将相邻的layer属性相同的图层进行合并以提高性能\n\t\t*/\n\t\tthis.enableMergeLayer=false;\n\t\t/**\n\t\t*是否移除被覆盖的格子,地块可添加type属性，type不为0时表示不透明，被不透明地块遮挡的地块将会被剔除以提高性能\n\t\t*/\n\t\tthis.removeCoveredTile=false;\n\t\t/**\n\t\t*是否显示大格子里显示的贴图数量\n\t\t*/\n\t\tthis.showGridTextureCount=false;\n\t\t/**\n\t\t*是否调整地块边缘消除缩放导致的缝隙\n\t\t*/\n\t\tthis.antiCrack=true;\n\t\t/**\n\t\t*是否在加载完成之后cache所有大格子\n\t\t*/\n\t\tthis.cacheAllAfterInit=false;\n\t\tthis._texutreStartDic={};\n\t\tthis._rect=new Rectangle();\n\t\tthis._paddingRect=new Rectangle();\n\t\tthis._mapRect=new GRect();\n\t\tthis._mapLogicRect=new GRect();\n\t\tthis._mapLastRect=new GRect();\n\t\tthis._mapSprite=new Sprite();\n\t}\n\n\t__class(TiledMap,'laya.map.TiledMap');\n\tvar __proto=TiledMap.prototype;\n\t/**\n\t*创建地图\n\t*@param mapName JSON文件名字\n\t*@param viewRect 视口区域\n\t*@param completeHandler 地图创建完成的回调函数\n\t*@param viewRectPadding 视口扩充区域，把视口区域上、下、左、右扩充一下，防止视口移动时的穿帮\n\t*@param gridSize grid大小\n\t*@param enableLinear 是否开启线性取样（为false时，可以解决地图黑线的问题，但画质会锐化）\n\t*@param limitRange 把地图限制在显示区域\n\t*/\n\t__proto.createMap=function(mapName,viewRect,completeHandler,viewRectPadding,gridSize,enableLinear,limitRange){\n\t\t(enableLinear===void 0)&& (enableLinear=true);\n\t\t(limitRange===void 0)&& (limitRange=false);\n\t\tthis._enableLinear=enableLinear;\n\t\tthis._limitRange=limitRange;\n\t\tthis._rect.x=viewRect.x;\n\t\tthis._rect.y=viewRect.y;\n\t\tthis._rect.width=viewRect.width;\n\t\tthis._rect.height=viewRect.height;\n\t\tthis._viewPortWidth=viewRect.width / this._scale;\n\t\tthis._viewPortHeight=viewRect.height / this._scale;\n\t\tthis._completeHandler=completeHandler;\n\t\tif (viewRectPadding){\n\t\t\tthis._paddingRect.copyFrom(viewRectPadding);\n\t\t}\n\t\telse {\n\t\t\tthis._paddingRect.setTo(0,0,0,0);\n\t\t}\n\t\tif (gridSize){\n\t\t\tthis._gridWidth=gridSize.x;\n\t\t\tthis._gridHeight=gridSize.y;\n\t\t};\n\t\tvar tIndex=mapName.lastIndexOf(\"/\");\n\t\tif (tIndex >-1){\n\t\t\tthis._resPath=mapName.substr(0,tIndex);\n\t\t\tthis._pathArray=this._resPath.split(\"/\");\n\t\t}\n\t\telse {\n\t\t\tthis._resPath=\"\";\n\t\t\tthis._pathArray=[];\n\t\t}\n\t\tthis._jsonLoader=new Loader();\n\t\tthis._jsonLoader.once(\"complete\",this,this.onJsonComplete);\n\t\tthis._jsonLoader.load(mapName,/*laya.net.Loader.JSON*/\"json\",false);\n\t}\n\n\t/**\n\t*json文件读取成功后，解析里面的纹理数据，进行加载\n\t*@param e JSON数据\n\t*/\n\t__proto.onJsonComplete=function(e){\n\t\tvar tJsonData=this._jsonData=e;\n\t\tthis._properties=tJsonData.properties;\n\t\tthis._orientation=tJsonData.orientation;\n\t\tthis._renderOrder=tJsonData.renderorder;\n\t\tthis._mapW=tJsonData.width;\n\t\tthis._mapH=tJsonData.height;\n\t\tthis._mapTileW=tJsonData.tilewidth;\n\t\tthis._mapTileH=tJsonData.tileheight;\n\t\tthis._width=this._mapTileW *this._mapW;\n\t\tthis._height=this._mapTileH *this._mapH;\n\t\tif (this._orientation==\"staggered\"){\n\t\t\tthis._height=(0.5+this._mapH *0.5)*this._mapTileH;\n\t\t}\n\t\tthis._mapLastRect.top=this._mapLastRect.bottom=this._mapLastRect.left=this._mapLastRect.right=-1;\n\t\tvar tArray=tJsonData.tilesets;\n\t\tvar tileset;\n\t\tvar tTileSet;\n\t\tvar i=0;\n\t\tfor (i=0;i < tArray.length;i++){\n\t\t\ttileset=tArray[i];\n\t\t\ttTileSet=new TileSet();\n\t\t\ttTileSet.init(tileset);\n\t\t\tif (tTileSet.properties && tTileSet.properties.ignore)continue ;\n\t\t\tthis._tileProperties[i]=tTileSet.tileproperties;\n\t\t\tthis.addTileProperties(tTileSet.tileproperties);\n\t\t\tthis._tileSetArray.push(tTileSet);\n\t\t\tvar tTiles=tileset.tiles;\n\t\t\tif (tTiles){\n\t\t\t\tfor (var p in tTiles){\n\t\t\t\t\tvar tAnimation=tTiles[p].animation;\n\t\t\t\t\tif (tAnimation){\n\t\t\t\t\t\tvar tAniData=new TileMapAniData();\n\t\t\t\t\t\tthis._animationDic[p]=tAniData;\n\t\t\t\t\t\ttAniData.image=tileset.image;\n\t\t\t\t\t\tfor (var j=0;j < tAnimation.length;j++){\n\t\t\t\t\t\t\tvar tAnimationItem=tAnimation[j];\n\t\t\t\t\t\t\ttAniData.mAniIdArray.push(tAnimationItem.tileid);\n\t\t\t\t\t\t\ttAniData.mDurationTimeArray.push(tAnimationItem.duration);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._tileTexSetArr.push(null);\n\t\tif (this._tileSetArray.length > 0){\n\t\t\ttTileSet=this._currTileSet=this._tileSetArray.shift();\n\t\t\tthis._loader=new Loader();\n\t\t\tthis._loader.once(\"complete\",this,this.onTextureComplete);\n\t\t\tvar tPath=this.mergePath(this._resPath,tTileSet.image);\n\t\t\tthis._loader.load(tPath,/*laya.net.Loader.IMAGE*/\"image\",false);\n\t\t}\n\t}\n\n\t/**\n\t*合并路径\n\t*@param resPath\n\t*@param relativePath\n\t*@return\n\t*/\n\t__proto.mergePath=function(resPath,relativePath){\n\t\tvar tResultPath=\"\";\n\t\tvar tImageArray=relativePath.split(\"/\");\n\t\tvar tParentPathNum=0;\n\t\tvar i=0;\n\t\tfor (i=tImageArray.length-1;i >=0;i--){\n\t\t\tif (tImageArray[i]==\"..\"){\n\t\t\t\ttParentPathNum++;\n\t\t\t}\n\t\t}\n\t\tif (tParentPathNum==0){\n\t\t\tif (this._pathArray.length > 0){\n\t\t\t\ttResultPath=resPath+\"/\"+relativePath;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttResultPath=relativePath;\n\t\t\t}\n\t\t\treturn tResultPath;\n\t\t};\n\t\tvar tSrcNum=this._pathArray.length-tParentPathNum;\n\t\tif (tSrcNum < 0){\n\t\t\tconsole.log(\"[error]path does not exist\",this._pathArray,tImageArray,resPath,relativePath);\n\t\t}\n\t\tfor (i=0;i < tSrcNum;i++){\n\t\t\tif (i==0){\n\t\t\t\ttResultPath+=this._pathArray[i];\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttResultPath=tResultPath+\"/\"+this._pathArray[i];\n\t\t\t}\n\t\t}\n\t\tfor (i=tParentPathNum;i < tImageArray.length;i++){\n\t\t\ttResultPath=tResultPath+\"/\"+tImageArray[i];\n\t\t}\n\t\treturn tResultPath;\n\t}\n\n\t/**\n\t*纹理加载完成，如果所有的纹理加载，开始初始化地图\n\t*@param e 纹理数据\n\t*/\n\t__proto.onTextureComplete=function(e){\n\t\tvar json=this._jsonData;\n\t\tvar tTexture=e;\n\t\tif (Render.isWebGL && (!this._enableLinear)){\n\t\t\ttTexture.bitmap.minFifter=0x2600;\n\t\t\ttTexture.bitmap.magFifter=0x2600;\n\t\t\ttTexture.bitmap.enableMerageInAtlas=false;\n\t\t}\n\t\tthis._texArray.push(tTexture);\n\t\tvar tSubTexture=null;\n\t\tvar tTileSet=this._currTileSet;\n\t\tvar tTileTextureW=tTileSet.tilewidth;\n\t\tvar tTileTextureH=tTileSet.tileheight;\n\t\tvar tImageWidth=tTileSet.imagewidth;\n\t\tvar tImageHeight=tTileSet.imageheight;\n\t\tvar tFirstgid=tTileSet.firstgid;\n\t\tvar tTileWNum=Math.floor((tImageWidth-tTileSet.margin-tTileTextureW)/ (tTileTextureW+tTileSet.spacing))+1;\n\t\tvar tTileHNum=Math.floor((tImageHeight-tTileSet.margin-tTileTextureH)/ (tTileTextureH+tTileSet.spacing))+1;\n\t\tvar tTileTexSet=null;\n\t\tthis._texutreStartDic[tTileSet.image]=this._tileTexSetArr.length;\n\t\tfor (var i=0;i < tTileHNum;i++){\n\t\t\tfor (var j=0;j < tTileWNum;j++){\n\t\t\t\ttTileTexSet=new TileTexSet();\n\t\t\t\ttTileTexSet.offX=tTileSet.titleoffsetX;\n\t\t\t\ttTileTexSet.offY=tTileSet.titleoffsetY-(tTileTextureH-this._mapTileH);\n\t\t\t\ttTileTexSet.texture=Texture.createFromTexture(tTexture,tTileSet.margin+(tTileTextureW+tTileSet.spacing)*j,tTileSet.margin+(tTileTextureH+tTileSet.spacing)*i,tTileTextureW,tTileTextureH);\n\t\t\t\tif(this.antiCrack)\n\t\t\t\t\tthis.adptTexture(tTileTexSet.texture);\n\t\t\t\tthis._tileTexSetArr.push(tTileTexSet);\n\t\t\t\ttTileTexSet.gid=this._tileTexSetArr.length;\n\t\t\t}\n\t\t}\n\t\tif (this._tileSetArray.length > 0){\n\t\t\ttTileSet=this._currTileSet=this._tileSetArray.shift();\n\t\t\tthis._loader.once(\"complete\",this,this.onTextureComplete);\n\t\t\tvar tPath=this.mergePath(this._resPath,tTileSet.image);\n\t\t\tthis._loader.load(tPath,/*laya.net.Loader.IMAGE*/\"image\",false);\n\t\t}\n\t\telse {\n\t\t\tthis._currTileSet=null;\n\t\t\tthis.initMap();\n\t\t}\n\t}\n\n\t__proto.adptTexture=function(tex){\n\t\tif (!tex)return;\n\t\tvar pX=tex.uv[0];\n\t\tvar pX1=tex.uv[2];\n\t\tvar pY=tex.uv[1];\n\t\tvar pY1=tex.uv[7];\n\t\tvar dW=1 / tex.bitmap.width;\n\t\tvar dH=1 / tex.bitmap.height;\n\t\ttex.uv[0]=tex.uv[6]=pX+dW;\n\t\ttex.uv[2]=tex.uv[4]=pX1-dW;\n\t\ttex.uv[1]=tex.uv[3]=pY+dH;\n\t\ttex.uv[5]=tex.uv[7]=pY1-dH;\n\t}\n\n\t/**\n\t*初始化地图\n\t*/\n\t__proto.initMap=function(){\n\t\tvar i=0,n=0;\n\t\tfor (var p in this._animationDic){\n\t\t\tvar tAniData=this._animationDic[p];\n\t\t\tvar gStart=0;\n\t\t\tgStart=this._texutreStartDic[tAniData.image];\n\t\t\tvar tTileTexSet=this.getTexture(parseInt(p)+gStart);\n\t\t\tif (tAniData.mAniIdArray.length > 0){\n\t\t\t\ttTileTexSet.textureArray=[];\n\t\t\t\ttTileTexSet.durationTimeArray=tAniData.mDurationTimeArray;\n\t\t\t\ttTileTexSet.isAnimation=true;\n\t\t\t\ttTileTexSet.animationTotalTime=0;\n\t\t\t\tfor (i=0,n=tTileTexSet.durationTimeArray.length;i < n;i++){\n\t\t\t\t\ttTileTexSet.animationTotalTime+=tTileTexSet.durationTimeArray[i];\n\t\t\t\t}\n\t\t\t\tfor (i=0,n=tAniData.mAniIdArray.length;i < n;i++){\n\t\t\t\t\tvar tTexture=this.getTexture(tAniData.mAniIdArray[i]+gStart);\n\t\t\t\t\ttTileTexSet.textureArray.push(tTexture);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis._gridWidth=Math.floor(this._gridWidth / this._mapTileW)*this._mapTileW;\n\t\tthis._gridHeight=Math.floor(this._gridHeight / this._mapTileH)*this._mapTileH;\n\t\tif (this._gridWidth < this._mapTileW){\n\t\t\tthis._gridWidth=this._mapTileW;\n\t\t}\n\t\tif (this._gridHeight < this._mapTileH){\n\t\t\tthis._gridHeight=this._mapTileH;\n\t\t}\n\t\tthis._gridW=Math.ceil(this._width / this._gridWidth);\n\t\tthis._gridH=Math.ceil(this._height / this._gridHeight);\n\t\tthis._totalGridNum=this._gridW *this._gridH;\n\t\tfor (i=0;i < this._gridH;i++){\n\t\t\tvar tGridArray=[];\n\t\t\tthis._gridArray.push(tGridArray);\n\t\t\tfor (var j=0;j < this._gridW;j++){\n\t\t\t\ttGridArray.push(null);\n\t\t\t}\n\t\t};\n\t\tvar tLayerArray=this._jsonData.layers;\n\t\tvar isFirst=true;\n\t\tvar tTarLayerID=1;\n\t\tvar tLayerTarLayerName;\n\t\tvar preLayerTarName;\n\t\tvar preLayer;\n\t\tfor (var tLayerLoop=0;tLayerLoop < tLayerArray.length;tLayerLoop++){\n\t\t\tvar tLayerData=tLayerArray[tLayerLoop];\n\t\t\tif (tLayerData.visible==true){\n\t\t\t\tvar tMapLayer=new MapLayer();\n\t\t\t\ttMapLayer.init(tLayerData,this);\n\t\t\t\tif (!this.enableMergeLayer){\n\t\t\t\t\tthis._mapSprite.addChild(tMapLayer);\n\t\t\t\t\tthis._renderLayerArray.push(tMapLayer);\n\t\t\t\t\t}else{\n\t\t\t\t\ttLayerTarLayerName=tMapLayer.getLayerProperties(\"layer\");\n\t\t\t\t\tisFirst=isFirst || (!preLayer)|| (tLayerTarLayerName !=preLayerTarName);\n\t\t\t\t\tif (isFirst){\n\t\t\t\t\t\tisFirst=false;\n\t\t\t\t\t\ttMapLayer.tarLayer=tMapLayer;\n\t\t\t\t\t\tpreLayer=tMapLayer;\n\t\t\t\t\t\tthis._mapSprite.addChild(tMapLayer);\n\t\t\t\t\t\tthis._renderLayerArray.push(tMapLayer);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\ttMapLayer.tarLayer=preLayer;\n\t\t\t\t\t}\n\t\t\t\t\tpreLayerTarName=tLayerTarLayerName;\n\t\t\t\t}\n\t\t\t\tthis._layerArray.push(tMapLayer);\n\t\t\t}\n\t\t}\n\t\tif (this.removeCoveredTile){\n\t\t\tthis.adptTiledMapData();\n\t\t}\n\t\tif (this.cacheAllAfterInit){\n\t\t\tthis.cacheAllGrid();\n\t\t}\n\t\tthis.moveViewPort(this._rect.x,this._rect.y);\n\t\tLaya.stage.addChild(this.mapSprite());\n\t\tif (this._completeHandler !=null){\n\t\t\tthis._completeHandler.run();\n\t\t}\n\t}\n\n\t//这里应该发送消息，通知上层，地图创建完成\n\t__proto.addTileProperties=function(tileDataDic){\n\t\tvar key;\n\t\tfor (key in tileDataDic){\n\t\t\tthis._tileProperties2[key]=tileDataDic[key];\n\t\t}\n\t}\n\n\t__proto.getTileUserData=function(id,sign,defaultV){\n\t\tif (!this._tileProperties2 || !this._tileProperties2[id] || !(sign in this._tileProperties2[id]))return defaultV;\n\t\treturn this._tileProperties2[id][sign];\n\t}\n\n\t__proto.adptTiledMapData=function(){\n\t\tvar i=0,len=0;\n\t\tlen=this._layerArray.length;\n\t\tvar tLayer;\n\t\tvar noNeeds={};\n\t\tvar tDatas;\n\t\tfor (i=len-1;i >=0;i--){\n\t\t\ttLayer=this._layerArray[i];\n\t\t\ttDatas=tLayer._mapData;\n\t\t\tif (!tDatas)continue ;\n\t\t\tthis.removeCoverd(tDatas,noNeeds);\n\t\t\tthis.collectCovers(tDatas,noNeeds,i);\n\t\t}\n\t}\n\n\t__proto.removeCoverd=function(datas,noNeeds){\n\t\tvar i=0,len=0;\n\t\tlen=datas.length;\n\t\tfor (i=0;i < len;i++){\n\t\t\tif (noNeeds[i]){\n\t\t\t\tdatas[i]=0;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.collectCovers=function(datas,noNeeds,layer){\n\t\tvar i=0,len=0;\n\t\tlen=datas.length;\n\t\tvar tTileData=0;\n\t\tvar isCover=0;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttTileData=datas[i];\n\t\t\tif (tTileData > 0){\n\t\t\t\tisCover=this.getTileUserData(tTileData-1,\"type\",0);\n\t\t\t\tif (isCover > 0){\n\t\t\t\t\tnoNeeds[i]=tTileData;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*得到一块指定的地图纹理\n\t*@param index 纹理的索引值，默认从1开始\n\t*@return\n\t*/\n\t__proto.getTexture=function(index){\n\t\tif (index < this._tileTexSetArr.length){\n\t\t\treturn this._tileTexSetArr[index];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*得到地图的自定义属性\n\t*@param name 属性名称\n\t*@return\n\t*/\n\t__proto.getMapProperties=function(name){\n\t\tif (this._properties){\n\t\t\treturn this._properties[name];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*得到tile自定义属性\n\t*@param index 地图块索引\n\t*@param id 具体的TileSetID\n\t*@param name 属性名称\n\t*@return\n\t*/\n\t__proto.getTileProperties=function(index,id,name){\n\t\tif (this._tileProperties[index] && this._tileProperties[index][id]){\n\t\t\treturn this._tileProperties[index][id][name];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*通过纹理索引，生成一个可控制物件\n\t*@param index 纹理的索引值，默认从1开始\n\t*@return\n\t*/\n\t__proto.getSprite=function(index,width,height){\n\t\tif (0 < this._tileTexSetArr.length){\n\t\t\tvar tGridSprite=new GridSprite();\n\t\t\ttGridSprite.initData(this,true);\n\t\t\ttGridSprite.size(width,height);\n\t\t\tvar tTileTexSet=this._tileTexSetArr[index];\n\t\t\tif (tTileTexSet !=null && tTileTexSet.texture !=null){\n\t\t\t\tif (tTileTexSet.isAnimation){\n\t\t\t\t\tvar tAnimationSprite=new TileAniSprite();\n\t\t\t\t\tthis._index++;\n\t\t\t\t\ttAnimationSprite.setTileTextureSet(this._index.toString(),tTileTexSet);\n\t\t\t\t\ttGridSprite.addAniSprite(tAnimationSprite);\n\t\t\t\t\ttGridSprite.addChild(tAnimationSprite);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttGridSprite.graphics.drawTexture(tTileTexSet.texture,0,0,width,height);\n\t\t\t\t}\n\t\t\t\ttGridSprite.drawImageNum++;\n\t\t\t}\n\t\t\treturn tGridSprite;\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*设置视口的缩放中心点（例如：scaleX=scaleY=0.5,就是以视口中心缩放）\n\t*@param scaleX\n\t*@param scaleY\n\t*/\n\t__proto.setViewPortPivotByScale=function(scaleX,scaleY){\n\t\tthis._pivotScaleX=scaleX;\n\t\tthis._pivotScaleY=scaleY;\n\t\tthis._fastDirty=true;\n\t}\n\n\t/**\n\t*移动视口\n\t*@param moveX 视口的坐标x\n\t*@param moveY 视口的坐标y\n\t*/\n\t__proto.moveViewPort=function(moveX,moveY){\n\t\tthis._x=-moveX;\n\t\tthis._y=-moveY;\n\t\tif (this._fastDirty){\n\t\t\tthis._rect.x=moveX;\n\t\t\tthis._rect.y=moveY;\n\t\t\tthis.updateViewPort();\n\t\t\t}else{\n\t\t\tvar dx=NaN,dy=NaN;\n\t\t\tdx=moveX-this._rect.x;\n\t\t\tdy=moveY-this._rect.y;\n\t\t\tthis._rect.x=moveX;\n\t\t\tthis._rect.y=moveY;\n\t\t\tthis.updateViewPortFast(dx,dy);\n\t\t}\n\t}\n\n\t/**\n\t*改变视口大小\n\t*@param moveX 视口的坐标x\n\t*@param moveY 视口的坐标y\n\t*@param width 视口的宽\n\t*@param height 视口的高\n\t*/\n\t__proto.changeViewPort=function(moveX,moveY,width,height){\n\t\tif (moveX==this._rect.x && moveY==this._rect.y && width==this._rect.width && height==this._rect.height)return;\n\t\tif (width==this._rect.width && height==this._rect.height){\n\t\t\tthis.moveViewPort(moveX,moveY);\n\t\t\treturn;\n\t\t}\n\t\tthis._fastDirty=true;\n\t\tthis._x=-moveX;\n\t\tthis._y=-moveY;\n\t\tthis._rect.x=moveX;\n\t\tthis._rect.y=moveY;\n\t\tthis._rect.width=width;\n\t\tthis._rect.height=height;\n\t\tthis._viewPortWidth=width / this._scale;\n\t\tthis._viewPortHeight=height / this._scale;\n\t\tthis.updateViewPort();\n\t}\n\n\t/**\n\t*在锚点的基础上计算，通过宽和高，重新计算视口\n\t*@param width 新视口宽\n\t*@param height 新视口高\n\t*@param rect 返回的结果\n\t*@return\n\t*/\n\t__proto.changeViewPortBySize=function(width,height,rect){\n\t\tif (rect==null){\n\t\t\trect=new Rectangle();\n\t\t}\n\t\tthis._centerX=this._rect.x+this._rect.width *this._pivotScaleX;\n\t\tthis._centerY=this._rect.y+this._rect.height *this._pivotScaleY;\n\t\trect.x=this._centerX-width *this._pivotScaleX;\n\t\trect.y=this._centerY-height *this._pivotScaleY;\n\t\trect.width=width;\n\t\trect.height=height;\n\t\tthis.changeViewPort(rect.x,rect.y,rect.width,rect.height);\n\t\treturn rect;\n\t}\n\n\t/**\n\t*快速更新视口 ,只有在视口大小和各种缩放信息没有改变时才可以使用这个函数更新\n\t*@param dx 视口偏移x\n\t*@param dy 视口偏移y\n\t*/\n\t__proto.updateViewPortFast=function(dx,dy){\n\t\tthis._centerX+=dx;\n\t\tthis._centerY+=dy;\n\t\tthis._viewPortX+=dx;\n\t\tthis._viewPortY+=dy;\n\t\tvar posChanged=false;\n\t\tvar dyG=dy / this._gridHeight;\n\t\tvar dxG=dx / this._gridWidth;\n\t\tthis._mapLogicRect.top+=dyG;\n\t\tthis._mapLogicRect.bottom+=dyG;\n\t\tthis._mapLogicRect.left+=dxG;\n\t\tthis._mapLogicRect.right+=dxG;\n\t\tthis._mapRect.top=0|this._mapLogicRect.top;\n\t\tthis._mapRect.bottom=0|this._mapLogicRect.bottom;\n\t\tthis._mapRect.left=0|this._mapLogicRect.left;\n\t\tthis._mapRect.right=0|this._mapLogicRect.right;\n\t\tif (this._mapRect.top !=this._mapLastRect.top || this._mapRect.bottom !=this._mapLastRect.bottom || this._mapRect.left !=this._mapLastRect.left || this._mapRect.right !=this._mapLastRect.right){\n\t\t\tthis.clipViewPort();\n\t\t\tthis._mapLastRect.top=this._mapRect.top;\n\t\t\tthis._mapLastRect.bottom=this._mapRect.bottom;\n\t\t\tthis._mapLastRect.left=this._mapRect.left;\n\t\t\tthis._mapLastRect.right=this._mapRect.right;\n\t\t\tposChanged=true;\n\t\t};posChanged=posChanged|| (dx !=0 || dy !=0);\n\t\tif (!posChanged)return;\n\t\tthis.updateMapLayersPos();\n\t}\n\n\t/**\n\t*刷新地图层坐标\n\t*/\n\t__proto.updateMapLayersPos=function(){\n\t\tvar tMapLayer;\n\t\tvar len=this._renderLayerArray.length;\n\t\tfor (var i=0;i < len;i++){\n\t\t\ttMapLayer=this._renderLayerArray[i];\n\t\t\tif (tMapLayer._gridSpriteArray.length > 0){\n\t\t\t\ttMapLayer.updateAloneObject();\n\t\t\t\ttMapLayer.pos(-this._viewPortX,-this._viewPortY);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*刷新视口\n\t*/\n\t__proto.updateViewPort=function(){\n\t\tthis._fastDirty=false;\n\t\tvar dw=this._rect.width *this._pivotScaleX;\n\t\tvar dh=this._rect.height *this._pivotScaleY;\n\t\tthis._centerX=this._rect.x+dw;\n\t\tthis._centerY=this._rect.y+dh;\n\t\tvar posChanged=false;\n\t\tvar preValue=this._viewPortX;\n\t\tthis._viewPortX=this._centerX-dw / this._scale;\n\t\tif (preValue !=this._viewPortX){\n\t\t\tposChanged=true;\n\t\t\t}else {\n\t\t\tpreValue=this._viewPortY;\n\t\t}\n\t\tthis._viewPortY=this._centerY-dh/ this._scale;\n\t\tif (!posChanged && preValue !=this._viewPortY){\n\t\t\tposChanged=true;\n\t\t}\n\t\tif (this._limitRange){\n\t\t\tvar tRight=this._viewPortX+this._viewPortWidth;\n\t\t\tif (tRight > this._width){\n\t\t\t\tthis._viewPortX=this._width-this._viewPortWidth;\n\t\t\t};\n\t\t\tvar tBottom=this._viewPortY+this._viewPortHeight;\n\t\t\tif (tBottom > this._height){\n\t\t\t\tthis._viewPortY=this._height-this._viewPortHeight;\n\t\t\t}\n\t\t\tif (this._viewPortX < 0){\n\t\t\t\tthis._viewPortX=0;\n\t\t\t}\n\t\t\tif (this._viewPortY < 0){\n\t\t\t\tthis._viewPortY=0;\n\t\t\t}\n\t\t};\n\t\tvar tPaddingRect=this._paddingRect;\n\t\tthis._mapLogicRect.top=(this._viewPortY-tPaddingRect.y)/ this._gridHeight;\n\t\tthis._mapLogicRect.bottom=(this._viewPortY+this._viewPortHeight+tPaddingRect.height+tPaddingRect.y)/ this._gridHeight;\n\t\tthis._mapLogicRect.left=(this._viewPortX-tPaddingRect.x)/ this._gridWidth;\n\t\tthis._mapLogicRect.right=(this._viewPortX+this._viewPortWidth+tPaddingRect.width+tPaddingRect.x)/ this._gridWidth;\n\t\tthis._mapRect.top=0|this._mapLogicRect.top;\n\t\tthis._mapRect.bottom=0|this._mapLogicRect.bottom;\n\t\tthis._mapRect.left=0|this._mapLogicRect.left;\n\t\tthis._mapRect.right=0|this._mapLogicRect.right;\n\t\tif (this._mapRect.top !=this._mapLastRect.top || this._mapRect.bottom !=this._mapLastRect.bottom || this._mapRect.left !=this._mapLastRect.left || this._mapRect.right !=this._mapLastRect.right){\n\t\t\tthis.clipViewPort();\n\t\t\tthis._mapLastRect.top=this._mapRect.top;\n\t\t\tthis._mapLastRect.bottom=this._mapRect.bottom;\n\t\t\tthis._mapLastRect.left=this._mapRect.left;\n\t\t\tthis._mapLastRect.right=this._mapRect.right;\n\t\t\tposChanged=true;\n\t\t}\n\t\tif (!posChanged)return;\n\t\tthis.updateMapLayersPos();\n\t}\n\n\t/**\n\t*GRID裁剪\n\t*/\n\t__proto.clipViewPort=function(){\n\t\tvar tSpriteNum=0;\n\t\tvar tSprite;\n\t\tvar tIndex=0;\n\t\tvar tSub=0;\n\t\tvar tAdd=0;\n\t\tvar i=0,j=0;\n\t\tif (this._mapRect.left > this._mapLastRect.left){\n\t\t\ttSub=this._mapRect.left-this._mapLastRect.left;\n\t\t\tif (tSub > 0){\n\t\t\t\tfor (j=this._mapLastRect.left;j < this._mapLastRect.left+tSub;j++){\n\t\t\t\t\tfor (i=this._mapLastRect.top;i <=this._mapLastRect.bottom;i++){\n\t\t\t\t\t\tthis.hideGrid(j,i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttAdd=Math.min(this._mapLastRect.left,this._mapRect.right+1)-this._mapRect.left;\n\t\t\tif (tAdd > 0){\n\t\t\t\tfor (j=this._mapRect.left;j < this._mapRect.left+tAdd;j++){\n\t\t\t\t\tfor (i=this._mapRect.top;i <=this._mapRect.bottom;i++){\n\t\t\t\t\t\tthis.showGrid(j,i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._mapRect.right > this._mapLastRect.right){\n\t\t\ttAdd=this._mapRect.right-this._mapLastRect.right;\n\t\t\tif (tAdd > 0){\n\t\t\t\tfor (j=Math.max(this._mapLastRect.right+1,this._mapRect.left);j <=this._mapLastRect.right+tAdd;j++){\n\t\t\t\t\tfor (i=this._mapRect.top;i <=this._mapRect.bottom;i++){\n\t\t\t\t\t\tthis.showGrid(j,i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttSub=this._mapLastRect.right-this._mapRect.right\n\t\t\tif (tSub > 0){\n\t\t\t\tfor (j=this._mapRect.right+1;j <=this._mapRect.right+tSub;j++){\n\t\t\t\t\tfor (i=this._mapLastRect.top;i <=this._mapLastRect.bottom;i++){\n\t\t\t\t\t\tthis.hideGrid(j,i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._mapRect.top > this._mapLastRect.top){\n\t\t\ttSub=this._mapRect.top-this._mapLastRect.top;\n\t\t\tif (tSub > 0){\n\t\t\t\tfor (i=this._mapLastRect.top;i < this._mapLastRect.top+tSub;i++){\n\t\t\t\t\tfor (j=this._mapLastRect.left;j <=this._mapLastRect.right;j++){\n\t\t\t\t\t\tthis.hideGrid(j,i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttAdd=Math.min(this._mapLastRect.top,this._mapRect.bottom+1)-this._mapRect.top;\n\t\t\tif (tAdd > 0){\n\t\t\t\tfor (i=this._mapRect.top;i < this._mapRect.top+tAdd;i++){\n\t\t\t\t\tfor (j=this._mapRect.left;j <=this._mapRect.right;j++){\n\t\t\t\t\t\tthis.showGrid(j,i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._mapRect.bottom > this._mapLastRect.bottom){\n\t\t\ttAdd=this._mapRect.bottom-this._mapLastRect.bottom;\n\t\t\tif (tAdd > 0){\n\t\t\t\tfor (i=Math.max(this._mapLastRect.bottom+1,this._mapRect.top);i <=this._mapLastRect.bottom+tAdd;i++){\n\t\t\t\t\tfor (j=this._mapRect.left;j <=this._mapRect.right;j++){\n\t\t\t\t\t\tthis.showGrid(j,i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttSub=this._mapLastRect.bottom-this._mapRect.bottom\n\t\t\tif (tSub > 0){\n\t\t\t\tfor (i=this._mapRect.bottom+1;i <=this._mapRect.bottom+tSub;i++){\n\t\t\t\t\tfor (j=this._mapLastRect.left;j <=this._mapLastRect.right;j++){\n\t\t\t\t\t\tthis.hideGrid(j,i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*显示指定的GRID\n\t*@param gridX\n\t*@param gridY\n\t*/\n\t__proto.showGrid=function(gridX,gridY){\n\t\tif (gridX < 0 || gridX >=this._gridW || gridY < 0 || gridY >=this._gridH){\n\t\t\treturn;\n\t\t};\n\t\tvar i=0,j=0;\n\t\tvar tGridSprite;\n\t\tvar tTempArray=this._gridArray[gridY][gridX];\n\t\tif (tTempArray==null){\n\t\t\ttTempArray=this.getGridArray(gridX,gridY);\n\t\t}\n\t\telse {\n\t\t\tfor (i=0;i < tTempArray.length && i < this._layerArray.length;i++){\n\t\t\t\tvar tLayerSprite=this._layerArray[i];\n\t\t\t\tif (tLayerSprite && tTempArray[i]){\n\t\t\t\t\ttGridSprite=tTempArray[i];\n\t\t\t\t\tif (tGridSprite.visible==false && tGridSprite.drawImageNum > 0){\n\t\t\t\t\t\ttGridSprite.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.cacheAllGrid=function(){\n\t\tvar i=0,j=0;\n\t\tvar tempArr;\n\t\tfor (i=0;i < this._gridW;i++){\n\t\t\tfor (j=0;j < this._gridH;j++){\n\t\t\t\ttempArr=this.getGridArray(i,j);\n\t\t\t\tthis.cacheGridsArray(tempArr);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.cacheGridsArray=function(arr){\n\t\tvar canvas;\n\t\tif (!TiledMap._tempContext){\n\t\t\tTiledMap._tempContext=new RenderContext(1,1,HTMLCanvas.create(/*laya.resource.HTMLCanvas.TYPEAUTO*/\"AUTO\"));\n\t\t}\n\t\tcanvas=TiledMap._tempContext.canvas;\n\t\tcanvas.context.asBitmap=false;\n\t\tvar i=0,len=0;\n\t\tlen=arr.length;\n\t\tvar tGrid;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttGrid=arr[i];\n\t\t\tcanvas.clear();\n\t\t\tcanvas.size(1,1);\n\t\t\ttGrid.render(TiledMap._tempContext,0,0);\n\t\t\ttGrid.hide();\n\t\t}\n\t\tcanvas.clear();\n\t\tcanvas.size(1,1);\n\t}\n\n\t__proto.getGridArray=function(gridX,gridY){\n\t\tvar i=0,j=0;\n\t\tvar tGridSprite;\n\t\tvar tTempArray=this._gridArray[gridY][gridX];\n\t\tif (tTempArray==null){\n\t\t\ttTempArray=this._gridArray[gridY][gridX]=[];\n\t\t\tvar tLeft=0;\n\t\t\tvar tRight=0;\n\t\t\tvar tTop=0;\n\t\t\tvar tBottom=0;\n\t\t\tvar tGridWidth=this._gridWidth;\n\t\t\tvar tGridHeight=this._gridHeight;\n\t\t\tswitch (this.orientation){\n\t\t\t\tcase /*CLASS CONST:laya.map.TiledMap.ORIENTATION_ISOMETRIC*/\"isometric\":\n\t\t\t\t\ttLeft=Math.floor(gridX *tGridWidth);\n\t\t\t\t\ttRight=Math.floor(gridX *tGridWidth+tGridWidth);\n\t\t\t\t\ttTop=Math.floor(gridY *tGridHeight);\n\t\t\t\t\ttBottom=Math.floor(gridY *tGridHeight+tGridHeight);\n\t\t\t\t\tvar tLeft1=0,tRight1=0,tTop1=0,tBottom1=0;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*CLASS CONST:laya.map.TiledMap.ORIENTATION_STAGGERED*/\"staggered\":\n\t\t\t\t\ttLeft=Math.floor(gridX *tGridWidth / this._mapTileW);\n\t\t\t\t\ttRight=Math.floor((gridX *tGridWidth+tGridWidth)/ this._mapTileW);\n\t\t\t\t\ttTop=Math.floor(gridY *tGridHeight / (this._mapTileH / 2));\n\t\t\t\t\ttBottom=Math.floor((gridY *tGridHeight+tGridHeight)/ (this._mapTileH / 2));\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*CLASS CONST:laya.map.TiledMap.ORIENTATION_ORTHOGONAL*/\"orthogonal\":\n\t\t\t\t\ttLeft=Math.floor(gridX *tGridWidth / this._mapTileW);\n\t\t\t\t\ttRight=Math.floor((gridX *tGridWidth+tGridWidth)/ this._mapTileW);\n\t\t\t\t\ttTop=Math.floor(gridY *tGridHeight / this._mapTileH);\n\t\t\t\t\ttBottom=Math.floor((gridY *tGridHeight+tGridHeight)/ this._mapTileH);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*CLASS CONST:laya.map.TiledMap.ORIENTATION_HEXAGONAL*/\"hexagonal\":;\n\t\t\t\t\tvar tHeight=this._mapTileH *2 / 3;\n\t\t\t\t\ttLeft=Math.floor(gridX *tGridWidth / this._mapTileW);\n\t\t\t\t\ttRight=Math.ceil((gridX *tGridWidth+tGridWidth)/ this._mapTileW);\n\t\t\t\t\ttTop=Math.floor(gridY *tGridHeight / tHeight);\n\t\t\t\t\ttBottom=Math.ceil((gridY *tGridHeight+tGridHeight)/ tHeight);\n\t\t\t\t\tbreak ;\n\t\t\t\t};\n\t\t\tvar tLayer=null;\n\t\t\tvar tTGridSprite;\n\t\t\tvar tDrawMapLayer;\n\t\t\tfor (var z=0;z < this._layerArray.length;z++){\n\t\t\t\ttLayer=this._layerArray[z];\n\t\t\t\tif (this.enableMergeLayer){\n\t\t\t\t\tif (tLayer.tarLayer !=tDrawMapLayer){\n\t\t\t\t\t\ttTGridSprite=null;\n\t\t\t\t\t\ttDrawMapLayer=tLayer.tarLayer;\n\t\t\t\t\t}\n\t\t\t\t\tif (!tTGridSprite){\n\t\t\t\t\t\ttTGridSprite=tDrawMapLayer.getDrawSprite(gridX,gridY);\n\t\t\t\t\t\ttTempArray.push(tTGridSprite);\n\t\t\t\t\t}\n\t\t\t\t\ttGridSprite=tTGridSprite;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttGridSprite=tLayer.getDrawSprite(gridX,gridY);\n\t\t\t\t\ttTempArray.push(tGridSprite);\n\t\t\t\t};\n\t\t\t\tvar tColorStr;\n\t\t\t\tif (this._showGridKey){\n\t\t\t\t\ttColorStr=\"#\";\n\t\t\t\t\ttColorStr+=this._colorArray[Math.floor(Math.random()*this._colorArray.length)];\n\t\t\t\t\ttColorStr+=this._colorArray[Math.floor(Math.random()*this._colorArray.length)];\n\t\t\t\t\ttColorStr+=this._colorArray[Math.floor(Math.random()*this._colorArray.length)];\n\t\t\t\t}\n\t\t\t\tswitch (this.orientation){\n\t\t\t\t\tcase /*CLASS CONST:laya.map.TiledMap.ORIENTATION_ISOMETRIC*/\"isometric\":;\n\t\t\t\t\t\tvar tHalfTileHeight=this.tileHeight / 2;\n\t\t\t\t\t\tvar tHalfTileWidth=this.tileWidth / 2;\n\t\t\t\t\t\tvar tHalfMapWidth=this._width / 2;\n\t\t\t\t\t\ttTop1=Math.floor(tTop / tHalfTileHeight);\n\t\t\t\t\t\ttBottom1=Math.floor(tBottom / tHalfTileHeight);\n\t\t\t\t\t\ttLeft1=this._mapW+Math.floor((tLeft-tHalfMapWidth)/ tHalfTileWidth);\n\t\t\t\t\t\ttRight1=this._mapW+Math.floor((tRight-tHalfMapWidth)/ tHalfTileWidth);\n\t\t\t\t\t\tvar tMapW=this._mapW *2;\n\t\t\t\t\t\tvar tMapH=this._mapH *2;\n\t\t\t\t\t\tif (tTop1 < 0){\n\t\t\t\t\t\t\ttTop1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tTop1 >=tMapH){\n\t\t\t\t\t\t\ttTop1=tMapH-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tBottom1 < 0){\n\t\t\t\t\t\t\ttBottom=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tBottom1 >=tMapH){\n\t\t\t\t\t\t\ttBottom1=tMapH-1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttGridSprite.zOrder=this._totalGridNum *z+gridY *this._gridW+gridX;\n\t\t\t\t\t\tfor (i=tTop1;i < tBottom1;i++){\n\t\t\t\t\t\t\tfor (j=0;j <=i;j++){\n\t\t\t\t\t\t\t\tvar tIndexX=i-j;\n\t\t\t\t\t\t\t\tvar tIndexY=j;\n\t\t\t\t\t\t\t\tvar tIndexValue=(tIndexX-tIndexY)+this._mapW;\n\t\t\t\t\t\t\t\tif (tIndexValue > tLeft1 && tIndexValue <=tRight1){\n\t\t\t\t\t\t\t\t\tif (tLayer.drawTileTexture(tGridSprite,tIndexX,tIndexY)){\n\t\t\t\t\t\t\t\t\t\ttGridSprite.drawImageNum++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase /*CLASS CONST:laya.map.TiledMap.ORIENTATION_STAGGERED*/\"staggered\":\n\t\t\t\t\t\ttGridSprite.zOrder=z *this._totalGridNum+gridY *this._gridW+gridX;\n\t\t\t\t\t\tfor (i=tTop;i < tBottom;i++){\n\t\t\t\t\t\t\tfor (j=tLeft;j < tRight;j++){\n\t\t\t\t\t\t\t\tif (tLayer.drawTileTexture(tGridSprite,j,i)){\n\t\t\t\t\t\t\t\t\ttGridSprite.drawImageNum++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase /*CLASS CONST:laya.map.TiledMap.ORIENTATION_ORTHOGONAL*/\"orthogonal\":\n\t\t\t\t\tcase /*CLASS CONST:laya.map.TiledMap.ORIENTATION_HEXAGONAL*/\"hexagonal\":\n\t\t\t\t\tswitch (this._renderOrder){\n\t\t\t\t\t\tcase \"right-down\":\n\t\t\t\t\t\t\ttGridSprite.zOrder=z *this._totalGridNum+gridY *this._gridW+gridX;\n\t\t\t\t\t\t\tfor (i=tTop;i < tBottom;i++){\n\t\t\t\t\t\t\t\tfor (j=tLeft;j < tRight;j++){\n\t\t\t\t\t\t\t\t\tif (tLayer.drawTileTexture(tGridSprite,j,i)){\n\t\t\t\t\t\t\t\t\t\ttGridSprite.drawImageNum++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\tcase \"right-up\":\n\t\t\t\t\t\t\ttGridSprite.zOrder=z *this._totalGridNum+(this._gridH-1-gridY)*this._gridW+gridX;\n\t\t\t\t\t\t\tfor (i=tBottom-1;i >=tTop;i--){\n\t\t\t\t\t\t\t\tfor (j=tLeft;j < tRight;j++){\n\t\t\t\t\t\t\t\t\tif (tLayer.drawTileTexture(tGridSprite,j,i)){\n\t\t\t\t\t\t\t\t\t\ttGridSprite.drawImageNum++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\tcase \"left-down\":\n\t\t\t\t\t\t\ttGridSprite.zOrder=z *this._totalGridNum+gridY *this._gridW+(this._gridW-1-gridX);\n\t\t\t\t\t\t\tfor (i=tTop;i < tBottom;i++){\n\t\t\t\t\t\t\t\tfor (j=tRight-1;j >=tLeft;j--){\n\t\t\t\t\t\t\t\t\tif (tLayer.drawTileTexture(tGridSprite,j,i)){\n\t\t\t\t\t\t\t\t\t\ttGridSprite.drawImageNum++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\tcase \"left-up\":\n\t\t\t\t\t\t\ttGridSprite.zOrder=z *this._totalGridNum+(this._gridH-1-gridY)*this._gridW+(this._gridW-1-gridX);\n\t\t\t\t\t\t\tfor (i=tBottom-1;i >=tTop;i--){\n\t\t\t\t\t\t\t\tfor (j=tRight-1;j >=tLeft;j--){\n\t\t\t\t\t\t\t\t\tif (tLayer.drawTileTexture(tGridSprite,j,i)){\n\t\t\t\t\t\t\t\t\t\ttGridSprite.drawImageNum++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t\tif (!tGridSprite.isHaveAnimation){\n\t\t\t\t\ttGridSprite.autoSize=true;\n\t\t\t\t\tif (this.autoCache)\n\t\t\t\t\t\ttGridSprite.cacheAs=this.autoCacheType;\n\t\t\t\t\ttGridSprite.autoSize=false;\n\t\t\t\t}\n\t\t\t\tif (!this.enableMergeLayer){\n\t\t\t\t\tif (tGridSprite.drawImageNum > 0){\n\t\t\t\t\t\ttLayer.addChild(tGridSprite);\n\t\t\t\t\t\ttGridSprite.visible=false;\n\t\t\t\t\t\ttGridSprite.show();\n\t\t\t\t\t}\n\t\t\t\t\tif (this._showGridKey){\n\t\t\t\t\t\ttGridSprite.graphics.drawRect(0,0,tGridWidth,tGridHeight,null,tColorStr);\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tif (tTGridSprite && tTGridSprite.drawImageNum > 0&&tDrawMapLayer){\n\t\t\t\t\t\ttDrawMapLayer.addChild(tTGridSprite);\n\t\t\t\t\t\ttTGridSprite.visible=false;\n\t\t\t\t\t\ttTGridSprite.show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.enableMergeLayer&&this.showGridTextureCount){\n\t\t\t\tif (tTGridSprite){\n\t\t\t\t\ttTGridSprite.graphics.fillText(tTGridSprite.drawImageNum+\"\",20,20,null,\"#ff0000\",\"left\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tTempArray;\n\t}\n\n\t/**\n\t*隐藏指定的GRID\n\t*@param gridX\n\t*@param gridY\n\t*/\n\t__proto.hideGrid=function(gridX,gridY){\n\t\tif (gridX < 0 || gridX >=this._gridW || gridY < 0 || gridY >=this._gridH){\n\t\t\treturn;\n\t\t};\n\t\tvar tTempArray=this._gridArray[gridY][gridX];\n\t\tif (tTempArray){\n\t\t\tvar tGridSprite;\n\t\t\tfor (var i=0;i < tTempArray.length;i++){\n\t\t\t\ttGridSprite=tTempArray[i];\n\t\t\t\tif (tGridSprite.drawImageNum > 0){\n\t\t\t\t\tif (tGridSprite !=null){\n\t\t\t\t\t\ttGridSprite.hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*得到对象层上的某一个物品\n\t*@param layerName 层的名称\n\t*@param objectName 所找物品的名称\n\t*@return\n\t*/\n\t__proto.getLayerObject=function(layerName,objectName){\n\t\tvar tLayer=null;\n\t\tfor (var i=0;i < this._layerArray.length;i++){\n\t\t\ttLayer=this._layerArray[i];\n\t\t\tif (tLayer.layerName==layerName){\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\tif (tLayer){\n\t\t\treturn tLayer.getObjectByName(objectName);\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*销毁地图\n\t*/\n\t__proto.destroy=function(){\n\t\tthis._orientation=\"orthogonal\";\n\t\tthis._jsonData=null;\n\t\tvar i=0;\n\t\tvar j=0;\n\t\tvar z=0;\n\t\tthis._gridArray=[];\n\t\tvar tTileTexSet;\n\t\tfor (i=0;i < this._tileTexSetArr.length;i++){\n\t\t\ttTileTexSet=this._tileTexSetArr[i];\n\t\t\tif (tTileTexSet){\n\t\t\t\ttTileTexSet.clearAll();\n\t\t\t}\n\t\t}\n\t\tthis._tileTexSetArr=[];\n\t\tvar tTexture;\n\t\tfor (i=0;i < this._texArray.length;i++){\n\t\t\ttTexture=this._texArray[i];\n\t\t\ttTexture.destroy();\n\t\t}\n\t\tthis._texArray=[];\n\t\tthis._width=0;\n\t\tthis._height=0;\n\t\tthis._mapW=0;\n\t\tthis._mapH=0;\n\t\tthis._mapTileW=0;\n\t\tthis._mapTileH=0;\n\t\tthis._rect.setTo(0,0,0,0);\n\t\tvar tLayer;\n\t\tfor (i=0;i < this._layerArray.length;i++){\n\t\t\ttLayer=this._layerArray[i];\n\t\t\ttLayer.clearAll();\n\t\t}\n\t\tthis._layerArray=[];\n\t\tthis._renderLayerArray=[];\n\t\tif (this._mapSprite){\n\t\t\tthis._mapSprite.destroy();\n\t\t\tthis._mapSprite=null;\n\t\t}\n\t\tthis._jsonLoader=null;\n\t\tthis._loader=null;\n\t\tvar tDic=this._animationDic;\n\t\tfor (var p in tDic){\n\t\t\tdelete tDic[p];\n\t\t}\n\t\tthis._properties=null;\n\t\ttDic=this._tileProperties;\n\t\tfor (p in tDic){\n\t\t\tdelete tDic[p];\n\t\t}\n\t\tthis._currTileSet=null;\n\t\tthis._completeHandler=null;\n\t\tthis._mapRect.clearAll();\n\t\tthis._mapLastRect.clearAll();\n\t\tthis._tileSetArray=[];\n\t\tthis._gridWidth=450;\n\t\tthis._gridHeight=450;\n\t\tthis._gridW=0;\n\t\tthis._gridH=0;\n\t\tthis._x=0;\n\t\tthis._y=0;\n\t\tthis._index=0;\n\t\tthis._enableLinear=true;\n\t\tthis._resPath=null;\n\t\tthis._pathArray=null;\n\t}\n\n\t/**\n\t*整个地图的显示容器\n\t*@return 地图的显示容器\n\t*/\n\t__proto.mapSprite=function(){\n\t\treturn this._mapSprite;\n\t}\n\n\t/**\n\t*得到指定的MapLayer\n\t*@param layerName 要找的层名称\n\t*@return\n\t*/\n\t__proto.getLayerByName=function(layerName){\n\t\tvar tMapLayer;\n\t\tfor (var i=0;i < this._layerArray.length;i++){\n\t\t\ttMapLayer=this._layerArray[i];\n\t\t\tif (layerName==tMapLayer.layerName){\n\t\t\t\treturn tMapLayer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*通过索引得MapLayer\n\t*@param index 要找的层索引\n\t*@return\n\t*/\n\t__proto.getLayerByIndex=function(index){\n\t\tif (index < this._layerArray.length){\n\t\t\treturn this._layerArray[index];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*当前地图类型\n\t*/\n\t__getset(0,__proto,'orientation',function(){\n\t\treturn this._orientation;\n\t});\n\n\t/**\n\t*@private\n\t*视口x坐标\n\t*/\n\t__getset(0,__proto,'viewPortX',function(){\n\t\treturn-this._viewPortX;\n\t});\n\n\t/**\n\t*设置地图缩放\n\t*@param scale\n\t*/\n\t/**\n\t*得到当前地图的缩放\n\t*/\n\t__getset(0,__proto,'scale',function(){\n\t\treturn this._scale;\n\t\t},function(scale){\n\t\tif (scale <=0)\n\t\t\treturn;\n\t\tthis._scale=scale;\n\t\tthis._viewPortWidth=this._rect.width / scale;\n\t\tthis._viewPortHeight=this._rect.height / scale;\n\t\tthis._mapSprite.scale(this._scale,this._scale);\n\t\tthis.updateViewPort();\n\t});\n\n\t/**\n\t*格子的宽度\n\t*/\n\t__getset(0,__proto,'tileWidth',function(){\n\t\treturn this._mapTileW;\n\t});\n\n\t/**\n\t*@private\n\t*视口的y坐标\n\t*/\n\t__getset(0,__proto,'viewPortY',function(){\n\t\treturn-this._viewPortY;\n\t});\n\n\t/**\n\t*格子的高度\n\t*/\n\t__getset(0,__proto,'tileHeight',function(){\n\t\treturn this._mapTileH;\n\t});\n\n\t/**\n\t*地图的宽度\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\treturn this._width;\n\t});\n\n\t/**\n\t*地图竖向的格子数\n\t*/\n\t__getset(0,__proto,'numRowsTile',function(){\n\t\treturn this._mapH;\n\t});\n\n\t/**\n\t*地图横向的格子数\n\t*/\n\t__getset(0,__proto,'numColumnsTile',function(){\n\t\treturn this._mapW;\n\t});\n\n\t/**\n\t*地图的高度\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\treturn this._height;\n\t});\n\n\t/**\n\t*@private\n\t*视口的宽度\n\t*/\n\t__getset(0,__proto,'viewPortWidth',function(){\n\t\treturn this._viewPortWidth;\n\t});\n\n\t/**\n\t*@private\n\t*视口的高度\n\t*/\n\t__getset(0,__proto,'viewPortHeight',function(){\n\t\treturn this._viewPortHeight;\n\t});\n\n\t/**\n\t*地图的x坐标\n\t*/\n\t__getset(0,__proto,'x',function(){\n\t\treturn this._x;\n\t});\n\n\t/**\n\t*地图的y坐标\n\t*/\n\t__getset(0,__proto,'y',function(){\n\t\treturn this._y;\n\t});\n\n\t/**\n\t*块的宽度\n\t*/\n\t__getset(0,__proto,'gridWidth',function(){\n\t\treturn this._gridWidth;\n\t});\n\n\t/**\n\t*块的高度\n\t*/\n\t__getset(0,__proto,'gridHeight',function(){\n\t\treturn this._gridHeight;\n\t});\n\n\t/**\n\t*地图的横向块数\n\t*/\n\t__getset(0,__proto,'numColumnsGrid',function(){\n\t\treturn this._gridW;\n\t});\n\n\t/**\n\t*地图的坚向块数\n\t*/\n\t__getset(0,__proto,'numRowsGrid',function(){\n\t\treturn this._gridH;\n\t});\n\n\t/**\n\t*tile渲染顺序\n\t*/\n\t__getset(0,__proto,'renderOrder',function(){\n\t\treturn this._renderOrder;\n\t});\n\n\tTiledMap.ORIENTATION_ORTHOGONAL=\"orthogonal\";\n\tTiledMap.ORIENTATION_ISOMETRIC=\"isometric\";\n\tTiledMap.ORIENTATION_STAGGERED=\"staggered\";\n\tTiledMap.ORIENTATION_HEXAGONAL=\"hexagonal\";\n\tTiledMap.RENDERORDER_RIGHTDOWN=\"right-down\";\n\tTiledMap.RENDERORDER_RIGHTUP=\"right-up\";\n\tTiledMap.RENDERORDER_LEFTDOWN=\"left-down\";\n\tTiledMap.RENDERORDER_LEFTUP=\"left-up\";\n\tTiledMap._tempContext=null;\n\tTiledMap.__init$=function(){\n\t\t//class GRect\n\t\tGRect=(function(){\n\t\t\tfunction GRect(){\n\t\t\t\tthis.left=0;\n\t\t\t\tthis.top=0;\n\t\t\t\tthis.right=0;\n\t\t\t\tthis.bottom=0;\n\t\t\t}\n\t\t\t__class(GRect,'');\n\t\t\tvar __proto=GRect.prototype;\n\t\t\t__proto.clearAll=function(){\n\t\t\t\tthis.left=this.top=this.right=this.bottom=0;\n\t\t\t}\n\t\t\treturn GRect;\n\t\t})()\n\t\t//class TileMapAniData\n\t\tTileMapAniData=(function(){\n\t\t\tfunction TileMapAniData(){\n\t\t\t\tthis.mAniIdArray=[];\n\t\t\t\tthis.mDurationTimeArray=[];\n\t\t\t\tthis.mTileTexSetArr=[];\n\t\t\t\tthis.image=null;\n\t\t\t}\n\t\t\t__class(TileMapAniData,'');\n\t\t\treturn TileMapAniData;\n\t\t})()\n\t\t//class TileSet\n\t\tTileSet=(function(){\n\t\t\tfunction TileSet(){\n\t\t\t\tthis.firstgid=0;\n\t\t\t\tthis.image=\"\";\n\t\t\t\tthis.imageheight=0;\n\t\t\t\tthis.imagewidth=0;\n\t\t\t\tthis.margin=0;\n\t\t\t\tthis.name=0;\n\t\t\t\tthis.properties=null;\n\t\t\t\tthis.spacing=0;\n\t\t\t\tthis.tileheight=0;\n\t\t\t\tthis.tilewidth=0;\n\t\t\t\tthis.titleoffsetX=0;\n\t\t\t\tthis.titleoffsetY=0;\n\t\t\t\tthis.tileproperties=null;\n\t\t\t}\n\t\t\t__class(TileSet,'');\n\t\t\tvar __proto=TileSet.prototype;\n\t\t\t__proto.init=function(data){\n\t\t\t\tthis.firstgid=data.firstgid;\n\t\t\t\tthis.image=data.image;\n\t\t\t\tthis.imageheight=data.imageheight;\n\t\t\t\tthis.imagewidth=data.imagewidth;\n\t\t\t\tthis.margin=data.margin;\n\t\t\t\tthis.name=data.name;\n\t\t\t\tthis.properties=data.properties;\n\t\t\t\tthis.spacing=data.spacing;\n\t\t\t\tthis.tileheight=data.tileheight;\n\t\t\t\tthis.tilewidth=data.tilewidth;\n\t\t\t\tthis.tileproperties=data.tileproperties;\n\t\t\t\tvar tTileoffset=data.tileoffset;\n\t\t\t\tif (tTileoffset){\n\t\t\t\t\tthis.titleoffsetX=tTileoffset.x;\n\t\t\t\t\tthis.titleoffsetY=tTileoffset.y;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn TileSet;\n\t\t})()\n\t}\n\n\treturn TiledMap;\n})()\n\n\n/**\n*此类是子纹理类，也包括同类动画的管理\n*TiledMap会把纹理分割成无数子纹理，也可以把其中的某块子纹理替换成一个动画序列\n*本类的实现就是如果发现子纹理被替换成一个动画序列，animationKey会被设为true\n*即animationKey为true,就使用TileAniSprite来做显示，把动画序列根据时间画到TileAniSprite上\n*@author ...\n*/\n//class laya.map.TileTexSet\nvar TileTexSet=(function(){\n\tfunction TileTexSet(){\n\t\t/**唯一标识*/\n\t\tthis.gid=-1;\n\t\t/**子纹理的引用*/\n\t\tthis.texture=null;\n\t\t/**纹理显示时的坐标偏移X*/\n\t\tthis.offX=0;\n\t\t/**纹理显示时的坐标偏移Y*/\n\t\tthis.offY=0;\n\t\t/**当前要播放动画的纹理序列*/\n\t\tthis.textureArray=null;\n\t\t/**当前动画每帧的时间间隔*/\n\t\tthis.durationTimeArray=null;\n\t\t/**动画播放的总时间 */\n\t\tthis.animationTotalTime=0;\n\t\t/**true表示当前纹理，是一组动画，false表示当前只有一个纹理*/\n\t\tthis.isAnimation=false;\n\t\tthis._spriteNum=0;\n\t\t//当前动画有多少个显示对象\n\t\tthis._aniDic=null;\n\t\t//通过显示对象的唯一名字，去保存显示显示对象\n\t\tthis._frameIndex=0;\n\t\t//当前动画播放到第几帧\n\t\tthis._time=0;\n\t\t//距离上次动画刷新，过了多少长时间\n\t\tthis._interval=0;\n\t\t//每帧刷新的时间间隔\n\t\tthis._preFrameTime=0;\n\t}\n\n\t__class(TileTexSet,'laya.map.TileTexSet');\n\tvar __proto=TileTexSet.prototype;\n\t/**\n\t*加入一个动画显示对象到此动画中\n\t*@param aniName //显示对象的名字\n\t*@param sprite //显示对象\n\t*/\n\t__proto.addAniSprite=function(aniName,sprite){\n\t\tif (this.animationTotalTime==0){\n\t\t\treturn;\n\t\t}\n\t\tif (this._aniDic==null){\n\t\t\tthis._aniDic={};\n\t\t}\n\t\tif (this._spriteNum==0){\n\t\t\tLaya.timer.frameLoop(3,this,this.animate);\n\t\t\tthis._preFrameTime=Browser.now();\n\t\t\tthis._frameIndex=0;\n\t\t\tthis._time=0;\n\t\t\tthis._interval=0;\n\t\t}\n\t\tthis._spriteNum++;\n\t\tthis._aniDic[aniName]=sprite;\n\t\tif (this.textureArray && this._frameIndex < this.textureArray.length){\n\t\t\tvar tTileTextureSet=this.textureArray[this._frameIndex];\n\t\t\tthis.drawTexture(sprite,tTileTextureSet);\n\t\t}\n\t}\n\n\t/**\n\t*把动画画到所有注册的SPRITE上\n\t*/\n\t__proto.animate=function(){\n\t\tif (this.textureArray && this.textureArray.length > 0 && this.durationTimeArray && this.durationTimeArray.length > 0){\n\t\t\tvar tNow=Browser.now();\n\t\t\tthis._interval=tNow-this._preFrameTime;\n\t\t\tthis._preFrameTime=tNow;\n\t\t\tif (this._interval > this.animationTotalTime){\n\t\t\t\tthis._interval=this._interval % this.animationTotalTime;\n\t\t\t}\n\t\t\tthis._time+=this._interval;\n\t\t\tvar tTime=this.durationTimeArray[this._frameIndex];\n\t\t\twhile (this._time > tTime){\n\t\t\t\tthis._time-=tTime;\n\t\t\t\tthis._frameIndex++;\n\t\t\t\tif (this._frameIndex >=this.durationTimeArray.length || this._frameIndex >=this.textureArray.length){\n\t\t\t\t\tthis._frameIndex=0;\n\t\t\t\t};\n\t\t\t\tvar tTileTextureSet=this.textureArray[this._frameIndex];\n\t\t\t\tvar tSprite;\n\t\t\t\tfor (var p in this._aniDic){\n\t\t\t\t\ttSprite=this._aniDic[p];\n\t\t\t\t\tthis.drawTexture(tSprite,tTileTextureSet);\n\t\t\t\t}\n\t\t\t\ttTime=this.durationTimeArray[this._frameIndex];\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.drawTexture=function(sprite,tileTextSet){\n\t\tsprite.graphics.clear();\n\t\tsprite.graphics.drawTexture(tileTextSet.texture,tileTextSet.offX,tileTextSet.offY);\n\t}\n\n\t/**\n\t*移除不需要更新的SPRITE\n\t*@param _name\n\t*/\n\t__proto.removeAniSprite=function(_name){\n\t\tif (this._aniDic && this._aniDic[_name]){\n\t\t\tdelete this._aniDic[_name];\n\t\t\tthis._spriteNum--\n\t\t\tif (this._spriteNum==0){\n\t\t\t\tLaya.timer.clear(this,this.animate);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*显示当前动画的使用情况\n\t*/\n\t__proto.showDebugInfo=function(){\n\t\tvar tInfo=null;\n\t\tif (this._spriteNum > 0){\n\t\t\ttInfo=\"TileTextureSet::gid:\"+this.gid.toString()+\" 动画数:\"+this._spriteNum.toString();\n\t\t}\n\t\treturn tInfo;\n\t}\n\n\t/**\n\t*清理\n\t*/\n\t__proto.clearAll=function(){\n\t\tthis.gid=-1;\n\t\tif (this.texture){\n\t\t\tthis.texture.destroy();\n\t\t\tthis.texture=null;\n\t\t}\n\t\tthis.offX=0;\n\t\tthis.offY=0;\n\t\tthis.textureArray=null;\n\t\tthis.durationTimeArray=null;\n\t\tthis.isAnimation=false;\n\t\tthis._spriteNum=0;\n\t\tthis._aniDic=null;\n\t\tthis._frameIndex=0;\n\t\tthis._preFrameTime=0;\n\t\tthis._time=0;\n\t\tthis._interval=0;\n\t}\n\n\treturn TileTexSet;\n})()\n\n\n/**\n*地图的每层都会分块渲染处理\n*本类就是地图的块数据\n*@author ...\n*/\n//class laya.map.GridSprite extends laya.display.Sprite\nvar GridSprite=(function(_super){\n\tfunction GridSprite(){\n\t\t/**相对于地图X轴的坐标*/\n\t\tthis.relativeX=0;\n\t\t/**相对于地图Y轴的坐标*/\n\t\tthis.relativeY=0;\n\t\t/**是否用于对象层的独立物件*/\n\t\tthis.isAloneObject=false;\n\t\t/**当前GRID中是否有动画*/\n\t\tthis.isHaveAnimation=false;\n\t\t/**当前GRID包含的动画*/\n\t\tthis.aniSpriteArray=null;\n\t\t/**当前GRID包含多少个TILE(包含动画)*/\n\t\tthis.drawImageNum=0;\n\t\tthis._map=null;\n\t\tGridSprite.__super.call(this);\n\t}\n\n\t__class(GridSprite,'laya.map.GridSprite',_super);\n\tvar __proto=GridSprite.prototype;\n\t/**\n\t*传入必要的参数，用于裁剪，跟确认此对象类型\n\t*@param map 把地图的引用传进来，参与一些裁剪计算\n\t*@param objectKey true:表示当前GridSprite是个活动对象，可以控制，false:地图层的组成块\n\t*/\n\t__proto.initData=function(map,objectKey){\n\t\t(objectKey===void 0)&& (objectKey=false);\n\t\tthis._map=map;\n\t\tthis.isAloneObject=objectKey;\n\t}\n\n\t/**@private */\n\t__proto._setDisplay=function(value){\n\t\tif (!value){\n\t\t\tvar cc=this._$P.cacheCanvas;\n\t\t\tif (cc && cc.ctx){\n\t\t\t\tcc.ctx.canvas.destroy();\n\t\t\t\tcc.ctx=null;\n\t\t\t};\n\t\t\tvar fc=this._$P._filterCache;\n\t\t\tif (fc){\n\t\t\t\tfc.destroy();\n\t\t\t\tfc.recycle();\n\t\t\t\tthis._set$P('_filterCache',null);\n\t\t\t}\n\t\t\tthis._$P._isHaveGlowFilter && this._set$P('_isHaveGlowFilter',false);\n\t\t}\n\t\t_super.prototype._setDisplay.call(this,value);\n\t}\n\n\t/**\n\t*把一个动画对象绑定到当前GridSprite\n\t*@param sprite 动画的显示对象\n\t*/\n\t__proto.addAniSprite=function(sprite){\n\t\tif (this.aniSpriteArray==null){\n\t\t\tthis.aniSpriteArray=[];\n\t\t}\n\t\tthis.aniSpriteArray.push(sprite);\n\t}\n\n\t/**\n\t*显示当前GridSprite，并把上面的动画全部显示\n\t*/\n\t__proto.show=function(){\n\t\tif (!this.visible){\n\t\t\tthis.visible=true;\n\t\t\tif (!this.isAloneObject){\n\t\t\t\tvar tParent;\n\t\t\t\ttParent=this.parent;\n\t\t\t\tif (tParent){\n\t\t\t\t\ttParent.showGridSprite(this);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!Render.isWebGL&&this._map.autoCache){\n\t\t\t\tthis.cacheAs=this._map.autoCacheType;\n\t\t\t}\n\t\t\tif (this.aniSpriteArray==null){\n\t\t\t\treturn;\n\t\t\t};\n\t\t\tvar tAniSprite;\n\t\t\tfor (var i=0;i < this.aniSpriteArray.length;i++){\n\t\t\t\ttAniSprite=this.aniSpriteArray[i];\n\t\t\t\ttAniSprite.show();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*隐藏当前GridSprite，并把上面绑定的动画全部移除\n\t*/\n\t__proto.hide=function(){\n\t\tif (this.visible){\n\t\t\tthis.visible=false;\n\t\t\tif (!this.isAloneObject){\n\t\t\t\tvar tParent;\n\t\t\t\ttParent=this.parent;\n\t\t\t\tif (tParent){\n\t\t\t\t\ttParent.hideGridSprite(this);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!Render.isWebGL&&this._map.autoCache){\n\t\t\t\tthis.cacheAs=\"none\";\n\t\t\t}\n\t\t\tif (this.aniSpriteArray==null){\n\t\t\t\treturn;\n\t\t\t};\n\t\t\tvar tAniSprite;\n\t\t\tfor (var i=0;i < this.aniSpriteArray.length;i++){\n\t\t\t\ttAniSprite=this.aniSpriteArray[i];\n\t\t\t\ttAniSprite.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*刷新坐标，当我们自己控制一个GridSprite移动时，需要调用此函数，手动刷新\n\t*/\n\t__proto.updatePos=function(){\n\t\tif (this.isAloneObject){\n\t\t\tif (this._map){\n\t\t\t\tthis.x=this.relativeX;\n\t\t\t\tthis.y=this.relativeY;\n\t\t\t}\n\t\t\tif (this.x < 0 || this.x > this._map.viewPortWidth || this.y < 0 || this.y > this._map.viewPortHeight){\n\t\t\t\tthis.hide();\n\t\t\t\t}else {\n\t\t\t\tthis.show();\n\t\t\t}\n\t\t\t}else {\n\t\t\tif (this._map){\n\t\t\t\tthis.x=this.relativeX;\n\t\t\t\tthis.y=this.relativeY;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*重置当前对象的所有属性\n\t*/\n\t__proto.clearAll=function(){\n\t\tif (this._map){\n\t\t\tthis._map=null;\n\t\t}\n\t\tthis.visible=false;\n\t\tvar tAniSprite;\n\t\tif (this.aniSpriteArray !=null){\n\t\t\tfor (var i=0;i < this.aniSpriteArray.length;i++){\n\t\t\t\ttAniSprite=this.aniSpriteArray[i];\n\t\t\t\ttAniSprite.clearAll();\n\t\t\t}\n\t\t}\n\t\tthis.destroy();\n\t\tthis.relativeX=0;\n\t\tthis.relativeY=0;\n\t\tthis.isHaveAnimation=false;\n\t\tthis.aniSpriteArray=null;\n\t\tthis.drawImageNum=0;\n\t}\n\n\treturn GridSprite;\n})(Sprite)\n\n\n/**\n*地图支持多层渲染（例如，地表层，植被层，建筑层等）\n*本类就是层级类\n*@author ...\n*/\n//class laya.map.MapLayer extends laya.display.Sprite\nvar MapLayer=(function(_super){\n\tfunction MapLayer(){\n\t\tthis._map=null;\n\t\tthis._mapData=null;\n\t\tthis._tileWidthHalf=0;\n\t\tthis._tileHeightHalf=0;\n\t\tthis._mapWidthHalf=0;\n\t\tthis._mapHeightHalf=0;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._gridSpriteArray=[];\n\t\tthis._objDic=null;\n\t\t//用来做字典，方便查询\n\t\tthis._dataDic=null;\n\t\t//临时变量\n\t\tthis._properties=null;\n\t\t/**被合到的层*/\n\t\tthis.tarLayer=null;\n\t\t/**当前Layer的名称*/\n\t\tthis.layerName=null;\n\t\t/**\n\t\t*当前需要更新的gridSprite列表\n\t\t*/\n\t\tthis._showGridList=[];\n\t\t/**\n\t\t*活动对象列表,活动对象不管是否显示都需要更新\n\t\t*/\n\t\tthis._aloneObjs=[];\n\t\tMapLayer.__super.call(this);\n\t\tthis._tempMapPos=new Point();\n\t}\n\n\t__class(MapLayer,'laya.map.MapLayer',_super);\n\tvar __proto=MapLayer.prototype;\n\t/**\n\t*解析LAYER数据，以及初始化一些数据\n\t*@param layerData 地图数据中，layer数据的引用\n\t*@param map 地图的引用\n\t*/\n\t__proto.init=function(layerData,map){\n\t\tthis._map=map;\n\t\tthis._mapData=layerData.data;\n\t\tvar tHeight=layerData.height;\n\t\tvar tWidth=layerData.width;\n\t\tvar tTileW=map.tileWidth;\n\t\tvar tTileH=map.tileHeight;\n\t\tthis.layerName=layerData.name;\n\t\tthis._properties=layerData.properties;\n\t\tthis.alpha=layerData.opacity;\n\t\tthis._tileWidthHalf=tTileW / 2;\n\t\tthis._tileHeightHalf=tTileH / 2;\n\t\tthis._mapWidthHalf=this._map.width / 2-this._tileWidthHalf;\n\t\tthis._mapHeightHalf=this._map.height / 2;\n\t\tswitch (layerData.type){\n\t\t\tcase \"tilelayer\":\n\t\t\t\tbreak ;\n\t\t\tcase \"objectgroup\":;\n\t\t\t\tvar tObjectGid=0;\n\t\t\t\tvar tArray=layerData.objects;\n\t\t\t\tif (tArray.length > 0){\n\t\t\t\t\tthis._objDic={};\n\t\t\t\t\tthis._dataDic={};\n\t\t\t\t};\n\t\t\t\tvar tObjectData;\n\t\t\t\tvar tObjWidth=NaN;\n\t\t\t\tvar tObjHeight=NaN;\n\t\t\t\tfor (var i=0;i < tArray.length;i++){\n\t\t\t\t\ttObjectData=tArray[i];\n\t\t\t\t\tthis._dataDic[tObjectData.name]=tObjectData;\n\t\t\t\t\tif (tObjectData.visible==true){\n\t\t\t\t\t\ttObjWidth=tObjectData.width;\n\t\t\t\t\t\ttObjHeight=tObjectData.height;\n\t\t\t\t\t\tvar tSprite=map.getSprite(tObjectData.gid,tObjWidth,tObjHeight);\n\t\t\t\t\t\tif (tSprite !=null){\n\t\t\t\t\t\tswitch (this._map.orientation){\n\t\t\t\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_ISOMETRIC*/\"isometric\":\n\t\t\t\t\t\t\t\tthis.getScreenPositionByTilePos(tObjectData.x / tTileH,tObjectData.y / tTileH,Point.TEMP);\n\t\t\t\t\t\t\t\ttSprite.pivot(tObjWidth / 2,tObjHeight / 2);\n\t\t\t\t\t\t\t\ttSprite.rotation=tObjectData.rotation;\n\t\t\t\t\t\t\t\ttSprite.x=tSprite.relativeX=Point.TEMP.x+this._map.viewPortX;\n\t\t\t\t\t\t\t\ttSprite.y=tSprite.relativeY=Point.TEMP.y+this._map.viewPortY-tObjHeight / 2;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_STAGGERED*/\"staggered\":\n\t\t\t\t\t\t\t\ttSprite.pivot(tObjWidth / 2,tObjHeight / 2);\n\t\t\t\t\t\t\t\ttSprite.rotation=tObjectData.rotation;\n\t\t\t\t\t\t\t\ttSprite.x=tSprite.relativeX=tObjectData.x+tObjWidth / 2;\n\t\t\t\t\t\t\t\ttSprite.y=tSprite.relativeY=tObjectData.y-tObjHeight / 2;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_ORTHOGONAL*/\"orthogonal\":\n\t\t\t\t\t\t\t\ttSprite.pivot(tObjWidth / 2,tObjHeight / 2);\n\t\t\t\t\t\t\t\ttSprite.rotation=tObjectData.rotation;\n\t\t\t\t\t\t\t\ttSprite.x=tSprite.relativeX=tObjectData.x+tObjWidth / 2;\n\t\t\t\t\t\t\t\ttSprite.y=tSprite.relativeY=tObjectData.y-tObjHeight / 2;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_HEXAGONAL*/\"hexagonal\":\n\t\t\t\t\t\t\t\ttSprite.x=tSprite.relativeX=tObjectData.x;\n\t\t\t\t\t\t\t\ttSprite.y=tSprite.relativeY=tObjectData.y;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.addChild(tSprite);\n\t\t\t\t\t\tthis._gridSpriteArray.push(tSprite);\n\t\t\t\t\t\tif (tSprite.isAloneObject){\n\t\t\t\t\t\t\tthis._showGridList.push(tSprite);\n\t\t\t\t\t\t\tthis._aloneObjs.push(tSprite);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._objDic[tObjectData.name]=tSprite;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak ;\n\t\t}\n\t}\n\n\t/**\n\t*通过名字获取控制对象，如果找不到返回为null\n\t*@param objName 所要获取对象的名字\n\t*@return\n\t*/\n\t__proto.getObjectByName=function(objName){\n\t\tif (this._objDic){\n\t\t\treturn this._objDic[objName];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*通过名字获取数据，如果找不到返回为null\n\t*@param objName 所要获取对象的名字\n\t*@return\n\t*/\n\t__proto.getObjectDataByName=function(objName){\n\t\tif (this._dataDic){\n\t\t\treturn this._dataDic[objName];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*得到地图层的自定义属性\n\t*@param name\n\t*@return\n\t*/\n\t__proto.getLayerProperties=function(name){\n\t\tif (this._properties){\n\t\t\treturn this._properties[name];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*得到指定格子的数据\n\t*@param tileX 格子坐标X\n\t*@param tileY 格子坐标Y\n\t*@return\n\t*/\n\t__proto.getTileData=function(tileX,tileY){\n\t\tif (tileY >=0 && tileY < this._map.numRowsTile && tileX >=0 && tileX < this._map.numColumnsTile){\n\t\t\tvar tIndex=tileY *this._map.numColumnsTile+tileX;\n\t\t\tvar tMapData=this._mapData;\n\t\t\tif (tMapData !=null && tIndex < tMapData.length){\n\t\t\t\treturn tMapData[tIndex];\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}\n\n\t/**\n\t*通过地图坐标得到屏幕坐标\n\t*@param tileX 格子坐标X\n\t*@param tileY 格子坐标Y\n\t*@param screenPos 把计算好的屏幕坐标数据，放到此对象中\n\t*/\n\t__proto.getScreenPositionByTilePos=function(tileX,tileY,screenPos){\n\t\tif (screenPos){\n\t\t\tswitch (this._map.orientation){\n\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_ISOMETRIC*/\"isometric\":\n\t\t\t\t\tscreenPos.x=this._map.width / 2-(tileY-tileX)*this._tileWidthHalf;\n\t\t\t\t\tscreenPos.y=(tileY+tileX)*this._tileHeightHalf;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_STAGGERED*/\"staggered\":\n\t\t\t\t\ttileX=Math.floor(tileX);\n\t\t\t\t\ttileY=Math.floor(tileY);\n\t\t\t\t\tscreenPos.x=tileX *this._map.tileWidth+(tileY & 1)*this._tileWidthHalf;\n\t\t\t\t\tscreenPos.y=tileY *this._tileHeightHalf;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_ORTHOGONAL*/\"orthogonal\":\n\t\t\t\t\tscreenPos.x=tileX *this._map.tileWidth;\n\t\t\t\t\tscreenPos.y=tileY *this._map.tileHeight;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_HEXAGONAL*/\"hexagonal\":\n\t\t\t\t\ttileX=Math.floor(tileX);\n\t\t\t\t\ttileY=Math.floor(tileY);\n\t\t\t\t\tvar tTileHeight=this._map.tileHeight *2 / 3;\n\t\t\t\t\tscreenPos.x=(tileX *this._map.tileWidth+tileY % 2 *this._tileWidthHalf)% this._map.gridWidth;\n\t\t\t\t\tscreenPos.y=(tileY *tTileHeight)% this._map.gridHeight;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\tscreenPos.x=(screenPos.x+this._map.viewPortX)*this._map.scale;\n\t\t\tscreenPos.y=(screenPos.y+this._map.viewPortY)*this._map.scale;\n\t\t}\n\t}\n\n\t/**\n\t*通过屏幕坐标来获取选中格子的数据\n\t*@param screenX 屏幕坐标x\n\t*@param screenY 屏幕坐标y\n\t*@return\n\t*/\n\t__proto.getTileDataByScreenPos=function(screenX,screenY){\n\t\tvar tData=0;\n\t\tif (this.getTilePositionByScreenPos(screenX,screenY,this._tempMapPos)){\n\t\t\ttData=this.getTileData(Math.floor(this._tempMapPos.x),Math.floor(this._tempMapPos.y));\n\t\t}\n\t\treturn tData;\n\t}\n\n\t/**\n\t*通过屏幕坐标来获取选中格子的索引\n\t*@param screenX 屏幕坐标x\n\t*@param screenY 屏幕坐标y\n\t*@param result 把计算好的格子坐标，放到此对象中\n\t*@return\n\t*/\n\t__proto.getTilePositionByScreenPos=function(screenX,screenY,result){\n\t\tscreenX=screenX/this._map.scale-this._map.viewPortX;\n\t\tscreenY=screenY/this._map.scale-this._map.viewPortY;\n\t\tvar tTileW=this._map.tileWidth;\n\t\tvar tTileH=this._map.tileHeight;\n\t\tvar tV=0;\n\t\tvar tU=0;\n\t\tswitch (this._map.orientation){\n\t\t\tcase /*laya.map.TiledMap.ORIENTATION_ISOMETRIC*/\"isometric\":;\n\t\t\t\tvar tDirX=screenX-this._map.width / 2;\n\t\t\t\tvar tDirY=screenY;\n\t\t\t\ttV=-(tDirX / tTileW-tDirY / tTileH);\n\t\t\t\ttU=tDirX / tTileW+tDirY / tTileH;\n\t\t\t\tif (result){\n\t\t\t\t\tresult.x=tU;\n\t\t\t\t\tresult.y=tV;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t\tbreak ;\n\t\t\tcase /*laya.map.TiledMap.ORIENTATION_STAGGERED*/\"staggered\":\n\t\t\t\tif (result){\n\t\t\t\t\tvar cx=0,cy=0,rx=0,ry=0;\n\t\t\t\t\tcx=Math.floor(screenX / tTileW)*tTileW+tTileW / 2;\n\t\t\t\t\tcy=Math.floor(screenY / tTileH)*tTileH+tTileH / 2;\n\t\t\t\t\trx=(screenX-cx)*tTileH / 2;\n\t\t\t\t\try=(screenY-cy)*tTileW / 2;\n\t\t\t\t\tif (Math.abs(rx)+Math.abs(ry)<=tTileW *tTileH / 4){\n\t\t\t\t\t\ttU=Math.floor(screenX / tTileW);\n\t\t\t\t\t\ttV=Math.floor(screenY / tTileH)*2;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tscreenX=screenX-tTileW / 2;\n\t\t\t\t\t\ttU=Math.floor(screenX / tTileW)+1;\n\t\t\t\t\t\tscreenY=screenY-tTileH / 2;\n\t\t\t\t\t\ttV=Math.floor(screenY / tTileH)*2+1;\n\t\t\t\t\t}\n\t\t\t\t\tresult.x=tU-(tV & 1);\n\t\t\t\t\tresult.y=tV;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t\tbreak ;\n\t\t\tcase /*laya.map.TiledMap.ORIENTATION_ORTHOGONAL*/\"orthogonal\":\n\t\t\t\ttU=screenX / tTileW;\n\t\t\t\ttV=screenY / tTileH;\n\t\t\t\tif (result){\n\t\t\t\t\tresult.x=tU;\n\t\t\t\t\tresult.y=tV;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t\tbreak ;\n\t\t\tcase /*laya.map.TiledMap.ORIENTATION_HEXAGONAL*/\"hexagonal\":;\n\t\t\t\tvar tTileHeight=tTileH *2 / 3;\n\t\t\t\ttV=screenY / tTileHeight;\n\t\t\t\ttU=(screenX-tV % 2 *this._tileWidthHalf)/ tTileW;\n\t\t\t\tif (result){\n\t\t\t\t\tresult.x=tU;\n\t\t\t\t\tresult.y=tV;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*得到一个GridSprite\n\t*@param gridX 当前Grid的X轴索引\n\t*@param gridY 当前Grid的Y轴索引\n\t*@return 一个GridSprite对象\n\t*/\n\t__proto.getDrawSprite=function(gridX,gridY){\n\t\tvar tSprite=new GridSprite();\n\t\ttSprite.relativeX=gridX *this._map.gridWidth;\n\t\ttSprite.relativeY=gridY *this._map.gridHeight;\n\t\ttSprite.initData(this._map);\n\t\ttSprite.updatePos();\n\t\tthis._gridSpriteArray.push(tSprite);\n\t\treturn tSprite;\n\t}\n\n\t/**\n\t*将gridSprite设为显示状态\n\t*@param gridSprite\n\t*/\n\t__proto.showGridSprite=function(gridSprite){\n\t\tvar gridList=this._showGridList;\n\t\tvar i=0,len=0;\n\t\tlen=gridList.length;\n\t\tvar ok_i=-1;\n\t\tvar tGridSprite;\n\t\tfor (i=0;i < len;i++){\n\t\t\ttGridSprite=gridList[i];\n\t\t\tif (tGridSprite==gridSprite)return;\n\t\t\tif (!tGridSprite.isAloneObject && !tGridSprite.visible){\n\t\t\t\tok_i=i;\n\t\t\t}\n\t\t}\n\t\tif (ok_i >=0){\n\t\t\tgridList[ok_i]=gridSprite;\n\t\t\t}else{\n\t\t\tgridList.push(gridSprite);\n\t\t}\n\t}\n\n\t/**\n\t*将gridSprite设为隐藏状态\n\t*@param gridSprite\n\t*\n\t*/\n\t__proto.hideGridSprite=function(gridSprite){\n\t\tgridSprite.visible=false;\n\t}\n\n\t/**\n\t*更新此层中块的坐标\n\t*手动刷新的目的是，保持层级的宽和高保持最小，加快渲染\n\t*/\n\t__proto.updateGridPos=function(){\n\t\tvar tSprite;\n\t\tvar tList;\n\t\ttList=this._showGridList;\n\t\tvar len=0;\n\t\tlen=tList.length;\n\t\tfor (var i=0;i < len;i++){\n\t\t\ttSprite=tList[i];\n\t\t\tif ((tSprite._style.visible || tSprite.isAloneObject)&& tSprite.drawImageNum > 0){\n\t\t\t\ttSprite.updatePos();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*更新此层中的活动对象\n\t*/\n\t__proto.updateAloneObject=function(){\n\t\tvar tSprite;\n\t\tvar tList;\n\t\ttList=this._aloneObjs;\n\t\tvar len=0;\n\t\tlen=tList.length;\n\t\tfor (var i=0;i < len;i++){\n\t\t\ttSprite=tList[i];\n\t\t\tif (tSprite.drawImageNum > 0){\n\t\t\t\ttSprite.updatePos();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*渲染时使用需要更新的列表进行渲染，减少遍历\n\t*@param context\n\t*@param x\n\t*@param y\n\t*\n\t*/\n\t__proto.render=function(context,x,y){\n\t\tvar childs=this._childs;\n\t\tthis._childs=this._showGridList;\n\t\t_super.prototype.render.call(this,context,x,y);\n\t\tthis._childs=childs;\n\t}\n\n\t/**\n\t*@private\n\t*把tile画到指定的显示对象上\n\t*@param gridSprite 被指定显示的目标\n\t*@param tileX 格子的X轴坐标\n\t*@param tileY 格子的Y轴坐标\n\t*@return\n\t*/\n\t__proto.drawTileTexture=function(gridSprite,tileX,tileY){\n\t\tif (tileY >=0 && tileY < this._map.numRowsTile && tileX >=0 && tileX < this._map.numColumnsTile){\n\t\t\tvar tIndex=tileY *this._map.numColumnsTile+tileX;\n\t\t\tvar tMapData=this._mapData;\n\t\t\tif (tMapData !=null && tIndex < tMapData.length){\n\t\t\t\tif (tMapData[tIndex] !=0){\n\t\t\t\t\tvar tTileTexSet=this._map.getTexture(tMapData[tIndex]);\n\t\t\t\t\tif (tTileTexSet){\n\t\t\t\t\t\tvar tX=0;\n\t\t\t\t\t\tvar tY=0;\n\t\t\t\t\t\tvar tTexture=tTileTexSet.texture;\n\t\t\t\t\t\tswitch (this._map.orientation){\n\t\t\t\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_STAGGERED*/\"staggered\":\n\t\t\t\t\t\t\t\ttX=tileX *this._map.tileWidth % this._map.gridWidth+(tileY & 1)*this._tileWidthHalf;\n\t\t\t\t\t\t\t\ttY=tileY *this._tileHeightHalf % this._map.gridHeight;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_ORTHOGONAL*/\"orthogonal\":\n\t\t\t\t\t\t\t\ttX=tileX *this._map.tileWidth % this._map.gridWidth;\n\t\t\t\t\t\t\t\ttY=tileY *this._map.tileHeight % this._map.gridHeight;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_ISOMETRIC*/\"isometric\":\n\t\t\t\t\t\t\t\ttX=(this._mapWidthHalf+(tileX-tileY)*this._tileWidthHalf)% this._map.gridWidth;\n\t\t\t\t\t\t\t\ttY=((tileX+tileY)*this._tileHeightHalf)% this._map.gridHeight;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\tcase /*laya.map.TiledMap.ORIENTATION_HEXAGONAL*/\"hexagonal\":;\n\t\t\t\t\t\t\t\tvar tTileHeight=this._map.tileHeight *2 / 3;\n\t\t\t\t\t\t\t\ttX=(tileX *this._map.tileWidth+tileY % 2 *this._tileWidthHalf)% this._map.gridWidth;\n\t\t\t\t\t\t\t\ttY=(tileY *tTileHeight)% this._map.gridHeight;\n\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tTileTexSet.isAnimation){\n\t\t\t\t\t\t\tvar tAnimationSprite=new TileAniSprite();\n\t\t\t\t\t\t\ttAnimationSprite.x=tX;\n\t\t\t\t\t\t\ttAnimationSprite.y=tY;\n\t\t\t\t\t\t\ttAnimationSprite.setTileTextureSet(tIndex.toString(),tTileTexSet);\n\t\t\t\t\t\t\tgridSprite.addAniSprite(tAnimationSprite);\n\t\t\t\t\t\t\tgridSprite.addChild(tAnimationSprite);\n\t\t\t\t\t\t\tgridSprite.isHaveAnimation=true;\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tgridSprite.graphics.drawTexture(tTileTexSet.texture,tX+tTileTexSet.offX,tY+tTileTexSet.offY);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t*@private\n\t*清理当前对象\n\t*/\n\t__proto.clearAll=function(){\n\t\tthis._map=null;\n\t\tthis._mapData=null;\n\t\tthis._tileWidthHalf=0;\n\t\tthis._tileHeightHalf=0;\n\t\tthis._mapWidthHalf=0;\n\t\tthis._mapHeightHalf=0;\n\t\tthis.layerName=null;\n\t\tvar i=0;\n\t\tif (this._objDic){\n\t\t\tfor (var p in this._objDic){\n\t\t\t\tdelete this._objDic[p];\n\t\t\t}\n\t\t\tthis._objDic=null;\n\t\t}\n\t\tif (this._dataDic){\n\t\t\tfor (p in this._dataDic){\n\t\t\t\tdelete this._dataDic[p];\n\t\t\t}\n\t\t\tthis._dataDic=null;\n\t\t};\n\t\tvar tGridSprite;\n\t\tfor (i=0;i < this._gridSpriteArray.length;i++){\n\t\t\ttGridSprite=this._gridSpriteArray[i];\n\t\t\ttGridSprite.clearAll();\n\t\t}\n\t\tthis._properties=null;\n\t\tthis._tempMapPos=null;\n\t\tthis.tarLayer=null;\n\t}\n\n\treturn MapLayer;\n})(Sprite)\n\n\n/**\n*TildMap的动画显示对象（一个动画（TileTexSet），可以绑定多个动画显示对象（TileAniSprite））\n*@author ...\n*/\n//class laya.map.TileAniSprite extends laya.display.Sprite\nvar TileAniSprite=(function(_super){\n\tfunction TileAniSprite(){\n\t\tthis._tileTextureSet=null;\n\t\t//动画的引用\n\t\tthis._aniName=null;\n\t\tTileAniSprite.__super.call(this);\n\t}\n\n\t__class(TileAniSprite,'laya.map.TileAniSprite',_super);\n\tvar __proto=TileAniSprite.prototype;\n\t/**\n\t*确定当前显示对象的名称以及属于哪个动画\n\t*@param aniName 当前动画显示对象的名字，名字唯一\n\t*@param tileTextureSet 当前显示对象属于哪个动画（一个动画，可以绑定多个同类显示对象）\n\t*/\n\t__proto.setTileTextureSet=function(aniName,tileTextureSet){\n\t\tthis._aniName=aniName;\n\t\tthis._tileTextureSet=tileTextureSet;\n\t\ttileTextureSet.addAniSprite(this._aniName,this);\n\t}\n\n\t/**\n\t*把当前动画加入到对应的动画刷新列表中\n\t*/\n\t__proto.show=function(){\n\t\tthis._tileTextureSet.addAniSprite(this._aniName,this);\n\t}\n\n\t/**\n\t*把当前动画从对应的动画刷新列表中移除\n\t*/\n\t__proto.hide=function(){\n\t\tthis._tileTextureSet.removeAniSprite(this._aniName);\n\t}\n\n\t/**\n\t*清理\n\t*/\n\t__proto.clearAll=function(){\n\t\tthis._tileTextureSet.removeAniSprite(this._aniName);\n\t\tthis.destroy();\n\t\tthis._tileTextureSet=null;\n\t\tthis._aniName=null;\n\t}\n\n\treturn TileAniSprite;\n})(Sprite)\n\n\n\tLaya.__init([TiledMap]);\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.ttmini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar Sound=laya.media.Sound,SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,URL=laya.net.URL;\n\tvar Utils=laya.utils.Utils;\n/**@private **/\n//class laya.tt.mini.MiniFileMgr\nvar MiniFileMgr$8=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.tt.mini.MiniFileMgr',null,'MiniFileMgr$8');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=TTMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(TTMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(encodeURI(readyUrl),encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(TTMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (MiniFileMgr.filesListObj[readyUrl]){\n\t\t\t\t\t\tif (MiniFileMgr.filesListObj[readyUrl]==MiniFileMgr.fakeObj[readyUrl]){\n\t\t\t\t\t\t\tdelete MiniFileMgr.fakeObj[readyUrl];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete MiniFileMgr.filesListObj[readyUrl];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((TTMiniAdapter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\"wx.qlogo.cn\")==-1 && readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\tif(TTMiniAdapter.window.navigator.userAgent.indexOf('MiniGame')<0){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > TTMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tTTMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > TTMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tTTMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=TTMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.tt.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.tt.mini.MiniFileMgr.filesListObj && laya.tt.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.tt.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.tt.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.fakeObj[fileurlkey].md5==MiniFileMgr.filesListObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!TTMiniAdapter.isZiYu &&TTMiniAdapter.isPosMsgYu && TTMiniAdapter.window.tt.postMessage){\n\t\t\tTTMiniAdapter.window.tt.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tfilesListStr=MiniFileMgr.fs.readFileSync(fileUrl,encoding);\n\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=TTMiniAdapter.window.tt.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=TTMiniAdapter.window.tt.getFileSystemManager();},'wxdown',function(){return this.wxdown=TTMiniAdapter.window.tt.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.tt.mini.MiniImage\nvar MiniImage$8=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.tt.mini.MiniImage',null,'MiniImage$8');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (TTMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$8.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$8.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$8.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (TTMiniAdapter.subNativeFiles && TTMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in TTMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=TTMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tTTMiniAdapter.subNativeheads=TTMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tTTMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(TTMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && TTMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=TTMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$8.getFileInfo(url)){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(TTMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$8.downOtherFiles(encodeURI(url),new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(TTMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$8.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$8.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(TTMiniAdapter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr$8.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$8.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tdelete MiniFileMgr$8.filesListObj[sourceUrl];\n\t\t\tdelete MiniFileMgr$8.fakeObj[sourceUrl];\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.tt.mini.MiniInput\nvar MiniInput$8=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.tt.mini.MiniInput',null,'MiniInput$8');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\tTTMiniAdapter.window.tt.onWindowResize && TTMiniAdapter.window.tt.onWindowResize(function(res){\n\t\t\tTTMiniAdapter.window.dispatchEvent && TTMiniAdapter.window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$8;\n\t\tSoundManager._musicClass=MiniSound$8;\n\t\tvar model=TTMiniAdapter.systemInfo.model;\n\t\tvar system=TTMiniAdapter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.inputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tTTMiniAdapter.window.tt.offKeyboardConfirm();\n\t\tTTMiniAdapter.window.tt.offKeyboardInput();\n\t\tTTMiniAdapter.window.tt.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tTTMiniAdapter.window.tt.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\")\n\t\t\tlaya.tt.mini.MiniInput.inputEnter();\n\t\t})\n\t\tTTMiniAdapter.window.tt.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.tt.mini.MiniInput.inputEnter();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(){\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.inputblur=function(){\n\t\tMiniInput.hideKeyboard();\n\t}\n\n\tMiniInput.hideKeyboard=function(){\n\t\tTTMiniAdapter.window.tt.offKeyboardConfirm();\n\t\tTTMiniAdapter.window.tt.offKeyboardInput();\n\t\tTTMiniAdapter.window.tt.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.tt.mini.MiniLocalStorage\nvar MiniLocalStorage$8=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.tt.mini.MiniLocalStorage',null,'MiniLocalStorage$8');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\ttry{\n\t\t\tTTMiniAdapter.window.tt.setStorageSync(key,value);\n\t\t}\n\t\tcatch(error){\n\t\t\tTTMiniAdapter.window.tt.setStorage({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\treturn TTMiniAdapter.window.tt.getStorageSync(key);\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,value);\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\treturn MiniLocalStorage.getItem(key);\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\tTTMiniAdapter.window.tt.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\tTTMiniAdapter.window.tt.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=TTMiniAdapter.window.tt.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.tt.mini.MiniLocation\nvar MiniLocation$8=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.tt.mini.MiniLocation',null,'MiniLocation$8');\n\tMiniLocation.__init__=function(){\n\t\tTTMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tTTMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tTTMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tTTMiniAdapter.window.tt.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n//class laya.tt.mini.TTMiniAdapter\nvar TTMiniAdapter=(function(){\n\tfunction TTMiniAdapter(){}\n\t__class(TTMiniAdapter,'laya.tt.mini.TTMiniAdapter');\n\tTTMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tTTMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (TTMiniAdapter._inited)return;\n\t\tTTMiniAdapter._inited=true;\n\t\tTTMiniAdapter.window=/*__JS__ */window;\n\t\tif(!TTMiniAdapter.window.hasOwnProperty(\"tt\"))\n\t\t\treturn;\n\t\tif(TTMiniAdapter.window.navigator.userAgent.indexOf('MiniGame')<0)return;\n\t\tTTMiniAdapter.isZiYu=isSon;\n\t\tTTMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tTTMiniAdapter.EnvConfig={};\n\t\ttry{\n\t\t\t/*__JS__ */laya.webgl.resource.WebGLCanvas.premulAlpha=true;\n\t\t\t}catch(e){\n\t\t}\n\t\tif(!TTMiniAdapter.isZiYu){\n\t\t\tMiniFileMgr$8.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$8.existDir(MiniFileMgr$8.fileNativeDir,Handler.create(TTMiniAdapter,TTMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tTTMiniAdapter.systemInfo=TTMiniAdapter.window.tt.getSystemInfoSync();\n\t\tif (TTMiniAdapter.systemInfo.system.toLowerCase()==='ios 10.1.1'){\n\t\t\ttry{\n\t\t\t\t/*__JS__ */laya.webgl.resource.WebGLCharImage.canUseCanvas=false;\n\t\t\t\t}catch(e){\n\t\t\t}\n\t\t}\n\t\tTTMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tTTMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tTTMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tTTMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tTTMiniAdapter.window.CanvasRenderingContext2D=function (){\n\t\t};\n\t\tTTMiniAdapter.window.CanvasRenderingContext2D.prototype=TTMiniAdapter.window.tt.createCanvas().getContext('2d').__proto__;\n\t\tTTMiniAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tTTMiniAdapter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=TTMiniAdapter.pixelRatio;\n\t\tTTMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=TTMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=TTMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=TTMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$8['_createInputElement'];\n\t\tTTMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$8.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$8.prototype._loadImage;\n\t\tLocalStorage._baseClass=MiniLocalStorage$8;\n\t\tMiniLocalStorage$8.__init__();\n\t\tTTMiniAdapter.openCtx=TTMiniAdapter.window.tt.getOpenDataContext();\n\t\tTTMiniAdapter.onReciveData();\n\t\tConfig.useRetinalCanvas=true;\n\t}\n\n\tTTMiniAdapter.onReciveData=function(){\n\t\tif(laya.tt.mini.TTMiniAdapter.isZiYu){\n\t\t\tTTMiniAdapter.window.tt.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$8.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr$8.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$8.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr$8.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tTTMiniAdapter.measureText=function(str){\n\t\tvar tempObj=TTMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tTTMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tTTMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$8.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$8.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tTTMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$8.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tTTMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$8.deleteAll();\n\t}\n\n\tTTMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$8.isLocalNativeFile(fileUrl);\n\t}\n\n\tTTMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$8.getFileInfo(fileUrl);\n\t}\n\n\tTTMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$8.filesListObj;\n\t}\n\n\tTTMiniAdapter.exitMiniProgram=function(){\n\t\tTTMiniAdapter.window.tt.exitMiniProgram();\n\t}\n\n\tTTMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr$8.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr$8.fakeObj=JSON.parse(data.data);\n\t\t}\n\t}\n\n\tTTMiniAdapter.pixelRatio=function(){\n\t\tif (!TTMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tTTMiniAdapter.EnvConfig.pixelRatioInt=TTMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn TTMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn TTMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tTTMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (TTMiniAdapter.idx==1){\n\t\t\t\tif(TTMiniAdapter.isZiYu){\n\t\t\t\t\t_source=TTMiniAdapter.window.sharedCanvas;\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=TTMiniAdapter.window.canvas;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=TTMiniAdapter.window.tt.createCanvas();\n\t\t\t}\n\t\t\tTTMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn TTMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=TTMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn TTMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tTTMiniAdapter.onCreateInput=function(type){\n\t\tvar node=TTMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$8.inputFocus;\n\t\tnode.blur=MiniInput$8.inputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tTTMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tTTMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.tt.mini.TTMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tTTMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tTTMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$8.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$8.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tTTMiniAdapter.openCtx.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tTTMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$8.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$8.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tTTMiniAdapter.openCtx.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tTTMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.tt.mini.TTMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tTTMiniAdapter.openCtx.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tTTMiniAdapter.EnvConfig=null;\n\tTTMiniAdapter.window=null;\n\tTTMiniAdapter._preCreateElement=null;\n\tTTMiniAdapter._inited=false;\n\tTTMiniAdapter.systemInfo=null;\n\tTTMiniAdapter.isZiYu=false;\n\tTTMiniAdapter.isPosMsgYu=false;\n\tTTMiniAdapter.autoCacheFile=true;\n\tTTMiniAdapter.minClearSize=(5 *1024 *1024);\n\tTTMiniAdapter.subNativeFiles=null;\n\tTTMiniAdapter.subNativeheads=[];\n\tTTMiniAdapter.subMaps=[];\n\tTTMiniAdapter.AutoCacheDownFile=false;\n\tTTMiniAdapter.openCtx=null;\n\tTTMiniAdapter._measureText=null;\n\tTTMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tTTMiniAdapter.idx=1;\n\t__static(TTMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"wxlocal\"];}\n\t]);\n\treturn TTMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.tt.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$8=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.tt.mini.MiniAccelerator',_super,'MiniAccelerator$8');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tTTMiniAdapter.window.wx.onAccelerometerChange(laya.tt.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tTTMiniAdapter.window.wx.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tt.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$8=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.tt.mini.MiniLoader',_super,'MiniLoader$8');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=TTMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tTTMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(TTMiniAdapter.isZiYu && !MiniFileMgr$8.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(TTMiniAdapter.isZiYu && MiniFileMgr$8.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$8.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$8.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr$8.isLocalNativeFile(url)){\n\t\t\t\t\tif (TTMiniAdapter.subNativeFiles && TTMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in TTMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=TTMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tTTMiniAdapter.subNativeheads=TTMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tTTMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(TTMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && TTMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=TTMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(type==/*laya.net.Loader.SOUND*/\"sound\"){\n\t\t\t\t\t\tthisLoader._loadSound(url);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tMiniFileMgr$8.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(TTMiniAdapter.window.tt.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !TTMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tif(type==/*laya.net.Loader.SOUND*/\"sound\"){\n\t\t\t\t\t\tthisLoader._loadSound(url);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tTTMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$8.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$8.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tTTMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$8.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$8.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$8.downFiles(encodeURI(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$8.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$8.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$8.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),URL.formatURL(url));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*private\n\t*@param url\n\t**/\n\t__proto._loadSound=function(url){\n\t\tvar thisLoader=this;\n\t\tvar fileNativeUrl;\n\t\tif (MiniFileMgr$8.isLocalNativeFile(url)){\n\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\tvar tempUrl=url;\n\t\t\tif(tempStr !=\"\" && (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1))\n\t\t\t\tfileNativeUrl=url.split(tempStr)[1];\n\t\t\tif(!fileNativeUrl){\n\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t}\n\t\t\tlaya.tt.mini.MiniLoader.onDownLoadCallBack(url,thisLoader,0);\n\t\t\t}else{\n\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\tif (!MiniFileMgr$8.isLocalNativeFile(url)&& (tempurl.indexOf(\"http://\")==-1 && tempurl.indexOf(\"https://\")==-1)|| (tempurl.indexOf(TTMiniAdapter.window.tt.env.USER_DATA_PATH)!=-1)){\n\t\t\t\tlaya.tt.mini.MiniLoader.onDownLoadCallBack(url,thisLoader,0);\n\t\t\t\t}else{\n\t\t\t\tMiniFileMgr$8.downOtherFiles(encodeURI(tempurl),Handler.create(MiniLoader,laya.tt.mini.MiniLoader.onDownLoadCallBack,[tempurl,thisLoader]),tempurl);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onDownLoadCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(TTMiniAdapter.autoCacheFile){\n\t\t\t\tif(!tempFilePath){\n\t\t\t\t\tif (MiniFileMgr$8.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tvar fileObj=MiniFileMgr$8.getFileInfo(sourceUrl);\n\t\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$8.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsourceUrl=fileNativeUrl;\n\t\t\tvar sound=new SoundManager._soundClass();\n\t\t\tsound.load(encodeURI(sourceUrl));\n\t\t\tthisLoader.onLoaded(sound);\n\t\t\t}else{\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load sound failed\");\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=TTMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!TTMiniAdapter.isZiYu &&TTMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\" && TTMiniAdapter.window.tt){\n\t\t\t\tTTMiniAdapter.window.tt.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tconsole.log(\"-----------本地加载失败，尝试外网加载----url:\"+url);\n\t\t\tTTMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tt.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$8=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.tt.mini.MiniSound',_super,'MiniSound$8');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$8.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$8.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$8.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(TTMiniAdapter.autoCacheFile&&MiniFileMgr$8.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!TTMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$8.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (TTMiniAdapter.subNativeFiles && TTMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in TTMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=TTMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tTTMiniAdapter.subNativeheads=TTMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tTTMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(TTMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && TTMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=TTMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$8.downOtherFiles(encodeURI(url),Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(TTMiniAdapter.autoCacheFile){\n\t\t\t\tif (MiniFileMgr$8.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$8.getFileInfo(sourceUrl);\n\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$8.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tfileNativeUrl=encodeURI(sourceUrl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=encodeURI(sourceUrl);\n\t\t\t}\n\t\t\tthis._sound.onCanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\tthis._sound.onError(MiniSound.bindToThis(this.onError,this));\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tthis._sound.offError(null);\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis._sound.offCanplay(null);\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(TTMiniAdapter.autoCacheFile&&MiniFileMgr$8.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr$8.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr$8.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=encodeURI(this.url);\n\t\t};\n\t\tvar channel=new MiniSoundChannel$8(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t\tif(this._sound){\n\t\t\tthis._sound.destroy();\n\t\t\tthis._sound=null;\n\t\t}\n\t\tthis.url=this.readyUrl=null;\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn TTMiniAdapter.window.tt.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.tt.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$8=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onEnded(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.tt.mini.MiniSoundChannel',_super,'MiniSoundChannel$8');\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tthis._audio.offEnded(null);\n\t\tthis._audio.destroy();\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',null,function(time){\n\t\tif(this._audio){\n\t\t\tthis._audio.startTime=time;\n\t\t}\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.tt.mini.MiniVideo\nvar MiniVideo$6=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=TTMiniAdapter.window.tt.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.tt.mini.MiniVideo',null,'MiniVideo$6');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.ui.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Animation=laya.display.Animation,Browser=laya.utils.Browser,ClassUtils=laya.utils.ClassUtils,ColorFilter=laya.filters.ColorFilter;\n\tvar Ease=laya.utils.Ease,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher,Font=laya.display.css.Font;\n\tvar FrameAnimation=laya.display.FrameAnimation,Graphics=laya.display.Graphics,Handler=laya.utils.Handler;\n\tvar HttpRequest=laya.net.HttpRequest,Input=laya.display.Input,Loader=laya.net.Loader,LocalStorage=laya.net.LocalStorage;\n\tvar Node=laya.display.Node,Point=laya.maths.Point,Rectangle=laya.maths.Rectangle,Render=laya.renders.Render;\n\tvar Sprite=laya.display.Sprite,Stage=laya.display.Stage,Text=laya.display.Text,Texture=laya.resource.Texture;\n\tvar TimeLine=laya.utils.TimeLine,Tween=laya.utils.Tween,Utils=laya.utils.Utils,WeakObject=laya.utils.WeakObject;\nLaya.interface('laya.ui.IItem');\nLaya.interface('laya.ui.ISelect');\nLaya.interface('laya.ui.IRender');\nLaya.interface('laya.ui.IComponent');\nLaya.interface('laya.ui.IBox','IComponent');\n/**\n*<code>LayoutStyle</code> 是一个布局样式类。\n*/\n//class laya.ui.LayoutStyle\nvar LayoutStyle=(function(){\n\tfunction LayoutStyle(){\n\t\t/**一个布尔值，表示是否有效。*/\n\t\tthis.enable=false;\n\t\tthis.top=NaN;\n\t\tthis.bottom=NaN;\n\t\tthis.left=NaN;\n\t\tthis.right=NaN;\n\t\tthis.centerX=NaN;\n\t\tthis.centerY=NaN;\n\t\tthis.anchorX=NaN;\n\t\tthis.anchorY=NaN;\n\t}\n\n\t__class(LayoutStyle,'laya.ui.LayoutStyle');\n\t__static(LayoutStyle,\n\t['EMPTY',function(){return this.EMPTY=new LayoutStyle();}\n\t]);\n\treturn LayoutStyle;\n})()\n\n\n/**\n*<code>Styles</code> 定义了组件常用的样式属性。\n*/\n//class laya.ui.Styles\nvar Styles=(function(){\n\tfunction Styles(){}\n\t__class(Styles,'laya.ui.Styles');\n\tStyles.labelColor=\"#000000\";\n\tStyles.buttonStateNum=3;\n\tStyles.scrollBarMinNum=15;\n\tStyles.scrollBarDelayTime=500;\n\t__static(Styles,\n\t['defaultSizeGrid',function(){return this.defaultSizeGrid=[4,4,4,4,0];},'labelPadding',function(){return this.labelPadding=[2,2,2,2];},'inputLabelPadding',function(){return this.inputLabelPadding=[1,1,1,3];},'buttonLabelColors',function(){return this.buttonLabelColors=[\"#32556b\",\"#32cc6b\",\"#ff0000\",\"#C0C0C0\"];},'comboBoxItemColors',function(){return this.comboBoxItemColors=[\"#5e95b6\",\"#ffffff\",\"#000000\",\"#8fa4b1\",\"#ffffff\"];}\n\t]);\n\treturn Styles;\n})()\n\n\n/**\n*<code>UIUtils</code> 是文本工具集。\n*/\n//class laya.ui.UIUtils\nvar UIUtils=(function(){\n\tfunction UIUtils(){}\n\t__class(UIUtils,'laya.ui.UIUtils');\n\tUIUtils.fillArray=function(arr,str,type){\n\t\tvar temp=arr.concat();\n\t\tif (str){\n\t\t\tvar a=str.split(\",\");\n\t\t\tfor (var i=0,n=Math.min(temp.length,a.length);i < n;i++){\n\t\t\t\tvar value=a[i];\n\t\t\t\ttemp[i]=(value==\"true\" ? true :(value==\"false\" ? false :value));\n\t\t\t\tif (type !=null)temp[i]=type(value);\n\t\t\t}\n\t\t}\n\t\treturn temp;\n\t}\n\n\tUIUtils.toColor=function(color){\n\t\treturn Utils.toHexColor(color);\n\t}\n\n\tUIUtils.gray=function(traget,isGray){\n\t\t(isGray===void 0)&& (isGray=true);\n\t\tif (isGray){\n\t\t\tUIUtils.addFilter(traget,UIUtils.grayFilter);\n\t\t\t}else {\n\t\t\tUIUtils.clearFilter(traget,ColorFilter);\n\t\t}\n\t}\n\n\tUIUtils.addFilter=function(target,filter){\n\t\tvar filters=target.filters || [];\n\t\tfilters.push(filter);\n\t\ttarget.filters=filters;\n\t}\n\n\tUIUtils.clearFilter=function(target,filterType){\n\t\tvar filters=target.filters;\n\t\tif (filters !=null && filters.length > 0){\n\t\t\tfor (var i=filters.length-1;i >-1;i--){\n\t\t\t\tvar filter=filters[i];\n\t\t\t\tif (Laya.__typeof(filter,filterType))filters.splice(i,1);\n\t\t\t}\n\t\t\ttarget.filters=filters;\n\t\t}\n\t}\n\n\tUIUtils._getReplaceStr=function(word){\n\t\treturn UIUtils.escapeSequence[word];\n\t}\n\n\tUIUtils.adptString=function(str){\n\t\treturn str.replace(/\\\\(\\w)/g,UIUtils._getReplaceStr);\n\t}\n\n\tUIUtils.getBindFun=function(value){\n\t\tvar fun=UIUtils._funMap.get(value);\n\t\tif (fun==null){\n\t\t\tvar temp=\"\\\"\"+value+\"\\\"\";\n\t\t\ttemp=temp.replace(/^\"\\${|}\"$/g,\"\").replace(/\\${/g,\"\\\"+\").replace(/}/g,\"+\\\"\");\n\t\t\tvar str=\"(function(data){if(data==null)return;with(data){try{\\nreturn \"+temp+\"\\n}catch(e){}}})\";\n\t\t\tfun=Laya._runScript(str);\n\t\t\tUIUtils._funMap.set(value,fun);\n\t\t}\n\t\treturn fun;\n\t}\n\n\t__static(UIUtils,\n\t['grayFilter',function(){return this.grayFilter=new ColorFilter([0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0.3086,0.6094,0.082,0,0,0,0,0,1,0]);},'escapeSequence',function(){return this.escapeSequence={\"\\\\n\":\"\\n\",\"\\\\t\":\"\\t\"};},'_funMap',function(){return this._funMap=new WeakObject();}\n\t]);\n\treturn UIUtils;\n})()\n\n\n/**全局配置*/\n//class UIConfig\nvar UIConfig=(function(){\n\tfunction UIConfig(){}\n\t__class(UIConfig,'UIConfig');\n\tUIConfig.touchScrollEnable=true;\n\tUIConfig.mouseWheelEnable=true;\n\tUIConfig.showButtons=true;\n\tUIConfig.popupBgColor=\"#000000\";\n\tUIConfig.popupBgAlpha=0.5;\n\tUIConfig.closeDialogOnSide=true;\n\treturn UIConfig;\n})()\n\n\n/**\n*<code>AutoBitmap</code> 类是用于表示位图图像或绘制图形的显示对象。\n*<p>封装了位置，宽高及九宫格的处理，供UI组件使用。</p>\n*/\n//class laya.ui.AutoBitmap extends laya.display.Graphics\nvar AutoBitmap=(function(_super){\n\tfunction AutoBitmap(){\n\t\t/**@private 是否自动缓存命令*/\n\t\tthis.autoCacheCmd=true;\n\t\t/**@private 宽度*/\n\t\tthis._width=0;\n\t\t/**@private 高度*/\n\t\tthis._height=0;\n\t\t/**@private 源数据*/\n\t\tthis._source=null;\n\t\t/**@private 网格数据*/\n\t\tthis._sizeGrid=null;\n\t\t/**@private */\n\t\tthis._isChanged=false;\n\t\t/**@private */\n\t\tthis._offset=null;\n\t\tAutoBitmap.__super.call(this);\n\t}\n\n\t__class(AutoBitmap,'laya.ui.AutoBitmap',_super);\n\tvar __proto=AutoBitmap.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(){\n\t\t_super.prototype.destroy.call(this);\n\t\tthis._source=null;\n\t\tthis._sizeGrid=null;\n\t\tthis._offset=null;\n\t}\n\n\t/**@private */\n\t__proto._setChanged=function(){\n\t\tif (!this._isChanged){\n\t\t\tthis._isChanged=true;\n\t\t\tLaya.timer.callLater(this,this.changeSource);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*修改纹理资源。\n\t*/\n\t__proto.changeSource=function(){\n\t\tthis._isChanged=false;\n\t\tvar source=this._source;\n\t\tif (!source || !source.bitmap)return;\n\t\tvar width=this.width;\n\t\tvar height=this.height;\n\t\tvar sizeGrid=this._sizeGrid;\n\t\tvar sw=source.sourceWidth;\n\t\tvar sh=source.sourceHeight;\n\t\tif (!sizeGrid || (sw===width && sh===height)){\n\t\t\tthis.clear();\n\t\t\tthis.drawTexture(source,this._offset ? this._offset[0] :0,this._offset ? this._offset[1] :0,width,height);\n\t\t\t}else {\n\t\t\tsource.$_GID || (source.$_GID=Utils.getGID());\n\t\t\tvar key=source.$_GID+\".\"+width+\".\"+height+\".\"+sizeGrid.join(\".\");\n\t\t\tif (Utils.isOKCmdList(WeakObject.I.get(key))){\n\t\t\t\tthis.cmds=WeakObject.I.get(key);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.clear();\n\t\t\tvar top=sizeGrid[0];\n\t\t\tvar right=sizeGrid[1];\n\t\t\tvar bottom=sizeGrid[2];\n\t\t\tvar left=sizeGrid[3];\n\t\t\tvar repeat=sizeGrid[4];\n\t\t\tvar needClip=false;\n\t\t\tif (width==sw){\n\t\t\t\tleft=right=0;\n\t\t\t}\n\t\t\tif (height==sh){\n\t\t\t\ttop=bottom=0;\n\t\t\t}\n\t\t\tif (left+right > width){\n\t\t\t\tvar clipWidth=width;\n\t\t\t\tneedClip=true;\n\t\t\t\twidth=left+right;\n\t\t\t\tthis.save();\n\t\t\t\tthis.clipRect(0,0,clipWidth,height);\n\t\t\t}\n\t\t\tleft && top && this.drawTexture(AutoBitmap.getTexture(source,0,0,left,top),0,0,left,top);\n\t\t\tright && top && this.drawTexture(AutoBitmap.getTexture(source,sw-right,0,right,top),width-right,0,right,top);\n\t\t\tleft && bottom && this.drawTexture(AutoBitmap.getTexture(source,0,sh-bottom,left,bottom),0,height-bottom,left,bottom);\n\t\t\tright && bottom && this.drawTexture(AutoBitmap.getTexture(source,sw-right,sh-bottom,right,bottom),width-right,height-bottom,right,bottom);\n\t\t\ttop && this.drawBitmap(repeat,AutoBitmap.getTexture(source,left,0,sw-left-right,top),left,0,width-left-right,top);\n\t\t\tbottom && this.drawBitmap(repeat,AutoBitmap.getTexture(source,left,sh-bottom,sw-left-right,bottom),left,height-bottom,width-left-right,bottom);\n\t\t\tleft && this.drawBitmap(repeat,AutoBitmap.getTexture(source,0,top,left,sh-top-bottom),0,top,left,height-top-bottom);\n\t\t\tright && this.drawBitmap(repeat,AutoBitmap.getTexture(source,sw-right,top,right,sh-top-bottom),width-right,top,right,height-top-bottom);\n\t\t\tthis.drawBitmap(repeat,AutoBitmap.getTexture(source,left,top,sw-left-right,sh-top-bottom),left,top,width-left-right,height-top-bottom);\n\t\t\tif (needClip)this.restore();\n\t\t\tif (this.autoCacheCmd && !Render.isConchApp)WeakObject.I.set(key,this.cmds);\n\t\t}\n\t\tthis._repaint();\n\t}\n\n\t__proto.drawBitmap=function(repeat,tex,x,y,width,height){\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\tif (width < 0.1 || height < 0.1)return;\n\t\tif (repeat && (tex.width !=width || tex.height !=height))this.fillTexture(tex,x,y,width,height);\n\t\telse this.drawTexture(tex,x,y,width,height);\n\t}\n\n\t__proto.clear=function(recoverCmds){\n\t\t(recoverCmds===void 0)&& (recoverCmds=true);\n\t\t_super.prototype.clear.call(this,false);\n\t}\n\n\t/**\n\t*当前实例的有效缩放网格数据。\n\t*<p>如果设置为null,则在应用任何缩放转换时，将正常缩放整个显示对象。</p>\n\t*<p>数据格式：[上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)]。\n\t*<ul><li>例如：[4,4,4,4,1]</li></ul></p>\n\t*<p> <code>sizeGrid</code> 的值如下所示：\n\t*<ol>\n\t*<li>上边距</li>\n\t*<li>右边距</li>\n\t*<li>下边距</li>\n\t*<li>左边距</li>\n\t*<li>是否重复填充(值为0：不重复填充，1：重复填充)</li>\n\t*</ol></p>\n\t*<p>当定义 <code>sizeGrid</code> 属性时，该显示对象被分割到以 <code>sizeGrid</code> 数据中的\"上边距,右边距,下边距,左边距\" 组成的矩形为基础的具有九个区域的网格中，该矩形定义网格的中心区域。网格的其它八个区域如下所示：\n\t*<ul>\n\t*<li>矩形上方的区域</li>\n\t*<li>矩形外的右上角</li>\n\t*<li>矩形左侧的区域</li>\n\t*<li>矩形右侧的区域</li>\n\t*<li>矩形外的左下角</li>\n\t*<li>矩形下方的区域</li>\n\t*<li>矩形外的右下角</li>\n\t*<li>矩形外的左上角</li>\n\t*</ul>\n\t*同时也支持3宫格，比如0,4,0,4,1为水平3宫格，4,0,4,0,1为垂直3宫格，3宫格性能比9宫格高。\n\t*</p>\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\treturn this._sizeGrid;\n\t\t},function(value){\n\t\tthis._sizeGrid=value;\n\t\tthis._setChanged();\n\t});\n\n\t/**\n\t*表示显示对象的宽度，以像素为单位。\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\tif (this._width)return this._width;\n\t\tif (this._source)return this._source.sourceWidth;\n\t\treturn 0;\n\t\t},function(value){\n\t\tif (this._width !=value){\n\t\t\tthis._width=value;\n\t\t\tthis._setChanged();\n\t\t}\n\t});\n\n\t/**\n\t*表示显示对象的高度，以像素为单位。\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\tif (this._height)return this._height;\n\t\tif (this._source)return this._source.sourceHeight;\n\t\treturn 0;\n\t\t},function(value){\n\t\tif (this._height !=value){\n\t\t\tthis._height=value;\n\t\t\tthis._setChanged();\n\t\t}\n\t});\n\n\t/**\n\t*对象的纹理资源。\n\t*@see laya.resource.Texture\n\t*/\n\t__getset(0,__proto,'source',function(){\n\t\treturn this._source;\n\t\t},function(value){\n\t\tif (value){\n\t\t\tthis._source=value\n\t\t\tthis._setChanged();\n\t\t\t}else {\n\t\t\tthis._source=null;\n\t\t\tthis.clear();\n\t\t}\n\t});\n\n\tAutoBitmap.getTexture=function(tex,x,y,width,height){\n\t\tif (width <=0)width=1;\n\t\tif (height <=0)height=1;\n\t\ttex.$_GID || (tex.$_GID=Utils.getGID())\n\t\tvar key=tex.$_GID+\".\"+x+\".\"+y+\".\"+width+\".\"+height;\n\t\tvar texture=WeakObject.I.get(key);\n\t\tif (!texture || !texture.source){\n\t\t\ttexture=Texture.createFromTexture(tex,x,y,width,height);\n\t\t\tWeakObject.I.set(key,texture);\n\t\t}\n\t\treturn texture;\n\t}\n\n\treturn AutoBitmap;\n})(Graphics)\n\n\n/**\n*<code>UIEvent</code> 类用来定义UI组件类的事件类型。\n*/\n//class laya.ui.UIEvent extends laya.events.Event\nvar UIEvent=(function(_super){\n\tfunction UIEvent(){\n\t\tUIEvent.__super.call(this);;\n\t}\n\n\t__class(UIEvent,'laya.ui.UIEvent',_super);\n\tUIEvent.SHOW_TIP=\"showtip\";\n\tUIEvent.HIDE_TIP=\"hidetip\";\n\treturn UIEvent;\n})(Event)\n\n\n/**\n*<code>Component</code> 是ui控件类的基类。\n*<p>生命周期：preinitialize > createChildren > initialize > 组件构造函数</p>\n*/\n//class laya.ui.Component extends laya.display.Sprite\nvar Component=(function(_super){\n\tfunction Component(){\n\t\tthis._comXml=null;\n\t\t/**@private 控件的元数据。 */\n\t\tthis._dataSource=null;\n\t\t/**@private 鼠标悬停提示 */\n\t\tthis._toolTip=null;\n\t\t/**@private 标签 */\n\t\tthis._tag=null;\n\t\t/**@private 禁用 */\n\t\tthis._disabled=false;\n\t\t/**@private 变灰*/\n\t\tthis._gray=false;\n\t\t/**\n\t\t*是否启用相对布局\n\t\t*/\n\t\tthis.layoutEnabled=true;\n\t\tComponent.__super.call(this);\n\t\tthis._layout=LayoutStyle.EMPTY;\n\t\tthis.preinitialize();\n\t\tthis.createChildren();\n\t\tthis.initialize();\n\t}\n\n\t__class(Component,'laya.ui.Component',_super);\n\tvar __proto=Component.prototype;\n\tLaya.imps(__proto,{\"laya.ui.IComponent\":true})\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._dataSource=this._layout=null;\n\t\tthis._tag=null;\n\t\tthis._toolTip=null;\n\t}\n\n\t/**\n\t*<p>预初始化。</p>\n\t*@internal 子类可在此函数内设置、修改属性默认值\n\t*/\n\t__proto.preinitialize=function(){}\n\t/**\n\t*<p>创建并添加控件子节点。</p>\n\t*@internal 子类可在此函数内创建并添加子节点。\n\t*/\n\t__proto.createChildren=function(){}\n\t/**\n\t*<p>控件初始化。</p>\n\t*@internal 在此子对象已被创建，可以对子对象进行修改。\n\t*/\n\t__proto.initialize=function(){}\n\t/**\n\t*<p>延迟运行指定的函数。</p>\n\t*<p>在控件被显示在屏幕之前调用，一般用于延迟计算数据。</p>\n\t*@param method 要执行的函数的名称。例如，functionName。\n\t*@param args 传递给 <code>method</code> 函数的可选参数列表。\n\t*\n\t*@see #runCallLater()\n\t*/\n\t__proto.callLater=function(method,args){\n\t\tLaya.timer.callLater(this,method,args);\n\t}\n\n\t/**\n\t*<p>如果有需要延迟调用的函数（通过 <code>callLater</code> 函数设置），则立即执行延迟调用函数。</p>\n\t*@param method 要执行的函数名称。例如，functionName。\n\t*@see #callLater()\n\t*/\n\t__proto.runCallLater=function(method){\n\t\tLaya.timer.runCallLater(this,method);\n\t}\n\n\t/**\n\t*<p>立即执行影响宽高度量的延迟调用函数。</p>\n\t*@internal <p>使用 <code>runCallLater</code> 函数，立即执行影响宽高度量的延迟运行函数(使用 <code>callLater</code> 设置延迟执行函数)。</p>\n\t*@see #callLater()\n\t*@see #runCallLater()\n\t*/\n\t__proto.commitMeasure=function(){}\n\t/**\n\t*<p>重新调整对象的大小。</p>\n\t*/\n\t__proto.changeSize=function(){\n\t\tthis.event(/*laya.events.Event.RESIZE*/\"resize\");\n\t\tif (this._layout.enable){\n\t\t\tthis.resetLayoutX();\n\t\t\tthis.resetLayoutY();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*<p>获取对象的布局样式。</p>\n\t*/\n\t__proto.getLayout=function(){\n\t\tthis._layout===LayoutStyle.EMPTY && (this._layout=new LayoutStyle());\n\t\treturn this._layout;\n\t}\n\n\t/**\n\t*@private\n\t*<p>指定对象是否可使用布局。</p>\n\t*<p>如果值为true,则此对象可以使用布局样式，否则不使用布局样式。</p>\n\t*@param value 一个 Boolean 值，指定对象是否可使用布局。\n\t*/\n\t__proto._setLayoutEnabled=function(value){\n\t\tif (this._layout && this._layout.enable !=value){\n\t\t\tthis._layout.enable=value;\n\t\t\tthis.on(/*laya.events.Event.ADDED*/\"added\",this,this.onAdded);\n\t\t\tthis.on(/*laya.events.Event.REMOVED*/\"removed\",this,this.onRemoved);\n\t\t\tif (this.parent){\n\t\t\t\tthis.onAdded();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*对象从显示列表移除的事件侦听处理函数。\n\t*/\n\t__proto.onRemoved=function(){\n\t\tthis.parent.off(/*laya.events.Event.RESIZE*/\"resize\",this,this.onCompResize);\n\t}\n\n\t/**\n\t*对象被添加到显示列表的事件侦听处理函数。\n\t*/\n\t__proto.onAdded=function(){\n\t\tthis.parent.on(/*laya.events.Event.RESIZE*/\"resize\",this,this.onCompResize);\n\t\tthis.resetLayoutX();\n\t\tthis.resetLayoutY();\n\t}\n\n\t/**\n\t*父容器的 <code>Event.RESIZE</code> 事件侦听处理函数。\n\t*/\n\t__proto.onCompResize=function(){\n\t\tif (this._layout && this._layout.enable){\n\t\t\tthis.resetLayoutX();\n\t\t\tthis.resetLayoutY();\n\t\t}\n\t}\n\n\t/**\n\t*<p>重置对象的 <code>X</code> 轴（水平方向）布局。</p>\n\t*/\n\t__proto.resetLayoutX=function(){\n\t\tvar layout=this._layout;\n\t\tif (!isNaN(layout.anchorX))this.pivotX=layout.anchorX *this.width;\n\t\tif (!this.layoutEnabled)return;\n\t\tvar parent=this.parent;\n\t\tif (parent){\n\t\t\tif (!isNaN(layout.centerX)){\n\t\t\t\tthis.x=Math.round((parent.width-this.displayWidth)*0.5+layout.centerX+this.pivotX *this.scaleX);\n\t\t\t\t}else if (!isNaN(layout.left)){\n\t\t\t\tthis.x=Math.round(layout.left+this.pivotX *this.scaleX);\n\t\t\t\tif (!isNaN(layout.right)){\n\t\t\t\t\tthis.width=(parent._width-layout.left-layout.right)/ (this.scaleX || 0.01);\n\t\t\t\t}\n\t\t\t\t}else if (!isNaN(layout.right)){\n\t\t\t\tthis.x=Math.round(parent.width-this.displayWidth-layout.right+this.pivotX *this.scaleX);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*<p>重置对象的 <code>Y</code> 轴（垂直方向）布局。</p>\n\t*/\n\t__proto.resetLayoutY=function(){\n\t\tvar layout=this._layout;\n\t\tif (!isNaN(layout.anchorY))this.pivotY=layout.anchorY *this.height;\n\t\tif (!this.layoutEnabled)return;\n\t\tvar parent=this.parent;\n\t\tif (parent){\n\t\t\tif (!isNaN(layout.centerY)){\n\t\t\t\tthis.y=Math.round((parent.height-this.displayHeight)*0.5+layout.centerY+this.pivotY *this.scaleY);\n\t\t\t\t}else if (!isNaN(layout.top)){\n\t\t\t\tthis.y=Math.round(layout.top+this.pivotY *this.scaleY);\n\t\t\t\tif (!isNaN(layout.bottom)){\n\t\t\t\t\tthis.height=(parent._height-layout.top-layout.bottom)/ (this.scaleY || 0.01);\n\t\t\t\t}\n\t\t\t\t}else if (!isNaN(layout.bottom)){\n\t\t\t\tthis.y=Math.round(parent.height-this.displayHeight-layout.bottom+this.pivotY *this.scaleY);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*对象的 <code>Event.MOUSE_OVER</code> 事件侦听处理函数。\n\t*/\n\t__proto.onMouseOver=function(e){\n\t\tLaya.stage.event(/*laya.ui.UIEvent.SHOW_TIP*/\"showtip\",this._toolTip);\n\t}\n\n\t/**\n\t*对象的 <code>Event.MOUSE_OUT</code> 事件侦听处理函数。\n\t*/\n\t__proto.onMouseOut=function(e){\n\t\tLaya.stage.event(/*laya.ui.UIEvent.HIDE_TIP*/\"hidetip\",this._toolTip);\n\t}\n\n\t__proto._childChanged=function(child){\n\t\tthis.callLater(this.changeSize);\n\t\t_super.prototype._childChanged.call(this,child);\n\t}\n\n\t/**\n\t*<p>对象的显示宽度（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'displayWidth',function(){\n\t\treturn this.width *this.scaleX;\n\t});\n\n\t/**\n\t*<p>表示显示对象的宽度，以像素为单位。</p>\n\t*<p><b>注：</b>当值为0时，宽度为自适应大小。</p>\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\tif (this._width)return this._width;\n\t\treturn this.measureWidth;\n\t\t},function(value){\n\t\tif (this._width !=value){\n\t\t\tthis._width=value;\n\t\t\tthis.conchModel && this.conchModel.size(this._width,this._height);\n\t\t\tthis.callLater(this.changeSize);\n\t\t\tif (this._layout.enable && (!isNaN(this._layout.centerX)|| !isNaN(this._layout.right)|| !isNaN(this._layout.anchorX)))this.resetLayoutX();\n\t\t}\n\t});\n\n\t/**\n\t*<p>显示对象的实际显示区域宽度（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'measureWidth',function(){\n\t\tvar max=0;\n\t\tthis.commitMeasure();\n\t\tfor (var i=this.numChildren-1;i >-1;i--){\n\t\t\tvar comp=this.getChildAt(i);\n\t\t\tif (comp.visible){\n\t\t\t\tmax=Math.max(comp.x+comp.width *comp.scaleX,max);\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t});\n\n\t/**\n\t*<p>对象的显示高度（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'displayHeight',function(){\n\t\treturn this.height *this.scaleY;\n\t});\n\n\t/**\n\t*<p>表示显示对象的高度，以像素为单位。</p>\n\t*<p><b>注：</b>当值为0时，高度为自适应大小。</p>\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\tif (this._height)return this._height;\n\t\treturn this.measureHeight;\n\t\t},function(value){\n\t\tif (this._height !=value){\n\t\t\tthis._height=value;\n\t\t\tthis.conchModel && this.conchModel.size(this._width,this._height);\n\t\t\tthis.callLater(this.changeSize);\n\t\t\tif (this._layout.enable && (!isNaN(this._layout.centerY)|| !isNaN(this._layout.bottom)|| !isNaN(this._layout.anchorY)))this.resetLayoutY();\n\t\t}\n\t});\n\n\t/**\n\t*<p>数据赋值，通过对UI赋值来控制UI显示逻辑。</p>\n\t*<p>简单赋值会更改组件的默认属性，使用大括号可以指定组件的任意属性进行赋值。</p>\n\t*@example\n\t//默认属性赋值\n\tdataSource={label1:\"改变了label\",checkbox1:true};//(更改了label1的text属性值，更改checkbox1的selected属性)。\n\t//任意属性赋值\n\tdataSource={label2:{text:\"改变了label\",size:14},checkbox2:{selected:true,x:10}};\n\t*/\n\t__getset(0,__proto,'dataSource',function(){\n\t\treturn this._dataSource;\n\t\t},function(value){\n\t\tthis._dataSource=value;\n\t\tfor (var prop in this._dataSource){\n\t\t\tif (this.hasOwnProperty(prop)&& !((typeof (this[prop])=='function'))){\n\t\t\t\tthis[prop]=this._dataSource[prop];\n\t\t\t}\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'scaleY',_super.prototype._$get_scaleY,function(value){\n\t\tif (Laya.superGet(Sprite,this,'scaleY')!=value){\n\t\t\tLaya.superSet(Sprite,this,'scaleY',value);\n\t\t\tthis.callLater(this.changeSize);\n\t\t\tthis._layout.enable && this.resetLayoutY();\n\t\t}\n\t});\n\n\t/**\n\t*<p>显示对象的实际显示区域高度（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'measureHeight',function(){\n\t\tvar max=0;\n\t\tthis.commitMeasure();\n\t\tfor (var i=this.numChildren-1;i >-1;i--){\n\t\t\tvar comp=this.getChildAt(i);\n\t\t\tif (comp.visible){\n\t\t\t\tmax=Math.max(comp.y+comp.height *comp.scaleY,max);\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'scaleX',_super.prototype._$get_scaleX,function(value){\n\t\tif (Laya.superGet(Sprite,this,'scaleX')!=value){\n\t\t\tLaya.superSet(Sprite,this,'scaleX',value);\n\t\t\tthis.callLater(this.changeSize);\n\t\t\tthis._layout.enable && this.resetLayoutX();\n\t\t}\n\t});\n\n\t/**\n\t*<p>从组件顶边到其内容区域顶边之间的垂直距离（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'top',function(){\n\t\treturn this._layout.top;\n\t\t},function(value){\n\t\tif (value !=this._layout.top){\n\t\t\tthis.getLayout().top=value;\n\t\t\tthis._setLayoutEnabled(true);\n\t\t}\n\t\tthis.resetLayoutY();\n\t});\n\n\t/**\n\t*<p>从组件底边到其内容区域底边之间的垂直距离（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'bottom',function(){\n\t\treturn this._layout.bottom;\n\t\t},function(value){\n\t\tif (value !=this._layout.bottom){\n\t\t\tthis.getLayout().bottom=value;\n\t\t\tthis._setLayoutEnabled(true);\n\t\t}\n\t\tthis.resetLayoutY();\n\t});\n\n\t/**\n\t*<p>从组件左边到其内容区域左边之间的水平距离（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'left',function(){\n\t\treturn this._layout.left;\n\t\t},function(value){\n\t\tif (value !=this._layout.left){\n\t\t\tthis.getLayout().left=value;\n\t\t\tthis._setLayoutEnabled(true);\n\t\t}\n\t\tthis.resetLayoutX();\n\t});\n\n\t/**\n\t*<p>从组件右边到其内容区域右边之间的水平距离（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'right',function(){\n\t\treturn this._layout.right;\n\t\t},function(value){\n\t\tif (value !=this._layout.right){\n\t\t\tthis.getLayout().right=value;\n\t\t\tthis._setLayoutEnabled(true);\n\t\t}\n\t\tthis.resetLayoutX();\n\t});\n\n\t/**\n\t*<p>在父容器中，此对象的水平方向中轴线与父容器的水平方向中心线的距离（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'centerX',function(){\n\t\treturn this._layout.centerX;\n\t\t},function(value){\n\t\tif (value !=this._layout.centerX){\n\t\t\tthis.getLayout().centerX=value;\n\t\t\tthis._setLayoutEnabled(true);\n\t\t}\n\t\tthis.resetLayoutX();\n\t});\n\n\t/**\n\t*<p>在父容器中，此对象的垂直方向中轴线与父容器的垂直方向中心线的距离（以像素为单位）。</p>\n\t*/\n\t__getset(0,__proto,'centerY',function(){\n\t\treturn this._layout.centerY;\n\t\t},function(value){\n\t\tif (value !=this._layout.centerY){\n\t\t\tthis.getLayout().centerY=value;\n\t\t\tthis._setLayoutEnabled(true);\n\t\t}\n\t\tthis.resetLayoutY();\n\t});\n\n\t/**X轴锚点，值为0-1*/\n\t__getset(0,__proto,'anchorX',function(){\n\t\treturn this._layout.anchorX;\n\t\t},function(value){\n\t\tif (value !=this._layout.anchorX){\n\t\t\tthis.getLayout().anchorX=value;\n\t\t\tthis._setLayoutEnabled(true);\n\t\t}\n\t\tthis.resetLayoutX();\n\t});\n\n\t/**Y轴锚点，值为0-1*/\n\t__getset(0,__proto,'anchorY',function(){\n\t\treturn this._layout.anchorY;\n\t\t},function(value){\n\t\tif (value !=this._layout.anchorY){\n\t\t\tthis.getLayout().anchorY=value;\n\t\t\tthis._setLayoutEnabled(true);\n\t\t}\n\t\tthis.resetLayoutY();\n\t});\n\n\t/**\n\t*<p>对象的标签。</p>\n\t*@internal 冗余字段，可以用来储存数据。\n\t*/\n\t__getset(0,__proto,'tag',function(){\n\t\treturn this._tag;\n\t\t},function(value){\n\t\tthis._tag=value;\n\t});\n\n\t/**\n\t*<p>鼠标悬停提示。</p>\n\t*<p>可以赋值为文本 <code>String</code> 或函数 <code>Handler</code> ，用来实现自定义样式的鼠标提示和参数携带等。</p>\n\t*@example\n\t*private var _testTips:TestTipsUI=new TestTipsUI();\n\t*private function testTips():void {\n\t\t//简单鼠标提示\n\t\t*btn2.toolTip=\"这里是鼠标提示&lt;b&gt;粗体&lt;/b&gt;&lt;br&gt;换行\";\n\t\t//自定义的鼠标提示\n\t\t*btn1.toolTip=showTips1;\n\t\t//带参数的自定义鼠标提示\n\t\t*clip.toolTip=new Handler(this,showTips2,[\"clip\"]);\n\t\t*}\n\t*private function showTips1():void {\n\t\t*_testTips.label.text=\"这里是按钮[\"+btn1.label+\"]\";\n\t\t*tip.addChild(_testTips);\n\t\t*}\n\t*private function showTips2(name:String):void {\n\t\t*_testTips.label.text=\"这里是\"+name;\n\t\t*tip.addChild(_testTips);\n\t\t*}\n\t*/\n\t__getset(0,__proto,'toolTip',function(){\n\t\treturn this._toolTip;\n\t\t},function(value){\n\t\tif (this._toolTip !=value){\n\t\t\tthis._toolTip=value;\n\t\t\tif (value !=null){\n\t\t\t\tthis.on(/*laya.events.Event.MOUSE_OVER*/\"mouseover\",this,this.onMouseOver);\n\t\t\t\tthis.on(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onMouseOut);\n\t\t\t\t}else {\n\t\t\t\tthis.off(/*laya.events.Event.MOUSE_OVER*/\"mouseover\",this,this.onMouseOver);\n\t\t\t\tthis.off(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onMouseOut);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*XML 数据。\n\t*/\n\t__getset(0,__proto,'comXml',function(){\n\t\treturn this._comXml;\n\t\t},function(value){\n\t\tthis._comXml=value;\n\t});\n\n\t/**是否变灰。*/\n\t__getset(0,__proto,'gray',function(){\n\t\treturn this._gray;\n\t\t},function(value){\n\t\tif (value!==this._gray){\n\t\t\tthis._gray=value;\n\t\t\tUIUtils.gray(this,value);\n\t\t}\n\t});\n\n\t/**是否禁用页面，设置为true后，会变灰并且禁用鼠标。*/\n\t__getset(0,__proto,'disabled',function(){\n\t\treturn this._disabled;\n\t\t},function(value){\n\t\tif (value!==this._disabled){\n\t\t\tthis.gray=this._disabled=value;\n\t\t\tthis.mouseEnabled=!value;\n\t\t}\n\t});\n\n\treturn Component;\n})(Sprite)\n\n\n/**\n*<code>DialogManager</code> 对话框管理容器，所有的对话框都在该容器内，并且受管理器管理。\n*任意对话框打开和关闭，都会出发管理类的open和close事件\n*可以通过UIConfig设置弹出框背景透明度，模式窗口点击边缘是否关闭，点击窗口是否切换层次等\n*通过设置对话框的zOrder属性，可以更改弹出的层次\n*/\n//class laya.ui.DialogManager extends laya.display.Sprite\nvar DialogManager=(function(_super){\n\tfunction DialogManager(){\n\t\t/**锁屏层*/\n\t\tthis.lockLayer=null;\n\t\t/**@private 全局默认弹出对话框效果，可以设置一个效果代替默认的弹出效果，如果不想有任何效果，可以赋值为null*/\n\t\tthis.popupEffect=function(dialog){\n\t\t\tdialog.scale(1,1);\n\t\t\tTween.from(dialog,{x:Laya.stage.width / 2,y:Laya.stage.height / 2,scaleX:0,scaleY:0},300,Ease.backOut,Handler.create(this,this.doOpen,[dialog]));\n\t\t}\n\t\t/**@private 全局默认关闭对话框效果，可以设置一个效果代替默认的关闭效果，如果不想有任何效果，可以赋值为null*/\n\t\tthis.closeEffect=function(dialog,type){\n\t\t\tTween.to(dialog,{x:Laya.stage.width / 2,y:Laya.stage.height / 2,scaleX:0,scaleY:0},300,Ease.strongOut,Handler.create(this,this.doClose,[dialog,type]));\n\t\t}\n\t\tDialogManager.__super.call(this);\n\t\tthis.maskLayer=new Sprite();\n\t\tthis.popupEffectHandler=new Handler(this,this.popupEffect);\n\t\tthis.closeEffectHandler=new Handler(this,this.closeEffect);\n\t\tthis.mouseEnabled=this.maskLayer.mouseEnabled=true;\n\t\tthis.zOrder=1000;\n\t\tLaya.stage.addChild(this);\n\t\tLaya.stage.on(/*laya.events.Event.RESIZE*/\"resize\",this,this._onResize);\n\t\tif (UIConfig.closeDialogOnSide)this.maskLayer.on(\"click\",this,this._closeOnSide);\n\t\tthis._onResize(null);\n\t}\n\n\t__class(DialogManager,'laya.ui.DialogManager',_super);\n\tvar __proto=DialogManager.prototype;\n\t__proto._closeOnSide=function(){\n\t\tvar dialog=this.getChildAt(this.numChildren-1);\n\t\tif ((dialog instanceof laya.ui.Dialog ))dialog.close(\"side\");\n\t}\n\n\t/**设置锁定界面，如果为空则什么都不显示*/\n\t__proto.setLockView=function(value){\n\t\tif (!this.lockLayer){\n\t\t\tthis.lockLayer=new Box();\n\t\t\tthis.lockLayer.mouseEnabled=true;\n\t\t\tthis.lockLayer.size(Laya.stage.width,Laya.stage.height);\n\t\t}\n\t\tthis.lockLayer.removeChildren();\n\t\tif (value){\n\t\t\tvalue.centerX=value.centerY=0;\n\t\t\tthis.lockLayer.addChild(value);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._onResize=function(e){\n\t\tvar width=this.maskLayer.width=Laya.stage.width;\n\t\tvar height=this.maskLayer.height=Laya.stage.height;\n\t\tif (this.lockLayer)this.lockLayer.size(width,height);\n\t\tthis.maskLayer.graphics.clear();\n\t\tthis.maskLayer.graphics.drawRect(0,0,width,height,UIConfig.popupBgColor);\n\t\tthis.maskLayer.alpha=UIConfig.popupBgAlpha;\n\t\tfor (var i=this.numChildren-1;i >-1;i--){\n\t\t\tvar item=this.getChildAt(i);\n\t\t\tif (item.popupCenter)this._centerDialog(item);\n\t\t}\n\t}\n\n\t__proto._centerDialog=function(dialog){\n\t\tdialog.x=Math.round(((Laya.stage.width-dialog.width)>> 1)+dialog.pivotX);\n\t\tdialog.y=Math.round(((Laya.stage.height-dialog.height)>> 1)+dialog.pivotY);\n\t}\n\n\t/**\n\t*显示对话框(非模式窗口类型)。\n\t*@param dialog 需要显示的对象框 <code>Dialog</code> 实例。\n\t*@param closeOther 是否关闭其它对话框，若值为ture，则关闭其它的对话框。\n\t*@param showEffect 是否显示弹出效果\n\t*/\n\t__proto.open=function(dialog,closeOther,showEffect){\n\t\t(closeOther===void 0)&& (closeOther=false);\n\t\t(showEffect===void 0)&& (showEffect=false);\n\t\tif (closeOther)this._closeAll();\n\t\tif (dialog.popupCenter)this._centerDialog(dialog);\n\t\tthis.addChild(dialog);\n\t\tif (dialog.isModal || this._$P[\"hasZorder\"])this.timer.callLater(this,this._checkMask);\n\t\tif (showEffect && dialog.popupEffect !=null)dialog.popupEffect.runWith(dialog);\n\t\telse this.doOpen(dialog);\n\t\tthis.event(/*laya.events.Event.OPEN*/\"open\");\n\t}\n\n\t/**\n\t*执行打开对话框。\n\t*@param dialog 需要关闭的对象框 <code>Dialog</code> 实例。\n\t*@param type 关闭的类型，默认为空\n\t*/\n\t__proto.doOpen=function(dialog){\n\t\tdialog.onOpened();\n\t}\n\n\t/**\n\t*锁定所有层，显示加载条信息，防止双击\n\t*/\n\t__proto.lock=function(value){\n\t\tif (this.lockLayer){\n\t\t\tif (value)this.addChild(this.lockLayer);\n\t\t\telse this.lockLayer.removeSelf();\n\t\t}\n\t}\n\n\t/**\n\t*关闭对话框。\n\t*@param dialog 需要关闭的对象框 <code>Dialog</code> 实例。\n\t*@param type 关闭的类型，默认为空\n\t*@param showEffect 是否显示弹出效果\n\t*/\n\t__proto.close=function(dialog,type,showEffect){\n\t\t(showEffect===void 0)&& (showEffect=false);\n\t\tif (showEffect && dialog.closeEffect !=null)dialog.closeEffect.runWith([dialog,type]);\n\t\telse this.doClose(dialog,type);\n\t\tthis.event(/*laya.events.Event.CLOSE*/\"close\");\n\t}\n\n\t/**\n\t*执行关闭对话框。\n\t*@param dialog 需要关闭的对象框 <code>Dialog</code> 实例。\n\t*@param type 关闭的类型，默认为空\n\t*/\n\t__proto.doClose=function(dialog,type){\n\t\tdialog.removeSelf();\n\t\tdialog.isModal && this._checkMask();\n\t\tdialog.closeHandler && dialog.closeHandler.runWith(type);\n\t\tdialog.onClosed(type);\n\t}\n\n\t/**\n\t*关闭所有的对话框。\n\t*/\n\t__proto.closeAll=function(){\n\t\tthis._closeAll();\n\t\tthis.event(/*laya.events.Event.CLOSE*/\"close\");\n\t}\n\n\t/**@private */\n\t__proto._closeAll=function(){\n\t\tfor (var i=this.numChildren-1;i >-1;i--){\n\t\t\tvar item=this.getChildAt(i);\n\t\t\tif (item && item.close !=null){\n\t\t\t\tthis.doClose(item);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*根据组获取所有对话框\n\t*@param group 组名称\n\t*@return 对话框数组\n\t*/\n\t__proto.getDialogsByGroup=function(group){\n\t\tvar arr=[];\n\t\tfor (var i=this.numChildren-1;i >-1;i--){\n\t\t\tvar item=this.getChildAt(i);\n\t\t\tif (item && item.group===group){\n\t\t\t\tarr.push(item);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n\n\t/**\n\t*根据组关闭所有弹出框\n\t*@param group 需要关闭的组名称\n\t*@return 需要关闭的对话框数组\n\t*/\n\t__proto.closeByGroup=function(group){\n\t\tvar arr=[];\n\t\tfor (var i=this.numChildren-1;i >-1;i--){\n\t\t\tvar item=this.getChildAt(i);\n\t\t\tif (item && item.group===group){\n\t\t\t\titem.close();\n\t\t\t\tarr.push(item);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n\n\t/**@private 发生层次改变后，重新检查遮罩层是否正确*/\n\t__proto._checkMask=function(){\n\t\tthis.maskLayer.removeSelf();\n\t\tfor (var i=this.numChildren-1;i >-1;i--){\n\t\t\tvar dialog=this.getChildAt(i);\n\t\t\tif (dialog && dialog.isModal){\n\t\t\t\tthis.addChildAt(this.maskLayer,i);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn DialogManager;\n})(Sprite)\n\n\n/**\n*<code>Image</code> 类是用于表示位图图像或绘制图形的显示对象。\n*Image和Clip组件是唯一支持异步加载的两个组件，比如img.skin=\"abc/xxx.png\"，其他UI组件均不支持异步加载。\n*\n*@example <caption>以下示例代码，创建了一个新的 <code>Image</code> 实例，设置了它的皮肤、位置信息，并添加到舞台上。</caption>\n*package\n*{\n\t*import laya.ui.Image;\n\t*public class Image_Example\n\t*{\n\t\t*public function Image_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*onInit();\n\t\t\t*}\n\t\t*private function onInit():void\n\t\t*{\n\t\t\t*var bg:Image=new Image(\"resource/ui/bg.png\");//创建一个 Image 类的实例对象 bg ,并传入它的皮肤。\n\t\t\t*bg.x=100;//设置 bg 对象的属性 x 的值，用于控制 bg 对象的显示位置。\n\t\t\t*bg.y=100;//设置 bg 对象的属性 y 的值，用于控制 bg 对象的显示位置。\n\t\t\t*bg.sizeGrid=\"40,10,5,10\";//设置 bg 对象的网格信息。\n\t\t\t*bg.width=150;//设置 bg 对象的宽度。\n\t\t\t*bg.height=250;//设置 bg 对象的高度。\n\t\t\t*Laya.stage.addChild(bg);//将此 bg 对象添加到显示列表。\n\t\t\t*var image:Image=new Image(\"resource/ui/image.png\");//创建一个 Image 类的实例对象 image ,并传入它的皮肤。\n\t\t\t*image.x=100;//设置 image 对象的属性 x 的值，用于控制 image 对象的显示位置。\n\t\t\t*image.y=100;//设置 image 对象的属性 y 的值，用于控制 image 对象的显示位置。\n\t\t\t*Laya.stage.addChild(image);//将此 image 对象添加到显示列表。\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*onInit();\n*function onInit(){\n\t*var bg=new laya.ui.Image(\"resource/ui/bg.png\");//创建一个 Image 类的实例对象 bg ,并传入它的皮肤。\n\t*bg.x=100;//设置 bg 对象的属性 x 的值，用于控制 bg 对象的显示位置。\n\t*bg.y=100;//设置 bg 对象的属性 y 的值，用于控制 bg 对象的显示位置。\n\t*bg.sizeGrid=\"40,10,5,10\";//设置 bg 对象的网格信息。\n\t*bg.width=150;//设置 bg 对象的宽度。\n\t*bg.height=250;//设置 bg 对象的高度。\n\t*Laya.stage.addChild(bg);//将此 bg 对象添加到显示列表。\n\t*var image=new laya.ui.Image(\"resource/ui/image.png\");//创建一个 Image 类的实例对象 image ,并传入它的皮肤。\n\t*image.x=100;//设置 image 对象的属性 x 的值，用于控制 image 对象的显示位置。\n\t*image.y=100;//设置 image 对象的属性 y 的值，用于控制 image 对象的显示位置。\n\t*Laya.stage.addChild(image);//将此 image 对象添加到显示列表。\n\t*}\n*@example\n*class Image_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*this.onInit();\n\t\t*}\n\t*private onInit():void {\n\t\t*var bg:laya.ui.Image=new laya.ui.Image(\"resource/ui/bg.png\");//创建一个 Image 类的实例对象 bg ,并传入它的皮肤。\n\t\t*bg.x=100;//设置 bg 对象的属性 x 的值，用于控制 bg 对象的显示位置。\n\t\t*bg.y=100;//设置 bg 对象的属性 y 的值，用于控制 bg 对象的显示位置。\n\t\t*bg.sizeGrid=\"40,10,5,10\";//设置 bg 对象的网格信息。\n\t\t*bg.width=150;//设置 bg 对象的宽度。\n\t\t*bg.height=250;//设置 bg 对象的高度。\n\t\t*Laya.stage.addChild(bg);//将此 bg 对象添加到显示列表。\n\t\t*var image:laya.ui.Image=new laya.ui.Image(\"resource/ui/image.png\");//创建一个 Image 类的实例对象 image ,并传入它的皮肤。\n\t\t*image.x=100;//设置 image 对象的属性 x 的值，用于控制 image 对象的显示位置。\n\t\t*image.y=100;//设置 image 对象的属性 y 的值，用于控制 image 对象的显示位置。\n\t\t*Laya.stage.addChild(image);//将此 image 对象添加到显示列表。\n\t\t*}\n\t*}\n*@see laya.ui.AutoBitmap\n*/\n//class laya.ui.Image extends laya.ui.Component\nvar Image=(function(_super){\n\tfunction Image(skin){\n\t\t/**@private */\n\t\tthis._bitmap=null;\n\t\t/**@private */\n\t\tthis._skin=null;\n\t\t/**@private */\n\t\tthis._group=null;\n\t\tImage.__super.call(this);\n\t\tthis.skin=skin;\n\t}\n\n\t__class(Image,'laya.ui.Image',_super);\n\tvar __proto=Image.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,true);\n\t\tthis._bitmap && this._bitmap.destroy();\n\t\tthis._bitmap=null;\n\t}\n\n\t/**\n\t*销毁对象并释放加载的皮肤资源。\n\t*/\n\t__proto.dispose=function(){\n\t\tthis.destroy(true);\n\t\tLaya.loader.clearRes(this._skin);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.graphics=this._bitmap=new AutoBitmap();\n\t\tthis._bitmap.autoCacheCmd=false;\n\t}\n\n\t/**\n\t*@private\n\t*设置皮肤资源。\n\t*/\n\t__proto.setSource=function(url,img){\n\t\tif (url===this._skin && img){\n\t\t\tthis.source=img\n\t\t\tthis.onCompResize();\n\t\t}\n\t}\n\n\t/**\n\t*@copy laya.ui.AutoBitmap#source\n\t*/\n\t__getset(0,__proto,'source',function(){\n\t\treturn this._bitmap.source;\n\t\t},function(value){\n\t\tif (!this._bitmap)return;\n\t\tthis._bitmap.source=value;\n\t\tthis.event(/*laya.events.Event.LOADED*/\"loaded\");\n\t\tthis.repaint();\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif ((typeof value=='string'))this.skin=value;\n\t\telse Laya.superSet(Component,this,'dataSource',value);\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureHeight',function(){\n\t\treturn this._bitmap.height;\n\t});\n\n\t/**\n\t*<p>对象的皮肤地址，以字符串表示。</p>\n\t*<p>如果资源未加载，则先加载资源，加载完成后应用于此对象。</p>\n\t*<b>注意：</b>资源加载完成后，会自动缓存至资源库中。\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._skin;\n\t\t},function(value){\n\t\tif (this._skin !=value){\n\t\t\tthis._skin=value;\n\t\t\tif (value){\n\t\t\t\tvar source=Loader.getRes(value);\n\t\t\t\tif (source){\n\t\t\t\t\tthis.source=source;\n\t\t\t\t\tthis.onCompResize();\n\t\t\t\t}else Laya.loader.load(this._skin,Handler.create(this,this.setSource,[this._skin]),null,/*laya.net.Loader.IMAGE*/\"image\",1,true,this._group);\n\t\t\t\t}else {\n\t\t\t\tthis.source=null;\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*资源分组。\n\t*/\n\t__getset(0,__proto,'group',function(){\n\t\treturn this._group;\n\t\t},function(value){\n\t\tif (value && this._skin)Loader.setGroup(this._skin,value);\n\t\tthis._group=value;\n\t});\n\n\t/**\n\t*<p>当前实例的位图 <code>AutoImage</code> 实例的有效缩放网格数据。</p>\n\t*<p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n\t*<ul><li>例如：\"4,4,4,4,1\"。</li></ul></p>\n\t*@see laya.ui.AutoBitmap#sizeGrid\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\tif (this._bitmap.sizeGrid)return this._bitmap.sizeGrid.join(\",\");\n\t\treturn null;\n\t\t},function(value){\n\t\tthis._bitmap.sizeGrid=UIUtils.fillArray(Styles.defaultSizeGrid,value,Number);\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureWidth',function(){\n\t\treturn this._bitmap.width;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Component,this,'width',value);\n\t\tthis._bitmap.width=value==0 ? 0.0000001 :value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Component,this,'height',value);\n\t\tthis._bitmap.height=value==0 ? 0.0000001 :value;\n\t});\n\n\treturn Image;\n})(Component)\n\n\n/**\n*<code>Box</code> 类是一个控件容器类。\n*/\n//class laya.ui.Box extends laya.ui.Component\nvar Box=(function(_super){\n\tfunction Box(){\n\t\tBox.__super.call(this);;\n\t}\n\n\t__class(Box,'laya.ui.Box',_super);\n\tvar __proto=Box.prototype;\n\tLaya.imps(__proto,{\"laya.ui.IBox\":true})\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tfor (var name in value){\n\t\t\tvar comp=this.getChildByName(name);\n\t\t\tif (comp)comp.dataSource=value[name];\n\t\t\telse if (this.hasOwnProperty(name)&& !((typeof (this[name])=='function')))this[name]=value[name];\n\t\t}\n\t});\n\n\treturn Box;\n})(Component)\n\n\n/**\n*<code>Button</code> 组件用来表示常用的多态按钮。 <code>Button</code> 组件可显示文本标签、图标或同时显示两者。 *\n*<p>可以是单态，两态和三态，默认三态(up,over,down)。</p>\n*\n*@example <caption>以下示例代码，创建了一个 <code>Button</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.Button;\n\t*import laya.utils.Handler;\n\t*public class Button_Example\n\t*{\n\t\t*public function Button_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load(\"resource/ui/button.png\",Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*trace(\"资源加载完成！\");\n\t\t\t*var button:Button=new Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 类的实例对象 button ,并传入它的皮肤。\n\t\t\t*button.x=100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n\t\t\t*button.y=100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n\t\t\t*button.clickHandler=new Handler(this,onClickButton,[button]);//设置 button 的点击事件处理器。\n\t\t\t*Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n\t\t\t*}\n\t\t*private function onClickButton(button:Button):void\n\t\t*{\n\t\t\t*trace(\"按钮button被点击了！\");\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n*Laya.loader.load(\"resource/ui/button.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n*function loadComplete()\n*{\n\t*console.log(\"资源加载完成！\");\n\t*var button=new laya.ui.Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 类的实例对象 button ,传入它的皮肤skin和标签label。\n\t*button.x=100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n\t*button.y=100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n\t*button.clickHandler=laya.utils.Handler.create(this,onClickButton,[button],false);//设置 button 的点击事件处理函数。\n\t*Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n\t*}\n*function onClickButton(button)\n*{\n\t*console.log(\"按钮被点击了。\",button);\n\t*}\n*@example\n*import Button=laya.ui.Button;\n*import Handler=laya.utils.Handler;\n*class Button_Example{\n\t*constructor()\n\t*{\n\t\t*Laya.init(640,800);\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load(\"resource/ui/button.png\",laya.utils.Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete()\n\t*{\n\t\t*var button:Button=new Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 类的实例对象 button ,并传入它的皮肤。\n\t\t*button.x=100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n\t\t*button.y=100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n\t\t*button.clickHandler=new Handler(this,this.onClickButton,[button]);//设置 button 的点击事件处理器。\n\t\t*Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n\t\t*}\n\t*private onClickButton(button:Button):void\n\t*{\n\t\t*console.log(\"按钮button被点击了！\")\n\t\t*}\n\t*}\n*/\n//class laya.ui.Button extends laya.ui.Component\nvar Button=(function(_super){\n\tfunction Button(skin,label){\n\t\t/**\n\t\t*指定按钮按下时是否是切换按钮的显示状态。\n\t\t*\n\t\t*@example 以下示例代码，创建了一个 <code>Button</code> 实例，并设置为切换按钮。\n\t\t*@example\n\t\t*package\n\t\t*{\n\t\t\t*import laya.ui.Button;\n\t\t\t*import laya.utils.Handler;\n\t\t\t*public class Button_toggle\n\t\t\t*{\n\t\t\t\t*public function Button_toggle()\n\t\t\t\t*{\n\t\t\t\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t\t\t*Laya.loader.load(\"resource/ui/button.png\",Handler.create(this,onLoadComplete));\n\t\t\t\t\t*}\n\t\t\t\t*private function onLoadComplete():void\n\t\t\t\t*{\n\t\t\t\t\t*trace(\"资源加载完成！\");\n\t\t\t\t\t*var button:Button=new Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 实例对象 button ,传入它的皮肤skin和标签label。\n\t\t\t\t\t*button.x=100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n\t\t\t\t\t*button.y=100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n\t\t\t\t\t*button.toggle=true;//设置 button 对象为切换按钮。\n\t\t\t\t\t*button.clickHandler=new Handler(this,onClickButton,[button]);//设置 button 的点击事件处理器。\n\t\t\t\t\t*Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n\t\t\t\t\t*}\n\t\t\t\t*private function onClickButton(button:Button):void\n\t\t\t\t*{\n\t\t\t\t\t*trace(\"button.selected = \"+button.selected);\n\t\t\t\t\t*}\n\t\t\t\t*}\n\t\t\t*}\n\t\t*@example\n\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load(\"resource/ui/button.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n\t\t*function loadComplete()\n\t\t*{\n\t\t\t*console.log(\"资源加载完成！\");\n\t\t\t*var button=new laya.ui.Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 类的实例对象 button ,传入它的皮肤skin和标签label。\n\t\t\t*button.x=100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n\t\t\t*button.y=100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n\t\t\t*button.toggle=true;//设置 button 对象为切换按钮。\n\t\t\t*button.clickHandler=laya.utils.Handler.create(this,onClickButton,[button],false);//设置 button 的点击事件处理器。\n\t\t\t*Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n\t\t\t*}\n\t\t*function onClickButton(button)\n\t\t*{\n\t\t\t*console.log(\"button.selected = \",button.selected);\n\t\t\t*}\n\t\t*@example\n\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load(\"button.png\",null,null,null,null,null);//加载资源\n\t\t*function loadComplete(){\n\t\t\t*console.log(\"资源加载完成！\");\n\t\t\t*var button:laya.ui.Button=new laya.ui.Button(\"button.png\",\"label\");//创建一个 Button 类的实例对象 button ,传入它的皮肤skin和标签label。\n\t\t\t*button.x=100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n\t\t\t*button.y=100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n\t\t\t*button.toggle=true;//设置 button 对象为切换按钮。\n\t\t\t*button.clickHandler=laya.utils.Handler.create(this,onClickButton,[button],false);//设置 button 的点击事件处理器。\n\t\t\t*Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n\t\t\t*}\n\t\t*function onClickButton(button){\n\t\t\t*console.log(\"button.selected = \",button.selected);\n\t\t\t*}\n\t\t*/\n\t\tthis.toggle=false;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._bitmap=null;\n\t\t/**\n\t\t*@private\n\t\t*按钮上的文本。\n\t\t*/\n\t\tthis._text=null;\n\t\t/**\n\t\t*@private\n\t\t*按钮文本标签描边的颜色值。\n\t\t*/\n\t\tthis._strokeColors=null;\n\t\t/**\n\t\t*@private\n\t\t*按钮的状态值。\n\t\t*/\n\t\tthis._state=0;\n\t\t/**\n\t\t*@private\n\t\t*表示按钮的选中状态。\n\t\t*/\n\t\tthis._selected=false;\n\t\t/**\n\t\t*@private\n\t\t*按钮的皮肤资源。\n\t\t*/\n\t\tthis._skin=null;\n\t\t/**\n\t\t*@private\n\t\t*指定此显示对象是否自动计算并改变大小等属性。\n\t\t*/\n\t\tthis._autoSize=true;\n\t\t/**\n\t\t*@private\n\t\t*源数据。\n\t\t*/\n\t\tthis._sources=null;\n\t\t/**\n\t\t*@private\n\t\t*按钮的点击事件函数。\n\t\t*/\n\t\tthis._clickHandler=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._stateChanged=false;\n\t\tButton.__super.call(this);\n\t\tthis._labelColors=Styles.buttonLabelColors;\n\t\tthis._stateNum=Styles.buttonStateNum;\n\t\t(label===void 0)&& (label=\"\");\n\t\tthis.skin=skin;\n\t\tthis.label=label;\n\t}\n\n\t__class(Button,'laya.ui.Button',_super);\n\tvar __proto=Button.prototype;\n\tLaya.imps(__proto,{\"laya.ui.ISelect\":true})\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._bitmap && this._bitmap.destroy();\n\t\tthis._text && this._text.destroy(destroyChild);\n\t\tthis._bitmap=null;\n\t\tthis._text=null;\n\t\tthis._clickHandler=null;\n\t\tthis._labelColors=this._sources=this._strokeColors=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.graphics=this._bitmap=new AutoBitmap();\n\t}\n\n\t/**@private */\n\t__proto.createText=function(){\n\t\tif (!this._text){\n\t\t\tthis._text=new Text();\n\t\t\tthis._text.overflow=Text.HIDDEN;\n\t\t\tthis._text.align=\"center\";\n\t\t\tthis._text.valign=\"middle\";\n\t\t\tthis._text.width=this._width;\n\t\t\tthis._text.height=this._height;\n\t\t}\n\t}\n\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\tif (this._mouseEnableState!==1){\n\t\t\tthis.mouseEnabled=true;\n\t\t\tthis._setBit(/*laya.display.Node.MOUSEENABLE*/0x2,true);\n\t\t}\n\t\tthis._createListener(/*laya.events.Event.MOUSE_OVER*/\"mouseover\",this,this.onMouse,null,false,false);\n\t\tthis._createListener(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onMouse,null,false,false);\n\t\tthis._createListener(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onMouse,null,false,false);\n\t\tthis._createListener(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onMouse,null,false,false);\n\t\tthis._createListener(/*laya.events.Event.CLICK*/\"click\",this,this.onMouse,null,false,false);\n\t}\n\n\t/**\n\t*对象的 <code>Event.MOUSE_OVER、Event.MOUSE_OUT、Event.MOUSE_DOWN、Event.MOUSE_UP、Event.CLICK</code> 事件侦听处理函数。\n\t*@param e Event 对象。\n\t*/\n\t__proto.onMouse=function(e){\n\t\tif (this.toggle===false && this._selected)return;\n\t\tif (e.type===/*laya.events.Event.CLICK*/\"click\"){\n\t\t\tthis.toggle && (this.selected=!this._selected);\n\t\t\tthis._clickHandler && this._clickHandler.run();\n\t\t\treturn;\n\t\t}\n\t\t!this._selected && (this.state=Button.stateMap[e.type]);\n\t}\n\n\t/**\n\t*@private\n\t*对象的资源切片发生改变。\n\t*/\n\t__proto.changeClips=function(){\n\t\tvar img=Loader.getRes(this._skin);\n\t\tif (!img){\n\t\t\tconsole.log(\"lose skin\",this._skin);\n\t\t\treturn;\n\t\t};\n\t\tvar width=img.sourceWidth;\n\t\tvar height=img.sourceHeight / this._stateNum;\n\t\timg.$_GID || (img.$_GID=Utils.getGID());\n\t\tvar key=img.$_GID+\"-\"+this._stateNum;\n\t\tvar clips=WeakObject.I.get(key);\n\t\tif (!Utils.isOkTextureList(clips)){\n\t\t\tclips=null;\n\t\t}\n\t\tif (clips)this._sources=clips;\n\t\telse {\n\t\t\tthis._sources=[];\n\t\t\tif (this._stateNum===1){\n\t\t\t\tthis._sources.push(img);\n\t\t\t\t}else {\n\t\t\t\tfor (var i=0;i < this._stateNum;i++){\n\t\t\t\t\tthis._sources.push(Texture.createFromTexture(img,0,height *i,width,height));\n\t\t\t\t}\n\t\t\t}\n\t\t\tWeakObject.I.set(key,this._sources);\n\t\t}\n\t\tif (this._autoSize){\n\t\t\tthis._bitmap.width=this._width || width;\n\t\t\tthis._bitmap.height=this._height || height;\n\t\t\tif (this._text){\n\t\t\t\tthis._text.width=this._bitmap.width;\n\t\t\t\tthis._text.height=this._bitmap.height;\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis._text && (this._text.x=width);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*改变对象的状态。\n\t*/\n\t__proto.changeState=function(){\n\t\tthis._stateChanged=false;\n\t\tthis.runCallLater(this.changeClips);\n\t\tvar index=this._state < this._stateNum ? this._state :this._stateNum-1;\n\t\tthis._sources && (this._bitmap.source=this._sources[index]);\n\t\tif (this.label){\n\t\t\tthis._text.color=this._labelColors[index];\n\t\t\tif (this._strokeColors)this._text.strokeColor=this._strokeColors[index];\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._setStateChanged=function(){\n\t\tif (!this._stateChanged){\n\t\t\tthis._stateChanged=true;\n\t\t\tthis.callLater(this.changeState);\n\t\t}\n\t}\n\n\t/**\n\t*<p>描边颜色，以字符串表示。</p>\n\t*默认值为 \"#000000\"（黑色）;\n\t*@see laya.display.Text.strokeColor()\n\t*/\n\t__getset(0,__proto,'labelStrokeColor',function(){\n\t\tthis.createText();\n\t\treturn this._text.strokeColor;\n\t\t},function(value){\n\t\tthis.createText();\n\t\tthis._text.strokeColor=value\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'measureHeight',function(){\n\t\tthis.runCallLater(this.changeClips);\n\t\treturn this._text ? Math.max(this._bitmap.height,this._text.height):this._bitmap.height;\n\t});\n\n\t/**\n\t*<p>对象的皮肤资源地址。</p>\n\t*支持单态，两态和三态，用 <code>stateNum</code> 属性设置\n\t*<p>对象的皮肤地址，以字符串表示。</p>\n\t*@see #stateNum\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._skin;\n\t\t},function(value){\n\t\tif (this._skin !=value){\n\t\t\tthis._skin=value;\n\t\t\tthis.callLater(this.changeClips);\n\t\t\tthis._setStateChanged();\n\t\t}\n\t});\n\n\t/**\n\t*对象的状态值。\n\t*@see #stateMap\n\t*/\n\t__getset(0,__proto,'state',function(){\n\t\treturn this._state;\n\t\t},function(value){\n\t\tif (this._state !=value){\n\t\t\tthis._state=value;\n\t\t\tthis._setStateChanged();\n\t\t}\n\t});\n\n\t/**\n\t*按钮文本标签 <code>Text</code> 控件。\n\t*/\n\t__getset(0,__proto,'text',function(){\n\t\tthis.createText();\n\t\treturn this._text;\n\t});\n\n\t/**\n\t*<p>指定对象的状态值，以数字表示。</p>\n\t*<p>默认值为3。此值决定皮肤资源图片的切割方式。</p>\n\t*<p><b>取值：</b>\n\t*<li>1：单态。图片不做切割，按钮的皮肤状态只有一种。</li>\n\t*<li>2：两态。图片将以竖直方向被等比切割为2部分，从上向下，依次为\n\t*弹起状态皮肤、\n\t*按下和经过及选中状态皮肤。</li>\n\t*<li>3：三态。图片将以竖直方向被等比切割为3部分，从上向下，依次为\n\t*弹起状态皮肤、\n\t*经过状态皮肤、\n\t*按下和选中状态皮肤</li>\n\t*</p>\n\t*/\n\t__getset(0,__proto,'stateNum',function(){\n\t\treturn this._stateNum;\n\t\t},function(value){\n\t\tif ((typeof value=='string')){\n\t\t\tvalue=parseInt(value);\n\t\t}\n\t\tif (this._stateNum !=value){\n\t\t\tthis._stateNum=value < 1 ? 1 :value > 3 ? 3 :value;\n\t\t\tthis.callLater(this.changeClips);\n\t\t}\n\t});\n\n\t/**\n\t*表示按钮各个状态下的描边颜色。\n\t*<p><b>格式:</b> \"upColor,overColor,downColor,disableColor\"。</p>\n\t*/\n\t__getset(0,__proto,'strokeColors',function(){\n\t\treturn this._strokeColors ? this._strokeColors.join(\",\"):\"\";\n\t\t},function(value){\n\t\tthis._strokeColors=UIUtils.fillArray(Styles.buttonLabelColors,value,String);\n\t\tthis._setStateChanged();\n\t});\n\n\t/**\n\t*表示按钮各个状态下的文本颜色。\n\t*<p><b>格式:</b> \"upColor,overColor,downColor,disableColor\"。</p>\n\t*/\n\t__getset(0,__proto,'labelColors',function(){\n\t\treturn this._labelColors.join(\",\");\n\t\t},function(value){\n\t\tthis._labelColors=UIUtils.fillArray(Styles.buttonLabelColors,value,String);\n\t\tthis._setStateChanged();\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'measureWidth',function(){\n\t\tthis.runCallLater(this.changeClips);\n\t\tif (this._autoSize)return this._bitmap.width;\n\t\tthis.runCallLater(this.changeState);\n\t\treturn this._bitmap.width+(this._text ? this._text.width :0);\n\t});\n\n\t/**\n\t*按钮的文本内容。\n\t*/\n\t__getset(0,__proto,'label',function(){\n\t\treturn this._text ? this._text.text :null;\n\t\t},function(value){\n\t\tif (!this._text && !value)return;\n\t\tthis.createText();\n\t\tif (this._text.text !=value){\n\t\t\tvalue && !this._text.parent && this.addChild(this._text);\n\t\t\tthis._text.text=(value+\"\").replace(/\\\\n/g,\"\\n\");\n\t\t\tthis._setStateChanged();\n\t\t}\n\t});\n\n\t/**\n\t*表示按钮的选中状态。\n\t*<p>如果值为true，表示该对象处于选中状态。否则该对象处于未选中状态。</p>\n\t*/\n\t__getset(0,__proto,'selected',function(){\n\t\treturn this._selected;\n\t\t},function(value){\n\t\tif (this._selected !=value){\n\t\t\tthis._selected=value;\n\t\t\tthis.state=this._selected ? 2 :0;\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t}\n\t});\n\n\t/**\n\t*表示按钮文本标签的边距。\n\t*<p><b>格式：</b>\"上边距,右边距,下边距,左边距\"。</p>\n\t*/\n\t__getset(0,__proto,'labelPadding',function(){\n\t\tthis.createText();\n\t\treturn this._text.padding.join(\",\");\n\t\t},function(value){\n\t\tthis.createText();\n\t\tthis._text.padding=UIUtils.fillArray(Styles.labelPadding,value,Number);\n\t});\n\n\t/**\n\t*表示按钮文本标签的字体大小。\n\t*@see laya.display.Text.fontSize()\n\t*/\n\t__getset(0,__proto,'labelSize',function(){\n\t\tthis.createText();\n\t\treturn this._text.fontSize;\n\t\t},function(value){\n\t\tthis.createText();\n\t\tthis._text.fontSize=value\n\t});\n\n\t/**\n\t*<p>描边宽度（以像素为单位）。</p>\n\t*默认值0，表示不描边。\n\t*@see laya.display.Text.stroke()\n\t*/\n\t__getset(0,__proto,'labelStroke',function(){\n\t\tthis.createText();\n\t\treturn this._text.stroke;\n\t\t},function(value){\n\t\tthis.createText();\n\t\tthis._text.stroke=value\n\t});\n\n\t/**\n\t*表示按钮文本标签是否为粗体字。\n\t*@see laya.display.Text.bold()\n\t*/\n\t__getset(0,__proto,'labelBold',function(){\n\t\tthis.createText();\n\t\treturn this._text.bold;\n\t\t},function(value){\n\t\tthis.createText();\n\t\tthis._text.bold=value;\n\t});\n\n\t/**\n\t*表示按钮文本标签的字体名称，以字符串形式表示。\n\t*@see laya.display.Text.font()\n\t*/\n\t__getset(0,__proto,'labelFont',function(){\n\t\tthis.createText();\n\t\treturn this._text.font;\n\t\t},function(value){\n\t\tthis.createText();\n\t\tthis._text.font=value;\n\t});\n\n\t/**标签对齐模式，默认为居中对齐。*/\n\t__getset(0,__proto,'labelAlign',function(){\n\t\tthis.createText()\n\t\treturn this._text.align;\n\t\t},function(value){\n\t\tthis.createText()\n\t\tthis._text.align=value;\n\t});\n\n\t/**\n\t*对象的点击事件处理器函数（无默认参数）。\n\t*/\n\t__getset(0,__proto,'clickHandler',function(){\n\t\treturn this._clickHandler;\n\t\t},function(value){\n\t\tthis._clickHandler=value;\n\t});\n\n\t/**\n\t*<p>当前实例的位图 <code>AutoImage</code> 实例的有效缩放网格数据。</p>\n\t*<p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n\t*<ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n\t*@see laya.ui.AutoBitmap.sizeGrid\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\tif (this._bitmap.sizeGrid)return this._bitmap.sizeGrid.join(\",\");\n\t\treturn null;\n\t\t},function(value){\n\t\tthis._bitmap.sizeGrid=UIUtils.fillArray(Styles.defaultSizeGrid,value,Number);\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Component,this,'width',value);\n\t\tif (this._autoSize){\n\t\t\tthis._bitmap.width=value;\n\t\t\tthis._text && (this._text.width=value);\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Component,this,'height',value);\n\t\tif (this._autoSize){\n\t\t\tthis._bitmap.height=value;\n\t\t\tthis._text && (this._text.height=value);\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif ((typeof value=='number')|| (typeof value=='string'))this.label=value+\"\";\n\t\telse Laya.superSet(Component,this,'dataSource',value);\n\t});\n\n\t/**图标x,y偏移，格式：100,100*/\n\t__getset(0,__proto,'iconOffset',function(){\n\t\treturn this._bitmap._offset ? this._bitmap._offset.join(\",\"):null;\n\t\t},function(value){\n\t\tif (value)this._bitmap._offset=UIUtils.fillArray([1,1],value,Number);\n\t\telse this._bitmap._offset=[];\n\t});\n\n\t__static(Button,\n\t['stateMap',function(){return this.stateMap={\"mouseup\":0,\"mouseover\":1,\"mousedown\":2,\"mouseout\":0};}\n\t]);\n\treturn Button;\n})(Component)\n\n\n/**\n*<p> <code>Clip</code> 类是位图切片动画。</p>\n*<p> <code>Clip</code> 可将一张图片，按横向分割数量 <code>clipX</code> 、竖向分割数量 <code>clipY</code> ，\n*或横向分割每个切片的宽度 <code>clipWidth</code> 、竖向分割每个切片的高度 <code>clipHeight</code> ，\n*从左向右，从上到下，分割组合为一个切片动画。</p>\n*Image和Clip组件是唯一支持异步加载的两个组件，比如clip.skin=\"abc/xxx.png\"，其他UI组件均不支持异步加载。\n*\n*@example <caption>以下示例代码，创建了一个 <code>Clip</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.Clip;\n\t*public class Clip_Example\n\t*{\n\t\t*private var clip:Clip;\n\t\t*public function Clip_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*onInit();\n\t\t\t*}\n\t\t*private function onInit():void\n\t\t*{\n\t\t\t*clip=new Clip(\"resource/ui/clip_num.png\",10,1);//创建一个 Clip 类的实例对象 clip ,传入它的皮肤skin和横向分割数量、竖向分割数量。\n\t\t\t*clip.autoPlay=true;//设置 clip 动画自动播放。\n\t\t\t*clip.interval=100;//设置 clip 动画的播放时间间隔。\n\t\t\t*clip.x=100;//设置 clip 对象的属性 x 的值，用于控制 clip 对象的显示位置。\n\t\t\t*clip.y=100;//设置 clip 对象的属性 y 的值，用于控制 clip 对象的显示位置。\n\t\t\t*clip.on(Event.CLICK,this,onClick);//给 clip 添加点击事件函数侦听。\n\t\t\t*Laya.stage.addChild(clip);//将此 clip 对象添加到显示列表。\n\t\t\t*}\n\t\t*private function onClick():void\n\t\t*{\n\t\t\t*trace(\"clip 的点击事件侦听处理函数。clip.total=\"+clip.total);\n\t\t\t*if (clip.isPlaying==true)\n\t\t\t*{\n\t\t\t\t*clip.stop();//停止动画。\n\t\t\t\t*}else {\n\t\t\t\t*clip.play();//播放动画。\n\t\t\t\t*}\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*var clip;\n*Laya.loader.load(\"resource/ui/clip_num.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n*function loadComplete(){\n\t*console.log(\"资源加载完成！\");\n\t*clip=new laya.ui.Clip(\"resource/ui/clip_num.png\",10,1);//创建一个 Clip 类的实例对象 clip ,传入它的皮肤skin和横向分割数量、竖向分割数量。\n\t*clip.autoPlay=true;//设置 clip 动画自动播放。\n\t*clip.interval=100;//设置 clip 动画的播放时间间隔。\n\t*clip.x=100;//设置 clip 对象的属性 x 的值，用于控制 clip 对象的显示位置。\n\t*clip.y=100;//设置 clip 对象的属性 y 的值，用于控制 clip 对象的显示位置。\n\t*clip.on(Event.CLICK,this,onClick);//给 clip 添加点击事件函数侦听。\n\t*Laya.stage.addChild(clip);//将此 clip 对象添加到显示列表。\n\t*}\n*function onClick()\n*{\n\t*console.log(\"clip 的点击事件侦听处理函数。\");\n\t*if(clip.isPlaying==true)\n\t*{\n\t\t*clip.stop();\n\t\t*}else {\n\t\t*clip.play();\n\t\t*}\n\t*}\n*@example\n*import Clip=laya.ui.Clip;\n*import Handler=laya.utils.Handler;\n*class Clip_Example {\n\t*private clip:Clip;\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*this.onInit();\n\t\t*}\n\t*private onInit():void {\n\t\t*this.clip=new Clip(\"resource/ui/clip_num.png\",10,1);//创建一个 Clip 类的实例对象 clip ,传入它的皮肤skin和横向分割数量、竖向分割数量。\n\t\t*this.clip.autoPlay=true;//设置 clip 动画自动播放。\n\t\t*this.clip.interval=100;//设置 clip 动画的播放时间间隔。\n\t\t*this.clip.x=100;//设置 clip 对象的属性 x 的值，用于控制 clip 对象的显示位置。\n\t\t*this.clip.y=100;//设置 clip 对象的属性 y 的值，用于控制 clip 对象的显示位置。\n\t\t*this.clip.on(laya.events.Event.CLICK,this,this.onClick);//给 clip 添加点击事件函数侦听。\n\t\t*Laya.stage.addChild(this.clip);//将此 clip 对象添加到显示列表。\n\t\t*}\n\t*private onClick():void {\n\t\t*console.log(\"clip 的点击事件侦听处理函数。clip.total=\"+this.clip.total);\n\t\t*if (this.clip.isPlaying==true){\n\t\t\t*this.clip.stop();//停止动画。\n\t\t\t*}else {\n\t\t\t*this.clip.play();//播放动画。\n\t\t\t*}\n\t\t*}\n\t*}\n*\n*/\n//class laya.ui.Clip extends laya.ui.Component\nvar Clip=(function(_super){\n\tfunction Clip(url,clipX,clipY){\n\t\t/**@private */\n\t\tthis._sources=null;\n\t\t/**@private */\n\t\tthis._bitmap=null;\n\t\t/**@private */\n\t\tthis._skin=null;\n\t\t/**@private */\n\t\tthis._clipX=1;\n\t\t/**@private */\n\t\tthis._clipY=1;\n\t\t/**@private */\n\t\tthis._clipWidth=0;\n\t\t/**@private */\n\t\tthis._clipHeight=0;\n\t\t/**@private */\n\t\tthis._autoPlay=false;\n\t\t/**@private */\n\t\tthis._interval=50;\n\t\t/**@private */\n\t\tthis._complete=null;\n\t\t/**@private */\n\t\tthis._isPlaying=false;\n\t\t/**@private */\n\t\tthis._index=0;\n\t\t/**@private */\n\t\tthis._clipChanged=false;\n\t\t/**@private */\n\t\tthis._group=null;\n\t\t/**@private */\n\t\tthis._toIndex=-1;\n\t\tClip.__super.call(this);\n\t\t(clipX===void 0)&& (clipX=1);\n\t\t(clipY===void 0)&& (clipY=1);\n\t\tthis._clipX=clipX;\n\t\tthis._clipY=clipY;\n\t\tthis.skin=url;\n\t}\n\n\t__class(Clip,'laya.ui.Clip',_super);\n\tvar __proto=Clip.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,true);\n\t\tthis._bitmap && this._bitmap.destroy();\n\t\tthis._bitmap=null;\n\t\tthis._sources=null;\n\t}\n\n\t/**\n\t*销毁对象并释放加载的皮肤资源。\n\t*/\n\t__proto.dispose=function(){\n\t\tthis.destroy(true);\n\t\tLaya.loader.clearRes(this._skin);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.graphics=this._bitmap=new AutoBitmap();\n\t}\n\n\t/**@private */\n\t__proto._onDisplay=function(e){\n\t\tif (this._isPlaying){\n\t\t\tif (this._displayedInStage)this.play();\n\t\t\telse this.stop();\n\t\t\t}else if (this._autoPlay){\n\t\t\tthis.play();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*改变切片的资源、切片的大小。\n\t*/\n\t__proto.changeClip=function(){\n\t\tthis._clipChanged=false;\n\t\tif (!this._skin)return;\n\t\tvar img=Loader.getRes(this._skin);\n\t\tif (img){\n\t\t\tthis.loadComplete(this._skin,img);\n\t\t\t}else {\n\t\t\tLaya.loader.load(this._skin,Handler.create(this,this.loadComplete,[this._skin]));\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*加载切片图片资源完成函数。\n\t*@param url 资源地址。\n\t*@param img 纹理。\n\t*/\n\t__proto.loadComplete=function(url,img){\n\t\tif (url===this._skin && img){\n\t\t\tvar w=this._clipWidth || Math.ceil(img.sourceWidth / this._clipX);\n\t\t\tvar h=this._clipHeight || Math.ceil(img.sourceHeight / this._clipY);\n\t\t\tvar key=this._skin+w+h;\n\t\t\tvar clips=WeakObject.I.get(key);\n\t\t\tif (!Utils.isOkTextureList(clips)){\n\t\t\t\tclips=null;\n\t\t\t}\n\t\t\tif (clips)this._sources=clips;\n\t\t\telse {\n\t\t\t\tthis._sources=[];\n\t\t\t\tfor (var i=0;i < this._clipY;i++){\n\t\t\t\t\tfor (var j=0;j < this._clipX;j++){\n\t\t\t\t\t\tthis._sources.push(Texture.createFromTexture(img,w *j,h *i,w,h));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tWeakObject.I.set(key,this._sources);\n\t\t\t}\n\t\t\tthis.index=this._index;\n\t\t\tthis.event(/*laya.events.Event.LOADED*/\"loaded\");\n\t\t\tthis.onCompResize();\n\t\t}\n\t}\n\n\t/**\n\t*播放动画。\n\t*@param from 开始索引\n\t*@param to 结束索引，-1为不限制\n\t*/\n\t__proto.play=function(from,to){\n\t\t(from===void 0)&& (from=0);\n\t\t(to===void 0)&& (to=-1);\n\t\tthis._isPlaying=true;\n\t\tthis.index=from;\n\t\tthis._toIndex=to;\n\t\tthis._index++;\n\t\tLaya.timer.loop(this.interval,this,this._loop);\n\t\tthis.on(/*laya.events.Event.DISPLAY*/\"display\",this,this._onDisplay);\n\t\tthis.on(/*laya.events.Event.UNDISPLAY*/\"undisplay\",this,this._onDisplay);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._loop=function(){\n\t\tif (this._style.visible && this._sources){\n\t\t\tthis._index++;\n\t\t\tif (this._toIndex >-1 && this._index >=this._toIndex)this.stop();\n\t\t\telse if (this._index >=this._sources.length)this._index=0;\n\t\t\tthis.index=this._index;\n\t\t}\n\t}\n\n\t/**\n\t*停止动画。\n\t*/\n\t__proto.stop=function(){\n\t\tthis._isPlaying=false;\n\t\tLaya.timer.clear(this,this._loop);\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t}\n\n\t/**@private */\n\t__proto._setClipChanged=function(){\n\t\tif (!this._clipChanged){\n\t\t\tthis._clipChanged=true;\n\t\t\tthis.callLater(this.changeClip);\n\t\t}\n\t}\n\n\t/**\n\t*表示动画播放间隔时间(以毫秒为单位)。\n\t*/\n\t__getset(0,__proto,'interval',function(){\n\t\treturn this._interval;\n\t\t},function(value){\n\t\tif (this._interval !=value){\n\t\t\tthis._interval=value;\n\t\t\tif (this._isPlaying)this.play();\n\t\t}\n\t});\n\n\t/**\n\t*@copy laya.ui.Image#skin\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._skin;\n\t\t},function(value){\n\t\tif (this._skin !=value){\n\t\t\tthis._skin=value;\n\t\t\tif (value){\n\t\t\t\tthis._setClipChanged()\n\t\t\t\t}else {\n\t\t\t\tthis._bitmap.source=null;\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*源数据。\n\t*/\n\t__getset(0,__proto,'sources',function(){\n\t\treturn this._sources;\n\t\t},function(value){\n\t\tthis._sources=value;\n\t\tthis.index=this._index;\n\t\tthis.event(/*laya.events.Event.LOADED*/\"loaded\");\n\t});\n\n\t/**X轴（横向）切片数量。*/\n\t__getset(0,__proto,'clipX',function(){\n\t\treturn this._clipX;\n\t\t},function(value){\n\t\tthis._clipX=value || 1;\n\t\tthis._setClipChanged()\n\t});\n\n\t/**Y轴(竖向)切片数量。*/\n\t__getset(0,__proto,'clipY',function(){\n\t\treturn this._clipY;\n\t\t},function(value){\n\t\tthis._clipY=value || 1;\n\t\tthis._setClipChanged()\n\t});\n\n\t/**\n\t*切片动画的总帧数。\n\t*/\n\t__getset(0,__proto,'total',function(){\n\t\tthis.runCallLater(this.changeClip);\n\t\treturn this._sources ? this._sources.length :0;\n\t});\n\n\t/**\n\t*横向分割时每个切片的宽度，与 <code>clipX</code> 同时设置时优先级高于 <code>clipX</code> 。\n\t*/\n\t__getset(0,__proto,'clipWidth',function(){\n\t\treturn this._clipWidth;\n\t\t},function(value){\n\t\tthis._clipWidth=value;\n\t\tthis._setClipChanged()\n\t});\n\n\t/**\n\t*<p>当前实例的位图 <code>AutoImage</code> 实例的有效缩放网格数据。</p>\n\t*<p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n\t*<ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n\t*@see laya.ui.AutoBitmap.sizeGrid\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\tif (this._bitmap.sizeGrid)return this._bitmap.sizeGrid.join(\",\");\n\t\treturn null;\n\t\t},function(value){\n\t\tthis._bitmap.sizeGrid=UIUtils.fillArray(Styles.defaultSizeGrid,value,Number);\n\t});\n\n\t/**\n\t*资源分组。\n\t*/\n\t__getset(0,__proto,'group',function(){\n\t\treturn this._group;\n\t\t},function(value){\n\t\tif (value && this._skin)Loader.setGroup(this._skin,value);\n\t\tthis._group=value;\n\t});\n\n\t/**\n\t*竖向分割时每个切片的高度，与 <code>clipY</code> 同时设置时优先级高于 <code>clipY</code> 。\n\t*/\n\t__getset(0,__proto,'clipHeight',function(){\n\t\treturn this._clipHeight;\n\t\t},function(value){\n\t\tthis._clipHeight=value;\n\t\tthis._setClipChanged()\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Component,this,'width',value);\n\t\tthis._bitmap.width=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Component,this,'height',value);\n\t\tthis._bitmap.height=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureWidth',function(){\n\t\tthis.runCallLater(this.changeClip);\n\t\treturn this._bitmap.width;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureHeight',function(){\n\t\tthis.runCallLater(this.changeClip);\n\t\treturn this._bitmap.height;\n\t});\n\n\t/**\n\t*当前帧索引。\n\t*/\n\t__getset(0,__proto,'index',function(){\n\t\treturn this._index;\n\t\t},function(value){\n\t\tthis._index=value;\n\t\tthis._bitmap && this._sources && (this._bitmap.source=this._sources[value]);\n\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t});\n\n\t/**\n\t*表示是否自动播放动画，若自动播放值为true,否则值为false;\n\t*<p>可控制切片动画的播放、停止。</p>\n\t*/\n\t__getset(0,__proto,'autoPlay',function(){\n\t\treturn this._autoPlay;\n\t\t},function(value){\n\t\tif (this._autoPlay !=value){\n\t\t\tthis._autoPlay=value;\n\t\t\tvalue ? this.play():this.stop();\n\t\t}\n\t});\n\n\t/**\n\t*表示动画的当前播放状态。\n\t*如果动画正在播放中，则为true，否则为flash。\n\t*/\n\t__getset(0,__proto,'isPlaying',function(){\n\t\treturn this._isPlaying;\n\t\t},function(value){\n\t\tthis._isPlaying=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif (((typeof value=='number')&& Math.floor(value)==value)|| (typeof value=='string'))this.index=parseInt(value);\n\t\telse Laya.superSet(Component,this,'dataSource',value);\n\t});\n\n\t/**\n\t*<code>AutoBitmap</code> 位图实例。\n\t*/\n\t__getset(0,__proto,'bitmap',function(){\n\t\treturn this._bitmap;\n\t});\n\n\treturn Clip;\n})(Component)\n\n\n/**\n*<code>ColorPicker</code> 组件将显示包含多个颜色样本的列表，用户可以从中选择颜色。\n*\n*@example <caption>以下示例代码，创建了一个 <code>ColorPicker</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.ColorPicker;\n\t*import laya.utils.Handler;\n\t*public class ColorPicker_Example\n\t*{\n\t\t*public function ColorPicker_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load(\"resource/ui/color.png\",Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*trace(\"资源加载完成！\");\n\t\t\t*var colorPicket:ColorPicker=new ColorPicker();//创建一个 ColorPicker 类的实例对象 colorPicket 。\n\t\t\t*colorPicket.skin=\"resource/ui/color.png\";//设置 colorPicket 的皮肤。\n\t\t\t*colorPicket.x=100;//设置 colorPicket 对象的属性 x 的值，用于控制 colorPicket 对象的显示位置。\n\t\t\t*colorPicket.y=100;//设置 colorPicket 对象的属性 y 的值，用于控制 colorPicket 对象的显示位置。\n\t\t\t*colorPicket.changeHandler=new Handler(this,onChangeColor,[colorPicket]);//设置 colorPicket 的颜色改变回调函数。\n\t\t\t*Laya.stage.addChild(colorPicket);//将此 colorPicket 对象添加到显示列表。\n\t\t\t*}\n\t\t*private function onChangeColor(colorPicket:ColorPicker):void\n\t\t*{\n\t\t\t*trace(\"当前选择的颜色： \"+colorPicket.selectedColor);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*Laya.loader.load(\"resource/ui/color.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n*function loadComplete()\n*{\n\t*console.log(\"资源加载完成！\");\n\t*var colorPicket=new laya.ui.ColorPicker();//创建一个 ColorPicker 类的实例对象 colorPicket 。\n\t*colorPicket.skin=\"resource/ui/color.png\";//设置 colorPicket 的皮肤。\n\t*colorPicket.x=100;//设置 colorPicket 对象的属性 x 的值，用于控制 colorPicket 对象的显示位置。\n\t*colorPicket.y=100;//设置 colorPicket 对象的属性 y 的值，用于控制 colorPicket 对象的显示位置。\n\t*colorPicket.changeHandler=laya.utils.Handler.create(this,onChangeColor,[colorPicket],false);//设置 colorPicket 的颜色改变回调函数。\n\t*Laya.stage.addChild(colorPicket);//将此 colorPicket 对象添加到显示列表。\n\t*}\n*function onChangeColor(colorPicket)\n*{\n\t*console.log(\"当前选择的颜色： \"+colorPicket.selectedColor);\n\t*}\n*@example\n*import ColorPicker=laya.ui.ColorPicker;\n*import Handler=laya.utils.Handler;\n*class ColorPicker_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load(\"resource/ui/color.png\",Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*console.log(\"资源加载完成！\");\n\t\t*var colorPicket:ColorPicker=new ColorPicker();//创建一个 ColorPicker 类的实例对象 colorPicket 。\n\t\t*colorPicket.skin=\"resource/ui/color.png\";//设置 colorPicket 的皮肤。\n\t\t*colorPicket.x=100;//设置 colorPicket 对象的属性 x 的值，用于控制 colorPicket 对象的显示位置。\n\t\t*colorPicket.y=100;//设置 colorPicket 对象的属性 y 的值，用于控制 colorPicket 对象的显示位置。\n\t\t*colorPicket.changeHandler=new Handler(this,this.onChangeColor,[colorPicket]);//设置 colorPicket 的颜色改变回调函数。\n\t\t*Laya.stage.addChild(colorPicket);//将此 colorPicket 对象添加到显示列表。\n\t\t*}\n\t*private onChangeColor(colorPicket:ColorPicker):void {\n\t\t*console.log(\"当前选择的颜色： \"+colorPicket.selectedColor);\n\t\t*}\n\t*}\n*/\n//class laya.ui.ColorPicker extends laya.ui.Component\nvar ColorPicker=(function(_super){\n\tfunction ColorPicker(){\n\t\t/**\n\t\t*当颜色发生改变时执行的函数处理器。\n\t\t*默认返回参数color：颜色值字符串。\n\t\t*/\n\t\tthis.changeHandler=null;\n\t\t/**\n\t\t*@private\n\t\t*指定每个正方形的颜色小格子的宽高（以像素为单位）。\n\t\t*/\n\t\tthis._gridSize=11;\n\t\t/**\n\t\t*@private\n\t\t*表示颜色样本列表面板的背景颜色值。\n\t\t*/\n\t\tthis._bgColor=\"#ffffff\";\n\t\t/**\n\t\t*@private\n\t\t*表示颜色样本列表面板的边框颜色值。\n\t\t*/\n\t\tthis._borderColor=\"#000000\";\n\t\t/**\n\t\t*@private\n\t\t*表示颜色样本列表面板选择或输入的颜色值。\n\t\t*/\n\t\tthis._inputColor=\"#000000\";\n\t\t/**\n\t\t*@private\n\t\t*表示颜色输入框的背景颜色值。\n\t\t*/\n\t\tthis._inputBgColor=\"#efefef\";\n\t\t/**\n\t\t*@private\n\t\t*表示颜色样本列表面板。\n\t\t*/\n\t\tthis._colorPanel=null;\n\t\t/**\n\t\t*@private\n\t\t*表示颜色网格。\n\t\t*/\n\t\tthis._colorTiles=null;\n\t\t/**\n\t\t*@private\n\t\t*表示颜色块显示对象。\n\t\t*/\n\t\tthis._colorBlock=null;\n\t\t/**\n\t\t*@private\n\t\t*表示颜色输入框控件 <code>Input</code> 。\n\t\t*/\n\t\tthis._colorInput=null;\n\t\t/**\n\t\t*@private\n\t\t*表示点击后显示颜色样本列表面板的按钮控件 <code>Button</code> 。\n\t\t*/\n\t\tthis._colorButton=null;\n\t\t/**\n\t\t*@private\n\t\t*表示颜色值列表。\n\t\t*/\n\t\tthis._colors=[];\n\t\t/**\n\t\t*@private\n\t\t*表示选择的颜色值。\n\t\t*/\n\t\tthis._selectedColor=\"#000000\";\n\t\t/**@private */\n\t\tthis._panelChanged=false;\n\t\tColorPicker.__super.call(this);\n\t}\n\n\t__class(ColorPicker,'laya.ui.ColorPicker',_super);\n\tvar __proto=ColorPicker.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._colorPanel && this._colorPanel.destroy(destroyChild);\n\t\tthis._colorButton && this._colorButton.destroy(destroyChild);\n\t\tthis._colorPanel=null;\n\t\tthis._colorTiles=null;\n\t\tthis._colorBlock=null;\n\t\tthis._colorInput=null;\n\t\tthis._colorButton=null;\n\t\tthis._colors=null;\n\t\tthis.changeHandler=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._colorButton=new Button());\n\t\tthis._colorPanel=new Box();\n\t\tthis._colorPanel.size(230,166);\n\t\tthis._colorPanel.addChild(this._colorTiles=new Sprite());\n\t\tthis._colorPanel.addChild(this._colorBlock=new Sprite());\n\t\tthis._colorPanel.addChild(this._colorInput=new Input());\n\t}\n\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\tthis._colorButton.on(/*laya.events.Event.CLICK*/\"click\",this,this.onColorButtonClick);\n\t\tthis._colorBlock.pos(5,5);\n\t\tthis._colorInput.pos(60,5);\n\t\tthis._colorInput.size(60,20);\n\t\tthis._colorInput.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onColorInputChange);\n\t\tthis._colorInput.on(/*laya.events.Event.KEY_DOWN*/\"keydown\",this,this.onColorFieldKeyDown);\n\t\tthis._colorTiles.pos(5,30);\n\t\tthis._colorTiles.on(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.onColorTilesMouseMove);\n\t\tthis._colorTiles.on(/*laya.events.Event.CLICK*/\"click\",this,this.onColorTilesClick);\n\t\tthis._colorTiles.size(20 *this._gridSize,12 *this._gridSize);\n\t\tthis._colorPanel.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onPanelMouseDown);\n\t\tthis.bgColor=this._bgColor;\n\t}\n\n\t__proto.onPanelMouseDown=function(e){\n\t\te.stopPropagation();\n\t}\n\n\t/**\n\t*改变颜色样本列表面板。\n\t*/\n\t__proto.changePanel=function(){\n\t\tthis._panelChanged=false;\n\t\tvar g=this._colorPanel.graphics;\n\t\tg.clear();\n\t\tg.drawRect(0,0,230,166,this._bgColor,this._borderColor);\n\t\tthis.drawBlock(this._selectedColor);\n\t\tthis._colorInput.borderColor=this._borderColor;\n\t\tthis._colorInput.bgColor=this._inputBgColor;\n\t\tthis._colorInput.color=this._inputColor;\n\t\tg=this._colorTiles.graphics;\n\t\tg.clear();\n\t\tvar mainColors=[0x000000,0x333333,0x666666,0x999999,0xCCCCCC,0xFFFFFF,0xFF0000,0x00FF00,0x0000FF,0xFFFF00,0x00FFFF,0xFF00FF];\n\t\tfor (var i=0;i < 12;i++){\n\t\t\tfor (var j=0;j < 20;j++){\n\t\t\t\tvar color=0;\n\t\t\t\tif (j===0)color=mainColors[i];\n\t\t\t\telse if (j===1)color=0x000000;\n\t\t\t\telse color=(((i *3+j / 6)% 3 << 0)+((i / 6)<< 0)*3)*0x33 << 16 | j % 6 *0x33 << 8 | (i << 0)% 6 *0x33;\n\t\t\t\tvar strColor=UIUtils.toColor(color);\n\t\t\t\tthis._colors.push(strColor);\n\t\t\t\tvar x=j *this._gridSize;\n\t\t\t\tvar y=i *this._gridSize;\n\t\t\t\tg.drawRect(x,y,this._gridSize,this._gridSize,strColor,\"#000000\");\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*颜色样本列表面板的显示按钮的 <code>Event.MOUSE_DOWN</code> 事件侦听处理函数。\n\t*/\n\t__proto.onColorButtonClick=function(e){\n\t\tif (this._colorPanel.parent)this.close();\n\t\telse this.open();\n\t}\n\n\t/**\n\t*打开颜色样本列表面板。\n\t*/\n\t__proto.open=function(){\n\t\tvar p=this.localToGlobal(new Point());\n\t\tvar px=p.x+this._colorPanel.width <=Laya.stage.width ? p.x :Laya.stage.width-this._colorPanel.width;\n\t\tvar py=p.y+this._colorButton.height;\n\t\tpy=py+this._colorPanel.height <=Laya.stage.height ? py :p.y-this._colorPanel.height;\n\t\tthis._colorPanel.pos(px,py);\n\t\tthis._colorPanel.zOrder=1001;\n\t\tLaya._currentStage.addChild(this._colorPanel);\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.removeColorBox);\n\t}\n\n\t/**\n\t*关闭颜色样本列表面板。\n\t*/\n\t__proto.close=function(){\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.removeColorBox);\n\t\tthis._colorPanel.removeSelf();\n\t}\n\n\t/**\n\t*舞台的 <code>Event.MOUSE_DOWN</code> 事件侦听处理函数。\n\t*/\n\t__proto.removeColorBox=function(e){\n\t\tthis.close();\n\t}\n\n\t/**\n\t*小格子色块的 <code>Event.KEY_DOWN</code> 事件侦听处理函数。\n\t*/\n\t__proto.onColorFieldKeyDown=function(e){\n\t\tif (e.keyCode==13){\n\t\t\tif (this._colorInput.text)this.selectedColor=this._colorInput.text;\n\t\t\telse this.selectedColor=null;\n\t\t\tthis.close();\n\t\t\te.stopPropagation();\n\t\t}\n\t}\n\n\t/**\n\t*颜色值输入框 <code>Event.CHANGE</code> 事件侦听处理函数。\n\t*/\n\t__proto.onColorInputChange=function(e){\n\t\tif (this._colorInput.text)this.drawBlock(this._colorInput.text);\n\t\telse this.drawBlock(\"#FFFFFF\");\n\t}\n\n\t/**\n\t*小格子色块的 <code>Event.CLICK</code> 事件侦听处理函数。\n\t*/\n\t__proto.onColorTilesClick=function(e){\n\t\tthis.selectedColor=this.getColorByMouse();\n\t\tthis.close();\n\t}\n\n\t/**\n\t*@private\n\t*小格子色块的 <code>Event.MOUSE_MOVE</code> 事件侦听处理函数。\n\t*/\n\t__proto.onColorTilesMouseMove=function(e){\n\t\tthis._colorInput.focus=false;\n\t\tvar color=this.getColorByMouse();\n\t\tthis._colorInput.text=color;\n\t\tthis.drawBlock(color);\n\t}\n\n\t/**\n\t*通过鼠标位置取对应的颜色块的颜色值。\n\t*/\n\t__proto.getColorByMouse=function(){\n\t\tvar point=this._colorTiles.getMousePoint();\n\t\tvar x=Math.floor(point.x / this._gridSize);\n\t\tvar y=Math.floor(point.y / this._gridSize);\n\t\treturn this._colors[y *20+x];\n\t}\n\n\t/**\n\t*绘制颜色块。\n\t*@param color 需要绘制的颜色块的颜色值。\n\t*/\n\t__proto.drawBlock=function(color){\n\t\tvar g=this._colorBlock.graphics;\n\t\tg.clear();\n\t\tvar showColor=color ? color :\"#ffffff\";\n\t\tg.drawRect(0,0,50,20,showColor,this._borderColor);\n\t\tcolor || g.drawLine(0,0,50,20,\"#ff0000\");\n\t}\n\n\t/**\n\t*改变颜色。\n\t*/\n\t__proto.changeColor=function(){\n\t\tvar g=this.graphics;\n\t\tg.clear();\n\t\tvar showColor=this._selectedColor || \"#000000\";\n\t\tg.drawRect(0,0,this._colorButton.width,this._colorButton.height,showColor);\n\t}\n\n\t/**@private */\n\t__proto._setPanelChanged=function(){\n\t\tif (!this._panelChanged){\n\t\t\tthis._panelChanged=true;\n\t\t\tthis.callLater(this.changePanel);\n\t\t}\n\t}\n\n\t/**\n\t*表示颜色输入框的背景颜色值。\n\t*/\n\t__getset(0,__proto,'inputBgColor',function(){\n\t\treturn this._inputBgColor;\n\t\t},function(value){\n\t\tthis._inputBgColor=value;\n\t\tthis._setPanelChanged();\n\t});\n\n\t/**\n\t*表示选择的颜色值。\n\t*/\n\t__getset(0,__proto,'selectedColor',function(){\n\t\treturn this._selectedColor;\n\t\t},function(value){\n\t\tif (this._selectedColor !=value){\n\t\t\tthis._selectedColor=this._colorInput.text=value;\n\t\t\tthis.drawBlock(value);\n\t\t\tthis.changeColor();\n\t\t\tthis.changeHandler && this.changeHandler.runWith(this._selectedColor);\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\",Event.EMPTY.setTo(/*laya.events.Event.CHANGE*/\"change\",this,this));\n\t\t}\n\t});\n\n\t/**\n\t*@copy laya.ui.Button#skin\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._colorButton.skin;\n\t\t},function(value){\n\t\tthis._colorButton.skin=value;\n\t\tthis.changeColor();\n\t});\n\n\t/**\n\t*表示颜色样本列表面板的背景颜色值。\n\t*/\n\t__getset(0,__proto,'bgColor',function(){\n\t\treturn this._bgColor;\n\t\t},function(value){\n\t\tthis._bgColor=value;\n\t\tthis._setPanelChanged();\n\t});\n\n\t/**\n\t*表示颜色样本列表面板的边框颜色值。\n\t*/\n\t__getset(0,__proto,'borderColor',function(){\n\t\treturn this._borderColor;\n\t\t},function(value){\n\t\tthis._borderColor=value;\n\t\tthis._setPanelChanged();\n\t});\n\n\t/**\n\t*表示颜色样本列表面板选择或输入的颜色值。\n\t*/\n\t__getset(0,__proto,'inputColor',function(){\n\t\treturn this._inputColor;\n\t\t},function(value){\n\t\tthis._inputColor=value;\n\t\tthis._setPanelChanged();\n\t});\n\n\treturn ColorPicker;\n})(Component)\n\n\n/**\n*<code>ComboBox</code> 组件包含一个下拉列表，用户可以从该列表中选择单个值。\n*\n*@example <caption>以下示例代码，创建了一个 <code>ComboBox</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.ComboBox;\n\t*import laya.utils.Handler;\n\t*public class ComboBox_Example\n\t*{\n\t\t*public function ComboBox_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load(\"resource/ui/button.png\",Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*trace(\"资源加载完成！\");\n\t\t\t*var comboBox:ComboBox=new ComboBox(\"resource/ui/button.png\",\"item0,item1,item2,item3,item4,item5\");//创建一个 ComboBox 类的实例对象 comboBox ,传入它的皮肤和标签集。\n\t\t\t*comboBox.x=100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n\t\t\t*comboBox.y=100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n\t\t\t*comboBox.selectHandler=new Handler(this,onSelect);//设置 comboBox 选择项改变时执行的处理器。\n\t\t\t*Laya.stage.addChild(comboBox);//将此 comboBox 对象添加到显示列表。\n\t\t\t*}\n\t\t*private function onSelect(index:int):void\n\t\t*{\n\t\t\t*trace(\"当前选中的项对象索引： \",index);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高。\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n*Laya.loader.load(\"resource/ui/button.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n*function loadComplete(){\n\t*console.log(\"资源加载完成！\");\n\t*var comboBox=new laya.ui.ComboBox(\"resource/ui/button.png\",\"item0,item1,item2,item3,item4,item5\");//创建一个 ComboBox 类的实例对象 comboBox ,传入它的皮肤和标签集。\n\t*comboBox.x=100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n\t*comboBox.y=100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n\t*comboBox.selectHandler=new laya.utils.Handler(this,onSelect);//设置 comboBox 选择项改变时执行的处理器。\n\t*Laya.stage.addChild(comboBox);//将此 comboBox 对象添加到显示列表。\n\t*}\n*function onSelect(index)\n*{\n\t*console.log(\"当前选中的项对象索引： \",index);\n\t*}\n*@example\n*import ComboBox=laya.ui.ComboBox;\n*import Handler=laya.utils.Handler;\n*class ComboBox_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load(\"resource/ui/button.png\",Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*console.log(\"资源加载完成！\");\n\t\t*var comboBox:ComboBox=new ComboBox(\"resource/ui/button.png\",\"item0,item1,item2,item3,item4,item5\");//创建一个 ComboBox 类的实例对象 comboBox ,传入它的皮肤和标签集。\n\t\t*comboBox.x=100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n\t\t*comboBox.y=100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n\t\t*comboBox.selectHandler=new Handler(this,this.onSelect);//设置 comboBox 选择项改变时执行的处理器。\n\t\t*Laya.stage.addChild(comboBox);//将此 comboBox 对象添加到显示列表。\n\t\t*}\n\t*private onSelect(index:number):void {\n\t\t*console.log(\"当前选中的项对象索引： \",index);\n\t\t*}\n\t*}\n*\n*/\n//class laya.ui.ComboBox extends laya.ui.Component\nvar ComboBox=(function(_super){\n\tfunction ComboBox(skin,labels){\n\t\t/**@private */\n\t\tthis._visibleNum=6;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._button=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._list=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._isOpen=false;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._itemSize=12;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._labels=[];\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._selectedIndex=-1;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._selectHandler=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._itemHeight=NaN;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._listHeight=NaN;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._listChanged=false;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._itemChanged=false;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._scrollBarSkin=null;\n\t\t/**\n\t\t*@private\n\t\t*/\n\t\tthis._isCustomList=false;\n\t\t/**\n\t\t*渲染项，用来显示下拉列表展示对象\n\t\t*/\n\t\tthis.itemRender=null;\n\t\tComboBox.__super.call(this);\n\t\tthis._itemColors=Styles.comboBoxItemColors;\n\t\tthis.skin=skin;\n\t\tthis.labels=labels;\n\t}\n\n\t__class(ComboBox,'laya.ui.ComboBox',_super);\n\tvar __proto=ComboBox.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._button && this._button.destroy(destroyChild);\n\t\tthis._list && this._list.destroy(destroyChild);\n\t\tthis._button=null;\n\t\tthis._list=null;\n\t\tthis._itemColors=null;\n\t\tthis._labels=null;\n\t\tthis._selectHandler=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._button=new Button());\n\t\tthis._button.text.align=\"left\";\n\t\tthis._button.labelPadding=\"0,0,0,5\";\n\t\tthis._button.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onButtonMouseDown);\n\t}\n\n\t__proto._createList=function(){\n\t\tthis._list=new List();\n\t\tif (this._scrollBarSkin)this._list.vScrollBarSkin=this._scrollBarSkin;\n\t\tthis._setListEvent(this._list);\n\t}\n\n\t__proto._setListEvent=function(list){\n\t\tthis._list.selectEnable=true;\n\t\tthis._list.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onListDown);\n\t\tthis._list.mouseHandler=Handler.create(this,this.onlistItemMouse,null,false);\n\t\tif (this._list.scrollBar)this._list.scrollBar.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onScrollBarDown);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onListDown=function(e){\n\t\te.stopPropagation();\n\t}\n\n\t__proto.onScrollBarDown=function(e){\n\t\te.stopPropagation();\n\t}\n\n\t__proto.onButtonMouseDown=function(e){\n\t\tthis.callLater(this.switchTo,[!this._isOpen]);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.changeList=function(){\n\t\tthis._listChanged=false;\n\t\tvar labelWidth=this.width-2;\n\t\tvar labelColor=this._itemColors[2];\n\t\tthis._itemHeight=this._itemSize+6;\n\t\tthis._list.itemRender=this.itemRender || {type:\"Box\",child:[{type:\"Label\",props:{name:\"label\",x:1,padding:\"3,3,3,3\",width:labelWidth,height:this._itemHeight,fontSize:this._itemSize,color:labelColor}}]};\n\t\tthis._list.repeatY=this._visibleNum;\n\t\tthis._list.refresh();\n\t}\n\n\t/**\n\t*@private\n\t*下拉列表的鼠标事件响应函数。\n\t*/\n\t__proto.onlistItemMouse=function(e,index){\n\t\tvar type=e.type;\n\t\tif (type===/*laya.events.Event.MOUSE_OVER*/\"mouseover\" || type===/*laya.events.Event.MOUSE_OUT*/\"mouseout\"){\n\t\t\tif (this._isCustomList)return;\n\t\t\tvar box=this._list.getCell(index);\n\t\t\tif (!box)return;\n\t\t\tvar label=box.getChildByName(\"label\");\n\t\t\tif (label){\n\t\t\t\tif (type===/*laya.events.Event.ROLL_OVER*/\"mouseover\"){\n\t\t\t\t\tlabel.bgColor=this._itemColors[0];\n\t\t\t\t\tlabel.color=this._itemColors[1];\n\t\t\t\t\t}else {\n\t\t\t\t\tlabel.bgColor=null;\n\t\t\t\t\tlabel.color=this._itemColors[2];\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else if (type===/*laya.events.Event.CLICK*/\"click\"){\n\t\t\tthis.selectedIndex=index;\n\t\t\tthis.isOpen=false;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.switchTo=function(value){\n\t\tthis.isOpen=value;\n\t}\n\n\t/**\n\t*更改下拉列表的打开状态。\n\t*/\n\t__proto.changeOpen=function(){\n\t\tthis.isOpen=!this._isOpen;\n\t}\n\n\t/**\n\t*更改下拉列表。\n\t*/\n\t__proto.changeItem=function(){\n\t\tthis._itemChanged=false;\n\t\tthis._listHeight=this._labels.length > 0 ? Math.min(this._visibleNum,this._labels.length)*this._itemHeight :this._itemHeight;\n\t\tif (!this._isCustomList){\n\t\t\tvar g=this._list.graphics;\n\t\t\tg.clear();\n\t\t\tg.drawRect(0,0,this.width-1,this._listHeight,this._itemColors[4],this._itemColors[3]);\n\t\t};\n\t\tvar a=this._list.array || [];\n\t\ta.length=0;\n\t\tfor (var i=0,n=this._labels.length;i < n;i++){\n\t\t\ta.push({label:this._labels[i]});\n\t\t}\n\t\tthis._list.height=this._listHeight;\n\t\tthis._list.array=a;\n\t}\n\n\t__proto.changeSelected=function(){\n\t\tthis._button.label=this.selectedLabel;\n\t}\n\n\t__proto._onStageMouseWheel=function(e){\n\t\tif(!this._list||this._list.contains(e.target))return;\n\t\tthis.removeList(null);\n\t}\n\n\t/**\n\t*关闭下拉列表。\n\t*/\n\t__proto.removeList=function(e){\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.removeList);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_WHEEL*/\"mousewheel\",this,this._onStageMouseWheel);\n\t\tthis.isOpen=false;\n\t}\n\n\t/**\n\t*表示选择的下拉列表项的索引。\n\t*/\n\t__getset(0,__proto,'selectedIndex',function(){\n\t\treturn this._selectedIndex;\n\t\t},function(value){\n\t\tif (this._selectedIndex !=value){\n\t\t\tthis._selectedIndex=value;\n\t\t\tif (this._labels.length > 0)this.changeSelected();\n\t\t\telse this.callLater(this.changeSelected);\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\",[Event.EMPTY.setTo(/*laya.events.Event.CHANGE*/\"change\",this,this)]);\n\t\t\tthis._selectHandler && this._selectHandler.runWith(this._selectedIndex);\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureHeight',function(){\n\t\treturn this._button.height;\n\t});\n\n\t/**\n\t*@copy laya.ui.Button#skin\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._button.skin;\n\t\t},function(value){\n\t\tif (this._button.skin !=value){\n\t\t\tthis._button.skin=value;\n\t\t\tthis._listChanged=true;\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureWidth',function(){\n\t\treturn this._button.width;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Component,this,'width',value);\n\t\tthis._button.width=this._width;\n\t\tthis._itemChanged=true;\n\t\tthis._listChanged=true;\n\t});\n\n\t/**\n\t*表示选择的下拉列表项的的标签。\n\t*/\n\t__getset(0,__proto,'selectedLabel',function(){\n\t\treturn this._selectedIndex >-1 && this._selectedIndex < this._labels.length ? this._labels[this._selectedIndex] :null;\n\t\t},function(value){\n\t\tthis.selectedIndex=this._labels.indexOf(value);\n\t});\n\n\t/**\n\t*标签集合字符串。\n\t*/\n\t__getset(0,__proto,'labels',function(){\n\t\treturn this._labels.join(\",\");\n\t\t},function(value){\n\t\tif (this._labels.length > 0)this.selectedIndex=-1;\n\t\tif (value)this._labels=value.split(\",\");\n\t\telse this._labels.length=0;\n\t\tthis._itemChanged=true;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Component,this,'height',value);\n\t\tthis._button.height=this._height;\n\t});\n\n\t/**\n\t*改变下拉列表的选择项时执行的处理器(默认返回参数index:int)。\n\t*/\n\t__getset(0,__proto,'selectHandler',function(){\n\t\treturn this._selectHandler;\n\t\t},function(value){\n\t\tthis._selectHandler=value;\n\t});\n\n\t/**\n\t*获取或设置没有滚动条的下拉列表中可显示的最大行数。\n\t*/\n\t__getset(0,__proto,'visibleNum',function(){\n\t\treturn this._visibleNum;\n\t\t},function(value){\n\t\tthis._visibleNum=value;\n\t\tthis._listChanged=true;\n\t});\n\n\t/**\n\t*表示按钮文本标签是否为粗体字。\n\t*@see laya.display.Text#bold\n\t*/\n\t__getset(0,__proto,'labelBold',function(){\n\t\treturn this._button.text.bold;\n\t\t},function(value){\n\t\tthis._button.text.bold=value\n\t});\n\n\t/**\n\t*下拉列表项颜色。\n\t*<p><b>格式：</b>\"悬停或被选中时背景颜色,悬停或被选中时标签颜色,标签颜色,边框颜色,背景颜色\"</p>\n\t*/\n\t__getset(0,__proto,'itemColors',function(){\n\t\treturn String(this._itemColors)\n\t\t},function(value){\n\t\tthis._itemColors=UIUtils.fillArray(this._itemColors,value,String);\n\t\tthis._listChanged=true;\n\t});\n\n\t/**\n\t*下拉列表项标签的字体大小。\n\t*/\n\t__getset(0,__proto,'itemSize',function(){\n\t\treturn this._itemSize;\n\t\t},function(value){\n\t\tthis._itemSize=value;\n\t\tthis._listChanged=true;\n\t});\n\n\t/**\n\t*获取对 <code>ComboBox</code> 组件所包含的 <code>VScrollBar</code> 滚动条组件的引用。\n\t*/\n\t__getset(0,__proto,'scrollBar',function(){\n\t\treturn this.list.scrollBar;\n\t});\n\n\t/**\n\t*表示下拉列表的打开状态。\n\t*/\n\t__getset(0,__proto,'isOpen',function(){\n\t\treturn this._isOpen;\n\t\t},function(value){\n\t\tif (this._isOpen !=value){\n\t\t\tthis._isOpen=value;\n\t\t\tthis._button.selected=this._isOpen;\n\t\t\tif (this._isOpen){\n\t\t\t\tthis._list || this._createList();\n\t\t\t\tthis._listChanged && !this._isCustomList && this.changeList();\n\t\t\t\tthis._itemChanged && this.changeItem();\n\t\t\t\tvar p=this.localToGlobal(Point.TEMP.setTo(0,0));\n\t\t\t\tvar py=p.y+this._button.height;\n\t\t\t\tpy=py+this._listHeight <=Laya.stage.height ? py :p.y-this._listHeight;\n\t\t\t\tthis._list.pos(p.x,py);\n\t\t\t\tthis._list.zOrder=1001;\n\t\t\t\tLaya._currentStage.addChild(this._list);\n\t\t\t\tLaya.stage.once(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.removeList);\n\t\t\t\tLaya.stage.on(/*laya.events.Event.MOUSE_WHEEL*/\"mousewheel\",this,this._onStageMouseWheel);\n\t\t\t\tthis._list.selectedIndex=this._selectedIndex;\n\t\t\t\t}else {\n\t\t\t\tthis._list && this._list.removeSelf();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*滚动条皮肤。\n\t*/\n\t__getset(0,__proto,'scrollBarSkin',function(){\n\t\treturn this._scrollBarSkin;\n\t\t},function(value){\n\t\tthis._scrollBarSkin=value;\n\t});\n\n\t/**\n\t*<p>当前实例的位图 <code>AutoImage</code> 实例的有效缩放网格数据。</p>\n\t*<p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n\t*<ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n\t*@see laya.ui.AutoBitmap.sizeGrid\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\treturn this._button.sizeGrid;\n\t\t},function(value){\n\t\tthis._button.sizeGrid=value;\n\t});\n\n\t/**\n\t*获取对 <code>ComboBox</code> 组件所包含的 <code>Button</code> 组件的引用。\n\t*/\n\t__getset(0,__proto,'button',function(){\n\t\treturn this._button;\n\t});\n\n\t/**\n\t*获取对 <code>ComboBox</code> 组件所包含的 <code>List</code> 列表组件的引用。\n\t*/\n\t__getset(0,__proto,'list',function(){\n\t\tthis._list || this._createList();\n\t\treturn this._list;\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvalue.removeSelf();\n\t\t\tthis._isCustomList=true;\n\t\t\tthis._list=value;\n\t\t\tthis._setListEvent(value);\n\t\t\tthis._itemHeight=value.getCell(0).height+value.spaceY;\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif (((typeof value=='number')&& Math.floor(value)==value)|| (typeof value=='string'))this.selectedIndex=parseInt(value);\n\t\telse if ((value instanceof Array))this.labels=(value).join(\",\");\n\t\telse Laya.superSet(Component,this,'dataSource',value);\n\t});\n\n\t/**\n\t*获取或设置对 <code>ComboBox</code> 组件所包含的 <code>Button</code> 组件的文本标签颜色。\n\t*<p><b>格式：</b>upColor,overColor,downColor,disableColor</p>\n\t*/\n\t__getset(0,__proto,'labelColors',function(){\n\t\treturn this._button.labelColors;\n\t\t},function(value){\n\t\tif (this._button.labelColors !=value){\n\t\t\tthis._button.labelColors=value;\n\t\t}\n\t});\n\n\t/**\n\t*获取或设置对 <code>ComboBox</code> 组件所包含的 <code>Button</code> 组件的文本边距。\n\t*<p><b>格式：</b>上边距,右边距,下边距,左边距</p>\n\t*/\n\t__getset(0,__proto,'labelPadding',function(){\n\t\treturn this._button.text.padding.join(\",\");\n\t\t},function(value){\n\t\tthis._button.text.padding=UIUtils.fillArray(Styles.labelPadding,value,Number);\n\t});\n\n\t/**\n\t*获取或设置对 <code>ComboBox</code> 组件所包含的 <code>Button</code> 组件的标签字体大小。\n\t*/\n\t__getset(0,__proto,'labelSize',function(){\n\t\treturn this._button.text.fontSize;\n\t\t},function(value){\n\t\tthis._button.text.fontSize=value\n\t});\n\n\t/**\n\t*表示按钮文本标签的字体名称，以字符串形式表示。\n\t*@see laya.display.Text#font\n\t*/\n\t__getset(0,__proto,'labelFont',function(){\n\t\treturn this._button.text.font;\n\t\t},function(value){\n\t\tthis._button.text.font=value\n\t});\n\n\t/**\n\t*表示按钮的状态值。\n\t*@see laya.ui.Button#stateNum\n\t*/\n\t__getset(0,__proto,'stateNum',function(){\n\t\treturn this._button.stateNum;\n\t\t},function(value){\n\t\tthis._button.stateNum=value\n\t});\n\n\treturn ComboBox;\n})(Component)\n\n\n/**\n*<code>ScrollBar</code> 组件是一个滚动条组件。\n*<p>当数据太多以至于显示区域无法容纳时，最终用户可以使用 <code>ScrollBar</code> 组件控制所显示的数据部分。</p>\n*<p> 滚动条由四部分组成：两个箭头按钮、一个轨道和一个滑块。 </p> *\n*\n*@see laya.ui.VScrollBar\n*@see laya.ui.HScrollBar\n*/\n//class laya.ui.ScrollBar extends laya.ui.Component\nvar ScrollBar=(function(_super){\n\tfunction ScrollBar(skin){\n\t\t/**滚动衰减系数*/\n\t\tthis.rollRatio=0.95;\n\t\t/**滚动变化时回调，回传value参数。*/\n\t\tthis.changeHandler=null;\n\t\t/**是否缩放滑动条，默认值为true。 */\n\t\tthis.scaleBar=true;\n\t\t/**一个布尔值，指定是否自动隐藏滚动条(无需滚动时)，默认值为false。*/\n\t\tthis.autoHide=false;\n\t\t/**橡皮筋效果极限距离，0为没有橡皮筋效果。*/\n\t\tthis.elasticDistance=0;\n\t\t/**橡皮筋回弹时间，单位为毫秒。*/\n\t\tthis.elasticBackTime=500;\n\t\t/**上按钮 */\n\t\tthis.upButton=null;\n\t\t/**下按钮 */\n\t\tthis.downButton=null;\n\t\t/**滑条 */\n\t\tthis.slider=null;\n\t\t/**@private */\n\t\tthis._scrollSize=1;\n\t\t/**@private */\n\t\tthis._skin=null;\n\t\t/**@private */\n\t\tthis._thumbPercent=1;\n\t\t/**@private */\n\t\tthis._target=null;\n\t\t/**@private */\n\t\tthis._lastPoint=null;\n\t\t/**@private */\n\t\tthis._lastOffset=0;\n\t\t/**@private */\n\t\tthis._checkElastic=false;\n\t\t/**@private */\n\t\tthis._isElastic=false;\n\t\t/**@private */\n\t\tthis._value=NaN;\n\t\t/**@private */\n\t\tthis._hide=false;\n\t\t/**@private */\n\t\tthis._clickOnly=true;\n\t\t/**@private */\n\t\tthis._offsets=null;\n\t\tScrollBar.__super.call(this);\n\t\tthis._showButtons=UIConfig.showButtons;\n\t\tthis._touchScrollEnable=UIConfig.touchScrollEnable;\n\t\tthis._mouseWheelEnable=UIConfig.mouseWheelEnable;\n\t\tthis.skin=skin;\n\t\tthis.max=1;\n\t}\n\n\t__class(ScrollBar,'laya.ui.ScrollBar',_super);\n\tvar __proto=ScrollBar.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tthis.stopScroll();\n\t\tthis.target=null;\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis.upButton && this.upButton.destroy(destroyChild);\n\t\tthis.downButton && this.downButton.destroy(destroyChild);\n\t\tthis.slider && this.slider.destroy(destroyChild);\n\t\tthis.upButton=this.downButton=null;\n\t\tthis.slider=null;\n\t\tthis.changeHandler=null;\n\t\tthis._offsets=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this.slider=new Slider());\n\t\tthis.addChild(this.upButton=new Button());\n\t\tthis.addChild(this.downButton=new Button());\n\t}\n\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\tthis.slider.showLabel=false;\n\t\tthis.slider.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onSliderChange);\n\t\tthis.slider.setSlider(0,0,0);\n\t\tthis.upButton.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onButtonMouseDown);\n\t\tthis.downButton.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onButtonMouseDown);\n\t}\n\n\t/**\n\t*@private\n\t*滑块位置发生改变的处理函数。\n\t*/\n\t__proto.onSliderChange=function(){\n\t\tif(this._value !=this.slider.value)this.value=this.slider.value;\n\t}\n\n\t/**\n\t*@private\n\t*向上和向下按钮的 <code>Event.MOUSE_DOWN</code> 事件侦听处理函数。\n\t*/\n\t__proto.onButtonMouseDown=function(e){\n\t\tvar isUp=e.currentTarget===this.upButton;\n\t\tthis.slide(isUp);\n\t\tLaya.timer.once(Styles.scrollBarDelayTime,this,this.startLoop,[isUp]);\n\t\tLaya.stage.once(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onStageMouseUp);\n\t}\n\n\t/**@private */\n\t__proto.startLoop=function(isUp){\n\t\tLaya.timer.frameLoop(1,this,this.slide,[isUp]);\n\t}\n\n\t/**@private */\n\t__proto.slide=function(isUp){\n\t\tif (isUp)this.value-=this._scrollSize;\n\t\telse this.value+=this._scrollSize;\n\t}\n\n\t/**\n\t*@private\n\t*舞台的 <code>Event.MOUSE_DOWN</code> 事件侦听处理函数。\n\t*/\n\t__proto.onStageMouseUp=function(e){\n\t\tLaya.timer.clear(this,this.startLoop);\n\t\tLaya.timer.clear(this,this.slide);\n\t}\n\n\t/**\n\t*@private\n\t*更改对象的皮肤及位置。\n\t*/\n\t__proto.changeScrollBar=function(){\n\t\tthis.upButton.visible=this._showButtons;\n\t\tthis.downButton.visible=this._showButtons;\n\t\tif (this._showButtons){\n\t\t\tthis.upButton.skin=this._skin.replace(\".png\",\"$up.png\");\n\t\t\tthis.downButton.skin=this._skin.replace(\".png\",\"$down.png\");\n\t\t}\n\t\tif (this.slider.isVertical)this.slider.y=this._showButtons ? this.upButton.height :0;\n\t\telse this.slider.x=this._showButtons ? this.upButton.width :0;\n\t\tthis.resetPositions();\n\t\tthis.repaint();\n\t}\n\n\t/**@inheritDoc */\n\t__proto.changeSize=function(){\n\t\t_super.prototype.changeSize.call(this);\n\t\tthis.repaint();\n\t\tthis.resetPositions();\n\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\tthis.changeHandler && this.changeHandler.runWith(this.value);\n\t}\n\n\t/**@private */\n\t__proto.resetPositions=function(){\n\t\tif (this.slider.isVertical)this.slider.height=this.height-(this._showButtons ? (this.upButton.height+this.downButton.height):0);\n\t\telse this.slider.width=this.width-(this._showButtons ? (this.upButton.width+this.downButton.width):0);\n\t\tthis.resetButtonPosition();\n\t}\n\n\t/**@private */\n\t__proto.resetButtonPosition=function(){\n\t\tif (this.slider.isVertical)this.downButton.y=this.slider.y+this.slider.height;\n\t\telse this.downButton.x=this.slider.x+this.slider.width;\n\t}\n\n\t/**\n\t*设置滚动条信息。\n\t*@param min 滚动条最小位置值。\n\t*@param max 滚动条最大位置值。\n\t*@param value 滚动条当前位置值。\n\t*/\n\t__proto.setScroll=function(min,max,value){\n\t\tthis.runCallLater(this.changeSize);\n\t\tthis.slider.setSlider(min,max,value);\n\t\tthis.slider.bar.visible=max > 0;\n\t\tif (!this._hide && this.autoHide)this.visible=false;\n\t}\n\n\t/**@private */\n\t__proto.onTargetMouseWheel=function(e){\n\t\tthis.value-=e.delta *this._scrollSize;\n\t\tthis.target=this._target;\n\t}\n\n\t/**@private */\n\t__proto.onTargetMouseDown=function(e){\n\t\tthis._clickOnly=true;\n\t\tthis._lastOffset=0;\n\t\tthis._checkElastic=false;\n\t\tthis._lastPoint || (this._lastPoint=new Point());\n\t\tthis._lastPoint.setTo(Laya.stage.mouseX,Laya.stage.mouseY);\n\t\tLaya.timer.clear(this,this.tweenMove);\n\t\tTween.clearTween(this);\n\t\tLaya.stage.once(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onStageMouseUp2);\n\t\tLaya.stage.once(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onStageMouseUp2);\n\t\tLaya.timer.frameLoop(1,this,this.loop);\n\t}\n\n\t/**@private */\n\t__proto.loop=function(){\n\t\tvar mouseY=Laya.stage.mouseY;\n\t\tvar mouseX=Laya.stage.mouseX;\n\t\tthis._lastOffset=this.isVertical ? (mouseY-this._lastPoint.y):(mouseX-this._lastPoint.x);\n\t\tif (this._clickOnly){\n\t\t\tif (Math.abs(this._lastOffset *(this.isVertical ? Laya.stage._canvasTransform.getScaleY():Laya.stage._canvasTransform.getScaleX()))> 1){\n\t\t\t\tthis._clickOnly=false;\n\t\t\t\tthis._offsets || (this._offsets=[]);\n\t\t\t\tthis._offsets.length=0;\n\t\t\t\tthis._target.mouseEnabled=false;\n\t\t\t\tif (!this.hide && this.autoHide){\n\t\t\t\t\tthis.alpha=1;\n\t\t\t\t\tthis.visible=true;\n\t\t\t\t}\n\t\t\t\tthis.event(/*laya.events.Event.START*/\"start\");\n\t\t\t}else return;\n\t\t}\n\t\tthis._offsets.push(this._lastOffset);\n\t\tthis._lastPoint.x=mouseX;\n\t\tthis._lastPoint.y=mouseY;\n\t\tif (this._lastOffset===0)return;\n\t\tif (!this._checkElastic){\n\t\t\tif (this.elasticDistance > 0){\n\t\t\t\tif (!this._checkElastic && this._lastOffset !=0){\n\t\t\t\t\tif ((this._lastOffset > 0 && this._value <=this.min)|| (this._lastOffset < 0 && this._value >=this.max)){\n\t\t\t\t\t\tthis._isElastic=true;\n\t\t\t\t\t\tthis._checkElastic=true;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tthis._isElastic=false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tthis._checkElastic=true;\n\t\t\t}\n\t\t}\n\t\tif (this._isElastic){\n\t\t\tif (this._value <=this.min){\n\t\t\t\tthis.value-=this._lastOffset *Math.max(0,(1-((this.min-this._value)/ this.elasticDistance)));\n\t\t\t\t}else if (this._value >=this.max){\n\t\t\t\tthis.value-=this._lastOffset *Math.max(0,(1-((this._value-this.max)/ this.elasticDistance)));\n\t\t\t}\n\t\t\t}else {\n\t\t\tthis.value-=this._lastOffset;\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto.onStageMouseUp2=function(e){\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onStageMouseUp2);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onStageMouseUp2);\n\t\tLaya.timer.clear(this,this.loop);\n\t\tif (this._clickOnly){\n\t\t\tif(this._value>=this.min&&this._value<=this.max)\n\t\t\t\treturn;\n\t\t}\n\t\tthis._target.mouseEnabled=true;\n\t\tif (this._isElastic){\n\t\t\tif (this._value < this.min){\n\t\t\t\tTween.to(this,{value:this.min},this.elasticBackTime,Ease.sineOut,Handler.create(this,this.elasticOver));\n\t\t\t\t}else if (this._value > this.max){\n\t\t\t\tTween.to(this,{value:this.max},this.elasticBackTime,Ease.sineOut,Handler.create(this,this.elasticOver));\n\t\t\t}\n\t\t\t}else {\n\t\t\tif (!this._offsets)return;\n\t\t\tif (this._offsets.length < 1){\n\t\t\t\tthis._offsets[0]=this.isVertical ? Laya.stage.mouseY-this._lastPoint.y :Laya.stage.mouseX-this._lastPoint.x;\n\t\t\t};\n\t\t\tvar offset=0;\n\t\t\tvar n=Math.min(this._offsets.length,3);\n\t\t\tfor (var i=0;i < n;i++){\n\t\t\t\toffset+=this._offsets[this._offsets.length-1-i];\n\t\t\t}\n\t\t\tthis._lastOffset=offset / n;\n\t\t\toffset=Math.abs(this._lastOffset);\n\t\t\tif (offset < 2){\n\t\t\t\tthis.event(/*laya.events.Event.END*/\"end\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (offset > 60)this._lastOffset=this._lastOffset > 0 ? 60 :-60;\n\t\t\tvar dis=Math.round(Math.abs(this.elasticDistance *(this._lastOffset / 240)));\n\t\t\tLaya.timer.frameLoop(1,this,this.tweenMove,[dis]);\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto.elasticOver=function(){\n\t\tthis._isElastic=false;\n\t\tif (!this.hide && this.autoHide){\n\t\t\tTween.to(this,{alpha:0},500);\n\t\t}\n\t\tthis.event(/*laya.events.Event.END*/\"end\");\n\t}\n\n\t/**@private */\n\t__proto.tweenMove=function(maxDistance){\n\t\tthis._lastOffset *=this.rollRatio;\n\t\tvar tarSpeed=NaN;\n\t\tif (maxDistance > 0){\n\t\t\tif (this._lastOffset > 0 && this.value <=this.min){\n\t\t\t\tthis._isElastic=true;\n\t\t\t\ttarSpeed=-(this.min-maxDistance-this.value)*0.5;\n\t\t\t\tif (this._lastOffset > tarSpeed)this._lastOffset=tarSpeed;\n\t\t\t\t}else if (this._lastOffset < 0 && this.value >=this.max){\n\t\t\t\tthis._isElastic=true;\n\t\t\t\ttarSpeed=-(this.max+maxDistance-this.value)*0.5;\n\t\t\t\tif (this._lastOffset < tarSpeed)this._lastOffset=tarSpeed;\n\t\t\t}\n\t\t}\n\t\tthis.value-=this._lastOffset;\n\t\tif (Math.abs(this._lastOffset)< 1){\n\t\t\tLaya.timer.clear(this,this.tweenMove);\n\t\t\tif (this._isElastic){\n\t\t\t\tif (this._value < this.min){\n\t\t\t\t\tTween.to(this,{value:this.min},this.elasticBackTime,Ease.sineOut,Handler.create(this,this.elasticOver));\n\t\t\t\t\t}else if (this._value > this.max){\n\t\t\t\t\tTween.to(this,{value:this.max},this.elasticBackTime,Ease.sineOut,Handler.create(this,this.elasticOver));\n\t\t\t\t\t}else {\n\t\t\t\t\tthis.elasticOver();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.event(/*laya.events.Event.END*/\"end\");\n\t\t\tif (!this.hide && this.autoHide){\n\t\t\t\tTween.to(this,{alpha:0},500);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*停止滑动。\n\t*/\n\t__proto.stopScroll=function(){\n\t\tthis.onStageMouseUp2(null);\n\t\tLaya.timer.clear(this,this.tweenMove);\n\t\tTween.clearTween(this);\n\t}\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureHeight',function(){\n\t\tif (this.slider.isVertical)return 100;\n\t\treturn this.slider.height;\n\t});\n\n\t/**\n\t*@copy laya.ui.Image#skin\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._skin;\n\t\t},function(value){\n\t\tif (this._skin !=value){\n\t\t\tthis._skin=value;\n\t\t\tthis.slider.skin=this._skin;\n\t\t\tthis.callLater(this.changeScrollBar);\n\t\t}\n\t});\n\n\t/**\n\t*获取或设置表示最高滚动位置的数字。\n\t*/\n\t__getset(0,__proto,'max',function(){\n\t\treturn this.slider.max;\n\t\t},function(value){\n\t\tthis.slider.max=value;\n\t});\n\n\t/**一个布尔值，指定是否显示向上、向下按钮，默认值为true。*/\n\t__getset(0,__proto,'showButtons',function(){\n\t\treturn this._showButtons;\n\t\t},function(value){\n\t\tthis._showButtons=value;\n\t\tthis.callLater(this.changeScrollBar);\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureWidth',function(){\n\t\tif (this.slider.isVertical)return this.slider.width;\n\t\treturn 100;\n\t});\n\n\t/**\n\t*获取或设置表示最低滚动位置的数字。\n\t*/\n\t__getset(0,__proto,'min',function(){\n\t\treturn this.slider.min;\n\t\t},function(value){\n\t\tthis.slider.min=value;\n\t});\n\n\t/**\n\t*获取或设置表示当前滚动位置的数字。\n\t*/\n\t__getset(0,__proto,'value',function(){\n\t\treturn this._value;\n\t\t},function(v){\n\t\tif (v!==this._value){\n\t\t\tthis._value=v;\n\t\t\tif (!this._isElastic){\n\t\t\t\tif (this.slider._value !=v){\n\t\t\t\t\tthis.slider._value=v;\n\t\t\t\t\tthis.slider.changeValue();\n\t\t\t\t}\n\t\t\t\tthis._value=this.slider._value;\n\t\t\t}\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t\tthis.changeHandler && this.changeHandler.runWith(this._value);\n\t\t}\n\t});\n\n\t/**\n\t*一个布尔值，指示滚动条是否为垂直滚动。如果值为true，则为垂直滚动，否则为水平滚动。\n\t*<p>默认值为：true。</p>\n\t*/\n\t__getset(0,__proto,'isVertical',function(){\n\t\treturn this.slider.isVertical;\n\t\t},function(value){\n\t\tthis.slider.isVertical=value;\n\t});\n\n\t/**\n\t*<p>当前实例的 <code>Slider</code> 实例的有效缩放网格数据。</p>\n\t*<p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n\t*<ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n\t*@see laya.ui.AutoBitmap.sizeGrid\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\treturn this.slider.sizeGrid;\n\t\t},function(value){\n\t\tthis.slider.sizeGrid=value;\n\t});\n\n\t/**获取或设置一个值，该值表示按下滚动条轨道时页面滚动的增量。 */\n\t__getset(0,__proto,'scrollSize',function(){\n\t\treturn this._scrollSize;\n\t\t},function(value){\n\t\tthis._scrollSize=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif ((typeof value=='number')|| (typeof value=='string'))this.value=Number(value);\n\t\telse Laya.superSet(Component,this,'dataSource',value);\n\t});\n\n\t/**获取或设置一个值，该值表示滑条长度比例，值为：（0-1）。 */\n\t__getset(0,__proto,'thumbPercent',function(){\n\t\treturn this._thumbPercent;\n\t\t},function(value){\n\t\tthis.runCallLater(this.changeScrollBar);\n\t\tthis.runCallLater(this.changeSize);\n\t\tvalue=value >=1 ? 0.99 :value;\n\t\tthis._thumbPercent=value;\n\t\tif (this.scaleBar){\n\t\t\tif (this.slider.isVertical)this.slider.bar.height=Math.max(this.slider.height *value,Styles.scrollBarMinNum);\n\t\t\telse this.slider.bar.width=Math.max(this.slider.width *value,Styles.scrollBarMinNum);\n\t\t}\n\t});\n\n\t/**\n\t*设置滚动对象。\n\t*@see laya.ui.TouchScroll#target\n\t*/\n\t__getset(0,__proto,'target',function(){\n\t\treturn this._target;\n\t\t},function(value){\n\t\tif (this._target){\n\t\t\tthis._target.off(/*laya.events.Event.MOUSE_WHEEL*/\"mousewheel\",this,this.onTargetMouseWheel);\n\t\t\tthis._target.off(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onTargetMouseDown);\n\t\t}\n\t\tthis._target=value;\n\t\tif (value){\n\t\t\tthis._mouseWheelEnable && this._target.on(/*laya.events.Event.MOUSE_WHEEL*/\"mousewheel\",this,this.onTargetMouseWheel);\n\t\t\tthis._touchScrollEnable && this._target.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onTargetMouseDown);\n\t\t}\n\t});\n\n\t/**是否隐藏滚动条，不显示滚动条，但是可以正常滚动，默认为false。*/\n\t__getset(0,__proto,'hide',function(){\n\t\treturn this._hide;\n\t\t},function(value){\n\t\tthis._hide=value;\n\t\tthis.visible=!value;\n\t});\n\n\t/**一个布尔值，指定是否开启触摸，默认值为true。*/\n\t__getset(0,__proto,'touchScrollEnable',function(){\n\t\treturn this._touchScrollEnable;\n\t\t},function(value){\n\t\tthis._touchScrollEnable=value;\n\t\tthis.target=this._target;\n\t});\n\n\t/**一个布尔值，指定是否滑轮滚动，默认值为true。*/\n\t__getset(0,__proto,'mouseWheelEnable',function(){\n\t\treturn this._mouseWheelEnable;\n\t\t},function(value){\n\t\tthis._mouseWheelEnable=value;\n\t\tthis.target=this._target;\n\t});\n\n\t/**\n\t*滚动的刻度值，滑动数值为tick的整数倍。默认值为1。\n\t*/\n\t__getset(0,__proto,'tick',function(){\n\t\treturn this.slider.tick;\n\t\t},function(value){\n\t\tthis.slider.tick=value;\n\t});\n\n\treturn ScrollBar;\n})(Component)\n\n\n/**\n*使用 <code>Slider</code> 控件，用户可以通过在滑块轨道的终点之间移动滑块来选择值。\n*<p>滑块的当前值由滑块端点（对应于滑块的最小值和最大值）之间滑块的相对位置确定。</p>\n*<p>滑块允许最小值和最大值之间特定间隔内的值。滑块还可以使用数据提示显示其当前值。</p>\n*\n*@see laya.ui.HSlider\n*@see laya.ui.VSlider\n*/\n//class laya.ui.Slider extends laya.ui.Component\nvar Slider=(function(_super){\n\tfunction Slider(skin){\n\t\t/**\n\t\t*数据变化处理器。\n\t\t*<p>默认回调参数为滑块位置属性 <code>value</code>属性值：Number 。</p>\n\t\t*/\n\t\tthis.changeHandler=null;\n\t\t/**\n\t\t*一个布尔值，指示是否为垂直滚动。如果值为true，则为垂直方向，否则为水平方向。\n\t\t*<p>默认值为：true。</p>\n\t\t*@default true\n\t\t*/\n\t\tthis.isVertical=true;\n\t\t/**\n\t\t*一个布尔值，指示是否显示标签。\n\t\t*@default true\n\t\t*/\n\t\tthis.showLabel=true;\n\t\t/**@private */\n\t\tthis._allowClickBack=false;\n\t\t/**@private */\n\t\tthis._max=100;\n\t\t/**@private */\n\t\tthis._min=0;\n\t\t/**@private */\n\t\tthis._tick=1;\n\t\t/**@private */\n\t\tthis._value=0;\n\t\t/**@private */\n\t\tthis._skin=null;\n\t\t/**@private */\n\t\tthis._bg=null;\n\t\t/**@private */\n\t\tthis._progress=null;\n\t\t/**@private */\n\t\tthis._bar=null;\n\t\t/**@private */\n\t\tthis._tx=NaN;\n\t\t/**@private */\n\t\tthis._ty=NaN;\n\t\t/**@private */\n\t\tthis._maxMove=NaN;\n\t\t/**@private */\n\t\tthis._globalSacle=null;\n\t\tSlider.__super.call(this);\n\t\tthis.skin=skin;\n\t}\n\n\t__class(Slider,'laya.ui.Slider',_super);\n\tvar __proto=Slider.prototype;\n\t/**\n\t*@inheritDoc\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._bg && this._bg.destroy(destroyChild);\n\t\tthis._bar && this._bar.destroy(destroyChild);\n\t\tthis._progress && this._progress.destroy(destroyChild);\n\t\tthis._bg=null;\n\t\tthis._bar=null;\n\t\tthis._progress=null;\n\t\tthis.changeHandler=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._bg=new Image());\n\t\tthis.addChild(this._bar=new Button());\n\t}\n\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\tthis._bar.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onBarMouseDown);\n\t\tthis._bg.sizeGrid=this._bar.sizeGrid=\"4,4,4,4,0\";\n\t\tif (this._progress)this._progress.sizeGrid=this._bar.sizeGrid;\n\t\tthis.allowClickBack=true;\n\t}\n\n\t/**\n\t*@private\n\t*滑块的的 <code>Event.MOUSE_DOWN</code> 事件侦听处理函数。\n\t*/\n\t__proto.onBarMouseDown=function(e){\n\t\tthis._globalSacle || (this._globalSacle=new Point());\n\t\tthis._globalSacle.setTo(this.globalScaleX || 0.01,this.globalScaleY || 0.01);\n\t\tthis._maxMove=this.isVertical ? (this.height-this._bar.height):(this.width-this._bar.width);\n\t\tthis._tx=Laya.stage.mouseX;\n\t\tthis._ty=Laya.stage.mouseY;\n\t\tLaya.stage.on(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.mouseMove);\n\t\tLaya.stage.once(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.mouseUp);\n\t\tLaya.stage.once(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.mouseUp);\n\t\tthis.showValueText();\n\t}\n\n\t/**\n\t*@private\n\t*显示标签。\n\t*/\n\t__proto.showValueText=function(){\n\t\tif (this.showLabel){\n\t\t\tvar label=laya.ui.Slider.label;\n\t\t\tthis.addChild(label);\n\t\t\tlabel.textField.changeText(this._value+\"\");\n\t\t\tif (this.isVertical){\n\t\t\t\tlabel.x=this._bar.x+20;\n\t\t\t\tlabel.y=(this._bar.height-label.height)*0.5+this._bar.y;\n\t\t\t\t}else {\n\t\t\t\tlabel.y=this._bar.y-20;\n\t\t\t\tlabel.x=(this._bar.width-label.width)*0.5+this._bar.x;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*隐藏标签。\n\t*/\n\t__proto.hideValueText=function(){\n\t\tlaya.ui.Slider.label && laya.ui.Slider.label.removeSelf();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.mouseUp=function(e){\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this.mouseMove);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.mouseUp);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.mouseUp);\n\t\tthis.sendChangeEvent(/*laya.events.Event.CHANGED*/\"changed\");\n\t\tthis.hideValueText();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.mouseMove=function(e){\n\t\tvar oldValue=this._value;\n\t\tif (this.isVertical){\n\t\t\tthis._bar.y+=(Laya.stage.mouseY-this._ty)/ this._globalSacle.y;\n\t\t\tif (this._bar.y > this._maxMove)this._bar.y=this._maxMove;\n\t\t\telse if (this._bar.y < 0)this._bar.y=0;\n\t\t\tthis._value=this._bar.y / this._maxMove *(this._max-this._min)+this._min;\n\t\t\tif(this._progress)this._progress.height=this._bar.y+0.5*this._bar.height;\n\t\t\t}else {\n\t\t\tthis._bar.x+=(Laya.stage.mouseX-this._tx)/ this._globalSacle.x;\n\t\t\tif (this._bar.x > this._maxMove)this._bar.x=this._maxMove;\n\t\t\telse if (this._bar.x < 0)this._bar.x=0;\n\t\t\tthis._value=this._bar.x / this._maxMove *(this._max-this._min)+this._min;\n\t\t\tif(this._progress)this._progress.width=this._bar.x+0.5*this._bar.width;\n\t\t}\n\t\tthis._tx=Laya.stage.mouseX;\n\t\tthis._ty=Laya.stage.mouseY;\n\t\tvar pow=Math.pow(10,(this._tick+\"\").length-1);\n\t\tthis._value=Math.round(Math.round(this._value / this._tick)*this._tick *pow)/ pow;\n\t\tif (this._value !=oldValue){\n\t\t\tthis.sendChangeEvent();\n\t\t}\n\t\tthis.showValueText();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.sendChangeEvent=function(type){\n\t\t(type===void 0)&& (type=/*laya.events.Event.CHANGE*/\"change\");\n\t\tthis.event(type);\n\t\tthis.changeHandler && this.changeHandler.runWith(this._value);\n\t}\n\n\t/**\n\t*@private\n\t*设置滑块的位置信息。\n\t*/\n\t__proto.setBarPoint=function(){\n\t\tif (this.isVertical)this._bar.x=Math.round((this._bg.width-this._bar.width)*0.5);\n\t\telse this._bar.y=Math.round((this._bg.height-this._bar.height)*0.5);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.changeSize=function(){\n\t\t_super.prototype.changeSize.call(this);\n\t\tif (this.isVertical)this._bg.height=this.height;\n\t\telse this._bg.width=this.width;\n\t\tthis.setBarPoint();\n\t\tthis.changeValue();\n\t}\n\n\t/**\n\t*设置滑动条的信息。\n\t*@param min 滑块的最小值。\n\t*@param max 滑块的最小值。\n\t*@param value 滑块的当前值。\n\t*/\n\t__proto.setSlider=function(min,max,value){\n\t\tthis._value=-1;\n\t\tthis._min=min;\n\t\tthis._max=max > min ? max :min;\n\t\tthis.value=value < min ? min :value > max ? max :value;\n\t}\n\n\t/**\n\t*@private\n\t*改变滑块的位置值。\n\t*/\n\t__proto.changeValue=function(){\n\t\tvar pow=Math.pow(10,(this._tick+\"\").length-1);\n\t\tthis._value=Math.round(Math.round(this._value / this._tick)*this._tick *pow)/ pow;\n\t\tthis._value=this._value > this._max ? this._max :this._value < this._min ? this._min :this._value;\n\t\tvar num=this._max-this._min;\n\t\tif (num===0)num=1;\n\t\tif (this.isVertical){\n\t\t\tthis._bar.y=(this._value-this._min)/ num *(this.height-this._bar.height);\n\t\t\tif(this._progress)this._progress.height=this._bar.y+0.5*this._bar.height;\n\t\t}\n\t\telse{\n\t\t\tthis._bar.x=(this._value-this._min)/ num *(this.width-this._bar.width);\n\t\t\tif(this._progress)this._progress.width=this._bar.x+0.5*this._bar.width;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*滑动条的 <code>Event.MOUSE_DOWN</code> 事件侦听处理函数。\n\t*/\n\t__proto.onBgMouseDown=function(e){\n\t\tvar point=this._bg.getMousePoint();\n\t\tif (this.isVertical)this.value=point.y / (this.height-this._bar.height)*(this._max-this._min)+this._min;\n\t\telse this.value=point.x / (this.width-this._bar.width)*(this._max-this._min)+this._min;\n\t}\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureHeight',function(){\n\t\treturn Math.max(this._bg.height,this._bar.height);\n\t});\n\n\t/**\n\t*@copy laya.ui.Image#skin\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._skin;\n\t\t},function(value){\n\t\tif (this._skin !=value){\n\t\t\tthis._skin=value;\n\t\t\tthis._bg.skin=this._skin;\n\t\t\tthis._bar.skin=this._skin.replace(\".png\",\"$bar.png\");\n\t\t\tvar progressSkin=this._skin.replace(\".png\",\"$progress.png\");\n\t\t\tif (Loader.getRes(progressSkin)){\n\t\t\t\tif (!this._progress){\n\t\t\t\t\tthis.addChild(this._progress=new Image());\n\t\t\t\t\tthis._progress.sizeGrid=this._bar.sizeGrid;\n\t\t\t\t\tthis.setChildIndex(this._progress,1);\n\t\t\t\t}\n\t\t\t\tthis._progress.skin=progressSkin;\n\t\t\t}\n\t\t\tthis.setBarPoint();\n\t\t\tthis.callLater(this.changeValue);\n\t\t}\n\t});\n\n\t/**\n\t*一个布尔值，指定是否允许通过点击滑动条改变 <code>Slider</code> 的 <code>value</code> 属性值。\n\t*/\n\t__getset(0,__proto,'allowClickBack',function(){\n\t\treturn this._allowClickBack;\n\t\t},function(value){\n\t\tif (this._allowClickBack !=value){\n\t\t\tthis._allowClickBack=value;\n\t\t\tif (value)this._bg.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onBgMouseDown);\n\t\t\telse this._bg.off(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onBgMouseDown);\n\t\t}\n\t});\n\n\t/**\n\t*获取或设置表示最高位置的数字。 默认值为100。\n\t*/\n\t__getset(0,__proto,'max',function(){\n\t\treturn this._max;\n\t\t},function(value){\n\t\tif (this._max !=value){\n\t\t\tthis._max=value;\n\t\t\tthis.callLater(this.changeValue);\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureWidth',function(){\n\t\treturn Math.max(this._bg.width,this._bar.width);\n\t});\n\n\t/**\n\t*滑动的刻度值，滑动数值为tick的整数倍。默认值为1。\n\t*/\n\t__getset(0,__proto,'tick',function(){\n\t\treturn this._tick;\n\t\t},function(value){\n\t\tif (this._tick !=value){\n\t\t\tthis._tick=value;\n\t\t\tthis.callLater(this.changeValue);\n\t\t}\n\t});\n\n\t/**\n\t*<p>当前实例的背景图（ <code>Image</code> ）和滑块按钮（ <code>Button</code> ）实例的有效缩放网格数据。</p>\n\t*<p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n\t*<ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n\t*@see laya.ui.AutoBitmap.sizeGrid\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\treturn this._bg.sizeGrid;\n\t\t},function(value){\n\t\tthis._bg.sizeGrid=value;\n\t\tthis._bar.sizeGrid=value;\n\t\tif (this._progress)this._progress.sizeGrid=this._bar.sizeGrid;\n\t});\n\n\t/**\n\t*获取或设置表示最低位置的数字。 默认值为0。\n\t*/\n\t__getset(0,__proto,'min',function(){\n\t\treturn this._min;\n\t\t},function(value){\n\t\tif (this._min !=value){\n\t\t\tthis._min=value;\n\t\t\tthis.callLater(this.changeValue);\n\t\t}\n\t});\n\n\t/**\n\t*获取或设置表示当前滑块位置的数字。\n\t*/\n\t__getset(0,__proto,'value',function(){\n\t\treturn this._value;\n\t\t},function(num){\n\t\tif (this._value !=num){\n\t\t\tvar oldValue=this._value;\n\t\t\tthis._value=num;\n\t\t\tthis.changeValue();\n\t\t\tif (this._value !=oldValue){\n\t\t\t\tthis.sendChangeEvent();\n\t\t\t}\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif ((typeof value=='number')|| (typeof value=='string'))this.value=Number(value);\n\t\telse Laya.superSet(Component,this,'dataSource',value);\n\t});\n\n\t/**\n\t*表示滑块按钮的引用。\n\t*/\n\t__getset(0,__proto,'bar',function(){\n\t\treturn this._bar;\n\t});\n\n\t__static(Slider,\n\t['label',function(){return this.label=new Label();}\n\t]);\n\treturn Slider;\n})(Component)\n\n\n/**\n*<p> <code>Label</code> 类用于创建显示对象以显示文本。</p>\n*\n*@example <caption>以下示例代码，创建了一个 <code>Label</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.Label;\n\t*public class Label_Example\n\t*{\n\t\t*public function Label_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*onInit();\n\t\t\t*}\n\t\t*private function onInit():void\n\t\t*{\n\t\t\t*var label:Label=new Label();//创建一个 Label 类的实例对象 label 。\n\t\t\t*label.font=\"Arial\";//设置 label 的字体。\n\t\t\t*label.bold=true;//设置 label 显示为粗体。\n\t\t\t*label.leading=4;//设置 label 的行间距。\n\t\t\t*label.wordWrap=true;//设置 label 自动换行。\n\t\t\t*label.padding=\"10,10,10,10\";//设置 label 的边距。\n\t\t\t*label.color=\"#ff00ff\";//设置 label 的颜色。\n\t\t\t*label.text=\"Hello everyone,我是一个可爱的文本！\";//设置 label 的文本内容。\n\t\t\t*label.x=100;//设置 label 对象的属性 x 的值，用于控制 label 对象的显示位置。\n\t\t\t*label.y=100;//设置 label 对象的属性 y 的值，用于控制 label 对象的显示位置。\n\t\t\t*label.width=300;//设置 label 的宽度。\n\t\t\t*label.height=200;//设置 label 的高度。\n\t\t\t*Laya.stage.addChild(label);//将 label 添加到显示列表。\n\t\t\t*var passwordLabel:Label=new Label(\"请原谅我，我不想被人看到我心里话。\");//创建一个 Label 类的实例对象 passwordLabel 。\n\t\t\t*passwordLabel.asPassword=true;//设置 passwordLabel 的显示反式为密码显示。\n\t\t\t*passwordLabel.x=100;//设置 passwordLabel 对象的属性 x 的值，用于控制 passwordLabel 对象的显示位置。\n\t\t\t*passwordLabel.y=350;//设置 passwordLabel 对象的属性 y 的值，用于控制 passwordLabel 对象的显示位置。\n\t\t\t*passwordLabel.width=300;//设置 passwordLabel 的宽度。\n\t\t\t*passwordLabel.color=\"#000000\";//设置 passwordLabel 的文本颜色。\n\t\t\t*passwordLabel.bgColor=\"#ccffff\";//设置 passwordLabel 的背景颜色。\n\t\t\t*passwordLabel.fontSize=20;//设置 passwordLabel 的文本字体大小。\n\t\t\t*Laya.stage.addChild(passwordLabel);//将 passwordLabel 添加到显示列表。\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*onInit();\n*function onInit(){\n\t*var label=new laya.ui.Label();//创建一个 Label 类的实例对象 label 。\n\t*label.font=\"Arial\";//设置 label 的字体。\n\t*label.bold=true;//设置 label 显示为粗体。\n\t*label.leading=4;//设置 label 的行间距。\n\t*label.wordWrap=true;//设置 label 自动换行。\n\t*label.padding=\"10,10,10,10\";//设置 label 的边距。\n\t*label.color=\"#ff00ff\";//设置 label 的颜色。\n\t*label.text=\"Hello everyone,我是一个可爱的文本！\";//设置 label 的文本内容。\n\t*label.x=100;//设置 label 对象的属性 x 的值，用于控制 label 对象的显示位置。\n\t*label.y=100;//设置 label 对象的属性 y 的值，用于控制 label 对象的显示位置。\n\t*label.width=300;//设置 label 的宽度。\n\t*label.height=200;//设置 label 的高度。\n\t*Laya.stage.addChild(label);//将 label 添加到显示列表。\n\t*var passwordLabel=new laya.ui.Label(\"请原谅我，我不想被人看到我心里话。\");//创建一个 Label 类的实例对象 passwordLabel 。\n\t*passwordLabel.asPassword=true;//设置 passwordLabel 的显示反式为密码显示。\n\t*passwordLabel.x=100;//设置 passwordLabel 对象的属性 x 的值，用于控制 passwordLabel 对象的显示位置。\n\t*passwordLabel.y=350;//设置 passwordLabel 对象的属性 y 的值，用于控制 passwordLabel 对象的显示位置。\n\t*passwordLabel.width=300;//设置 passwordLabel 的宽度。\n\t*passwordLabel.color=\"#000000\";//设置 passwordLabel 的文本颜色。\n\t*passwordLabel.bgColor=\"#ccffff\";//设置 passwordLabel 的背景颜色。\n\t*passwordLabel.fontSize=20;//设置 passwordLabel 的文本字体大小。\n\t*Laya.stage.addChild(passwordLabel);//将 passwordLabel 添加到显示列表。\n\t*}\n*@example\n*import Label=laya.ui.Label;\n*class Label_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*this.onInit();\n\t\t*}\n\t*private onInit():void {\n\t\t*var label:Label=new Label();//创建一个 Label 类的实例对象 label 。\n\t\t*label.font=\"Arial\";//设置 label 的字体。\n\t\t*label.bold=true;//设置 label 显示为粗体。\n\t\t*label.leading=4;//设置 label 的行间距。\n\t\t*label.wordWrap=true;//设置 label 自动换行。\n\t\t*label.padding=\"10,10,10,10\";//设置 label 的边距。\n\t\t*label.color=\"#ff00ff\";//设置 label 的颜色。\n\t\t*label.text=\"Hello everyone,我是一个可爱的文本！\";//设置 label 的文本内容。\n\t\t*label.x=100;//设置 label 对象的属性 x 的值，用于控制 label 对象的显示位置。\n\t\t*label.y=100;//设置 label 对象的属性 y 的值，用于控制 label 对象的显示位置。\n\t\t*label.width=300;//设置 label 的宽度。\n\t\t*label.height=200;//设置 label 的高度。\n\t\t*Laya.stage.addChild(label);//将 label 添加到显示列表。\n\t\t*var passwordLabel:Label=new Label(\"请原谅我，我不想被人看到我心里话。\");//创建一个 Label 类的实例对象 passwordLabel 。\n\t\t*passwordLabel.asPassword=true;//设置 passwordLabel 的显示反式为密码显示。\n\t\t*passwordLabel.x=100;//设置 passwordLabel 对象的属性 x 的值，用于控制 passwordLabel 对象的显示位置。\n\t\t*passwordLabel.y=350;//设置 passwordLabel 对象的属性 y 的值，用于控制 passwordLabel 对象的显示位置。\n\t\t*passwordLabel.width=300;//设置 passwordLabel 的宽度。\n\t\t*passwordLabel.color=\"#000000\";//设置 passwordLabel 的文本颜色。\n\t\t*passwordLabel.bgColor=\"#ccffff\";//设置 passwordLabel 的背景颜色。\n\t\t*passwordLabel.fontSize=20;//设置 passwordLabel 的文本字体大小。\n\t\t*Laya.stage.addChild(passwordLabel);//将 passwordLabel 添加到显示列表。\n\t\t*}\n\t*}\n*@see laya.display.Text\n*/\n//class laya.ui.Label extends laya.ui.Component\nvar Label=(function(_super){\n\tfunction Label(text){\n\t\t/**\n\t\t*@private\n\t\t*文本 <code>Text</code> 实例。\n\t\t*/\n\t\tthis._tf=null;\n\t\tLabel.__super.call(this);\n\t\t(text===void 0)&& (text=\"\");\n\t\tFont.defaultColor=Styles.labelColor;\n\t\tthis.text=text;\n\t}\n\n\t__class(Label,'laya.ui.Label',_super);\n\tvar __proto=Label.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._tf=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._tf=new Text());\n\t}\n\n\t/**@copy laya.display.Text#changeText()\n\t**/\n\t__proto.changeText=function(text){\n\t\tthis._tf.changeText(text);\n\t}\n\n\t/**\n\t*<p>边距信息</p>\n\t*<p>\"上边距，右边距，下边距 , 左边距（边距以像素为单位）\"</p>\n\t*@see laya.display.Text.padding\n\t*/\n\t__getset(0,__proto,'padding',function(){\n\t\treturn this._tf.padding.join(\",\");\n\t\t},function(value){\n\t\tthis._tf.padding=UIUtils.fillArray(Styles.labelPadding,value,Number);\n\t});\n\n\t/**\n\t*@copy laya.display.Text#bold\n\t*/\n\t__getset(0,__proto,'bold',function(){\n\t\treturn this._tf.bold;\n\t\t},function(value){\n\t\tthis._tf.bold=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#align\n\t*/\n\t__getset(0,__proto,'align',function(){\n\t\treturn this._tf.align;\n\t\t},function(value){\n\t\tthis._tf.align=value;\n\t});\n\n\t/**\n\t*当前文本内容字符串。\n\t*@see laya.display.Text.text\n\t*/\n\t__getset(0,__proto,'text',function(){\n\t\treturn this._tf.text;\n\t\t},function(value){\n\t\tif (this._tf.text !=value){\n\t\t\tif(value)\n\t\t\t\tvalue=UIUtils.adptString(value+\"\");\n\t\t\tthis._tf.text=value;\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t\tif (!this._width || !this._height)this.onCompResize();\n\t\t}\n\t});\n\n\t/**\n\t*@copy laya.display.Text#italic\n\t*/\n\t__getset(0,__proto,'italic',function(){\n\t\treturn this._tf.italic;\n\t\t},function(value){\n\t\tthis._tf.italic=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#wordWrap\n\t*/\n\t/**\n\t*@copy laya.display.Text#wordWrap\n\t*/\n\t__getset(0,__proto,'wordWrap',function(){\n\t\treturn this._tf.wordWrap;\n\t\t},function(value){\n\t\tthis._tf.wordWrap=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#font\n\t*/\n\t__getset(0,__proto,'font',function(){\n\t\treturn this._tf.font;\n\t\t},function(value){\n\t\tthis._tf.font=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif ((typeof value=='number')|| (typeof value=='string'))this.text=value+\"\";\n\t\telse Laya.superSet(Component,this,'dataSource',value);\n\t});\n\n\t/**\n\t*@copy laya.display.Text#color\n\t*/\n\t__getset(0,__proto,'color',function(){\n\t\treturn this._tf.color;\n\t\t},function(value){\n\t\tthis._tf.color=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#valign\n\t*/\n\t__getset(0,__proto,'valign',function(){\n\t\treturn this._tf.valign;\n\t\t},function(value){\n\t\tthis._tf.valign=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#leading\n\t*/\n\t__getset(0,__proto,'leading',function(){\n\t\treturn this._tf.leading;\n\t\t},function(value){\n\t\tthis._tf.leading=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#fontSize\n\t*/\n\t__getset(0,__proto,'fontSize',function(){\n\t\treturn this._tf.fontSize;\n\t\t},function(value){\n\t\tthis._tf.fontSize=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#bgColor\n\t*/\n\t__getset(0,__proto,'bgColor',function(){\n\t\treturn this._tf.bgColor\n\t\t},function(value){\n\t\tthis._tf.bgColor=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#borderColor\n\t*/\n\t__getset(0,__proto,'borderColor',function(){\n\t\treturn this._tf.borderColor\n\t\t},function(value){\n\t\tthis._tf.borderColor=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#stroke\n\t*/\n\t__getset(0,__proto,'stroke',function(){\n\t\treturn this._tf.stroke;\n\t\t},function(value){\n\t\tthis._tf.stroke=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#strokeColor\n\t*/\n\t__getset(0,__proto,'strokeColor',function(){\n\t\treturn this._tf.strokeColor;\n\t\t},function(value){\n\t\tthis._tf.strokeColor=value;\n\t});\n\n\t/**\n\t*文本控件实体 <code>Text</code> 实例。\n\t*/\n\t__getset(0,__proto,'textField',function(){\n\t\treturn this._tf;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'measureWidth',function(){\n\t\treturn this._tf.width;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'measureHeight',function(){\n\t\treturn this._tf.height;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'width',function(){\n\t\tif (this._width || this._tf.text)return Laya.superGet(Component,this,'width');\n\t\treturn 0;\n\t\t},function(value){\n\t\tLaya.superSet(Component,this,'width',value);\n\t\tthis._tf.width=value;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'height',function(){\n\t\tif (this._height || this._tf.text)return Laya.superGet(Component,this,'height');\n\t\treturn 0;\n\t\t},function(value){\n\t\tLaya.superSet(Component,this,'height',value);\n\t\tthis._tf.height=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#overflow\n\t*/\n\t/**\n\t*@copy laya.display.Text#overflow\n\t*/\n\t__getset(0,__proto,'overflow',function(){\n\t\treturn this._tf.overflow;\n\t\t},function(value){\n\t\tthis._tf.overflow=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#underline\n\t*/\n\t/**\n\t*@copy laya.display.Text#underline\n\t*/\n\t__getset(0,__proto,'underline',function(){\n\t\treturn this._tf.underline;\n\t\t},function(value){\n\t\tthis._tf.underline=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Text#underlineColor\n\t*/\n\t/**\n\t*@copy laya.display.Text#underlineColor\n\t*/\n\t__getset(0,__proto,'underlineColor',function(){\n\t\treturn this._tf.underlineColor;\n\t\t},function(value){\n\t\tthis._tf.underlineColor=value;\n\t});\n\n\treturn Label;\n})(Component)\n\n\n/**\n*<code>ProgressBar</code> 组件显示内容的加载进度。\n*@example <caption>以下示例代码，创建了一个新的 <code>ProgressBar</code> 实例，设置了它的皮肤、位置、宽高、网格等信息，并添加到舞台上。</caption>\n*package\n*{\n\t*import laya.ui.ProgressBar;\n\t*import laya.utils.Handler;\n\t*public class ProgressBar_Example\n\t*{\n\t\t*private var progressBar:ProgressBar;\n\t\t*public function ProgressBar_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/progress.png\",\"resource/ui/progress$bar.png\"],Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*progressBar=new ProgressBar(\"resource/ui/progress.png\");//创建一个 ProgressBar 类的实例对象 progressBar 。\n\t\t\t*progressBar.x=100;//设置 progressBar 对象的属性 x 的值，用于控制 progressBar 对象的显示位置。\n\t\t\t*progressBar.y=100;//设置 progressBar 对象的属性 y 的值，用于控制 progressBar 对象的显示位置。\n\t\t\t*progressBar.value=0.3;//设置 progressBar 的进度值。\n\t\t\t*progressBar.width=200;//设置 progressBar 的宽度。\n\t\t\t*progressBar.height=50;//设置 progressBar 的高度。\n\t\t\t*progressBar.sizeGrid=\"5,10,5,10\";//设置 progressBar 的网格信息。\n\t\t\t*progressBar.changeHandler=new Handler(this,onChange);//设置 progressBar 的value值改变时执行的处理器。\n\t\t\t*Laya.stage.addChild(progressBar);//将 progressBar 添加到显示列表。\n\t\t\t*Laya.timer.once(3000,this,changeValue);//设定 3000ms（毫秒）后，执行函数changeValue。\n\t\t\t*}\n\t\t*private function changeValue():void\n\t\t*{\n\t\t\t*trace(\"改变进度条的进度值。\");\n\t\t\t*progressBar.value=0.6;\n\t\t\t*}\n\t\t*private function onChange(value:Number):void\n\t\t*{\n\t\t\t*trace(\"进度发生改变： value=\" ,value);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*var res=[\"resource/ui/progress.png\",\"resource/ui/progress$bar.png\"];\n*Laya.loader.load(res,laya.utils.Handler.create(this,onLoadComplete));//加载资源。\n*function onLoadComplete()\n*{\n\t*progressBar=new laya.ui.ProgressBar(\"resource/ui/progress.png\");//创建一个 ProgressBar 类的实例对象 progressBar 。\n\t*progressBar.x=100;//设置 progressBar 对象的属性 x 的值，用于控制 progressBar 对象的显示位置。\n\t*progressBar.y=100;//设置 progressBar 对象的属性 y 的值，用于控制 progressBar 对象的显示位置。\n\t*progressBar.value=0.3;//设置 progressBar 的进度值。\n\t*progressBar.width=200;//设置 progressBar 的宽度。\n\t*progressBar.height=50;//设置 progressBar 的高度。\n\t*progressBar.sizeGrid=\"10,5,10,5\";//设置 progressBar 的网格信息。\n\t*progressBar.changeHandler=new laya.utils.Handler(this,onChange);//设置 progressBar 的value值改变时执行的处理器。\n\t*Laya.stage.addChild(progressBar);//将 progressBar 添加到显示列表。\n\t*Laya.timer.once(3000,this,changeValue);//设定 3000ms（毫秒）后，执行函数changeValue。\n\t*}\n*function changeValue()\n*{\n\t*console.log(\"改变进度条的进度值。\");\n\t*progressBar.value=0.6;\n\t*}\n*function onChange(value)\n*{\n\t*console.log(\"进度发生改变： value=\" ,value);\n\t*}\n*@example\n*import ProgressBar=laya.ui.ProgressBar;\n*import Handler=laya.utils.Handler;\n*class ProgressBar_Example {\n\t*private progressBar:ProgressBar;\n\t*public ProgressBar_Example(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/progress.png\",\"resource/ui/progress$bar.png\"],Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*this.progressBar=new ProgressBar(\"resource/ui/progress.png\");//创建一个 ProgressBar 类的实例对象 progressBar 。\n\t\t*this.progressBar.x=100;//设置 progressBar 对象的属性 x 的值，用于控制 progressBar 对象的显示位置。\n\t\t*this.progressBar.y=100;//设置 progressBar 对象的属性 y 的值，用于控制 progressBar 对象的显示位置。\n\t\t*this.progressBar.value=0.3;//设置 progressBar 的进度值。\n\t\t*this.progressBar.width=200;//设置 progressBar 的宽度。\n\t\t*this.progressBar.height=50;//设置 progressBar 的高度。\n\t\t*this.progressBar.sizeGrid=\"5,10,5,10\";//设置 progressBar 的网格信息。\n\t\t*this.progressBar.changeHandler=new Handler(this,this.onChange);//设置 progressBar 的value值改变时执行的处理器。\n\t\t*Laya.stage.addChild(this.progressBar);//将 progressBar 添加到显示列表。\n\t\t*Laya.timer.once(3000,this,this.changeValue);//设定 3000ms（毫秒）后，执行函数changeValue。\n\t\t*}\n\t*private changeValue():void {\n\t\t*console.log(\"改变进度条的进度值。\");\n\t\t*this.progressBar.value=0.6;\n\t\t*}\n\t*private onChange(value:number):void {\n\t\t*console.log(\"进度发生改变： value=\",value);\n\t\t*}\n\t*}\n*/\n//class laya.ui.ProgressBar extends laya.ui.Component\nvar ProgressBar=(function(_super){\n\tfunction ProgressBar(skin){\n\t\t/**\n\t\t*当 <code>ProgressBar</code> 实例的 <code>value</code> 属性发生变化时的函数处理器。\n\t\t*<p>默认返回参数<code>value</code> 属性（进度值）。</p>\n\t\t*/\n\t\tthis.changeHandler=null;\n\t\t/**@private */\n\t\tthis._bg=null;\n\t\t/**@private */\n\t\tthis._bar=null;\n\t\t/**@private */\n\t\tthis._skin=null;\n\t\t/**@private */\n\t\tthis._value=0.5;\n\t\tProgressBar.__super.call(this);\n\t\tthis.skin=skin;\n\t}\n\n\t__class(ProgressBar,'laya.ui.ProgressBar',_super);\n\tvar __proto=ProgressBar.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._bg && this._bg.destroy(destroyChild);\n\t\tthis._bar && this._bar.destroy(destroyChild);\n\t\tthis._bg=this._bar=null;\n\t\tthis.changeHandler=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._bg=new Image());\n\t\tthis.addChild(this._bar=new Image());\n\t\tthis._bar._bitmap.autoCacheCmd=false;\n\t}\n\n\t/**\n\t*@private\n\t*更改进度值的显示。\n\t*/\n\t__proto.changeValue=function(){\n\t\tif (this.sizeGrid){\n\t\t\tvar grid=this.sizeGrid.split(\",\");\n\t\t\tvar left=Number(grid[3]);\n\t\t\tvar right=Number(grid[1]);\n\t\t\tvar max=this.width-left-right;\n\t\t\tvar sw=max *this._value;\n\t\t\tthis._bar.width=left+right+sw;\n\t\t\tthis._bar.visible=this._bar.width > left+right;\n\t\t\t}else {\n\t\t\tthis._bar.width=this.width *this._value;\n\t\t}\n\t}\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureHeight',function(){\n\t\treturn this._bg.height;\n\t});\n\n\t/**\n\t*@copy laya.ui.Image#skin\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._skin;\n\t\t},function(value){\n\t\tif (this._skin !=value){\n\t\t\tthis._skin=value;\n\t\t\tthis._bg.skin=this._skin;\n\t\t\tthis._bar.skin=this._skin.replace(\".png\",\"$bar.png\");\n\t\t\tthis.callLater(this.changeValue);\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'measureWidth',function(){\n\t\treturn this._bg.width;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Component,this,'height',value);\n\t\tthis._bg.height=this._height;\n\t\tthis._bar.height=this._height;\n\t});\n\n\t/**\n\t*获取进度条对象。\n\t*/\n\t__getset(0,__proto,'bar',function(){\n\t\treturn this._bar;\n\t});\n\n\t/**\n\t*当前的进度量。\n\t*<p><b>取值：</b>介于0和1之间。</p>\n\t*/\n\t__getset(0,__proto,'value',function(){\n\t\treturn this._value;\n\t\t},function(num){\n\t\tif (this._value !=num){\n\t\t\tnum=num > 1 ? 1 :num < 0 ? 0 :num;\n\t\t\tthis._value=num;\n\t\t\tthis.callLater(this.changeValue);\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t\tthis.changeHandler && this.changeHandler.runWith(num);\n\t\t}\n\t});\n\n\t/**\n\t*获取背景条对象。\n\t*/\n\t__getset(0,__proto,'bg',function(){\n\t\treturn this._bg;\n\t});\n\n\t/**\n\t*<p>当前 <code>ProgressBar</code> 实例的进度条背景位图（ <code>Image</code> 实例）的有效缩放网格数据。</p>\n\t*<p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n\t*<ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n\t*@see laya.ui.AutoBitmap.sizeGrid\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\treturn this._bg.sizeGrid;\n\t\t},function(value){\n\t\tthis._bg.sizeGrid=this._bar.sizeGrid=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Component,this,'width',value);\n\t\tthis._bg.width=this._width;\n\t\tthis.callLater(this.changeValue);\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif ((typeof value=='number')|| (typeof value=='string'))this.value=Number(value);\n\t\telse Laya.superSet(Component,this,'dataSource',value);\n\t});\n\n\treturn ProgressBar;\n})(Component)\n\n\n/**鼠标提示管理类*/\n//class laya.ui.TipManager extends laya.ui.Component\nvar TipManager=(function(_super){\n\tfunction TipManager(){\n\t\tthis._tipBox=null;\n\t\tthis._tipText=null;\n\t\tthis._defaultTipHandler=null;\n\t\tTipManager.__super.call(this);\n\t\tthis._tipBox=new Component();\n\t\tthis._tipBox.addChild(this._tipText=new Text());\n\t\tthis._tipText.x=this._tipText.y=5;\n\t\tthis._tipText.color=TipManager.tipTextColor;\n\t\tthis._defaultTipHandler=this._showDefaultTip;\n\t\tLaya.stage.on(/*laya.ui.UIEvent.SHOW_TIP*/\"showtip\",this,this._onStageShowTip);\n\t\tLaya.stage.on(/*laya.ui.UIEvent.HIDE_TIP*/\"hidetip\",this,this._onStageHideTip);\n\t\tthis.zOrder=1100\n\t}\n\n\t__class(TipManager,'laya.ui.TipManager',_super);\n\tvar __proto=TipManager.prototype;\n\t/**\n\t*@private\n\t*/\n\t__proto._onStageHideTip=function(e){\n\t\tLaya.timer.clear(this,this._showTip);\n\t\tthis.closeAll();\n\t\tthis.removeSelf();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onStageShowTip=function(data){\n\t\tLaya.timer.once(TipManager.tipDelay,this,this._showTip,[data],true);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._showTip=function(tip){\n\t\tif ((typeof tip=='string')){\n\t\t\tvar text=String(tip);\n\t\t\tif (Boolean(text)){\n\t\t\t\tthis._defaultTipHandler(text);\n\t\t\t}\n\t\t\t}else if ((tip instanceof laya.utils.Handler )){\n\t\t\t(tip).run();\n\t\t\t}else if ((typeof tip=='function')){\n\t\t\t(tip).apply();\n\t\t}\n\t\tif (true){\n\t\t\tLaya.stage.on(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this._onStageMouseMove);\n\t\t\tLaya.stage.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this._onStageMouseDown);\n\t\t}\n\t\tthis._onStageMouseMove(null);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onStageMouseDown=function(e){\n\t\tthis.closeAll();\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onStageMouseMove=function(e){\n\t\tthis._showToStage(this,TipManager.offsetX,TipManager.offsetY);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._showToStage=function(dis,offX,offY){\n\t\t(offX===void 0)&& (offX=0);\n\t\t(offY===void 0)&& (offY=0);\n\t\tvar rec=dis.getBounds();\n\t\tdis.x=Laya.stage.mouseX+offX;\n\t\tdis.y=Laya.stage.mouseY+offY;\n\t\tif (dis.x+rec.width > Laya.stage.width){\n\t\t\tdis.x-=rec.width+offX;\n\t\t}\n\t\tif (dis.y+rec.height > Laya.stage.height){\n\t\t\tdis.y-=rec.height+offY;\n\t\t}\n\t}\n\n\t/**关闭所有鼠标提示*/\n\t__proto.closeAll=function(){\n\t\tLaya.timer.clear(this,this._showTip);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_MOVE*/\"mousemove\",this,this._onStageMouseMove);\n\t\tLaya.stage.off(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this._onStageMouseDown);\n\t\tthis.removeChildren();\n\t}\n\n\t/**\n\t*显示显示对象类型的tip\n\t*/\n\t__proto.showDislayTip=function(tip){\n\t\tthis.addChild(tip);\n\t\tthis._showToStage(this);\n\t\tLaya._currentStage.addChild(this);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._showDefaultTip=function(text){\n\t\tthis._tipText.text=text;\n\t\tvar g=this._tipBox.graphics;\n\t\tg.clear();\n\t\tg.drawRect(0,0,this._tipText.width+10,this._tipText.height+10,TipManager.tipBackColor);\n\t\tthis.addChild(this._tipBox);\n\t\tthis._showToStage(this);\n\t\tLaya._currentStage.addChild(this);\n\t}\n\n\t/**默认鼠标提示函数*/\n\t__getset(0,__proto,'defaultTipHandler',function(){\n\t\treturn this._defaultTipHandler;\n\t\t},function(value){\n\t\tthis._defaultTipHandler=value;\n\t});\n\n\tTipManager.offsetX=10;\n\tTipManager.offsetY=15;\n\tTipManager.tipTextColor=\"#ffffff\";\n\tTipManager.tipBackColor=\"#111111\";\n\tTipManager.tipDelay=200;\n\treturn TipManager;\n})(Component)\n\n\n/**\n*广告插件\n*@author 小松\n*@date-2018-09-19\n*/\n//class laya.ui.AdvImage extends laya.ui.Image\nvar AdvImage=(function(_super){\n\tfunction AdvImage(skin){\n\t\t/**广告列表数据**/\n\t\tthis.advsListArr=[];\n\t\t/**资源列表请求地址**/\n\t\tthis.resUrl=\"https://unioncdn.layabox.com/config/iconlist.json\";\n\t\t/**广告列表信息**/\n\t\tthis._data=[];\n\t\t/**每6分钟重新请求一次新广告列表**/\n\t\tthis._resquestTime=360000;\n\t\t/**微信跳转appid**/\n\t\tthis._appid=null;\n\t\t/**二维码图片地址**/\n\t\tthis._appCodeImgStr=null;\n\t\t/**播放索引**/\n\t\tthis._playIndex=0;\n\t\t/**轮播间隔时间**/\n\t\tthis._lunboTime=5000;\n\t\tAdvImage.__super.call(this);\n\t\tthis._http=new Browser.window.XMLHttpRequest();\n\t\tthis.skin=skin;\n\t\tthis.init();\n\t\tthis.size(120,120);\n\t}\n\n\t__class(AdvImage,'laya.ui.AdvImage',_super);\n\tvar __proto=AdvImage.prototype;\n\t__proto.init=function(){\n\t\tif(Browser.onMiniGame && this.isSupportJump){\n\t\t\tLaya.timer.loop(this._resquestTime,this,this.onGetAdvsListData);\n\t\t\tthis.onGetAdvsListData();\n\t\t\tthis.initEvent();\n\t\t\t}else{\n\t\t\tthis.visible=false;\n\t\t}\n\t}\n\n\t__proto.initEvent=function(){\n\t\tthis.on(/*laya.events.Event.CLICK*/\"click\",this,this.onAdvsImgClick);\n\t}\n\n\t__proto.onAdvsImgClick=function(){\n\t\tvar currentJumpUrl=this.getCurrentAppidObj();\n\t\tif(currentJumpUrl)\n\t\t\tthis.jumptoGame();\n\t}\n\n\t__proto.revertAdvsData=function(){\n\t\tif(this.advsListArr[this._playIndex]){\n\t\t\tthis.visible=true;\n\t\t\tthis.skin=this.advsListArr[this._playIndex];\n\t\t}\n\t}\n\n\t/**\n\t*跳转游戏\n\t*@param callBack Function 回调参数说明：type 0 跳转成功；1跳转失败；2跳转接口调用成功\n\t*/\n\t__proto.jumptoGame=function(){\n\t\tvar _$this=this;\n\t\tif(!Browser.onMiniGame)\n\t\t\treturn;\n\t\tif(this.isSupportJump){\n\t\t\t/*__JS__ */wx.navigateToMiniProgram({\n\t\t\t\tappId:this._appid,\n\t\t\t\tpath:\"\",\n\t\t\t\textraData:\"\",\n\t\t\t\tenvVersion:\"release\",\n\t\t\t\tsuccess:function success (){\n\t\t\t\t\tconsole.log(\"-------------跳转成功--------------\");\n\t\t\t\t},\n\t\t\t\tfail:function fail (){\n\t\t\t\t\tconsole.log(\"-------------跳转失败--------------\");\n\t\t\t\t},\n\t\t\t\tcomplete:function complete (){\n\t\t\t\t\tconsole.log(\"-------------跳转接口调用成功--------------\");\n\t\t\t\t\t_$this.updateAdvsInfo();\n\t\t\t\t}.bind(this)\n\t\t\t});\n\t\t}\n\t}\n\n\t__proto.updateAdvsInfo=function(){\n\t\tthis.visible=false;\n\t\tthis.onLunbo();\n\t\tLaya.timer.loop(this._lunboTime,this,this.onLunbo);\n\t}\n\n\t__proto.onLunbo=function(){\n\t\tif(this._playIndex >=this.advsListArr.length-1)\n\t\t\tthis._playIndex=0;\n\t\telse\n\t\tthis._playIndex+=1;\n\t\tthis.visible=true;\n\t\tthis.revertAdvsData();\n\t}\n\n\t/**获取轮播数据**/\n\t__proto.getCurrentAppidObj=function(){\n\t\treturn this.advsListArr[this._playIndex];\n\t}\n\n\t/**\n\t*获取广告列表数据信息\n\t*/\n\t__proto.onGetAdvsListData=function(){\n\t\tvar _this=this;\n\t\tvar random=this.randRange(10000,1000000);\n\t\tvar url=this.resUrl+\"?\"+random;\n\t\tthis._http.open(\"get\",url,true);\n\t\tthis._http.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\")\n\t\tthis._http.responseType=\"text\";\n\t\tthis._http.onerror=function (e){\n\t\t\t_this._onError(e);\n\t\t}\n\t\tthis._http.onload=function (e){\n\t\t\t_this._onLoad(e);\n\t\t}\n\t\tthis._http.send(null);\n\t}\n\n\t/**\n\t*生成指定范围的随机数\n\t*@param minNum 最小值\n\t*@param maxNum 最大值\n\t*/\n\t__proto.randRange=function(minNum,maxNum){\n\t\treturn (Math.floor(Math.random()*(maxNum-minNum+1))+minNum);\n\t}\n\n\t/**\n\t*@private\n\t*请求出错侦的听处理函数。\n\t*@param e 事件对象。\n\t*/\n\t__proto._onError=function(e){\n\t\tthis.error(\"Request failed Status:\"+this._http.status+\" text:\"+this._http.statusText);\n\t}\n\n\t/**\n\t*@private\n\t*请求消息返回的侦听处理函数。\n\t*@param e 事件对象。\n\t*/\n\t__proto._onLoad=function(e){\n\t\tvar http=this._http;\n\t\tvar status=http.status!==undefined ? http.status :200;\n\t\tif (status===200 || status===204 || status===0){\n\t\t\tthis.complete();\n\t\t\t}else {\n\t\t\tthis.error(\"[\"+http.status+\"]\"+http.statusText+\":\"+http.responseURL);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*请求错误的处理函数。\n\t*@param message 错误信息。\n\t*/\n\t__proto.error=function(message){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",message);\n\t}\n\n\t/**\n\t*@private\n\t*请求成功完成的处理函数。\n\t*/\n\t__proto.complete=function(){\n\t\tvar flag=true;\n\t\ttry {\n\t\t\tthis._data=this._http.response || this._http.responseText;\n\t\t\tthis._data=JSON.parse(this._data);\n\t\t\tthis.advsListArr=this._data.list;\n\t\t\tthis._appid=this._data.appid;\n\t\t\tthis._appCodeImgStr=this._data.qrcode;\n\t\t\tthis.updateAdvsInfo();\n\t\t\tthis.revertAdvsData();\n\t\t\t}catch (e){\n\t\t\tflag=false;\n\t\t\tthis.error(e.message);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*清除当前请求。\n\t*/\n\t__proto.clear=function(){\n\t\tvar http=this._http;\n\t\thttp.onerror=http.onabort=http.onprogress=http.onload=null;\n\t}\n\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,true);\n\t\tLaya.timer.clear(this,this.onLunbo);\n\t\tLaya.timer.clear(this,this.onGetAdvsListData);\n\t\tthis.clear();\n\t}\n\n\t/**当前小游戏环境是否支持游戏跳转功能**/\n\t__getset(0,__proto,'isSupportJump',function(){\n\t\tif(Browser.onMiniGame){\n\t\t\tvar isSupperJump=(typeof /*__JS__ */wx.navigateToMiniProgram=='function');\n\t\t\treturn isSupperJump;\n\t\t}\n\t\treturn false;\n\t});\n\n\treturn AdvImage;\n})(Image)\n\n\n/**\n*<code>View</code> 是一个视图类。\n*@internal <p><code>View</code></p>\n*/\n//class laya.ui.View extends laya.ui.Box\nvar View=(function(_super){\n\tvar DataWatcher;\n\tfunction View(){\n\t\t/**@private */\n\t\tthis._idMap=null;\n\t\t/**@private */\n\t\tthis._aniList=null;\n\t\t/**@private */\n\t\tthis._watchMap={};\n\t\tView.__super.call(this);\n\t}\n\n\t__class(View,'laya.ui.View',_super);\n\tvar __proto=View.prototype;\n\t/**\n\t*@private\n\t*通过视图数据创建视图。\n\t*@param uiView 视图数据信息。\n\t*/\n\t__proto.createView=function(uiView){\n\t\tif (uiView.animations && !this._idMap)this._idMap={};\n\t\tView.createComp(uiView,this,this);\n\t\tif (uiView.animations){\n\t\t\tvar anilist=[];\n\t\t\tvar animations=uiView.animations;\n\t\t\tvar i=0,len=animations.length;\n\t\t\tvar tAni;\n\t\t\tvar tAniO;\n\t\t\tfor (i=0;i < len;i++){\n\t\t\t\ttAni=new FrameAnimation();\n\t\t\t\ttAniO=animations[i];\n\t\t\t\ttAni._setUp(this._idMap,tAniO);\n\t\t\t\tthis[tAniO.name]=tAni;\n\t\t\t\ttAni._setControlNode(this);\n\t\t\t\tswitch (tAniO.action){\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttAni.play(0,false);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttAni.play(0,true);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\tanilist.push(tAni);\n\t\t\t}\n\t\t\tthis._aniList=anilist;\n\t\t}\n\t\tif (this._width > 0 && uiView.props.hitTestPrior==null && !this.mouseThrough)this.hitTestPrior=true;\n\t}\n\n\t__proto.onEvent=function(type,event){}\n\t/**\n\t*@private\n\t*装载UI视图。用于加载模式。\n\t*@param path UI资源地址。\n\t*/\n\t__proto.loadUI=function(path){\n\t\tvar uiView=View.uiMap[path];\n\t\tuiView && this.createView(uiView);\n\t}\n\n\t/**\n\t*<p>销毁此对象。</p>\n\t*@param destroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n\t*/\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tif (this._aniList)this._aniList.length=0;\n\t\tthis._idMap=null;\n\t\tthis._aniList=null;\n\t\tthis._watchMap=null;\n\t\tlaya.ui.Component.prototype.destroy.call(this,destroyChild);\n\t}\n\n\t/**@private */\n\t__proto.changeData=function(key){\n\t\tvar arr=this._watchMap[key];\n\t\tif (!arr)return;\n\t\tconsole.log(\"change\",key);\n\t\tfor (var i=0,n=arr.length;i < n;i++){\n\t\t\tvar watcher=arr[i];\n\t\t\twatcher.exe(this);\n\t\t}\n\t}\n\n\tView._regs=function(){\n\t\tfor (var key in View.uiClassMap){\n\t\t\tClassUtils.regClass(key,View.uiClassMap[key]);\n\t\t}\n\t}\n\n\tView.createComp=function(uiView,comp,view,dataMap){\n\t\tcomp=comp || View.getCompInstance(uiView);\n\t\tif (!comp){\n\t\t\tconsole.warn(\"can not create:\"+uiView.type);\n\t\t\treturn null;\n\t\t};\n\t\tvar child=uiView.child;\n\t\tif (child){\n\t\t\tvar isList=(comp instanceof laya.ui.List );\n\t\t\tfor (var i=0,n=child.length;i < n;i++){\n\t\t\t\tvar node=child[i];\n\t\t\t\tif (comp.hasOwnProperty(\"itemRender\")&& (node.props.name==\"render\" || node.props.renderType===\"render\")){\n\t\t\t\t\t(comp).itemRender=node;\n\t\t\t\t\t}else if (node.type==\"Graphic\"){\n\t\t\t\t\tClassUtils.addGraphicsToSprite(node,comp);\n\t\t\t\t\t}else if (ClassUtils.isDrawType(node.type)){\n\t\t\t\t\tClassUtils.addGraphicToSprite(node,comp,true);\n\t\t\t\t\t}else {\n\t\t\t\t\tif (isList){\n\t\t\t\t\t\tvar arr=[];\n\t\t\t\t\t\tvar tChild=View.createComp(node,null,view,arr);\n\t\t\t\t\t\tif (arr.length)tChild[\"_$bindData\"]=arr;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\ttChild=View.createComp(node,null,view,dataMap);\n\t\t\t\t\t}\n\t\t\t\t\tif (node.type==\"Script\"){\n\t\t\t\t\t\tif (\"owner\" in tChild){\n\t\t\t\t\t\t\ttChild[\"owner\"]=comp;\n\t\t\t\t\t\t\t}else if (\"target\" in tChild){\n\t\t\t\t\t\t\ttChild[\"target\"]=comp;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if (node.props.renderType==\"mask\" || node.props.name==\"mask\"){\n\t\t\t\t\t\tcomp.mask=tChild;\n\t\t\t\t\t\t}else {(\n\t\t\t\t\t\ttChild instanceof laya.display.Sprite )&& comp.addChild(tChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tvar props=uiView.props;\n\t\tfor (var prop in props){\n\t\t\tvar value=props[prop];\n\t\t\tif (View.eventDic[prop]){\n\t\t\t\tif (value&&view){\n\t\t\t\t\t(comp).on(prop,view,view.onEvent,[value]);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tView.setCompValue(comp,prop,value,view,dataMap);\n\t\t}\n\t\tif (Laya.__typeof(comp,'laya.ui.IItem'))(comp).initItems();\n\t\tif (uiView.compId && view && view._idMap){\n\t\t\tview._idMap[uiView.compId]=comp;\n\t\t}\n\t\treturn comp;\n\t}\n\n\tView.setCompValue=function(comp,prop,value,view,dataMap){\n\t\tif ((typeof value=='string')&& value.indexOf(\"${\")>-1){\n\t\t\tView._sheet || (View._sheet=ClassUtils.getClass(\"laya.data.Table\"));\n\t\t\tif (!View._sheet){\n\t\t\t\tconsole.warn(\"Can not find class Sheet\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (dataMap){\n\t\t\t\tdataMap.push(comp,prop,value);\n\t\t\t\t}else if (view){\n\t\t\t\tif (value.indexOf(\"].\")==-1){\n\t\t\t\t\tvalue=value.replace(\".\",\"[0].\");\n\t\t\t\t};\n\t\t\t\tvar watcher=new DataWatcher(comp,prop,value);\n\t\t\t\twatcher.exe(view);\n\t\t\t\tvar one,temp;\n\t\t\t\tvar str=value.replace(/\\[.*?\\]\\./g,\".\");\n\t\t\t\twhile ((one=View._parseWatchData.exec(str))!=null){\n\t\t\t\t\tvar key1=one[1];\n\t\t\t\t\twhile ((temp=View._parseKeyWord.exec(key1))!=null){\n\t\t\t\t\t\tvar key2=temp[0];\n\t\t\t\t\t\tvar arr=(view._watchMap[key2] || (view._watchMap[key2]=[]));\n\t\t\t\t\t\tarr.push(watcher);\n\t\t\t\t\t\tView._sheet.I.notifer.on(key2,view,view.changeData,[key2]);\n\t\t\t\t\t}\n\t\t\t\t\tarr=(view._watchMap[key1] || (view._watchMap[key1]=[]));\n\t\t\t\t\tarr.push(watcher);\n\t\t\t\t\tView._sheet.I.notifer.on(key1,view,view.changeData,[key1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (prop===\"var\" && view){\n\t\t\tview[value]=comp;\n\t\t\t}else if (prop==\"onClick\"){\n\t\t\tvar fun=Laya._runScript(\"(function(){\"+value+\"})\");\n\t\t\tcomp.on(/*laya.events.Event.CLICK*/\"click\",view,fun);\n\t\t\t}else {\n\t\t\tcomp[prop]=(value===\"true\" ? true :(value===\"false\" ? false :value));\n\t\t}\n\t}\n\n\tView.getCompInstance=function(json){\n\t\tvar runtime=json.props ? json.props.runtime :null;\n\t\tvar compClass;\n\t\tcompClass=runtime ? (View.viewClassMap[runtime] || View.uiClassMap[runtime]|| Laya[\"__classmap\"][runtime]):View.uiClassMap[json.type];\n\t\tif (json.props && json.props.hasOwnProperty(\"renderType\")&& json.props[\"renderType\"]==\"instance\")return compClass[\"instance\"];\n\t\treturn compClass ? new compClass():null;\n\t}\n\n\tView.regComponent=function(key,compClass){\n\t\tView.uiClassMap[key]=compClass;\n\t\tClassUtils.regClass(key,compClass);\n\t}\n\n\tView.regViewRuntime=function(key,compClass){\n\t\tView.viewClassMap[key]=compClass;\n\t}\n\n\tView.uiMap={};\n\tView.viewClassMap={};\n\tView._sheet=null;\n\t__static(View,\n\t['uiClassMap',function(){return this.uiClassMap={\"ViewStack\":ViewStack,\"LinkButton\":Button,\"TextArea\":TextArea,\"ColorPicker\":ColorPicker,\"Box\":Box,\"Button\":Button,\"CheckBox\":CheckBox,\"Clip\":Clip,\"ComboBox\":ComboBox,\"Component\":Component,\"HScrollBar\":HScrollBar,\"HSlider\":HSlider,\"Image\":Image,\"Label\":Label,\"List\":List,\"Panel\":Panel,\"ProgressBar\":ProgressBar,\"Radio\":Radio,\"RadioGroup\":RadioGroup,\"ScrollBar\":ScrollBar,\"Slider\":Slider,\"Tab\":Tab,\"TextInput\":TextInput,\"View\":View,\"VScrollBar\":VScrollBar,\"VSlider\":VSlider,\"Tree\":Tree,\"HBox\":HBox,\"VBox\":VBox,\"Sprite\":Sprite,\"Animation\":Animation,\"Text\":Text,\"FontClip\":FontClip};},'eventDic',function(){return this.eventDic={\"mousedown\":true,\"mouseup\":true,\"mousemove\":true,\"mouseover\":true,\"mouseout\":true,\"click\":true,\"doubleclick\":true,\"rightmousedown\":true,\"rightmouseup\":true,\"rightclick\":true };},'_parseWatchData',function(){return this._parseWatchData=/\\${(.*?)}/g;},'_parseKeyWord',function(){return this._parseKeyWord=/[a-zA-Z_][a-zA-Z0-9_]*(?:(?:\\.[a-zA-Z_][a-zA-Z0-9_]*)+)/g;}\n\t]);\n\tView.__init$=function(){\n\t\tView._regs()\n\t\t//class DataWatcher\n\t\tDataWatcher=(function(){\n\t\t\tfunction DataWatcher(comp,prop,value){\n\t\t\t\tthis.comp=null;\n\t\t\t\tthis.prop=null;\n\t\t\t\tthis.value=null;\n\t\t\t\tthis.comp=comp;\n\t\t\t\tthis.prop=prop;\n\t\t\t\tthis.value=value;\n\t\t\t}\n\t\t\t__class(DataWatcher,'');\n\t\t\tvar __proto=DataWatcher.prototype;\n\t\t\t__proto.exe=function(view){\n\t\t\t\tvar fun=UIUtils.getBindFun(this.value);\n\t\t\t\tthis.comp[this.prop]=fun.call(this,view);\n\t\t\t}\n\t\t\treturn DataWatcher;\n\t\t})()\n\t}\n\n\treturn View;\n})(Box)\n\n\n/**\n*<code>CheckBox</code> 组件显示一个小方框，该方框内可以有选中标记。\n*<code>CheckBox</code> 组件还可以显示可选的文本标签，默认该标签位于 CheckBox 右侧。\n*<p><code>CheckBox</code> 使用 <code>dataSource</code>赋值时的的默认属性是：<code>selected</code>。</p>\n*\n*@example <caption>以下示例代码，创建了一个 <code>CheckBox</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.CheckBox;\n\t*import laya.utils.Handler;\n\t*public class CheckBox_Example\n\t*{\n\t\t*public function CheckBox_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load(\"resource/ui/check.png\",Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*trace(\"资源加载完成！\");\n\t\t\t*var checkBox:CheckBox=new CheckBox(\"resource/ui/check.png\",\"这个是一个CheckBox组件。\");//创建一个 CheckBox 类的实例对象 checkBox ,传入它的皮肤skin和标签label。\n\t\t\t*checkBox.x=100;//设置 checkBox 对象的属性 x 的值，用于控制 checkBox 对象的显示位置。\n\t\t\t*checkBox.y=100;//设置 checkBox 对象的属性 y 的值，用于控制 checkBox 对象的显示位置。\n\t\t\t*checkBox.clickHandler=new Handler(this,onClick,[checkBox]);//设置 checkBox 的点击事件处理器。\n\t\t\t*Laya.stage.addChild(checkBox);//将此 checkBox 对象添加到显示列表。\n\t\t\t*}\n\t\t*private function onClick(checkBox:CheckBox):void\n\t\t*{\n\t\t\t*trace(\"输出选中状态: checkBox.selected = \"+checkBox.selected);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*Laya.loader.load(\"resource/ui/check.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n*function loadComplete()\n*{\n\t*console.log(\"资源加载完成！\");\n\t*var checkBox:laya.ui.CheckBox=new laya.ui.CheckBox(\"resource/ui/check.png\",\"这个是一个CheckBox组件。\");//创建一个 CheckBox 类的类的实例对象 checkBox ,传入它的皮肤skin和标签label。\n\t*checkBox.x=100;//设置 checkBox 对象的属性 x 的值，用于控制 checkBox 对象的显示位置。\n\t*checkBox.y=100;//设置 checkBox 对象的属性 y 的值，用于控制 checkBox 对象的显示位置。\n\t*checkBox.clickHandler=new laya.utils.Handler(this,this.onClick,[checkBox],false);//设置 checkBox 的点击事件处理器。\n\t*Laya.stage.addChild(checkBox);//将此 checkBox 对象添加到显示列表。\n\t*}\n*function onClick(checkBox)\n*{\n\t*console.log(\"checkBox.selected = \",checkBox.selected);\n\t*}\n*@example\n*import CheckBox=laya.ui.CheckBox;\n*import Handler=laya.utils.Handler;\n*class CheckBox_Example{\n\t*constructor()\n\t*{\n\t\t*Laya.init(640,800);\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load(\"resource/ui/check.png\",Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete()\n\t*{\n\t\t*var checkBox:CheckBox=new CheckBox(\"resource/ui/check.png\",\"这个是一个CheckBox组件。\");//创建一个 CheckBox 类的实例对象 checkBox ,传入它的皮肤skin和标签label。\n\t\t*checkBox.x=100;//设置 checkBox 对象的属性 x 的值，用于控制 checkBox 对象的显示位置。\n\t\t*checkBox.y=100;//设置 checkBox 对象的属性 y 的值，用于控制 checkBox 对象的显示位置。\n\t\t*checkBox.clickHandler=new Handler(this,this.onClick,[checkBox]);//设置 checkBox 的点击事件处理器。\n\t\t*Laya.stage.addChild(checkBox);//将此 checkBox 对象添加到显示列表。\n\t\t*}\n\t*private onClick(checkBox:CheckBox):void\n\t*{\n\t\t*console.log(\"输出选中状态: checkBox.selected = \"+checkBox.selected);\n\t\t*}\n\t*}\n*/\n//class laya.ui.CheckBox extends laya.ui.Button\nvar CheckBox=(function(_super){\n\t/**\n\t*创建一个新的 <code>CheckBox</code> 组件实例。\n\t*@param skin 皮肤资源地址。\n\t*@param label 文本标签的内容。\n\t*/\n\tfunction CheckBox(skin,label){\n\t\t(label===void 0)&& (label=\"\");\n\t\tCheckBox.__super.call(this,skin,label);\n\t}\n\n\t__class(CheckBox,'laya.ui.CheckBox',_super);\n\tvar __proto=CheckBox.prototype;\n\t/**@inheritDoc */\n\t__proto.preinitialize=function(){\n\t\tlaya.ui.Component.prototype.preinitialize.call(this);\n\t\tthis.toggle=true;\n\t\tthis._autoSize=false;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\t_super.prototype.initialize.call(this);\n\t\tthis.createText();\n\t\tthis._text.align=\"left\";\n\t\tthis._text.valign=\"top\";\n\t\tthis._text.width=0;\n\t}\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif ((typeof value=='boolean'))this.selected=value;\n\t\telse if ((typeof value=='string'))this.selected=value===\"true\";\n\t\telse Laya.superSet(Button,this,'dataSource',value);\n\t});\n\n\treturn CheckBox;\n})(Button)\n\n\n/**\n*<code>LayoutBox</code> 是一个布局容器类。\n*/\n//class laya.ui.LayoutBox extends laya.ui.Box\nvar LayoutBox=(function(_super){\n\tfunction LayoutBox(){\n\t\t/**@private */\n\t\tthis._space=0;\n\t\t/**@private */\n\t\tthis._align=\"none\";\n\t\t/**@private */\n\t\tthis._itemChanged=false;\n\t\tLayoutBox.__super.call(this);\n\t}\n\n\t__class(LayoutBox,'laya.ui.LayoutBox',_super);\n\tvar __proto=LayoutBox.prototype;\n\t/**@inheritDoc */\n\t__proto.addChild=function(child){\n\t\tchild.on(/*laya.events.Event.RESIZE*/\"resize\",this,this.onResize);\n\t\tthis._setItemChanged();\n\t\treturn laya.display.Node.prototype.addChild.call(this,child);\n\t}\n\n\t__proto.onResize=function(e){\n\t\tthis._setItemChanged();\n\t}\n\n\t/**@inheritDoc */\n\t__proto.addChildAt=function(child,index){\n\t\tchild.on(/*laya.events.Event.RESIZE*/\"resize\",this,this.onResize);\n\t\tthis._setItemChanged();\n\t\treturn laya.display.Node.prototype.addChildAt.call(this,child,index);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.removeChildAt=function(index){\n\t\tthis.getChildAt(index).off(/*laya.events.Event.RESIZE*/\"resize\",this,this.onResize);\n\t\tthis._setItemChanged();\n\t\treturn laya.display.Node.prototype.removeChildAt.call(this,index);\n\t}\n\n\t/**刷新。*/\n\t__proto.refresh=function(){\n\t\tthis._setItemChanged();\n\t}\n\n\t/**\n\t*改变子对象的布局。\n\t*/\n\t__proto.changeItems=function(){\n\t\tthis._itemChanged=false;\n\t}\n\n\t/**\n\t*排序项目列表。可通过重写改变默认排序规则。\n\t*@param items 项目列表。\n\t*/\n\t__proto.sortItem=function(items){\n\t\tif (items)items.sort(function(a,b){return a.y-b.y;});\n\t}\n\n\t__proto._setItemChanged=function(){\n\t\tif (!this._itemChanged){\n\t\t\tthis._itemChanged=true;\n\t\t\tthis.callLater(this.changeItems);\n\t\t}\n\t}\n\n\t/**子对象的间隔。*/\n\t__getset(0,__proto,'space',function(){\n\t\treturn this._space;\n\t\t},function(value){\n\t\tthis._space=value;\n\t\tthis._setItemChanged();\n\t});\n\n\t/**子对象对齐方式。*/\n\t__getset(0,__proto,'align',function(){\n\t\treturn this._align;\n\t\t},function(value){\n\t\tthis._align=value;\n\t\tthis._setItemChanged();\n\t});\n\n\treturn LayoutBox;\n})(Box)\n\n\n/**\n*字体切片，简化版的位图字体，只需设置一个切片图片和文字内容即可使用，效果同位图字体\n*使用方式：设置位图字体皮肤skin，设置皮肤对应的字体内容sheet（如果多行，可以使用空格换行），示例：\n*fontClip.skin=\"font1.png\";//设置皮肤\n*fontClip.sheet=\"abc123 456\";//设置皮肤对应的内容，空格换行。此皮肤为2行5列（显示时skin会被等分为2行5列），第一行对应的文字为\"abc123\"，第二行为\"456\"\n*fontClip.value=\"a1326\";//显示\"a1326\"文字\n*/\n//class laya.ui.FontClip extends laya.ui.Clip\nvar FontClip=(function(_super){\n\tfunction FontClip(skin,sheet){\n\t\t/**数值*/\n\t\tthis._valueArr=null;\n\t\t/**文字内容数组**/\n\t\tthis._indexMap=null;\n\t\t/**位图字体内容**/\n\t\tthis._sheet=null;\n\t\t/**@private */\n\t\tthis._direction=\"horizontal\";\n\t\t/**X方向间隙*/\n\t\tthis._spaceX=0;\n\t\t/**Y方向间隙*/\n\t\tthis._spaceY=0;\n\t\t/**@private 水平对齐方式*/\n\t\tthis._align=\"left\";\n\t\t/**@private 显示文字宽*/\n\t\tthis._wordsW=0;\n\t\t/**@private 显示文字高*/\n\t\tthis._wordsH=0;\n\t\tFontClip.__super.call(this);\n\t\tif (skin)this.skin=skin;\n\t\tif (sheet)this.sheet=sheet;\n\t}\n\n\t__class(FontClip,'laya.ui.FontClip',_super);\n\tvar __proto=FontClip.prototype;\n\t__proto.createChildren=function(){\n\t\tthis._bitmap=new AutoBitmap();\n\t\tthis.on(/*laya.events.Event.LOADED*/\"loaded\",this,this._onClipLoaded);\n\t}\n\n\t/**\n\t*资源加载完毕\n\t*/\n\t__proto._onClipLoaded=function(){\n\t\tthis.callLater(this.changeValue);\n\t}\n\n\t/**渲染数值*/\n\t__proto.changeValue=function(){\n\t\tif (!this._sources)return;\n\t\tif (!this._valueArr)return;\n\t\tthis.graphics.clear(true);\n\t\tvar texture;\n\t\ttexture=this._sources[0];\n\t\tif (!texture)return;\n\t\tvar isHorizontal=(this._direction===\"horizontal\");\n\t\tif (isHorizontal){\n\t\t\tthis._wordsW=this._valueArr.length *(texture.sourceWidth+this.spaceX);\n\t\t\tthis._wordsH=texture.sourceHeight;\n\t\t\t}else{\n\t\t\tthis._wordsW=texture.sourceWidth;\n\t\t\tthis._wordsH=(texture.sourceHeight+this.spaceY)*this._valueArr.length;\n\t\t};\n\t\tvar dX=0;\n\t\tif (this._width){\n\t\t\tswitch(this._align){\n\t\t\t\tcase \"center\":\n\t\t\t\t\tdX=0.5 *(this._width-this._wordsW);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tdX=this._width-this._wordsW;\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tdX=0;\n\t\t\t\t}\n\t\t}\n\t\tfor (var i=0,sz=this._valueArr.length;i < sz;i++){\n\t\t\tvar index=this._indexMap[this._valueArr.charAt(i)];\n\t\t\tif (!this.sources[index])continue ;\n\t\t\ttexture=this.sources[index];\n\t\t\tif (isHorizontal)this.graphics.drawTexture(texture,dX+i *(texture.sourceWidth+this.spaceX),0,texture.sourceWidth,texture.sourceHeight);\n\t\t\telse this.graphics.drawTexture(texture,0+dX,i *(texture.sourceHeight+this.spaceY),texture.sourceWidth,texture.sourceHeight);\n\t\t}\n\t\tif (!this._width){\n\t\t\tthis.resetLayoutX();\n\t\t\tthis.callLater(this.changeSize);\n\t\t}\n\t\tif (!this._height){\n\t\t\tthis.resetLayoutY();\n\t\t\tthis.callLater(this.changeSize);\n\t\t}\n\t}\n\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tthis._valueArr=null;\n\t\tthis._indexMap=null;\n\t\tthis.graphics.clear(true);\n\t\tthis.removeSelf();\n\t\tthis.off(/*laya.events.Event.LOADED*/\"loaded\",this,this._onClipLoaded);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t}\n\n\t/**\n\t*设置位图字体内容，空格代表换行。比如\"abc123 456\"，代表第一行对应的文字为\"abc123\"，第二行为\"456\"\n\t*/\n\t__getset(0,__proto,'sheet',function(){\n\t\treturn this._sheet;\n\t\t},function(value){\n\t\tvalue+=\"\";\n\t\tthis._sheet=value;\n\t\tvar arr=value.split(\" \");\n\t\tthis._clipX=String(arr[0]).length;\n\t\tthis.clipY=arr.length;\n\t\tthis._indexMap={};\n\t\tfor (var i=0;i < this._clipY;i++){\n\t\t\tvar line=arr[i].split(\"\");\n\t\t\tfor (var j=0,n=line.length;j < n;j++){\n\t\t\t\tthis._indexMap[line[j]]=i *this._clipX+j;\n\t\t\t}\n\t\t}\n\t});\n\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Clip,this,'height',value);\n\t\tthis.callLater(this.changeValue);\n\t});\n\n\t/**\n\t*布局方向。\n\t*<p>默认值为\"horizontal\"。</p>\n\t*<p><b>取值：</b>\n\t*<li>\"horizontal\"：表示水平布局。</li>\n\t*<li>\"vertical\"：表示垂直布局。</li>\n\t*</p>\n\t*/\n\t__getset(0,__proto,'direction',function(){\n\t\treturn this._direction;\n\t\t},function(value){\n\t\tthis._direction=value;\n\t\tthis.callLater(this.changeValue);\n\t});\n\n\t/**\n\t*设置位图字体的显示内容\n\t*/\n\t__getset(0,__proto,'value',function(){\n\t\tif (!this._valueArr)return \"\";\n\t\treturn this._valueArr;\n\t\t},function(value){\n\t\tvalue+=\"\";\n\t\tthis._valueArr=value;\n\t\tthis.callLater(this.changeValue);\n\t});\n\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Clip,this,'width',value);\n\t\tthis.callLater(this.changeValue);\n\t});\n\n\t/**X方向文字间隙*/\n\t__getset(0,__proto,'spaceX',function(){\n\t\treturn this._spaceX;\n\t\t},function(value){\n\t\tthis._spaceX=value;\n\t\tif (this._direction===\"horizontal\")this.callLater(this.changeValue);\n\t});\n\n\t/**Y方向文字间隙*/\n\t__getset(0,__proto,'spaceY',function(){\n\t\treturn this._spaceY;\n\t\t},function(value){\n\t\tthis._spaceY=value;\n\t\tif (!(this._direction===\"horizontal\"))this.callLater(this.changeValue);\n\t});\n\n\t/**水平对齐方式*/\n\t__getset(0,__proto,'align',function(){\n\t\treturn this._align;\n\t\t},function(v){\n\t\tthis._align=v;\n\t\tthis.callLater(this.changeValue);\n\t});\n\n\t__getset(0,__proto,'measureWidth',function(){\n\t\treturn this._wordsW;\n\t});\n\n\t__getset(0,__proto,'measureHeight',function(){\n\t\treturn this._wordsH;\n\t});\n\n\treturn FontClip;\n})(Clip)\n\n\n/**\n*<code>List</code> 控件可显示项目列表。默认为垂直方向列表。可通过UI编辑器自定义列表。\n*\n*@example <caption>以下示例代码，创建了一个 <code>List</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.List;\n\t*import laya.utils.Handler;\n\t*public class List_Example\n\t*{\n\t\t*public function List_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800,\"false\");//设置游戏画布宽高、渲染模式。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\"],Handler.create(this,onLoadComplete));\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*var arr:Array=[];//创建一个数组，用于存贮列表的数据信息。\n\t\t\t*for (var i:int=0;i &lt;20;i++)\n\t\t\t*{\n\t\t\t\t*arr.push({label:\"item\"+i});\n\t\t\t\t*}\n\t\t\t*var list:List=new List();//创建一个 List 类的实例对象 list 。\n\t\t\t*list.itemRender=Item;//设置 list 的单元格渲染器。\n\t\t\t*list.repeatX=1;//设置 list 的水平方向单元格数量。\n\t\t\t*list.repeatY=10;//设置 list 的垂直方向单元格数量。\n\t\t\t*list.vScrollBarSkin=\"resource/ui/vscroll.png\";//设置 list 的垂直方向滚动条皮肤。\n\t\t\t*list.array=arr;//设置 list 的列表数据源。\n\t\t\t*list.pos(100,100);//设置 list 的位置。\n\t\t\t*list.selectEnable=true;//设置 list 可选。\n\t\t\t*list.selectHandler=new Handler(this,onSelect);//设置 list 改变选择项执行的处理器。\n\t\t\t*Laya.stage.addChild(list);//将 list 添加到显示列表。\n\t\t\t*}\n\t\t*private function onSelect(index:int):void\n\t\t*{\n\t\t\t*trace(\"当前选择的项目索引： index= \",index);\n\t\t\t*}\n\t\t*}\n\t*}\n*import laya.ui.Box;\n*import laya.ui.Label;\n*class Item extends Box\n*{\n\t*public function Item()\n\t*{\n\t\t*graphics.drawRect(0,0,100,20,null,\"#ff0000\");\n\t\t*var label:Label=new Label();\n\t\t*label.text=\"100000\";\n\t\t*label.name=\"label\";//设置 label 的name属性值。\n\t\t*label.size(100,20);\n\t\t*addChild(label);\n\t\t*}\n\t*}\n*@example\n*(function (_super){\n\t*function Item(){\n\t\t*Item.__super.call(this);//初始化父类\n\t\t*this.graphics.drawRect(0,0,100,20,\"#ff0000\");\n\t\t*var label=new laya.ui.Label();//创建一个 Label 类的实例对象 label 。\n\t\t*label.text=\"100000\";//设置 label 的文本内容。\n\t\t*label.name=\"label\";//设置 label 的name属性值。\n\t\t*label.size(100,20);//设置 label 的宽度、高度。\n\t\t*this.addChild(label);//将 label 添加到显示列表。\n\t\t*};\n\t*Laya.class(Item,\"mypackage.listExample.Item\",_super);//注册类 Item 。\n\t*})(laya.ui.Box);\n*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n*var res=[\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\"];\n*Laya.loader.load(res,new laya.utils.Handler(this,onLoadComplete));//加载资源。\n*function onLoadComplete(){\n\t*var arr=[];//创建一个数组，用于存贮列表的数据信息。\n\t*for (var i=0;i &lt;20;i++){\n\t\t*arr.push({label:\"item\"+i});\n\t\t*}\n\t*var list=new laya.ui.List();//创建一个 List 类的实例对象 list 。\n\t*list.itemRender=mypackage.listExample.Item;//设置 list 的单元格渲染器。\n\t*list.repeatX=1;//设置 list 的水平方向单元格数量。\n\t*list.repeatY=10;//设置 list 的垂直方向单元格数量。\n\t*list.vScrollBarSkin=\"resource/ui/vscroll.png\";//设置 list 的垂直方向滚动条皮肤。\n\t*list.array=arr;//设置 list 的列表数据源。\n\t*list.pos(100,100);//设置 list 的位置。\n\t*list.selectEnable=true;//设置 list 可选。\n\t*list.selectHandler=new laya.utils.Handler(this,onSelect);//设置 list 改变选择项执行的处理器。\n\t*Laya.stage.addChild(list);//将 list 添加到显示列表。\n\t*}\n*function onSelect(index)\n*{\n\t*console.log(\"当前选择的项目索引： index= \",index);\n\t*}\n*\n*@example\n*import List=laya.ui.List;\n*import Handler=laya.utils.Handler;\n*public class List_Example {\n\t*public List_Example(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\"],Handler.create(this,this.onLoadComplete));\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*var arr=[];//创建一个数组，用于存贮列表的数据信息。\n\t\t*for (var i:number=0;i &lt;20;i++)\n\t\t*{\n\t\t\t*arr.push({label:\"item\"+i });\n\t\t\t*}\n\t\t*var list:List=new List();//创建一个 List 类的实例对象 list 。\n\t\t*list.itemRender=Item;//设置 list 的单元格渲染器。\n\t\t*list.repeatX=1;//设置 list 的水平方向单元格数量。\n\t\t*list.repeatY=10;//设置 list 的垂直方向单元格数量。\n\t\t*list.vScrollBarSkin=\"resource/ui/vscroll.png\";//设置 list 的垂直方向滚动条皮肤。\n\t\t*list.array=arr;//设置 list 的列表数据源。\n\t\t*list.pos(100,100);//设置 list 的位置。\n\t\t*list.selectEnable=true;//设置 list 可选。\n\t\t*list.selectHandler=new Handler(this,this.onSelect);//设置 list 改变选择项执行的处理器。\n\t\t*Laya.stage.addChild(list);//将 list 添加到显示列表。\n\t\t*}\n\t*private onSelect(index:number):void {\n\t\t*console.log(\"当前选择的项目索引： index= \",index);\n\t\t*}\n\t*}\n*import Box=laya.ui.Box;\n*import Label=laya.ui.Label;\n*class Item extends Box {\n\t*constructor(){\n\t\t*this.graphics.drawRect(0,0,100,20,null,\"#ff0000\");\n\t\t*var label:Label=new Label();\n\t\t*label.text=\"100000\";\n\t\t*label.name=\"label\";//设置 label 的name属性值。\n\t\t*label.size(100,20);\n\t\t*this.addChild(label);\n\t\t*}\n\t*}\n*/\n//class laya.ui.List extends laya.ui.Box\nvar List=(function(_super){\n\tfunction List(){\n\t\t/**改变 <code>List</code> 的选择项时执行的处理器，(默认返回参数： 项索引（index:int）)。*/\n\t\tthis.selectHandler=null;\n\t\t/**单元格渲染处理器(默认返回参数cell:Box,index:int)。*/\n\t\tthis.renderHandler=null;\n\t\t/**单元格鼠标事件处理器(默认返回参数e:Event,index:int)。*/\n\t\tthis.mouseHandler=null;\n\t\t/**指定是否可以选择，若值为true则可以选择，否则不可以选择。 @default false*/\n\t\tthis.selectEnable=false;\n\t\t/**最大分页数。*/\n\t\tthis.totalPage=0;\n\t\t/**@private */\n\t\tthis._content=null;\n\t\t/**@private */\n\t\tthis._scrollBar=null;\n\t\t/**@private */\n\t\tthis._itemRender=null;\n\t\t/**@private */\n\t\tthis._repeatX=0;\n\t\t/**@private */\n\t\tthis._repeatY=0;\n\t\t/**@private */\n\t\tthis._repeatX2=0;\n\t\t/**@private */\n\t\tthis._repeatY2=0;\n\t\t/**@private */\n\t\tthis._spaceX=0;\n\t\t/**@private */\n\t\tthis._spaceY=0;\n\t\t/**@private */\n\t\tthis._array=null;\n\t\t/**@private */\n\t\tthis._startIndex=0;\n\t\t/**@private */\n\t\tthis._selectedIndex=-1;\n\t\t/**@private */\n\t\tthis._page=0;\n\t\t/**@private */\n\t\tthis._isVertical=true;\n\t\t/**@private */\n\t\tthis._cellSize=20;\n\t\t/**@private */\n\t\tthis._cellOffset=0;\n\t\t/**@private */\n\t\tthis._isMoved=false;\n\t\t/**是否缓存内容，如果数据源较少，并且list内无动画，设置此属性为true能大大提高性能 */\n\t\tthis.cacheContent=false;\n\t\t/**@private */\n\t\tthis._createdLine=0;\n\t\t/**@private */\n\t\tthis._cellChanged=false;\n\t\tthis._cells=[];\n\t\tthis._offset=new Point();\n\t\tList.__super.call(this);\n\t}\n\n\t__class(List,'laya.ui.List',_super);\n\tvar __proto=List.prototype;\n\tLaya.imps(__proto,{\"laya.ui.IRender\":true,\"laya.ui.IItem\":true})\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tthis._content && this._content.destroy(destroyChild);\n\t\tthis._scrollBar && this._scrollBar.destroy(destroyChild);\n\t\tlaya.ui.Component.prototype.destroy.call(this,destroyChild);\n\t\tthis._content=null;\n\t\tthis._scrollBar=null;\n\t\tthis._itemRender=null;\n\t\tthis._cells=null;\n\t\tthis._array=null;\n\t\tthis.selectHandler=this.renderHandler=this.mouseHandler=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._content=new Box());\n\t}\n\n\t__proto.onScrollStart=function(){\n\t\tthis._$P.cacheAs || (this._$P.cacheAs=Laya.superGet(Box,this,'cacheAs'));\n\t\tLaya.superSet(Box,this,'cacheAs',\"none\");\n\t\tthis._scrollBar.once(/*laya.events.Event.END*/\"end\",this,this.onScrollEnd);\n\t}\n\n\t__proto.onScrollEnd=function(){\n\t\tLaya.superSet(Box,this,'cacheAs',this._$P.cacheAs);\n\t}\n\n\t__proto._removePreScrollBar=function(){\n\t\tvar preNode=this.removeChildByName(\"scrollBar\");\n\t\tif (preNode)preNode.destroy(true);\n\t}\n\n\t/**\n\t*@private\n\t*更改单元格的信息。\n\t*@internal 在此销毁、创建单元格，并设置单元格的位置等属性。相当于此列表内容发送改变时调用此函数。\n\t*/\n\t__proto.changeCells=function(){\n\t\tthis._cellChanged=false;\n\t\tif (this._itemRender){\n\t\t\tthis.scrollBar=this.getChildByName(\"scrollBar\");\n\t\t\tvar cell=this._getOneCell();\n\t\t\tvar cellWidth=(cell.width+this._spaceX)|| 1;\n\t\t\tvar cellHeight=(cell.height+this._spaceY)|| 1;\n\t\t\tif (this._width > 0)this._repeatX2=this._isVertical ? Math.round(this._width / cellWidth):Math.ceil(this._width / cellWidth);\n\t\t\tif (this._height > 0)this._repeatY2=this._isVertical ? Math.ceil(this._height / cellHeight):Math.round(this._height / cellHeight);\n\t\t\tvar listWidth=this._width ? this._width :(cellWidth *this.repeatX-this._spaceX);\n\t\t\tvar listHeight=this._height ? this._height :(cellHeight *this.repeatY-this._spaceY);\n\t\t\tthis._cellSize=this._isVertical ? cellHeight :cellWidth;\n\t\t\tthis._cellOffset=this._isVertical ? (cellHeight *Math.max(this._repeatY2,this._repeatY)-listHeight-this._spaceY):(cellWidth *Math.max(this._repeatX2,this._repeatX)-listWidth-this._spaceX);\n\t\t\tif (this._isVertical && this._scrollBar)this._scrollBar.height=listHeight;\n\t\t\telse if (!this._isVertical && this._scrollBar)this._scrollBar.width=listWidth;\n\t\t\tthis.setContentSize(listWidth,listHeight);\n\t\t\tvar numX=this._isVertical ? this.repeatX :this.repeatY;\n\t\t\tvar numY=(this._isVertical ? this.repeatY :this.repeatX)+(this._scrollBar ? 1 :0);\n\t\t\tthis._createItems(0,numX,numY);\n\t\t\tthis._createdLine=numY;\n\t\t\tif (this._array){\n\t\t\t\tthis.array=this._array;\n\t\t\t\tthis.runCallLater(this.renderItems);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._getOneCell=function(){\n\t\tif (this._cells.length===0){\n\t\t\tvar item=this.createItem();\n\t\t\tthis._offset.setTo(item.x,item.y);\n\t\t\tif (this.cacheContent)return item;\n\t\t\tthis._cells.push(item);\n\t\t}\n\t\treturn this._cells[0];\n\t}\n\n\t__proto._createItems=function(startY,numX,numY){\n\t\tvar box=this._content;\n\t\tvar cell=this._getOneCell();\n\t\tvar cellWidth=cell.width+this._spaceX;\n\t\tvar cellHeight=cell.height+this._spaceY;\n\t\tif (this.cacheContent){\n\t\t\tvar cacheBox=new Box();\n\t\t\tcacheBox.cacheAsBitmap=true;\n\t\t\tcacheBox.pos((this._isVertical ? 0 :startY)*cellWidth,(this._isVertical ? startY :0)*cellHeight);\n\t\t\tthis._content.addChild(cacheBox);\n\t\t\tthis._content.optimizeScrollRect=true;\n\t\t\tbox=cacheBox;\n\t\t\t}else {\n\t\t\tvar arr=[];\n\t\t\tfor (var i=this._cells.length-1;i >-1;i--){\n\t\t\t\tvar item=this._cells[i];\n\t\t\t\titem.removeSelf();\n\t\t\t\tarr.push(item);\n\t\t\t}\n\t\t\tthis._cells.length=0;\n\t\t}\n\t\tfor (var k=startY;k < numY;k++){\n\t\t\tfor (var l=0;l < numX;l++){\n\t\t\t\tif (arr && arr.length){\n\t\t\t\t\tcell=arr.pop();\n\t\t\t\t\t}else {\n\t\t\t\t\tcell=this.createItem();\n\t\t\t\t}\n\t\t\t\tcell.x=(this._isVertical ? l :k)*cellWidth-box.x;\n\t\t\t\tcell.y=(this._isVertical ? k :l)*cellHeight-box.y;\n\t\t\t\tcell.name=\"item\"+(k *numX+l);\n\t\t\t\tbox.addChild(cell);\n\t\t\t\tthis.addCell(cell);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.createItem=function(){\n\t\tvar arr=[];\n\t\tif ((typeof this._itemRender=='function')){\n\t\t\tvar box=new this._itemRender();\n\t\t\t}else {\n\t\t\tbox=View.createComp(this._itemRender,null,null,arr)\n\t\t}\n\t\tif (arr.length==0 && box._watchMap){\n\t\t\tvar watchMap=box._watchMap;\n\t\t\tfor (var name in watchMap){\n\t\t\t\tvar a=watchMap[name];\n\t\t\t\tfor (var i=0;i < a.length;i++){\n\t\t\t\t\tvar watcher=a[i];\n\t\t\t\t\tarr.push(watcher.comp,watcher.prop,watcher.value)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (arr.length)box[\"_$bindData\"]=arr;\n\t\treturn box;\n\t}\n\n\t/**\n\t*@private\n\t*添加单元格。\n\t*@param cell 需要添加的单元格对象。\n\t*/\n\t__proto.addCell=function(cell){\n\t\tcell.on(/*laya.events.Event.CLICK*/\"click\",this,this.onCellMouse);\n\t\tcell.on(/*laya.events.Event.RIGHT_CLICK*/\"rightclick\",this,this.onCellMouse);\n\t\tcell.on(/*laya.events.Event.MOUSE_OVER*/\"mouseover\",this,this.onCellMouse);\n\t\tcell.on(/*laya.events.Event.MOUSE_OUT*/\"mouseout\",this,this.onCellMouse);\n\t\tcell.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this.onCellMouse);\n\t\tcell.on(/*laya.events.Event.MOUSE_UP*/\"mouseup\",this,this.onCellMouse);\n\t\tthis._cells.push(cell);\n\t}\n\n\t/**\n\t*初始化单元格信息。\n\t*/\n\t__proto.initItems=function(){\n\t\tif (!this._itemRender && this.getChildByName(\"item0\")!=null){\n\t\t\tthis.repeatX=1;\n\t\t\tvar count=0;\n\t\t\tcount=0;\n\t\t\tfor (var i=0;i < 10000;i++){\n\t\t\t\tvar cell=this.getChildByName(\"item\"+i);\n\t\t\t\tif (cell){\n\t\t\t\t\tthis.addCell(cell);\n\t\t\t\t\tcount++;\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tthis.repeatY=count;\n\t\t}\n\t}\n\n\t/**\n\t*设置可视区域大小。\n\t*<p>以（0，0，width参数，height参数）组成的矩形区域为可视区域。</p>\n\t*@param width 可视区域宽度。\n\t*@param height 可视区域高度。\n\t*/\n\t__proto.setContentSize=function(width,height){\n\t\tthis._content.width=width;\n\t\tthis._content.height=height;\n\t\tif (this._scrollBar || this._offset.x !=0 || this._offset.y !=0){\n\t\t\tthis._content.scrollRect || (this._content.scrollRect=new Rectangle());\n\t\t\tthis._content.scrollRect.setTo(-this._offset.x,-this._offset.y,width,height);\n\t\t\tthis._content.scrollRect=this._content.scrollRect;\n\t\t}\n\t\tthis.event(/*laya.events.Event.RESIZE*/\"resize\");\n\t}\n\n\t/**\n\t*@private\n\t*单元格的鼠标事件侦听处理函数。\n\t*/\n\t__proto.onCellMouse=function(e){\n\t\tif (e.type===/*laya.events.Event.MOUSE_DOWN*/\"mousedown\")this._isMoved=false;\n\t\tvar cell=e.currentTarget;\n\t\tvar index=this._startIndex+this._cells.indexOf(cell);\n\t\tif (index < 0)return;\n\t\tif (e.type===/*laya.events.Event.CLICK*/\"click\" || e.type===/*laya.events.Event.RIGHT_CLICK*/\"rightclick\"){\n\t\t\tif (this.selectEnable && !this._isMoved)this.selectedIndex=index;\n\t\t\telse this.changeCellState(cell,true,0);\n\t\t\t}else if ((e.type===/*laya.events.Event.MOUSE_OVER*/\"mouseover\" || e.type===/*laya.events.Event.MOUSE_OUT*/\"mouseout\")&& this._selectedIndex!==index){\n\t\t\tthis.changeCellState(cell,e.type===/*laya.events.Event.MOUSE_OVER*/\"mouseover\",0);\n\t\t}\n\t\tthis.mouseHandler && this.mouseHandler.runWith([e,index]);\n\t}\n\n\t/**\n\t*@private\n\t*改变单元格的可视状态。\n\t*@param cell 单元格对象。\n\t*@param visable 是否显示。\n\t*@param index 单元格的属性 <code>index</code> 值。\n\t*/\n\t__proto.changeCellState=function(cell,visable,index){\n\t\tvar selectBox=cell.getChildByName(\"selectBox\");\n\t\tif (selectBox){\n\t\t\tthis.selectEnable=true;\n\t\t\tselectBox.visible=visable;\n\t\t\tselectBox.index=index;\n\t\t}\n\t}\n\n\t/**@inheritDoc */\n\t__proto.changeSize=function(){\n\t\tlaya.ui.Component.prototype.changeSize.call(this);\n\t\tthis.setContentSize(this.width,this.height);\n\t\tif (this._scrollBar)this.callLater(this.onScrollBarChange);\n\t}\n\n\t/**\n\t*@private\n\t*滚动条的 <code>Event.CHANGE</code> 事件侦听处理函数。\n\t*/\n\t__proto.onScrollBarChange=function(e){\n\t\tthis.runCallLater(this.changeCells);\n\t\tvar scrollValue=this._scrollBar.value;\n\t\tvar lineX=(this._isVertical ? this.repeatX :this.repeatY);\n\t\tvar lineY=(this._isVertical ? this.repeatY :this.repeatX);\n\t\tvar scrollLine=Math.floor(scrollValue / this._cellSize);\n\t\tif (!this.cacheContent){\n\t\t\tvar index=scrollLine *lineX;\n\t\t\tvar num=0;\n\t\t\tif (index > this._startIndex){\n\t\t\t\tnum=index-this._startIndex;\n\t\t\t\tvar down=true;\n\t\t\t\tvar toIndex=this._startIndex+lineX *(lineY+1);\n\t\t\t\tthis._isMoved=true;\n\t\t\t\t}else if (index < this._startIndex){\n\t\t\t\tnum=this._startIndex-index;\n\t\t\t\tdown=false;\n\t\t\t\ttoIndex=this._startIndex-1;\n\t\t\t\tthis._isMoved=true;\n\t\t\t}\n\t\t\tfor (var i=0;i < num;i++){\n\t\t\t\tif (down){\n\t\t\t\t\tvar cell=this._cells.shift();\n\t\t\t\t\tthis._cells[this._cells.length]=cell;\n\t\t\t\t\tvar cellIndex=toIndex+i;\n\t\t\t\t\t}else {\n\t\t\t\t\tcell=this._cells.pop();\n\t\t\t\t\tthis._cells.unshift(cell);\n\t\t\t\t\tcellIndex=toIndex-i;\n\t\t\t\t};\n\t\t\t\tvar pos=Math.floor(cellIndex / lineX)*this._cellSize;\n\t\t\t\tthis._isVertical ? cell.y=pos :cell.x=pos;\n\t\t\t\tthis.renderItem(cell,cellIndex);\n\t\t\t}\n\t\t\tthis._startIndex=index;\n\t\t\tthis.changeSelectStatus();\n\t\t\t}else {\n\t\t\tnum=(lineY+1);\n\t\t\tif (this._createdLine-scrollLine < num){\n\t\t\t\tthis._createItems(this._createdLine,lineX,this._createdLine+num);\n\t\t\t\tthis.renderItems(this._createdLine *lineX,0);\n\t\t\t\tthis._createdLine+=num;\n\t\t\t}\n\t\t};\n\t\tvar r=this._content.scrollRect;\n\t\tif (this._isVertical){\n\t\t\tr.y=scrollValue-this._offset.y;\n\t\t\tr.x=-this._offset.x;\n\t\t\t}else {\n\t\t\tr.y=-this._offset.y;\n\t\t\tr.x=scrollValue-this._offset.x;\n\t\t}\n\t\tthis._content.scrollRect=r;\n\t}\n\n\t__proto.posCell=function(cell,cellIndex){\n\t\tif (!this._scrollBar)return;\n\t\tvar lineX=(this._isVertical ? this.repeatX :this.repeatY);\n\t\tvar lineY=(this._isVertical ? this.repeatY :this.repeatX);\n\t\tvar pos=Math.floor(cellIndex / lineX)*this._cellSize;\n\t\tthis._isVertical ? cell.y=pos :cell.x=pos;\n\t}\n\n\t/**\n\t*@private\n\t*改变单元格的选择状态。\n\t*/\n\t__proto.changeSelectStatus=function(){\n\t\tfor (var i=0,n=this._cells.length;i < n;i++){\n\t\t\tthis.changeCellState(this._cells[i],this._selectedIndex===this._startIndex+i,1);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*渲染单元格列表。\n\t*/\n\t__proto.renderItems=function(from,to){\n\t\t(from===void 0)&& (from=0);\n\t\t(to===void 0)&& (to=0);\n\t\tfor (var i=from,n=to || this._cells.length;i < n;i++){\n\t\t\tthis.renderItem(this._cells[i],this._startIndex+i);\n\t\t}\n\t\tthis.changeSelectStatus();\n\t}\n\n\t/**\n\t*渲染一个单元格。\n\t*@param cell 需要渲染的单元格对象。\n\t*@param index 单元格索引。\n\t*/\n\t__proto.renderItem=function(cell,index){\n\t\tif (this._array && index >=0 && index < this._array.length){\n\t\t\tcell.visible=true;\n\t\t\tif (cell._$bindData){\n\t\t\t\tcell._dataSource=this._array[index];\n\t\t\t\tthis._bindData(cell,this._array[index]);\n\t\t\t}else cell.dataSource=this._array[index];\n\t\t\tif (!this.cacheContent){\n\t\t\t\tthis.posCell(cell,index);\n\t\t\t}\n\t\t\tif (this.hasListener(/*laya.events.Event.RENDER*/\"render\"))this.event(/*laya.events.Event.RENDER*/\"render\",[cell,index]);\n\t\t\tif (this.renderHandler)this.renderHandler.runWith([cell,index]);\n\t\t\t}else {\n\t\t\tcell.visible=false;\n\t\t\tcell.dataSource=null;\n\t\t}\n\t}\n\n\t__proto._bindData=function(cell,data){\n\t\tvar arr=cell._$bindData;\n\t\tfor (var i=0,n=arr.length;i < n;i++){\n\t\t\tvar ele=arr[i++];\n\t\t\tvar prop=arr[i++];\n\t\t\tvar value=arr[i];\n\t\t\tvar fun=UIUtils.getBindFun(value);\n\t\t\tele[prop]=fun.call(this,data);\n\t\t}\n\t}\n\n\t/**\n\t*刷新列表数据源。\n\t*/\n\t__proto.refresh=function(){\n\t\tthis.array=this._array;\n\t}\n\n\t/**\n\t*获取单元格数据源。\n\t*@param index 单元格索引。\n\t*/\n\t__proto.getItem=function(index){\n\t\tif (index >-1 && index < this._array.length){\n\t\t\treturn this._array[index];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*修改单元格数据源。\n\t*@param index 单元格索引。\n\t*@param source 单元格数据源。\n\t*/\n\t__proto.changeItem=function(index,source){\n\t\tif (index >-1 && index < this._array.length){\n\t\t\tthis._array[index]=source;\n\t\t\tif (index >=this._startIndex && index < this._startIndex+this._cells.length){\n\t\t\t\tthis.renderItem(this.getCell(index),index);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*设置单元格数据源。\n\t*@param index 单元格索引。\n\t*@param source 单元格数据源。\n\t*/\n\t__proto.setItem=function(index,source){\n\t\tthis.changeItem(index,source);\n\t}\n\n\t/**\n\t*添加单元格数据源。\n\t*@param souce 数据源。\n\t*/\n\t__proto.addItem=function(souce){\n\t\tthis._array.push(souce);\n\t\tthis.array=this._array;\n\t}\n\n\t/**\n\t*添加单元格数据源到对应的数据索引处。\n\t*@param souce 单元格数据源。\n\t*@param index 索引。\n\t*/\n\t__proto.addItemAt=function(souce,index){\n\t\tthis._array.splice(index,0,souce);\n\t\tthis.array=this._array;\n\t}\n\n\t/**\n\t*通过数据源索引删除单元格数据源。\n\t*@param index 需要删除的数据源索引值。\n\t*/\n\t__proto.deleteItem=function(index){\n\t\tthis._array.splice(index,1);\n\t\tthis.array=this._array;\n\t}\n\n\t/**\n\t*通过可视单元格索引，获取单元格。\n\t*@param index 可视单元格索引。\n\t*@return 单元格对象。\n\t*/\n\t__proto.getCell=function(index){\n\t\tthis.runCallLater(this.changeCells);\n\t\tif (index >-1 && this._cells){\n\t\t\treturn this._cells[(index-this._startIndex)% this._cells.length];\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*<p>滚动列表，以设定的数据索引对应的单元格为当前可视列表的第一项。</p>\n\t*@param index 单元格在数据列表中的索引。\n\t*/\n\t__proto.scrollTo=function(index){\n\t\tif (this._scrollBar){\n\t\t\tvar numX=this._isVertical ? this.repeatX :this.repeatY;\n\t\t\tthis._scrollBar.value=Math.floor(index / numX)*this._cellSize;\n\t\t\t}else {\n\t\t\tthis.startIndex=index;\n\t\t}\n\t}\n\n\t/**\n\t*<p>缓动滚动列表，以设定的数据索引对应的单元格为当前可视列表的第一项。</p>\n\t*@param index 单元格在数据列表中的索引。\n\t*@param time 缓动时间。\n\t*@param complete 缓动结束回掉\n\t*/\n\t__proto.tweenTo=function(index,time,complete){\n\t\t(time===void 0)&& (time=200);\n\t\tif (this._scrollBar){\n\t\t\tvar numX=this._isVertical ? this.repeatX :this.repeatY;\n\t\t\tTween.to(this._scrollBar,{value:Math.floor(index / numX)*this._cellSize},time,null,complete,0,true);\n\t\t\t}else {\n\t\t\tthis.startIndex=index;\n\t\t\tif (complete)complete.run();\n\t\t}\n\t}\n\n\t/**@private */\n\t__proto._setCellChanged=function(){\n\t\tif (!this._cellChanged){\n\t\t\tthis._cellChanged=true;\n\t\t\tthis.callLater(this.changeCells);\n\t\t}\n\t}\n\n\t__proto.commitMeasure=function(){\n\t\tthis.runCallLater(this.changeCells);\n\t}\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'cacheAs',_super.prototype._$get_cacheAs,function(value){\n\t\tLaya.superSet(Box,this,'cacheAs',value);\n\t\tif (this._scrollBar){\n\t\t\tthis._$P.cacheAs=null;\n\t\t\tif (value!==\"none\")this._scrollBar.on(/*laya.events.Event.START*/\"start\",this,this.onScrollStart);\n\t\t\telse this._scrollBar.off(/*laya.events.Event.START*/\"start\",this,this.onScrollStart);\n\t\t}\n\t});\n\n\t/**\n\t*获取对 <code>List</code> 组件所包含的内容容器 <code>Box</code> 组件的引用。\n\t*/\n\t__getset(0,__proto,'content',function(){\n\t\treturn this._content;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tif (value !=this._height){\n\t\t\tLaya.superSet(Box,this,'height',value);\n\t\t\tthis._setCellChanged();\n\t\t}\n\t});\n\n\t/**\n\t*单元格渲染器。\n\t*<p><b>取值：</b>\n\t*<ol>\n\t*<li>单元格类对象。</li>\n\t*<li> UI 的 JSON 描述。</li>\n\t*</ol></p>\n\t*/\n\t__getset(0,__proto,'itemRender',function(){\n\t\treturn this._itemRender;\n\t\t},function(value){\n\t\tif (this._itemRender !=value){\n\t\t\tthis._itemRender=value;\n\t\t\tfor (var i=this._cells.length-1;i >-1;i--){\n\t\t\t\tthis._cells[i].destroy();\n\t\t\t}\n\t\t\tthis._cells.length=0;\n\t\t\tthis._setCellChanged();\n\t\t}\n\t});\n\n\t/**\n\t*垂直方向滚动条皮肤。\n\t*/\n\t__getset(0,__proto,'vScrollBarSkin',function(){\n\t\treturn this._scrollBar ? this._scrollBar.skin :null;\n\t\t},function(value){\n\t\tthis._removePreScrollBar();\n\t\tvar scrollBar=new VScrollBar();\n\t\tscrollBar.name=\"scrollBar\";\n\t\tscrollBar.right=0;\n\t\tif (value && value !=\" \")\n\t\t\tscrollBar.skin=value;\n\t\tthis.scrollBar=scrollBar;\n\t\tthis.addChild(scrollBar);\n\t\tthis._setCellChanged();\n\t});\n\n\t/**\n\t*列表的当前页码。\n\t*/\n\t__getset(0,__proto,'page',function(){\n\t\treturn this._page;\n\t\t},function(value){\n\t\tthis._page=value\n\t\tif (this._array){\n\t\t\tthis._page=value > 0 ? value :0;\n\t\t\tthis._page=this._page < this.totalPage ? this._page :this.totalPage-1;\n\t\t\tthis.startIndex=this._page *this.repeatX *this.repeatY;\n\t\t}\n\t});\n\n\t/**\n\t*水平方向滚动条皮肤。\n\t*/\n\t__getset(0,__proto,'hScrollBarSkin',function(){\n\t\treturn this._scrollBar ? this._scrollBar.skin :null;\n\t\t},function(value){\n\t\tthis._removePreScrollBar();\n\t\tvar scrollBar=new HScrollBar();\n\t\tscrollBar.name=\"scrollBar\";\n\t\tscrollBar.bottom=0;\n\t\tif (value && value !=\" \")\n\t\t\tscrollBar.skin=value;\n\t\tthis.scrollBar=scrollBar;\n\t\tthis.addChild(scrollBar);\n\t\tthis._setCellChanged();\n\t});\n\n\t/**\n\t*水平方向显示的单元格数量。\n\t*/\n\t__getset(0,__proto,'repeatX',function(){\n\t\treturn this._repeatX > 0 ? this._repeatX :this._repeatX2 > 0 ? this._repeatX2 :1;\n\t\t},function(value){\n\t\tthis._repeatX=value;\n\t\tthis._setCellChanged();\n\t});\n\n\t/**\n\t*获取对 <code>List</code> 组件所包含的滚动条 <code>ScrollBar</code> 组件的引用。\n\t*/\n\t__getset(0,__proto,'scrollBar',function(){\n\t\treturn this._scrollBar;\n\t\t},function(value){\n\t\tif (this._scrollBar !=value){\n\t\t\tthis._scrollBar=value;\n\t\t\tif (value){\n\t\t\t\tthis._isVertical=this._scrollBar.isVertical;\n\t\t\t\tthis.addChild(this._scrollBar);\n\t\t\t\tthis._scrollBar.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onScrollBarChange);\n\t\t\t}\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tif (value !=this._width){\n\t\t\tLaya.superSet(Box,this,'width',value);\n\t\t\tthis._setCellChanged();\n\t\t}\n\t});\n\n\t/**\n\t*垂直方向显示的单元格数量。\n\t*/\n\t__getset(0,__proto,'repeatY',function(){\n\t\treturn this._repeatY > 0 ? this._repeatY :this._repeatY2 > 0 ? this._repeatY2 :1;\n\t\t},function(value){\n\t\tthis._repeatY=value;\n\t\tthis._setCellChanged();\n\t});\n\n\t/**\n\t*水平方向显示的单元格之间的间距（以像素为单位）。\n\t*/\n\t__getset(0,__proto,'spaceX',function(){\n\t\treturn this._spaceX;\n\t\t},function(value){\n\t\tthis._spaceX=value;\n\t\tthis._setCellChanged();\n\t});\n\n\t/**\n\t*垂直方向显示的单元格之间的间距（以像素为单位）。\n\t*/\n\t__getset(0,__proto,'spaceY',function(){\n\t\treturn this._spaceY;\n\t\t},function(value){\n\t\tthis._spaceY=value;\n\t\tthis._setCellChanged();\n\t});\n\n\t/**\n\t*表示当前选择的项索引。selectedIndex值更改会引起list重新渲染\n\t*/\n\t__getset(0,__proto,'selectedIndex',function(){\n\t\treturn this._selectedIndex;\n\t\t},function(value){\n\t\tif (this._selectedIndex !=value){\n\t\t\tthis._selectedIndex=value;\n\t\t\tthis.changeSelectStatus();\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t\tthis.selectHandler && this.selectHandler.runWith(value);\n\t\t\tthis.startIndex=this._startIndex;\n\t\t}\n\t});\n\n\t/**\n\t*当前选中的单元格数据源。\n\t*/\n\t__getset(0,__proto,'selectedItem',function(){\n\t\treturn this._selectedIndex !=-1 ? this._array[this._selectedIndex] :null;\n\t\t},function(value){\n\t\tthis.selectedIndex=this._array.indexOf(value);\n\t});\n\n\t/**\n\t*列表的数据总个数。\n\t*/\n\t__getset(0,__proto,'length',function(){\n\t\treturn this._array ? this._array.length :0;\n\t});\n\n\t/**\n\t*获取或设置当前选择的单元格对象。\n\t*/\n\t__getset(0,__proto,'selection',function(){\n\t\treturn this.getCell(this._selectedIndex);\n\t\t},function(value){\n\t\tthis.selectedIndex=this._startIndex+this._cells.indexOf(value);\n\t});\n\n\t/**\n\t*当前显示的单元格列表的开始索引。\n\t*/\n\t__getset(0,__proto,'startIndex',function(){\n\t\treturn this._startIndex;\n\t\t},function(value){\n\t\tthis._startIndex=value > 0 ? value :0;\n\t\tthis.callLater(this.renderItems);\n\t});\n\n\t/**\n\t*列表数据源。\n\t*/\n\t__getset(0,__proto,'array',function(){\n\t\treturn this._array;\n\t\t},function(value){\n\t\tthis.runCallLater(this.changeCells);\n\t\tthis._array=value || [];\n\t\tvar length=this._array.length;\n\t\tthis.totalPage=Math.ceil(length / (this.repeatX *this.repeatY));\n\t\tthis._selectedIndex=this._selectedIndex < length ? this._selectedIndex :length-1;\n\t\tthis.startIndex=this._startIndex;\n\t\tif (this._scrollBar){\n\t\t\tthis._scrollBar.stopScroll();\n\t\t\tvar numX=this._isVertical ? this.repeatX :this.repeatY;\n\t\t\tvar numY=this._isVertical ? this.repeatY :this.repeatX;\n\t\t\tvar lineCount=Math.ceil(length / numX);\n\t\t\tvar total=this._cellOffset > 0 ? this.totalPage+1 :this.totalPage;\n\t\t\tif (total > 1){\n\t\t\t\tthis._scrollBar.scrollSize=this._cellSize;\n\t\t\t\tthis._scrollBar.thumbPercent=numY / lineCount;\n\t\t\t\tthis._scrollBar.setScroll(0,(lineCount-numY)*this._cellSize+this._cellOffset,this._scrollBar.value);\n\t\t\t\tthis._scrollBar.target=this._content;\n\t\t\t\t}else {\n\t\t\t\tthis._scrollBar.setScroll(0,0,0);\n\t\t\t\tthis._scrollBar.target=this._content;\n\t\t\t}\n\t\t}\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif (((typeof value=='number')&& Math.floor(value)==value)|| (typeof value=='string'))this.selectedIndex=parseInt(value);\n\t\telse if ((value instanceof Array))this.array=value\n\t\telse Laya.superSet(Box,this,'dataSource',value);\n\t});\n\n\t/**\n\t*单元格集合。\n\t*/\n\t__getset(0,__proto,'cells',function(){\n\t\tthis.runCallLater(this.changeCells);\n\t\treturn this._cells;\n\t});\n\n\treturn List;\n})(Box)\n\n\n/**\n*使用 <code>HScrollBar</code> （水平 <code>ScrollBar</code> ）控件，可以在因数据太多而不能在显示区域完全显示时控制显示的数据部分。\n*@example <caption>以下示例代码，创建了一个 <code>HScrollBar</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.HScrollBar;\n\t*import laya.utils.Handler;\n\t*public class HScrollBar_Example\n\t*{\n\t\t*private var hScrollBar:HScrollBar;\n\t\t*public function HScrollBar_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/hscroll.png\",\"resource/ui/hscroll$bar.png\",\"resource/ui/hscroll$down.png\",\"resource/ui/hscroll$up.png\"],Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*hScrollBar=new HScrollBar();//创建一个 HScrollBar 类的实例对象 hScrollBar 。\n\t\t\t*hScrollBar.skin=\"resource/ui/hscroll.png\";//设置 hScrollBar 的皮肤。\n\t\t\t*hScrollBar.x=100;//设置 hScrollBar 对象的属性 x 的值，用于控制 hScrollBar 对象的显示位置。\n\t\t\t*hScrollBar.y=100;//设置 hScrollBar 对象的属性 y 的值，用于控制 hScrollBar 对象的显示位置。\n\t\t\t*hScrollBar.changeHandler=new Handler(this,onChange);//设置 hScrollBar 的滚动变化处理器。\n\t\t\t*Laya.stage.addChild(hScrollBar);//将此 hScrollBar 对象添加到显示列表。\n\t\t\t*}\n\t\t*private function onChange(value:Number):void\n\t\t*{\n\t\t\t*trace(\"滚动条的位置： value=\"+value);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*var hScrollBar;\n*var res=[\"resource/ui/hscroll.png\",\"resource/ui/hscroll$bar.png\",\"resource/ui/hscroll$down.png\",\"resource/ui/hscroll$up.png\"];\n*Laya.loader.load(res,laya.utils.Handler.create(this,onLoadComplete));//加载资源。\n*function onLoadComplete(){\n\t*console.log(\"资源加载完成！\");\n\t*hScrollBar=new laya.ui.HScrollBar();//创建一个 HScrollBar 类的实例对象 hScrollBar 。\n\t*hScrollBar.skin=\"resource/ui/hscroll.png\";//设置 hScrollBar 的皮肤。\n\t*hScrollBar.x=100;//设置 hScrollBar 对象的属性 x 的值，用于控制 hScrollBar 对象的显示位置。\n\t*hScrollBar.y=100;//设置 hScrollBar 对象的属性 y 的值，用于控制 hScrollBar 对象的显示位置。\n\t*hScrollBar.changeHandler=new laya.utils.Handler(this,onChange);//设置 hScrollBar 的滚动变化处理器。\n\t*Laya.stage.addChild(hScrollBar);//将此 hScrollBar 对象添加到显示列表。\n\t*}\n*function onChange(value)\n*{\n\t*console.log(\"滚动条的位置： value=\"+value);\n\t*}\n*@example\n*import HScrollBar=laya.ui.HScrollBar;\n*import Handler=laya.utils.Handler;\n*class HScrollBar_Example {\n\t*private hScrollBar:HScrollBar;\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/hscroll.png\",\"resource/ui/hscroll$bar.png\",\"resource/ui/hscroll$down.png\",\"resource/ui/hscroll$up.png\"],Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*this.hScrollBar=new HScrollBar();//创建一个 HScrollBar 类的实例对象 hScrollBar 。\n\t\t*this.hScrollBar.skin=\"resource/ui/hscroll.png\";//设置 hScrollBar 的皮肤。\n\t\t*this.hScrollBar.x=100;//设置 hScrollBar 对象的属性 x 的值，用于控制 hScrollBar 对象的显示位置。\n\t\t*this.hScrollBar.y=100;//设置 hScrollBar 对象的属性 y 的值，用于控制 hScrollBar 对象的显示位置。\n\t\t*this.hScrollBar.changeHandler=new Handler(this,this.onChange);//设置 hScrollBar 的滚动变化处理器。\n\t\t*Laya.stage.addChild(this.hScrollBar);//将此 hScrollBar 对象添加到显示列表。\n\t\t*}\n\t*private onChange(value:number):void {\n\t\t*console.log(\"滚动条的位置： value=\"+value);\n\t\t*}\n\t*}\n*/\n//class laya.ui.HScrollBar extends laya.ui.ScrollBar\nvar HScrollBar=(function(_super){\n\tfunction HScrollBar(){\n\t\tHScrollBar.__super.call(this);;\n\t}\n\n\t__class(HScrollBar,'laya.ui.HScrollBar',_super);\n\tvar __proto=HScrollBar.prototype;\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\t_super.prototype.initialize.call(this);\n\t\tthis.slider.isVertical=false;\n\t}\n\n\treturn HScrollBar;\n})(ScrollBar)\n\n\n/**\n*<code>Panel</code> 是一个面板容器类。\n*/\n//class laya.ui.Panel extends laya.ui.Box\nvar Panel=(function(_super){\n\tfunction Panel(){\n\t\t/**@private */\n\t\tthis._content=null;\n\t\t/**@private */\n\t\tthis._vScrollBar=null;\n\t\t/**@private */\n\t\tthis._hScrollBar=null;\n\t\t/**@private */\n\t\tthis._scrollChanged=false;\n\t\tPanel.__super.call(this);\n\t\tthis.width=this.height=100;\n\t}\n\n\t__class(Panel,'laya.ui.Panel',_super);\n\tvar __proto=Panel.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tlaya.ui.Component.prototype.destroy.call(this,destroyChild);\n\t\tthis._content && this._content.destroy(destroyChild);\n\t\tthis._vScrollBar && this._vScrollBar.destroy(destroyChild);\n\t\tthis._hScrollBar && this._hScrollBar.destroy(destroyChild);\n\t\tthis._vScrollBar=null;\n\t\tthis._hScrollBar=null;\n\t\tthis._content=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.destroyChildren=function(){\n\t\tthis._content.destroyChildren();\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tlaya.display.Node.prototype.addChild.call(this,this._content=new Box());\n\t}\n\n\t/**@inheritDoc */\n\t__proto.addChild=function(child){\n\t\tchild.on(/*laya.events.Event.RESIZE*/\"resize\",this,this.onResize);\n\t\tthis._setScrollChanged();\n\t\treturn this._content.addChild(child);\n\t}\n\n\t/**\n\t*@private\n\t*子对象的 <code>Event.RESIZE</code> 事件侦听处理函数。\n\t*/\n\t__proto.onResize=function(){\n\t\tthis._setScrollChanged();\n\t}\n\n\t/**@inheritDoc */\n\t__proto.addChildAt=function(child,index){\n\t\tchild.on(/*laya.events.Event.RESIZE*/\"resize\",this,this.onResize);\n\t\tthis._setScrollChanged();\n\t\treturn this._content.addChildAt(child,index);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.removeChild=function(child){\n\t\tchild.off(/*laya.events.Event.RESIZE*/\"resize\",this,this.onResize);\n\t\tthis._setScrollChanged();\n\t\treturn this._content.removeChild(child);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.removeChildAt=function(index){\n\t\tthis.getChildAt(index).off(/*laya.events.Event.RESIZE*/\"resize\",this,this.onResize);\n\t\tthis._setScrollChanged();\n\t\treturn this._content.removeChildAt(index);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.removeChildren=function(beginIndex,endIndex){\n\t\t(beginIndex===void 0)&& (beginIndex=0);\n\t\t(endIndex===void 0)&& (endIndex=0x7fffffff);\n\t\tthis._content.removeChildren(beginIndex,endIndex);\n\t\tthis._setScrollChanged();\n\t\treturn this;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.getChildAt=function(index){\n\t\treturn this._content.getChildAt(index);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.getChildByName=function(name){\n\t\treturn this._content.getChildByName(name);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.getChildIndex=function(child){\n\t\treturn this._content.getChildIndex(child);\n\t}\n\n\t/**@private */\n\t__proto.changeScroll=function(){\n\t\tthis._scrollChanged=false;\n\t\tvar contentW=this.contentWidth || 1;\n\t\tvar contentH=this.contentHeight || 1;\n\t\tvar vscroll=this._vScrollBar;\n\t\tvar hscroll=this._hScrollBar;\n\t\tvar vShow=vscroll && contentH > this._height;\n\t\tvar hShow=hscroll && contentW > this._width;\n\t\tvar showWidth=vShow ? this._width-vscroll.width :this._width;\n\t\tvar showHeight=hShow ? this._height-hscroll.height :this._height;\n\t\tif (vscroll){\n\t\t\tvscroll.x=this._width-vscroll.width;\n\t\t\tvscroll.y=0;\n\t\t\tvscroll.height=this._height-(hShow ? hscroll.height :0);\n\t\t\tvscroll.scrollSize=Math.max(this._height *0.033,1);\n\t\t\tvscroll.thumbPercent=showHeight / contentH;\n\t\t\tvscroll.setScroll(0,contentH-showHeight,vscroll.value);\n\t\t}\n\t\tif (hscroll){\n\t\t\thscroll.x=0;\n\t\t\thscroll.y=this._height-hscroll.height;\n\t\t\thscroll.width=this._width-(vShow ? vscroll.width :0);\n\t\t\thscroll.scrollSize=Math.max(this._width *0.033,1);\n\t\t\thscroll.thumbPercent=showWidth / contentW;\n\t\t\thscroll.setScroll(0,contentW-showWidth,hscroll.value);\n\t\t}\n\t}\n\n\t/**@inheritDoc */\n\t__proto.changeSize=function(){\n\t\tlaya.ui.Component.prototype.changeSize.call(this);\n\t\tthis.setContentSize(this._width,this._height);\n\t}\n\n\t/**\n\t*@private\n\t*设置内容的宽度、高度（以像素为单位）。\n\t*@param width 宽度。\n\t*@param height 高度。\n\t*/\n\t__proto.setContentSize=function(width,height){\n\t\tvar content=this._content;\n\t\tcontent.width=width;\n\t\tcontent.height=height;\n\t\tcontent.scrollRect || (content.scrollRect=new Rectangle());\n\t\tcontent.scrollRect.setTo(0,0,width,height);\n\t\tcontent.scrollRect=content.scrollRect;\n\t}\n\n\t/**\n\t*@private\n\t*滚动条的<code><code>Event.MOUSE_DOWN</code>事件侦听处理函数。</code>事件侦听处理函数。\n\t*@param scrollBar 滚动条对象。\n\t*@param e Event 对象。\n\t*/\n\t__proto.onScrollBarChange=function(scrollBar){\n\t\tvar rect=this._content.scrollRect;\n\t\tif (rect){\n\t\t\tvar start=Math.round(scrollBar.value);\n\t\t\tscrollBar.isVertical ? rect.y=start :rect.x=start;\n\t\t\tthis._content.scrollRect=rect;\n\t\t}\n\t}\n\n\t/**\n\t*<p>滚动内容容器至设定的垂直、水平方向滚动条位置。</p>\n\t*@param x 水平方向滚动条属性value值。滚动条位置数字。\n\t*@param y 垂直方向滚动条属性value值。滚动条位置数字。\n\t*/\n\t__proto.scrollTo=function(x,y){\n\t\t(x===void 0)&& (x=0);\n\t\t(y===void 0)&& (y=0);\n\t\tif (this.vScrollBar)this.vScrollBar.value=y;\n\t\tif (this.hScrollBar)this.hScrollBar.value=x;\n\t}\n\n\t/**\n\t*刷新滚动内容。\n\t*/\n\t__proto.refresh=function(){\n\t\tthis.changeScroll();\n\t}\n\n\t__proto.onScrollStart=function(){\n\t\tthis._$P.cacheAs || (this._$P.cacheAs=Laya.superGet(Box,this,'cacheAs'));\n\t\tLaya.superSet(Box,this,'cacheAs',\"none\");\n\t\tthis._hScrollBar && this._hScrollBar.once(/*laya.events.Event.END*/\"end\",this,this.onScrollEnd);\n\t\tthis._vScrollBar && this._vScrollBar.once(/*laya.events.Event.END*/\"end\",this,this.onScrollEnd);\n\t}\n\n\t__proto.onScrollEnd=function(){\n\t\tLaya.superSet(Box,this,'cacheAs',this._$P.cacheAs);\n\t}\n\n\t/**@private */\n\t__proto._setScrollChanged=function(){\n\t\tif (!this._scrollChanged){\n\t\t\tthis._scrollChanged=true;\n\t\t\tthis.callLater(this.changeScroll);\n\t\t}\n\t}\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'numChildren',function(){\n\t\treturn this._content.numChildren;\n\t});\n\n\t/**\n\t*水平方向滚动条皮肤。\n\t*/\n\t__getset(0,__proto,'hScrollBarSkin',function(){\n\t\treturn this._hScrollBar ? this._hScrollBar.skin :null;\n\t\t},function(value){\n\t\tif (this._hScrollBar==null){\n\t\t\tlaya.display.Node.prototype.addChild.call(this,this._hScrollBar=new HScrollBar());\n\t\t\tthis._hScrollBar.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onScrollBarChange,[this._hScrollBar]);\n\t\t\tthis._hScrollBar.target=this._content;\n\t\t\tthis._setScrollChanged();\n\t\t}\n\t\tthis._hScrollBar.skin=value;\n\t});\n\n\t/**\n\t*@private\n\t*获取内容宽度（以像素为单位）。\n\t*/\n\t__getset(0,__proto,'contentWidth',function(){\n\t\tvar max=0;\n\t\tfor (var i=this._content.numChildren-1;i >-1;i--){\n\t\t\tvar comp=this._content.getChildAt(i);\n\t\t\tmax=Math.max(comp.x+comp.width *comp.scaleX,max);\n\t\t}\n\t\treturn max;\n\t});\n\n\t/**\n\t*@private\n\t*获取内容高度（以像素为单位）。\n\t*/\n\t__getset(0,__proto,'contentHeight',function(){\n\t\tvar max=0;\n\t\tfor (var i=this._content.numChildren-1;i >-1;i--){\n\t\t\tvar comp=this._content.getChildAt(i);\n\t\t\tmax=Math.max(comp.y+comp.height *comp.scaleY,max);\n\t\t}\n\t\treturn max;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Box,this,'width',value);\n\t\tthis._setScrollChanged();\n\t});\n\n\t/**\n\t*水平方向滚动条对象。\n\t*/\n\t__getset(0,__proto,'hScrollBar',function(){\n\t\treturn this._hScrollBar;\n\t});\n\n\t/**\n\t*获取内容容器对象。\n\t*/\n\t__getset(0,__proto,'content',function(){\n\t\treturn this._content;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Box,this,'height',value);\n\t\tthis._setScrollChanged();\n\t});\n\n\t/**\n\t*垂直方向滚动条皮肤。\n\t*/\n\t__getset(0,__proto,'vScrollBarSkin',function(){\n\t\treturn this._vScrollBar ? this._vScrollBar.skin :null;\n\t\t},function(value){\n\t\tif (this._vScrollBar==null){\n\t\t\tlaya.display.Node.prototype.addChild.call(this,this._vScrollBar=new VScrollBar());\n\t\t\tthis._vScrollBar.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onScrollBarChange,[this._vScrollBar]);\n\t\t\tthis._vScrollBar.target=this._content;\n\t\t\tthis._setScrollChanged();\n\t\t}\n\t\tthis._vScrollBar.skin=value;\n\t});\n\n\t/**\n\t*垂直方向滚动条对象。\n\t*/\n\t__getset(0,__proto,'vScrollBar',function(){\n\t\treturn this._vScrollBar;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'cacheAs',_super.prototype._$get_cacheAs,function(value){\n\t\tLaya.superSet(Box,this,'cacheAs',value);\n\t\tthis._$P.cacheAs=null;\n\t\tif (value!==\"none\"){\n\t\t\tthis._hScrollBar && this._hScrollBar.on(/*laya.events.Event.START*/\"start\",this,this.onScrollStart);\n\t\t\tthis._vScrollBar && this._vScrollBar.on(/*laya.events.Event.START*/\"start\",this,this.onScrollStart);\n\t\t\t}else {\n\t\t\tthis._hScrollBar && this._hScrollBar.off(/*laya.events.Event.START*/\"start\",this,this.onScrollStart);\n\t\t\tthis._vScrollBar && this._vScrollBar.off(/*laya.events.Event.START*/\"start\",this,this.onScrollStart);\n\t\t}\n\t});\n\n\treturn Panel;\n})(Box)\n\n\n/**\n*使用 <code>HSlider</code> 控件，用户可以通过在滑块轨道的终点之间移动滑块来选择值。\n*<p> <code>HSlider</code> 控件采用水平方向。滑块轨道从左向右扩展，而标签位于轨道的顶部或底部。</p>\n*\n*@example <caption>以下示例代码，创建了一个 <code>HSlider</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.HSlider;\n\t*import laya.utils.Handler;\n\t*public class HSlider_Example\n\t*{\n\t\t*private var hSlider:HSlider;\n\t\t*public function HSlider_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/hslider.png\",\"resource/ui/hslider$bar.png\"],Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*hSlider=new HSlider();//创建一个 HSlider 类的实例对象 hSlider 。\n\t\t\t*hSlider.skin=\"resource/ui/hslider.png\";//设置 hSlider 的皮肤。\n\t\t\t*hSlider.min=0;//设置 hSlider 最低位置值。\n\t\t\t*hSlider.max=10;//设置 hSlider 最高位置值。\n\t\t\t*hSlider.value=2;//设置 hSlider 当前位置值。\n\t\t\t*hSlider.tick=1;//设置 hSlider 刻度值。\n\t\t\t*hSlider.x=100;//设置 hSlider 对象的属性 x 的值，用于控制 hSlider 对象的显示位置。\n\t\t\t*hSlider.y=100;//设置 hSlider 对象的属性 y 的值，用于控制 hSlider 对象的显示位置。\n\t\t\t*hSlider.changeHandler=new Handler(this,onChange);//设置 hSlider 位置变化处理器。\n\t\t\t*Laya.stage.addChild(hSlider);//把 hSlider 添加到显示列表。\n\t\t\t*}\n\t\t*private function onChange(value:Number):void\n\t\t*{\n\t\t\t*trace(\"滑块的位置： value=\"+value);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800,\"canvas\");//设置游戏画布宽高、渲染模式\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*var hSlider;\n*var res=[\"resource/ui/hslider.png\",\"resource/ui/hslider$bar.png\"];\n*Laya.loader.load(res,laya.utils.Handler.create(this,onLoadComplete));\n*function onLoadComplete(){\n\t*console.log(\"资源加载完成！\");\n\t*hSlider=new laya.ui.HSlider();//创建一个 HSlider 类的实例对象 hSlider 。\n\t*hSlider.skin=\"resource/ui/hslider.png\";//设置 hSlider 的皮肤。\n\t*hSlider.min=0;//设置 hSlider 最低位置值。\n\t*hSlider.max=10;//设置 hSlider 最高位置值。\n\t*hSlider.value=2;//设置 hSlider 当前位置值。\n\t*hSlider.tick=1;//设置 hSlider 刻度值。\n\t*hSlider.x=100;//设置 hSlider 对象的属性 x 的值，用于控制 hSlider 对象的显示位置。\n\t*hSlider.y=100;//设置 hSlider 对象的属性 y 的值，用于控制 hSlider 对象的显示位置。\n\t*hSlider.changeHandler=new laya.utils.Handler(this,onChange);//设置 hSlider 位置变化处理器。\n\t*Laya.stage.addChild(hSlider);//把 hSlider 添加到显示列表。\n\t*}\n*function onChange(value)\n*{\n\t*console.log(\"滑块的位置： value=\"+value);\n\t*}\n*@example\n*import Handler=laya.utils.Handler;\n*import HSlider=laya.ui.HSlider;\n*class HSlider_Example {\n\t*private hSlider:HSlider;\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/hslider.png\",\"resource/ui/hslider$bar.png\"],Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*this.hSlider=new HSlider();//创建一个 HSlider 类的实例对象 hSlider 。\n\t\t*this.hSlider.skin=\"resource/ui/hslider.png\";//设置 hSlider 的皮肤。\n\t\t*this.hSlider.min=0;//设置 hSlider 最低位置值。\n\t\t*this.hSlider.max=10;//设置 hSlider 最高位置值。\n\t\t*this.hSlider.value=2;//设置 hSlider 当前位置值。\n\t\t*this.hSlider.tick=1;//设置 hSlider 刻度值。\n\t\t*this.hSlider.x=100;//设置 hSlider 对象的属性 x 的值，用于控制 hSlider 对象的显示位置。\n\t\t*this.hSlider.y=100;//设置 hSlider 对象的属性 y 的值，用于控制 hSlider 对象的显示位置。\n\t\t*this.hSlider.changeHandler=new Handler(this,this.onChange);//设置 hSlider 位置变化处理器。\n\t\t*Laya.stage.addChild(this.hSlider);//把 hSlider 添加到显示列表。\n\t\t*}\n\t*private onChange(value:number):void {\n\t\t*console.log(\"滑块的位置： value=\"+value);\n\t\t*}\n\t*}\n*\n*@see laya.ui.Slider\n*/\n//class laya.ui.HSlider extends laya.ui.Slider\nvar HSlider=(function(_super){\n\t/**\n\t*创建一个 <code>HSlider</code> 类实例。\n\t*@param skin 皮肤。\n\t*/\n\tfunction HSlider(skin){\n\t\tHSlider.__super.call(this,skin);\n\t\tthis.isVertical=false;\n\t}\n\n\t__class(HSlider,'laya.ui.HSlider',_super);\n\treturn HSlider;\n})(Slider)\n\n\n/**\n*<code>Group</code> 是一个可以自动布局的项集合控件。\n*<p> <code>Group</code> 的默认项对象为 <code>Button</code> 类实例。\n*<code>Group</code> 是 <code>Tab</code> 和 <code>RadioGroup</code> 的基类。</p>\n*/\n//class laya.ui.UIGroup extends laya.ui.Box\nvar UIGroup=(function(_super){\n\tfunction UIGroup(labels,skin){\n\t\t/**\n\t\t*改变 <code>Group</code> 的选择项时执行的处理器，(默认返回参数： 项索引（index:int）)。\n\t\t*/\n\t\tthis.selectHandler=null;\n\t\t/**@private */\n\t\tthis._items=null;\n\t\t/**@private */\n\t\tthis._selectedIndex=-1;\n\t\t/**@private */\n\t\tthis._skin=null;\n\t\t/**@private */\n\t\tthis._direction=\"horizontal\";\n\t\t/**@private */\n\t\tthis._space=0;\n\t\t/**@private */\n\t\tthis._labels=null;\n\t\t/**@private */\n\t\tthis._labelColors=null;\n\t\t/**@private */\n\t\tthis._labelFont=null;\n\t\t/**@private */\n\t\tthis._labelStrokeColor=null;\n\t\t/**@private */\n\t\tthis._strokeColors=null;\n\t\t/**@private */\n\t\tthis._labelStroke=NaN;\n\t\t/**@private */\n\t\tthis._labelSize=0;\n\t\t/**@private */\n\t\tthis._labelBold=false;\n\t\t/**@private */\n\t\tthis._labelPadding=null;\n\t\t/**@private */\n\t\tthis._labelAlign=null;\n\t\t/**@private */\n\t\tthis._stateNum=0;\n\t\t/**@private */\n\t\tthis._labelChanged=false;\n\t\tUIGroup.__super.call(this);\n\t\tthis.skin=skin;\n\t\tthis.labels=labels;\n\t}\n\n\t__class(UIGroup,'laya.ui.UIGroup',_super);\n\tvar __proto=UIGroup.prototype;\n\tLaya.imps(__proto,{\"laya.ui.IItem\":true})\n\t/**@inheritDoc */\n\t__proto.preinitialize=function(){\n\t\tthis.mouseEnabled=true;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tlaya.ui.Component.prototype.destroy.call(this,destroyChild);\n\t\tthis._items && (this._items.length=0);\n\t\tthis._items=null;\n\t\tthis.selectHandler=null;\n\t}\n\n\t/**\n\t*添加一个项对象，返回此项对象的索引id。\n\t*\n\t*@param item 需要添加的项对象。\n\t*@param autoLayOut 是否自动布局，如果为true，会根据 <code>direction</code> 和 <code>space</code> 属性计算item的位置。\n\t*@return\n\t*/\n\t__proto.addItem=function(item,autoLayOut){\n\t\t(autoLayOut===void 0)&& (autoLayOut=true);\n\t\tvar display=item;\n\t\tvar index=this._items.length;\n\t\tdisplay.name=\"item\"+index;\n\t\tthis.addChild(display);\n\t\tthis.initItems();\n\t\tif (autoLayOut && index > 0){\n\t\t\tvar preItem=this._items [index-1];\n\t\t\tif (this._direction==\"horizontal\"){\n\t\t\t\tdisplay.x=preItem.x+preItem.width+this._space;\n\t\t\t\t}else {\n\t\t\t\tdisplay.y=preItem.y+preItem.height+this._space;\n\t\t\t}\n\t\t\t}else {\n\t\t\tif (autoLayOut){\n\t\t\t\tdisplay.x=0;\n\t\t\t\tdisplay.y=0;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}\n\n\t/**\n\t*删除一个项对象。\n\t*@param item 需要删除的项对象。\n\t*@param autoLayOut 是否自动布局，如果为true，会根据 <code>direction</code> 和 <code>space</code> 属性计算item的位置。\n\t*/\n\t__proto.delItem=function(item,autoLayOut){\n\t\t(autoLayOut===void 0)&& (autoLayOut=true);\n\t\tvar index=this._items.indexOf(item);\n\t\tif (index !=-1){\n\t\t\tvar display=item;\n\t\t\tthis.removeChild(display);\n\t\t\tfor (var i=index+1,n=this._items.length;i < n;i++){\n\t\t\t\tvar child=this._items [i];\n\t\t\t\tchild.name=\"item\"+(i-1);\n\t\t\t\tif (autoLayOut){\n\t\t\t\t\tif (this._direction==\"horizontal\"){\n\t\t\t\t\t\tchild.x-=display.width+this._space;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\tchild.y-=display.height+this._space;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.initItems();\n\t\t\tif (this._selectedIndex >-1){\n\t\t\t\tvar newIndex=0;\n\t\t\t\tnewIndex=this._selectedIndex < this._items.length ? this._selectedIndex :(this._selectedIndex-1);\n\t\t\t\tthis._selectedIndex=-1;\n\t\t\t\tthis.selectedIndex=newIndex;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*初始化项对象们。\n\t*/\n\t__proto.initItems=function(){\n\t\tthis._items || (this._items=[]);\n\t\tthis._items.length=0;\n\t\tfor (var i=0;i < 10000;i++){\n\t\t\tvar item=this.getChildByName(\"item\"+i);\n\t\t\tif (item==null)break ;\n\t\t\tthis._items.push(item);\n\t\t\titem.selected=(i===this._selectedIndex);\n\t\t\titem.clickHandler=Handler.create(this,this.itemClick,[i],false);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*项对象的点击事件侦听处理函数。\n\t*@param index 项索引。\n\t*/\n\t__proto.itemClick=function(index){\n\t\tthis.selectedIndex=index;\n\t}\n\n\t/**\n\t*@private\n\t*通过对象的索引设置项对象的 <code>selected</code> 属性值。\n\t*@param index 需要设置的项对象的索引。\n\t*@param selected 表示项对象的选中状态。\n\t*/\n\t__proto.setSelect=function(index,selected){\n\t\tif (this._items && index >-1 && index < this._items.length)this._items[index].selected=selected;\n\t}\n\n\t/**\n\t*@private\n\t*创建一个项显示对象。\n\t*@param skin 项对象的皮肤。\n\t*@param label 项对象标签。\n\t*/\n\t__proto.createItem=function(skin,label){\n\t\treturn null;\n\t}\n\n\t/**\n\t*@private\n\t*更改项对象的属性值。\n\t*/\n\t__proto.changeLabels=function(){\n\t\tthis._labelChanged=false;\n\t\tif (this._items){\n\t\t\tvar left=0\n\t\t\tfor (var i=0,n=this._items.length;i < n;i++){\n\t\t\t\tvar btn=this._items [i];\n\t\t\t\tthis._skin && (btn.skin=this._skin);\n\t\t\t\tthis._labelColors && (btn.labelColors=this._labelColors);\n\t\t\t\tthis._labelSize && (btn.labelSize=this._labelSize);\n\t\t\t\tthis._labelStroke && (btn.labelStroke=this._labelStroke);\n\t\t\t\tthis._labelStrokeColor && (btn.labelStrokeColor=this._labelStrokeColor);\n\t\t\t\tthis._strokeColors && (btn.strokeColors=this._strokeColors);\n\t\t\t\tthis._labelBold && (btn.labelBold=this._labelBold);\n\t\t\t\tthis._labelPadding && (btn.labelPadding=this._labelPadding);\n\t\t\t\tthis._labelAlign && (btn.labelAlign=this._labelAlign);\n\t\t\t\tthis._stateNum && (btn.stateNum=this._stateNum);\n\t\t\t\tthis._labelFont && (btn.labelFont=this._labelFont);\n\t\t\t\tif (this._direction===\"horizontal\"){\n\t\t\t\t\tbtn.y=0;\n\t\t\t\t\tbtn.x=left;\n\t\t\t\t\tleft+=btn.width+this._space;\n\t\t\t\t\t}else {\n\t\t\t\t\tbtn.x=0;\n\t\t\t\t\tbtn.y=left;\n\t\t\t\t\tleft+=btn.height+this._space;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.changeSize();\n\t}\n\n\t/**@inheritDoc */\n\t__proto.commitMeasure=function(){\n\t\tthis.runCallLater(this.changeLabels);\n\t}\n\n\t/**@private */\n\t__proto._setLabelChanged=function(){\n\t\tif (!this._labelChanged){\n\t\t\tthis._labelChanged=true;\n\t\t\tthis.callLater(this.changeLabels);\n\t\t}\n\t}\n\n\t/**\n\t*<p>描边颜色，以字符串表示。</p>\n\t*默认值为 \"#000000\"（黑色）;\n\t*@see laya.display.Text.strokeColor()\n\t*/\n\t__getset(0,__proto,'labelStrokeColor',function(){\n\t\treturn this._labelStrokeColor;\n\t\t},function(value){\n\t\tif (this._labelStrokeColor !=value){\n\t\t\tthis._labelStrokeColor=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*@copy laya.ui.Image#skin\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._skin;\n\t\t},function(value){\n\t\tif (this._skin !=value){\n\t\t\tthis._skin=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*表示当前选择的项索引。默认值为-1。\n\t*/\n\t__getset(0,__proto,'selectedIndex',function(){\n\t\treturn this._selectedIndex;\n\t\t},function(value){\n\t\tif (this._selectedIndex !=value){\n\t\t\tthis.setSelect(this._selectedIndex,false);\n\t\t\tthis._selectedIndex=value;\n\t\t\tthis.setSelect(value,true);\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t\tthis.selectHandler && this.selectHandler.runWith(this._selectedIndex);\n\t\t}\n\t});\n\n\t/**\n\t*标签集合字符串。以逗号做分割，如\"item0,item1,item2,item3,item4,item5\"。\n\t*/\n\t__getset(0,__proto,'labels',function(){\n\t\treturn this._labels;\n\t\t},function(value){\n\t\tif (this._labels !=value){\n\t\t\tthis._labels=value;\n\t\t\tthis.removeChildren();\n\t\t\tthis._setLabelChanged();\n\t\t\tif (this._labels){\n\t\t\t\tvar a=this._labels.split(\",\");\n\t\t\t\tfor (var i=0,n=a.length;i < n;i++){\n\t\t\t\t\tvar item=this.createItem(this._skin,a[i]);\n\t\t\t\t\titem.name=\"item\"+i;\n\t\t\t\t\tthis.addChild(item);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.initItems();\n\t\t}\n\t});\n\n\t/**\n\t*<p>表示各个状态下的描边颜色。</p>\n\t*@see laya.display.Text.strokeColor()\n\t*/\n\t__getset(0,__proto,'strokeColors',function(){\n\t\treturn this._strokeColors;\n\t\t},function(value){\n\t\tif (this._strokeColors !=value){\n\t\t\tthis._strokeColors=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*@copy laya.ui.Button#labelColors()\n\t*/\n\t__getset(0,__proto,'labelColors',function(){\n\t\treturn this._labelColors;\n\t\t},function(value){\n\t\tif (this._labelColors !=value){\n\t\t\tthis._labelColors=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*<p>描边宽度（以像素为单位）。</p>\n\t*默认值0，表示不描边。\n\t*@see laya.display.Text.stroke()\n\t*/\n\t__getset(0,__proto,'labelStroke',function(){\n\t\treturn this._labelStroke;\n\t\t},function(value){\n\t\tif (this._labelStroke !=value){\n\t\t\tthis._labelStroke=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*表示按钮文本标签的字体大小。\n\t*/\n\t__getset(0,__proto,'labelSize',function(){\n\t\treturn this._labelSize;\n\t\t},function(value){\n\t\tif (this._labelSize !=value){\n\t\t\tthis._labelSize=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*表示按钮的状态值，以数字表示，默认为3态。\n\t*@see laya.ui.Button#stateNum\n\t*/\n\t__getset(0,__proto,'stateNum',function(){\n\t\treturn this._stateNum;\n\t\t},function(value){\n\t\tif (this._stateNum !=value){\n\t\t\tthis._stateNum=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*表示按钮文本标签是否为粗体字。\n\t*/\n\t__getset(0,__proto,'labelBold',function(){\n\t\treturn this._labelBold;\n\t\t},function(value){\n\t\tif (this._labelBold !=value){\n\t\t\tthis._labelBold=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*表示按钮文本标签的字体名称，以字符串形式表示。\n\t*@see laya.display.Text.font()\n\t*/\n\t__getset(0,__proto,'labelFont',function(){\n\t\treturn this._labelFont;\n\t\t},function(value){\n\t\tif (this._labelFont !=value){\n\t\t\tthis._labelFont=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*表示按钮文本标签的边距。\n\t*<p><b>格式：</b>\"上边距,右边距,下边距,左边距\"。</p>\n\t*/\n\t__getset(0,__proto,'labelPadding',function(){\n\t\treturn this._labelPadding;\n\t\t},function(value){\n\t\tif (this._labelPadding !=value){\n\t\t\tthis._labelPadding=value;\n\t\t\tthis._setLabelChanged();\n\t\t}\n\t});\n\n\t/**\n\t*布局方向。\n\t*<p>默认值为\"horizontal\"。</p>\n\t*<p><b>取值：</b>\n\t*<li>\"horizontal\"：表示水平布局。</li>\n\t*<li>\"vertical\"：表示垂直布局。</li>\n\t*</p>\n\t*/\n\t__getset(0,__proto,'direction',function(){\n\t\treturn this._direction;\n\t\t},function(value){\n\t\tthis._direction=value;\n\t\tthis._setLabelChanged();\n\t});\n\n\t/**\n\t*项对象们之间的间隔（以像素为单位）。\n\t*/\n\t__getset(0,__proto,'space',function(){\n\t\treturn this._space;\n\t\t},function(value){\n\t\tthis._space=value;\n\t\tthis._setLabelChanged();\n\t});\n\n\t/**\n\t*项对象们的存放数组。\n\t*/\n\t__getset(0,__proto,'items',function(){\n\t\treturn this._items;\n\t});\n\n\t/**\n\t*获取或设置当前选择的项对象。\n\t*/\n\t__getset(0,__proto,'selection',function(){\n\t\treturn this._selectedIndex >-1 && this._selectedIndex < this._items.length ? this._items[this._selectedIndex] :null;\n\t\t},function(value){\n\t\tthis.selectedIndex=this._items.indexOf(value);\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif (((typeof value=='number')&& Math.floor(value)==value)|| (typeof value=='string'))this.selectedIndex=parseInt(value);\n\t\telse if ((value instanceof Array))this.labels=(value).join(\",\");\n\t\telse Laya.superSet(Box,this,'dataSource',value);\n\t});\n\n\treturn UIGroup;\n})(Box)\n\n\n/**\n*<code>Radio</code> 控件使用户可在一组互相排斥的选择中做出一种选择。\n*用户一次只能选择 <code>Radio</code> 组中的一个成员。选择未选中的组成员将取消选择该组中当前所选的 <code>Radio</code> 控件。\n*@see laya.ui.RadioGroup\n*/\n//class laya.ui.Radio extends laya.ui.Button\nvar Radio=(function(_super){\n\tfunction Radio(skin,label){\n\t\t/**@private */\n\t\tthis._value=null;\n\t\t(label===void 0)&& (label=\"\");\n\t\tRadio.__super.call(this,skin,label);\n\t}\n\n\t__class(Radio,'laya.ui.Radio',_super);\n\tvar __proto=Radio.prototype;\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._value=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.preinitialize=function(){\n\t\tlaya.ui.Component.prototype.preinitialize.call(this);\n\t\tthis.toggle=false;\n\t\tthis._autoSize=false;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\t_super.prototype.initialize.call(this);\n\t\tthis.createText();\n\t\tthis._text.align=\"left\";\n\t\tthis._text.valign=\"top\";\n\t\tthis._text.width=0;\n\t\tthis.on(/*laya.events.Event.CLICK*/\"click\",this,this.onClick);\n\t}\n\n\t/**\n\t*@private\n\t*对象的<code>Event.CLICK</code>事件侦听处理函数。\n\t*/\n\t__proto.onClick=function(e){\n\t\tthis.selected=true;\n\t}\n\n\t/**\n\t*获取或设置 <code>Radio</code> 关联的可选用户定义值。\n\t*/\n\t__getset(0,__proto,'value',function(){\n\t\treturn this._value !=null ? this._value :this.label;\n\t\t},function(obj){\n\t\tthis._value=obj;\n\t});\n\n\treturn Radio;\n})(Button)\n\n\n/**\n*<code>Tree</code> 控件使用户可以查看排列为可扩展树的层次结构数据。\n*\n*@example\n*package\n*{\n\t*import laya.ui.Tree;\n\t*import laya.utils.Browser;\n\t*import laya.utils.Handler;\n\t*public class Tree_Example\n\t*{\n\t\t*public function Tree_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\",\"resource/ui/clip_selectBox.png\",\"resource/ui/clip_tree_folder.png\",\"resource/ui/clip_tree_arrow.png\"],Handler.create(this,onLoadComplete));\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*var xmlString:String;//创建一个xml字符串，用于存储树结构数据。\n\t\t\t*xmlString=\"&lt;root&gt;&lt;item label='box1'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;abc label='child5'/&gt;&lt;/item&gt;&lt;item label='box2'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;/item&gt;&lt;/root&gt;\";\n\t\t\t*var domParser:*=new Browser.window.DOMParser();//创建一个DOMParser实例domParser。\n\t\t\t*var xml:*=domParser.parseFromString(xmlString,\"text/xml\");//解析xml字符。\n\t\t\t*var tree:Tree=new Tree();//创建一个 Tree 类的实例对象 tree 。\n\t\t\t*tree.scrollBarSkin=\"resource/ui/vscroll.png\";//设置 tree 的皮肤。\n\t\t\t*tree.itemRender=Item;//设置 tree 的项渲染器。\n\t\t\t*tree.xml=xml;//设置 tree 的树结构数据。\n\t\t\t*tree.x=100;//设置 tree 对象的属性 x 的值，用于控制 tree 对象的显示位置。\n\t\t\t*tree.y=100;//设置 tree 对象的属性 y 的值，用于控制 tree 对象的显示位置。\n\t\t\t*tree.width=200;//设置 tree 的宽度。\n\t\t\t*tree.height=100;//设置 tree 的高度。\n\t\t\t*Laya.stage.addChild(tree);//将 tree 添加到显示列表。\n\t\t\t*}\n\t\t*}\n\t*}\n*import laya.ui.Box;\n*import laya.ui.Clip;\n*import laya.ui.Label;\n*class Item extends Box\n*{\n\t*public function Item()\n\t*{\n\t\t*this.name=\"render\";\n\t\t*this.right=0;\n\t\t*this.left=0;\n\t\t*var selectBox:Clip=new Clip(\"resource/ui/clip_selectBox.png\",1,2);\n\t\t*selectBox.name=\"selectBox\";\n\t\t*selectBox.height=24;\n\t\t*selectBox.x=13;\n\t\t*selectBox.y=0;\n\t\t*selectBox.left=12;\n\t\t*addChild(selectBox);\n\t\t*var folder:Clip=new Clip(\"resource/ui/clip_tree_folder.png\",1,3);\n\t\t*folder.name=\"folder\";\n\t\t*folder.x=14;\n\t\t*folder.y=4;\n\t\t*addChild(folder);\n\t\t*var label:Label=new Label(\"treeItem\");\n\t\t*label.name=\"label\";\n\t\t*label.color=\"#ffff00\";\n\t\t*label.width=150;\n\t\t*label.height=22;\n\t\t*label.x=33;\n\t\t*label.y=1;\n\t\t*label.left=33;\n\t\t*label.right=0;\n\t\t*addChild(label);\n\t\t*var arrow:Clip=new Clip(\"resource/ui/clip_tree_arrow.png\",1,2);\n\t\t*arrow.name=\"arrow\";\n\t\t*arrow.x=0;\n\t\t*arrow.y=5;\n\t\t*addChild(arrow);\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高、渲染模式\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*var res=[\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\",\"resource/ui/clip_selectBox.png\",\"resource/ui/clip_tree_folder.png\",\"resource/ui/clip_tree_arrow.png\"];\n*Laya.loader.load(res,new laya.utils.Handler(this,onLoadComplete));\n*function onLoadComplete(){\n\t*var xmlString;//创建一个xml字符串，用于存储树结构数据。\n\t*xmlString=\"&lt;root&gt;&lt;item label='box1'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;abc label='child5'/&gt;&lt;/item&gt;&lt;item label='box2'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;/item&gt;&lt;/root&gt;\";\n\t*var domParser=new laya.utils.Browser.window.DOMParser();//创建一个DOMParser实例domParser。\n\t*var xml=domParser.parseFromString(xmlString,\"text/xml\");//解析xml字符。\n\t*var tree=new laya.ui.Tree();//创建一个 Tree 类的实例对象 tree 。\n\t*tree.scrollBarSkin=\"resource/ui/vscroll.png\";//设置 tree 的皮肤。\n\t*tree.itemRender=mypackage.treeExample.Item;//设置 tree 的项渲染器。\n\t*tree.xml=xml;//设置 tree 的树结构数据。\n\t*tree.x=100;//设置 tree 对象的属性 x 的值，用于控制 tree 对象的显示位置。\n\t*tree.y=100;//设置 tree 对象的属性 y 的值，用于控制 tree 对象的显示位置。\n\t*tree.width=200;//设置 tree 的宽度。\n\t*tree.height=100;//设置 tree 的高度。\n\t*Laya.stage.addChild(tree);//将 tree 添加到显示列表。\n\t*}\n*(function (_super){\n\t*function Item(){\n\t\t*Item.__super.call(this);//初始化父类。\n\t\t*this.right=0;\n\t\t*this.left=0;\n\t\t*var selectBox=new laya.ui.Clip(\"resource/ui/clip_selectBox.png\",1,2);\n\t\t*selectBox.name=\"selectBox\";//设置 selectBox 的name 为“selectBox”时，将被识别为树结构的项的背景。2帧：悬停时背景、选中时背景。\n\t\t*selectBox.height=24;\n\t\t*selectBox.x=13;\n\t\t*selectBox.y=0;\n\t\t*selectBox.left=12;\n\t\t*this.addChild(selectBox);//需要使用this.访问父类的属性或方法。\n\t\t*var folder=new laya.ui.Clip(\"resource/ui/clip_tree_folder.png\",1,3);\n\t\t*folder.name=\"folder\";//设置 folder 的name 为“folder”时，将被识别为树结构的文件夹开启状态图表。2帧：折叠状态、打开状态。\n\t\t*folder.x=14;\n\t\t*folder.y=4;\n\t\t*this.addChild(folder);\n\t\t*var label=new laya.ui.Label(\"treeItem\");\n\t\t*label.name=\"label\";//设置 label 的name 为“label”时，此值将用于树结构数据赋值。\n\t\t*label.color=\"#ffff00\";\n\t\t*label.width=150;\n\t\t*label.height=22;\n\t\t*label.x=33;\n\t\t*label.y=1;\n\t\t*label.left=33;\n\t\t*label.right=0;\n\t\t*this.addChild(label);\n\t\t*var arrow=new laya.ui.Clip(\"resource/ui/clip_tree_arrow.png\",1,2);\n\t\t*arrow.name=\"arrow\";//设置 arrow 的name 为“arrow”时，将被识别为树结构的文件夹开启状态图表。2帧：折叠状态、打开状态。\n\t\t*arrow.x=0;\n\t\t*arrow.y=5;\n\t\t*this.addChild(arrow);\n\t\t*};\n\t*Laya.class(Item,\"mypackage.treeExample.Item\",_super);//注册类 Item 。\n\t*})(laya.ui.Box);\n*@example\n*import Tree=laya.ui.Tree;\n*import Browser=laya.utils.Browser;\n*import Handler=laya.utils.Handler;\n*class Tree_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\",\"resource/ui/vscroll$up.png\",\"resource/ui/clip_selectBox.png\",\"resource/ui/clip_tree_folder * . * png\",\"resource/ui/clip_tree_arrow.png\"],Handler.create(this,this.onLoadComplete));\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*var xmlString:String;//创建一个xml字符串，用于存储树结构数据。\n\t\t*xmlString=\"&lt;root&gt;&lt;item label='box1'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;abc label='child5'/&gt;&lt;/item&gt;&lt;item label='box2'&gt;&lt;abc  * label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;/item&gt;&lt;/root&gt;\";\n\t\t*var domParser:any=new Browser.window.DOMParser();//创建一个DOMParser实例domParser。\n\t\t*var xml:any=domParser.parseFromString(xmlString,\"text/xml\");//解析xml字符。\n\t\t*var tree:Tree=new Tree();//创建一个 Tree 类的实例对象 tree 。\n\t\t*tree.scrollBarSkin=\"resource/ui/vscroll.png\";//设置 tree 的皮肤。\n\t\t*tree.itemRender=Item;//设置 tree 的项渲染器。\n\t\t*tree.xml=xml;//设置 tree 的树结构数据。\n\t\t*tree.x=100;//设置 tree 对象的属性 x 的值，用于控制 tree 对象的显示位置。\n\t\t*tree.y=100;//设置 tree 对象的属性 y 的值，用于控制 tree 对象的显示位置。\n\t\t*tree.width=200;//设置 tree 的宽度。\n\t\t*tree.height=100;//设置 tree 的高度。\n\t\t*Laya.stage.addChild(tree);//将 tree 添加到显示列表。\n\t\t*}\n\t*}\n*import Box=laya.ui.Box;\n*import Clip=laya.ui.Clip;\n*import Label=laya.ui.Label;\n*class Item extends Box {\n\t*constructor(){\n\t\t*super();\n\t\t*this.name=\"render\";\n\t\t*this.right=0;\n\t\t*this.left=0;\n\t\t*var selectBox:Clip=new Clip(\"resource/ui/clip_selectBox.png\",1,2);\n\t\t*selectBox.name=\"selectBox\";\n\t\t*selectBox.height=24;\n\t\t*selectBox.x=13;\n\t\t*selectBox.y=0;\n\t\t*selectBox.left=12;\n\t\t*this.addChild(selectBox);\n\t\t*var folder:Clip=new Clip(\"resource/ui/clip_tree_folder.png\",1,3);\n\t\t*folder.name=\"folder\";\n\t\t*folder.x=14;\n\t\t*folder.y=4;\n\t\t*this.addChild(folder);\n\t\t*var label:Label=new Label(\"treeItem\");\n\t\t*label.name=\"label\";\n\t\t*label.color=\"#ffff00\";\n\t\t*label.width=150;\n\t\t*label.height=22;\n\t\t*label.x=33;\n\t\t*label.y=1;\n\t\t*label.left=33;\n\t\t*label.right=0;\n\t\t*this.addChild(label);\n\t\t*var arrow:Clip=new Clip(\"resource/ui/clip_tree_arrow.png\",1,2);\n\t\t*arrow.name=\"arrow\";\n\t\t*arrow.x=0;\n\t\t*arrow.y=5;\n\t\t*this.addChild(arrow);\n\t\t*}\n\t*}\n*/\n//class laya.ui.Tree extends laya.ui.Box\nvar Tree=(function(_super){\n\tfunction Tree(){\n\t\t/**@private */\n\t\tthis._list=null;\n\t\t/**@private */\n\t\tthis._source=null;\n\t\t/**@private */\n\t\tthis._renderHandler=null;\n\t\t/**@private */\n\t\tthis._spaceLeft=10;\n\t\t/**@private */\n\t\tthis._spaceBottom=0;\n\t\t/**@private */\n\t\tthis._keepStatus=true;\n\t\tTree.__super.call(this);\n\t\tthis.width=this.height=200;\n\t}\n\n\t__class(Tree,'laya.ui.Tree',_super);\n\tvar __proto=Tree.prototype;\n\tLaya.imps(__proto,{\"laya.ui.IRender\":true})\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tlaya.ui.Component.prototype.destroy.call(this,destroyChild);\n\t\tthis._list && this._list.destroy(destroyChild);\n\t\tthis._list=null;\n\t\tthis._source=null;\n\t\tthis._renderHandler=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._list=new List());\n\t\tthis._list.renderHandler=Handler.create(this,this.renderItem,null,false);\n\t\tthis._list.repeatX=1;\n\t\tthis._list.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onListChange);\n\t}\n\n\t/**\n\t*@private\n\t*此对象包含的<code>List</code>实例的<code>Event.CHANGE</code>事件侦听处理函数。\n\t*/\n\t__proto.onListChange=function(e){\n\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t}\n\n\t/**\n\t*@private\n\t*获取数据源集合。\n\t*/\n\t__proto.getArray=function(){\n\t\tvar arr=[];\n\t\tvar item;\n\t\t/*for each*/for(var $each_item in this._source){\n\t\t\titem=this._source[$each_item];\n\t\t\tif (this.getParentOpenStatus(item)){\n\t\t\t\titem.x=this._spaceLeft *this.getDepth(item);\n\t\t\t\tarr.push(item);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}\n\n\t/**\n\t*@private\n\t*获取项对象的深度。\n\t*/\n\t__proto.getDepth=function(item,num){\n\t\t(num===void 0)&& (num=0);\n\t\tif (item.nodeParent==null)return num;\n\t\telse return this.getDepth(item.nodeParent,num+1);\n\t}\n\n\t/**\n\t*@private\n\t*获取项对象的上一级的打开状态。\n\t*/\n\t__proto.getParentOpenStatus=function(item){\n\t\tvar parent=item.nodeParent;\n\t\tif (parent==null){\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\tif (parent.isOpen){\n\t\t\t\tif (parent.nodeParent !=null)return this.getParentOpenStatus(parent);\n\t\t\t\telse return true;\n\t\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*渲染一个项对象。\n\t*@param cell 一个项对象。\n\t*@param index 项的索引。\n\t*/\n\t__proto.renderItem=function(cell,index){\n\t\tvar item=cell.dataSource;\n\t\tif (item){\n\t\t\tcell.left=item.x;\n\t\t\tvar arrow=cell.getChildByName(\"arrow\");\n\t\t\tif (arrow){\n\t\t\t\tif (item.hasChild){\n\t\t\t\t\tarrow.visible=true;\n\t\t\t\t\tarrow.index=item.isOpen ? 1 :0;\n\t\t\t\t\tarrow.tag=index;\n\t\t\t\t\tarrow.off(/*laya.events.Event.CLICK*/\"click\",this,this.onArrowClick);\n\t\t\t\t\tarrow.on(/*laya.events.Event.CLICK*/\"click\",this,this.onArrowClick);\n\t\t\t\t\t}else {\n\t\t\t\t\tarrow.visible=false;\n\t\t\t\t}\n\t\t\t};\n\t\t\tvar folder=cell.getChildByName(\"folder\");\n\t\t\tif (folder){\n\t\t\t\tif (folder.clipY==2){\n\t\t\t\t\tfolder.index=item.isDirectory ? 0 :1;\n\t\t\t\t\t}else {\n\t\t\t\t\tfolder.index=item.isDirectory ? item.isOpen ? 1 :0 :2;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._renderHandler && this._renderHandler.runWith([cell,index]);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto.onArrowClick=function(e){\n\t\tvar arrow=e.currentTarget;\n\t\tvar index=arrow.tag;\n\t\tthis._list.array[index].isOpen=!this._list.array[index].isOpen;\n\t\tthis.event(/*laya.events.Event.OPEN*/\"open\");\n\t\tthis._list.array=this.getArray();\n\t}\n\n\t/**\n\t*设置指定项索引的项对象的打开状态。\n\t*@param index 项索引。\n\t*@param isOpen 是否处于打开状态。\n\t*/\n\t__proto.setItemState=function(index,isOpen){\n\t\tif (!this._list.array[index])return;\n\t\tthis._list.array[index].isOpen=isOpen;\n\t\tthis._list.array=this.getArray();\n\t}\n\n\t/**\n\t*刷新项列表。\n\t*/\n\t__proto.fresh=function(){\n\t\tthis._list.array=this.getArray();\n\t\tthis.repaint();\n\t}\n\n\t/**\n\t*@private\n\t*解析并处理XML类型的数据源。\n\t*/\n\t__proto.parseXml=function(xml,source,nodeParent,isRoot){\n\t\tvar obj;\n\t\tvar list=xml.childNodes;\n\t\tvar childCount=list.length;\n\t\tif (!isRoot){\n\t\t\tobj={};\n\t\t\tvar list2=xml.attributes;\n\t\t\tvar attrs;\n\t\t\t/*for each*/for(var $each_attrs in list2){\n\t\t\t\tattrs=list2[$each_attrs];\n\t\t\t\tvar prop=attrs.nodeName;\n\t\t\t\tvar value=attrs.nodeValue;\n\t\t\t\tobj[prop]=value==\"true\" ? true :value==\"false\" ? false :value;\n\t\t\t}\n\t\t\tobj.nodeParent=nodeParent;\n\t\t\tif (childCount > 0)obj.isDirectory=true;\n\t\t\tobj.hasChild=childCount > 0;\n\t\t\tsource.push(obj);\n\t\t}\n\t\tfor (var i=0;i < childCount;i++){\n\t\t\tvar node=list[i];\n\t\t\tthis.parseXml(node,source,obj,false);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*处理数据项的打开状态。\n\t*/\n\t__proto.parseOpenStatus=function(oldSource,newSource){\n\t\tfor (var i=0,n=newSource.length;i < n;i++){\n\t\t\tvar newItem=newSource[i];\n\t\t\tif (newItem.isDirectory){\n\t\t\t\tfor (var j=0,m=oldSource.length;j < m;j++){\n\t\t\t\t\tvar oldItem=oldSource[j];\n\t\t\t\t\tif (oldItem.isDirectory && this.isSameParent(oldItem,newItem)&& newItem.label==oldItem.label){\n\t\t\t\t\t\tnewItem.isOpen=oldItem.isOpen;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*判断两个项对象在树结构中的父节点是否相同。\n\t*@param item1 项对象。\n\t*@param item2 项对象。\n\t*@return 如果父节点相同值为true，否则值为false。\n\t*/\n\t__proto.isSameParent=function(item1,item2){\n\t\tif (item1.nodeParent==null && item2.nodeParent==null)return true;\n\t\telse if (item1.nodeParent==null || item2.nodeParent==null)return false\n\t\telse {\n\t\t\tif (item1.nodeParent.label==item2.nodeParent.label)return this.isSameParent(item1.nodeParent,item2.nodeParent);\n\t\t\telse return false;\n\t\t}\n\t}\n\n\t/**\n\t*更新项列表，显示指定键名的数据项。\n\t*@param key 键名。\n\t*/\n\t__proto.filter=function(key){\n\t\tif (Boolean(key)){\n\t\t\tvar result=[];\n\t\t\tthis.getFilterSource(this._source,result,key);\n\t\t\tthis._list.array=result;\n\t\t\t}else {\n\t\t\tthis._list.array=this.getArray();\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取数据源中指定键名的值。\n\t*/\n\t__proto.getFilterSource=function(array,result,key){\n\t\tkey=key.toLocaleLowerCase();\n\t\tvar item;\n\t\t/*for each*/for(var $each_item in array){\n\t\t\titem=array[$each_item];\n\t\t\tif (!item.isDirectory && String(item.label).toLowerCase().indexOf(key)>-1){\n\t\t\t\titem.x=0;\n\t\t\t\tresult.push(item);\n\t\t\t}\n\t\t\tif (item.child && item.child.length > 0){\n\t\t\t\tthis.getFilterSource(item.child,result,key);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*每一项之间的间隔距离（以像素为单位）。\n\t*/\n\t__getset(0,__proto,'spaceBottom',function(){\n\t\treturn this._list.spaceY;\n\t\t},function(value){\n\t\tthis._list.spaceY=value;\n\t});\n\n\t/**\n\t*数据源发生变化后，是否保持之前打开状态，默认为true。\n\t*<p><b>取值：</b>\n\t*<li>true：保持之前打开状态。</li>\n\t*<li>false：不保持之前打开状态。</li>\n\t*</p>\n\t*/\n\t__getset(0,__proto,'keepStatus',function(){\n\t\treturn this._keepStatus;\n\t\t},function(value){\n\t\tthis._keepStatus=value;\n\t});\n\n\t/**\n\t*此对象包含的<code>List</code>实例的单元格渲染器。\n\t*<p><b>取值：</b>\n\t*<ol>\n\t*<li>单元格类对象。</li>\n\t*<li> UI 的 JSON 描述。</li>\n\t*</ol></p>\n\t*/\n\t__getset(0,__proto,'itemRender',function(){\n\t\treturn this._list.itemRender;\n\t\t},function(value){\n\t\tthis._list.itemRender=value;\n\t});\n\n\t/**\n\t*列表数据源，只包含当前可视节点数据。\n\t*/\n\t__getset(0,__proto,'array',function(){\n\t\treturn this._list.array;\n\t\t},function(value){\n\t\tif (this._keepStatus && this._list.array && value){\n\t\t\tthis.parseOpenStatus(this._list.array,value);\n\t\t}\n\t\tthis._source=value;\n\t\tthis._list.array=this.getArray();\n\t});\n\n\t/**\n\t*单元格鼠标事件处理器。\n\t*<p>默认返回参数（e:Event,index:int）。</p>\n\t*/\n\t__getset(0,__proto,'mouseHandler',function(){\n\t\treturn this._list.mouseHandler;\n\t\t},function(value){\n\t\tthis._list.mouseHandler=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tLaya.superSet(Box,this,'dataSource',value);\n\t});\n\n\t/**\n\t*数据源，全部节点数据。\n\t*/\n\t__getset(0,__proto,'source',function(){\n\t\treturn this._source;\n\t});\n\n\t/**滚动条*/\n\t__getset(0,__proto,'scrollBar',function(){\n\t\treturn this._list.scrollBar;\n\t});\n\n\t/**\n\t*此对象包含的<code>List</code>实例对象。\n\t*/\n\t__getset(0,__proto,'list',function(){\n\t\treturn this._list;\n\t});\n\n\t/**\n\t*滚动条皮肤。\n\t*/\n\t__getset(0,__proto,'scrollBarSkin',function(){\n\t\treturn this._list.vScrollBarSkin;\n\t\t},function(value){\n\t\tthis._list.vScrollBarSkin=value;\n\t});\n\n\t/**\n\t*<code>Tree</code> 实例的渲染处理器。\n\t*/\n\t__getset(0,__proto,'renderHandler',function(){\n\t\treturn this._renderHandler;\n\t\t},function(value){\n\t\tthis._renderHandler=value;\n\t});\n\n\t/**\n\t*表示当前选择的项索引。\n\t*/\n\t__getset(0,__proto,'selectedIndex',function(){\n\t\treturn this._list.selectedIndex;\n\t\t},function(value){\n\t\tthis._list.selectedIndex=value;\n\t});\n\n\t/**\n\t*左侧缩进距离（以像素为单位）。\n\t*/\n\t__getset(0,__proto,'spaceLeft',function(){\n\t\treturn this._spaceLeft;\n\t\t},function(value){\n\t\tthis._spaceLeft=value;\n\t});\n\n\t/**\n\t*当前选中的项对象的数据源。\n\t*/\n\t__getset(0,__proto,'selectedItem',function(){\n\t\treturn this._list.selectedItem;\n\t\t},function(value){\n\t\tthis._list.selectedItem=value;\n\t});\n\n\t/**\n\t*@inheritDoc\n\t*/\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Box,this,'width',value);\n\t\tthis._list.width=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Box,this,'height',value);\n\t\tthis._list.height=value;\n\t});\n\n\t/**\n\t*xml结构的数据源。\n\t*/\n\t__getset(0,__proto,'xml',null,function(value){\n\t\tvar arr=[];\n\t\tthis.parseXml(value.childNodes[0],arr,null,true);\n\t\tthis.array=arr;\n\t});\n\n\t/**\n\t*表示选择的树节点项的<code>path</code>属性值。\n\t*/\n\t__getset(0,__proto,'selectedPath',function(){\n\t\tif (this._list.selectedItem){\n\t\t\treturn this._list.selectedItem.path;\n\t\t}\n\t\treturn null;\n\t});\n\n\treturn Tree;\n})(Box)\n\n\n/**\n*<code>ViewStack</code> 类用于视图堆栈类，用于视图的显示等设置处理。\n*/\n//class laya.ui.ViewStack extends laya.ui.Box\nvar ViewStack=(function(_super){\n\tfunction ViewStack(){\n\t\t/**@private */\n\t\tthis._items=null;\n\t\t/**@private */\n\t\tthis._selectedIndex=0;\n\t\tViewStack.__super.call(this);\n\t\tthis._setIndexHandler=Handler.create(this,this.setIndex,null,false);\n\t}\n\n\t__class(ViewStack,'laya.ui.ViewStack',_super);\n\tvar __proto=ViewStack.prototype;\n\tLaya.imps(__proto,{\"laya.ui.IItem\":true})\n\t/**\n\t*批量设置视图对象。\n\t*@param views 视图对象数组。\n\t*/\n\t__proto.setItems=function(views){\n\t\tthis.removeChildren();\n\t\tvar index=0;\n\t\tfor (var i=0,n=views.length;i < n;i++){\n\t\t\tvar item=views[i];\n\t\t\tif (item){\n\t\t\t\titem.name=\"item\"+index;\n\t\t\t\tthis.addChild(item);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\tthis.initItems();\n\t}\n\n\t/**\n\t*添加视图。\n\t*@internal 添加视图对象，并设置此视图对象的<code>name</code> 属性。\n\t*@param view 需要添加的视图对象。\n\t*/\n\t__proto.addItem=function(view){\n\t\tview.name=\"item\"+this._items.length;\n\t\tthis.addChild(view);\n\t\tthis.initItems();\n\t}\n\n\t/**\n\t*初始化视图对象集合。\n\t*/\n\t__proto.initItems=function(){\n\t\tthis._items=[];\n\t\tfor (var i=0;i < 10000;i++){\n\t\t\tvar item=this.getChildByName(\"item\"+i);\n\t\t\tif (item==null){\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t\tthis._items.push(item);\n\t\t\titem.visible=(i==this._selectedIndex);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*通过对象的索引设置项对象的 <code>selected</code> 属性值。\n\t*@param index 需要设置的对象的索引。\n\t*@param selected 表示对象的选中状态。\n\t*/\n\t__proto.setSelect=function(index,selected){\n\t\tif (this._items && index >-1 && index < this._items.length){\n\t\t\tthis._items[index].visible=selected;\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*设置属性<code>selectedIndex</code>的值。\n\t*@param index 选中项索引值。\n\t*/\n\t__proto.setIndex=function(index){\n\t\tthis.selectedIndex=index;\n\t}\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'dataSource',_super.prototype._$get_dataSource,function(value){\n\t\tthis._dataSource=value;\n\t\tif (((typeof value=='number')&& Math.floor(value)==value)|| (typeof value=='string')){\n\t\t\tthis.selectedIndex=parseInt(value);\n\t\t\t}else {\n\t\t\tfor (var prop in this._dataSource){\n\t\t\t\tif (this.hasOwnProperty(prop)){\n\t\t\t\t\tthis[prop]=this._dataSource[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t*表示当前视图索引。\n\t*/\n\t__getset(0,__proto,'selectedIndex',function(){\n\t\treturn this._selectedIndex;\n\t\t},function(value){\n\t\tif (this._selectedIndex !=value){\n\t\t\tthis.setSelect(this._selectedIndex,false);\n\t\t\tthis._selectedIndex=value;\n\t\t\tthis.setSelect(this._selectedIndex,true);\n\t\t}\n\t});\n\n\t/**\n\t*获取或设置当前选择的项对象。\n\t*/\n\t__getset(0,__proto,'selection',function(){\n\t\treturn this._selectedIndex >-1 && this._selectedIndex < this._items.length ? this._items[this._selectedIndex] :null;\n\t\t},function(value){\n\t\tthis.selectedIndex=this._items.indexOf(value);\n\t});\n\n\t/**\n\t*视图集合数组。\n\t*/\n\t__getset(0,__proto,'items',function(){\n\t\treturn this._items;\n\t});\n\n\t/**\n\t*索引设置处理器。\n\t*<p>默认回调参数：index:int</p>\n\t*/\n\t__getset(0,__proto,'setIndexHandler',function(){\n\t\treturn this._setIndexHandler;\n\t\t},function(value){\n\t\tthis._setIndexHandler=value;\n\t});\n\n\treturn ViewStack;\n})(Box)\n\n\n/**\n*\n*使用 <code>VScrollBar</code> （垂直 <code>ScrollBar</code> ）控件，可以在因数据太多而不能在显示区域完全显示时控制显示的数据部分。\n*\n*@example <caption>以下示例代码，创建了一个 <code>VScrollBar</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.vScrollBar;\n\t*import laya.ui.VScrollBar;\n\t*import laya.utils.Handler;\n\t*public class VScrollBar_Example\n\t*{\n\t\t*private var vScrollBar:VScrollBar;\n\t\t*public function VScrollBar_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\"],Handler.create(this,onLoadComplete));\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*vScrollBar=new VScrollBar();//创建一个 vScrollBar 类的实例对象 hScrollBar 。\n\t\t\t*vScrollBar.skin=\"resource/ui/vscroll.png\";//设置 vScrollBar 的皮肤。\n\t\t\t*vScrollBar.x=100;//设置 vScrollBar 对象的属性 x 的值，用于控制 vScrollBar 对象的显示位置。\n\t\t\t*vScrollBar.y=100;//设置 vScrollBar 对象的属性 y 的值，用于控制 vScrollBar 对象的显示位置。\n\t\t\t*vScrollBar.changeHandler=new Handler(this,onChange);//设置 vScrollBar 的滚动变化处理器。\n\t\t\t*Laya.stage.addChild(vScrollBar);//将此 vScrollBar 对象添加到显示列表。\n\t\t\t*}\n\t\t*private function onChange(value:Number):void\n\t\t*{\n\t\t\t*trace(\"滚动条的位置： value=\"+value);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*var vScrollBar;\n*var res=[\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\"];\n*Laya.loader.load(res,laya.utils.Handler.create(this,onLoadComplete));//加载资源。\n*function onLoadComplete(){\n\t*vScrollBar=new laya.ui.VScrollBar();//创建一个 vScrollBar 类的实例对象 hScrollBar 。\n\t*vScrollBar.skin=\"resource/ui/vscroll.png\";//设置 vScrollBar 的皮肤。\n\t*vScrollBar.x=100;//设置 vScrollBar 对象的属性 x 的值，用于控制 vScrollBar 对象的显示位置。\n\t*vScrollBar.y=100;//设置 vScrollBar 对象的属性 y 的值，用于控制 vScrollBar 对象的显示位置。\n\t*vScrollBar.changeHandler=new laya.utils.Handler(this,onChange);//设置 vScrollBar 的滚动变化处理器。\n\t*Laya.stage.addChild(vScrollBar);//将此 vScrollBar 对象添加到显示列表。\n\t*}\n*function onChange(value){\n\t*console.log(\"滚动条的位置： value=\"+value);\n\t*}\n*@example\n*import VScrollBar=laya.ui.VScrollBar;\n*import Handler=laya.utils.Handler;\n*class VScrollBar_Example {\n\t*private vScrollBar:VScrollBar;\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/vscroll.png\",\"resource/ui/vscroll$bar.png\",\"resource/ui/vscroll$down.png\",\"resource/ui/vscroll$up.png\"],Handler.create(this,this.onLoadComplete));\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*this.vScrollBar=new VScrollBar();//创建一个 vScrollBar 类的实例对象 hScrollBar 。\n\t\t*this.vScrollBar.skin=\"resource/ui/vscroll.png\";//设置 vScrollBar 的皮肤。\n\t\t*this.vScrollBar.x=100;//设置 vScrollBar 对象的属性 x 的值，用于控制 vScrollBar 对象的显示位置。\n\t\t*this.vScrollBar.y=100;//设置 vScrollBar 对象的属性 y 的值，用于控制 vScrollBar 对象的显示位置。\n\t\t*this.vScrollBar.changeHandler=new Handler(this,this.onChange);//设置 vScrollBar 的滚动变化处理器。\n\t\t*Laya.stage.addChild(this.vScrollBar);//将此 vScrollBar 对象添加到显示列表。\n\t\t*}\n\t*private onChange(value:number):void {\n\t\t*console.log(\"滚动条的位置： value=\"+value);\n\t\t*}\n\t*}\n*/\n//class laya.ui.VScrollBar extends laya.ui.ScrollBar\nvar VScrollBar=(function(_super){\n\tfunction VScrollBar(){\n\t\tVScrollBar.__super.call(this);;\n\t}\n\n\t__class(VScrollBar,'laya.ui.VScrollBar',_super);\n\treturn VScrollBar;\n})(ScrollBar)\n\n\n/**\n*<code>TextInput</code> 类用于创建显示对象以显示和输入文本。\n*\n*@example <caption>以下示例代码，创建了一个 <code>TextInput</code> 实例。</caption>\n*package\n*{\n\t*import laya.display.Stage;\n\t*import laya.ui.TextInput;\n\t*import laya.utils.Handler;\n\t*public class TextInput_Example\n\t*{\n\t\t*public function TextInput_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/input.png\"],Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*var textInput:TextInput=new TextInput(\"这是一个TextInput实例。\");//创建一个 TextInput 类的实例对象 textInput 。\n\t\t\t*textInput.skin=\"resource/ui/input.png\";//设置 textInput 的皮肤。\n\t\t\t*textInput.sizeGrid=\"4,4,4,4\";//设置 textInput 的网格信息。\n\t\t\t*textInput.color=\"#008fff\";//设置 textInput 的文本颜色。\n\t\t\t*textInput.font=\"Arial\";//设置 textInput 的文本字体。\n\t\t\t*textInput.bold=true;//设置 textInput 的文本显示为粗体。\n\t\t\t*textInput.fontSize=30;//设置 textInput 的字体大小。\n\t\t\t*textInput.wordWrap=true;//设置 textInput 的文本自动换行。\n\t\t\t*textInput.x=100;//设置 textInput 对象的属性 x 的值，用于控制 textInput 对象的显示位置。\n\t\t\t*textInput.y=100;//设置 textInput 对象的属性 y 的值，用于控制 textInput 对象的显示位置。\n\t\t\t*textInput.width=300;//设置 textInput 的宽度。\n\t\t\t*textInput.height=200;//设置 textInput 的高度。\n\t\t\t*Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*Laya.loader.load([\"resource/ui/input.png\"],laya.utils.Handler.create(this,onLoadComplete));//加载资源。\n*function onLoadComplete(){\n\t*var textInput=new laya.ui.TextInput(\"这是一个TextInput实例。\");//创建一个 TextInput 类的实例对象 textInput 。\n\t*textInput.skin=\"resource/ui/input.png\";//设置 textInput 的皮肤。\n\t*textInput.sizeGrid=\"4,4,4,4\";//设置 textInput 的网格信息。\n\t*textInput.color=\"#008fff\";//设置 textInput 的文本颜色。\n\t*textInput.font=\"Arial\";//设置 textInput 的文本字体。\n\t*textInput.bold=true;//设置 textInput 的文本显示为粗体。\n\t*textInput.fontSize=30;//设置 textInput 的字体大小。\n\t*textInput.wordWrap=true;//设置 textInput 的文本自动换行。\n\t*textInput.x=100;//设置 textInput 对象的属性 x 的值，用于控制 textInput 对象的显示位置。\n\t*textInput.y=100;//设置 textInput 对象的属性 y 的值，用于控制 textInput 对象的显示位置。\n\t*textInput.width=300;//设置 textInput 的宽度。\n\t*textInput.height=200;//设置 textInput 的高度。\n\t*Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。\n\t*}\n*@example\n*import Stage=laya.display.Stage;\n*import TextInput=laya.ui.TextInput;\n*import Handler=laya.utils.Handler;\n*class TextInput_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/input.png\"],Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*var textInput:TextInput=new TextInput(\"这是一个TextInput实例。\");//创建一个 TextInput 类的实例对象 textInput 。\n\t\t*textInput.skin=\"resource/ui/input.png\";//设置 textInput 的皮肤。\n\t\t*textInput.sizeGrid=\"4,4,4,4\";//设置 textInput 的网格信息。\n\t\t*textInput.color=\"#008fff\";//设置 textInput 的文本颜色。\n\t\t*textInput.font=\"Arial\";//设置 textInput 的文本字体。\n\t\t*textInput.bold=true;//设置 textInput 的文本显示为粗体。\n\t\t*textInput.fontSize=30;//设置 textInput 的字体大小。\n\t\t*textInput.wordWrap=true;//设置 textInput 的文本自动换行。\n\t\t*textInput.x=100;//设置 textInput 对象的属性 x 的值，用于控制 textInput 对象的显示位置。\n\t\t*textInput.y=100;//设置 textInput 对象的属性 y 的值，用于控制 textInput 对象的显示位置。\n\t\t*textInput.width=300;//设置 textInput 的宽度。\n\t\t*textInput.height=200;//设置 textInput 的高度。\n\t\t*Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。\n\t\t*}\n\t*}\n*/\n//class laya.ui.TextInput extends laya.ui.Label\nvar TextInput=(function(_super){\n\tfunction TextInput(text){\n\t\t/**@private */\n\t\tthis._bg=null;\n\t\t/**@private */\n\t\tthis._skin=null;\n\t\tTextInput.__super.call(this);\n\t\t(text===void 0)&& (text=\"\");\n\t\tthis.text=text;\n\t\tthis.skin=this.skin;\n\t}\n\n\t__class(TextInput,'laya.ui.TextInput',_super);\n\tvar __proto=TextInput.prototype;\n\t/**@inheritDoc */\n\t__proto.preinitialize=function(){\n\t\tthis.mouseEnabled=true;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._bg && this._bg.destroy();\n\t\tthis._bg=null;\n\t}\n\n\t/**@inheritDoc */\n\t__proto.createChildren=function(){\n\t\tthis.addChild(this._tf=new Input());\n\t\tthis._tf.padding=Styles.inputLabelPadding;\n\t\tthis._tf.on(/*laya.events.Event.INPUT*/\"input\",this,this._onInput);\n\t\tthis._tf.on(/*laya.events.Event.ENTER*/\"enter\",this,this._onEnter);\n\t\tthis._tf.on(/*laya.events.Event.BLUR*/\"blur\",this,this._onBlur);\n\t\tthis._tf.on(/*laya.events.Event.FOCUS*/\"focus\",this,this._onFocus);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onFocus=function(){\n\t\tthis.event(/*laya.events.Event.FOCUS*/\"focus\",this);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onBlur=function(){\n\t\tthis.event(/*laya.events.Event.BLUR*/\"blur\",this);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onInput=function(){\n\t\tthis.event(/*laya.events.Event.INPUT*/\"input\",this);\n\t}\n\n\t/**\n\t*@private\n\t*/\n\t__proto._onEnter=function(){\n\t\tthis.event(/*laya.events.Event.ENTER*/\"enter\",this);\n\t}\n\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\tthis.width=128;\n\t\tthis.height=22;\n\t}\n\n\t/**选中输入框内的文本。*/\n\t__proto.select=function(){\n\t\t(this._tf).select();\n\t}\n\n\t__proto.setSelection=function(startIndex,endIndex){\n\t\t(this._tf).setSelection(startIndex,endIndex);\n\t}\n\n\t/**\n\t*当前文本内容字符串。\n\t*@see laya.display.Text.text\n\t*/\n\t__getset(0,__proto,'text',_super.prototype._$get_text,function(value){\n\t\tif (this._tf.text !=value){\n\t\t\tvalue=value+\"\";\n\t\t\tthis._tf.text=value;\n\t\t\tthis.event(/*laya.events.Event.CHANGE*/\"change\");\n\t\t}\n\t});\n\n\t/**\n\t*表示此对象包含的文本背景 <code>AutoBitmap</code> 组件实例。\n\t*/\n\t__getset(0,__proto,'bg',function(){\n\t\treturn this._bg;\n\t\t},function(value){\n\t\tthis.graphics=this._bg=value;\n\t});\n\n\t/**\n\t*设置原生input输入框的y坐标偏移。\n\t*/\n\t__getset(0,__proto,'inputElementYAdjuster',function(){\n\t\treturn (this._tf).inputElementYAdjuster;\n\t\t},function(value){\n\t\t(this._tf).inputElementYAdjuster=value;\n\t});\n\n\t/**\n\t*<p>指示当前是否是文本域。</p>\n\t*值为true表示当前是文本域，否则不是文本域。\n\t*/\n\t__getset(0,__proto,'multiline',function(){\n\t\treturn (this._tf).multiline;\n\t\t},function(value){\n\t\t(this._tf).multiline=value;\n\t});\n\n\t/**\n\t*@copy laya.ui.Image#skin\n\t*/\n\t__getset(0,__proto,'skin',function(){\n\t\treturn this._skin;\n\t\t},function(value){\n\t\tif (this._skin !=value){\n\t\t\tthis._skin=value;\n\t\t\tthis._bg || (this.graphics=this._bg=new AutoBitmap());\n\t\t\tthis._bg.source=Loader.getRes(this._skin);\n\t\t\tthis._width && (this._bg.width=this._width);\n\t\t\tthis._height && (this._bg.height=this._height);\n\t\t}\n\t});\n\n\t/**\n\t*<p>当前实例的背景图（ <code>AutoBitmap</code> ）实例的有效缩放网格数据。</p>\n\t*<p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n\t*<ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n\t*@see laya.ui.AutoBitmap.sizeGrid\n\t*/\n\t__getset(0,__proto,'sizeGrid',function(){\n\t\treturn this._bg && this._bg.sizeGrid ? this._bg.sizeGrid.join(\",\"):null;\n\t\t},function(value){\n\t\tthis._bg || (this.graphics=this._bg=new AutoBitmap());\n\t\tthis._bg.sizeGrid=UIUtils.fillArray(Styles.defaultSizeGrid,value,Number);\n\t});\n\n\t/**\n\t*设置原生input输入框的x坐标偏移。\n\t*/\n\t__getset(0,__proto,'inputElementXAdjuster',function(){\n\t\treturn (this._tf).inputElementXAdjuster;\n\t\t},function(value){\n\t\t(this._tf).inputElementXAdjuster=value;\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(Label,this,'width',value);\n\t\tthis._bg && (this._bg.width=value);\n\t});\n\n\t/**@inheritDoc */\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(Label,this,'height',value);\n\t\tthis._bg && (this._bg.height=value);\n\t});\n\n\t/**\n\t*设置可编辑状态。\n\t*/\n\t__getset(0,__proto,'editable',function(){\n\t\treturn (this._tf).editable;\n\t\t},function(value){\n\t\t(this._tf).editable=value;\n\t});\n\n\t/**限制输入的字符。*/\n\t__getset(0,__proto,'restrict',function(){\n\t\treturn (this._tf).restrict;\n\t\t},function(pattern){\n\t\t(this._tf).restrict=pattern;\n\t});\n\n\t/**\n\t*@copy laya.display.Input#prompt\n\t*/\n\t__getset(0,__proto,'prompt',function(){\n\t\treturn (this._tf).prompt;\n\t\t},function(value){\n\t\t(this._tf).prompt=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Input#promptColor\n\t*/\n\t__getset(0,__proto,'promptColor',function(){\n\t\treturn (this._tf).promptColor;\n\t\t},function(value){\n\t\t(this._tf).promptColor=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Input#maxChars\n\t*/\n\t__getset(0,__proto,'maxChars',function(){\n\t\treturn (this._tf).maxChars;\n\t\t},function(value){\n\t\t(this._tf).maxChars=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Input#focus\n\t*/\n\t__getset(0,__proto,'focus',function(){\n\t\treturn (this._tf).focus;\n\t\t},function(value){\n\t\t(this._tf).focus=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Input#type\n\t*/\n\t__getset(0,__proto,'type',function(){\n\t\treturn (this._tf).type;\n\t\t},function(value){\n\t\t(this._tf).type=value;\n\t});\n\n\t/**\n\t*@copy laya.display.Input#asPassword\n\t*/\n\t__getset(0,__proto,'asPassword',function(){\n\t\treturn (this._tf).asPassword;\n\t\t},function(value){\n\t\t(this._tf).asPassword=value;\n\t});\n\n\treturn TextInput;\n})(Label)\n\n\n/**\n*使用 <code>VSlider</code> 控件，用户可以通过在滑块轨道的终点之间移动滑块来选择值。\n*<p> <code>VSlider</code> 控件采用垂直方向。滑块轨道从下往上扩展，而标签位于轨道的左右两侧。</p>\n*\n*@example <caption>以下示例代码，创建了一个 <code>VSlider</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.HSlider;\n\t*import laya.ui.VSlider;\n\t*import laya.utils.Handler;\n\t*public class VSlider_Example\n\t*{\n\t\t*private var vSlider:VSlider;\n\t\t*public function VSlider_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/vslider.png\",\"resource/ui/vslider$bar.png\"],Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*vSlider=new VSlider();//创建一个 VSlider 类的实例对象 vSlider 。\n\t\t\t*vSlider.skin=\"resource/ui/vslider.png\";//设置 vSlider 的皮肤。\n\t\t\t*vSlider.min=0;//设置 vSlider 最低位置值。\n\t\t\t*vSlider.max=10;//设置 vSlider 最高位置值。\n\t\t\t*vSlider.value=2;//设置 vSlider 当前位置值。\n\t\t\t*vSlider.tick=1;//设置 vSlider 刻度值。\n\t\t\t*vSlider.x=100;//设置 vSlider 对象的属性 x 的值，用于控制 vSlider 对象的显示位置。\n\t\t\t*vSlider.y=100;//设置 vSlider 对象的属性 y 的值，用于控制 vSlider 对象的显示位置。\n\t\t\t*vSlider.changeHandler=new Handler(this,onChange);//设置 vSlider 位置变化处理器。\n\t\t\t*Laya.stage.addChild(vSlider);//把 vSlider 添加到显示列表。\n\t\t\t*}\n\t\t*private function onChange(value:Number):void\n\t\t*{\n\t\t\t*trace(\"滑块的位置： value=\"+value);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*var vSlider;\n*Laya.loader.load([\"resource/ui/vslider.png\",\"resource/ui/vslider$bar.png\"],laya.utils.Handler.create(this,onLoadComplete));//加载资源。\n*function onLoadComplete(){\n\t*vSlider=new laya.ui.VSlider();//创建一个 VSlider 类的实例对象 vSlider 。\n\t*vSlider.skin=\"resource/ui/vslider.png\";//设置 vSlider 的皮肤。\n\t*vSlider.min=0;//设置 vSlider 最低位置值。\n\t*vSlider.max=10;//设置 vSlider 最高位置值。\n\t*vSlider.value=2;//设置 vSlider 当前位置值。\n\t*vSlider.tick=1;//设置 vSlider 刻度值。\n\t*vSlider.x=100;//设置 vSlider 对象的属性 x 的值，用于控制 vSlider 对象的显示位置。\n\t*vSlider.y=100;//设置 vSlider 对象的属性 y 的值，用于控制 vSlider 对象的显示位置。\n\t*vSlider.changeHandler=new laya.utils.Handler(this,onChange);//设置 vSlider 位置变化处理器。\n\t*Laya.stage.addChild(vSlider);//把 vSlider 添加到显示列表。\n\t*}\n*function onChange(value){\n\t*console.log(\"滑块的位置： value=\"+value);\n\t*}\n*@example\n*import HSlider=laya.ui.HSlider;\n*import VSlider=laya.ui.VSlider;\n*import Handler=laya.utils.Handler;\n*class VSlider_Example {\n\t*private vSlider:VSlider;\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/vslider.png\",\"resource/ui/vslider$bar.png\"],Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*this.vSlider=new VSlider();//创建一个 VSlider 类的实例对象 vSlider 。\n\t\t*this.vSlider.skin=\"resource/ui/vslider.png\";//设置 vSlider 的皮肤。\n\t\t*this.vSlider.min=0;//设置 vSlider 最低位置值。\n\t\t*this.vSlider.max=10;//设置 vSlider 最高位置值。\n\t\t*this.vSlider.value=2;//设置 vSlider 当前位置值。\n\t\t*this.vSlider.tick=1;//设置 vSlider 刻度值。\n\t\t*this.vSlider.x=100;//设置 vSlider 对象的属性 x 的值，用于控制 vSlider 对象的显示位置。\n\t\t*this.vSlider.y=100;//设置 vSlider 对象的属性 y 的值，用于控制 vSlider 对象的显示位置。\n\t\t*this.vSlider.changeHandler=new Handler(this,this.onChange);//设置 vSlider 位置变化处理器。\n\t\t*Laya.stage.addChild(this.vSlider);//把 vSlider 添加到显示列表。\n\t\t*}\n\t*private onChange(value:number):void {\n\t\t*console.log(\"滑块的位置： value=\"+value);\n\t\t*}\n\t*}\n*@see laya.ui.Slider\n*/\n//class laya.ui.VSlider extends laya.ui.Slider\nvar VSlider=(function(_super){\n\tfunction VSlider(){\n\t\tVSlider.__super.call(this);;\n\t}\n\n\t__class(VSlider,'laya.ui.VSlider',_super);\n\treturn VSlider;\n})(Slider)\n\n\n/**\n*<code>Dialog</code> 组件是一个弹出对话框，实现对话框弹出，拖动，模式窗口功能。\n*可以通过UIConfig设置弹出框背景透明度，模式窗口点击边缘是否关闭等\n*通过设置zOrder属性，可以更改弹出的层次\n*通过设置popupEffect和closeEffect可以设置弹出效果和关闭效果，如果不想有任何弹出关闭效果，可以设置前述属性为空\n*\n*@example <caption>以下示例代码，创建了一个 <code>Dialog</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.Dialog;\n\t*import laya.utils.Handler;\n\t*public class Dialog_Example\n\t*{\n\t\t*private var dialog:Dialog_Instance;\n\t\t*public function Dialog_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load(\"resource/ui/btn_close.png\",Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*dialog=new Dialog_Instance();//创建一个 Dialog_Instance 类的实例对象 dialog。\n\t\t\t*dialog.dragArea=\"0,0,150,50\";//设置 dialog 的拖拽区域。\n\t\t\t*dialog.show();//显示 dialog。\n\t\t\t*dialog.closeHandler=new Handler(this,onClose);//设置 dialog 的关闭函数处理器。\n\t\t\t*}\n\t\t*private function onClose(name:String):void\n\t\t*{\n\t\t\t*if (name==Dialog.CLOSE)\n\t\t\t*{\n\t\t\t\t*trace(\"通过点击 name 为\"+name+\"的组件，关闭了dialog。\");\n\t\t\t\t*}\n\t\t\t*}\n\t\t*}\n\t*}\n*import laya.ui.Button;\n*import laya.ui.Dialog;\n*import laya.ui.Image;\n*class Dialog_Instance extends Dialog\n*{\n\t*function Dialog_Instance():void\n\t*{\n\t\t*var bg:Image=new Image(\"resource/ui/bg.png\");\n\t\t*bg.sizeGrid=\"40,10,5,10\";\n\t\t*bg.width=150;\n\t\t*bg.height=250;\n\t\t*addChild(bg);\n\t\t*var image:Image=new Image(\"resource/ui/image.png\");\n\t\t*addChild(image);\n\t\t*var button:Button=new Button(\"resource/ui/btn_close.png\");\n\t\t*button.name=Dialog.CLOSE;//设置button的name属性值。\n\t\t*button.x=0;\n\t\t*button.y=0;\n\t\t*addChild(button);\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高、渲染模式\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*var dialog;\n*Laya.loader.load(\"resource/ui/btn_close.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n*(function (_super){//新建一个类Dialog_Instance继承自laya.ui.Dialog。\n\t*function Dialog_Instance(){\n\t\t*Dialog_Instance.__super.call(this);//初始化父类\n\t\t*var bg=new laya.ui.Image(\"resource/ui/bg.png\");//新建一个 Image 类的实例 bg 。\n\t\t*bg.sizeGrid=\"10,40,10,5\";//设置 bg 的网格信息。\n\t\t*bg.width=150;//设置 bg 的宽度。\n\t\t*bg.height=250;//设置 bg 的高度。\n\t\t*this.addChild(bg);//将 bg 添加到显示列表。\n\t\t*var image=new laya.ui.Image(\"resource/ui/image.png\");//新建一个 Image 类的实例 image 。\n\t\t*this.addChild(image);//将 image 添加到显示列表。\n\t\t*var button=new laya.ui.Button(\"resource/ui/btn_close.png\");//新建一个 Button 类的实例 bg 。\n\t\t*button.name=laya.ui.Dialog.CLOSE;//设置 button 的 name 属性值。\n\t\t*button.x=0;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n\t\t*button.y=0;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n\t\t*this.addChild(button);//将 button 添加到显示列表。\n\t\t*};\n\t*Laya.class(Dialog_Instance,\"mypackage.dialogExample.Dialog_Instance\",_super);//注册类Dialog_Instance。\n\t*})(laya.ui.Dialog);\n*function loadComplete(){\n\t*console.log(\"资源加载完成！\");\n\t*dialog=new mypackage.dialogExample.Dialog_Instance();//创建一个 Dialog_Instance 类的实例对象 dialog。\n\t*dialog.dragArea=\"0,0,150,50\";//设置 dialog 的拖拽区域。\n\t*dialog.show();//显示 dialog。\n\t*dialog.closeHandler=new laya.utils.Handler(this,onClose);//设置 dialog 的关闭函数处理器。\n\t*}\n*function onClose(name){\n\t*if (name==laya.ui.Dialog.CLOSE){\n\t\t*console.log(\"通过点击 name 为\"+name+\"的组件，关闭了dialog。\");\n\t\t*}\n\t*}\n*@example\n*import Dialog=laya.ui.Dialog;\n*import Handler=laya.utils.Handler;\n*class Dialog_Example {\n\t*private dialog:Dialog_Instance;\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load(\"resource/ui/btn_close.png\",Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*this.dialog=new Dialog_Instance();//创建一个 Dialog_Instance 类的实例对象 dialog。\n\t\t*this.dialog.dragArea=\"0,0,150,50\";//设置 dialog 的拖拽区域。\n\t\t*this.dialog.show();//显示 dialog。\n\t\t*this.dialog.closeHandler=new Handler(this,this.onClose);//设置 dialog 的关闭函数处理器。\n\t\t*}\n\t*private onClose(name:string):void {\n\t\t*if (name==Dialog.CLOSE){\n\t\t\t*console.log(\"通过点击 name 为\"+name+\"的组件，关闭了dialog。\");\n\t\t\t*}\n\t\t*}\n\t*}\n*import Button=laya.ui.Button;\n*class Dialog_Instance extends Dialog {\n\t*Dialog_Instance():void {\n\t\t*var bg:laya.ui.Image=new laya.ui.Image(\"resource/ui/bg.png\");\n\t\t*bg.sizeGrid=\"40,10,5,10\";\n\t\t*bg.width=150;\n\t\t*bg.height=250;\n\t\t*this.addChild(bg);\n\t\t*var image:laya.ui.Image=new laya.ui.Image(\"resource/ui/image.png\");\n\t\t*this.addChild(image);\n\t\t*var button:Button=new Button(\"resource/ui/btn_close.png\");\n\t\t*button.name=Dialog.CLOSE;//设置button的name属性值。\n\t\t*button.x=0;\n\t\t*button.y=0;\n\t\t*this.addChild(button);\n\t\t*}\n\t*}\n*/\n//class laya.ui.Dialog extends laya.ui.View\nvar Dialog=(function(_super){\n\tfunction Dialog(){\n\t\t/**\n\t\t*一个布尔值，指定对话框是否居中弹。\n\t\t*<p>如果值为true，则居中弹出，否则，则根据对象坐标显示，默认为true。</p>\n\t\t*/\n\t\tthis.popupCenter=true;\n\t\t/**\n\t\t*对话框被关闭时会触发的回调函数处理器。\n\t\t*<p>回调函数参数为用户点击的按钮名字name:String。</p>\n\t\t*/\n\t\tthis.closeHandler=null;\n\t\t/**\n\t\t*弹出对话框效果，可以设置一个效果代替默认的弹出效果，如果不想有任何效果，可以赋值为null\n\t\t*全局默认弹出效果可以通过manager.popupEffect修改\n\t\t*/\n\t\tthis.popupEffect=null;\n\t\t/**\n\t\t*关闭对话框效果，可以设置一个效果代替默认的关闭效果，如果不想有任何效果，可以赋值为null\n\t\t*全局默认关闭效果可以通过manager.closeEffect修改\n\t\t*/\n\t\tthis.closeEffect=null;\n\t\t/**组名称*/\n\t\tthis.group=null;\n\t\t/**是否是模式窗口*/\n\t\tthis.isModal=false;\n\t\t/**@private */\n\t\tthis._dragArea=null;\n\t\tDialog.__super.call(this);\n\t}\n\n\t__class(Dialog,'laya.ui.Dialog',_super);\n\tvar __proto=Dialog.prototype;\n\t/**@inheritDoc */\n\t__proto.initialize=function(){\n\t\tthis.popupEffect=Dialog.manager.popupEffectHandler;\n\t\tthis.closeEffect=Dialog.manager.closeEffectHandler;\n\t\tthis._dealDragArea();\n\t\tthis.on(/*laya.events.Event.CLICK*/\"click\",this,this._onClick);\n\t}\n\n\t/**@private */\n\t__proto._dealDragArea=function(){\n\t\tvar dragTarget=this.getChildByName(\"drag\");\n\t\tif (dragTarget){\n\t\t\tthis.dragArea=dragTarget.x+\",\"+dragTarget.y+\",\"+dragTarget.width+\",\"+dragTarget.height;\n\t\t\tdragTarget.removeSelf();\n\t\t}\n\t}\n\n\t/**\n\t*@private (protected)\n\t*对象的 <code>Event.CLICK</code> 点击事件侦听处理函数。\n\t*/\n\t__proto._onClick=function(e){\n\t\tvar btn=e.target;\n\t\tif (btn){\n\t\t\tswitch (btn.name){\n\t\t\t\tcase \"close\":\n\t\t\t\tcase \"cancel\":\n\t\t\t\tcase \"sure\":\n\t\t\t\tcase \"no\":\n\t\t\t\tcase \"ok\":\n\t\t\t\tcase \"yes\":\n\t\t\t\t\tthis.close(btn.name);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*显示对话框（以非模式窗口方式显示）。\n\t*@param closeOther 是否关闭其它的对话框。若值为true则关闭其它对话框。\n\t*@param showEffect 是否显示弹出效果\n\t*/\n\t__proto.show=function(closeOther,showEffect){\n\t\t(closeOther===void 0)&& (closeOther=false);\n\t\t(showEffect===void 0)&& (showEffect=true);\n\t\tthis._open(false,closeOther,showEffect);\n\t}\n\n\t/**\n\t*显示对话框（以模式窗口方式显示）。\n\t*@param closeOther 是否关闭其它的对话框。若值为true则关闭其它对话框。\n\t*@param showEffect 是否显示弹出效果\n\t*/\n\t__proto.popup=function(closeOther,showEffect){\n\t\t(closeOther===void 0)&& (closeOther=false);\n\t\t(showEffect===void 0)&& (showEffect=true);\n\t\tthis._open(true,closeOther,showEffect);\n\t}\n\n\t/**@private */\n\t__proto._open=function(modal,closeOther,showEffect){\n\t\tDialog.manager.lock(false);\n\t\tthis.isModal=modal;\n\t\tDialog.manager.open(this,closeOther,showEffect);\n\t}\n\n\t/**打开完成后，调用此方法（如果有弹出动画，则在动画完成后执行）*/\n\t__proto.onOpened=function(){}\n\t/**\n\t*关闭对话框。\n\t*@param type 如果是点击默认关闭按钮触发，则传入关闭按钮的名字(name)，否则为null。\n\t*@param showEffect 是否显示关闭效果\n\t*/\n\t__proto.close=function(type,showEffect){\n\t\t(showEffect===void 0)&& (showEffect=true);\n\t\tDialog.manager.close(this,type,showEffect);\n\t}\n\n\t/**关闭完成后，调用此方法（如果有关闭动画，则在动画完成后执行）\n\t*@param type 如果是点击默认关闭按钮触发，则传入关闭按钮的名字(name)，否则为null。\n\t*/\n\t__proto.onClosed=function(type){}\n\t/**@private */\n\t__proto._onMouseDown=function(e){\n\t\tvar point=this.getMousePoint();\n\t\tif (this._dragArea.contains(point.x,point.y))this.startDrag();\n\t\telse this.stopDrag();\n\t}\n\n\t/**\n\t*用来指定对话框的拖拽区域。默认值为\"0,0,0,0\"。\n\t*<p><b>格式：</b>构成一个矩形所需的 x,y,width,heith 值，用逗号连接为字符串。\n\t*例如：\"0,0,100,200\"。\n\t*</p>\n\t*\n\t*@see #includeExamplesSummary 请参考示例\n\t*/\n\t__getset(0,__proto,'dragArea',function(){\n\t\tif (this._dragArea)return this._dragArea.toString();\n\t\treturn null;\n\t\t},function(value){\n\t\tif (value){\n\t\t\tvar a=UIUtils.fillArray([0,0,0,0],value,Number);\n\t\t\tthis._dragArea=new Rectangle(a[0],a[1],a[2],a[3]);\n\t\t\tthis.on(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this._onMouseDown);\n\t\t\t}else {\n\t\t\tthis._dragArea=null;\n\t\t\tthis.off(/*laya.events.Event.MOUSE_DOWN*/\"mousedown\",this,this._onMouseDown);\n\t\t}\n\t});\n\n\t/**\n\t*弹出框的显示状态；如果弹框处于显示中，则为true，否则为false;\n\t*/\n\t__getset(0,__proto,'isPopup',function(){\n\t\treturn this.parent !=null;\n\t});\n\n\t__getset(0,__proto,'zOrder',_super.prototype._$get_zOrder,function(value){\n\t\tLaya.superSet(View,this,'zOrder',value);\n\t\tDialog.manager._checkMask();\n\t});\n\n\t/**对话框管理容器，所有的对话框都在该容器内，并且受管理器管，可以自定义自己的管理器，来更改窗口管理的流程。\n\t*任意对话框打开和关闭，都会触发管理类的open和close事件*/\n\t__getset(1,Dialog,'manager',function(){\n\t\treturn Dialog._manager=Dialog._manager|| new DialogManager();\n\t\t},function(value){\n\t\tDialog._manager=value;\n\t});\n\n\tDialog.setLockView=function(view){\n\t\tDialog.manager.setLockView(view);\n\t}\n\n\tDialog.lock=function(value){\n\t\tDialog.manager.lock(value);\n\t}\n\n\tDialog.closeAll=function(){\n\t\tDialog.manager.closeAll();\n\t}\n\n\tDialog.getDialogsByGroup=function(group){\n\t\treturn Dialog.manager.getDialogsByGroup(group);\n\t}\n\n\tDialog.closeByGroup=function(group){\n\t\treturn Dialog.manager.closeByGroup(group);\n\t}\n\n\tDialog.CLOSE=\"close\";\n\tDialog.CANCEL=\"cancel\";\n\tDialog.SURE=\"sure\";\n\tDialog.NO=\"no\";\n\tDialog.OK=\"ok\";\n\tDialog.YES=\"yes\";\n\tDialog._manager=null;\n\treturn Dialog;\n})(View)\n\n\n/**\n*<code>HBox</code> 是一个水平布局容器类。\n*/\n//class laya.ui.HBox extends laya.ui.LayoutBox\nvar HBox=(function(_super){\n\tfunction HBox(){\n\t\tHBox.__super.call(this);;\n\t}\n\n\t__class(HBox,'laya.ui.HBox',_super);\n\tvar __proto=HBox.prototype;\n\t/**@inheritDoc */\n\t__proto.sortItem=function(items){\n\t\tif (items)items.sort(function(a,b){return a.x-b.x;});\n\t}\n\n\t/**@inheritDoc */\n\t__proto.changeItems=function(){\n\t\tthis._itemChanged=false;\n\t\tvar items=[];\n\t\tvar maxHeight=0;\n\t\tfor (var i=0,n=this.numChildren;i < n;i++){\n\t\t\tvar item=this.getChildAt(i);\n\t\t\tif (item&&item.layoutEnabled){\n\t\t\t\titems.push(item);\n\t\t\t\tmaxHeight=this._height?this._height:Math.max(maxHeight,item.height *item.scaleY);\n\t\t\t}\n\t\t}\n\t\tthis.sortItem(items);\n\t\tvar left=0;\n\t\tfor (i=0,n=items.length;i < n;i++){\n\t\t\titem=items[i];\n\t\t\titem.x=left;\n\t\t\tleft+=item.width *item.scaleX+this._space;\n\t\t\tif (this._align==\"top\"){\n\t\t\t\titem.y=0;\n\t\t\t\t}else if (this._align==\"middle\"){\n\t\t\t\titem.y=(maxHeight-item.height *item.scaleY)*0.5;\n\t\t\t\t}else if (this._align==\"bottom\"){\n\t\t\t\titem.y=maxHeight-item.height *item.scaleY;\n\t\t\t}\n\t\t}\n\t\tthis.changeSize();\n\t}\n\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tif (this._height !=value){\n\t\t\tLaya.superSet(LayoutBox,this,'height',value);\n\t\t\tthis.callLater(this.changeItems);\n\t\t}\n\t});\n\n\tHBox.NONE=\"none\";\n\tHBox.TOP=\"top\";\n\tHBox.MIDDLE=\"middle\";\n\tHBox.BOTTOM=\"bottom\";\n\treturn HBox;\n})(LayoutBox)\n\n\n/**\n*游戏中心插件\n*@author xiaosong\n*@date 2018-12-26\n*/\n//class laya.ui.MoreGame extends laya.ui.View\nvar MoreGame=(function(_super){\n\tvar GameBox,GameItem;\n\tfunction MoreGame(type){\n\t\t/**是否停止缓动，默认晃动**/\n\t\tthis.gameStopHD=false;\n\t\t/**icon动画**/\n\t\tthis.iconImgTl=null;\n\t\t/**iconImage**/\n\t\tthis._iconImage=null;\n\t\t/**更多游戏容器**/\n\t\tthis._moreBox=null;\n\t\t/**游戏内盒子容器**/\n\t\tthis._gameBox=null;\n\t\t/**屏幕方向,默认0 横屏，1竖屏**/\n\t\tthis.screenType=0;\n\t\t/**更多游戏配置数据**/\n\t\tthis._moreGameDataUrl=\"https://abc.layabox.com/public/more/gamelist2.json\";\n\t\t/**图片尺寸设置信息**/\n\t\tthis._iconImageObj=null;\n\t\t/**图标点击回调**/\n\t\tthis.clickCallBack=null;\n\t\t/**关闭盒子回调**/\n\t\tthis.closeCallBack=null;\n\t\t/**是否在显示中**/\n\t\tthis.isShow=false;\n\t\t/**系统信息**/\n\t\tthis.dinfo=null;\n\t\t/**统计数据地址**/\n\t\tthis.ErrorUrlHttps=\"https://elastic.layabox.com/\";\n\t\t/**统计类型**/\n\t\tthis.tongjiType=\"bdm\";\n\t\t(type===void 0)&& (type=0);\n\t\tMoreGame.__super.call(this);\n\t\tthis.screenType=type;\n\t\tthis.init();\n\t}\n\n\t__class(MoreGame,'laya.ui.MoreGame',_super);\n\tvar __proto=MoreGame.prototype;\n\t/**\n\t*获取字符串时间戳，例如:2018-7-6\n\t*@param _timestamp\n\t*@return\n\t*\n\t*/\n\t__proto.getLocalDateString=function(_timestamp){\n\t\t(_timestamp===void 0)&& (_timestamp=0);\n\t\tvar timeStr=this.getDateByTimestamp(_timestamp).toLocaleDateString();\n\t\tif(Browser.onLimixiu || Browser.onMiniGame){\n\t\t\tvar date=new Date();\n\t\t\ttimeStr=MoreGame.toLocaleDateString(date.getTime());\n\t\t};\n\t\tvar reg=new RegExp(\"/\",\"g\");\n\t\ttimeStr=timeStr.replace(reg,\"-\");\n\t\treturn timeStr;\n\t}\n\n\t__proto.getDateByTimestamp=function(_timestamp){\n\t\t(_timestamp===void 0)&& (_timestamp=0);\n\t\tif (!_timestamp || _timestamp==\"\")return /*__JS__ */new Date();\n\t\treturn /*__JS__ */new Date(_timestamp);\n\t}\n\n\t/**\n\t*发送统计信息\n\t*@param etype 统计数据类型\n\t*@param errorInfo 报错信息\n\t*@param pro 统计扩展数据\n\t*/\n\t__proto.reportError=function(etype,errorInfo,pro){\n\t\t(errorInfo===void 0)&& (errorInfo=\"\");\n\t\tpro=pro || {};\n\t\tvar now=/*__JS__ */Date.now();\n\t\tvar date=new Date(now+0);\n\t\tpro.date=date.toLocaleString();\n\t\tpro.etype=etype;\n\t\tif (etype !=\"error\"){\n\t\t\tif (etype !=\"statistics\"){\n\t\t\t\tetype=\"statistics\";\n\t\t\t}\n\t\t}\n\t\tpro.version=\"V0.0.1\";\n\t\tpro.gameId=10100;\n\t\tpro.dinfo=this.dinfo;\n\t\tpro.channel=-1000;\n\t\tpro.msg=errorInfo;\n\t\tpro[\"@timestamp\"]=/*__JS__ */date.toISOString();\n\t\tpro.user=this.getUserId();\n\t\tpro.openid=this.getOpenId();\n\t\tvar rdate=MoreGame.getDay(date);\n\t\tpro.rdate=rdate;\n\t\tpro.day=date.getDate()+\"\";\n\t\tpro.hour=date.getHours()+\"\";\n\t\tpro.minute=date.getMinutes()+\"\";\n\t\tpro.gameurl=/*__JS__ */document.baseURI;\n\t\tpro.regTime=0;\n\t\tif (etype==\"error\"){\n\t\t\tthis.sendLog(pro,this.tongjiType+\"error-\"+rdate.substring(0,6)+\"/\"+etype+\"/\",etype);\n\t\t\t}else{\n\t\t\tthis.sendLog(pro,this.tongjiType+\"-\"+rdate.substring(0,6)+\"/\"+etype+\"/\",etype);\n\t\t}\n\t}\n\n\t/**获取用户userid**/\n\t__proto.getUserId=function(){\n\t\tvar userid=parseInt(LocalStorage.getItem(\"layauserid\")+\"\")||-1;\n\t\tif(userid==-1){\n\t\t\tuserid=this.randRange(0,1000000000);\n\t\t\tLocalStorage.setItem(\"layauserid\",userid+\"\");\n\t\t}\n\t\treturn userid;\n\t}\n\n\t/**获取用户的openid**/\n\t__proto.getOpenId=function(){\n\t\tvar str=\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t\tvar openId=LocalStorage.getItem(\"openid\");\n\t\tif(openId==null || openId==\"\"){\n\t\t\topenId=\"\";\n\t\t\tfor(var i=0,sz=32;i<sz;i++){\n\t\t\t\tvar random=this.randRange(0,62);\n\t\t\t\topenId+=str.charAt(random);\n\t\t\t}\n\t\t\tLocalStorage.setItem(\"openid\",openId);\n\t\t}\n\t\treturn openId;\n\t}\n\n\t__proto.sendLog=function(pro,path,btype){\n\t\tvar _$this=this;\n\t\tvar htt=new HttpRequest();\n\t\thtt.on(/*laya.events.Event.ERROR*/\"error\",this,function(p,bt,e){\n\t\t\tif (e && e.indexOf(\"[404]\")!=-1){\n\t\t\t\tvar htt1=new HttpRequest();\n\t\t\t\thtt1.send(_$this.ErrorUrlHttps+\"garbage/\"+bt+\"/\",JSON.stringify(p),\"post\",\"text\",[\"Content-Type\",\"application/json\"]);\n\t\t\t}\n\t\t},[pro,btype]);\n\t\tif(Browser.onBDMiniGame){\n\t\t\tpro.gameurl=\"\";\n\t\t}\n\t\thtt.send(this.ErrorUrlHttps+path,JSON.stringify(pro),\"post\",\"text\",[\"Content-Type\",\"application/json\"]);\n\t}\n\n\t__proto.initEvent=function(){\n\t\tthis.on(/*laya.events.Event.CLICK*/\"click\",this,this.onIconClick);\n\t}\n\n\t__proto.onStageResize=function(){\n\t\tvar scale=Math.min(Laya.stage.width / Laya.stage.designWidth,Laya.stage.height / Laya.stage.designHeight);\n\t\tif(Laya.stage.width < 720)\n\t\t\tscale=0.9;\n\t\tif(this._moreBox){\n\t\t\tthis._moreBox.scale(scale,scale);\n\t\t}\n\t\tif(this._gameBox){\n\t\t\tthis._gameBox.scale(scale,scale);\n\t\t}\n\t}\n\n\t/**\n\t*晃动效果\n\t*@param target\n\t*@param tTime\n\t*@param sacleNum\n\t*@param lastSacleNum\n\t*@return\n\t*/\n\t__proto.tada=function(target,tTime,sacleNum,lastSacleNum){\n\t\t(sacleNum===void 0)&& (sacleNum=1.1);\n\t\t(lastSacleNum===void 0)&& (lastSacleNum=1);\n\t\tvar tl=new TimeLine();\n\t\ttl.reset();\n\t\ttl.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:3},tTime *0.1)\n\t\t.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:-3},tTime *0.1)\n\t\t.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:3},tTime *0.1)\n\t\t.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:-3},tTime *0.1)\n\t\t.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:3},tTime *0.1)\n\t\t.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:-3},tTime *0.1)\n\t\t.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:3},tTime *0.1)\n\t\t.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:-3},tTime *0.1)\n\t\t.to(target,{scaleX:sacleNum,scaleY:sacleNum,rotation:3},tTime *0.1)\n\t\t.to(target,{scaleX:lastSacleNum,scaleY:lastSacleNum,rotation:0},tTime *0.1);\n\t\ttl.play(0);\n\t\treturn tl;\n\t}\n\n\t/**销毁插件**/\n\t__proto.dispose=function(){\n\t\tthis.removeEvent();\n\t\tthis.gameStopHD=true;\n\t\tMoreGame._moreGameData=null;\n\t\tthis._iconImageObj=null;\n\t\tthis.clickCallBack=null;\n\t\tthis.closeCallBack=null;\n\t\tif(this.iconImgTl){\n\t\t\tthis.iconImgTl.offAll(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\tthis.iconImgTl=null;\n\t\t}\n\t\tif(this._moreBox){\n\t\t\tthis._moreBox.removeChildren();\n\t\t\tthis._moreBox=null;\n\t\t}\n\t\tif(this._gameBox){\n\t\t\tthis._gameBox.removeChildren();\n\t\t\tthis._gameBox=null;\n\t\t}\n\t\tif(this._iconImage){\n\t\t\tthis._iconImage.removeSelf();\n\t\t\tthis._iconImage=null;\n\t\t}\n\t}\n\n\t/**\n\t*设置icon的显示状态\n\t*@param type\n\t*/\n\t__proto.onSetIconType=function(type){\n\t\tthis.gameStopHD=!type;\n\t\tthis.visible=type;\n\t}\n\n\t/**检测晃动**/\n\t__proto.checkIconImgHD=function(){\n\t\tif(!this.iconImgTl)\n\t\t\tthis.iconImgTl=this.tada(this._iconImage,1200,1.1,0.9);\n\t\telse\n\t\tthis.iconImgTl.play(0);\n\t\tthis.iconImgTl.on(/*laya.events.Event.COMPLETE*/\"complete\",this,this.onTlComplete);\n\t}\n\n\t__proto.onTlComplete=function(){\n\t\tif(this.parent){\n\t\t\tthis._iconImage.scale(0.9,0.9);\n\t\t\tthis._iconImage.rotation=0;\n\t\t\tif (this.gameStopHD && this.iconImgTl){\n\t\t\t\tthis.iconImgTl.offAll(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\tthis.iconImgTl=null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tLaya.timer.once(1000,this,this.onYanChiPlay);\n\t\t\t}else{\n\t\t\tif(this.iconImgTl){\n\t\t\t\tthis.iconImgTl.offAll();\n\t\t\t\tthis.iconImgTl=null;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.onYanChiPlay=function(){\n\t\tif(this.parent && this.iconImgTl){\n\t\t\tthis.iconImgTl.play(0);\n\t\t\t}else{\n\t\t\tif(this.iconImgTl){\n\t\t\t\tthis.iconImgTl.offAll(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\t\tthis.iconImgTl=null;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.removeEvent=function(){\n\t\tthis.off(/*laya.events.Event.CLICK*/\"click\",this,this.onIconClick);\n\t}\n\n\t__proto.onIconClick=function(){\n\t\tthis.isShow=true;\n\t\tthis.clickCallBack !=null && this.clickCallBack.run();\n\t\tvar localCurrentTime=LocalStorage.getItem(\"currentTime\");\n\t\tvar currentTime=this.getLocalDateString();\n\t\tif(localCurrentTime !=currentTime){\n\t\t\tLocalStorage.setItem(\"currentTime\",currentTime);\n\t\t\tthis.reportError(MoreGame._moreGameData.statid1);\n\t\t\t}else{\n\t\t\tthis.reportError(MoreGame._moreGameData.statid2);\n\t\t}\n\t\tthis.onResLoaded();\n\t}\n\n\t__proto.onResLoaded=function(){\n\t\tif(!this._moreBox){\n\t\t\tthis._moreBox=new Box();\n\t\t\tLaya.stage.addChild(this._moreBox);\n\t\t\tthis._moreBox.zOrder=99999;\n\t\t\tthis._moreBox.left=this._moreBox.right=this._moreBox.top=this._moreBox.bottom=0;\n\t\t\tvar allBgImg=this.onCreateImage(MoreGame.onGetAtlasDanImgUrl(\"img_white_bg\"),this._moreBox);\n\t\t\tallBgImg.top=allBgImg.left=allBgImg.right=allBgImg.bottom=0;\n\t\t\tallBgImg.sizeGrid=\"1,1,1,1,1\";\n\t\t\tvar hlineImg=this.onCreateImage(MoreGame.onGetAtlasDanImgUrl(\"hengfengexian\"),this._moreBox);\n\t\t\thlineImg.left=hlineImg.right=0;\n\t\t\thlineImg.y=132;\n\t\t\thlineImg.alpha=0.2;\n\t\t\tvar jiantouImg=this.onCreateImage(MoreGame.onGetAtlasDanImgUrl(\"img_font_jingcai\"),this._moreBox);\n\t\t\tjiantouImg.on(/*laya.events.Event.CLICK*/\"click\",this,this.onJiantouImgClick);\n\t\t\tif(this.isQMP()&& this.screenType){\n\t\t\t\tjiantouImg.pos(15,70);\n\t\t\t\t}else{\n\t\t\t\tjiantouImg.pos(15,45);\n\t\t\t};\n\t\t\tvar gamelist=new List();\n\t\t\tthis._moreBox.addChild(gamelist);\n\t\t\tgamelist.itemRender=GameBox;\n\t\t\tgamelist.selectEnable=true;\n\t\t\tgamelist.vScrollBarSkin=\"\";\n\t\t\tgamelist.scrollBar.autoHide=true;\n\t\t\tgamelist.scrollBar.elasticDistance=250;\n\t\t\tgamelist.renderHandler=new Handler(this,this.onGameListRender);\n\t\t\tvar tempGameListArr=MoreGame._moreGameData.marvellousGame.gameList;\n\t\t\tvar gameListArr=[];\n\t\t\tgameListArr.push(tempGameListArr[0]);\n\t\t\tgameListArr.push(tempGameListArr[1]);\n\t\t\tvar getRomdomArr=this.RandomNumBoth(gameListArr.length,tempGameListArr.length-gameListArr.length,tempGameListArr.length);\n\t\t\tif(!getRomdomArr){\n\t\t\t\tthis.visible=false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tfor(var i=0,sz=getRomdomArr.length;i<sz;i++){\n\t\t\t\t\tvar index=getRomdomArr[i];\n\t\t\t\t\tgameListArr.push(tempGameListArr[index]);\n\t\t\t\t}\n\t\t\t\tMoreGame._moreGameData.marvellousGame.gameList=[];\n\t\t\t\tMoreGame._moreGameData.marvellousGame.gameList=gameListArr;\n\t\t\t\tgamelist.array=MoreGame._moreGameData.marvellousGame.gameList;\n\t\t\t}\n\t\t\tcatch(error){\n\t\t\t\tgamelist.array=MoreGame._moreGameData.marvellousGame.gameList;\n\t\t\t}\n\t\t\tif(this.screenType){\n\t\t\t\tgamelist.spaceY=10;\n\t\t\t\tgamelist.width=690;\n\t\t\t\tif(this.isQMP()){\n\t\t\t\t\tgamelist.height=Laya.stage.height+130;\n\t\t\t\t\t}else{\n\t\t\t\t\tgamelist.height=1139;\n\t\t\t\t}\n\t\t\t\tgamelist.y=139;\n\t\t\t\tgamelist.centerX=0;\n\t\t\t\t}else{\n\t\t\t}\n\t\t\tthis.onStageResize();\n\t\t\t}else{\n\t\t\tthis._moreBox.visible=true;\n\t\t}\n\t}\n\n\t/**\n\t*取出随机数,maxNum为 取出随机数的个数\n\t*@param minNum 最小值 2\n\t*@param maxNum 最大数值 14\n\t*@param maxcount 最大范围 12\n\t*@return\n\t*/\n\t__proto.RandomNumBoth=function(minNum,maxNum,maxcount){\n\t\tvar arr=[];\n\t\tfor(var i=minNum;i<maxcount;i++){\n\t\t\tarr.push(i);\n\t\t};\n\t\tvar numArr=[];\n\t\tvar arrLength=arr.length;\n\t\tfor(i=0;i<arrLength;i++){\n\t\t\tvar Rand=arr.length;\n\t\t\tvar number=Math.floor(Math.random()*arr.length);\n\t\t\tnumArr.push(arr[number]);\n\t\t\tarr.splice(number,1);\n\t\t\tif(arr.length <=arrLength-maxNum){\n\t\t\t\treturn numArr;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t*是否是全面屏 包括 安卓跟苹果\n\t*@return\n\t*/\n\t__proto.isQMP=function(){\n\t\tvar isBoo=false;\n\t\tvar tempBL=0;\n\t\tif(Laya.stage.screenMode==/*laya.display.Stage.SCREEN_HORIZONTAL*/\"horizontal\"){\n\t\t\ttempBL=Browser.height%9;\n\t\t\t}else{\n\t\t\ttempBL=Browser.width%9;\n\t\t}\n\t\tif(Browser.onAndroid && tempBL==0){\n\t\t\tvar tempBL2=0;\n\t\t\tif(Laya.stage.screenMode==/*laya.display.Stage.SCREEN_HORIZONTAL*/\"horizontal\"){\n\t\t\t\ttempBL2=Browser.width;\n\t\t\t\t}else{\n\t\t\t\ttempBL2=Browser.height;\n\t\t\t}\n\t\t\tif([2280,2160,2244,3120,2248,2340,2310].indexOf(tempBL2)!=-1){\n\t\t\t\tisBoo=true;\n\t\t\t}\n\t\t};\n\t\tvar onIPhoneX=/iPhone/gi.test(Browser.window.navigator.userAgent)&& (Math.min(Browser.clientHeight,Browser.clientWidth)==375 && Math.max(Browser.clientHeight,Browser.clientWidth)==812);\n\t\tvar onIPhoneXR=(Math.min(Browser.clientHeight,Browser.clientWidth)==414 && Math.max(Browser.clientHeight,Browser.clientWidth)==896);\n\t\tif((((Browser.onMiniGame || Browser.onBDMiniGame)&& !Browser.onAndroid))&&(onIPhoneX || onIPhoneXR)){\n\t\t\tisBoo=true;\n\t\t}\n\t\treturn isBoo;\n\t}\n\n\t/**\n\t*创建一个圆角矩形\n\t*@param width\n\t*@param height\n\t*@param circleNum\n\t*@return\n\t*/\n\t__proto.onDrawShapes=function(yuanWidth,yuanHeight,circleNum,isTeShu){\n\t\t(circleNum===void 0)&& (circleNum=5);\n\t\t(isTeShu===void 0)&& (isTeShu=false);\n\t\tvar isTeShuCircleNum=circleNum;\n\t\tif(isTeShu)\n\t\t\tisTeShuCircleNum=0;\n\t\tvar sprite=new Sprite();\n\t\tsprite.graphics.drawPath(0,0,[\n\t\t[\"moveTo\",circleNum,0],\n\t\t[\"lineTo\",105,0],\n\t\t[\"arcTo\",yuanWidth,0,yuanWidth,circleNum,circleNum],\n\t\t[\"lineTo\",yuanWidth,yuanHeight],\n\t\t[\"arcTo\",yuanWidth,yuanHeight+circleNum,105,yuanHeight+circleNum,isTeShuCircleNum],\n\t\t[\"lineTo\",circleNum,yuanHeight+circleNum],\n\t\t[\"arcTo\",0,yuanHeight+circleNum,0,yuanHeight,isTeShuCircleNum],\n\t\t[\"lineTo\",0,circleNum],\n\t\t[\"arcTo\",0,0,circleNum,0,circleNum],\n\t\t[\"closePath\"]],{\n\t\t\tfillStyle:\"#ff0000\"\n\t\t});\n\t\treturn sprite;\n\t}\n\n\t/**\n\t*创建遮罩的对象\n\t*@param url\n\t*@param parent\n\t*@return\n\t*/\n\t__proto.onCreateMaskImg=function(url,parent){\n\t\tvar kuangImg=this.onCreateImage(MoreGame.onGetAtlasDanImgUrl(\"dayuan\"),parent);\n\t\tvar iconImg=this.onCreateImage(url,kuangImg);\n\t\ticonImg.pos(11,10);\n\t\tvar sprite=new Sprite();\n\t\tsprite.graphics.drawCircle(71,74,68,\"#ff0000\");\n\t\ticonImg.mask=sprite;\n\t\tkuangImg.scale(0.7,0.7);\n\t\treturn kuangImg;\n\t}\n\n\t/**\n\t*渲染更多游戏列表\n\t*@param item\n\t*@param index\n\t*/\n\t__proto.onGameListRender=function(item,index){\n\t\tvar gameList=MoreGame._moreGameData.marvellousGame.gameList;\n\t\tif(index < 0 || index > gameList.length-1)\n\t\t\treturn;\n\t\tvar gameObj=gameList[index];\n\t\titem.init(gameObj,this.screenType,new Handler(this,this.onItemClickCallBack));\n\t}\n\n\t/**\n\t*单元点击回调\n\t*@param itemData\n\t*/\n\t__proto.onItemClickCallBack=function(itemData){\n\t\tvar _$this=this;\n\t\tif(!/*__JS__ */swan.navigateToMiniProgram)\n\t\t\treturn;\n\t\tvar appKey=itemData.appKey;\n\t\tvar path=itemData.path;\n\t\tvar extendInfo=itemData.extendInfo;\n\t\t/*__JS__ */swan.navigateToMiniProgram({\n\t\t\tappKey:appKey,\n\t\t\tpath:path,\n\t\t\textraData:extendInfo,\n\t\t\tsuccess:function success (e){\n\t\t\t},\n\t\t\tfail:function fail (e){\n\t\t\t},\n\t\t\tcomplete:function complete (e){\n\t\t\t\t_$this.reportError(itemData.statid);\n\t\t\t}.bind(this)\n\t\t});\n\t}\n\n\t/**更多游戏返回按钮点击**/\n\t__proto.onJiantouImgClick=function(type){\n\t\tthis.isShow=false;\n\t\tif(this._moreBox){\n\t\t\tthis._moreBox.visible=false;\n\t\t}\n\t\tthis.closeCallBack !=null && this.closeCallBack.run();\n\t}\n\n\t/**\n\t*创建文本\n\t*@param str\n\t*@param parent\n\t*@param width\n\t*@param height\n\t*@param size\n\t*@param color\n\t*@param wordwarp\n\t*@param align\n\t*@param leading\n\t*@return\n\t*/\n\t__proto.onCreateLabel=function(str,parent,size,color,wordwarp,align,leading){\n\t\t(size===void 0)&& (size=24);\n\t\t(color===void 0)&& (color=\"#000000\");\n\t\t(wordwarp===void 0)&& (wordwarp=false);\n\t\t(align===void 0)&& (align=\"center\");\n\t\t(leading===void 0)&& (leading=10);\n\t\tvar label=new Label();\n\t\tlabel.text=str;\n\t\tlabel.font=\"Microsoft YaHei\";\n\t\tlabel.fontSize=size;\n\t\tlabel.color=color;\n\t\tlabel.bold=true;\n\t\tlabel.leading=leading;\n\t\tlabel.valign=\"middle\";\n\t\tlabel.align=align;\n\t\tlabel.wordWrap=wordwarp;\n\t\tparent.addChild(label);\n\t\treturn label;\n\t}\n\n\t/**\n\t*创建图片\n\t*@param url\n\t*@param parent 图片的父容器\n\t*@return\n\t*/\n\t__proto.onCreateImage=function(url,parent){\n\t\tvar image=new Image();\n\t\timage.skin=url;\n\t\tparent.addChild(image);\n\t\treturn image;\n\t}\n\n\t/**初始化判断当前是否显示插件**/\n\t__proto.init=function(){\n\t\tvar userAgent=Browser.window.navigator.userAgent;\n\t\tvar onBDMiniGame=userAgent.indexOf('SwanGame')>-1;\n\t\tthis.visible=false;\n\t\tif(onBDMiniGame){\n\t\t\tthis.dinfo=JSON.stringify(/*__JS__ */laya.bd.mini.BMiniAdapter.systemInfo);\n\t\t\tthis.onGetAdvsListData();\n\t\t}\n\t}\n\n\t/**\n\t*生成指定范围的随机数\n\t*@param minNum 最小值\n\t*@param maxNum 最大值\n\t*/\n\t__proto.randRange=function(minNum,maxNum){\n\t\treturn (Math.floor(Math.random()*(maxNum-minNum+1))+minNum);\n\t}\n\n\t/**\n\t*获取广告列表数据信息\n\t*/\n\t__proto.onGetAdvsListData=function(){\n\t\tvar _this=this;\n\t\tvar random=this.randRange(10000,1000000);\n\t\tvar url=this._moreGameDataUrl+\"?\"+random;\n\t\tMoreGame._http.open(\"get\",url,true);\n\t\tMoreGame._http.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\")\n\t\tMoreGame._http.responseType=\"text\";\n\t\tMoreGame._http.onerror=function (e){\n\t\t\t_this._onError(e);\n\t\t}\n\t\tMoreGame._http.onload=function (e){\n\t\t\t_this._onLoad(e);\n\t\t}\n\t\tMoreGame._http.send(null);\n\t}\n\n\t/**\n\t*@private\n\t*请求出错侦的听处理函数。\n\t*@param e 事件对象。\n\t*/\n\t__proto._onError=function(e){\n\t\tthis.error(\"Request failed Status:\"+MoreGame._http.status+\" text:\"+MoreGame._http.statusText);\n\t}\n\n\t/**\n\t*@private\n\t*请求消息返回的侦听处理函数。\n\t*@param e 事件对象。\n\t*/\n\t__proto._onLoad=function(e){\n\t\tvar http=MoreGame._http;\n\t\tvar status=http.status!==undefined ? http.status :200;\n\t\tif (status===200 || status===204 || status===0){\n\t\t\tthis.complete();\n\t\t\t}else {\n\t\t\tthis.error(\"[\"+http.status+\"]\"+http.statusText+\":\"+http.responseURL);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*请求错误的处理函数。\n\t*@param message 错误信息。\n\t*/\n\t__proto.error=function(message){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\",message);\n\t}\n\n\t/**\n\t*@private\n\t*请求成功完成的处理函数。\n\t*/\n\t__proto.complete=function(){\n\t\tvar flag=true;\n\t\ttry {\n\t\t\tvar tempData=MoreGame._http.response || MoreGame._http.responseText;\n\t\t\tMoreGame._moreGameData=JSON.parse(tempData);\n\t\t\tthis.initUI();\n\t\t\t}catch (e){\n\t\t\tflag=false;\n\t\t\tthis.error(e.message);\n\t\t}\n\t}\n\n\t/**初始化UI显示**/\n\t__proto.initUI=function(){\n\t\tif(MoreGame._moreGameData.isOpen && this.screenType){\n\t\t\tif(!this._iconImage){\n\t\t\t\tthis._iconImage=new Image();\n\t\t\t\tthis.addChild(this._iconImage);\n\t\t\t}\n\t\t\tthis._iconImage.skin=MoreGame.onGetImgSkinUrl(MoreGame._moreGameData.icon);\n\t\t\tif(this._iconImageObj){\n\t\t\t\tthis._iconImage.size(this._iconImageObj.width,this._iconImageObj.height);\n\t\t\t\tthis._iconImage.pivot(this._iconImageObj.width/2,this._iconImageObj.height/2);\n\t\t\t\tthis._iconImage.pos(this._iconImageObj.width/2,this._iconImageObj.height/2);\n\t\t\t}\n\t\t\tthis.visible=true;\n\t\t\tthis.initEvent();\n\t\t\tthis.gameStopHD=false;\n\t\t\tthis.checkIconImgHD();\n\t\t\t}else{\n\t\t\tthis.visible=false;\n\t\t}\n\t}\n\n\t/**\n\t*设置icon的宽高尺寸\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.setIconSize=function(w,h){\n\t\tif(this._iconImage){\n\t\t\tthis._iconImage.size(w,h);\n\t\t\tthis._iconImage.pivot(w/2,h/2);\n\t\t\tthis._iconImage.pos(w/2,h/2);\n\t\t}\n\t\tthis._iconImageObj={width:w,height:h};\n\t}\n\n\tMoreGame.toLocaleDateString=function(dateNum){\n\t\treturn MoreGame.getDateFormatStr(dateNum,\"/\");\n\t}\n\n\tMoreGame.getDateFormatStr=function(stamp,formatStr){\n\t\t(formatStr===void 0)&& (formatStr=\"yynndd\");\n\t\tvar date=new Date(stamp);\n\t\tvar yy=date.getFullYear();\n\t\tvar nn=date.getMonth()+1;\n\t\tvar dd=date.getDate();\n\t\tvar hh=date.getHours();\n\t\tvar mm=date.getMinutes();\n\t\tvar ss=date.getSeconds();\n\t\tswitch(formatStr){\n\t\t\tcase \"yynndd\":\n\t\t\t\treturn yy.toString()+\"年\"+nn.toString()+\"月\"+dd.toString()+\"日\";\n\t\t\t\tbreak ;\n\t\t\tcase \"/\":\n\t\t\t\treturn yy.toString()+\"/\"+nn.toString()+\"/\"+dd.toString();\n\t\t\t\tbreak ;\n\t\t\t}\n\t\treturn yy.toString()+\"年\"+nn.toString()+\"月\"+dd.toString()+\"日\"+hh.toString()+\"时\"+mm.toString()+\"分\"+ss.toString()+\"秒\";\n\t}\n\n\tMoreGame.getDay=function(sdate){\n\t\tvar month=sdate.getMonth()+1;\n\t\tvar day=sdate.getDate();\n\t\tvar result=sdate.getFullYear()+\"\"+(month < 10?\"0\"+month:month)+\"\"+(day < 10?\"0\"+day:day);\n\t\treturn result;\n\t}\n\n\tMoreGame.onGetAtlasDanImgUrl=function(url){\n\t\treturn MoreGame._moreGameData.imgPath+MoreGame._moreGameData.atlas+url+\".png\";\n\t}\n\n\tMoreGame.onGetImgSkinUrl=function(resUrl){\n\t\treturn MoreGame._moreGameData.imgPath+resUrl;\n\t}\n\n\tMoreGame.onGetIconImgSkinUrl=function(resUrl){\n\t\treturn MoreGame._moreGameData.iconPath+resUrl;\n\t}\n\n\tMoreGame._moreGameData=null;\n\t__static(MoreGame,\n\t['_http',function(){return this._http=new Browser.window.XMLHttpRequest();}\n\t]);\n\tMoreGame.__init$=function(){\n\t\t/**\n\t\t*有渲染游戏单元\n\t\t*@author xiaosong\n\t\t*@date-2019-03-26\n\t\t*/\n\t\t//class GameBox extends laya.ui.Box\n\t\tGameBox=(function(_super){\n\t\t\tfunction GameBox(){\n\t\t\t\t/**游戏类型**/\n\t\t\t\tthis.titleLabel=null;\n\t\t\t\t/**游戏列表容器**/\n\t\t\t\tthis.gameListBox=null;\n\t\t\t\tGameBox.__super.call(this);\n\t\t\t}\n\t\t\t__class(GameBox,'',_super);\n\t\t\tvar __proto=GameBox.prototype;\n\t\t\t/**\n\t\t\t*初始化列表数据\n\t\t\t*@param data\n\t\t\t*/\n\t\t\t__proto.init=function(data,screenType,callBack){\n\t\t\t\tif(!this.titleLabel){\n\t\t\t\t\tthis.titleLabel=this.onCreateLabel(data.title,this,32,\"#3d3939\");\n\t\t\t\t\tthis.titleLabel.pos(8,0);\n\t\t\t\t\tthis.titleLabel.size(162,50);\n\t\t\t\t\t}else{\n\t\t\t\t\tthis.titleLabel.text=data.title;\n\t\t\t\t}\n\t\t\t\tif(!this.gameListBox){\n\t\t\t\t\tthis.gameListBox=new Box();\n\t\t\t\t\tthis.addChild(this.gameListBox);\n\t\t\t\t\tvar tempX=0;\n\t\t\t\t\tvar tempY=65;\n\t\t\t\t\tvar tempWidth=175;\n\t\t\t\t\tfor(var i=0,sz=data.gameList.length;i<sz;i++){\n\t\t\t\t\t\tvar gameitem=new GameItem();\n\t\t\t\t\t\tgameitem.init(data.gameList[i],screenType,callBack);\n\t\t\t\t\t\tgameitem.x=tempX+i *tempWidth;\n\t\t\t\t\t\tgameitem.y=tempY;\n\t\t\t\t\t\tthis.gameListBox.addChild(gameitem);\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tfor(i=0,sz=this.gameListBox._childs.length;i<sz;i++){\n\t\t\t\t\t\tgameitem=this.gameListBox._childs[i];\n\t\t\t\t\t\tgameitem.init(data.gameList[i],screenType,callBack);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.size(695,340);\n\t\t\t\tthis.cacheAs=\"bitmap\";\n\t\t\t}\n\t\t\t/**\n\t\t\t*创建文本\n\t\t\t*@param str\n\t\t\t*@param parent\n\t\t\t*@param width\n\t\t\t*@param height\n\t\t\t*@param size\n\t\t\t*@param color\n\t\t\t*@param wordwarp\n\t\t\t*@return\n\t\t\t*/\n\t\t\t__proto.onCreateLabel=function(str,parent,size,color,bold){\n\t\t\t\t(size===void 0)&& (size=26);\n\t\t\t\t(color===void 0)&& (color=\"#000000\");\n\t\t\t\t(bold===void 0)&& (bold=true);\n\t\t\t\tvar label=new Label();\n\t\t\t\tlabel.text=str;\n\t\t\t\tlabel.font=\"Microsoft YaHei\";\n\t\t\t\tlabel.fontSize=size;\n\t\t\t\tlabel.color=color;\n\t\t\t\tlabel.bold=bold;\n\t\t\t\tlabel.leading=10;\n\t\t\t\tlabel.valign=\"middle\";\n\t\t\t\tlabel.align=\"center\";\n\t\t\t\tlabel.overflow=\"hidden\";\n\t\t\t\tparent.addChild(label);\n\t\t\t\treturn label;\n\t\t\t}\n\t\t\treturn GameBox;\n\t\t})(Box)\n\t\t/**\n\t\t*更多游戏单元\n\t\t*@author xiaosong\n\t\t*@date 2018-12-26\n\t\t*/\n\t\t//class GameItem extends laya.ui.Box\n\t\tGameItem=(function(_super){\n\t\t\tfunction GameItem(){\n\t\t\t\t/**icon框**/\n\t\t\t\tthis.kuangImg=null;\n\t\t\t\t/**icon名字**/\n\t\t\t\tthis.iconNameLabel=null;\n\t\t\t\t/**icon图标**/\n\t\t\t\tthis.iconImg=null;\n\t\t\t\t/**玩一玩按钮**/\n\t\t\t\tthis.playImg=null;\n\t\t\t\t/**渲染单元数据**/\n\t\t\t\tthis.itemData=null;\n\t\t\t\t/**回调方法**/\n\t\t\t\tthis.callBackHandler=null;\n\t\t\t\tGameItem.__super.call(this);\n\t\t\t}\n\t\t\t__class(GameItem,'',_super);\n\t\t\tvar __proto=GameItem.prototype;\n\t\t\t__proto.MoveGameItem=function(){}\n\t\t\t/**注册事件监听**/\n\t\t\t__proto.initEvent=function(){\n\t\t\t\tthis.on(/*laya.events.Event.CLICK*/\"click\",this,this.onItemClick);\n\t\t\t}\n\t\t\t__proto.onItemClick=function(){\n\t\t\t\tthis.callBackHandler !=null && this.callBackHandler.runWith([this.itemData]);\n\t\t\t}\n\t\t\t/**\n\t\t\t*初始化单元数据\n\t\t\t*@param data\n\t\t\t*/\n\t\t\t__proto.init=function(data,screenType,callBack){\n\t\t\t\tthis.itemData=data;\n\t\t\t\tthis.callBackHandler=callBack;\n\t\t\t\tif(!this.kuangImg)\n\t\t\t\t\tthis.kuangImg=this.onCreateImage(MoreGame.onGetAtlasDanImgUrl(\"dayuan\"),this);\n\t\t\t\telse{\n\t\t\t\t\tthis.kuangImg.skin=MoreGame.onGetAtlasDanImgUrl(\"dayuan\");\n\t\t\t\t}\n\t\t\t\tif(!this.iconImg){\n\t\t\t\t\tthis.iconImg=this.onCreateImage(MoreGame.onGetIconImgSkinUrl(data.icon),this);\n\t\t\t\t\tvar sprite=new Sprite();\n\t\t\t\t\tsprite.graphics.drawCircle(71,74,68,\"#ff0000\");\n\t\t\t\t\tthis.iconImg.mask=sprite;\n\t\t\t\t\tthis.iconImg.pos(13,10);\n\t\t\t\t\t}else{\n\t\t\t\t\tthis.iconImg.skin=MoreGame.onGetIconImgSkinUrl(data.icon);\n\t\t\t\t}\n\t\t\t\tif(!this.iconNameLabel){\n\t\t\t\t\tthis.iconNameLabel=this.onCreateLabel(data.name,this,28,\"#3d3939\");\n\t\t\t\t\tthis.iconNameLabel.pos(7,165);\n\t\t\t\t\t}else{\n\t\t\t\t\tthis.iconNameLabel.text=data.name;\n\t\t\t\t}\n\t\t\t\tif(!this.playImg){\n\t\t\t\t\tthis.playImg=this.onCreateImage(MoreGame.onGetAtlasDanImgUrl(\"img_play\"),this);\n\t\t\t\t\tthis.playImg.pos(12,210);\n\t\t\t\t\t}else{\n\t\t\t\t\tthis.playImg.skin=MoreGame.onGetAtlasDanImgUrl(\"img_play\");\n\t\t\t\t}\n\t\t\t\tthis.size(165,270);\n\t\t\t\tthis.initEvent();\n\t\t\t}\n\t\t\t/**\n\t\t\t*创建文本\n\t\t\t*@param str\n\t\t\t*@param parent\n\t\t\t*@param width\n\t\t\t*@param height\n\t\t\t*@param size\n\t\t\t*@param color\n\t\t\t*@param wordwarp\n\t\t\t*@return\n\t\t\t*/\n\t\t\t__proto.onCreateLabel=function(str,parent,size,color,bold){\n\t\t\t\t(size===void 0)&& (size=24);\n\t\t\t\t(color===void 0)&& (color=\"#000000\");\n\t\t\t\t(bold===void 0)&& (bold=false);\n\t\t\t\tvar label=new Label();\n\t\t\t\tlabel.text=str;\n\t\t\t\tlabel.font=\"Microsoft YaHei\";\n\t\t\t\tlabel.fontSize=size;\n\t\t\t\tlabel.color=color;\n\t\t\t\tlabel.bold=bold;\n\t\t\t\tlabel.leading=10;\n\t\t\t\tlabel.valign=\"middle\";\n\t\t\t\tlabel.align=\"center\";\n\t\t\t\tlabel.size(152,44);\n\t\t\t\tlabel.overflow=\"hidden\";\n\t\t\t\tparent.addChild(label);\n\t\t\t\treturn label;\n\t\t\t}\n\t\t\t/**\n\t\t\t*创建图片\n\t\t\t*@param url\n\t\t\t*@param parent 图片的父容器\n\t\t\t*@return\n\t\t\t*/\n\t\t\t__proto.onCreateImage=function(url,parent){\n\t\t\t\tvar image=new Image();\n\t\t\t\timage.skin=url;\n\t\t\t\tparent.addChild(image);\n\t\t\t\treturn image;\n\t\t\t}\n\t\t\treturn GameItem;\n\t\t})(Box)\n\t}\n\n\treturn MoreGame;\n})(View)\n\n\n/**\n*<code>VBox</code> 是一个垂直布局容器类。\n*/\n//class laya.ui.VBox extends laya.ui.LayoutBox\nvar VBox=(function(_super){\n\tfunction VBox(){\n\t\tVBox.__super.call(this);;\n\t}\n\n\t__class(VBox,'laya.ui.VBox',_super);\n\tvar __proto=VBox.prototype;\n\t/**@inheritDoc */\n\t__proto.changeItems=function(){\n\t\tthis._itemChanged=false;\n\t\tvar items=[];\n\t\tvar maxWidth=0;\n\t\tfor (var i=0,n=this.numChildren;i < n;i++){\n\t\t\tvar item=this.getChildAt(i);\n\t\t\tif (item&&item.layoutEnabled){\n\t\t\t\titems.push(item);\n\t\t\t\tmaxWidth=this._width?this._width:Math.max(maxWidth,item.width *item.scaleX);\n\t\t\t}\n\t\t}\n\t\tthis.sortItem(items);\n\t\tvar top=0;\n\t\tfor (i=0,n=items.length;i < n;i++){\n\t\t\titem=items[i];\n\t\t\titem.y=top;\n\t\t\ttop+=item.height *item.scaleY+this._space;\n\t\t\tif (this._align==\"left\"){\n\t\t\t\titem.x=0;\n\t\t\t\t}else if (this._align==\"center\"){\n\t\t\t\titem.x=(maxWidth-item.width *item.scaleX)*0.5;\n\t\t\t\t}else if (this._align==\"right\"){\n\t\t\t\titem.x=maxWidth-item.width *item.scaleX;\n\t\t\t}\n\t\t}\n\t\tthis.changeSize();\n\t}\n\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tif (this._width !=value){\n\t\t\tLaya.superSet(LayoutBox,this,'width',value);\n\t\t\tthis.callLater(this.changeItems);\n\t\t}\n\t});\n\n\tVBox.NONE=\"none\";\n\tVBox.LEFT=\"left\";\n\tVBox.CENTER=\"center\";\n\tVBox.RIGHT=\"right\";\n\treturn VBox;\n})(LayoutBox)\n\n\n/**\n*<code>RadioGroup</code> 控件定义一组 <code>Radio</code> 控件，这些控件相互排斥；\n*因此，用户每次只能选择一个 <code>Radio</code> 控件。\n*\n*@example <caption>以下示例代码，创建了一个 <code>RadioGroup</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.Radio;\n\t*import laya.ui.RadioGroup;\n\t*import laya.utils.Handler;\n\t*public class RadioGroup_Example\n\t*{\n\t\t*public function RadioGroup_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/radio.png\"],Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*var radioGroup:RadioGroup=new RadioGroup();//创建一个 RadioGroup 类的实例对象 radioGroup 。\n\t\t\t*radioGroup.pos(100,100);//设置 radioGroup 的位置信息。\n\t\t\t*radioGroup.labels=\"item0,item1,item2\";//设置 radioGroup 的标签集。\n\t\t\t*radioGroup.skin=\"resource/ui/radio.png\";//设置 radioGroup 的皮肤。\n\t\t\t*radioGroup.space=10;//设置 radioGroup 的项间隔距离。\n\t\t\t*radioGroup.selectHandler=new Handler(this,onSelect);//设置 radioGroup 的选择项发生改变时执行的处理器。\n\t\t\t*Laya.stage.addChild(radioGroup);//将 radioGroup 添加到显示列表。\n\t\t\t*}\n\t\t*private function onSelect(index:int):void\n\t\t*{\n\t\t\t*trace(\"当前选择的单选按钮索引: index= \",index);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高、渲染模式\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*Laya.loader.load([\"resource/ui/radio.png\"],laya.utils.Handler.create(this,onLoadComplete));\n*function onLoadComplete(){\n\t*var radioGroup=new laya.ui.RadioGroup();//创建一个 RadioGroup 类的实例对象 radioGroup 。\n\t*radioGroup.pos(100,100);//设置 radioGroup 的位置信息。\n\t*radioGroup.labels=\"item0,item1,item2\";//设置 radioGroup 的标签集。\n\t*radioGroup.skin=\"resource/ui/radio.png\";//设置 radioGroup 的皮肤。\n\t*radioGroup.space=10;//设置 radioGroup 的项间隔距离。\n\t*radioGroup.selectHandler=new laya.utils.Handler(this,onSelect);//设置 radioGroup 的选择项发生改变时执行的处理器。\n\t*Laya.stage.addChild(radioGroup);//将 radioGroup 添加到显示列表。\n\t*}\n*function onSelect(index){\n\t*console.log(\"当前选择的单选按钮索引: index= \",index);\n\t*}\n*@example\n*import Radio=laya.ui.Radio;\n*import RadioGroup=laya.ui.RadioGroup;\n*import Handler=laya.utils.Handler;\n*class RadioGroup_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/radio.png\"],Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*var radioGroup:RadioGroup=new RadioGroup();//创建一个 RadioGroup 类的实例对象 radioGroup 。\n\t\t*radioGroup.pos(100,100);//设置 radioGroup 的位置信息。\n\t\t*radioGroup.labels=\"item0,item1,item2\";//设置 radioGroup 的标签集。\n\t\t*radioGroup.skin=\"resource/ui/radio.png\";//设置 radioGroup 的皮肤。\n\t\t*radioGroup.space=10;//设置 radioGroup 的项间隔距离。\n\t\t*radioGroup.selectHandler=new Handler(this,this.onSelect);//设置 radioGroup 的选择项发生改变时执行的处理器。\n\t\t*Laya.stage.addChild(radioGroup);//将 radioGroup 添加到显示列表。\n\t\t*}\n\t*private onSelect(index:number):void {\n\t\t*console.log(\"当前选择的单选按钮索引: index= \",index);\n\t\t*}\n\t*}\n*/\n//class laya.ui.RadioGroup extends laya.ui.UIGroup\nvar RadioGroup=(function(_super){\n\tfunction RadioGroup(){\n\t\tRadioGroup.__super.call(this);;\n\t}\n\n\t__class(RadioGroup,'laya.ui.RadioGroup',_super);\n\tvar __proto=RadioGroup.prototype;\n\t/**@inheritDoc */\n\t__proto.createItem=function(skin,label){\n\t\treturn new Radio(skin,label);\n\t}\n\n\treturn RadioGroup;\n})(UIGroup)\n\n\n/**\n*<code>Tab</code> 组件用来定义选项卡按钮组。 *\n*@internal <p>属性：<code>selectedIndex</code> 的默认值为-1。</p>\n*\n*@example <caption>以下示例代码，创建了一个 <code>Tab</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.Tab;\n\t*import laya.utils.Handler;\n\t*public class Tab_Example\n\t*{\n\t\t*public function Tab_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/tab.png\"],Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*var tab:Tab=new Tab();//创建一个 Tab 类的实例对象 tab 。\n\t\t\t*tab.skin=\"resource/ui/tab.png\";//设置 tab 的皮肤。\n\t\t\t*tab.labels=\"item0,item1,item2\";//设置 tab 的标签集。\n\t\t\t*tab.x=100;//设置 tab 对象的属性 x 的值，用于控制 tab 对象的显示位置。\n\t\t\t*tab.y=100;//设置 tab 对象的属性 y 的值，用于控制 tab 对象的显示位置。\n\t\t\t*tab.selectHandler=new Handler(this,onSelect);//设置 tab 的选择项发生改变时执行的处理器。\n\t\t\t*Laya.stage.addChild(tab);//将 tab 添到显示列表。\n\t\t\t*}\n\t\t*private function onSelect(index:int):void\n\t\t*{\n\t\t\t*trace(\"当前选择的表情页索引: index= \",index);\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*Laya.loader.load([\"resource/ui/tab.png\"],laya.utils.Handler.create(this,onLoadComplete));\n*function onLoadComplete(){\n\t*var tab=new laya.ui.Tab();//创建一个 Tab 类的实例对象 tab 。\n\t*tab.skin=\"resource/ui/tab.png\";//设置 tab 的皮肤。\n\t*tab.labels=\"item0,item1,item2\";//设置 tab 的标签集。\n\t*tab.x=100;//设置 tab 对象的属性 x 的值，用于控制 tab 对象的显示位置。\n\t*tab.y=100;//设置 tab 对象的属性 y 的值，用于控制 tab 对象的显示位置。\n\t*tab.selectHandler=new laya.utils.Handler(this,onSelect);//设置 tab 的选择项发生改变时执行的处理器。\n\t*Laya.stage.addChild(tab);//将 tab 添到显示列表。\n\t*}\n*function onSelect(index){\n\t*console.log(\"当前选择的标签页索引: index= \",index);\n\t*}\n*@example\n*import Tab=laya.ui.Tab;\n*import Handler=laya.utils.Handler;\n*class Tab_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/tab.png\"],Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*var tab:Tab=new Tab();//创建一个 Tab 类的实例对象 tab 。\n\t\t*tab.skin=\"resource/ui/tab.png\";//设置 tab 的皮肤。\n\t\t*tab.labels=\"item0,item1,item2\";//设置 tab 的标签集。\n\t\t*tab.x=100;//设置 tab 对象的属性 x 的值，用于控制 tab 对象的显示位置。\n\t\t*tab.y=100;//设置 tab 对象的属性 y 的值，用于控制 tab 对象的显示位置。\n\t\t*tab.selectHandler=new Handler(this,this.onSelect);//设置 tab 的选择项发生改变时执行的处理器。\n\t\t*Laya.stage.addChild(tab);//将 tab 添到显示列表。\n\t\t*}\n\t*private onSelect(index:number):void {\n\t\t*console.log(\"当前选择的表情页索引: index= \",index);\n\t\t*}\n\t*}\n*/\n//class laya.ui.Tab extends laya.ui.UIGroup\nvar Tab=(function(_super){\n\tfunction Tab(){\n\t\tTab.__super.call(this);;\n\t}\n\n\t__class(Tab,'laya.ui.Tab',_super);\n\tvar __proto=Tab.prototype;\n\t/**\n\t*@private\n\t*@inheritDoc\n\t*/\n\t__proto.createItem=function(skin,label){\n\t\treturn new Button(skin,label);\n\t}\n\n\treturn Tab;\n})(UIGroup)\n\n\n/**\n*<code>TextArea</code> 类用于创建显示对象以显示和输入文本。\n*@example <caption>以下示例代码，创建了一个 <code>TextArea</code> 实例。</caption>\n*package\n*{\n\t*import laya.ui.TextArea;\n\t*import laya.utils.Handler;\n\t*public class TextArea_Example\n\t*{\n\t\t*public function TextArea_Example()\n\t\t*{\n\t\t\t*Laya.init(640,800);//设置游戏画布宽高。\n\t\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t\t*Laya.loader.load([\"resource/ui/input.png\"],Handler.create(this,onLoadComplete));//加载资源。\n\t\t\t*}\n\t\t*private function onLoadComplete():void\n\t\t*{\n\t\t\t*var textArea:TextArea=new TextArea(\"这个一个TextArea实例。\");//创建一个 TextArea 类的实例对象 textArea 。\n\t\t\t*textArea.skin=\"resource/ui/input.png\";//设置 textArea 的皮肤。\n\t\t\t*textArea.sizeGrid=\"4,4,4,4\";//设置 textArea 的网格信息。\n\t\t\t*textArea.color=\"#008fff\";//设置 textArea 的文本颜色。\n\t\t\t*textArea.font=\"Arial\";//设置 textArea 的字体。\n\t\t\t*textArea.bold=true;//设置 textArea 的文本显示为粗体。\n\t\t\t*textArea.fontSize=20;//设置 textArea 的文本字体大小。\n\t\t\t*textArea.wordWrap=true;//设置 textArea 的文本自动换行。\n\t\t\t*textArea.x=100;//设置 textArea 对象的属性 x 的值，用于控制 textArea 对象的显示位置。\n\t\t\t*textArea.y=100;//设置 textArea 对象的属性 y 的值，用于控制 textArea 对象的显示位置。\n\t\t\t*textArea.width=300;//设置 textArea 的宽度。\n\t\t\t*textArea.height=200;//设置 textArea 的高度。\n\t\t\t*Laya.stage.addChild(textArea);//将 textArea 添加到显示列表。\n\t\t\t*}\n\t\t*}\n\t*}\n*@example\n*Laya.init(640,800);//设置游戏画布宽高、渲染模式\n*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色\n*Laya.loader.load([\"resource/ui/input.png\"],laya.utils.Handler.create(this,onLoadComplete));//加载资源。\n*function onLoadComplete(){\n\t*var textArea=new laya.ui.TextArea(\"这个一个TextArea实例。\");//创建一个 TextArea 类的实例对象 textArea 。\n\t*textArea.skin=\"resource/ui/input.png\";//设置 textArea 的皮肤。\n\t*textArea.sizeGrid=\"4,4,4,4\";//设置 textArea 的网格信息。\n\t*textArea.color=\"#008fff\";//设置 textArea 的文本颜色。\n\t*textArea.font=\"Arial\";//设置 textArea 的字体。\n\t*textArea.bold=true;//设置 textArea 的文本显示为粗体。\n\t*textArea.fontSize=20;//设置 textArea 的文本字体大小。\n\t*textArea.wordWrap=true;//设置 textArea 的文本自动换行。\n\t*textArea.x=100;//设置 textArea 对象的属性 x 的值，用于控制 textArea 对象的显示位置。\n\t*textArea.y=100;//设置 textArea 对象的属性 y 的值，用于控制 textArea 对象的显示位置。\n\t*textArea.width=300;//设置 textArea 的宽度。\n\t*textArea.height=200;//设置 textArea 的高度。\n\t*Laya.stage.addChild(textArea);//将 textArea 添加到显示列表。\n\t*}\n*@example\n*import TextArea=laya.ui.TextArea;\n*import Handler=laya.utils.Handler;\n*class TextArea_Example {\n\t*constructor(){\n\t\t*Laya.init(640,800);//设置游戏画布宽高、渲染模式。\n\t\t*Laya.stage.bgColor=\"#efefef\";//设置画布的背景颜色。\n\t\t*Laya.loader.load([\"resource/ui/input.png\"],Handler.create(this,this.onLoadComplete));//加载资源。\n\t\t*}\n\t*private onLoadComplete():void {\n\t\t*var textArea:TextArea=new TextArea(\"这个一个TextArea实例。\");//创建一个 TextArea 类的实例对象 textArea 。\n\t\t*textArea.skin=\"resource/ui/input.png\";//设置 textArea 的皮肤。\n\t\t*textArea.sizeGrid=\"4,4,4,4\";//设置 textArea 的网格信息。\n\t\t*textArea.color=\"#008fff\";//设置 textArea 的文本颜色。\n\t\t*textArea.font=\"Arial\";//设置 textArea 的字体。\n\t\t*textArea.bold=true;//设置 textArea 的文本显示为粗体。\n\t\t*textArea.fontSize=20;//设置 textArea 的文本字体大小。\n\t\t*textArea.wordWrap=true;//设置 textArea 的文本自动换行。\n\t\t*textArea.x=100;//设置 textArea 对象的属性 x 的值，用于控制 textArea 对象的显示位置。\n\t\t*textArea.y=100;//设置 textArea 对象的属性 y 的值，用于控制 textArea 对象的显示位置。\n\t\t*textArea.width=300;//设置 textArea 的宽度。\n\t\t*textArea.height=200;//设置 textArea 的高度。\n\t\t*Laya.stage.addChild(textArea);//将 textArea 添加到显示列表。\n\t\t*}\n\t*}\n*/\n//class laya.ui.TextArea extends laya.ui.TextInput\nvar TextArea=(function(_super){\n\tfunction TextArea(text){\n\t\t/**@private */\n\t\tthis._vScrollBar=null;\n\t\t/**@private */\n\t\tthis._hScrollBar=null;\n\t\t(text===void 0)&& (text=\"\");\n\t\tTextArea.__super.call(this,text);\n\t}\n\n\t__class(TextArea,'laya.ui.TextArea',_super);\n\tvar __proto=TextArea.prototype;\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\t_super.prototype.destroy.call(this,destroyChild);\n\t\tthis._vScrollBar && this._vScrollBar.destroy();\n\t\tthis._hScrollBar && this._hScrollBar.destroy();\n\t\tthis._vScrollBar=null;\n\t\tthis._hScrollBar=null;\n\t}\n\n\t__proto.initialize=function(){\n\t\tthis.width=180;\n\t\tthis.height=150;\n\t\tthis._tf.wordWrap=true;\n\t\tthis.multiline=true;\n\t}\n\n\t__proto.onVBarChanged=function(e){\n\t\tif (this._tf.scrollY !=this._vScrollBar.value){\n\t\t\tthis._tf.scrollY=this._vScrollBar.value;\n\t\t}\n\t}\n\n\t__proto.onHBarChanged=function(e){\n\t\tif (this._tf.scrollX !=this._hScrollBar.value){\n\t\t\tthis._tf.scrollX=this._hScrollBar.value;\n\t\t}\n\t}\n\n\t__proto.changeScroll=function(){\n\t\tvar vShow=this._vScrollBar && this._tf.maxScrollY > 0;\n\t\tvar hShow=this._hScrollBar && this._tf.maxScrollX > 0;\n\t\tvar showWidth=vShow ? this._width-this._vScrollBar.width :this._width;\n\t\tvar showHeight=hShow ? this._height-this._hScrollBar.height :this._height;\n\t\tvar padding=this._tf.padding || Styles.labelPadding;\n\t\tthis._tf.width=showWidth;\n\t\tthis._tf.height=showHeight;\n\t\tif (this._vScrollBar){\n\t\t\tthis._vScrollBar.x=this._width-this._vScrollBar.width-padding[2];\n\t\t\tthis._vScrollBar.y=padding[1];\n\t\t\tthis._vScrollBar.height=this._height-(hShow ? this._hScrollBar.height :0)-padding[1]-padding[3];\n\t\t\tthis._vScrollBar.scrollSize=1;\n\t\t\tthis._vScrollBar.thumbPercent=showHeight / Math.max(this._tf.textHeight,showHeight);\n\t\t\tthis._vScrollBar.setScroll(1,this._tf.maxScrollY,this._tf.scrollY);\n\t\t\tthis._vScrollBar.visible=vShow;\n\t\t}\n\t\tif (this._hScrollBar){\n\t\t\tthis._hScrollBar.x=padding[0];\n\t\t\tthis._hScrollBar.y=this._height-this._hScrollBar.height-padding[3];\n\t\t\tthis._hScrollBar.width=this._width-(vShow ? this._vScrollBar.width :0)-padding[0]-padding[2];\n\t\t\tthis._hScrollBar.scrollSize=Math.max(showWidth *0.033,1);\n\t\t\tthis._hScrollBar.thumbPercent=showWidth / Math.max(this._tf.textWidth,showWidth);\n\t\t\tthis._hScrollBar.setScroll(0,this.maxScrollX,this.scrollX);\n\t\t\tthis._hScrollBar.visible=hShow;\n\t\t}\n\t}\n\n\t/**滚动到某个位置*/\n\t__proto.scrollTo=function(y){\n\t\tthis.commitMeasure();\n\t\tthis._tf.scrollY=y;\n\t}\n\n\t/**垂直滚动值*/\n\t__getset(0,__proto,'scrollY',function(){\n\t\treturn this._tf.scrollY;\n\t});\n\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tLaya.superSet(TextInput,this,'width',value);\n\t\tthis.callLater(this.changeScroll);\n\t});\n\n\t/**水平滚动条实体*/\n\t__getset(0,__proto,'hScrollBar',function(){\n\t\treturn this._hScrollBar;\n\t});\n\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tLaya.superSet(TextInput,this,'height',value);\n\t\tthis.callLater(this.changeScroll);\n\t});\n\n\t/**水平滚动最大值*/\n\t__getset(0,__proto,'maxScrollX',function(){\n\t\treturn this._tf.maxScrollX;\n\t});\n\n\t/**垂直滚动条皮肤*/\n\t__getset(0,__proto,'vScrollBarSkin',function(){\n\t\treturn this._vScrollBar ? this._vScrollBar.skin :null;\n\t\t},function(value){\n\t\tif (this._vScrollBar==null){\n\t\t\tthis.addChild(this._vScrollBar=new VScrollBar());\n\t\t\tthis._vScrollBar.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onVBarChanged);\n\t\t\tthis._vScrollBar.target=this._tf;\n\t\t\tthis.callLater(this.changeScroll);\n\t\t}\n\t\tthis._vScrollBar.skin=value;\n\t});\n\n\t/**水平滚动条皮肤*/\n\t__getset(0,__proto,'hScrollBarSkin',function(){\n\t\treturn this._hScrollBar ? this._hScrollBar.skin :null;\n\t\t},function(value){\n\t\tif (this._hScrollBar==null){\n\t\t\tthis.addChild(this._hScrollBar=new HScrollBar());\n\t\t\tthis._hScrollBar.on(/*laya.events.Event.CHANGE*/\"change\",this,this.onHBarChanged);\n\t\t\tthis._hScrollBar.mouseWheelEnable=false;\n\t\t\tthis._hScrollBar.target=this._tf;\n\t\t\tthis.callLater(this.changeScroll);\n\t\t}\n\t\tthis._hScrollBar.skin=value;\n\t});\n\n\t/**垂直滚动条实体*/\n\t__getset(0,__proto,'vScrollBar',function(){\n\t\treturn this._vScrollBar;\n\t});\n\n\t/**垂直滚动最大值*/\n\t__getset(0,__proto,'maxScrollY',function(){\n\t\treturn this._tf.maxScrollY;\n\t});\n\n\t/**水平滚动值*/\n\t__getset(0,__proto,'scrollX',function(){\n\t\treturn this._tf.scrollX;\n\t});\n\n\treturn TextArea;\n})(TextInput)\n\n\n/**\n*异步Dialog的生命周期:show或者popup > onCreate(如果没有创建过)> onOpen > onClose > onDestroy(如果销毁)\n*onCreate在页面未创建时执行一次，再次打开页面不会再执行，适合写一些只执行一次的逻辑，比如资源加载，节点事件监听\n*onOpen在页面每次打开都会执行，适合做一些每次都需要处理的事情，比如消息请求，根据数据初始化页面\n*onClose在每次关闭的时候调用，适合关闭时停止动画，网络消息监听等逻辑\n*onDestroy在页面被销毁的时候调用，适合置空引用对象\n*/\n//class laya.ui.AsynDialog extends laya.ui.Dialog\nvar AsynDialog=(function(_super){\n\tfunction AsynDialog(){\n\t\t/**@private */\n\t\tthis._uiView=null;\n\t\t/**打开时是否关闭其他页面*/\n\t\tthis.isCloseOther=false;\n\t\tAsynDialog.__super.call(this);\n\t}\n\n\t__class(AsynDialog,'laya.ui.AsynDialog',_super);\n\tvar __proto=AsynDialog.prototype;\n\t/**@private */\n\t__proto.createView=function(uiView){\n\t\tthis._uiView=uiView;\n\t}\n\n\t__proto._open=function(modal,closeOther,showEffect){\n\t\tthis.isModal=modal;\n\t\tthis.isCloseOther=closeOther;\n\t\tDialog.manager.lock(true);\n\t\tif (this._uiView)this.onCreated();\n\t\telse this.onOpen();\n\t}\n\n\t/**\n\t*在页面未创建时执行一次，再次打开页面不会再执行，适合写一些只执行一次的逻辑，比如资源加载，节点事件监听\n\t*/\n\t__proto.onCreated=function(){\n\t\tthis.createUI();\n\t\tthis.onOpen();\n\t}\n\n\t/**根据节点数据创建UI*/\n\t__proto.createUI=function(){\n\t\tlaya.ui.View.prototype.createView.call(this,this._uiView);\n\t\tthis._uiView=null;\n\t\tthis._dealDragArea();\n\t}\n\n\t/**\n\t*在页面每次打开都会执行，适合做一些每次都需要处理的事情，比如消息请求，根据数据初始化页面\n\t*/\n\t__proto.onOpen=function(){\n\t\tDialog.manager.open(this,this.isCloseOther);\n\t\tDialog.manager.lock(false);\n\t}\n\n\t__proto.close=function(type,showEffect){\n\t\t(showEffect===void 0)&& (showEffect=true);\n\t\tDialog.manager.close(this);\n\t\tthis.onClose();\n\t}\n\n\t/**\n\t*在每次关闭的时候调用，适合关闭时停止动画，网络消息监听等逻辑\n\t*/\n\t__proto.onClose=function(){}\n\t__proto.destroy=function(destroyChild){\n\t\t(destroyChild===void 0)&& (destroyChild=true);\n\t\tlaya.ui.View.prototype.destroy.call(this,destroyChild);\n\t\tthis._uiView=null;\n\t\tthis.onDestroy();\n\t}\n\n\t/**\n\t*在页面被销毁的时候调用，适合置空引用对象\n\t*/\n\t__proto.onDestroy=function(){}\n\treturn AsynDialog;\n})(Dialog)\n\n\n\tLaya.__init([View,MoreGame]);\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.vvmini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Config=Laya.Config,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,URL=laya.net.URL,Utils=laya.utils.Utils;\n/**@private **/\n//class laya.vv.mini.MiniFileMgr\nvar MiniFileMgr$4=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.vv.mini.MiniFileMgr',null,'MiniFileMgr$4');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=VVMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(VVMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.filesListObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"ascill\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tif(!data.data)\n\t\t\t\t\tdata.data=data.text;\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif(data.errCode==0)\n\t\t\t\t\tdata.statusCode=200;\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"ascill\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(VVMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,callBack,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(!data.data)\n\t\t\t\t\t\tdata.data=data.text;\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif(data.errCode==0)\n\t\t\t\t\tdata.statusCode=200;\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((VVMiniAdapter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tif(VVMiniAdapter.window.navigator.userAgent.indexOf('VVGame')<0){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif(data.length)\n\t\t\t\t\t\t\tdata.size=data.length;\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > VVMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tVVMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif(data.length)\n\t\t\t\t\t\tdata.size=data.length;\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > VVMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tVVMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=VVMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.vv.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.vv.mini.MiniFileMgr.filesListObj && laya.vv.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.vv.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.vv.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!VVMiniAdapter.isZiYu &&VVMiniAdapter.isPosMsgYu && VVMiniAdapter.window.qg.postMessage){\n\t\t\tVVMiniAdapter.window.qg.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data2,code){\n\t\t\t\tif(code==300){\n\t\t\t\t\tvar data={};\n\t\t\t\t\tdata.errMsg=\"file already exists\";\n\t\t\t\t}\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"ascill\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tfilesListStr=MiniFileMgr.fs.readFileSync(fileUrl,encoding);\n\t\t\tif(filesListStr.indexOf(\"No such file or directory\")!=-1){\n\t\t\t\tfilesListStr=JSON.stringify({});\n\t\t\t}\n\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=VVMiniAdapter.window.qg.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=VVMiniAdapter.window.qg.getFileSystemManager();},'wxdown',function(){return this.wxdown=VVMiniAdapter.window.qg.download;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.vv.mini.MiniImage\nvar MiniImage$4=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.vv.mini.MiniImage',null,'MiniImage$4');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (VVMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$4.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$4.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$4.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (VVMiniAdapter.subNativeFiles && VVMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in VVMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=VVMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tVVMiniAdapter.subNativeheads=VVMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tVVMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(VVMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && VVMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=VVMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$4.getFileInfo(url)){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(VVMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$4.downOtherFiles(encodeURI(url),new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(VVMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$4.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$4.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(VVMiniAdapter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr$4.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$4.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.vv.mini.MiniInput\nvar MiniInput$4=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.vv.mini.MiniInput',null,'MiniInput$4');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\tVVMiniAdapter.window.qg.onWindowResize && VVMiniAdapter.window.qg.onWindowResize(function(res){\n\t\t\tVVMiniAdapter.window.dispatchEvent && VVMiniAdapter.window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$4;\n\t\tSoundManager._musicClass=MiniSound$4;\n\t\tBrowser.onAndroid=true;\n\t\tBrowser.onIPhone=false;\n\t\tBrowser.onIOS=false;\n\t\tBrowser.onIPad=false;\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tVVMiniAdapter.window.qg.offKeyboardConfirm();\n\t\tVVMiniAdapter.window.qg.offKeyboardInput();\n\t\tVVMiniAdapter.window.qg.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tVVMiniAdapter.window.qg.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.vv.mini.MiniInput.inputEnter();\n\t\t})\n\t\tVVMiniAdapter.window.qg.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.vv.mini.MiniInput.inputEnter();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(){\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){\n\t\tMiniInput.hideKeyboard();\n\t}\n\n\tMiniInput.hideKeyboard=function(){\n\t\tVVMiniAdapter.window.qg.offKeyboardConfirm();\n\t\tVVMiniAdapter.window.qg.offKeyboardInput();\n\t\tVVMiniAdapter.window.qg.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.vv.mini.MiniLocalStorage\nvar MiniLocalStorage$4=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.vv.mini.MiniLocalStorage',null,'MiniLocalStorage$4');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\ttry{\n\t\t\tVVMiniAdapter.window.qg.setStorageSync({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t\tcatch(error){\n\t\t\tVVMiniAdapter.window.qg.setStorage({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\treturn VVMiniAdapter.window.qg.getStorageSync({\"key\":key});\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,JSON.stringify(value));\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\ttry{\n\t\t\treturn JSON.parse(MiniLocalStorage.getItem(key));\n\t\t}\n\t\tcatch(error){\n\t\t\treturn MiniLocalStorage.getItem(key);\n\t\t}\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\tVVMiniAdapter.window.qg.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\tVVMiniAdapter.window.qg.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=VVMiniAdapter.window.qg.getStorageInfoSync()\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.vv.mini.MiniLocation\nvar MiniLocation$4=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.vv.mini.MiniLocation',null,'MiniLocation$4');\n\tMiniLocation.__init__=function(){\n\t\tVVMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tVVMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tVVMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tVVMiniAdapter.window.qg.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.vv.mini.MiniVideo\nvar MiniVideo$2=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=VVMiniAdapter.window.qg.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.vv.mini.MiniVideo',null,'MiniVideo$2');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n//class laya.vv.mini.VVMiniAdapter\nvar VVMiniAdapter=(function(){\n\tfunction VVMiniAdapter(){}\n\t__class(VVMiniAdapter,'laya.vv.mini.VVMiniAdapter');\n\tVVMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tVVMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (VVMiniAdapter._inited)return;\n\t\tVVMiniAdapter._inited=true;\n\t\tVVMiniAdapter.window=/*__JS__ */window;\n\t\tif(!VVMiniAdapter.window.hasOwnProperty(\"qg\"))\n\t\t\treturn;\n\t\tif(VVMiniAdapter.window.navigator.userAgent.indexOf('VVGame')<0)return;\n\t\tVVMiniAdapter.isZiYu=isSon;\n\t\tVVMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tVVMiniAdapter.EnvConfig={};\n\t\ttry{\n\t\t\t/*__JS__ */laya.webgl.resource.WebGLCanvas.premulAlpha=true;\n\t\t\t}catch(e){\n\t\t}\n\t\tif(!laya.vv.mini.VVMiniAdapter.window.qg.env){\n\t\t\tlaya.vv.mini.VVMiniAdapter.window.qg.env={};\n\t\t\tlaya.vv.mini.VVMiniAdapter.window.qg.env.USER_DATA_PATH=\"internal://files\";\n\t\t}\n\t\tif(!VVMiniAdapter.isZiYu){\n\t\t\tMiniFileMgr$4.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$4.existDir(MiniFileMgr$4.fileNativeDir,Handler.create(VVMiniAdapter,VVMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tVVMiniAdapter.systemInfo=VVMiniAdapter.window.qg.getSystemInfoSync();\n\t\tVVMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tVVMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tVVMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tVVMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tVVMiniAdapter.window.CanvasRenderingContext2D=function (){\n\t\t};\n\t\tVVMiniAdapter.window.CanvasRenderingContext2D.prototype=VVMiniAdapter.window.qg.createCanvas().getContext('2d').__proto__;\n\t\tVVMiniAdapter.window.document.body.appendChild=function (){\n\t\t};\n\t\tVVMiniAdapter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=VVMiniAdapter.pixelRatio;\n\t\tVVMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=VVMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=VVMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=VVMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$4['_createInputElement'];\n\t\tVVMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$4.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$4.prototype._loadImage;\n\t\tVVMiniAdapter.onReciveData();\n\t\tConfig.useRetinalCanvas=true;\n\t\tConfig.CborderSize=0;\n\t}\n\n\tVVMiniAdapter.onReciveData=function(){\n\t\tif(laya.vv.mini.VVMiniAdapter.isZiYu && VVMiniAdapter.window.qg.onMessage){\n\t\t\tVVMiniAdapter.window.qg.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$4.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr$4.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$4.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr$4.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tVVMiniAdapter.measureText=function(str){\n\t\tvar tempObj=VVMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tVVMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"binary\";\n\t\treturn \"utf8\";\n\t}\n\n\tVVMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$4.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$4.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tVVMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$4.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tVVMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$4.deleteAll();\n\t}\n\n\tVVMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$4.isLocalNativeFile(fileUrl);\n\t}\n\n\tVVMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$4.getFileInfo(fileUrl);\n\t}\n\n\tVVMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$4.filesListObj;\n\t}\n\n\tVVMiniAdapter.exitMiniProgram=function(){\n\t\tVVMiniAdapter.window.qg.exitMiniProgram();\n\t}\n\n\tVVMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode)\n\t\t\tMiniFileMgr$4.filesListObj=JSON.parse(data.data);\n\t}\n\n\tVVMiniAdapter.pixelRatio=function(){\n\t\tif (!VVMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tVVMiniAdapter.systemInfo.pixelRatio=VVMiniAdapter.window.devicePixelRatio;\n\t\t\t\tVVMiniAdapter.EnvConfig.pixelRatioInt=VVMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn VVMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn VVMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tVVMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (VVMiniAdapter.idx==1){\n\t\t\t\tif(VVMiniAdapter.isZiYu){\n\t\t\t\t\t_source={};\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=/*__JS__ */document.getElementById(\"canvas\");\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=VVMiniAdapter.window.qg.createCanvas();\n\t\t\t}\n\t\t\tVVMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn VVMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=VVMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn VVMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tVVMiniAdapter.onCreateInput=function(type){\n\t\tvar node=VVMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$4.wxinputFocus;\n\t\tnode.blur=MiniInput$4.wxinputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tVVMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tVVMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.vv.mini.VVMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tVVMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tVVMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$4.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$4.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl && VVMiniAdapter.window.qg.postMessage){\n\t\t\tVVMiniAdapter.window.qg.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tVVMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$4.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$4.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl && VVMiniAdapter.window.qg.postMessage){\n\t\t\tVVMiniAdapter.window.qg.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tVVMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.vv.mini.VVMiniAdapter.isZiYu && VVMiniAdapter.window.qg.postMessage){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tVVMiniAdapter.window.qg.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tVVMiniAdapter.EnvConfig=null;\n\tVVMiniAdapter.window=null;\n\tVVMiniAdapter._preCreateElement=null;\n\tVVMiniAdapter._inited=false;\n\tVVMiniAdapter.systemInfo=null;\n\tVVMiniAdapter.isZiYu=false;\n\tVVMiniAdapter.isPosMsgYu=false;\n\tVVMiniAdapter.autoCacheFile=true;\n\tVVMiniAdapter.minClearSize=(5 *1024 *1024);\n\tVVMiniAdapter.subNativeFiles=null;\n\tVVMiniAdapter.subNativeheads=[];\n\tVVMiniAdapter.subMaps=[];\n\tVVMiniAdapter.AutoCacheDownFile=false;\n\tVVMiniAdapter._measureText=null;\n\tVVMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tVVMiniAdapter.idx=1;\n\t__static(VVMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"files\"];}\n\t]);\n\treturn VVMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.vv.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$4=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.vv.mini.MiniAccelerator',_super,'MiniAccelerator$4');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onAccelerometerChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tVVMiniAdapter.window.qg.subscribeAccelerometer(laya.vv.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tVVMiniAdapter.window.qg.unsubscribeAccelerometer();\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.vv.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$4=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.vv.mini.MiniLoader',_super,'MiniLoader$4');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=VVMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tVVMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(VVMiniAdapter.isZiYu && !MiniFileMgr$4.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(VVMiniAdapter.isZiYu && MiniFileMgr$4.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$4.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$4.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr$4.isLocalNativeFile(url)){\n\t\t\t\t\tif (VVMiniAdapter.subNativeFiles && VVMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in VVMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=VVMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tVVMiniAdapter.subNativeheads=VVMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tVVMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(VVMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && VVMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=VVMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr$4.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(VVMiniAdapter.window.qg.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !VVMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tVVMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$4.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$4.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tVVMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$4.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$4.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$4.downFiles(encodeURI(url),encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$4.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$4.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$4.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),URL.formatURL(url));\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=VVMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!VVMiniAdapter.isZiYu &&VVMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\" && VVMiniAdapter.window.qg.postMessage){\n\t\t\t\tVVMiniAdapter.window.qg.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tconsole.log(\"-----------本地加载失败，尝试外网加载----\");\n\t\t\tVVMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.vv.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$4=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.vv.mini.MiniSound',_super,'MiniSound$4');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$4.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$4.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$4.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(VVMiniAdapter.autoCacheFile&&MiniFileMgr$4.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!VVMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$4.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (VVMiniAdapter.subNativeFiles && VVMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in VVMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=VVMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tVVMiniAdapter.subNativeheads=VVMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tVVMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(VVMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && VVMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=VVMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tif (!MiniFileMgr$4.isLocalNativeFile(url)&& (url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| (url.indexOf(\"http://usr/\")!=-1)){\n\t\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tMiniFileMgr$4.downOtherFiles(encodeURI(url),Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode,tempFilePath){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(VVMiniAdapter.autoCacheFile){\n\t\t\t\tif(!tempFilePath){\n\t\t\t\t\tif (MiniFileMgr$4.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL._basePath;\n\t\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tvar fileObj=MiniFileMgr$4.getFileInfo(sourceUrl);\n\t\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\t\tfileNativeUrl=MiniFileMgr$4.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t}\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\tif(this._sound.onCanplay){\n\t\t\t\tthis._sound.onCanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\t\tthis._sound.onError(MiniSound.bindToThis(this.onError,this));\n\t\t\t\t}else{\n\t\t\t\tLaya.timer.clear(this,this.onCheckComplete);\n\t\t\t\tLaya.timer.frameLoop(2,this,this.onCheckComplete);\n\t\t\t}\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t__proto.onCheckComplete=function(){\n\t\tif(this._sound && this._sound.duration > 0){\n\t\t\tthis.onCanPlay();\n\t\t}\n\t\tLaya.timer.clear(this,this.onCheckComplete);\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\ttry{\n\t\t\tconsole.log(\"-----1---------------minisound-----id:\"+MiniSound._id);\n\t\t\tconsole.log(error);\n\t\t}\n\t\tcatch(error){\n\t\t\tconsole.log(\"-----2---------------minisound-----id:\"+MiniSound._id);\n\t\t\tconsole.log(error);\n\t\t}\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tif(this._sound.offError){\n\t\t\tthis._sound.offError(null);\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tif(this._sound.offCanplay){\n\t\t\tthis._sound.offCanplay(null);\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(VVMiniAdapter.autoCacheFile&&MiniFileMgr$4.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr$4.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr$4.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=this.url;\n\t\t};\n\t\tvar channel=new MiniSoundChannel$4(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn VVMiniAdapter.window.qg.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.vv.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$4=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onEnded(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.vv.mini.MiniSoundChannel',_super,'MiniSoundChannel$4');\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tMiniSound$4._audioCache[this.url]=this._miniSound;\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tthis._audio.offEnded(null);\n\t\tthis._miniSound.dispose();\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',null,function(time){\n\t\tif(this._audio){\n\t\t\tthis._audio.startTime=time;\n\t\t}\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.webgl.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Arith=laya.maths.Arith,Bezier=laya.maths.Bezier,Bitmap=laya.resource.Bitmap,Browser=laya.utils.Browser;\n\tvar Byte=laya.utils.Byte,Color=laya.utils.Color,ColorFilter=laya.filters.ColorFilter,Config=Laya.Config,Context=laya.resource.Context;\n\tvar Event=laya.events.Event,Filter=laya.filters.Filter,Graphics=laya.display.Graphics,HTMLCanvas=laya.resource.HTMLCanvas;\n\tvar HTMLChar=laya.utils.HTMLChar,HTMLImage=laya.resource.HTMLImage,HTMLSubImage=laya.resource.HTMLSubImage;\n\tvar Handler=laya.utils.Handler,Loader=laya.net.Loader,Matrix=laya.maths.Matrix,Point=laya.maths.Point,Rectangle=laya.maths.Rectangle;\n\tvar Render=laya.renders.Render,RenderContext=laya.renders.RenderContext,RenderSprite=laya.renders.RenderSprite;\n\tvar Resource=laya.resource.Resource,ResourceManager=laya.resource.ResourceManager,RunDriver=laya.utils.RunDriver;\n\tvar Sprite=laya.display.Sprite,Stage=laya.display.Stage,Stat=laya.utils.Stat,StringKey=laya.utils.StringKey;\n\tvar Style=laya.display.css.Style,System=laya.system.System,Text=laya.display.Text,Texture=laya.resource.Texture;\n\tvar TransformInfo=laya.display.css.TransformInfo,URL=laya.net.URL,Utils=laya.utils.Utils,VectorGraphManager=laya.utils.VectorGraphManager;\n\tvar WordText=laya.utils.WordText;\nLaya.interface('laya.webgl.shapes.IShape');\nLaya.interface('laya.webgl.submit.ISubmit');\nLaya.interface('laya.webgl.text.ICharSegment');\nLaya.interface('laya.webgl.canvas.save.ISaveData');\nLaya.interface('laya.webgl.resource.IMergeAtlasBitmap');\nLaya.interface('laya.filters.IFilterActionGL','laya.filters.IFilterAction');\n//class laya.filters.webgl.FilterActionGL\nvar FilterActionGL=(function(){\n\tfunction FilterActionGL(){}\n\t__class(FilterActionGL,'laya.filters.webgl.FilterActionGL');\n\tvar __proto=FilterActionGL.prototype;\n\tLaya.imps(__proto,{\"laya.filters.IFilterActionGL\":true})\n\t__proto.setValue=function(shader){}\n\t__proto.setValueMix=function(shader){}\n\t__proto.apply3d=function(scope,sprite,context,x,y){return null;}\n\t__proto.apply=function(srcCanvas){return null;}\n\t__getset(0,__proto,'typeMix',function(){\n\t\treturn 0;\n\t});\n\n\treturn FilterActionGL;\n})()\n\n\n//class laya.webgl.shader.ShaderValue\nvar ShaderValue=(function(){\n\tfunction ShaderValue(){}\n\t__class(ShaderValue,'laya.webgl.shader.ShaderValue');\n\treturn ShaderValue;\n})()\n\n\n//class laya.webgl.atlas.AtlasGrid\nvar AtlasGrid=(function(){\n\tvar TexRowInfo,TexMergeTexSize;\n\tfunction AtlasGrid(width,height,atlasID){\n\t\tthis._atlasID=0;\n\t\tthis._width=0;\n\t\tthis._height=0;\n\t\tthis._texCount=0;\n\t\tthis._rowInfo=null;\n\t\tthis._cells=null;\n\t\tthis._failSize=new TexMergeTexSize();\n\t\t(width===void 0)&& (width=0);\n\t\t(height===void 0)&& (height=0);\n\t\t(atlasID===void 0)&& (atlasID=0);\n\t\tthis._cells=null;\n\t\tthis._rowInfo=null;\n\t\tthis._init(width,height);\n\t\tthis._atlasID=atlasID;\n\t}\n\n\t__class(AtlasGrid,'laya.webgl.atlas.AtlasGrid');\n\tvar __proto=AtlasGrid.prototype;\n\t//------------------------------------------------------------------------------\n\t__proto.getAltasID=function(){\n\t\treturn this._atlasID;\n\t}\n\n\t//------------------------------------------------------------------------------\n\t__proto.setAltasID=function(atlasID){\n\t\tif (atlasID >=0){\n\t\t\tthis._atlasID=atlasID;\n\t\t}\n\t}\n\n\t//------------------------------------------------------------------\n\t__proto.addTex=function(type,width,height){\n\t\tvar result=this._get(width,height);\n\t\tif (result.ret==false){\n\t\t\treturn result;\n\t\t}\n\t\tthis._fill(result.x,result.y,width,height,type);\n\t\tthis._texCount++;\n\t\treturn result;\n\t}\n\n\t//------------------------------------------------------------------------------\n\t__proto._release=function(){\n\t\tif (this._cells !=null){\n\t\t\tthis._cells.length=0;\n\t\t\tthis._cells=null;\n\t\t}\n\t\tif (this._rowInfo){\n\t\t\tthis._rowInfo.length=0;\n\t\t\tthis._rowInfo=null;\n\t\t}\n\t}\n\n\t//------------------------------------------------------------------------------\n\t__proto._init=function(width,height){\n\t\tthis._width=width;\n\t\tthis._height=height;\n\t\tthis._release();\n\t\tif (this._width==0)return false;\n\t\tthis._cells=new Uint8Array(this._width *this._height*3);\n\t\tthis._rowInfo=__newvec(this._height);\n\t\tfor (var i=0;i < this._height;i++){\n\t\t\tthis._rowInfo[i]=new TexRowInfo();\n\t\t}\n\t\tthis._clear();\n\t\treturn true;\n\t}\n\n\t//------------------------------------------------------------------\n\t__proto._get=function(width,height){\n\t\tvar pFillInfo=new MergeFillInfo();\n\t\tif (width >=this._failSize.width && height >=this._failSize.height){\n\t\t\treturn pFillInfo;\n\t\t};\n\t\tvar rx=-1;\n\t\tvar ry=-1;\n\t\tvar nWidth=this._width;\n\t\tvar nHeight=this._height;\n\t\tvar pCellBox=this._cells;\n\t\tfor (var y=0;y < nHeight;y++){\n\t\t\tif (this._rowInfo[y].spaceCount < width)continue ;\n\t\t\tfor (var x=0;x < nWidth;){\n\t\t\t\tvar tm=(y *nWidth+x)*3;\n\t\t\t\tif (pCellBox[tm] !=0 || pCellBox[tm+1] < width || pCellBox[tm+2] < height){\n\t\t\t\t\tx+=pCellBox[tm+1];\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\trx=x;\n\t\t\t\try=y;\n\t\t\t\tfor (var xx=0;xx < width;xx++){\n\t\t\t\t\tif (pCellBox[3*xx+tm+2] < height){\n\t\t\t\t\t\trx=-1;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (rx < 0){\n\t\t\t\t\tx+=pCellBox[tm+1];\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tpFillInfo.ret=true;\n\t\t\t\tpFillInfo.x=rx;\n\t\t\t\tpFillInfo.y=ry;\n\t\t\t\treturn pFillInfo;\n\t\t\t}\n\t\t}\n\t\treturn pFillInfo;\n\t}\n\n\t//------------------------------------------------------------------\n\t__proto._fill=function(x,y,w,h,type){\n\t\tvar nWidth=this._width;\n\t\tvar nHeghit=this._height;\n\t\tthis._check((x+w)<=nWidth && (y+h)<=nHeghit);\n\t\tfor (var yy=y;yy < (h+y);++yy){\n\t\t\tthis._check(this._rowInfo[yy].spaceCount >=w);\n\t\t\tthis._rowInfo[yy].spaceCount-=w;\n\t\t\tfor (var xx=0;xx < w;xx++){\n\t\t\t\tvar tm=(x+yy *nWidth+xx)*3;\n\t\t\t\tthis._check(this._cells[tm]==0);\n\t\t\t\tthis._cells[tm]=type;\n\t\t\t\tthis._cells[tm+1]=w;\n\t\t\t\tthis._cells[tm+2]=h;\n\t\t\t}\n\t\t}\n\t\tif (x > 0){\n\t\t\tfor (yy=0;yy < h;++yy){\n\t\t\t\tvar s=0;\n\t\t\t\tfor (xx=x-1;xx >=0;--xx,++s){\n\t\t\t\t\tif (this._cells[((y+yy)*nWidth+xx)*3] !=0)break ;\n\t\t\t\t}\n\t\t\t\tfor (xx=s;xx > 0;--xx){\n\t\t\t\t\tthis._cells[((y+yy)*nWidth+x-xx)*3+1]=xx;\n\t\t\t\t\tthis._check(xx > 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (y > 0){\n\t\t\tfor (xx=x;xx < (x+w);++xx){\n\t\t\t\ts=0;\n\t\t\t\tfor (yy=y-1;yy >=0;--yy,s++){\n\t\t\t\t\tif (this._cells[(xx+yy *nWidth)*3] !=0)break ;\n\t\t\t\t}\n\t\t\t\tfor (yy=s;yy > 0;--yy){\n\t\t\t\t\tthis._cells[(xx+(y-yy)*nWidth)*3+2]=yy;\n\t\t\t\t\tthis._check(yy > 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._check=function(ret){\n\t\tif (ret==false){\n\t\t\tconsole.log(\"xtexMerger 错误啦\");\n\t\t}\n\t}\n\n\t//------------------------------------------------------------------\n\t__proto._clear=function(){\n\t\tthis._texCount=0;\n\t\tfor (var y=0;y < this._height;y++){\n\t\t\tthis._rowInfo[y].spaceCount=this._width;\n\t\t}\n\t\tfor (var i=0;i < this._height;i++){\n\t\t\tfor (var j=0;j < this._width;j++){\n\t\t\t\tvar tm=(i *this._width+j)*3;\n\t\t\t\tthis._cells[tm]=0;\n\t\t\t\tthis._cells[tm+1]=this._width-j;\n\t\t\t\tthis._cells[tm+2]=this._width-i;\n\t\t\t}\n\t\t}\n\t\tthis._failSize.width=this._width+1;\n\t\tthis._failSize.height=this._height+1;\n\t}\n\n\tAtlasGrid.__init$=function(){\n\t\t//------------------------------------------------------------------------------\n\t\t//class TexRowInfo\n\t\tTexRowInfo=(function(){\n\t\t\tfunction TexRowInfo(){\n\t\t\t\tthis.spaceCount=0;\n\t\t\t}\n\t\t\t__class(TexRowInfo,'');\n\t\t\treturn TexRowInfo;\n\t\t})()\n\t\t//------------------------------------------------------------------------------\n\t\t//class TexMergeTexSize\n\t\tTexMergeTexSize=(function(){\n\t\t\tfunction TexMergeTexSize(){\n\t\t\t\tthis.width=0;\n\t\t\t\tthis.height=0;\n\t\t\t}\n\t\t\t__class(TexMergeTexSize,'');\n\t\t\treturn TexMergeTexSize;\n\t\t})()\n\t}\n\n\treturn AtlasGrid;\n})()\n\n\n//class laya.webgl.atlas.AtlasResourceManager\nvar AtlasResourceManager=(function(){\n\tfunction AtlasResourceManager(width,height,gridSize,maxTexNum){\n\t\tthis._currentAtlasCount=0;\n\t\tthis._maxAtlaserCount=0;\n\t\tthis._width=0;\n\t\tthis._height=0;\n\t\tthis._gridSize=0;\n\t\tthis._gridNumX=0;\n\t\tthis._gridNumY=0;\n\t\tthis._init=false;\n\t\tthis._curAtlasIndex=0;\n\t\tthis._setAtlasParam=false;\n\t\tthis._atlaserArray=null;\n\t\tthis._needGC=false;\n\t\tthis._setAtlasParam=true;\n\t\tthis._width=width;\n\t\tthis._height=height;\n\t\tthis._gridSize=gridSize;\n\t\tthis._maxAtlaserCount=maxTexNum;\n\t\tthis._gridNumX=width / gridSize;\n\t\tthis._gridNumY=height / gridSize;\n\t\tthis._curAtlasIndex=0;\n\t\tthis._atlaserArray=[];\n\t}\n\n\t__class(AtlasResourceManager,'laya.webgl.atlas.AtlasResourceManager');\n\tvar __proto=AtlasResourceManager.prototype;\n\t__proto.setAtlasParam=function(width,height,gridSize,maxTexNum){\n\t\tif (this._setAtlasParam==true){\n\t\t\tAtlasResourceManager._sid_=0;\n\t\t\tthis._width=width;\n\t\t\tthis._height=height;\n\t\t\tthis._gridSize=gridSize;\n\t\t\tthis._maxAtlaserCount=maxTexNum;\n\t\t\tthis._gridNumX=width / gridSize;\n\t\t\tthis._gridNumY=height / gridSize;\n\t\t\tthis._curAtlasIndex=0;\n\t\t\tthis.freeAll();\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\tconsole.log(\"设置大图合集参数错误，只能在开始页面设置各种参数\");\n\t\t\tthrow-1;\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}\n\n\t//添加 图片到大图集\n\t__proto.pushData=function(texture){\n\t\tvar bitmap=texture.bitmap;\n\t\tvar nWebGLImageIndex=-1;\n\t\tvar curAtlas=null;\n\t\tvar i=0,n=0,altasIndex=0;\n\t\tfor (i=0,n=this._atlaserArray.length;i < n;i++){\n\t\t\taltasIndex=(this._curAtlasIndex+i)% n;\n\t\t\tcurAtlas=this._atlaserArray[altasIndex];\n\t\t\tnWebGLImageIndex=curAtlas.findBitmapIsExist(bitmap);\n\t\t\tif (nWebGLImageIndex !=-1){\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t\tif (nWebGLImageIndex !=-1){\n\t\t\tvar offset=curAtlas.InAtlasWebGLImagesOffsetValue[nWebGLImageIndex];\n\t\t\toffsetX=offset[0];\n\t\t\toffsetY=offset[1];\n\t\t\tcurAtlas.addToAtlas(texture,offsetX,offsetY);\n\t\t\treturn true;\n\t\t\t}else {\n\t\t\tvar tex=texture;\n\t\t\tthis._setAtlasParam=false;\n\t\t\tvar bFound=false;\n\t\t\tvar nImageGridX=(Math.ceil((texture.bitmap.width+2)/ this._gridSize));\n\t\t\tvar nImageGridY=(Math.ceil((texture.bitmap.height+2)/ this._gridSize));\n\t\t\tvar bSuccess=false;\n\t\t\tfor (var k=0;k < 2;k++){\n\t\t\t\tvar maxAtlaserCount=this._maxAtlaserCount;\n\t\t\t\tfor (i=0;i < maxAtlaserCount;i++){\n\t\t\t\t\taltasIndex=(this._curAtlasIndex+i)% maxAtlaserCount;\n\t\t\t\t\t(this._atlaserArray.length-1 >=altasIndex)|| (this._atlaserArray.push(new Atlaser(this._gridNumX,this._gridNumY,this._width,this._height,AtlasResourceManager._sid_++)));\n\t\t\t\t\tvar atlas=this._atlaserArray[altasIndex];\n\t\t\t\t\tvar offsetX=0,offsetY=0;\n\t\t\t\t\tvar fillInfo=atlas.addTex(1,nImageGridX,nImageGridY);\n\t\t\t\t\tif (fillInfo.ret){\n\t\t\t\t\t\toffsetX=fillInfo.x *this._gridSize+1;\n\t\t\t\t\t\toffsetY=fillInfo.y *this._gridSize+1;\n\t\t\t\t\t\tbitmap.lock=true;\n\t\t\t\t\t\tatlas.addToAtlasTexture((bitmap),offsetX,offsetY);\n\t\t\t\t\t\tatlas.addToAtlas(texture,offsetX,offsetY);\n\t\t\t\t\t\tbSuccess=true;\n\t\t\t\t\t\tthis._curAtlasIndex=altasIndex;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bSuccess)\n\t\t\t\t\tbreak ;\n\t\t\t\tthis._atlaserArray.push(new Atlaser(this._gridNumX,this._gridNumY,this._width,this._height,AtlasResourceManager._sid_++));\n\t\t\t\tthis._needGC=true;\n\t\t\t\tthis.garbageCollection();\n\t\t\t\tthis._curAtlasIndex=this._atlaserArray.length-1;\n\t\t\t}\n\t\t\tif (!bSuccess){\n\t\t\t\tconsole.log(\">>>AtlasManager pushData error\");\n\t\t\t}\n\t\t\treturn bSuccess;\n\t\t}\n\t}\n\n\t__proto.addToAtlas=function(tex){\n\t\tlaya.webgl.atlas.AtlasResourceManager.instance.pushData(tex);\n\t}\n\n\t/**\n\t*回收大图合集,不建议手动调用\n\t*@return\n\t*/\n\t__proto.garbageCollection=function(){\n\t\tif (this._needGC===true){\n\t\t\tvar n=this._atlaserArray.length-this._maxAtlaserCount;\n\t\t\tfor (var i=0;i < n;i++){\n\t\t\t\tthis._atlaserArray[i].dispose();\n\t\t\t\tconsole.log(\"AtlasResourceManager:Dispose the inner Atlas。\");\n\t\t\t}\n\t\t\tconsole.log(\">>>>altas garbageCollection =\"+n);\n\t\t\tthis._atlaserArray.splice(0,n);\n\t\t\tthis._needGC=false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t__proto.freeAll=function(){\n\t\tfor (var i=0,n=this._atlaserArray.length;i < n;i++){\n\t\t\tthis._atlaserArray[i].dispose();\n\t\t}\n\t\tthis._atlaserArray.length=0;\n\t\tthis._curAtlasIndex=0;\n\t}\n\n\t__proto.getAtlaserCount=function(){\n\t\treturn this._atlaserArray.length;\n\t}\n\n\t__proto.getAtlaserByIndex=function(index){\n\t\treturn this._atlaserArray[index];\n\t}\n\n\t__getset(1,AtlasResourceManager,'instance',function(){\n\t\tif (!AtlasResourceManager._Instance){\n\t\t\tAtlasResourceManager._Instance=new AtlasResourceManager(laya.webgl.atlas.AtlasResourceManager.atlasTextureWidth,laya.webgl.atlas.AtlasResourceManager.atlasTextureHeight,/*CLASS CONST:laya.webgl.atlas.AtlasResourceManager.gridSize*/16,laya.webgl.atlas.AtlasResourceManager.maxTextureCount);\n\t\t}\n\t\treturn AtlasResourceManager._Instance;\n\t});\n\n\t__getset(1,AtlasResourceManager,'enabled',function(){\n\t\treturn Config.atlasEnable;\n\t});\n\n\t__getset(1,AtlasResourceManager,'atlasLimitWidth',function(){\n\t\treturn AtlasResourceManager._atlasLimitWidth;\n\t\t},function(value){\n\t\tAtlasResourceManager._atlasLimitWidth=value;\n\t});\n\n\t__getset(1,AtlasResourceManager,'atlasLimitHeight',function(){\n\t\treturn AtlasResourceManager._atlasLimitHeight;\n\t\t},function(value){\n\t\tAtlasResourceManager._atlasLimitHeight=value;\n\t});\n\n\tAtlasResourceManager._enable=function(){\n\t\tConfig.atlasEnable=true;\n\t}\n\n\tAtlasResourceManager._disable=function(){\n\t\tConfig.atlasEnable=false;\n\t}\n\n\tAtlasResourceManager.__init__=function(){\n\t\tAtlasResourceManager.atlasTextureWidth=2048;\n\t\tAtlasResourceManager.atlasTextureHeight=2048;\n\t\tAtlasResourceManager.maxTextureCount=6;\n\t\tAtlasResourceManager.atlasLimitWidth=512;\n\t\tAtlasResourceManager.atlasLimitHeight=512;\n\t}\n\n\tAtlasResourceManager._atlasLimitWidth=0;\n\tAtlasResourceManager._atlasLimitHeight=0;\n\tAtlasResourceManager.gridSize=16;\n\tAtlasResourceManager.atlasTextureWidth=0;\n\tAtlasResourceManager.atlasTextureHeight=0;\n\tAtlasResourceManager.maxTextureCount=0;\n\tAtlasResourceManager._atlasRestore=0;\n\tAtlasResourceManager.BOARDER_TYPE_NO=0;\n\tAtlasResourceManager.BOARDER_TYPE_RIGHT=1;\n\tAtlasResourceManager.BOARDER_TYPE_LEFT=2;\n\tAtlasResourceManager.BOARDER_TYPE_BOTTOM=4;\n\tAtlasResourceManager.BOARDER_TYPE_TOP=8;\n\tAtlasResourceManager.BOARDER_TYPE_ALL=15;\n\tAtlasResourceManager._sid_=0;\n\tAtlasResourceManager._Instance=null;\n\treturn AtlasResourceManager;\n})()\n\n\n//class laya.webgl.atlas.MergeFillInfo\nvar MergeFillInfo=(function(){\n\tfunction MergeFillInfo(){\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tthis.ret=false;\n\t\tthis.ret=false;\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t}\n\n\t__class(MergeFillInfo,'laya.webgl.atlas.MergeFillInfo');\n\treturn MergeFillInfo;\n})()\n\n\n;\n//class laya.webgl.canvas.BlendMode\nvar BlendMode=(function(){\n\tfunction BlendMode(){}\n\t__class(BlendMode,'laya.webgl.canvas.BlendMode');\n\tBlendMode._init_=function(gl){\n\t\tBlendMode.fns=[BlendMode.BlendNormal,BlendMode.BlendAdd,BlendMode.BlendMultiply,BlendMode.BlendScreen,BlendMode.BlendOverlay,BlendMode.BlendLight,BlendMode.BlendMask,BlendMode.BlendDestinationOut];\n\t\tBlendMode.targetFns=[BlendMode.BlendNormalTarget,BlendMode.BlendAddTarget,BlendMode.BlendMultiplyTarget,BlendMode.BlendScreenTarget,BlendMode.BlendOverlayTarget,BlendMode.BlendLightTarget,BlendMode.BlendMask,BlendMode.BlendDestinationOut];\n\t}\n\n\tBlendMode.BlendNormal=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE_MINUS_SRC_ALPHA*/0x0303);\n\t}\n\n\tBlendMode.BlendAdd=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.DST_ALPHA*/0x0304);\n\t}\n\n\tBlendMode.BlendMultiply=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.DST_COLOR*/0x0306,/*laya.webgl.WebGLContext.ONE_MINUS_SRC_ALPHA*/0x0303);\n\t}\n\n\tBlendMode.BlendScreen=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE*/1);\n\t}\n\n\tBlendMode.BlendOverlay=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE_MINUS_SRC_COLOR*/0x0301);\n\t}\n\n\tBlendMode.BlendLight=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE*/1);\n\t}\n\n\tBlendMode.BlendNormalTarget=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE_MINUS_SRC_ALPHA*/0x0303);\n\t}\n\n\tBlendMode.BlendAddTarget=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.DST_ALPHA*/0x0304);\n\t}\n\n\tBlendMode.BlendMultiplyTarget=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.DST_COLOR*/0x0306,/*laya.webgl.WebGLContext.ONE_MINUS_SRC_ALPHA*/0x0303);\n\t}\n\n\tBlendMode.BlendScreenTarget=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE*/1);\n\t}\n\n\tBlendMode.BlendOverlayTarget=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE_MINUS_SRC_COLOR*/0x0301);\n\t}\n\n\tBlendMode.BlendLightTarget=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.ONE*/1);\n\t}\n\n\tBlendMode.BlendMask=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ZERO*/0,/*laya.webgl.WebGLContext.SRC_ALPHA*/0x0302);\n\t}\n\n\tBlendMode.BlendDestinationOut=function(gl){\n\t\tgl.blendFunc(/*laya.webgl.WebGLContext.ZERO*/0,/*laya.webgl.WebGLContext.ZERO*/0);\n\t}\n\n\tBlendMode.activeBlendFunction=null;\n\tBlendMode.NAMES=[\"normal\",\"add\",\"multiply\",\"screen\",\"overlay\",\"light\",\"mask\",\"destination-out\"];\n\tBlendMode.TOINT={\"normal\":0,\"add\":1,\"multiply\":2,\"screen\":3 ,\"lighter\":1,\"overlay\":4,\"light\":5,\"mask\":6,\"destination-out\":7};\n\tBlendMode.NORMAL=\"normal\";\n\tBlendMode.ADD=\"add\";\n\tBlendMode.MULTIPLY=\"multiply\";\n\tBlendMode.SCREEN=\"screen\";\n\tBlendMode.LIGHT=\"light\";\n\tBlendMode.OVERLAY=\"overlay\";\n\tBlendMode.DESTINATIONOUT=\"destination-out\";\n\tBlendMode.fns=[];\n\tBlendMode.targetFns=[];\n\treturn BlendMode;\n})()\n\n\n//class laya.webgl.canvas.DrawStyle\nvar DrawStyle=(function(){\n\tfunction DrawStyle(value){\n\t\tthis._color=Color.create(\"black\");\n\t\tthis.setValue(value);\n\t}\n\n\t__class(DrawStyle,'laya.webgl.canvas.DrawStyle');\n\tvar __proto=DrawStyle.prototype;\n\t__proto.setValue=function(value){\n\t\tif (value){\n\t\t\tif ((typeof value=='string')){\n\t\t\t\tthis._color=Color.create(value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ((value instanceof laya.utils.Color )){\n\t\t\t\tthis._color=value;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.reset=function(){\n\t\tthis._color=Color.create(\"black\");\n\t}\n\n\t__proto.equal=function(value){\n\t\tif ((typeof value=='string'))return this._color.strColor===value;\n\t\tif ((value instanceof laya.utils.Color ))return this._color.numColor===(value).numColor;\n\t\treturn false;\n\t}\n\n\t__proto.toColorStr=function(){\n\t\treturn this._color.strColor;\n\t}\n\n\tDrawStyle.create=function(value){\n\t\tif (value){\n\t\t\tvar color;\n\t\t\tif ((typeof value=='string'))color=Color.create(value);\n\t\t\telse if ((value instanceof laya.utils.Color ))color=value;\n\t\t\tif (color){\n\t\t\t\treturn color._drawStyle || (color._drawStyle=new DrawStyle(value));\n\t\t\t}\n\t\t}\n\t\treturn laya.webgl.canvas.DrawStyle.DEFAULT;\n\t}\n\n\t__static(DrawStyle,\n\t['DEFAULT',function(){return this.DEFAULT=new DrawStyle(\"#000000\");}\n\t]);\n\treturn DrawStyle;\n})()\n\n\n//class laya.webgl.canvas.Path\nvar Path=(function(){\n\tfunction Path(){\n\t\tthis._x=0;\n\t\tthis._y=0;\n\t\t//this._rect=null;\n\t\t//this.ib=null;\n\t\t//this.vb=null;\n\t\tthis.dirty=false;\n\t\t//this.geomatrys=null;\n\t\t//this._curGeomatry=null;\n\t\tthis.offset=0;\n\t\tthis.count=0;\n\t\tthis.geoStart=0;\n\t\tthis.tempArray=[];\n\t\tthis.closePath=false;\n\t\tthis.geomatrys=[];\n\t\tvar gl=WebGL.mainContext;\n\t\tthis.ib=IndexBuffer2D.create(/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\tthis.vb=VertexBuffer2D.create(5);\n\t}\n\n\t__class(Path,'laya.webgl.canvas.Path');\n\tvar __proto=Path.prototype;\n\t__proto.addPoint=function(pointX,pointY){\n\t\tthis.tempArray.push(pointX,pointY);\n\t}\n\n\t__proto.getEndPointX=function(){\n\t\treturn this.tempArray[this.tempArray.length-2];\n\t}\n\n\t__proto.getEndPointY=function(){\n\t\treturn this.tempArray[this.tempArray.length-1];\n\t}\n\n\t__proto.polygon=function(x,y,points,color,borderWidth,borderColor){\n\t\tvar geo;\n\t\tthis.geomatrys.push(this._curGeomatry=geo=new Polygon(x,y,points,color,borderWidth,borderColor));\n\t\tif (!color)geo.fill=false;\n\t\tif (borderColor==undefined)geo.borderWidth=0;\n\t\treturn geo;\n\t}\n\n\t__proto.setGeomtry=function(shape){\n\t\tthis.geomatrys.push(this._curGeomatry=shape);\n\t}\n\n\t__proto.drawLine=function(x,y,points,width,color){\n\t\tvar geo;\n\t\tif (this.closePath){\n\t\t\tthis.geomatrys.push(this._curGeomatry=geo=new LoopLine(x,y,points,width,color));\n\t\t\t}else {\n\t\t\tthis.geomatrys.push(this._curGeomatry=geo=new Line(x,y,points,width,color));\n\t\t}\n\t\tgeo.fill=false;\n\t\treturn geo;\n\t}\n\n\t__proto.update=function(){\n\t\tvar si=this.ib._byteLength;\n\t\tvar len=this.geomatrys.length;\n\t\tthis.offset=si;\n\t\tfor (var i=this.geoStart;i < len;i++){\n\t\t\tthis.geomatrys[i].getData(this.ib,this.vb,this.vb._byteLength / 20);\n\t\t}\n\t\tthis.geoStart=len;\n\t\tthis.count=(this.ib._byteLength-si)/ CONST3D2D.BYTES_PIDX;\n\t}\n\n\t__proto.reset=function(){\n\t\tthis.vb.clear();\n\t\tthis.ib.clear();\n\t\tthis.offset=this.count=this.geoStart=0;\n\t\tthis.geomatrys.length=0;\n\t}\n\n\t__proto.recover=function(){\n\t\tthis._curGeomatry=null;\n\t\tthis.vb.destory();\n\t\tthis.vb=null;\n\t\tthis.ib.destory();\n\t\tthis.ib=null;\n\t}\n\n\treturn Path;\n})()\n\n\n//class laya.webgl.canvas.save.SaveBase\nvar SaveBase=(function(){\n\tfunction SaveBase(){\n\t\t//this._valueName=null;\n\t\t//this._value=null;\n\t\t//this._dataObj=null;\n\t\t//this._newSubmit=false;\n\t}\n\n\t__class(SaveBase,'laya.webgl.canvas.save.SaveBase');\n\tvar __proto=SaveBase.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.canvas.save.ISaveData\":true})\n\t__proto.isSaveMark=function(){return false;}\n\t__proto.restore=function(context){\n\t\tthis._dataObj[this._valueName]=this._value;\n\t\tSaveBase._cache[SaveBase._cache._length++]=this;\n\t\tthis._newSubmit && (context._curSubmit=Submit.RENDERBASE,context._renderKey=0);\n\t}\n\n\tSaveBase._createArray=function(){\n\t\tvar value=[];\n\t\tvalue._length=0;\n\t\treturn value;\n\t}\n\n\tSaveBase._init=function(){\n\t\tvar namemap=SaveBase._namemap={};\n\t\tnamemap[0x1]=\"ALPHA\";\n\t\tnamemap[0x2]=\"fillStyle\";\n\t\tnamemap[0x8]=\"font\";\n\t\tnamemap[0x100]=\"lineWidth\";\n\t\tnamemap[0x200]=\"strokeStyle\";\n\t\tnamemap[0x2000]=\"_mergeID\";\n\t\tnamemap[0x400]=namemap[0x800]=namemap[0x1000]=[];\n\t\tnamemap[0x4000]=\"textBaseline\";\n\t\tnamemap[0x8000]=\"textAlign\";\n\t\tnamemap[0x10000]=\"_nBlendType\";\n\t\tnamemap[0x100000]=\"shader\";\n\t\tnamemap[0x200000]=\"filters\";\n\t\treturn namemap;\n\t}\n\n\tSaveBase.save=function(context,type,dataObj,newSubmit){\n\t\tif ((context._saveMark._saveuse & type)!==type){\n\t\t\tcontext._saveMark._saveuse |=type;\n\t\t\tvar cache=SaveBase._cache;\n\t\t\tvar o=cache._length > 0 ? cache[--cache._length] :(new SaveBase());\n\t\t\to._value=dataObj[o._valueName=SaveBase._namemap[type]];\n\t\t\to._dataObj=dataObj;\n\t\t\to._newSubmit=newSubmit;\n\t\t\tvar _save=context._save;\n\t\t\t_save[_save._length++]=o;\n\t\t}\n\t}\n\n\tSaveBase._cache=laya.webgl.canvas.save.SaveBase._createArray();\n\tSaveBase._namemap=SaveBase._init();\n\treturn SaveBase;\n})()\n\n\n//class laya.webgl.canvas.save.SaveClipRect\nvar SaveClipRect=(function(){\n\tfunction SaveClipRect(){\n\t\t//this._clipSaveRect=null;\n\t\t//this._submitScissor=null;\n\t\tthis._clipRect=new Rectangle();\n\t}\n\n\t__class(SaveClipRect,'laya.webgl.canvas.save.SaveClipRect');\n\tvar __proto=SaveClipRect.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.canvas.save.ISaveData\":true})\n\t__proto.isSaveMark=function(){return false;}\n\t__proto.restore=function(context){\n\t\tcontext._clipRect=this._clipSaveRect;\n\t\tSaveClipRect._cache[SaveClipRect._cache._length++]=this;\n\t\tthis._submitScissor.submitLength=context._submits._length-this._submitScissor.submitIndex;\n\t\tcontext._curSubmit=Submit.RENDERBASE;\n\t\tcontext._renderKey=0;\n\t}\n\n\tSaveClipRect.save=function(context,submitScissor){\n\t\tif ((context._saveMark._saveuse & /*laya.webgl.canvas.save.SaveBase.TYPE_CLIPRECT*/0x20000)==/*laya.webgl.canvas.save.SaveBase.TYPE_CLIPRECT*/0x20000)return;\n\t\tcontext._saveMark._saveuse |=/*laya.webgl.canvas.save.SaveBase.TYPE_CLIPRECT*/0x20000;\n\t\tvar cache=SaveClipRect._cache;\n\t\tvar o=cache._length > 0 ? cache[--cache._length] :(new SaveClipRect());\n\t\to._clipSaveRect=context._clipRect;\n\t\tcontext._clipRect=o._clipRect.copyFrom(context._clipRect);\n\t\to._submitScissor=submitScissor;\n\t\tvar _save=context._save;\n\t\t_save[_save._length++]=o;\n\t}\n\n\t__static(SaveClipRect,\n\t['_cache',function(){return this._cache=SaveBase._createArray();}\n\t]);\n\treturn SaveClipRect;\n})()\n\n\n//class laya.webgl.canvas.save.SaveClipRectStencil\nvar SaveClipRectStencil=(function(){\n\tfunction SaveClipRectStencil(){\n\t\t//this._clipSaveRect=null;\n\t\t//this._saveMatrix=null;\n\t\tthis._contextX=0;\n\t\tthis._contextY=0;\n\t\t//this._submitStencil=null;\n\t\tthis._clipRect=new Rectangle();\n\t\tthis._rect=new Rectangle();\n\t\tthis._matrix=new Matrix();\n\t}\n\n\t__class(SaveClipRectStencil,'laya.webgl.canvas.save.SaveClipRectStencil');\n\tvar __proto=SaveClipRectStencil.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.canvas.save.ISaveData\":true})\n\t__proto.isSaveMark=function(){return false;}\n\t__proto.restore=function(context){\n\t\tSubmitStencil.restore(context,this._rect,this._saveMatrix,this._contextX,this._contextY);\n\t\tcontext._clipRect=this._clipSaveRect;\n\t\tcontext._curMat=this._saveMatrix;\n\t\tcontext._x=this._contextX;\n\t\tcontext._y=this._contextY;\n\t\tSaveClipRectStencil._cache[SaveClipRectStencil._cache._length++]=this;\n\t\tcontext._curSubmit=Submit.RENDERBASE;\n\t}\n\n\tSaveClipRectStencil.save=function(context,submitStencil,x,y,width,height,clipX,clipY,clipWidth,clipHeight){\n\t\tif ((context._saveMark._saveuse & /*laya.webgl.canvas.save.SaveBase.TYPE_CLIPRECT_STENCIL*/0x40000)==/*laya.webgl.canvas.save.SaveBase.TYPE_CLIPRECT_STENCIL*/0x40000)return;\n\t\tcontext._saveMark._saveuse |=/*laya.webgl.canvas.save.SaveBase.TYPE_CLIPRECT_STENCIL*/0x40000;\n\t\tvar cache=SaveClipRectStencil._cache;\n\t\tvar o=cache._length > 0 ? cache[--cache._length] :(new SaveClipRectStencil());\n\t\to._clipSaveRect=context._clipRect;\n\t\to._clipRect.setTo(clipX,clipY,clipWidth,clipHeight);\n\t\tcontext._clipRect=o._clipRect;\n\t\to._rect.x=x;\n\t\to._rect.y=y;\n\t\to._rect.width=width;\n\t\to._rect.height=height;\n\t\to._contextX=context._x;\n\t\to._contextY=context._y;\n\t\to._saveMatrix=context._curMat;\n\t\tcontext._curMat.copyTo(o._matrix);\n\t\tcontext._curMat=o._matrix;\n\t\to._submitStencil=submitStencil;\n\t\tvar _save=context._save;\n\t\t_save[_save._length++]=o;\n\t}\n\n\t__static(SaveClipRectStencil,\n\t['_cache',function(){return this._cache=SaveBase._createArray();}\n\t]);\n\treturn SaveClipRectStencil;\n})()\n\n\n//class laya.webgl.canvas.save.SaveMark\nvar SaveMark=(function(){\n\tfunction SaveMark(){\n\t\tthis._saveuse=0;\n\t\t//this._preSaveMark=null;\n\t\t;\n\t}\n\n\t__class(SaveMark,'laya.webgl.canvas.save.SaveMark');\n\tvar __proto=SaveMark.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.canvas.save.ISaveData\":true})\n\t__proto.isSaveMark=function(){\n\t\treturn true;\n\t}\n\n\t__proto.restore=function(context){\n\t\tcontext._saveMark=this._preSaveMark;\n\t\tSaveMark._no[SaveMark._no._length++]=this;\n\t}\n\n\tSaveMark.Create=function(context){\n\t\tvar no=SaveMark._no;\n\t\tvar o=no._length > 0 ? no[--no._length] :(new SaveMark());\n\t\to._saveuse=0;\n\t\to._preSaveMark=context._saveMark;\n\t\tcontext._saveMark=o;\n\t\treturn o;\n\t}\n\n\t__static(SaveMark,\n\t['_no',function(){return this._no=SaveBase._createArray();}\n\t]);\n\treturn SaveMark;\n})()\n\n\n//class laya.webgl.canvas.save.SaveTransform\nvar SaveTransform=(function(){\n\tfunction SaveTransform(){\n\t\t//this._savematrix=null;\n\t\tthis._matrix=new Matrix();\n\t}\n\n\t__class(SaveTransform,'laya.webgl.canvas.save.SaveTransform');\n\tvar __proto=SaveTransform.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.canvas.save.ISaveData\":true})\n\t__proto.isSaveMark=function(){return false;}\n\t__proto.restore=function(context){\n\t\tcontext._curMat=this._savematrix;\n\t\tSaveTransform._no[SaveTransform._no._length++]=this;\n\t}\n\n\tSaveTransform.save=function(context){\n\t\tvar _saveMark=context._saveMark;\n\t\tif ((_saveMark._saveuse & /*laya.webgl.canvas.save.SaveBase.TYPE_TRANSFORM*/0x800)===/*laya.webgl.canvas.save.SaveBase.TYPE_TRANSFORM*/0x800)return;\n\t\t_saveMark._saveuse |=/*laya.webgl.canvas.save.SaveBase.TYPE_TRANSFORM*/0x800;\n\t\tvar no=SaveTransform._no;\n\t\tvar o=no._length > 0 ? no[--no._length] :(new SaveTransform());\n\t\to._savematrix=context._curMat;\n\t\tcontext._curMat=context._curMat.copyTo(o._matrix);\n\t\tvar _save=context._save;\n\t\t_save[_save._length++]=o;\n\t}\n\n\t__static(SaveTransform,\n\t['_no',function(){return this._no=SaveBase._createArray();}\n\t]);\n\treturn SaveTransform;\n})()\n\n\n//class laya.webgl.canvas.save.SaveTranslate\nvar SaveTranslate=(function(){\n\tfunction SaveTranslate(){\n\t\t//this._x=NaN;\n\t\t//this._y=NaN;\n\t}\n\n\t__class(SaveTranslate,'laya.webgl.canvas.save.SaveTranslate');\n\tvar __proto=SaveTranslate.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.canvas.save.ISaveData\":true})\n\t__proto.isSaveMark=function(){return false;}\n\t__proto.restore=function(context){\n\t\tvar mat=context._curMat;\n\t\tcontext._x=this._x;\n\t\tcontext._y=this._y;\n\t\tSaveTranslate._no[SaveTranslate._no._length++]=this;\n\t}\n\n\tSaveTranslate.save=function(context){\n\t\tvar no=SaveTranslate._no;\n\t\tvar o=no._length > 0 ? no[--no._length] :(new SaveTranslate());\n\t\to._x=context._x;\n\t\to._y=context._y;\n\t\tvar _save=context._save;\n\t\t_save[_save._length++]=o;\n\t}\n\n\t__static(SaveTranslate,\n\t['_no',function(){return this._no=SaveBase._createArray();}\n\t]);\n\treturn SaveTranslate;\n})()\n\n\n//class laya.webgl.resource.RenderTargetMAX\nvar RenderTargetMAX=(function(){\n\tfunction RenderTargetMAX(){\n\t\t//public var targets:Vector.<OneTarget>;//没用到\n\t\tthis.target=null;\n\t\tthis.repaint=false;\n\t\tthis._width=NaN;\n\t\tthis._height=NaN;\n\t\tthis._sp=null;\n\t\tthis._clipRect=new Rectangle();\n\t}\n\n\t__class(RenderTargetMAX,'laya.webgl.resource.RenderTargetMAX');\n\tvar __proto=RenderTargetMAX.prototype;\n\t__proto.setSP=function(sp){\n\t\tthis._sp=sp;\n\t}\n\n\t__proto.size=function(w,h){\n\t\tvar _$this=this;\n\t\tif (this._width===w && this._height===h){\n\t\t\tthis.target.size(w,h);\n\t\t\treturn;\n\t\t}\n\t\tthis.repaint=true;\n\t\tthis._width=w;\n\t\tthis._height=h;\n\t\tif (!this.target)\n\t\t\tthis.target=RenderTarget2D.create(w,h);\n\t\telse\n\t\tthis.target.size(w,h);\n\t\tif (!this.target.hasListener(/*laya.events.Event.RECOVERED*/\"recovered\")){\n\t\t\tthis.target.on(/*laya.events.Event.RECOVERED*/\"recovered\",this,function(e){\n\t\t\t\tLaya.timer.callLater(_$this._sp,_$this._sp.repaint);\n\t\t\t});\n\t\t}\n\t}\n\n\t__proto._flushToTarget=function(context,target){\n\t\tif (target._destroy)return;\n\t\tvar worldScissorTest=RenderState2D.worldScissorTest;\n\t\tvar preworldClipRect=RenderState2D.worldClipRect;\n\t\tRenderState2D.worldClipRect=this._clipRect;\n\t\tthis._clipRect.x=this._clipRect.y=0;\n\t\tthis._clipRect.width=this._width;\n\t\tthis._clipRect.height=this._height;\n\t\tRenderState2D.worldScissorTest=false;\n\t\tWebGL.mainContext.disable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\tvar preAlpha=RenderState2D.worldAlpha;\n\t\tvar preMatrix4=RenderState2D.worldMatrix4;\n\t\tvar preMatrix=RenderState2D.worldMatrix;\n\t\tvar preFilters=RenderState2D.worldFilters;\n\t\tvar preShaderDefines=RenderState2D.worldShaderDefines;\n\t\tRenderState2D.worldMatrix=Matrix.EMPTY;\n\t\tRenderState2D.restoreTempArray();\n\t\tRenderState2D.worldMatrix4=RenderState2D.TEMPMAT4_ARRAY;\n\t\tRenderState2D.worldAlpha=1;\n\t\tRenderState2D.worldFilters=null;\n\t\tRenderState2D.worldShaderDefines=null;\n\t\tBaseShader.activeShader=null;\n\t\ttarget.start();\n\t\tConfig.showCanvasMark ? target.clear(0,1,0,0.3):target.clear(0,0,0,0);\n\t\tcontext.flush();\n\t\ttarget.end();\n\t\tBaseShader.activeShader=null;\n\t\tRenderState2D.worldAlpha=preAlpha;\n\t\tRenderState2D.worldMatrix4=preMatrix4;\n\t\tRenderState2D.worldMatrix=preMatrix;\n\t\tRenderState2D.worldFilters=preFilters;\n\t\tRenderState2D.worldShaderDefines=preShaderDefines;\n\t\tRenderState2D.worldScissorTest=worldScissorTest\n\t\tif (worldScissorTest){\n\t\t\tvar y=RenderState2D.height-preworldClipRect.y-preworldClipRect.height;\n\t\t\tWebGL.mainContext.scissor(preworldClipRect.x,y,preworldClipRect.width,preworldClipRect.height);\n\t\t\tWebGL.mainContext.enable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t}\n\t\tRenderState2D.worldClipRect=preworldClipRect;\n\t}\n\n\t__proto.flush=function(context){\n\t\tif (this.repaint){\n\t\t\tthis._flushToTarget(context,this.target);\n\t\t\tthis.repaint=false;\n\t\t}\n\t}\n\n\t__proto.drawTo=function(context,x,y,width,height){\n\t\tcontext.drawTexture(this.target.getTexture(),x,y,width,height,0,0);\n\t}\n\n\t__proto.destroy=function(){\n\t\tif (this.target){\n\t\t\tthis.target.destroy();\n\t\t\tthis.target=null;\n\t\t\tthis._sp=null;\n\t\t}\n\t}\n\n\treturn RenderTargetMAX;\n})()\n\n\n//class laya.webgl.shader.d2.Shader2D\nvar Shader2D=(function(){\n\tfunction Shader2D(){\n\t\tthis.ALPHA=1;\n\t\t//this.glTexture=null;\n\t\t//this.shader=null;\n\t\t//this.filters=null;\n\t\tthis.shaderType=0;\n\t\t//this.colorAdd=null;\n\t\t//this.strokeStyle=null;\n\t\t//this.fillStyle=null;\n\t\tthis.defines=new ShaderDefines2D();\n\t}\n\n\t__class(Shader2D,'laya.webgl.shader.d2.Shader2D');\n\tvar __proto=Shader2D.prototype;\n\t__proto.destroy=function(){\n\t\tthis.defines=null;\n\t\tthis.filters=null;\n\t\tthis.glTexture=null;\n\t\tthis.strokeStyle=null;\n\t\tthis.fillStyle=null;\n\t}\n\n\tShader2D.__init__=function(){\n\t\tShader.addInclude(\"parts/ColorFilter_ps_uniform.glsl\",\"uniform vec4 colorAlpha;\\nuniform mat4 colorMat;\");\n\t\tShader.addInclude(\"parts/ColorFilter_ps_logic.glsl\",\"mat4 alphaMat =colorMat;\\n\\nalphaMat[0][3] *= gl_FragColor.a;\\nalphaMat[1][3] *= gl_FragColor.a;\\nalphaMat[2][3] *= gl_FragColor.a;\\n\\ngl_FragColor = gl_FragColor * alphaMat;\\ngl_FragColor += colorAlpha/255.0*gl_FragColor.a;\\n\");\n\t\tShader.addInclude(\"parts/GlowFilter_ps_uniform.glsl\",\"uniform vec4 u_color;\\nuniform float u_strength;\\nuniform float u_blurX;\\nuniform float u_blurY;\\nuniform float u_offsetX;\\nuniform float u_offsetY;\\nuniform float u_textW;\\nuniform float u_textH;\");\n\t\tShader.addInclude(\"parts/GlowFilter_ps_logic.glsl\",\"const float c_IterationTime = 10.0;\\nfloat floatIterationTotalTime = c_IterationTime * c_IterationTime;\\nvec4 vec4Color = vec4(0.0,0.0,0.0,0.0);\\nvec2 vec2FilterDir = vec2(-(u_offsetX)/u_textW,-(u_offsetY)/u_textH);\\nvec2 vec2FilterOff = vec2(u_blurX/u_textW/c_IterationTime * 2.0,u_blurY/u_textH/c_IterationTime * 2.0);\\nfloat maxNum = u_blurX * u_blurY;\\nvec2 vec2Off = vec2(0.0,0.0);\\nfloat floatOff = c_IterationTime/2.0;\\nfor(float i = 0.0;i<=c_IterationTime; ++i){\\n\tfor(float j = 0.0;j<=c_IterationTime; ++j){\\n\t\tvec2Off = vec2(vec2FilterOff.x * (i - floatOff),vec2FilterOff.y * (j - floatOff));\\n\t\tvec4Color += texture2D(texture, v_texcoord + vec2FilterDir + vec2Off)/floatIterationTotalTime;\\n\t}\\n}\\ngl_FragColor = vec4(u_color.rgb,vec4Color.a * u_strength);\\ngl_FragColor.rgb *= gl_FragColor.a;\");\n\t\tShader.addInclude(\"parts/BlurFilter_ps_logic.glsl\",\"gl_FragColor =   blur();\\ngl_FragColor.w*=alpha;\");\n\t\tShader.addInclude(\"parts/BlurFilter_ps_uniform.glsl\",\"uniform vec4 strength_sig2_2sig2_gauss1;\\nuniform vec2 blurInfo;\\n\\n#define PI 3.141593\\n\\n//float sigma=strength/3.0;//3σ以外影响很小。即当σ=1的时候，半径为3\\n//float sig2 = sigma*sigma;\\n//float _2sig2 = 2.0*sig2;\\n//return 1.0/(2*PI*sig2)*exp(-(x*x+y*y)/_2sig2)\\n//float gauss1 = 1.0/(2.0*PI*sig2);\\n\\nfloat getGaussian(float x, float y){\\n    return strength_sig2_2sig2_gauss1.w*exp(-(x*x+y*y)/strength_sig2_2sig2_gauss1.z);\\n}\\n\\nvec4 blur(){\\n    const float blurw = 9.0;\\n    vec4 vec4Color = vec4(0.0,0.0,0.0,0.0);\\n    vec2 halfsz=vec2(blurw,blurw)/2.0/blurInfo;    \\n    vec2 startpos=v_texcoord-halfsz;\\n    vec2 ctexcoord = startpos;\\n    vec2 step = 1.0/blurInfo;  //每个像素      \\n    \\n    for(float y = 0.0;y<=blurw; ++y){\\n        ctexcoord.x=startpos.x;\\n        for(float x = 0.0;x<=blurw; ++x){\\n            //TODO 纹理坐标的固定偏移应该在vs中处理\\n            vec4Color += texture2D(texture, ctexcoord)*getGaussian(x-blurw/2.0,y-blurw/2.0);\\n            ctexcoord.x+=step.x;\\n        }\\n        ctexcoord.y+=step.y;\\n    }\\n    return vec4Color;\\n}\");\n\t\tShader.addInclude(\"parts/ColorAdd_ps_uniform.glsl\",\"uniform vec4 colorAdd;\\n\");\n\t\tShader.addInclude(\"parts/ColorAdd_ps_logic.glsl\",\"gl_FragColor = vec4(colorAdd.rgb,colorAdd.a*gl_FragColor.a);\\ngl_FragColor.xyz *= colorAdd.a;\");\n\t\tvar vs,ps;\n\t\tvs=\"attribute vec4 position;\\nattribute vec2 texcoord;\\nuniform vec2 size;\\n\\n#ifdef WORLDMAT\\nuniform mat4 mmat;\\n#endif\\nvarying vec2 v_texcoord;\\nvoid main() {\\n  #ifdef WORLDMAT\\n  vec4 pos=mmat*position;\\n  gl_Position =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0);\\n  #else\\n  gl_Position =vec4((position.x/size.x-0.5)*2.0,(0.5-position.y/size.y)*2.0,position.z,1.0);\\n  #endif\\n  \\n  v_texcoord = texcoord;\\n}\";\n\t\tps=\"precision mediump float;\\n//precision highp float;\\nvarying vec2 v_texcoord;\\nuniform sampler2D texture;\\nuniform float alpha;\\n#include?BLUR_FILTER  \\\"parts/BlurFilter_ps_uniform.glsl\\\";\\n#include?COLOR_FILTER \\\"parts/ColorFilter_ps_uniform.glsl\\\";\\n#include?GLOW_FILTER \\\"parts/GlowFilter_ps_uniform.glsl\\\";\\n#include?COLOR_ADD \\\"parts/ColorAdd_ps_uniform.glsl\\\";\\n\\nvoid main() {\\n   vec4 color= texture2D(texture, v_texcoord);\\n   color.a*=alpha;\\n   color.rgb*=alpha;\\n   gl_FragColor=color;\\n   #include?COLOR_ADD \\\"parts/ColorAdd_ps_logic.glsl\\\";   \\n   #include?BLUR_FILTER  \\\"parts/BlurFilter_ps_logic.glsl\\\";\\n   #include?COLOR_FILTER \\\"parts/ColorFilter_ps_logic.glsl\\\";\\n   #include?GLOW_FILTER \\\"parts/GlowFilter_ps_logic.glsl\\\";\\n}\";\n\t\tShader.preCompile2D(0,/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,vs,ps,null);\n\t\tvs=\"attribute vec4 position;\\nuniform vec2 size;\\nuniform mat4 mmat;\\nvoid main() {\\n  vec4 pos=mmat*position;\\n  gl_Position =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0);\\n}\";\n\t\tps=\"precision mediump float;\\nuniform vec4 color;\\nuniform float alpha;\\n#include?COLOR_FILTER \\\"parts/ColorFilter_ps_uniform.glsl\\\";\\nvoid main() {\\n\tvec4 a = vec4(color.r, color.g, color.b, color.a);\\n\ta.w = alpha;\\n\ta.xyz *= alpha;\\n\tgl_FragColor = a;\\n\t#include?COLOR_FILTER \\\"parts/ColorFilter_ps_logic.glsl\\\";\\n}\";\n\t\tShader.preCompile2D(0,/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02,vs,ps,null);\n\t\tvs=\"attribute vec4 position;\\nattribute vec3 a_color;\\nuniform mat4 mmat;\\nuniform mat4 u_mmat2;\\nuniform vec2 u_pos;\\nuniform vec2 size;\\nvarying vec3 color;\\nvoid main(){\\n  vec4 tPos = vec4(position.x + u_pos.x,position.y + u_pos.y,position.z,position.w);\\n  vec4 pos=mmat*u_mmat2*tPos;\\n  gl_Position =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0);\\n  color=a_color;\\n}\";\n\t\tps=\"precision mediump float;\\n//precision mediump float;\\nvarying vec3 color;\\nuniform float alpha;\\nvoid main(){\\n\t//vec4 a=vec4(color.r, color.g, color.b, 1);\\n\t//a.a*=alpha;\\n    gl_FragColor=vec4(color.r, color.g, color.b, alpha);\\n\tgl_FragColor.rgb*=alpha;\\n}\";\n\t\tShader.preCompile2D(0,/*laya.webgl.shader.d2.ShaderDefines2D.PRIMITIVE*/0x04,vs,ps,null);\n\t\tvs=\"attribute vec4 position;\\nattribute vec2 texcoord;\\nuniform vec2 size;\\n\\n#ifdef WORLDMAT\\nuniform mat4 mmat;\\n#endif\\nvarying vec2 v_texcoord;\\nvoid main() {\\n  #ifdef WORLDMAT\\n  vec4 pos=mmat*position;\\n  gl_Position =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0);\\n  #else\\n  gl_Position =vec4((position.x/size.x-0.5)*2.0,(0.5-position.y/size.y)*2.0,position.z,1.0);\\n  #endif\\n  \\n  v_texcoord = texcoord;\\n}\";\n\t\tps=\"#ifdef FSHIGHPRECISION\\nprecision highp float;\\n#else\\nprecision mediump float;\\n#endif\\n//precision highp float;\\nvarying vec2 v_texcoord;\\nuniform sampler2D texture;\\nuniform float alpha;\\nuniform vec4 u_TexRange;\\nuniform vec2 u_offset;\\n#include?BLUR_FILTER  \\\"parts/BlurFilter_ps_uniform.glsl\\\";\\n#include?COLOR_FILTER \\\"parts/ColorFilter_ps_uniform.glsl\\\";\\n#include?GLOW_FILTER \\\"parts/GlowFilter_ps_uniform.glsl\\\";\\n#include?COLOR_ADD \\\"parts/ColorAdd_ps_uniform.glsl\\\";\\n\\nvoid main() {\\n   vec2 newTexCoord;\\n   newTexCoord.x = mod(u_offset.x + v_texcoord.x,u_TexRange.y) + u_TexRange.x;\\n   newTexCoord.y = mod(u_offset.y + v_texcoord.y,u_TexRange.w) + u_TexRange.z;\\n   vec4 color= texture2D(texture, newTexCoord);\\n   color.a*=alpha;\\n   gl_FragColor=color;\\n   #include?COLOR_ADD \\\"parts/ColorAdd_ps_logic.glsl\\\";   \\n   #include?BLUR_FILTER  \\\"parts/BlurFilter_ps_logic.glsl\\\";\\n   #include?COLOR_FILTER \\\"parts/ColorFilter_ps_logic.glsl\\\";\\n   #include?GLOW_FILTER \\\"parts/GlowFilter_ps_logic.glsl\\\";\\n}\";\n\t\tShader.preCompile2D(0,/*laya.webgl.shader.d2.ShaderDefines2D.FILLTEXTURE*/0x100,vs,ps,null);\n\t\tvs=\"attribute vec2 position;\\nattribute vec2 texcoord;\\nattribute vec4 color;\\nuniform vec2 size;\\nuniform float offsetX;\\nuniform float offsetY;\\nuniform mat4 mmat;\\nuniform mat4 u_mmat2;\\nvarying vec2 v_texcoord;\\nvarying vec4 v_color;\\nvoid main() {\\n  vec4 pos=mmat*u_mmat2*vec4(offsetX+position.x,offsetY+position.y,0,1 );\\n  gl_Position = vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0);\\n  v_color = color;\\n  v_color.rgb *= v_color.a;\\n  v_texcoord = texcoord;  \\n}\";\n\t\tps=\"precision mediump float;\\nvarying vec2 v_texcoord;\\nvarying vec4 v_color;\\nuniform sampler2D texture;\\nuniform float alpha;\\nvoid main() {\\n\tvec4 t_color = texture2D(texture, v_texcoord);\\n\tgl_FragColor = t_color.rgba * v_color;\\n\tgl_FragColor *= alpha;\\n}\";\n\t\tShader.preCompile2D(0,/*laya.webgl.shader.d2.ShaderDefines2D.SKINMESH*/0x200,vs,ps,null);\n\t}\n\n\treturn Shader2D;\n})()\n\n\n//class laya.webgl.shader.ShaderDefines\nvar ShaderDefines=(function(){\n\tfunction ShaderDefines(name2int,int2name,int2nameMap){\n\t\tthis._value=0;\n\t\t//this._name2int=null;\n\t\t//this._int2name=null;\n\t\t//this._int2nameMap=null;\n\t\tthis._name2int=name2int;\n\t\tthis._int2name=int2name;\n\t\tthis._int2nameMap=int2nameMap;\n\t}\n\n\t__class(ShaderDefines,'laya.webgl.shader.ShaderDefines');\n\tvar __proto=ShaderDefines.prototype;\n\t__proto.add=function(value){\n\t\tif ((typeof value=='string'))value=this._name2int[value];\n\t\tthis._value |=value;\n\t\treturn this._value;\n\t}\n\n\t__proto.addInt=function(value){\n\t\tthis._value |=value;\n\t\treturn this._value;\n\t}\n\n\t__proto.remove=function(value){\n\t\tif ((typeof value=='string'))value=this._name2int[value];\n\t\tthis._value &=(~value);\n\t\treturn this._value;\n\t}\n\n\t__proto.isDefine=function(def){\n\t\treturn (this._value & def)===def;\n\t}\n\n\t__proto.getValue=function(){\n\t\treturn this._value;\n\t}\n\n\t__proto.setValue=function(value){\n\t\tthis._value=value;\n\t}\n\n\t__proto.toNameDic=function(){\n\t\tvar r=this._int2nameMap[this._value];\n\t\treturn r ? r :ShaderDefines._toText(this._value,this._int2name,this._int2nameMap);\n\t}\n\n\tShaderDefines._reg=function(name,value,_name2int,_int2name){\n\t\t_name2int[name]=value;\n\t\t_int2name[value]=name;\n\t}\n\n\tShaderDefines._toText=function(value,_int2name,_int2nameMap){\n\t\tvar r=_int2nameMap[value];\n\t\tif (r)return r;\n\t\tvar o={};\n\t\tvar d=1;\n\t\tfor (var i=0;i < 32;i++){\n\t\t\td=1 << i;\n\t\t\tif (d > value)break ;\n\t\t\tif (value & d){\n\t\t\t\tvar name=_int2name[d];\n\t\t\t\tname && (o[name]=\"\");\n\t\t\t}\n\t\t}\n\t\t_int2nameMap[value]=o;\n\t\treturn o;\n\t}\n\n\tShaderDefines._toInt=function(names,_name2int){\n\t\tvar words=names.split('.');\n\t\tvar num=0;\n\t\tfor (var i=0,n=words.length;i < n;i++){\n\t\t\tvar value=_name2int[words[i]];\n\t\t\tif (!value)throw new Error(\"Defines to int err:\"+names+\"/\"+words[i]);\n\t\t\tnum |=value;\n\t\t}\n\t\treturn num;\n\t}\n\n\treturn ShaderDefines;\n})()\n\n\n/**\n*这里销毁的问题，后面待确认\n*/\n//class laya.webgl.shader.d2.skinAnishader.SkinMesh\nvar SkinMesh=(function(){\n\tfunction SkinMesh(){\n\t\tthis.mVBBuffer=null;\n\t\tthis.mIBBuffer=null;\n\t\tthis.mVBData=null;\n\t\tthis.mIBData=null;\n\t\tthis.mEleNum=0;\n\t\tthis.mTexture=null;\n\t\tthis.transform=null;\n\t\tthis._vs=null;\n\t\tthis._ps=null;\n\t\tthis._indexStart=-1;\n\t\tthis._verticles=null;\n\t\tthis._uvs=null;\n\t\tthis._tempMatrix=new Matrix();\n\t}\n\n\t__class(SkinMesh,'laya.webgl.shader.d2.skinAnishader.SkinMesh');\n\tvar __proto=SkinMesh.prototype;\n\t__proto.init=function(texture,vs,ps){\n\t\tif (vs){\n\t\t\tthis._vs=vs;\n\t\t\t}else {\n\t\t\tthis._vs=[];\n\t\t\tvar tWidth=texture.width;\n\t\t\tvar tHeight=texture.height;\n\t\t\tvar tRed=1;\n\t\t\tvar tGreed=1;\n\t\t\tvar tBlue=1;\n\t\t\tvar tAlpha=1;\n\t\t\tthis._vs.push(0,0,0,0,tRed,tGreed,tBlue,tAlpha);\n\t\t\tthis._vs.push(tWidth,0,1,0,tRed,tGreed,tBlue,tAlpha);\n\t\t\tthis._vs.push(tWidth,tHeight,1,1,tRed,tGreed,tBlue,tAlpha);\n\t\t\tthis._vs.push(0,tHeight,0,1,tRed,tGreed,tBlue,tAlpha);\n\t\t}\n\t\tif (ps){\n\t\t\tthis._ps=ps;\n\t\t\t}else {\n\t\t\tif (!SkinMesh._defaultPS){\n\t\t\t\tSkinMesh._defaultPS=[];\n\t\t\t\tSkinMesh._defaultPS.push(0,1,3,3,1,2);\n\t\t\t}\n\t\t\tthis._ps=SkinMesh._defaultPS;\n\t\t}\n\t\tthis.mVBData=new Float32Array(this._vs);\n\t\tthis.mIBData=new Uint16Array(this._ps.length);\n\t\tthis.mIBData[\"start\"]=-1;\n\t\tthis.mEleNum=this._ps.length;\n\t\tthis.mTexture=texture;\n\t}\n\n\t__proto.init2=function(texture,vs,ps,verticles,uvs){\n\t\tif (this.transform)this.transform=null;\n\t\tif (ps){\n\t\t\tthis._ps=ps;\n\t\t\t}else {\n\t\t\tthis._ps=[];\n\t\t\tthis._ps.push(0,1,3,3,1,2);\n\t\t}\n\t\tthis._verticles=verticles;\n\t\tthis._uvs=uvs;\n\t\tthis.mEleNum=this._ps.length;\n\t\tthis.mTexture=texture;\n\t\tif (Render.isConchNode || Render.isConchApp){\n\t\t\tthis._initMyData();\n\t\t\tthis.mVBData=new Float32Array(this._vs);\n\t\t}\n\t}\n\n\t__proto._initMyData=function(){\n\t\tvar vsI=0;\n\t\tvar vI=0;\n\t\tvar vLen=this._verticles.length;\n\t\tvar tempVLen=vLen *4;\n\t\tthis._vs=SkinMesh._tempVS;\n\t\tvar insertNew=false;\n\t\tif (Render.isConchNode || Render.isConchApp){\n\t\t\tthis._vs.length=tempVLen;\n\t\t\tinsertNew=true;\n\t\t\t}else{\n\t\t\tif (this._vs.length < tempVLen){\n\t\t\t\tthis._vs.length=tempVLen;\n\t\t\t\tinsertNew=true;\n\t\t\t}\n\t\t}\n\t\tSkinMesh._tVSLen=tempVLen;\n\t\tif (insertNew){\n\t\t\twhile (vsI < tempVLen){\n\t\t\t\tthis._vs[vsI]=this._verticles[vI];\n\t\t\t\tthis._vs[vsI+1]=this._verticles[vI+1];\n\t\t\t\tthis._vs[vsI+2]=this._uvs[vI];\n\t\t\t\tthis._vs[vsI+3]=this._uvs[vI+1];\n\t\t\t\tthis._vs[vsI+4]=1;\n\t\t\t\tthis._vs[vsI+5]=1;\n\t\t\t\tthis._vs[vsI+6]=1;\n\t\t\t\tthis._vs[vsI+7]=1;\n\t\t\t\tvsI+=8;\n\t\t\t\tvI+=2;\n\t\t\t}\n\t\t\t}else{\n\t\t\twhile (vsI < tempVLen){\n\t\t\t\tthis._vs[vsI]=this._verticles[vI];\n\t\t\t\tthis._vs[vsI+1]=this._verticles[vI+1];\n\t\t\t\tthis._vs[vsI+2]=this._uvs[vI];\n\t\t\t\tthis._vs[vsI+3]=this._uvs[vI+1];\n\t\t\t\tvsI+=8;\n\t\t\t\tvI+=2;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.getData2=function(vb,ib,start){\n\t\tthis.mVBBuffer=vb;\n\t\tthis.mIBBuffer=ib;\n\t\tthis._initMyData();\n\t\tvb.appendEx2(this._vs,Float32Array,SkinMesh._tVSLen,4);\n\t\tthis._indexStart=ib._byteLength;\n\t\tvar tIB;\n\t\ttIB=SkinMesh._tempIB;\n\t\tif (tIB.length < this._ps.length){\n\t\t\ttIB.length=this._ps.length;\n\t\t}\n\t\tfor (var i=0,n=this._ps.length;i < n;i++){\n\t\t\ttIB[i]=this._ps[i]+start;\n\t\t}\n\t\tib.appendEx2(tIB,Uint16Array,this._ps.length,2);\n\t}\n\n\t__proto.getData=function(vb,ib,start){\n\t\tthis.mVBBuffer=vb;\n\t\tthis.mIBBuffer=ib;\n\t\tvb.append(this.mVBData);\n\t\tthis._indexStart=ib._byteLength;\n\t\tif (this.mIBData[\"start\"] !=start){\n\t\t\tfor (var i=0,n=this._ps.length;i < n;i++){\n\t\t\t\tthis.mIBData[i]=this._ps[i]+start;\n\t\t\t}\n\t\t\tthis.mIBData[\"start\"]=start;\n\t\t}\n\t\tib.append(this.mIBData);\n\t}\n\n\t__proto.render=function(context,x,y){\n\t\tif (Render.isWebGL && this.mTexture){\n\t\t\tcontext._renderKey=0;\n\t\t\tcontext._shader2D.glTexture=null;\n\t\t\tSkinMeshBuffer.getInstance().addSkinMesh(this);\n\t\t\tvar tempSubmit=Submit.createShape(context,this.mIBBuffer,this.mVBBuffer,this.mEleNum,this._indexStart,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.SKINMESH*/0x200,0));\n\t\t\tthis.transform || (this.transform=Matrix.EMPTY);\n\t\t\tthis.transform.translate(x,y);\n\t\t\tMatrix.mul(this.transform,context._curMat,this._tempMatrix);\n\t\t\tthis.transform.translate(-x,-y);\n\t\t\tvar tShaderValue=tempSubmit.shaderValue;\n\t\t\tvar tArray=tShaderValue.u_mmat2||RenderState2D.getMatrArray();\n\t\t\tRenderState2D.mat2MatArray(this._tempMatrix,tArray);\n\t\t\ttShaderValue.textureHost=this.mTexture;\n\t\t\ttShaderValue.offsetX=0;\n\t\t\ttShaderValue.offsetY=0;\n\t\t\ttShaderValue.u_mmat2=tArray;\n\t\t\ttShaderValue.ALPHA=context._shader2D.ALPHA;\n\t\t\tcontext._submits[context._submits._length++]=tempSubmit;\n\t\t}\n\t\telse if (Render.isConchApp&&this.mTexture){\n\t\t\tthis.transform || (this.transform=Matrix.EMPTY);\n\t\t\tcontext.setSkinMesh&&context.setSkinMesh(x,y,this._ps,this.mVBData,this.mEleNum,0,this.mTexture,this.transform);\n\t\t}\n\t}\n\n\tSkinMesh._tempVS=[];\n\tSkinMesh._tempIB=[];\n\tSkinMesh._defaultPS=null;\n\tSkinMesh._tVSLen=0;\n\treturn SkinMesh;\n})()\n\n\n//class laya.webgl.shader.d2.skinAnishader.SkinMeshBuffer\nvar SkinMeshBuffer=(function(){\n\tfunction SkinMeshBuffer(){\n\t\tthis.ib=null;\n\t\tthis.vb=null;\n\t\tvar gl=WebGL.mainContext;\n\t\tthis.ib=IndexBuffer2D.create(/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\tthis.vb=VertexBuffer2D.create(8);\n\t}\n\n\t__class(SkinMeshBuffer,'laya.webgl.shader.d2.skinAnishader.SkinMeshBuffer');\n\tvar __proto=SkinMeshBuffer.prototype;\n\t__proto.addSkinMesh=function(skinMesh){\n\t\tskinMesh.getData2(this.vb,this.ib,this.vb._byteLength / 32);\n\t}\n\n\t__proto.reset=function(){\n\t\tthis.vb.clear();\n\t\tthis.ib.clear();\n\t}\n\n\tSkinMeshBuffer.getInstance=function(){\n\t\treturn SkinMeshBuffer.instance=SkinMeshBuffer.instance|| new SkinMeshBuffer();\n\t}\n\n\tSkinMeshBuffer.instance=null;\n\treturn SkinMeshBuffer;\n})()\n\n\n//此类可以减少代码\n//class laya.webgl.shapes.BasePoly\nvar BasePoly=(function(){\n\tfunction BasePoly(x,y,width,height,edges,color,borderWidth,borderColor,round){\n\t\t//this.x=NaN;\n\t\t//this.y=NaN;\n\t\t//this.r=NaN;\n\t\t//this.width=NaN;\n\t\t//this.height=NaN;\n\t\t//this.edges=NaN;\n\t\tthis.r0=0\n\t\t//this.color=0;\n\t\t//this.borderColor=NaN;\n\t\t//this.borderWidth=NaN;\n\t\t//this.round=0;\n\t\tthis.fill=true;\n\t\t//this.mUint16Array=null;\n\t\t//this.mFloat32Array=null;\n\t\tthis.r1=Math.PI / 2;\n\t\t(round===void 0)&& (round=0);\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.width=width;\n\t\tthis.height=height;\n\t\tthis.edges=edges;\n\t\tthis.color=color;\n\t\tthis.borderWidth=borderWidth;\n\t\tthis.borderColor=borderColor;\n\t}\n\n\t__class(BasePoly,'laya.webgl.shapes.BasePoly');\n\tvar __proto=BasePoly.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.shapes.IShape\":true})\n\t__proto.getData=function(ib,vb,start){}\n\t__proto.rebuild=function(points){}\n\t__proto.setMatrix=function(mat){}\n\t__proto.needUpdate=function(mat){\n\t\treturn true;\n\t}\n\n\t__proto.sector=function(outVert,outIndex,start){\n\t\tvar x=this.x,y=this.y,edges=this.edges,seg=(this.r1-this.r0)/ edges;\n\t\tvar w=this.width,h=this.height,color=this.color;\n\t\tvar r=((color >> 16)& 0x0000ff)/ 255,g=((color >> 8)& 0xff)/ 255,b=(color & 0x0000ff)/ 255;\n\t\toutVert.push(x,y,r,g,b);\n\t\tfor (var i=0;i < edges+1;i++){\n\t\t\toutVert.push(x+Math.sin(seg *i+this.r0)*w,y+Math.cos(seg *i+this.r0)*h);\n\t\t\toutVert.push(r,g,b);\n\t\t}\n\t\tfor (i=0;i < edges;i++){\n\t\t\toutIndex.push(start,start+i+1,start+i+2);\n\t\t}\n\t}\n\n\t//用于画线\n\t__proto.createLine2=function(p,indices,lineWidth,len,outVertex,indexCount){\n\t\tvar points=p.concat();\n\t\tvar result=outVertex;\n\t\tvar color=this.borderColor;\n\t\tvar r=((color >> 16)& 0x0000ff)/ 255,g=((color >> 8)& 0xff)/ 255,b=(color & 0x0000ff)/ 255;\n\t\tvar length=points.length / 2;\n\t\tvar iStart=len,w=lineWidth / 2;\n\t\tvar px,py,p1x,p1y,p2x,p2y,p3x,p3y;\n\t\tvar perpx,perpy,perp2x,perp2y,perp3x,perp3y;\n\t\tvar a1,b1,c1,a2,b2,c2;\n\t\tvar denom,pdist,dist;\n\t\tp1x=points[0];\n\t\tp1y=points[1];\n\t\tp2x=points[2];\n\t\tp2y=points[3];\n\t\tperpx=-(p1y-p2y);\n\t\tperpy=p1x-p2x;\n\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\tperpx=perpx / dist *w;\n\t\tperpy=perpy / dist *w;\n\t\tresult.push(p1x-perpx+this.x,p1y-perpy+this.y,r,g,b,p1x+perpx+this.x,p1y+perpy+this.y,r,g,b);\n\t\tfor (var i=1;i < length-1;i++){\n\t\t\tp1x=points[(i-1)*2];\n\t\t\tp1y=points[(i-1)*2+1];\n\t\t\tp2x=points[(i)*2];\n\t\t\tp2y=points[(i)*2+1];\n\t\t\tp3x=points[(i+1)*2];\n\t\t\tp3y=points[(i+1)*2+1];\n\t\t\tperpx=-(p1y-p2y);\n\t\t\tperpy=p1x-p2x;\n\t\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\t\tperpx=perpx / dist *w;\n\t\t\tperpy=perpy / dist *w;\n\t\t\tperp2x=-(p2y-p3y);\n\t\t\tperp2y=p2x-p3x;\n\t\t\tdist=Math.sqrt(perp2x *perp2x+perp2y *perp2y);\n\t\t\tperp2x=perp2x / dist *w;\n\t\t\tperp2y=perp2y / dist *w;\n\t\t\ta1=(-perpy+p1y)-(-perpy+p2y);\n\t\t\tb1=(-perpx+p2x)-(-perpx+p1x);\n\t\t\tc1=(-perpx+p1x)*(-perpy+p2y)-(-perpx+p2x)*(-perpy+p1y);\n\t\t\ta2=(-perp2y+p3y)-(-perp2y+p2y);\n\t\t\tb2=(-perp2x+p2x)-(-perp2x+p3x);\n\t\t\tc2=(-perp2x+p3x)*(-perp2y+p2y)-(-perp2x+p2x)*(-perp2y+p3y);\n\t\t\tdenom=a1 *b2-a2 *b1;\n\t\t\tif (Math.abs(denom)< 0.1){\n\t\t\t\tdenom+=10.1;\n\t\t\t\tresult.push(p2x-perpx+this.x,p2y-perpy+this.y,r,g,b,p2x+perpx+this.x,p2y+perpy+this.y,r,g,b);\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tpx=(b1 *c2-b2 *c1)/ denom;\n\t\t\tpy=(a2 *c1-a1 *c2)/ denom;\n\t\t\tpdist=(px-p2x)*(px-p2x)+(py-p2y)+(py-p2y);\n\t\t\tresult.push(px+this.x,py+this.y,r,g,b,p2x-(px-p2x)+this.x,p2y-(py-p2y)+this.y,r,g,b);\n\t\t}\n\t\tp1x=points[points.length-4];\n\t\tp1y=points[points.length-3];\n\t\tp2x=points[points.length-2];\n\t\tp2y=points[points.length-1];\n\t\tperpx=-(p1y-p2y);\n\t\tperpy=p1x-p2x;\n\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\tperpx=perpx / dist *w;\n\t\tperpy=perpy / dist *w;\n\t\tresult.push(p2x-perpx+this.x,p2y-perpy+this.y,r,g,b,p2x+perpx+this.x,p2y+perpy+this.y,r,g,b);\n\t\tvar groupLen=indexCount;\n\t\tfor (i=1;i < groupLen;i++){\n\t\t\tindices.push(iStart+(i-1)*2,iStart+(i-1)*2+1,iStart+i *2+1,iStart+i *2+1,iStart+i *2,iStart+(i-1)*2);\n\t\t}\n\t\treturn result;\n\t}\n\n\t// /*,outVertex:Array,outIndex:Array*/\n\t__proto.createLine=function(p,indices,lineWidth,len){\n\t\tvar points=p.concat();\n\t\tvar result=p;\n\t\tvar color=this.borderColor;\n\t\tvar r=((color >> 16)& 0x0000ff)/ 255,g=((color >> 8)& 0xff)/ 255,b=(color & 0x0000ff)/ 255;\n\t\tpoints.splice(0,5);\n\t\tvar length=points.length / 5;\n\t\tvar iStart=len,w=lineWidth / 2;\n\t\tvar px,py,p1x,p1y,p2x,p2y,p3x,p3y;\n\t\tvar perpx,perpy,perp2x,perp2y,perp3x,perp3y;\n\t\tvar a1,b1,c1,a2,b2,c2;\n\t\tvar denom,pdist,dist;\n\t\tp1x=points[0];\n\t\tp1y=points[1];\n\t\tp2x=points[5];\n\t\tp2y=points[6];\n\t\tperpx=-(p1y-p2y);\n\t\tperpy=p1x-p2x;\n\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\tperpx=perpx / dist *w;\n\t\tperpy=perpy / dist *w;\n\t\tresult.push(p1x-perpx,p1y-perpy,r,g,b,p1x+perpx,p1y+perpy,r,g,b);\n\t\tfor (var i=1;i < length-1;i++){\n\t\t\tp1x=points[(i-1)*5];\n\t\t\tp1y=points[(i-1)*5+1];\n\t\t\tp2x=points[(i)*5];\n\t\t\tp2y=points[(i)*5+1];\n\t\t\tp3x=points[(i+1)*5];\n\t\t\tp3y=points[(i+1)*5+1];\n\t\t\tperpx=-(p1y-p2y);\n\t\t\tperpy=p1x-p2x;\n\t\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\t\tperpx=perpx / dist *w;\n\t\t\tperpy=perpy / dist *w;\n\t\t\tperp2x=-(p2y-p3y);\n\t\t\tperp2y=p2x-p3x;\n\t\t\tdist=Math.sqrt(perp2x *perp2x+perp2y *perp2y);\n\t\t\tperp2x=perp2x / dist *w;\n\t\t\tperp2y=perp2y / dist *w;\n\t\t\ta1=(-perpy+p1y)-(-perpy+p2y);\n\t\t\tb1=(-perpx+p2x)-(-perpx+p1x);\n\t\t\tc1=(-perpx+p1x)*(-perpy+p2y)-(-perpx+p2x)*(-perpy+p1y);\n\t\t\ta2=(-perp2y+p3y)-(-perp2y+p2y);\n\t\t\tb2=(-perp2x+p2x)-(-perp2x+p3x);\n\t\t\tc2=(-perp2x+p3x)*(-perp2y+p2y)-(-perp2x+p2x)*(-perp2y+p3y);\n\t\t\tdenom=a1 *b2-a2 *b1;\n\t\t\tif (Math.abs(denom)< 0.1){\n\t\t\t\tdenom+=10.1;\n\t\t\t\tresult.push(p2x-perpx,p2y-perpy,r,g,b,p2x+perpx,p2y+perpy,r,g,b);\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tpx=(b1 *c2-b2 *c1)/ denom;\n\t\t\tpy=(a2 *c1-a1 *c2)/ denom;\n\t\t\tpdist=(px-p2x)*(px-p2x)+(py-p2y)+(py-p2y);\n\t\t\tresult.push(px,py,r,g,b,p2x-(px-p2x),p2y-(py-p2y),r,g,b);\n\t\t}\n\t\tp1x=points[points.length-10];\n\t\tp1y=points[points.length-9];\n\t\tp2x=points[points.length-5];\n\t\tp2y=points[points.length-4];\n\t\tperpx=-(p1y-p2y);\n\t\tperpy=p1x-p2x;\n\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\tperpx=perpx / dist *w;\n\t\tperpy=perpy / dist *w;\n\t\tresult.push(p2x-perpx,p2y-perpy,r,g,b,p2x+perpx,p2y+perpy,r,g,b);\n\t\tvar groupLen=this.edges+1;\n\t\tfor (i=1;i < groupLen;i++){\n\t\t\tindices.push(iStart+(i-1)*2,iStart+(i-1)*2+1,iStart+i *2+1,iStart+i *2+1,iStart+i *2,iStart+(i-1)*2);\n\t\t}\n\t\treturn result;\n\t}\n\n\t//闭合路径\n\t__proto.createLoopLine=function(p,indices,lineWidth,len,outVertex,outIndex){\n\t\tvar points=p.concat();\n\t\tvar result=outVertex ? outVertex :p;\n\t\tvar color=this.borderColor;\n\t\tvar r=((color >> 16)& 0x0000ff)/ 255,g=((color >> 8)& 0xff)/ 255,b=(color & 0x0000ff)/ 255;\n\t\tpoints.splice(0,5);\n\t\tvar firstPoint=[points[0],points[1]];\n\t\tvar lastPoint=[points[points.length-5],points[points.length-4]];\n\t\tvar midPointX=lastPoint[0]+(firstPoint[0]-lastPoint[0])*0.5;\n\t\tvar midPointY=lastPoint[1]+(firstPoint[1]-lastPoint[1])*0.5;\n\t\tpoints.unshift(midPointX,midPointY,0,0,0);\n\t\tpoints.push(midPointX,midPointY,0,0,0);\n\t\tvar length=points.length / 5;\n\t\tvar iStart=len,w=lineWidth / 2;\n\t\tvar px,py,p1x,p1y,p2x,p2y,p3x,p3y;\n\t\tvar perpx,perpy,perp2x,perp2y,perp3x,perp3y;\n\t\tvar a1,b1,c1,a2,b2,c2;\n\t\tvar denom,pdist,dist;\n\t\tp1x=points[0];\n\t\tp1y=points[1];\n\t\tp2x=points[5];\n\t\tp2y=points[6];\n\t\tperpx=-(p1y-p2y);\n\t\tperpy=p1x-p2x;\n\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\tperpx=perpx / dist *w;\n\t\tperpy=perpy / dist *w;\n\t\tresult.push(p1x-perpx,p1y-perpy,r,g,b,p1x+perpx,p1y+perpy,r,g,b);\n\t\tfor (var i=1;i < length-1;i++){\n\t\t\tp1x=points[(i-1)*5];\n\t\t\tp1y=points[(i-1)*5+1];\n\t\t\tp2x=points[(i)*5];\n\t\t\tp2y=points[(i)*5+1];\n\t\t\tp3x=points[(i+1)*5];\n\t\t\tp3y=points[(i+1)*5+1];\n\t\t\tperpx=-(p1y-p2y);\n\t\t\tperpy=p1x-p2x;\n\t\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\t\tperpx=perpx / dist *w;\n\t\t\tperpy=perpy / dist *w;\n\t\t\tperp2x=-(p2y-p3y);\n\t\t\tperp2y=p2x-p3x;\n\t\t\tdist=Math.sqrt(perp2x *perp2x+perp2y *perp2y);\n\t\t\tperp2x=perp2x / dist *w;\n\t\t\tperp2y=perp2y / dist *w;\n\t\t\ta1=(-perpy+p1y)-(-perpy+p2y);\n\t\t\tb1=(-perpx+p2x)-(-perpx+p1x);\n\t\t\tc1=(-perpx+p1x)*(-perpy+p2y)-(-perpx+p2x)*(-perpy+p1y);\n\t\t\ta2=(-perp2y+p3y)-(-perp2y+p2y);\n\t\t\tb2=(-perp2x+p2x)-(-perp2x+p3x);\n\t\t\tc2=(-perp2x+p3x)*(-perp2y+p2y)-(-perp2x+p2x)*(-perp2y+p3y);\n\t\t\tdenom=a1 *b2-a2 *b1;\n\t\t\tif (Math.abs(denom)< 0.1){\n\t\t\t\tdenom+=10.1;\n\t\t\t\tresult.push(p2x-perpx,p2y-perpy,r,g,b,p2x+perpx,p2y+perpy,r,g,b);\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tpx=(b1 *c2-b2 *c1)/ denom;\n\t\t\tpy=(a2 *c1-a1 *c2)/ denom;\n\t\t\tpdist=(px-p2x)*(px-p2x)+(py-p2y)+(py-p2y);\n\t\t\tresult.push(px,py,r,g,b,p2x-(px-p2x),p2y-(py-p2y),r,g,b);\n\t\t}\n\t\tif (outIndex){\n\t\t\tindices=outIndex;\n\t\t};\n\t\tvar groupLen=this.edges+1;\n\t\tfor (i=1;i < groupLen;i++){\n\t\t\tindices.push(iStart+(i-1)*2,iStart+(i-1)*2+1,iStart+i *2+1,iStart+i *2+1,iStart+i *2,iStart+(i-1)*2);\n\t\t}\n\t\tindices.push(iStart+(i-1)*2,iStart+(i-1)*2+1,iStart+1,iStart+1,iStart,iStart+(i-1)*2);\n\t\treturn result;\n\t}\n\n\treturn BasePoly;\n})()\n\n\n//class laya.webgl.shapes.Earcut\nvar Earcut=(function(){\n\tfunction Earcut(){}\n\t__class(Earcut,'laya.webgl.shapes.Earcut');\n\tEarcut.earcut=function(data,holeIndices,dim){\n\t\tdim=dim || 2;\n\t\tvar hasHoles=holeIndices && holeIndices.length,\n\t\touterLen=hasHoles ? holeIndices[0] *dim :data.length,\n\t\touterNode=Earcut.linkedList(data,0,outerLen,dim,true),\n\t\ttriangles=[];\n\t\tif (!outerNode)return triangles;\n\t\tvar minX,minY,maxX,maxY,x,y,invSize;\n\t\tif (hasHoles)outerNode=Earcut.eliminateHoles(data,holeIndices,outerNode,dim);\n\t\tif (data.length > 80 *dim){\n\t\t\tminX=maxX=data[0];\n\t\t\tminY=maxY=data[1];\n\t\t\tfor (var i=dim;i < outerLen;i+=dim){\n\t\t\t\tx=data[i];\n\t\t\t\ty=data[i+1];\n\t\t\t\tif (x < minX)minX=x;\n\t\t\t\tif (y < minY)minY=y;\n\t\t\t\tif (x > maxX)maxX=x;\n\t\t\t\tif (y > maxY)maxY=y;\n\t\t\t}\n\t\t\tinvSize=Math.max(maxX-minX,maxY-minY);\n\t\t\tinvSize=invSize!==0 ? 1 / invSize :0;\n\t\t}\n\t\tEarcut.earcutLinked(outerNode,triangles,dim,minX,minY,invSize);\n\t\treturn triangles;\n\t}\n\n\tEarcut.linkedList=function(data,start,end,dim,clockwise){\n\t\tvar i,last;\n\t\tif (clockwise===(Earcut.signedArea(data,start,end,dim)> 0)){\n\t\t\tfor (i=start;i < end;i+=dim)last=Earcut.insertNode(i,data[i],data[i+1],last);\n\t\t\t}else {\n\t\t\tfor (i=end-dim;i >=start;i-=dim)last=Earcut.insertNode(i,data[i],data[i+1],last);\n\t\t}\n\t\tif (last && Earcut.equals(last,last.next)){\n\t\t\tEarcut.removeNode(last);\n\t\t\tlast=last.next;\n\t\t}\n\t\treturn last;\n\t}\n\n\tEarcut.filterPoints=function(start,end){\n\t\tif (!start)return start;\n\t\tif (!end)end=start;\n\t\tvar p=start,\n\t\tagain;\n\t\tdo {\n\t\t\tagain=false;\n\t\t\tif (!p.steiner && (Earcut.equals(p,p.next)|| Earcut.area(p.prev,p,p.next)===0)){\n\t\t\t\tEarcut.removeNode(p);\n\t\t\t\tp=end=p.prev;\n\t\t\t\tif (p===p.next)break ;\n\t\t\t\tagain=true;\n\t\t\t\t}else {\n\t\t\t\tp=p.next;\n\t\t\t}\n\t\t}while (again || p!==end);\n\t\treturn end;\n\t}\n\n\tEarcut.earcutLinked=function(ear,triangles,dim,minX,minY,invSize,pass){\n\t\tif (!ear)return;\n\t\tif (!pass && invSize)Earcut.indexCurve(ear,minX,minY,invSize);\n\t\tvar stop=ear,\n\t\tprev,next;\n\t\twhile (ear.prev!==ear.next){\n\t\t\tprev=ear.prev;\n\t\t\tnext=ear.next;\n\t\t\tif (invSize ? Earcut.isEarHashed(ear,minX,minY,invSize):Earcut.isEar(ear)){\n\t\t\t\ttriangles.push(prev.i / dim);\n\t\t\t\ttriangles.push(ear.i / dim);\n\t\t\t\ttriangles.push(next.i / dim);\n\t\t\t\tEarcut.removeNode(ear);\n\t\t\t\tear=next.next;\n\t\t\t\tstop=next.next;\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tear=next;\n\t\t\tif (ear===stop){\n\t\t\t\tif (!pass){\n\t\t\t\t\tEarcut.earcutLinked(Earcut.filterPoints(ear,null),triangles,dim,minX,minY,invSize,1);\n\t\t\t\t\t}else if (pass===1){\n\t\t\t\t\tear=Earcut.cureLocalIntersections(ear,triangles,dim);\n\t\t\t\t\tEarcut.earcutLinked(ear,triangles,dim,minX,minY,invSize,2);\n\t\t\t\t\t}else if (pass===2){\n\t\t\t\t\tEarcut.splitEarcut(ear,triangles,dim,minX,minY,invSize);\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}\n\n\tEarcut.isEar=function(ear){\n\t\tvar a=ear.prev,\n\t\tb=ear,\n\t\tc=ear.next;\n\t\tif (Earcut.area(a,b,c)>=0)return false;\n\t\tvar p=ear.next.next;\n\t\twhile (p!==ear.prev){\n\t\t\tif (Earcut.pointInTriangle(a.x,a.y,b.x,b.y,c.x,c.y,p.x,p.y)&&\n\t\t\t\tEarcut.area(p.prev,p,p.next)>=0)return false;\n\t\t\tp=p.next;\n\t\t}\n\t\treturn true;\n\t}\n\n\tEarcut.isEarHashed=function(ear,minX,minY,invSize){\n\t\tvar a=ear.prev,\n\t\tb=ear,\n\t\tc=ear.next;\n\t\tif (Earcut.area(a,b,c)>=0)return false;\n\t\tvar minTX=a.x < b.x ? (a.x < c.x ? a.x :c.x):(b.x < c.x ? b.x :c.x),\n\t\tminTY=a.y < b.y ? (a.y < c.y ? a.y :c.y):(b.y < c.y ? b.y :c.y),\n\t\tmaxTX=a.x > b.x ? (a.x > c.x ? a.x :c.x):(b.x > c.x ? b.x :c.x),\n\t\tmaxTY=a.y > b.y ? (a.y > c.y ? a.y :c.y):(b.y > c.y ? b.y :c.y);\n\t\tvar minZ=Earcut.zOrder(minTX,minTY,minX,minY,invSize),\n\t\tmaxZ=Earcut.zOrder(maxTX,maxTY,minX,minY,invSize);\n\t\tvar p=ear.nextZ;\n\t\twhile (p && p.z <=maxZ){\n\t\t\tif (p!==ear.prev && p!==ear.next &&\n\t\t\t\tEarcut.pointInTriangle(a.x,a.y,b.x,b.y,c.x,c.y,p.x,p.y)&&\n\t\t\tEarcut.area(p.prev,p,p.next)>=0)return false;\n\t\t\tp=p.nextZ;\n\t\t}\n\t\tp=ear.prevZ;\n\t\twhile (p && p.z >=minZ){\n\t\t\tif (p!==ear.prev && p!==ear.next &&\n\t\t\t\tEarcut.pointInTriangle(a.x,a.y,b.x,b.y,c.x,c.y,p.x,p.y)&&\n\t\t\tEarcut.area(p.prev,p,p.next)>=0)return false;\n\t\t\tp=p.prevZ;\n\t\t}\n\t\treturn true;\n\t}\n\n\tEarcut.cureLocalIntersections=function(start,triangles,dim){\n\t\tvar p=start;\n\t\tdo {\n\t\t\tvar a=p.prev,\n\t\t\tb=p.next.next;\n\t\t\tif (!Earcut.equals(a,b)&& Earcut.intersects(a,p,p.next,b)&& Earcut.locallyInside(a,b)&& Earcut.locallyInside(b,a)){\n\t\t\t\ttriangles.push(a.i / dim);\n\t\t\t\ttriangles.push(p.i / dim);\n\t\t\t\ttriangles.push(b.i / dim);\n\t\t\t\tEarcut.removeNode(p);\n\t\t\t\tEarcut.removeNode(p.next);\n\t\t\t\tp=start=b;\n\t\t\t}\n\t\t\tp=p.next;\n\t\t}while (p!==start);\n\t\treturn p;\n\t}\n\n\tEarcut.splitEarcut=function(start,triangles,dim,minX,minY,invSize){\n\t\tvar a=start;\n\t\tdo {\n\t\t\tvar b=a.next.next;\n\t\t\twhile (b!==a.prev){\n\t\t\t\tif (a.i!==b.i && Earcut.isValidDiagonal(a,b)){\n\t\t\t\t\tvar c=Earcut.splitPolygon(a,b);\n\t\t\t\t\ta=Earcut.filterPoints(a,a.next);\n\t\t\t\t\tc=Earcut.filterPoints(c,c.next);\n\t\t\t\t\tEarcut.earcutLinked(a,triangles,dim,minX,minY,invSize);\n\t\t\t\t\tEarcut.earcutLinked(c,triangles,dim,minX,minY,invSize);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tb=b.next;\n\t\t\t}\n\t\t\ta=a.next;\n\t\t}while (a!==start);\n\t}\n\n\tEarcut.eliminateHoles=function(data,holeIndices,outerNode,dim){\n\t\tvar queue=[],\n\t\ti,len,start,end,list;\n\t\tfor (i=0,len=holeIndices.length;i < len;i++){\n\t\t\tstart=holeIndices[i] *dim;\n\t\t\tend=i < len-1 ? holeIndices[i+1] *dim :data.length;\n\t\t\tlist=Earcut.linkedList(data,start,end,dim,false);\n\t\t\tif (list===list.next)list.steiner=true;\n\t\t\tqueue.push(Earcut.getLeftmost(list));\n\t\t}\n\t\tqueue.sort(Earcut.compareX);\n\t\tfor (i=0;i < queue.length;i++){\n\t\t\tEarcut.eliminateHole(queue[i],outerNode);\n\t\t\touterNode=Earcut.filterPoints(outerNode,outerNode.next);\n\t\t}\n\t\treturn outerNode;\n\t}\n\n\tEarcut.compareX=function(a,b){\n\t\treturn a.x-b.x;\n\t}\n\n\tEarcut.eliminateHole=function(hole,outerNode){\n\t\touterNode=Earcut.findHoleBridge(hole,outerNode);\n\t\tif (outerNode){\n\t\t\tvar b=Earcut.splitPolygon(outerNode,hole);\n\t\t\tEarcut.filterPoints(b,b.next);\n\t\t}\n\t}\n\n\tEarcut.findHoleBridge=function(hole,outerNode){\n\t\tvar p=outerNode,\n\t\thx=hole.x,\n\t\thy=hole.y,\n\t\tqx=-Infinity,\n\t\tm;\n\t\tdo {\n\t\t\tif (hy <=p.y && hy >=p.next.y && p.next.y!==p.y){\n\t\t\t\tvar x=p.x+(hy-p.y)*(p.next.x-p.x)/ (p.next.y-p.y);\n\t\t\t\tif (x <=hx && x > qx){\n\t\t\t\t\tqx=x;\n\t\t\t\t\tif (x===hx){\n\t\t\t\t\t\tif (hy===p.y)return p;\n\t\t\t\t\t\tif (hy===p.next.y)return p.next;\n\t\t\t\t\t}\n\t\t\t\t\tm=p.x < p.next.x ? p :p.next;\n\t\t\t\t}\n\t\t\t}\n\t\t\tp=p.next;\n\t\t}while (p!==outerNode);\n\t\tif (!m)return null;\n\t\tif (hx===qx)return m.prev;\n\t\tvar stop=m,\n\t\tmx=m.x,\n\t\tmy=m.y,\n\t\ttanMin=Infinity,\n\t\ttan;\n\t\tp=m.next;\n\t\twhile (p!==stop){\n\t\t\tif (hx >=p.x && p.x >=mx && hx!==p.x &&\n\t\t\t\tEarcut.pointInTriangle(hy < my ? hx :qx,hy,mx,my,hy < my ? qx :hx,hy,p.x,p.y)){\n\t\t\t\ttan=Math.abs(hy-p.y)/ (hx-p.x);\n\t\t\t\tif ((tan < tanMin || (tan===tanMin && p.x > m.x))&& Earcut.locallyInside(p,hole)){\n\t\t\t\t\tm=p;\n\t\t\t\t\ttanMin=tan;\n\t\t\t\t}\n\t\t\t}\n\t\t\tp=p.next;\n\t\t}\n\t\treturn m;\n\t}\n\n\tEarcut.indexCurve=function(start,minX,minY,invSize){\n\t\tvar p=start;\n\t\tdo {\n\t\t\tif (p.z===null)p.z=Earcut.zOrder(p.x,p.y,minX,minY,invSize);\n\t\t\tp.prevZ=p.prev;\n\t\t\tp.nextZ=p.next;\n\t\t\tp=p.next;\n\t\t}while (p!==start);\n\t\tp.prevZ.nextZ=null;\n\t\tp.prevZ=null;\n\t\tEarcut.sortLinked(p);\n\t}\n\n\tEarcut.sortLinked=function(list){\n\t\tvar i,p,q,e,tail,numMerges,pSize,qSize,\n\t\tinSize=1;\n\t\tdo {\n\t\t\tp=list;\n\t\t\tlist=null;\n\t\t\ttail=null;\n\t\t\tnumMerges=0;\n\t\t\twhile (p){\n\t\t\t\tnumMerges++;\n\t\t\t\tq=p;\n\t\t\t\tpSize=0;\n\t\t\t\tfor (i=0;i < inSize;i++){\n\t\t\t\t\tpSize++;\n\t\t\t\t\tq=q.nextZ;\n\t\t\t\t\tif (!q)break ;\n\t\t\t\t}\n\t\t\t\tqSize=inSize;\n\t\t\t\twhile (pSize > 0 || (qSize > 0 && q)){\n\t\t\t\t\tif (pSize!==0 && (qSize===0 || !q || p.z <=q.z)){\n\t\t\t\t\t\te=p;\n\t\t\t\t\t\tp=p.nextZ;\n\t\t\t\t\t\tpSize--;\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\te=q;\n\t\t\t\t\t\tq=q.nextZ;\n\t\t\t\t\t\tqSize--;\n\t\t\t\t\t}\n\t\t\t\t\tif (tail)tail.nextZ=e;\n\t\t\t\t\telse list=e;\n\t\t\t\t\te.prevZ=tail;\n\t\t\t\t\ttail=e;\n\t\t\t\t}\n\t\t\t\tp=q;\n\t\t\t}\n\t\t\ttail.nextZ=null;\n\t\t\tinSize *=2;\n\t\t}while (numMerges > 1);\n\t\treturn list;\n\t}\n\n\tEarcut.zOrder=function(x,y,minX,minY,invSize){\n\t\tx=32767 *(x-minX)*invSize;\n\t\ty=32767 *(y-minY)*invSize;\n\t\tx=(x | (x << 8))& 0x00FF00FF;\n\t\tx=(x | (x << 4))& 0x0F0F0F0F;\n\t\tx=(x | (x << 2))& 0x33333333;\n\t\tx=(x | (x << 1))& 0x55555555;\n\t\ty=(y | (y << 8))& 0x00FF00FF;\n\t\ty=(y | (y << 4))& 0x0F0F0F0F;\n\t\ty=(y | (y << 2))& 0x33333333;\n\t\ty=(y | (y << 1))& 0x55555555;\n\t\treturn x | (y << 1);\n\t}\n\n\tEarcut.getLeftmost=function(start){\n\t\tvar p=start,\n\t\tleftmost=start;\n\t\tdo {\n\t\t\tif (p.x < leftmost.x)leftmost=p;\n\t\t\tp=p.next;\n\t\t}while (p!==start);\n\t\treturn leftmost;\n\t}\n\n\tEarcut.pointInTriangle=function(ax,ay,bx,by,cx,cy,px,py){\n\t\treturn (cx-px)*(ay-py)-(ax-px)*(cy-py)>=0 &&\n\t\t(ax-px)*(by-py)-(bx-px)*(ay-py)>=0 &&\n\t\t(bx-px)*(cy-py)-(cx-px)*(by-py)>=0;\n\t}\n\n\tEarcut.isValidDiagonal=function(a,b){\n\t\treturn a.next.i!==b.i && a.prev.i!==b.i && !Earcut.intersectsPolygon(a,b)&&\n\t\tEarcut.locallyInside(a,b)&& Earcut.locallyInside(b,a)&& Earcut.middleInside(a,b);\n\t}\n\n\tEarcut.area=function(p,q,r){\n\t\treturn (q.y-p.y)*(r.x-q.x)-(q.x-p.x)*(r.y-q.y);\n\t}\n\n\tEarcut.equals=function(p1,p2){\n\t\treturn p1.x===p2.x && p1.y===p2.y;\n\t}\n\n\tEarcut.intersects=function(p1,q1,p2,q2){\n\t\tif ((Earcut.equals(p1,q1)&& Earcut.equals(p2,q2))||\n\t\t\t(Earcut.equals(p1,q2)&& Earcut.equals(p2,q1)))return true;\n\t\treturn Earcut.area(p1,q1,p2)> 0!==Earcut.area(p1,q1,q2)> 0 &&\n\t\tEarcut.area(p2,q2,p1)> 0!==Earcut.area(p2,q2,q1)> 0;\n\t}\n\n\tEarcut.intersectsPolygon=function(a,b){\n\t\tvar p=a;\n\t\tdo {\n\t\t\tif (p.i!==a.i && p.next.i!==a.i && p.i!==b.i && p.next.i!==b.i &&\n\t\t\t\tEarcut.intersects(p,p.next,a,b))return true;\n\t\t\tp=p.next;\n\t\t}while (p!==a);\n\t\treturn false;\n\t}\n\n\tEarcut.locallyInside=function(a,b){\n\t\treturn Earcut.area(a.prev,a,a.next)< 0 ?\n\t\tEarcut.area(a,b,a.next)>=0 && Earcut.area(a,a.prev,b)>=0 :\n\t\tEarcut.area(a,b,a.prev)< 0 || Earcut.area(a,a.next,b)< 0;\n\t}\n\n\tEarcut.middleInside=function(a,b){\n\t\tvar p=a,\n\t\tinside=false,\n\t\tpx=(a.x+b.x)/ 2,\n\t\tpy=(a.y+b.y)/ 2;\n\t\tdo {\n\t\t\tif (((p.y > py)!==(p.next.y > py))&& p.next.y!==p.y &&\n\t\t\t\t(px < (p.next.x-p.x)*(py-p.y)/ (p.next.y-p.y)+p.x))\n\t\t\tinside=!inside;\n\t\t\tp=p.next;\n\t\t}while (p!==a);\n\t\treturn inside;\n\t}\n\n\tEarcut.splitPolygon=function(a,b){\n\t\tvar a2=new EarcutNode(a.i,a.x,a.y),\n\t\tb2=new EarcutNode(b.i,b.x,b.y),\n\t\tan=a.next,\n\t\tbp=b.prev;\n\t\ta.next=b;\n\t\tb.prev=a;\n\t\ta2.next=an;\n\t\tan.prev=a2;\n\t\tb2.next=a2;\n\t\ta2.prev=b2;\n\t\tbp.next=b2;\n\t\tb2.prev=bp;\n\t\treturn b2;\n\t}\n\n\tEarcut.insertNode=function(i,x,y,last){\n\t\tvar p=new EarcutNode(i,x,y);\n\t\tif (!last){\n\t\t\tp.prev=p;\n\t\t\tp.next=p;\n\t\t\t}else {\n\t\t\tp.next=last.next;\n\t\t\tp.prev=last;\n\t\t\tlast.next.prev=p;\n\t\t\tlast.next=p;\n\t\t}\n\t\treturn p;\n\t}\n\n\tEarcut.removeNode=function(p){\n\t\tp.next.prev=p.prev;\n\t\tp.prev.next=p.next;\n\t\tif (p.prevZ)p.prevZ.nextZ=p.nextZ;\n\t\tif (p.nextZ)p.nextZ.prevZ=p.prevZ;\n\t}\n\n\tEarcut.signedArea=function(data,start,end,dim){\n\t\tvar sum=0;\n\t\tfor (var i=start,j=end-dim;i < end;i+=dim){\n\t\t\tsum+=(data[j]-data[i])*(data[i+1]+data[j+1]);\n\t\t\tj=i;\n\t\t}\n\t\treturn sum;\n\t}\n\n\treturn Earcut;\n})()\n\n\n//class laya.webgl.shapes.EarcutNode\nvar EarcutNode=(function(){\n\tfunction EarcutNode(i,x,y){\n\t\tthis.i=null;\n\t\tthis.x=null;\n\t\tthis.y=null;\n\t\tthis.prev=null;\n\t\tthis.next=null;\n\t\tthis.z=null;\n\t\tthis.prevZ=null;\n\t\tthis.nextZ=null;\n\t\tthis.steiner=null;\n\t\tthis.i=i;\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.prev=null;\n\t\tthis.next=null;\n\t\tthis.z=null;\n\t\tthis.prevZ=null;\n\t\tthis.nextZ=null;\n\t\tthis.steiner=false;\n\t}\n\n\t__class(EarcutNode,'laya.webgl.shapes.EarcutNode');\n\treturn EarcutNode;\n})()\n\n\n//class laya.webgl.shapes.GeometryData\nvar GeometryData=(function(){\n\tfunction GeometryData(lineWidth,lineColor,lineAlpha,fillColor,fillAlpha,fill,shape){\n\t\t//this.lineWidth=NaN;\n\t\t//this.lineColor=NaN;\n\t\t//this.lineAlpha=NaN;\n\t\t//this.fillColor=NaN;\n\t\t//this.fillAlpha=NaN;\n\t\t//this.shape=null;\n\t\t//this.fill=false;\n\t\tthis.lineWidth=lineWidth;\n\t\tthis.lineColor=lineColor;\n\t\tthis.lineAlpha=lineAlpha;\n\t\tthis.fillColor=fillColor;\n\t\tthis.fillAlpha=fillAlpha;\n\t\tthis.shape=shape;\n\t\tthis.fill=fill;\n\t}\n\n\t__class(GeometryData,'laya.webgl.shapes.GeometryData');\n\tvar __proto=GeometryData.prototype;\n\t__proto.clone=function(){\n\t\treturn new GeometryData(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.shape);\n\t}\n\n\t__proto.getIndexData=function(){\n\t\treturn null;\n\t}\n\n\t__proto.getVertexData=function(){\n\t\treturn null;\n\t}\n\n\t__proto.destroy=function(){\n\t\tthis.shape=null;\n\t}\n\n\treturn GeometryData;\n})()\n\n\n//class laya.webgl.shapes.Vertex\nvar Vertex=(function(){\n\tfunction Vertex(p){\n\t\t//this.points=null;\n\t\tif((p instanceof Float32Array))\n\t\t\tthis.points=p;\n\t\telse if((p instanceof Array)){\n\t\t\tvar len=p.length;\n\t\t\tthis.points=new Float32Array(p);\n\t\t}\n\t}\n\n\t__class(Vertex,'laya.webgl.shapes.Vertex');\n\tvar __proto=Vertex.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.shapes.IShape\":true})\n\t__proto.getData=function(ib,vb,start){}\n\t__proto.needUpdate=function(mat){\n\t\treturn false;\n\t}\n\n\t__proto.rebuild=function(points){}\n\t// TODO Auto Generated method stub\n\t__proto.setMatrix=function(mat){}\n\treturn Vertex;\n})()\n\n\n//class laya.webgl.submit.Submit\nvar Submit=(function(){\n\tfunction Submit(renderType){\n\t\t//this._selfVb=null;\n\t\t//this._ib=null;\n\t\t//this._blendFn=null;\n\t\t//this._renderType=0;\n\t\t//this._vb=null;\n\t\t// 从VB中什么地方开始画，画到哪\n\t\t//this._startIdx=0;\n\t\t//this._numEle=0;\n\t\t//this.shaderValue=null;\n\t\t(renderType===void 0)&& (renderType=10000);\n\t\tthis._renderType=renderType;\n\t}\n\n\t__class(Submit,'laya.webgl.submit.Submit');\n\tvar __proto=Submit.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.submit.ISubmit\":true})\n\t__proto.releaseRender=function(){\n\t\tvar cache=Submit._cache;\n\t\tcache[cache._length++]=this;\n\t\tthis.shaderValue.release();\n\t\tthis._vb=null;\n\t}\n\n\t__proto.getRenderType=function(){\n\t\treturn this._renderType;\n\t}\n\n\t__proto.renderSubmit=function(){\n\t\tif (this._numEle===0)return 1;\n\t\tvar _tex=this.shaderValue.textureHost;\n\t\tif (_tex){\n\t\t\tvar source=_tex.source;\n\t\t\tif (!_tex.bitmap || !source)\n\t\t\t\treturn 1;\n\t\t\tthis.shaderValue.texture=source;\n\t\t}\n\t\tthis._vb.bind_upload(this._ib);\n\t\tvar gl=WebGL.mainContext;\n\t\tthis.shaderValue.upload();\n\t\tif (BlendMode.activeBlendFunction!==this._blendFn){\n\t\t\tgl.enable(/*laya.webgl.WebGLContext.BLEND*/0x0BE2);\n\t\t\tthis._blendFn(gl);\n\t\t\tBlendMode.activeBlendFunction=this._blendFn;\n\t\t}\n\t\tStat.drawCall++;\n\t\tStat.trianglesFaces+=this._numEle / 3;\n\t\tgl.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._numEle,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._startIdx);\n\t\treturn 1;\n\t}\n\n\tSubmit.__init__=function(){\n\t\tvar s=Submit.RENDERBASE=new Submit(-1);\n\t\ts.shaderValue=new Value2D(0,0);\n\t\ts.shaderValue.ALPHA=-1234;\n\t}\n\n\tSubmit.createSubmit=function(context,ib,vb,pos,sv){\n\t\tvar o=Submit._cache._length ? Submit._cache[--Submit._cache._length] :new Submit();\n\t\tif (vb==null){\n\t\t\tvb=o._selfVb || (o._selfVb=VertexBuffer2D.create(-1));\n\t\t\tvb.clear();\n\t\t\tpos=0;\n\t\t}\n\t\to._ib=ib;\n\t\to._vb=vb;\n\t\to._startIdx=pos *CONST3D2D.BYTES_PIDX;\n\t\to._numEle=0;\n\t\tvar blendType=context._nBlendType;\n\t\to._blendFn=context._targets ? BlendMode.targetFns[blendType] :BlendMode.fns[blendType];\n\t\to.shaderValue=sv;\n\t\to.shaderValue.setValue(context._shader2D);\n\t\tvar filters=context._shader2D.filters;\n\t\tfilters && o.shaderValue.setFilters(filters);\n\t\treturn o;\n\t}\n\n\tSubmit.createShape=function(ctx,ib,vb,numEle,offset,sv){\n\t\tvar o=(!Submit._cache._length)? (new Submit()):Submit._cache[--Submit._cache._length];\n\t\to._ib=ib;\n\t\to._vb=vb;\n\t\to._numEle=numEle;\n\t\to._startIdx=offset;\n\t\to.shaderValue=sv;\n\t\to.shaderValue.setValue(ctx._shader2D);\n\t\tvar blendType=ctx._nBlendType;\n\t\to._blendFn=ctx._targets ? BlendMode.targetFns[blendType] :BlendMode.fns[blendType];\n\t\treturn o;\n\t}\n\n\tSubmit.TYPE_2D=10000;\n\tSubmit.TYPE_CANVAS=10003;\n\tSubmit.TYPE_CMDSETRT=10004;\n\tSubmit.TYPE_CUSTOM=10005;\n\tSubmit.TYPE_BLURRT=10006;\n\tSubmit.TYPE_CMDDESTORYPRERT=10007;\n\tSubmit.TYPE_DISABLESTENCIL=10008;\n\tSubmit.TYPE_OTHERIBVB=10009;\n\tSubmit.TYPE_PRIMITIVE=10010;\n\tSubmit.TYPE_RT=10011;\n\tSubmit.TYPE_BLUR_RT=10012;\n\tSubmit.TYPE_TARGET=10013;\n\tSubmit.TYPE_CHANGE_VALUE=10014;\n\tSubmit.TYPE_SHAPE=10015;\n\tSubmit.TYPE_TEXTURE=10016;\n\tSubmit.TYPE_FILLTEXTURE=10017;\n\tSubmit.RENDERBASE=null;\n\tSubmit._cache=(Submit._cache=[],Submit._cache._length=0,Submit._cache);\n\treturn Submit;\n})()\n\n\n//class laya.webgl.submit.SubmitCMD\nvar SubmitCMD=(function(){\n\tfunction SubmitCMD(){\n\t\tthis.fun=null;\n\t\tthis.args=null;\n\t}\n\n\t__class(SubmitCMD,'laya.webgl.submit.SubmitCMD');\n\tvar __proto=SubmitCMD.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.submit.ISubmit\":true})\n\t__proto.renderSubmit=function(){\n\t\tthis.fun.apply(null,this.args);\n\t\treturn 1;\n\t}\n\n\t__proto.getRenderType=function(){\n\t\treturn 0;\n\t}\n\n\t__proto.releaseRender=function(){\n\t\tvar cache=SubmitCMD._cache;\n\t\tcache[cache._length++]=this;\n\t}\n\n\tSubmitCMD.create=function(args,fun){\n\t\tvar o=SubmitCMD._cache._length?SubmitCMD._cache[--SubmitCMD._cache._length]:new SubmitCMD();\n\t\to.fun=fun;\n\t\to.args=args;\n\t\treturn o;\n\t}\n\n\tSubmitCMD._cache=(SubmitCMD._cache=[],SubmitCMD._cache._length=0,SubmitCMD._cache);\n\treturn SubmitCMD;\n})()\n\n\n//class laya.webgl.submit.SubmitCMDScope\nvar SubmitCMDScope=(function(){\n\tfunction SubmitCMDScope(){\n\t\tthis.variables={};\n\t}\n\n\t__class(SubmitCMDScope,'laya.webgl.submit.SubmitCMDScope');\n\tvar __proto=SubmitCMDScope.prototype;\n\t__proto.getValue=function(name){\n\t\treturn this.variables[name];\n\t}\n\n\t__proto.addValue=function(name,value){\n\t\treturn this.variables[name]=value;\n\t}\n\n\t__proto.setValue=function(name,value){\n\t\tif(this.variables.hasOwnProperty(name)){\n\t\t\treturn this.variables[name]=value;\n\t\t}\n\t\treturn null;\n\t}\n\n\t__proto.clear=function(){\n\t\tfor(var key in this.variables){\n\t\t\tdelete this.variables[key];\n\t\t}\n\t}\n\n\t__proto.recycle=function(){\n\t\tthis.clear();\n\t\tSubmitCMDScope.POOL.push(this);\n\t}\n\n\tSubmitCMDScope.create=function(){\n\t\tvar scope=SubmitCMDScope.POOL.pop();\n\t\tscope||(scope=new SubmitCMDScope());\n\t\treturn scope;\n\t}\n\n\tSubmitCMDScope.POOL=[];\n\treturn SubmitCMDScope;\n})()\n\n\n//class laya.webgl.submit.SubmitOtherIBVB\nvar SubmitOtherIBVB=(function(){\n\tfunction SubmitOtherIBVB(){\n\t\tthis.offset=0;\n\t\t//this._vb=null;\n\t\t//this._ib=null;\n\t\t//this._blendFn=null;\n\t\t//this._mat=null;\n\t\t//this._shader=null;\n\t\t//this._shaderValue=null;\n\t\t//this._numEle=0;\n\t\tthis.startIndex=0;\n\t\t;\n\t\tthis._mat=Matrix.create();\n\t}\n\n\t__class(SubmitOtherIBVB,'laya.webgl.submit.SubmitOtherIBVB');\n\tvar __proto=SubmitOtherIBVB.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.submit.ISubmit\":true})\n\t__proto.releaseRender=function(){\n\t\tvar cache=SubmitOtherIBVB._cache;\n\t\tcache[cache._length++]=this;\n\t}\n\n\t__proto.getRenderType=function(){\n\t\treturn /*laya.webgl.submit.Submit.TYPE_OTHERIBVB*/10009;\n\t}\n\n\t__proto.renderSubmit=function(){\n\t\tvar _tex=this._shaderValue.textureHost;\n\t\tif (_tex){\n\t\t\tvar source=_tex.source;\n\t\t\tif (!_tex.bitmap || !source)\n\t\t\t\treturn 1;\n\t\t\tthis._shaderValue.texture=source;\n\t\t}\n\t\tthis._vb.bind_upload(this._ib);\n\t\tvar w=RenderState2D.worldMatrix4;\n\t\tvar wmat=Matrix.TEMP;\n\t\tMatrix.mulPre(this._mat,w[0],w[1],w[4],w[5],w[12],w[13],wmat);\n\t\tvar tmp=RenderState2D.worldMatrix4=SubmitOtherIBVB.tempMatrix4;\n\t\ttmp[0]=wmat.a;\n\t\ttmp[1]=wmat.b;\n\t\ttmp[4]=wmat.c;\n\t\ttmp[5]=wmat.d;\n\t\ttmp[12]=wmat.tx;\n\t\ttmp[13]=wmat.ty;\n\t\tthis._shader._offset=this.offset;\n\t\tthis._shaderValue.refresh();\n\t\tthis._shader.upload(this._shaderValue);\n\t\tthis._shader._offset=0;\n\t\tvar gl=WebGL.mainContext;\n\t\tif (BlendMode.activeBlendFunction!==this._blendFn){\n\t\t\tgl.enable(/*laya.webgl.WebGLContext.BLEND*/0x0BE2);\n\t\t\tthis._blendFn(gl);\n\t\t\tBlendMode.activeBlendFunction=this._blendFn;\n\t\t}\n\t\tStat.drawCall++;\n\t\tStat.trianglesFaces+=this._numEle / 3;\n\t\tgl.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._numEle,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this.startIndex);\n\t\tRenderState2D.worldMatrix4=w;\n\t\tBaseShader.activeShader=null;\n\t\treturn 1;\n\t}\n\n\tSubmitOtherIBVB.create=function(context,vb,ib,numElement,shader,shaderValue,startIndex,offset,type){\n\t\t(type===void 0)&& (type=0);\n\t\tvar o=(!SubmitOtherIBVB._cache._length)? (new SubmitOtherIBVB()):SubmitOtherIBVB._cache[--SubmitOtherIBVB._cache._length];\n\t\to._ib=ib;\n\t\to._vb=vb;\n\t\to._numEle=numElement;\n\t\to._shader=shader;\n\t\to._shaderValue=shaderValue;\n\t\tvar blendType=context._nBlendType;\n\t\to._blendFn=context._targets ? BlendMode.targetFns[blendType] :BlendMode.fns[blendType];\n\t\tswitch(type){\n\t\t\tcase 0:\n\t\t\t\to.offset=0;\n\t\t\t\to.startIndex=offset / (CONST3D2D.BYTES_PE *vb.vertexStride)*1.5;\n\t\t\t\to.startIndex *=CONST3D2D.BYTES_PIDX;\n\t\t\t\tbreak ;\n\t\t\tcase 1:\n\t\t\t\to.startIndex=startIndex;\n\t\t\t\to.offset=offset;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\treturn o;\n\t}\n\n\tSubmitOtherIBVB._cache=(SubmitOtherIBVB._cache=[],SubmitOtherIBVB._cache._length=0,SubmitOtherIBVB._cache);\n\tSubmitOtherIBVB.tempMatrix4=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,];\n\treturn SubmitOtherIBVB;\n})()\n\n\n//class laya.webgl.submit.SubmitScissor\nvar SubmitScissor=(function(){\n\tfunction SubmitScissor(){\n\t\tthis.submitIndex=0;\n\t\tthis.submitLength=0;\n\t\tthis.context=null;\n\t\tthis.clipRect=new Rectangle();\n\t\tthis.screenRect=new Rectangle();\n\t}\n\n\t__class(SubmitScissor,'laya.webgl.submit.SubmitScissor');\n\tvar __proto=SubmitScissor.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.submit.ISubmit\":true})\n\t__proto._scissor=function(x,y,w,h){\n\t\tvar m=RenderState2D.worldMatrix4;\n\t\tvar a=m[0],d=m[5],tx=m[12],ty=m[13];\n\t\tx=x *a+tx;\n\t\ty=y *d+ty;\n\t\tw *=a;\n\t\th *=d;\n\t\tif (w < 1 || h < 1){\n\t\t\treturn false;\n\t\t};\n\t\tvar r=x+w;\n\t\tvar b=y+h;\n\t\tx < 0 && (x=0,w=r-x);\n\t\ty < 0 && (y=0,h=b-y);\n\t\tvar screen=RenderState2D.worldClipRect;\n\t\tx=Math.max(x,screen.x);\n\t\ty=Math.max(y,screen.y);\n\t\tw=Math.min(r,screen.right)-x;\n\t\th=Math.min(b,screen.bottom)-y;\n\t\tif (w < 1 || h < 1){\n\t\t\treturn false;\n\t\t};\n\t\tvar worldScissorTest=RenderState2D.worldScissorTest;\n\t\tthis.screenRect.copyFrom(screen);\n\t\tscreen.x=x;\n\t\tscreen.y=y;\n\t\tscreen.width=w;\n\t\tscreen.height=h;\n\t\tRenderState2D.worldScissorTest=true;\n\t\ty=RenderState2D.height-y-h;\n\t\tWebGL.mainContext.scissor(x,y,w,h);\n\t\tWebGL.mainContext.enable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\tthis.context.submitElement(this.submitIndex,this.submitIndex+this.submitLength);\n\t\tif (worldScissorTest){\n\t\t\ty=RenderState2D.height-this.screenRect.y-this.screenRect.height;\n\t\t\tWebGL.mainContext.scissor(this.screenRect.x,y,this.screenRect.width,this.screenRect.height);\n\t\t\tWebGL.mainContext.enable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t}\n\t\telse{\n\t\t\tWebGL.mainContext.disable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t\tRenderState2D.worldScissorTest=false;\n\t\t}\n\t\tscreen.copyFrom(this.screenRect);\n\t\treturn true;\n\t}\n\n\t__proto._scissorWithTagart=function(x,y,w,h){\n\t\tif (w < 1 || h < 1){\n\t\t\treturn false;\n\t\t};\n\t\tvar r=x+w;\n\t\tvar b=y+h;\n\t\tx < 0 && (x=0,w=r-x);\n\t\ty < 0 && (y=0,h=b-y);\n\t\tvar screen=RenderState2D.worldClipRect;\n\t\tx=Math.max(x,screen.x);\n\t\ty=Math.max(y,screen.y);\n\t\tw=Math.min(r,screen.right)-x;\n\t\th=Math.min(b,screen.bottom)-y;\n\t\tif (w < 1 || h < 1){\n\t\t\treturn false;\n\t\t};\n\t\tvar worldScissorTest=RenderState2D.worldScissorTest;\n\t\tthis.screenRect.copyFrom(screen);\n\t\tRenderState2D.worldScissorTest=true;\n\t\tscreen.x=x;\n\t\tscreen.y=y;\n\t\tscreen.width=w;\n\t\tscreen.height=h;\n\t\ty=RenderState2D.height-y-h;\n\t\tWebGL.mainContext.scissor(x,y,w,h);\n\t\tWebGL.mainContext.enable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\tthis.context.submitElement(this.submitIndex,this.submitIndex+this.submitLength);\n\t\tif (worldScissorTest){\n\t\t\ty=RenderState2D.height-this.screenRect.y-this.screenRect.height;\n\t\t\tWebGL.mainContext.scissor(this.screenRect.x,y,this.screenRect.width,this.screenRect.height);\n\t\t\tWebGL.mainContext.enable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t}\n\t\telse{\n\t\t\tWebGL.mainContext.disable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t\tRenderState2D.worldScissorTest=false;\n\t\t}\n\t\tscreen.copyFrom(this.screenRect);\n\t\treturn true;\n\t}\n\n\t__proto.renderSubmit=function(){\n\t\tthis.submitLength=Math.min(this.context._submits._length-1,this.submitLength);\n\t\tif (this.submitLength < 1 || this.clipRect.width < 1 || this.clipRect.height < 1)\n\t\t\treturn this.submitLength+1;\n\t\tif (this.context._targets)\n\t\t\tthis._scissorWithTagart(this.clipRect.x,this.clipRect.y,this.clipRect.width,this.clipRect.height);\n\t\telse this._scissor(this.clipRect.x,this.clipRect.y,this.clipRect.width,this.clipRect.height);\n\t\treturn this.submitLength+1;\n\t}\n\n\t__proto.getRenderType=function(){\n\t\treturn 0;\n\t}\n\n\t__proto.releaseRender=function(){\n\t\tvar cache=SubmitScissor._cache;\n\t\tcache[cache._length++]=this;\n\t\tthis.context=null;\n\t}\n\n\tSubmitScissor.create=function(context){\n\t\tvar o=SubmitScissor._cache._length?SubmitScissor._cache[--SubmitScissor._cache._length]:new SubmitScissor();\n\t\to.context=context;\n\t\treturn o;\n\t}\n\n\tSubmitScissor._cache=(SubmitScissor._cache=[],SubmitScissor._cache._length=0,SubmitScissor._cache);\n\treturn SubmitScissor;\n})()\n\n\n//class laya.webgl.submit.SubmitStencil\nvar SubmitStencil=(function(){\n\tfunction SubmitStencil(){\n\t\tthis.step=0;\n\t\tthis.blendMode=null;\n\t\tthis.level=0;\n\t}\n\n\t__class(SubmitStencil,'laya.webgl.submit.SubmitStencil');\n\tvar __proto=SubmitStencil.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.submit.ISubmit\":true})\n\t__proto.renderSubmit=function(){\n\t\tswitch(this.step){\n\t\t\tcase 1:\n\t\t\t\tthis.do1();\n\t\t\t\tbreak ;\n\t\t\tcase 2:\n\t\t\t\tthis.do2();\n\t\t\t\tbreak ;\n\t\t\tcase 3:\n\t\t\t\tthis.do3();\n\t\t\t\tbreak ;\n\t\t\tcase 4:\n\t\t\t\tthis.do4();\n\t\t\t\tbreak ;\n\t\t\tcase 5:\n\t\t\t\tthis.do5();\n\t\t\t\tbreak ;\n\t\t\tcase 6:\n\t\t\t\tthis.do6();\n\t\t\t\tbreak ;\n\t\t\tcase 7:\n\t\t\t\tthis.do7();\n\t\t\t\tbreak ;\n\t\t\tcase 8:\n\t\t\t\tthis.do8();\n\t\t\t\tbreak ;\n\t\t\t}\n\t\treturn 1;\n\t}\n\n\t__proto.getRenderType=function(){\n\t\treturn 0;\n\t}\n\n\t__proto.releaseRender=function(){\n\t\tvar cache=SubmitStencil._cache;\n\t\tcache[cache._length++]=this;\n\t}\n\n\t__proto.do1=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.enable(/*laya.webgl.WebGLContext.STENCIL_TEST*/0x0B90);\n\t\tgl.clear(/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400);\n\t\tgl.colorMask(false,false,false,false);\n\t\tgl.stencilFunc(/*laya.webgl.WebGLContext.EQUAL*/0x0202,this.level,0xFF);\n\t\tgl.stencilOp(/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.INCR*/0x1E02);\n\t}\n\n\t//gl.stencilOp(WebGLContext.KEEP,WebGLContext.KEEP,WebGLContext.INVERT);//测试通过给模版缓冲 写入值 一开始是0 现在是 0xFF (模版缓冲中不知道是多少位的数据)\n\t__proto.do2=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.stencilFunc(/*laya.webgl.WebGLContext.EQUAL*/0x0202,this.level+1,0xFF);\n\t\tgl.colorMask(true,true,true,true);\n\t\tgl.stencilOp(/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00);\n\t}\n\n\t__proto.do3=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.colorMask(true,true,true,true);\n\t\tgl.stencilOp(/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00);\n\t\tgl.clear(/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400);\n\t\tgl.disable(/*laya.webgl.WebGLContext.STENCIL_TEST*/0x0B90);\n\t}\n\n\t__proto.do4=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tif (this.level==0){\n\t\t\tgl.enable(/*laya.webgl.WebGLContext.STENCIL_TEST*/0x0B90);\n\t\t\tgl.clear(/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400);\n\t\t}\n\t\tgl.colorMask(false,false,false,false);\n\t\tgl.stencilFunc(/*laya.webgl.WebGLContext.ALWAYS*/0x0207,0,0xFF);\n\t\tgl.stencilOp(/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.INCR*/0x1E02);\n\t}\n\n\t__proto.do5=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.stencilFunc(/*laya.webgl.WebGLContext.EQUAL*/0x0202,this.level,0xFF);\n\t\tgl.colorMask(true,true,true,true);\n\t\tgl.stencilOp(/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00);\n\t}\n\n\t__proto.do6=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tBlendMode.targetFns[BlendMode.TOINT[this.blendMode]](gl);\n\t}\n\n\t__proto.do7=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.colorMask(false,false,false,false);\n\t\tgl.stencilOp(/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.DECR*/0x1E03);\n\t}\n\n\t__proto.do8=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.colorMask(true,true,true,true);\n\t\tgl.stencilFunc(/*laya.webgl.WebGLContext.EQUAL*/0x0202,this.level,0xFF);\n\t\tgl.stencilOp(/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00,/*laya.webgl.WebGLContext.KEEP*/0x1E00);\n\t}\n\n\tSubmitStencil.restore=function(context,clip,m,_x,_y){\n\t\tvar submitStencil;\n\t\tcontext._renderKey=0;\n\t\tif (SubmitStencil._mask > 0){\n\t\t\tSubmitStencil._mask--;\n\t\t}\n\t\tif (SubmitStencil._mask==0){\n\t\t\tsubmitStencil=laya.webgl.submit.SubmitStencil.create(3);\n\t\t\tcontext.addRenderObject(submitStencil);\n\t\t\tcontext._curSubmit=Submit.RENDERBASE;\n\t\t}\n\t\telse{\n\t\t\tsubmitStencil=laya.webgl.submit.SubmitStencil.create(7);\n\t\t\tcontext.addRenderObject(submitStencil);\n\t\t\tvar vb=context._vb;\n\t\t\tvar nPos=(vb._byteLength >> 2);\n\t\t\tif (GlUtils.fillRectImgVb(vb,null,clip.x,clip.y,clip.width,clip.height,Texture.DEF_UV,m,_x,_y,0,0)){\n\t\t\t\tvar shader=context._shader2D;\n\t\t\t\tshader.glTexture=null;\n\t\t\t\tvar submit=context._curSubmit=Submit.createSubmit(context,context._ib,vb,((vb._byteLength-/*laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16 */*laya.webgl.utils.Buffer2D.FLOAT32*/4)/ 32)*3,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02,0));\n\t\t\t\tsubmit.shaderValue.ALPHA=1.0;\n\t\t\t\tcontext._submits[context._submits._length++]=submit;\n\t\t\t\tcontext._curSubmit._numEle+=6;\n\t\t\t\tcontext._curSubmit=Submit.RENDERBASE;\n\t\t\t\t}else {\n\t\t\t\talert(\"clipRect calc stencil rect error\");\n\t\t\t}\n\t\t\tsubmitStencil=laya.webgl.submit.SubmitStencil.create(8);\n\t\t\tcontext.addRenderObject(submitStencil);\n\t\t}\n\t}\n\n\tSubmitStencil.restore2=function(context,submit){\n\t\tvar submitStencil;\n\t\tcontext._renderKey=0;\n\t\tif (SubmitStencil._mask > 0){\n\t\t\tSubmitStencil._mask--;\n\t\t}\n\t\tif (SubmitStencil._mask==0){\n\t\t\tsubmitStencil=laya.webgl.submit.SubmitStencil.create(3);\n\t\t\tcontext.addRenderObject(submitStencil);\n\t\t\tcontext._curSubmit=Submit.RENDERBASE;\n\t\t}\n\t\telse{\n\t\t\tsubmitStencil=laya.webgl.submit.SubmitStencil.create(7);\n\t\t\tcontext.addRenderObject(submitStencil);\n\t\t\tcontext._submits[context._submits._length++]=submit;\n\t\t\tsubmitStencil=laya.webgl.submit.SubmitStencil.create(8);\n\t\t\tcontext.addRenderObject(submitStencil);\n\t\t}\n\t}\n\n\tSubmitStencil.create=function(step){\n\t\tvar o=SubmitStencil._cache._length?SubmitStencil._cache[--SubmitStencil._cache._length]:new SubmitStencil();\n\t\to.step=step;\n\t\tif (step==5)\n\t\t\t++SubmitStencil._mask;\n\t\to.level=SubmitStencil._mask;\n\t\treturn o;\n\t}\n\n\tSubmitStencil._cache=(SubmitStencil._cache=[],SubmitStencil._cache._length=0,SubmitStencil._cache);\n\tSubmitStencil._mask=0;\n\treturn SubmitStencil;\n})()\n\n\n//class laya.webgl.submit.SubmitTarget\nvar SubmitTarget=(function(){\n\tfunction SubmitTarget(){\n\t\tthis._renderType=0;\n\t\tthis._vb=null;\n\t\tthis._ib=null;\n\t\tthis._startIdx=0;\n\t\tthis._numEle=0;\n\t\tthis.shaderValue=null;\n\t\tthis.blendType=0;\n\t\tthis.proName=null;\n\t\tthis.scope=null;\n\t}\n\n\t__class(SubmitTarget,'laya.webgl.submit.SubmitTarget');\n\tvar __proto=SubmitTarget.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.submit.ISubmit\":true})\n\t__proto.renderSubmit=function(){\n\t\tthis._vb.bind_upload(this._ib);\n\t\tvar target=this.scope.getValue(this.proName);\n\t\tif (target){\n\t\t\tthis.shaderValue.texture=target.source;\n\t\t\tif (this.shaderValue[\"strength\"] && !this.shaderValue[\"blurInfo\"]){\n\t\t\t\tthis.shaderValue[\"blurInfo\"]=[target.width,target.height];\n\t\t\t}\n\t\t\tthis.shaderValue.upload();\n\t\t\tthis.blend();\n\t\t\tStat.drawCall++;\n\t\t\tStat.trianglesFaces+=this._numEle/3;\n\t\t\tWebGL.mainContext.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._numEle,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._startIdx);\n\t\t}\n\t\treturn 1;\n\t}\n\n\t__proto.blend=function(){\n\t\tif (BlendMode.activeBlendFunction!==BlendMode.fns[this.blendType]){\n\t\t\tvar gl=WebGL.mainContext;\n\t\t\tgl.enable(/*laya.webgl.WebGLContext.BLEND*/0x0BE2);\n\t\t\tBlendMode.fns[this.blendType](gl);\n\t\t\tBlendMode.activeBlendFunction=BlendMode.fns[this.blendType];\n\t\t}\n\t}\n\n\t__proto.getRenderType=function(){\n\t\treturn 0;\n\t}\n\n\t__proto.releaseRender=function(){\n\t\tvar cache=SubmitTarget._cache;\n\t\tcache[cache._length++]=this;\n\t}\n\n\tSubmitTarget.create=function(context,ib,vb,pos,sv,proName){\n\t\tvar o=SubmitTarget._cache._length?SubmitTarget._cache[--SubmitTarget._cache._length]:new SubmitTarget();\n\t\to._ib=ib;\n\t\to._vb=vb;\n\t\to.proName=proName;\n\t\to._startIdx=pos *CONST3D2D.BYTES_PIDX;\n\t\to._numEle=0;\n\t\to.blendType=context._nBlendType;\n\t\to.shaderValue=sv;\n\t\to.shaderValue.setValue(context._shader2D);\n\t\treturn o;\n\t}\n\n\tSubmitTarget._cache=(SubmitTarget._cache=[],SubmitTarget._cache._length=0,SubmitTarget._cache);\n\treturn SubmitTarget;\n})()\n\n\n/**\n*...特殊的字符，如泰文，必须重新实现这个类\n*/\n//class laya.webgl.text.CharSegment\nvar CharSegment=(function(){\n\tfunction CharSegment(){\n\t\tthis._sourceStr=null;\n\t}\n\n\t__class(CharSegment,'laya.webgl.text.CharSegment');\n\tvar __proto=CharSegment.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.text.ICharSegment\":true})\n\t__proto.textToSpit=function(str){\n\t\tthis._sourceStr=str;\n\t}\n\n\t__proto.getChar=function(i){\n\t\treturn this._sourceStr.charAt(i);\n\t}\n\n\t__proto.getCharCode=function(i){\n\t\treturn this._sourceStr.charCodeAt(i);\n\t}\n\n\t__proto.length=function(){\n\t\treturn this._sourceStr.length;\n\t}\n\n\treturn CharSegment;\n})()\n\n\n//class laya.webgl.text.DrawText\nvar DrawText=(function(){\n\tvar CharValue;\n\tfunction DrawText(){}\n\t__class(DrawText,'laya.webgl.text.DrawText');\n\tDrawText.__init__=function(){\n\t\tDrawText._charsTemp=new Array;\n\t\tDrawText._drawValue=new CharValue();\n\t\tDrawText._charSeg=new CharSegment();\n\t}\n\n\tDrawText.customCharSeg=function(charseg){\n\t\tDrawText._charSeg=charseg;\n\t}\n\n\tDrawText.getChar=function(char,id,drawValue){\n\t\tvar result=WebGLCharImage.createOneChar(char,drawValue);\n\t\tif(id!=-1)\n\t\t\tDrawText._charsCache[id]=result;\n\t\treturn result;\n\t}\n\n\tDrawText._drawSlow=function(save,ctx,txt,words,curMat,font,textAlign,fillColor,borderColor,lineWidth,x,y,sx,sy,underLine){\n\t\tvar drawValue=DrawText._drawValue.value(font,fillColor,borderColor,lineWidth,sx,sy,underLine);\n\t\tvar i=0,n=0;\n\t\tvar chars=DrawText._charsTemp;\n\t\tvar width=0,oneChar,htmlWord,id=NaN;\n\t\tif (words){\n\t\t\tchars.length=words.length;\n\t\t\tfor (i=0,n=words.length;i < n;i++){\n\t\t\t\thtmlWord=words[i];\n\t\t\t\tid=htmlWord.charNum+drawValue.txtID;\n\t\t\t\tchars[i]=oneChar=DrawText._charsCache[id] || DrawText.getChar(htmlWord.char,id,drawValue);\n\t\t\t\toneChar.active();\n\t\t\t}\n\t\t\t}else {\n\t\t\tvar text=((txt instanceof laya.utils.WordText ))? txt.toString():txt;\n\t\t\tif (Text.CharacterCache){\n\t\t\t\tDrawText._charSeg.textToSpit(text);\n\t\t\t\tvar len=/*if err,please use iflash.method.xmlLength()*/DrawText._charSeg.length();\n\t\t\t\tchars.length=len;\n\t\t\t\tfor (i=0,n=len;i < n;i++){\n\t\t\t\t\tid=DrawText._charSeg.getCharCode(i)+drawValue.txtID;\n\t\t\t\t\tchars[i]=oneChar=DrawText._charsCache[id] || DrawText.getChar(DrawText._charSeg.getChar(i),id,drawValue);\n\t\t\t\t\toneChar.active();\n\t\t\t\t\twidth+=oneChar.cw;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchars.length=0;\n\t\t\t\toneChar=DrawText.getChar(text,-1,drawValue);\n\t\t\t\toneChar.active();\n\t\t\t\twidth+=oneChar.cw;\n\t\t\t\tchars[0]=oneChar;\n\t\t\t}\n\t\t};\n\t\tvar dx=0;\n\t\tif (textAlign!==null && textAlign!==\"left\")\n\t\t\tdx=-(textAlign==\"center\" ? (width / 2):width);\n\t\tvar uv,bdSz=NaN,texture,value,saveLength=0;\n\t\tif (words){\n\t\t\tfor (i=0,n=chars.length;i < n;i++){\n\t\t\t\toneChar=chars[i];\n\t\t\t\tif (!oneChar.isSpace){\n\t\t\t\t\thtmlWord=words[i];\n\t\t\t\t\tbdSz=oneChar.borderSize;\n\t\t\t\t\ttexture=oneChar.texture;\n\t\t\t\t\tctx._drawText(texture,x+dx+htmlWord.x *sx-bdSz,y+htmlWord.y *sy-bdSz,texture.width,texture.height,curMat,0,0,0,0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tfor (i=0,n=chars.length;i < n;i++){\n\t\t\t\toneChar=chars[i];\n\t\t\t\tif (!oneChar.isSpace){\n\t\t\t\t\tbdSz=oneChar.borderSize;\n\t\t\t\t\ttexture=oneChar.texture;\n\t\t\t\t\tctx._drawText(texture,x+dx-bdSz,y-bdSz,texture.width,texture.height,curMat,0,0,0,0);\n\t\t\t\t\tsave && (value=save[saveLength++],value || (value=save[saveLength-1]=[]),value[0]=texture,value[1]=dx-bdSz,value[2]=-bdSz);\n\t\t\t\t}\n\t\t\t\tdx+=oneChar.cw;\n\t\t\t}\n\t\t\tsave && (save.length=saveLength);\n\t\t}\n\t}\n\n\tDrawText._drawFast=function(save,ctx,curMat,x,y){\n\t\tvar texture,value;\n\t\tfor (var i=0,n=save.length;i < n;i++){\n\t\t\tvalue=save[i];\n\t\t\ttexture=value[0];\n\t\t\ttexture.active();\n\t\t\tctx._drawText(texture,x+value[1],y+value[2],texture.width,texture.height,curMat,0,0,0,0);\n\t\t}\n\t}\n\n\tDrawText.drawText=function(ctx,txt,words,curMat,font,textAlign,fillColor,borderColor,lineWidth,x,y,underLine){\n\t\t(underLine===void 0)&& (underLine=0);\n\t\tif ((txt && txt.length===0)|| (words && words.length===0))\n\t\t\treturn;\n\t\tvar sx=curMat.a,sy=curMat.d;\n\t\t(curMat.b!==0 || curMat.c!==0)&& (sx=sy=1);\n\t\tvar scale=sx!==1 || sy!==1;\n\t\tif (scale && Laya.stage.transform){\n\t\t\tvar t=Laya.stage.transform;\n\t\t\tscale=t.a===sx && t.d===sy;\n\t\t}else scale=false;\n\t\tif (scale){\n\t\t\tcurMat=curMat.copyTo(WebGLContext2D._tmpMatrix);\n\t\t\tvar tempTx=curMat.tx;\n\t\t\tvar tempTy=curMat.ty;\n\t\t\tcurMat.scale(1 / sx,1 / sy);\n\t\t\tcurMat._checkTransform();\n\t\t\tx *=sx;\n\t\t\ty *=sy;\n\t\t\tx+=tempTx-curMat.tx;\n\t\t\ty+=tempTy-curMat.ty;\n\t\t}else sx=sy=1;\n\t\tif (words){\n\t\t\tDrawText._drawSlow(null,ctx,txt,words,curMat,font,textAlign,fillColor,borderColor,lineWidth,x,y,sx,sy,underLine);\n\t\t\t}else {\n\t\t\tif (txt.toUpperCase===null){\n\t\t\t\tvar idNum=sx+sy *100000;\n\t\t\t\tvar myCache=txt;\n\t\t\t\tif (!myCache.changed && myCache.id===idNum){\n\t\t\t\t\tDrawText._drawFast(myCache.save,ctx,curMat,x,y);\n\t\t\t\t\t}else {\n\t\t\t\t\tmyCache.id=idNum;\n\t\t\t\t\tmyCache.changed=false;\n\t\t\t\t\tDrawText._drawSlow(myCache.save,ctx,txt,words,curMat,font,textAlign,fillColor,borderColor,lineWidth,x,y,sx,sy,underLine);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t};\n\t\t\tvar id=txt+font.toString()+fillColor+borderColor+lineWidth+sx+sy+textAlign;\n\t\t\tvar cache=DrawText._textsCache[id];\n\t\t\tif (Text.CharacterCache){\n\t\t\t\tif (cache){\n\t\t\t\t\tDrawText._drawFast(cache,ctx,curMat,x,y);\n\t\t\t\t\t}else {\n\t\t\t\t\tDrawText._textsCache.__length || (DrawText._textsCache.__length=0);\n\t\t\t\t\tif (DrawText._textsCache.__length > Config.WebGLTextCacheCount){\n\t\t\t\t\t\tDrawText._textsCache={};\n\t\t\t\t\t\tDrawText._textsCache.__length=0;\n\t\t\t\t\t\tDrawText._curPoolIndex=0;\n\t\t\t\t\t}\n\t\t\t\t\tDrawText._textCachesPool[DrawText._curPoolIndex] ? (cache=DrawText._textsCache[id]=DrawText._textCachesPool[DrawText._curPoolIndex],cache.length=0):(DrawText._textCachesPool[DrawText._curPoolIndex]=cache=DrawText._textsCache[id]=[]);\n\t\t\t\t\tDrawText._textsCache.__length++\n\t\t\t\t\tDrawText._curPoolIndex++;\n\t\t\t\t\tDrawText._drawSlow(cache,ctx,txt,words,curMat,font,textAlign,fillColor,borderColor,lineWidth,x,y,sx,sy,underLine);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tDrawText._drawSlow(cache,ctx,txt,words,curMat,font,textAlign,fillColor,borderColor,lineWidth,x,y,sx,sy,underLine);\n\t\t\t}\n\t\t}\n\t}\n\n\tDrawText._charsTemp=null;\n\tDrawText._textCachesPool=[];\n\tDrawText._curPoolIndex=0;\n\tDrawText._charsCache={};\n\tDrawText._textsCache={};\n\tDrawText._drawValue=null;\n\tDrawText.d=[];\n\tDrawText._charSeg=null;\n\tDrawText.__init$=function(){\n\t\t//class CharValue\n\t\tCharValue=(function(){\n\t\t\tfunction CharValue(){\n\t\t\t\t//this.txtID=NaN;\n\t\t\t\t//this.font=null;\n\t\t\t\t//this.fillColor=null;\n\t\t\t\t//this.borderColor=null;\n\t\t\t\t//this.lineWidth=0;\n\t\t\t\t//this.scaleX=NaN;\n\t\t\t\t//this.scaleY=NaN;\n\t\t\t\t//this.underLine=0;\n\t\t\t}\n\t\t\t__class(CharValue,'');\n\t\t\tvar __proto=CharValue.prototype;\n\t\t\t__proto.value=function(font,fillColor,borderColor,lineWidth,scaleX,scaleY,underLine){\n\t\t\t\tthis.font=font;\n\t\t\t\tthis.fillColor=fillColor;\n\t\t\t\tthis.borderColor=borderColor;\n\t\t\t\tthis.lineWidth=lineWidth;\n\t\t\t\tthis.scaleX=scaleX;\n\t\t\t\tthis.scaleY=scaleY;\n\t\t\t\tthis.underLine=underLine;\n\t\t\t\tvar key=font.toString()+scaleX+scaleY+lineWidth+fillColor+borderColor+underLine;\n\t\t\t\tthis.txtID=CharValue._keymap[key];\n\t\t\t\tif (!this.txtID){\n\t\t\t\t\tthis.txtID=(++CharValue._keymapCount)*0.0000001;\n\t\t\t\t\tCharValue._keymap[key]=this.txtID;\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tCharValue.clear=function(){\n\t\t\t\tCharValue._keymap={};\n\t\t\t\tCharValue._keymapCount=1;\n\t\t\t}\n\t\t\tCharValue._keymap={};\n\t\t\tCharValue._keymapCount=1;\n\t\t\treturn CharValue;\n\t\t})()\n\t}\n\n\treturn DrawText;\n})()\n\n\n//class laya.webgl.text.FontInContext\nvar FontInContext=(function(){\n\tfunction FontInContext(font){\n\t\t//this._text=null;\n\t\t//this._words=null;\n\t\tthis._index=0;\n\t\tthis._size=14;\n\t\tthis._italic=-2;\n\t\tFontInContext._cache2=FontInContext._cache2|| [];\n\t\tthis.setFont(font || \"14px Arial\");\n\t}\n\n\t__class(FontInContext,'laya.webgl.text.FontInContext');\n\tvar __proto=FontInContext.prototype;\n\t__proto.setFont=function(value){\n\t\tvar arr=FontInContext._cache2[value];\n\t\tif (!arr){\n\t\t\tthis._words=value.split(' ');\n\t\t\tfor (var i=0,n=this._words.length;i < n;i++){\n\t\t\t\tif (this._words[i].indexOf('px')> 0){\n\t\t\t\t\tthis._index=i;\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._size=parseInt(this._words[this._index]);\n\t\t\tFontInContext._cache2[value]=[this._words,this._size];\n\t\t\t}else {\n\t\t\tthis._words=arr[0];\n\t\t\tthis._size=arr[1];\n\t\t}\n\t\tthis._text=null;\n\t\tthis._italic=-2;\n\t}\n\n\t__proto.getItalic=function(){\n\t\tthis._italic===-2 && (this._italic=this.hasType(\"italic\"));\n\t\treturn this._italic;\n\t}\n\n\t__proto.hasType=function(name){\n\t\tfor (var i=0,n=this._words.length;i < n;i++)\n\t\tif (this._words[i]===name)return i;\n\t\treturn-1;\n\t}\n\n\t__proto.removeType=function(name){\n\t\tfor (var i=0,n=this._words.length;i < n;i++)\n\t\tif (this._words[i]===name){\n\t\t\tthis._words.splice(i,1);\n\t\t\tif (this._index > i)this._index--;\n\t\t\tbreak ;\n\t\t}\n\t\tthis._text=null;\n\t\tthis._italic=-2;\n\t}\n\n\t__proto.copyTo=function(dec){\n\t\tdec._text=this._text;\n\t\tdec._size=this._size;\n\t\tdec._index=this._index;\n\t\tdec._words=this._words.slice();\n\t\tdec._italic=-2;\n\t\treturn dec;\n\t}\n\n\t__proto.toString=function(){\n\t\treturn this._text ? this._text :(this._text=this._words.join(' '));\n\t}\n\n\t__getset(0,__proto,'size',function(){\n\t\treturn this._size;\n\t\t},function(value){\n\t\tthis._size=value;\n\t\tthis._words[this._index]=value+\"px\";\n\t\tthis._text=null;\n\t});\n\n\tFontInContext.create=function(font){\n\t\tvar r=FontInContext._cache[font];\n\t\tif (r)return r;\n\t\tr=FontInContext._cache[font]=new FontInContext(font);\n\t\treturn r;\n\t}\n\n\tFontInContext.EMPTY=new FontInContext();\n\tFontInContext._cache={};\n\tFontInContext._cache2=null;\n\treturn FontInContext;\n})()\n\n\n//class laya.webgl.utils.CONST3D2D\nvar CONST3D2D=(function(){\n\tfunction CONST3D2D(){}\n\t__class(CONST3D2D,'laya.webgl.utils.CONST3D2D');\n\tCONST3D2D.defaultMatrix4=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];\n\tCONST3D2D.defaultMinusYMatrix4=[1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,1];\n\tCONST3D2D.uniformMatrix3=[1,0,0,0,0,1,0,0,0,0,1,0];\n\tCONST3D2D._TMPARRAY=[];\n\tCONST3D2D._OFFSETX=0;\n\tCONST3D2D._OFFSETY=0;\n\t__static(CONST3D2D,\n\t['BYTES_PE',function(){return this.BYTES_PE=/*__JS__ */Float32Array.BYTES_PER_ELEMENT;},'BYTES_PIDX',function(){return this.BYTES_PIDX=/*__JS__ */Uint16Array.BYTES_PER_ELEMENT;}\n\t]);\n\treturn CONST3D2D;\n})()\n\n\n//class laya.webgl.utils.GlUtils\nvar GlUtils=(function(){\n\tfunction GlUtils(){}\n\t__class(GlUtils,'laya.webgl.utils.GlUtils');\n\tGlUtils.make2DProjection=function(width,height,depth){\n\t\treturn [2.0 / width,0,0,0,0,-2.0 / height,0,0,0,0,2.0 / depth,0,-1,1,0,1,];\n\t}\n\n\tGlUtils.fillIBQuadrangle=function(buffer,count){\n\t\tif (count > 65535 / 4){\n\t\t\tthrow Error(\"IBQuadrangle count:\"+count+\" must<:\"+Math.floor(65535 / 4));\n\t\t\treturn false;\n\t\t}\n\t\tcount=Math.floor(count);\n\t\tbuffer._resizeBuffer((count+1)*6 */*laya.webgl.utils.Buffer2D.SHORT*/2,false);\n\t\tbuffer.byteLength=buffer.bufferLength;\n\t\tvar bufferData=buffer.getUint16Array();\n\t\tvar idx=0;\n\t\tfor (var i=0;i < count;i++){\n\t\t\tbufferData[idx++]=i *4;\n\t\t\tbufferData[idx++]=i *4+2;\n\t\t\tbufferData[idx++]=i *4+1;\n\t\t\tbufferData[idx++]=i *4;\n\t\t\tbufferData[idx++]=i *4+3;\n\t\t\tbufferData[idx++]=i *4+2;\n\t\t}\n\t\tbuffer.setNeedUpload();\n\t\treturn true;\n\t}\n\n\tGlUtils.expandIBQuadrangle=function(buffer,count){\n\t\tbuffer.bufferLength >=(count *6 */*laya.webgl.utils.Buffer2D.SHORT*/2)|| GlUtils.fillIBQuadrangle(buffer,count);\n\t}\n\n\tGlUtils.mathCeilPowerOfTwo=function(value){\n\t\tvalue--;\n\t\tvalue |=value >> 1;\n\t\tvalue |=value >> 2;\n\t\tvalue |=value >> 4;\n\t\tvalue |=value >> 8;\n\t\tvalue |=value >> 16;\n\t\tvalue++;\n\t\treturn value;\n\t}\n\n\tGlUtils.fillQuadrangleImgVb=function(vb,x,y,point4,uv,m,_x,_y){\n\t\tvar vpos=(vb._byteLength >> 2)+/*laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16;\n\t\tvb.byteLength=(vpos << 2);\n\t\tvar vbdata=vb.getFloat32Array();\n\t\tvpos-=/*laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16;\n\t\tvbdata[vpos+2]=uv[0];\n\t\tvbdata[vpos+3]=uv[1];\n\t\tvbdata[vpos+6]=uv[2];\n\t\tvbdata[vpos+7]=uv[3];\n\t\tvbdata[vpos+10]=uv[4];\n\t\tvbdata[vpos+11]=uv[5];\n\t\tvbdata[vpos+14]=uv[6];\n\t\tvbdata[vpos+15]=uv[7];\n\t\tvar a=m.a,b=m.b,c=m.c,d=m.d;\n\t\tif (a!==1 || b!==0 || c!==0 || d!==1){\n\t\t\tm.bTransform=true;\n\t\t\tvar tx=m.tx+_x,ty=m.ty+_y;\n\t\t\tvbdata[vpos]=(point4[0]+x)*a+(point4[1]+y)*c+tx;\n\t\t\tvbdata[vpos+1]=(point4[0]+x)*b+(point4[1]+y)*d+ty;\n\t\t\tvbdata[vpos+4]=(point4[2]+x)*a+(point4[3]+y)*c+tx;\n\t\t\tvbdata[vpos+5]=(point4[2]+x)*b+(point4[3]+y)*d+ty;\n\t\t\tvbdata[vpos+8]=(point4[4]+x)*a+(point4[5]+y)*c+tx;\n\t\t\tvbdata[vpos+9]=(point4[4]+x)*b+(point4[5]+y)*d+ty;\n\t\t\tvbdata[vpos+12]=(point4[6]+x)*a+(point4[7]+y)*c+tx;\n\t\t\tvbdata[vpos+13]=(point4[6]+x)*b+(point4[7]+y)*d+ty;\n\t\t\t}else {\n\t\t\tm.bTransform=false;\n\t\t\tx+=m.tx+_x;\n\t\t\ty+=m.ty+_y;\n\t\t\tvbdata[vpos]=x+point4[0];\n\t\t\tvbdata[vpos+1]=y+point4[1];\n\t\t\tvbdata[vpos+4]=x+point4[2];\n\t\t\tvbdata[vpos+5]=y+point4[3];\n\t\t\tvbdata[vpos+8]=x+point4[4];\n\t\t\tvbdata[vpos+9]=y+point4[5];\n\t\t\tvbdata[vpos+12]=x+point4[6];\n\t\t\tvbdata[vpos+13]=y+point4[7];\n\t\t}\n\t\tvb._upload=true;\n\t\treturn true;\n\t}\n\n\tGlUtils.fillTranglesVB=function(vb,x,y,points,m,_x,_y){\n\t\tvar vpos=(vb._byteLength >> 2)+points.length;\n\t\tvb.byteLength=(vpos << 2);\n\t\tvar vbdata=vb.getFloat32Array();\n\t\tvpos-=points.length;\n\t\tvar len=points.length;\n\t\tvar a=m.a,b=m.b,c=m.c,d=m.d;\n\t\tfor (var i=0;i < len;i+=4){\n\t\t\tvbdata[vpos+i+2]=points[i+2];\n\t\t\tvbdata[vpos+i+3]=points[i+3];\n\t\t\tif (a!==1 || b!==0 || c!==0 || d!==1){\n\t\t\t\tm.bTransform=true;\n\t\t\t\tvar tx=m.tx+_x,ty=m.ty+_y;\n\t\t\t\tvbdata[vpos+i]=(points[i]+x)*a+(points[i+1]+y)*c+tx;\n\t\t\t\tvbdata[vpos+i+1]=(points[i]+x)*b+(points[i+1]+y)*d+ty;\n\t\t\t\t}else {\n\t\t\t\tm.bTransform=false;\n\t\t\t\tx+=m.tx+_x;\n\t\t\t\ty+=m.ty+_y;\n\t\t\t\tvbdata[vpos+i]=x+points[i];\n\t\t\t\tvbdata[vpos+i+1]=y+points[i+1];\n\t\t\t}\n\t\t}\n\t\tvb._upload=true;\n\t\treturn true;\n\t}\n\n\tGlUtils.copyPreImgVb=function(vb,dx,dy){\n\t\tvar vpos=(vb._byteLength >> 2);\n\t\tvb.byteLength=((vpos+/*laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16)<< 2);\n\t\tvar vbdata=vb.getFloat32Array();\n\t\tfor (var i=0,ci=vpos-16;i < 4;i++){\n\t\t\tvbdata[vpos]=vbdata[ci]+dx;\n\t\t\t++vpos;\n\t\t\t++ci;\n\t\t\tvbdata[vpos]=vbdata[ci]+dy;\n\t\t\t++vpos;\n\t\t\t++ci;\n\t\t\tvbdata[vpos]=vbdata[ci];\n\t\t\t++vpos;\n\t\t\t++ci;\n\t\t\tvbdata[vpos]=vbdata[ci];\n\t\t\t++vpos;\n\t\t\t++ci;\n\t\t}\n\t\tvb._upload=true;\n\t}\n\n\tGlUtils.fillRectImgVb=function(vb,clip,x,y,width,height,uv,m,_x,_y,dx,dy,round){\n\t\t(round===void 0)&& (round=false);\n\t\tvar mType=1;\n\t\tvar toBx,toBy,toEx,toEy;\n\t\tvar cBx,cBy,cEx,cEy;\n\t\tvar w0,h0,tx,ty;\n\t\tvar finalX,finalY,offsetX,offsetY;\n\t\tvar a=m.a,b=m.b,c=m.c,d=m.d;\n\t\tvar useClip=clip && clip.width < /*laya.webgl.canvas.WebGLContext2D._MAXSIZE*/99999999;\n\t\tif (a!==1 || b!==0 || c!==0 || d!==1){\n\t\t\tm.bTransform=true;\n\t\t\tif (b===0 && c===0){\n\t\t\t\tmType=23;\n\t\t\t\tw0=width+x,h0=height+y;\n\t\t\t\ttx=m.tx+_x,ty=m.ty+_y;\n\t\t\t\ttoBx=a *x+tx;\n\t\t\t\ttoEx=a *w0+tx;\n\t\t\t\ttoBy=d *y+ty;\n\t\t\t\ttoEy=d *h0+ty;\n\t\t\t}\n\t\t\t}else {\n\t\t\tmType=23;\n\t\t\tm.bTransform=false;\n\t\t\ttoBx=x+m.tx+_x;\n\t\t\ttoEx=toBx+width;\n\t\t\ttoBy=y+m.ty+_y;\n\t\t\ttoEy=toBy+height;\n\t\t}\n\t\tif (useClip){\n\t\t\tcBx=clip.x,cBy=clip.y,cEx=clip.width+cBx,cEy=clip.height+cBy;\n\t\t}\n\t\tif (mType!==1){\n\t\t\tif (Math.min(toBx,toEx)>=cEx)return false;\n\t\t\tif (Math.min(toBy,toEy)>=cEy)return false;\n\t\t\tif (Math.max(toEx,toBx)<=cBx)return false;\n\t\t\tif (Math.max(toEy,toBy)<=cBy)return false;\n\t\t};\n\t\tvar vpos=(vb._byteLength >> 2);\n\t\tvb.byteLength=((vpos+/*laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16)<< 2);\n\t\tvar vbdata=vb.getFloat32Array();\n\t\tvbdata[vpos+2]=uv[0];\n\t\tvbdata[vpos+3]=uv[1];\n\t\tvbdata[vpos+6]=uv[2];\n\t\tvbdata[vpos+7]=uv[3];\n\t\tvbdata[vpos+10]=uv[4];\n\t\tvbdata[vpos+11]=uv[5];\n\t\tvbdata[vpos+14]=uv[6];\n\t\tvbdata[vpos+15]=uv[7];\n\t\tswitch (mType){\n\t\t\tcase 1:\n\t\t\t\ttx=m.tx+_x,ty=m.ty+_y;\n\t\t\t\tw0=width+x,h0=height+y;\n\t\t\t\tvar w1=x,h1=y;\n\t\t\t\tvar aw1=a *w1,ch1=c *h1,dh1=d *h1,bw1=b *w1;\n\t\t\t\tvar aw0=a *w0,ch0=c *h0,dh0=d *h0,bw0=b *w0;\n\t\t\t\tif (round){\n\t\t\t\t\tfinalX=aw1+ch1+tx;\n\t\t\t\t\toffsetX=Math.round(finalX)-finalX;\n\t\t\t\t\tfinalY=dh1+bw1+ty;\n\t\t\t\t\toffsetY=Math.round(finalY)-finalY;\n\t\t\t\t\tvbdata[vpos]=finalX+offsetX;\n\t\t\t\t\tvbdata[vpos+1]=finalY+offsetY;\n\t\t\t\t\tvbdata[vpos+4]=aw0+ch1+tx+offsetX;\n\t\t\t\t\tvbdata[vpos+5]=dh1+bw0+ty+offsetY;\n\t\t\t\t\tvbdata[vpos+8]=aw0+ch0+tx+offsetX;\n\t\t\t\t\tvbdata[vpos+9]=dh0+bw0+ty+offsetY;\n\t\t\t\t\tvbdata[vpos+12]=aw1+ch0+tx+offsetX;\n\t\t\t\t\tvbdata[vpos+13]=dh0+bw1+ty+offsetY;\n\t\t\t\t\t}else {\n\t\t\t\t\tvbdata[vpos]=aw1+ch1+tx;\n\t\t\t\t\tvbdata[vpos+1]=dh1+bw1+ty;\n\t\t\t\t\tvbdata[vpos+4]=aw0+ch1+tx;\n\t\t\t\t\tvbdata[vpos+5]=dh1+bw0+ty;\n\t\t\t\t\tvbdata[vpos+8]=aw0+ch0+tx;\n\t\t\t\t\tvbdata[vpos+9]=dh0+bw0+ty;\n\t\t\t\t\tvbdata[vpos+12]=aw1+ch0+tx;\n\t\t\t\t\tvbdata[vpos+13]=dh0+bw1+ty;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\tcase 23:\n\t\t\t\tif (round){\n\t\t\t\t\tfinalX=toBx+dx;\n\t\t\t\t\toffsetX=Math.round(finalX)-finalX;\n\t\t\t\t\tfinalY=toBy;\n\t\t\t\t\toffsetY=Math.round(finalY)-finalY;\n\t\t\t\t\tvbdata[vpos]=finalX+offsetX;\n\t\t\t\t\tvbdata[vpos+1]=finalY+offsetY;\n\t\t\t\t\tvbdata[vpos+4]=toEx+dx+offsetX;\n\t\t\t\t\tvbdata[vpos+5]=toBy+offsetY;\n\t\t\t\t\tvbdata[vpos+8]=toEx+offsetX;\n\t\t\t\t\tvbdata[vpos+9]=toEy+offsetY;\n\t\t\t\t\tvbdata[vpos+12]=toBx+offsetX;\n\t\t\t\t\tvbdata[vpos+13]=toEy+offsetY;\n\t\t\t\t\t}else {\n\t\t\t\t\tvbdata[vpos]=toBx+dx;\n\t\t\t\t\tvbdata[vpos+1]=toBy;\n\t\t\t\t\tvbdata[vpos+4]=toEx+dx;\n\t\t\t\t\tvbdata[vpos+5]=toBy;\n\t\t\t\t\tvbdata[vpos+8]=toEx;\n\t\t\t\t\tvbdata[vpos+9]=toEy;\n\t\t\t\t\tvbdata[vpos+12]=toBx;\n\t\t\t\t\tvbdata[vpos+13]=toEy;\n\t\t\t\t}\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tvb._upload=true;\n\t\treturn true;\n\t}\n\n\tGlUtils.fillLineVb=function(vb,clip,fx,fy,tx,ty,width,mat){\n\t\tvar linew=width *.5;\n\t\tvar data=GlUtils._fillLineArray;\n\t\tvar perpx=-(fy-ty),perpy=fx-tx;\n\t\tvar dist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\tperpx /=dist,perpy /=dist,perpx *=linew,perpy *=linew;\n\t\tdata[0]=fx-perpx,data[1]=fy-perpy,data[4]=fx+perpx,data[5]=fy+perpy,data[8]=tx+perpx,data[9]=ty+perpy,data[12]=tx-perpx,data[13]=ty-perpy;\n\t\tmat && mat.transformPointArray(data,data);\n\t\tvar vpos=(vb._byteLength >> 2)+/*laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16;\n\t\tvb.byteLength=(vpos << 2);\n\t\tvb.insertData(data,vpos-/*laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16);\n\t\treturn true;\n\t}\n\n\tGlUtils._fillLineArray=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];\n\treturn GlUtils;\n})()\n\n\n//class laya.webgl.utils.MatirxArray\nvar MatirxArray=(function(){\n\tfunction MatirxArray(){}\n\t__class(MatirxArray,'laya.webgl.utils.MatirxArray');\n\tMatirxArray.ArrayMul=function(a,b,o){\n\t\tif (!a){\n\t\t\tMatirxArray.copyArray(b,o);\n\t\t\treturn;\n\t\t}\n\t\tif (!b){\n\t\t\tMatirxArray.copyArray(a,o);\n\t\t\treturn;\n\t\t};\n\t\tvar ai0=NaN,ai1=NaN,ai2=NaN,ai3=NaN;\n\t\tfor (var i=0;i < 4;i++){\n\t\t\tai0=a[i];\n\t\t\tai1=a[i+4];\n\t\t\tai2=a[i+8];\n\t\t\tai3=a[i+12];\n\t\t\to[i]=ai0 *b[0]+ai1 *b[1]+ai2 *b[2]+ai3 *b[3];\n\t\t\to[i+4]=ai0 *b[4]+ai1 *b[5]+ai2 *b[6]+ai3 *b[7];\n\t\t\to[i+8]=ai0 *b[8]+ai1 *b[9]+ai2 *b[10]+ai3 *b[11];\n\t\t\to[i+12]=ai0 *b[12]+ai1 *b[13]+ai2 *b[14]+ai3 *b[15];\n\t\t}\n\t}\n\n\tMatirxArray.copyArray=function(f,t){\n\t\tif (!f)return;\n\t\tif (!t)return;\n\t\tfor (var i=0;i < f.length;i++){\n\t\t\tt[i]=f[i];\n\t\t}\n\t}\n\n\treturn MatirxArray;\n})()\n\n\n/**\n*Mesh2d只是保存数据。描述attribute用的。本身不具有渲染功能。\n*/\n//class laya.webgl.utils.Mesh2D\nvar Mesh2D=(function(){\n\tfunction Mesh2D(stride,vballoc,iballoc){\n\t\tthis._stride=0;\n\t\t//顶点结构大小。每个mesh的顶点结构是固定的。\n\t\tthis.vertNum=0;\n\t\t//当前的顶点的个数\n\t\tthis.indexNum=0;\n\t\t//实际index 个数。例如一个三角形是3个。由于ib本身可能超过实际使用的数量，所以需要一个indexNum\n\t\tthis._applied=false;\n\t\t//是否已经设置给webgl了\n\t\tthis._vb=null;\n\t\t//vb和ib都可能需要在外部修改，所以public\n\t\tthis._ib=null;\n\t\tthis._vao=null;\n\t\tthis._attribInfo=null;\n\t\t//保存起来的属性定义数组。\n\t\tthis._quadNum=0;\n\t\t//public static var meshlist:Array=[];//活着的mesh对象列表。\n\t\tthis.canReuse=false;\n\t\tthis._stride=stride;\n\t\tthis._vb=new VertexBuffer2D(stride,/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\tif (vballoc){\n\t\t\tthis._vb._resizeBuffer(vballoc,false);\n\t\t}else{}\n\t\tthis._ib=new IndexBuffer2D();\n\t\tif (iballoc){\n\t\t\tthis._ib._resizeBuffer(iballoc,false);\n\t\t}\n\t}\n\n\t__class(Mesh2D,'laya.webgl.utils.Mesh2D');\n\tvar __proto=Mesh2D.prototype;\n\t/**\n\t*重新创建一个mesh。复用这个对象的vertex结构，ib对象和attribinfo对象\n\t*/\n\t__proto.cloneWithNewVB=function(){\n\t\tvar mesh=new Mesh2D(this._stride,0,0);\n\t\tmesh._ib=this._ib;\n\t\tmesh._quadNum=this._quadNum;\n\t\tmesh._attribInfo=this._attribInfo;\n\t\treturn mesh;\n\t}\n\n\t/**\n\t*创建一个mesh，使用当前对象的vertex结构。vb和ib自己提供。\n\t*@return\n\t*/\n\t__proto.cloneWithNewVBIB=function(){\n\t\tvar mesh=new Mesh2D(this._stride,0,0);\n\t\tmesh._attribInfo=this._attribInfo;\n\t\treturn mesh;\n\t}\n\n\t/**\n\t*获得一个可以写的vb对象\n\t*/\n\t__proto.getVBW=function(){\n\t\tthis._vb.setNeedUpload();\n\t\treturn this._vb;\n\t}\n\n\t/**\n\t*获得一个只读vb\n\t*/\n\t__proto.getVBR=function(){\n\t\treturn this._vb;\n\t}\n\n\t__proto.getIBR=function(){\n\t\treturn this._ib;\n\t}\n\n\t/**\n\t*获得一个可写的ib\n\t*/\n\t__proto.getIBW=function(){\n\t\tthis._ib.setNeedUpload();\n\t\treturn this._ib;\n\t}\n\n\t/**\n\t*直接创建一个固定的ib。按照固定四边形的索引。\n\t*@param var QuadNum\n\t*/\n\t__proto.createQuadIB=function(QuadNum){\n\t\tthis._quadNum=QuadNum;\n\t\tthis._ib._resizeBuffer(QuadNum *6 *2,false);\n\t\tthis._ib.byteLength=this._ib.bufferLength;\n\t\tvar bd=this._ib.getUint16Array();\n\t\tvar idx=0;\n\t\tvar curvert=0;\n\t\tfor (var i=0;i < QuadNum;i++){\n\t\t\tbd[idx++]=curvert;\n\t\t\tbd[idx++]=curvert+2;\n\t\t\tbd[idx++]=curvert+1;\n\t\t\tbd[idx++]=curvert;\n\t\t\tbd[idx++]=curvert+3;\n\t\t\tbd[idx++]=curvert+2;\n\t\t\tcurvert+=4;\n\t\t}\n\t\tthis._ib.setNeedUpload();\n\t}\n\n\t/**\n\t*设置mesh的属性。每3个一组，对应的location分别是0,1,2...\n\t*含义是：type,size,offset\n\t*不允许多流。因此stride是固定的，offset只是在一个vertex之内。\n\t*@param attribs\n\t*/\n\t__proto.setAttributes=function(attribs){\n\t\tthis._attribInfo=attribs;\n\t\tif (this._attribInfo.length % 3 !=0){\n\t\t\tthrow 'Mesh2D setAttributes error!';\n\t\t}\n\t}\n\n\t__proto.getEleNum=function(){\n\t\treturn this._ib.getBuffer().byteLength / 2;\n\t}\n\n\t/**\n\t*子类实现。用来把自己放到对应的回收池中，以便复用。\n\t*/\n\t__proto.releaseMesh=function(){}\n\t/**\n\t*释放资源。\n\t*/\n\t__proto.destroy=function(){}\n\t/**\n\t*清理vb数据\n\t*/\n\t__proto.clearVB=function(){\n\t\tthis._vb.clear();\n\t}\n\n\tMesh2D._gvaoid=0;\n\treturn Mesh2D;\n})()\n\n\n//class laya.webgl.utils.RenderState2D\nvar RenderState2D=(function(){\n\tfunction RenderState2D(){}\n\t__class(RenderState2D,'laya.webgl.utils.RenderState2D');\n\tRenderState2D.getMatrArray=function(){\n\t\treturn [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];\n\t}\n\n\tRenderState2D.mat2MatArray=function(mat,matArray){\n\t\tvar m=mat;\n\t\tvar m4=matArray;\n\t\tm4[0]=m.a;\n\t\tm4[1]=m.b;\n\t\tm4[2]=RenderState2D.EMPTYMAT4_ARRAY[2];\n\t\tm4[3]=RenderState2D.EMPTYMAT4_ARRAY[3];\n\t\tm4[4]=m.c;\n\t\tm4[5]=m.d;\n\t\tm4[6]=RenderState2D.EMPTYMAT4_ARRAY[6];\n\t\tm4[7]=RenderState2D.EMPTYMAT4_ARRAY[7];\n\t\tm4[8]=RenderState2D.EMPTYMAT4_ARRAY[8];\n\t\tm4[9]=RenderState2D.EMPTYMAT4_ARRAY[9];\n\t\tm4[10]=RenderState2D.EMPTYMAT4_ARRAY[10];\n\t\tm4[11]=RenderState2D.EMPTYMAT4_ARRAY[11];\n\t\tm4[12]=m.tx;\n\t\tm4[13]=m.ty;\n\t\tm4[14]=RenderState2D.EMPTYMAT4_ARRAY[14];\n\t\tm4[15]=RenderState2D.EMPTYMAT4_ARRAY[15];\n\t\treturn matArray;\n\t}\n\n\tRenderState2D.restoreTempArray=function(){\n\t\tRenderState2D.TEMPMAT4_ARRAY[0]=1;\n\t\tRenderState2D.TEMPMAT4_ARRAY[1]=0;\n\t\tRenderState2D.TEMPMAT4_ARRAY[4]=0;\n\t\tRenderState2D.TEMPMAT4_ARRAY[5]=1;\n\t\tRenderState2D.TEMPMAT4_ARRAY[12]=0;\n\t\tRenderState2D.TEMPMAT4_ARRAY[13]=0;\n\t}\n\n\tRenderState2D.clear=function(){\n\t\tRenderState2D.worldScissorTest=false;\n\t\tRenderState2D.worldShaderDefines=null;\n\t\tRenderState2D.worldFilters=null;\n\t\tRenderState2D.worldAlpha=1;\n\t\tRenderState2D.worldClipRect.x=RenderState2D.worldClipRect.y=0;\n\t\tRenderState2D.worldClipRect.width=RenderState2D.width;\n\t\tRenderState2D.worldClipRect.height=RenderState2D.height;\n\t\tRenderState2D.curRenderTarget=null;\n\t}\n\n\tRenderState2D._MAXSIZE=99999999;\n\tRenderState2D.EMPTYMAT4_ARRAY=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];\n\tRenderState2D.TEMPMAT4_ARRAY=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];\n\tRenderState2D.worldMatrix4=RenderState2D.TEMPMAT4_ARRAY;\n\tRenderState2D.worldAlpha=1.0;\n\tRenderState2D.worldScissorTest=false;\n\tRenderState2D.worldFilters=null;\n\tRenderState2D.worldShaderDefines=null;\n\tRenderState2D.curRenderTarget=null;\n\tRenderState2D.width=0;\n\tRenderState2D.height=0;\n\t__static(RenderState2D,\n\t['worldMatrix',function(){return this.worldMatrix=new Matrix();},'worldClipRect',function(){return this.worldClipRect=new Rectangle(0,0,99999999,99999999);}\n\t]);\n\treturn RenderState2D;\n})()\n\n\n/**\n*@private\n*<code>ShaderCompile</code> 类用于实现Shader编译。\n*/\n//class laya.webgl.utils.ShaderCompile\nvar ShaderCompile=(function(){\n\tvar ShaderNode,InlcudeFile;\n\tfunction ShaderCompile(name,vs,ps,nameMap,defs){\n\t\t//this._nameMap=null;\n\t\t//this._VS=null;\n\t\t//this._PS=null;\n\t\tvar _$this=this;\n\t\tfunction _compile (script){\n\t\t\tvar includefiles=[];\n\t\t\tvar top=new ShaderNode(includefiles);\n\t\t\t_$this._compileToTree(top,script.split('\\n'),0,includefiles,defs);\n\t\t\treturn top;\n\t\t};\n\t\tvar startTime=Browser.now();\n\t\tthis._VS=_compile(vs);\n\t\tthis._PS=_compile(ps);\n\t\tthis._nameMap=nameMap;\n\t\tif ((Browser.now()-startTime)> 2)\n\t\t\tconsole.log(\"ShaderCompile use time:\"+(Browser.now()-startTime)+\"  size:\"+vs.length+\"/\"+ps.length);\n\t}\n\n\t__class(ShaderCompile,'laya.webgl.utils.ShaderCompile');\n\tvar __proto=ShaderCompile.prototype;\n\t__proto._compileToTree=function(parent,lines,start,includefiles,defs){\n\t\tvar node,preNode;\n\t\tvar text,name,fname;\n\t\tvar ofs=0,words,noUseNode;\n\t\tvar i=0,n=0,j=0;\n\t\tfor (i=start;i < lines.length;i++){\n\t\t\ttext=lines[i];\n\t\t\tif (text.length < 1)continue ;\n\t\t\tofs=text.indexOf(\"//\");\n\t\t\tif (ofs===0)continue ;\n\t\t\tif (ofs >=0)text=text.substr(0,ofs);\n\t\t\tnode=noUseNode || new ShaderNode(includefiles);\n\t\t\tnoUseNode=null;\n\t\t\tnode.text=text;\n\t\t\tnode.noCompile=true;\n\t\t\tif ((ofs=text.indexOf(\"#\"))>=0){\n\t\t\t\tname=\"#\";\n\t\t\t\tfor (j=ofs+1,n=text.length;j < n;j++){\n\t\t\t\t\tvar c=text.charAt(j);\n\t\t\t\t\tif (c===' ' || c==='\\t' || c==='?')break ;\n\t\t\t\t\tname+=c;\n\t\t\t\t}\n\t\t\t\tnode.name=name;\n\t\t\t\tswitch (name){\n\t\t\t\t\tcase \"#ifdef\":\n\t\t\t\t\tcase \"#ifndef\":\n\t\t\t\t\t\tnode.src=text;\n\t\t\t\t\t\tnode.noCompile=text.match(/[!&|()=<>]/)!=null;\n\t\t\t\t\t\tif (!node.noCompile){\n\t\t\t\t\t\t\twords=text.replace(/^\\s*/,'').split(/\\s+/);\n\t\t\t\t\t\t\tnode.setCondition(words[1],name===\"#ifdef\" ? 1 :2);\n\t\t\t\t\t\t\tnode.text=\"//\"+node.text;\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tconsole.log(\"function():Boolean{return \"+text.substr(ofs+node.name.length)+\"}\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.setParent(parent);\n\t\t\t\t\t\tparent=node;\n\t\t\t\t\t\tif (defs){\n\t\t\t\t\t\t\twords=text.substr(j).split(ShaderCompile._splitToWordExps3);\n\t\t\t\t\t\t\tfor (j=0;j < words.length;j++){\n\t\t\t\t\t\t\t\ttext=words[j];\n\t\t\t\t\t\t\t\ttext.length && (defs[ text]=true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\tcase \"#if\":\n\t\t\t\t\t\tnode.src=text;\n\t\t\t\t\t\tnode.noCompile=true;\n\t\t\t\t\t\tnode.setParent(parent);\n\t\t\t\t\t\tparent=node;\n\t\t\t\t\t\tif (defs){\n\t\t\t\t\t\t\twords=text.substr(j).split(ShaderCompile._splitToWordExps3);\n\t\t\t\t\t\t\tfor (j=0;j < words.length;j++){\n\t\t\t\t\t\t\t\ttext=words[j];\n\t\t\t\t\t\t\t\ttext.length && text!=\"defined\" && (defs[ text]=true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\tcase \"#else\":\n\t\t\t\t\t\tnode.src=text;\n\t\t\t\t\t\tparent=parent.parent;\n\t\t\t\t\t\tpreNode=parent.childs[parent.childs.length-1];\n\t\t\t\t\t\tnode.noCompile=preNode.noCompile\n\t\t\t\t\t\tif (!(node.noCompile)){\n\t\t\t\t\t\t\tnode.condition=preNode.condition;\n\t\t\t\t\t\t\tnode.conditionType=preNode.conditionType==1 ? 2 :1;\n\t\t\t\t\t\t\tnode.text=\"//\"+node.text+\" \"+preNode.text+\" \"+node.conditionType;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.setParent(parent);\n\t\t\t\t\t\tparent=node;\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\tcase \"#endif\":\n\t\t\t\t\t\tparent=parent.parent;\n\t\t\t\t\t\tpreNode=parent.childs[parent.childs.length-1];\n\t\t\t\t\t\tnode.noCompile=preNode.noCompile;\n\t\t\t\t\t\tif (!(node.noCompile)){\n\t\t\t\t\t\t\tnode.text=\"//\"+node.text;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.setParent(parent);\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\tcase \"#include\":\n\t\t\t\t\t\twords=ShaderCompile.splitToWords(text,null);\n\t\t\t\t\t\tvar inlcudeFile=ShaderCompile.includes[words[1]];\n\t\t\t\t\t\tif (!inlcudeFile){\n\t\t\t\t\t\t\tthrow \"ShaderCompile error no this include file:\"+words[1];\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((ofs=words[0].indexOf(\"?\"))< 0){\n\t\t\t\t\t\t\tnode.setParent(parent);\n\t\t\t\t\t\t\ttext=inlcudeFile.getWith(words[2]=='with' ? words[3] :null);\n\t\t\t\t\t\t\tthis._compileToTree(node,text.split('\\n'),0,includefiles,defs);\n\t\t\t\t\t\t\tnode.text=\"\";\n\t\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.setCondition(words[0].substr(ofs+1),1);\n\t\t\t\t\t\tnode.text=inlcudeFile.getWith(words[2]=='with' ? words[3] :null);\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"#import\":\n\t\t\t\t\t\twords=ShaderCompile.splitToWords(text,null);\n\t\t\t\t\t\tfname=words[1];\n\t\t\t\t\t\tincludefiles.push({node:node,file:ShaderCompile.includes[fname],ofs:node.text.length});\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tpreNode=parent.childs[parent.childs.length-1];\n\t\t\t\tif (preNode && !preNode.name){\n\t\t\t\t\tincludefiles.length > 0 && ShaderCompile.splitToWords(text,preNode);\n\t\t\t\t\tnoUseNode=node;\n\t\t\t\t\tpreNode.text+=\"\\n\"+text;\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tincludefiles.length > 0 && ShaderCompile.splitToWords(text,node);\n\t\t\t}\n\t\t\tnode.setParent(parent);\n\t\t}\n\t}\n\n\t__proto.createShader=function(define,shaderName,createShader){\n\t\tvar defMap={};\n\t\tvar defineStr=\"\";\n\t\tif (define){\n\t\t\tfor (var i in define){\n\t\t\t\tdefineStr+=\"#define \"+i+\"\\n\";\n\t\t\t\tdefMap[i]=true;\n\t\t\t}\n\t\t};\n\t\tvar vs=this._VS.toscript(defMap,[]);\n\t\tvar ps=this._PS.toscript(defMap,[]);\n\t\treturn (createShader || Shader.create)(defineStr+vs.join('\\n'),defineStr+ps.join('\\n'),shaderName,this._nameMap);\n\t}\n\n\tShaderCompile._parseOne=function(attributes,uniforms,words,i,word,b){\n\t\tvar one={type:ShaderCompile.shaderParamsMap[words[i+1]],name:words[i+2],size:isNaN(parseInt(words[i+3]))? 1 :parseInt(words[i+3])};\n\t\tif (b){\n\t\t\tif (word==\"attribute\"){\n\t\t\t\tattributes.push(one);\n\t\t\t\t}else {\n\t\t\t\tuniforms.push(one);\n\t\t\t}\n\t\t}\n\t\tif (words[i+3]==':'){\n\t\t\tone.type=words[i+4];\n\t\t\ti+=2;\n\t\t}\n\t\ti+=2;\n\t\treturn i;\n\t}\n\n\tShaderCompile.addInclude=function(fileName,txt){\n\t\tif (!txt || txt.length===0)\n\t\t\tthrow new Error(\"add shader include file err:\"+fileName);\n\t\tif (ShaderCompile.includes[fileName])\n\t\t\tthrow new Error(\"add shader include file err, has add:\"+fileName);\n\t\tShaderCompile.includes[fileName]=new InlcudeFile(txt);\n\t}\n\n\tShaderCompile.preGetParams=function(vs,ps){\n\t\tvar text=[vs,ps];\n\t\tvar result={};\n\t\tvar attributes=[];\n\t\tvar uniforms=[];\n\t\tvar definesInfo={};\n\t\tvar definesName=[];\n\t\tresult.attributes=attributes;\n\t\tresult.uniforms=uniforms;\n\t\tresult.defines=definesInfo;\n\t\tvar i=0,n=0,one;\n\t\tfor (var s=0;s < 2;s++){\n\t\t\ttext[s]=text[s].replace(ShaderCompile._removeAnnotation,\"\");\n\t\t\tvar words=text[s].match(ShaderCompile._reg);\n\t\t\tvar tempelse;\n\t\t\tfor (i=0,n=words.length;i < n;i++){\n\t\t\t\tvar word=words[i];\n\t\t\t\tif (word !=\"attribute\" && word !=\"uniform\"){\n\t\t\t\t\tif (word==\"#define\"){\n\t\t\t\t\t\tword=words[++i];\n\t\t\t\t\t\tdefinesName[word]=1;\n\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t\t}else if (word==\"#ifdef\"){\n\t\t\t\t\t\ttempelse=words[++i];\n\t\t\t\t\t\tvar def=definesInfo[tempelse]=definesInfo[tempelse] || [];\n\t\t\t\t\t\tfor (i++;i < n;i++){\n\t\t\t\t\t\t\tword=words[i];\n\t\t\t\t\t\t\tif (word !=\"attribute\" && word !=\"uniform\"){\n\t\t\t\t\t\t\t\tif (word==\"#else\"){\n\t\t\t\t\t\t\t\t\tfor (i++;i < n;i++){\n\t\t\t\t\t\t\t\t\t\tword=words[i];\n\t\t\t\t\t\t\t\t\t\tif (word !=\"attribute\" && word !=\"uniform\"){\n\t\t\t\t\t\t\t\t\t\t\tif (word==\"#endif\"){\n\t\t\t\t\t\t\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\ti=ShaderCompile._parseOne(attributes,uniforms,words,i,word,!definesName[tempelse]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ti=ShaderCompile._parseOne(attributes,uniforms,words,i,word,definesName[tempelse]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\ti=ShaderCompile._parseOne(attributes,uniforms,words,i,word,true);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tShaderCompile.splitToWords=function(str,block){\n\t\tvar out=[];\n\t\tvar c;\n\t\tvar ofs=-1;\n\t\tvar word;\n\t\tfor (var i=0,n=str.length;i < n;i++){\n\t\t\tc=str.charAt(i);\n\t\t\tif (\" \\t=+-*/&%!<>()'\\\",;\".indexOf(c)>=0){\n\t\t\t\tif (ofs >=0 && (i-ofs)> 1){\n\t\t\t\t\tword=str.substr(ofs,i-ofs);\n\t\t\t\t\tout.push(word);\n\t\t\t\t}\n\t\t\t\tif (c=='\"' || c==\"'\"){\n\t\t\t\t\tvar ofs2=str.indexOf(c,i+1);\n\t\t\t\t\tif (ofs2 < 0){\n\t\t\t\t\t\tthrow \"Sharder err:\"+str;\n\t\t\t\t\t}\n\t\t\t\t\tout.push(str.substr(i+1,ofs2-i-1));\n\t\t\t\t\ti=ofs2;\n\t\t\t\t\tofs=-1;\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\tif (c=='(' && block && out.length > 0){\n\t\t\t\t\tword=out[out.length-1]+\";\";\n\t\t\t\t\tif (\"vec4;main;\".indexOf(word)< 0)\n\t\t\t\t\t\tblock.useFuns+=word;\n\t\t\t\t}\n\t\t\t\tofs=-1;\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tif (ofs < 0)ofs=i;\n\t\t}\n\t\tif (ofs < n && (n-ofs)> 1){\n\t\t\tword=str.substr(ofs,n-ofs);\n\t\t\tout.push(word);\n\t\t}\n\t\treturn out;\n\t}\n\n\tShaderCompile.IFDEF_NO=0;\n\tShaderCompile.IFDEF_YES=1;\n\tShaderCompile.IFDEF_ELSE=2;\n\tShaderCompile.IFDEF_PARENT=3;\n\tShaderCompile._removeAnnotation=new RegExp(\"(/\\\\*([^*]|[\\\\r\\\\\\n]|(\\\\*+([^*/]|[\\\\r\\\\n])))*\\\\*+/)|(//.*)\",\"g\");\n\tShaderCompile._reg=new RegExp(\"(\\\".*\\\")|('.*')|([#\\\\w\\\\*-\\\\.+/()=<>{}\\\\\\\\]+)|([,;:\\\\\\\\])\",\"g\");\n\tShaderCompile._splitToWordExps=new RegExp(\"[(\\\".*\\\")]+|[('.*')]+|([ \\\\t=\\\\+\\\\-*/&%!<>!%\\(\\),;])\",\"g\");\n\tShaderCompile.includes={};\n\t__static(ShaderCompile,\n\t['shaderParamsMap',function(){return this.shaderParamsMap={\"float\":/*laya.webgl.WebGLContext.FLOAT*/0x1406,\"int\":/*laya.webgl.WebGLContext.INT*/0x1404,\"bool\":/*laya.webgl.WebGLContext.BOOL*/0x8B56,\"vec2\":/*laya.webgl.WebGLContext.FLOAT_VEC2*/0x8B50,\"vec3\":/*laya.webgl.WebGLContext.FLOAT_VEC3*/0x8B51,\"vec4\":/*laya.webgl.WebGLContext.FLOAT_VEC4*/0x8B52,\"ivec2\":/*laya.webgl.WebGLContext.INT_VEC2*/0x8B53,\"ivec3\":/*laya.webgl.WebGLContext.INT_VEC3*/0x8B54,\"ivec4\":/*laya.webgl.WebGLContext.INT_VEC4*/0x8B55,\"bvec2\":/*laya.webgl.WebGLContext.BOOL_VEC2*/0x8B57,\"bvec3\":/*laya.webgl.WebGLContext.BOOL_VEC3*/0x8B58,\"bvec4\":/*laya.webgl.WebGLContext.BOOL_VEC4*/0x8B59,\"mat2\":/*laya.webgl.WebGLContext.FLOAT_MAT2*/0x8B5A,\"mat3\":/*laya.webgl.WebGLContext.FLOAT_MAT3*/0x8B5B,\"mat4\":/*laya.webgl.WebGLContext.FLOAT_MAT4*/0x8B5C,\"sampler2D\":/*laya.webgl.WebGLContext.SAMPLER_2D*/0x8B5E,\"samplerCube\":/*laya.webgl.WebGLContext.SAMPLER_CUBE*/0x8B60};},'_splitToWordExps3',function(){return this._splitToWordExps3=new RegExp(\"[ \\\\t=\\\\+\\\\-*/&%!<>!%\\(\\),;\\\\|]\",\"g\");}\n\t]);\n\tShaderCompile.__init$=function(){\n\t\t//class ShaderNode\n\t\tShaderNode=(function(){\n\t\t\tfunction ShaderNode(includefiles){\n\t\t\t\tthis.childs=[];\n\t\t\t\tthis.text=\"\";\n\t\t\t\tthis.parent=null;\n\t\t\t\tthis.name=null;\n\t\t\t\tthis.noCompile=false;\n\t\t\t\tthis.includefiles=null;\n\t\t\t\tthis.condition=null;\n\t\t\t\tthis.conditionType=0;\n\t\t\t\tthis.useFuns=\"\";\n\t\t\t\tthis.z=0;\n\t\t\t\tthis.src=null;\n\t\t\t\tthis.includefiles=includefiles;\n\t\t\t}\n\t\t\t__class(ShaderNode,'');\n\t\t\tvar __proto=ShaderNode.prototype;\n\t\t\t__proto.setParent=function(parent){\n\t\t\t\tparent.childs.push(this);\n\t\t\t\tthis.z=parent.z+1;\n\t\t\t\tthis.parent=parent;\n\t\t\t}\n\t\t\t__proto.setCondition=function(condition,type){\n\t\t\t\tif (condition){\n\t\t\t\t\tthis.conditionType=type;\n\t\t\t\t\tcondition=condition.replace(/(\\s*$)/g,\"\");\n\t\t\t\t\tthis.condition=function (){\n\t\t\t\t\t\treturn this[condition];\n\t\t\t\t\t}\n\t\t\t\t\tthis.condition.__condition=condition;\n\t\t\t\t}\n\t\t\t}\n\t\t\t__proto.toscript=function(def,out){\n\t\t\t\treturn this._toscript(def,out,++ShaderNode.__id);\n\t\t\t}\n\t\t\t__proto._toscript=function(def,out,id){\n\t\t\t\tif (this.childs.length < 1 && !this.text)return out;\n\t\t\t\tvar outIndex=out.length;\n\t\t\t\tif (this.condition){\n\t\t\t\t\tvar ifdef=!!this.condition.call(def);\n\t\t\t\t\tthis.conditionType===/*laya.webgl.utils.ShaderCompile.IFDEF_ELSE*/2 && (ifdef=!ifdef);\n\t\t\t\t\tif (!ifdef)return out;\n\t\t\t\t}\n\t\t\t\tthis.text && out.push(this.text);\n\t\t\t\tthis.childs.length > 0 && this.childs.forEach(function(o,index,arr){\n\t\t\t\t\to._toscript(def,out,id);\n\t\t\t\t});\n\t\t\t\tif (this.includefiles.length > 0 && this.useFuns.length > 0){\n\t\t\t\t\tvar funsCode;\n\t\t\t\t\tfor (var i=0,n=this.includefiles.length;i < n;i++){\n\t\t\t\t\t\tif (this.includefiles[i].curUseID==id){\n\t\t\t\t\t\t\tcontinue ;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfunsCode=this.includefiles[i].file.getFunsScript(this.useFuns);\n\t\t\t\t\t\tif (funsCode.length > 0){\n\t\t\t\t\t\t\tthis.includefiles[i].curUseID=id;\n\t\t\t\t\t\t\tout[0]=funsCode+out[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\tShaderNode.__id=1;\n\t\t\treturn ShaderNode;\n\t\t})()\n\t\t//class InlcudeFile\n\t\tInlcudeFile=(function(){\n\t\t\tfunction InlcudeFile(txt){\n\t\t\t\tthis.script=null;\n\t\t\t\tthis.codes={};\n\t\t\t\tthis.funs={};\n\t\t\t\tthis.curUseID=-1;\n\t\t\t\tthis.funnames=\"\";\n\t\t\t\tthis.script=txt;\n\t\t\t\tvar begin=0,ofs=0,end=0;\n\t\t\t\twhile (true){\n\t\t\t\t\tbegin=txt.indexOf(\"#begin\",begin);\n\t\t\t\t\tif (begin < 0)break ;\n\t\t\t\t\tend=begin+5;\n\t\t\t\t\twhile (true){\n\t\t\t\t\t\tend=txt.indexOf(\"#end\",end);\n\t\t\t\t\t\tif (end < 0)break ;\n\t\t\t\t\t\tif (txt.charAt(end+4)==='i')\n\t\t\t\t\t\t\tend+=5;\n\t\t\t\t\t\telse break ;\n\t\t\t\t\t}\n\t\t\t\t\tif (end < 0){\n\t\t\t\t\t\tthrow \"add include err,no #end:\"+txt;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tofs=txt.indexOf('\\n',begin);\n\t\t\t\t\tvar words=ShaderCompile.splitToWords(txt.substr(begin,ofs-begin),null);\n\t\t\t\t\tif (words[1]=='code'){\n\t\t\t\t\t\tthis.codes[words[2]]=txt.substr(ofs+1,end-ofs-1);\n\t\t\t\t\t\t}else if (words[1]=='function'){\n\t\t\t\t\t\tofs=txt.indexOf(\"function\",begin);\n\t\t\t\t\t\tofs+=\"function\".length;\n\t\t\t\t\t\tthis.funs[words[3]]=txt.substr(ofs+1,end-ofs-1);\n\t\t\t\t\t\tthis.funnames+=words[3]+\";\";\n\t\t\t\t\t}\n\t\t\t\t\tbegin=end+1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t__class(InlcudeFile,'');\n\t\t\tvar __proto=InlcudeFile.prototype;\n\t\t\t__proto.getWith=function(name){\n\t\t\t\tvar r=name ? this.codes[name] :this.script;\n\t\t\t\tif (!r){\n\t\t\t\t\tthrow \"get with error:\"+name;\n\t\t\t\t}\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\t__proto.getFunsScript=function(funsdef){\n\t\t\t\tvar r=\"\";\n\t\t\t\tfor (var i in this.funs){\n\t\t\t\t\tif (funsdef.indexOf(i+\";\")>=0){\n\t\t\t\t\t\tr+=this.funs[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\treturn InlcudeFile;\n\t\t})()\n\t}\n\n\treturn ShaderCompile;\n})()\n\n\n/**\n*@private\n*/\n//class laya.webgl.WebGL\nvar WebGL=(function(){\n\tfunction WebGL(){}\n\t__class(WebGL,'laya.webgl.WebGL');\n\tWebGL._uint8ArraySlice=function(){\n\t\tvar _this=/*__JS__ */this;\n\t\tvar sz=_this.length;\n\t\tvar dec=new Uint8Array(_this.length);\n\t\tfor (var i=0;i < sz;i++)dec[i]=_this[i];\n\t\treturn dec;\n\t}\n\n\tWebGL._float32ArraySlice=function(){\n\t\tvar _this=/*__JS__ */this;\n\t\tvar sz=_this.length;\n\t\tvar dec=new Float32Array(_this.length);\n\t\tfor (var i=0;i < sz;i++)dec[i]=_this[i];\n\t\treturn dec;\n\t}\n\n\tWebGL._uint16ArraySlice=function(__arg){\n\t\tvar arg=arguments;\n\t\tvar _this=/*__JS__ */this;\n\t\tvar sz=0;\n\t\tvar dec;\n\t\tvar i=0;\n\t\tif (arg.length===0){\n\t\t\tsz=_this.length;\n\t\t\tdec=new Uint16Array(sz);\n\t\t\tfor (i=0;i < sz;i++)\n\t\t\tdec[i]=_this[i];\n\t\t\t}else if (arg.length===2){\n\t\t\tvar start=arg[0];\n\t\t\tvar end=arg[1];\n\t\t\tif (end > start){\n\t\t\t\tsz=end-start;\n\t\t\t\tdec=new Uint16Array(sz);\n\t\t\t\tfor (i=start;i < end;i++)\n\t\t\t\tdec[i-start]=_this[i];\n\t\t\t\t}else {\n\t\t\t\tdec=new Uint16Array(0);\n\t\t\t}\n\t\t}\n\t\treturn dec;\n\t}\n\n\tWebGL.expandContext=function(){\n\t\tvar from=Context.prototype;\n\t\tvar to=/*__JS__ */CanvasRenderingContext2D.prototype;\n\t\tto.fillTrangles=from.fillTrangles;\n\t\tBuffer2D.__int__(null);\n\t\tto.setIBVB=function (x,y,ib,vb,numElement,mat,shader,shaderValues,startIndex,offset){\n\t\t\t(startIndex===void 0)&& (startIndex=0);\n\t\t\t(offset===void 0)&& (offset=0);\n\t\t\tif (ib===null){\n\t\t\t\tthis._ib=this._ib || IndexBuffer2D.QuadrangleIB;\n\t\t\t\tib=this._ib;\n\t\t\t\tGlUtils.expandIBQuadrangle(ib,(vb._byteLength / (4 *16)+8));\n\t\t\t}\n\t\t\tthis._setIBVB(x,y,ib,vb,numElement,mat,shader,shaderValues,startIndex,offset);\n\t\t};\n\t\tto.fillTrangles=function (tex,x,y,points,m){\n\t\t\tthis._curMat=this._curMat || Matrix.create();\n\t\t\tthis._vb=this._vb || VertexBuffer2D.create();\n\t\t\tif (!this._ib){\n\t\t\t\tthis._ib=IndexBuffer2D.create();\n\t\t\t\tGlUtils.fillIBQuadrangle(this._ib,length / 4);\n\t\t\t};\n\t\t\tvar vb=this._vb;\n\t\t\tvar length=points.length >> 4;\n\t\t\tGlUtils.fillTranglesVB(vb,x,y,points,m || this._curMat,0,0);\n\t\t\tGlUtils.expandIBQuadrangle(this._ib,(vb._byteLength / (4 *16)+8));\n\t\t\tvar shaderValues=new Value2D(0x01,0);\n\t\t\tshaderValues.textureHost=tex;\n\t\t\tvar sd=new Shader2X(\"attribute vec2 position; attribute vec2 texcoord; uniform vec2 size; uniform mat4 mmat; varying vec2 v_texcoord; void main() { vec4 p=vec4(position.xy,0.0,1.0);vec4 pos=mmat*p; gl_Position =vec4((pos.x/size.x-0.5)*2.0,(0.5-pos.y/size.y)*2.0,pos.z,1.0); v_texcoord = texcoord; }\",\"precision mediump float; varying vec2 v_texcoord; uniform sampler2D texture; void main() {vec4 color= texture2D(texture, v_texcoord); color.a*=1.0; gl_FragColor= color;}\");\n\t\t\t/*__JS__ */vb._vertType=3;\n\t\t\tthis._setIBVB(x,y,this._ib,vb,length *6,m,sd,shaderValues,0,0);\n\t\t}\n\t}\n\n\tWebGL.enable=function(){\n\t\tBrowser.__init__();\n\t\tif (Render.isConchApp){\n\t\t\tif (!Render.isConchWebGL){\n\t\t\t\tRunDriver.skinAniSprite=function (){\n\t\t\t\t\tvar tSkinSprite=new SkinMesh()\n\t\t\t\t\treturn tSkinSprite;\n\t\t\t\t}\n\t\t\t\tWebGL.expandContext();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tRunDriver.getWebGLContext=function getWebGLContext (canvas){\n\t\t\tvar gl;\n\t\t\tvar names=[\"webgl\",\"experimental-webgl\",\"webkit-3d\",\"moz-webgl\"];\n\t\t\tfor (var i=0;i < names.length;i++){\n\t\t\t\ttry {\n\t\t\t\t\tgl=canvas.getContext(names[i],{stencil:Config.isStencil,alpha:Config.isAlpha,antialias:Config.isAntialias,premultipliedAlpha:Config.premultipliedAlpha,preserveDrawingBuffer:Config.preserveDrawingBuffer});\n\t\t\t\t}catch (e){}\n\t\t\t\tif (gl)\n\t\t\t\t\treturn gl;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\tWebGL.mainContext=RunDriver.getWebGLContext(Render._mainCanvas);\n\t\tif (WebGL.mainContext==null)\n\t\t\treturn false;\n\t\tif (Render.isWebGL)return true;\n\t\tHTMLImage.create=function (src,def){\n\t\t\treturn new WebGLImage(src,def);\n\t\t}\n\t\tHTMLSubImage.create=function (canvas,offsetX,offsetY,width,height,atlasImage,src){\n\t\t\treturn new WebGLSubImage(canvas,offsetX,offsetY,width,height,atlasImage,src);\n\t\t}\n\t\tRender.WebGL=WebGL;\n\t\tRender.isWebGL=true;\n\t\tDrawText.__init__();\n\t\tRunDriver.createRenderSprite=function (type,next){\n\t\t\treturn new RenderSprite3D(type,next);\n\t\t}\n\t\tRunDriver.createWebGLContext2D=function (c){\n\t\t\treturn new WebGLContext2D(c);\n\t\t}\n\t\tRunDriver.changeWebGLSize=function (width,height){\n\t\t\tlaya.webgl.WebGL.onStageResize(width,height);\n\t\t}\n\t\tRunDriver.createGraphics=function (){\n\t\t\treturn new GraphicsGL();\n\t\t};\n\t\tvar action=RunDriver.createFilterAction;\n\t\tRunDriver.createFilterAction=action ? action :function (type){\n\t\t\treturn new ColorFilterActionGL()\n\t\t}\n\t\tRunDriver.clear=function (color){\n\t\t\tRenderState2D.worldScissorTest && laya.webgl.WebGL.mainContext.disable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t\tvar ctx=Render.context.ctx;\n\t\t\tvar c=color && (ctx._submits._length==0 || Config.preserveDrawingBuffer)? Color.create(color)._color :Stage._wgColor;\n\t\t\tif (c)ctx.clearBG(c[0],c[1],c[2],c[3]);\n\t\t\telse ctx.clearBG(0,0,0,0);\n\t\t\tRenderState2D.clear();\n\t\t}\n\t\tRunDriver.addToAtlas=function (texture,force){\n\t\t\t(force===void 0)&& (force=false);\n\t\t\tvar bitmap=texture.bitmap;\n\t\t\tif (!Render.optimizeTextureMemory(texture.url,texture)){\n\t\t\t\t(bitmap).enableMerageInAtlas=false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ((Laya.__typeof(bitmap,'laya.webgl.resource.IMergeAtlasBitmap'))&& ((bitmap).allowMerageInAtlas)){\n\t\t\t\tbitmap.on(/*laya.events.Event.RECOVERED*/\"recovered\",texture,texture.addTextureToAtlas);\n\t\t\t}\n\t\t}\n\t\tRunDriver.isAtlas=function (bitmap){\n\t\t\treturn (bitmap instanceof laya.webgl.atlas.AtlasWebGLCanvas );\n\t\t}\n\t\tAtlasResourceManager._enable();\n\t\tRunDriver.beginFlush=function (){\n\t\t\tvar atlasResourceManager=AtlasResourceManager.instance;\n\t\t\tvar count=atlasResourceManager.getAtlaserCount();\n\t\t\tfor (var i=0;i < count;i++){\n\t\t\t\tvar atlerCanvas=atlasResourceManager.getAtlaserByIndex(i).texture;\n\t\t\t\t(atlerCanvas._flashCacheImageNeedFlush)&& (RunDriver.flashFlushImage(atlerCanvas));\n\t\t\t}\n\t\t}\n\t\tRunDriver.drawToCanvas=function (sprite,_renderType,canvasWidth,canvasHeight,offsetX,offsetY){\n\t\t\tif (canvasWidth <=0 || canvasHeight <=0){\n\t\t\t\tconsole.log(\"[error] canvasWidth and canvasHeight should greater than zero\");\n\t\t\t}\n\t\t\tcanvasWidth |=0;canvasHeight |=0;offsetX |=0;offsetY |=0;\n\t\t\tvar renderTarget=RenderTarget2D.create(canvasWidth,canvasHeight,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,0,false);\n\t\t\trenderTarget.start();\n\t\t\trenderTarget.clear(0,0,0,0);\n\t\t\tRender.context.clear();\n\t\t\tRenderSprite.renders[_renderType]._fun(sprite,Render.context,offsetX,RenderState2D.height-canvasHeight+offsetY);\n\t\t\tRender.context.flush();\n\t\t\trenderTarget.end();\n\t\t\tvar pixels=renderTarget.getData(0,0,canvasWidth,canvasHeight);\n\t\t\trenderTarget.recycle();\n\t\t\tif (pixels.byteLength !=canvasWidth *canvasHeight *4){\n\t\t\t\tconsole.log('drawToCanvas error: w:'+canvasWidth+',h:'+canvasHeight+',datalen:'+pixels.byteLength);\n\t\t\t\treturn;\n\t\t\t};\n\t\t\tvar htmlCanvas=new WebGLCanvas();\n\t\t\thtmlCanvas._canvas=Browser.createElement(\"canvas\");\n\t\t\thtmlCanvas.size(canvasWidth,canvasHeight);\n\t\t\tvar context=htmlCanvas._canvas.getContext('2d');\n\t\t\tBrowser.canvas.size(canvasWidth,canvasHeight);\n\t\t\tvar tempContext=Browser.context;\n\t\t\tvar imgData=tempContext.createImageData(canvasWidth,canvasHeight);\n\t\t\timgData.data.set(/*__JS__ */new Uint8ClampedArray(pixels.buffer));\n\t\t\thtmlCanvas._imgData=imgData;\n\t\t\ttempContext.putImageData(imgData,0,0);\n\t\t\tcontext.save();\n\t\t\tcontext.translate(0,canvasHeight);\n\t\t\tcontext.scale(1,-1);\n\t\t\tcontext.drawImage(Browser.canvas.source,0,0);\n\t\t\tcontext.restore();\n\t\t\treturn htmlCanvas;\n\t\t}\n\t\tRunDriver.createFilterAction=function (type){\n\t\t\tvar action;\n\t\t\tswitch (type){\n\t\t\t\tcase /*laya.filters.Filter.COLOR*/0x20:\n\t\t\t\t\taction=new ColorFilterActionGL();\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\treturn action;\n\t\t}\n\t\tRunDriver.addTextureToAtlas=function (texture){\n\t\t\ttexture._uvID++;\n\t\t\tAtlasResourceManager._atlasRestore++;\n\t\t\t((texture.bitmap).enableMerageInAtlas)&& (AtlasResourceManager.instance.addToAtlas(texture));\n\t\t}\n\t\tRunDriver.getTexturePixels=function (value,x,y,width,height){\n\t\t\t(Render.context.ctx).clear();\n\t\t\tvar tSprite=new Sprite();\n\t\t\ttSprite.graphics.drawTexture(value,-x,-y);\n\t\t\tvar tRenderTarget=RenderTarget2D.create(width,height);\n\t\t\ttRenderTarget.start();\n\t\t\ttRenderTarget.clear(0,0,0,0);\n\t\t\ttSprite.render(Render.context,0,0);\n\t\t\t(Render.context.ctx).flush();\n\t\t\ttRenderTarget.end();\n\t\t\tvar tUint8Array=tRenderTarget.getData(0,0,width,height);\n\t\t\tvar tArray=[];\n\t\t\tvar tIndex=0;\n\t\t\tfor (var i=height-1;i >=0;i--){\n\t\t\t\tfor (var j=0;j < width;j++){\n\t\t\t\t\ttIndex=(i *width+j)*4;\n\t\t\t\t\ttArray.push(tUint8Array[tIndex]);\n\t\t\t\t\ttArray.push(tUint8Array[tIndex+1]);\n\t\t\t\t\ttArray.push(tUint8Array[tIndex+2]);\n\t\t\t\t\ttArray.push(tUint8Array[tIndex+3]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tArray;\n\t\t}\n\t\tRunDriver.skinAniSprite=function (){\n\t\t\tvar tSkinSprite=new SkinMesh()\n\t\t\treturn tSkinSprite;\n\t\t}\n\t\tHTMLCanvas.create=function (type,canvas){\n\t\t\tvar ret=new WebGLCanvas();\n\t\t\tret._imgData=canvas;\n\t\t\tret.flipY=false;\n\t\t\treturn ret;\n\t\t}\n\t\tFilter._filterStart=function (scope,sprite,context,x,y){\n\t\t\tvar b=scope.getValue(\"bounds\");\n\t\t\tvar source=RenderTarget2D.create(b.width,b.height);\n\t\t\tsource.start();\n\t\t\tsource.clear(0,0,0,0);\n\t\t\tscope.addValue(\"src\",source);\n\t\t\tscope.addValue(\"ScissorTest\",RenderState2D.worldScissorTest);\n\t\t\tif (RenderState2D.worldScissorTest){\n\t\t\t\tvar tClilpRect=new Rectangle();\n\t\t\t\ttClilpRect.copyFrom((context.ctx)._clipRect)\n\t\t\t\tscope.addValue(\"clipRect\",tClilpRect);\n\t\t\t\tRenderState2D.worldScissorTest=false;\n\t\t\t\tlaya.webgl.WebGL.mainContext.disable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t\t}\n\t\t}\n\t\tFilter._filterEnd=function (scope,sprite,context,x,y){\n\t\t\tvar b=scope.getValue(\"bounds\");\n\t\t\tvar source=scope.getValue(\"src\");\n\t\t\tsource.end();\n\t\t\tvar out=RenderTarget2D.create(b.width,b.height);\n\t\t\tout.start();\n\t\t\tout.clear(0,0,0,0);\n\t\t\tscope.addValue(\"out\",out);\n\t\t\tsprite._set$P('_filterCache',out);\n\t\t\tsprite._set$P('_isHaveGlowFilter',scope.getValue(\"_isHaveGlowFilter\"));\n\t\t}\n\t\tFilter._EndTarget=function (scope,context){\n\t\t\tvar source=scope.getValue(\"src\");\n\t\t\tsource.recycle();\n\t\t\tvar out=scope.getValue(\"out\");\n\t\t\tout.end();\n\t\t\tvar b=scope.getValue(\"ScissorTest\");\n\t\t\tif (b){\n\t\t\t\tRenderState2D.worldScissorTest=true;\n\t\t\t\tlaya.webgl.WebGL.mainContext.enable(/*laya.webgl.WebGLContext.SCISSOR_TEST*/0x0C11);\n\t\t\t\tcontext.ctx.save();\n\t\t\t\tvar tClipRect=scope.getValue(\"clipRect\");\n\t\t\t\t(context.ctx).clipRect(tClipRect.x,tClipRect.y,tClipRect.width,tClipRect.height);\n\t\t\t}\n\t\t}\n\t\tFilter._useSrc=function (scope){\n\t\t\tvar source=scope.getValue(\"out\");\n\t\t\tsource.end();\n\t\t\tsource=scope.getValue(\"src\");\n\t\t\tsource.start();\n\t\t\tsource.clear(0,0,0,0);\n\t\t}\n\t\tFilter._endSrc=function (scope){\n\t\t\tvar source=scope.getValue(\"src\");\n\t\t\tsource.end();\n\t\t}\n\t\tFilter._useOut=function (scope){\n\t\t\tvar source=scope.getValue(\"src\");\n\t\t\tsource.end();\n\t\t\tsource=scope.getValue(\"out\");\n\t\t\tsource.start();\n\t\t\tsource.clear(0,0,0,0);\n\t\t}\n\t\tFilter._endOut=function (scope){\n\t\t\tvar source=scope.getValue(\"out\");\n\t\t\tsource.end();\n\t\t}\n\t\tFilter._recycleScope=function (scope){\n\t\t\tscope.recycle();\n\t\t}\n\t\tFilter._filter=function (sprite,context,x,y){\n\t\t\tvar next=this._next;\n\t\t\tif (next){\n\t\t\t\tvar filters=sprite.filters,len=filters.length;\n\t\t\t\tif (len==1 && (filters[0].type==/*laya.filters.Filter.COLOR*/0x20)){\n\t\t\t\t\tcontext.ctx.save();\n\t\t\t\t\tcontext.ctx.setFilters([filters[0]]);\n\t\t\t\t\tnext._fun.call(next,sprite,context,x,y);\n\t\t\t\t\tcontext.ctx.restore();\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar shaderValue;\n\t\t\t\tvar b;\n\t\t\t\tvar scope=SubmitCMDScope.create();\n\t\t\t\tvar p=Point.TEMP;\n\t\t\t\tvar tMatrix=context.ctx._getTransformMatrix();\n\t\t\t\tvar mat=Matrix.create();\n\t\t\t\ttMatrix.copyTo(mat);\n\t\t\t\tvar tPadding=0;\n\t\t\t\tvar tHalfPadding=0;\n\t\t\t\tvar tIsHaveGlowFilter=false;\n\t\t\t\tvar out=sprite._$P._filterCache ? sprite._$P._filterCache :null;\n\t\t\t\tif (!out || sprite._repaint){\n\t\t\t\t\ttIsHaveGlowFilter=sprite._isHaveGlowFilter();\n\t\t\t\t\tscope.addValue(\"_isHaveGlowFilter\",tIsHaveGlowFilter);\n\t\t\t\t\tif (tIsHaveGlowFilter){\n\t\t\t\t\t\ttPadding=50;\n\t\t\t\t\t\ttHalfPadding=25;\n\t\t\t\t\t}\n\t\t\t\t\tb=new Rectangle();\n\t\t\t\t\tb.copyFrom((sprite).getSelfBounds());\n\t\t\t\t\tb.x+=(sprite).x;\n\t\t\t\t\tb.y+=(sprite).y;\n\t\t\t\t\tb.x-=(sprite).pivotX+4;\n\t\t\t\t\tb.y-=(sprite).pivotY+4;\n\t\t\t\t\tvar tSX=b.x;\n\t\t\t\t\tvar tSY=b.y;\n\t\t\t\t\tb.width+=(tPadding+8);\n\t\t\t\t\tb.height+=(tPadding+8);\n\t\t\t\t\tp.x=b.x *mat.a+b.y *mat.c;\n\t\t\t\t\tp.y=b.y *mat.d+b.x *mat.b;\n\t\t\t\t\tb.x=p.x;\n\t\t\t\t\tb.y=p.y;\n\t\t\t\t\tp.x=b.width *mat.a+b.height *mat.c;\n\t\t\t\t\tp.y=b.height *mat.d+b.width *mat.b;\n\t\t\t\t\tb.width=p.x;\n\t\t\t\t\tb.height=p.y;\n\t\t\t\t\tif (b.width <=0 || b.height <=0){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tout && out.recycle();\n\t\t\t\t\tscope.addValue(\"bounds\",b);\n\t\t\t\t\tvar submit=SubmitCMD.create([scope,sprite,context,0,0],Filter._filterStart);\n\t\t\t\t\tcontext.addRenderObject(submit);\n\t\t\t\t\t(context.ctx)._renderKey=0;\n\t\t\t\t\t(context.ctx)._shader2D.glTexture=null;\n\t\t\t\t\tvar tX=sprite.x-tSX+tHalfPadding;\n\t\t\t\t\tvar tY=sprite.y-tSY+tHalfPadding;\n\t\t\t\t\tnext._fun.call(next,sprite,context,tX,tY);\n\t\t\t\t\tsubmit=SubmitCMD.create([scope,sprite,context,0,0],Filter._filterEnd);\n\t\t\t\t\tcontext.addRenderObject(submit);\n\t\t\t\t\tfor (var i=0;i < len;i++){\n\t\t\t\t\t\tif (i !=0){\n\t\t\t\t\t\t\tsubmit=SubmitCMD.create([scope],Filter._useSrc);\n\t\t\t\t\t\t\tcontext.addRenderObject(submit);\n\t\t\t\t\t\t\tshaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);\n\t\t\t\t\t\t\tMatrix.TEMP.identity();\n\t\t\t\t\t\t\tcontext.ctx.drawTarget(scope,0,0,b.width,b.height,Matrix.TEMP,\"out\",shaderValue,null,BlendMode.TOINT.overlay);\n\t\t\t\t\t\t\tsubmit=SubmitCMD.create([scope],Filter._useOut);\n\t\t\t\t\t\t\tcontext.addRenderObject(submit);\n\t\t\t\t\t\t};\n\t\t\t\t\t\tvar fil=filters[i];\n\t\t\t\t\t\tfil.action.apply3d(scope,sprite,context,0,0);\n\t\t\t\t\t}\n\t\t\t\t\tsubmit=SubmitCMD.create([scope,context],Filter._EndTarget);\n\t\t\t\t\tcontext.addRenderObject(submit);\n\t\t\t\t\t}else {\n\t\t\t\t\ttIsHaveGlowFilter=sprite._$P._isHaveGlowFilter ? sprite._$P._isHaveGlowFilter :false;\n\t\t\t\t\tif (tIsHaveGlowFilter){\n\t\t\t\t\t\ttPadding=50;\n\t\t\t\t\t\ttHalfPadding=25;\n\t\t\t\t\t}\n\t\t\t\t\tb=sprite.getBounds();\n\t\t\t\t\tif (b.width <=0 || b.height <=0){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tb.width+=tPadding;\n\t\t\t\t\tb.height+=tPadding;\n\t\t\t\t\tp.x=b.x *mat.a+b.y *mat.c;\n\t\t\t\t\tp.y=b.y *mat.d+b.x *mat.b;\n\t\t\t\t\tb.x=p.x;\n\t\t\t\t\tb.y=p.y;\n\t\t\t\t\tp.x=b.width *mat.a+b.height *mat.c;\n\t\t\t\t\tp.y=b.height *mat.d+b.width *mat.b;\n\t\t\t\t\tb.width=p.x;\n\t\t\t\t\tb.height=p.y;\n\t\t\t\t\tscope.addValue(\"out\",out);\n\t\t\t\t}\n\t\t\t\tx=x-tHalfPadding-sprite.x;\n\t\t\t\ty=y-tHalfPadding-sprite.y;\n\t\t\t\tp.setTo(x,y);\n\t\t\t\tmat.transformPoint(p);\n\t\t\t\tx=p.x+b.x;\n\t\t\t\ty=p.y+b.y;\n\t\t\t\tshaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);\n\t\t\t\tMatrix.TEMP.identity();\n\t\t\t\t(context.ctx).drawTarget(scope,x,y,b.width,b.height,Matrix.TEMP,\"out\",shaderValue,null,BlendMode.TOINT.overlay);\n\t\t\t\tsubmit=SubmitCMD.create([scope],Filter._recycleScope);\n\t\t\t\tcontext.addRenderObject(submit);\n\t\t\t\tmat.destroy();\n\t\t\t}\n\t\t}\n\t\tFloat32Array.prototype.slice || (Float32Array.prototype.slice=WebGL._float32ArraySlice);\n\t\tUint16Array.prototype.slice || (Uint16Array.prototype.slice=WebGL._uint16ArraySlice);\n\t\tUint8Array.prototype.slice || (Uint8Array.prototype.slice=WebGL._uint8ArraySlice);\n\t\treturn true;\n\t}\n\n\tWebGL.onStageResize=function(width,height){\n\t\tif (WebGL.mainContext==null)return;\n\t\tWebGL.mainContext.viewport(0,0,width,height);\n\t\tRenderState2D.width=width;\n\t\tRenderState2D.height=height;\n\t}\n\n\tWebGL.onInvalidGLRes=function(){\n\t\tAtlasResourceManager.instance.freeAll();\n\t\tResourceManager.releaseContentManagers(true);\n\t\tWebGL.doNodeRepaint(Laya.stage);\n\t\tWebGL.mainContext.viewport(0,0,RenderState2D.width,RenderState2D.height);\n\t\tLaya.stage.event(/*laya.events.Event.DEVICE_LOST*/\"devicelost\");\n\t}\n\n\tWebGL.doNodeRepaint=function(sprite){\n\t\t(sprite.numChildren==0)&& (sprite.repaint());\n\t\tfor (var i=0;i < sprite.numChildren;i++)\n\t\tWebGL.doNodeRepaint(sprite.getChildAt(i));\n\t}\n\n\tWebGL.init=function(canvas,width,height){\n\t\tWebGL.mainCanvas=canvas;\n\t\tHTMLCanvas._createContext=function (canvas){\n\t\t\treturn new WebGLContext2D(canvas);\n\t\t}\n\t\tWebGLCanvas._createContext=function (canvas){\n\t\t\treturn new WebGLContext2D(canvas);\n\t\t};\n\t\tvar gl=laya.webgl.WebGL.mainContext;\n\t\tif (gl.getShaderPrecisionFormat !=null){\n\t\t\tvar vertexPrecisionFormat=gl.getShaderPrecisionFormat(/*laya.webgl.WebGLContext.VERTEX_SHADER*/0x8B31,/*laya.webgl.WebGLContext.HIGH_FLOAT*/0x8DF2);\n\t\t\tvar framePrecisionFormat=gl.getShaderPrecisionFormat(/*laya.webgl.WebGLContext.FRAGMENT_SHADER*/0x8B30,/*laya.webgl.WebGLContext.HIGH_FLOAT*/0x8DF2);\n\t\t\tWebGL.shaderHighPrecision=(vertexPrecisionFormat.precision&&framePrecisionFormat.precision)? true :false;\n\t\t\t}else {\n\t\t\tWebGL.shaderHighPrecision=false;\n\t\t}\n\t\tWebGL.compressAstc=gl.getExtension(\"WEBGL_compressed_texture_astc\");\n\t\tWebGL.compressAtc=gl.getExtension(\"WEBGL_compressed_texture_atc\");\n\t\tWebGL.compressEtc=gl.getExtension(\"WEBGL_compressed_texture_etc\");\n\t\tWebGL.compressEtc1=gl.getExtension(\"WEBGL_compressed_texture_etc1\");\n\t\tWebGL.compressPvrtc=gl.getExtension(\"WEBGL_compressed_texture_pvrtc\");\n\t\tWebGL.compressS3tc=gl.getExtension(\"WEBGL_compressed_texture_s3tc\");\n\t\tWebGL.compressS3tc_srgb=gl.getExtension(\"WEBGL_compressed_texture_s3tc_srgb\");\n\t\tgl.deleteTexture1=gl.deleteTexture;\n\t\tgl.deleteTexture=function (t){\n\t\t\tif (t==WebGLContext.curBindTexValue){\n\t\t\t\tWebGLContext.curBindTexValue=null;\n\t\t\t}\n\t\t\tgl.deleteTexture1(t);\n\t\t}\n\t\tWebGL.onStageResize(width,height);\n\t\tif (WebGL.mainContext==null)\n\t\t\tthrow new Error(\"webGL getContext err!\");\n\t\tSystem.__init__();\n\t\tAtlasResourceManager.__init__();\n\t\tShaderDefines2D.__init__();\n\t\tSubmit.__init__();\n\t\tWebGLContext2D.__init__();\n\t\tValue2D.__init__();\n\t\tShader2D.__init__();\n\t\tBuffer2D.__int__(gl);\n\t\tBlendMode._init_(gl);\n\t\tif (Render.isConchApp){\n\t\t\t/*__JS__ */conch.setOnInvalidGLRes(WebGL.onInvalidGLRes);\n\t\t}\n\t}\n\n\tWebGL.compressAstc=null;\n\tWebGL.compressAtc=null;\n\tWebGL.compressEtc=null;\n\tWebGL.compressEtc1=null;\n\tWebGL.compressPvrtc=null;\n\tWebGL.compressS3tc=null;\n\tWebGL.compressS3tc_srgb=null;\n\tWebGL.mainCanvas=null;\n\tWebGL.mainContext=null;\n\tWebGL.antialias=true;\n\tWebGL.shaderHighPrecision=false;\n\tWebGL._bg_null=[0,0,0,0];\n\treturn WebGL;\n})()\n\n\n//class laya.webgl.WebGLContext\nvar WebGLContext=(function(){\n\tfunction WebGLContext(){}\n\t__class(WebGLContext,'laya.webgl.WebGLContext');\n\tWebGLContext.UseProgram=function(program){\n\t\tif (WebGLContext._useProgram===program)return false;\n\t\tWebGL.mainContext.useProgram(program);\n\t\tWebGLContext._useProgram=program;\n\t\treturn true;\n\t}\n\n\tWebGLContext.setDepthTest=function(gl,value){\n\t\tvalue!==WebGLContext._depthTest && (WebGLContext._depthTest=value,value?gl.enable(/*CLASS CONST:laya.webgl.WebGLContext.DEPTH_TEST*/0x0B71):gl.disable(/*CLASS CONST:laya.webgl.WebGLContext.DEPTH_TEST*/0x0B71));\n\t}\n\n\tWebGLContext.setDepthMask=function(gl,value){\n\t\tvalue!==WebGLContext._depthMask && (WebGLContext._depthMask=value,gl.depthMask(value));\n\t}\n\n\tWebGLContext.setDepthFunc=function(gl,value){\n\t\tvalue!==WebGLContext._depthFunc && (WebGLContext._depthFunc=value,gl.depthFunc(value));\n\t}\n\n\tWebGLContext.setBlend=function(gl,value){\n\t\tvalue!==WebGLContext._blend && (WebGLContext._blend=value,value?gl.enable(/*CLASS CONST:laya.webgl.WebGLContext.BLEND*/0x0BE2):gl.disable(/*CLASS CONST:laya.webgl.WebGLContext.BLEND*/0x0BE2));\n\t}\n\n\tWebGLContext.setBlendFunc=function(gl,sFactor,dFactor){\n\t\t(sFactor!==WebGLContext._sFactor||dFactor!==WebGLContext._dFactor)&& (WebGLContext._sFactor=sFactor,WebGLContext._dFactor=dFactor,gl.blendFunc(sFactor,dFactor));\n\t}\n\n\tWebGLContext.setCullFace=function(gl,value){\n\t\tvalue!==WebGLContext._cullFace && (WebGLContext._cullFace=value,value?gl.enable(/*CLASS CONST:laya.webgl.WebGLContext.CULL_FACE*/0x0B44):gl.disable(/*CLASS CONST:laya.webgl.WebGLContext.CULL_FACE*/0x0B44));\n\t}\n\n\tWebGLContext.setFrontFace=function(gl,value){\n\t\tvalue!==WebGLContext._frontFace && (WebGLContext._frontFace=value,gl.frontFace(value));\n\t}\n\n\tWebGLContext.bindTexture=function(gl,target,texture){\n\t\tgl.bindTexture(target,texture);\n\t\tWebGLContext.curBindTexTarget=target;\n\t\tWebGLContext.curBindTexValue=texture;\n\t}\n\n\tWebGLContext.DEPTH_BUFFER_BIT=0x00000100;\n\tWebGLContext.STENCIL_BUFFER_BIT=0x00000400;\n\tWebGLContext.COLOR_BUFFER_BIT=0x00004000;\n\tWebGLContext.POINTS=0x0000;\n\tWebGLContext.LINES=0x0001;\n\tWebGLContext.LINE_LOOP=0x0002;\n\tWebGLContext.LINE_STRIP=0x0003;\n\tWebGLContext.TRIANGLES=0x0004;\n\tWebGLContext.TRIANGLE_STRIP=0x0005;\n\tWebGLContext.TRIANGLE_FAN=0x0006;\n\tWebGLContext.ZERO=0;\n\tWebGLContext.ONE=1;\n\tWebGLContext.SRC_COLOR=0x0300;\n\tWebGLContext.ONE_MINUS_SRC_COLOR=0x0301;\n\tWebGLContext.SRC_ALPHA=0x0302;\n\tWebGLContext.ONE_MINUS_SRC_ALPHA=0x0303;\n\tWebGLContext.DST_ALPHA=0x0304;\n\tWebGLContext.ONE_MINUS_DST_ALPHA=0x0305;\n\tWebGLContext.DST_COLOR=0x0306;\n\tWebGLContext.ONE_MINUS_DST_COLOR=0x0307;\n\tWebGLContext.SRC_ALPHA_SATURATE=0x0308;\n\tWebGLContext.FUNC_ADD=0x8006;\n\tWebGLContext.BLEND_EQUATION=0x8009;\n\tWebGLContext.BLEND_EQUATION_RGB=0x8009;\n\tWebGLContext.BLEND_EQUATION_ALPHA=0x883D;\n\tWebGLContext.FUNC_SUBTRACT=0x800A;\n\tWebGLContext.FUNC_REVERSE_SUBTRACT=0x800B;\n\tWebGLContext.BLEND_DST_RGB=0x80C8;\n\tWebGLContext.BLEND_SRC_RGB=0x80C9;\n\tWebGLContext.BLEND_DST_ALPHA=0x80CA;\n\tWebGLContext.BLEND_SRC_ALPHA=0x80CB;\n\tWebGLContext.CONSTANT_COLOR=0x8001;\n\tWebGLContext.ONE_MINUS_CONSTANT_COLOR=0x8002;\n\tWebGLContext.CONSTANT_ALPHA=0x8003;\n\tWebGLContext.ONE_MINUS_CONSTANT_ALPHA=0x8004;\n\tWebGLContext.BLEND_COLOR=0x8005;\n\tWebGLContext.ARRAY_BUFFER=0x8892;\n\tWebGLContext.ELEMENT_ARRAY_BUFFER=0x8893;\n\tWebGLContext.ARRAY_BUFFER_BINDING=0x8894;\n\tWebGLContext.ELEMENT_ARRAY_BUFFER_BINDING=0x8895;\n\tWebGLContext.STREAM_DRAW=0x88E0;\n\tWebGLContext.STATIC_DRAW=0x88E4;\n\tWebGLContext.DYNAMIC_DRAW=0x88E8;\n\tWebGLContext.BUFFER_SIZE=0x8764;\n\tWebGLContext.BUFFER_USAGE=0x8765;\n\tWebGLContext.CURRENT_VERTEX_ATTRIB=0x8626;\n\tWebGLContext.FRONT=0x0404;\n\tWebGLContext.BACK=0x0405;\n\tWebGLContext.CULL_FACE=0x0B44;\n\tWebGLContext.FRONT_AND_BACK=0x0408;\n\tWebGLContext.BLEND=0x0BE2;\n\tWebGLContext.DITHER=0x0BD0;\n\tWebGLContext.STENCIL_TEST=0x0B90;\n\tWebGLContext.DEPTH_TEST=0x0B71;\n\tWebGLContext.SCISSOR_TEST=0x0C11;\n\tWebGLContext.POLYGON_OFFSET_FILL=0x8037;\n\tWebGLContext.SAMPLE_ALPHA_TO_COVERAGE=0x809E;\n\tWebGLContext.SAMPLE_COVERAGE=0x80A0;\n\tWebGLContext.NO_ERROR=0;\n\tWebGLContext.INVALID_ENUM=0x0500;\n\tWebGLContext.INVALID_VALUE=0x0501;\n\tWebGLContext.INVALID_OPERATION=0x0502;\n\tWebGLContext.OUT_OF_MEMORY=0x0505;\n\tWebGLContext.CW=0x0900;\n\tWebGLContext.CCW=0x0901;\n\tWebGLContext.LINE_WIDTH=0x0B21;\n\tWebGLContext.ALIASED_POINT_SIZE_RANGE=0x846D;\n\tWebGLContext.ALIASED_LINE_WIDTH_RANGE=0x846E;\n\tWebGLContext.CULL_FACE_MODE=0x0B45;\n\tWebGLContext.FRONT_FACE=0x0B46;\n\tWebGLContext.DEPTH_RANGE=0x0B70;\n\tWebGLContext.DEPTH_WRITEMASK=0x0B72;\n\tWebGLContext.DEPTH_CLEAR_VALUE=0x0B73;\n\tWebGLContext.DEPTH_FUNC=0x0B74;\n\tWebGLContext.STENCIL_CLEAR_VALUE=0x0B91;\n\tWebGLContext.STENCIL_FUNC=0x0B92;\n\tWebGLContext.STENCIL_FAIL=0x0B94;\n\tWebGLContext.STENCIL_PASS_DEPTH_FAIL=0x0B95;\n\tWebGLContext.STENCIL_PASS_DEPTH_PASS=0x0B96;\n\tWebGLContext.STENCIL_REF=0x0B97;\n\tWebGLContext.STENCIL_VALUE_MASK=0x0B93;\n\tWebGLContext.STENCIL_WRITEMASK=0x0B98;\n\tWebGLContext.STENCIL_BACK_FUNC=0x8800;\n\tWebGLContext.STENCIL_BACK_FAIL=0x8801;\n\tWebGLContext.STENCIL_BACK_PASS_DEPTH_FAIL=0x8802;\n\tWebGLContext.STENCIL_BACK_PASS_DEPTH_PASS=0x8803;\n\tWebGLContext.STENCIL_BACK_REF=0x8CA3;\n\tWebGLContext.STENCIL_BACK_VALUE_MASK=0x8CA4;\n\tWebGLContext.STENCIL_BACK_WRITEMASK=0x8CA5;\n\tWebGLContext.VIEWPORT=0x0BA2;\n\tWebGLContext.SCISSOR_BOX=0x0C10;\n\tWebGLContext.COLOR_CLEAR_VALUE=0x0C22;\n\tWebGLContext.COLOR_WRITEMASK=0x0C23;\n\tWebGLContext.UNPACK_ALIGNMENT=0x0CF5;\n\tWebGLContext.PACK_ALIGNMENT=0x0D05;\n\tWebGLContext.MAX_TEXTURE_SIZE=0x0D33;\n\tWebGLContext.MAX_VIEWPORT_DIMS=0x0D3A;\n\tWebGLContext.SUBPIXEL_BITS=0x0D50;\n\tWebGLContext.RED_BITS=0x0D52;\n\tWebGLContext.GREEN_BITS=0x0D53;\n\tWebGLContext.BLUE_BITS=0x0D54;\n\tWebGLContext.ALPHA_BITS=0x0D55;\n\tWebGLContext.DEPTH_BITS=0x0D56;\n\tWebGLContext.STENCIL_BITS=0x0D57;\n\tWebGLContext.POLYGON_OFFSET_UNITS=0x2A00;\n\tWebGLContext.POLYGON_OFFSET_FACTOR=0x8038;\n\tWebGLContext.TEXTURE_BINDING_2D=0x8069;\n\tWebGLContext.SAMPLE_BUFFERS=0x80A8;\n\tWebGLContext.SAMPLES=0x80A9;\n\tWebGLContext.SAMPLE_COVERAGE_VALUE=0x80AA;\n\tWebGLContext.SAMPLE_COVERAGE_INVERT=0x80AB;\n\tWebGLContext.NUM_COMPRESSED_TEXTURE_FORMATS=0x86A2;\n\tWebGLContext.COMPRESSED_TEXTURE_FORMATS=0x86A3;\n\tWebGLContext.DONT_CARE=0x1100;\n\tWebGLContext.FASTEST=0x1101;\n\tWebGLContext.NICEST=0x1102;\n\tWebGLContext.GENERATE_MIPMAP_HINT=0x8192;\n\tWebGLContext.BYTE=0x1400;\n\tWebGLContext.UNSIGNED_BYTE=0x1401;\n\tWebGLContext.SHORT=0x1402;\n\tWebGLContext.UNSIGNED_SHORT=0x1403;\n\tWebGLContext.INT=0x1404;\n\tWebGLContext.UNSIGNED_INT=0x1405;\n\tWebGLContext.FLOAT=0x1406;\n\tWebGLContext.DEPTH_COMPONENT=0x1902;\n\tWebGLContext.ALPHA=0x1906;\n\tWebGLContext.RGB=0x1907;\n\tWebGLContext.RGBA=0x1908;\n\tWebGLContext.LUMINANCE=0x1909;\n\tWebGLContext.LUMINANCE_ALPHA=0x190A;\n\tWebGLContext.UNSIGNED_SHORT_4_4_4_4=0x8033;\n\tWebGLContext.UNSIGNED_SHORT_5_5_5_1=0x8034;\n\tWebGLContext.UNSIGNED_SHORT_5_6_5=0x8363;\n\tWebGLContext.FRAGMENT_SHADER=0x8B30;\n\tWebGLContext.VERTEX_SHADER=0x8B31;\n\tWebGLContext.MAX_VERTEX_ATTRIBS=0x8869;\n\tWebGLContext.MAX_VERTEX_UNIFORM_VECTORS=0x8DFB;\n\tWebGLContext.MAX_VARYING_VECTORS=0x8DFC;\n\tWebGLContext.MAX_COMBINED_TEXTURE_IMAGE_UNITS=0x8B4D;\n\tWebGLContext.MAX_VERTEX_TEXTURE_IMAGE_UNITS=0x8B4C;\n\tWebGLContext.MAX_TEXTURE_IMAGE_UNITS=0x8872;\n\tWebGLContext.MAX_FRAGMENT_UNIFORM_VECTORS=0x8DFD;\n\tWebGLContext.SHADER_TYPE=0x8B4F;\n\tWebGLContext.DELETE_STATUS=0x8B80;\n\tWebGLContext.LINK_STATUS=0x8B82;\n\tWebGLContext.VALIDATE_STATUS=0x8B83;\n\tWebGLContext.ATTACHED_SHADERS=0x8B85;\n\tWebGLContext.ACTIVE_UNIFORMS=0x8B86;\n\tWebGLContext.ACTIVE_ATTRIBUTES=0x8B89;\n\tWebGLContext.SHADING_LANGUAGE_VERSION=0x8B8C;\n\tWebGLContext.CURRENT_PROGRAM=0x8B8D;\n\tWebGLContext.NEVER=0x0200;\n\tWebGLContext.LESS=0x0201;\n\tWebGLContext.EQUAL=0x0202;\n\tWebGLContext.LEQUAL=0x0203;\n\tWebGLContext.GREATER=0x0204;\n\tWebGLContext.NOTEQUAL=0x0205;\n\tWebGLContext.GEQUAL=0x0206;\n\tWebGLContext.ALWAYS=0x0207;\n\tWebGLContext.KEEP=0x1E00;\n\tWebGLContext.REPLACE=0x1E01;\n\tWebGLContext.INCR=0x1E02;\n\tWebGLContext.DECR=0x1E03;\n\tWebGLContext.INVERT=0x150A;\n\tWebGLContext.INCR_WRAP=0x8507;\n\tWebGLContext.DECR_WRAP=0x8508;\n\tWebGLContext.VENDOR=0x1F00;\n\tWebGLContext.RENDERER=0x1F01;\n\tWebGLContext.VERSION=0x1F02;\n\tWebGLContext.NEAREST=0x2600;\n\tWebGLContext.LINEAR=0x2601;\n\tWebGLContext.NEAREST_MIPMAP_NEAREST=0x2700;\n\tWebGLContext.LINEAR_MIPMAP_NEAREST=0x2701;\n\tWebGLContext.NEAREST_MIPMAP_LINEAR=0x2702;\n\tWebGLContext.LINEAR_MIPMAP_LINEAR=0x2703;\n\tWebGLContext.TEXTURE_MAG_FILTER=0x2800;\n\tWebGLContext.TEXTURE_MIN_FILTER=0x2801;\n\tWebGLContext.TEXTURE_WRAP_S=0x2802;\n\tWebGLContext.TEXTURE_WRAP_T=0x2803;\n\tWebGLContext.TEXTURE_2D=0x0DE1;\n\tWebGLContext.TEXTURE=0x1702;\n\tWebGLContext.TEXTURE_CUBE_MAP=0x8513;\n\tWebGLContext.TEXTURE_BINDING_CUBE_MAP=0x8514;\n\tWebGLContext.TEXTURE_CUBE_MAP_POSITIVE_X=0x8515;\n\tWebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_X=0x8516;\n\tWebGLContext.TEXTURE_CUBE_MAP_POSITIVE_Y=0x8517;\n\tWebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_Y=0x8518;\n\tWebGLContext.TEXTURE_CUBE_MAP_POSITIVE_Z=0x8519;\n\tWebGLContext.TEXTURE_CUBE_MAP_NEGATIVE_Z=0x851A;\n\tWebGLContext.MAX_CUBE_MAP_TEXTURE_SIZE=0x851C;\n\tWebGLContext.TEXTURE0=0x84C0;\n\tWebGLContext.TEXTURE1=0x84C1;\n\tWebGLContext.TEXTURE2=0x84C2;\n\tWebGLContext.TEXTURE3=0x84C3;\n\tWebGLContext.TEXTURE4=0x84C4;\n\tWebGLContext.TEXTURE5=0x84C5;\n\tWebGLContext.TEXTURE6=0x84C6;\n\tWebGLContext.TEXTURE7=0x84C7;\n\tWebGLContext.TEXTURE8=0x84C8;\n\tWebGLContext.TEXTURE9=0x84C9;\n\tWebGLContext.TEXTURE10=0x84CA;\n\tWebGLContext.TEXTURE11=0x84CB;\n\tWebGLContext.TEXTURE12=0x84CC;\n\tWebGLContext.TEXTURE13=0x84CD;\n\tWebGLContext.TEXTURE14=0x84CE;\n\tWebGLContext.TEXTURE15=0x84CF;\n\tWebGLContext.TEXTURE16=0x84D0;\n\tWebGLContext.TEXTURE17=0x84D1;\n\tWebGLContext.TEXTURE18=0x84D2;\n\tWebGLContext.TEXTURE19=0x84D3;\n\tWebGLContext.TEXTURE20=0x84D4;\n\tWebGLContext.TEXTURE21=0x84D5;\n\tWebGLContext.TEXTURE22=0x84D6;\n\tWebGLContext.TEXTURE23=0x84D7;\n\tWebGLContext.TEXTURE24=0x84D8;\n\tWebGLContext.TEXTURE25=0x84D9;\n\tWebGLContext.TEXTURE26=0x84DA;\n\tWebGLContext.TEXTURE27=0x84DB;\n\tWebGLContext.TEXTURE28=0x84DC;\n\tWebGLContext.TEXTURE29=0x84DD;\n\tWebGLContext.TEXTURE30=0x84DE;\n\tWebGLContext.TEXTURE31=0x84DF;\n\tWebGLContext.ACTIVE_TEXTURE=0x84E0;\n\tWebGLContext.REPEAT=0x2901;\n\tWebGLContext.CLAMP_TO_EDGE=0x812F;\n\tWebGLContext.MIRRORED_REPEAT=0x8370;\n\tWebGLContext.FLOAT_VEC2=0x8B50;\n\tWebGLContext.FLOAT_VEC3=0x8B51;\n\tWebGLContext.FLOAT_VEC4=0x8B52;\n\tWebGLContext.INT_VEC2=0x8B53;\n\tWebGLContext.INT_VEC3=0x8B54;\n\tWebGLContext.INT_VEC4=0x8B55;\n\tWebGLContext.BOOL=0x8B56;\n\tWebGLContext.BOOL_VEC2=0x8B57;\n\tWebGLContext.BOOL_VEC3=0x8B58;\n\tWebGLContext.BOOL_VEC4=0x8B59;\n\tWebGLContext.FLOAT_MAT2=0x8B5A;\n\tWebGLContext.FLOAT_MAT3=0x8B5B;\n\tWebGLContext.FLOAT_MAT4=0x8B5C;\n\tWebGLContext.SAMPLER_2D=0x8B5E;\n\tWebGLContext.SAMPLER_CUBE=0x8B60;\n\tWebGLContext.VERTEX_ATTRIB_ARRAY_ENABLED=0x8622;\n\tWebGLContext.VERTEX_ATTRIB_ARRAY_SIZE=0x8623;\n\tWebGLContext.VERTEX_ATTRIB_ARRAY_STRIDE=0x8624;\n\tWebGLContext.VERTEX_ATTRIB_ARRAY_TYPE=0x8625;\n\tWebGLContext.VERTEX_ATTRIB_ARRAY_NORMALIZED=0x886A;\n\tWebGLContext.VERTEX_ATTRIB_ARRAY_POINTER=0x8645;\n\tWebGLContext.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=0x889F;\n\tWebGLContext.COMPILE_STATUS=0x8B81;\n\tWebGLContext.LOW_FLOAT=0x8DF0;\n\tWebGLContext.MEDIUM_FLOAT=0x8DF1;\n\tWebGLContext.HIGH_FLOAT=0x8DF2;\n\tWebGLContext.LOW_INT=0x8DF3;\n\tWebGLContext.MEDIUM_INT=0x8DF4;\n\tWebGLContext.HIGH_INT=0x8DF5;\n\tWebGLContext.FRAMEBUFFER=0x8D40;\n\tWebGLContext.RENDERBUFFER=0x8D41;\n\tWebGLContext.RGBA4=0x8056;\n\tWebGLContext.RGB5_A1=0x8057;\n\tWebGLContext.RGB565=0x8D62;\n\tWebGLContext.DEPTH_COMPONENT16=0x81A5;\n\tWebGLContext.STENCIL_INDEX=0x1901;\n\tWebGLContext.STENCIL_INDEX8=0x8D48;\n\tWebGLContext.DEPTH_STENCIL=0x84F9;\n\tWebGLContext.RENDERBUFFER_WIDTH=0x8D42;\n\tWebGLContext.RENDERBUFFER_HEIGHT=0x8D43;\n\tWebGLContext.RENDERBUFFER_INTERNAL_FORMAT=0x8D44;\n\tWebGLContext.RENDERBUFFER_RED_SIZE=0x8D50;\n\tWebGLContext.RENDERBUFFER_GREEN_SIZE=0x8D51;\n\tWebGLContext.RENDERBUFFER_BLUE_SIZE=0x8D52;\n\tWebGLContext.RENDERBUFFER_ALPHA_SIZE=0x8D53;\n\tWebGLContext.RENDERBUFFER_DEPTH_SIZE=0x8D54;\n\tWebGLContext.RENDERBUFFER_STENCIL_SIZE=0x8D55;\n\tWebGLContext.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=0x8CD0;\n\tWebGLContext.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=0x8CD1;\n\tWebGLContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=0x8CD2;\n\tWebGLContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=0x8CD3;\n\tWebGLContext.COLOR_ATTACHMENT0=0x8CE0;\n\tWebGLContext.DEPTH_ATTACHMENT=0x8D00;\n\tWebGLContext.STENCIL_ATTACHMENT=0x8D20;\n\tWebGLContext.DEPTH_STENCIL_ATTACHMENT=0x821A;\n\tWebGLContext.NONE=0;\n\tWebGLContext.FRAMEBUFFER_COMPLETE=0x8CD5;\n\tWebGLContext.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=0x8CD6;\n\tWebGLContext.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=0x8CD7;\n\tWebGLContext.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=0x8CD9;\n\tWebGLContext.FRAMEBUFFER_UNSUPPORTED=0x8CDD;\n\tWebGLContext.FRAMEBUFFER_BINDING=0x8CA6;\n\tWebGLContext.RENDERBUFFER_BINDING=0x8CA7;\n\tWebGLContext.MAX_RENDERBUFFER_SIZE=0x84E8;\n\tWebGLContext.INVALID_FRAMEBUFFER_OPERATION=0x0506;\n\tWebGLContext.UNPACK_FLIP_Y_WEBGL=0x9240;\n\tWebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL=0x9241;\n\tWebGLContext.CONTEXT_LOST_WEBGL=0x9242;\n\tWebGLContext.UNPACK_COLORSPACE_CONVERSION_WEBGL=0x9243;\n\tWebGLContext.BROWSER_DEFAULT_WEBGL=0x9244;\n\tWebGLContext._useProgram=null;\n\tWebGLContext._depthTest=true;\n\tWebGLContext._depthMask=true;\n\tWebGLContext._blend=false;\n\tWebGLContext._cullFace=false;\n\tWebGLContext.curBindTexTarget=null;\n\tWebGLContext.curBindTexValue=null;\n\t__static(WebGLContext,\n\t['_depthFunc',function(){return this._depthFunc=/*CLASS CONST:laya.webgl.WebGLContext.LESS*/0x0201;},'_sFactor',function(){return this._sFactor=/*CLASS CONST:laya.webgl.WebGLContext.ONE*/1;},'_dFactor',function(){return this._dFactor=/*CLASS CONST:laya.webgl.WebGLContext.ZERO*/0;},'_frontFace',function(){return this._frontFace=/*CLASS CONST:laya.webgl.WebGLContext.CCW*/0x0901;}\n\t]);\n\treturn WebGLContext;\n})()\n\n\n//class laya.webgl.display.GraphicsGL extends laya.display.Graphics\nvar GraphicsGL=(function(_super){\n\tfunction GraphicsGL(){\n\t\tGraphicsGL.__super.call(this);\n\t}\n\n\t__class(GraphicsGL,'laya.webgl.display.GraphicsGL',_super);\n\tvar __proto=GraphicsGL.prototype;\n\t__proto.setShader=function(shader){\n\t\tthis._saveToCmd(Render.context._setShader,[shader]);\n\t}\n\n\t__proto.setIBVB=function(x,y,ib,vb,numElement,shader){\n\t\tthis._saveToCmd(Render.context._setIBVB,[x,y,ib,vb,numElement,shader]);\n\t}\n\n\t__proto.drawParticle=function(x,y,ps){\n\t\tvar pt=RunDriver.createParticleTemplate2D(ps);\n\t\tpt.x=x;\n\t\tpt.y=y;\n\t\tthis._saveToCmd(Render.context._drawParticle,[pt]);\n\t}\n\n\treturn GraphicsGL;\n})(Graphics)\n\n\n//class laya.webgl.canvas.WebGLContext2D extends laya.resource.Context\nvar WebGLContext2D=(function(_super){\n\tvar ContextParams;\n\tfunction WebGLContext2D(c){\n\t\tthis._x=0;\n\t\tthis._y=0;\n\t\tthis._id=++WebGLContext2D._COUNT;\n\t\t//this._other=null;\n\t\tthis._path=null;\n\t\t//this._primitiveValue2D=null;\n\t\tthis._drawCount=1;\n\t\tthis._maxNumEle=0;\n\t\tthis._clear=false;\n\t\tthis._isMain=false;\n\t\tthis._atlasResourceChange=0;\n\t\tthis._submits=null;\n\t\tthis._curSubmit=null;\n\t\tthis._ib=null;\n\t\tthis._vb=null;\n\t\t//this._curMat=null;\n\t\tthis._nBlendType=0;\n\t\t//this._save=null;\n\t\t//this._targets=null;\n\t\t//this._renderKey=NaN;\n\t\tthis._saveMark=null;\n\t\tthis._shader2D=null;\n\t\t//this._triangleMesh=null;\n\t\t//drawTriangles专用mesh。由于ib不固定，所以不能与_mesh通用\n\t\tthis.meshlist=[];\n\t\t/**所cacheAs精灵*/\n\t\t//this.sprite=null;\n\t\t/*******************************************start矢量绘制***************************************************/\n\t\tthis.mId=-1;\n\t\tthis.mHaveKey=false;\n\t\tthis.mHaveLineKey=false;\n\t\tthis.mX=0;\n\t\tthis.mY=0;\n\t\tWebGLContext2D.__super.call(this);\n\t\tthis._width=99999999;\n\t\tthis._height=99999999;\n\t\tthis._clipRect=WebGLContext2D.MAXCLIPRECT;\n\t\tthis.mOutPoint\n\t\tthis._canvas=c;\n\t\tWebGLContext2D._contextcount++;\n\t\tif (Render.isFlash){\n\t\t\tthis._ib=IndexBuffer2D.create(/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\t\tGlUtils.fillIBQuadrangle(this._ib,16);\n\t\t}else\n\t\tthis._ib=IndexBuffer2D.QuadrangleIB;\n\t\tthis.clear();\n\t}\n\n\t__class(WebGLContext2D,'laya.webgl.canvas.WebGLContext2D',_super);\n\tvar __proto=WebGLContext2D.prototype;\n\t__proto.setIsMainContext=function(){\n\t\tthis._isMain=true;\n\t}\n\n\t__proto.clearBG=function(r,g,b,a){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.clearColor(r,g,b,a);\n\t\tgl.clear(/*laya.webgl.WebGLContext.COLOR_BUFFER_BIT*/0x00004000);\n\t}\n\n\t__proto._getSubmits=function(){\n\t\treturn this._submits;\n\t}\n\n\t__proto._releaseMem=function(){\n\t\tif (!this._submits)\n\t\t\treturn;\n\t\tthis._curMat.destroy();\n\t\tthis._curMat=null;\n\t\tthis._shader2D.destroy();\n\t\tthis._shader2D=null;\n\t\tfor (var i=0,n=this._submits._length;i < n;i++)\n\t\tthis._submits[i].releaseRender();\n\t\tthis._submits.length=0;\n\t\tthis._submits._length=0;\n\t\tthis._submits=null;\n\t\tthis._curSubmit=null;\n\t\tthis._path && this._path.recover();\n\t\tthis._path=null;\n\t\tthis._other && (this._other.font=null);\n\t\tthis._save=null;\n\t\tif (this._vb){\n\t\t\tthis._vb.releaseResource();\n\t\t\tthis._vb.destroy();\n\t\t\tthis._vb.destory();\n\t\t\tthis._vb=null;\n\t\t}\n\t}\n\n\t__proto.destroy=function(){\n\t\t--WebGLContext2D._contextcount;\n\t\tthis.sprite=null;\n\t\tthis._releaseMem();\n\t\tthis._targets && this._targets.destroy();\n\t\tthis._targets=null;\n\t\tthis._canvas=null;\n\t\tthis._ib && (this._ib !=IndexBuffer2D.QuadrangleIB)&& this._ib.releaseResource();\n\t}\n\n\t__proto.clear=function(){\n\t\tif (!this._submits){\n\t\t\tthis._other=ContextParams.DEFAULT;\n\t\t\tthis._curMat=Matrix.create();\n\t\t\tthis._vb=VertexBuffer2D.create(-1);\n\t\t\tthis._submits=[];\n\t\t\tthis._save=[SaveMark.Create(this)];\n\t\t\tthis._save.length=10;\n\t\t\tthis._shader2D=new Shader2D();\n\t\t\tthis._triangleMesh=MeshTexture.getAMesh();\n\t\t}\n\t\tthis._vb.clear();\n\t\tthis._targets && (this._targets.repaint=true);\n\t\tthis._other=ContextParams.DEFAULT;\n\t\tthis._clear=true;\n\t\tthis._repaint=false;\n\t\tthis._drawCount=1;\n\t\tthis._renderKey=0;\n\t\tthis._other.lineWidth=this._shader2D.ALPHA=1.0;\n\t\tthis._nBlendType=0;\n\t\tthis._clipRect=WebGLContext2D.MAXCLIPRECT;\n\t\tthis._curSubmit=Submit.RENDERBASE;\n\t\tthis._shader2D.glTexture=null;\n\t\tthis._shader2D.fillStyle=this._shader2D.strokeStyle=DrawStyle.DEFAULT;\n\t\tfor (var i=0,n=this._submits._length;i < n;i++)\n\t\tthis._submits[i].releaseRender();\n\t\tthis._submits._length=0;\n\t\tthis._curMat.identity();\n\t\tthis._other.clear();\n\t\tthis._saveMark=this._save[0];\n\t\tthis._save._length=1;\n\t}\n\n\t__proto.size=function(w,h){\n\t\tif (this._width !=w || this._height !=h){\n\t\t\tif (w==0 || h==0){\n\t\t\t\tif (this._vb._byteLength !=0){\n\t\t\t\t\tthis._width=w;\n\t\t\t\t\tthis._height=h;\n\t\t\t\t\tthis._vb.clear();\n\t\t\t\t\tthis._vb.upload();\n\t\t\t\t}\n\t\t\t\tfor (var i=0,n=this._submits._length;i < n;i++)\n\t\t\t\tthis._submits[i].releaseRender();\n\t\t\t\tthis._submits.length=0;\n\t\t\t\tthis._submits._length=0;\n\t\t\t\tthis._curSubmit=null;\n\t\t\t\tthis._path && this._path.recover();\n\t\t\t\tthis._path=null;\n\t\t\t\tthis.sprite=null;\n\t\t\t\tthis._targets && (this._targets.destroy());\n\t\t\t\tthis._targets=null;\n\t\t\t\t}else {\n\t\t\t\tthis._width=w;\n\t\t\t\tthis._height=h;\n\t\t\t\tthis._targets && (this._targets.size(w,h));\n\t\t\t\tthis._canvas.memorySize-=this._canvas.memorySize;\n\t\t\t}\n\t\t}\n\t\tif (w===0 && h===0)this._releaseMem();\n\t}\n\n\t__proto._getTransformMatrix=function(){\n\t\treturn this._curMat;\n\t}\n\n\t__proto.translate=function(x,y){\n\t\tif (x!==0 || y!==0){\n\t\t\tSaveTranslate.save(this);\n\t\t\tif (this._curMat.bTransform){\n\t\t\t\tSaveTransform.save(this);\n\t\t\t\tthis._curMat.transformPointN(Point.TEMP.setTo(x,y));\n\t\t\t\tx=Point.TEMP.x;\n\t\t\t\ty=Point.TEMP.y;\n\t\t\t}\n\t\t\tthis._x+=x;\n\t\t\tthis._y+=y;\n\t\t}\n\t}\n\n\t__proto.save=function(){\n\t\tthis._save[this._save._length++]=SaveMark.Create(this);\n\t}\n\n\t__proto.restore=function(){\n\t\tvar sz=this._save._length;\n\t\tif (sz < 1)\n\t\t\treturn;\n\t\tfor (var i=sz-1;i >=0;i--){\n\t\t\tvar o=this._save[i];\n\t\t\to.restore(this);\n\t\t\tif (o.isSaveMark()){\n\t\t\t\tthis._save._length=i;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto._fillText=function(txt,words,x,y,fontStr,color,strokeColor,lineWidth,textAlign,underLine){\n\t\t(underLine===void 0)&& (underLine=0);\n\t\tvar shader=this._shader2D;\n\t\tvar curShader=this._curSubmit.shaderValue;\n\t\tvar font=fontStr ? FontInContext.create(fontStr):this._other.font;\n\t\tif (AtlasResourceManager.enabled){\n\t\t\tif (shader.ALPHA!==curShader.ALPHA)\n\t\t\t\tshader.glTexture=null;\n\t\t\tDrawText.drawText(this,txt,words,this._curMat,font,textAlign || this._other.textAlign,color,strokeColor,lineWidth,x,y,underLine);\n\t\t\t}else {\n\t\t\tvar preDef=this._shader2D.defines.getValue();\n\t\t\tvar colorAdd=color ? Color.create(color)._color :shader.colorAdd;\n\t\t\tif (shader.ALPHA!==curShader.ALPHA || colorAdd!==shader.colorAdd || curShader.colorAdd!==shader.colorAdd){\n\t\t\t\tshader.glTexture=null;\n\t\t\t\tshader.colorAdd=colorAdd;\n\t\t\t}\n\t\t\tDrawText.drawText(this,txt,words,this._curMat,font,textAlign || this._other.textAlign,color,strokeColor,lineWidth,x,y,underLine);\n\t\t}\n\t}\n\n\t//TODO:实现下划线\n\t__proto.fillWords=function(words,x,y,fontStr,color,underLine){\n\t\tthis._fillText(null,words,x,y,fontStr,color,null,-1,null,underLine);\n\t}\n\n\t__proto.fillBorderWords=function(words,x,y,font,color,borderColor,lineWidth){\n\t\tthis._fillBorderText(null,words,x,y,font,color,borderColor,lineWidth,null);\n\t}\n\n\t__proto.fillText=function(txt,x,y,fontStr,color,textAlign){\n\t\tthis._fillText(txt,null,x,y,fontStr,color,null,-1,textAlign);\n\t}\n\n\t__proto.strokeText=function(txt,x,y,fontStr,color,lineWidth,textAlign){\n\t\tthis._fillText(txt,null,x,y,fontStr,null,color,lineWidth || 1,textAlign);\n\t}\n\n\t__proto.fillBorderText=function(txt,x,y,fontStr,fillColor,borderColor,lineWidth,textAlign){\n\t\tthis._fillBorderText(txt,null,x,y,fontStr,fillColor,borderColor,lineWidth,textAlign);\n\t}\n\n\t__proto._fillBorderText=function(txt,words,x,y,fontStr,fillColor,borderColor,lineWidth,textAlign){\n\t\tif (!AtlasResourceManager.enabled){\n\t\t\tthis._fillText(txt,words,x,y,fontStr,null,borderColor,lineWidth || 1,textAlign);\n\t\t\tthis._fillText(txt,words,x,y,fontStr,fillColor,null,-1,textAlign);\n\t\t\treturn;\n\t\t};\n\t\tvar shader=this._shader2D;\n\t\tvar curShader=this._curSubmit.shaderValue;\n\t\tif (shader.ALPHA!==curShader.ALPHA)\n\t\t\tshader.glTexture=null;\n\t\tvar font=fontStr ? (WebGLContext2D._fontTemp.setFont(fontStr),WebGLContext2D._fontTemp):this._other.font;\n\t\tDrawText.drawText(this,txt,words,this._curMat,font,textAlign || this._other.textAlign,fillColor,borderColor,lineWidth || 1,x,y,0);\n\t}\n\n\t__proto.fillRect=function(x,y,width,height,fillStyle){\n\t\tvar vb=this._vb;\n\t\tif (GlUtils.fillRectImgVb(vb,this._clipRect,x,y,width,height,Texture.DEF_UV,this._curMat,this._x,this._y,0,0)){\n\t\t\tthis._renderKey=0;\n\t\t\tvar pre=this._shader2D.fillStyle;\n\t\t\tfillStyle && (this._shader2D.fillStyle=DrawStyle.create(fillStyle));\n\t\t\tvar shader=this._shader2D;\n\t\t\tvar curShader=this._curSubmit.shaderValue;\n\t\t\tif (shader.fillStyle!==curShader.fillStyle || shader.ALPHA!==curShader.ALPHA){\n\t\t\t\tshader.glTexture=null;\n\t\t\t\tvar submit=this._curSubmit=Submit.createSubmit(this,this._ib,vb,((vb._byteLength-16 */*laya.webgl.utils.Buffer2D.FLOAT32*/4)/ 32)*3,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02,0));\n\t\t\t\tsubmit.shaderValue.color=shader.fillStyle._color._color;\n\t\t\t\tsubmit.shaderValue.ALPHA=shader.ALPHA;\n\t\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\t}\n\t\t\tthis._curSubmit._numEle+=6;\n\t\t\tthis._shader2D.fillStyle=pre;\n\t\t}\n\t}\n\n\t__proto.fillTexture=function(texture,x,y,width,height,type,offset,other){\n\t\tif (!(texture.loaded && texture.bitmap && texture.source)){\n\t\t\tif (this.sprite){\n\t\t\t\tLaya.timer.callLater(this,this._repaintSprite);\n\t\t\t}\n\t\t\treturn;\n\t\t};\n\t\tvar vb=this._vb;\n\t\tvar w=texture.bitmap.width,h=texture.bitmap.height,uv=texture.uv;\n\t\tvar ox=offset.x % texture.width,oy=offset.y % texture.height;\n\t\tif (w !=other.w || h !=other.h){\n\t\t\tif (!other.w && !other.h){\n\t\t\t\tother.oy=other.ox=0;\n\t\t\t\tswitch (type){\n\t\t\t\t\tcase \"repeat\":\n\t\t\t\t\t\tother.width=width;\n\t\t\t\t\t\tother.height=height;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"repeat-x\":\n\t\t\t\t\t\tother.width=width;\n\t\t\t\t\t\tif (oy < 0){\n\t\t\t\t\t\t\tif (texture.height+oy > height){\n\t\t\t\t\t\t\t\tother.height=height;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tother.height=texture.height+oy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tother.oy=oy;\n\t\t\t\t\t\t\tif (texture.height+oy > height){\n\t\t\t\t\t\t\t\tother.height=height-oy;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tother.height=texture.height;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"repeat-y\":\n\t\t\t\t\t\tif (ox < 0){\n\t\t\t\t\t\t\tif (texture.width+ox > width){\n\t\t\t\t\t\t\t\tother.width=width;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tother.width=texture.width+ox;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tother.ox=ox;\n\t\t\t\t\t\t\tif (texture.width+ox > width){\n\t\t\t\t\t\t\t\tother.width=width-ox;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tother.width=texture.width;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tother.height=height;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tcase \"no-repeat\":\n\t\t\t\t\t\tif (ox < 0){\n\t\t\t\t\t\t\tif (texture.width+ox > width){\n\t\t\t\t\t\t\t\tother.width=width;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tother.width=texture.width+ox;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tother.ox=ox;\n\t\t\t\t\t\t\tif (texture.width+ox > width){\n\t\t\t\t\t\t\t\tother.width=width-ox;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tother.width=texture.width;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (oy < 0){\n\t\t\t\t\t\t\tif (texture.height+oy > height){\n\t\t\t\t\t\t\t\tother.height=height;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tother.height=texture.height+oy;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tother.oy=oy;\n\t\t\t\t\t\t\tif (texture.height+oy > height){\n\t\t\t\t\t\t\t\tother.height=height-oy;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tother.height=texture.height;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\tother.width=width;\n\t\t\t\t\t\tother.height=height;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tother.w=w;\n\t\t\tother.h=h;\n\t\t\tother.uv=[0,0,other.width / w,0,other.width / w,other.height / h,0,other.height / h];\n\t\t}\n\t\tx+=other.ox;\n\t\ty+=other.oy;\n\t\tox-=other.ox;\n\t\toy-=other.oy;\n\t\tif (GlUtils.fillRectImgVb(vb,this._clipRect,x,y,other.width,other.height,other.uv,this._curMat,this._x,this._y,0,0)){\n\t\t\tthis._renderKey=0;\n\t\t\tvar submit=SubmitTexture.create(this,this._ib,vb,((vb._byteLength-16 */*laya.webgl.utils.Buffer2D.FLOAT32*/4)/ 32)*3,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.FILLTEXTURE*/0x100,0));\n\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\tvar shaderValue=submit.shaderValue;\n\t\t\tshaderValue.textureHost=texture;\n\t\t\tvar tTextureX=uv[0] *w;\n\t\t\tvar tTextureY=uv[1] *h;\n\t\t\tvar tTextureW=(uv[2]-uv[0])*w;\n\t\t\tvar tTextureH=(uv[5]-uv[3])*h;\n\t\t\tvar tx=-ox / w;\n\t\t\tvar ty=-oy / h;\n\t\t\tshaderValue.u_TexRange[0]=tTextureX / w;\n\t\t\tshaderValue.u_TexRange[1]=tTextureW / w;\n\t\t\tshaderValue.u_TexRange[2]=tTextureY / h;\n\t\t\tshaderValue.u_TexRange[3]=tTextureH / h;\n\t\t\tshaderValue.u_offset[0]=tx;\n\t\t\tshaderValue.u_offset[1]=ty;\n\t\t\tif (AtlasResourceManager.enabled && !this._isMain)\n\t\t\t\tsubmit.addTexture(texture,(vb._byteLength >> 2)-/*CLASS CONST:laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16);\n\t\t\tthis._curSubmit=submit;\n\t\t\tsubmit._renderType=/*laya.webgl.submit.Submit.TYPE_FILLTEXTURE*/10017;\n\t\t\tsubmit._numEle+=6;\n\t\t}\n\t}\n\n\t__proto.setShader=function(shader){\n\t\tSaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_SHADER*/0x100000,this._shader2D,true);\n\t\tthis._shader2D.shader=shader;\n\t}\n\n\t__proto.setFilters=function(value){\n\t\tSaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_FILTERS*/0x200000,this._shader2D,true);\n\t\tthis._shader2D.filters=value;\n\t\tthis._curSubmit=Submit.RENDERBASE;\n\t\tthis._renderKey=0;\n\t\tthis._drawCount++;\n\t}\n\n\t__proto.drawTexture=function(tex,x,y,width,height,tx,ty){\n\t\tthis._drawTextureM(tex,x,y,width,height,tx,ty,null,1);\n\t}\n\n\t__proto.addTextureVb=function(invb,x,y){\n\t\tvar finalVB=this._curSubmit._vb || this._vb;\n\t\tvar vpos=(finalVB._byteLength >> 2);\n\t\tfinalVB.byteLength=((vpos+/*CLASS CONST:laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16)<< 2);\n\t\tvar vbdata=finalVB.getFloat32Array();\n\t\tfor (var i=0,ci=0;i < 16;i+=4){\n\t\t\tvbdata[vpos++]=invb[i]+x;\n\t\t\tvbdata[vpos++]=invb[i+1]+y;\n\t\t\tvbdata[vpos++]=invb[i+2];\n\t\t\tvbdata[vpos++]=invb[i+3];\n\t\t}\n\t\tthis._curSubmit._numEle+=6;\n\t\tthis._maxNumEle=Math.max(this._maxNumEle,this._curSubmit._numEle);\n\t\tfinalVB._upload=true;\n\t}\n\n\t__proto.willDrawTexture=function(tex,alpha){\n\t\tif (!(tex.loaded && tex.bitmap && tex.source)){\n\t\t\tif (this.sprite){\n\t\t\t\tLaya.timer.callLater(this,this._repaintSprite);\n\t\t\t}\n\t\t\treturn 0;\n\t\t};\n\t\tvar webGLImg=tex.bitmap;\n\t\tvar rid=webGLImg.id+this._shader2D.ALPHA *alpha+/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016;\n\t\tif (rid==this._renderKey)return rid;\n\t\tvar shader=this._shader2D;\n\t\tvar preAlpha=shader.ALPHA;\n\t\tvar curShader=this._curSubmit.shaderValue;\n\t\tshader.ALPHA *=alpha;\n\t\tthis._renderKey=rid;\n\t\tthis._drawCount++;\n\t\tshader.glTexture=webGLImg;\n\t\tvar vb=this._vb;\n\t\tvar submit=null;\n\t\tvar vbSize=(vb._byteLength / 32)*3;\n\t\tsubmit=SubmitTexture.create(this,this._ib,vb,vbSize,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0));\n\t\tthis._submits[this._submits._length++]=submit;\n\t\tsubmit.shaderValue.textureHost=tex;\n\t\tsubmit._renderType=/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016;\n\t\tsubmit._preIsSameTextureShader=this._curSubmit._renderType===/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016 && shader.ALPHA===curShader.ALPHA;\n\t\tthis._curSubmit=submit;\n\t\tshader.ALPHA=preAlpha;\n\t\treturn rid;\n\t}\n\n\t__proto.drawTextures=function(tex,pos,tx,ty){\n\t\tif (!(tex.loaded && tex.bitmap && tex.source)){\n\t\t\tthis.sprite && Laya.timer.callLater(this,this._repaintSprite);\n\t\t\treturn;\n\t\t};\n\t\tvar pre=this._clipRect;\n\t\tthis._clipRect=WebGLContext2D.MAXCLIPRECT;\n\t\tif (!this._drawTextureM(tex,pos[0],pos[1],tex.width,tex.height,tx,ty,null,1)){\n\t\t\talert(\"drawTextures err\");\n\t\t\treturn;\n\t\t}\n\t\tthis._clipRect=pre;\n\t\tStat.drawCall++;\n\t\tif (pos.length < 4)\n\t\t\treturn;\n\t\tvar finalVB=this._curSubmit._vb || this._vb;\n\t\tvar sx=this._curMat.a,sy=this._curMat.d;\n\t\tfor (var i=2,sz=pos.length;i < sz;i+=2){\n\t\t\tGlUtils.copyPreImgVb(finalVB,(pos[i]-pos[i-2])*sx,(pos[i+1]-pos[i-1])*sy);\n\t\t\tthis._curSubmit._numEle+=6;\n\t\t}\n\t\tthis._maxNumEle=Math.max(this._maxNumEle,this._curSubmit._numEle);\n\t}\n\n\t__proto._drawTextureM=function(tex,x,y,width,height,tx,ty,m,alpha){\n\t\tif (!(tex.loaded && tex.source)){\n\t\t\tif (this.sprite){\n\t\t\t\tLaya.timer.callLater(this,this._repaintSprite);\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\tvar finalVB=this._curSubmit._vb || this._vb;\n\t\tvar webGLImg=tex.bitmap;\n\t\tx+=tx;\n\t\ty+=ty;\n\t\tthis._drawCount++;\n\t\tvar rid=webGLImg.id+this._shader2D.ALPHA *alpha+/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016;\n\t\tif (rid !=this._renderKey){\n\t\t\tthis._renderKey=rid;\n\t\t\tvar curShader=this._curSubmit.shaderValue;\n\t\t\tvar shader=this._shader2D;\n\t\t\tvar alphaBack=shader.ALPHA;\n\t\t\tshader.ALPHA *=alpha;\n\t\t\tshader.glTexture=webGLImg;\n\t\t\tvar vb=this._vb;\n\t\t\tvar submit=null;\n\t\t\tvar vbSize=(vb._byteLength / 32)*3;\n\t\t\tsubmit=SubmitTexture.create(this,this._ib,vb,vbSize,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0));\n\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\tsubmit.shaderValue.textureHost=tex;\n\t\t\tsubmit._renderType=/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016;\n\t\t\tsubmit._preIsSameTextureShader=this._curSubmit._renderType===/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016 && shader.ALPHA===curShader.ALPHA;\n\t\t\tthis._curSubmit=submit;\n\t\t\tfinalVB=this._curSubmit._vb || this._vb;\n\t\t\tshader.ALPHA=alphaBack;\n\t\t}\n\t\tif (GlUtils.fillRectImgVb(finalVB,this._clipRect,x,y,width || tex.width,height || tex.height,tex.uv,m || this._curMat,this._x,this._y,0,0)){\n\t\t\tif (AtlasResourceManager.enabled && !this._isMain)\n\t\t\t\t(this._curSubmit).addTexture(tex,(finalVB._byteLength >> 2)-/*CLASS CONST:laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16);\n\t\t\tthis._curSubmit._numEle+=6;\n\t\t\tthis._maxNumEle=Math.max(this._maxNumEle,this._curSubmit._numEle);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t__proto._repaintSprite=function(){\n\t\tif(this.sprite)\n\t\t\tthis.sprite.repaint();\n\t}\n\n\t//}\n\t__proto._drawText=function(tex,x,y,width,height,m,tx,ty,dx,dy){\n\t\tvar webGLImg=tex.bitmap;\n\t\tthis._drawCount++;\n\t\tvar rid=webGLImg.id+this._shader2D.ALPHA+/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016;\n\t\tif (rid !=this._renderKey){\n\t\t\tthis._renderKey=rid;\n\t\t\tvar curShader=this._curSubmit.shaderValue;\n\t\t\tvar shader=this._shader2D;\n\t\t\tshader.glTexture=webGLImg;\n\t\t\tvar vb=this._vb;\n\t\t\tvar submit=null;\n\t\t\tvar submitID=NaN;\n\t\t\tvar vbSize=(vb._byteLength / 32)*3;\n\t\t\tif (AtlasResourceManager.enabled){\n\t\t\t\tsubmit=SubmitTexture.create(this,this._ib,vb,vbSize,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0));\n\t\t\t\t}else {\n\t\t\t\tsubmit=SubmitTexture.create(this,this._ib,vb,vbSize,TextSV.create());\n\t\t\t}\n\t\t\tsubmit._preIsSameTextureShader=this._curSubmit._renderType===/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016 && shader.ALPHA===curShader.ALPHA;\n\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\tsubmit.shaderValue.textureHost=tex;\n\t\t\tsubmit._renderType=/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016;\n\t\t\tthis._curSubmit=submit;\n\t\t}\n\t\ttex.active();\n\t\tvar finalVB=this._curSubmit._vb || this._vb;\n\t\tif (GlUtils.fillRectImgVb(finalVB,this._clipRect,x+tx,y+ty,width || tex.width,height || tex.height,tex.uv,m || this._curMat,this._x,this._y,dx,dy,true)){\n\t\t\tif (AtlasResourceManager.enabled && !this._isMain){\n\t\t\t\t(this._curSubmit).addTexture(tex,(finalVB._byteLength >> 2)-/*CLASS CONST:laya.webgl.canvas.WebGLContext2D._RECTVBSIZE*/16);\n\t\t\t}\n\t\t\tthis._curSubmit._numEle+=6;\n\t\t\tthis._maxNumEle=Math.max(this._maxNumEle,this._curSubmit._numEle);\n\t\t}\n\t}\n\n\t__proto.drawTextureWithTransform=function(tex,x,y,width,height,transform,tx,ty,alpha){\n\t\tif (!transform){\n\t\t\tthis._drawTextureM(tex,x,y,width,height,tx,ty,null,alpha);\n\t\t\treturn;\n\t\t};\n\t\tvar curMat=this._curMat;\n\t\tvar prex=this._x;\n\t\tvar prey=this._y;\n\t\t(tx!==0 || ty!==0)&& (this._x=tx *curMat.a+ty *curMat.c,this._y=ty *curMat.d+tx *curMat.b);\n\t\tif (transform && curMat.bTransform){\n\t\t\tMatrix.mul(transform,curMat,WebGLContext2D._tmpMatrix);\n\t\t\ttransform=WebGLContext2D._tmpMatrix;\n\t\t\ttransform._checkTransform();\n\t\t\t}else {\n\t\t\tthis._x+=curMat.tx;\n\t\t\tthis._y+=curMat.ty;\n\t\t}\n\t\tthis._drawTextureM(tex,x,y,width,height,0,0,transform,alpha);\n\t\tthis._x=prex;\n\t\tthis._y=prey;\n\t}\n\n\t__proto.fillQuadrangle=function(tex,x,y,point4,m){\n\t\tvar submit=this._curSubmit;\n\t\tvar vb=this._vb;\n\t\tvar shader=this._shader2D;\n\t\tvar curShader=submit.shaderValue;\n\t\tthis._renderKey=0;\n\t\tif (tex.bitmap){\n\t\t\tvar t_tex=tex.bitmap;\n\t\t\tif (shader.glTexture !=t_tex || shader.ALPHA!==curShader.ALPHA){\n\t\t\t\tshader.glTexture=t_tex;\n\t\t\t\tsubmit=this._curSubmit=Submit.createSubmit(this,this._ib,vb,((vb._byteLength)/ 32)*3,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0));\n\t\t\t\tsubmit.shaderValue.glTexture=t_tex;\n\t\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\t}\n\t\t\tGlUtils.fillQuadrangleImgVb(vb,x,y,point4,tex.uv,m || this._curMat,this._x,this._y);\n\t\t\t}else {\n\t\t\tif (!submit.shaderValue.fillStyle || !submit.shaderValue.fillStyle.equal(tex)|| shader.ALPHA!==curShader.ALPHA){\n\t\t\t\tshader.glTexture=null;\n\t\t\t\tsubmit=this._curSubmit=Submit.createSubmit(this,this._ib,vb,((vb._byteLength)/ 32)*3,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02,0));\n\t\t\t\tsubmit.shaderValue.defines.add(/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02);\n\t\t\t\tsubmit.shaderValue.fillStyle=DrawStyle.create(tex);\n\t\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\t}\n\t\t\tGlUtils.fillQuadrangleImgVb(vb,x,y,point4,Texture.DEF_UV,m || this._curMat,this._x,this._y);\n\t\t}\n\t\tsubmit._numEle+=6;\n\t}\n\n\t__proto.drawTexture2=function(x,y,pivotX,pivotY,transform,alpha,blendMode,args){\n\t\tif (alpha==0)return;\n\t\tvar curMat=this._curMat;\n\t\tthis._x=x *curMat.a+y *curMat.c;\n\t\tthis._y=y *curMat.d+x *curMat.b;\n\t\tif (transform){\n\t\t\tif (curMat.bTransform || transform.bTransform){\n\t\t\t\tMatrix.mul(transform,curMat,WebGLContext2D._tmpMatrix);\n\t\t\t\ttransform=WebGLContext2D._tmpMatrix;\n\t\t\t\t}else {\n\t\t\t\tthis._x+=transform.tx+curMat.tx;\n\t\t\t\tthis._y+=transform.ty+curMat.ty;\n\t\t\t\ttransform=Matrix.EMPTY;\n\t\t\t}\n\t\t}\n\t\tif (alpha===1 && !blendMode)\n\t\t\tthis._drawTextureM(args[0],args[1]-pivotX,args[2]-pivotY,args[3],args[4],0,0,transform,1);\n\t\telse {\n\t\t\tvar preAlpha=this._shader2D.ALPHA;\n\t\t\tvar preblendType=this._nBlendType;\n\t\t\tthis._shader2D.ALPHA=alpha;\n\t\t\tblendMode && (this._nBlendType=BlendMode.TOINT(blendMode));\n\t\t\tthis._drawTextureM(args[0],args[1]-pivotX,args[2]-pivotY,args[3],args[4],0,0,transform,1);\n\t\t\tthis._shader2D.ALPHA=preAlpha;\n\t\t\tthis._nBlendType=preblendType;\n\t\t}\n\t\tthis._x=this._y=0;\n\t}\n\n\t__proto.drawCanvas=function(canvas,x,y,width,height){\n\t\tvar src=canvas.context;\n\t\tthis._renderKey=0;\n\t\tif (src._targets){\n\t\t\tthis._submits[this._submits._length++]=SubmitCanvas.create(src,0,null);\n\t\t\tthis._curSubmit=Submit.RENDERBASE;\n\t\t\tsrc._targets.drawTo(this,x,y,width,height);\n\t\t\t}else {\n\t\t\tvar submit=this._submits[this._submits._length++]=SubmitCanvas.create(src,this._shader2D.ALPHA,this._shader2D.filters);\n\t\t\tvar sx=width / canvas.width;\n\t\t\tvar sy=height / canvas.height;\n\t\t\tvar mat=submit._matrix;\n\t\t\tthis._curMat.copyTo(mat);\n\t\t\tsx !=1 && sy !=1 && mat.scale(sx,sy);\n\t\t\tvar tx=mat.tx,ty=mat.ty;\n\t\t\tmat.tx=mat.ty=0;\n\t\t\tmat.transformPoint(Point.TEMP.setTo(x,y));\n\t\t\tmat.translate(Point.TEMP.x+tx,Point.TEMP.y+ty);\n\t\t\tthis._curSubmit=Submit.RENDERBASE;\n\t\t}\n\t\tif (Config.showCanvasMark){\n\t\t\tthis.save();\n\t\t\tthis.lineWidth=4;\n\t\t\tthis.strokeStyle=src._targets ? \"yellow\" :\"green\";\n\t\t\tthis.strokeRect(x-1,y-1,width+2,height+2,1);\n\t\t\tthis.strokeRect(x,y,width,height,1);\n\t\t\tthis.restore();\n\t\t}\n\t}\n\n\t__proto.drawTarget=function(scope,x,y,width,height,m,proName,shaderValue,uv,blend){\n\t\t(blend===void 0)&& (blend=-1);\n\t\tvar vb=this._vb;\n\t\tif (GlUtils.fillRectImgVb(vb,this._clipRect,x,y,width,height,uv || Texture.DEF_UV,m || this._curMat,this._x,this._y,0,0)){\n\t\t\tthis._renderKey=0;\n\t\t\tvar shader=this._shader2D;\n\t\t\tshader.glTexture=null;\n\t\t\tvar curShader=this._curSubmit.shaderValue;\n\t\t\tvar submit=this._curSubmit=SubmitTarget.create(this,this._ib,vb,((vb._byteLength-16 */*laya.webgl.utils.Buffer2D.FLOAT32*/4)/ 32)*3,shaderValue,proName);\n\t\t\tif (blend==-1){\n\t\t\t\tsubmit.blendType=this._nBlendType;\n\t\t\t\t}else {\n\t\t\t\tsubmit.blendType=blend;\n\t\t\t}\n\t\t\tsubmit.scope=scope;\n\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\tthis._curSubmit._numEle+=6;\n\t\t}\n\t}\n\n\t/**\n\t*把颜色跟当前设置的alpha混合\n\t*@return\n\t*/\n\t__proto.mixRGBandAlpha=function(color){\n\t\treturn this._mixRGBandAlpha(color,this._shader2D.ALPHA);\n\t}\n\n\t__proto._mixRGBandAlpha=function(color,alpha){\n\t\tvar a=((color & 0xff000000)>>> 24);\n\t\tif (a !=0){\n\t\t\ta*=alpha;\n\t\t\t}else {\n\t\t\ta=alpha*255;\n\t\t}\n\t\treturn (color & 0x00ffffff)| (a << 24);\n\t}\n\n\t__proto.drawTriangles=function(tex,x,y,vertices,uvs,indices,matrix,alpha,color,blendMode){\n\t\tif (!(tex.loaded && tex.source)){\n\t\t\tif (this.sprite){\n\t\t\t\tLaya.timer.callLater(this,this._repaintSprite);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tthis._drawCount++;\n\t\tvar webGLImg=tex.bitmap;\n\t\tvar rgba=this._mixRGBandAlpha(0xffffffff,alpha);\n\t\tvar vertNum=vertices.length / 2;\n\t\tvar eleNum=indices.length;\n\t\tthis._renderKey=-1;\n\t\tvar submit=this._curSubmit=SubmitTexture.create(this,this._triangleMesh.getIBR(),this._triangleMesh.getVBR(),this._triangleMesh.indexNum,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0));\n\t\tsubmit.shaderValue.textureHost=tex;\n\t\tsubmit._renderType=/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016;\n\t\tthis._submits[this._submits._length++]=submit;\n\t\tif(matrix){\n\t\t\tWebGLContext2D._tmpMatrix.a=matrix.a;WebGLContext2D._tmpMatrix.b=matrix.b;WebGLContext2D._tmpMatrix.c=matrix.c;WebGLContext2D._tmpMatrix.d=matrix.d;WebGLContext2D._tmpMatrix.tx=matrix.tx+x;WebGLContext2D._tmpMatrix.ty=matrix.ty+y;\n\t\t\tMatrix.mul(WebGLContext2D._tmpMatrix,this._curMat,WebGLContext2D._tmpMatrix);\n\t\t\t}else {\n\t\t\tWebGLContext2D._tmpMatrix.a=this._curMat.a;WebGLContext2D._tmpMatrix.b=this._curMat.b;WebGLContext2D._tmpMatrix.c=this._curMat.c;WebGLContext2D._tmpMatrix.d=this._curMat.d;WebGLContext2D._tmpMatrix.tx=this._curMat.tx+x;WebGLContext2D._tmpMatrix.ty=this._curMat.ty+y;\n\t\t}\n\t\tthis._triangleMesh.addData(vertices,uvs,indices,WebGLContext2D._tmpMatrix,rgba,this);\n\t\tthis._curSubmit._numEle+=eleNum;\n\t\tthis._maxNumEle=Math.max(this._maxNumEle,this._curSubmit._numEle);\n\t\treturn true;\n\t}\n\n\t__proto.transform=function(a,b,c,d,tx,ty){\n\t\tSaveTransform.save(this);\n\t\tMatrix.mul(Matrix.TEMP.setTo(a,b,c,d,tx,ty),this._curMat,this._curMat);\n\t\tthis._curMat._checkTransform();\n\t}\n\n\t__proto.setTransformByMatrix=function(value){\n\t\tvalue.copyTo(this._curMat);\n\t}\n\n\t__proto.transformByMatrix=function(value){\n\t\tSaveTransform.save(this);\n\t\tMatrix.mul(value,this._curMat,this._curMat);\n\t\tthis._curMat._checkTransform();\n\t}\n\n\t__proto.rotate=function(angle){\n\t\tSaveTransform.save(this);\n\t\tthis._curMat.rotateEx(angle);\n\t}\n\n\t__proto.scale=function(scaleX,scaleY){\n\t\tSaveTransform.save(this);\n\t\tthis._curMat.scaleEx(scaleX,scaleY);\n\t}\n\n\t__proto.clipRect=function(x,y,width,height){\n\t\tif (this._curMat.b !=0 || this._curMat.c !=0){\n\t\t\tthis._renderKey=0;\n\t\t\tvar submitStencil0=SubmitStencil.create(4);\n\t\t\tthis.addRenderObject(submitStencil0);\n\t\t\tvar vb=this._vb;\n\t\t\tvar nPos=(vb._byteLength >> 2);\n\t\t\tif (GlUtils.fillRectImgVb(vb,null,x,y,width,height,Texture.DEF_UV,this._curMat,this._x,this._y,0,0)){\n\t\t\t\tvar shader=this._shader2D;\n\t\t\t\tshader.glTexture=null;\n\t\t\t\tvar submit=this._curSubmit=Submit.createSubmit(this,this._ib,vb,((vb._byteLength-16 */*laya.webgl.utils.Buffer2D.FLOAT32*/4)/ 32)*3,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02,0));\n\t\t\t\tsubmit.shaderValue.ALPHA=1.0;\n\t\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\t\tthis._curSubmit._numEle+=6;\n\t\t\t\t}else {\n\t\t\t\talert(\"clipRect calc stencil rect error\");\n\t\t\t};\n\t\t\tvar submitStencil1=SubmitStencil.create(5);\n\t\t\tthis.addRenderObject(submitStencil1);\n\t\t\tvar vbdata=vb.getFloat32Array();\n\t\t\tvar minx=Math.min(Math.min(Math.min(vbdata[nPos+0],vbdata[nPos+4]),vbdata[nPos+8]),vbdata[nPos+12]);\n\t\t\tvar maxx=Math.max(Math.max(Math.max(vbdata[nPos+0],vbdata[nPos+4]),vbdata[nPos+8]),vbdata[nPos+12]);\n\t\t\tvar miny=Math.min(Math.min(Math.min(vbdata[nPos+1],vbdata[nPos+5]),vbdata[nPos+9]),vbdata[nPos+13]);\n\t\t\tvar maxy=Math.max(Math.max(Math.max(vbdata[nPos+1],vbdata[nPos+5]),vbdata[nPos+9]),vbdata[nPos+13]);\n\t\t\tSaveClipRectStencil.save(this,submitStencil1,x,y,width,height,minx,miny,maxx-minx,maxy-miny);\n\t\t\tthis._curSubmit=Submit.RENDERBASE;\n\t\t\t}else {\n\t\t\twidth *=this._curMat.a;\n\t\t\theight *=this._curMat.d;\n\t\t\tvar p=Point.TEMP;\n\t\t\tthis._curMat.transformPoint(p.setTo(x,y));\n\t\t\tif (width < 0){\n\t\t\t\tp.x=p.x+width;\n\t\t\t\twidth=-width;\n\t\t\t}\n\t\t\tif (height < 0){\n\t\t\t\tp.y=p.y+height;\n\t\t\t\theight=-height;\n\t\t\t}\n\t\t\tthis._renderKey=0;\n\t\t\tvar submitSc=this._curSubmit=SubmitScissor.create(this);\n\t\t\tthis._submits[this._submits._length++]=submitSc;\n\t\t\tsubmitSc.submitIndex=this._submits._length;\n\t\t\tsubmitSc.submitLength=9999999;\n\t\t\tSaveClipRect.save(this,submitSc);\n\t\t\tvar clip=this._clipRect;\n\t\t\tvar x1=clip.x,y1=clip.y;\n\t\t\tvar r=p.x+width,b=p.y+height;\n\t\t\tx1 < p.x && (clip.x=p.x);\n\t\t\ty1 < p.y && (clip.y=p.y);\n\t\t\tclip.width=Math.min(r,x1+clip.width)-clip.x;\n\t\t\tclip.height=Math.min(b,y1+clip.height)-clip.y;\n\t\t\tthis._shader2D.glTexture=null;\n\t\t\tsubmitSc.clipRect.copyFrom(clip);\n\t\t\tthis._curSubmit=Submit.RENDERBASE;\n\t\t}\n\t}\n\n\t__proto.setIBVB=function(x,y,ib,vb,numElement,mat,shader,shaderValues,startIndex,offset,type){\n\t\t(startIndex===void 0)&& (startIndex=0);\n\t\t(offset===void 0)&& (offset=0);\n\t\t(type===void 0)&& (type=0);\n\t\tif (ib===null){\n\t\t\tif (!Render.isFlash){\n\t\t\t\tib=this._ib;\n\t\t\t\t}else {\n\t\t\t\tvar falshVB=vb;\n\t\t\t\t(falshVB._selfIB)|| (falshVB._selfIB=IndexBuffer2D.create(/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4));\n\t\t\t\tfalshVB._selfIB.clear();\n\t\t\t\tib=falshVB._selfIB;\n\t\t\t}\n\t\t\tGlUtils.expandIBQuadrangle(ib,(vb._byteLength / (/*laya.webgl.utils.Buffer2D.FLOAT32*/4 *vb.vertexStride *4)));\n\t\t}\n\t\tif (!shaderValues || !shader)\n\t\t\tthrow Error(\"setIBVB must input:shader shaderValues\");\n\t\tvar submit=SubmitOtherIBVB.create(this,vb,ib,numElement,shader,shaderValues,startIndex,offset,type);\n\t\tmat || (mat=Matrix.EMPTY);\n\t\tmat.translate(x,y);\n\t\tMatrix.mul(mat,this._curMat,submit._mat);\n\t\tmat.translate(-x,-y);\n\t\tthis._submits[this._submits._length++]=submit;\n\t\tthis._curSubmit=Submit.RENDERBASE;\n\t\tthis._renderKey=0;\n\t}\n\n\t__proto.addRenderObject=function(o){\n\t\tthis._submits[this._submits._length++]=o;\n\t}\n\n\t__proto.fillTrangles=function(tex,x,y,points,m){\n\t\tvar submit=this._curSubmit;\n\t\tvar vb=this._vb;\n\t\tvar shader=this._shader2D;\n\t\tvar curShader=submit.shaderValue;\n\t\tvar length=points.length >> 4;\n\t\tvar t_tex=tex.bitmap;\n\t\tthis._renderKey=0;\n\t\tif (shader.glTexture !=t_tex || shader.ALPHA!==curShader.ALPHA){\n\t\t\tsubmit=this._curSubmit=Submit.createSubmit(this,this._ib,vb,((vb._byteLength)/ 32)*3,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0));\n\t\t\tsubmit.shaderValue.textureHost=tex;\n\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t}\n\t\tGlUtils.fillTranglesVB(vb,x,y,points,m || this._curMat,this._x,this._y);\n\t\tsubmit._numEle+=length *6;\n\t}\n\n\t__proto.submitElement=function(start,end){\n\t\tvar renderList=this._submits;\n\t\tend < 0 && (end=renderList._length);\n\t\twhile (start < end){\n\t\t\tstart+=renderList[start].renderSubmit();\n\t\t}\n\t}\n\n\t__proto.finish=function(){\n\t\tWebGL.mainContext.finish();\n\t}\n\n\t__proto.flush=function(){\n\t\tvar maxNum=Math.max(this._vb._byteLength / (/*laya.webgl.utils.Buffer2D.FLOAT32*/4 *16),this._maxNumEle / 6)+8;\n\t\tif (maxNum > (this._ib.bufferLength / (6 */*laya.webgl.utils.Buffer2D.SHORT*/2))){\n\t\t\tGlUtils.expandIBQuadrangle(this._ib,maxNum);\n\t\t}\n\t\tif (!this._isMain && AtlasResourceManager.enabled && AtlasResourceManager._atlasRestore > this._atlasResourceChange){\n\t\t\tthis._atlasResourceChange=AtlasResourceManager._atlasRestore;\n\t\t\tvar renderList=this._submits;\n\t\t\tfor (var i=0,s=renderList._length;i < s;i++){\n\t\t\t\tvar submit=renderList [i];\n\t\t\t\tif (submit.getRenderType()===/*laya.webgl.submit.Submit.TYPE_TEXTURE*/10016)\n\t\t\t\t\t(submit).checkTexture();\n\t\t\t}\n\t\t}\n\t\tthis.submitElement(0,this._submits._length);\n\t\tthis._path && this._path.reset();\n\t\tSkinMeshBuffer.instance && SkinMeshBuffer.getInstance().reset();\n\t\tvar sz=0;\n\t\tfor (i=0,sz=this.meshlist.length;i < sz;i++){\n\t\t\tvar curm=this.meshlist[i];\n\t\t\tcurm.canReuse?(curm.releaseMesh()):(curm.destroy());\n\t\t}\n\t\tthis.meshlist.length=0;\n\t\tthis._curSubmit=Submit.RENDERBASE;\n\t\tthis._renderKey=0;\n\t\tthis._triangleMesh=MeshTexture.getAMesh();\n\t\tthis.meshlist.push(this._triangleMesh);\n\t\treturn this._submits._length;\n\t}\n\n\t__proto.setPathId=function(id){\n\t\tthis.mId=id;\n\t\tif (this.mId !=-1){\n\t\t\tthis.mHaveKey=false;\n\t\t\tvar tVGM=VectorGraphManager.getInstance();\n\t\t\tif (tVGM.shapeDic[this.mId]){\n\t\t\t\tthis.mHaveKey=true;\n\t\t\t}\n\t\t\tthis.mHaveLineKey=false;\n\t\t\tif (tVGM.shapeLineDic[this.mId]){\n\t\t\t\tthis.mHaveLineKey=true;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.movePath=function(x,y){\n\t\tvar _x1=x,_y1=y;\n\t\tx=this._curMat.a *_x1+this._curMat.c *_y1+this._curMat.tx;\n\t\ty=this._curMat.b *_x1+this._curMat.d *_y1+this._curMat.ty;\n\t\tthis.mX+=x;\n\t\tthis.mY+=y;\n\t}\n\n\t__proto.beginPath=function(){\n\t\tvar tPath=this._getPath();\n\t\ttPath.tempArray.length=0;\n\t\ttPath.closePath=false;\n\t\tthis.mX=0;\n\t\tthis.mY=0;\n\t}\n\n\t__proto.closePath=function(){\n\t\tthis._path.closePath=true;\n\t}\n\n\t__proto.fill=function(isConvexPolygon){\n\t\t(isConvexPolygon===void 0)&& (isConvexPolygon=false);\n\t\tvar tPath=this._getPath();\n\t\tthis.drawPoly(0,0,tPath.tempArray,this.fillStyle._color.numColor,0,0,isConvexPolygon);\n\t}\n\n\t__proto.stroke=function(){\n\t\tvar tPath=this._getPath();\n\t\tif (this.lineWidth > 0){\n\t\t\tif (this.mId==-1){\n\t\t\t\ttPath.drawLine(0,0,tPath.tempArray,this.lineWidth,this.strokeStyle._color.numColor);\n\t\t\t\t}else {\n\t\t\t\tif (this.mHaveLineKey){\n\t\t\t\t\tvar tShapeLine=VectorGraphManager.getInstance().shapeLineDic[this.mId];\n\t\t\t\t\ttShapeLine.rebuild(tPath.tempArray);\n\t\t\t\t\ttPath.setGeomtry(tShapeLine);\n\t\t\t\t\t}else {\n\t\t\t\t\tVectorGraphManager.getInstance().addLine(this.mId,tPath.drawLine(0,0,tPath.tempArray,this.lineWidth,this.strokeStyle._color.numColor));\n\t\t\t\t}\n\t\t\t}\n\t\t\ttPath.update();\n\t\t\tvar tPosArray=[this.mX,this.mY];\n\t\t\tvar tempSubmit=Submit.createShape(this,tPath.ib,tPath.vb,tPath.count,tPath.offset,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.PRIMITIVE*/0x04,0));\n\t\t\ttempSubmit.shaderValue.ALPHA=this._shader2D.ALPHA;\n\t\t\t(tempSubmit.shaderValue).u_pos=tPosArray;\n\t\t\ttempSubmit.shaderValue.u_mmat2=RenderState2D.TEMPMAT4_ARRAY;\n\t\t\tthis._submits[this._submits._length++]=tempSubmit;\n\t\t\tthis._renderKey=-1;\n\t\t}\n\t}\n\n\t__proto.line=function(fromX,fromY,toX,toY,lineWidth,mat){\n\t\tvar submit=this._curSubmit;\n\t\tvar vb=this._vb;\n\t\tif (GlUtils.fillLineVb(vb,this._clipRect,fromX,fromY,toX,toY,lineWidth,mat)){\n\t\t\tthis._renderKey=0;\n\t\t\tvar shader=this._shader2D;\n\t\t\tvar curShader=submit.shaderValue;\n\t\t\tif (shader.strokeStyle!==curShader.strokeStyle || shader.ALPHA!==curShader.ALPHA){\n\t\t\t\tshader.glTexture=null;\n\t\t\t\tsubmit=this._curSubmit=Submit.createSubmit(this,this._ib,vb,((vb._byteLength-16 */*laya.webgl.utils.Buffer2D.FLOAT32*/4)/ 32)*3,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02,0));\n\t\t\t\tsubmit.shaderValue.strokeStyle=shader.strokeStyle;\n\t\t\t\tsubmit.shaderValue.mainID=/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02;\n\t\t\t\tsubmit.shaderValue.ALPHA=shader.ALPHA;\n\t\t\t\tthis._submits[this._submits._length++]=submit;\n\t\t\t}\n\t\t\tsubmit._numEle+=6;\n\t\t}\n\t}\n\n\t__proto.moveTo=function(x,y,b){\n\t\t(b===void 0)&& (b=true);\n\t\tvar tPath=this._getPath();\n\t\tif (b){\n\t\t\tvar _x1=x,_y1=y;\n\t\t\tx=this._curMat.a *_x1+this._curMat.c *_y1;\n\t\t\ty=this._curMat.b *_x1+this._curMat.d *_y1;\n\t\t}\n\t\ttPath.addPoint(x,y);\n\t}\n\n\t__proto.lineTo=function(x,y,b){\n\t\t(b===void 0)&& (b=true);\n\t\tvar tPath=this._getPath();\n\t\tif (b){\n\t\t\tvar _x1=x,_y1=y;\n\t\t\tx=this._curMat.a *_x1+this._curMat.c *_y1;\n\t\t\ty=this._curMat.b *_x1+this._curMat.d *_y1;\n\t\t}\n\t\ttPath.addPoint(x,y);\n\t}\n\n\t__proto.drawCurves=function(x,y,args){\n\t\tthis.setPathId(-1);\n\t\tthis.beginPath();\n\t\tthis.strokeStyle=args[3];\n\t\tthis.lineWidth=args[4];\n\t\tvar points=args[2];\n\t\tx+=args[0],y+=args[1];\n\t\tthis.movePath(x,y);\n\t\tthis.moveTo(points[0],points[1]);\n\t\tvar i=2,n=points.length;\n\t\twhile (i < n){\n\t\t\tthis.quadraticCurveTo(points[i++],points[i++],points[i++],points[i++]);\n\t\t}\n\t\tthis.stroke();\n\t}\n\n\t__proto.arcTo=function(x1,y1,x2,y2,r){\n\t\tif (this.mId !=-1){\n\t\t\tif (this.mHaveKey){\n\t\t\t\treturn;\n\t\t\t}\n\t\t};\n\t\tvar i=0;\n\t\tvar x=0,y=0;\n\t\tvar tPath=this._getPath();\n\t\tthis._curMat.copyTo(WebGLContext2D._tmpMatrix);\n\t\tWebGLContext2D._tmpMatrix.tx=WebGLContext2D._tmpMatrix.ty=0;\n\t\tWebGLContext2D._tempPoint.setTo(tPath.getEndPointX(),tPath.getEndPointY());\n\t\tWebGLContext2D._tmpMatrix.invertTransformPoint(WebGLContext2D._tempPoint);\n\t\tvar dx=WebGLContext2D._tempPoint.x-x1;\n\t\tvar dy=WebGLContext2D._tempPoint.y-y1;\n\t\tvar len1=Math.sqrt(dx*dx+dy*dy);\n\t\tif (len1 <=0.000001){\n\t\t\treturn;\n\t\t};\n\t\tvar ndx=dx / len1;\n\t\tvar ndy=dy / len1;\n\t\tvar dx2=x2-x1;\n\t\tvar dy2=y2-y1;\n\t\tvar len22=dx2*dx2+dy2*dy2;\n\t\tvar len2=Math.sqrt(len22);\n\t\tif (len2 <=0.000001){\n\t\t\treturn;\n\t\t};\n\t\tvar ndx2=dx2 / len2;\n\t\tvar ndy2=dy2 / len2;\n\t\tvar odx=ndx+ndx2;\n\t\tvar ody=ndy+ndy2;\n\t\tvar olen=Math.sqrt(odx*odx+ody*ody);\n\t\tif (olen <=0.000001){\n\t\t\treturn;\n\t\t};\n\t\tvar nOdx=odx / olen;\n\t\tvar nOdy=ody / olen;\n\t\tvar alpha=Math.acos(nOdx*ndx+nOdy*ndy);\n\t\tvar halfAng=Math.PI / 2-alpha;\n\t\tlen1=r / Math.tan(halfAng);\n\t\tvar ptx1=len1*ndx+x1;\n\t\tvar pty1=len1*ndy+y1;\n\t\tvar orilen=Math.sqrt(len1*len1+r*r);\n\t\tvar orix=x1+nOdx*orilen;\n\t\tvar oriy=y1+nOdy*orilen;\n\t\tvar ptx2=len1*ndx2+x1;\n\t\tvar pty2=len1*ndy2+y1;\n\t\tvar dir=ndx *ndy2-ndy *ndx2;\n\t\tvar fChgAng=0;\n\t\tvar sinx=0.0;\n\t\tvar cosx=0.0;\n\t\tif (dir >=0){\n\t\t\tfChgAng=halfAng *2;\n\t\t\tvar fda=fChgAng / WebGLContext2D.SEGNUM;\n\t\t\tsinx=Math.sin(fda);\n\t\t\tcosx=Math.cos(fda);\n\t\t}\n\t\telse {\n\t\t\tfChgAng=-halfAng *2;\n\t\t\tfda=fChgAng / WebGLContext2D.SEGNUM;\n\t\t\tsinx=Math.sin(fda);\n\t\t\tcosx=Math.cos(fda);\n\t\t}\n\t\tx=this._curMat.a *ptx1+this._curMat.c *pty1;\n\t\ty=this._curMat.b *ptx1+this._curMat.d *pty1;\n\t\tif (x !=this._path.getEndPointX()|| y !=this._path.getEndPointY()){\n\t\t\ttPath.addPoint(x,y);\n\t\t};\n\t\tvar cvx=ptx1-orix;\n\t\tvar cvy=pty1-oriy;\n\t\tvar tx=0.0;\n\t\tvar ty=0.0;\n\t\tfor (i=0;i < WebGLContext2D.SEGNUM;i++){\n\t\t\tvar cx=cvx*cosx+cvy*sinx;\n\t\t\tvar cy=-cvx*sinx+cvy*cosx;\n\t\t\tx=cx+orix;\n\t\t\ty=cy+oriy;\n\t\t\tx1=this._curMat.a *x+this._curMat.c *y;\n\t\t\ty1=this._curMat.b *x+this._curMat.d *y;\n\t\t\tx=x1;\n\t\t\ty=y1;\n\t\t\tif (x !=this._path.getEndPointX()|| y !=this._path.getEndPointY()){\n\t\t\t\ttPath.addPoint(x,y);\n\t\t\t}\n\t\t\tcvx=cx;\n\t\t\tcvy=cy;\n\t\t}\n\t}\n\n\t__proto.arc=function(cx,cy,r,startAngle,endAngle,counterclockwise,b){\n\t\t(counterclockwise===void 0)&& (counterclockwise=false);\n\t\t(b===void 0)&& (b=true);\n\t\tif (this.mId !=-1){\n\t\t\tvar tShape=VectorGraphManager.getInstance().shapeDic[this.mId];\n\t\t\tif (tShape){\n\t\t\t\tif (this.mHaveKey && !tShape.needUpdate(this._curMat))\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\tcx=0;\n\t\t\tcy=0;\n\t\t};\n\t\tvar a=0,da=0,hda=0,kappa=0;\n\t\tvar dx=0,dy=0,x=0,y=0,tanx=0,tany=0;\n\t\tvar px=0,py=0,ptanx=0,ptany=0;\n\t\tvar i=0,ndivs=0,nvals=0;\n\t\tda=endAngle-startAngle;\n\t\tif (!counterclockwise){\n\t\t\tif (Math.abs(da)>=Math.PI *2){\n\t\t\t\tda=Math.PI *2;\n\t\t\t\t}else {\n\t\t\t\twhile (da < 0.0){\n\t\t\t\t\tda+=Math.PI *2;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tif (Math.abs(da)>=Math.PI *2){\n\t\t\t\tda=-Math.PI *2;\n\t\t\t\t}else {\n\t\t\t\twhile (da > 0.0){\n\t\t\t\t\tda-=Math.PI *2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (r < 101){\n\t\t\tndivs=Math.max(10,da *r / 5);\n\t\t\t}else if (r < 201){\n\t\t\tndivs=Math.max(10,da *r / 20);\n\t\t\t}else {\n\t\t\tndivs=Math.max(10,da *r / 40);\n\t\t}\n\t\thda=(da / ndivs)/ 2.0;\n\t\tkappa=Math.abs(4 / 3 *(1-Math.cos(hda))/ Math.sin(hda));\n\t\tif (counterclockwise)\n\t\t\tkappa=-kappa;\n\t\tnvals=0;\n\t\tvar tPath=this._getPath();\n\t\tvar _x1=NaN,_y1=NaN;\n\t\tfor (i=0;i <=ndivs;i++){\n\t\t\ta=startAngle+da *(i / ndivs);\n\t\t\tdx=Math.cos(a);\n\t\t\tdy=Math.sin(a);\n\t\t\tx=cx+dx *r;\n\t\t\ty=cy+dy *r;\n\t\t\tif (b){\n\t\t\t\t_x1=x,_y1=y;\n\t\t\t\tx=this._curMat.a *_x1+this._curMat.c *_y1;\n\t\t\t\ty=this._curMat.b *_x1+this._curMat.d *_y1;\n\t\t\t}\n\t\t\tif (x !=this._path.getEndPointX()|| y !=this._path.getEndPointY()){\n\t\t\t\ttPath.addPoint(x,y);\n\t\t\t}\n\t\t}\n\t\tdx=Math.cos(endAngle);\n\t\tdy=Math.sin(endAngle);\n\t\tx=cx+dx *r;\n\t\ty=cy+dy *r;\n\t\tif (b){\n\t\t\t_x1=x,_y1=y;\n\t\t\tx=this._curMat.a *_x1+this._curMat.c *_y1;\n\t\t\ty=this._curMat.b *_x1+this._curMat.d *_y1;\n\t\t}\n\t\tif (x !=this._path.getEndPointX()|| y !=this._path.getEndPointY()){\n\t\t\ttPath.addPoint(x,y);\n\t\t}\n\t}\n\n\t__proto.quadraticCurveTo=function(cpx,cpy,x,y){\n\t\tvar tBezier=Bezier.I;\n\t\tvar tResultArray=[];\n\t\tvar _x1=x,_y1=y;\n\t\tx=this._curMat.a *_x1+this._curMat.c *_y1;\n\t\ty=this._curMat.b *_x1+this._curMat.d *_y1;\n\t\t_x1=cpx,_y1=cpy;\n\t\tcpx=this._curMat.a *_x1+this._curMat.c *_y1;\n\t\tcpy=this._curMat.b *_x1+this._curMat.d *_y1;\n\t\tvar tArray=tBezier.getBezierPoints([this._path.getEndPointX(),this._path.getEndPointY(),cpx,cpy,x,y],30,2);\n\t\tfor (var i=0,n=tArray.length / 2;i < n;i++){\n\t\t\tthis.lineTo(tArray[i *2],tArray[i *2+1],false);\n\t\t}\n\t\tthis.lineTo(x,y,false);\n\t}\n\n\t__proto.rect=function(x,y,width,height){\n\t\tthis._other=this._other.make();\n\t\tthis._other.path || (this._other.path=new Path());\n\t\tthis._other.path.rect(x,y,width,height);\n\t}\n\n\t__proto.strokeRect=function(x,y,width,height,parameterLineWidth){\n\t\tvar tW=parameterLineWidth *0.5;\n\t\tthis.line(x-tW,y,x+width+tW,y,parameterLineWidth,this._curMat);\n\t\tthis.line(x+width,y,x+width,y+height,parameterLineWidth,this._curMat);\n\t\tthis.line(x,y,x,y+height,parameterLineWidth,this._curMat);\n\t\tthis.line(x-tW,y+height,x+width+tW,y+height,parameterLineWidth,this._curMat);\n\t}\n\n\t__proto.clip=function(){}\n\t/**\n\t*画多边形(用)\n\t*@param x\n\t*@param y\n\t*@param points\n\t*/\n\t__proto.drawPoly=function(x,y,points,color,lineWidth,boderColor,isConvexPolygon){\n\t\t(isConvexPolygon===void 0)&& (isConvexPolygon=false);\n\t\tthis._renderKey=0;\n\t\tthis._shader2D.glTexture=null;\n\t\tvar tPath=this._getPath();\n\t\tif (this.mId==-1){\n\t\t\ttPath.polygon(x,y,points,color,lineWidth ? lineWidth :1,boderColor)\n\t\t\t}else {\n\t\t\tif (this.mHaveKey){\n\t\t\t\tvar tShape=VectorGraphManager.getInstance().shapeDic[this.mId];\n\t\t\t\ttShape.setMatrix(this._curMat);\n\t\t\t\ttShape.rebuild(tPath.tempArray);\n\t\t\t\ttPath.setGeomtry(tShape);\n\t\t\t\t}else {\n\t\t\t\tvar t=tPath.polygon(x,y,points,color,lineWidth ? lineWidth :1,boderColor);\n\t\t\t\tVectorGraphManager.getInstance().addShape(this.mId,t);\n\t\t\t\tt.setMatrix(this._curMat);\n\t\t\t}\n\t\t}\n\t\ttPath.update();\n\t\tvar tPosArray=[this.mX,this.mY];\n\t\tvar tempSubmit;\n\t\ttempSubmit=Submit.createShape(this,tPath.ib,tPath.vb,tPath.count,tPath.offset,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.PRIMITIVE*/0x04,0));\n\t\ttempSubmit.shaderValue.ALPHA=this._shader2D.ALPHA;\n\t\t(tempSubmit.shaderValue).u_pos=tPosArray;\n\t\ttempSubmit.shaderValue.u_mmat2=RenderState2D.EMPTYMAT4_ARRAY;\n\t\tthis._submits[this._submits._length++]=tempSubmit;\n\t\tif (lineWidth > 0){\n\t\t\tif (this.mHaveLineKey){\n\t\t\t\tvar tShapeLine=VectorGraphManager.getInstance().shapeLineDic[this.mId];\n\t\t\t\ttShapeLine.rebuild(tPath.tempArray);\n\t\t\t\ttPath.setGeomtry(tShapeLine);\n\t\t\t\t}else {\n\t\t\t\tVectorGraphManager.getInstance().addShape(this.mId,tPath.drawLine(x,y,points,lineWidth,boderColor));\n\t\t\t}\n\t\t\ttPath.update();\n\t\t\ttempSubmit=Submit.createShape(this,tPath.ib,tPath.vb,tPath.count,tPath.offset,Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.PRIMITIVE*/0x04,0));\n\t\t\ttempSubmit.shaderValue.ALPHA=this._shader2D.ALPHA;\n\t\t\ttempSubmit.shaderValue.u_mmat2=RenderState2D.EMPTYMAT4_ARRAY;\n\t\t\tthis._submits[this._submits._length++]=tempSubmit;\n\t\t}\n\t}\n\n\t/*******************************************end矢量绘制***************************************************/\n\t__proto.drawParticle=function(x,y,pt){\n\t\tpt.x=x;\n\t\tpt.y=y;\n\t\tthis._submits[this._submits._length++]=pt;\n\t}\n\n\t__proto._getPath=function(){\n\t\treturn this._path || (this._path=new Path());\n\t}\n\n\t/*,_shader2D.ALPHA=1*/\n\t__getset(0,__proto,'globalCompositeOperation',function(){\n\t\treturn BlendMode.NAMES[this._nBlendType];\n\t\t},function(value){\n\t\tvar n=BlendMode.TOINT[value];\n\t\tn==null || (this._nBlendType===n)|| (SaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_GLOBALCOMPOSITEOPERATION*/0x10000,this,true),this._curSubmit=Submit.RENDERBASE,this._renderKey=0,this._nBlendType=n);\n\t});\n\n\t__getset(0,__proto,'strokeStyle',function(){\n\t\treturn this._shader2D.strokeStyle;\n\t\t},function(value){\n\t\tthis._shader2D.strokeStyle.equal(value)|| (SaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_STROKESTYLE*/0x200,this._shader2D,false),this._shader2D.strokeStyle=DrawStyle.create(value));\n\t});\n\n\t__getset(0,__proto,'globalAlpha',function(){\n\t\treturn this._shader2D.ALPHA;\n\t\t},function(value){\n\t\tvalue=Math.floor(value *1000)/ 1000;\n\t\tif (value !=this._shader2D.ALPHA){\n\t\t\tSaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_ALPHA*/0x1,this._shader2D,true);\n\t\t\tthis._shader2D.ALPHA=value;\n\t\t}\n\t});\n\n\t__getset(0,__proto,'asBitmap',null,function(value){\n\t\tif (value){\n\t\t\tthis._targets || (this._targets=new RenderTargetMAX());\n\t\t\tthis._targets.repaint=true;\n\t\t\tif (!this._width || !this._height)\n\t\t\t\tthrow Error(\"asBitmap no size!\");\n\t\t\tthis._targets.setSP(this.sprite);\n\t\t\tthis._targets.size(this._width,this._height);\n\t\t}else\n\t\tthis._targets=null;\n\t});\n\n\t__getset(0,__proto,'fillStyle',function(){\n\t\treturn this._shader2D.fillStyle;\n\t\t},function(value){\n\t\tthis._shader2D.fillStyle.equal(value)|| (SaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_FILESTYLE*/0x2,this._shader2D,false),this._shader2D.fillStyle=DrawStyle.create(value));\n\t});\n\n\t__getset(0,__proto,'textAlign',function(){\n\t\treturn this._other.textAlign;\n\t\t},function(value){\n\t\t(this._other.textAlign===value)|| (this._other=this._other.make(),SaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_TEXTALIGN*/0x8000,this._other,false),this._other.textAlign=value);\n\t});\n\n\t__getset(0,__proto,'lineWidth',function(){\n\t\treturn this._other.lineWidth;\n\t\t},function(value){\n\t\t(this._other.lineWidth===value)|| (this._other=this._other.make(),SaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_LINEWIDTH*/0x100,this._other,false),this._other.lineWidth=value);\n\t});\n\n\t__getset(0,__proto,'textBaseline',function(){\n\t\treturn this._other.textBaseline;\n\t\t},function(value){\n\t\t(this._other.textBaseline===value)|| (this._other=this._other.make(),SaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_TEXTBASELINE*/0x4000,this._other,false),this._other.textBaseline=value);\n\t});\n\n\t__getset(0,__proto,'font',null,function(str){\n\t\tif (str==this._other.font.toString())\n\t\t\treturn;\n\t\tthis._other=this._other.make();\n\t\tSaveBase.save(this,/*laya.webgl.canvas.save.SaveBase.TYPE_FONT*/0x8,this._other,false);\n\t\tthis._other.font===FontInContext.EMPTY ? (this._other.font=new FontInContext(str)):(this._other.font.setFont(str));\n\t});\n\n\tWebGLContext2D.__init__=function(){\n\t\tContextParams.DEFAULT=new ContextParams();\n\t}\n\n\tWebGLContext2D._tempPoint=new Point();\n\tWebGLContext2D._SUBMITVBSIZE=32000;\n\tWebGLContext2D._MAXSIZE=99999999;\n\tWebGLContext2D._RECTVBSIZE=16;\n\tWebGLContext2D.MAXCLIPRECT=new Rectangle(0,0,99999999,99999999);\n\tWebGLContext2D._COUNT=0;\n\tWebGLContext2D._tmpMatrix=new Matrix();\n\tWebGLContext2D.SEGNUM=32;\n\tWebGLContext2D._contextcount=0;\n\t__static(WebGLContext2D,\n\t['_fontTemp',function(){return this._fontTemp=new FontInContext();},'_drawStyleTemp',function(){return this._drawStyleTemp=new DrawStyle(null);}\n\t]);\n\tWebGLContext2D.__init$=function(){\n\t\t//class ContextParams\n\t\tContextParams=(function(){\n\t\t\tfunction ContextParams(){\n\t\t\t\tthis.lineWidth=1;\n\t\t\t\tthis.path=null;\n\t\t\t\tthis.textAlign=null;\n\t\t\t\tthis.textBaseline=null;\n\t\t\t\tthis.font=FontInContext.EMPTY;\n\t\t\t}\n\t\t\t__class(ContextParams,'');\n\t\t\tvar __proto=ContextParams.prototype;\n\t\t\t__proto.clear=function(){\n\t\t\t\tthis.lineWidth=1;\n\t\t\t\tthis.path && this.path.clear();\n\t\t\t\tthis.textAlign=this.textBaseline=null;\n\t\t\t\tthis.font=FontInContext.EMPTY;\n\t\t\t}\n\t\t\t__proto.make=function(){\n\t\t\t\treturn this===ContextParams.DEFAULT ? new ContextParams():this;\n\t\t\t}\n\t\t\tContextParams.DEFAULT=null;\n\t\t\treturn ContextParams;\n\t\t})()\n\t}\n\n\treturn WebGLContext2D;\n})(Context)\n\n\n//class laya.webgl.shader.d2.value.Value2D extends laya.webgl.shader.ShaderValue\nvar Value2D=(function(_super){\n\tfunction Value2D(mainID,subID){\n\t\tthis.size=[0,0];\n\t\tthis.alpha=1.0;\n\t\t//this.mmat=null;\n\t\tthis.ALPHA=1.0;\n\t\t//this.shader=null;\n\t\t//this.mainID=0;\n\t\tthis.subID=0;\n\t\t//this.filters=null;\n\t\t//this.textureHost=null;\n\t\t//this.texture=null;\n\t\t//this.fillStyle=null;\n\t\t//this.color=null;\n\t\t//this.strokeStyle=null;\n\t\t//this.colorAdd=null;\n\t\t//this.glTexture=null;\n\t\t//this.u_mmat2=null;\n\t\t//this._inClassCache=null;\n\t\tthis._cacheID=0;\n\t\tValue2D.__super.call(this);\n\t\tthis.defines=new ShaderDefines2D();\n\t\tthis.position=Value2D._POSITION;\n\t\tthis.mainID=mainID;\n\t\tthis.subID=subID;\n\t\tthis.textureHost=null;\n\t\tthis.texture=null;\n\t\tthis.fillStyle=null;\n\t\tthis.color=null;\n\t\tthis.strokeStyle=null;\n\t\tthis.colorAdd=null;\n\t\tthis.glTexture=null;\n\t\tthis.u_mmat2=null;\n\t\tthis._cacheID=mainID|subID;\n\t\tthis._inClassCache=Value2D._cache[this._cacheID];\n\t\tif (mainID>0 && !this._inClassCache){\n\t\t\tthis._inClassCache=Value2D._cache[this._cacheID]=[];\n\t\t\tthis._inClassCache._length=0;\n\t\t}\n\t\tthis.clear();\n\t}\n\n\t__class(Value2D,'laya.webgl.shader.d2.value.Value2D',_super);\n\tvar __proto=Value2D.prototype;\n\t__proto.setValue=function(value){}\n\t//throw new Error(\"todo in subclass\");\n\t__proto.refresh=function(){\n\t\tvar size=this.size;\n\t\tsize[0]=RenderState2D.width;\n\t\tsize[1]=RenderState2D.height;\n\t\tthis.alpha=this.ALPHA *RenderState2D.worldAlpha;\n\t\tthis.mmat=RenderState2D.worldMatrix4;\n\t\treturn this;\n\t}\n\n\t__proto._ShaderWithCompile=function(){\n\t\treturn Shader.withCompile2D(0,this.mainID,this.defines.toNameDic(),this.mainID | this.defines._value,Shader2X.create);\n\t}\n\n\t__proto._withWorldShaderDefines=function(){\n\t\tvar defs=RenderState2D.worldShaderDefines;\n\t\tvar sd=Shader.sharders [this.mainID | this.defines._value | defs.getValue()];\n\t\tif (!sd){\n\t\t\tvar def={};\n\t\t\tvar dic;\n\t\t\tvar name;\n\t\t\tdic=this.defines.toNameDic();for (name in dic)def[name]=\"\";\n\t\t\tdic=defs.toNameDic();for (name in dic)def[name]=\"\";\n\t\t\tsd=Shader.withCompile2D(0,this.mainID,def,this.mainID | this.defines._value| defs.getValue(),Shader2X.create);\n\t\t};\n\t\tvar worldFilters=RenderState2D.worldFilters;\n\t\tif (!worldFilters)return sd;\n\t\tvar n=worldFilters.length,f;\n\t\tfor (var i=0;i < n;i++){\n\t\t\t((f=worldFilters[i]))&& f.action.setValue(this);\n\t\t}\n\t\treturn sd;\n\t}\n\n\t__proto.upload=function(){\n\t\tvar renderstate2d=RenderState2D;\n\t\tthis.alpha=this.ALPHA *renderstate2d.worldAlpha;\n\t\tif (RenderState2D.worldMatrix4!==RenderState2D.TEMPMAT4_ARRAY)this.defines.add(/*laya.webgl.shader.d2.ShaderDefines2D.WORLDMAT*/0x80);\n\t\t(WebGL.shaderHighPrecision)&& (this.defines.add(/*laya.webgl.shader.d2.ShaderDefines2D.SHADERDEFINE_FSHIGHPRECISION*/0x400));\n\t\tvar sd=renderstate2d.worldShaderDefines?this._withWorldShaderDefines():(Shader.sharders [this.mainID | this.defines._value] || this._ShaderWithCompile());\n\t\tvar params;\n\t\tthis.size[0]=renderstate2d.width,this.size[1]=renderstate2d.height;\n\t\tthis.mmat=renderstate2d.worldMatrix4;\n\t\tif (BaseShader.activeShader!==sd){\n\t\t\tif (sd._shaderValueWidth!==renderstate2d.width || sd._shaderValueHeight!==renderstate2d.height){\n\t\t\t\tsd._shaderValueWidth=renderstate2d.width;\n\t\t\t\tsd._shaderValueHeight=renderstate2d.height;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tparams=sd._params2dQuick2 || sd._make2dQuick2();\n\t\t\t}\n\t\t\tsd.upload(this,params);\n\t\t}\n\t\telse{\n\t\t\tif (sd._shaderValueWidth!==renderstate2d.width || sd._shaderValueHeight!==renderstate2d.height){\n\t\t\t\tsd._shaderValueWidth=renderstate2d.width;\n\t\t\t\tsd._shaderValueHeight=renderstate2d.height;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tparams=(sd._params2dQuick1)|| sd._make2dQuick1();\n\t\t\t}\n\t\t\tsd.upload(this,params);\n\t\t}\n\t}\n\n\t__proto.setFilters=function(value){\n\t\tthis.filters=value;\n\t\tif (!value)\n\t\t\treturn;\n\t\tvar n=value.length,f;\n\t\tfor (var i=0;i < n;i++){\n\t\t\tf=value[i];\n\t\t\tif (f){\n\t\t\t\tthis.defines.add(f.type);\n\t\t\t\tf.action.setValue(this);\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.clear=function(){\n\t\tthis.defines.setValue(this.subID);\n\t}\n\n\t__proto.release=function(){\n\t\tthis._inClassCache[this._inClassCache._length++]=this;\n\t\tthis.fillStyle=null;\n\t\tthis.strokeStyle=null;\n\t\tthis.clear();\n\t}\n\n\tValue2D._initone=function(type,classT){\n\t\tValue2D._typeClass[type]=classT;\n\t\tValue2D._cache[type]=[];\n\t\tValue2D._cache[type]._length=0;\n\t}\n\n\tValue2D.__init__=function(){\n\t\tValue2D._POSITION=[2,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,4 *CONST3D2D.BYTES_PE,0];\n\t\tValue2D._TEXCOORD=[2,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,4 *CONST3D2D.BYTES_PE,2 *CONST3D2D.BYTES_PE];\n\t\tValue2D._initone(/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02,Color2dSV);\n\t\tValue2D._initone(/*laya.webgl.shader.d2.ShaderDefines2D.PRIMITIVE*/0x04,PrimitiveSV);\n\t\tValue2D._initone(/*laya.webgl.shader.d2.ShaderDefines2D.FILLTEXTURE*/0x100,FillTextureSV);\n\t\tValue2D._initone(/*laya.webgl.shader.d2.ShaderDefines2D.SKINMESH*/0x200,SkinSV);\n\t\tValue2D._initone(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,TextureSV);\n\t\tValue2D._initone(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01 | /*laya.webgl.shader.d2.ShaderDefines2D.COLORADD*/0x40,TextSV);\n\t\tValue2D._initone(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01 | /*laya.webgl.shader.d2.ShaderDefines2D.FILTERGLOW*/0x08,TextureSV);\n\t}\n\n\tValue2D.create=function(mainType,subType){\n\t\tvar types=Value2D._cache[mainType|subType];\n\t\tif (types._length)\n\t\t\treturn types[--types._length];\n\t\telse\n\t\treturn new Value2D._typeClass[mainType|subType](subType);\n\t}\n\n\tValue2D._POSITION=null;\n\tValue2D._TEXCOORD=null;\n\tValue2D._cache=[];\n\tValue2D._typeClass=[];\n\tValue2D.TEMPMAT4_ARRAY=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];\n\treturn Value2D;\n})(ShaderValue)\n\n\n//class laya.webgl.utils.RenderSprite3D extends laya.renders.RenderSprite\nvar RenderSprite3D=(function(_super){\n\tfunction RenderSprite3D(type,next){\n\t\tRenderSprite3D.__super.call(this,type,next);\n\t}\n\n\t__class(RenderSprite3D,'laya.webgl.utils.RenderSprite3D',_super);\n\tvar __proto=RenderSprite3D.prototype;\n\t__proto.onCreate=function(type){\n\t\tswitch (type){\n\t\t\tcase 0x08:\n\t\t\t\tthis._fun=this._blend;\n\t\t\t\treturn;\n\t\t\tcase 0x04:\n\t\t\t\tthis._fun=this._transform;\n\t\t\t\treturn;\n\t\t\t}\n\t}\n\n\t__proto._mask=function(sprite,context,x,y){\n\t\tvar next=this._next;\n\t\tvar mask=sprite.mask;\n\t\tvar submitCMD;\n\t\tvar submitStencil;\n\t\tif (mask){\n\t\t\tcontext.ctx.save();\n\t\t\tvar preBlendMode=(context.ctx).globalCompositeOperation;\n\t\t\tvar tRect=new Rectangle();\n\t\t\ttRect.copyFrom(mask.getBounds());\n\t\t\ttRect.width=Math.round(tRect.width);\n\t\t\ttRect.height=Math.round(tRect.height);\n\t\t\ttRect.x=Math.round(tRect.x);\n\t\t\ttRect.y=Math.round(tRect.y);\n\t\t\tif (tRect.width > 0 && tRect.height > 0){\n\t\t\t\tvar tf=sprite._style._tf;\n\t\t\t\tvar scope=SubmitCMDScope.create();\n\t\t\t\tscope.addValue(\"bounds\",tRect);\n\t\t\t\tsubmitCMD=SubmitCMD.create([scope,context],laya.webgl.utils.RenderSprite3D.tmpTarget);\n\t\t\t\tcontext.addRenderObject(submitCMD);\n\t\t\t\tmask.render(context,-tRect.x,-tRect.y);\n\t\t\t\tsubmitCMD=SubmitCMD.create([scope],laya.webgl.utils.RenderSprite3D.endTmpTarget);\n\t\t\t\tcontext.addRenderObject(submitCMD);\n\t\t\t\tcontext.ctx.save();\n\t\t\t\tcontext.clipRect(x-tf.translateX+tRect.x,y-tf.translateY+tRect.y,tRect.width,tRect.height);\n\t\t\t\tnext._fun.call(next,sprite,context,x,y);\n\t\t\t\tcontext.ctx.restore();\n\t\t\t\tsubmitStencil=SubmitStencil.create(6);\n\t\t\t\tpreBlendMode=(context.ctx).globalCompositeOperation;\n\t\t\t\tsubmitStencil.blendMode=\"mask\";\n\t\t\t\tcontext.addRenderObject(submitStencil);\n\t\t\t\tMatrix.TEMP.identity();\n\t\t\t\tvar shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);\n\t\t\t\tvar uv=Texture.INV_UV;\n\t\t\t\tvar w=tRect.width;\n\t\t\t\tvar h=tRect.height;\n\t\t\t\tvar tempLimit=32;\n\t\t\t\tif (tRect.width < tempLimit || tRect.height < tempLimit){\n\t\t\t\t\tuv=RenderSprite3D.tempUV;\n\t\t\t\t\tuv[0]=0;\n\t\t\t\t\tuv[1]=0;\n\t\t\t\t\tuv[2]=(tRect.width >=32)? 1 :tRect.width/tempLimit;\n\t\t\t\t\tuv[3]=0\n\t\t\t\t\tuv[4]=(tRect.width >=32)? 1 :tRect.width/tempLimit;\n\t\t\t\t\tuv[5]=(tRect.height >=32)? 1 :tRect.height/tempLimit;\n\t\t\t\t\tuv[6]=0;\n\t\t\t\t\tuv[7]=(tRect.height >=32)? 1 :tRect.height/tempLimit;\n\t\t\t\t\ttRect.width=(tRect.width >=32)? tRect.width :tempLimit;\n\t\t\t\t\ttRect.height=(tRect.height >=32)? tRect.height :tempLimit;\n\t\t\t\t\tuv[1] *=-1;uv[3] *=-1;uv[5] *=-1;uv[7] *=-1;\n\t\t\t\t\tuv[1]+=1;uv[3]+=1;uv[5]+=1;uv[7]+=1;\n\t\t\t\t}\n\t\t\t\t(context.ctx).drawTarget(scope,x+tRect.x-tf.translateX,y+tRect.y-tf.translateY,w,h,Matrix.TEMP,\"tmpTarget\",shaderValue,uv,6);\n\t\t\t\tsubmitCMD=SubmitCMD.create([scope],laya.webgl.utils.RenderSprite3D.recycleTarget);\n\t\t\t\tcontext.addRenderObject(submitCMD);\n\t\t\t\tsubmitStencil=SubmitStencil.create(6);\n\t\t\t\tsubmitStencil.blendMode=preBlendMode;\n\t\t\t\tcontext.addRenderObject(submitStencil);\n\t\t\t}\n\t\t\tcontext.ctx.restore();\n\t\t}\n\t\telse{\n\t\t\tnext._fun.call(next,sprite,context,x,y);\n\t\t}\n\t}\n\n\t__proto._blend=function(sprite,context,x,y){\n\t\tvar style=sprite._style;\n\t\tvar next=this._next;\n\t\tif (style.blendMode){\n\t\t\tcontext.ctx.save();\n\t\t\tcontext.ctx.globalCompositeOperation=style.blendMode;\n\t\t\tnext._fun.call(next,sprite,context,x,y);\n\t\t\tcontext.ctx.restore();\n\t\t}\n\t\telse{\n\t\t\tnext._fun.call(next,sprite,context,x,y);\n\t\t}\n\t}\n\n\t__proto._transform=function(sprite,context,x,y){\n\t\tvar transform=sprite.transform,_next=this._next;\n\t\tif (transform && _next !=RenderSprite.NORENDER){\n\t\t\tvar ctx=context.ctx;\n\t\t\tvar style=sprite._style;\n\t\t\ttransform.tx=x;\n\t\t\ttransform.ty=y;\n\t\t\tvar m2=ctx._getTransformMatrix();\n\t\t\tvar m1=m2.clone();\n\t\t\tMatrix.mul(transform,m2,m2);\n\t\t\tm2._checkTransform();\n\t\t\ttransform.tx=transform.ty=0;\n\t\t\t_next._fun.call(_next,sprite,context,0,0);\n\t\t\tm1.copyTo(m2);\n\t\t\tm1.destroy();\n\t\t\t}else {\n\t\t\t_next._fun.call(_next,sprite,context,x,y);\n\t\t}\n\t}\n\n\tRenderSprite3D.tmpTarget=function(scope,context){\n\t\tvar b=scope.getValue(\"bounds\");\n\t\tvar tmpTarget=RenderTarget2D.create(b.width,b.height);\n\t\ttmpTarget.start();\n\t\ttmpTarget.clear(0,0,0,0);\n\t\tscope.addValue(\"tmpTarget\",tmpTarget);\n\t}\n\n\tRenderSprite3D.endTmpTarget=function(scope){\n\t\tvar tmpTarget=scope.getValue(\"tmpTarget\");\n\t\ttmpTarget.end();\n\t}\n\n\tRenderSprite3D.recycleTarget=function(scope){\n\t\tvar tmpTarget=scope.getValue(\"tmpTarget\");\n\t\ttmpTarget.recycle();\n\t\tscope.recycle();\n\t}\n\n\t__static(RenderSprite3D,\n\t['tempUV',function(){return this.tempUV=new Array(8);}\n\t]);\n\treturn RenderSprite3D;\n})(RenderSprite)\n\n\n//class laya.filters.webgl.ColorFilterActionGL extends laya.filters.webgl.FilterActionGL\nvar ColorFilterActionGL=(function(_super){\n\tfunction ColorFilterActionGL(){\n\t\tthis.data=null;\n\t\tColorFilterActionGL.__super.call(this);\n\t}\n\n\t__class(ColorFilterActionGL,'laya.filters.webgl.ColorFilterActionGL',_super);\n\tvar __proto=ColorFilterActionGL.prototype;\n\tLaya.imps(__proto,{\"laya.filters.IFilterActionGL\":true})\n\t__proto.setValue=function(shader){\n\t\tshader.colorMat=this.data._mat;\n\t\tshader.colorAlpha=this.data._alpha;\n\t}\n\n\t__proto.apply3d=function(scope,sprite,context,x,y){\n\t\tvar b=scope.getValue(\"bounds\");\n\t\tvar shaderValue=Value2D.create(/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,0);\n\t\tshaderValue.setFilters([this.data]);\n\t\tvar tMatrix=Matrix.TEMP;\n\t\ttMatrix.identity();\n\t\tcontext.ctx.drawTarget(scope,0,0,b.width,b.height,tMatrix,\"src\",shaderValue);\n\t}\n\n\treturn ColorFilterActionGL;\n})(FilterActionGL)\n\n\n//class laya.webgl.atlas.Atlaser extends laya.webgl.atlas.AtlasGrid\nvar Atlaser=(function(_super){\n\tfunction Atlaser(gridNumX,gridNumY,width,height,atlasID){\n\t\tthis._atlasCanvas=null;\n\t\tthis._inAtlasTextureKey=null;\n\t\tthis._inAtlasTextureBitmapValue=null;\n\t\tthis._inAtlasTextureOriUVValue=null;\n\t\tthis._InAtlasWebGLImagesKey=null;\n\t\tthis._InAtlasWebGLImagesOffsetValue=null;\n\t\tAtlaser.__super.call(this,gridNumX,gridNumY,atlasID);\n\t\tthis._inAtlasTextureKey=[];\n\t\tthis._inAtlasTextureBitmapValue=[];\n\t\tthis._inAtlasTextureOriUVValue=[];\n\t\tthis._InAtlasWebGLImagesKey={};\n\t\tthis._InAtlasWebGLImagesOffsetValue=[];\n\t\tthis._atlasCanvas=new AtlasWebGLCanvas();\n\t\tthis._atlasCanvas._atlaser=this;\n\t\tthis._atlasCanvas.width=width;\n\t\tthis._atlasCanvas.height=height;\n\t\tthis._atlasCanvas.activeResource();\n\t\tthis._atlasCanvas.lock=true;\n\t}\n\n\t__class(Atlaser,'laya.webgl.atlas.Atlaser',_super);\n\tvar __proto=Atlaser.prototype;\n\t__proto.computeUVinAtlasTexture=function(texture,oriUV,offsetX,offsetY){\n\t\tvar tex=texture;\n\t\tvar _width=AtlasResourceManager.atlasTextureWidth;\n\t\tvar _height=AtlasResourceManager.atlasTextureHeight;\n\t\tvar u1=offsetX / _width,v1=offsetY / _height,u2=(offsetX+texture.bitmap.width)/ _width,v2=(offsetY+texture.bitmap.height)/ _height;\n\t\tvar inAltasUVWidth=texture.bitmap.width / _width,inAltasUVHeight=texture.bitmap.height / _height;\n\t\ttexture.uv=[u1+oriUV[0] *inAltasUVWidth,v1+oriUV[1] *inAltasUVHeight,u2-(1-oriUV[2])*inAltasUVWidth,v1+oriUV[3] *inAltasUVHeight,u2-(1-oriUV[4])*inAltasUVWidth,v2-(1-oriUV[5])*inAltasUVHeight,u1+oriUV[6] *inAltasUVWidth,v2-(1-oriUV[7])*inAltasUVHeight];\n\t}\n\n\t__proto.findBitmapIsExist=function(bitmap){\n\t\tif ((bitmap instanceof laya.webgl.resource.WebGLImage )){\n\t\t\tvar webImage=bitmap;\n\t\t\tvar sUrl=webImage.url;\n\t\t\tvar object=this._InAtlasWebGLImagesKey[sUrl?sUrl:webImage.id]\n\t\t\tif (object){\n\t\t\t\treturn object.offsetInfoID;\n\t\t\t}\n\t\t}\n\t\treturn-1;\n\t}\n\n\t/**\n\t*\n\t*@param inAtlasRes\n\t*@return 是否已经存在队列中\n\t*/\n\t__proto.addToAtlasTexture=function(mergeAtlasBitmap,offsetX,offsetY){\n\t\tif ((mergeAtlasBitmap instanceof laya.webgl.resource.WebGLImage )){\n\t\t\tvar webImage=mergeAtlasBitmap;\n\t\t\tvar sUrl=webImage.url;\n\t\t\tthis._InAtlasWebGLImagesKey[sUrl?sUrl:webImage.id]={bitmap:mergeAtlasBitmap,offsetInfoID:this._InAtlasWebGLImagesOffsetValue.length};\n\t\t\tthis._InAtlasWebGLImagesOffsetValue.push([offsetX,offsetY]);\n\t\t}\n\t\tthis._atlasCanvas.texSubImage2D(offsetX,offsetY,/*__JS__ */mergeAtlasBitmap.atlasImgData || mergeAtlasBitmap.atlasSource);\n\t\tmergeAtlasBitmap.clearAtlasSource();\n\t}\n\n\t__proto.addToAtlas=function(texture,offsetX,offsetY){\n\t\ttexture._atlasID=this._inAtlasTextureKey.length;\n\t\tvar oriUV=texture.uv.slice();\n\t\tvar oriBitmap=texture.bitmap;\n\t\tthis._inAtlasTextureKey.push(texture);\n\t\tthis._inAtlasTextureOriUVValue.push(oriUV);\n\t\tthis._inAtlasTextureBitmapValue.push(oriBitmap);\n\t\tthis.computeUVinAtlasTexture(texture,oriUV,offsetX,offsetY);\n\t\ttexture.bitmap=this._atlasCanvas;\n\t}\n\n\t__proto.clear=function(){\n\t\tfor (var i=0,n=this._inAtlasTextureKey.length;i < n;i++){\n\t\t\tthis._inAtlasTextureKey[i].bitmap=this._inAtlasTextureBitmapValue[i];\n\t\t\tthis._inAtlasTextureKey[i].uv=this._inAtlasTextureOriUVValue[i];\n\t\t\tthis._inAtlasTextureKey[i]._atlasID=-1;\n\t\t\tthis._inAtlasTextureKey[i].bitmap.lock=false;\n\t\t\tthis._inAtlasTextureKey[i].bitmap.releaseResource();\n\t\t}\n\t\tthis._inAtlasTextureKey.length=0;\n\t\tthis._inAtlasTextureBitmapValue.length=0;\n\t\tthis._inAtlasTextureOriUVValue.length=0;\n\t\tthis._InAtlasWebGLImagesKey=null;\n\t\tthis._InAtlasWebGLImagesOffsetValue.length=0;\n\t}\n\n\t__proto.dispose=function(){\n\t\tthis.clear();\n\t\tthis._atlasCanvas.destroy();\n\t}\n\n\t__getset(0,__proto,'InAtlasWebGLImagesOffsetValue',function(){\n\t\treturn this._InAtlasWebGLImagesOffsetValue;\n\t});\n\n\t__getset(0,__proto,'texture',function(){\n\t\treturn this._atlasCanvas;\n\t});\n\n\t__getset(0,__proto,'inAtlasWebGLImagesKey',function(){\n\t\treturn this._InAtlasWebGLImagesKey;\n\t});\n\n\treturn Atlaser;\n})(AtlasGrid)\n\n\n//class laya.webgl.shader.d2.ShaderDefines2D extends laya.webgl.shader.ShaderDefines\nvar ShaderDefines2D=(function(_super){\n\tfunction ShaderDefines2D(){\n\t\tShaderDefines2D.__super.call(this,ShaderDefines2D.__name2int,ShaderDefines2D.__int2name,ShaderDefines2D.__int2nameMap);\n\t}\n\n\t__class(ShaderDefines2D,'laya.webgl.shader.d2.ShaderDefines2D',_super);\n\tShaderDefines2D.__init__=function(){\n\t\tShaderDefines2D.reg(\"TEXTURE2D\",0x01);\n\t\tShaderDefines2D.reg(\"COLOR2D\",0x02);\n\t\tShaderDefines2D.reg(\"PRIMITIVE\",0x04);\n\t\tShaderDefines2D.reg(\"GLOW_FILTER\",0x08);\n\t\tShaderDefines2D.reg(\"BLUR_FILTER\",0x10);\n\t\tShaderDefines2D.reg(\"COLOR_FILTER\",0x20);\n\t\tShaderDefines2D.reg(\"COLOR_ADD\",0x40);\n\t\tShaderDefines2D.reg(\"WORLDMAT\",0x80);\n\t\tShaderDefines2D.reg(\"FILLTEXTURE\",0x100);\n\t\tShaderDefines2D.reg(\"FSHIGHPRECISION\",0x400);\n\t}\n\n\tShaderDefines2D.reg=function(name,value){\n\t\tShaderDefines._reg(name,value,ShaderDefines2D.__name2int,ShaderDefines2D.__int2name);\n\t}\n\n\tShaderDefines2D.toText=function(value,int2name,int2nameMap){\n\t\treturn ShaderDefines._toText(value,int2name,int2nameMap);\n\t}\n\n\tShaderDefines2D.toInt=function(names){\n\t\treturn ShaderDefines._toInt(names,ShaderDefines2D.__name2int);\n\t}\n\n\tShaderDefines2D.TEXTURE2D=0x01;\n\tShaderDefines2D.COLOR2D=0x02;\n\tShaderDefines2D.PRIMITIVE=0x04;\n\tShaderDefines2D.FILTERGLOW=0x08;\n\tShaderDefines2D.FILTERBLUR=0x10;\n\tShaderDefines2D.FILTERCOLOR=0x20;\n\tShaderDefines2D.COLORADD=0x40;\n\tShaderDefines2D.WORLDMAT=0x80;\n\tShaderDefines2D.FILLTEXTURE=0x100;\n\tShaderDefines2D.SKINMESH=0x200;\n\tShaderDefines2D.SHADERDEFINE_FSHIGHPRECISION=0x400;\n\tShaderDefines2D.__name2int={};\n\tShaderDefines2D.__int2name=[];\n\tShaderDefines2D.__int2nameMap=[];\n\treturn ShaderDefines2D;\n})(ShaderDefines)\n\n\n//class laya.webgl.shapes.Ellipse extends laya.webgl.shapes.BasePoly\nvar Ellipse=(function(_super){\n\tfunction Ellipse(x,y,width,height,color,borderWidth,borderColor){\n\t\tEllipse.__super.call(this,x,y,width,height,40,color,borderWidth,borderColor);\n\t}\n\n\t__class(Ellipse,'laya.webgl.shapes.Ellipse',_super);\n\treturn Ellipse;\n})(BasePoly)\n\n\n//class laya.webgl.shapes.Line extends laya.webgl.shapes.BasePoly\nvar Line=(function(_super){\n\tfunction Line(x,y,points,borderWidth,color){\n\t\tthis._points=[];\n\t\tthis.rebuild(points);\n\t\tLine.__super.call(this,x,y,0,0,0,color,borderWidth,color,0);\n\t}\n\n\t__class(Line,'laya.webgl.shapes.Line',_super);\n\tvar __proto=Line.prototype;\n\t__proto.rebuild=function(points){\n\t\tvar len=points.length;\n\t\tvar preLen=this._points.length;\n\t\tif (len !=preLen){\n\t\t\tthis.mUint16Array=new Uint16Array((len/2-1)*6);\n\t\t\tthis.mFloat32Array=new Float32Array(len*5);\n\t\t}\n\t\tthis._points.length=0;\n\t\tvar tCurrX=NaN;\n\t\tvar tCurrY=NaN;\n\t\tvar tLastX=-1;\n\t\tvar tLastY=-1;\n\t\tvar tLen=points.length / 2;\n\t\tfor (var i=0;i < tLen;i++){\n\t\t\ttCurrX=points[i *2];\n\t\t\ttCurrY=points[i *2+1];\n\t\t\tif (Math.abs(tLastX-tCurrX)> 0.01 || Math.abs(tLastY-tCurrY)>0.01){\n\t\t\t\tthis._points.push(tCurrX,tCurrY);\n\t\t\t}\n\t\t\ttLastX=tCurrX;\n\t\t\ttLastY=tCurrY;\n\t\t}\n\t}\n\n\t__proto.getData=function(ib,vb,start){\n\t\tvar indices=[];\n\t\tvar verts=[];\n\t\t(this.borderWidth > 0)&& this.createLine2(this._points,indices,this.borderWidth,start,verts,this._points.length / 2);\n\t\tthis.mUint16Array.set(indices,0);\n\t\tthis.mFloat32Array.set(verts,0);\n\t\tib.append(this.mUint16Array);\n\t\tvb.append(this.mFloat32Array);\n\t}\n\n\treturn Line;\n})(BasePoly)\n\n\n//class laya.webgl.shapes.LoopLine extends laya.webgl.shapes.BasePoly\nvar LoopLine=(function(_super){\n\tfunction LoopLine(x,y,points,width,color){\n\t\tthis._points=[];\n\t\tvar tCurrX=NaN;\n\t\tvar tCurrY=NaN;\n\t\tvar tLastX=-1;\n\t\tvar tLastY=-1;\n\t\tvar tLen=points.length / 2-1;\n\t\tfor (var i=0;i < tLen;i++){\n\t\t\ttCurrX=points[i *2];\n\t\t\ttCurrY=points[i *2+1];\n\t\t\tif (Math.abs(tLastX-tCurrX)> 0.01 || Math.abs(tLastY-tCurrY)> 0.01){\n\t\t\t\tthis._points.push(tCurrX,tCurrY);\n\t\t\t}\n\t\t\ttLastX=tCurrX;\n\t\t\ttLastY=tCurrY;\n\t\t}\n\t\ttCurrX=points[tLen *2];\n\t\ttCurrY=points[tLen *2+1];\n\t\ttLastX=this._points[0];\n\t\ttLastY=this._points[1];\n\t\tif (Math.abs(tLastX-tCurrX)> 0.01 || Math.abs(tLastY-tCurrY)> 0.01){\n\t\t\tthis._points.push(tCurrX,tCurrY);\n\t\t}\n\t\tLoopLine.__super.call(this,x,y,0,0,this._points.length / 2,0,width,color);\n\t}\n\n\t__class(LoopLine,'laya.webgl.shapes.LoopLine',_super);\n\tvar __proto=LoopLine.prototype;\n\t__proto.getData=function(ib,vb,start){\n\t\tif (this.borderWidth > 0){\n\t\t\tvar color=this.color;\n\t\t\tvar r=((color >> 16)& 0x0000ff)/ 255,g=((color >> 8)& 0xff)/ 255,b=(color & 0x0000ff)/ 255;\n\t\t\tvar verts=[];\n\t\t\tvar tLastX=-1,tLastY=-1;\n\t\t\tvar tCurrX=0,tCurrY=0;\n\t\t\tvar indices=[];\n\t\t\tvar tLen=Math.floor(this._points.length / 2);\n\t\t\tfor (var i=0;i < tLen;i++){\n\t\t\t\ttCurrX=this._points[i *2];\n\t\t\t\ttCurrY=this._points[i *2+1];\n\t\t\t\tverts.push(this.x+tCurrX,this.y+tCurrY,r,g,b);\n\t\t\t}\n\t\t\tthis.createLoopLine(verts,indices,this.borderWidth,start+verts.length / 5);\n\t\t\tib.append(new Uint16Array(indices));\n\t\t\tvb.append(new Float32Array(verts));\n\t\t}\n\t}\n\n\t__proto.createLoopLine=function(p,indices,lineWidth,len,outVertex,outIndex){\n\t\tvar tLen=p.length / 5;\n\t\tvar points=p.concat();\n\t\tvar result=outVertex ? outVertex :p;\n\t\tvar color=this.borderColor;\n\t\tvar r=((color >> 16)& 0x0000ff)/ 255,g=((color >> 8)& 0xff)/ 255,b=(color & 0x0000ff)/ 255;\n\t\tvar firstPoint=[points[0],points[1]];\n\t\tvar lastPoint=[points[points.length-5],points[points.length-4]];\n\t\tvar midPointX=lastPoint[0]+(firstPoint[0]-lastPoint[0])*0.5;\n\t\tvar midPointY=lastPoint[1]+(firstPoint[1]-lastPoint[1])*0.5;\n\t\tpoints.unshift(midPointX,midPointY,0,0,0);\n\t\tpoints.push(midPointX,midPointY,0,0,0);\n\t\tvar length=points.length / 5;\n\t\tvar iStart=len,w=lineWidth / 2;\n\t\tvar px,py,p1x,p1y,p2x,p2y,p3x,p3y;\n\t\tvar perpx,perpy,perp2x,perp2y,perp3x,perp3y;\n\t\tvar a1,b1,c1,a2,b2,c2;\n\t\tvar denom,pdist,dist;\n\t\tp1x=points[0];\n\t\tp1y=points[1];\n\t\tp2x=points[5];\n\t\tp2y=points[6];\n\t\tperpx=-(p1y-p2y);\n\t\tperpy=p1x-p2x;\n\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\tperpx=perpx / dist *w;\n\t\tperpy=perpy / dist *w;\n\t\tresult.push(p1x-perpx,p1y-perpy,r,g,b,p1x+perpx,p1y+perpy,r,g,b);\n\t\tfor (var i=1;i < length-1;i++){\n\t\t\tp1x=points[(i-1)*5];\n\t\t\tp1y=points[(i-1)*5+1];\n\t\t\tp2x=points[(i)*5];\n\t\t\tp2y=points[(i)*5+1];\n\t\t\tp3x=points[(i+1)*5];\n\t\t\tp3y=points[(i+1)*5+1];\n\t\t\tperpx=-(p1y-p2y);\n\t\t\tperpy=p1x-p2x;\n\t\t\tdist=Math.sqrt(perpx *perpx+perpy *perpy);\n\t\t\tperpx=perpx / dist *w;\n\t\t\tperpy=perpy / dist *w;\n\t\t\tperp2x=-(p2y-p3y);\n\t\t\tperp2y=p2x-p3x;\n\t\t\tdist=Math.sqrt(perp2x *perp2x+perp2y *perp2y);\n\t\t\tperp2x=perp2x / dist *w;\n\t\t\tperp2y=perp2y / dist *w;\n\t\t\ta1=(-perpy+p1y)-(-perpy+p2y);\n\t\t\tb1=(-perpx+p2x)-(-perpx+p1x);\n\t\t\tc1=(-perpx+p1x)*(-perpy+p2y)-(-perpx+p2x)*(-perpy+p1y);\n\t\t\ta2=(-perp2y+p3y)-(-perp2y+p2y);\n\t\t\tb2=(-perp2x+p2x)-(-perp2x+p3x);\n\t\t\tc2=(-perp2x+p3x)*(-perp2y+p2y)-(-perp2x+p2x)*(-perp2y+p3y);\n\t\t\tdenom=a1 *b2-a2 *b1;\n\t\t\tif (Math.abs(denom)< 0.1){\n\t\t\t\tdenom+=10.1;\n\t\t\t\tresult.push(p2x-perpx,p2y-perpy,r,g,b,p2x+perpx,p2y+perpy,r,g,b);\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tpx=(b1 *c2-b2 *c1)/ denom;\n\t\t\tpy=(a2 *c1-a1 *c2)/ denom;\n\t\t\tpdist=(px-p2x)*(px-p2x)+(py-p2y)+(py-p2y);\n\t\t\tresult.push(px,py,r,g,b,p2x-(px-p2x),p2y-(py-p2y),r,g,b);\n\t\t}\n\t\tif (outIndex){\n\t\t\tindices=outIndex;\n\t\t};\n\t\tvar groupLen=this.edges+1;\n\t\tfor (i=1;i < groupLen;i++){\n\t\t\tindices.push(iStart+(i-1)*2,iStart+(i-1)*2+1,iStart+i *2+1,iStart+i *2+1,iStart+i *2,iStart+(i-1)*2);\n\t\t}\n\t\tindices.push(iStart+(i-1)*2,iStart+(i-1)*2+1,iStart+1,iStart+1,iStart,iStart+(i-1)*2);\n\t\treturn result;\n\t}\n\n\treturn LoopLine;\n})(BasePoly)\n\n\n//class laya.webgl.shapes.Polygon extends laya.webgl.shapes.BasePoly\nvar Polygon=(function(_super){\n\tfunction Polygon(x,y,points,color,borderWidth,borderColor){\n\t\tthis._points=null;\n\t\tthis._start=-1;\n\t\tthis._repaint=false;\n\t\tthis.earcutTriangles=null;\n\t\tthis._mat=Matrix.create();\n\t\tthis._points=points.slice(0,points.length);\n\t\tPolygon.__super.call(this,x,y,0,0,this._points.length / 2,color,borderWidth,borderColor);\n\t}\n\n\t__class(Polygon,'laya.webgl.shapes.Polygon',_super);\n\tvar __proto=Polygon.prototype;\n\t__proto.rebuild=function(point){\n\t\tif (!this._repaint){\n\t\t\tthis._points.length=0;\n\t\t\tthis._points=this._points.concat(point);\n\t\t}\n\t}\n\n\t__proto.setMatrix=function(mat){\n\t\tmat.copyTo(this._mat);\n\t}\n\n\t__proto.needUpdate=function(mat){\n\t\tthis._repaint=(this._mat.a==mat.a && this._mat.b==mat.b && this._mat.c==mat.c && this._mat.d==mat.d && this._mat.tx==mat.tx && this._mat.ty==mat.ty);\n\t\treturn !this._repaint;\n\t}\n\n\t__proto.getData=function(ib,vb,start){\n\t\tvar indices,i=0;\n\t\tvar tArray=this._points;\n\t\tvar tLen=0;\n\t\tif (this.mUint16Array && this.mFloat32Array&&this._repaint){\n\t\t\tif (this._start !=start){\n\t\t\t\tthis._start=start;\n\t\t\t\tindices=[];\n\t\t\t\ttLen=this.earcutTriangles.length;\n\t\t\t\tfor (i=0;i < tLen;i++){\n\t\t\t\t\tindices.push(this.earcutTriangles[i]+start);\n\t\t\t\t}\n\t\t\t\tthis.mUint16Array=new Uint16Array(indices);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis._start=start;\n\t\t\tindices=[];\n\t\t\tvar verts=[];\n\t\t\tvar vertsEarcut=[];\n\t\t\tvar color=this.color;\n\t\t\tvar r=((color >> 16)& 0x0000ff)/ 255,g=((color >> 8)& 0xff)/ 255,b=(color & 0x0000ff)/ 255;\n\t\t\ttLen=Math.floor(tArray.length / 2);\n\t\t\tfor (i=0;i < tLen;i++){\n\t\t\t\tverts.push(this.x+tArray[i *2],this.y+tArray[i *2+1],r,g,b);\n\t\t\t\tvertsEarcut.push(this.x+tArray[i *2],this.y+tArray[i *2+1]);\n\t\t\t}\n\t\t\tthis.earcutTriangles=Earcut.earcut(vertsEarcut,null,2);\n\t\t\ttLen=this.earcutTriangles.length;\n\t\t\tfor (i=0;i < tLen;i++){\n\t\t\t\tindices.push(this.earcutTriangles[i]+start);\n\t\t\t}\n\t\t\tthis.mUint16Array=new Uint16Array(indices);\n\t\t\tthis.mFloat32Array=new Float32Array(verts);\n\t\t}\n\t\tib.append(this.mUint16Array);\n\t\tvb.append(this.mFloat32Array);\n\t}\n\n\treturn Polygon;\n})(BasePoly)\n\n\n//class laya.webgl.submit.SubmitCanvas extends laya.webgl.submit.Submit\nvar SubmitCanvas=(function(_super){\n\tfunction SubmitCanvas(){\n\t\t//this._ctx_src=null;\n\t\tthis._matrix=new Matrix();\n\t\tthis._matrix4=CONST3D2D.defaultMatrix4.concat();\n\t\tSubmitCanvas.__super.call(this,/*laya.webgl.submit.Submit.TYPE_2D*/10000);\n\t\tthis.shaderValue=new Value2D(0,0);\n\t}\n\n\t__class(SubmitCanvas,'laya.webgl.submit.SubmitCanvas',_super);\n\tvar __proto=SubmitCanvas.prototype;\n\t__proto.renderSubmit=function(){\n\t\tif (this._ctx_src._targets){\n\t\t\tthis._ctx_src._targets.flush(this._ctx_src);\n\t\t\treturn 1;\n\t\t};\n\t\tvar preAlpha=RenderState2D.worldAlpha;\n\t\tvar preMatrix4=RenderState2D.worldMatrix4;\n\t\tvar preMatrix=RenderState2D.worldMatrix;\n\t\tvar preFilters=RenderState2D.worldFilters;\n\t\tvar preWorldShaderDefines=RenderState2D.worldShaderDefines;\n\t\tvar v=this.shaderValue;\n\t\tvar m=this._matrix;\n\t\tvar m4=this._matrix4;\n\t\tvar mout=Matrix.TEMP;\n\t\tMatrix.mul(m,preMatrix,mout);\n\t\tm4[0]=mout.a;\n\t\tm4[1]=mout.b;\n\t\tm4[4]=mout.c;\n\t\tm4[5]=mout.d;\n\t\tm4[12]=mout.tx;\n\t\tm4[13]=mout.ty;\n\t\tRenderState2D.worldMatrix=mout.clone();\n\t\tRenderState2D.worldMatrix4=m4;\n\t\tRenderState2D.worldAlpha=RenderState2D.worldAlpha *v.alpha;\n\t\tif (v.filters && v.filters.length){\n\t\t\tRenderState2D.worldFilters=v.filters;\n\t\t\tRenderState2D.worldShaderDefines=v.defines;\n\t\t}\n\t\tthis._ctx_src.flush();\n\t\tRenderState2D.worldAlpha=preAlpha;\n\t\tRenderState2D.worldMatrix4=preMatrix4;\n\t\tRenderState2D.worldMatrix.destroy();\n\t\tRenderState2D.worldMatrix=preMatrix;\n\t\tRenderState2D.worldFilters=preFilters;\n\t\tRenderState2D.worldShaderDefines=preWorldShaderDefines;\n\t\treturn 1;\n\t}\n\n\t__proto.releaseRender=function(){\n\t\tvar cache=SubmitCanvas._cache;\n\t\tthis._ctx_src=null;\n\t\tcache[cache._length++]=this;\n\t}\n\n\t__proto.getRenderType=function(){\n\t\treturn /*laya.webgl.submit.Submit.TYPE_CANVAS*/10003;\n\t}\n\n\tSubmitCanvas.create=function(ctx_src,alpha,filters){\n\t\tvar o=(!SubmitCanvas._cache._length)? (new SubmitCanvas()):SubmitCanvas._cache[--SubmitCanvas._cache._length];\n\t\to._ctx_src=ctx_src;\n\t\tvar v=o.shaderValue;\n\t\tv.alpha=alpha;\n\t\tv.defines.setValue(0);\n\t\tfilters && filters.length && v.setFilters(filters);\n\t\treturn o;\n\t}\n\n\tSubmitCanvas._cache=(SubmitCanvas._cache=[],SubmitCanvas._cache._length=0,SubmitCanvas._cache);\n\treturn SubmitCanvas;\n})(Submit)\n\n\n//class laya.webgl.submit.SubmitTexture extends laya.webgl.submit.Submit\nvar SubmitTexture=(function(_super){\n\tfunction SubmitTexture(renderType){\n\t\tthis._preIsSameTextureShader=false;\n\t\tthis._isSameTexture=true;\n\t\tthis._texs=new Array;\n\t\tthis._texsID=new Array;\n\t\tthis._vbPos=new Array;\n\t\t(renderType===void 0)&& (renderType=10000);\n\t\tSubmitTexture.__super.call(this,renderType);\n\t}\n\n\t__class(SubmitTexture,'laya.webgl.submit.SubmitTexture',_super);\n\tvar __proto=SubmitTexture.prototype;\n\t__proto.releaseRender=function(){\n\t\tvar cache=SubmitTexture._cache;\n\t\tcache[cache._length++]=this;\n\t\tthis.shaderValue.release();\n\t\tthis._preIsSameTextureShader=false;\n\t\tthis._vb=null;\n\t\tthis._texs.length=0;\n\t\tthis._vbPos.length=0;\n\t\tthis._isSameTexture=true;\n\t}\n\n\t__proto.addTexture=function(tex,vbpos){\n\t\tthis._texsID[this._texs.length]=tex._uvID;\n\t\tthis._texs.push(tex);\n\t\tthis._vbPos.push(vbpos);\n\t}\n\n\t//检查材质是否修改，修改UV，设置是否是同一材质\n\t__proto.checkTexture=function(){\n\t\tif (this._texs.length < 1){\n\t\t\tthis._isSameTexture=true;\n\t\t\treturn;\n\t\t};\n\t\tvar _tex=this.shaderValue.textureHost;\n\t\tvar webGLImg=_tex.bitmap;\n\t\tif (webGLImg===null)return;\n\t\tvar vbdata=this._vb.getFloat32Array();\n\t\tfor (var i=0,s=this._texs.length;i < s;i++){\n\t\t\tvar tex=this._texs[i];\n\t\t\ttex.active();\n\t\t\tvar newUV=tex.uv;\n\t\t\tif (this._texsID[i]!==tex._uvID){\n\t\t\t\tthis._texsID[i]=tex._uvID;\n\t\t\t\tvar vbPos=this._vbPos[i];\n\t\t\t\tvbdata[vbPos+2]=newUV[0];\n\t\t\t\tvbdata[vbPos+3]=newUV[1];\n\t\t\t\tvbdata[vbPos+6]=newUV[2];\n\t\t\t\tvbdata[vbPos+7]=newUV[3];\n\t\t\t\tvbdata[vbPos+10]=newUV[4];\n\t\t\t\tvbdata[vbPos+11]=newUV[5];\n\t\t\t\tvbdata[vbPos+14]=newUV[6];\n\t\t\t\tvbdata[vbPos+15]=newUV[7];\n\t\t\t\tthis._vb.setNeedUpload();\n\t\t\t}\n\t\t\tif (tex.bitmap!==webGLImg){\n\t\t\t\tthis._isSameTexture=false;\n\t\t\t}\n\t\t}\n\t}\n\n\t__proto.renderSubmit=function(){\n\t\tif (this._numEle===0){\n\t\t\tSubmitTexture._shaderSet=false;\n\t\t\treturn 1;\n\t\t};\n\t\tvar _tex=this.shaderValue.textureHost;\n\t\tif (_tex){\n\t\t\tvar source=_tex.source;\n\t\t\tif (!_tex.bitmap || !source){\n\t\t\t\tSubmitTexture._shaderSet=false;\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tthis.shaderValue.texture=source;\n\t\t}\n\t\tthis._vb.bind_upload(this._ib);\n\t\tvar gl=WebGL.mainContext;\n\t\tif (BlendMode.activeBlendFunction!==this._blendFn){\n\t\t\tgl.enable(/*laya.webgl.WebGLContext.BLEND*/0x0BE2);\n\t\t\tthis._blendFn(gl);\n\t\t\tBlendMode.activeBlendFunction=this._blendFn;\n\t\t}\n\t\tStat.drawCall++;\n\t\tStat.trianglesFaces+=this._numEle / 3;\n\t\tif (this._preIsSameTextureShader && BaseShader.activeShader && SubmitTexture._shaderSet)\n\t\t\t(BaseShader.activeShader).uploadTexture2D(this.shaderValue.texture);\n\t\telse this.shaderValue.upload();\n\t\tSubmitTexture._shaderSet=true;\n\t\tif (this._texs.length > 1 && !this._isSameTexture){\n\t\t\tvar webGLImg=_tex.bitmap;\n\t\t\tvar index=0;\n\t\t\tvar shader=BaseShader.activeShader;\n\t\t\tfor (var i=0,s=this._texs.length;i < s;i++){\n\t\t\t\tvar tex2=this._texs[i];\n\t\t\t\tif (tex2.bitmap!==webGLImg || (i+1)===s){\n\t\t\t\t\tshader.uploadTexture2D(tex2.source);\n\t\t\t\t\tgl.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,(i-index+1)*6,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._startIdx+index *6 *CONST3D2D.BYTES_PIDX);\n\t\t\t\t\twebGLImg=tex2.bitmap;\n\t\t\t\t\tindex=i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t}else {\n\t\t\tgl.drawElements(/*laya.webgl.WebGLContext.TRIANGLES*/0x0004,this._numEle,/*laya.webgl.WebGLContext.UNSIGNED_SHORT*/0x1403,this._startIdx);\n\t\t}\n\t\treturn 1;\n\t}\n\n\tSubmitTexture.create=function(context,ib,vb,pos,sv){\n\t\tvar o=SubmitTexture._cache._length ? SubmitTexture._cache[--SubmitTexture._cache._length] :new SubmitTexture();\n\t\tif (vb==null){\n\t\t\tvb=o._selfVb || (o._selfVb=VertexBuffer2D.create(-1));\n\t\t\tvb.clear();\n\t\t\tpos=0;\n\t\t}\n\t\to._ib=ib;\n\t\to._vb=vb;\n\t\to._startIdx=pos *CONST3D2D.BYTES_PIDX;\n\t\to._numEle=0;\n\t\tvar blendType=context._nBlendType;\n\t\to._blendFn=context._targets ? BlendMode.targetFns[blendType] :BlendMode.fns[blendType];\n\t\to.shaderValue=sv;\n\t\to.shaderValue.setValue(context._shader2D);\n\t\tvar filters=context._shader2D.filters;\n\t\tfilters && o.shaderValue.setFilters(filters);\n\t\treturn o;\n\t}\n\n\tSubmitTexture._cache=(SubmitTexture._cache=[],SubmitTexture._cache._length=0,SubmitTexture._cache);\n\tSubmitTexture._shaderSet=true;\n\treturn SubmitTexture;\n})(Submit)\n\n\n/**\n*与MeshQuadTexture基本相同。不过index不是固定的\n*/\n//class laya.webgl.utils.MeshTexture extends laya.webgl.utils.Mesh2D\nvar MeshTexture=(function(_super){\n\tfunction MeshTexture(){\n\t\tMeshTexture.__super.call(this,laya.webgl.utils.MeshTexture.const_stride,0,0);\n\t\tthis.canReuse=true;\n\t\tthis.setAttributes(laya.webgl.utils.MeshTexture._fixattriInfo);\n\t}\n\n\t__class(MeshTexture,'laya.webgl.utils.MeshTexture',_super);\n\tvar __proto=MeshTexture.prototype;\n\t__proto.addData=function(vertices,uvs,idx,matrix,rgba,ctx){\n\t\tvar vertsz=vertices.length / 2;\n\t\tvar startpos=this._vb.needSize(vertsz *MeshTexture.const_stride);\n\t\tvar f32pos=startpos >> 2;\n\t\tvar vbdata=this._vb.getFloat32Array();\n\t\tvar ci=0;\n\t\tfor (var i=0;i < vertsz;i++){\n\t\t\tvar x=vertices[ci],y=vertices[ci+1];\n\t\t\tvar x1=x *matrix.a+y *matrix.c+matrix.tx;\n\t\t\tvar y1=x *matrix.b+y *matrix.d+matrix.ty;\n\t\t\tvbdata[f32pos++]=x1;vbdata[f32pos++]=y1;\n\t\t\tvbdata[f32pos++]=uvs[ci];vbdata[f32pos++]=uvs[ci+1];\n\t\t\tci+=2;\n\t\t}\n\t\tthis._vb.setNeedUpload();\n\t\tvar vertN=this.vertNum;\n\t\tif (vertN > 0){\n\t\t\tvar sz=idx.length;\n\t\t\tif (sz > MeshTexture.tmpIdx.length)MeshTexture.tmpIdx=new Uint16Array(sz);\n\t\t\tfor (var ii=0;ii < sz;ii++){\n\t\t\t\tMeshTexture.tmpIdx[ii]=idx[ii]+vertN;\n\t\t\t}\n\t\t\tthis._ib.appendU16Array(MeshTexture.tmpIdx,idx.length);\n\t\t\t}else {\n\t\t\tthis._ib.append(idx);\n\t\t}\n\t\tthis._ib.setNeedUpload();\n\t\tthis.vertNum+=vertsz;\n\t\tthis.indexNum+=idx.length;\n\t}\n\n\t/**\n\t*把本对象放到回收池中，以便getMesh能用。\n\t*/\n\t__proto.releaseMesh=function(){\n\t\tthis._vb._byteLength=0;\n\t\tthis._ib._byteLength=0;\n\t\tthis.vertNum=0;\n\t\tthis.indexNum=0;\n\t\tlaya.webgl.utils.MeshTexture._POOL.push(this);\n\t}\n\n\t__proto.destroy=function(){\n\t\tthis._ib.destroy();\n\t\tthis._vb.destroy();\n\t}\n\n\tMeshTexture.getAMesh=function(){\n\t\tif (laya.webgl.utils.MeshTexture._POOL.length){\n\t\t\treturn laya.webgl.utils.MeshTexture._POOL.pop();\n\t\t}\n\t\treturn new MeshTexture();\n\t}\n\n\tMeshTexture.const_stride=16;\n\tMeshTexture._POOL=[];\n\t__static(MeshTexture,\n\t['_fixattriInfo',function(){return this._fixattriInfo=[\n\t\t/*laya.webgl.WebGLContext.FLOAT*/0x1406,2,0,\n\t\t/*laya.webgl.WebGLContext.FLOAT*/0x1406,2,8];},'tmpIdx',function(){return this.tmpIdx=new Uint16Array(4);}\n\t]);\n\treturn MeshTexture;\n})(Mesh2D)\n\n\n/**\n*...\n*@author ...\n*/\n//class laya.webgl.shader.BaseShader extends laya.resource.Resource\nvar BaseShader=(function(_super){\n\tfunction BaseShader(){\n\t\tBaseShader.__super.call(this);\n\t\tthis.lock=true;\n\t}\n\n\t__class(BaseShader,'laya.webgl.shader.BaseShader',_super);\n\tBaseShader.activeShader=null;\n\tBaseShader.bindShader=null;\n\treturn BaseShader;\n})(Resource)\n\n\n//class laya.webgl.resource.RenderTarget2D extends laya.resource.Texture\nvar RenderTarget2D=(function(_super){\n\tfunction RenderTarget2D(width,height,surfaceFormat,surfaceType,depthStencilFormat,mipMap,repeat,minFifter,magFifter){\n\t\tthis._type=0;\n\t\tthis._svWidth=NaN;\n\t\tthis._svHeight=NaN;\n\t\tthis._preRenderTarget=null;\n\t\t//TODO:.........................................................\n\t\tthis._alreadyResolved=false;\n\t\tthis._looked=false;\n\t\tthis._surfaceFormat=0;\n\t\tthis._surfaceType=0;\n\t\tthis._depthStencilFormat=0;\n\t\tthis._mipMap=false;\n\t\tthis._repeat=false;\n\t\tthis._minFifter=0;\n\t\tthis._magFifter=0;\n\t\tthis._destroy=false;\n\t\t(surfaceFormat===void 0)&& (surfaceFormat=/*laya.webgl.WebGLContext.RGBA*/0x1908);\n\t\t(surfaceType===void 0)&& (surfaceType=/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401);\n\t\t(depthStencilFormat===void 0)&& (depthStencilFormat=/*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9);\n\t\t(mipMap===void 0)&& (mipMap=false);\n\t\t(repeat===void 0)&& (repeat=false);\n\t\t(minFifter===void 0)&& (minFifter=-1);\n\t\t(magFifter===void 0)&& (magFifter=-1);\n\t\tthis._type=1;\n\t\tthis._w=width;\n\t\tthis._h=height;\n\t\tthis._surfaceFormat=surfaceFormat;\n\t\tthis._surfaceType=surfaceType;\n\t\tthis._depthStencilFormat=depthStencilFormat;\n\t\tif (Render.isConchWebGL && this._depthStencilFormat===/*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9){\n\t\t\tthis._depthStencilFormat=/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5;\n\t\t}\n\t\tthis._mipMap=mipMap;\n\t\tthis._repeat=repeat;\n\t\tthis._minFifter=minFifter;\n\t\tthis._magFifter=magFifter;\n\t\tthis._createWebGLRenderTarget();\n\t\tthis.bitmap.lock=true;\n\t\tRenderTarget2D.__super.call(this,this.bitmap,Texture.INV_UV);\n\t}\n\n\t__class(RenderTarget2D,'laya.webgl.resource.RenderTarget2D',_super);\n\tvar __proto=RenderTarget2D.prototype;\n\tLaya.imps(__proto,{\"laya.resource.IDispose\":true})\n\t//TODO:临时......................................................\n\t__proto.getType=function(){\n\t\treturn this._type;\n\t}\n\n\t//*/\n\t__proto.getTexture=function(){\n\t\treturn this;\n\t}\n\n\t__proto.size=function(w,h){\n\t\tif (this._w==w && this._h==h)return;\n\t\tthis._w=w;\n\t\tthis._h=h;\n\t\tthis.release();\n\t\tif (this._w !=0 && this._h !=0)this._createWebGLRenderTarget();\n\t}\n\n\t__proto.release=function(){\n\t\tthis.destroy();\n\t}\n\n\t__proto.recycle=function(){\n\t\tRenderTarget2D.POOL.push(this);\n\t}\n\n\t__proto.start=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tthis._preRenderTarget=RenderState2D.curRenderTarget;\n\t\tRenderState2D.curRenderTarget=this;\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,this.bitmap.frameBuffer);\n\t\tthis._alreadyResolved=false;\n\t\tif (this._type==1){\n\t\t\tgl.viewport(0,0,this._w,this._h);\n\t\t\tthis._svWidth=RenderState2D.width;\n\t\t\tthis._svHeight=RenderState2D.height;\n\t\t\tRenderState2D.width=this._w;\n\t\t\tRenderState2D.height=this._h;\n\t\t\tBaseShader.activeShader=null;\n\t\t}\n\t\treturn this;\n\t}\n\n\t__proto.clear=function(r,g,b,a){\n\t\t(r===void 0)&& (r=0.0);\n\t\t(g===void 0)&& (g=0.0);\n\t\t(b===void 0)&& (b=0.0);\n\t\t(a===void 0)&& (a=1.0);\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.clearColor(r,g,b,a);\n\t\tvar clearFlag=/*laya.webgl.WebGLContext.COLOR_BUFFER_BIT*/0x00004000;\n\t\tswitch (this._depthStencilFormat){\n\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5:\n\t\t\t\tclearFlag |=/*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100;\n\t\t\t\tbreak ;\n\t\t\tcase /*laya.webgl.WebGLContext.STENCIL_INDEX8*/0x8D48:\n\t\t\t\tclearFlag |=/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400;\n\t\t\t\tbreak ;\n\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9:\n\t\t\t\tclearFlag |=/*laya.webgl.WebGLContext.DEPTH_BUFFER_BIT*/0x00000100;\n\t\t\t\tclearFlag |=/*laya.webgl.WebGLContext.STENCIL_BUFFER_BIT*/0x00000400\n\t\t\t\tbreak ;\n\t\t\t}\n\t\tgl.clear(clearFlag);\n\t}\n\n\t__proto.end=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,this._preRenderTarget ? this._preRenderTarget.bitmap.frameBuffer :null);\n\t\tthis._alreadyResolved=true;\n\t\tRenderState2D.curRenderTarget=this._preRenderTarget;\n\t\tif (this._type==1){\n\t\t\tgl.viewport(0,0,this._svWidth,this._svHeight);\n\t\t\tRenderState2D.width=this._svWidth;\n\t\t\tRenderState2D.height=this._svHeight;\n\t\t\tBaseShader.activeShader=null;\n\t\t}else gl.viewport(0,0,Laya.stage.width,Laya.stage.height);\n\t}\n\n\t__proto.getData=function(x,y,width,height){\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,(this.bitmap).frameBuffer);\n\t\tvar canRead=(gl.checkFramebufferStatus(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40)===/*laya.webgl.WebGLContext.FRAMEBUFFER_COMPLETE*/0x8CD5);\n\t\tif (!canRead){\n\t\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,null);\n\t\t\treturn null;\n\t\t};\n\t\tvar pixels=new Uint8Array(this._w *this._h *4);\n\t\tgl.readPixels(x,y,width,height,this._surfaceFormat,this._surfaceType,pixels);\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,null);\n\t\treturn pixels;\n\t}\n\n\t/**彻底清理资源,注意会强制解锁清理*/\n\t__proto.destroy=function(foreDiposeTexture){\n\t\t(foreDiposeTexture===void 0)&& (foreDiposeTexture=false);\n\t\tif (!this._destroy){\n\t\t\tthis._loaded=false;\n\t\t\tthis.bitmap.offAll();\n\t\t\tthis.bitmap.disposeResource();\n\t\t\tthis.bitmap.dispose();\n\t\t\tthis.offAll();\n\t\t\tthis.bitmap=null;\n\t\t\tthis._alreadyResolved=false;\n\t\t\tthis._destroy=true;\n\t\t\t_super.prototype.destroy.call(this);\n\t\t}\n\t}\n\n\t//待测试\n\t__proto.dispose=function(){}\n\t__proto._createWebGLRenderTarget=function(){\n\t\tthis.bitmap=new WebGLRenderTarget(this.width,this.height,this._surfaceFormat,this._surfaceType,this._depthStencilFormat,this._mipMap,this._repeat,this._minFifter,this._magFifter);\n\t\tthis.bitmap.activeResource();\n\t\tthis._alreadyResolved=true;\n\t\tthis._destroy=false;\n\t\tthis._loaded=true;\n\t\tthis.bitmap.on(/*laya.events.Event.RECOVERED*/\"recovered\",this,function(e){\n\t\t\tthis.event(/*laya.events.Event.RECOVERED*/\"recovered\");\n\t\t})\n\t}\n\n\t__getset(0,__proto,'surfaceFormat',function(){\n\t\treturn this._surfaceFormat;\n\t});\n\n\t__getset(0,__proto,'magFifter',function(){\n\t\treturn this._magFifter;\n\t});\n\n\t__getset(0,__proto,'surfaceType',function(){\n\t\treturn this._surfaceType;\n\t});\n\n\t__getset(0,__proto,'mipMap',function(){\n\t\treturn this._mipMap;\n\t});\n\n\t__getset(0,__proto,'depthStencilFormat',function(){\n\t\treturn this._depthStencilFormat;\n\t});\n\n\t//}\n\t__getset(0,__proto,'minFifter',function(){\n\t\treturn this._minFifter;\n\t});\n\n\t/**返回RenderTarget的Texture*/\n\t__getset(0,__proto,'source',function(){\n\t\tif (this._alreadyResolved)\n\t\t\treturn Laya.superGet(Texture,this,'source');\n\t\treturn null;\n\t});\n\n\tRenderTarget2D.create=function(w,h,surfaceFormat,surfaceType,depthStencilFormat,mipMap,repeat,minFifter,magFifter){\n\t\t(surfaceFormat===void 0)&& (surfaceFormat=/*laya.webgl.WebGLContext.RGBA*/0x1908);\n\t\t(surfaceType===void 0)&& (surfaceType=/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401);\n\t\t(depthStencilFormat===void 0)&& (depthStencilFormat=/*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9);\n\t\t(mipMap===void 0)&& (mipMap=false);\n\t\t(repeat===void 0)&& (repeat=false);\n\t\t(minFifter===void 0)&& (minFifter=-1);\n\t\t(magFifter===void 0)&& (magFifter=-1);\n\t\tvar t=RenderTarget2D.POOL.pop();\n\t\tt || (t=new RenderTarget2D(w,h));\n\t\tif (!t.bitmap || t._w !=w || t._h !=h || t._surfaceFormat !=surfaceFormat || t._surfaceType !=surfaceType || t._depthStencilFormat !=depthStencilFormat || t._mipMap !=mipMap || t._repeat !=repeat || t._minFifter !=minFifter || t._magFifter !=magFifter){\n\t\t\tt._w=w;\n\t\t\tt._h=h;\n\t\t\tt._surfaceFormat=surfaceFormat;\n\t\t\tt._surfaceType=surfaceType;\n\t\t\tt._depthStencilFormat=depthStencilFormat;\n\t\t\tif (Render.isConchWebGL && t._depthStencilFormat===/*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9){\n\t\t\t\tt._depthStencilFormat=/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5;\n\t\t\t}\n\t\t\tt._mipMap=mipMap;\n\t\t\tt._repeat=repeat;\n\t\t\tt._minFifter=minFifter;\n\t\t\tt._magFifter=magFifter;\n\t\t\tt.release();\n\t\t\tt._createWebGLRenderTarget();\n\t\t}\n\t\treturn t;\n\t}\n\n\tRenderTarget2D.TYPE2D=1;\n\tRenderTarget2D.TYPE3D=2;\n\tRenderTarget2D.POOL=[];\n\treturn RenderTarget2D;\n})(Texture)\n\n\n//class laya.webgl.utils.Buffer extends laya.resource.Resource\nvar Buffer=(function(_super){\n\tfunction Buffer(){\n\t\tthis._glBuffer=null;\n\t\tthis._buffer=null;\n\t\t//可能为Float32Array、Uint16Array、Uint8Array、ArrayBuffer等。\n\t\tthis._bufferType=0;\n\t\tthis._bufferUsage=0;\n\t\tthis._byteLength=0;\n\t\tBuffer.__super.call(this);\n\t\tBuffer._gl=WebGL.mainContext;\n\t}\n\n\t__class(Buffer,'laya.webgl.utils.Buffer',_super);\n\tvar __proto=Buffer.prototype;\n\t__proto._bind=function(){\n\t\tthis.activeResource();\n\t\tif (Buffer._bindActive[this._bufferType]!==this._glBuffer){\n\t\t\t(this._bufferType===/*laya.webgl.WebGLContext.ARRAY_BUFFER*/0x8892)&& (Buffer._bindVertexBuffer=this._glBuffer);\n\t\t\tBuffer._gl.bindBuffer(this._bufferType,Buffer._bindActive[this._bufferType]=this._glBuffer);\n\t\t\tBaseShader.activeShader=null;\n\t\t}\n\t}\n\n\t__proto.recreateResource=function(){\n\t\tthis._glBuffer || (this._glBuffer=Buffer._gl.createBuffer());\n\t\tthis.completeCreate();\n\t}\n\n\t__proto.disposeResource=function(){\n\t\tif (this._glBuffer){\n\t\t\tWebGL.mainContext.deleteBuffer(this._glBuffer);\n\t\t\tthis._glBuffer=null;\n\t\t}\n\t\tthis.memorySize=0;\n\t}\n\n\t__getset(0,__proto,'bufferUsage',function(){\n\t\treturn this._bufferUsage;\n\t});\n\n\tBuffer._gl=null;\n\tBuffer._bindActive={};\n\tBuffer._bindVertexBuffer=null;\n\tBuffer._enableAtributes=[];\n\treturn Buffer;\n})(Resource)\n\n\n//class laya.webgl.shader.d2.skinAnishader.SkinSV extends laya.webgl.shader.d2.value.Value2D\nvar SkinSV=(function(_super){\n\tfunction SkinSV(type){\n\t\tthis.texcoord=null;\n\t\tthis.offsetX=300;\n\t\tthis.offsetY=0;\n\t\tSkinSV.__super.call(this,/*laya.webgl.shader.d2.ShaderDefines2D.SKINMESH*/0x200,0);\n\t\tvar _vlen=8 *CONST3D2D.BYTES_PE;\n\t\tthis.position=[2,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,_vlen,0];\n\t\tthis.texcoord=[2,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,_vlen,2 *CONST3D2D.BYTES_PE];\n\t\tthis.color=[4,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,_vlen,4 *CONST3D2D.BYTES_PE];\n\t}\n\n\t__class(SkinSV,'laya.webgl.shader.d2.skinAnishader.SkinSV',_super);\n\treturn SkinSV;\n})(Value2D)\n\n\n//class laya.webgl.shader.d2.value.Color2dSV extends laya.webgl.shader.d2.value.Value2D\nvar Color2dSV=(function(_super){\n\tfunction Color2dSV(args){\n\t\tColor2dSV.__super.call(this,/*laya.webgl.shader.d2.ShaderDefines2D.COLOR2D*/0x02,0);\n\t\tthis.color=[];\n\t}\n\n\t__class(Color2dSV,'laya.webgl.shader.d2.value.Color2dSV',_super);\n\tvar __proto=Color2dSV.prototype;\n\t__proto.setValue=function(value){\n\t\tvalue.fillStyle&&(this.color=value.fillStyle._color._color);\n\t\tvalue.strokeStyle&&(this.color=value.strokeStyle._color._color);\n\t}\n\n\treturn Color2dSV;\n})(Value2D)\n\n\n//class laya.webgl.shader.d2.value.FillTextureSV extends laya.webgl.shader.d2.value.Value2D\nvar FillTextureSV=(function(_super){\n\tfunction FillTextureSV(type){\n\t\tthis.u_colorMatrix=null;\n\t\tthis.strength=0;\n\t\tthis.colorMat=null;\n\t\tthis.colorAlpha=null;\n\t\tthis.u_TexRange=[0,1,0,1];\n\t\tthis.u_offset=[0,0];\n\t\tthis.texcoord=Value2D._TEXCOORD;\n\t\tFillTextureSV.__super.call(this,/*laya.webgl.shader.d2.ShaderDefines2D.FILLTEXTURE*/0x100,0);\n\t}\n\n\t__class(FillTextureSV,'laya.webgl.shader.d2.value.FillTextureSV',_super);\n\tvar __proto=FillTextureSV.prototype;\n\t//this.color=[4,WebGLContext.FLOAT,false,_vlen,4 *CONST3D2D.BYTES_PE];\n\t__proto.setValue=function(vo){\n\t\tthis.ALPHA=vo.ALPHA;\n\t\tvo.filters && this.setFilters(vo.filters);\n\t}\n\n\t__proto.clear=function(){\n\t\tthis.texture=null;\n\t\tthis.shader=null;\n\t\tthis.defines.setValue(0);\n\t}\n\n\treturn FillTextureSV;\n})(Value2D)\n\n\n//class laya.webgl.shader.d2.value.TextureSV extends laya.webgl.shader.d2.value.Value2D\nvar TextureSV=(function(_super){\n\tfunction TextureSV(subID){\n\t\tthis.u_colorMatrix=null;\n\t\tthis.strength=0;\n\t\tthis.blurInfo=null;\n\t\tthis.colorMat=null;\n\t\tthis.colorAlpha=null;\n\t\tthis.texcoord=Value2D._TEXCOORD;\n\t\t(subID===void 0)&& (subID=0);\n\t\tTextureSV.__super.call(this,/*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01,subID);\n\t}\n\n\t__class(TextureSV,'laya.webgl.shader.d2.value.TextureSV',_super);\n\tvar __proto=TextureSV.prototype;\n\t__proto.setValue=function(vo){\n\t\tthis.ALPHA=vo.ALPHA;\n\t\tvo.filters && this.setFilters(vo.filters);\n\t}\n\n\t__proto.clear=function(){\n\t\tthis.texture=null;\n\t\tthis.shader=null;\n\t\tthis.defines.setValue(0);\n\t}\n\n\treturn TextureSV;\n})(Value2D)\n\n\n//class laya.webgl.shader.d2.value.PrimitiveSV extends laya.webgl.shader.d2.value.Value2D\nvar PrimitiveSV=(function(_super){\n\tfunction PrimitiveSV(args){\n\t\tthis.a_color=null;\n\t\tthis.u_pos=[0,0];\n\t\tPrimitiveSV.__super.call(this,/*laya.webgl.shader.d2.ShaderDefines2D.PRIMITIVE*/0x04,0);\n\t\tthis.position=[2,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,5 *CONST3D2D.BYTES_PE,0];\n\t\tthis.a_color=[3,/*laya.webgl.WebGLContext.FLOAT*/0x1406,false,5 *CONST3D2D.BYTES_PE,2 *CONST3D2D.BYTES_PE];\n\t}\n\n\t__class(PrimitiveSV,'laya.webgl.shader.d2.value.PrimitiveSV',_super);\n\treturn PrimitiveSV;\n})(Value2D)\n\n\n//class laya.webgl.atlas.AtlasWebGLCanvas extends laya.resource.Bitmap\nvar AtlasWebGLCanvas=(function(_super){\n\tfunction AtlasWebGLCanvas(){\n\t\tthis._atlaser=null;\n\t\t/**兼容Stage3D使用*/\n\t\tthis._flashCacheImage=null;\n\t\tthis._flashCacheImageNeedFlush=false;\n\t\tAtlasWebGLCanvas.__super.call(this);\n\t}\n\n\t__class(AtlasWebGLCanvas,'laya.webgl.atlas.AtlasWebGLCanvas',_super);\n\tvar __proto=AtlasWebGLCanvas.prototype;\n\t/***重新创建资源*/\n\t__proto.recreateResource=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar glTex=this._source=gl.createTexture();\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,glTex);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,this._w,this._h,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,null);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tthis.memorySize=this._w *this._h *4;\n\t\tthis.completeCreate();\n\t}\n\n\t/***销毁资源*/\n\t__proto.disposeResource=function(){\n\t\tif (this._source){\n\t\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\t\tthis._source=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t/**采样image到WebGLTexture的一部分*/\n\t__proto.texSubImage2D=function(xoffset,yoffset,bitmap){\n\t\tif (!Render.isFlash){\n\t\t\tvar gl=WebGL.mainContext;\n\t\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source);\n\t\t\tif (Render.isConchWebGL){\n\t\t\t\tif (/*__JS__ */bitmap !==ConchTextCanvas){\n\t\t\t\t\t(xoffset-1 >=0)&& (gl.texSubImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset-1,yoffset,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap));\n\t\t\t\t\t(xoffset+1 <=this._w)&& (gl.texSubImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset+1,yoffset,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap));\n\t\t\t\t\t(yoffset-1 >=0)&& (gl.texSubImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset-1,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap));\n\t\t\t\t\t(yoffset+1 <=this._h)&& (gl.texSubImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset+1,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap));\n\t\t\t\t}\n\t\t\t\tgl.texSubImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,true);\n\t\t\t\t(xoffset-1 >=0)&& (gl.texSubImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset-1,yoffset,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap));\n\t\t\t\t(xoffset+1 <=this._w)&& (gl.texSubImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset+1,yoffset,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap));\n\t\t\t\t(yoffset-1 >=0)&& (gl.texSubImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset-1,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap));\n\t\t\t\t(yoffset+1 <=this._h)&& (gl.texSubImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset+1,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap));\n\t\t\t\tgl.texSubImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,bitmap);\n\t\t\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,false);\n\t\t\t}\n\t\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\t\t}else {\n\t\t\tif (!this._flashCacheImage){\n\t\t\t\tthis._flashCacheImage=HTMLImage.create(\"\");\n\t\t\t\tthis._flashCacheImage._image.createCanvas(this._w,this._h);\n\t\t\t};\n\t\t\tvar bmData=bitmap.bitmapdata;\n\t\t\tthis._flashCacheImage._image.copyPixels(bmData,0,0,bmData.width,bmData.height,xoffset,yoffset);\n\t\t\t(this._flashCacheImageNeedFlush)|| (this._flashCacheImageNeedFlush=true);\n\t\t}\n\t}\n\n\t/**采样image到WebGLTexture的一部分*/\n\t__proto.texSubImage2DPixel=function(xoffset,yoffset,width,height,pixel){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source);\n\t\tvar pixels=new Uint8Array(pixel.data);\n\t\tif (Render.isConchWebGL){\n\t\t\tgl.texSubImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset,width,height,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,pixels);\n\t\t}\n\t\telse {\n\t\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,true);\n\t\t\tgl.texSubImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset,width,height,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,pixels);\n\t\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,false);\n\t\t}\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t}\n\n\t/***\n\t*设置图片宽度\n\t*@param value 图片宽度\n\t*/\n\t__getset(0,__proto,'width',_super.prototype._$get_width,function(value){\n\t\tthis._w=value;\n\t});\n\n\t/***\n\t*设置图片高度\n\t*@param value 图片高度\n\t*/\n\t__getset(0,__proto,'height',_super.prototype._$get_height,function(value){\n\t\tthis._h=value;\n\t});\n\n\treturn AtlasWebGLCanvas;\n})(Bitmap)\n\n\n/**@private */\n//class laya.webgl.resource.WebGLCanvas extends laya.resource.Bitmap\nvar WebGLCanvas=(function(_super){\n\tfunction WebGLCanvas(){\n\t\tthis.flipY=true;\n\t\t//上传的时候是否预乘alpha\n\t\t//this._ctx=null;\n\t\t/**HTML Canvas*/\n\t\t//this._canvas=null;\n\t\t//this._imgData=null;\n\t\t//}\n\t\t//this.iscpuSource=false;\n\t\tthis.alwaysChange=false;\n\t\tWebGLCanvas.__super.call(this);\n\t}\n\n\t__class(WebGLCanvas,'laya.webgl.resource.WebGLCanvas',_super);\n\tvar __proto=WebGLCanvas.prototype;\n\t//}\n\t__proto.getCanvas=function(){\n\t\treturn this._canvas;\n\t}\n\n\t__proto.clear=function(){\n\t\tthis._ctx && this._ctx.clear();\n\t}\n\n\t__proto.destroy=function(){\n\t\tthis._ctx && this._ctx.destroy();\n\t\tthis._ctx=null;\n\t\tlaya.resource.Resource.prototype.destroy.call(this);\n\t}\n\n\t__proto._setContext=function(context){\n\t\tthis._ctx=context;\n\t}\n\n\t__proto.getContext=function(contextID,other){\n\t\treturn this._ctx ? this._ctx :(this._ctx=WebGLCanvas._createContext(this));\n\t}\n\n\t/*override public function copyTo(dec:Bitmap):void {\n\tsuper.copyTo(dec);\n\t(dec as WebGLCanvas)._ctx=_ctx;\n}*/\n\n\n__proto.size=function(w,h){\n\tif (this._w !=w || this._h !=h){\n\t\tthis._w=w;\n\t\tthis._h=h;\n\t\tthis._ctx && this._ctx.size(w,h);\n\t\tthis._canvas && (this._canvas.height=h,this._canvas.width=w);\n\t}\n\n}\n\n\n__proto.activeResource=function(force){\n\t(force===void 0)&& (force=false);\n\tif (!this._source){\n\t\tthis.recreateResource();\n\t}\n\n}\n\n\n__proto.recreateResource=function(){\n\tthis.createWebGlTexture();\n\tthis.completeCreate();\n}\n\n\n__proto.disposeResource=function(){\n\tif (this._source && !this.iscpuSource){\n\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\tthis._source=null;\n\t\tthis.memorySize=0;\n\t}\n\n}\n\n\n__proto.createWebGlTexture=function(){\n\tvar gl=WebGL.mainContext;\n\tif (!this._canvas){\n\t};\n\n\tvar glTex=this._source=gl.createTexture();\n\tthis.iscpuSource=false;\n\tvar preTarget=WebGLContext.curBindTexTarget;\n\tvar preTexture=WebGLContext.curBindTexValue;\n\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,glTex);\n\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_FLIP_Y_WEBGL*/0x9240,this.flipY?1:0);\n\tif (Render.isConchWebGL){\n\t\tgl.texImage2DEx(WebGLCanvas.premulAlpha,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._imgData);\n\t}\n\n\telse {\n\t\tWebGLCanvas.premulAlpha&&gl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,true);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._imgData);\n\t\tWebGLCanvas.premulAlpha && gl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,false);\n\t}\n\n\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_FLIP_Y_WEBGL*/0x9240,0);\n\tthis.memorySize=this._w *this._h *4;\n\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n}\n\n\n//_canvas=null;\n__proto.reloadCanvasData=function(){\n\tvar gl=WebGL.mainContext;\n\tif (!this._source){\n\t\tthrow \"reloadCanvasData error, gl texture not created!\";\n\t};\n\n\tvar preTarget=WebGLContext.curBindTexTarget;\n\tvar preTexture=WebGLContext.curBindTexValue;\n\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source);\n\tif (Render.isConchWebGL){\n\t\tgl.texImage2DEx(WebGLCanvas.premulAlpha,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._imgData);\n\t}\n\n\telse {\n\t\tWebGLCanvas.premulAlpha&&gl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,true);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._imgData);\n\t\tWebGLCanvas.premulAlpha && gl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,false);\n\t}\n\n\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_FLIP_Y_WEBGL*/0x9240,0);\n\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n}\n\n\n//_canvas=null;\n__proto.texSubImage2D=function(webglCanvas,xoffset,yoffset){\n\tvar gl=WebGL.mainContext;\n\tvar preTarget=WebGLContext.curBindTexTarget;\n\tvar preTexture=WebGLContext.curBindTexValue;\n\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source);\n\tif (Render.isConchWebGL){\n\t\tgl.texSubImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,webglCanvas._source);\n\t}\n\n\telse {\n\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,true);\n\t\tgl.texSubImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,xoffset,yoffset,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,webglCanvas._source);\n\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,false);\n\t}\n\n\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n}\n\n\n__proto.toBase64=function(type,encoderOptions,callBack){\n\tvar base64Data=null;\n\tif (this._canvas){\n\t\tbase64Data=this._canvas.toDataURL(type,encoderOptions);\n\t}\n\n\tcallBack.call(this,base64Data);\n}\n\n\n//由于resource的dispose被郭磊改成了destroy，这里会重载父类的destroy，所以必须调用这个，否则会有泄露。\n__getset(0,__proto,'context',function(){\n\treturn this._ctx;\n});\n\n\n__getset(0,__proto,'source',function(){\n\tif (this.alwaysChange)this.reloadCanvasData();\n\treturn this._source;\n});\n\n\n__getset(0,__proto,'asBitmap',null,function(value){\n\tthis._ctx && (this._ctx.asBitmap=value);\n});\n\n\nWebGLCanvas._createContext=null;\nWebGLCanvas.premulAlpha=false;\nreturn WebGLCanvas;\n})(Bitmap)\n\n\n//class laya.webgl.resource.WebGLCharImage extends laya.resource.Bitmap\nvar WebGLCharImage=(function(_super){\n\tfunction WebGLCharImage(content,drawValue){\n\t\t// public static var Config.CborderSize:int=12;\n\t\t//this._ctx=null;\n\t\t/***是否创建私有Source*/\n\t\t//this._allowMerageInAtlas=false;\n\t\t/**是否允许加入大图合集*/\n\t\t//this._enableMerageInAtlas=false;\n\t\t/**HTML Canvas，绘制字符载体,非私有数据载体*/\n\t\t//this.canvas=null;\n\t\t/**********************************************************************************/\n\t\t//this.cw=NaN;\n\t\t//this.ch=NaN;\n\t\t//this.xs=NaN;\n\t\t//this.ys=NaN;\n\t\t//this.char=null;\n\t\t//this.fillColor=null;\n\t\t//this.borderColor=null;\n\t\t//this.borderSize=0;\n\t\t//this.font=null;\n\t\t//this.fontSize=0;\n\t\t//this.texture=null;\n\t\t//this.lineWidth=0;\n\t\t//this.UV=null;\n\t\t//this.isSpace=false;\n\t\t//this.underLine=0;\n\t\tWebGLCharImage.__super.call(this);\n\t\tthis.char=content;\n\t\tthis.isSpace=content===' ';\n\t\tthis.xs=drawValue.scaleX;\n\t\tthis.ys=drawValue.scaleY;\n\t\tthis.font=drawValue.font.toString();\n\t\tthis.fontSize=drawValue.font.size;\n\t\tthis.fillColor=drawValue.fillColor;\n\t\tthis.borderColor=drawValue.borderColor;\n\t\tthis.lineWidth=drawValue.lineWidth;\n\t\tthis.underLine=drawValue.underLine;\n\t\tvar bIsConchApp=Render.isConchApp;\n\t\tvar pCanvas;\n\t\tif (bIsConchApp){\n\t\t\t/*__JS__ */pCanvas=ConchTextCanvas;\n\t\t\t/*__JS__ */pCanvas._source=ConchTextCanvas;\n\t\t\t/*__JS__ */pCanvas._source.canvas=ConchTextCanvas;\n\t\t\t}else {\n\t\t\tpCanvas=Browser.canvas.source;\n\t\t}\n\t\tthis.canvas=pCanvas;\n\t\tthis._enableMerageInAtlas=true;\n\t\tif (bIsConchApp){\n\t\t\t/*__JS__ */this._ctx=pCanvas;\n\t\t\t}else {\n\t\t\tthis._ctx=this.canvas.getContext('2d',undefined);\n\t\t};\n\t\tvar t=Utils.measureText(this.char,this.font);\n\t\tthis.cw=t.width *this.xs;\n\t\tthis.ch=(t.height || this.fontSize)*this.ys;\n\t\tthis.onresize(this.cw+Config.CborderSize *2,this.ch+Config.CborderSize *2);\n\t\tthis.texture=new Texture(this);\n\t}\n\n\t__class(WebGLCharImage,'laya.webgl.resource.WebGLCharImage',_super);\n\tvar __proto=WebGLCharImage.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.resource.IMergeAtlasBitmap\":true})\n\t__proto.active=function(){\n\t\tthis.texture.active();\n\t}\n\n\t__proto.recreateResource=function(){\n\t\tvar bIsConchApp=Render.isConchApp;\n\t\tthis.onresize(this.cw+Config.CborderSize *2,this.ch+Config.CborderSize *2);\n\t\tthis.canvas && (this.canvas.height=this._h,this.canvas.width=this._w);\n\t\tif (bIsConchApp){\n\t\t\tvar nFontSize=this.fontSize;\n\t\t\tif (this.xs !=1 || this.ys !=1){\n\t\t\t\tnFontSize=parseInt(nFontSize *((this.xs > this.ys)? this.xs :this.ys)+\"\");\n\t\t\t};\n\t\t\tvar sFont=\"normal 100 \"+this.font;\n\t\t\tsFont=sFont.replace(WebGLCharImage._fontSizeReg,nFontSize);\n\t\t\tif (this.borderColor){\n\t\t\t\tsFont+=\" 1 \"+this.borderColor;\n\t\t\t}\n\t\t\tthis._ctx.font=sFont;\n\t\t\tthis._ctx.textBaseline=\"top\";\n\t\t\tthis._ctx.fillStyle=this.fillColor;\n\t\t\tthis._ctx.fillText(this.char,Config.CborderSize,Config.CborderSize,null,null,null);\n\t\t\t}else {\n\t\t\tthis._ctx.save();\n\t\t\tthis._ctx.lineJoin=\"round\";\n\t\t\t(this._ctx).clearRect(0,0,this.cw+Config.CborderSize *2,this.ch+Config.CborderSize *2);\n\t\t\tthis._ctx.font=this.font;\n\t\t\tif (Text.RightToLeft){\n\t\t\t\tthis._ctx.textAlign=\"end\";\n\t\t\t}\n\t\t\tthis._ctx.textBaseline=\"top\";\n\t\t\tif (this.xs !=1 || this.ys !=1){\n\t\t\t\tthis._ctx.setTransform(this.xs,0,0,this.ys,Config.CborderSize,Config.CborderSize);\n\t\t\t\t}else {\n\t\t\t\tthis._ctx.setTransform(1,0,0,1,Config.CborderSize,Config.CborderSize);\n\t\t\t}\n\t\t\tif (this.fillColor && this.borderColor){\n\t\t\t\tthis._ctx.strokeStyle=this.borderColor;\n\t\t\t\tthis._ctx.lineWidth=this.lineWidth;\n\t\t\t\tthis._ctx.strokeText(this.char,0,0,null,null,0,null);\n\t\t\t\tthis._ctx.fillStyle=this.fillColor;\n\t\t\t\tthis._ctx.fillText(this.char,0,0);\n\t\t\t\t}else {\n\t\t\t\tif (this.lineWidth===-1){\n\t\t\t\t\tthis._ctx.fillStyle=this.fillColor ? this.fillColor :\"white\";\n\t\t\t\t\tthis._ctx.fillText(this.char,0,0);\n\t\t\t\t\t}else {\n\t\t\t\t\tthis._ctx.strokeStyle=this.borderColor?this.borderColor:'white';\n\t\t\t\t\tthis._ctx.lineWidth=this.lineWidth;\n\t\t\t\t\tthis._ctx.strokeText(this.char,0,0,null,null,0,null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this.underLine){\n\t\t\t\tthis._ctx.lineWidth=1;\n\t\t\t\tthis._ctx.strokeStyle=this.fillColor;\n\t\t\t\tthis._ctx.beginPath();\n\t\t\t\tthis._ctx.moveTo(0,this.fontSize+1);\n\t\t\t\tvar nW=this._ctx.measureText(this.char).width+1;\n\t\t\t\tthis._ctx.lineTo(nW,this.fontSize+1);\n\t\t\t\tthis._ctx.stroke();\n\t\t\t}\n\t\t\tthis._ctx.restore();\n\t\t}\n\t\tthis.borderSize=Config.CborderSize;\n\t\tthis.completeCreate();\n\t}\n\n\t__proto.onresize=function(w,h){\n\t\tthis._w=w;\n\t\tthis._h=h;\n\t\tthis._allowMerageInAtlas=true;\n\t}\n\n\t__proto.clearAtlasSource=function(){}\n\t/**\n\t*是否创建私有Source\n\t*@return 是否创建\n\t*/\n\t__getset(0,__proto,'allowMerageInAtlas',function(){\n\t\treturn this._allowMerageInAtlas;\n\t});\n\n\t__getset(0,__proto,'atlasSource',function(){\n\t\treturn this.canvas;\n\t});\n\n\t__getset(0,__proto,'atlasImgData',function(){\n\t\tif (!WebGLCharImage.canUseCanvas){\n\t\t\tif(this._ctx.getImageData)\n\t\t\t\treturn this._ctx.getImageData(0,0,this._w,this._h);\n\t\t}\n\t\treturn null;\n\t});\n\n\t/**\n\t*是否创建私有Source,通常禁止修改\n\t*@param value 是否创建\n\t*/\n\t/**\n\t*是否创建私有Source\n\t*@return 是否创建\n\t*/\n\t__getset(0,__proto,'enableMerageInAtlas',function(){\n\t\treturn this._enableMerageInAtlas;\n\t\t},function(value){\n\t\tthis._enableMerageInAtlas=value;\n\t});\n\n\tWebGLCharImage.createOneChar=function(content,drawValue){\n\t\tvar char=new WebGLCharImage(content,drawValue);\n\t\treturn char;\n\t}\n\n\tWebGLCharImage.canUseCanvas=true;\n\tWebGLCharImage._fontSizeReg=new RegExp(\"\\\\d+(?=px)\",\"g\");\n\treturn WebGLCharImage;\n})(Bitmap)\n\n\n//class laya.webgl.resource.WebGLRenderTarget extends laya.resource.Bitmap\nvar WebGLRenderTarget=(function(_super){\n\tfunction WebGLRenderTarget(width,height,surfaceFormat,surfaceType,depthStencilFormat,mipMap,repeat,minFifter,magFifter){\n\t\t//this._frameBuffer=null;\n\t\t//this._depthStencilBuffer=null;\n\t\t//this._surfaceFormat=0;\n\t\t//this._surfaceType=0;\n\t\t//this._depthStencilFormat=0;\n\t\t//this._mipMap=false;\n\t\t//this._repeat=false;\n\t\t//this._minFifter=0;\n\t\t//this._magFifter=0;\n\t\t(surfaceFormat===void 0)&& (surfaceFormat=/*laya.webgl.WebGLContext.RGBA*/0x1908);\n\t\t(surfaceType===void 0)&& (surfaceType=/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401);\n\t\t(depthStencilFormat===void 0)&& (depthStencilFormat=/*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9);\n\t\t(mipMap===void 0)&& (mipMap=false);\n\t\t(repeat===void 0)&& (repeat=false);\n\t\t(minFifter===void 0)&& (minFifter=-1);\n\t\t(magFifter===void 0)&& (magFifter=1);\n\t\tWebGLRenderTarget.__super.call(this);\n\t\tthis._w=width;\n\t\tthis._h=height;\n\t\tthis._surfaceFormat=surfaceFormat;\n\t\tthis._surfaceType=surfaceType;\n\t\tthis._depthStencilFormat=depthStencilFormat;\n\t\tif (Render.isConchWebGL && this._depthStencilFormat===/*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9){\n\t\t\tthis._depthStencilFormat=/*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5;\n\t\t}\n\t\tthis._mipMap=mipMap;\n\t\tthis._repeat=repeat;\n\t\tthis._minFifter=minFifter;\n\t\tthis._magFifter=magFifter;\n\t}\n\n\t__class(WebGLRenderTarget,'laya.webgl.resource.WebGLRenderTarget',_super);\n\tvar __proto=WebGLRenderTarget.prototype;\n\t__proto.recreateResource=function(){\n\t\tvar gl=WebGL.mainContext;\n\t\tthis._frameBuffer || (this._frameBuffer=gl.createFramebuffer());\n\t\tthis._source || (this._source=gl.createTexture());\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,this._w,this._h,0,this._surfaceFormat,this._surfaceType,null);\n\t\tvar minFifter=this._minFifter;\n\t\tvar magFifter=this._magFifter;\n\t\tvar repeat=this._repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar isPot=Arith.isPOT(this._w,this._h);\n\t\tif (isPot){\n\t\t\tif (this._mipMap)\n\t\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\t\telse\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\t\tthis._mipMap && gl.generateMipmap(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1);\n\t\t\t}else {\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t}\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,this._frameBuffer);\n\t\tgl.framebufferTexture2D(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,/*laya.webgl.WebGLContext.COLOR_ATTACHMENT0*/0x8CE0,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,this._source,0);\n\t\tif (this._depthStencilFormat){\n\t\t\tthis._depthStencilBuffer || (this._depthStencilBuffer=gl.createRenderbuffer());\n\t\t\tgl.bindRenderbuffer(/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilBuffer);\n\t\t\tgl.renderbufferStorage(/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilFormat,this._w,this._h);\n\t\t\tswitch (this._depthStencilFormat){\n\t\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_COMPONENT16*/0x81A5:\n\t\t\t\t\tgl.framebufferRenderbuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,/*laya.webgl.WebGLContext.DEPTH_ATTACHMENT*/0x8D00,/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilBuffer);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.STENCIL_INDEX8*/0x8D48:\n\t\t\t\t\tgl.framebufferRenderbuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,/*laya.webgl.WebGLContext.STENCIL_ATTACHMENT*/0x8D20,/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilBuffer);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.DEPTH_STENCIL*/0x84F9:\n\t\t\t\t\tgl.framebufferRenderbuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,/*laya.webgl.WebGLContext.DEPTH_STENCIL_ATTACHMENT*/0x821A,/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,this._depthStencilBuffer);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\tgl.bindFramebuffer(/*laya.webgl.WebGLContext.FRAMEBUFFER*/0x8D40,null);\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tgl.bindRenderbuffer(/*laya.webgl.WebGLContext.RENDERBUFFER*/0x8D41,null);\n\t\tif (isPot && this._mipMap)\n\t\t\tthis.memorySize=this._w *this._h *4 *(1+1 / 3);\n\t\telse\n\t\tthis.memorySize=this._w *this._h *4;\n\t\tthis.completeCreate();\n\t}\n\n\t__proto.disposeResource=function(){\n\t\tif (this._frameBuffer){\n\t\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\t\tWebGL.mainContext.deleteFramebuffer(this._frameBuffer);\n\t\t\tWebGL.mainContext.deleteRenderbuffer(this._depthStencilBuffer);\n\t\t\tthis._source=null;\n\t\t\tthis._frameBuffer=null;\n\t\t\tthis._depthStencilBuffer=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t__getset(0,__proto,'depthStencilBuffer',function(){\n\t\treturn this._depthStencilBuffer;\n\t});\n\n\t__getset(0,__proto,'frameBuffer',function(){\n\t\treturn this._frameBuffer;\n\t});\n\n\treturn WebGLRenderTarget;\n})(Bitmap)\n\n\n//class laya.webgl.resource.WebGLSubImage extends laya.resource.Bitmap\nvar WebGLSubImage=(function(_super){\n\tfunction WebGLSubImage(canvas,offsetX,offsetY,width,height,atlasImage,src){\n\t\t/**HTML Context*/\n\t\t//this._ctx=null;\n\t\t/***是否创建私有Source,值为false时不根据src创建私有WebGLTexture,同时销毁时也只清空source=null,不调用WebGL.mainContext.deleteTexture类似函数，调用资源激活前有效*/\n\t\t//this._allowMerageInAtlas=false;\n\t\t/**是否允许加入大图合集*/\n\t\t//this._enableMerageInAtlas=false;\n\t\t/**HTML Canvas，绘制子图载体,非私有数据载体*/\n\t\t//this.canvas=null;\n\t\t/**是否使用重复模式纹理寻址*/\n\t\t//this.repeat=false;\n\t\t/**是否使用mipLevel*/\n\t\t//this.mipmap=false;\n\t\t/**缩小过滤器*/\n\t\t//this.minFifter=0;\n\t\t/**放大过滤器*/\n\t\t//this.magFifter=0;\n\t\t//动态默认值，判断是否可生成miplevel\n\t\t//this.atlasImage=null;\n\t\tthis.offsetX=0;\n\t\tthis.offsetY=0;\n\t\t//this.src=null;\n\t\tWebGLSubImage.__super.call(this);\n\t\tthis.repeat=true;\n\t\tthis.mipmap=false;\n\t\tthis.minFifter=-1;\n\t\tthis.magFifter=-1;\n\t\tthis.atlasImage=atlasImage;\n\t\tthis.canvas=canvas;\n\t\tthis._ctx=canvas.getContext('2d',undefined);\n\t\tthis._w=width;\n\t\tthis._h=height;\n\t\tthis.offsetX=offsetX;\n\t\tthis.offsetY=offsetY;\n\t\tthis.src=src;\n\t\tthis._enableMerageInAtlas=true;\n\t\t(AtlasResourceManager.enabled)&& (this._w < AtlasResourceManager.atlasLimitWidth && this._h < AtlasResourceManager.atlasLimitHeight)? this._allowMerageInAtlas=true :this._allowMerageInAtlas=false;\n\t}\n\n\t__class(WebGLSubImage,'laya.webgl.resource.WebGLSubImage',_super);\n\tvar __proto=WebGLSubImage.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.resource.IMergeAtlasBitmap\":true})\n\t/*override public function copyTo(dec:Bitmap):void {\n\tvar d:WebGLSubImage=dec as WebGLSubImage;\n\tsuper.copyTo(dec);\n\td._ctx=_ctx;\n}*/\n\n\n__proto.size=function(w,h){\n\tthis._w=w;\n\tthis._h=h;\n\tthis._ctx && this._ctx.size(w,h);\n\tthis.canvas && (this.canvas.height=h,this.canvas.width=w);\n}\n\n\n__proto.recreateResource=function(){\n\tthis.size(this._w,this._h);\n\tthis._ctx.drawImage(this.atlasImage,this.offsetX,this.offsetY,this._w,this._h,0,0,this._w,this._h);\n\t(!(this._allowMerageInAtlas && this._enableMerageInAtlas))? (this.createWebGlTexture()):(this.memorySize=0);\n\tthis.completeCreate();\n}\n\n\n__proto.createWebGlTexture=function(){\n\tvar gl=WebGL.mainContext;\n\tif (!this.canvas){\n\t\tthrow \"create GLTextur err:no data:\"+this.canvas;\n\t};\n\n\tvar glTex=this._source=gl.createTexture();\n\tvar preTarget=WebGLContext.curBindTexTarget;\n\tvar preTexture=WebGLContext.curBindTexValue;\n\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,glTex);\n\tif (Render.isConchWebGL){\n\t\tgl.texImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this.canvas);\n\t}\n\n\telse {\n\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,true);\n\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this.canvas);\n\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,false);\n\t};\n\n\tvar minFifter=this.minFifter;\n\tvar magFifter=this.magFifter;\n\tvar repeat=this.repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\tvar isPOT=Arith.isPOT(this.width,this.height);\n\tif (isPOT){\n\t\tif (this.mipmap)\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\telse\n\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\tthis.mipmap && gl.generateMipmap(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1);\n\t\t}else {\n\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t}\n\n\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\tthis.canvas=null;\n\tif (isPOT && this.mipmap)\n\t\tthis.memorySize=this._w *this._h *4 *(1+1 / 3);\n\telse\n\tthis.memorySize=this._w *this._h *4;\n}\n\n\n__proto.disposeResource=function(){\n\tif (!(AtlasResourceManager.enabled && this._allowMerageInAtlas)&& this._source){\n\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\tthis._source=null;\n\t\tthis.memorySize=0;\n\t}\n\n}\n\n\n//}\n__proto.clearAtlasSource=function(){}\n/**\n*是否创建私有Source\n*@return 是否创建\n*/\n__getset(0,__proto,'allowMerageInAtlas',function(){\n\treturn this._allowMerageInAtlas;\n});\n\n\n//public var createFromPixel:Boolean=true;\n__getset(0,__proto,'atlasSource',function(){\n\treturn this.canvas;\n});\n\n\n/**\n*是否创建私有Source,通常禁止修改\n*@param value 是否创建\n*/\n/**\n*是否创建私有Source\n*@return 是否创建\n*/\n__getset(0,__proto,'enableMerageInAtlas',function(){\n\treturn this._allowMerageInAtlas;\n\t},function(value){\n\n\tthis._allowMerageInAtlas=value;\n});\n\n\nreturn WebGLSubImage;\n})(Bitmap)\n\n\n//class laya.webgl.shader.Shader extends laya.webgl.shader.BaseShader\nvar Shader=(function(_super){\n\tfunction Shader(vs,ps,saveName,nameMap){\n\t\t//this._nameMap=null;\n\t\t//shader参数别名，语义\n\t\t//this._vs=null;\n\t\t//this._ps=null;\n\t\tthis._curActTexIndex=0;\n\t\t//this._reCompile=false;\n\t\t//存储一些私有变量\n\t\tthis.tag={};\n\t\t//this._vshader=null;\n\t\t//this._pshader=null;\n\t\tthis._program=null;\n\t\tthis._params=null;\n\t\tthis._paramsMap={};\n\t\tthis._offset=0;\n\t\t//this._id=0;\n\t\tShader.__super.call(this);\n\t\tif ((!vs)|| (!ps))throw \"Shader Error\";\n\t\tthis._id=++Shader._count;\n\t\tthis._vs=vs;\n\t\tthis._ps=ps;\n\t\tthis._nameMap=nameMap ? nameMap :{};\n\t\tsaveName !=null && (Shader.sharders[saveName]=this);\n\t}\n\n\t__class(Shader,'laya.webgl.shader.Shader',_super);\n\tvar __proto=Shader.prototype;\n\t__proto.recreateResource=function(){\n\t\tthis._compile();\n\t\tthis.completeCreate();\n\t\tthis.memorySize=0;\n\t}\n\n\t//忽略尺寸尺寸\n\t__proto.disposeResource=function(){\n\t\tWebGL.mainContext.deleteShader(this._vshader);\n\t\tWebGL.mainContext.deleteShader(this._pshader);\n\t\tWebGL.mainContext.deleteProgram(this._program);\n\t\tthis._vshader=this._pshader=this._program=null;\n\t\tthis._params=null;\n\t\tthis._paramsMap={};\n\t\tthis.memorySize=0;\n\t\tthis._curActTexIndex=0;\n\t}\n\n\t__proto._compile=function(){\n\t\tif (!this._vs || !this._ps || this._params)\n\t\t\treturn;\n\t\tthis._reCompile=true;\n\t\tthis._params=[];\n\t\tvar text=[this._vs,this._ps];\n\t\tvar result;\n\t\tvar gl=WebGL.mainContext;\n\t\tthis._program=gl.createProgram();\n\t\tthis._vshader=Shader._createShader(gl,text[0],/*laya.webgl.WebGLContext.VERTEX_SHADER*/0x8B31);\n\t\tthis._pshader=Shader._createShader(gl,text[1],/*laya.webgl.WebGLContext.FRAGMENT_SHADER*/0x8B30);\n\t\tgl.attachShader(this._program,this._vshader);\n\t\tgl.attachShader(this._program,this._pshader);\n\t\tgl.linkProgram(this._program);\n\t\tif (!Render.isConchApp && !gl.getProgramParameter(this._program,/*laya.webgl.WebGLContext.LINK_STATUS*/0x8B82)){\n\t\t\tthrow gl.getProgramInfoLog(this._program);\n\t\t};\n\t\tvar one,i=0,j=0,n=0,location;\n\t\tvar attribNum=0;\n\t\tif (Render.isConchApp){\n\t\t\tattribNum=gl.getProgramParameterEx(this._vs,this._ps,\"\",/*laya.webgl.WebGLContext.ACTIVE_ATTRIBUTES*/0x8B89);\n\t\t}\n\t\telse{\n\t\t\tattribNum=gl.getProgramParameter(this._program,/*laya.webgl.WebGLContext.ACTIVE_ATTRIBUTES*/0x8B89);\n\t\t}\n\t\tfor (i=0;i < attribNum;i++){\n\t\t\tvar attrib=null;\n\t\t\tif (Render.isConchApp){\n\t\t\t\tattrib=gl.getActiveAttribEx(this._vs,this._ps,\"\",i);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tattrib=gl.getActiveAttrib(this._program,i);\n\t\t\t}\n\t\t\tlocation=gl.getAttribLocation(this._program,attrib.name);\n\t\t\tone={vartype:\"attribute\",glfun:null,ivartype:0,attrib:attrib,location:location,name:attrib.name,type:attrib.type,isArray:false,isSame:false,preValue:null,indexOfParams:0};\n\t\t\tthis._params.push(one);\n\t\t};\n\t\tvar nUniformNum=0;\n\t\tif (Render.isConchApp){\n\t\t\tnUniformNum=gl.getProgramParameterEx(this._vs,this._ps,\"\",/*laya.webgl.WebGLContext.ACTIVE_UNIFORMS*/0x8B86);\n\t\t}\n\t\telse{\n\t\t\tnUniformNum=gl.getProgramParameter(this._program,/*laya.webgl.WebGLContext.ACTIVE_UNIFORMS*/0x8B86);\n\t\t}\n\t\tfor (i=0;i < nUniformNum;i++){\n\t\t\tvar uniform=null;\n\t\t\tif (Render.isConchApp){\n\t\t\t\tuniform=gl.getActiveUniformEx(this._vs,this._ps,\"\",i);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tuniform=gl.getActiveUniform(this._program,i);\n\t\t\t}\n\t\t\tlocation=gl.getUniformLocation(this._program,uniform.name);\n\t\t\tone={vartype:\"uniform\",glfun:null,ivartype:1,attrib:attrib,location:location,name:uniform.name,type:uniform.type,isArray:false,isSame:false,preValue:null,indexOfParams:0};\n\t\t\tif (one.name.indexOf('[0]')> 0){\n\t\t\t\tone.name=one.name.substr(0,one.name.length-3);\n\t\t\t\tone.isArray=true;\n\t\t\t\tone.location=gl.getUniformLocation(this._program,one.name);\n\t\t\t}\n\t\t\tthis._params.push(one);\n\t\t}\n\t\tfor (i=0,n=this._params.length;i < n;i++){\n\t\t\tone=this._params[i];\n\t\t\tone.indexOfParams=i;\n\t\t\tone.index=1;\n\t\t\tone.value=[one.location,null];\n\t\t\tone.codename=one.name;\n\t\t\tone.name=this._nameMap[one.codename] ? this._nameMap[one.codename] :one.codename;\n\t\t\tthis._paramsMap[one.name]=one;\n\t\t\tone._this=this;\n\t\t\tone.uploadedValue=[];\n\t\t\tif (one.vartype===\"attribute\"){\n\t\t\t\tone.fun=this._attribute;\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\tswitch (one.type){\n\t\t\t\tcase /*laya.webgl.WebGLContext.INT*/0x1404:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform1iv :this._uniform1i;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT*/0x1406:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform1fv :this._uniform1f;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_VEC2*/0x8B50:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform_vec2v:this._uniform_vec2;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_VEC3*/0x8B51:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform_vec3v:this._uniform_vec3;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_VEC4*/0x8B52:\n\t\t\t\t\tone.fun=one.isArray ? this._uniform_vec4v:this._uniform_vec4;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.SAMPLER_2D*/0x8B5E:\n\t\t\t\t\tone.fun=this._uniform_sampler2D;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.SAMPLER_CUBE*/0x8B60:\n\t\t\t\t\tone.fun=this._uniform_samplerCube;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_MAT4*/0x8B5C:\n\t\t\t\t\tone.glfun=gl.uniformMatrix4fv;\n\t\t\t\t\tone.fun=this._uniformMatrix4fv;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.BOOL*/0x8B56:\n\t\t\t\t\tone.fun=this._uniform1i;\n\t\t\t\t\tbreak ;\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_MAT2*/0x8B5A:\n\t\t\t\tcase /*laya.webgl.WebGLContext.FLOAT_MAT3*/0x8B5B:\n\t\t\t\t\tthrow new Error(\"compile shader err!\");\n\t\t\t\t\tbreak ;\n\t\t\t\tdefault :\n\t\t\t\t\tthrow new Error(\"compile shader err!\");\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*根据变量名字获得\n\t*@param name\n\t*@return\n\t*/\n\t__proto.getUniform=function(name){\n\t\treturn this._paramsMap[name];\n\t}\n\n\t__proto._attribute=function(one,value){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar enableAtributes=Buffer._enableAtributes;\n\t\tvar location=one.location;\n\t\t(enableAtributes[location])||(gl.enableVertexAttribArray(location));\n\t\tgl.vertexAttribPointer(location,value[0],value[1],value[2],value[3],value[4]+this._offset);\n\t\tenableAtributes[location]=Buffer._bindVertexBuffer;\n\t\treturn 1;\n\t}\n\n\t__proto._uniform1f=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value){\n\t\t\tWebGL.mainContext.uniform1f(one.location,uploadedValue[0]=value);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform1fv=function(one,value){\n\t\tif (value.length < 4){\n\t\t\tvar uploadedValue=one.uploadedValue;\n\t\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2] || uploadedValue[3]!==value[3]){\n\t\t\t\tWebGL.mainContext.uniform1fv(one.location,value);\n\t\t\t\tuploadedValue[0]=value[0];\n\t\t\t\tuploadedValue[1]=value[1];\n\t\t\t\tuploadedValue[2]=value[2];\n\t\t\t\tuploadedValue[3]=value[3];\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t}else {\n\t\t\tWebGL.mainContext.uniform1fv(one.location,value);\n\t\t\treturn 1;\n\t\t}\n\t}\n\n\t__proto._uniform_vec2=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1]){\n\t\t\tWebGL.mainContext.uniform2f(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec2v=function(one,value){\n\t\tif (value.length < 2){\n\t\t\tvar uploadedValue=one.uploadedValue;\n\t\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2] || uploadedValue[3]!==value[3]){\n\t\t\t\tWebGL.mainContext.uniform2fv(one.location,value);\n\t\t\t\tuploadedValue[0]=value[0];\n\t\t\t\tuploadedValue[1]=value[1];\n\t\t\t\tuploadedValue[2]=value[2];\n\t\t\t\tuploadedValue[3]=value[3];\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t\t}else {\n\t\t\tWebGL.mainContext.uniform2fv(one.location,value);\n\t\t\treturn 1;\n\t\t}\n\t}\n\n\t__proto._uniform_vec3=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2]){\n\t\t\tWebGL.mainContext.uniform3f(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1],uploadedValue[2]=value[2]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec3v=function(one,value){\n\t\tWebGL.mainContext.uniform3fv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_vec4=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2] || uploadedValue[3]!==value[3]){\n\t\t\tWebGL.mainContext.uniform4f(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1],uploadedValue[2]=value[2],uploadedValue[3]=value[3]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec4v=function(one,value){\n\t\tWebGL.mainContext.uniform4fv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniformMatrix2fv=function(one,value){\n\t\tWebGL.mainContext.uniformMatrix2fv(one.location,false,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniformMatrix3fv=function(one,value){\n\t\tWebGL.mainContext.uniformMatrix3fv(one.location,false,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniformMatrix4fv=function(one,value){\n\t\tWebGL.mainContext.uniformMatrix4fv(one.location,false,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform1i=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value){\n\t\t\tWebGL.mainContext.uniform1i(one.location,uploadedValue[0]=value);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform1iv=function(one,value){\n\t\tWebGL.mainContext.uniform1iv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_ivec2=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1]){\n\t\t\tWebGL.mainContext.uniform2i(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_ivec2v=function(one,value){\n\t\tWebGL.mainContext.uniform2iv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_vec3i=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2]){\n\t\t\tWebGL.mainContext.uniform3i(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1],uploadedValue[2]=value[2]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec3vi=function(one,value){\n\t\tWebGL.mainContext.uniform3iv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_vec4i=function(one,value){\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]!==value[0] || uploadedValue[1]!==value[1] || uploadedValue[2]!==value[2] || uploadedValue[3]!==value[3]){\n\t\t\tWebGL.mainContext.uniform4i(one.location,uploadedValue[0]=value[0],uploadedValue[1]=value[1],uploadedValue[2]=value[2],uploadedValue[3]=value[3]);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\t__proto._uniform_vec4vi=function(one,value){\n\t\tWebGL.mainContext.uniform4iv(one.location,value);\n\t\treturn 1;\n\t}\n\n\t__proto._uniform_sampler2D=function(one,value){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]==null){\n\t\t\tuploadedValue[0]=this._curActTexIndex;\n\t\t\tgl.uniform1i(one.location,this._curActTexIndex);\n\t\t\tgl.activeTexture(Shader._TEXTURES[this._curActTexIndex]);\n\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,value);\n\t\t\tthis._curActTexIndex++;\n\t\t\treturn 1;\n\t\t\t}else {\n\t\t\tgl.activeTexture(Shader._TEXTURES[uploadedValue[0]]);\n\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,value);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t__proto._uniform_samplerCube=function(one,value){\n\t\tvar gl=WebGL.mainContext;\n\t\tvar uploadedValue=one.uploadedValue;\n\t\tif (uploadedValue[0]==null){\n\t\t\tuploadedValue[0]=this._curActTexIndex;\n\t\t\tgl.uniform1i(one.location,this._curActTexIndex);\n\t\t\tgl.activeTexture(Shader._TEXTURES[this._curActTexIndex]);\n\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP*/0x8513,value);\n\t\t\tthis._curActTexIndex++;\n\t\t\treturn 1;\n\t\t\t}else {\n\t\t\tgl.activeTexture(Shader._TEXTURES[uploadedValue[0]]);\n\t\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_CUBE_MAP*/0x8513,value);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\t__proto._noSetValue=function(one){\n\t\tconsole.log(\"no....:\"+one.name);\n\t}\n\n\t//throw new Error(\"upload shader err,must set value:\"+one.name);\n\t__proto.uploadOne=function(name,value){\n\t\tthis.activeResource();\n\t\tWebGLContext.UseProgram(this._program);\n\t\tvar one=this._paramsMap[name];\n\t\tone.fun.call(this,one,value);\n\t}\n\n\t__proto.uploadTexture2D=function(value){\n\t\tStat.shaderCall++;\n\t\tvar gl=WebGL.mainContext;\n\t\tgl.activeTexture(/*laya.webgl.WebGLContext.TEXTURE0*/0x84C0);\n\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,value);\n\t}\n\n\t/**\n\t*提交shader到GPU\n\t*@param shaderValue\n\t*/\n\t__proto.upload=function(shaderValue,params){\n\t\tBaseShader.activeShader=BaseShader.bindShader=this;\n\t\tthis._lastUseFrameCount===Stat.loopCount || this.activeResource();\n\t\tWebGLContext.UseProgram(this._program);\n\t\tif (this._reCompile){\n\t\t\tparams=this._params;\n\t\t\tthis._reCompile=false;\n\t\t\t}else {\n\t\t\tparams=params || this._params;\n\t\t};\n\t\tvar gl=WebGL.mainContext;\n\t\tvar one,value,n=params.length,shaderCall=0;\n\t\tfor (var i=0;i < n;i++){\n\t\t\tone=params[i];\n\t\t\tif ((value=shaderValue[one.name])!==null)\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\t/**\n\t*按数组的定义提交\n\t*@param shaderValue 数组格式[name,value,...]\n\t*/\n\t__proto.uploadArray=function(shaderValue,length,_bufferUsage){\n\t\tBaseShader.activeShader=this;\n\t\tBaseShader.bindShader=this;\n\t\tthis.activeResource();\n\t\tWebGLContext.UseProgram(this._program);\n\t\tvar params=this._params,value;\n\t\tvar one,shaderCall=0;\n\t\tfor (var i=length-2;i >=0;i-=2){\n\t\t\tone=this._paramsMap[shaderValue[i]];\n\t\t\tif (!one)\n\t\t\t\tcontinue ;\n\t\t\tvalue=shaderValue[i+1];\n\t\t\tif (value !=null){\n\t\t\t\t_bufferUsage && _bufferUsage[one.name] && _bufferUsage[one.name].bind();\n\t\t\t\tshaderCall+=one.fun.call(this,one,value);\n\t\t\t}\n\t\t}\n\t\tStat.shaderCall+=shaderCall;\n\t}\n\n\t/**\n\t*得到编译后的变量及相关预定义\n\t*@return\n\t*/\n\t__proto.getParams=function(){\n\t\treturn this._params;\n\t}\n\n\tShader.getShader=function(name){\n\t\treturn Shader.sharders[name];\n\t}\n\n\tShader.create=function(vs,ps,saveName,nameMap){\n\t\treturn new Shader(vs,ps,saveName,nameMap);\n\t}\n\n\tShader.withCompile=function(nameID,define,shaderName,createShader){\n\t\tif (shaderName && Shader.sharders[shaderName])\n\t\t\treturn Shader.sharders[shaderName];\n\t\tvar pre=Shader._preCompileShader[0.0002 *nameID];\n\t\tif (!pre)\n\t\t\tthrow new Error(\"withCompile shader err!\"+nameID);\n\t\treturn pre.createShader(define,shaderName,createShader);\n\t}\n\n\tShader.withCompile2D=function(nameID,mainID,define,shaderName,createShader){\n\t\tif (shaderName && Shader.sharders[shaderName])\n\t\t\treturn Shader.sharders[shaderName];\n\t\tvar pre=Shader._preCompileShader[0.0002 *nameID+mainID];\n\t\tif (!pre)\n\t\t\tthrow new Error(\"withCompile shader err!\"+nameID+\" \"+mainID);\n\t\treturn pre.createShader(define,shaderName,createShader);\n\t}\n\n\tShader.addInclude=function(fileName,txt){\n\t\tShaderCompile.addInclude(fileName,txt);\n\t}\n\n\tShader.preCompile=function(nameID,vs,ps,nameMap){\n\t\tvar id=0.0002 *nameID;\n\t\tShader._preCompileShader[id]=new ShaderCompile(id,vs,ps,nameMap);\n\t}\n\n\tShader.preCompile2D=function(nameID,mainID,vs,ps,nameMap){\n\t\tvar id=0.0002 *nameID+mainID;\n\t\tShader._preCompileShader[id]=new ShaderCompile(id,vs,ps,nameMap);\n\t}\n\n\tShader._createShader=function(gl,str,type){\n\t\tvar shader=gl.createShader(type);\n\t\tgl.shaderSource(shader,str);\n\t\tgl.compileShader(shader);\n\t\treturn shader;\n\t}\n\n\tShader._TEXTURES=[ /*laya.webgl.WebGLContext.TEXTURE0*/0x84C0,/*laya.webgl.WebGLContext.TEXTURE1*/0x84C1,/*laya.webgl.WebGLContext.TEXTURE2*/0x84C2,/*laya.webgl.WebGLContext.TEXTURE3*/0x84C3,/*laya.webgl.WebGLContext.TEXTURE4*/0x84C4,/*laya.webgl.WebGLContext.TEXTURE5*/0x84C5,/*laya.webgl.WebGLContext.TEXTURE6*/0x84C6,,/*laya.webgl.WebGLContext.TEXTURE7*/0x84C7,/*laya.webgl.WebGLContext.TEXTURE8*/0x84C8];\n\tShader._count=0;\n\tShader._preCompileShader={};\n\tShader.SHADERNAME2ID=0.0002;\n\tShader.sharders=(Shader.sharders=[],Shader.sharders.length=0x20,Shader.sharders);\n\t__static(Shader,\n\t['nameKey',function(){return this.nameKey=new StringKey();}\n\t]);\n\treturn Shader;\n})(BaseShader)\n\n\n//class laya.webgl.utils.Buffer2D extends laya.webgl.utils.Buffer\nvar Buffer2D=(function(_super){\n\tfunction Buffer2D(){\n\t\tthis._maxsize=0;\n\t\tthis._upload=true;\n\t\tthis._uploadSize=0;\n\t\tBuffer2D.__super.call(this);\n\t\tthis.lock=true;\n\t}\n\n\t__class(Buffer2D,'laya.webgl.utils.Buffer2D',_super);\n\tvar __proto=Buffer2D.prototype;\n\t/**\n\t*在当前的基础上需要多大空间，单位是byte\n\t*@param sz\n\t*@return 增加大小之前的写位置。单位是byte\n\t*/\n\t__proto.needSize=function(sz){\n\t\tvar old=this._byteLength;\n\t\tif (sz){\n\t\t\tvar needsz=this._byteLength+sz;\n\t\t\tneedsz <=this._buffer.byteLength || (this._resizeBuffer(needsz << 1,true));\n\t\t\tthis._byteLength=needsz;\n\t\t}\n\t\treturn old;\n\t}\n\n\t__proto._bufferData=function(){\n\t\tthis._maxsize=Math.max(this._maxsize,this._byteLength);\n\t\tif (Stat.loopCount % 30==0){\n\t\t\tif (this._buffer.byteLength > (this._maxsize+64)){\n\t\t\t\tthis.memorySize=this._buffer.byteLength;\n\t\t\t\tthis._buffer=this._buffer.slice(0,this._maxsize+64);\n\t\t\t\tthis._checkArrayUse();\n\t\t\t}\n\t\t\tthis._maxsize=this._byteLength;\n\t\t}\n\t\tif (this._uploadSize < this._buffer.byteLength){\n\t\t\tthis._uploadSize=this._buffer.byteLength;\n\t\t\tBuffer._gl.bufferData(this._bufferType,this._uploadSize,this._bufferUsage);\n\t\t\tthis.memorySize=this._uploadSize;\n\t\t}\n\t\tBuffer._gl.bufferSubData(this._bufferType,0,this._buffer);\n\t}\n\n\t__proto._bufferSubData=function(offset,dataStart,dataLength){\n\t\t(offset===void 0)&& (offset=0);\n\t\t(dataStart===void 0)&& (dataStart=0);\n\t\t(dataLength===void 0)&& (dataLength=0);\n\t\tthis._maxsize=Math.max(this._maxsize,this._byteLength);\n\t\tif (Stat.loopCount % 30==0){\n\t\t\tif (this._buffer.byteLength > (this._maxsize+64)){\n\t\t\t\tthis.memorySize=this._buffer.byteLength;\n\t\t\t\tthis._buffer=this._buffer.slice(0,this._maxsize+64);\n\t\t\t\tthis._checkArrayUse();\n\t\t\t}\n\t\t\tthis._maxsize=this._byteLength;\n\t\t}\n\t\tif (this._uploadSize < this._buffer.byteLength){\n\t\t\tthis._uploadSize=this._buffer.byteLength;\n\t\t\tBuffer._gl.bufferData(this._bufferType,this._uploadSize,this._bufferUsage);\n\t\t\tthis.memorySize=this._uploadSize;\n\t\t}\n\t\tif (dataStart || dataLength){\n\t\t\tvar subBuffer=this._buffer.slice(dataStart,dataLength);\n\t\t\tBuffer._gl.bufferSubData(this._bufferType,offset,subBuffer);\n\t\t\t}else {\n\t\t\tBuffer._gl.bufferSubData(this._bufferType,offset,this._buffer);\n\t\t}\n\t}\n\n\t__proto._checkArrayUse=function(){}\n\t__proto._bind_upload=function(){\n\t\tif (!this._upload)\n\t\t\treturn false;\n\t\tthis._upload=false;\n\t\tthis._bind();\n\t\tthis._bufferData();\n\t\treturn true;\n\t}\n\n\t__proto._bind_subUpload=function(offset,dataStart,dataLength){\n\t\t(offset===void 0)&& (offset=0);\n\t\t(dataStart===void 0)&& (dataStart=0);\n\t\t(dataLength===void 0)&& (dataLength=0);\n\t\tif (!this._upload)\n\t\t\treturn false;\n\t\tthis._upload=false;\n\t\tthis._bind();\n\t\tthis._bufferSubData(offset,dataStart,dataLength);\n\t\treturn true;\n\t}\n\n\t__proto._resizeBuffer=function(nsz,copy){\n\t\tif (nsz < this._buffer.byteLength)\n\t\t\treturn this;\n\t\tthis.memorySize=nsz;\n\t\tif (copy && this._buffer && this._buffer.byteLength > 0){\n\t\t\tvar newbuffer=new ArrayBuffer(nsz);\n\t\t\tvar n=new Uint8Array(newbuffer);\n\t\t\tn.set(new Uint8Array(this._buffer),0);\n\t\t\tthis._buffer=newbuffer;\n\t\t}else\n\t\tthis._buffer=new ArrayBuffer(nsz);\n\t\tthis._checkArrayUse();\n\t\tthis._upload=true;\n\t\treturn this;\n\t}\n\n\t__proto.append=function(data){\n\t\tthis._upload=true;\n\t\tvar byteLen=0,n;\n\t\tbyteLen=data.byteLength;\n\t\tif ((data instanceof Uint8Array)){\n\t\t\tthis._resizeBuffer(this._byteLength+byteLen,true);\n\t\t\tn=new Uint8Array(this._buffer,this._byteLength);\n\t\t\t}else if ((data instanceof Uint16Array)){\n\t\t\tthis._resizeBuffer(this._byteLength+byteLen,true);\n\t\t\tn=new Uint16Array(this._buffer,this._byteLength);\n\t\t\t}else if ((data instanceof Float32Array)){\n\t\t\tthis._resizeBuffer(this._byteLength+byteLen,true);\n\t\t\tn=new Float32Array(this._buffer,this._byteLength);\n\t\t}\n\t\tn.set(data,0);\n\t\tthis._byteLength+=byteLen;\n\t\tthis._checkArrayUse();\n\t}\n\n\t/**\n\t*附加Uint16Array的数据。数据长度是len。byte的话要*2\n\t*@param data\n\t*@param len\n\t*/\n\t__proto.appendU16Array=function(data,len){\n\t\tthis._resizeBuffer(this._byteLength+len*2,true);\n\t\tvar u=new Uint16Array(this._buffer,this._byteLength,len);\n\t\tfor (var i=0;i < len;i++){\n\t\t\tu[i]=data[i];\n\t\t}\n\t\tthis._byteLength+=len *2;\n\t\tthis._checkArrayUse();\n\t}\n\n\t__proto.appendEx=function(data,type){\n\t\tthis._upload=true;\n\t\tvar byteLen=0,n;\n\t\tbyteLen=data.byteLength;\n\t\tthis._resizeBuffer(this._byteLength+byteLen,true);\n\t\tn=new type(this._buffer,this._byteLength);\n\t\tn.set(data,0);\n\t\tthis._byteLength+=byteLen;\n\t\tthis._checkArrayUse();\n\t}\n\n\t__proto.appendEx2=function(data,type,dataLen,perDataLen){\n\t\t(perDataLen===void 0)&& (perDataLen=1);\n\t\tthis._upload=true;\n\t\tvar byteLen=0,n;\n\t\tbyteLen=dataLen*perDataLen;\n\t\tthis._resizeBuffer(this._byteLength+byteLen,true);\n\t\tn=new type(this._buffer,this._byteLength);\n\t\tvar i=0;\n\t\tfor (i=0;i < dataLen;i++){\n\t\t\tn[i]=data[i];\n\t\t}\n\t\tthis._byteLength+=byteLen;\n\t\tthis._checkArrayUse();\n\t}\n\n\t__proto.getBuffer=function(){\n\t\treturn this._buffer;\n\t}\n\n\t__proto.setNeedUpload=function(){\n\t\tthis._upload=true;\n\t}\n\n\t__proto.getNeedUpload=function(){\n\t\treturn this._upload;\n\t}\n\n\t__proto.upload=function(){\n\t\tvar scuess=this._bind_upload();\n\t\tBuffer._gl.bindBuffer(this._bufferType,null);\n\t\tBuffer._bindActive[this._bufferType]=null;\n\t\tBaseShader.activeShader=null\n\t\treturn scuess;\n\t}\n\n\t__proto.subUpload=function(offset,dataStart,dataLength){\n\t\t(offset===void 0)&& (offset=0);\n\t\t(dataStart===void 0)&& (dataStart=0);\n\t\t(dataLength===void 0)&& (dataLength=0);\n\t\tvar scuess=this._bind_subUpload();\n\t\tBuffer._gl.bindBuffer(this._bufferType,null);\n\t\tBuffer._bindActive[this._bufferType]=null;\n\t\tBaseShader.activeShader=null\n\t\treturn scuess;\n\t}\n\n\t__proto.disposeResource=function(){\n\t\t_super.prototype.disposeResource.call(this);\n\t\tthis._upload=true;\n\t\tthis._uploadSize=0;\n\t}\n\n\t__proto.clear=function(){\n\t\tthis._byteLength=0;\n\t\tthis._upload=true;\n\t}\n\n\t__getset(0,__proto,'bufferLength',function(){\n\t\treturn this._buffer.byteLength;\n\t});\n\n\t__getset(0,__proto,'byteLength',null,function(value){\n\t\tif (this._byteLength===value)\n\t\t\treturn;\n\t\tvalue <=this._buffer.byteLength || (this._resizeBuffer(value *2+256,true));\n\t\tthis._byteLength=value;\n\t});\n\n\tBuffer2D.__int__=function(gl){\n\t\tIndexBuffer2D.QuadrangleIB=IndexBuffer2D.create(/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\tGlUtils.fillIBQuadrangle(IndexBuffer2D.QuadrangleIB,16);\n\t}\n\n\tBuffer2D.FLOAT32=4;\n\tBuffer2D.SHORT=2;\n\treturn Buffer2D;\n})(Buffer)\n\n\n//class laya.webgl.shader.d2.value.GlowSV extends laya.webgl.shader.d2.value.TextureSV\nvar GlowSV=(function(_super){\n\tfunction GlowSV(args){\n\t\tthis.u_blurX=false;\n\t\tthis.u_color=null;\n\t\tthis.u_offset=null;\n\t\tthis.u_strength=NaN;\n\t\tthis.u_texW=0;\n\t\tthis.u_texH=0;\n\t\tGlowSV.__super.call(this,/*laya.webgl.shader.d2.ShaderDefines2D.FILTERGLOW*/0x08| /*laya.webgl.shader.d2.ShaderDefines2D.TEXTURE2D*/0x01);\n\t}\n\n\t__class(GlowSV,'laya.webgl.shader.d2.value.GlowSV',_super);\n\tvar __proto=GlowSV.prototype;\n\t__proto.setValue=function(vo){\n\t\t_super.prototype.setValue.call(this,vo);\n\t}\n\n\t__proto.clear=function(){\n\t\t_super.prototype.clear.call(this);\n\t}\n\n\treturn GlowSV;\n})(TextureSV)\n\n\n//class laya.webgl.shader.d2.value.TextSV extends laya.webgl.shader.d2.value.TextureSV\nvar TextSV=(function(_super){\n\tfunction TextSV(args){\n\t\tTextSV.__super.call(this,/*laya.webgl.shader.d2.ShaderDefines2D.COLORADD*/0x40);\n\t\tthis.defines.add(/*laya.webgl.shader.d2.ShaderDefines2D.COLORADD*/0x40);\n\t}\n\n\t__class(TextSV,'laya.webgl.shader.d2.value.TextSV',_super);\n\tvar __proto=TextSV.prototype;\n\t__proto.release=function(){\n\t\tTextSV.pool[TextSV._length++]=this;\n\t\tthis.clear();\n\t}\n\n\t__proto.clear=function(){\n\t\t_super.prototype.clear.call(this);\n\t}\n\n\tTextSV.create=function(){\n\t\tif (TextSV._length)return TextSV.pool[--TextSV._length];\n\t\telse return new TextSV(null);\n\t}\n\n\tTextSV.pool=[];\n\tTextSV._length=0;\n\treturn TextSV;\n})(TextureSV)\n\n\n//class laya.webgl.shader.d2.Shader2X extends laya.webgl.shader.Shader\nvar Shader2X=(function(_super){\n\tfunction Shader2X(vs,ps,saveName,nameMap){\n\t\tthis._params2dQuick1=null;\n\t\tthis._params2dQuick2=null;\n\t\tthis._shaderValueWidth=NaN;\n\t\tthis._shaderValueHeight=NaN;\n\t\tShader2X.__super.call(this,vs,ps,saveName,nameMap);\n\t}\n\n\t__class(Shader2X,'laya.webgl.shader.d2.Shader2X',_super);\n\tvar __proto=Shader2X.prototype;\n\t__proto.upload2dQuick1=function(shaderValue){\n\t\tthis.upload(shaderValue,this._params2dQuick1 || this._make2dQuick1());\n\t}\n\n\t__proto._make2dQuick1=function(){\n\t\tif (!this._params2dQuick1){\n\t\t\tthis.activeResource();\n\t\t\tthis._params2dQuick1=[];\n\t\t\tvar params=this._params,one;\n\t\t\tfor (var i=0,n=params.length;i < n;i++){\n\t\t\t\tone=params[i];\n\t\t\t\tif (!Render.isFlash && (one.name===\"size\" || one.name===\"position\" || one.name===\"texcoord\"))continue ;\n\t\t\t\tthis._params2dQuick1.push(one);\n\t\t\t}\n\t\t}\n\t\treturn this._params2dQuick1;\n\t}\n\n\t__proto.disposeResource=function(){\n\t\t_super.prototype.disposeResource.call(this);\n\t\tthis._params2dQuick1=null;\n\t\tthis._params2dQuick2=null;\n\t}\n\n\t__proto.upload2dQuick2=function(shaderValue){\n\t\tthis.upload(shaderValue,this._params2dQuick2 || this._make2dQuick2());\n\t}\n\n\t__proto._make2dQuick2=function(){\n\t\tif (!this._params2dQuick2){\n\t\t\tthis.activeResource();\n\t\t\tthis._params2dQuick2=[];\n\t\t\tvar params=this._params,one;\n\t\t\tfor (var i=0,n=params.length;i < n;i++){\n\t\t\t\tone=params[i];\n\t\t\t\tif (!Render.isFlash && (one.name===\"size\"))continue ;\n\t\t\t\tthis._params2dQuick2.push(one);\n\t\t\t}\n\t\t}\n\t\treturn this._params2dQuick2;\n\t}\n\n\tShader2X.create=function(vs,ps,saveName,nameMap){\n\t\treturn new Shader2X(vs,ps,saveName,nameMap);\n\t}\n\n\treturn Shader2X;\n})(Shader)\n\n\n//class laya.webgl.utils.IndexBuffer2D extends laya.webgl.utils.Buffer2D\nvar IndexBuffer2D=(function(_super){\n\tfunction IndexBuffer2D(bufferUsage){\n\t\tthis._uint8Array=null;\n\t\tthis._uint16Array=null;\n\t\t(bufferUsage===void 0)&& (bufferUsage=/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\tIndexBuffer2D.__super.call(this);\n\t\tthis._bufferUsage=bufferUsage;\n\t\tthis._bufferType=/*laya.webgl.WebGLContext.ELEMENT_ARRAY_BUFFER*/0x8893;\n\t\tRender.isFlash || (this._buffer=new ArrayBuffer(8));\n\t}\n\n\t__class(IndexBuffer2D,'laya.webgl.utils.IndexBuffer2D',_super);\n\tvar __proto=IndexBuffer2D.prototype;\n\t__proto._checkArrayUse=function(){\n\t\tthis._uint8Array && (this._uint8Array=new Uint8Array(this._buffer));\n\t\tthis._uint16Array && (this._uint16Array=new Uint16Array(this._buffer));\n\t}\n\n\t__proto.getUint8Array=function(){\n\t\treturn this._uint8Array || (this._uint8Array=new Uint8Array(this._buffer));\n\t}\n\n\t__proto.getUint16Array=function(){\n\t\treturn this._uint16Array || (this._uint16Array=new Uint16Array(this._buffer));\n\t}\n\n\t__proto.destory=function(){\n\t\tthis._uint16Array=null;\n\t\tthis._uint8Array=null;\n\t\tthis._buffer=null;\n\t}\n\n\tIndexBuffer2D.QuadrangleIB=null;\n\tIndexBuffer2D.create=function(bufferUsage){\n\t\t(bufferUsage===void 0)&& (bufferUsage=/*laya.webgl.WebGLContext.STATIC_DRAW*/0x88E4);\n\t\treturn new IndexBuffer2D(bufferUsage);\n\t}\n\n\treturn IndexBuffer2D;\n})(Buffer2D)\n\n\n//class laya.webgl.utils.VertexBuffer2D extends laya.webgl.utils.Buffer2D\nvar VertexBuffer2D=(function(_super){\n\tfunction VertexBuffer2D(vertexStride,bufferUsage){\n\t\tthis._floatArray32=null;\n\t\tthis._vertexStride=0;\n\t\tVertexBuffer2D.__super.call(this);\n\t\tthis._vertexStride=vertexStride;\n\t\tthis._bufferUsage=bufferUsage;\n\t\tthis._bufferType=/*laya.webgl.WebGLContext.ARRAY_BUFFER*/0x8892;\n\t\tRender.isFlash || (this._buffer=new ArrayBuffer(8));\n\t\tthis.getFloat32Array();\n\t}\n\n\t__class(VertexBuffer2D,'laya.webgl.utils.VertexBuffer2D',_super);\n\tvar __proto=VertexBuffer2D.prototype;\n\t__proto.getFloat32Array=function(){\n\t\treturn this._floatArray32 || (this._floatArray32=new Float32Array(this._buffer));\n\t}\n\n\t__proto.bind=function(ibBuffer){\n\t\t(ibBuffer)&& (ibBuffer._bind());\n\t\tthis._bind();\n\t}\n\n\t__proto.insertData=function(data,pos){\n\t\tvar vbdata=this.getFloat32Array();\n\t\tvbdata.set(data,pos);\n\t\tthis._upload=true;\n\t}\n\n\t__proto.bind_upload=function(ibBuffer){\n\t\t(ibBuffer._bind_upload())|| (ibBuffer._bind());\n\t\t(this._bind_upload())|| (this._bind());\n\t}\n\n\t__proto._checkArrayUse=function(){\n\t\tthis._floatArray32 && (this._floatArray32=new Float32Array(this._buffer));\n\t}\n\n\t__proto.disposeResource=function(){\n\t\t_super.prototype.disposeResource.call(this);\n\t\treturn;\n\t\tvar enableAtributes=Buffer._enableAtributes;\n\t\tif (!Render.isConchWebGL){\n\t\t\tfor (var i=0;i < 10;i++){\n\t\t\t\tWebGL.mainContext.disableVertexAttribArray(i);\n\t\t\t\tenableAtributes[i]=null;\n\t\t\t}\n\t\t}\n\t}\n\n\t//}\n\t__proto.destory=function(){\n\t\tthis._byteLength=0;\n\t\tthis._upload=true;\n\t\tthis._buffer=null;\n\t\tthis._floatArray32=null;\n\t}\n\n\t__getset(0,__proto,'vertexStride',function(){\n\t\treturn this._vertexStride;\n\t});\n\n\tVertexBuffer2D.create=function(vertexStride,bufferUsage){\n\t\t(bufferUsage===void 0)&& (bufferUsage=/*laya.webgl.WebGLContext.DYNAMIC_DRAW*/0x88E8);\n\t\treturn new VertexBuffer2D(vertexStride,bufferUsage);\n\t}\n\n\treturn VertexBuffer2D;\n})(Buffer2D)\n\n\n//class laya.webgl.resource.WebGLImage extends laya.resource.HTMLImage\nvar WebGLImage=(function(_super){\n\tfunction WebGLImage(data,def,format,mipmap){\n\t\t/**@private */\n\t\tthis._format=0;\n\t\t/**@private */\n\t\tthis._mipmap=false;\n\t\t/***是否创建私有Source,值为false时不根据src创建私有WebGLTexture,同时销毁时也只清空source=null,不调用WebGL.mainContext.deleteTexture类似函数，调用资源激活前有效*/\n\t\tthis._allowMerageInAtlas=false;\n\t\t/**是否允许加入大图合集*/\n\t\tthis._enableMerageInAtlas=false;\n\t\t/**是否使用重复模式纹理寻址*/\n\t\tthis.repeat=false;\n\t\t/**@private */\n\t\tthis._image=null;\n\t\t/**缩小过滤器*/\n\t\tthis.minFifter=0;\n\t\t/**放大过滤器*/\n\t\tthis.magFifter=0;\n\t\t(format===void 0)&& (format=/*laya.webgl.WebGLContext.RGBA*/0x1908);\n\t\t(mipmap===void 0)&& (mipmap=true);\n\t\tWebGLImage.__super.call(this,data,def);\n\t\tthis._format=format;\n\t\tthis._mipmap=mipmap;\n\t\tthis.repeat=false;\n\t\tthis.minFifter=-1;\n\t\tthis.magFifter=-1;\n\t\tif ((typeof data=='string')){\n\t\t\tthis._url=data;\n\t\t\tthis._src=data;\n\t\t\tthis._image=new Browser.window.Image();\n\t\t\tif (def){\n\t\t\t\tdef.onload && (this.onload=def.onload);\n\t\t\t\tdef.onerror && (this.onerror=def.onerror);\n\t\t\t\tdef.onCreate && def.onCreate(this);\n\t\t\t}\n\t\t\tthis._image.crossOrigin=(data && (data.indexOf(\"data:\")==0))? null :\"\";\n\t\t\t(data)&& (this._image.src=data);\n\t\t\t}else if ((data instanceof ArrayBuffer)){\n\t\t\tthis._src=def;\n\t\t\tthis._url=this._src;\n\t\t\tvar readData=new Byte(data);\n\t\t\tvar magicNumber=readData.readUTFBytes(4);\n\t\t\tvar version=readData.readUTFBytes(2);\n\t\t\tvar dataType=readData.getInt16();\n\t\t\treadData.endian=/*laya.utils.Byte.BIG_ENDIAN*/\"bigEndian\";\n\t\t\tthis._w=readData.getInt16();\n\t\t\tthis._h=readData.getInt16();\n\t\t\tvar originalWidth=readData.getInt16();\n\t\t\tvar originalHeight=readData.getInt16();\n\t\t\tthis._image=new Uint8Array(data,readData.pos);\n\t\t\tthis._format=WebGL.compressEtc1.COMPRESSED_RGB_ETC1_WEBGL;\n\t\t\t(AtlasResourceManager.enabled)&& (this._w < AtlasResourceManager.atlasLimitWidth && this._h < AtlasResourceManager.atlasLimitHeight)? this._allowMerageInAtlas=true :this._allowMerageInAtlas=false;\n\t\t\t}else {\n\t\t\tthis._src=def;\n\t\t\tthis._url=this._src;\n\t\t\tthis._image=data[\"source\"] || data;\n\t\t\tthis.onresize();\n\t\t}\n\t\tthis._$5__enableMerageInAtlas=true;\n\t}\n\n\t__class(WebGLImage,'laya.webgl.resource.WebGLImage',_super);\n\tvar __proto=WebGLImage.prototype;\n\tLaya.imps(__proto,{\"laya.webgl.resource.IMergeAtlasBitmap\":true})\n\t__proto._init_=function(src,def){}\n\t__proto._createWebGlTexture=function(){\n\t\tif (!this._image){\n\t\t\tthrow \"create GLTextur err:no data:\"+this._image;\n\t\t};\n\t\tvar gl=WebGL.mainContext;\n\t\tvar glTex=this._source=gl.createTexture();\n\t\tvar preTarget=WebGLContext.curBindTexTarget;\n\t\tvar preTexture=WebGLContext.curBindTexValue;\n\t\tWebGLContext.bindTexture(gl,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,glTex);\n\t\tif (Render.isConchWebGL){\n\t\t\tswitch (this._format){\n\t\t\t\tcase /*laya.webgl.WebGLContext.RGBA*/0x1908:\n\t\t\t\t\tgl.texImage2DEx(true,/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,this._format,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._image);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase WebGL.compressEtc1.COMPRESSED_RGB_ETC1_WEBGL:\n\t\t\t\t\tgl.compressedTexImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,this._format,this._w,this._h,0,this._image);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,true);\n\t\t\tswitch (this._format){\n\t\t\t\tcase /*laya.webgl.WebGLContext.RGBA*/0x1908:\n\t\t\t\t\tgl.texImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,this._format,/*laya.webgl.WebGLContext.RGBA*/0x1908,/*laya.webgl.WebGLContext.UNSIGNED_BYTE*/0x1401,this._image);\n\t\t\t\t\tbreak ;\n\t\t\t\tcase WebGL.compressEtc1.COMPRESSED_RGB_ETC1_WEBGL:\n\t\t\t\t\tgl.compressedTexImage2D(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,0,this._format,this._w,this._h,0,this._image);\n\t\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\tgl.pixelStorei(/*laya.webgl.WebGLContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL*/0x9241,false);\n\t\t};\n\t\tvar minFifter=this.minFifter;\n\t\tvar magFifter=this.magFifter;\n\t\tvar repeat=this.repeat ? /*laya.webgl.WebGLContext.REPEAT*/0x2901 :/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F;\n\t\tvar isPot=Arith.isPOT(this._w,this._h);\n\t\tif (isPot){\n\t\t\tif (this.mipmap)\n\t\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR_MIPMAP_LINEAR*/0x2703);\n\t\t\telse\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,repeat);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,repeat);\n\t\t\tthis.mipmap && gl.generateMipmap(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1);\n\t\t\t}else {\n\t\t\t(minFifter!==-1)|| (minFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\t(magFifter!==-1)|| (magFifter=/*laya.webgl.WebGLContext.LINEAR*/0x2601);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MIN_FILTER*/0x2801,minFifter);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_MAG_FILTER*/0x2800,magFifter);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_S*/0x2802,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t\tgl.texParameteri(/*laya.webgl.WebGLContext.TEXTURE_2D*/0x0DE1,/*laya.webgl.WebGLContext.TEXTURE_WRAP_T*/0x2803,/*laya.webgl.WebGLContext.CLAMP_TO_EDGE*/0x812F);\n\t\t}\n\t\t(preTarget && preTexture)&& (WebGLContext.bindTexture(gl,preTarget,preTexture));\n\t\tthis._image.onload=null;\n\t\tthis._image=null;\n\t\tif (isPot && this.mipmap)\n\t\t\tthis.memorySize=this._w *this._h *4 *(1+1 / 3);\n\t\telse\n\t\tthis.memorySize=this._w *this._h *4;\n\t\tthis._recreateLock=false;\n\t}\n\n\t/***重新创建资源，如果异步创建中被强制释放再创建，则需等待释放完成后再重新加载创建。*/\n\t__proto.recreateResource=function(){\n\t\tvar _$this=this;\n\t\tif (this._src==null || this._src===\"\")\n\t\t\treturn;\n\t\tthis._needReleaseAgain=false;\n\t\tif (!this._image){\n\t\t\tthis._recreateLock=true;\n\t\t\tvar _this=this;\n\t\t\tthis._image=new Browser.window.Image();\n\t\t\tthis._image.crossOrigin=this._src.indexOf(\"data:\")==0 ? null :\"\";\n\t\t\tthis._image.onload=function (){\n\t\t\t\tif (_this._needReleaseAgain){\n\t\t\t\t\t_this._needReleaseAgain=false;\n\t\t\t\t\t_this._image.onload=null;\n\t\t\t\t\t_this._image=null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t(!(_this._allowMerageInAtlas && _this._enableMerageInAtlas))? (_this._createWebGlTexture()):(_$this.memorySize=0,_$this._recreateLock=false);\n\t\t\t\t_this.completeCreate();\n\t\t\t};\n\t\t\tthis._image.src=this._src;\n\t\t\t}else {\n\t\t\tif (this._recreateLock){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t(!(this._allowMerageInAtlas && this._$5__enableMerageInAtlas))? (this._createWebGlTexture()):(this.memorySize=0,this._recreateLock=false);\n\t\t\tthis.completeCreate();\n\t\t}\n\t}\n\n\t/***销毁资源*/\n\t__proto.disposeResource=function(){\n\t\tif (this._recreateLock){\n\t\t\tthis._needReleaseAgain=true;\n\t\t}\n\t\tif (this._source){\n\t\t\tWebGL.mainContext.deleteTexture(this._source);\n\t\t\tthis._source=null;\n\t\t\tthis._image=null;\n\t\t\tthis.memorySize=0;\n\t\t}\n\t}\n\n\t/***调整尺寸*/\n\t__proto.onresize=function(){\n\t\tthis._w=this._image.width;\n\t\tthis._h=this._image.height;\n\t\t(AtlasResourceManager.enabled)&& (this._w < AtlasResourceManager.atlasLimitWidth && this._h < AtlasResourceManager.atlasLimitHeight)? this._allowMerageInAtlas=true :this._allowMerageInAtlas=false;\n\t}\n\n\t__proto.clearAtlasSource=function(){\n\t\tthis._image=null;\n\t}\n\n\t/**\n\t*获取纹理格式。\n\t*/\n\t__getset(0,__proto,'format',function(){\n\t\treturn this._format;\n\t});\n\n\t/**\n\t*是否创建私有Source,通常禁止修改\n\t*@param value 是否创建\n\t*/\n\t/**\n\t*是否创建私有Source\n\t*@return 是否创建\n\t*/\n\t__getset(0,__proto,'enableMerageInAtlas',function(){\n\t\treturn this._$5__enableMerageInAtlas;\n\t\t},function(value){\n\t\tthis._$5__enableMerageInAtlas=value;\n\t});\n\n\t/**\n\t*获取是否具有mipmap。\n\t*/\n\t__getset(0,__proto,'mipmap',function(){\n\t\treturn this._mipmap;\n\t});\n\n\t/**\n\t*是否创建私有Source\n\t*@return 是否创建\n\t*/\n\t__getset(0,__proto,'allowMerageInAtlas',function(){\n\t\treturn this._allowMerageInAtlas;\n\t});\n\n\t__getset(0,__proto,'atlasSource',function(){\n\t\treturn this._image;\n\t});\n\n\t/***\n\t*设置onload函数\n\t*@param value onload函数\n\t*/\n\t__getset(0,__proto,'onload',null,function(value){\n\t\tvar _$this=this;\n\t\tthis._onload=value;\n\t\tthis._image && (this._image.onload=this._onload !=null ? (function(){\n\t\t\t_$this.onresize();\n\t\t\t_$this._onload();\n\t\t}):null);\n\t});\n\n\t/***\n\t*设置onerror函数\n\t*@param value onerror函数\n\t*/\n\t__getset(0,__proto,'onerror',null,function(value){\n\t\tvar _$this=this;\n\t\tthis._onerror=value;\n\t\tthis._image && (this._image.onerror=this._onerror !=null ? (function(){\n\t\t\t_$this._onerror()\n\t\t}):null);\n\t});\n\n\treturn WebGLImage;\n})(HTMLImage)\n\n\n\tLaya.__init([DrawText,AtlasGrid,WebGLContext2D,ShaderCompile]);\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.wxmini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar Sound=laya.media.Sound,SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,URL=laya.net.URL;\n\tvar Utils=laya.utils.Utils;\n//class laya.wx.mini.MiniAdpter\nvar MiniAdpter=(function(){\n\tfunction MiniAdpter(){}\n\t__class(MiniAdpter,'laya.wx.mini.MiniAdpter');\n\tMiniAdpter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tMiniAdpter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (MiniAdpter._inited)return;\n\t\tMiniAdpter._inited=true;\n\t\tMiniAdpter.window=/*__JS__ */window;\n\t\tif(!MiniAdpter.window.hasOwnProperty(\"wx\"))\n\t\t\treturn;\n\t\tif(MiniAdpter.window.navigator.userAgent.indexOf('MiniGame')<0)return;\n\t\tMiniAdpter.isZiYu=isSon;\n\t\tMiniAdpter.isPosMsgYu=isPosMsg;\n\t\tMiniAdpter.EnvConfig={};\n\t\ttry{\n\t\t\t/*__JS__ */laya.webgl.resource.WebGLCanvas.premulAlpha=true;\n\t\t\t}catch(e){\n\t\t}\n\t\tif(!MiniAdpter.isZiYu){\n\t\t\tMiniFileMgr.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr.existDir(MiniFileMgr.fileNativeDir,Handler.create(MiniAdpter,MiniAdpter.onMkdirCallBack));\n\t\t}\n\t\tMiniAdpter.systemInfo=MiniAdpter.window.wx.getSystemInfoSync();\n\t\tif (MiniAdpter.systemInfo.system.toLowerCase()==='ios 10.1.1'){\n\t\t\ttry{\n\t\t\t\t/*__JS__ */laya.webgl.resource.WebGLCharImage.canUseCanvas=false;\n\t\t\t\t}catch(e){\n\t\t\t}\n\t\t}\n\t\tMiniAdpter.window.focus=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tMiniAdpter.window.logtime=function (str){\n\t\t};\n\t\tMiniAdpter.window.alertTimeLog=function (str){\n\t\t};\n\t\tMiniAdpter.window.resetShareInfo=function (){\n\t\t};\n\t\tMiniAdpter.window.CanvasRenderingContext2D=function (){\n\t\t};\n\t\tMiniAdpter.window.CanvasRenderingContext2D.prototype=MiniAdpter.window.wx.createCanvas().getContext('2d').__proto__;\n\t\tMiniAdpter.window.document.body.appendChild=function (){\n\t\t};\n\t\tMiniAdpter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=MiniAdpter.pixelRatio;\n\t\tMiniAdpter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=MiniAdpter.createElement;\n\t\tRunDriver.createShaderCondition=MiniAdpter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=MiniAdpter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput['_createInputElement'];\n\t\tMiniAdpter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage.prototype._loadImage;\n\t\tLocalStorage._baseClass=MiniLocalStorage;\n\t\tMiniLocalStorage.__init__();\n\t\tMiniAdpter.onReciveData();\n\t}\n\n\tMiniAdpter.onReciveData=function(){\n\t\tif(laya.wx.mini.MiniAdpter.isZiYu){\n\t\t\tMiniAdpter.window.wx.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniAdpter.measureText=function(str){\n\t\tvar tempObj=MiniAdpter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tMiniAdpter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tMiniAdpter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tMiniAdpter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tMiniAdpter.removeAll=function(){\n\t\tMiniFileMgr.deleteAll();\n\t}\n\n\tMiniAdpter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr.isLocalNativeFile(fileUrl);\n\t}\n\n\tMiniAdpter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr.getFileInfo(fileUrl);\n\t}\n\n\tMiniAdpter.getFileList=function(){\n\t\treturn MiniFileMgr.filesListObj;\n\t}\n\n\tMiniAdpter.exitMiniProgram=function(){\n\t\tMiniAdpter.window.wx.exitMiniProgram();\n\t}\n\n\tMiniAdpter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode){\n\t\t\tMiniFileMgr.filesListObj=JSON.parse(data.data);\n\t\t\tMiniFileMgr.fakeObj=JSON.parse(data.data);\n\t\t}\n\t}\n\n\tMiniAdpter.pixelRatio=function(){\n\t\tif (!MiniAdpter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tMiniAdpter.EnvConfig.pixelRatioInt=MiniAdpter.systemInfo.pixelRatio;\n\t\t\t\treturn MiniAdpter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn MiniAdpter.EnvConfig.pixelRatioInt;\n\t}\n\n\tMiniAdpter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (MiniAdpter.idx==1){\n\t\t\t\tif(MiniAdpter.isZiYu){\n\t\t\t\t\t_source=MiniAdpter.window.sharedCanvas;\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=MiniAdpter.window.canvas;\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=MiniAdpter.window.wx.createCanvas();\n\t\t\t}\n\t\t\tMiniAdpter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn MiniAdpter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=MiniAdpter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t}\n\t\telse {\n\t\t\treturn MiniAdpter._preCreateElement(type);\n\t\t}\n\t}\n\n\tMiniAdpter.onCreateInput=function(type){\n\t\tvar node=MiniAdpter._preCreateElement(type);\n\t\tnode.focus=MiniInput.wxinputFocus;\n\t\tnode.blur=MiniInput.wxinputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.parentElement={};\n\t\tnode.placeholder={};\n\t\tnode.type={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tMiniAdpter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tMiniAdpter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.wx.mini.MiniAdpter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tMiniAdpter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniAdpter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tMiniAdpter.window.wx.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tMiniAdpter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tMiniAdpter.window.wx.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tMiniAdpter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.wx.mini.MiniAdpter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tMiniAdpter.window.wx.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniAdpter.EnvConfig=null;\n\tMiniAdpter.window=null;\n\tMiniAdpter._preCreateElement=null;\n\tMiniAdpter._inited=false;\n\tMiniAdpter.systemInfo=null;\n\tMiniAdpter.isZiYu=false;\n\tMiniAdpter.isPosMsgYu=false;\n\tMiniAdpter.autoCacheFile=true;\n\tMiniAdpter.minClearSize=(5 *1024 *1024);\n\tMiniAdpter.subNativeFiles=null;\n\tMiniAdpter.subNativeheads=[];\n\tMiniAdpter.subMaps=[];\n\tMiniAdpter.AutoCacheDownFile=false;\n\tMiniAdpter._measureText=null;\n\tMiniAdpter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tMiniAdpter.idx=1;\n\t__static(MiniAdpter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"wxlocal\"];}\n\t]);\n\treturn MiniAdpter;\n})()\n\n\n/**@private **/\n//class laya.wx.mini.MiniFileMgr\nvar MiniFileMgr=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.wx.mini.MiniFileMgr');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=MiniAdpter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(MiniAdpter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.fakeObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(MiniAdpter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,null,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((MiniAdpter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\"wx.qlogo.cn\")==-1 && readyUrl.indexOf(\".php\")==-1){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,null,\"\",isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"ascii\");\n\t\tif(MiniAdpter.window.navigator.userAgent.indexOf('MiniGame')<0){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tMiniFileMgr.fakeObj[readyUrl]={md5:tempFileName,readyUrl:readyUrl,size:0,times:Browser.now(),encoding:encoding};\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > MiniAdpter.minClearSize)\n\t\t\t\t\t\t\t\tMiniAdpter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > MiniAdpter.minClearSize)\n\t\t\t\t\t\t\tMiniAdpter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=MiniAdpter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.wx.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.wx.mini.MiniFileMgr.filesListObj && laya.wx.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.wx.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.wx.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tif (MiniFileMgr.fakeObj[fileurlkey].md5==MiniFileMgr.filesListObj[fileurlkey].md5){\n\t\t\t\t\tdelete MiniFileMgr.fakeObj[fileurlkey];\n\t\t\t\t}\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!MiniAdpter.isZiYu &&MiniAdpter.isPosMsgYu && MiniAdpter.window.wx.postMessage){\n\t\t\tMiniAdpter.window.wx.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tfilesListStr=MiniFileMgr.fs.readFileSync(fileUrl,encoding);\n\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=MiniAdpter.window.wx.env.USER_DATA_PATH+value;\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fakeObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=MiniAdpter.window.wx.getFileSystemManager();},'wxdown',function(){return this.wxdown=MiniAdpter.window.wx.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.wx.mini.MiniImage\nvar MiniImage=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.wx.mini.MiniImage');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (MiniAdpter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (MiniAdpter.subNativeFiles && MiniAdpter.subNativeheads.length==0){\n\t\t\t\tfor (var key in MiniAdpter.subNativeFiles){\n\t\t\t\t\tvar tempArr=MiniAdpter.subNativeFiles[key];\n\t\t\t\t\tMiniAdpter.subNativeheads=MiniAdpter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tMiniAdpter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(MiniAdpter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && MiniAdpter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=MiniAdpter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr.getFileInfo(url)){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniAdpter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.downOtherFiles(url,new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(MiniAdpter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(MiniAdpter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (){\n\t\t\tclear();\n\t\t\tdelete MiniFileMgr.filesListObj[sourceUrl];\n\t\t\tdelete MiniFileMgr.fakeObj[sourceUrl];\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.wx.mini.MiniInput\nvar MiniInput=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.wx.mini.MiniInput');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\t/*__JS__ */wx.onWindowResize && /*__JS__ */wx.onWindowResize(function(res){\n\t\t\t/*__JS__ */window.dispatchEvent && /*__JS__ */window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound;\n\t\tSoundManager._musicClass=MiniSound;\n\t\tvar model=MiniAdpter.systemInfo.model;\n\t\tvar system=MiniAdpter.systemInfo.system;\n\t\tif(model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tMiniAdpter.window.wx.offKeyboardConfirm();\n\t\tMiniAdpter.window.wx.offKeyboardInput();\n\t\tMiniAdpter.window.wx.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,confirmHold:true,confirmType:'done',success:function (res){\n\t\t\t\t},fail:function (res){\n\t\t}});\n\t\tMiniAdpter.window.wx.onKeyboardConfirm(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.wx.mini.MiniInput.inputEnter();\n\t\t})\n\t\tMiniAdpter.window.wx.onKeyboardInput(function(res){\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.wx.mini.MiniInput.inputEnter();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(){\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){\n\t\tMiniInput.hideKeyboard();\n\t}\n\n\tMiniInput.hideKeyboard=function(){\n\t\tMiniAdpter.window.wx.offKeyboardConfirm();\n\t\tMiniAdpter.window.wx.offKeyboardInput();\n\t\tMiniAdpter.window.wx.hideKeyboard({success:function (res){\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.wx.mini.MiniLocalStorage\nvar MiniLocalStorage=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.wx.mini.MiniLocalStorage');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\ttry{\n\t\t\t/*__JS__ */wx.setStorageSync(key,value);\n\t\t}\n\t\tcatch(error){\n\t\t\t/*__JS__ */wx.setStorage({\n\t\t\t\tkey:key,\n\t\t\t\tdata:value\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\treturn /*__JS__ */wx.getStorageSync(key);\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\tMiniLocalStorage.setItem(key,value);\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\treturn MiniLocalStorage.getItem(key);\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\t/*__JS__ */wx.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\t/*__JS__ */wx.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=/*__JS__ */wx.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.wx.mini.MiniLocation\nvar MiniLocation=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.wx.mini.MiniLocation');\n\tMiniLocation.__init__=function(){\n\t\tMiniAdpter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tMiniAdpter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tMiniAdpter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tMiniAdpter.window.wx.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**\n*视频类\n*@author xiaosong\n*@date-2019-04-22\n*/\n//class laya.wx.mini.MiniVideo\nvar MiniVideo=(function(){\n\tfunction MiniVideo(width,height){\n\t\t/**视频是否播放结束**/\n\t\tthis.videoend=false;\n\t\tthis.videourl=\"\";\n\t\tthis.videoElement=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.onEndedFunC=null;\n\t\t/**视频的总时⻓长，单位为秒**/\n\t\tthis._duration=NaN;\n\t\t/**视频播放的当前位置**/\n\t\tthis.position=NaN;\n\t\t(width===void 0)&& (width=320);\n\t\t(height===void 0)&& (height=240);\n\t\tthis.videoElement=MiniAdpter.window.wx.createVideo({width:width,height:height,autoplay:true});\n\t}\n\n\t__class(MiniVideo,'laya.wx.mini.MiniVideo');\n\tvar __proto=MiniVideo.prototype;\n\t__proto.on=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.onPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.onEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t\tthis.videoElement.onTimeUpdate=this.onTimeUpdateFunc.bind(this);\n\t}\n\n\t__proto.onTimeUpdateFunc=function(data){\n\t\tthis.position=data.position;\n\t\tthis._duration=data.duration;\n\t}\n\n\t__proto.onPlayFunction=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.readyState=200;\n\t\tconsole.log(\"=====视频加载完成========\");\n\t\tthis.onPlayFunc !=null && this.onPlayFunc();\n\t}\n\n\t__proto.onEndedFunction=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tconsole.log(\"=====视频播放完毕========\");\n\t\tthis.onEndedFunC !=null && this.onEndedFunC();\n\t}\n\n\t__proto.off=function(eventType,ths,callBack){\n\t\tif(eventType==\"loadedmetadata\"){\n\t\t\tthis.onPlayFunc=callBack.bind(ths);\n\t\t\tthis.videoElement.offPlay=this.onPlayFunction.bind(this);\n\t\t\t}else if(eventType==\"ended\"){\n\t\t\tthis.onEndedFunC=callBack.bind(ths);\n\t\t\tthis.videoElement.offEnded=this.onEndedFunction.bind(this);\n\t\t}\n\t}\n\n\t/**\n\t*设置播放源。\n\t*@param url 播放源路径。\n\t*/\n\t__proto.load=function(url){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=url;\n\t}\n\n\t/**\n\t*开始播放视频。\n\t*/\n\t__proto.play=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=false;\n\t\tthis.videoElement.play();\n\t}\n\n\t/**\n\t*暂停视频播放。\n\t*/\n\t__proto.pause=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoend=true;\n\t\tthis.videoElement.pause();\n\t}\n\n\t/**\n\t*设置大小\n\t*@param width\n\t*@param height\n\t*/\n\t__proto.size=function(width,height){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.width=width;\n\t\tthis.videoElement.height=height;\n\t}\n\n\t__proto.destroy=function(){\n\t\tif(this.videoElement)\n\t\t\tthis.videoElement.destroy();\n\t\tthis.videoElement=null;\n\t\tthis.onEndedFunC=null;\n\t\tthis.onPlayFunc=null;\n\t\tthis.videoend=false;\n\t\tthis.videourl=null;\n\t}\n\n\t/**\n\t*重新加载视频。\n\t*/\n\t__proto.reload=function(){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.src=this.videourl;\n\t}\n\n\t/**\n\t*获取视频长度（秒）。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._duration;\n\t});\n\n\t/**\n\t*返回视频是否暂停\n\t*/\n\t__getset(0,__proto,'paused',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.paused;\n\t});\n\n\t/**\n\t*设置或返回音频/视频是否应在结束时重新播放。\n\t*/\n\t__getset(0,__proto,'loop',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.loop;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.loop=value;\n\t});\n\n\t/**\n\t*设置和获取当前播放头位置。\n\t*/\n\t__getset(0,__proto,'currentTime',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.initialTime;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.initialTime=value;\n\t});\n\n\t/**\n\t*返回音频/视频的播放是否已结束\n\t*/\n\t__getset(0,__proto,'ended',function(){\n\t\treturn this.videoend;\n\t});\n\n\t/**\n\t*获取和设置静音状态。\n\t*/\n\t__getset(0,__proto,'muted',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn false;\n\t\treturn this.videoElement.muted;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.muted=value;\n\t});\n\n\t/**\n\t*获取视频源尺寸。ready事件触发后可用。\n\t*/\n\t__getset(0,__proto,'videoWidth',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.width;\n\t});\n\n\t__getset(0,__proto,'videoHeight',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.height;\n\t});\n\n\t/**\n\t*playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n\t*<ul>\n\t*<li>1.0 正常速度</li>\n\t*<li>0.5 半速（更慢）</li>\n\t*<li>2.0 倍速（更快）</li>\n\t*<li>-1.0 向后，正常速度</li>\n\t*<li>-0.5 向后，半速</li>\n\t*</ul>\n\t*<p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n\t*/\n\t__getset(0,__proto,'playbackRate',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.playbackRate;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.playbackRate=value;\n\t});\n\n\t__getset(0,__proto,'x',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.x;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.x=value;\n\t});\n\n\t__getset(0,__proto,'y',function(){\n\t\tif(!this.videoElement)\n\t\t\treturn 0;\n\t\treturn this.videoElement.y;\n\t\t},function(value){\n\t\tif(!this.videoElement)\n\t\t\treturn;\n\t\tthis.videoElement.y=value;\n\t});\n\n\t/**\n\t*获取当前播放源路径。\n\t*/\n\t__getset(0,__proto,'currentSrc',function(){\n\t\treturn this.videoElement.src;\n\t});\n\n\tMiniVideo.__init__=function(){\n\t\t/*__JS__ */laya.device.media.Video=MiniVideo;\n\t}\n\n\treturn MiniVideo;\n})()\n\n\n/**@private **/\n//class laya.wx.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.wx.mini.MiniAccelerator',_super);\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tMiniAdpter.window.wx.onAccelerometerChange(laya.wx.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tMiniAdpter.window.wx.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.wx.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.wx.mini.MiniLoader',_super);\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=MiniAdpter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tMiniAdpter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(MiniAdpter.isZiYu && !MiniFileMgr.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(MiniAdpter.isZiYu && MiniFileMgr.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr.isLocalNativeFile(url)){\n\t\t\t\t\tif (MiniAdpter.subNativeFiles && MiniAdpter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in MiniAdpter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=MiniAdpter.subNativeFiles[key];\n\t\t\t\t\t\t\tMiniAdpter.subNativeheads=MiniAdpter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tMiniAdpter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(MiniAdpter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && MiniAdpter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=MiniAdpter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(type==/*laya.net.Loader.SOUND*/\"sound\"){\n\t\t\t\t\t\tthisLoader._loadSound(url);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tMiniFileMgr.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(MiniAdpter.window.wx.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !MiniAdpter.AutoCacheDownFile){\n\t\t\t\t\tif(type==/*laya.net.Loader.SOUND*/\"sound\"){\n\t\t\t\t\t\tthisLoader._loadSound(url);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tMiniAdpter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tMiniAdpter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr.downFiles(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),URL.formatURL(url));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t*private\n\t*@param url\n\t**/\n\t__proto._loadSound=function(url){\n\t\tvar thisLoader=this;\n\t\tvar fileNativeUrl;\n\t\tif (MiniFileMgr.isLocalNativeFile(url)){\n\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\tvar tempUrl=url;\n\t\t\tif(tempStr !=\"\" && (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1))\n\t\t\t\tfileNativeUrl=url.split(tempStr)[1];\n\t\t\tif(!fileNativeUrl){\n\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t}\n\t\t\tlaya.wx.mini.MiniLoader.onDownLoadCallBack(url,thisLoader,0);\n\t\t\t}else{\n\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\tif (!MiniFileMgr.isLocalNativeFile(url)&& (tempurl.indexOf(\"http://\")==-1 && tempurl.indexOf(\"https://\")==-1)|| (tempurl.indexOf(MiniAdpter.window.wx.env.USER_DATA_PATH)!=-1)){\n\t\t\t\tlaya.wx.mini.MiniLoader.onDownLoadCallBack(url,thisLoader,0);\n\t\t\t\t}else{\n\t\t\t\tMiniFileMgr.downOtherFiles(encodeURI(tempurl),Handler.create(MiniLoader,laya.wx.mini.MiniLoader.onDownLoadCallBack,[tempurl,thisLoader]),tempurl);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onDownLoadCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(MiniAdpter.autoCacheFile){\n\t\t\t\tif(!tempFilePath){\n\t\t\t\t\tif (MiniFileMgr.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tvar fileObj=MiniFileMgr.getFileInfo(sourceUrl);\n\t\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\t\tfileNativeUrl=MiniFileMgr.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsourceUrl=fileNativeUrl;\n\t\t\tvar sound=new SoundManager._soundClass();\n\t\t\tsound.load(encodeURI(sourceUrl));\n\t\t\tthisLoader.onLoaded(sound);\n\t\t\t}else{\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load sound failed\");\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=MiniAdpter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!MiniAdpter.isZiYu &&MiniAdpter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\" && MiniAdpter.window.wx){\n\t\t\t\tMiniAdpter.window.wx.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tconsole.log(\"-----------本地加载失败，尝试外网加载----url:\"+url);\n\t\t\tMiniAdpter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.wx.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.wx.mini.MiniSound',_super);\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(MiniAdpter.autoCacheFile&&MiniFileMgr.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!MiniAdpter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (MiniAdpter.subNativeFiles && MiniAdpter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in MiniAdpter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=MiniAdpter.subNativeFiles[key];\n\t\t\t\t\t\t\tMiniAdpter.subNativeheads=MiniAdpter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tMiniAdpter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(MiniAdpter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && MiniAdpter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=MiniAdpter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.downOtherFiles(encodeURI(url),Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(MiniAdpter.autoCacheFile){\n\t\t\t\tif (MiniFileMgr.isLocalNativeFile(sourceUrl)){\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=sourceUrl;\n\t\t\t\t\tif(tempStr !=\"\" && (sourceUrl.indexOf(\"http://\")!=-1 || sourceUrl.indexOf(\"https://\")!=-1))\n\t\t\t\t\t\tfileNativeUrl=sourceUrl.split(tempStr)[1];\n\t\t\t\t\tif(!fileNativeUrl){\n\t\t\t\t\t\tfileNativeUrl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr.getFileInfo(sourceUrl);\n\t\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\t\tfileNativeUrl=MiniFileMgr.getFileNativePath(fileMd5Name);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\tfileNativeUrl=encodeURI(sourceUrl);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=encodeURI(sourceUrl);\n\t\t\t}\n\t\t\tthis._sound.onCanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\tthis._sound.onError(MiniSound.bindToThis(this.onError,this));\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tthis._sound.offError(null);\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis._sound.offCanplay(null);\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(MiniAdpter.autoCacheFile&&MiniFileMgr.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=encodeURI(this.url);\n\t\t};\n\t\tvar channel=new MiniSoundChannel(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t\tif(this._sound){\n\t\t\tthis._sound.destroy();\n\t\t\tthis._sound=null;\n\t\t}\n\t\tthis.url=this.readyUrl=null;\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn MiniAdpter.window.wx.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.wx.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onEnded(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.wx.mini.MiniSoundChannel',_super);\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tthis._audio.offEnded(null);\n\t\tthis._audio.destroy();\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',null,function(time){\n\t\tif(this._audio){\n\t\t\tthis._audio.startTime=time;\n\t\t}\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/laya.xmmini.js",
    "content": "\n(function(window,document,Laya){\n\tvar __un=Laya.un,__uns=Laya.uns,__static=Laya.static,__class=Laya.class,__getset=Laya.getset,__newvec=Laya.__newvec;\n\n\tvar Browser=laya.utils.Browser,Event=laya.events.Event,EventDispatcher=laya.events.EventDispatcher;\n\tvar HTMLImage=laya.resource.HTMLImage,Handler=laya.utils.Handler,Input=laya.display.Input,Loader=laya.net.Loader;\n\tvar LocalStorage=laya.net.LocalStorage,Matrix=laya.maths.Matrix,Render=laya.renders.Render,RunDriver=laya.utils.RunDriver;\n\tvar SoundChannel=laya.media.SoundChannel,SoundManager=laya.media.SoundManager,URL=laya.net.URL,Utils=laya.utils.Utils;\n//class laya.mi.mini.KGMiniAdapter\nvar KGMiniAdapter=(function(){\n\tfunction KGMiniAdapter(){}\n\t__class(KGMiniAdapter,'laya.mi.mini.KGMiniAdapter');\n\tKGMiniAdapter.getJson=function(data){\n\t\treturn JSON.parse(data);\n\t}\n\n\tKGMiniAdapter.init=function(isPosMsg,isSon){\n\t\t(isPosMsg===void 0)&& (isPosMsg=false);\n\t\t(isSon===void 0)&& (isSon=false);\n\t\tif (KGMiniAdapter._inited)return;\n\t\tKGMiniAdapter._inited=true;\n\t\tKGMiniAdapter.window=/*__JS__ */window;\n\t\tif(KGMiniAdapter.window.navigator.userAgent.indexOf('QuickGame')<0)return;\n\t\tKGMiniAdapter.isZiYu=isSon;\n\t\tKGMiniAdapter.isPosMsgYu=isPosMsg;\n\t\tKGMiniAdapter.EnvConfig={};\n\t\tif(!KGMiniAdapter.isZiYu){\n\t\t\tMiniFileMgr$2.setNativeFileDir(\"/layaairGame\");\n\t\t\tMiniFileMgr$2.existDir(MiniFileMgr$2.fileNativeDir,Handler.create(KGMiniAdapter,KGMiniAdapter.onMkdirCallBack));\n\t\t}\n\t\tif(!KGMiniAdapter.isZiYu){\n\t\t\tKGMiniAdapter.systemInfo=laya.mi.mini.KGMiniAdapter.window.qg.getSystemInfoSync();\n\t\t}\n\t\tKGMiniAdapter.window.focus=function (){\n\t\t};\n\t\tLaya['getUrlPath']=function (){\n\t\t};\n\t\tLaya['_getUrlPath']=function (){\n\t\t};\n\t\tKGMiniAdapter.window.logtime=function (str){\n\t\t};\n\t\tKGMiniAdapter.window.alertTimeLog=function (str){\n\t\t};\n\t\tKGMiniAdapter.window.resetShareInfo=function (){\n\t\t};\n\t\tKGMiniAdapter.EnvConfig.pixelRatioInt=0;\n\t\tRunDriver.getPixelRatio=KGMiniAdapter.pixelRatio;\n\t\tKGMiniAdapter._preCreateElement=Browser.createElement;\n\t\tBrowser[\"createElement\"]=KGMiniAdapter.createElement;\n\t\tRunDriver.createShaderCondition=KGMiniAdapter.createShaderCondition;\n\t\tUtils['parseXMLFromString']=KGMiniAdapter.parseXMLFromString;\n\t\tInput['_createInputElement']=MiniInput$2['_createInputElement'];\n\t\tKGMiniAdapter.EnvConfig.load=Loader.prototype.load;\n\t\tLoader.prototype.load=MiniLoader$2.prototype.load;\n\t\tLoader.prototype._loadImage=MiniImage$2.prototype._loadImage;\n\t\tKGMiniAdapter.onReciveData();\n\t}\n\n\tKGMiniAdapter.onReciveData=function(){\n\t\tif(laya.mi.mini.KGMiniAdapter.isZiYu && laya.mi.mini.KGMiniAdapter.window.qg.onMessage){\n\t\t\tlaya.mi.mini.KGMiniAdapter.window.qg.onMessage(function(message){\n\t\t\t\tif(message['isLoad']==\"opendatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$2.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t\tMiniFileMgr$2.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontext\"){\n\t\t\t\t\tif(message.url){\n\t\t\t\t\t\tMiniFileMgr$2.ziyuFileData[message.url]=message.atlasdata;\n\t\t\t\t\t}\n\t\t\t\t\t}else if(message['isLoad']==\"openJsondatacontextPic\"){\n\t\t\t\t\tMiniFileMgr$2.ziyuFileTextureData[message.imgReadyUrl]=message.imgNativeUrl;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tKGMiniAdapter.measureText=function(str){\n\t\tvar tempObj=KGMiniAdapter._measureText(str);\n\t\tif(!tempObj){\n\t\t\ttempObj={width:16};\n\t\t\tconsole.warn(\"-------微信获取文字宽度失败----等待修复---------\");\n\t\t}\n\t\treturn tempObj;\n\t}\n\n\tKGMiniAdapter.getUrlEncode=function(url,type){\n\t\tif(type==\"arraybuffer\")\n\t\t\treturn \"\";\n\t\treturn \"utf8\";\n\t}\n\n\tKGMiniAdapter.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tvar fileObj=MiniFileMgr$2.getFileInfo(fileUrl);\n\t\tif(!fileObj)\n\t\t\tMiniFileMgr$2.downLoadFile(fileUrl,fileType,callBack,encoding);\n\t\telse{\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t}\n\t}\n\n\tKGMiniAdapter.remove=function(fileUrl,callBack){\n\t\tMiniFileMgr$2.deleteFile(\"\",fileUrl,callBack,\"\",0);\n\t}\n\n\tKGMiniAdapter.removeAll=function(){\n\t\tMiniFileMgr$2.deleteAll();\n\t}\n\n\tKGMiniAdapter.hasNativeFile=function(fileUrl){\n\t\treturn MiniFileMgr$2.isLocalNativeFile(fileUrl);\n\t}\n\n\tKGMiniAdapter.getFileInfo=function(fileUrl){\n\t\treturn MiniFileMgr$2.getFileInfo(fileUrl);\n\t}\n\n\tKGMiniAdapter.getFileList=function(){\n\t\treturn MiniFileMgr$2.filesListObj;\n\t}\n\n\tKGMiniAdapter.exitMiniProgram=function(){\n\t\tlaya.mi.mini.KGMiniAdapter.window.qg.exitMiniProgram();\n\t}\n\n\tKGMiniAdapter.onMkdirCallBack=function(errorCode,data){\n\t\tif (!errorCode)\n\t\t\tMiniFileMgr$2.filesListObj=JSON.parse(data.data);\n\t}\n\n\tKGMiniAdapter.pixelRatio=function(){\n\t\tif (!KGMiniAdapter.EnvConfig.pixelRatioInt){\n\t\t\ttry {\n\t\t\t\tKGMiniAdapter.EnvConfig.pixelRatioInt=KGMiniAdapter.systemInfo.pixelRatio;\n\t\t\t\treturn KGMiniAdapter.systemInfo.pixelRatio;\n\t\t\t}catch (error){}\n\t\t}\n\t\treturn KGMiniAdapter.EnvConfig.pixelRatioInt;\n\t}\n\n\tKGMiniAdapter.createElement=function(type){\n\t\tif (type==\"canvas\"){\n\t\t\tvar _source;\n\t\t\tif (KGMiniAdapter.idx==1){\n\t\t\t\tif(KGMiniAdapter.isZiYu){\n\t\t\t\t\t_source=KGMiniAdapter.window.document.createElement(\"canvas\");\n\t\t\t\t\t_source.style={};\n\t\t\t\t\t}else{\n\t\t\t\t\t_source=KGMiniAdapter.window.document.getElementById(\"canvas\");\n\t\t\t\t\t_source.style={\n\t\t\t\t\t\twidth:_source.width+\"px\",\n\t\t\t\t\t\theight:_source.height+\"px\"\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t_source=KGMiniAdapter.window.document.createElement(\"canvas\");\n\t\t\t}\n\t\t\tKGMiniAdapter.idx++;\n\t\t\treturn _source;\n\t\t\t}else if (type==\"textarea\" || type==\"input\"){\n\t\t\treturn KGMiniAdapter.onCreateInput(type);\n\t\t\t}else if (type==\"div\"){\n\t\t\tvar node=KGMiniAdapter._preCreateElement(type);\n\t\t\tnode.contains=function (value){\n\t\t\t\treturn null\n\t\t\t};\n\t\t\tnode.removeChild=function (value){\n\t\t\t};\n\t\t\treturn node;\n\t\t\t}else {\n\t\t\treturn KGMiniAdapter._preCreateElement(type);\n\t\t}\n\t}\n\n\tKGMiniAdapter.onCreateInput=function(type){\n\t\tvar node=KGMiniAdapter._preCreateElement(type);\n\t\tnode.focus=MiniInput$2.wxinputFocus;\n\t\tnode.blur=MiniInput$2.wxinputblur;\n\t\tnode.style={};\n\t\tnode.value=0;\n\t\tnode.placeholder={};\n\t\tnode.setColor=function (value){\n\t\t};\n\t\tnode.setType=function (value){\n\t\t};\n\t\tnode.setFontFace=function (value){\n\t\t};\n\t\tnode.addEventListener=function (value){\n\t\t};\n\t\tnode.contains=function (value){\n\t\t\treturn null\n\t\t};\n\t\tnode.removeChild=function (value){\n\t\t};\n\t\treturn node;\n\t}\n\n\tKGMiniAdapter.createShaderCondition=function(conditionScript){\n\t\tvar _$this=this;\n\t\tvar func=function (){\n\t\t\tvar abc=conditionScript;\n\t\t\treturn _$this[conditionScript.replace(\"this.\",\"\")];\n\t\t}\n\t\treturn func;\n\t}\n\n\tKGMiniAdapter.sendAtlasToOpenDataContext=function(url){\n\t\tif(!laya.mi.mini.KGMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(URL.formatURL(url));\n\t\t\tif(atlasJson){\n\t\t\t\tvar textureArr=(atlasJson.meta.image).split(\",\");\n\t\t\t\tif (atlasJson.meta && atlasJson.meta.image){\n\t\t\t\t\tvar toloadPics=atlasJson.meta.image.split(\",\");\n\t\t\t\t\tvar split=url.indexOf(\"/\")>=0 ? \"/\" :\"\\\\\";\n\t\t\t\t\tvar idx=url.lastIndexOf(split);\n\t\t\t\t\tvar folderPath=idx >=0 ? url.substr(0,idx+1):\"\";\n\t\t\t\t\tfor (var i=0,len=toloadPics.length;i < len;i++){\n\t\t\t\t\t\ttoloadPics[i]=folderPath+toloadPics[i];\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\ttoloadPics=[url.replace(\".json\",\".png\")];\n\t\t\t\t}\n\t\t\t\tfor(i=0;i<toloadPics.length;i++){\n\t\t\t\t\tvar tempAtlasPngUrl=toloadPics[i];\n\t\t\t\t\tKGMiniAdapter.postInfoToContext(url,tempAtlasPngUrl,atlasJson);\n\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tKGMiniAdapter.postInfoToContext=function(url,atlaspngUrl,atlasJson){\n\t\tvar postData={\"frames\":atlasJson.frames,\"meta\":atlasJson.meta};\n\t\tvar textureUrl=atlaspngUrl;\n\t\tvar fileObj=MiniFileMgr$2.getFileInfo(URL.formatURL(atlaspngUrl));\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$2.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\tfileNativeUrl=textureUrl;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tvar openDataContext=laya.mi.mini.KGMiniAdapter.window.qg.getOpenDataContext();\n\t\t\topenDataContext.postMessage({url:url,atlasdata:postData,imgNativeUrl:fileNativeUrl,imgReadyUrl:textureUrl,isLoad:\"opendatacontext\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tKGMiniAdapter.sendSinglePicToOpenDataContext=function(url){\n\t\tvar tempTextureUrl=URL.formatURL(url);\n\t\tvar fileObj=MiniFileMgr$2.getFileInfo(tempTextureUrl);\n\t\tif(fileObj){\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\tvar fileNativeUrl=MiniFileMgr$2.getFileNativePath(fileMd5Name);\n\t\t\turl=tempTextureUrl;\n\t\t\t}else{\n\t\t\tfileNativeUrl=url;\n\t\t}\n\t\tif(fileNativeUrl){\n\t\t\tlaya.mi.mini.KGMiniAdapter.window.qg.postMessage({url:url,imgNativeUrl:fileNativeUrl,imgReadyUrl:url,isLoad:\"openJsondatacontextPic\"});\n\t\t\t}else{\n\t\t\tthrow \"获取图集的磁盘url路径不存在！\";\n\t\t}\n\t}\n\n\tKGMiniAdapter.sendJsonDataToDataContext=function(url){\n\t\tif(!laya.mi.mini.KGMiniAdapter.isZiYu){\n\t\t\tvar atlasJson=Loader.getRes(url);\n\t\t\tif(atlasJson){\n\t\t\t\tlaya.mi.mini.KGMiniAdapter.window.qg.postMessage({url:url,atlasdata:atlasJson,isLoad:\"openJsondatacontext\"});\n\t\t\t\t}else{\n\t\t\t\tthrow \"传递的url没有获取到对应的图集数据信息，请确保图集已经过！\";\n\t\t\t}\n\t\t}\n\t}\n\n\tKGMiniAdapter.EnvConfig=null;\n\tKGMiniAdapter.window=null;\n\tKGMiniAdapter._preCreateElement=null;\n\tKGMiniAdapter._inited=false;\n\tKGMiniAdapter.systemInfo={};\n\tKGMiniAdapter.isZiYu=false;\n\tKGMiniAdapter.isPosMsgYu=false;\n\tKGMiniAdapter.autoCacheFile=true;\n\tKGMiniAdapter.minClearSize=(5 *1024 *1024);\n\tKGMiniAdapter.subNativeFiles=null;\n\tKGMiniAdapter.subNativeheads=[];\n\tKGMiniAdapter.subMaps=[];\n\tKGMiniAdapter.AutoCacheDownFile=false;\n\tKGMiniAdapter._measureText=null;\n\tKGMiniAdapter.parseXMLFromString=function(value){\n\t\tvar rst;\n\t\tvar Parser;\n\t\tvalue=value.replace(/>\\s+</g,'><');\n\t\ttry {\n\t\t\t/*__JS__ */rst=(new window.Parser.DOMParser()).parseFromString(value,'text/xml');\n\t\t\t}catch (error){\n\t\t\tthrow \"需要引入xml解析库文件\";\n\t\t}\n\t\treturn rst;\n\t}\n\n\tKGMiniAdapter.idx=1;\n\t__static(KGMiniAdapter,\n\t['nativefiles',function(){return this.nativefiles=[\"layaNativeDir\",\"wxlocal\"];}\n\t]);\n\treturn KGMiniAdapter;\n})()\n\n\n/**@private **/\n//class laya.mi.mini.MiniFileMgr\nvar MiniFileMgr$2=(function(){\n\tfunction MiniFileMgr(){}\n\t__class(MiniFileMgr,'laya.mi.mini.MiniFileMgr',null,'MiniFileMgr$2');\n\tMiniFileMgr.isLocalNativeFile=function(url){\n\t\tfor(var i=0,sz=KGMiniAdapter.nativefiles.length;i<sz;i++){\n\t\t\tif(url.indexOf(KGMiniAdapter.nativefiles[i])!=-1)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniFileMgr.getFileInfo=function(fileUrl){\n\t\tvar fileNativePath=fileUrl;\n\t\tvar fileObj=MiniFileMgr.filesListObj[fileNativePath];\n\t\tif (fileObj==null)\n\t\t\treturn null;\n\t\telse\n\t\treturn fileObj;\n\t\treturn null;\n\t}\n\n\tMiniFileMgr.read=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType){\n\t\t(encoding===void 0)&& (encoding=\"ascill\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\tvar fileUrl;\n\t\tif(readyUrl!=\"\" && (readyUrl.indexOf(\"http://\")!=-1 || readyUrl.indexOf(\"https://\")!=-1)){\n\t\t\tfileUrl=MiniFileMgr.getFileNativePath(filePath)\n\t\t\t}else{\n\t\t\tfileUrl=filePath;\n\t\t}\n\t\tMiniFileMgr.fs.readFile({filePath:fileUrl,encoding:encoding,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data && readyUrl !=\"\")\n\t\t\t\t\tMiniFileMgr.downFiles(readyUrl,encoding,callBack,readyUrl,isSaveFile,fileType);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downFiles=function(fileUrl,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar downloadTask=MiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tif (data.statusCode===200)\n\t\t\t\t\tMiniFileMgr.readFile(data.tempFilePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear);\n\t\t\t\telse\n\t\t\t\tif(data.statusCode===403){\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,fileUrl]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t\tdownloadTask.onProgressUpdate(function(data){\n\t\t\tcallBack !=null && callBack.runWith([2,data.progress]);\n\t\t});\n\t}\n\n\tMiniFileMgr.readFile=function(filePath,encoding,callBack,readyUrl,isSaveFile,fileType,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"ascill\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tMiniFileMgr.fs.readFile({filePath:filePath,encoding:encoding,success:function (data){\n\t\t\t\tif (filePath.indexOf(\"http://\")!=-1 || filePath.indexOf(\"https://\")!=-1){\n\t\t\t\t\tif(KGMiniAdapter.autoCacheFile || isSaveFile){\n\t\t\t\t\t\tMiniFileMgr.copyFile(filePath,readyUrl,callBack,encoding,isAutoClear);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([0,data]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data)\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downOtherFiles=function(fileUrl,callBack,readyUrl,isSaveFile,isAutoClear){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(isSaveFile===void 0)&& (isSaveFile=false);\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tconsole.log(\"====fileUrl:\"+fileUrl);\n\t\tMiniFileMgr.wxdown({url:fileUrl,success:function (data){\n\t\t\t\tconsole.log(\"===downOtherFiles success:\"+JSON.stringify(data));\n\t\t\t\tif (data.statusCode===200){\n\t\t\t\t\tif((KGMiniAdapter.autoCacheFile || isSaveFile)&& readyUrl.indexOf(\"qlogo.cn\")==-1 && readyUrl.indexOf(\".php\")==-1)\n\t\t\t\t\t\tMiniFileMgr.copyFile(data.tempFilePath,readyUrl,callBack,\"\",isAutoClear);\n\t\t\t\t\telse\n\t\t\t\t\tcallBack !=null && callBack.runWith([0,data.tempFilePath]);\n\t\t\t\t\t}else{\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t\t\tconsole.log(\"===downOtherFiles fail data:\"+JSON.stringify(data));\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.downLoadFile=function(fileUrl,fileType,callBack,encoding){\n\t\t(fileType===void 0)&& (fileType=\"\");\n\t\t(encoding===void 0)&& (encoding=\"utf8\");\n\t\tif(((typeof /*__JS__ */getApp=='function'))==false){\n\t\t\tLaya.loader.load(fileUrl,callBack);\n\t\t\t}else{\n\t\t\tif(fileType==/*laya.net.Loader.IMAGE*/\"image\" || fileType==/*laya.net.Loader.SOUND*/\"sound\")\n\t\t\t\tMiniFileMgr.downOtherFiles(fileUrl,callBack,fileUrl,true,false);\n\t\t\telse\n\t\t\tMiniFileMgr.downFiles(fileUrl,encoding,callBack,fileUrl,true,fileType,false);\n\t\t}\n\t}\n\n\tMiniFileMgr.copyFile=function(tempFilePath,readyUrl,callBack,encoding,isAutoClear){\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(isAutoClear===void 0)&& (isAutoClear=true);\n\t\tvar temp=tempFilePath.split(\"/\");\n\t\tvar tempFileName=temp[temp.length-1];\n\t\tvar fileurlkey=readyUrl;\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\tvar totalSize=50 *1024 *1024;\n\t\tvar chaSize=4 *1024 *1024;\n\t\tvar fileUseSize=MiniFileMgr.getCacheUseSize();\n\t\tif (fileObj){\n\t\t\tif (fileObj.readyUrl !=readyUrl){\n\t\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\t\tfilePath:tempFilePath,\n\t\t\t\t\tsuccess:function (data){\n\t\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\t\tif(data.size > KGMiniAdapter.minClearSize)\n\t\t\t\t\t\t\t\tKGMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tMiniFileMgr.deleteFile(tempFilePath,readyUrl,callBack,encoding,data.size);\n\t\t\t\t\t},\n\t\t\t\t\tfail:function (data){\n\t\t\t\t\t\tconsole.log(\"=1==getFileInfo fail data:\"+JSON.stringify(data));\n\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tMiniFileMgr.fs.getFileInfo({\n\t\t\t\tfilePath:tempFilePath,\n\t\t\t\tsuccess:function (data){\n\t\t\t\t\tif((isAutoClear && (fileUseSize+chaSize+data.size)>=totalSize)){\n\t\t\t\t\t\tif(data.size > KGMiniAdapter.minClearSize)\n\t\t\t\t\t\t\tKGMiniAdapter.minClearSize=data.size;\n\t\t\t\t\t\tMiniFileMgr.onClearCacheRes();\n\t\t\t\t\t}\n\t\t\t\t\tconsole.log(\"=====tempFilePath:\"+tempFilePath+\"===saveFilePath:\"+saveFilePath);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFilePath,destPath:saveFilePath,success:function (data2){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,true,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tconsole.log(\"===copyFile fail data:\"+JSON.stringify(data));\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t},\n\t\t\t\tfail:function (data){\n\t\t\t\t\tconsole.log(\"=2==getFileInfo fail data:\"+JSON.stringify(data));\n\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tMiniFileMgr.onClearCacheRes=function(){\n\t\tvar memSize=KGMiniAdapter.minClearSize;\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tMiniFileMgr.sortOn(tempFileListArr,\"times\",16);\n\t\tvar clearSize=0;\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tif(clearSize >=memSize)\n\t\t\t\tbreak ;\n\t\t\tclearSize+=fileObj.size;\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t}\n\n\tMiniFileMgr.sortOn=function(array,name,options){\n\t\t(options===void 0)&& (options=0);\n\t\tif (options==16)return array.sort(function(a,b){return a[name]-b[name];});\n\t\tif (options==(16 | 2))return array.sort(function(a,b){return b[name]-a[name];});\n\t\treturn array.sort(function(a,b){return a[name]-b[name] });\n\t}\n\n\tMiniFileMgr.getFileNativePath=function(fileName){\n\t\treturn laya.mi.mini.MiniFileMgr.fileNativeDir+\"/\"+fileName;\n\t}\n\n\tMiniFileMgr.deleteFile=function(tempFileName,readyUrl,callBack,encoding,fileSize){\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileObj=MiniFileMgr.getFileInfo(readyUrl);\n\t\tvar deleteFileUrl=MiniFileMgr.getFileNativePath(fileObj.md5);\n\t\tMiniFileMgr.fs.unlink({filePath:deleteFileUrl,success:function (data){\n\t\t\t\tvar isAdd=tempFileName !=\"\" ? true :false;\n\t\t\t\tif(tempFileName !=\"\"){\n\t\t\t\t\tvar saveFilePath=MiniFileMgr.getFileNativePath(tempFileName);\n\t\t\t\t\tMiniFileMgr.fs.copyFile({srcPath:tempFileName,destPath:saveFilePath,success:function (data){\n\t\t\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,data.size);\n\t\t\t\t\t\t\t},fail:function (data){\n\t\t\t\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t\t\t\t}});\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr.onSaveFile(readyUrl,tempFileName,isAdd,encoding,callBack,fileSize);\n\t\t\t\t}\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t}\n\n\tMiniFileMgr.deleteAll=function(){\n\t\tvar tempFileListArr=[];\n\t\tfor(var key in MiniFileMgr.filesListObj){\n\t\t\tif(key!=\"fileUsedSize\")\n\t\t\t\ttempFileListArr.push(MiniFileMgr.filesListObj[key]);\n\t\t}\n\t\tfor(var i=1,sz=tempFileListArr.length;i<sz;i++){\n\t\t\tvar fileObj=tempFileListArr[i];\n\t\t\tMiniFileMgr.deleteFile(\"\",fileObj.readyUrl);\n\t\t}\n\t\tif(laya.mi.mini.MiniFileMgr.filesListObj && laya.mi.mini.MiniFileMgr.filesListObj.fileUsedSize){\n\t\t\tlaya.mi.mini.MiniFileMgr.filesListObj.fileUsedSize=0;\n\t\t}\n\t\tlaya.mi.mini.MiniFileMgr.writeFilesList(\"\",JSON.stringify({}),false);\n\t}\n\n\tMiniFileMgr.onSaveFile=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){\n\t\t(isAdd===void 0)&& (isAdd=true);\n\t\t(encoding===void 0)&& (encoding=\"\");\n\t\t(fileSize===void 0)&& (fileSize=0);\n\t\tvar fileurlkey=readyUrl;\n\t\tif(MiniFileMgr.filesListObj['fileUsedSize']==null)\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=0;\n\t\tif(isAdd){\n\t\t\tvar fileNativeName=MiniFileMgr.getFileNativePath(md5Name);\n\t\t\tMiniFileMgr.filesListObj[fileurlkey]={md5:md5Name,readyUrl:readyUrl,size:fileSize,times:Browser.now(),encoding:encoding};\n\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])+fileSize;\n\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),true);\n\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}else{\n\t\t\tif(MiniFileMgr.filesListObj[fileurlkey]){\n\t\t\t\tvar deletefileSize=parseInt(MiniFileMgr.filesListObj[fileurlkey].size);\n\t\t\t\tMiniFileMgr.filesListObj['fileUsedSize']=parseInt(MiniFileMgr.filesListObj['fileUsedSize'])-deletefileSize;\n\t\t\t\tdelete MiniFileMgr.filesListObj[fileurlkey];\n\t\t\t\tMiniFileMgr.writeFilesList(fileurlkey,JSON.stringify(MiniFileMgr.filesListObj),false);\n\t\t\t\tcallBack !=null && callBack.runWith([0]);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniFileMgr.writeFilesList=function(fileurlkey,filesListStr,isAdd){\n\t\tvar listFilesPath=MiniFileMgr.fileNativeDir+\"/\"+MiniFileMgr.fileListName;\n\t\tMiniFileMgr.fs.writeFile({filePath:listFilesPath,encoding:'utf8',data:filesListStr,success:function (data){\n\t\t\t\t},fail:function (data){\n\t\t}});\n\t\tif(!KGMiniAdapter.isZiYu &&KGMiniAdapter.isPosMsgYu){\n\t\t\t/*__JS__ */wx.postMessage({url:fileurlkey,data:MiniFileMgr.filesListObj[fileurlkey],isLoad:\"filenative\",isAdd:isAdd});\n\t\t}\n\t}\n\n\tMiniFileMgr.getCacheUseSize=function(){\n\t\tif(MiniFileMgr.filesListObj && MiniFileMgr.filesListObj['fileUsedSize'])\n\t\t\treturn MiniFileMgr.filesListObj['fileUsedSize'];\n\t\treturn 0;\n\t}\n\n\tMiniFileMgr.existDir=function(dirPath,callBack){\n\t\tMiniFileMgr.fs.mkdir({dirPath:dirPath,success:function (data){\n\t\t\t\tcallBack !=null && callBack.runWith([0,{data:JSON.stringify({})}]);\n\t\t\t\t},fail:function (data){\n\t\t\t\tif (data.errMsg.indexOf(\"file already exists\")!=-1)\n\t\t\t\t\tMiniFileMgr.readSync(MiniFileMgr.fileListName,\"utf8\",callBack);\n\t\t\t\telse\n\t\t\t\tcallBack !=null && callBack.runWith([1,data]);\n\t\t}});\n\t}\n\n\tMiniFileMgr.readSync=function(filePath,encoding,callBack,readyUrl){\n\t\t(encoding===void 0)&& (encoding=\"ascill\");\n\t\t(readyUrl===void 0)&& (readyUrl=\"\");\n\t\tvar fileUrl=MiniFileMgr.getFileNativePath(filePath);\n\t\tvar filesListStr\n\t\ttry{\n\t\t\tfilesListStr=MiniFileMgr.fs.readFileSync(fileUrl,encoding);\n\t\t\tcallBack !=null && callBack.runWith([0,{data:filesListStr}]);\n\t\t}\n\t\tcatch(error){\n\t\t\tcallBack !=null && callBack.runWith([1]);\n\t\t}\n\t}\n\n\tMiniFileMgr.setNativeFileDir=function(value){\n\t\tMiniFileMgr.fileNativeDir=KGMiniAdapter.window.qg.env.USER_DATA_PATH+value;\n\t\tconsole.log(\"fileNativeDir:\"+MiniFileMgr.fileNativeDir);\n\t}\n\n\tMiniFileMgr.filesListObj={};\n\tMiniFileMgr.fileNativeDir=null;\n\tMiniFileMgr.fileListName=\"layaairfiles.txt\";\n\tMiniFileMgr.ziyuFileData={};\n\tMiniFileMgr.ziyuFileTextureData={};\n\tMiniFileMgr.loadPath=\"\";\n\tMiniFileMgr.DESCENDING=2;\n\tMiniFileMgr.NUMERIC=16;\n\t__static(MiniFileMgr,\n\t['fs',function(){return this.fs=KGMiniAdapter.window.qg.getFileSystemManager();},'wxdown',function(){return this.wxdown=KGMiniAdapter.window.qg.downloadFile;}\n\t]);\n\treturn MiniFileMgr;\n})()\n\n\n/**@private **/\n//class laya.mi.mini.MiniImage\nvar MiniImage$2=(function(){\n\tfunction MiniImage(){}\n\t__class(MiniImage,'laya.mi.mini.MiniImage',null,'MiniImage$2');\n\tvar __proto=MiniImage.prototype;\n\t/**@private **/\n\t__proto._loadImage=function(url){\n\t\tvar thisLoader=this;\n\t\tif (KGMiniAdapter.isZiYu){\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\treturn;\n\t\t};\n\t\tvar isTransformUrl=false;\n\t\tif (!MiniFileMgr$2.isLocalNativeFile(url)){\n\t\t\tisTransformUrl=true;\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$2.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$2.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif(!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (KGMiniAdapter.subNativeFiles && KGMiniAdapter.subNativeheads.length==0){\n\t\t\t\tfor (var key in KGMiniAdapter.subNativeFiles){\n\t\t\t\t\tvar tempArr=KGMiniAdapter.subNativeFiles[key];\n\t\t\t\t\tKGMiniAdapter.subNativeheads=KGMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\tKGMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(KGMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\tif(curfileHead && KGMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\tvar newfileHead=KGMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!MiniFileMgr$2.getFileInfo(url)){\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(KGMiniAdapter.isZiYu){\n\t\t\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$2.downOtherFiles(url,new Handler(MiniImage,MiniImage.onDownImgCallBack,[url,thisLoader]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\tMiniImage.onCreateImage(url,thisLoader,true);\n\t\t\t}else {\n\t\t\tMiniImage.onCreateImage(url,thisLoader,!isTransformUrl);\n\t\t}\n\t}\n\n\tMiniImage.onDownImgCallBack=function(sourceUrl,thisLoader,errorCode,tempFilePath){\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tif (!errorCode)\n\t\t\tMiniImage.onCreateImage(sourceUrl,thisLoader,false,tempFilePath);\n\t\telse {\n\t\t\tthisLoader.onError(null);\n\t\t}\n\t}\n\n\tMiniImage.onCreateImage=function(sourceUrl,thisLoader,isLocal,tempFilePath){\n\t\t(isLocal===void 0)&& (isLocal=false);\n\t\t(tempFilePath===void 0)&& (tempFilePath=\"\");\n\t\tvar fileNativeUrl;\n\t\tif(KGMiniAdapter.autoCacheFile){\n\t\t\tif (!isLocal){\n\t\t\t\tif(tempFilePath !=\"\"){\n\t\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\t\t\t}else{\n\t\t\t\t\tvar fileObj=MiniFileMgr$2.getFileInfo(sourceUrl);\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$2.getFileNativePath(fileMd5Name);\n\t\t\t\t}\n\t\t\t}else\n\t\t\tif(KGMiniAdapter.isZiYu){\n\t\t\t\tvar tempUrl=URL.formatURL(sourceUrl);\n\t\t\t\tif(MiniFileMgr$2.ziyuFileTextureData[tempUrl]){\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$2.ziyuFileTextureData[tempUrl];\n\t\t\t\t}else\n\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t}else{\n\t\t\tif(!isLocal)\n\t\t\t\tfileNativeUrl=tempFilePath;\n\t\t\telse\n\t\t\tfileNativeUrl=sourceUrl;\n\t\t}\n\t\tif (thisLoader.imgCache==null)\n\t\t\tthisLoader.imgCache={};\n\t\tvar image;\n\t\tfunction clear (){\n\t\t\timage.onload=null;\n\t\t\timage.onerror=null;\n\t\t\tdelete thisLoader.imgCache[sourceUrl]\n\t\t};\n\t\tvar onload=function (){\n\t\t\tconsole.log(\"====获取磁盘文件 onload ===thisLoader.url:\"+thisLoader.url);\n\t\t\tclear();\n\t\t\tthisLoader.onLoaded(image);\n\t\t};\n\t\tvar onerror=function (e){\n\t\t\tconsole.log(e);\n\t\t\tconsole.log(\"====获取磁盘文件 onerror =====thisLoader.url:\"+thisLoader.url);\n\t\t\tclear();\n\t\t\tthisLoader.event(/*laya.events.Event.ERROR*/\"error\",\"Load image failed\");\n\t\t}\n\t\tif (thisLoader._type==\"nativeimage\"){\n\t\t\timage=new Browser.window.Image();\n\t\t\timage.crossOrigin=\"\";\n\t\t\timage.onload=onload;\n\t\t\timage.onerror=onerror;\n\t\t\timage.src=fileNativeUrl;\n\t\t\tthisLoader.imgCache[sourceUrl]=image;\n\t\t\t}else {\n\t\t\tnew HTMLImage.create(fileNativeUrl,{onload:onload,onerror:onerror,onCreate:function (img){\n\t\t\t\t\timage=img;\n\t\t\t\t\tthisLoader.imgCache[sourceUrl]=img;\n\t\t\t}});\n\t\t}\n\t}\n\n\treturn MiniImage;\n})()\n\n\n/**@private **/\n//class laya.mi.mini.MiniInput\nvar MiniInput$2=(function(){\n\tfunction MiniInput(){}\n\t__class(MiniInput,'laya.mi.mini.MiniInput',null,'MiniInput$2');\n\tMiniInput._createInputElement=function(){\n\t\tInput['_initInput'](Input['area']=Browser.createElement(\"textarea\"));\n\t\tInput['_initInput'](Input['input']=Browser.createElement(\"input\"));\n\t\tInput['inputContainer']=Browser.createElement(\"div\");\n\t\tInput['inputContainer'].style.position=\"absolute\";\n\t\tInput['inputContainer'].style.zIndex=1E5;\n\t\tBrowser.container.appendChild(Input['inputContainer']);\n\t\tInput['inputContainer'].setPos=function (x,y){Input['inputContainer'].style.left=x+'px';Input['inputContainer'].style.top=y+'px';};\n\t\tLaya.stage.on(\"resize\",null,MiniInput._onStageResize);\n\t\tKGMiniAdapter.window.qg.onWindowResize && KGMiniAdapter.window.qg.onWindowResize(function(res){\n\t\t\tKGMiniAdapter.window.dispatchEvent && KGMiniAdapter.window.dispatchEvent(\"resize\");\n\t\t});\n\t\tSoundManager._soundClass=MiniSound$2;\n\t\tSoundManager._musicClass=MiniSound$2;\n\t\tvar model=KGMiniAdapter.systemInfo.model;\n\t\tvar system=KGMiniAdapter.systemInfo.system;\n\t\tif(model && model.indexOf(\"iPhone\")!=-1){\n\t\t\tBrowser.onIPhone=true;\n\t\t\tBrowser.onIOS=true;\n\t\t\tBrowser.onIPad=true;\n\t\t\tBrowser.onAndroid=false;\n\t\t}\n\t\tif(system && (system.indexOf(\"Android\")!=-1 || system.indexOf(\"Adr\")!=-1)){\n\t\t\tBrowser.onAndroid=true;\n\t\t\tBrowser.onIPhone=false;\n\t\t\tBrowser.onIOS=false;\n\t\t\tBrowser.onIPad=false;\n\t\t}\n\t}\n\n\tMiniInput._onStageResize=function(){\n\t\tvar ts=Laya.stage._canvasTransform.identity();\n\t\tts.scale((Browser.width / Render.canvas.width / RunDriver.getPixelRatio()),Browser.height / Render.canvas.height / RunDriver.getPixelRatio());\n\t}\n\n\tMiniInput.wxinputFocus=function(e){\n\t\tdebugger;\n\t\tvar _inputTarget=Input['inputElement'].target;\n\t\tif (_inputTarget && !_inputTarget.editable){\n\t\t\treturn;\n\t\t}\n\t\tKGMiniAdapter.window.qg.offKeyboardConfirm();\n\t\tKGMiniAdapter.window.qg.offKeyboardInput();\n\t\tKGMiniAdapter.window.qg.showKeyboard({defaultValue:_inputTarget.text,maxLength:_inputTarget.maxChars,multiple:_inputTarget.multiline,enterHold:true,enterType:'done',success:function (res){\n\t\t\t\tdebugger;\n\t\t\t\t},fail:function (res){\n\t\t\t\tdebugger;\n\t\t}});\n\t\tKGMiniAdapter.window.qg.onKeyboardConfirm(function(res){\n\t\t\tdebugger;\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (_inputTarget._restrictPattern){\n\t\t\t\tstr=str.replace(/\\u2006|\\x27/g,\"\");\n\t\t\t\tif (_inputTarget._restrictPattern.test(str)){\n\t\t\t\t\tstr=str.replace(_inputTarget._restrictPattern,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t\tlaya.mi.mini.MiniInput.inputEnter();\n\t\t});\n\t\tKGMiniAdapter.window.qg.onKeyboardInput(function(res){\n\t\t\tdebugger;\n\t\t\tvar str=res ? res.value :\"\";\n\t\t\tif (!_inputTarget.multiline){\n\t\t\t\tif (str.indexOf(\"\\n\")!=-1){\n\t\t\t\t\tlaya.mi.mini.MiniInput.inputEnter();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (_inputTarget._restrictPattern){\n\t\t\t\tstr=str.replace(/\\u2006|\\x27/g,\"\");\n\t\t\t\tif (_inputTarget._restrictPattern.test(str)){\n\t\t\t\t\tstr=str.replace(_inputTarget._restrictPattern,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t_inputTarget.text=str;\n\t\t\t_inputTarget.event(/*laya.events.Event.INPUT*/\"input\");\n\t\t});\n\t}\n\n\tMiniInput.inputEnter=function(){\n\t\tInput['inputElement'].target.focus=false;\n\t}\n\n\tMiniInput.wxinputblur=function(){\n\t\tMiniInput.hideKeyboard();\n\t}\n\n\tMiniInput.hideKeyboard=function(){\n\t\tKGMiniAdapter.window.qg.offKeyboardConfirm();\n\t\tKGMiniAdapter.window.qg.offKeyboardInput();\n\t\tKGMiniAdapter.window.qg.hideKeyboard({success:function (res){\n\t\t\t\tdebugger;\n\t\t\t\tconsole.log('隐藏键盘')\n\t\t\t\t},fail:function (res){\n\t\t\t\tconsole.log(\"隐藏键盘出错:\"+(res ? res.errMsg :\"\"));\n\t\t\t\tdebugger;\n\t\t}});\n\t}\n\n\treturn MiniInput;\n})()\n\n\n/**@private **/\n//class laya.mi.mini.MiniLocalStorage\nvar MiniLocalStorage$2=(function(){\n\tfunction MiniLocalStorage(){}\n\t__class(MiniLocalStorage,'laya.mi.mini.MiniLocalStorage',null,'MiniLocalStorage$2');\n\tMiniLocalStorage.__init__=function(){\n\t\tMiniLocalStorage.items=MiniLocalStorage;\n\t}\n\n\tMiniLocalStorage.setItem=function(key,value){\n\t\tKGMiniAdapter.window.qg.setStorageSync(key,value);\n\t}\n\n\tMiniLocalStorage.getItem=function(key){\n\t\treturn KGMiniAdapter.window.qg.getStorageSync(key);\n\t}\n\n\tMiniLocalStorage.setJSON=function(key,value){\n\t\ttry{\n\t\t\tMiniLocalStorage.setItem(key,JSON.stringify(value));\n\t\t}\n\t\tcatch(error){\n\t\t\tMiniLocalStorage.setItem(key,value);\n\t\t}\n\t}\n\n\tMiniLocalStorage.getJSON=function(key){\n\t\tvar tempData=MiniLocalStorage.getItem(key);\n\t\ttry{\n\t\t\treturn JSON.parse(tempData);\n\t\t}\n\t\tcatch(error){\n\t\t\treturn tempData;\n\t\t}\n\t}\n\n\tMiniLocalStorage.removeItem=function(key){\n\t\tKGMiniAdapter.window.qg.removeStorageSync(key);\n\t}\n\n\tMiniLocalStorage.clear=function(){\n\t\tKGMiniAdapter.window.qg.clearStorageSync();\n\t}\n\n\tMiniLocalStorage.getStorageInfoSync=function(){\n\t\ttry {\n\t\t\tvar res=KGMiniAdapter.window.qg.getStorageInfoSync()\n\t\t\tconsole.log(res.keys)\n\t\t\tconsole.log(res.currentSize)\n\t\t\tconsole.log(res.limitSize)\n\t\t\treturn res;\n\t\t}catch (e){}\n\t\treturn null;\n\t}\n\n\tMiniLocalStorage.support=true;\n\tMiniLocalStorage.items=null;\n\treturn MiniLocalStorage;\n})()\n\n\n/**@private **/\n//class laya.mi.mini.MiniLocation\nvar MiniLocation$2=(function(){\n\tfunction MiniLocation(){}\n\t__class(MiniLocation,'laya.mi.mini.MiniLocation',null,'MiniLocation$2');\n\tMiniLocation.__init__=function(){\n\t\tKGMiniAdapter.window.navigator.geolocation.getCurrentPosition=MiniLocation.getCurrentPosition;\n\t\tKGMiniAdapter.window.navigator.geolocation.watchPosition=MiniLocation.watchPosition;\n\t\tKGMiniAdapter.window.navigator.geolocation.clearWatch=MiniLocation.clearWatch;\n\t}\n\n\tMiniLocation.getCurrentPosition=function(success,error,options){\n\t\tvar paramO;\n\t\tparamO={};\n\t\tparamO.success=getSuccess;\n\t\tparamO.fail=error;\n\t\tKGMiniAdapter.window.wx.getLocation(paramO);\n\t\tfunction getSuccess (res){\n\t\t\tif (success !=null){\n\t\t\t\tsuccess(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation.watchPosition=function(success,error,options){\n\t\tMiniLocation._curID++;\n\t\tvar curWatchO;\n\t\tcurWatchO={};\n\t\tcurWatchO.success=success;\n\t\tcurWatchO.error=error;\n\t\tMiniLocation._watchDic[MiniLocation._curID]=curWatchO;\n\t\tLaya.timer.loop(1000,null,MiniLocation._myLoop);\n\t\treturn MiniLocation._curID;\n\t}\n\n\tMiniLocation.clearWatch=function(id){\n\t\tdelete MiniLocation._watchDic[id];\n\t\tif (!MiniLocation._hasWatch()){\n\t\t\tLaya.timer.clear(null,MiniLocation._myLoop);\n\t\t}\n\t}\n\n\tMiniLocation._hasWatch=function(){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key])return true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tMiniLocation._myLoop=function(){\n\t\tMiniLocation.getCurrentPosition(MiniLocation._mySuccess,MiniLocation._myError);\n\t}\n\n\tMiniLocation._mySuccess=function(res){\n\t\tvar rst={};\n\t\trst.coords=res;\n\t\trst.timestamp=Browser.now();\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].success){\n\t\t\t\tMiniLocation._watchDic[key].success(rst);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._myError=function(res){\n\t\tvar key;\n\t\tfor (key in MiniLocation._watchDic){\n\t\t\tif (MiniLocation._watchDic[key].error){\n\t\t\t\tMiniLocation._watchDic[key].error(res);\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLocation._watchDic={};\n\tMiniLocation._curID=0;\n\treturn MiniLocation;\n})()\n\n\n/**@private **/\n//class laya.mi.mini.MiniAccelerator extends laya.events.EventDispatcher\nvar MiniAccelerator$2=(function(_super){\n\tfunction MiniAccelerator(){\n\t\tMiniAccelerator.__super.call(this);\n\t}\n\n\t__class(MiniAccelerator,'laya.mi.mini.MiniAccelerator',_super,'MiniAccelerator$2');\n\tvar __proto=MiniAccelerator.prototype;\n\t/**\n\t*侦听加速器运动。\n\t*@param observer 回调函数接受4个参数，见类说明。\n\t*/\n\t__proto.on=function(type,caller,listener,args){\n\t\t_super.prototype.on.call(this,type,caller,listener,args);\n\t\tMiniAccelerator.startListen(this[\"onDeviceOrientationChange\"]);\n\t\treturn this;\n\t}\n\n\t/**\n\t*取消侦听加速器。\n\t*@param handle 侦听加速器所用处理器。\n\t*/\n\t__proto.off=function(type,caller,listener,onceOnly){\n\t\t(onceOnly===void 0)&& (onceOnly=false);\n\t\tif (!this.hasListener(type))\n\t\t\tMiniAccelerator.stopListen();\n\t\treturn _super.prototype.off.call(this,type,caller,listener,onceOnly);\n\t}\n\n\tMiniAccelerator.__init__=function(){\n\t\ttry{\n\t\t\tvar Acc;\n\t\t\tAcc=/*__JS__ */laya.device.motion.Accelerator;\n\t\t\tif (!Acc)return;\n\t\t\tAcc[\"prototype\"][\"on\"]=MiniAccelerator[\"prototype\"][\"on\"];\n\t\t\tAcc[\"prototype\"][\"off\"]=MiniAccelerator[\"prototype\"][\"off\"];\n\t\t\t}catch (e){\n\t\t}\n\t}\n\n\tMiniAccelerator.startListen=function(callBack){\n\t\tMiniAccelerator._callBack=callBack;\n\t\tif (MiniAccelerator._isListening)return;\n\t\tMiniAccelerator._isListening=true;\n\t\ttry{\n\t\t\tKGMiniAdapter.window.wx.onAccelerometerChange(laya.mi.mini.MiniAccelerator.onAccelerometerChange);\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.stopListen=function(){\n\t\tMiniAccelerator._isListening=false;\n\t\ttry{\n\t\t\tKGMiniAdapter.window.wx.stopAccelerometer({});\n\t\t}catch(e){}\n\t}\n\n\tMiniAccelerator.onAccelerometerChange=function(res){\n\t\tvar e;\n\t\te={};\n\t\te.acceleration=res;\n\t\te.accelerationIncludingGravity=res;\n\t\te.rotationRate={};\n\t\tif (MiniAccelerator._callBack !=null){\n\t\t\tMiniAccelerator._callBack(e);\n\t\t}\n\t}\n\n\tMiniAccelerator._isListening=false;\n\tMiniAccelerator._callBack=null;\n\treturn MiniAccelerator;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.mi.mini.MiniLoader extends laya.events.EventDispatcher\nvar MiniLoader$2=(function(_super){\n\tfunction MiniLoader(){\n\t\tMiniLoader.__super.call(this);\n\t}\n\n\t__class(MiniLoader,'laya.mi.mini.MiniLoader',_super,'MiniLoader$2');\n\tvar __proto=MiniLoader.prototype;\n\t/**\n\t*@private\n\t*@param url\n\t*@param type\n\t*@param cache\n\t*@param group\n\t*@param ignoreCache\n\t*/\n\t__proto.load=function(url,type,cache,group,ignoreCache){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\tvar thisLoader=this;\n\t\tthisLoader._url=url;\n\t\tif (url.indexOf(\"data:image\")===0)thisLoader._type=type=/*laya.net.Loader.IMAGE*/\"image\";\n\t\telse {\n\t\t\tthisLoader._type=type || (type=thisLoader.getTypeFromUrl(url));\n\t\t}\n\t\tthisLoader._cache=cache;\n\t\tthisLoader._data=null;\n\t\tif (!ignoreCache && Loader.loadedMap[URL.formatURL(url)]){\n\t\t\tthisLoader._data=Loader.loadedMap[URL.formatURL(url)];\n\t\t\tthis.event(/*laya.events.Event.PROGRESS*/\"progress\",1);\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\",thisLoader._data);\n\t\t\treturn;\n\t\t}\n\t\tif (Loader.parserMap[type] !=null){\n\t\t\tthisLoader._customParse=true;\n\t\t\tif (((Loader.parserMap[type])instanceof laya.utils.Handler ))Loader.parserMap[type].runWith(this);\n\t\t\telse Loader.parserMap[type].call(null,this);\n\t\t\treturn;\n\t\t};\n\t\tvar encoding=KGMiniAdapter.getUrlEncode(url,type);\n\t\tvar urlType=Utils.getFileExtension(url);\n\t\tif ((MiniLoader._fileTypeArr.indexOf(urlType)!=-1)|| type==/*laya.net.Loader.IMAGE*/\"image\"){\n\t\t\tKGMiniAdapter.EnvConfig.load.call(this,url,type,cache,group,ignoreCache);\n\t\t\t}else {\n\t\t\tif(KGMiniAdapter.isZiYu && !MiniFileMgr$2.ziyuFileData[url]){\n\t\t\t\turl=URL.formatURL(url);\n\t\t\t}\n\t\t\tif(KGMiniAdapter.isZiYu && MiniFileMgr$2.ziyuFileData[url]){\n\t\t\t\tvar tempData=MiniFileMgr$2.ziyuFileData[url];\n\t\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!MiniFileMgr$2.getFileInfo(URL.formatURL(url))){\n\t\t\t\tif (MiniFileMgr$2.isLocalNativeFile(url)){\n\t\t\t\t\tif (KGMiniAdapter.subNativeFiles && KGMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in KGMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=KGMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tKGMiniAdapter.subNativeheads=KGMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tKGMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(KGMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && KGMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=KGMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tMiniFileMgr$2.read(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]));\n\t\t\t\t\treturn;\n\t\t\t\t};\n\t\t\t\tvar tempUrl=url;\n\t\t\t\tvar tempurl=URL.formatURL(url);\n\t\t\t\tif (tempurl.indexOf(KGMiniAdapter.window.qg.env.USER_DATA_PATH)==-1 &&(url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1)&& !KGMiniAdapter.AutoCacheDownFile){\n\t\t\t\t\tKGMiniAdapter.EnvConfig.load.call(thisLoader,tempUrl,type,cache,group,ignoreCache);\n\t\t\t\t\t}else {\n\t\t\t\t\tfileObj=MiniFileMgr$2.getFileInfo(url);\n\t\t\t\t\tif(fileObj){\n\t\t\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\t\t\tMiniFileMgr$2.readFile(fileObj.url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t}else if (thisLoader.type==\"image\" || thisLoader.type==\"htmlimage\"){\n\t\t\t\t\t\tKGMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\turl=URL.formatURL(url);\n\t\t\t\t\t\tif(type !=/*laya.net.Loader.IMAGE*/\"image\" && ((url.indexOf(\"http://\")==-1 && url.indexOf(\"https://\")==-1)|| MiniFileMgr$2.isLocalNativeFile(url))){\n\t\t\t\t\t\t\tMiniFileMgr$2.readFile(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tMiniFileMgr$2.downFiles(url,encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),url,cache);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\tvar fileObj=MiniFileMgr$2.getFileInfo(URL.formatURL(url));\n\t\t\t\tfileObj.encoding=fileObj.encoding==null ? \"utf8\" :fileObj.encoding;\n\t\t\t\tvar nativepath=MiniFileMgr$2.getFileNativePath(fileObj.md5);\n\t\t\t\tMiniFileMgr$2.readFile(nativepath,fileObj.encoding,new Handler(MiniLoader,MiniLoader.onReadNativeCallBack,[encoding,url,type,cache,group,ignoreCache,thisLoader]),URL.formatURL(url));\n\t\t\t}\n\t\t}\n\t}\n\n\tMiniLoader.onReadNativeCallBack=function(encoding,url,type,cache,group,ignoreCache,thisLoader,errorCode,data){\n\t\t(cache===void 0)&& (cache=true);\n\t\t(ignoreCache===void 0)&& (ignoreCache=false);\n\t\t(errorCode===void 0)&& (errorCode=0);\n\t\tif (!errorCode){\n\t\t\tvar tempData;\n\t\t\tif (type==/*laya.net.Loader.JSON*/\"json\" || type==/*laya.net.Loader.ATLAS*/\"atlas\"){\n\t\t\t\ttempData=KGMiniAdapter.getJson(data.data);\n\t\t\t\t}else if (type==/*laya.net.Loader.XML*/\"xml\"){\n\t\t\t\ttempData=Utils.parseXMLFromString(data.data);\n\t\t\t\t}else {\n\t\t\t\ttempData=data.data;\n\t\t\t}\n\t\t\tif(!KGMiniAdapter.isZiYu &&KGMiniAdapter.isPosMsgYu && type !=/*laya.net.Loader.BUFFER*/\"arraybuffer\"){\n\t\t\t\tKGMiniAdapter.window.kg.postMessage({url:url,data:tempData,isLoad:\"filedata\"});\n\t\t\t}\n\t\t\tthisLoader.onLoaded(tempData);\n\t\t\t}else if (errorCode==1){\n\t\t\tKGMiniAdapter.EnvConfig.load.call(thisLoader,url,type,cache,group,ignoreCache);\n\t\t}\n\t}\n\n\t__static(MiniLoader,\n\t['_fileTypeArr',function(){return this._fileTypeArr=['png','jpg','bmp','jpeg','gif'];}\n\t]);\n\treturn MiniLoader;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.mi.mini.MiniSound extends laya.events.EventDispatcher\nvar MiniSound$2=(function(_super){\n\tfunction MiniSound(){\n\t\t/**@private **/\n\t\tthis._sound=null;\n\t\t/**\n\t\t*@private\n\t\t*声音URL\n\t\t*/\n\t\tthis.url=null;\n\t\t/**\n\t\t*@private\n\t\t*是否已加载完成\n\t\t*/\n\t\tthis.loaded=false;\n\t\t/**@private **/\n\t\tthis.readyUrl=null;\n\t\tMiniSound.__super.call(this);\n\t}\n\n\t__class(MiniSound,'laya.mi.mini.MiniSound',_super,'MiniSound$2');\n\tvar __proto=MiniSound.prototype;\n\t/**\n\t*@private\n\t*加载声音。\n\t*@param url 地址。\n\t*\n\t*/\n\t__proto.load=function(url){\n\t\tif (!MiniFileMgr$2.isLocalNativeFile(url)){\n\t\t\turl=URL.formatURL(url);\n\t\t\t}else{\n\t\t\tif (url.indexOf(\"http://\")!=-1 || url.indexOf(\"https://\")!=-1){\n\t\t\t\tif(MiniFileMgr$2.loadPath !=\"\"){\n\t\t\t\t\turl=url.split(MiniFileMgr$2.loadPath)[1];\n\t\t\t\t\t}else{\n\t\t\t\t\tvar tempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.url=url;\n\t\tthis.readyUrl=url;\n\t\tif (MiniSound._audioCache[this.readyUrl]){\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif(KGMiniAdapter.autoCacheFile&&MiniFileMgr$2.getFileInfo(url)){\n\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t}else{\n\t\t\tif(!KGMiniAdapter.autoCacheFile){\n\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t}else{\n\t\t\t\tif (MiniFileMgr$2.isLocalNativeFile(url)){\n\t\t\t\t\ttempStr=URL.rootPath !=\"\" ? URL.rootPath :URL.basePath;\n\t\t\t\t\tvar tempUrl=url;\n\t\t\t\t\tif(tempStr !=\"\")\n\t\t\t\t\t\turl=url.split(tempStr)[1];\n\t\t\t\t\tif (!url){\n\t\t\t\t\t\turl=tempUrl;\n\t\t\t\t\t}\n\t\t\t\t\tif (KGMiniAdapter.subNativeFiles && KGMiniAdapter.subNativeheads.length==0){\n\t\t\t\t\t\tfor (var key in KGMiniAdapter.subNativeFiles){\n\t\t\t\t\t\t\tvar tempArr=KGMiniAdapter.subNativeFiles[key];\n\t\t\t\t\t\t\tKGMiniAdapter.subNativeheads=KGMiniAdapter.subNativeheads.concat(tempArr);\n\t\t\t\t\t\t\tfor (var aa=0;aa < tempArr.length;aa++){\n\t\t\t\t\t\t\t\tKGMiniAdapter.subMaps[tempArr[aa]]=key+\"/\"+tempArr[aa];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(KGMiniAdapter.subNativeFiles && url.indexOf(\"/\")!=-1){\n\t\t\t\t\t\tvar curfileHead=url.split(\"/\")[0]+\"/\";\n\t\t\t\t\t\tif(curfileHead && KGMiniAdapter.subNativeheads.indexOf(curfileHead)!=-1){\n\t\t\t\t\t\t\tvar newfileHead=KGMiniAdapter.subMaps[curfileHead];\n\t\t\t\t\t\t\turl=url.replace(curfileHead,newfileHead);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.onDownLoadCallBack(url,0);\n\t\t\t\t\t}else{\n\t\t\t\t\tMiniFileMgr$2.downOtherFiles(url,Handler.create(this,this.onDownLoadCallBack,[url]),url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onDownLoadCallBack=function(sourceUrl,errorCode){\n\t\tif (!errorCode){\n\t\t\tvar fileNativeUrl;\n\t\t\tif(KGMiniAdapter.autoCacheFile){\n\t\t\t\tvar fileObj=MiniFileMgr$2.getFileInfo(sourceUrl);\n\t\t\t\tif(fileObj && fileObj.md5){\n\t\t\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\t\t\tfileNativeUrl=MiniFileMgr$2.getFileNativePath(fileMd5Name);\n\t\t\t\t\t}else{\n\t\t\t\t\tfileNativeUrl=sourceUrl;\n\t\t\t\t}\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=this.url=fileNativeUrl;\n\t\t\t\t}else{\n\t\t\t\tthis._sound=MiniSound._createSound();\n\t\t\t\tthis._sound.src=sourceUrl;\n\t\t\t}\n\t\t\tthis._sound.oncanplay(MiniSound.bindToThis(this.onCanPlay,this));\n\t\t\tthis._sound.onerror(MiniSound.bindToThis(this.onError,this));\n\t\t\t}else{\n\t\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\t}\n\t}\n\n\t/**@private **/\n\t__proto.onError=function(error){\n\t\tthis.event(/*laya.events.Event.ERROR*/\"error\");\n\t\tthis._sound.offerror && (this._sound.offerror(null));\n\t}\n\n\t/**@private **/\n\t__proto.onCanPlay=function(){\n\t\tthis.loaded=true;\n\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\tthis._sound.offcanplay && (this._sound.offcanplay(null));\n\t}\n\n\t/**\n\t*@private\n\t*播放声音。\n\t*@param startTime 开始时间,单位秒\n\t*@param loops 循环次数,0表示一直循环\n\t*@return 声道 SoundChannel 对象。\n\t*\n\t*/\n\t__proto.play=function(startTime,loops){\n\t\t(startTime===void 0)&& (startTime=0);\n\t\t(loops===void 0)&& (loops=0);\n\t\tvar tSound;\n\t\tif (this.url==SoundManager._tMusic){\n\t\t\tif (!MiniSound._musicAudio)MiniSound._musicAudio=MiniSound._createSound();\n\t\t\ttSound=MiniSound._musicAudio;\n\t\t\t}else {\n\t\t\tif(MiniSound._audioCache[this.readyUrl]){\n\t\t\t\ttSound=MiniSound._audioCache[this.readyUrl]._sound;\n\t\t\t\t}else{\n\t\t\t\ttSound=MiniSound._createSound();\n\t\t\t}\n\t\t}\n\t\tif(!tSound)\n\t\t\treturn null;\n\t\tif(KGMiniAdapter.autoCacheFile&&MiniFileMgr$2.getFileInfo(this.url)){\n\t\t\tvar fileNativeUrl;\n\t\t\tvar fileObj=MiniFileMgr$2.getFileInfo(this.url);\n\t\t\tvar fileMd5Name=fileObj.md5;\n\t\t\ttSound.src=this.url=MiniFileMgr$2.getFileNativePath(fileMd5Name);\n\t\t\t}else{\n\t\t\ttSound.src=this.url;\n\t\t};\n\t\tvar channel=new MiniSoundChannel$2(tSound,this);\n\t\tchannel.url=this.url;\n\t\tchannel.loops=loops;\n\t\tchannel.loop=(loops===0 ? true :false);\n\t\tchannel.startTime=startTime;\n\t\tchannel.play();\n\t\tSoundManager.addChannel(channel);\n\t\treturn channel;\n\t}\n\n\t/**\n\t*@private\n\t*释放声音资源。\n\t*\n\t*/\n\t__proto.dispose=function(){\n\t\tvar ad=MiniSound._audioCache[this.readyUrl];\n\t\tif (ad){\n\t\t\tad.src=\"\";\n\t\t\tif(ad._sound){\n\t\t\t\tad._sound.destroy && ad._sound.destroy();\n\t\t\t\tad._sound=null;\n\t\t\t\tad=null;\n\t\t\t}\n\t\t\tdelete MiniSound._audioCache[this.readyUrl];\n\t\t}\n\t}\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\treturn this._sound.duration;\n\t});\n\n\tMiniSound._createSound=function(){\n\t\tMiniSound._id++;\n\t\treturn KGMiniAdapter.window.qg.createInnerAudioContext();\n\t}\n\n\tMiniSound.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\tMiniSound._musicAudio=null;\n\tMiniSound._id=0;\n\tMiniSound._audioCache={};\n\treturn MiniSound;\n})(EventDispatcher)\n\n\n/**@private **/\n//class laya.mi.mini.MiniSoundChannel extends laya.media.SoundChannel\nvar MiniSoundChannel$2=(function(_super){\n\tfunction MiniSoundChannel(audio,miniSound){\n\t\t/**@private **/\n\t\tthis._audio=null;\n\t\t/**@private **/\n\t\tthis._onEnd=null;\n\t\t/**@private **/\n\t\tthis._miniSound=null;\n\t\tMiniSoundChannel.__super.call(this);\n\t\tthis._audio=audio;\n\t\tthis._miniSound=miniSound;\n\t\tthis._onEnd=MiniSoundChannel.bindToThis(this.__onEnd,this);\n\t\taudio.onended(this._onEnd);\n\t}\n\n\t__class(MiniSoundChannel,'laya.mi.mini.MiniSoundChannel',_super,'MiniSoundChannel$2');\n\tvar __proto=MiniSoundChannel.prototype;\n\t/**@private **/\n\t__proto.__onEnd=function(){\n\t\tMiniSound$2._audioCache[this.url]=this._miniSound;\n\t\tif (this.loops==1){\n\t\t\tif (this.completeHandler){\n\t\t\t\tLaya.timer.once(10,this,this.__runComplete,[this.completeHandler],false);\n\t\t\t\tthis.completeHandler=null;\n\t\t\t}\n\t\t\tthis.stop();\n\t\t\tthis.event(/*laya.events.Event.COMPLETE*/\"complete\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.loops > 0){\n\t\t\tthis.loops--;\n\t\t}\n\t\tthis.startTime=0;\n\t\tthis.play();\n\t}\n\n\t/**\n\t*@private\n\t*播放\n\t*/\n\t__proto.play=function(){\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*@private\n\t*停止播放\n\t*\n\t*/\n\t__proto.stop=function(){\n\t\tthis.isStopped=true;\n\t\tSoundManager.removeChannel(this);\n\t\tthis.completeHandler=null;\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis._audio.stop();\n\t\tthis._audio.offended && this._audio.offended(null);\n\t\tthis._miniSound.dispose();\n\t\tthis._audio=null;\n\t\tthis._miniSound=null;\n\t\tthis._onEnd=null;\n\t}\n\n\t/**@private **/\n\t__proto.pause=function(){\n\t\tthis.isStopped=true;\n\t\tthis._audio.pause();\n\t}\n\n\t/**@private **/\n\t__proto.resume=function(){\n\t\tif (!this._audio)\n\t\t\treturn;\n\t\tthis.isStopped=false;\n\t\tSoundManager.addChannel(this);\n\t\tthis._audio.play();\n\t}\n\n\t/**\n\t*设置开始时间\n\t*@param time\n\t*/\n\t__getset(0,__proto,'startTime',null,function(time){\n\t\tif(this._audio){\n\t\t\tthis._audio.startTime=time;\n\t\t}\n\t});\n\n\t/**@private **/\n\t/**\n\t*@private\n\t*自动播放\n\t*@param value\n\t*/\n\t__getset(0,__proto,'autoplay',function(){\n\t\treturn this._audio.autoplay;\n\t\t},function(value){\n\t\tthis._audio.autoplay=value;\n\t});\n\n\t/**\n\t*@private\n\t*当前播放到的位置\n\t*@return\n\t*\n\t*/\n\t__getset(0,__proto,'position',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.currentTime;\n\t});\n\n\t/**\n\t*@private\n\t*获取总时间。\n\t*/\n\t__getset(0,__proto,'duration',function(){\n\t\tif (!this._audio)\n\t\t\treturn 0;\n\t\treturn this._audio.duration;\n\t});\n\n\t/**@private **/\n\t/**@private **/\n\t__getset(0,__proto,'loop',function(){\n\t\treturn this._audio.loop;\n\t\t},function(value){\n\t\tthis._audio.loop=value;\n\t});\n\n\t/**\n\t*@private\n\t*设置音量\n\t*@param v\n\t*\n\t*/\n\t/**\n\t*@private\n\t*获取音量\n\t*@return\n\t*/\n\t__getset(0,__proto,'volume',function(){\n\t\tif (!this._audio)return 1;\n\t\treturn this._audio.volume;\n\t\t},function(v){\n\t\tif (!this._audio)return;\n\t\tthis._audio.volume=v;\n\t});\n\n\tMiniSoundChannel.bindToThis=function(fun,scope){\n\t\tvar rst=fun;\n\t\t/*__JS__ */rst=fun.bind(scope);;\n\t\treturn rst;\n\t}\n\n\treturn MiniSoundChannel;\n})(SoundChannel)\n\n\n\n})(window,document,Laya);\n\nif (typeof define === 'function' && define.amd){\n\tdefine('laya.core', ['require', \"exports\"], function(require, exports) {\n        'use strict';\n        Object.defineProperty(exports, '__esModule', { value: true });\n        for (var i in Laya) {\n\t\t\tvar o = Laya[i];\n            o && o.__isclass && (exports[i] = o);\n        }\n    });\n}"
  },
  {
    "path": "public/libs/laya/matter-RenderLaya.js",
    "content": "var Browser = laya.utils.Browser;\n\nvar Composite = Matter.Composite;\nvar Events = Matter.Events;\nvar Bounds = Matter.Bounds;\nvar Common = Matter.Common;\nvar Vertices = Matter.Vertices;\nvar Vector = Matter.Vector;\nvar Sleeping = Matter.Sleeping;\nvar Axes = Matter.Axes;\nvar Body = Matter.Body;\nvar SAT = Matter.SAT;\nvar Contact = Matter.Contact;\nvar Pair = Matter.Pair;\nvar Detector = Matter.Detector;\nvar Grid = Matter.Grid;\n\nvar LayaRender = {};\n\n(function()\n{\n    var graphics,\n        spriteCon,\n        graphicsCon;\n\n    LayaRender.create = function(options)\n    {\n        var defaults = {\n            controller: LayaRender,\n            element: null,\n            canvas: null,\n            mouse: null,\n            options:\n            {\n                width: 800,\n                height: 600,\n                pixelRatio: 1,\n                background: '#fafafa',\n                wireframeBackground: '#222',\n                hasBounds: !!options.bounds,\n                enabled: true,\n                wireframes: true,\n                showSleeping: true,\n                showDebug: false,\n                showBroadphase: false,\n                showBounds: false,\n                showVelocity: false,\n                showCollisions: false,\n                showSeparations: false,\n                showAxes: false,\n                showPositions: false,\n                showAngleIndicator: false,\n                showIds: false,\n                showShadows: false,\n                showVertexNumbers: false,\n                showConvexHulls: false,\n                showInternalEdges: false,\n                showMousePosition: false\n            }\n        };\n\n        var render = Common.extend(defaults, options);\n\n        render.canvas = laya.renders.Render.canvas;\n        render.context = laya.renders.Render.context.ctx;\n\n        render.textures = {};\n\n        render.bounds = render.bounds ||\n        {\n            min:\n            {\n                x: 0,\n                y: 0\n            },\n            max:\n            {\n                x: Laya.stage.width,\n                y: Laya.stage.height\n            }\n        };\n\n        createContainer(render);\n        setBackground(render);\n        setPixelRatio();\n\n        return render;\n    };\n\n    function createContainer(render)\n    {\n        var con = render.container;\n\n        spriteCon = new Laya.Sprite();\n        graphicsCon = new Laya.Sprite();\n\n        render.spriteContainer = spriteCon;\n        render.graphicsContainer = graphicsCon;\n\n        con.addChild(spriteCon);\n        con.addChild(graphicsCon);\n\n        graphics = graphicsCon.graphics;\n    }\n\n    // 设置背景\n    function setBackground(render)\n    {\n        var bg = render.options.background;\n        //  纯色背景\n        if (bg.length == 7 && bg[0] == '#')\n        {\n            spriteCon.graphics.drawRect(\n                0, 0,\n                render.options.width, render.options.height,\n                bg);\n        }\n        // 图片背景\n        else\n        {\n            spriteCon.loadImage(bg);\n        }\n    }\n\n    function setPixelRatio()\n    {\n        var pixelRatio;\n\t\tpixelRatio = 1;\n        Laya.Render.canvas.setAttribute('data-pixel-ratio', pixelRatio);\n    }\n\n    /**\n     * Renders the given `engine`'s `Matter.World` object.\n     * This is the entry point for all rendering and should be called every time the scene changes.\n     * @method world\n     * @param {engine} engine\n     */\n    LayaRender.world = function(engine)\n    {\n        var render = engine.render,\n            world = engine.world,\n            options = render.options,\n            allConstraints = Composite.allConstraints(world),\n            bodies = Composite.allBodies(world),\n            constraints = [],\n            i;\n\n        // handle bounds\n        if (options.hasBounds)\n        {\n            var boundsWidth = render.bounds.max.x - render.bounds.min.x,\n                boundsHeight = render.bounds.max.y - render.bounds.min.y,\n                boundsScaleX = boundsWidth / options.width,\n                boundsScaleY = boundsHeight / options.height;\n\n            // filter out bodies that are not in view\n            for (i = 0; i < bodies.length; i++)\n            {\n                var body = bodies[i];\n                body.render.sprite.visible = Bounds.overlaps(body.bounds, render.bounds);\n            }\n\n            // filter out constraints that are not in view\n            for (i = 0; i < allConstraints.length; i++)\n            {\n                var constraint = allConstraints[i],\n                    bodyA = constraint.bodyA,\n                    bodyB = constraint.bodyB,\n                    pointAWorld = constraint.pointA,\n                    pointBWorld = constraint.pointB;\n\n                if (bodyA) pointAWorld = Vector.add(bodyA.position, constraint.pointA);\n                if (bodyB) pointBWorld = Vector.add(bodyB.position, constraint.pointB);\n\n                if (!pointAWorld || !pointBWorld)\n                    continue;\n\n                if (Bounds.contains(render.bounds, pointAWorld) || Bounds.contains(render.bounds, pointBWorld))\n                    constraints.push(constraint);\n            }\n\n            // transform the view\n            // context.scale(1 / boundsScaleX, 1 / boundsScaleY);\n            // context.translate(-render.bounds.min.x, -render.bounds.min.y);\n        }\n        else\n        {\n            constraints = allConstraints;\n        }\n\n        graphics.clear();\n        for (i = 0; i < bodies.length; i++)\n            LayaRender.body(engine, bodies[i]);\n\n        for (i = 0; i < constraints.length; i++)\n            LayaRender.constraint(engine, constraints[i]);\n    };\n    LayaRender.body = function(engine, body)\n    {\n        var render = engine.render,\n            bodyRender = body.render;\n\n        if (!bodyRender.visible)\n        {\n            return;\n        }\n\n        var spInfo = bodyRender.sprite;\n        var sp = body.sprite;\n        if (bodyRender.sprite && bodyRender.sprite.texture)\n        {\n            // initialize body sprite if not existing\n            if (!sp)\n            {\n                sp = body.sprite = createBodySprite(spInfo.xOffset, spInfo.yOffset);\n                sp.loadImage(spInfo.texture);\n            }\n\n            sp.scale(spInfo.xScale, spInfo.yScale);\n            sp.pos(body.position.x, body.position.y);\n            sp.rotation = body.angle * 180 / Math.PI;\n        }\n        else\n        {\n            var options = render.options;\n            // handle compound parts\n            for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++)\n            {\n                part = body.parts[k];\n\n                if (!part.render.visible)\n                    continue;\n\n                var fillStyle = options.wireframes ? null : part.render.fillStyle;\n                var lineWidth = part.render.lineWidth;\n                var strokeStyle = part.render.strokeStyle;\n                // part polygon\n                if (part.circleRadius)\n                {\n                    graphics.drawCircle(part.position.x, part.position.y, part.circleRadius, fillStyle, strokeStyle, lineWidth);\n                }\n                else\n                {\n                    var path = [];\n                    path.push(part.vertices[0].x, part.vertices[0].y);\n\n                    for (var j = 1; j < part.vertices.length; j++)\n                    {\n                        if (!part.vertices[j - 1].isInternal || showInternalEdges)\n                        {\n                            path.push(part.vertices[j].x, part.vertices[j].y);\n                        }\n                        else\n                        {\n                            path.push(part.vertices[j].x, part.vertices[j].y);\n                        }\n\n                        if (part.vertices[j].isInternal && !showInternalEdges)\n                        {\n                            path.push(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y);\n                        }\n                    }\n\n                    graphics.drawPoly(0, 0, path, fillStyle, strokeStyle, lineWidth);\n                }\n            }\n        }\n    };\n\n    LayaRender.constraint = function(engine, constraint)\n    {\n        var sx, sy, ex, ey;\n        if (!constraint.render.visible || !constraint.pointA || !constraint.pointB)\n        {\n            return;\n        }\n\n        var bodyA = constraint.bodyA,\n            bodyB = constraint.bodyB;\n\n        if (bodyA)\n        {\n            sx = bodyA.position.x + constraint.pointA.x;\n            sy = bodyA.position.y + constraint.pointA.y;\n        }\n        else\n        {\n            sx = constraint.pointA.x;\n            sy = constraint.pointA.y;\n        }\n\n        if (bodyB)\n        {\n            ex = bodyB.position.x + constraint.pointB.x;\n            ey = bodyB.position.y + constraint.pointB.y;\n        }\n        else\n        {\n            ex = constraint.pointB.x;\n            ey = constraint.pointB.y;\n        }\n\n        graphics.drawLine(\n            sx, sy, ex, ey,\n            constraint.render.strokeStyle,\n            constraint.render.lineWidth);\n    };\n\n    function createBodySprite(xOffset, yOffset)\n    {\n        var sp = new Laya.Sprite();\n\n        sp.pivot(xOffset, yOffset);\n        sp.pos(-9999, -9999);\n        spriteCon.addChild(sp);\n\n        return sp;\n    }\n})();"
  },
  {
    "path": "public/libs/laya/matter.js",
    "content": "/**\n* matter-js 0.10.0 by @liabru 2016-05-01\n* http://brm.io/matter-js/\n* License MIT\n*/\n\n/**\n * The MIT License (MIT)\n * \n * Copyright (c) 2014 Liam Brummitt\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.Matter = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n/**\n* The `Matter.Body` module contains methods for creating and manipulating body models.\n* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.\n* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n\n* @class Body\n*/\n\nvar Body = {};\n\nmodule.exports = Body;\n\nvar Vertices = require('../geometry/Vertices');\nvar Vector = require('../geometry/Vector');\nvar Sleeping = require('../core/Sleeping');\nvar Render = require('../render/Render');\nvar Common = require('../core/Common');\nvar Bounds = require('../geometry/Bounds');\nvar Axes = require('../geometry/Axes');\n\n(function() {\n\n    Body._inertiaScale = 4;\n    Body._nextCollidingGroupId = 1;\n    Body._nextNonCollidingGroupId = -1;\n    Body._nextCategory = 0x0001;\n\n    /**\n     * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults.\n     * All properties have default values, and many are pre-calculated automatically based on other properties.\n     * See the properties section below for detailed information on what you can pass via the `options` object.\n     * @method create\n     * @param {} options\n     * @return {body} body\n     */\n    Body.create = function(options) {\n        var defaults = {\n            id: Common.nextId(),\n            type: 'body',\n            label: 'Body',\n            parts: [],\n            angle: 0,\n            vertices: Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'),\n            position: { x: 0, y: 0 },\n            force: { x: 0, y: 0 },\n            torque: 0,\n            positionImpulse: { x: 0, y: 0 },\n            constraintImpulse: { x: 0, y: 0, angle: 0 },\n            totalContacts: 0,\n            speed: 0,\n            angularSpeed: 0,\n            velocity: { x: 0, y: 0 },\n            angularVelocity: 0,\n            isSensor: false,\n            isStatic: false,\n            isSleeping: false,\n            motion: 0,\n            sleepThreshold: 60,\n            density: 0.001,\n            restitution: 0,\n            friction: 0.1,\n            frictionStatic: 0.5,\n            frictionAir: 0.01,\n            collisionFilter: {\n                category: 0x0001,\n                mask: 0xFFFFFFFF,\n                group: 0\n            },\n            slop: 0.05,\n            timeScale: 1,\n            render: {\n                visible: true,\n                opacity: 1,\n                sprite: {\n                    xScale: 1,\n                    yScale: 1,\n                    xOffset: 0,\n                    yOffset: 0\n                },\n                lineWidth: 1.5\n            }\n        };\n\n        var body = Common.extend(defaults, options);\n\n        _initProperties(body, options);\n\n        return body;\n    };\n\n    /**\n     * Returns the next unique group index for which bodies will collide.\n     * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide.\n     * See `body.collisionFilter` for more information.\n     * @method nextGroup\n     * @param {bool} [isNonColliding=false]\n     * @return {Number} Unique group index\n     */\n    Body.nextGroup = function(isNonColliding) {\n        if (isNonColliding)\n            return Body._nextNonCollidingGroupId--;\n\n        return Body._nextCollidingGroupId++;\n    };\n\n    /**\n     * Returns the next unique category bitfield (starting after the initial default category `0x0001`).\n     * There are 32 available. See `body.collisionFilter` for more information.\n     * @method nextCategory\n     * @return {Number} Unique category bitfield\n     */\n    Body.nextCategory = function() {\n        Body._nextCategory = Body._nextCategory << 1;\n        return Body._nextCategory;\n    };\n\n    /**\n     * Initialises body properties.\n     * @method _initProperties\n     * @private\n     * @param {body} body\n     * @param {} options\n     */\n    var _initProperties = function(body, options) {\n        // init required properties (order is important)\n        Body.set(body, {\n            bounds: body.bounds || Bounds.create(body.vertices),\n            positionPrev: body.positionPrev || Vector.clone(body.position),\n            anglePrev: body.anglePrev || body.angle,\n            vertices: body.vertices,\n            parts: body.parts || [body],\n            isStatic: body.isStatic,\n            isSleeping: body.isSleeping,\n            parent: body.parent || body\n        });\n\n        Vertices.rotate(body.vertices, body.angle, body.position);\n        Axes.rotate(body.axes, body.angle);\n        Bounds.update(body.bounds, body.vertices, body.velocity);\n\n        // allow options to override the automatically calculated properties\n        Body.set(body, {\n            axes: options.axes || body.axes,\n            area: options.area || body.area,\n            mass: options.mass || body.mass,\n            inertia: options.inertia || body.inertia\n        });\n\n        // render properties\n        var defaultFillStyle = (body.isStatic ? '#eeeeee' : Common.choose(['#556270', '#4ECDC4', '#C7F464', '#FF6B6B', '#C44D58'])),\n            defaultStrokeStyle = Common.shadeColor(defaultFillStyle, -20);\n        body.render.fillStyle = body.render.fillStyle || defaultFillStyle;\n        body.render.strokeStyle = body.render.strokeStyle || defaultStrokeStyle;\n        body.render.sprite.xOffset += -(body.bounds.min.x - body.position.x) / (body.bounds.max.x - body.bounds.min.x);\n        body.render.sprite.yOffset += -(body.bounds.min.y - body.position.y) / (body.bounds.max.y - body.bounds.min.y);\n    };\n\n    /**\n     * Given a property and a value (or map of), sets the property(s) on the body, using the appropriate setter functions if they exist.\n     * Prefer to use the actual setter functions in performance critical situations.\n     * @method set\n     * @param {body} body\n     * @param {} settings A property name (or map of properties and values) to set on the body.\n     * @param {} value The value to set if `settings` is a single property name.\n     */\n    Body.set = function(body, settings, value) {\n        var property;\n\n        if (typeof settings === 'string') {\n            property = settings;\n            settings = {};\n            settings[property] = value;\n        }\n\n        for (property in settings) {\n            value = settings[property];\n\n            if (!settings.hasOwnProperty(property))\n                continue;\n\n            switch (property) {\n\n            case 'isStatic':\n                Body.setStatic(body, value);\n                break;\n            case 'isSleeping':\n                Sleeping.set(body, value);\n                break;\n            case 'mass':\n                Body.setMass(body, value);\n                break;\n            case 'density':\n                Body.setDensity(body, value);\n                break;\n            case 'inertia':\n                Body.setInertia(body, value);\n                break;\n            case 'vertices':\n                Body.setVertices(body, value);\n                break;\n            case 'position':\n                Body.setPosition(body, value);\n                break;\n            case 'angle':\n                Body.setAngle(body, value);\n                break;\n            case 'velocity':\n                Body.setVelocity(body, value);\n                break;\n            case 'angularVelocity':\n                Body.setAngularVelocity(body, value);\n                break;\n            case 'parts':\n                Body.setParts(body, value);\n                break;\n            default:\n                body[property] = value;\n\n            }\n        }\n    };\n\n    /**\n     * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity.\n     * @method setStatic\n     * @param {body} body\n     * @param {bool} isStatic\n     */\n    Body.setStatic = function(body, isStatic) {\n        for (var i = 0; i < body.parts.length; i++) {\n            var part = body.parts[i];\n            part.isStatic = isStatic;\n\n            if (isStatic) {\n                part.restitution = 0;\n                part.friction = 1;\n                part.mass = part.inertia = part.density = Infinity;\n                part.inverseMass = part.inverseInertia = 0;\n\n                part.positionPrev.x = part.position.x;\n                part.positionPrev.y = part.position.y;\n                part.anglePrev = part.angle;\n                part.angularVelocity = 0;\n                part.speed = 0;\n                part.angularSpeed = 0;\n                part.motion = 0;\n            }\n        }\n    };\n\n    /**\n     * Sets the mass of the body. Inverse mass and density are automatically updated to reflect the change.\n     * @method setMass\n     * @param {body} body\n     * @param {number} mass\n     */\n    Body.setMass = function(body, mass) {\n        body.mass = mass;\n        body.inverseMass = 1 / body.mass;\n        body.density = body.mass / body.area;\n    };\n\n    /**\n     * Sets the density of the body. Mass is automatically updated to reflect the change.\n     * @method setDensity\n     * @param {body} body\n     * @param {number} density\n     */\n    Body.setDensity = function(body, density) {\n        Body.setMass(body, density * body.area);\n        body.density = density;\n    };\n\n    /**\n     * Sets the moment of inertia (i.e. second moment of area) of the body of the body. \n     * Inverse inertia is automatically updated to reflect the change. Mass is not changed.\n     * @method setInertia\n     * @param {body} body\n     * @param {number} inertia\n     */\n    Body.setInertia = function(body, inertia) {\n        body.inertia = inertia;\n        body.inverseInertia = 1 / body.inertia;\n    };\n\n    /**\n     * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`).\n     * Vertices will be automatically transformed to be orientated around their centre of mass as the origin.\n     * They are then automatically translated to world space based on `body.position`.\n     *\n     * The `vertices` argument should be passed as an array of `Matter.Vector` points (or a `Matter.Vertices` array).\n     * Vertices must form a convex hull, concave hulls are not supported.\n     *\n     * @method setVertices\n     * @param {body} body\n     * @param {vector[]} vertices\n     */\n    Body.setVertices = function(body, vertices) {\n        // change vertices\n        if (vertices[0].body === body) {\n            body.vertices = vertices;\n        } else {\n            body.vertices = Vertices.create(vertices, body);\n        }\n\n        // update properties\n        body.axes = Axes.fromVertices(body.vertices);\n        body.area = Vertices.area(body.vertices);\n        Body.setMass(body, body.density * body.area);\n\n        // orient vertices around the centre of mass at origin (0, 0)\n        var centre = Vertices.centre(body.vertices);\n        Vertices.translate(body.vertices, centre, -1);\n\n        // update inertia while vertices are at origin (0, 0)\n        Body.setInertia(body, Body._inertiaScale * Vertices.inertia(body.vertices, body.mass));\n\n        // update geometry\n        Vertices.translate(body.vertices, body.position);\n        Bounds.update(body.bounds, body.vertices, body.velocity);\n    };\n\n    /**\n     * Sets the parts of the `body` and updates mass, inertia and centroid.\n     * Each part will have its parent set to `body`.\n     * By default the convex hull will be automatically computed and set on `body`, unless `autoHull` is set to `false.`\n     * Note that this method will ensure that the first part in `body.parts` will always be the `body`.\n     * @method setParts\n     * @param {body} body\n     * @param [body] parts\n     * @param {bool} [autoHull=true]\n     */\n    Body.setParts = function(body, parts, autoHull) {\n        var i;\n\n        // add all the parts, ensuring that the first part is always the parent body\n        parts = parts.slice(0);\n        body.parts.length = 0;\n        body.parts.push(body);\n        body.parent = body;\n\n        for (i = 0; i < parts.length; i++) {\n            var part = parts[i];\n            if (part !== body) {\n                part.parent = body;\n                body.parts.push(part);\n            }\n        }\n\n        if (body.parts.length === 1)\n            return;\n\n        autoHull = typeof autoHull !== 'undefined' ? autoHull : true;\n\n        // find the convex hull of all parts to set on the parent body\n        if (autoHull) {\n            var vertices = [];\n            for (i = 0; i < parts.length; i++) {\n                vertices = vertices.concat(parts[i].vertices);\n            }\n\n            Vertices.clockwiseSort(vertices);\n\n            var hull = Vertices.hull(vertices),\n                hullCentre = Vertices.centre(hull);\n\n            Body.setVertices(body, hull);\n            Vertices.translate(body.vertices, hullCentre);\n        }\n\n        // sum the properties of all compound parts of the parent body\n        var total = _totalProperties(body);\n\n        body.area = total.area;\n        body.parent = body;\n        body.position.x = total.centre.x;\n        body.position.y = total.centre.y;\n        body.positionPrev.x = total.centre.x;\n        body.positionPrev.y = total.centre.y;\n\n        Body.setMass(body, total.mass);\n        Body.setInertia(body, total.inertia);\n        Body.setPosition(body, total.centre);\n    };\n\n    /**\n     * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged.\n     * @method setPosition\n     * @param {body} body\n     * @param {vector} position\n     */\n    Body.setPosition = function(body, position) {\n        var delta = Vector.sub(position, body.position);\n        body.positionPrev.x += delta.x;\n        body.positionPrev.y += delta.y;\n\n        for (var i = 0; i < body.parts.length; i++) {\n            var part = body.parts[i];\n            part.position.x += delta.x;\n            part.position.y += delta.y;\n            Vertices.translate(part.vertices, delta);\n            Bounds.update(part.bounds, part.vertices, body.velocity);\n        }\n    };\n\n    /**\n     * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged.\n     * @method setAngle\n     * @param {body} body\n     * @param {number} angle\n     */\n    Body.setAngle = function(body, angle) {\n        var delta = angle - body.angle;\n        body.anglePrev += delta;\n\n        for (var i = 0; i < body.parts.length; i++) {\n            var part = body.parts[i];\n            part.angle += delta;\n            Vertices.rotate(part.vertices, delta, body.position);\n            Axes.rotate(part.axes, delta);\n            Bounds.update(part.bounds, part.vertices, body.velocity);\n            if (i > 0) {\n                Vector.rotateAbout(part.position, delta, body.position, part.position);\n            }\n        }\n    };\n\n    /**\n     * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`.\n     * @method setVelocity\n     * @param {body} body\n     * @param {vector} velocity\n     */\n    Body.setVelocity = function(body, velocity) {\n        body.positionPrev.x = body.position.x - velocity.x;\n        body.positionPrev.y = body.position.y - velocity.y;\n        body.velocity.x = velocity.x;\n        body.velocity.y = velocity.y;\n        body.speed = Vector.magnitude(body.velocity);\n    };\n\n    /**\n     * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`.\n     * @method setAngularVelocity\n     * @param {body} body\n     * @param {number} velocity\n     */\n    Body.setAngularVelocity = function(body, velocity) {\n        body.anglePrev = body.angle - velocity;\n        body.angularVelocity = velocity;\n        body.angularSpeed = Math.abs(body.angularVelocity);\n    };\n\n    /**\n     * Moves a body by a given vector relative to its current position, without imparting any velocity.\n     * @method translate\n     * @param {body} body\n     * @param {vector} translation\n     */\n    Body.translate = function(body, translation) {\n        Body.setPosition(body, Vector.add(body.position, translation));\n    };\n\n    /**\n     * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity.\n     * @method rotate\n     * @param {body} body\n     * @param {number} rotation\n     */\n    Body.rotate = function(body, rotation) {\n        Body.setAngle(body, body.angle + rotation);\n    };\n\n    /**\n     * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre).\n     * @method scale\n     * @param {body} body\n     * @param {number} scaleX\n     * @param {number} scaleY\n     * @param {vector} [point]\n     */\n    Body.scale = function(body, scaleX, scaleY, point) {\n        for (var i = 0; i < body.parts.length; i++) {\n            var part = body.parts[i];\n\n            // scale vertices\n            Vertices.scale(part.vertices, scaleX, scaleY, body.position);\n\n            // update properties\n            part.axes = Axes.fromVertices(part.vertices);\n\n            if (!body.isStatic) {\n                part.area = Vertices.area(part.vertices);\n                Body.setMass(part, body.density * part.area);\n\n                // update inertia (requires vertices to be at origin)\n                Vertices.translate(part.vertices, { x: -part.position.x, y: -part.position.y });\n                Body.setInertia(part, Vertices.inertia(part.vertices, part.mass));\n                Vertices.translate(part.vertices, { x: part.position.x, y: part.position.y });\n            }\n\n            // update bounds\n            Bounds.update(part.bounds, part.vertices, body.velocity);\n        }\n\n        // handle circles\n        if (body.circleRadius) { \n            if (scaleX === scaleY) {\n                body.circleRadius *= scaleX;\n            } else {\n                // body is no longer a circle\n                body.circleRadius = null;\n            }\n        }\n\n        if (!body.isStatic) {\n            var total = _totalProperties(body);\n            body.area = total.area;\n            Body.setMass(body, total.mass);\n            Body.setInertia(body, total.inertia);\n        }\n    };\n\n    /**\n     * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration.\n     * @method update\n     * @param {body} body\n     * @param {number} deltaTime\n     * @param {number} timeScale\n     * @param {number} correction\n     */\n    Body.update = function(body, deltaTime, timeScale, correction) {\n        var deltaTimeSquared = Math.pow(deltaTime * timeScale * body.timeScale, 2);\n\n        // from the previous step\n        var frictionAir = 1 - body.frictionAir * timeScale * body.timeScale,\n            velocityPrevX = body.position.x - body.positionPrev.x,\n            velocityPrevY = body.position.y - body.positionPrev.y;\n\n        // update velocity with Verlet integration\n        body.velocity.x = (velocityPrevX * frictionAir * correction) + (body.force.x / body.mass) * deltaTimeSquared;\n        body.velocity.y = (velocityPrevY * frictionAir * correction) + (body.force.y / body.mass) * deltaTimeSquared;\n\n        body.positionPrev.x = body.position.x;\n        body.positionPrev.y = body.position.y;\n        body.position.x += body.velocity.x;\n        body.position.y += body.velocity.y;\n\n        // update angular velocity with Verlet integration\n        body.angularVelocity = ((body.angle - body.anglePrev) * frictionAir * correction) + (body.torque / body.inertia) * deltaTimeSquared;\n        body.anglePrev = body.angle;\n        body.angle += body.angularVelocity;\n\n        // track speed and acceleration\n        body.speed = Vector.magnitude(body.velocity);\n        body.angularSpeed = Math.abs(body.angularVelocity);\n\n        // transform the body geometry\n        for (var i = 0; i < body.parts.length; i++) {\n            var part = body.parts[i];\n\n            Vertices.translate(part.vertices, body.velocity);\n            \n            if (i > 0) {\n                part.position.x += body.velocity.x;\n                part.position.y += body.velocity.y;\n            }\n\n            if (body.angularVelocity !== 0) {\n                Vertices.rotate(part.vertices, body.angularVelocity, body.position);\n                Axes.rotate(part.axes, body.angularVelocity);\n                if (i > 0) {\n                    Vector.rotateAbout(part.position, body.angularVelocity, body.position, part.position);\n                }\n            }\n\n            Bounds.update(part.bounds, part.vertices, body.velocity);\n        }\n    };\n\n    /**\n     * Applies a force to a body from a given world-space position, including resulting torque.\n     * @method applyForce\n     * @param {body} body\n     * @param {vector} position\n     * @param {vector} force\n     */\n    Body.applyForce = function(body, position, force) {\n        body.force.x += force.x;\n        body.force.y += force.y;\n        var offset = { x: position.x - body.position.x, y: position.y - body.position.y };\n        body.torque += offset.x * force.y - offset.y * force.x;\n    };\n\n    /**\n     * Returns the sums of the properties of all compound parts of the parent body.\n     * @method _totalProperties\n     * @private\n     * @param {body} body\n     * @return {}\n     */\n    var _totalProperties = function(body) {\n        // https://ecourses.ou.edu/cgi-bin/ebook.cgi?doc=&topic=st&chap_sec=07.2&page=theory\n        // http://output.to/sideway/default.asp?qno=121100087\n\n        var properties = {\n            mass: 0,\n            area: 0,\n            inertia: 0,\n            centre: { x: 0, y: 0 }\n        };\n\n        // sum the properties of all compound parts of the parent body\n        for (var i = body.parts.length === 1 ? 0 : 1; i < body.parts.length; i++) {\n            var part = body.parts[i];\n            properties.mass += part.mass;\n            properties.area += part.area;\n            properties.inertia += part.inertia;\n            properties.centre = Vector.add(properties.centre, \n                                           Vector.mult(part.position, part.mass !== Infinity ? part.mass : 1));\n        }\n\n        properties.centre = Vector.div(properties.centre, \n                                       properties.mass !== Infinity ? properties.mass : body.parts.length);\n\n        return properties;\n    };\n\n    /*\n    *\n    *  Events Documentation\n    *\n    */\n\n    /**\n    * Fired when a body starts sleeping (where `this` is the body).\n    *\n    * @event sleepStart\n    * @this {body} The body that has started sleeping\n    * @param {} event An event object\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired when a body ends sleeping (where `this` is the body).\n    *\n    * @event sleepEnd\n    * @this {body} The body that has ended sleeping\n    * @param {} event An event object\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /*\n    *\n    *  Properties Documentation\n    *\n    */\n\n    /**\n     * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`.\n     *\n     * @property id\n     * @type number\n     */\n\n    /**\n     * A `String` denoting the type of object.\n     *\n     * @property type\n     * @type string\n     * @default \"body\"\n     * @readOnly\n     */\n\n    /**\n     * An arbitrary `String` name to help the user identify and manage bodies.\n     *\n     * @property label\n     * @type string\n     * @default \"Body\"\n     */\n\n    /**\n     * An array of bodies that make up this body. \n     * The first body in the array must always be a self reference to the current body instance.\n     * All bodies in the `parts` array together form a single rigid compound body.\n     * Parts are allowed to overlap, have gaps or holes or even form concave bodies.\n     * Parts themselves should never be added to a `World`, only the parent body should be.\n     * Use `Body.setParts` when setting parts to ensure correct updates of all properties.\n     *\n     * @property parts\n     * @type body[]\n     */\n\n    /**\n     * A self reference if the body is _not_ a part of another body.\n     * Otherwise this is a reference to the body that this is a part of.\n     * See `body.parts`.\n     *\n     * @property parent\n     * @type body\n     */\n\n    /**\n     * A `Number` specifying the angle of the body, in radians.\n     *\n     * @property angle\n     * @type number\n     * @default 0\n     */\n\n    /**\n     * An array of `Vector` objects that specify the convex hull of the rigid body.\n     * These should be provided about the origin `(0, 0)`. E.g.\n     *\n     *     [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\n     *\n     * When passed via `Body.create`, the vertices are translated relative to `body.position` (i.e. world-space, and constantly updated by `Body.update` during simulation).\n     * The `Vector` objects are also augmented with additional properties required for efficient collision detection. \n     *\n     * Other properties such as `inertia` and `bounds` are automatically calculated from the passed vertices (unless provided via `options`).\n     * Concave hulls are not currently supported. The module `Matter.Vertices` contains useful methods for working with vertices.\n     *\n     * @property vertices\n     * @type vector[]\n     */\n\n    /**\n     * A `Vector` that specifies the current world-space position of the body.\n     *\n     * @property position\n     * @type vector\n     * @default { x: 0, y: 0 }\n     */\n\n    /**\n     * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`.\n     *\n     * @property force\n     * @type vector\n     * @default { x: 0, y: 0 }\n     */\n\n    /**\n     * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`.\n     *\n     * @property torque\n     * @type number\n     * @default 0\n     */\n\n    /**\n     * A `Number` that _measures_ the current speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.velocity`).\n     *\n     * @readOnly\n     * @property speed\n     * @type number\n     * @default 0\n     */\n\n    /**\n     * A `Number` that _measures_ the current angular speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.angularVelocity`).\n     *\n     * @readOnly\n     * @property angularSpeed\n     * @type number\n     * @default 0\n     */\n\n    /**\n     * A `Vector` that _measures_ the current velocity of the body after the last `Body.update`. It is read-only. \n     * If you need to modify a body's velocity directly, you should either apply a force or simply change the body's `position` (as the engine uses position-Verlet integration).\n     *\n     * @readOnly\n     * @property velocity\n     * @type vector\n     * @default { x: 0, y: 0 }\n     */\n\n    /**\n     * A `Number` that _measures_ the current angular velocity of the body after the last `Body.update`. It is read-only. \n     * If you need to modify a body's angular velocity directly, you should apply a torque or simply change the body's `angle` (as the engine uses position-Verlet integration).\n     *\n     * @readOnly\n     * @property angularVelocity\n     * @type number\n     * @default 0\n     */\n\n    /**\n     * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed.\n     * If you need to set a body as static after its creation, you should use `Body.setStatic` as this requires more than just setting this flag.\n     *\n     * @property isStatic\n     * @type boolean\n     * @default false\n     */\n\n    /**\n     * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically.\n     *\n     * @property isSensor\n     * @type boolean\n     * @default false\n     */\n\n    /**\n     * A flag that indicates whether the body is considered sleeping. A sleeping body acts similar to a static body, except it is only temporary and can be awoken.\n     * If you need to set a body as sleeping, you should use `Sleeping.set` as this requires more than just setting this flag.\n     *\n     * @property isSleeping\n     * @type boolean\n     * @default false\n     */\n\n    /**\n     * A `Number` that _measures_ the amount of movement a body currently has (a combination of `speed` and `angularSpeed`). It is read-only and always positive.\n     * It is used and updated by the `Matter.Sleeping` module during simulation to decide if a body has come to rest.\n     *\n     * @readOnly\n     * @property motion\n     * @type number\n     * @default 0\n     */\n\n    /**\n     * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine).\n     *\n     * @property sleepThreshold\n     * @type number\n     * @default 60\n     */\n\n    /**\n     * A `Number` that defines the density of the body, that is its mass per unit area.\n     * If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object.\n     * This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood).\n     *\n     * @property density\n     * @type number\n     * @default 0.001\n     */\n\n    /**\n     * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead.\n     * If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`).\n     *\n     * @property mass\n     * @type number\n     */\n\n    /**\n     * A `Number` that defines the inverse mass of the body (`1 / mass`).\n     * If you modify this value, you must also modify the `body.mass` property.\n     *\n     * @property inverseMass\n     * @type number\n     */\n\n    /**\n     * A `Number` that defines the moment of inertia (i.e. second moment of area) of the body.\n     * It is automatically calculated from the given convex hull (`vertices` array) and density in `Body.create`.\n     * If you modify this value, you must also modify the `body.inverseInertia` property (`1 / inertia`).\n     *\n     * @property inertia\n     * @type number\n     */\n\n    /**\n     * A `Number` that defines the inverse moment of inertia of the body (`1 / inertia`).\n     * If you modify this value, you must also modify the `body.inertia` property.\n     *\n     * @property inverseInertia\n     * @type number\n     */\n\n    /**\n     * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`.\n     * A value of `0` means collisions may be perfectly inelastic and no bouncing may occur. \n     * A value of `0.8` means the body may bounce back with approximately 80% of its kinetic energy.\n     * Note that collision response is based on _pairs_ of bodies, and that `restitution` values are _combined_ with the following formula:\n     *\n     *     Math.max(bodyA.restitution, bodyB.restitution)\n     *\n     * @property restitution\n     * @type number\n     * @default 0\n     */\n\n    /**\n     * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`.\n     * A value of `0` means that the body may slide indefinitely.\n     * A value of `1` means the body may come to a stop almost instantly after a force is applied.\n     *\n     * The effects of the value may be non-linear. \n     * High values may be unstable depending on the body.\n     * The engine uses a Coulomb friction model including static and kinetic friction.\n     * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula:\n     *\n     *     Math.min(bodyA.friction, bodyB.friction)\n     *\n     * @property friction\n     * @type number\n     * @default 0.1\n     */\n\n    /**\n     * A `Number` that defines the static friction of the body (in the Coulomb friction model). \n     * A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used.\n     * The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary.\n     * This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction.\n     *\n     * @property frictionStatic\n     * @type number\n     * @default 0.5\n     */\n\n    /**\n     * A `Number` that defines the air friction of the body (air resistance). \n     * A value of `0` means the body will never slow as it moves through space.\n     * The higher the value, the faster a body slows when moving through space.\n     * The effects of the value are non-linear. \n     *\n     * @property frictionAir\n     * @type number\n     * @default 0.01\n     */\n\n    /**\n     * An `Object` that specifies the collision filtering properties of this body.\n     *\n     * Collisions between two bodies will obey the following rules:\n     * - If the two bodies have the same non-zero value of `collisionFilter.group`,\n     *   they will always collide if the value is positive, and they will never collide\n     *   if the value is negative.\n     * - If the two bodies have different values of `collisionFilter.group` or if one\n     *   (or both) of the bodies has a value of 0, then the category/mask rules apply as follows:\n     *\n     * Each body belongs to a collision category, given by `collisionFilter.category`. This\n     * value is used as a bit field and the category should have only one bit set, meaning that\n     * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32\n     * different collision categories available.\n     *\n     * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies\n     * the categories it collides with (the value is the bitwise AND value of all these categories).\n     *\n     * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's\n     * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0`\n     * are both true.\n     *\n     * @property collisionFilter\n     * @type object\n     */\n\n    /**\n     * An Integer `Number`, that specifies the collision group this body belongs to.\n     * See `body.collisionFilter` for more information.\n     *\n     * @property collisionFilter.group\n     * @type object\n     * @default 0\n     */\n\n    /**\n     * A bit field that specifies the collision category this body belongs to.\n     * The category value should have only one bit set, for example `0x0001`.\n     * This means there are up to 32 unique collision categories available.\n     * See `body.collisionFilter` for more information.\n     *\n     * @property collisionFilter.category\n     * @type object\n     * @default 1\n     */\n\n    /**\n     * A bit mask that specifies the collision categories this body may collide with.\n     * See `body.collisionFilter` for more information.\n     *\n     * @property collisionFilter.mask\n     * @type object\n     * @default -1\n     */\n\n    /**\n     * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies.\n     * Avoid changing this value unless you understand the purpose of `slop` in physics engines.\n     * The default should generally suffice, although very large bodies may require larger values for stable stacking.\n     *\n     * @property slop\n     * @type number\n     * @default 0.05\n     */\n\n    /**\n     * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed.\n     *\n     * @property timeScale\n     * @type number\n     * @default 1\n     */\n\n    /**\n     * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\n     *\n     * @property render\n     * @type object\n     */\n\n    /**\n     * A flag that indicates if the body should be rendered.\n     *\n     * @property render.visible\n     * @type boolean\n     * @default true\n     */\n\n    /**\n     * Sets the opacity to use when rendering.\n     *\n     * @property render.opacity\n     * @type number\n     * @default 1\n    */\n\n    /**\n     * An `Object` that defines the sprite properties to use when rendering, if any.\n     *\n     * @property render.sprite\n     * @type object\n     */\n\n    /**\n     * An `String` that defines the path to the image to use as the sprite texture, if any.\n     *\n     * @property render.sprite.texture\n     * @type string\n     */\n     \n    /**\n     * A `Number` that defines the scaling in the x-axis for the sprite, if any.\n     *\n     * @property render.sprite.xScale\n     * @type number\n     * @default 1\n     */\n\n    /**\n     * A `Number` that defines the scaling in the y-axis for the sprite, if any.\n     *\n     * @property render.sprite.yScale\n     * @type number\n     * @default 1\n     */\n\n     /**\n      * A `Number` that defines the offset in the x-axis for the sprite (normalised by texture width).\n      *\n      * @property render.sprite.xOffset\n      * @type number\n      * @default 0\n      */\n\n     /**\n      * A `Number` that defines the offset in the y-axis for the sprite (normalised by texture height).\n      *\n      * @property render.sprite.yOffset\n      * @type number\n      * @default 0\n      */\n\n    /**\n     * A `Number` that defines the line width to use when rendering the body outline (if a sprite is not defined).\n     * A value of `0` means no outline will be rendered.\n     *\n     * @property render.lineWidth\n     * @type number\n     * @default 1.5\n     */\n\n    /**\n     * A `String` that defines the fill style to use when rendering the body (if a sprite is not defined).\n     * It is the same as when using a canvas, so it accepts CSS style property values.\n     *\n     * @property render.fillStyle\n     * @type string\n     * @default a random colour\n     */\n\n    /**\n     * A `String` that defines the stroke style to use when rendering the body outline (if a sprite is not defined).\n     * It is the same as when using a canvas, so it accepts CSS style property values.\n     *\n     * @property render.strokeStyle\n     * @type string\n     * @default a random colour\n     */\n\n    /**\n     * An array of unique axis vectors (edge normals) used for collision detection.\n     * These are automatically calculated from the given convex hull (`vertices` array) in `Body.create`.\n     * They are constantly updated by `Body.update` during the simulation.\n     *\n     * @property axes\n     * @type vector[]\n     */\n     \n    /**\n     * A `Number` that _measures_ the area of the body's convex hull, calculated at creation by `Body.create`.\n     *\n     * @property area\n     * @type string\n     * @default \n     */\n\n    /**\n     * A `Bounds` object that defines the AABB region for the body.\n     * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation.\n     *\n     * @property bounds\n     * @type bounds\n     */\n\n})();\n\n},{\"../core/Common\":14,\"../core/Sleeping\":20,\"../geometry/Axes\":23,\"../geometry/Bounds\":24,\"../geometry/Vector\":26,\"../geometry/Vertices\":27,\"../render/Render\":29}],2:[function(require,module,exports){\n/**\n* The `Matter.Composite` module contains methods for creating and manipulating composite bodies.\n* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.\n* It is important to use the functions in this module to modify composites, rather than directly modifying their properties.\n* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Composite\n*/\n\nvar Composite = {};\n\nmodule.exports = Composite;\n\nvar Events = require('../core/Events');\nvar Common = require('../core/Common');\nvar Body = require('./Body');\n\n(function() {\n\n    /**\n     * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults.\n     * See the properites section below for detailed information on what you can pass via the `options` object.\n     * @method create\n     * @param {} [options]\n     * @return {composite} A new composite\n     */\n    Composite.create = function(options) {\n        return Common.extend({ \n            id: Common.nextId(),\n            type: 'composite',\n            parent: null,\n            isModified: false,\n            bodies: [], \n            constraints: [], \n            composites: [],\n            label: 'Composite'\n        }, options);\n    };\n\n    /**\n     * Sets the composite's `isModified` flag. \n     * If `updateParents` is true, all parents will be set (default: false).\n     * If `updateChildren` is true, all children will be set (default: false).\n     * @method setModified\n     * @param {composite} composite\n     * @param {boolean} isModified\n     * @param {boolean} [updateParents=false]\n     * @param {boolean} [updateChildren=false]\n     */\n    Composite.setModified = function(composite, isModified, updateParents, updateChildren) {\n        composite.isModified = isModified;\n\n        if (updateParents && composite.parent) {\n            Composite.setModified(composite.parent, isModified, updateParents, updateChildren);\n        }\n\n        if (updateChildren) {\n            for(var i = 0; i < composite.composites.length; i++) {\n                var childComposite = composite.composites[i];\n                Composite.setModified(childComposite, isModified, updateParents, updateChildren);\n            }\n        }\n    };\n\n    /**\n     * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite.\n     * Triggers `beforeAdd` and `afterAdd` events on the `composite`.\n     * @method add\n     * @param {composite} composite\n     * @param {} object\n     * @return {composite} The original composite with the objects added\n     */\n    Composite.add = function(composite, object) {\n        var objects = [].concat(object);\n\n        Events.trigger(composite, 'beforeAdd', { object: object });\n\n        for (var i = 0; i < objects.length; i++) {\n            var obj = objects[i];\n\n            switch (obj.type) {\n\n            case 'body':\n                // skip adding compound parts\n                if (obj.parent !== obj) {\n                    Common.log('Composite.add: skipped adding a compound body part (you must add its parent instead)', 'warn');\n                    break;\n                }\n\n                Composite.addBody(composite, obj);\n                break;\n            case 'constraint':\n                Composite.addConstraint(composite, obj);\n                break;\n            case 'composite':\n                Composite.addComposite(composite, obj);\n                break;\n            case 'mouseConstraint':\n                Composite.addConstraint(composite, obj.constraint);\n                break;\n\n            }\n        }\n\n        Events.trigger(composite, 'afterAdd', { object: object });\n\n        return composite;\n    };\n\n    /**\n     * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite.\n     * Optionally searching its children recursively.\n     * Triggers `beforeRemove` and `afterRemove` events on the `composite`.\n     * @method remove\n     * @param {composite} composite\n     * @param {} object\n     * @param {boolean} [deep=false]\n     * @return {composite} The original composite with the objects removed\n     */\n    Composite.remove = function(composite, object, deep) {\n        var objects = [].concat(object);\n\n        Events.trigger(composite, 'beforeRemove', { object: object });\n\n        for (var i = 0; i < objects.length; i++) {\n            var obj = objects[i];\n\n            switch (obj.type) {\n\n            case 'body':\n                Composite.removeBody(composite, obj, deep);\n                break;\n            case 'constraint':\n                Composite.removeConstraint(composite, obj, deep);\n                break;\n            case 'composite':\n                Composite.removeComposite(composite, obj, deep);\n                break;\n            case 'mouseConstraint':\n                Composite.removeConstraint(composite, obj.constraint);\n                break;\n\n            }\n        }\n\n        Events.trigger(composite, 'afterRemove', { object: object });\n\n        return composite;\n    };\n\n    /**\n     * Adds a composite to the given composite.\n     * @private\n     * @method addComposite\n     * @param {composite} compositeA\n     * @param {composite} compositeB\n     * @return {composite} The original compositeA with the objects from compositeB added\n     */\n    Composite.addComposite = function(compositeA, compositeB) {\n        compositeA.composites.push(compositeB);\n        compositeB.parent = compositeA;\n        Composite.setModified(compositeA, true, true, false);\n        return compositeA;\n    };\n\n    /**\n     * Removes a composite from the given composite, and optionally searching its children recursively.\n     * @private\n     * @method removeComposite\n     * @param {composite} compositeA\n     * @param {composite} compositeB\n     * @param {boolean} [deep=false]\n     * @return {composite} The original compositeA with the composite removed\n     */\n    Composite.removeComposite = function(compositeA, compositeB, deep) {\n        var position = Common.indexOf(compositeA.composites, compositeB);\n        if (position !== -1) {\n            Composite.removeCompositeAt(compositeA, position);\n            Composite.setModified(compositeA, true, true, false);\n        }\n\n        if (deep) {\n            for (var i = 0; i < compositeA.composites.length; i++){\n                Composite.removeComposite(compositeA.composites[i], compositeB, true);\n            }\n        }\n\n        return compositeA;\n    };\n\n    /**\n     * Removes a composite from the given composite.\n     * @private\n     * @method removeCompositeAt\n     * @param {composite} composite\n     * @param {number} position\n     * @return {composite} The original composite with the composite removed\n     */\n    Composite.removeCompositeAt = function(composite, position) {\n        composite.composites.splice(position, 1);\n        Composite.setModified(composite, true, true, false);\n        return composite;\n    };\n\n    /**\n     * Adds a body to the given composite.\n     * @private\n     * @method addBody\n     * @param {composite} composite\n     * @param {body} body\n     * @return {composite} The original composite with the body added\n     */\n    Composite.addBody = function(composite, body) {\n        composite.bodies.push(body);\n        Composite.setModified(composite, true, true, false);\n        return composite;\n    };\n\n    /**\n     * Removes a body from the given composite, and optionally searching its children recursively.\n     * @private\n     * @method removeBody\n     * @param {composite} composite\n     * @param {body} body\n     * @param {boolean} [deep=false]\n     * @return {composite} The original composite with the body removed\n     */\n    Composite.removeBody = function(composite, body, deep) {\n        var position = Common.indexOf(composite.bodies, body);\n        if (position !== -1) {\n            Composite.removeBodyAt(composite, position);\n            Composite.setModified(composite, true, true, false);\n        }\n\n        if (deep) {\n            for (var i = 0; i < composite.composites.length; i++){\n                Composite.removeBody(composite.composites[i], body, true);\n            }\n        }\n\n        return composite;\n    };\n\n    /**\n     * Removes a body from the given composite.\n     * @private\n     * @method removeBodyAt\n     * @param {composite} composite\n     * @param {number} position\n     * @return {composite} The original composite with the body removed\n     */\n    Composite.removeBodyAt = function(composite, position) {\n        composite.bodies.splice(position, 1);\n        Composite.setModified(composite, true, true, false);\n        return composite;\n    };\n\n    /**\n     * Adds a constraint to the given composite.\n     * @private\n     * @method addConstraint\n     * @param {composite} composite\n     * @param {constraint} constraint\n     * @return {composite} The original composite with the constraint added\n     */\n    Composite.addConstraint = function(composite, constraint) {\n        composite.constraints.push(constraint);\n        Composite.setModified(composite, true, true, false);\n        return composite;\n    };\n\n    /**\n     * Removes a constraint from the given composite, and optionally searching its children recursively.\n     * @private\n     * @method removeConstraint\n     * @param {composite} composite\n     * @param {constraint} constraint\n     * @param {boolean} [deep=false]\n     * @return {composite} The original composite with the constraint removed\n     */\n    Composite.removeConstraint = function(composite, constraint, deep) {\n        var position = Common.indexOf(composite.constraints, constraint);\n        if (position !== -1) {\n            Composite.removeConstraintAt(composite, position);\n        }\n\n        if (deep) {\n            for (var i = 0; i < composite.composites.length; i++){\n                Composite.removeConstraint(composite.composites[i], constraint, true);\n            }\n        }\n\n        return composite;\n    };\n\n    /**\n     * Removes a body from the given composite.\n     * @private\n     * @method removeConstraintAt\n     * @param {composite} composite\n     * @param {number} position\n     * @return {composite} The original composite with the constraint removed\n     */\n    Composite.removeConstraintAt = function(composite, position) {\n        composite.constraints.splice(position, 1);\n        Composite.setModified(composite, true, true, false);\n        return composite;\n    };\n\n    /**\n     * Removes all bodies, constraints and composites from the given composite.\n     * Optionally clearing its children recursively.\n     * @method clear\n     * @param {composite} composite\n     * @param {boolean} keepStatic\n     * @param {boolean} [deep=false]\n     */\n    Composite.clear = function(composite, keepStatic, deep) {\n        if (deep) {\n            for (var i = 0; i < composite.composites.length; i++){\n                Composite.clear(composite.composites[i], keepStatic, true);\n            }\n        }\n        \n        if (keepStatic) {\n            composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; });\n        } else {\n            composite.bodies.length = 0;\n        }\n\n        composite.constraints.length = 0;\n        composite.composites.length = 0;\n        Composite.setModified(composite, true, true, false);\n\n        return composite;\n    };\n\n    /**\n     * Returns all bodies in the given composite, including all bodies in its children, recursively.\n     * @method allBodies\n     * @param {composite} composite\n     * @return {body[]} All the bodies\n     */\n    Composite.allBodies = function(composite) {\n        var bodies = [].concat(composite.bodies);\n\n        for (var i = 0; i < composite.composites.length; i++)\n            bodies = bodies.concat(Composite.allBodies(composite.composites[i]));\n\n        return bodies;\n    };\n\n    /**\n     * Returns all constraints in the given composite, including all constraints in its children, recursively.\n     * @method allConstraints\n     * @param {composite} composite\n     * @return {constraint[]} All the constraints\n     */\n    Composite.allConstraints = function(composite) {\n        var constraints = [].concat(composite.constraints);\n\n        for (var i = 0; i < composite.composites.length; i++)\n            constraints = constraints.concat(Composite.allConstraints(composite.composites[i]));\n\n        return constraints;\n    };\n\n    /**\n     * Returns all composites in the given composite, including all composites in its children, recursively.\n     * @method allComposites\n     * @param {composite} composite\n     * @return {composite[]} All the composites\n     */\n    Composite.allComposites = function(composite) {\n        var composites = [].concat(composite.composites);\n\n        for (var i = 0; i < composite.composites.length; i++)\n            composites = composites.concat(Composite.allComposites(composite.composites[i]));\n\n        return composites;\n    };\n\n    /**\n     * Searches the composite recursively for an object matching the type and id supplied, null if not found.\n     * @method get\n     * @param {composite} composite\n     * @param {number} id\n     * @param {string} type\n     * @return {object} The requested object, if found\n     */\n    Composite.get = function(composite, id, type) {\n        var objects,\n            object;\n\n        switch (type) {\n        case 'body':\n            objects = Composite.allBodies(composite);\n            break;\n        case 'constraint':\n            objects = Composite.allConstraints(composite);\n            break;\n        case 'composite':\n            objects = Composite.allComposites(composite).concat(composite);\n            break;\n        }\n\n        if (!objects)\n            return null;\n\n        object = objects.filter(function(object) { \n            return object.id.toString() === id.toString(); \n        });\n\n        return object.length === 0 ? null : object[0];\n    };\n\n    /**\n     * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add).\n     * @method move\n     * @param {compositeA} compositeA\n     * @param {object[]} objects\n     * @param {compositeB} compositeB\n     * @return {composite} Returns compositeA\n     */\n    Composite.move = function(compositeA, objects, compositeB) {\n        Composite.remove(compositeA, objects);\n        Composite.add(compositeB, objects);\n        return compositeA;\n    };\n\n    /**\n     * Assigns new ids for all objects in the composite, recursively.\n     * @method rebase\n     * @param {composite} composite\n     * @return {composite} Returns composite\n     */\n    Composite.rebase = function(composite) {\n        var objects = Composite.allBodies(composite)\n                        .concat(Composite.allConstraints(composite))\n                        .concat(Composite.allComposites(composite));\n\n        for (var i = 0; i < objects.length; i++) {\n            objects[i].id = Common.nextId();\n        }\n\n        Composite.setModified(composite, true, true, false);\n\n        return composite;\n    };\n\n    /**\n     * Translates all children in the composite by a given vector relative to their current positions, \n     * without imparting any velocity.\n     * @method translate\n     * @param {composite} composite\n     * @param {vector} translation\n     * @param {bool} [recursive=true]\n     */\n    Composite.translate = function(composite, translation, recursive) {\n        var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\n\n        for (var i = 0; i < bodies.length; i++) {\n            Body.translate(bodies[i], translation);\n        }\n\n        Composite.setModified(composite, true, true, false);\n\n        return composite;\n    };\n\n    /**\n     * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity.\n     * @method rotate\n     * @param {composite} composite\n     * @param {number} rotation\n     * @param {vector} point\n     * @param {bool} [recursive=true]\n     */\n    Composite.rotate = function(composite, rotation, point, recursive) {\n        var cos = Math.cos(rotation),\n            sin = Math.sin(rotation),\n            bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\n\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i],\n                dx = body.position.x - point.x,\n                dy = body.position.y - point.y;\n                \n            Body.setPosition(body, {\n                x: point.x + (dx * cos - dy * sin),\n                y: point.y + (dx * sin + dy * cos)\n            });\n\n            Body.rotate(body, rotation);\n        }\n\n        Composite.setModified(composite, true, true, false);\n\n        return composite;\n    };\n\n    /**\n     * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point.\n     * @method scale\n     * @param {composite} composite\n     * @param {number} scaleX\n     * @param {number} scaleY\n     * @param {vector} point\n     * @param {bool} [recursive=true]\n     */\n    Composite.scale = function(composite, scaleX, scaleY, point, recursive) {\n        var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\n\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i],\n                dx = body.position.x - point.x,\n                dy = body.position.y - point.y;\n                \n            Body.setPosition(body, {\n                x: point.x + dx * scaleX,\n                y: point.y + dy * scaleY\n            });\n\n            Body.scale(body, scaleX, scaleY);\n        }\n\n        Composite.setModified(composite, true, true, false);\n\n        return composite;\n    };\n\n    /*\n    *\n    *  Events Documentation\n    *\n    */\n\n    /**\n    * Fired when a call to `Composite.add` is made, before objects have been added.\n    *\n    * @event beforeAdd\n    * @param {} event An event object\n    * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these)\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired when a call to `Composite.add` is made, after objects have been added.\n    *\n    * @event afterAdd\n    * @param {} event An event object\n    * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these)\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired when a call to `Composite.remove` is made, before objects have been removed.\n    *\n    * @event beforeRemove\n    * @param {} event An event object\n    * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these)\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired when a call to `Composite.remove` is made, after objects have been removed.\n    *\n    * @event afterRemove\n    * @param {} event An event object\n    * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these)\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /*\n    *\n    *  Properties Documentation\n    *\n    */\n\n    /**\n     * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\n     *\n     * @property id\n     * @type number\n     */\n\n    /**\n     * A `String` denoting the type of object.\n     *\n     * @property type\n     * @type string\n     * @default \"composite\"\n     * @readOnly\n     */\n\n    /**\n     * An arbitrary `String` name to help the user identify and manage composites.\n     *\n     * @property label\n     * @type string\n     * @default \"Composite\"\n     */\n\n    /**\n     * A flag that specifies whether the composite has been modified during the current step.\n     * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled.\n     * If you need to change it manually, you should use the `Composite.setModified` method.\n     *\n     * @property isModified\n     * @type boolean\n     * @default false\n     */\n\n    /**\n     * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods.\n     *\n     * @property parent\n     * @type composite\n     * @default null\n     */\n\n    /**\n     * An array of `Body` that are _direct_ children of this composite.\n     * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\n     * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method.\n     *\n     * @property bodies\n     * @type body[]\n     * @default []\n     */\n\n    /**\n     * An array of `Constraint` that are _direct_ children of this composite.\n     * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\n     * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method.\n     *\n     * @property constraints\n     * @type constraint[]\n     * @default []\n     */\n\n    /**\n     * An array of `Composite` that are _direct_ children of this composite.\n     * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\n     * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method.\n     *\n     * @property composites\n     * @type composite[]\n     * @default []\n     */\n\n})();\n\n},{\"../core/Common\":14,\"../core/Events\":16,\"./Body\":1}],3:[function(require,module,exports){\n/**\n* The `Matter.World` module contains methods for creating and manipulating the world composite.\n* A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.\n* A `Matter.World` has a few additional properties including `gravity` and `bounds`.\n* It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.\n* There are also a few methods here that alias those in `Matter.Composite` for easier readability.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class World\n* @extends Composite\n*/\n\nvar World = {};\n\nmodule.exports = World;\n\nvar Composite = require('./Composite');\nvar Constraint = require('../constraint/Constraint');\nvar Common = require('../core/Common');\n\n(function() {\n\n    /**\n     * Creates a new world composite. The options parameter is an object that specifies any properties you wish to override the defaults.\n     * See the properties section below for detailed information on what you can pass via the `options` object.\n     * @method create\n     * @constructor\n     * @param {} options\n     * @return {world} A new world\n     */\n    World.create = function(options) {\n        var composite = Composite.create();\n\n        var defaults = {\n            label: 'World',\n            gravity: {\n                x: 0,\n                y: 1,\n                scale: 0.001\n            },\n            bounds: { \n                min: { x: -Infinity, y: -Infinity }, \n                max: { x: Infinity, y: Infinity } \n            }\n        };\n        \n        return Common.extend(composite, defaults, options);\n    };\n\n    /*\n    *\n    *  Properties Documentation\n    *\n    */\n\n    /**\n     * The gravity to apply on the world.\n     *\n     * @property gravity\n     * @type object\n     */\n\n    /**\n     * The gravity x component.\n     *\n     * @property gravity.x\n     * @type object\n     * @default 0\n     */\n\n    /**\n     * The gravity y component.\n     *\n     * @property gravity.y\n     * @type object\n     * @default 1\n     */\n\n    /**\n     * The gravity scale factor.\n     *\n     * @property gravity.scale\n     * @type object\n     * @default 0.001\n     */\n\n    /**\n     * A `Bounds` object that defines the world bounds for collision detection.\n     *\n     * @property bounds\n     * @type bounds\n     * @default { min: { x: -Infinity, y: -Infinity }, max: { x: Infinity, y: Infinity } }\n     */\n\n    // World is a Composite body\n    // see src/module/Outro.js for these aliases:\n    \n    /**\n     * An alias for Composite.clear\n     * @method clear\n     * @param {world} world\n     * @param {boolean} keepStatic\n     */\n\n    /**\n     * An alias for Composite.add\n     * @method addComposite\n     * @param {world} world\n     * @param {composite} composite\n     * @return {world} The original world with the objects from composite added\n     */\n    \n     /**\n      * An alias for Composite.addBody\n      * @method addBody\n      * @param {world} world\n      * @param {body} body\n      * @return {world} The original world with the body added\n      */\n\n     /**\n      * An alias for Composite.addConstraint\n      * @method addConstraint\n      * @param {world} world\n      * @param {constraint} constraint\n      * @return {world} The original world with the constraint added\n      */\n\n})();\n\n},{\"../constraint/Constraint\":12,\"../core/Common\":14,\"./Composite\":2}],4:[function(require,module,exports){\n/**\n* The `Matter.Contact` module contains methods for creating and manipulating collision contacts.\n*\n* @class Contact\n*/\n\nvar Contact = {};\n\nmodule.exports = Contact;\n\n(function() {\n\n    /**\n     * Creates a new contact.\n     * @method create\n     * @param {vertex} vertex\n     * @return {contact} A new contact\n     */\n    Contact.create = function(vertex) {\n        return {\n            id: Contact.id(vertex),\n            vertex: vertex,\n            normalImpulse: 0,\n            tangentImpulse: 0\n        };\n    };\n    \n    /**\n     * Generates a contact id.\n     * @method id\n     * @param {vertex} vertex\n     * @return {string} Unique contactID\n     */\n    Contact.id = function(vertex) {\n        return vertex.body.id + '_' + vertex.index;\n    };\n\n})();\n\n},{}],5:[function(require,module,exports){\n/**\n* The `Matter.Detector` module contains methods for detecting collisions given a set of pairs.\n*\n* @class Detector\n*/\n\n// TODO: speculative contacts\n\nvar Detector = {};\n\nmodule.exports = Detector;\n\nvar SAT = require('./SAT');\nvar Pair = require('./Pair');\nvar Bounds = require('../geometry/Bounds');\n\n(function() {\n\n    /**\n     * Finds all collisions given a list of pairs.\n     * @method collisions\n     * @param {pair[]} broadphasePairs\n     * @param {engine} engine\n     * @return {array} collisions\n     */\n    Detector.collisions = function(broadphasePairs, engine) {\n        var collisions = [],\n            pairsTable = engine.pairs.table;\n\n        \n        for (var i = 0; i < broadphasePairs.length; i++) {\n            var bodyA = broadphasePairs[i][0], \n                bodyB = broadphasePairs[i][1];\n\n            if ((bodyA.isStatic || bodyA.isSleeping) && (bodyB.isStatic || bodyB.isSleeping))\n                continue;\n            \n            if (!Detector.canCollide(bodyA.collisionFilter, bodyB.collisionFilter))\n                continue;\n\n\n            // mid phase\n            if (Bounds.overlaps(bodyA.bounds, bodyB.bounds)) {\n                for (var j = bodyA.parts.length > 1 ? 1 : 0; j < bodyA.parts.length; j++) {\n                    var partA = bodyA.parts[j];\n\n                    for (var k = bodyB.parts.length > 1 ? 1 : 0; k < bodyB.parts.length; k++) {\n                        var partB = bodyB.parts[k];\n\n                        if ((partA === bodyA && partB === bodyB) || Bounds.overlaps(partA.bounds, partB.bounds)) {\n                            // find a previous collision we could reuse\n                            var pairId = Pair.id(partA, partB),\n                                pair = pairsTable[pairId],\n                                previousCollision;\n\n                            if (pair && pair.isActive) {\n                                previousCollision = pair.collision;\n                            } else {\n                                previousCollision = null;\n                            }\n\n                            // narrow phase\n                            var collision = SAT.collides(partA, partB, previousCollision);\n\n\n                            if (collision.collided) {\n                                collisions.push(collision);\n                            }\n                        }\n                    }\n                }\n            }\n        }\n\n        return collisions;\n    };\n\n    /**\n     * Returns `true` if both supplied collision filters will allow a collision to occur.\n     * See `body.collisionFilter` for more information.\n     * @method canCollide\n     * @param {} filterA\n     * @param {} filterB\n     * @return {bool} `true` if collision can occur\n     */\n    Detector.canCollide = function(filterA, filterB) {\n        if (filterA.group === filterB.group && filterA.group !== 0)\n            return filterA.group > 0;\n\n        return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0;\n    };\n\n})();\n\n},{\"../geometry/Bounds\":24,\"./Pair\":7,\"./SAT\":11}],6:[function(require,module,exports){\n/**\n* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures.\n*\n* @class Grid\n*/\n\nvar Grid = {};\n\nmodule.exports = Grid;\n\nvar Pair = require('./Pair');\nvar Detector = require('./Detector');\nvar Common = require('../core/Common');\n\n(function() {\n\n    /**\n     * Creates a new grid.\n     * @method create\n     * @param {} options\n     * @return {grid} A new grid\n     */\n    Grid.create = function(options) {\n        var defaults = {\n            controller: Grid,\n            detector: Detector.collisions,\n            buckets: {},\n            pairs: {},\n            pairsList: [],\n            bucketWidth: 48,\n            bucketHeight: 48\n        };\n\n        return Common.extend(defaults, options);\n    };\n\n    /**\n     * The width of a single grid bucket.\n     *\n     * @property bucketWidth\n     * @type number\n     * @default 48\n     */\n\n    /**\n     * The height of a single grid bucket.\n     *\n     * @property bucketHeight\n     * @type number\n     * @default 48\n     */\n\n    /**\n     * Updates the grid.\n     * @method update\n     * @param {grid} grid\n     * @param {body[]} bodies\n     * @param {engine} engine\n     * @param {boolean} forceUpdate\n     */\n    Grid.update = function(grid, bodies, engine, forceUpdate) {\n        var i, col, row,\n            world = engine.world,\n            buckets = grid.buckets,\n            bucket,\n            bucketId,\n            gridChanged = false;\n\n\n        for (i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n\n            if (body.isSleeping && !forceUpdate)\n                continue;\n\n            // don't update out of world bodies\n            if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x\n                || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y)\n                continue;\n\n            var newRegion = _getRegion(grid, body);\n\n            // if the body has changed grid region\n            if (!body.region || newRegion.id !== body.region.id || forceUpdate) {\n\n\n                if (!body.region || forceUpdate)\n                    body.region = newRegion;\n\n                var union = _regionUnion(newRegion, body.region);\n\n                // update grid buckets affected by region change\n                // iterate over the union of both regions\n                for (col = union.startCol; col <= union.endCol; col++) {\n                    for (row = union.startRow; row <= union.endRow; row++) {\n                        bucketId = _getBucketId(col, row);\n                        bucket = buckets[bucketId];\n\n                        var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol\n                                                && row >= newRegion.startRow && row <= newRegion.endRow);\n\n                        var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol\n                                                && row >= body.region.startRow && row <= body.region.endRow);\n\n                        // remove from old region buckets\n                        if (!isInsideNewRegion && isInsideOldRegion) {\n                            if (isInsideOldRegion) {\n                                if (bucket)\n                                    _bucketRemoveBody(grid, bucket, body);\n                            }\n                        }\n\n                        // add to new region buckets\n                        if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) {\n                            if (!bucket)\n                                bucket = _createBucket(buckets, bucketId);\n                            _bucketAddBody(grid, bucket, body);\n                        }\n                    }\n                }\n\n                // set the new region\n                body.region = newRegion;\n\n                // flag changes so we can update pairs\n                gridChanged = true;\n            }\n        }\n\n        // update pairs list only if pairs changed (i.e. a body changed region)\n        if (gridChanged)\n            grid.pairsList = _createActivePairsList(grid);\n    };\n\n    /**\n     * Clears the grid.\n     * @method clear\n     * @param {grid} grid\n     */\n    Grid.clear = function(grid) {\n        grid.buckets = {};\n        grid.pairs = {};\n        grid.pairsList = [];\n    };\n\n    /**\n     * Finds the union of two regions.\n     * @method _regionUnion\n     * @private\n     * @param {} regionA\n     * @param {} regionB\n     * @return {} region\n     */\n    var _regionUnion = function(regionA, regionB) {\n        var startCol = Math.min(regionA.startCol, regionB.startCol),\n            endCol = Math.max(regionA.endCol, regionB.endCol),\n            startRow = Math.min(regionA.startRow, regionB.startRow),\n            endRow = Math.max(regionA.endRow, regionB.endRow);\n\n        return _createRegion(startCol, endCol, startRow, endRow);\n    };\n\n    /**\n     * Gets the region a given body falls in for a given grid.\n     * @method _getRegion\n     * @private\n     * @param {} grid\n     * @param {} body\n     * @return {} region\n     */\n    var _getRegion = function(grid, body) {\n        var bounds = body.bounds,\n            startCol = Math.floor(bounds.min.x / grid.bucketWidth),\n            endCol = Math.floor(bounds.max.x / grid.bucketWidth),\n            startRow = Math.floor(bounds.min.y / grid.bucketHeight),\n            endRow = Math.floor(bounds.max.y / grid.bucketHeight);\n\n        return _createRegion(startCol, endCol, startRow, endRow);\n    };\n\n    /**\n     * Creates a region.\n     * @method _createRegion\n     * @private\n     * @param {} startCol\n     * @param {} endCol\n     * @param {} startRow\n     * @param {} endRow\n     * @return {} region\n     */\n    var _createRegion = function(startCol, endCol, startRow, endRow) {\n        return { \n            id: startCol + ',' + endCol + ',' + startRow + ',' + endRow,\n            startCol: startCol, \n            endCol: endCol, \n            startRow: startRow, \n            endRow: endRow \n        };\n    };\n\n    /**\n     * Gets the bucket id at the given position.\n     * @method _getBucketId\n     * @private\n     * @param {} column\n     * @param {} row\n     * @return {string} bucket id\n     */\n    var _getBucketId = function(column, row) {\n        return column + ',' + row;\n    };\n\n    /**\n     * Creates a bucket.\n     * @method _createBucket\n     * @private\n     * @param {} buckets\n     * @param {} bucketId\n     * @return {} bucket\n     */\n    var _createBucket = function(buckets, bucketId) {\n        var bucket = buckets[bucketId] = [];\n        return bucket;\n    };\n\n    /**\n     * Adds a body to a bucket.\n     * @method _bucketAddBody\n     * @private\n     * @param {} grid\n     * @param {} bucket\n     * @param {} body\n     */\n    var _bucketAddBody = function(grid, bucket, body) {\n        // add new pairs\n        for (var i = 0; i < bucket.length; i++) {\n            var bodyB = bucket[i];\n\n            if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic))\n                continue;\n\n            // keep track of the number of buckets the pair exists in\n            // important for Grid.update to work\n            var pairId = Pair.id(body, bodyB),\n                pair = grid.pairs[pairId];\n\n            if (pair) {\n                pair[2] += 1;\n            } else {\n                grid.pairs[pairId] = [body, bodyB, 1];\n            }\n        }\n\n        // add to bodies (after pairs, otherwise pairs with self)\n        bucket.push(body);\n    };\n\n    /**\n     * Removes a body from a bucket.\n     * @method _bucketRemoveBody\n     * @private\n     * @param {} grid\n     * @param {} bucket\n     * @param {} body\n     */\n    var _bucketRemoveBody = function(grid, bucket, body) {\n        // remove from bucket\n        bucket.splice(Common.indexOf(bucket, body), 1);\n\n        // update pair counts\n        for (var i = 0; i < bucket.length; i++) {\n            // keep track of the number of buckets the pair exists in\n            // important for _createActivePairsList to work\n            var bodyB = bucket[i],\n                pairId = Pair.id(body, bodyB),\n                pair = grid.pairs[pairId];\n\n            if (pair)\n                pair[2] -= 1;\n        }\n    };\n\n    /**\n     * Generates a list of the active pairs in the grid.\n     * @method _createActivePairsList\n     * @private\n     * @param {} grid\n     * @return [] pairs\n     */\n    var _createActivePairsList = function(grid) {\n        var pairKeys,\n            pair,\n            pairs = [];\n\n        // grid.pairs is used as a hashmap\n        pairKeys = Common.keys(grid.pairs);\n\n        // iterate over grid.pairs\n        for (var k = 0; k < pairKeys.length; k++) {\n            pair = grid.pairs[pairKeys[k]];\n\n            // if pair exists in at least one bucket\n            // it is a pair that needs further collision testing so push it\n            if (pair[2] > 0) {\n                pairs.push(pair);\n            } else {\n                delete grid.pairs[pairKeys[k]];\n            }\n        }\n\n        return pairs;\n    };\n    \n})();\n\n},{\"../core/Common\":14,\"./Detector\":5,\"./Pair\":7}],7:[function(require,module,exports){\n/**\n* The `Matter.Pair` module contains methods for creating and manipulating collision pairs.\n*\n* @class Pair\n*/\n\nvar Pair = {};\n\nmodule.exports = Pair;\n\nvar Contact = require('./Contact');\n\n(function() {\n    \n    /**\n     * Creates a pair.\n     * @method create\n     * @param {collision} collision\n     * @param {number} timestamp\n     * @return {pair} A new pair\n     */\n    Pair.create = function(collision, timestamp) {\n        var bodyA = collision.bodyA,\n            bodyB = collision.bodyB,\n            parentA = collision.parentA,\n            parentB = collision.parentB;\n\n        var pair = {\n            id: Pair.id(bodyA, bodyB),\n            bodyA: bodyA,\n            bodyB: bodyB,\n            contacts: {},\n            activeContacts: [],\n            separation: 0,\n            isActive: true,\n            isSensor: bodyA.isSensor || bodyB.isSensor,\n            timeCreated: timestamp,\n            timeUpdated: timestamp,\n            inverseMass: parentA.inverseMass + parentB.inverseMass,\n            friction: Math.min(parentA.friction, parentB.friction),\n            frictionStatic: Math.max(parentA.frictionStatic, parentB.frictionStatic),\n            restitution: Math.max(parentA.restitution, parentB.restitution),\n            slop: Math.max(parentA.slop, parentB.slop)\n        };\n\n        Pair.update(pair, collision, timestamp);\n\n        return pair;\n    };\n\n    /**\n     * Updates a pair given a collision.\n     * @method update\n     * @param {pair} pair\n     * @param {collision} collision\n     * @param {number} timestamp\n     */\n    Pair.update = function(pair, collision, timestamp) {\n        var contacts = pair.contacts,\n            supports = collision.supports,\n            activeContacts = pair.activeContacts,\n            parentA = collision.parentA,\n            parentB = collision.parentB;\n        \n        pair.collision = collision;\n        pair.inverseMass = parentA.inverseMass + parentB.inverseMass;\n        pair.friction = Math.min(parentA.friction, parentB.friction);\n        pair.frictionStatic = Math.max(parentA.frictionStatic, parentB.frictionStatic);\n        pair.restitution = Math.max(parentA.restitution, parentB.restitution);\n        pair.slop = Math.max(parentA.slop, parentB.slop);\n        activeContacts.length = 0;\n        \n        if (collision.collided) {\n            for (var i = 0; i < supports.length; i++) {\n                var support = supports[i],\n                    contactId = Contact.id(support),\n                    contact = contacts[contactId];\n\n                if (contact) {\n                    activeContacts.push(contact);\n                } else {\n                    activeContacts.push(contacts[contactId] = Contact.create(support));\n                }\n            }\n\n            pair.separation = collision.depth;\n            Pair.setActive(pair, true, timestamp);\n        } else {\n            if (pair.isActive === true)\n                Pair.setActive(pair, false, timestamp);\n        }\n    };\n    \n    /**\n     * Set a pair as active or inactive.\n     * @method setActive\n     * @param {pair} pair\n     * @param {bool} isActive\n     * @param {number} timestamp\n     */\n    Pair.setActive = function(pair, isActive, timestamp) {\n        if (isActive) {\n            pair.isActive = true;\n            pair.timeUpdated = timestamp;\n        } else {\n            pair.isActive = false;\n            pair.activeContacts.length = 0;\n        }\n    };\n\n    /**\n     * Get the id for the given pair.\n     * @method id\n     * @param {body} bodyA\n     * @param {body} bodyB\n     * @return {string} Unique pairId\n     */\n    Pair.id = function(bodyA, bodyB) {\n        if (bodyA.id < bodyB.id) {\n            return bodyA.id + '_' + bodyB.id;\n        } else {\n            return bodyB.id + '_' + bodyA.id;\n        }\n    };\n\n})();\n\n},{\"./Contact\":4}],8:[function(require,module,exports){\n/**\n* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets.\n*\n* @class Pairs\n*/\n\nvar Pairs = {};\n\nmodule.exports = Pairs;\n\nvar Pair = require('./Pair');\nvar Common = require('../core/Common');\n\n(function() {\n    \n    var _pairMaxIdleLife = 1000;\n\n    /**\n     * Creates a new pairs structure.\n     * @method create\n     * @param {object} options\n     * @return {pairs} A new pairs structure\n     */\n    Pairs.create = function(options) {\n        return Common.extend({ \n            table: {},\n            list: [],\n            collisionStart: [],\n            collisionActive: [],\n            collisionEnd: []\n        }, options);\n    };\n\n    /**\n     * Updates pairs given a list of collisions.\n     * @method update\n     * @param {object} pairs\n     * @param {collision[]} collisions\n     * @param {number} timestamp\n     */\n    Pairs.update = function(pairs, collisions, timestamp) {\n        var pairsList = pairs.list,\n            pairsTable = pairs.table,\n            collisionStart = pairs.collisionStart,\n            collisionEnd = pairs.collisionEnd,\n            collisionActive = pairs.collisionActive,\n            activePairIds = [],\n            collision,\n            pairId,\n            pair,\n            i;\n\n        // clear collision state arrays, but maintain old reference\n        collisionStart.length = 0;\n        collisionEnd.length = 0;\n        collisionActive.length = 0;\n\n        for (i = 0; i < collisions.length; i++) {\n            collision = collisions[i];\n\n            if (collision.collided) {\n                pairId = Pair.id(collision.bodyA, collision.bodyB);\n                activePairIds.push(pairId);\n\n                pair = pairsTable[pairId];\n                \n                if (pair) {\n                    // pair already exists (but may or may not be active)\n                    if (pair.isActive) {\n                        // pair exists and is active\n                        collisionActive.push(pair);\n                    } else {\n                        // pair exists but was inactive, so a collision has just started again\n                        collisionStart.push(pair);\n                    }\n\n                    // update the pair\n                    Pair.update(pair, collision, timestamp);\n                } else {\n                    // pair did not exist, create a new pair\n                    pair = Pair.create(collision, timestamp);\n                    pairsTable[pairId] = pair;\n\n                    // push the new pair\n                    collisionStart.push(pair);\n                    pairsList.push(pair);\n                }\n            }\n        }\n\n        // deactivate previously active pairs that are now inactive\n        for (i = 0; i < pairsList.length; i++) {\n            pair = pairsList[i];\n            if (pair.isActive && Common.indexOf(activePairIds, pair.id) === -1) {\n                Pair.setActive(pair, false, timestamp);\n                collisionEnd.push(pair);\n            }\n        }\n    };\n    \n    /**\n     * Finds and removes pairs that have been inactive for a set amount of time.\n     * @method removeOld\n     * @param {object} pairs\n     * @param {number} timestamp\n     */\n    Pairs.removeOld = function(pairs, timestamp) {\n        var pairsList = pairs.list,\n            pairsTable = pairs.table,\n            indexesToRemove = [],\n            pair,\n            collision,\n            pairIndex,\n            i;\n\n        for (i = 0; i < pairsList.length; i++) {\n            pair = pairsList[i];\n            collision = pair.collision;\n            \n            // never remove sleeping pairs\n            if (collision.bodyA.isSleeping || collision.bodyB.isSleeping) {\n                pair.timeUpdated = timestamp;\n                continue;\n            }\n\n            // if pair is inactive for too long, mark it to be removed\n            if (timestamp - pair.timeUpdated > _pairMaxIdleLife) {\n                indexesToRemove.push(i);\n            }\n        }\n\n        // remove marked pairs\n        for (i = 0; i < indexesToRemove.length; i++) {\n            pairIndex = indexesToRemove[i] - i;\n            pair = pairsList[pairIndex];\n            delete pairsTable[pair.id];\n            pairsList.splice(pairIndex, 1);\n        }\n    };\n\n    /**\n     * Clears the given pairs structure.\n     * @method clear\n     * @param {pairs} pairs\n     * @return {pairs} pairs\n     */\n    Pairs.clear = function(pairs) {\n        pairs.table = {};\n        pairs.list.length = 0;\n        pairs.collisionStart.length = 0;\n        pairs.collisionActive.length = 0;\n        pairs.collisionEnd.length = 0;\n        return pairs;\n    };\n\n})();\n\n},{\"../core/Common\":14,\"./Pair\":7}],9:[function(require,module,exports){\n/**\n* The `Matter.Query` module contains methods for performing collision queries.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Query\n*/\n\nvar Query = {};\n\nmodule.exports = Query;\n\nvar Vector = require('../geometry/Vector');\nvar SAT = require('./SAT');\nvar Bounds = require('../geometry/Bounds');\nvar Bodies = require('../factory/Bodies');\nvar Vertices = require('../geometry/Vertices');\n\n(function() {\n\n    /**\n     * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided.\n     * @method ray\n     * @param {body[]} bodies\n     * @param {vector} startPoint\n     * @param {vector} endPoint\n     * @param {number} [rayWidth]\n     * @return {object[]} Collisions\n     */\n    Query.ray = function(bodies, startPoint, endPoint, rayWidth) {\n        rayWidth = rayWidth || 1e-100;\n\n        var rayAngle = Vector.angle(startPoint, endPoint),\n            rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)),\n            rayX = (endPoint.x + startPoint.x) * 0.5,\n            rayY = (endPoint.y + startPoint.y) * 0.5,\n            ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }),\n            collisions = [];\n\n        for (var i = 0; i < bodies.length; i++) {\n            var bodyA = bodies[i];\n            \n            if (Bounds.overlaps(bodyA.bounds, ray.bounds)) {\n                for (var j = bodyA.parts.length === 1 ? 0 : 1; j < bodyA.parts.length; j++) {\n                    var part = bodyA.parts[j];\n\n                    if (Bounds.overlaps(part.bounds, ray.bounds)) {\n                        var collision = SAT.collides(part, ray);\n                        if (collision.collided) {\n                            collision.body = collision.bodyA = collision.bodyB = bodyA;\n                            collisions.push(collision);\n                            break;\n                        }\n                    }\n                }\n            }\n        }\n\n        return collisions;\n    };\n\n    /**\n     * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies.\n     * @method region\n     * @param {body[]} bodies\n     * @param {bounds} bounds\n     * @param {bool} [outside=false]\n     * @return {body[]} The bodies matching the query\n     */\n    Query.region = function(bodies, bounds, outside) {\n        var result = [];\n\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i],\n                overlaps = Bounds.overlaps(body.bounds, bounds);\n            if ((overlaps && !outside) || (!overlaps && outside))\n                result.push(body);\n        }\n\n        return result;\n    };\n\n    /**\n     * Returns all bodies whose vertices contain the given point, from the given set of bodies.\n     * @method point\n     * @param {body[]} bodies\n     * @param {vector} point\n     * @return {body[]} The bodies matching the query\n     */\n    Query.point = function(bodies, point) {\n        var result = [];\n\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n            \n            if (Bounds.contains(body.bounds, point)) {\n                for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) {\n                    var part = body.parts[j];\n\n                    if (Bounds.contains(part.bounds, point)\n                        && Vertices.contains(part.vertices, point)) {\n                        result.push(body);\n                        break;\n                    }\n                }\n            }\n        }\n\n        return result;\n    };\n\n})();\n\n},{\"../factory/Bodies\":21,\"../geometry/Bounds\":24,\"../geometry/Vector\":26,\"../geometry/Vertices\":27,\"./SAT\":11}],10:[function(require,module,exports){\n/**\n* The `Matter.Resolver` module contains methods for resolving collision pairs.\n*\n* @class Resolver\n*/\n\nvar Resolver = {};\n\nmodule.exports = Resolver;\n\nvar Vertices = require('../geometry/Vertices');\nvar Vector = require('../geometry/Vector');\nvar Common = require('../core/Common');\nvar Bounds = require('../geometry/Bounds');\n\n(function() {\n\n    Resolver._restingThresh = 4;\n    Resolver._restingThreshTangent = 6;\n    Resolver._positionDampen = 0.9;\n    Resolver._positionWarming = 0.8;\n    Resolver._frictionNormalMultiplier = 5;\n\n    /**\n     * Prepare pairs for position solving.\n     * @method preSolvePosition\n     * @param {pair[]} pairs\n     */\n    Resolver.preSolvePosition = function(pairs) {\n        var i,\n            pair,\n            activeCount;\n\n        // find total contacts on each body\n        for (i = 0; i < pairs.length; i++) {\n            pair = pairs[i];\n            \n            if (!pair.isActive)\n                continue;\n            \n            activeCount = pair.activeContacts.length;\n            pair.collision.parentA.totalContacts += activeCount;\n            pair.collision.parentB.totalContacts += activeCount;\n        }\n    };\n\n    /**\n     * Find a solution for pair positions.\n     * @method solvePosition\n     * @param {pair[]} pairs\n     * @param {number} timeScale\n     */\n    Resolver.solvePosition = function(pairs, timeScale) {\n        var i,\n            pair,\n            collision,\n            bodyA,\n            bodyB,\n            normal,\n            bodyBtoA,\n            contactShare,\n            positionImpulse,\n            contactCount = {},\n            tempA = Vector._temp[0],\n            tempB = Vector._temp[1],\n            tempC = Vector._temp[2],\n            tempD = Vector._temp[3];\n\n        // find impulses required to resolve penetration\n        for (i = 0; i < pairs.length; i++) {\n            pair = pairs[i];\n            \n            if (!pair.isActive || pair.isSensor)\n                continue;\n\n            collision = pair.collision;\n            bodyA = collision.parentA;\n            bodyB = collision.parentB;\n            normal = collision.normal;\n\n            // get current separation between body edges involved in collision\n            bodyBtoA = Vector.sub(Vector.add(bodyB.positionImpulse, bodyB.position, tempA), \n                                    Vector.add(bodyA.positionImpulse, \n                                        Vector.sub(bodyB.position, collision.penetration, tempB), tempC), tempD);\n\n            pair.separation = Vector.dot(normal, bodyBtoA);\n        }\n        \n        for (i = 0; i < pairs.length; i++) {\n            pair = pairs[i];\n\n            if (!pair.isActive || pair.isSensor || pair.separation < 0)\n                continue;\n            \n            collision = pair.collision;\n            bodyA = collision.parentA;\n            bodyB = collision.parentB;\n            normal = collision.normal;\n            positionImpulse = (pair.separation - pair.slop) * timeScale;\n\n            if (bodyA.isStatic || bodyB.isStatic)\n                positionImpulse *= 2;\n            \n            if (!(bodyA.isStatic || bodyA.isSleeping)) {\n                contactShare = Resolver._positionDampen / bodyA.totalContacts;\n                bodyA.positionImpulse.x += normal.x * positionImpulse * contactShare;\n                bodyA.positionImpulse.y += normal.y * positionImpulse * contactShare;\n            }\n\n            if (!(bodyB.isStatic || bodyB.isSleeping)) {\n                contactShare = Resolver._positionDampen / bodyB.totalContacts;\n                bodyB.positionImpulse.x -= normal.x * positionImpulse * contactShare;\n                bodyB.positionImpulse.y -= normal.y * positionImpulse * contactShare;\n            }\n        }\n    };\n\n    /**\n     * Apply position resolution.\n     * @method postSolvePosition\n     * @param {body[]} bodies\n     */\n    Resolver.postSolvePosition = function(bodies) {\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n\n            // reset contact count\n            body.totalContacts = 0;\n\n            if (body.positionImpulse.x !== 0 || body.positionImpulse.y !== 0) {\n                // update body geometry\n                for (var j = 0; j < body.parts.length; j++) {\n                    var part = body.parts[j];\n                    Vertices.translate(part.vertices, body.positionImpulse);\n                    Bounds.update(part.bounds, part.vertices, body.velocity);\n                    part.position.x += body.positionImpulse.x;\n                    part.position.y += body.positionImpulse.y;\n                }\n\n                // move the body without changing velocity\n                body.positionPrev.x += body.positionImpulse.x;\n                body.positionPrev.y += body.positionImpulse.y;\n\n                if (Vector.dot(body.positionImpulse, body.velocity) < 0) {\n                    // reset cached impulse if the body has velocity along it\n                    body.positionImpulse.x = 0;\n                    body.positionImpulse.y = 0;\n                } else {\n                    // warm the next iteration\n                    body.positionImpulse.x *= Resolver._positionWarming;\n                    body.positionImpulse.y *= Resolver._positionWarming;\n                }\n            }\n        }\n    };\n\n    /**\n     * Prepare pairs for velocity solving.\n     * @method preSolveVelocity\n     * @param {pair[]} pairs\n     */\n    Resolver.preSolveVelocity = function(pairs) {\n        var i,\n            j,\n            pair,\n            contacts,\n            collision,\n            bodyA,\n            bodyB,\n            normal,\n            tangent,\n            contact,\n            contactVertex,\n            normalImpulse,\n            tangentImpulse,\n            offset,\n            impulse = Vector._temp[0],\n            tempA = Vector._temp[1];\n        \n        for (i = 0; i < pairs.length; i++) {\n            pair = pairs[i];\n            \n            if (!pair.isActive || pair.isSensor)\n                continue;\n            \n            contacts = pair.activeContacts;\n            collision = pair.collision;\n            bodyA = collision.parentA;\n            bodyB = collision.parentB;\n            normal = collision.normal;\n            tangent = collision.tangent;\n\n            // resolve each contact\n            for (j = 0; j < contacts.length; j++) {\n                contact = contacts[j];\n                contactVertex = contact.vertex;\n                normalImpulse = contact.normalImpulse;\n                tangentImpulse = contact.tangentImpulse;\n\n                if (normalImpulse !== 0 || tangentImpulse !== 0) {\n                    // total impulse from contact\n                    impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse);\n                    impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse);\n                    \n                    // apply impulse from contact\n                    if (!(bodyA.isStatic || bodyA.isSleeping)) {\n                        offset = Vector.sub(contactVertex, bodyA.position, tempA);\n                        bodyA.positionPrev.x += impulse.x * bodyA.inverseMass;\n                        bodyA.positionPrev.y += impulse.y * bodyA.inverseMass;\n                        bodyA.anglePrev += Vector.cross(offset, impulse) * bodyA.inverseInertia;\n                    }\n\n                    if (!(bodyB.isStatic || bodyB.isSleeping)) {\n                        offset = Vector.sub(contactVertex, bodyB.position, tempA);\n                        bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass;\n                        bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass;\n                        bodyB.anglePrev -= Vector.cross(offset, impulse) * bodyB.inverseInertia;\n                    }\n                }\n            }\n        }\n    };\n\n    /**\n     * Find a solution for pair velocities.\n     * @method solveVelocity\n     * @param {pair[]} pairs\n     * @param {number} timeScale\n     */\n    Resolver.solveVelocity = function(pairs, timeScale) {\n        var timeScaleSquared = timeScale * timeScale,\n            impulse = Vector._temp[0],\n            tempA = Vector._temp[1],\n            tempB = Vector._temp[2],\n            tempC = Vector._temp[3],\n            tempD = Vector._temp[4],\n            tempE = Vector._temp[5];\n        \n        for (var i = 0; i < pairs.length; i++) {\n            var pair = pairs[i];\n            \n            if (!pair.isActive || pair.isSensor)\n                continue;\n            \n            var collision = pair.collision,\n                bodyA = collision.parentA,\n                bodyB = collision.parentB,\n                normal = collision.normal,\n                tangent = collision.tangent,\n                contacts = pair.activeContacts,\n                contactShare = 1 / contacts.length;\n\n            // update body velocities\n            bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x;\n            bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y;\n            bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x;\n            bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y;\n            bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev;\n            bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev;\n\n            // resolve each contact\n            for (var j = 0; j < contacts.length; j++) {\n                var contact = contacts[j],\n                    contactVertex = contact.vertex,\n                    offsetA = Vector.sub(contactVertex, bodyA.position, tempA),\n                    offsetB = Vector.sub(contactVertex, bodyB.position, tempB),\n                    velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity), tempC),\n                    velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity), tempD), \n                    relativeVelocity = Vector.sub(velocityPointA, velocityPointB, tempE),\n                    normalVelocity = Vector.dot(normal, relativeVelocity);\n\n                var tangentVelocity = Vector.dot(tangent, relativeVelocity),\n                    tangentSpeed = Math.abs(tangentVelocity),\n                    tangentVelocityDirection = Common.sign(tangentVelocity);\n\n                // raw impulses\n                var normalImpulse = (1 + pair.restitution) * normalVelocity,\n                    normalForce = Common.clamp(pair.separation + normalVelocity, 0, 1) * Resolver._frictionNormalMultiplier;\n\n                // coulomb friction\n                var tangentImpulse = tangentVelocity,\n                    maxFriction = Infinity;\n\n                if (tangentSpeed > pair.friction * pair.frictionStatic * normalForce * timeScaleSquared) {\n                    maxFriction = tangentSpeed;\n                    tangentImpulse = Common.clamp(\n                        pair.friction * tangentVelocityDirection * timeScaleSquared,\n                        -maxFriction, maxFriction\n                    );\n                }\n\n                // modify impulses accounting for mass, inertia and offset\n                var oAcN = Vector.cross(offsetA, normal),\n                    oBcN = Vector.cross(offsetB, normal),\n                    share = contactShare / (bodyA.inverseMass + bodyB.inverseMass + bodyA.inverseInertia * oAcN * oAcN  + bodyB.inverseInertia * oBcN * oBcN);\n\n                normalImpulse *= share;\n                tangentImpulse *= share;\n\n                // handle high velocity and resting collisions separately\n                if (normalVelocity < 0 && normalVelocity * normalVelocity > Resolver._restingThresh * timeScaleSquared) {\n                    // high normal velocity so clear cached contact normal impulse\n                    contact.normalImpulse = 0;\n                } else {\n                    // solve resting collision constraints using Erin Catto's method (GDC08)\n                    // impulse constraint tends to 0\n                    var contactNormalImpulse = contact.normalImpulse;\n                    contact.normalImpulse = Math.min(contact.normalImpulse + normalImpulse, 0);\n                    normalImpulse = contact.normalImpulse - contactNormalImpulse;\n                }\n\n                // handle high velocity and resting collisions separately\n                if (tangentVelocity * tangentVelocity > Resolver._restingThreshTangent * timeScaleSquared) {\n                    // high tangent velocity so clear cached contact tangent impulse\n                    contact.tangentImpulse = 0;\n                } else {\n                    // solve resting collision constraints using Erin Catto's method (GDC08)\n                    // tangent impulse tends to -tangentSpeed or +tangentSpeed\n                    var contactTangentImpulse = contact.tangentImpulse;\n                    contact.tangentImpulse = Common.clamp(contact.tangentImpulse + tangentImpulse, -maxFriction, maxFriction);\n                    tangentImpulse = contact.tangentImpulse - contactTangentImpulse;\n                }\n\n                // total impulse from contact\n                impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse);\n                impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse);\n                \n                // apply impulse from contact\n                if (!(bodyA.isStatic || bodyA.isSleeping)) {\n                    bodyA.positionPrev.x += impulse.x * bodyA.inverseMass;\n                    bodyA.positionPrev.y += impulse.y * bodyA.inverseMass;\n                    bodyA.anglePrev += Vector.cross(offsetA, impulse) * bodyA.inverseInertia;\n                }\n\n                if (!(bodyB.isStatic || bodyB.isSleeping)) {\n                    bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass;\n                    bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass;\n                    bodyB.anglePrev -= Vector.cross(offsetB, impulse) * bodyB.inverseInertia;\n                }\n            }\n        }\n    };\n\n})();\n\n},{\"../core/Common\":14,\"../geometry/Bounds\":24,\"../geometry/Vector\":26,\"../geometry/Vertices\":27}],11:[function(require,module,exports){\n/**\n* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem.\n*\n* @class SAT\n*/\n\n// TODO: true circles and curves\n\nvar SAT = {};\n\nmodule.exports = SAT;\n\nvar Vertices = require('../geometry/Vertices');\nvar Vector = require('../geometry/Vector');\n\n(function() {\n\n    /**\n     * Detect collision between two bodies using the Separating Axis Theorem.\n     * @method collides\n     * @param {body} bodyA\n     * @param {body} bodyB\n     * @param {collision} previousCollision\n     * @return {collision} collision\n     */\n    SAT.collides = function(bodyA, bodyB, previousCollision) {\n        var overlapAB,\n            overlapBA, \n            minOverlap,\n            collision,\n            prevCol = previousCollision,\n            canReusePrevCol = false;\n\n        if (prevCol) {\n            // estimate total motion\n            var parentA = bodyA.parent,\n                parentB = bodyB.parent,\n                motion = parentA.speed * parentA.speed + parentA.angularSpeed * parentA.angularSpeed\n                       + parentB.speed * parentB.speed + parentB.angularSpeed * parentB.angularSpeed;\n\n            // we may be able to (partially) reuse collision result \n            // but only safe if collision was resting\n            canReusePrevCol = prevCol && prevCol.collided && motion < 0.2;\n\n            // reuse collision object\n            collision = prevCol;\n        } else {\n            collision = { collided: false, bodyA: bodyA, bodyB: bodyB };\n        }\n\n        if (prevCol && canReusePrevCol) {\n            // if we can reuse the collision result\n            // we only need to test the previously found axis\n            var axisBodyA = collision.axisBody,\n                axisBodyB = axisBodyA === bodyA ? bodyB : bodyA,\n                axes = [axisBodyA.axes[prevCol.axisNumber]];\n\n            minOverlap = _overlapAxes(axisBodyA.vertices, axisBodyB.vertices, axes);\n            collision.reused = true;\n\n            if (minOverlap.overlap <= 0) {\n                collision.collided = false;\n                return collision;\n            }\n        } else {\n            // if we can't reuse a result, perform a full SAT test\n\n            overlapAB = _overlapAxes(bodyA.vertices, bodyB.vertices, bodyA.axes);\n\n            if (overlapAB.overlap <= 0) {\n                collision.collided = false;\n                return collision;\n            }\n\n            overlapBA = _overlapAxes(bodyB.vertices, bodyA.vertices, bodyB.axes);\n\n            if (overlapBA.overlap <= 0) {\n                collision.collided = false;\n                return collision;\n            }\n\n            if (overlapAB.overlap < overlapBA.overlap) {\n                minOverlap = overlapAB;\n                collision.axisBody = bodyA;\n            } else {\n                minOverlap = overlapBA;\n                collision.axisBody = bodyB;\n            }\n\n            // important for reuse later\n            collision.axisNumber = minOverlap.axisNumber;\n        }\n\n        collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB;\n        collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA;\n        collision.collided = true;\n        collision.normal = minOverlap.axis;\n        collision.depth = minOverlap.overlap;\n        collision.parentA = collision.bodyA.parent;\n        collision.parentB = collision.bodyB.parent;\n        \n        bodyA = collision.bodyA;\n        bodyB = collision.bodyB;\n\n        // ensure normal is facing away from bodyA\n        if (Vector.dot(collision.normal, Vector.sub(bodyB.position, bodyA.position)) > 0) \n            collision.normal = Vector.neg(collision.normal);\n\n        collision.tangent = Vector.perp(collision.normal);\n\n        collision.penetration = { \n            x: collision.normal.x * collision.depth, \n            y: collision.normal.y * collision.depth \n        };\n\n        // find support points, there is always either exactly one or two\n        var verticesB = _findSupports(bodyA, bodyB, collision.normal),\n            supports = collision.supports || [];\n        supports.length = 0;\n\n        // find the supports from bodyB that are inside bodyA\n        if (Vertices.contains(bodyA.vertices, verticesB[0]))\n            supports.push(verticesB[0]);\n\n        if (Vertices.contains(bodyA.vertices, verticesB[1]))\n            supports.push(verticesB[1]);\n\n        // find the supports from bodyA that are inside bodyB\n        if (supports.length < 2) {\n            var verticesA = _findSupports(bodyB, bodyA, Vector.neg(collision.normal));\n                \n            if (Vertices.contains(bodyB.vertices, verticesA[0]))\n                supports.push(verticesA[0]);\n\n            if (supports.length < 2 && Vertices.contains(bodyB.vertices, verticesA[1]))\n                supports.push(verticesA[1]);\n        }\n\n        // account for the edge case of overlapping but no vertex containment\n        if (supports.length < 1)\n            supports = [verticesB[0]];\n        \n        collision.supports = supports;\n\n        return collision;\n    };\n\n    /**\n     * Find the overlap between two sets of vertices.\n     * @method _overlapAxes\n     * @private\n     * @param {} verticesA\n     * @param {} verticesB\n     * @param {} axes\n     * @return result\n     */\n    var _overlapAxes = function(verticesA, verticesB, axes) {\n        var projectionA = Vector._temp[0], \n            projectionB = Vector._temp[1],\n            result = { overlap: Number.MAX_VALUE },\n            overlap,\n            axis;\n\n        for (var i = 0; i < axes.length; i++) {\n            axis = axes[i];\n\n            _projectToAxis(projectionA, verticesA, axis);\n            _projectToAxis(projectionB, verticesB, axis);\n\n            overlap = Math.min(projectionA.max - projectionB.min, projectionB.max - projectionA.min);\n\n            if (overlap <= 0) {\n                result.overlap = overlap;\n                return result;\n            }\n\n            if (overlap < result.overlap) {\n                result.overlap = overlap;\n                result.axis = axis;\n                result.axisNumber = i;\n            }\n        }\n\n        return result;\n    };\n\n    /**\n     * Projects vertices on an axis and returns an interval.\n     * @method _projectToAxis\n     * @private\n     * @param {} projection\n     * @param {} vertices\n     * @param {} axis\n     */\n    var _projectToAxis = function(projection, vertices, axis) {\n        var min = Vector.dot(vertices[0], axis),\n            max = min;\n\n        for (var i = 1; i < vertices.length; i += 1) {\n            var dot = Vector.dot(vertices[i], axis);\n\n            if (dot > max) { \n                max = dot; \n            } else if (dot < min) { \n                min = dot; \n            }\n        }\n\n        projection.min = min;\n        projection.max = max;\n    };\n    \n    /**\n     * Finds supporting vertices given two bodies along a given direction using hill-climbing.\n     * @method _findSupports\n     * @private\n     * @param {} bodyA\n     * @param {} bodyB\n     * @param {} normal\n     * @return [vector]\n     */\n    var _findSupports = function(bodyA, bodyB, normal) {\n        var nearestDistance = Number.MAX_VALUE,\n            vertexToBody = Vector._temp[0],\n            vertices = bodyB.vertices,\n            bodyAPosition = bodyA.position,\n            distance,\n            vertex,\n            vertexA,\n            vertexB;\n\n        // find closest vertex on bodyB\n        for (var i = 0; i < vertices.length; i++) {\n            vertex = vertices[i];\n            vertexToBody.x = vertex.x - bodyAPosition.x;\n            vertexToBody.y = vertex.y - bodyAPosition.y;\n            distance = -Vector.dot(normal, vertexToBody);\n\n            if (distance < nearestDistance) {\n                nearestDistance = distance;\n                vertexA = vertex;\n            }\n        }\n\n        // find next closest vertex using the two connected to it\n        var prevIndex = vertexA.index - 1 >= 0 ? vertexA.index - 1 : vertices.length - 1;\n        vertex = vertices[prevIndex];\n        vertexToBody.x = vertex.x - bodyAPosition.x;\n        vertexToBody.y = vertex.y - bodyAPosition.y;\n        nearestDistance = -Vector.dot(normal, vertexToBody);\n        vertexB = vertex;\n\n        var nextIndex = (vertexA.index + 1) % vertices.length;\n        vertex = vertices[nextIndex];\n        vertexToBody.x = vertex.x - bodyAPosition.x;\n        vertexToBody.y = vertex.y - bodyAPosition.y;\n        distance = -Vector.dot(normal, vertexToBody);\n        if (distance < nearestDistance) {\n            vertexB = vertex;\n        }\n\n        return [vertexA, vertexB];\n    };\n\n})();\n\n},{\"../geometry/Vector\":26,\"../geometry/Vertices\":27}],12:[function(require,module,exports){\n/**\n* The `Matter.Constraint` module contains methods for creating and manipulating constraints.\n* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).\n* The stiffness of constraints can be modified to create springs or elastic.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Constraint\n*/\n\n// TODO: fix instability issues with torque\n// TODO: linked constraints\n// TODO: breakable constraints\n// TODO: collision constraints\n// TODO: allow constrained bodies to sleep\n// TODO: handle 0 length constraints properly\n// TODO: impulse caching and warming\n\nvar Constraint = {};\n\nmodule.exports = Constraint;\n\nvar Vertices = require('../geometry/Vertices');\nvar Vector = require('../geometry/Vector');\nvar Sleeping = require('../core/Sleeping');\nvar Bounds = require('../geometry/Bounds');\nvar Axes = require('../geometry/Axes');\nvar Common = require('../core/Common');\n\n(function() {\n\n    var _minLength = 0.000001,\n        _minDifference = 0.001;\n\n    /**\n     * Creates a new constraint.\n     * All properties have default values, and many are pre-calculated automatically based on other properties.\n     * See the properties section below for detailed information on what you can pass via the `options` object.\n     * @method create\n     * @param {} options\n     * @return {constraint} constraint\n     */\n    Constraint.create = function(options) {\n        var constraint = options;\n\n        // if bodies defined but no points, use body centre\n        if (constraint.bodyA && !constraint.pointA)\n            constraint.pointA = { x: 0, y: 0 };\n        if (constraint.bodyB && !constraint.pointB)\n            constraint.pointB = { x: 0, y: 0 };\n\n        // calculate static length using initial world space points\n        var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA,\n            initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB,\n            length = Vector.magnitude(Vector.sub(initialPointA, initialPointB));\n    \n        constraint.length = constraint.length || length || _minLength;\n\n        // render\n        var render = {\n            visible: true,\n            lineWidth: 2,\n            strokeStyle: '#666'\n        };\n        \n        constraint.render = Common.extend(render, constraint.render);\n\n        // option defaults\n        constraint.id = constraint.id || Common.nextId();\n        constraint.label = constraint.label || 'Constraint';\n        constraint.type = 'constraint';\n        constraint.stiffness = constraint.stiffness || 1;\n        constraint.angularStiffness = constraint.angularStiffness || 0;\n        constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA;\n        constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB;\n\n        return constraint;\n    };\n\n    /**\n     * Solves all constraints in a list of collisions.\n     * @private\n     * @method solveAll\n     * @param {constraint[]} constraints\n     * @param {number} timeScale\n     */\n    Constraint.solveAll = function(constraints, timeScale) {\n        for (var i = 0; i < constraints.length; i++) {\n            Constraint.solve(constraints[i], timeScale);\n        }\n    };\n\n    /**\n     * Solves a distance constraint with Gauss-Siedel method.\n     * @private\n     * @method solve\n     * @param {constraint} constraint\n     * @param {number} timeScale\n     */\n    Constraint.solve = function(constraint, timeScale) {\n        var bodyA = constraint.bodyA,\n            bodyB = constraint.bodyB,\n            pointA = constraint.pointA,\n            pointB = constraint.pointB;\n\n        // update reference angle\n        if (bodyA && !bodyA.isStatic) {\n            constraint.pointA = Vector.rotate(pointA, bodyA.angle - constraint.angleA);\n            constraint.angleA = bodyA.angle;\n        }\n        \n        // update reference angle\n        if (bodyB && !bodyB.isStatic) {\n            constraint.pointB = Vector.rotate(pointB, bodyB.angle - constraint.angleB);\n            constraint.angleB = bodyB.angle;\n        }\n\n        var pointAWorld = pointA,\n            pointBWorld = pointB;\n\n        if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA);\n        if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB);\n\n        if (!pointAWorld || !pointBWorld)\n            return;\n\n        var delta = Vector.sub(pointAWorld, pointBWorld),\n            currentLength = Vector.magnitude(delta);\n\n        // prevent singularity\n        if (currentLength === 0)\n            currentLength = _minLength;\n\n        // solve distance constraint with Gauss-Siedel method\n        var difference = (currentLength - constraint.length) / currentLength,\n            normal = Vector.div(delta, currentLength),\n            force = Vector.mult(delta, difference * 0.5 * constraint.stiffness * timeScale * timeScale);\n        \n        // if difference is very small, we can skip\n        if (Math.abs(1 - (currentLength / constraint.length)) < _minDifference * timeScale)\n            return;\n\n        var velocityPointA,\n            velocityPointB,\n            offsetA,\n            offsetB,\n            oAn,\n            oBn,\n            bodyADenom,\n            bodyBDenom;\n    \n        if (bodyA && !bodyA.isStatic) {\n            // point body offset\n            offsetA = { \n                x: pointAWorld.x - bodyA.position.x + force.x, \n                y: pointAWorld.y - bodyA.position.y + force.y\n            };\n            \n            // update velocity\n            bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x;\n            bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y;\n            bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev;\n            \n            // find point velocity and body mass\n            velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity));\n            oAn = Vector.dot(offsetA, normal);\n            bodyADenom = bodyA.inverseMass + bodyA.inverseInertia * oAn * oAn;\n        } else {\n            velocityPointA = { x: 0, y: 0 };\n            bodyADenom = bodyA ? bodyA.inverseMass : 0;\n        }\n            \n        if (bodyB && !bodyB.isStatic) {\n            // point body offset\n            offsetB = { \n                x: pointBWorld.x - bodyB.position.x - force.x, \n                y: pointBWorld.y - bodyB.position.y - force.y \n            };\n            \n            // update velocity\n            bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x;\n            bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y;\n            bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev;\n\n            // find point velocity and body mass\n            velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity));\n            oBn = Vector.dot(offsetB, normal);\n            bodyBDenom = bodyB.inverseMass + bodyB.inverseInertia * oBn * oBn;\n        } else {\n            velocityPointB = { x: 0, y: 0 };\n            bodyBDenom = bodyB ? bodyB.inverseMass : 0;\n        }\n        \n        var relativeVelocity = Vector.sub(velocityPointB, velocityPointA),\n            normalImpulse = Vector.dot(normal, relativeVelocity) / (bodyADenom + bodyBDenom);\n    \n        if (normalImpulse > 0) normalImpulse = 0;\n    \n        var normalVelocity = {\n            x: normal.x * normalImpulse, \n            y: normal.y * normalImpulse\n        };\n\n        var torque;\n \n        if (bodyA && !bodyA.isStatic) {\n            torque = Vector.cross(offsetA, normalVelocity) * bodyA.inverseInertia * (1 - constraint.angularStiffness);\n\n            // keep track of applied impulses for post solving\n            bodyA.constraintImpulse.x -= force.x;\n            bodyA.constraintImpulse.y -= force.y;\n            bodyA.constraintImpulse.angle += torque;\n\n            // apply forces\n            bodyA.position.x -= force.x;\n            bodyA.position.y -= force.y;\n            bodyA.angle += torque;\n        }\n\n        if (bodyB && !bodyB.isStatic) {\n            torque = Vector.cross(offsetB, normalVelocity) * bodyB.inverseInertia * (1 - constraint.angularStiffness);\n\n            // keep track of applied impulses for post solving\n            bodyB.constraintImpulse.x += force.x;\n            bodyB.constraintImpulse.y += force.y;\n            bodyB.constraintImpulse.angle -= torque;\n            \n            // apply forces\n            bodyB.position.x += force.x;\n            bodyB.position.y += force.y;\n            bodyB.angle -= torque;\n        }\n\n    };\n\n    /**\n     * Performs body updates required after solving constraints.\n     * @private\n     * @method postSolveAll\n     * @param {body[]} bodies\n     */\n    Constraint.postSolveAll = function(bodies) {\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i],\n                impulse = body.constraintImpulse;\n\n            if (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0) {\n                continue;\n            }\n\n            Sleeping.set(body, false);\n\n            // update geometry and reset\n            for (var j = 0; j < body.parts.length; j++) {\n                var part = body.parts[j];\n                \n                Vertices.translate(part.vertices, impulse);\n\n                if (j > 0) {\n                    part.position.x += impulse.x;\n                    part.position.y += impulse.y;\n                }\n\n                if (impulse.angle !== 0) {\n                    Vertices.rotate(part.vertices, impulse.angle, body.position);\n                    Axes.rotate(part.axes, impulse.angle);\n                    if (j > 0) {\n                        Vector.rotateAbout(part.position, impulse.angle, body.position, part.position);\n                    }\n                }\n\n                Bounds.update(part.bounds, part.vertices, body.velocity);\n            }\n\n            impulse.angle = 0;\n            impulse.x = 0;\n            impulse.y = 0;\n        }\n    };\n\n    /*\n    *\n    *  Properties Documentation\n    *\n    */\n\n    /**\n     * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\n     *\n     * @property id\n     * @type number\n     */\n\n    /**\n     * A `String` denoting the type of object.\n     *\n     * @property type\n     * @type string\n     * @default \"constraint\"\n     * @readOnly\n     */\n\n    /**\n     * An arbitrary `String` name to help the user identify and manage bodies.\n     *\n     * @property label\n     * @type string\n     * @default \"Constraint\"\n     */\n\n    /**\n     * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\n     *\n     * @property render\n     * @type object\n     */\n\n    /**\n     * A flag that indicates if the constraint should be rendered.\n     *\n     * @property render.visible\n     * @type boolean\n     * @default true\n     */\n\n    /**\n     * A `Number` that defines the line width to use when rendering the constraint outline.\n     * A value of `0` means no outline will be rendered.\n     *\n     * @property render.lineWidth\n     * @type number\n     * @default 2\n     */\n\n    /**\n     * A `String` that defines the stroke style to use when rendering the constraint outline.\n     * It is the same as when using a canvas, so it accepts CSS style property values.\n     *\n     * @property render.strokeStyle\n     * @type string\n     * @default a random colour\n     */\n\n    /**\n     * The first possible `Body` that this constraint is attached to.\n     *\n     * @property bodyA\n     * @type body\n     * @default null\n     */\n\n    /**\n     * The second possible `Body` that this constraint is attached to.\n     *\n     * @property bodyB\n     * @type body\n     * @default null\n     */\n\n    /**\n     * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position.\n     *\n     * @property pointA\n     * @type vector\n     * @default { x: 0, y: 0 }\n     */\n\n    /**\n     * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position.\n     *\n     * @property pointB\n     * @type vector\n     * @default { x: 0, y: 0 }\n     */\n\n    /**\n     * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`.\n     * A value of `1` means the constraint should be very stiff.\n     * A value of `0.2` means the constraint acts like a soft spring.\n     *\n     * @property stiffness\n     * @type number\n     * @default 1\n     */\n\n    /**\n     * A `Number` that specifies the target resting length of the constraint. \n     * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\n     *\n     * @property length\n     * @type number\n     */\n\n})();\n\n},{\"../core/Common\":14,\"../core/Sleeping\":20,\"../geometry/Axes\":23,\"../geometry/Bounds\":24,\"../geometry/Vector\":26,\"../geometry/Vertices\":27}],13:[function(require,module,exports){\n/**\n* The `Matter.MouseConstraint` module contains methods for creating mouse constraints.\n* Mouse constraints are used for allowing user interaction, providing the ability to move bodies via the mouse or touch.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class MouseConstraint\n*/\n\nvar MouseConstraint = {};\n\nmodule.exports = MouseConstraint;\n\nvar Vertices = require('../geometry/Vertices');\nvar Sleeping = require('../core/Sleeping');\nvar Mouse = require('../core/Mouse');\nvar Events = require('../core/Events');\nvar Detector = require('../collision/Detector');\nvar Constraint = require('./Constraint');\nvar Composite = require('../body/Composite');\nvar Common = require('../core/Common');\nvar Bounds = require('../geometry/Bounds');\n\n(function() {\n\n    /**\n     * Creates a new mouse constraint.\n     * All properties have default values, and many are pre-calculated automatically based on other properties.\n     * See the properties section below for detailed information on what you can pass via the `options` object.\n     * @method create\n     * @param {engine} engine\n     * @param {} options\n     * @return {MouseConstraint} A new MouseConstraint\n     */\n    MouseConstraint.create = function(engine, options) {\n        var mouse = (engine ? engine.mouse : null) || (options ? options.mouse : null);\n\n        if (!mouse) {\n            if (engine && engine.render && engine.render.canvas) {\n                mouse = Mouse.create(engine.render.canvas);\n            } else if (options && options.element) {\n                mouse = Mouse.create(options.element);\n            } else {\n                mouse = Mouse.create();\n                Common.log('MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected', 'warn');\n            }\n        }\n\n        var constraint = Constraint.create({ \n            label: 'Mouse Constraint',\n            pointA: mouse.position,\n            pointB: { x: 0, y: 0 },\n            length: 0.01, \n            stiffness: 0.1,\n            angularStiffness: 1,\n            render: {\n                strokeStyle: '#90EE90',\n                lineWidth: 3\n            }\n        });\n\n        var defaults = {\n            type: 'mouseConstraint',\n            mouse: mouse,\n            element: null,\n            body: null,\n            constraint: constraint,\n            collisionFilter: {\n                category: 0x0001,\n                mask: 0xFFFFFFFF,\n                group: 0\n            }\n        };\n\n        var mouseConstraint = Common.extend(defaults, options);\n\n        Events.on(engine, 'tick', function() {\n            var allBodies = Composite.allBodies(engine.world);\n            MouseConstraint.update(mouseConstraint, allBodies);\n            _triggerEvents(mouseConstraint);\n        });\n\n        return mouseConstraint;\n    };\n\n    /**\n     * Updates the given mouse constraint.\n     * @private\n     * @method update\n     * @param {MouseConstraint} mouseConstraint\n     * @param {body[]} bodies\n     */\n    MouseConstraint.update = function(mouseConstraint, bodies) {\n        var mouse = mouseConstraint.mouse,\n            constraint = mouseConstraint.constraint,\n            body = mouseConstraint.body;\n\n        if (mouse.button === 0) {\n            if (!constraint.bodyB) {\n                for (var i = 0; i < bodies.length; i++) {\n                    body = bodies[i];\n                    if (Bounds.contains(body.bounds, mouse.position) \n                            && Detector.canCollide(body.collisionFilter, mouseConstraint.collisionFilter)) {\n                        for (var j = body.parts.length > 1 ? 1 : 0; j < body.parts.length; j++) {\n                            var part = body.parts[j];\n                            if (Vertices.contains(part.vertices, mouse.position)) {\n                                constraint.pointA = mouse.position;\n                                constraint.bodyB = mouseConstraint.body = body;\n                                constraint.pointB = { x: mouse.position.x - body.position.x, y: mouse.position.y - body.position.y };\n                                constraint.angleB = body.angle;\n\n                                Sleeping.set(body, false);\n                                Events.trigger(mouseConstraint, 'startdrag', { mouse: mouse, body: body });\n\n                                break;\n                            }\n                        }\n                    }\n                }\n            } else {\n                Sleeping.set(constraint.bodyB, false);\n                constraint.pointA = mouse.position;\n            }\n        } else {\n            constraint.bodyB = mouseConstraint.body = null;\n            constraint.pointB = null;\n\n            if (body)\n                Events.trigger(mouseConstraint, 'enddrag', { mouse: mouse, body: body });\n        }\n    };\n\n    /**\n     * Triggers mouse constraint events.\n     * @method _triggerEvents\n     * @private\n     * @param {mouse} mouseConstraint\n     */\n    var _triggerEvents = function(mouseConstraint) {\n        var mouse = mouseConstraint.mouse,\n            mouseEvents = mouse.sourceEvents;\n\n        if (mouseEvents.mousemove)\n            Events.trigger(mouseConstraint, 'mousemove', { mouse: mouse });\n\n        if (mouseEvents.mousedown)\n            Events.trigger(mouseConstraint, 'mousedown', { mouse: mouse });\n\n        if (mouseEvents.mouseup)\n            Events.trigger(mouseConstraint, 'mouseup', { mouse: mouse });\n\n        // reset the mouse state ready for the next step\n        Mouse.clearSourceEvents(mouse);\n    };\n\n    /*\n    *\n    *  Events Documentation\n    *\n    */\n\n    /**\n    * Fired when the mouse has moved (or a touch moves) during the last step\n    *\n    * @event mousemove\n    * @param {} event An event object\n    * @param {mouse} event.mouse The engine's mouse instance\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired when the mouse is down (or a touch has started) during the last step\n    *\n    * @event mousedown\n    * @param {} event An event object\n    * @param {mouse} event.mouse The engine's mouse instance\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired when the mouse is up (or a touch has ended) during the last step\n    *\n    * @event mouseup\n    * @param {} event An event object\n    * @param {mouse} event.mouse The engine's mouse instance\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired when the user starts dragging a body\n    *\n    * @event startdrag\n    * @param {} event An event object\n    * @param {mouse} event.mouse The engine's mouse instance\n    * @param {body} event.body The body being dragged\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired when the user ends dragging a body\n    *\n    * @event enddrag\n    * @param {} event An event object\n    * @param {mouse} event.mouse The engine's mouse instance\n    * @param {body} event.body The body that has stopped being dragged\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /*\n    *\n    *  Properties Documentation\n    *\n    */\n\n    /**\n     * A `String` denoting the type of object.\n     *\n     * @property type\n     * @type string\n     * @default \"constraint\"\n     * @readOnly\n     */\n\n    /**\n     * The `Mouse` instance in use. If not supplied in `MouseConstraint.create`, one will be created.\n     *\n     * @property mouse\n     * @type mouse\n     * @default mouse\n     */\n\n    /**\n     * The `Body` that is currently being moved by the user, or `null` if no body.\n     *\n     * @property body\n     * @type body\n     * @default null\n     */\n\n    /**\n     * The `Constraint` object that is used to move the body during interaction.\n     *\n     * @property constraint\n     * @type constraint\n     */\n\n    /**\n     * An `Object` that specifies the collision filter properties.\n     * The collision filter allows the user to define which types of body this mouse constraint can interact with.\n     * See `body.collisionFilter` for more information.\n     *\n     * @property collisionFilter\n     * @type object\n     */\n\n})();\n\n},{\"../body/Composite\":2,\"../collision/Detector\":5,\"../core/Common\":14,\"../core/Events\":16,\"../core/Mouse\":18,\"../core/Sleeping\":20,\"../geometry/Bounds\":24,\"../geometry/Vertices\":27,\"./Constraint\":12}],14:[function(require,module,exports){\n/**\n* The `Matter.Common` module contains utility functions that are common to all modules.\n*\n* @class Common\n*/\n\nvar Common = {};\n\nmodule.exports = Common;\n\n(function() {\n\n    Common._nextId = 0;\n    Common._seed = 0;\n\n    /**\n     * Extends the object in the first argument using the object in the second argument.\n     * @method extend\n     * @param {} obj\n     * @param {boolean} deep\n     * @return {} obj extended\n     */\n    Common.extend = function(obj, deep) {\n        var argsStart,\n            args,\n            deepClone;\n\n        if (typeof deep === 'boolean') {\n            argsStart = 2;\n            deepClone = deep;\n        } else {\n            argsStart = 1;\n            deepClone = true;\n        }\n\n        args = Array.prototype.slice.call(arguments, argsStart);\n\n        for (var i = 0; i < args.length; i++) {\n            var source = args[i];\n\n            if (source) {\n                for (var prop in source) {\n                    if (deepClone && source[prop] && source[prop].constructor === Object) {\n                        if (!obj[prop] || obj[prop].constructor === Object) {\n                            obj[prop] = obj[prop] || {};\n                            Common.extend(obj[prop], deepClone, source[prop]);\n                        } else {\n                            obj[prop] = source[prop];\n                        }\n                    } else {\n                        obj[prop] = source[prop];\n                    }\n                }\n            }\n        }\n        \n        return obj;\n    };\n\n    /**\n     * Creates a new clone of the object, if deep is true references will also be cloned.\n     * @method clone\n     * @param {} obj\n     * @param {bool} deep\n     * @return {} obj cloned\n     */\n    Common.clone = function(obj, deep) {\n        return Common.extend({}, deep, obj);\n    };\n\n    /**\n     * Returns the list of keys for the given object.\n     * @method keys\n     * @param {} obj\n     * @return {string[]} keys\n     */\n    Common.keys = function(obj) {\n        if (Object.keys)\n            return Object.keys(obj);\n\n        // avoid hasOwnProperty for performance\n        var keys = [];\n        for (var key in obj)\n            keys.push(key);\n        return keys;\n    };\n\n    /**\n     * Returns the list of values for the given object.\n     * @method values\n     * @param {} obj\n     * @return {array} Array of the objects property values\n     */\n    Common.values = function(obj) {\n        var values = [];\n        \n        if (Object.keys) {\n            var keys = Object.keys(obj);\n            for (var i = 0; i < keys.length; i++) {\n                values.push(obj[keys[i]]);\n            }\n            return values;\n        }\n        \n        // avoid hasOwnProperty for performance\n        for (var key in obj)\n            values.push(obj[key]);\n        return values;\n    };\n\n    /**\n     * Returns a hex colour string made by lightening or darkening color by percent.\n     * @method shadeColor\n     * @param {string} color\n     * @param {number} percent\n     * @return {string} A hex colour\n     */\n    Common.shadeColor = function(color, percent) {   \n        // http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color\n        var colorInteger = parseInt(color.slice(1),16), \n            amount = Math.round(2.55 * percent), \n            R = (colorInteger >> 16) + amount, \n            B = (colorInteger >> 8 & 0x00FF) + amount, \n            G = (colorInteger & 0x0000FF) + amount;\n        return \"#\" + (0x1000000 + (R < 255 ? R < 1 ? 0 : R :255) * 0x10000 \n                + (B < 255 ? B < 1 ? 0 : B : 255) * 0x100 \n                + (G < 255 ? G < 1 ? 0 : G : 255)).toString(16).slice(1);\n    };\n\n    /**\n     * Shuffles the given array in-place.\n     * The function uses a seeded random generator.\n     * @method shuffle\n     * @param {array} array\n     * @return {array} array shuffled randomly\n     */\n    Common.shuffle = function(array) {\n        for (var i = array.length - 1; i > 0; i--) {\n            var j = Math.floor(Common.random() * (i + 1));\n            var temp = array[i];\n            array[i] = array[j];\n            array[j] = temp;\n        }\n        return array;\n    };\n\n    /**\n     * Randomly chooses a value from a list with equal probability.\n     * The function uses a seeded random generator.\n     * @method choose\n     * @param {array} choices\n     * @return {object} A random choice object from the array\n     */\n    Common.choose = function(choices) {\n        return choices[Math.floor(Common.random() * choices.length)];\n    };\n\n    /**\n     * Returns true if the object is a HTMLElement, otherwise false.\n     * @method isElement\n     * @param {object} obj\n     * @return {boolean} True if the object is a HTMLElement, otherwise false\n     */\n    Common.isElement = function(obj) {\n        // http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n        try {\n            return obj instanceof HTMLElement;\n        }\n        catch(e){\n            return (typeof obj===\"object\") &&\n              (obj.nodeType===1) && (typeof obj.style === \"object\") &&\n              (typeof obj.ownerDocument ===\"object\");\n        }\n    };\n\n    /**\n     * Returns true if the object is an array.\n     * @method isArray\n     * @param {object} obj\n     * @return {boolean} True if the object is an array, otherwise false\n     */\n    Common.isArray = function(obj) {\n        return Object.prototype.toString.call(obj) === '[object Array]';\n    };\n    \n    /**\n     * Returns the given value clamped between a minimum and maximum value.\n     * @method clamp\n     * @param {number} value\n     * @param {number} min\n     * @param {number} max\n     * @return {number} The value clamped between min and max inclusive\n     */\n    Common.clamp = function(value, min, max) {\n        if (value < min)\n            return min;\n        if (value > max)\n            return max;\n        return value;\n    };\n    \n    /**\n     * Returns the sign of the given value.\n     * @method sign\n     * @param {number} value\n     * @return {number} -1 if negative, +1 if 0 or positive\n     */\n    Common.sign = function(value) {\n        return value < 0 ? -1 : 1;\n    };\n    \n    /**\n     * Returns the current timestamp (high-res if available).\n     * @method now\n     * @return {number} the current timestamp (high-res if available)\n     */\n    Common.now = function() {\n        // http://stackoverflow.com/questions/221294/how-do-you-get-a-timestamp-in-javascript\n        // https://gist.github.com/davidwaterston/2982531\n\n        var performance = window.performance || {};\n\n        performance.now = (function() {\n            return performance.now    ||\n            performance.webkitNow     ||\n            performance.msNow         ||\n            performance.oNow          ||\n            performance.mozNow        ||\n            function() { return +(new Date()); };\n        })();\n              \n        return performance.now();\n    };\n\n    \n    /**\n     * Returns a random value between a minimum and a maximum value inclusive.\n     * The function uses a seeded random generator.\n     * @method random\n     * @param {number} min\n     * @param {number} max\n     * @return {number} A random number between min and max inclusive\n     */\n    Common.random = function(min, max) {\n        min = (typeof min !== \"undefined\") ? min : 0;\n        max = (typeof max !== \"undefined\") ? max : 1;\n        return min + _seededRandom() * (max - min);\n    };\n\n    /**\n     * Converts a CSS hex colour string into an integer.\n     * @method colorToNumber\n     * @param {string} colorString\n     * @return {number} An integer representing the CSS hex string\n     */\n    Common.colorToNumber = function(colorString) {\n        colorString = colorString.replace('#','');\n\n        if (colorString.length == 3) {\n            colorString = colorString.charAt(0) + colorString.charAt(0)\n                        + colorString.charAt(1) + colorString.charAt(1)\n                        + colorString.charAt(2) + colorString.charAt(2);\n        }\n\n        return parseInt(colorString, 16);\n    };\n\n    /**\n     * A wrapper for console.log, for providing errors and warnings.\n     * @method log\n     * @param {string} message\n     * @param {string} type\n     */\n    Common.log = function(message, type) {\n        if (!console || !console.log || !console.warn)\n            return;\n\n        switch (type) {\n\n        case 'warn':\n            console.warn('Matter.js:', message);\n            break;\n        case 'error':\n            console.log('Matter.js:', message);\n            break;\n\n        }\n    };\n\n    /**\n     * Returns the next unique sequential ID.\n     * @method nextId\n     * @return {Number} Unique sequential ID\n     */\n    Common.nextId = function() {\n        return Common._nextId++;\n    };\n\n    /**\n     * A cross browser compatible indexOf implementation.\n     * @method indexOf\n     * @param {array} haystack\n     * @param {object} needle\n     */\n    Common.indexOf = function(haystack, needle) {\n        if (haystack.indexOf)\n            return haystack.indexOf(needle);\n\n        for (var i = 0; i < haystack.length; i++) {\n            if (haystack[i] === needle)\n                return i;\n        }\n\n        return -1;\n    };\n\n    var _seededRandom = function() {\n        // https://gist.github.com/ngryman/3830489\n        Common._seed = (Common._seed * 9301 + 49297) % 233280;\n        return Common._seed / 233280;\n    };\n\n})();\n\n},{}],15:[function(require,module,exports){\n/**\n* The `Matter.Engine` module contains methods for creating and manipulating engines.\n* An engine is a controller that manages updating the simulation of the world.\n* See `Matter.Runner` for an optional game loop utility.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Engine\n*/\n\nvar Engine = {};\n\nmodule.exports = Engine;\n\nvar World = require('../body/World');\nvar Sleeping = require('./Sleeping');\nvar Resolver = require('../collision/Resolver');\nvar Render = require('../render/Render');\nvar Pairs = require('../collision/Pairs');\nvar Metrics = require('./Metrics');\nvar Grid = require('../collision/Grid');\nvar Events = require('./Events');\nvar Composite = require('../body/Composite');\nvar Constraint = require('../constraint/Constraint');\nvar Common = require('./Common');\nvar Body = require('../body/Body');\n\n(function() {\n\n    /**\n     * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults.\n     * All properties have default values, and many are pre-calculated automatically based on other properties.\n     * See the properties section below for detailed information on what you can pass via the `options` object.\n     * @method create\n     * @param {object} [options]\n     * @return {engine} engine\n     */\n    Engine.create = function(element, options) {\n        // options may be passed as the first (and only) argument\n        options = Common.isElement(element) ? options : element;\n        element = Common.isElement(element) ? element : null;\n        options = options || {};\n\n        if (element || options.render) {\n            Common.log('Engine.create: engine.render is deprecated (see docs)', 'warn');\n        }\n\n        var defaults = {\n            positionIterations: 6,\n            velocityIterations: 4,\n            constraintIterations: 2,\n            enableSleeping: false,\n            events: [],\n            timing: {\n                timestamp: 0,\n                timeScale: 1\n            },\n            broadphase: {\n                controller: Grid\n            }\n        };\n\n        var engine = Common.extend(defaults, options);\n\n        // @deprecated\n        if (element || engine.render) {\n            var renderDefaults = {\n                element: element,\n                controller: Render\n            };\n            \n            engine.render = Common.extend(renderDefaults, engine.render);\n        }\n\n        // @deprecated\n        if (engine.render && engine.render.controller) {\n            engine.render = engine.render.controller.create(engine.render);\n        }\n\n        // @deprecated\n        if (engine.render) {\n            engine.render.engine = engine;\n        }\n\n        engine.world = options.world || World.create(engine.world);\n        engine.pairs = Pairs.create();\n        engine.broadphase = engine.broadphase.controller.create(engine.broadphase);\n        engine.metrics = engine.metrics || { extended: false };\n\n\n        return engine;\n    };\n\n    /**\n     * Moves the simulation forward in time by `delta` ms.\n     * The `correction` argument is an optional `Number` that specifies the time correction factor to apply to the update.\n     * This can help improve the accuracy of the simulation in cases where `delta` is changing between updates.\n     * The value of `correction` is defined as `delta / lastDelta`, i.e. the percentage change of `delta` over the last step.\n     * Therefore the value is always `1` (no correction) when `delta` constant (or when no correction is desired, which is the default).\n     * See the paper on <a href=\"http://lonesock.net/article/verlet.html\">Time Corrected Verlet</a> for more information.\n     *\n     * Triggers `beforeUpdate` and `afterUpdate` events.\n     * Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.\n     * @method update\n     * @param {engine} engine\n     * @param {number} [delta=16.666]\n     * @param {number} [correction=1]\n     */\n    Engine.update = function(engine, delta, correction) {\n        delta = delta || 1000 / 60;\n        correction = correction || 1;\n\n        var world = engine.world,\n            timing = engine.timing,\n            broadphase = engine.broadphase,\n            broadphasePairs = [],\n            i;\n\n        // increment timestamp\n        timing.timestamp += delta * timing.timeScale;\n\n        // create an event object\n        var event = {\n            timestamp: timing.timestamp\n        };\n\n        Events.trigger(engine, 'beforeUpdate', event);\n\n        // get lists of all bodies and constraints, no matter what composites they are in\n        var allBodies = Composite.allBodies(world),\n            allConstraints = Composite.allConstraints(world);\n\n\n        // if sleeping enabled, call the sleeping controller\n        if (engine.enableSleeping)\n            Sleeping.update(allBodies, timing.timeScale);\n\n        // applies gravity to all bodies\n        _bodiesApplyGravity(allBodies, world.gravity);\n\n        // update all body position and rotation by integration\n        _bodiesUpdate(allBodies, delta, timing.timeScale, correction, world.bounds);\n\n        // update all constraints\n        for (i = 0; i < engine.constraintIterations; i++) {\n            Constraint.solveAll(allConstraints, timing.timeScale);\n        }\n        Constraint.postSolveAll(allBodies);\n\n        // broadphase pass: find potential collision pairs\n        if (broadphase.controller) {\n\n            // if world is dirty, we must flush the whole grid\n            if (world.isModified)\n                broadphase.controller.clear(broadphase);\n\n            // update the grid buckets based on current bodies\n            broadphase.controller.update(broadphase, allBodies, engine, world.isModified);\n            broadphasePairs = broadphase.pairsList;\n        } else {\n\n            // if no broadphase set, we just pass all bodies\n            broadphasePairs = allBodies;\n        }\n\n        // clear all composite modified flags\n        if (world.isModified) {\n            Composite.setModified(world, false, false, true);\n        }\n\n        // narrowphase pass: find actual collisions, then create or update collision pairs\n        var collisions = broadphase.detector(broadphasePairs, engine);\n\n        // update collision pairs\n        var pairs = engine.pairs,\n            timestamp = timing.timestamp;\n        Pairs.update(pairs, collisions, timestamp);\n        Pairs.removeOld(pairs, timestamp);\n\n        // wake up bodies involved in collisions\n        if (engine.enableSleeping)\n            Sleeping.afterCollisions(pairs.list, timing.timeScale);\n\n        // trigger collision events\n        if (pairs.collisionStart.length > 0)\n            Events.trigger(engine, 'collisionStart', { pairs: pairs.collisionStart });\n\n        // iteratively resolve position between collisions\n        Resolver.preSolvePosition(pairs.list);\n        for (i = 0; i < engine.positionIterations; i++) {\n            Resolver.solvePosition(pairs.list, timing.timeScale);\n        }\n        Resolver.postSolvePosition(allBodies);\n\n        // iteratively resolve velocity between collisions\n        Resolver.preSolveVelocity(pairs.list);\n        for (i = 0; i < engine.velocityIterations; i++) {\n            Resolver.solveVelocity(pairs.list, timing.timeScale);\n        }\n\n        // trigger collision events\n        if (pairs.collisionActive.length > 0)\n            Events.trigger(engine, 'collisionActive', { pairs: pairs.collisionActive });\n\n        if (pairs.collisionEnd.length > 0)\n            Events.trigger(engine, 'collisionEnd', { pairs: pairs.collisionEnd });\n\n\n        // clear force buffers\n        _bodiesClearForces(allBodies);\n\n        Events.trigger(engine, 'afterUpdate', event);\n\n        return engine;\n    };\n    \n    /**\n     * Merges two engines by keeping the configuration of `engineA` but replacing the world with the one from `engineB`.\n     * @method merge\n     * @param {engine} engineA\n     * @param {engine} engineB\n     */\n    Engine.merge = function(engineA, engineB) {\n        Common.extend(engineA, engineB);\n        \n        if (engineB.world) {\n            engineA.world = engineB.world;\n\n            Engine.clear(engineA);\n\n            var bodies = Composite.allBodies(engineA.world);\n\n            for (var i = 0; i < bodies.length; i++) {\n                var body = bodies[i];\n                Sleeping.set(body, false);\n                body.id = Common.nextId();\n            }\n        }\n    };\n\n    /**\n     * Clears the engine including the world, pairs and broadphase.\n     * @method clear\n     * @param {engine} engine\n     */\n    Engine.clear = function(engine) {\n        var world = engine.world;\n        \n        Pairs.clear(engine.pairs);\n\n        var broadphase = engine.broadphase;\n        if (broadphase.controller) {\n            var bodies = Composite.allBodies(world);\n            broadphase.controller.clear(broadphase);\n            broadphase.controller.update(broadphase, bodies, engine, true);\n        }\n    };\n\n    /**\n     * Zeroes the `body.force` and `body.torque` force buffers.\n     * @method bodiesClearForces\n     * @private\n     * @param {body[]} bodies\n     */\n    var _bodiesClearForces = function(bodies) {\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n\n            // reset force buffers\n            body.force.x = 0;\n            body.force.y = 0;\n            body.torque = 0;\n        }\n    };\n\n    /**\n     * Applys a mass dependant force to all given bodies.\n     * @method bodiesApplyGravity\n     * @private\n     * @param {body[]} bodies\n     * @param {vector} gravity\n     */\n    var _bodiesApplyGravity = function(bodies, gravity) {\n        var gravityScale = typeof gravity.scale !== 'undefined' ? gravity.scale : 0.001;\n\n        if ((gravity.x === 0 && gravity.y === 0) || gravityScale === 0) {\n            return;\n        }\n        \n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n\n            if (body.isStatic || body.isSleeping)\n                continue;\n\n            // apply gravity\n            body.force.y += body.mass * gravity.y * gravityScale;\n            body.force.x += body.mass * gravity.x * gravityScale;\n        }\n    };\n\n    /**\n     * Applys `Body.update` to all given `bodies`.\n     * @method updateAll\n     * @private\n     * @param {body[]} bodies\n     * @param {number} deltaTime \n     * The amount of time elapsed between updates\n     * @param {number} timeScale\n     * @param {number} correction \n     * The Verlet correction factor (deltaTime / lastDeltaTime)\n     * @param {bounds} worldBounds\n     */\n    var _bodiesUpdate = function(bodies, deltaTime, timeScale, correction, worldBounds) {\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n\n            if (body.isStatic || body.isSleeping)\n                continue;\n\n            Body.update(body, deltaTime, timeScale, correction);\n        }\n    };\n\n    /**\n     * An alias for `Runner.run`, see `Matter.Runner` for more information.\n     * @method run\n     * @param {engine} engine\n     */\n\n    /**\n    * Fired just before an update\n    *\n    * @event beforeUpdate\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired after engine update and all collision events\n    *\n    * @event afterUpdate\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired after engine update, provides a list of all pairs that have started to collide in the current tick (if any)\n    *\n    * @event collisionStart\n    * @param {} event An event object\n    * @param {} event.pairs List of affected pairs\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired after engine update, provides a list of all pairs that are colliding in the current tick (if any)\n    *\n    * @event collisionActive\n    * @param {} event An event object\n    * @param {} event.pairs List of affected pairs\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired after engine update, provides a list of all pairs that have ended collision in the current tick (if any)\n    *\n    * @event collisionEnd\n    * @param {} event An event object\n    * @param {} event.pairs List of affected pairs\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /*\n    *\n    *  Properties Documentation\n    *\n    */\n\n    /**\n     * An integer `Number` that specifies the number of position iterations to perform each update.\n     * The higher the value, the higher quality the simulation will be at the expense of performance.\n     *\n     * @property positionIterations\n     * @type number\n     * @default 6\n     */\n\n    /**\n     * An integer `Number` that specifies the number of velocity iterations to perform each update.\n     * The higher the value, the higher quality the simulation will be at the expense of performance.\n     *\n     * @property velocityIterations\n     * @type number\n     * @default 4\n     */\n\n    /**\n     * An integer `Number` that specifies the number of constraint iterations to perform each update.\n     * The higher the value, the higher quality the simulation will be at the expense of performance.\n     * The default value of `2` is usually very adequate.\n     *\n     * @property constraintIterations\n     * @type number\n     * @default 2\n     */\n\n    /**\n     * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module.\n     * Sleeping can improve stability and performance, but often at the expense of accuracy.\n     *\n     * @property enableSleeping\n     * @type boolean\n     * @default false\n     */\n\n    /**\n     * An `Object` containing properties regarding the timing systems of the engine. \n     *\n     * @property timing\n     * @type object\n     */\n\n    /**\n     * A `Number` that specifies the global scaling factor of time for all bodies.\n     * A value of `0` freezes the simulation.\n     * A value of `0.1` gives a slow-motion effect.\n     * A value of `1.2` gives a speed-up effect.\n     *\n     * @property timing.timeScale\n     * @type number\n     * @default 1\n     */\n\n    /**\n     * A `Number` that specifies the current simulation-time in milliseconds starting from `0`. \n     * It is incremented on every `Engine.update` by the given `delta` argument. \n     *\n     * @property timing.timestamp\n     * @type number\n     * @default 0\n     */\n\n    /**\n     * An instance of a `Render` controller. The default value is a `Matter.Render` instance created by `Engine.create`.\n     * One may also develop a custom renderer module based on `Matter.Render` and pass an instance of it to `Engine.create` via `options.render`.\n     *\n     * A minimal custom renderer object must define at least three functions: `create`, `clear` and `world` (see `Matter.Render`).\n     * It is also possible to instead pass the _module_ reference via `options.render.controller` and `Engine.create` will instantiate one for you.\n     *\n     * @property render\n     * @type render\n     * @deprecated see Demo.js for an example of creating a renderer\n     * @default a Matter.Render instance\n     */\n\n    /**\n     * An instance of a broadphase controller. The default value is a `Matter.Grid` instance created by `Engine.create`.\n     *\n     * @property broadphase\n     * @type grid\n     * @default a Matter.Grid instance\n     */\n\n    /**\n     * A `World` composite object that will contain all simulated bodies and constraints.\n     *\n     * @property world\n     * @type world\n     * @default a Matter.World instance\n     */\n\n})();\n\n},{\"../body/Body\":1,\"../body/Composite\":2,\"../body/World\":3,\"../collision/Grid\":6,\"../collision/Pairs\":8,\"../collision/Resolver\":10,\"../constraint/Constraint\":12,\"../render/Render\":29,\"./Common\":14,\"./Events\":16,\"./Metrics\":17,\"./Sleeping\":20}],16:[function(require,module,exports){\n/**\n* The `Matter.Events` module contains methods to fire and listen to events on other objects.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Events\n*/\n\nvar Events = {};\n\nmodule.exports = Events;\n\nvar Common = require('./Common');\n\n(function() {\n\n    /**\n     * Subscribes a callback function to the given object's `eventName`.\n     * @method on\n     * @param {} object\n     * @param {string} eventNames\n     * @param {function} callback\n     */\n    Events.on = function(object, eventNames, callback) {\n        var names = eventNames.split(' '),\n            name;\n\n        for (var i = 0; i < names.length; i++) {\n            name = names[i];\n            object.events = object.events || {};\n            object.events[name] = object.events[name] || [];\n            object.events[name].push(callback);\n        }\n\n        return callback;\n    };\n\n    /**\n     * Removes the given event callback. If no callback, clears all callbacks in `eventNames`. If no `eventNames`, clears all events.\n     * @method off\n     * @param {} object\n     * @param {string} eventNames\n     * @param {function} callback\n     */\n    Events.off = function(object, eventNames, callback) {\n        if (!eventNames) {\n            object.events = {};\n            return;\n        }\n\n        // handle Events.off(object, callback)\n        if (typeof eventNames === 'function') {\n            callback = eventNames;\n            eventNames = Common.keys(object.events).join(' ');\n        }\n\n        var names = eventNames.split(' ');\n\n        for (var i = 0; i < names.length; i++) {\n            var callbacks = object.events[names[i]],\n                newCallbacks = [];\n\n            if (callback && callbacks) {\n                for (var j = 0; j < callbacks.length; j++) {\n                    if (callbacks[j] !== callback)\n                        newCallbacks.push(callbacks[j]);\n                }\n            }\n\n            object.events[names[i]] = newCallbacks;\n        }\n    };\n\n    /**\n     * Fires all the callbacks subscribed to the given object's `eventName`, in the order they subscribed, if any.\n     * @method trigger\n     * @param {} object\n     * @param {string} eventNames\n     * @param {} event\n     */\n    Events.trigger = function(object, eventNames, event) {\n        var names,\n            name,\n            callbacks,\n            eventClone;\n\n        if (object.events) {\n            if (!event)\n                event = {};\n\n            names = eventNames.split(' ');\n\n            for (var i = 0; i < names.length; i++) {\n                name = names[i];\n                callbacks = object.events[name];\n\n                if (callbacks) {\n                    eventClone = Common.clone(event, false);\n                    eventClone.name = name;\n                    eventClone.source = object;\n\n                    for (var j = 0; j < callbacks.length; j++) {\n                        callbacks[j].apply(object, [eventClone]);\n                    }\n                }\n            }\n        }\n    };\n\n})();\n\n},{\"./Common\":14}],17:[function(require,module,exports){\n\n},{\"../body/Composite\":2,\"./Common\":14}],18:[function(require,module,exports){\n/**\n* The `Matter.Mouse` module contains methods for creating and manipulating mouse inputs.\n*\n* @class Mouse\n*/\n\nvar Mouse = {};\n\nmodule.exports = Mouse;\n\nvar Common = require('../core/Common');\n\n(function() {\n\n    /**\n     * Creates a mouse input.\n     * @method create\n     * @param {HTMLElement} element\n     * @return {mouse} A new mouse\n     */\n    Mouse.create = function(element) {\n        var mouse = {};\n\n        if (!element) {\n            Common.log('Mouse.create: element was undefined, defaulting to document.body', 'warn');\n        }\n        \n        mouse.element = element || document.body;\n        mouse.absolute = { x: 0, y: 0 };\n        mouse.position = { x: 0, y: 0 };\n        mouse.mousedownPosition = { x: 0, y: 0 };\n        mouse.mouseupPosition = { x: 0, y: 0 };\n        mouse.offset = { x: 0, y: 0 };\n        mouse.scale = { x: 1, y: 1 };\n        mouse.wheelDelta = 0;\n        mouse.button = -1;\n        mouse.pixelRatio = mouse.element.getAttribute('data-pixel-ratio') || 1;\n\n        mouse.sourceEvents = {\n            mousemove: null,\n            mousedown: null,\n            mouseup: null,\n            mousewheel: null\n        };\n        \n        mouse.mousemove = function(event) { \n            var position = _getRelativeMousePosition(event, mouse.element, mouse.pixelRatio),\n                touches = event.changedTouches;\n\n            if (touches) {\n                mouse.button = 0;\n                event.preventDefault();\n            }\n\n            mouse.absolute.x = position.x;\n            mouse.absolute.y = position.y;\n            mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n            mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n            mouse.sourceEvents.mousemove = event;\n        };\n        \n        mouse.mousedown = function(event) {\n            var position = _getRelativeMousePosition(event, mouse.element, mouse.pixelRatio),\n                touches = event.changedTouches;\n\n            if (touches) {\n                mouse.button = 0;\n                event.preventDefault();\n            } else {\n                mouse.button = event.button;\n            }\n\n            mouse.absolute.x = position.x;\n            mouse.absolute.y = position.y;\n            mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n            mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n            mouse.mousedownPosition.x = mouse.position.x;\n            mouse.mousedownPosition.y = mouse.position.y;\n            mouse.sourceEvents.mousedown = event;\n        };\n        \n        mouse.mouseup = function(event) {\n            var position = _getRelativeMousePosition(event, mouse.element, mouse.pixelRatio),\n                touches = event.changedTouches;\n\n            if (touches) {\n                event.preventDefault();\n            }\n            \n            mouse.button = -1;\n            mouse.absolute.x = position.x;\n            mouse.absolute.y = position.y;\n            mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n            mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n            mouse.mouseupPosition.x = mouse.position.x;\n            mouse.mouseupPosition.y = mouse.position.y;\n            mouse.sourceEvents.mouseup = event;\n        };\n\n        mouse.mousewheel = function(event) {\n            mouse.wheelDelta = Math.max(-1, Math.min(1, event.wheelDelta || -event.detail));\n            event.preventDefault();\n        };\n\n        Mouse.setElement(mouse, mouse.element);\n\n        return mouse;\n    };\n\n    /**\n     * Sets the element the mouse is bound to (and relative to).\n     * @method setElement\n     * @param {mouse} mouse\n     * @param {HTMLElement} element\n     */\n    Mouse.setElement = function(mouse, element) {\n        mouse.element = element;\n\n        element.addEventListener('mousemove', mouse.mousemove);\n        element.addEventListener('mousedown', mouse.mousedown);\n        element.addEventListener('mouseup', mouse.mouseup);\n        \n        element.addEventListener('mousewheel', mouse.mousewheel);\n        element.addEventListener('DOMMouseScroll', mouse.mousewheel);\n\n        element.addEventListener('touchmove', mouse.mousemove);\n        element.addEventListener('touchstart', mouse.mousedown);\n        element.addEventListener('touchend', mouse.mouseup);\n    };\n\n    /**\n     * Clears all captured source events.\n     * @method clearSourceEvents\n     * @param {mouse} mouse\n     */\n    Mouse.clearSourceEvents = function(mouse) {\n        mouse.sourceEvents.mousemove = null;\n        mouse.sourceEvents.mousedown = null;\n        mouse.sourceEvents.mouseup = null;\n        mouse.sourceEvents.mousewheel = null;\n        mouse.wheelDelta = 0;\n    };\n\n    /**\n     * Sets the mouse position offset.\n     * @method setOffset\n     * @param {mouse} mouse\n     * @param {vector} offset\n     */\n    Mouse.setOffset = function(mouse, offset) {\n        mouse.offset.x = offset.x;\n        mouse.offset.y = offset.y;\n        mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n        mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n    };\n\n    /**\n     * Sets the mouse position scale.\n     * @method setScale\n     * @param {mouse} mouse\n     * @param {vector} scale\n     */\n    Mouse.setScale = function(mouse, scale) {\n        mouse.scale.x = scale.x;\n        mouse.scale.y = scale.y;\n        mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n        mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n    };\n    \n    /**\n     * Gets the mouse position relative to an element given a screen pixel ratio.\n     * @method _getRelativeMousePosition\n     * @private\n     * @param {} event\n     * @param {} element\n     * @param {number} pixelRatio\n     * @return {}\n     */\n    var _getRelativeMousePosition = function(event, element, pixelRatio) {\n        var elementBounds = element.getBoundingClientRect(),\n            rootNode = (document.documentElement || document.body.parentNode || document.body),\n            scrollX = (window.pageXOffset !== undefined) ? window.pageXOffset : rootNode.scrollLeft,\n            scrollY = (window.pageYOffset !== undefined) ? window.pageYOffset : rootNode.scrollTop,\n            touches = event.changedTouches,\n            x, y;\n        \n        if (touches) {\n            x = touches[0].pageX - elementBounds.left - scrollX;\n            y = touches[0].pageY - elementBounds.top - scrollY;\n        } else {\n            x = event.pageX - elementBounds.left - scrollX;\n            y = event.pageY - elementBounds.top - scrollY;\n        }\n\n        return { \n            x: x / (element.clientWidth / element.width * pixelRatio),\n            y: y / (element.clientHeight / element.height * pixelRatio)\n        };\n    };\n\n})();\n\n},{\"../core/Common\":14}],19:[function(require,module,exports){\n/**\n* The `Matter.Runner` module is an optional utility which provides a game loop, \n* that handles continuously updating a `Matter.Engine` for you within a browser.\n* It is intended for development and debugging purposes, but may also be suitable for simple games.\n* If you are using your own game loop instead, then you do not need the `Matter.Runner` module.\n* Instead just call `Engine.update(engine, delta)` in your own loop.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Runner\n*/\n\nvar Runner = {};\n\nmodule.exports = Runner;\n\nvar Events = require('./Events');\nvar Engine = require('./Engine');\nvar Common = require('./Common');\n\n(function() {\n\n    var _requestAnimationFrame,\n        _cancelAnimationFrame;\n\n    if (typeof window !== 'undefined') {\n        _requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame\n                                      || window.mozRequestAnimationFrame || window.msRequestAnimationFrame \n                                      || function(callback){ window.setTimeout(function() { callback(Common.now()); }, 1000 / 60); };\n   \n        _cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame \n                                      || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame;\n    }\n\n    /**\n     * Creates a new Runner. The options parameter is an object that specifies any properties you wish to override the defaults.\n     * @method create\n     * @param {} options\n     */\n    Runner.create = function(options) {\n        var defaults = {\n            fps: 60,\n            correction: 1,\n            deltaSampleSize: 60,\n            counterTimestamp: 0,\n            frameCounter: 0,\n            deltaHistory: [],\n            timePrev: null,\n            timeScalePrev: 1,\n            frameRequestId: null,\n            isFixed: false,\n            enabled: true\n        };\n\n        var runner = Common.extend(defaults, options);\n\n        runner.delta = runner.delta || 1000 / runner.fps;\n        runner.deltaMin = runner.deltaMin || 1000 / runner.fps;\n        runner.deltaMax = runner.deltaMax || 1000 / (runner.fps * 0.5);\n        runner.fps = 1000 / runner.delta;\n\n        return runner;\n    };\n\n    /**\n     * Continuously ticks a `Matter.Engine` by calling `Runner.tick` on the `requestAnimationFrame` event.\n     * @method run\n     * @param {engine} engine\n     */\n    Runner.run = function(runner, engine) {\n        // create runner if engine is first argument\n        if (typeof runner.positionIterations !== 'undefined') {\n            engine = runner;\n            runner = Runner.create();\n        }\n\n        (function render(time){\n            runner.frameRequestId = _requestAnimationFrame(render);\n\n            if (time && runner.enabled) {\n                Runner.tick(runner, engine, time);\n            }\n        })();\n\n        return runner;\n    };\n\n    /**\n     * A game loop utility that updates the engine and renderer by one step (a 'tick').\n     * Features delta smoothing, time correction and fixed or dynamic timing.\n     * Triggers `beforeTick`, `tick` and `afterTick` events on the engine.\n     * Consider just `Engine.update(engine, delta)` if you're using your own loop.\n     * @method tick\n     * @param {runner} runner\n     * @param {engine} engine\n     * @param {number} time\n     */\n    Runner.tick = function(runner, engine, time) {\n        var timing = engine.timing,\n            correction = 1,\n            delta;\n\n        // create an event object\n        var event = {\n            timestamp: timing.timestamp\n        };\n\n        Events.trigger(runner, 'beforeTick', event);\n        Events.trigger(engine, 'beforeTick', event); // @deprecated\n\n        if (runner.isFixed) {\n            // fixed timestep\n            delta = runner.delta;\n        } else {\n            // dynamic timestep based on wall clock between calls\n            delta = (time - runner.timePrev) || runner.delta;\n            runner.timePrev = time;\n\n            // optimistically filter delta over a few frames, to improve stability\n            runner.deltaHistory.push(delta);\n            runner.deltaHistory = runner.deltaHistory.slice(-runner.deltaSampleSize);\n            delta = Math.min.apply(null, runner.deltaHistory);\n            \n            // limit delta\n            delta = delta < runner.deltaMin ? runner.deltaMin : delta;\n            delta = delta > runner.deltaMax ? runner.deltaMax : delta;\n\n            // correction for delta\n            correction = delta / runner.delta;\n\n            // update engine timing object\n            runner.delta = delta;\n        }\n\n        // time correction for time scaling\n        if (runner.timeScalePrev !== 0)\n            correction *= timing.timeScale / runner.timeScalePrev;\n\n        if (timing.timeScale === 0)\n            correction = 0;\n\n        runner.timeScalePrev = timing.timeScale;\n        runner.correction = correction;\n\n        // fps counter\n        runner.frameCounter += 1;\n        if (time - runner.counterTimestamp >= 1000) {\n            runner.fps = runner.frameCounter * ((time - runner.counterTimestamp) / 1000);\n            runner.counterTimestamp = time;\n            runner.frameCounter = 0;\n        }\n\n        Events.trigger(runner, 'tick', event);\n        Events.trigger(engine, 'tick', event); // @deprecated\n\n        // if world has been modified, clear the render scene graph\n        if (engine.world.isModified \n            && engine.render\n            && engine.render.controller\n            && engine.render.controller.clear) {\n            engine.render.controller.clear(engine.render);\n        }\n\n        // update\n        Events.trigger(runner, 'beforeUpdate', event);\n        Engine.update(engine, delta, correction);\n        Events.trigger(runner, 'afterUpdate', event);\n\n        // render\n        // @deprecated\n        if (engine.render && engine.render.controller) {\n            Events.trigger(runner, 'beforeRender', event);\n            Events.trigger(engine, 'beforeRender', event); // @deprecated\n\n            engine.render.controller.world(engine.render);\n\n            Events.trigger(runner, 'afterRender', event);\n            Events.trigger(engine, 'afterRender', event); // @deprecated\n        }\n\n        Events.trigger(runner, 'afterTick', event);\n        Events.trigger(engine, 'afterTick', event); // @deprecated\n    };\n\n    /**\n     * Ends execution of `Runner.run` on the given `runner`, by canceling the animation frame request event loop.\n     * If you wish to only temporarily pause the engine, see `engine.enabled` instead.\n     * @method stop\n     * @param {runner} runner\n     */\n    Runner.stop = function(runner) {\n        _cancelAnimationFrame(runner.frameRequestId);\n    };\n\n    /**\n     * Alias for `Runner.run`.\n     * @method start\n     * @param {runner} runner\n     * @param {engine} engine\n     */\n    Runner.start = function(runner, engine) {\n        Runner.run(runner, engine);\n    };\n\n    /*\n    *\n    *  Events Documentation\n    *\n    */\n\n    /**\n    * Fired at the start of a tick, before any updates to the engine or timing\n    *\n    * @event beforeTick\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired after engine timing updated, but just before update\n    *\n    * @event tick\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired at the end of a tick, after engine update and after rendering\n    *\n    * @event afterTick\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired before update\n    *\n    * @event beforeUpdate\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired after update\n    *\n    * @event afterUpdate\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired before rendering\n    *\n    * @event beforeRender\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    * @deprecated\n    */\n\n    /**\n    * Fired after rendering\n    *\n    * @event afterRender\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    * @deprecated\n    */\n\n    /*\n    *\n    *  Properties Documentation\n    *\n    */\n\n    /**\n     * A flag that specifies whether the runner is running or not.\n     *\n     * @property enabled\n     * @type boolean\n     * @default true\n     */\n\n    /**\n     * A `Boolean` that specifies if the runner should use a fixed timestep (otherwise it is variable).\n     * If timing is fixed, then the apparent simulation speed will change depending on the frame rate (but behaviour will be deterministic).\n     * If the timing is variable, then the apparent simulation speed will be constant (approximately, but at the cost of determininism).\n     *\n     * @property isFixed\n     * @type boolean\n     * @default false\n     */\n\n    /**\n     * A `Number` that specifies the time step between updates in milliseconds.\n     * If `engine.timing.isFixed` is set to `true`, then `delta` is fixed.\n     * If it is `false`, then `delta` can dynamically change to maintain the correct apparent simulation speed.\n     *\n     * @property delta\n     * @type number\n     * @default 1000 / 60\n     */\n\n})();\n\n},{\"./Common\":14,\"./Engine\":15,\"./Events\":16}],20:[function(require,module,exports){\n/**\n* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies.\n*\n* @class Sleeping\n*/\n\nvar Sleeping = {};\n\nmodule.exports = Sleeping;\n\nvar Events = require('./Events');\n\n(function() {\n\n    Sleeping._motionWakeThreshold = 0.18;\n    Sleeping._motionSleepThreshold = 0.08;\n    Sleeping._minBias = 0.9;\n\n    /**\n     * Puts bodies to sleep or wakes them up depending on their motion.\n     * @method update\n     * @param {body[]} bodies\n     * @param {number} timeScale\n     */\n    Sleeping.update = function(bodies, timeScale) {\n        var timeFactor = timeScale * timeScale * timeScale;\n\n        // update bodies sleeping status\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i],\n                motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed;\n\n            // wake up bodies if they have a force applied\n            if (body.force.x !== 0 || body.force.y !== 0) {\n                Sleeping.set(body, false);\n                continue;\n            }\n\n            var minMotion = Math.min(body.motion, motion),\n                maxMotion = Math.max(body.motion, motion);\n        \n            // biased average motion estimation between frames\n            body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion;\n            \n            if (body.sleepThreshold > 0 && body.motion < Sleeping._motionSleepThreshold * timeFactor) {\n                body.sleepCounter += 1;\n                \n                if (body.sleepCounter >= body.sleepThreshold)\n                    Sleeping.set(body, true);\n            } else if (body.sleepCounter > 0) {\n                body.sleepCounter -= 1;\n            }\n        }\n    };\n\n    /**\n     * Given a set of colliding pairs, wakes the sleeping bodies involved.\n     * @method afterCollisions\n     * @param {pair[]} pairs\n     * @param {number} timeScale\n     */\n    Sleeping.afterCollisions = function(pairs, timeScale) {\n        var timeFactor = timeScale * timeScale * timeScale;\n\n        // wake up bodies involved in collisions\n        for (var i = 0; i < pairs.length; i++) {\n            var pair = pairs[i];\n            \n            // don't wake inactive pairs\n            if (!pair.isActive)\n                continue;\n\n            var collision = pair.collision,\n                bodyA = collision.bodyA.parent, \n                bodyB = collision.bodyB.parent;\n        \n            // don't wake if at least one body is static\n            if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic)\n                continue;\n        \n            if (bodyA.isSleeping || bodyB.isSleeping) {\n                var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB,\n                    movingBody = sleepingBody === bodyA ? bodyB : bodyA;\n\n                if (!sleepingBody.isStatic && movingBody.motion > Sleeping._motionWakeThreshold * timeFactor) {\n                    Sleeping.set(sleepingBody, false);\n                }\n            }\n        }\n    };\n  \n    /**\n     * Set a body as sleeping or awake.\n     * @method set\n     * @param {body} body\n     * @param {boolean} isSleeping\n     */\n    Sleeping.set = function(body, isSleeping) {\n        var wasSleeping = body.isSleeping;\n\n        if (isSleeping) {\n            body.isSleeping = true;\n            body.sleepCounter = body.sleepThreshold;\n\n            body.positionImpulse.x = 0;\n            body.positionImpulse.y = 0;\n\n            body.positionPrev.x = body.position.x;\n            body.positionPrev.y = body.position.y;\n\n            body.anglePrev = body.angle;\n            body.speed = 0;\n            body.angularSpeed = 0;\n            body.motion = 0;\n\n            if (!wasSleeping) {\n                Events.trigger(body, 'sleepStart');\n            }\n        } else {\n            body.isSleeping = false;\n            body.sleepCounter = 0;\n\n            if (wasSleeping) {\n                Events.trigger(body, 'sleepEnd');\n            }\n        }\n    };\n\n})();\n\n},{\"./Events\":16}],21:[function(require,module,exports){\n/**\n* The `Matter.Bodies` module contains factory methods for creating rigid body models \n* with commonly used body configurations (such as rectangles, circles and other polygons).\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Bodies\n*/\n\n// TODO: true circle bodies\n\nvar Bodies = {};\n\nmodule.exports = Bodies;\n\nvar Vertices = require('../geometry/Vertices');\nvar Common = require('../core/Common');\nvar Body = require('../body/Body');\nvar Bounds = require('../geometry/Bounds');\nvar Vector = require('../geometry/Vector');\n\n(function() {\n\n    /**\n     * Creates a new rigid body model with a rectangle hull. \n     * The options parameter is an object that specifies any properties you wish to override the defaults.\n     * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n     * @method rectangle\n     * @param {number} x\n     * @param {number} y\n     * @param {number} width\n     * @param {number} height\n     * @param {object} [options]\n     * @return {body} A new rectangle body\n     */\n    Bodies.rectangle = function(x, y, width, height, options) {\n        options = options || {};\n\n        var rectangle = { \n            label: 'Rectangle Body',\n            position: { x: x, y: y },\n            vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height)\n        };\n\n        if (options.chamfer) {\n            var chamfer = options.chamfer;\n            rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, \n                                    chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\n            delete options.chamfer;\n        }\n\n        return Body.create(Common.extend({}, rectangle, options));\n    };\n    \n    /**\n     * Creates a new rigid body model with a trapezoid hull. \n     * The options parameter is an object that specifies any properties you wish to override the defaults.\n     * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n     * @method trapezoid\n     * @param {number} x\n     * @param {number} y\n     * @param {number} width\n     * @param {number} height\n     * @param {number} slope\n     * @param {object} [options]\n     * @return {body} A new trapezoid body\n     */\n    Bodies.trapezoid = function(x, y, width, height, slope, options) {\n        options = options || {};\n\n        slope *= 0.5;\n        var roof = (1 - (slope * 2)) * width;\n        \n        var x1 = width * slope,\n            x2 = x1 + roof,\n            x3 = x2 + x1,\n            verticesPath;\n\n        if (slope < 0.5) {\n            verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\n        } else {\n            verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\n        }\n\n        var trapezoid = { \n            label: 'Trapezoid Body',\n            position: { x: x, y: y },\n            vertices: Vertices.fromPath(verticesPath)\n        };\n\n        if (options.chamfer) {\n            var chamfer = options.chamfer;\n            trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, \n                                    chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\n            delete options.chamfer;\n        }\n\n        return Body.create(Common.extend({}, trapezoid, options));\n    };\n\n    /**\n     * Creates a new rigid body model with a circle hull. \n     * The options parameter is an object that specifies any properties you wish to override the defaults.\n     * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n     * @method circle\n     * @param {number} x\n     * @param {number} y\n     * @param {number} radius\n     * @param {object} [options]\n     * @param {number} [maxSides]\n     * @return {body} A new circle body\n     */\n    Bodies.circle = function(x, y, radius, options, maxSides) {\n        options = options || {};\n\n        var circle = {\n            label: 'Circle Body',\n            circleRadius: radius\n        };\n        \n        // approximate circles with polygons until true circles implemented in SAT\n        maxSides = maxSides || 25;\n        var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius)));\n\n        // optimisation: always use even number of sides (half the number of unique axes)\n        if (sides % 2 === 1)\n            sides += 1;\n\n        return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options));\n    };\n\n    /**\n     * Creates a new rigid body model with a regular polygon hull with the given number of sides. \n     * The options parameter is an object that specifies any properties you wish to override the defaults.\n     * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n     * @method polygon\n     * @param {number} x\n     * @param {number} y\n     * @param {number} sides\n     * @param {number} radius\n     * @param {object} [options]\n     * @return {body} A new regular polygon body\n     */\n    Bodies.polygon = function(x, y, sides, radius, options) {\n        options = options || {};\n\n        if (sides < 3)\n            return Bodies.circle(x, y, radius, options);\n\n        var theta = 2 * Math.PI / sides,\n            path = '',\n            offset = theta * 0.5;\n\n        for (var i = 0; i < sides; i += 1) {\n            var angle = offset + (i * theta),\n                xx = Math.cos(angle) * radius,\n                yy = Math.sin(angle) * radius;\n\n            path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' ';\n        }\n\n        var polygon = { \n            label: 'Polygon Body',\n            position: { x: x, y: y },\n            vertices: Vertices.fromPath(path)\n        };\n\n        if (options.chamfer) {\n            var chamfer = options.chamfer;\n            polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, \n                                    chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\n            delete options.chamfer;\n        }\n\n        return Body.create(Common.extend({}, polygon, options));\n    };\n\n    /**\n     * Creates a body using the supplied vertices (or an array containing multiple sets of vertices).\n     * If the vertices are convex, they will pass through as supplied.\n     * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available.\n     * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail).\n     * By default the decomposition will discard collinear edges (to improve performance).\n     * It can also optionally discard any parts that have an area less than `minimumArea`.\n     * If the vertices can not be decomposed, the result will fall back to using the convex hull.\n     * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults.\n     * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n     * @method fromVertices\n     * @param {number} x\n     * @param {number} y\n     * @param [[vector]] vertexSets\n     * @param {object} [options]\n     * @param {bool} [flagInternal=false]\n     * @param {number} [removeCollinear=0.01]\n     * @param {number} [minimumArea=10]\n     * @return {body}\n     */\n    Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) {\n        var body,\n            parts,\n            isConvex,\n            vertices,\n            i,\n            j,\n            k,\n            v,\n            z;\n\n        options = options || {};\n        parts = [];\n\n        flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false;\n        removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01;\n        minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10;\n\n        if (!window.decomp) {\n            Common.log('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.', 'warn');\n        }\n\n        // ensure vertexSets is an array of arrays\n        if (!Common.isArray(vertexSets[0])) {\n            vertexSets = [vertexSets];\n        }\n\n        for (v = 0; v < vertexSets.length; v += 1) {\n            vertices = vertexSets[v];\n            isConvex = Vertices.isConvex(vertices);\n\n            if (isConvex || !window.decomp) {\n                if (isConvex) {\n                    vertices = Vertices.clockwiseSort(vertices);\n                } else {\n                    // fallback to convex hull when decomposition is not possible\n                    vertices = Vertices.hull(vertices);\n                }\n\n                parts.push({\n                    position: { x: x, y: y },\n                    vertices: vertices\n                });\n            } else {\n                // initialise a decomposition\n                var concave = new decomp.Polygon();\n                for (i = 0; i < vertices.length; i++) {\n                    concave.vertices.push([vertices[i].x, vertices[i].y]);\n                }\n\n                // vertices are concave and simple, we can decompose into parts\n                concave.makeCCW();\n                if (removeCollinear !== false)\n                    concave.removeCollinearPoints(removeCollinear);\n\n                // use the quick decomposition algorithm (Bayazit)\n                var decomposed = concave.quickDecomp();\n\n                // for each decomposed chunk\n                for (i = 0; i < decomposed.length; i++) {\n                    var chunk = decomposed[i],\n                        chunkVertices = [];\n\n                    // convert vertices into the correct structure\n                    for (j = 0; j < chunk.vertices.length; j++) {\n                        chunkVertices.push({ x: chunk.vertices[j][0], y: chunk.vertices[j][1] });\n                    }\n\n                    // skip small chunks\n                    if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea)\n                        continue;\n\n                    // create a compound part\n                    parts.push({\n                        position: Vertices.centre(chunkVertices),\n                        vertices: chunkVertices\n                    });\n                }\n            }\n        }\n\n        // create body parts\n        for (i = 0; i < parts.length; i++) {\n            parts[i] = Body.create(Common.extend(parts[i], options));\n        }\n\n        // flag internal edges (coincident part edges)\n        if (flagInternal) {\n            var coincident_max_dist = 5;\n\n            for (i = 0; i < parts.length; i++) {\n                var partA = parts[i];\n\n                for (j = i + 1; j < parts.length; j++) {\n                    var partB = parts[j];\n\n                    if (Bounds.overlaps(partA.bounds, partB.bounds)) {\n                        var pav = partA.vertices,\n                            pbv = partB.vertices;\n\n                        // iterate vertices of both parts\n                        for (k = 0; k < partA.vertices.length; k++) {\n                            for (z = 0; z < partB.vertices.length; z++) {\n                                // find distances between the vertices\n                                var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])),\n                                    db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length]));\n\n                                // if both vertices are very close, consider the edge concident (internal)\n                                if (da < coincident_max_dist && db < coincident_max_dist) {\n                                    pav[k].isInternal = true;\n                                    pbv[z].isInternal = true;\n                                }\n                            }\n                        }\n\n                    }\n                }\n            }\n        }\n\n        if (parts.length > 1) {\n            // create the parent body to be returned, that contains generated compound parts\n            body = Body.create(Common.extend({ parts: parts.slice(0) }, options));\n            Body.setPosition(body, { x: x, y: y });\n\n            return body;\n        } else {\n            return parts[0];\n        }\n    };\n\n})();\n},{\"../body/Body\":1,\"../core/Common\":14,\"../geometry/Bounds\":24,\"../geometry/Vector\":26,\"../geometry/Vertices\":27}],22:[function(require,module,exports){\n/**\n* The `Matter.Composites` module contains factory methods for creating composite bodies\n* with commonly used configurations (such as stacks and chains).\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Composites\n*/\n\nvar Composites = {};\n\nmodule.exports = Composites;\n\nvar Composite = require('../body/Composite');\nvar Constraint = require('../constraint/Constraint');\nvar Common = require('../core/Common');\nvar Body = require('../body/Body');\nvar Bodies = require('./Bodies');\n\n(function() {\n\n    /**\n     * Create a new composite containing bodies created in the callback in a grid arrangement.\n     * This function uses the body's bounds to prevent overlaps.\n     * @method stack\n     * @param {number} xx\n     * @param {number} yy\n     * @param {number} columns\n     * @param {number} rows\n     * @param {number} columnGap\n     * @param {number} rowGap\n     * @param {function} callback\n     * @return {composite} A new composite containing objects created in the callback\n     */\n    Composites.stack = function(xx, yy, columns, rows, columnGap, rowGap, callback) {\n        var stack = Composite.create({ label: 'Stack' }),\n            x = xx,\n            y = yy,\n            lastBody,\n            i = 0;\n\n        for (var row = 0; row < rows; row++) {\n            var maxHeight = 0;\n            \n            for (var column = 0; column < columns; column++) {\n                var body = callback(x, y, column, row, lastBody, i);\n                    \n                if (body) {\n                    var bodyHeight = body.bounds.max.y - body.bounds.min.y,\n                        bodyWidth = body.bounds.max.x - body.bounds.min.x; \n\n                    if (bodyHeight > maxHeight)\n                        maxHeight = bodyHeight;\n                    \n                    Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 });\n\n                    x = body.bounds.max.x + columnGap;\n\n                    Composite.addBody(stack, body);\n                    \n                    lastBody = body;\n                    i += 1;\n                } else {\n                    x += columnGap;\n                }\n            }\n            \n            y += maxHeight + rowGap;\n            x = xx;\n        }\n\n        return stack;\n    };\n    \n    /**\n     * Chains all bodies in the given composite together using constraints.\n     * @method chain\n     * @param {composite} composite\n     * @param {number} xOffsetA\n     * @param {number} yOffsetA\n     * @param {number} xOffsetB\n     * @param {number} yOffsetB\n     * @param {object} options\n     * @return {composite} A new composite containing objects chained together with constraints\n     */\n    Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) {\n        var bodies = composite.bodies;\n        \n        for (var i = 1; i < bodies.length; i++) {\n            var bodyA = bodies[i - 1],\n                bodyB = bodies[i],\n                bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y,\n                bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, \n                bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y,\n                bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x;\n        \n            var defaults = {\n                bodyA: bodyA,\n                pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA },\n                bodyB: bodyB,\n                pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB }\n            };\n            \n            var constraint = Common.extend(defaults, options);\n        \n            Composite.addConstraint(composite, Constraint.create(constraint));\n        }\n\n        composite.label += ' Chain';\n        \n        return composite;\n    };\n\n    /**\n     * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.\n     * @method mesh\n     * @param {composite} composite\n     * @param {number} columns\n     * @param {number} rows\n     * @param {boolean} crossBrace\n     * @param {object} options\n     * @return {composite} The composite containing objects meshed together with constraints\n     */\n    Composites.mesh = function(composite, columns, rows, crossBrace, options) {\n        var bodies = composite.bodies,\n            row,\n            col,\n            bodyA,\n            bodyB,\n            bodyC;\n        \n        for (row = 0; row < rows; row++) {\n            for (col = 1; col < columns; col++) {\n                bodyA = bodies[(col - 1) + (row * columns)];\n                bodyB = bodies[col + (row * columns)];\n                Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\n            }\n\n            if (row > 0) {\n                for (col = 0; col < columns; col++) {\n                    bodyA = bodies[col + ((row - 1) * columns)];\n                    bodyB = bodies[col + (row * columns)];\n                    Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\n\n                    if (crossBrace && col > 0) {\n                        bodyC = bodies[(col - 1) + ((row - 1) * columns)];\n                        Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\n                    }\n\n                    if (crossBrace && col < columns - 1) {\n                        bodyC = bodies[(col + 1) + ((row - 1) * columns)];\n                        Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\n                    }\n                }\n            }\n        }\n\n        composite.label += ' Mesh';\n        \n        return composite;\n    };\n    \n    /**\n     * Create a new composite containing bodies created in the callback in a pyramid arrangement.\n     * This function uses the body's bounds to prevent overlaps.\n     * @method pyramid\n     * @param {number} xx\n     * @param {number} yy\n     * @param {number} columns\n     * @param {number} rows\n     * @param {number} columnGap\n     * @param {number} rowGap\n     * @param {function} callback\n     * @return {composite} A new composite containing objects created in the callback\n     */\n    Composites.pyramid = function(xx, yy, columns, rows, columnGap, rowGap, callback) {\n        return Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y, column, row, lastBody, i) {\n            var actualRows = Math.min(rows, Math.ceil(columns / 2)),\n                lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0;\n            \n            if (row > actualRows)\n                return;\n            \n            // reverse row order\n            row = actualRows - row;\n            \n            var start = row,\n                end = columns - 1 - row;\n\n            if (column < start || column > end)\n                return;\n            \n            // retroactively fix the first body's position, since width was unknown\n            if (i === 1) {\n                Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 });\n            }\n\n            var xOffset = lastBody ? column * lastBodyWidth : 0;\n            \n            return callback(xx + xOffset + column * columnGap, y, column, row, lastBody, i);\n        });\n    };\n\n    /**\n     * Creates a composite with a Newton's Cradle setup of bodies and constraints.\n     * @method newtonsCradle\n     * @param {number} xx\n     * @param {number} yy\n     * @param {number} number\n     * @param {number} size\n     * @param {number} length\n     * @return {composite} A new composite newtonsCradle body\n     */\n    Composites.newtonsCradle = function(xx, yy, number, size, length) {\n        var newtonsCradle = Composite.create({ label: 'Newtons Cradle' });\n\n        for (var i = 0; i < number; i++) {\n            var separation = 1.9,\n                circle = Bodies.circle(xx + i * (size * separation), yy + length, size, \n                            { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }),\n                constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle });\n\n            Composite.addBody(newtonsCradle, circle);\n            Composite.addConstraint(newtonsCradle, constraint);\n        }\n\n        return newtonsCradle;\n    };\n    \n    /**\n     * Creates a composite with simple car setup of bodies and constraints.\n     * @method car\n     * @param {number} xx\n     * @param {number} yy\n     * @param {number} width\n     * @param {number} height\n     * @param {number} wheelSize\n     * @return {composite} A new composite car body\n     */\n    Composites.car = function(xx, yy, width, height, wheelSize) {\n        var group = Body.nextGroup(true),\n            wheelBase = -20,\n            wheelAOffset = -width * 0.5 + wheelBase,\n            wheelBOffset = width * 0.5 - wheelBase,\n            wheelYOffset = 0;\n    \n        var car = Composite.create({ label: 'Car' }),\n            body = Bodies.trapezoid(xx, yy, width, height, 0.3, { \n                collisionFilter: {\n                    group: group\n                },\n                friction: 0.01,\n                chamfer: {\n                    radius: 10\n                }\n            });\n    \n        var wheelA = Bodies.circle(xx + wheelAOffset, yy + wheelYOffset, wheelSize, { \n            collisionFilter: {\n                group: group\n            },\n            friction: 0.8,\n            density: 0.01\n        });\n                    \n        var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, { \n            collisionFilter: {\n                group: group\n            },\n            friction: 0.8,\n            density: 0.01\n        });\n                    \n        var axelA = Constraint.create({\n            bodyA: body,\n            pointA: { x: wheelAOffset, y: wheelYOffset },\n            bodyB: wheelA,\n            stiffness: 0.2\n        });\n                        \n        var axelB = Constraint.create({\n            bodyA: body,\n            pointA: { x: wheelBOffset, y: wheelYOffset },\n            bodyB: wheelB,\n            stiffness: 0.2\n        });\n        \n        Composite.addBody(car, body);\n        Composite.addBody(car, wheelA);\n        Composite.addBody(car, wheelB);\n        Composite.addConstraint(car, axelA);\n        Composite.addConstraint(car, axelB);\n\n        return car;\n    };\n\n    /**\n     * Creates a simple soft body like object.\n     * @method softBody\n     * @param {number} xx\n     * @param {number} yy\n     * @param {number} columns\n     * @param {number} rows\n     * @param {number} columnGap\n     * @param {number} rowGap\n     * @param {boolean} crossBrace\n     * @param {number} particleRadius\n     * @param {} particleOptions\n     * @param {} constraintOptions\n     * @return {composite} A new composite softBody\n     */\n    Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) {\n        particleOptions = Common.extend({ inertia: Infinity }, particleOptions);\n        constraintOptions = Common.extend({ stiffness: 0.4 }, constraintOptions);\n\n        var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) {\n            return Bodies.circle(x, y, particleRadius, particleOptions);\n        });\n\n        Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions);\n\n        softBody.label = 'Soft Body';\n\n        return softBody;\n    };\n\n})();\n\n},{\"../body/Body\":1,\"../body/Composite\":2,\"../constraint/Constraint\":12,\"../core/Common\":14,\"./Bodies\":21}],23:[function(require,module,exports){\n/**\n* The `Matter.Axes` module contains methods for creating and manipulating sets of axes.\n*\n* @class Axes\n*/\n\nvar Axes = {};\n\nmodule.exports = Axes;\n\nvar Vector = require('../geometry/Vector');\nvar Common = require('../core/Common');\n\n(function() {\n\n    /**\n     * Creates a new set of axes from the given vertices.\n     * @method fromVertices\n     * @param {vertices} vertices\n     * @return {axes} A new axes from the given vertices\n     */\n    Axes.fromVertices = function(vertices) {\n        var axes = {};\n\n        // find the unique axes, using edge normal gradients\n        for (var i = 0; i < vertices.length; i++) {\n            var j = (i + 1) % vertices.length, \n                normal = Vector.normalise({ \n                    x: vertices[j].y - vertices[i].y, \n                    y: vertices[i].x - vertices[j].x\n                }),\n                gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y);\n            \n            // limit precision\n            gradient = gradient.toFixed(3).toString();\n            axes[gradient] = normal;\n        }\n\n        return Common.values(axes);\n    };\n\n    /**\n     * Rotates a set of axes by the given angle.\n     * @method rotate\n     * @param {axes} axes\n     * @param {number} angle\n     */\n    Axes.rotate = function(axes, angle) {\n        if (angle === 0)\n            return;\n        \n        var cos = Math.cos(angle),\n            sin = Math.sin(angle);\n\n        for (var i = 0; i < axes.length; i++) {\n            var axis = axes[i],\n                xx;\n            xx = axis.x * cos - axis.y * sin;\n            axis.y = axis.x * sin + axis.y * cos;\n            axis.x = xx;\n        }\n    };\n\n})();\n\n},{\"../core/Common\":14,\"../geometry/Vector\":26}],24:[function(require,module,exports){\n/**\n* The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB).\n*\n* @class Bounds\n*/\n\nvar Bounds = {};\n\nmodule.exports = Bounds;\n\n(function() {\n\n    /**\n     * Creates a new axis-aligned bounding box (AABB) for the given vertices.\n     * @method create\n     * @param {vertices} vertices\n     * @return {bounds} A new bounds object\n     */\n    Bounds.create = function(vertices) {\n        var bounds = { \n            min: { x: 0, y: 0 }, \n            max: { x: 0, y: 0 }\n        };\n\n        if (vertices)\n            Bounds.update(bounds, vertices);\n        \n        return bounds;\n    };\n\n    /**\n     * Updates bounds using the given vertices and extends the bounds given a velocity.\n     * @method update\n     * @param {bounds} bounds\n     * @param {vertices} vertices\n     * @param {vector} velocity\n     */\n    Bounds.update = function(bounds, vertices, velocity) {\n        bounds.min.x = Infinity;\n        bounds.max.x = -Infinity;\n        bounds.min.y = Infinity;\n        bounds.max.y = -Infinity;\n\n        for (var i = 0; i < vertices.length; i++) {\n            var vertex = vertices[i];\n            if (vertex.x > bounds.max.x) bounds.max.x = vertex.x;\n            if (vertex.x < bounds.min.x) bounds.min.x = vertex.x;\n            if (vertex.y > bounds.max.y) bounds.max.y = vertex.y;\n            if (vertex.y < bounds.min.y) bounds.min.y = vertex.y;\n        }\n        \n        if (velocity) {\n            if (velocity.x > 0) {\n                bounds.max.x += velocity.x;\n            } else {\n                bounds.min.x += velocity.x;\n            }\n            \n            if (velocity.y > 0) {\n                bounds.max.y += velocity.y;\n            } else {\n                bounds.min.y += velocity.y;\n            }\n        }\n    };\n\n    /**\n     * Returns true if the bounds contains the given point.\n     * @method contains\n     * @param {bounds} bounds\n     * @param {vector} point\n     * @return {boolean} True if the bounds contain the point, otherwise false\n     */\n    Bounds.contains = function(bounds, point) {\n        return point.x >= bounds.min.x && point.x <= bounds.max.x \n               && point.y >= bounds.min.y && point.y <= bounds.max.y;\n    };\n\n    /**\n     * Returns true if the two bounds intersect.\n     * @method overlaps\n     * @param {bounds} boundsA\n     * @param {bounds} boundsB\n     * @return {boolean} True if the bounds overlap, otherwise false\n     */\n    Bounds.overlaps = function(boundsA, boundsB) {\n        return (boundsA.min.x <= boundsB.max.x && boundsA.max.x >= boundsB.min.x\n                && boundsA.max.y >= boundsB.min.y && boundsA.min.y <= boundsB.max.y);\n    };\n\n    /**\n     * Translates the bounds by the given vector.\n     * @method translate\n     * @param {bounds} bounds\n     * @param {vector} vector\n     */\n    Bounds.translate = function(bounds, vector) {\n        bounds.min.x += vector.x;\n        bounds.max.x += vector.x;\n        bounds.min.y += vector.y;\n        bounds.max.y += vector.y;\n    };\n\n    /**\n     * Shifts the bounds to the given position.\n     * @method shift\n     * @param {bounds} bounds\n     * @param {vector} position\n     */\n    Bounds.shift = function(bounds, position) {\n        var deltaX = bounds.max.x - bounds.min.x,\n            deltaY = bounds.max.y - bounds.min.y;\n            \n        bounds.min.x = position.x;\n        bounds.max.x = position.x + deltaX;\n        bounds.min.y = position.y;\n        bounds.max.y = position.y + deltaY;\n    };\n    \n})();\n\n},{}],25:[function(require,module,exports){\n/**\n* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points.\n*\n* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Svg\n*/\n\nvar Svg = {};\n\nmodule.exports = Svg;\n\nvar Bounds = require('../geometry/Bounds');\n\n(function() {\n\n    /**\n     * Converts an SVG path into an array of vector points.\n     * If the input path forms a concave shape, you must decompose the result into convex parts before use.\n     * See `Bodies.fromVertices` which provides support for this.\n     * Note that this function is not guaranteed to support complex paths (such as those with holes).\n     * @method pathToVertices\n     * @param {SVGPathElement} path\n     * @param {Number} [sampleLength=15]\n     * @return {Vector[]} points\n     */\n    Svg.pathToVertices = function(path, sampleLength) {\n        // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js\n        var i, il, total, point, segment, segments, \n            segmentsQueue, lastSegment, \n            lastPoint, segmentIndex, points = [],\n            lx, ly, length = 0, x = 0, y = 0;\n\n        sampleLength = sampleLength || 15;\n\n        var addPoint = function(px, py, pathSegType) {\n            // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1)\n            var isRelative = pathSegType % 2 === 1 && pathSegType > 1;\n\n            // when the last point doesn't equal the current point add the current point\n            if (!lastPoint || px != lastPoint.x || py != lastPoint.y) {\n                if (lastPoint && isRelative) {\n                    lx = lastPoint.x;\n                    ly = lastPoint.y;\n                } else {\n                    lx = 0;\n                    ly = 0;\n                }\n\n                var point = {\n                    x: lx + px,\n                    y: ly + py\n                };\n\n                // set last point\n                if (isRelative || !lastPoint) {\n                    lastPoint = point;\n                }\n\n                points.push(point);\n\n                x = lx + px;\n                y = ly + py;\n            }\n        };\n\n        var addSegmentPoint = function(segment) {\n            var segType = segment.pathSegTypeAsLetter.toUpperCase();\n\n            // skip path ends\n            if (segType === 'Z') \n                return;\n\n            // map segment to x and y\n            switch (segType) {\n\n            case 'M':\n            case 'L':\n            case 'T':\n            case 'C':\n            case 'S':\n            case 'Q':\n                x = segment.x;\n                y = segment.y;\n                break;\n            case 'H':\n                x = segment.x;\n                break;\n            case 'V':\n                y = segment.y;\n                break;\n            }\n\n            addPoint(x, y, segment.pathSegType);\n        };\n\n        // ensure path is absolute\n        _svgPathToAbsolute(path);\n\n        // get total length\n        total = path.getTotalLength();\n\n        // queue segments\n        segments = [];\n        for (i = 0; i < path.pathSegList.numberOfItems; i += 1)\n            segments.push(path.pathSegList.getItem(i));\n\n        segmentsQueue = segments.concat();\n\n        // sample through path\n        while (length < total) {\n            // get segment at position\n            segmentIndex = path.getPathSegAtLength(length);\n            segment = segments[segmentIndex];\n\n            // new segment\n            if (segment != lastSegment) {\n                while (segmentsQueue.length && segmentsQueue[0] != segment)\n                    addSegmentPoint(segmentsQueue.shift());\n\n                lastSegment = segment;\n            }\n\n            // add points in between when curving\n            // TODO: adaptive sampling\n            switch (segment.pathSegTypeAsLetter.toUpperCase()) {\n\n            case 'C':\n            case 'T':\n            case 'S':\n            case 'Q':\n            case 'A':\n                point = path.getPointAtLength(length);\n                addPoint(point.x, point.y, 0);\n                break;\n\n            }\n\n            // increment by sample value\n            length += sampleLength;\n        }\n\n        // add remaining segments not passed by sampling\n        for (i = 0, il = segmentsQueue.length; i < il; ++i)\n            addSegmentPoint(segmentsQueue[i]);\n\n        return points;\n    };\n\n    var _svgPathToAbsolute = function(path) {\n        // http://phrogz.net/convert-svg-path-to-all-absolute-commands\n        var x0, y0, x1, y1, x2, y2, segs = path.pathSegList,\n            x = 0, y = 0, len = segs.numberOfItems;\n\n        for (var i = 0; i < len; ++i) {\n            var seg = segs.getItem(i),\n                segType = seg.pathSegTypeAsLetter;\n\n            if (/[MLHVCSQTA]/.test(segType)) {\n                if ('x' in seg) x = seg.x;\n                if ('y' in seg) y = seg.y;\n            } else {\n                if ('x1' in seg) x1 = x + seg.x1;\n                if ('x2' in seg) x2 = x + seg.x2;\n                if ('y1' in seg) y1 = y + seg.y1;\n                if ('y2' in seg) y2 = y + seg.y2;\n                if ('x' in seg) x += seg.x;\n                if ('y' in seg) y += seg.y;\n\n                switch (segType) {\n\n                case 'm':\n                    segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i);\n                    break;\n                case 'l':\n                    segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i);\n                    break;\n                case 'h':\n                    segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i);\n                    break;\n                case 'v':\n                    segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i);\n                    break;\n                case 'c':\n                    segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i);\n                    break;\n                case 's':\n                    segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i);\n                    break;\n                case 'q':\n                    segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i);\n                    break;\n                case 't':\n                    segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i);\n                    break;\n                case 'a':\n                    segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i);\n                    break;\n                case 'z':\n                case 'Z':\n                    x = x0;\n                    y = y0;\n                    break;\n\n                }\n            }\n\n            if (segType == 'M' || segType == 'm') {\n                x0 = x;\n                y0 = y;\n            }\n        }\n    };\n\n})();\n},{\"../geometry/Bounds\":24}],26:[function(require,module,exports){\n/**\n* The `Matter.Vector` module contains methods for creating and manipulating vectors.\n* Vectors are the basis of all the geometry related operations in the engine.\n* A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Vector\n*/\n\n// TODO: consider params for reusing vector objects\n\nvar Vector = {};\n\nmodule.exports = Vector;\n\n(function() {\n\n    /**\n     * Creates a new vector.\n     * @method create\n     * @param {number} x\n     * @param {number} y\n     * @return {vector} A new vector\n     */\n    Vector.create = function(x, y) {\n        return { x: x || 0, y: y || 0 };\n    };\n\n    /**\n     * Returns a new vector with `x` and `y` copied from the given `vector`.\n     * @method clone\n     * @param {vector} vector\n     * @return {vector} A new cloned vector\n     */\n    Vector.clone = function(vector) {\n        return { x: vector.x, y: vector.y };\n    };\n\n    /**\n     * Returns the magnitude (length) of a vector.\n     * @method magnitude\n     * @param {vector} vector\n     * @return {number} The magnitude of the vector\n     */\n    Vector.magnitude = function(vector) {\n        return Math.sqrt((vector.x * vector.x) + (vector.y * vector.y));\n    };\n\n    /**\n     * Returns the magnitude (length) of a vector (therefore saving a `sqrt` operation).\n     * @method magnitudeSquared\n     * @param {vector} vector\n     * @return {number} The squared magnitude of the vector\n     */\n    Vector.magnitudeSquared = function(vector) {\n        return (vector.x * vector.x) + (vector.y * vector.y);\n    };\n\n    /**\n     * Rotates the vector about (0, 0) by specified angle.\n     * @method rotate\n     * @param {vector} vector\n     * @param {number} angle\n     * @return {vector} A new vector rotated about (0, 0)\n     */\n    Vector.rotate = function(vector, angle) {\n        var cos = Math.cos(angle), sin = Math.sin(angle);\n        return {\n            x: vector.x * cos - vector.y * sin,\n            y: vector.x * sin + vector.y * cos\n        };\n    };\n\n    /**\n     * Rotates the vector about a specified point by specified angle.\n     * @method rotateAbout\n     * @param {vector} vector\n     * @param {number} angle\n     * @param {vector} point\n     * @param {vector} [output]\n     * @return {vector} A new vector rotated about the point\n     */\n    Vector.rotateAbout = function(vector, angle, point, output) {\n        var cos = Math.cos(angle), sin = Math.sin(angle);\n        if (!output) output = {};\n        var x = point.x + ((vector.x - point.x) * cos - (vector.y - point.y) * sin);\n        output.y = point.y + ((vector.x - point.x) * sin + (vector.y - point.y) * cos);\n        output.x = x;\n        return output;\n    };\n\n    /**\n     * Normalises a vector (such that its magnitude is `1`).\n     * @method normalise\n     * @param {vector} vector\n     * @return {vector} A new vector normalised\n     */\n    Vector.normalise = function(vector) {\n        var magnitude = Vector.magnitude(vector);\n        if (magnitude === 0)\n            return { x: 0, y: 0 };\n        return { x: vector.x / magnitude, y: vector.y / magnitude };\n    };\n\n    /**\n     * Returns the dot-product of two vectors.\n     * @method dot\n     * @param {vector} vectorA\n     * @param {vector} vectorB\n     * @return {number} The dot product of the two vectors\n     */\n    Vector.dot = function(vectorA, vectorB) {\n        return (vectorA.x * vectorB.x) + (vectorA.y * vectorB.y);\n    };\n\n    /**\n     * Returns the cross-product of two vectors.\n     * @method cross\n     * @param {vector} vectorA\n     * @param {vector} vectorB\n     * @return {number} The cross product of the two vectors\n     */\n    Vector.cross = function(vectorA, vectorB) {\n        return (vectorA.x * vectorB.y) - (vectorA.y * vectorB.x);\n    };\n\n    /**\n     * Returns the cross-product of three vectors.\n     * @method cross3\n     * @param {vector} vectorA\n     * @param {vector} vectorB\n     * @param {vector} vectorC\n     * @return {number} The cross product of the three vectors\n     */\n    Vector.cross3 = function(vectorA, vectorB, vectorC) {\n        return (vectorB.x - vectorA.x) * (vectorC.y - vectorA.y) - (vectorB.y - vectorA.y) * (vectorC.x - vectorA.x);\n    };\n\n    /**\n     * Adds the two vectors.\n     * @method add\n     * @param {vector} vectorA\n     * @param {vector} vectorB\n     * @param {vector} [output]\n     * @return {vector} A new vector of vectorA and vectorB added\n     */\n    Vector.add = function(vectorA, vectorB, output) {\n        if (!output) output = {};\n        output.x = vectorA.x + vectorB.x;\n        output.y = vectorA.y + vectorB.y;\n        return output;\n    };\n\n    /**\n     * Subtracts the two vectors.\n     * @method sub\n     * @param {vector} vectorA\n     * @param {vector} vectorB\n     * @param {vector} [output]\n     * @return {vector} A new vector of vectorA and vectorB subtracted\n     */\n    Vector.sub = function(vectorA, vectorB, output) {\n        if (!output) output = {};\n        output.x = vectorA.x - vectorB.x;\n        output.y = vectorA.y - vectorB.y;\n        return output;\n    };\n\n    /**\n     * Multiplies a vector and a scalar.\n     * @method mult\n     * @param {vector} vector\n     * @param {number} scalar\n     * @return {vector} A new vector multiplied by scalar\n     */\n    Vector.mult = function(vector, scalar) {\n        return { x: vector.x * scalar, y: vector.y * scalar };\n    };\n\n    /**\n     * Divides a vector and a scalar.\n     * @method div\n     * @param {vector} vector\n     * @param {number} scalar\n     * @return {vector} A new vector divided by scalar\n     */\n    Vector.div = function(vector, scalar) {\n        return { x: vector.x / scalar, y: vector.y / scalar };\n    };\n\n    /**\n     * Returns the perpendicular vector. Set `negate` to true for the perpendicular in the opposite direction.\n     * @method perp\n     * @param {vector} vector\n     * @param {bool} [negate=false]\n     * @return {vector} The perpendicular vector\n     */\n    Vector.perp = function(vector, negate) {\n        negate = negate === true ? -1 : 1;\n        return { x: negate * -vector.y, y: negate * vector.x };\n    };\n\n    /**\n     * Negates both components of a vector such that it points in the opposite direction.\n     * @method neg\n     * @param {vector} vector\n     * @return {vector} The negated vector\n     */\n    Vector.neg = function(vector) {\n        return { x: -vector.x, y: -vector.y };\n    };\n\n    /**\n     * Returns the angle in radians between the two vectors relative to the x-axis.\n     * @method angle\n     * @param {vector} vectorA\n     * @param {vector} vectorB\n     * @return {number} The angle in radians\n     */\n    Vector.angle = function(vectorA, vectorB) {\n        return Math.atan2(vectorB.y - vectorA.y, vectorB.x - vectorA.x);\n    };\n\n    /**\n     * Temporary vector pool (not thread-safe).\n     * @property _temp\n     * @type {vector[]}\n     * @private\n     */\n    Vector._temp = [Vector.create(), Vector.create(), \n                    Vector.create(), Vector.create(), \n                    Vector.create(), Vector.create()];\n\n})();\n},{}],27:[function(require,module,exports){\n/**\n* The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.\n* A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\n* A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Vertices\n*/\n\nvar Vertices = {};\n\nmodule.exports = Vertices;\n\nvar Vector = require('../geometry/Vector');\nvar Common = require('../core/Common');\n\n(function() {\n\n    /**\n     * Creates a new set of `Matter.Body` compatible vertices.\n     * The `points` argument accepts an array of `Matter.Vector` points orientated around the origin `(0, 0)`, for example:\n     *\n     *     [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\n     *\n     * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects,\n     * but with some additional references required for efficient collision detection routines.\n     *\n     * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided.\n     *\n     * @method create\n     * @param {vector[]} points\n     * @param {body} body\n     */\n    Vertices.create = function(points, body) {\n        var vertices = [];\n\n        for (var i = 0; i < points.length; i++) {\n            var point = points[i],\n                vertex = {\n                    x: point.x,\n                    y: point.y,\n                    index: i,\n                    body: body,\n                    isInternal: false\n                };\n\n            vertices.push(vertex);\n        }\n\n        return vertices;\n    };\n\n    /**\n     * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), \n     * into a `Matter.Vertices` object for the given `Matter.Body`.\n     * For parsing SVG paths, see `Svg.pathToVertices`.\n     * @method fromPath\n     * @param {string} path\n     * @param {body} body\n     * @return {vertices} vertices\n     */\n    Vertices.fromPath = function(path, body) {\n        var pathPattern = /L?\\s*([\\-\\d\\.e]+)[\\s,]*([\\-\\d\\.e]+)*/ig,\n            points = [];\n\n        path.replace(pathPattern, function(match, x, y) {\n            points.push({ x: parseFloat(x), y: parseFloat(y) });\n        });\n\n        return Vertices.create(points, body);\n    };\n\n    /**\n     * Returns the centre (centroid) of the set of vertices.\n     * @method centre\n     * @param {vertices} vertices\n     * @return {vector} The centre point\n     */\n    Vertices.centre = function(vertices) {\n        var area = Vertices.area(vertices, true),\n            centre = { x: 0, y: 0 },\n            cross,\n            temp,\n            j;\n\n        for (var i = 0; i < vertices.length; i++) {\n            j = (i + 1) % vertices.length;\n            cross = Vector.cross(vertices[i], vertices[j]);\n            temp = Vector.mult(Vector.add(vertices[i], vertices[j]), cross);\n            centre = Vector.add(centre, temp);\n        }\n\n        return Vector.div(centre, 6 * area);\n    };\n\n    /**\n     * Returns the average (mean) of the set of vertices.\n     * @method mean\n     * @param {vertices} vertices\n     * @return {vector} The average point\n     */\n    Vertices.mean = function(vertices) {\n        var average = { x: 0, y: 0 };\n\n        for (var i = 0; i < vertices.length; i++) {\n            average.x += vertices[i].x;\n            average.y += vertices[i].y;\n        }\n\n        return Vector.div(average, vertices.length);\n    };\n\n    /**\n     * Returns the area of the set of vertices.\n     * @method area\n     * @param {vertices} vertices\n     * @param {bool} signed\n     * @return {number} The area\n     */\n    Vertices.area = function(vertices, signed) {\n        var area = 0,\n            j = vertices.length - 1;\n\n        for (var i = 0; i < vertices.length; i++) {\n            area += (vertices[j].x - vertices[i].x) * (vertices[j].y + vertices[i].y);\n            j = i;\n        }\n\n        if (signed)\n            return area / 2;\n\n        return Math.abs(area) / 2;\n    };\n\n    /**\n     * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass.\n     * @method inertia\n     * @param {vertices} vertices\n     * @param {number} mass\n     * @return {number} The polygon's moment of inertia\n     */\n    Vertices.inertia = function(vertices, mass) {\n        var numerator = 0,\n            denominator = 0,\n            v = vertices,\n            cross,\n            j;\n\n        // find the polygon's moment of inertia, using second moment of area\n        // http://www.physicsforums.com/showthread.php?t=25293\n        for (var n = 0; n < v.length; n++) {\n            j = (n + 1) % v.length;\n            cross = Math.abs(Vector.cross(v[j], v[n]));\n            numerator += cross * (Vector.dot(v[j], v[j]) + Vector.dot(v[j], v[n]) + Vector.dot(v[n], v[n]));\n            denominator += cross;\n        }\n\n        return (mass / 6) * (numerator / denominator);\n    };\n\n    /**\n     * Translates the set of vertices in-place.\n     * @method translate\n     * @param {vertices} vertices\n     * @param {vector} vector\n     * @param {number} scalar\n     */\n    Vertices.translate = function(vertices, vector, scalar) {\n        var i;\n        if (scalar) {\n            for (i = 0; i < vertices.length; i++) {\n                vertices[i].x += vector.x * scalar;\n                vertices[i].y += vector.y * scalar;\n            }\n        } else {\n            for (i = 0; i < vertices.length; i++) {\n                vertices[i].x += vector.x;\n                vertices[i].y += vector.y;\n            }\n        }\n\n        return vertices;\n    };\n\n    /**\n     * Rotates the set of vertices in-place.\n     * @method rotate\n     * @param {vertices} vertices\n     * @param {number} angle\n     * @param {vector} point\n     */\n    Vertices.rotate = function(vertices, angle, point) {\n        if (angle === 0)\n            return;\n\n        var cos = Math.cos(angle),\n            sin = Math.sin(angle);\n\n        for (var i = 0; i < vertices.length; i++) {\n            var vertice = vertices[i],\n                dx = vertice.x - point.x,\n                dy = vertice.y - point.y;\n                \n            vertice.x = point.x + (dx * cos - dy * sin);\n            vertice.y = point.y + (dx * sin + dy * cos);\n        }\n\n        return vertices;\n    };\n\n    /**\n     * Returns `true` if the `point` is inside the set of `vertices`.\n     * @method contains\n     * @param {vertices} vertices\n     * @param {vector} point\n     * @return {boolean} True if the vertices contains point, otherwise false\n     */\n    Vertices.contains = function(vertices, point) {\n        for (var i = 0; i < vertices.length; i++) {\n            var vertice = vertices[i],\n                nextVertice = vertices[(i + 1) % vertices.length];\n            if ((point.x - vertice.x) * (nextVertice.y - vertice.y) + (point.y - vertice.y) * (vertice.x - nextVertice.x) > 0) {\n                return false;\n            }\n        }\n\n        return true;\n    };\n\n    /**\n     * Scales the vertices from a point (default is centre) in-place.\n     * @method scale\n     * @param {vertices} vertices\n     * @param {number} scaleX\n     * @param {number} scaleY\n     * @param {vector} point\n     */\n    Vertices.scale = function(vertices, scaleX, scaleY, point) {\n        if (scaleX === 1 && scaleY === 1)\n            return vertices;\n\n        point = point || Vertices.centre(vertices);\n\n        var vertex,\n            delta;\n\n        for (var i = 0; i < vertices.length; i++) {\n            vertex = vertices[i];\n            delta = Vector.sub(vertex, point);\n            vertices[i].x = point.x + delta.x * scaleX;\n            vertices[i].y = point.y + delta.y * scaleY;\n        }\n\n        return vertices;\n    };\n\n    /**\n     * Chamfers a set of vertices by giving them rounded corners, returns a new set of vertices.\n     * The radius parameter is a single number or an array to specify the radius for each vertex.\n     * @method chamfer\n     * @param {vertices} vertices\n     * @param {number[]} radius\n     * @param {number} quality\n     * @param {number} qualityMin\n     * @param {number} qualityMax\n     */\n    Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {\n        radius = radius || [8];\n\n        if (!radius.length)\n            radius = [radius];\n\n        // quality defaults to -1, which is auto\n        quality = (typeof quality !== 'undefined') ? quality : -1;\n        qualityMin = qualityMin || 2;\n        qualityMax = qualityMax || 14;\n\n        var newVertices = [];\n\n        for (var i = 0; i < vertices.length; i++) {\n            var prevVertex = vertices[i - 1 >= 0 ? i - 1 : vertices.length - 1],\n                vertex = vertices[i],\n                nextVertex = vertices[(i + 1) % vertices.length],\n                currentRadius = radius[i < radius.length ? i : radius.length - 1];\n\n            if (currentRadius === 0) {\n                newVertices.push(vertex);\n                continue;\n            }\n\n            var prevNormal = Vector.normalise({ \n                x: vertex.y - prevVertex.y, \n                y: prevVertex.x - vertex.x\n            });\n\n            var nextNormal = Vector.normalise({ \n                x: nextVertex.y - vertex.y, \n                y: vertex.x - nextVertex.x\n            });\n\n            var diagonalRadius = Math.sqrt(2 * Math.pow(currentRadius, 2)),\n                radiusVector = Vector.mult(Common.clone(prevNormal), currentRadius),\n                midNormal = Vector.normalise(Vector.mult(Vector.add(prevNormal, nextNormal), 0.5)),\n                scaledVertex = Vector.sub(vertex, Vector.mult(midNormal, diagonalRadius));\n\n            var precision = quality;\n\n            if (quality === -1) {\n                // automatically decide precision\n                precision = Math.pow(currentRadius, 0.32) * 1.75;\n            }\n\n            precision = Common.clamp(precision, qualityMin, qualityMax);\n\n            // use an even value for precision, more likely to reduce axes by using symmetry\n            if (precision % 2 === 1)\n                precision += 1;\n\n            var alpha = Math.acos(Vector.dot(prevNormal, nextNormal)),\n                theta = alpha / precision;\n\n            for (var j = 0; j < precision; j++) {\n                newVertices.push(Vector.add(Vector.rotate(radiusVector, theta * j), scaledVertex));\n            }\n        }\n\n        return newVertices;\n    };\n\n    /**\n     * Sorts the input vertices into clockwise order in place.\n     * @method clockwiseSort\n     * @param {vertices} vertices\n     * @return {vertices} vertices\n     */\n    Vertices.clockwiseSort = function(vertices) {\n        var centre = Vertices.mean(vertices);\n\n        vertices.sort(function(vertexA, vertexB) {\n            return Vector.angle(centre, vertexA) - Vector.angle(centre, vertexB);\n        });\n\n        return vertices;\n    };\n\n    /**\n     * Returns true if the vertices form a convex shape (vertices must be in clockwise order).\n     * @method isConvex\n     * @param {vertices} vertices\n     * @return {bool} `true` if the `vertices` are convex, `false` if not (or `null` if not computable).\n     */\n    Vertices.isConvex = function(vertices) {\n        // http://paulbourke.net/geometry/polygonmesh/\n\n        var flag = 0,\n            n = vertices.length,\n            i,\n            j,\n            k,\n            z;\n\n        if (n < 3)\n            return null;\n\n        for (i = 0; i < n; i++) {\n            j = (i + 1) % n;\n            k = (i + 2) % n;\n            z = (vertices[j].x - vertices[i].x) * (vertices[k].y - vertices[j].y);\n            z -= (vertices[j].y - vertices[i].y) * (vertices[k].x - vertices[j].x);\n\n            if (z < 0) {\n                flag |= 1;\n            } else if (z > 0) {\n                flag |= 2;\n            }\n\n            if (flag === 3) {\n                return false;\n            }\n        }\n\n        if (flag !== 0){\n            return true;\n        } else {\n            return null;\n        }\n    };\n\n    /**\n     * Returns the convex hull of the input vertices as a new array of points.\n     * @method hull\n     * @param {vertices} vertices\n     * @return [vertex] vertices\n     */\n    Vertices.hull = function(vertices) {\n        // http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain\n\n        var upper = [],\n            lower = [], \n            vertex,\n            i;\n\n        // sort vertices on x-axis (y-axis for ties)\n        vertices = vertices.slice(0);\n        vertices.sort(function(vertexA, vertexB) {\n            var dx = vertexA.x - vertexB.x;\n            return dx !== 0 ? dx : vertexA.y - vertexB.y;\n        });\n\n        // build lower hull\n        for (i = 0; i < vertices.length; i++) {\n            vertex = vertices[i];\n\n            while (lower.length >= 2 \n                   && Vector.cross3(lower[lower.length - 2], lower[lower.length - 1], vertex) <= 0) {\n                lower.pop();\n            }\n\n            lower.push(vertex);\n        }\n\n        // build upper hull\n        for (i = vertices.length - 1; i >= 0; i--) {\n            vertex = vertices[i];\n\n            while (upper.length >= 2 \n                   && Vector.cross3(upper[upper.length - 2], upper[upper.length - 1], vertex) <= 0) {\n                upper.pop();\n            }\n\n            upper.push(vertex);\n        }\n\n        // concatenation of the lower and upper hulls gives the convex hull\n        // omit last points because they are repeated at the beginning of the other list\n        upper.pop();\n        lower.pop();\n\n        return upper.concat(lower);\n    };\n\n})();\n\n},{\"../core/Common\":14,\"../geometry/Vector\":26}],28:[function(require,module,exports){\nvar Matter = module.exports = {};\nwindow.Matter = Matter;\nMatter.version = 'master';\n\nMatter.Body = require('../body/Body');\nMatter.Composite = require('../body/Composite');\nMatter.World = require('../body/World');\n\nMatter.Contact = require('../collision/Contact');\nMatter.Detector = require('../collision/Detector');\nMatter.Grid = require('../collision/Grid');\nMatter.Pairs = require('../collision/Pairs');\nMatter.Pair = require('../collision/Pair');\nMatter.Query = require('../collision/Query');\nMatter.Resolver = require('../collision/Resolver');\nMatter.SAT = require('../collision/SAT');\n\nMatter.Constraint = require('../constraint/Constraint');\nMatter.MouseConstraint = require('../constraint/MouseConstraint');\n\nMatter.Common = require('../core/Common');\nMatter.Engine = require('../core/Engine');\nMatter.Events = require('../core/Events');\nMatter.Mouse = require('../core/Mouse');\nMatter.Runner = require('../core/Runner');\nMatter.Sleeping = require('../core/Sleeping');\n\n\nMatter.Bodies = require('../factory/Bodies');\nMatter.Composites = require('../factory/Composites');\n\nMatter.Axes = require('../geometry/Axes');\nMatter.Bounds = require('../geometry/Bounds');\nMatter.Svg = require('../geometry/Svg');\nMatter.Vector = require('../geometry/Vector');\nMatter.Vertices = require('../geometry/Vertices');\n\nMatter.Render = require('../render/Render');\nMatter.RenderPixi = require('../render/RenderPixi');\n\n// aliases\n\nMatter.World.add = Matter.Composite.add;\nMatter.World.remove = Matter.Composite.remove;\nMatter.World.addComposite = Matter.Composite.addComposite;\nMatter.World.addBody = Matter.Composite.addBody;\nMatter.World.addConstraint = Matter.Composite.addConstraint;\nMatter.World.clear = Matter.Composite.clear;\nMatter.Engine.run = Matter.Runner.run;\n\n},{\"../body/Body\":1,\"../body/Composite\":2,\"../body/World\":3,\"../collision/Contact\":4,\"../collision/Detector\":5,\"../collision/Grid\":6,\"../collision/Pair\":7,\"../collision/Pairs\":8,\"../collision/Query\":9,\"../collision/Resolver\":10,\"../collision/SAT\":11,\"../constraint/Constraint\":12,\"../constraint/MouseConstraint\":13,\"../core/Common\":14,\"../core/Engine\":15,\"../core/Events\":16,\"../core/Metrics\":17,\"../core/Mouse\":18,\"../core/Runner\":19,\"../core/Sleeping\":20,\"../factory/Bodies\":21,\"../factory/Composites\":22,\"../geometry/Axes\":23,\"../geometry/Bounds\":24,\"../geometry/Svg\":25,\"../geometry/Vector\":26,\"../geometry/Vertices\":27,\"../render/Render\":29,\"../render/RenderPixi\":30}],29:[function(require,module,exports){\n/**\n* The `Matter.Render` module is a simple HTML5 canvas based renderer for visualising instances of `Matter.Engine`.\n* It is intended for development and debugging purposes, but may also be suitable for simple games.\n* It includes a number of drawing options including wireframe, vector with support for sprites and viewports.\n*\n* @class Render\n*/\n\nvar Render = {};\n\nmodule.exports = Render;\n\nvar Common = require('../core/Common');\nvar Composite = require('../body/Composite');\nvar Bounds = require('../geometry/Bounds');\nvar Events = require('../core/Events');\nvar Grid = require('../collision/Grid');\nvar Vector = require('../geometry/Vector');\n\n(function() {\n    \n    var _requestAnimationFrame,\n        _cancelAnimationFrame;\n\n    if (typeof window !== 'undefined') {\n        _requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame\n                                      || window.mozRequestAnimationFrame || window.msRequestAnimationFrame \n                                      || function(callback){ window.setTimeout(function() { callback(Common.now()); }, 1000 / 60); };\n   \n        _cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame \n                                      || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame;\n    }\n\n    /**\n     * Creates a new renderer. The options parameter is an object that specifies any properties you wish to override the defaults.\n     * All properties have default values, and many are pre-calculated automatically based on other properties.\n     * See the properties section below for detailed information on what you can pass via the `options` object.\n     * @method create\n     * @param {object} [options]\n     * @return {render} A new renderer\n     */\n    Render.create = function(options) {\n        var defaults = {\n            controller: Render,\n            engine: null,\n            element: null,\n            canvas: null,\n            mouse: null,\n            frameRequestId: null,\n            options: {\n                width: 800,\n                height: 600,\n                pixelRatio: 1,\n                background: '#fafafa',\n                wireframeBackground: '#222',\n                hasBounds: !!options.bounds,\n                enabled: true,\n                wireframes: true,\n                showSleeping: true,\n                showDebug: false,\n                showBroadphase: false,\n                showBounds: false,\n                showVelocity: false,\n                showCollisions: false,\n                showSeparations: false,\n                showAxes: false,\n                showPositions: false,\n                showAngleIndicator: false,\n                showIds: false,\n                showShadows: false,\n                showVertexNumbers: false,\n                showConvexHulls: false,\n                showInternalEdges: false,\n                showMousePosition: false\n            }\n        };\n\n        var render = Common.extend(defaults, options);\n\n        if (render.canvas) {\n            render.canvas.width = render.options.width || render.canvas.width;\n            render.canvas.height = render.options.height || render.canvas.height;\n        }\n\n        render.mouse = options.mouse;\n        render.engine = options.engine;\n        render.canvas = render.canvas || _createCanvas(render.options.width, render.options.height);\n        render.context = render.canvas.getContext('2d');\n        render.textures = {};\n\n        render.bounds = render.bounds || { \n            min: { \n                x: 0,\n                y: 0\n            }, \n            max: { \n                x: render.canvas.width,\n                y: render.canvas.height\n            }\n        };\n\n        if (render.options.pixelRatio !== 1) {\n            Render.setPixelRatio(render, render.options.pixelRatio);\n        }\n\n        if (Common.isElement(render.element)) {\n            render.element.appendChild(render.canvas);\n        } else {\n            Common.log('Render.create: options.element was undefined, render.canvas was created but not appended', 'warn');\n        }\n\n        return render;\n    };\n\n    /**\n     * Continuously updates the render canvas on the `requestAnimationFrame` event.\n     * @method run\n     * @param {render} render\n     */\n    Render.run = function(render) {\n        (function loop(time){\n            render.frameRequestId = _requestAnimationFrame(loop);\n            Render.world(render);\n        })();\n    };\n\n    /**\n     * Ends execution of `Render.run` on the given `render`, by canceling the animation frame request event loop.\n     * @method stop\n     * @param {render} render\n     */\n    Render.stop = function(render) {\n        _cancelAnimationFrame(render.frameRequestId);\n    };\n\n    /**\n     * Sets the pixel ratio of the renderer and updates the canvas.\n     * To automatically detect the correct ratio, pass the string `'auto'` for `pixelRatio`.\n     * @method setPixelRatio\n     * @param {render} render\n     * @param {number} pixelRatio\n     */\n    Render.setPixelRatio = function(render, pixelRatio) {\n        var options = render.options,\n            canvas = render.canvas;\n\n        if (pixelRatio === 'auto') {\n            pixelRatio = _getPixelRatio(canvas);\n        }\n\n        options.pixelRatio = pixelRatio;\n        canvas.setAttribute('data-pixel-ratio', pixelRatio);\n        canvas.width = options.width * pixelRatio;\n        canvas.height = options.height * pixelRatio;\n        canvas.style.width = options.width + 'px';\n        canvas.style.height = options.height + 'px';\n        render.context.scale(pixelRatio, pixelRatio);\n    };\n\n    /**\n     * Renders the given `engine`'s `Matter.World` object.\n     * This is the entry point for all rendering and should be called every time the scene changes.\n     * @method world\n     * @param {render} render\n     */\n    Render.world = function(render) {\n        var engine = render.engine,\n            world = engine.world,\n            canvas = render.canvas,\n            context = render.context,\n            options = render.options,\n            allBodies = Composite.allBodies(world),\n            allConstraints = Composite.allConstraints(world),\n            background = options.wireframes ? options.wireframeBackground : options.background,\n            bodies = [],\n            constraints = [],\n            i;\n\n        var event = {\n            timestamp: engine.timing.timestamp\n        };\n\n        Events.trigger(render, 'beforeRender', event);\n\n        // apply background if it has changed\n        if (render.currentBackground !== background)\n            _applyBackground(render, background);\n\n        // clear the canvas with a transparent fill, to allow the canvas background to show\n        context.globalCompositeOperation = 'source-in';\n        context.fillStyle = \"transparent\";\n        context.fillRect(0, 0, canvas.width, canvas.height);\n        context.globalCompositeOperation = 'source-over';\n\n        // handle bounds\n        if (options.hasBounds) {\n            var boundsWidth = render.bounds.max.x - render.bounds.min.x,\n                boundsHeight = render.bounds.max.y - render.bounds.min.y,\n                boundsScaleX = boundsWidth / options.width,\n                boundsScaleY = boundsHeight / options.height;\n\n            // filter out bodies that are not in view\n            for (i = 0; i < allBodies.length; i++) {\n                var body = allBodies[i];\n                if (Bounds.overlaps(body.bounds, render.bounds))\n                    bodies.push(body);\n            }\n\n            // filter out constraints that are not in view\n            for (i = 0; i < allConstraints.length; i++) {\n                var constraint = allConstraints[i],\n                    bodyA = constraint.bodyA,\n                    bodyB = constraint.bodyB,\n                    pointAWorld = constraint.pointA,\n                    pointBWorld = constraint.pointB;\n\n                if (bodyA) pointAWorld = Vector.add(bodyA.position, constraint.pointA);\n                if (bodyB) pointBWorld = Vector.add(bodyB.position, constraint.pointB);\n\n                if (!pointAWorld || !pointBWorld)\n                    continue;\n\n                if (Bounds.contains(render.bounds, pointAWorld) || Bounds.contains(render.bounds, pointBWorld))\n                    constraints.push(constraint);\n            }\n\n            // transform the view\n            context.scale(1 / boundsScaleX, 1 / boundsScaleY);\n            context.translate(-render.bounds.min.x, -render.bounds.min.y);\n        } else {\n            constraints = allConstraints;\n            bodies = allBodies;\n        }\n\n        if (!options.wireframes || (engine.enableSleeping && options.showSleeping)) {\n            // fully featured rendering of bodies\n            Render.bodies(render, bodies, context);\n        } else {\n            if (options.showConvexHulls)\n                Render.bodyConvexHulls(render, bodies, context);\n\n            // optimised method for wireframes only\n            Render.bodyWireframes(render, bodies, context);\n        }\n\n        if (options.showBounds)\n            Render.bodyBounds(render, bodies, context);\n\n        if (options.showAxes || options.showAngleIndicator)\n            Render.bodyAxes(render, bodies, context);\n        \n        if (options.showPositions)\n            Render.bodyPositions(render, bodies, context);\n\n        if (options.showVelocity)\n            Render.bodyVelocity(render, bodies, context);\n\n        if (options.showIds)\n            Render.bodyIds(render, bodies, context);\n\n        if (options.showSeparations)\n            Render.separations(render, engine.pairs.list, context);\n\n        if (options.showCollisions)\n            Render.collisions(render, engine.pairs.list, context);\n\n        if (options.showVertexNumbers)\n            Render.vertexNumbers(render, bodies, context);\n\n        if (options.showMousePosition)\n            Render.mousePosition(render, render.mouse, context);\n\n        Render.constraints(constraints, context);\n\n        if (options.showBroadphase && engine.broadphase.controller === Grid)\n            Render.grid(render, engine.broadphase, context);\n\n        if (options.showDebug)\n            Render.debug(render, context);\n\n        if (options.hasBounds) {\n            // revert view transforms\n            context.setTransform(options.pixelRatio, 0, 0, options.pixelRatio, 0, 0);\n        }\n\n        Events.trigger(render, 'afterRender', event);\n    };\n\n    /**\n     * Description\n     * @private\n     * @method debug\n     * @param {render} render\n     * @param {RenderingContext} context\n     */\n    Render.debug = function(render, context) {\n        var c = context,\n            engine = render.engine,\n            world = engine.world,\n            metrics = engine.metrics,\n            options = render.options,\n            bodies = Composite.allBodies(world),\n            space = \"    \";\n\n        if (engine.timing.timestamp - (render.debugTimestamp || 0) >= 500) {\n            var text = \"\";\n\n            if (metrics.timing) {\n                text += \"fps: \" + Math.round(metrics.timing.fps) + space;\n            }\n\n\n            render.debugString = text;\n            render.debugTimestamp = engine.timing.timestamp;\n        }\n\n        if (render.debugString) {\n            c.font = \"12px Arial\";\n\n            if (options.wireframes) {\n                c.fillStyle = 'rgba(255,255,255,0.5)';\n            } else {\n                c.fillStyle = 'rgba(0,0,0,0.5)';\n            }\n\n            var split = render.debugString.split('\\n');\n\n            for (var i = 0; i < split.length; i++) {\n                c.fillText(split[i], 50, 50 + i * 18);\n            }\n        }\n    };\n\n    /**\n     * Description\n     * @private\n     * @method constraints\n     * @param {constraint[]} constraints\n     * @param {RenderingContext} context\n     */\n    Render.constraints = function(constraints, context) {\n        var c = context;\n\n        for (var i = 0; i < constraints.length; i++) {\n            var constraint = constraints[i];\n\n            if (!constraint.render.visible || !constraint.pointA || !constraint.pointB)\n                continue;\n\n            var bodyA = constraint.bodyA,\n                bodyB = constraint.bodyB;\n\n            if (bodyA) {\n                c.beginPath();\n                c.moveTo(bodyA.position.x + constraint.pointA.x, bodyA.position.y + constraint.pointA.y);\n            } else {\n                c.beginPath();\n                c.moveTo(constraint.pointA.x, constraint.pointA.y);\n            }\n\n            if (bodyB) {\n                c.lineTo(bodyB.position.x + constraint.pointB.x, bodyB.position.y + constraint.pointB.y);\n            } else {\n                c.lineTo(constraint.pointB.x, constraint.pointB.y);\n            }\n\n            c.lineWidth = constraint.render.lineWidth;\n            c.strokeStyle = constraint.render.strokeStyle;\n            c.stroke();\n        }\n    };\n    \n    /**\n     * Description\n     * @private\n     * @method bodyShadows\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodyShadows = function(render, bodies, context) {\n        var c = context,\n            engine = render.engine;\n\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n\n            if (!body.render.visible)\n                continue;\n\n            if (body.circleRadius) {\n                c.beginPath();\n                c.arc(body.position.x, body.position.y, body.circleRadius, 0, 2 * Math.PI);\n                c.closePath();\n            } else {\n                c.beginPath();\n                c.moveTo(body.vertices[0].x, body.vertices[0].y);\n                for (var j = 1; j < body.vertices.length; j++) {\n                    c.lineTo(body.vertices[j].x, body.vertices[j].y);\n                }\n                c.closePath();\n            }\n\n            var distanceX = body.position.x - render.options.width * 0.5,\n                distanceY = body.position.y - render.options.height * 0.2,\n                distance = Math.abs(distanceX) + Math.abs(distanceY);\n\n            c.shadowColor = 'rgba(0,0,0,0.15)';\n            c.shadowOffsetX = 0.05 * distanceX;\n            c.shadowOffsetY = 0.05 * distanceY;\n            c.shadowBlur = 1 + 12 * Math.min(1, distance / 1000);\n\n            c.fill();\n\n            c.shadowColor = null;\n            c.shadowOffsetX = null;\n            c.shadowOffsetY = null;\n            c.shadowBlur = null;\n        }\n    };\n\n    /**\n     * Description\n     * @private\n     * @method bodies\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodies = function(render, bodies, context) {\n        var c = context,\n            engine = render.engine,\n            options = render.options,\n            showInternalEdges = options.showInternalEdges || !options.wireframes,\n            body,\n            part,\n            i,\n            k;\n\n        for (i = 0; i < bodies.length; i++) {\n            body = bodies[i];\n\n            if (!body.render.visible)\n                continue;\n\n            // handle compound parts\n            for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++) {\n                part = body.parts[k];\n\n                if (!part.render.visible)\n                    continue;\n\n                if (options.showSleeping && body.isSleeping) {\n                    c.globalAlpha = 0.5 * part.render.opacity;\n                } else if (part.render.opacity !== 1) {\n                    c.globalAlpha = part.render.opacity;\n                }\n\n                if (part.render.sprite && part.render.sprite.texture && !options.wireframes) {\n                    // part sprite\n                    var sprite = part.render.sprite,\n                        texture = _getTexture(render, sprite.texture);\n\n                    c.translate(part.position.x, part.position.y); \n                    c.rotate(part.angle);\n\n                    c.drawImage(\n                        texture,\n                        texture.width * -sprite.xOffset * sprite.xScale, \n                        texture.height * -sprite.yOffset * sprite.yScale, \n                        texture.width * sprite.xScale, \n                        texture.height * sprite.yScale\n                    );\n\n                    // revert translation, hopefully faster than save / restore\n                    c.rotate(-part.angle);\n                    c.translate(-part.position.x, -part.position.y); \n                } else {\n                    // part polygon\n                    if (part.circleRadius) {\n                        c.beginPath();\n                        c.arc(part.position.x, part.position.y, part.circleRadius, 0, 2 * Math.PI);\n                    } else {\n                        c.beginPath();\n                        c.moveTo(part.vertices[0].x, part.vertices[0].y);\n\n                        for (var j = 1; j < part.vertices.length; j++) {\n                            if (!part.vertices[j - 1].isInternal || showInternalEdges) {\n                                c.lineTo(part.vertices[j].x, part.vertices[j].y);\n                            } else {\n                                c.moveTo(part.vertices[j].x, part.vertices[j].y);\n                            }\n\n                            if (part.vertices[j].isInternal && !showInternalEdges) {\n                                c.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y);\n                            }\n                        }\n                        \n                        c.lineTo(part.vertices[0].x, part.vertices[0].y);\n                        c.closePath();\n                    }\n\n                    if (!options.wireframes) {\n                        c.fillStyle = part.render.fillStyle;\n                        c.lineWidth = part.render.lineWidth;\n                        c.strokeStyle = part.render.strokeStyle;\n                        c.fill();\n                    } else {\n                        c.lineWidth = 1;\n                        c.strokeStyle = '#bbb';\n                    }\n\n                    c.stroke();\n                }\n\n                c.globalAlpha = 1;\n            }\n        }\n    };\n\n    /**\n     * Optimised method for drawing body wireframes in one pass\n     * @private\n     * @method bodyWireframes\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodyWireframes = function(render, bodies, context) {\n        var c = context,\n            showInternalEdges = render.options.showInternalEdges,\n            body,\n            part,\n            i,\n            j,\n            k;\n\n        c.beginPath();\n\n        // render all bodies\n        for (i = 0; i < bodies.length; i++) {\n            body = bodies[i];\n\n            if (!body.render.visible)\n                continue;\n\n            // handle compound parts\n            for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++) {\n                part = body.parts[k];\n\n                c.moveTo(part.vertices[0].x, part.vertices[0].y);\n\n                for (j = 1; j < part.vertices.length; j++) {\n                    if (!part.vertices[j - 1].isInternal || showInternalEdges) {\n                        c.lineTo(part.vertices[j].x, part.vertices[j].y);\n                    } else {\n                        c.moveTo(part.vertices[j].x, part.vertices[j].y);\n                    }\n\n                    if (part.vertices[j].isInternal && !showInternalEdges) {\n                        c.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y);\n                    }\n                }\n                \n                c.lineTo(part.vertices[0].x, part.vertices[0].y);\n            }\n        }\n\n        c.lineWidth = 1;\n        c.strokeStyle = '#bbb';\n        c.stroke();\n    };\n\n    /**\n     * Optimised method for drawing body convex hull wireframes in one pass\n     * @private\n     * @method bodyConvexHulls\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodyConvexHulls = function(render, bodies, context) {\n        var c = context,\n            body,\n            part,\n            i,\n            j,\n            k;\n\n        c.beginPath();\n\n        // render convex hulls\n        for (i = 0; i < bodies.length; i++) {\n            body = bodies[i];\n\n            if (!body.render.visible || body.parts.length === 1)\n                continue;\n\n            c.moveTo(body.vertices[0].x, body.vertices[0].y);\n\n            for (j = 1; j < body.vertices.length; j++) {\n                c.lineTo(body.vertices[j].x, body.vertices[j].y);\n            }\n            \n            c.lineTo(body.vertices[0].x, body.vertices[0].y);\n        }\n\n        c.lineWidth = 1;\n        c.strokeStyle = 'rgba(255,255,255,0.2)';\n        c.stroke();\n    };\n\n    /**\n     * Renders body vertex numbers.\n     * @private\n     * @method vertexNumbers\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.vertexNumbers = function(render, bodies, context) {\n        var c = context,\n            i,\n            j,\n            k;\n\n        for (i = 0; i < bodies.length; i++) {\n            var parts = bodies[i].parts;\n            for (k = parts.length > 1 ? 1 : 0; k < parts.length; k++) {\n                var part = parts[k];\n                for (j = 0; j < part.vertices.length; j++) {\n                    c.fillStyle = 'rgba(255,255,255,0.2)';\n                    c.fillText(i + '_' + j, part.position.x + (part.vertices[j].x - part.position.x) * 0.8, part.position.y + (part.vertices[j].y - part.position.y) * 0.8);\n                }\n            }\n        }\n    };\n\n    /**\n     * Renders mouse position.\n     * @private\n     * @method mousePosition\n     * @param {render} render\n     * @param {mouse} mouse\n     * @param {RenderingContext} context\n     */\n    Render.mousePosition = function(render, mouse, context) {\n        var c = context;\n        c.fillStyle = 'rgba(255,255,255,0.8)';\n        c.fillText(mouse.position.x + '  ' + mouse.position.y, mouse.position.x + 5, mouse.position.y - 5);\n    };\n\n    /**\n     * Draws body bounds\n     * @private\n     * @method bodyBounds\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodyBounds = function(render, bodies, context) {\n        var c = context,\n            engine = render.engine,\n            options = render.options;\n\n        c.beginPath();\n\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n\n            if (body.render.visible) {\n                var parts = bodies[i].parts;\n                for (var j = parts.length > 1 ? 1 : 0; j < parts.length; j++) {\n                    var part = parts[j];\n                    c.rect(part.bounds.min.x, part.bounds.min.y, part.bounds.max.x - part.bounds.min.x, part.bounds.max.y - part.bounds.min.y);\n                }\n            }\n        }\n\n        if (options.wireframes) {\n            c.strokeStyle = 'rgba(255,255,255,0.08)';\n        } else {\n            c.strokeStyle = 'rgba(0,0,0,0.1)';\n        }\n\n        c.lineWidth = 1;\n        c.stroke();\n    };\n\n    /**\n     * Draws body angle indicators and axes\n     * @private\n     * @method bodyAxes\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodyAxes = function(render, bodies, context) {\n        var c = context,\n            engine = render.engine,\n            options = render.options,\n            part,\n            i,\n            j,\n            k;\n\n        c.beginPath();\n\n        for (i = 0; i < bodies.length; i++) {\n            var body = bodies[i],\n                parts = body.parts;\n\n            if (!body.render.visible)\n                continue;\n\n            if (options.showAxes) {\n                // render all axes\n                for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) {\n                    part = parts[j];\n                    for (k = 0; k < part.axes.length; k++) {\n                        var axis = part.axes[k];\n                        c.moveTo(part.position.x, part.position.y);\n                        c.lineTo(part.position.x + axis.x * 20, part.position.y + axis.y * 20);\n                    }\n                }\n            } else {\n                for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) {\n                    part = parts[j];\n                    for (k = 0; k < part.axes.length; k++) {\n                        // render a single axis indicator\n                        c.moveTo(part.position.x, part.position.y);\n                        c.lineTo((part.vertices[0].x + part.vertices[part.vertices.length-1].x) / 2, \n                                 (part.vertices[0].y + part.vertices[part.vertices.length-1].y) / 2);\n                    }\n                }\n            }\n        }\n\n        if (options.wireframes) {\n            c.strokeStyle = 'indianred';\n        } else {\n            c.strokeStyle = 'rgba(0,0,0,0.8)';\n            c.globalCompositeOperation = 'overlay';\n        }\n\n        c.lineWidth = 1;\n        c.stroke();\n        c.globalCompositeOperation = 'source-over';\n    };\n\n    /**\n     * Draws body positions\n     * @private\n     * @method bodyPositions\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodyPositions = function(render, bodies, context) {\n        var c = context,\n            engine = render.engine,\n            options = render.options,\n            body,\n            part,\n            i,\n            k;\n\n        c.beginPath();\n\n        // render current positions\n        for (i = 0; i < bodies.length; i++) {\n            body = bodies[i];\n\n            if (!body.render.visible)\n                continue;\n\n            // handle compound parts\n            for (k = 0; k < body.parts.length; k++) {\n                part = body.parts[k];\n                c.arc(part.position.x, part.position.y, 3, 0, 2 * Math.PI, false);\n                c.closePath();\n            }\n        }\n\n        if (options.wireframes) {\n            c.fillStyle = 'indianred';\n        } else {\n            c.fillStyle = 'rgba(0,0,0,0.5)';\n        }\n        c.fill();\n\n        c.beginPath();\n\n        // render previous positions\n        for (i = 0; i < bodies.length; i++) {\n            body = bodies[i];\n            if (body.render.visible) {\n                c.arc(body.positionPrev.x, body.positionPrev.y, 2, 0, 2 * Math.PI, false);\n                c.closePath();\n            }\n        }\n\n        c.fillStyle = 'rgba(255,165,0,0.8)';\n        c.fill();\n    };\n\n    /**\n     * Draws body velocity\n     * @private\n     * @method bodyVelocity\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodyVelocity = function(render, bodies, context) {\n        var c = context;\n\n        c.beginPath();\n\n        for (var i = 0; i < bodies.length; i++) {\n            var body = bodies[i];\n\n            if (!body.render.visible)\n                continue;\n\n            c.moveTo(body.position.x, body.position.y);\n            c.lineTo(body.position.x + (body.position.x - body.positionPrev.x) * 2, body.position.y + (body.position.y - body.positionPrev.y) * 2);\n        }\n\n        c.lineWidth = 3;\n        c.strokeStyle = 'cornflowerblue';\n        c.stroke();\n    };\n\n    /**\n     * Draws body ids\n     * @private\n     * @method bodyIds\n     * @param {render} render\n     * @param {body[]} bodies\n     * @param {RenderingContext} context\n     */\n    Render.bodyIds = function(render, bodies, context) {\n        var c = context,\n            i,\n            j;\n\n        for (i = 0; i < bodies.length; i++) {\n            if (!bodies[i].render.visible)\n                continue;\n\n            var parts = bodies[i].parts;\n            for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) {\n                var part = parts[j];\n                c.font = \"12px Arial\";\n                c.fillStyle = 'rgba(255,255,255,0.5)';\n                c.fillText(part.id, part.position.x + 10, part.position.y - 10);\n            }\n        }\n    };\n\n    /**\n     * Description\n     * @private\n     * @method collisions\n     * @param {render} render\n     * @param {pair[]} pairs\n     * @param {RenderingContext} context\n     */\n    Render.collisions = function(render, pairs, context) {\n        var c = context,\n            options = render.options,\n            pair,\n            collision,\n            corrected,\n            bodyA,\n            bodyB,\n            i,\n            j;\n\n        c.beginPath();\n\n        // render collision positions\n        for (i = 0; i < pairs.length; i++) {\n            pair = pairs[i];\n\n            if (!pair.isActive)\n                continue;\n\n            collision = pair.collision;\n            for (j = 0; j < pair.activeContacts.length; j++) {\n                var contact = pair.activeContacts[j],\n                    vertex = contact.vertex;\n                c.rect(vertex.x - 1.5, vertex.y - 1.5, 3.5, 3.5);\n            }\n        }\n\n        if (options.wireframes) {\n            c.fillStyle = 'rgba(255,255,255,0.7)';\n        } else {\n            c.fillStyle = 'orange';\n        }\n        c.fill();\n\n        c.beginPath();\n            \n        // render collision normals\n        for (i = 0; i < pairs.length; i++) {\n            pair = pairs[i];\n\n            if (!pair.isActive)\n                continue;\n\n            collision = pair.collision;\n\n            if (pair.activeContacts.length > 0) {\n                var normalPosX = pair.activeContacts[0].vertex.x,\n                    normalPosY = pair.activeContacts[0].vertex.y;\n\n                if (pair.activeContacts.length === 2) {\n                    normalPosX = (pair.activeContacts[0].vertex.x + pair.activeContacts[1].vertex.x) / 2;\n                    normalPosY = (pair.activeContacts[0].vertex.y + pair.activeContacts[1].vertex.y) / 2;\n                }\n                \n                if (collision.bodyB === collision.supports[0].body || collision.bodyA.isStatic === true) {\n                    c.moveTo(normalPosX - collision.normal.x * 8, normalPosY - collision.normal.y * 8);\n                } else {\n                    c.moveTo(normalPosX + collision.normal.x * 8, normalPosY + collision.normal.y * 8);\n                }\n\n                c.lineTo(normalPosX, normalPosY);\n            }\n        }\n\n        if (options.wireframes) {\n            c.strokeStyle = 'rgba(255,165,0,0.7)';\n        } else {\n            c.strokeStyle = 'orange';\n        }\n\n        c.lineWidth = 1;\n        c.stroke();\n    };\n\n    /**\n     * Description\n     * @private\n     * @method separations\n     * @param {render} render\n     * @param {pair[]} pairs\n     * @param {RenderingContext} context\n     */\n    Render.separations = function(render, pairs, context) {\n        var c = context,\n            options = render.options,\n            pair,\n            collision,\n            corrected,\n            bodyA,\n            bodyB,\n            i,\n            j;\n\n        c.beginPath();\n\n        // render separations\n        for (i = 0; i < pairs.length; i++) {\n            pair = pairs[i];\n\n            if (!pair.isActive)\n                continue;\n\n            collision = pair.collision;\n            bodyA = collision.bodyA;\n            bodyB = collision.bodyB;\n\n            var k = 1;\n\n            if (!bodyB.isStatic && !bodyA.isStatic) k = 0.5;\n            if (bodyB.isStatic) k = 0;\n\n            c.moveTo(bodyB.position.x, bodyB.position.y);\n            c.lineTo(bodyB.position.x - collision.penetration.x * k, bodyB.position.y - collision.penetration.y * k);\n\n            k = 1;\n\n            if (!bodyB.isStatic && !bodyA.isStatic) k = 0.5;\n            if (bodyA.isStatic) k = 0;\n\n            c.moveTo(bodyA.position.x, bodyA.position.y);\n            c.lineTo(bodyA.position.x + collision.penetration.x * k, bodyA.position.y + collision.penetration.y * k);\n        }\n\n        if (options.wireframes) {\n            c.strokeStyle = 'rgba(255,165,0,0.5)';\n        } else {\n            c.strokeStyle = 'orange';\n        }\n        c.stroke();\n    };\n\n    /**\n     * Description\n     * @private\n     * @method grid\n     * @param {render} render\n     * @param {grid} grid\n     * @param {RenderingContext} context\n     */\n    Render.grid = function(render, grid, context) {\n        var c = context,\n            options = render.options;\n\n        if (options.wireframes) {\n            c.strokeStyle = 'rgba(255,180,0,0.1)';\n        } else {\n            c.strokeStyle = 'rgba(255,180,0,0.5)';\n        }\n\n        c.beginPath();\n\n        var bucketKeys = Common.keys(grid.buckets);\n\n        for (var i = 0; i < bucketKeys.length; i++) {\n            var bucketId = bucketKeys[i];\n\n            if (grid.buckets[bucketId].length < 2)\n                continue;\n\n            var region = bucketId.split(',');\n            c.rect(0.5 + parseInt(region[0], 10) * grid.bucketWidth, \n                    0.5 + parseInt(region[1], 10) * grid.bucketHeight, \n                    grid.bucketWidth, \n                    grid.bucketHeight);\n        }\n\n        c.lineWidth = 1;\n        c.stroke();\n    };\n\n    /**\n     * Description\n     * @private\n     * @method inspector\n     * @param {inspector} inspector\n     * @param {RenderingContext} context\n     */\n    Render.inspector = function(inspector, context) {\n        var engine = inspector.engine,\n            selected = inspector.selected,\n            render = inspector.render,\n            options = render.options,\n            bounds;\n\n        if (options.hasBounds) {\n            var boundsWidth = render.bounds.max.x - render.bounds.min.x,\n                boundsHeight = render.bounds.max.y - render.bounds.min.y,\n                boundsScaleX = boundsWidth / render.options.width,\n                boundsScaleY = boundsHeight / render.options.height;\n            \n            context.scale(1 / boundsScaleX, 1 / boundsScaleY);\n            context.translate(-render.bounds.min.x, -render.bounds.min.y);\n        }\n\n        for (var i = 0; i < selected.length; i++) {\n            var item = selected[i].data;\n\n            context.translate(0.5, 0.5);\n            context.lineWidth = 1;\n            context.strokeStyle = 'rgba(255,165,0,0.9)';\n            context.setLineDash([1,2]);\n\n            switch (item.type) {\n\n            case 'body':\n\n                // render body selections\n                bounds = item.bounds;\n                context.beginPath();\n                context.rect(Math.floor(bounds.min.x - 3), Math.floor(bounds.min.y - 3), \n                             Math.floor(bounds.max.x - bounds.min.x + 6), Math.floor(bounds.max.y - bounds.min.y + 6));\n                context.closePath();\n                context.stroke();\n\n                break;\n\n            case 'constraint':\n\n                // render constraint selections\n                var point = item.pointA;\n                if (item.bodyA)\n                    point = item.pointB;\n                context.beginPath();\n                context.arc(point.x, point.y, 10, 0, 2 * Math.PI);\n                context.closePath();\n                context.stroke();\n\n                break;\n\n            }\n\n            context.setLineDash([]);\n            context.translate(-0.5, -0.5);\n        }\n\n        // render selection region\n        if (inspector.selectStart !== null) {\n            context.translate(0.5, 0.5);\n            context.lineWidth = 1;\n            context.strokeStyle = 'rgba(255,165,0,0.6)';\n            context.fillStyle = 'rgba(255,165,0,0.1)';\n            bounds = inspector.selectBounds;\n            context.beginPath();\n            context.rect(Math.floor(bounds.min.x), Math.floor(bounds.min.y), \n                         Math.floor(bounds.max.x - bounds.min.x), Math.floor(bounds.max.y - bounds.min.y));\n            context.closePath();\n            context.stroke();\n            context.fill();\n            context.translate(-0.5, -0.5);\n        }\n\n        if (options.hasBounds)\n            context.setTransform(1, 0, 0, 1, 0, 0);\n    };\n\n    /**\n     * Description\n     * @method _createCanvas\n     * @private\n     * @param {} width\n     * @param {} height\n     * @return canvas\n     */\n    var _createCanvas = function(width, height) {\n        var canvas = document.createElement('canvas');\n        canvas.width = width;\n        canvas.height = height;\n        canvas.oncontextmenu = function() { return false; };\n        canvas.onselectstart = function() { return false; };\n        return canvas;\n    };\n\n    /**\n     * Gets the pixel ratio of the canvas.\n     * @method _getPixelRatio\n     * @private\n     * @param {HTMLElement} canvas\n     * @return {Number} pixel ratio\n     */\n    var _getPixelRatio = function(canvas) {\n        var context = canvas.getContext('2d'),\n            devicePixelRatio = window.devicePixelRatio || 1,\n            backingStorePixelRatio = context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio\n                                      || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio\n                                      || context.backingStorePixelRatio || 1;\n\n        return devicePixelRatio / backingStorePixelRatio;\n    };\n\n    /**\n     * Gets the requested texture (an Image) via its path\n     * @method _getTexture\n     * @private\n     * @param {render} render\n     * @param {string} imagePath\n     * @return {Image} texture\n     */\n    var _getTexture = function(render, imagePath) {\n        var image = render.textures[imagePath];\n\n        if (image)\n            return image;\n\n        image = render.textures[imagePath] = new Image();\n        image.src = imagePath;\n\n        return image;\n    };\n\n    /**\n     * Applies the background to the canvas using CSS.\n     * @method applyBackground\n     * @private\n     * @param {render} render\n     * @param {string} background\n     */\n    var _applyBackground = function(render, background) {\n        var cssBackground = background;\n\n        if (/(jpg|gif|png)$/.test(background))\n            cssBackground = 'url(' + background + ')';\n\n        render.canvas.style.background = cssBackground;\n        render.canvas.style.backgroundSize = \"contain\";\n        render.currentBackground = background;\n    };\n\n    /*\n    *\n    *  Events Documentation\n    *\n    */\n\n    /**\n    * Fired before rendering\n    *\n    * @event beforeRender\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /**\n    * Fired after rendering\n    *\n    * @event afterRender\n    * @param {} event An event object\n    * @param {number} event.timestamp The engine.timing.timestamp of the event\n    * @param {} event.source The source object of the event\n    * @param {} event.name The name of the event\n    */\n\n    /*\n    *\n    *  Properties Documentation\n    *\n    */\n\n    /**\n     * A back-reference to the `Matter.Render` module.\n     *\n     * @property controller\n     * @type render\n     */\n\n    /**\n     * A reference to the `Matter.Engine` instance to be used.\n     *\n     * @property engine\n     * @type engine\n     */\n\n    /**\n     * A reference to the element where the canvas is to be inserted (if `render.canvas` has not been specified)\n     *\n     * @property element\n     * @type HTMLElement\n     * @default null\n     */\n\n    /**\n     * The canvas element to render to. If not specified, one will be created if `render.element` has been specified.\n     *\n     * @property canvas\n     * @type HTMLCanvasElement\n     * @default null\n     */\n\n    /**\n     * The configuration options of the renderer.\n     *\n     * @property options\n     * @type {}\n     */\n\n    /**\n     * The target width in pixels of the `render.canvas` to be created.\n     *\n     * @property options.width\n     * @type number\n     * @default 800\n     */\n\n    /**\n     * The target height in pixels of the `render.canvas` to be created.\n     *\n     * @property options.height\n     * @type number\n     * @default 600\n     */\n\n    /**\n     * A flag that specifies if `render.bounds` should be used when rendering.\n     *\n     * @property options.hasBounds\n     * @type boolean\n     * @default false\n     */\n\n    /**\n     * A `Bounds` object that specifies the drawing view region. \n     * Rendering will be automatically transformed and scaled to fit within the canvas size (`render.options.width` and `render.options.height`).\n     * This allows for creating views that can pan or zoom around the scene.\n     * You must also set `render.options.hasBounds` to `true` to enable bounded rendering.\n     *\n     * @property bounds\n     * @type bounds\n     */\n\n    /**\n     * The 2d rendering context from the `render.canvas` element.\n     *\n     * @property context\n     * @type CanvasRenderingContext2D\n     */\n\n    /**\n     * The sprite texture cache.\n     *\n     * @property textures\n     * @type {}\n     */\n\n})();\n\n},{\"../body/Composite\":2,\"../collision/Grid\":6,\"../core/Common\":14,\"../core/Events\":16,\"../geometry/Bounds\":24,\"../geometry/Vector\":26}],30:[function(require,module,exports){\n/**\n* The `Matter.RenderPixi` module is an example renderer using pixi.js.\n* See also `Matter.Render` for a canvas based renderer.\n*\n* @class RenderPixi\n* @deprecated the Matter.RenderPixi module will soon be removed from the Matter.js core.\n* It will likely be moved to its own repository (but maintenance will be limited).\n*/\n\nvar RenderPixi = {};\n\nmodule.exports = RenderPixi;\n\nvar Composite = require('../body/Composite');\nvar Common = require('../core/Common');\n\n(function() {\n\n    var _requestAnimationFrame,\n        _cancelAnimationFrame;\n\n    if (typeof window !== 'undefined') {\n        _requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame\n                                      || window.mozRequestAnimationFrame || window.msRequestAnimationFrame \n                                      || function(callback){ window.setTimeout(function() { callback(Common.now()); }, 1000 / 60); };\n   \n        _cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame \n                                      || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame;\n    }\n    \n    /**\n     * Creates a new Pixi.js WebGL renderer\n     * @method create\n     * @param {object} options\n     * @return {RenderPixi} A new renderer\n     * @deprecated\n     */\n    RenderPixi.create = function(options) {\n        Common.log('RenderPixi.create: Matter.RenderPixi is deprecated (see docs)', 'warn');\n\n        var defaults = {\n            controller: RenderPixi,\n            engine: null,\n            element: null,\n            frameRequestId: null,\n            canvas: null,\n            renderer: null,\n            container: null,\n            spriteContainer: null,\n            pixiOptions: null,\n            options: {\n                width: 800,\n                height: 600,\n                background: '#fafafa',\n                wireframeBackground: '#222',\n                hasBounds: false,\n                enabled: true,\n                wireframes: true,\n                showSleeping: true,\n                showDebug: false,\n                showBroadphase: false,\n                showBounds: false,\n                showVelocity: false,\n                showCollisions: false,\n                showAxes: false,\n                showPositions: false,\n                showAngleIndicator: false,\n                showIds: false,\n                showShadows: false\n            }\n        };\n\n        var render = Common.extend(defaults, options),\n            transparent = !render.options.wireframes && render.options.background === 'transparent';\n\n        // init pixi\n        render.pixiOptions = render.pixiOptions || {\n            view: render.canvas,\n            transparent: transparent,\n            antialias: true,\n            backgroundColor: options.background\n        };\n\n        render.mouse = options.mouse;\n        render.engine = options.engine;\n        render.renderer = render.renderer || new PIXI.WebGLRenderer(render.options.width, render.options.height, render.pixiOptions);\n        render.container = render.container || new PIXI.Container();\n        render.spriteContainer = render.spriteContainer || new PIXI.Container();\n        render.canvas = render.canvas || render.renderer.view;\n        render.bounds = render.bounds || { \n            min: {\n                x: 0,\n                y: 0\n            }, \n            max: { \n                x: render.options.width,\n                y: render.options.height\n            }\n        };\n\n        // caches\n        render.textures = {};\n        render.sprites = {};\n        render.primitives = {};\n\n        // use a sprite batch for performance\n        render.container.addChild(render.spriteContainer);\n\n        // insert canvas\n        if (Common.isElement(render.element)) {\n            render.element.appendChild(render.canvas);\n        } else {\n            Common.log('No \"render.element\" passed, \"render.canvas\" was not inserted into document.', 'warn');\n        }\n\n        // prevent menus on canvas\n        render.canvas.oncontextmenu = function() { return false; };\n        render.canvas.onselectstart = function() { return false; };\n\n        return render;\n    };\n\n    /**\n     * Continuously updates the render canvas on the `requestAnimationFrame` event.\n     * @method run\n     * @param {render} render\n     * @deprecated\n     */\n    RenderPixi.run = function(render) {\n        (function loop(time){\n            render.frameRequestId = _requestAnimationFrame(loop);\n            RenderPixi.world(render);\n        })();\n    };\n\n    /**\n     * Ends execution of `Render.run` on the given `render`, by canceling the animation frame request event loop.\n     * @method stop\n     * @param {render} render\n     * @deprecated\n     */\n    RenderPixi.stop = function(render) {\n        _cancelAnimationFrame(render.frameRequestId);\n    };\n\n    /**\n     * Clears the scene graph\n     * @method clear\n     * @param {RenderPixi} render\n     * @deprecated\n     */\n    RenderPixi.clear = function(render) {\n        var container = render.container,\n            spriteContainer = render.spriteContainer;\n\n        // clear stage container\n        while (container.children[0]) { \n            container.removeChild(container.children[0]); \n        }\n\n        // clear sprite batch\n        while (spriteContainer.children[0]) { \n            spriteContainer.removeChild(spriteContainer.children[0]); \n        }\n\n        var bgSprite = render.sprites['bg-0'];\n\n        // clear caches\n        render.textures = {};\n        render.sprites = {};\n        render.primitives = {};\n\n        // set background sprite\n        render.sprites['bg-0'] = bgSprite;\n        if (bgSprite)\n            container.addChildAt(bgSprite, 0);\n\n        // add sprite batch back into container\n        render.container.addChild(render.spriteContainer);\n\n        // reset background state\n        render.currentBackground = null;\n\n        // reset bounds transforms\n        container.scale.set(1, 1);\n        container.position.set(0, 0);\n    };\n\n    /**\n     * Sets the background of the canvas \n     * @method setBackground\n     * @param {RenderPixi} render\n     * @param {string} background\n     * @deprecated\n     */\n    RenderPixi.setBackground = function(render, background) {\n        if (render.currentBackground !== background) {\n            var isColor = background.indexOf && background.indexOf('#') !== -1,\n                bgSprite = render.sprites['bg-0'];\n\n            if (isColor) {\n                // if solid background color\n                var color = Common.colorToNumber(background);\n                render.renderer.backgroundColor = color;\n\n                // remove background sprite if existing\n                if (bgSprite)\n                    render.container.removeChild(bgSprite); \n            } else {\n                // initialise background sprite if needed\n                if (!bgSprite) {\n                    var texture = _getTexture(render, background);\n\n                    bgSprite = render.sprites['bg-0'] = new PIXI.Sprite(texture);\n                    bgSprite.position.x = 0;\n                    bgSprite.position.y = 0;\n                    render.container.addChildAt(bgSprite, 0);\n                }\n            }\n\n            render.currentBackground = background;\n        }\n    };\n\n    /**\n     * Description\n     * @method world\n     * @param {engine} engine\n     * @deprecated\n     */\n    RenderPixi.world = function(render) {\n        var engine = render.engine,\n            world = engine.world,\n            renderer = render.renderer,\n            container = render.container,\n            options = render.options,\n            bodies = Composite.allBodies(world),\n            allConstraints = Composite.allConstraints(world),\n            constraints = [],\n            i;\n\n        if (options.wireframes) {\n            RenderPixi.setBackground(render, options.wireframeBackground);\n        } else {\n            RenderPixi.setBackground(render, options.background);\n        }\n\n        // handle bounds\n        var boundsWidth = render.bounds.max.x - render.bounds.min.x,\n            boundsHeight = render.bounds.max.y - render.bounds.min.y,\n            boundsScaleX = boundsWidth / render.options.width,\n            boundsScaleY = boundsHeight / render.options.height;\n\n        if (options.hasBounds) {\n            // Hide bodies that are not in view\n            for (i = 0; i < bodies.length; i++) {\n                var body = bodies[i];\n                body.render.sprite.visible = Bounds.overlaps(body.bounds, render.bounds);\n            }\n\n            // filter out constraints that are not in view\n            for (i = 0; i < allConstraints.length; i++) {\n                var constraint = allConstraints[i],\n                    bodyA = constraint.bodyA,\n                    bodyB = constraint.bodyB,\n                    pointAWorld = constraint.pointA,\n                    pointBWorld = constraint.pointB;\n\n                if (bodyA) pointAWorld = Vector.add(bodyA.position, constraint.pointA);\n                if (bodyB) pointBWorld = Vector.add(bodyB.position, constraint.pointB);\n\n                if (!pointAWorld || !pointBWorld)\n                    continue;\n\n                if (Bounds.contains(render.bounds, pointAWorld) || Bounds.contains(render.bounds, pointBWorld))\n                    constraints.push(constraint);\n            }\n\n            // transform the view\n            container.scale.set(1 / boundsScaleX, 1 / boundsScaleY);\n            container.position.set(-render.bounds.min.x * (1 / boundsScaleX), -render.bounds.min.y * (1 / boundsScaleY));\n        } else {\n            constraints = allConstraints;\n        }\n\n        for (i = 0; i < bodies.length; i++)\n            RenderPixi.body(render, bodies[i]);\n\n        for (i = 0; i < constraints.length; i++)\n            RenderPixi.constraint(render, constraints[i]);\n\n        renderer.render(container);\n    };\n\n\n    /**\n     * Description\n     * @method constraint\n     * @param {engine} engine\n     * @param {constraint} constraint\n     * @deprecated\n     */\n    RenderPixi.constraint = function(render, constraint) {\n        var engine = render.engine,\n            bodyA = constraint.bodyA,\n            bodyB = constraint.bodyB,\n            pointA = constraint.pointA,\n            pointB = constraint.pointB,\n            container = render.container,\n            constraintRender = constraint.render,\n            primitiveId = 'c-' + constraint.id,\n            primitive = render.primitives[primitiveId];\n\n        // initialise constraint primitive if not existing\n        if (!primitive)\n            primitive = render.primitives[primitiveId] = new PIXI.Graphics();\n\n        // don't render if constraint does not have two end points\n        if (!constraintRender.visible || !constraint.pointA || !constraint.pointB) {\n            primitive.clear();\n            return;\n        }\n\n        // add to scene graph if not already there\n        if (Common.indexOf(container.children, primitive) === -1)\n            container.addChild(primitive);\n\n        // render the constraint on every update, since they can change dynamically\n        primitive.clear();\n        primitive.beginFill(0, 0);\n        primitive.lineStyle(constraintRender.lineWidth, Common.colorToNumber(constraintRender.strokeStyle), 1);\n        \n        if (bodyA) {\n            primitive.moveTo(bodyA.position.x + pointA.x, bodyA.position.y + pointA.y);\n        } else {\n            primitive.moveTo(pointA.x, pointA.y);\n        }\n\n        if (bodyB) {\n            primitive.lineTo(bodyB.position.x + pointB.x, bodyB.position.y + pointB.y);\n        } else {\n            primitive.lineTo(pointB.x, pointB.y);\n        }\n\n        primitive.endFill();\n    };\n    \n    /**\n     * Description\n     * @method body\n     * @param {engine} engine\n     * @param {body} body\n     * @deprecated\n     */\n    RenderPixi.body = function(render, body) {\n        var engine = render.engine,\n            bodyRender = body.render;\n\n        if (!bodyRender.visible)\n            return;\n\n        if (bodyRender.sprite && bodyRender.sprite.texture) {\n            var spriteId = 'b-' + body.id,\n                sprite = render.sprites[spriteId],\n                spriteContainer = render.spriteContainer;\n\n            // initialise body sprite if not existing\n            if (!sprite)\n                sprite = render.sprites[spriteId] = _createBodySprite(render, body);\n\n            // add to scene graph if not already there\n            if (Common.indexOf(spriteContainer.children, sprite) === -1)\n                spriteContainer.addChild(sprite);\n\n            // update body sprite\n            sprite.position.x = body.position.x;\n            sprite.position.y = body.position.y;\n            sprite.rotation = body.angle;\n            sprite.scale.x = bodyRender.sprite.xScale || 1;\n            sprite.scale.y = bodyRender.sprite.yScale || 1;\n        } else {\n            var primitiveId = 'b-' + body.id,\n                primitive = render.primitives[primitiveId],\n                container = render.container;\n\n            // initialise body primitive if not existing\n            if (!primitive) {\n                primitive = render.primitives[primitiveId] = _createBodyPrimitive(render, body);\n                primitive.initialAngle = body.angle;\n            }\n\n            // add to scene graph if not already there\n            if (Common.indexOf(container.children, primitive) === -1)\n                container.addChild(primitive);\n\n            // update body primitive\n            primitive.position.x = body.position.x;\n            primitive.position.y = body.position.y;\n            primitive.rotation = body.angle - primitive.initialAngle;\n        }\n    };\n\n    /**\n     * Creates a body sprite\n     * @method _createBodySprite\n     * @private\n     * @param {RenderPixi} render\n     * @param {body} body\n     * @return {PIXI.Sprite} sprite\n     * @deprecated\n     */\n    var _createBodySprite = function(render, body) {\n        var bodyRender = body.render,\n            texturePath = bodyRender.sprite.texture,\n            texture = _getTexture(render, texturePath),\n            sprite = new PIXI.Sprite(texture);\n\n        sprite.anchor.x = body.render.sprite.xOffset;\n        sprite.anchor.y = body.render.sprite.yOffset;\n\n        return sprite;\n    };\n\n    /**\n     * Creates a body primitive\n     * @method _createBodyPrimitive\n     * @private\n     * @param {RenderPixi} render\n     * @param {body} body\n     * @return {PIXI.Graphics} graphics\n     * @deprecated\n     */\n    var _createBodyPrimitive = function(render, body) {\n        var bodyRender = body.render,\n            options = render.options,\n            primitive = new PIXI.Graphics(),\n            fillStyle = Common.colorToNumber(bodyRender.fillStyle),\n            strokeStyle = Common.colorToNumber(bodyRender.strokeStyle),\n            strokeStyleIndicator = Common.colorToNumber(bodyRender.strokeStyle),\n            strokeStyleWireframe = Common.colorToNumber('#bbb'),\n            strokeStyleWireframeIndicator = Common.colorToNumber('#CD5C5C'),\n            part;\n\n        primitive.clear();\n\n        // handle compound parts\n        for (var k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++) {\n            part = body.parts[k];\n\n            if (!options.wireframes) {\n                primitive.beginFill(fillStyle, 1);\n                primitive.lineStyle(bodyRender.lineWidth, strokeStyle, 1);\n            } else {\n                primitive.beginFill(0, 0);\n                primitive.lineStyle(1, strokeStyleWireframe, 1);\n            }\n\n            primitive.moveTo(part.vertices[0].x - body.position.x, part.vertices[0].y - body.position.y);\n\n            for (var j = 1; j < part.vertices.length; j++) {\n                primitive.lineTo(part.vertices[j].x - body.position.x, part.vertices[j].y - body.position.y);\n            }\n\n            primitive.lineTo(part.vertices[0].x - body.position.x, part.vertices[0].y - body.position.y);\n\n            primitive.endFill();\n\n            // angle indicator\n            if (options.showAngleIndicator || options.showAxes) {\n                primitive.beginFill(0, 0);\n\n                if (options.wireframes) {\n                    primitive.lineStyle(1, strokeStyleWireframeIndicator, 1);\n                } else {\n                    primitive.lineStyle(1, strokeStyleIndicator);\n                }\n\n                primitive.moveTo(part.position.x - body.position.x, part.position.y - body.position.y);\n                primitive.lineTo(((part.vertices[0].x + part.vertices[part.vertices.length-1].x) / 2 - body.position.x), \n                                 ((part.vertices[0].y + part.vertices[part.vertices.length-1].y) / 2 - body.position.y));\n\n                primitive.endFill();\n            }\n        }\n\n        return primitive;\n    };\n\n    /**\n     * Gets the requested texture (a PIXI.Texture) via its path\n     * @method _getTexture\n     * @private\n     * @param {RenderPixi} render\n     * @param {string} imagePath\n     * @return {PIXI.Texture} texture\n     * @deprecated\n     */\n    var _getTexture = function(render, imagePath) {\n        var texture = render.textures[imagePath];\n\n        if (!texture)\n            texture = render.textures[imagePath] = PIXI.Texture.fromImage(imagePath);\n\n        return texture;\n    };\n\n})();\n\n},{\"../body/Composite\":2,\"../core/Common\":14}]},{},[28])(28)\n});"
  },
  {
    "path": "public/libs/laya/protobuf.js",
    "content": "/*!\n * protobuf.js v6.7.0 (c) 2016, Daniel Wirtz\n * Compiled Sun, 12 Mar 2017 21:09:56 UTC\n * Licensed under the BSD-3-Clause License\n * see: https://github.com/dcodeIO/protobuf.js for details\n */\n(function(global,undefined){\"use strict\";(function prelude(modules, cache, entries) {\n\n    // This is the prelude used to bundle protobuf.js for the browser. Wraps up the CommonJS\n    // sources through a conflict-free require shim and is again wrapped within an iife that\n    // provides a unified `global` and a minification-friendly `undefined` var plus a global\n    // \"use strict\" directive so that minification can remove the directives of each module.\n\n    function $require(name) {\n        var $module = cache[name];\n        if (!$module)\n            modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n        return $module.exports;\n    }\n\n    // Expose globally\n    var protobuf = global.protobuf = $require(entries[0]);\n\n    // Be nice to AMD\n    if (typeof define === \"function\" && define.amd)\n        define([\"long\"], function(Long) {\n            protobuf.util.Long = Long;\n            protobuf.configure();\n            return protobuf;\n        });\n\n    // Be nice to CommonJS\n    if (typeof module === \"object\" && module && module.exports)\n        module.exports = protobuf;\n\n})/* end of prelude */({1:[function(require,module,exports){\n\"use strict\";\nmodule.exports = asPromise;\n\n/**\n * Returns a promise from a node-style callback function.\n * @memberof util\n * @param {function(?Error, ...*)} fn Function to call\n * @param {*} ctx Function context\n * @param {...*} params Function arguments\n * @returns {Promise<*>} Promisified function\n */\nfunction asPromise(fn, ctx/*, varargs */) {\n    var params = [];\n    for (var i = 2; i < arguments.length;)\n        params.push(arguments[i++]);\n    var pending = true;\n    return new Promise(function asPromiseExecutor(resolve, reject) {\n        params.push(function asPromiseCallback(err/*, varargs */) {\n            if (pending) {\n                pending = false;\n                if (err)\n                    reject(err);\n                else {\n                    var args = [];\n                    for (var i = 1; i < arguments.length;)\n                        args.push(arguments[i++]);\n                    resolve.apply(null, args);\n                }\n            }\n        });\n        try {\n            fn.apply(ctx || this, params); // eslint-disable-line no-invalid-this\n        } catch (err) {\n            if (pending) {\n                pending = false;\n                reject(err);\n            }\n        }\n    });\n}\n\n},{}],2:[function(require,module,exports){\n\"use strict\";\n\n/**\n * A minimal base64 implementation for number arrays.\n * @memberof util\n * @namespace\n */\nvar base64 = exports;\n\n/**\n * Calculates the byte length of a base64 encoded string.\n * @param {string} string Base64 encoded string\n * @returns {number} Byte length\n */\nbase64.length = function length(string) {\n    var p = string.length;\n    if (!p)\n        return 0;\n    var n = 0;\n    while (--p % 4 > 1 && string.charAt(p) === \"=\")\n        ++n;\n    return Math.ceil(string.length * 3) / 4 - n;\n};\n\n// Base64 encoding table\nvar b64 = new Array(64);\n\n// Base64 decoding table\nvar s64 = new Array(123);\n\n// 65..90, 97..122, 48..57, 43, 47\nfor (var i = 0; i < 64;)\n    s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\n\n/**\n * Encodes a buffer to a base64 encoded string.\n * @param {Uint8Array} buffer Source buffer\n * @param {number} start Source start\n * @param {number} end Source end\n * @returns {string} Base64 encoded string\n */\nbase64.encode = function encode(buffer, start, end) {\n    var string = []; // alt: new Array(Math.ceil((end - start) / 3) * 4);\n    var i = 0, // output index\n        j = 0, // goto index\n        t;     // temporary\n    while (start < end) {\n        var b = buffer[start++];\n        switch (j) {\n            case 0:\n                string[i++] = b64[b >> 2];\n                t = (b & 3) << 4;\n                j = 1;\n                break;\n            case 1:\n                string[i++] = b64[t | b >> 4];\n                t = (b & 15) << 2;\n                j = 2;\n                break;\n            case 2:\n                string[i++] = b64[t | b >> 6];\n                string[i++] = b64[b & 63];\n                j = 0;\n                break;\n        }\n    }\n    if (j) {\n        string[i++] = b64[t];\n        string[i  ] = 61;\n        if (j === 1)\n            string[i + 1] = 61;\n    }\n    return String.fromCharCode.apply(String, string);\n};\n\nvar invalidEncoding = \"invalid encoding\";\n\n/**\n * Decodes a base64 encoded string to a buffer.\n * @param {string} string Source string\n * @param {Uint8Array} buffer Destination buffer\n * @param {number} offset Destination offset\n * @returns {number} Number of bytes written\n * @throws {Error} If encoding is invalid\n */\nbase64.decode = function decode(string, buffer, offset) {\n    var start = offset;\n    var j = 0, // goto index\n        t;     // temporary\n    for (var i = 0; i < string.length;) {\n        var c = string.charCodeAt(i++);\n        if (c === 61 && j > 1)\n            break;\n        if ((c = s64[c]) === undefined)\n            throw Error(invalidEncoding);\n        switch (j) {\n            case 0:\n                t = c;\n                j = 1;\n                break;\n            case 1:\n                buffer[offset++] = t << 2 | (c & 48) >> 4;\n                t = c;\n                j = 2;\n                break;\n            case 2:\n                buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\n                t = c;\n                j = 3;\n                break;\n            case 3:\n                buffer[offset++] = (t & 3) << 6 | c;\n                j = 0;\n                break;\n        }\n    }\n    if (j === 1)\n        throw Error(invalidEncoding);\n    return offset - start;\n};\n\n/**\n * Tests if the specified string appears to be base64 encoded.\n * @param {string} string String to test\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\n */\nbase64.test = function test(string) {\n    return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\n};\n\n},{}],3:[function(require,module,exports){\n\"use strict\";\nmodule.exports = codegen;\n\nvar blockOpenRe  = /[{[]$/,\n    blockCloseRe = /^[}\\]]/,\n    casingRe     = /:$/,\n    branchRe     = /^\\s*(?:if|}?else if|while|for)\\b|\\b(?:else)\\s*$/,\n    breakRe      = /\\b(?:break|continue)(?: \\w+)?;?$|^\\s*return\\b/;\n\n/**\n * A closure for generating functions programmatically.\n * @memberof util\n * @namespace\n * @function\n * @param {...string} params Function parameter names\n * @returns {Codegen} Codegen instance\n * @property {boolean} supported Whether code generation is supported by the environment.\n * @property {boolean} verbose=false When set to true, codegen will log generated code to console. Useful for debugging.\n * @property {function(string, ...*):string} sprintf Underlying sprintf implementation\n */\nfunction codegen() {\n    var params = [],\n        src    = [],\n        indent = 1,\n        inCase = false;\n    for (var i = 0; i < arguments.length;)\n        params.push(arguments[i++]);\n\n    /**\n     * A codegen instance as returned by {@link codegen}, that also is a sprintf-like appender function.\n     * @typedef Codegen\n     * @type {function}\n     * @param {string} format Format string\n     * @param {...*} args Replacements\n     * @returns {Codegen} Itself\n     * @property {function(string=):string} str Stringifies the so far generated function source.\n     * @property {function(string=, Object=):function} eof Ends generation and builds the function whilst applying a scope.\n     */\n    /**/\n    function gen() {\n        var args = [],\n            i = 0;\n        for (; i < arguments.length;)\n            args.push(arguments[i++]);\n        var line = sprintf.apply(null, args);\n        var level = indent;\n        if (src.length) {\n            var prev = src[src.length - 1];\n\n            // block open or one time branch\n            if (blockOpenRe.test(prev))\n                level = ++indent; // keep\n            else if (branchRe.test(prev))\n                ++level; // once\n\n            // casing\n            if (casingRe.test(prev) && !casingRe.test(line)) {\n                level = ++indent;\n                inCase = true;\n            } else if (inCase && breakRe.test(prev)) {\n                level = --indent;\n                inCase = false;\n            }\n\n            // block close\n            if (blockCloseRe.test(line))\n                level = --indent;\n        }\n        for (i = 0; i < level; ++i)\n            line = \"\\t\" + line;\n        src.push(line);\n        return gen;\n    }\n\n    /**\n     * Stringifies the so far generated function source.\n     * @param {string} [name] Function name, defaults to generate an anonymous function\n     * @returns {string} Function source using tabs for indentation\n     * @inner\n     */\n    function str(name) {\n        return \"function\" + (name ? \" \" + name.replace(/[^\\w_$]/g, \"_\") : \"\") + \"(\" + params.join(\",\") + \") {\\n\" + src.join(\"\\n\") + \"\\n}\";\n    }\n\n    gen.str = str;\n\n    /**\n     * Ends generation and builds the function whilst applying a scope.\n     * @param {string} [name] Function name, defaults to generate an anonymous function\n     * @param {Object.<string,*>} [scope] Function scope\n     * @returns {function} The generated function, with scope applied if specified\n     * @inner\n     */\n    function eof(name, scope) {\n        if (typeof name === \"object\") {\n            scope = name;\n            name = undefined;\n        }\n        var source = gen.str(name);\n        if (codegen.verbose)\n            console.log(\"--- codegen ---\\n\" + source.replace(/^/mg, \"> \").replace(/\\t/g, \"  \")); // eslint-disable-line no-console\n        var keys = Object.keys(scope || (scope = {}));\n        return Function.apply(null, keys.concat(\"return \" + source)).apply(null, keys.map(function(key) { return scope[key]; })); // eslint-disable-line no-new-func\n        //     ^ Creates a wrapper function with the scoped variable names as its parameters,\n        //       calls it with the respective scoped variable values ^\n        //       and returns our brand-new properly scoped function.\n        //\n        // This works because \"Invoking the Function constructor as a function (without using the\n        // new operator) has the same effect as invoking it as a constructor.\"\n        // https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Function\n    }\n\n    gen.eof = eof;\n\n    return gen;\n}\n\nfunction sprintf(format) {\n    var args = [],\n        i = 1;\n    for (; i < arguments.length;)\n        args.push(arguments[i++]);\n    i = 0;\n    format = format.replace(/%([dfjs])/g, function($0, $1) {\n        switch ($1) {\n            case \"d\":\n                return Math.floor(args[i++]);\n            case \"f\":\n                return Number(args[i++]);\n            case \"j\":\n                return JSON.stringify(args[i++]);\n            default:\n                return args[i++];\n        }\n    });\n    if (i !== args.length)\n        throw Error(\"argument count mismatch\");\n    return format;\n}\n\ncodegen.sprintf   = sprintf;\ncodegen.supported = false; try { codegen.supported = codegen(\"a\",\"b\")(\"return a-b\").eof()(2,1) === 1; } catch (e) {} // eslint-disable-line no-empty\ncodegen.verbose   = false;\n\n},{}],4:[function(require,module,exports){\n\"use strict\";\nmodule.exports = EventEmitter;\n\n/**\n * Constructs a new event emitter instance.\n * @classdesc A minimal event emitter.\n * @memberof util\n * @constructor\n */\nfunction EventEmitter() {\n\n    /**\n     * Registered listeners.\n     * @type {Object.<string,*>}\n     * @private\n     */\n    this._listeners = {};\n}\n\n/**\n * Registers an event listener.\n * @param {string} evt Event name\n * @param {function} fn Listener\n * @param {*} [ctx] Listener context\n * @returns {util.EventEmitter} `this`\n */\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\n    (this._listeners[evt] || (this._listeners[evt] = [])).push({\n        fn  : fn,\n        ctx : ctx || this\n    });\n    return this;\n};\n\n/**\n * Removes an event listener or any matching listeners if arguments are omitted.\n * @param {string} [evt] Event name. Removes all listeners if omitted.\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\n * @returns {util.EventEmitter} `this`\n */\nEventEmitter.prototype.off = function off(evt, fn) {\n    if (evt === undefined)\n        this._listeners = {};\n    else {\n        if (fn === undefined)\n            this._listeners[evt] = [];\n        else {\n            var listeners = this._listeners[evt];\n            for (var i = 0; i < listeners.length;)\n                if (listeners[i].fn === fn)\n                    listeners.splice(i, 1);\n                else\n                    ++i;\n        }\n    }\n    return this;\n};\n\n/**\n * Emits an event by calling its listeners with the specified arguments.\n * @param {string} evt Event name\n * @param {...*} args Arguments\n * @returns {util.EventEmitter} `this`\n */\nEventEmitter.prototype.emit = function emit(evt) {\n    var listeners = this._listeners[evt];\n    if (listeners) {\n        var args = [],\n            i = 1;\n        for (; i < arguments.length;)\n            args.push(arguments[i++]);\n        for (i = 0; i < listeners.length;)\n            listeners[i].fn.apply(listeners[i++].ctx, args);\n    }\n    return this;\n};\n\n},{}],5:[function(require,module,exports){\n\"use strict\";\nmodule.exports = fetch;\n\nvar asPromise = require(1),\n    inquire   = require(6);\n\nvar fs = inquire(\"fs\");\n\n/**\n * Node-style callback as used by {@link util.fetch}.\n * @typedef FetchCallback\n * @type {function}\n * @param {?Error} error Error, if any, otherwise `null`\n * @param {string} [contents] File contents, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Options as used by {@link util.fetch}.\n * @typedef FetchOptions\n * @type {Object}\n * @property {boolean} [binary=false] Whether expecting a binary response\n * @property {boolean} [xhr=false] If `true`, forces the use of XMLHttpRequest\n */\n\n/**\n * Fetches the contents of a file.\n * @memberof util\n * @param {string} filename File path or url\n * @param {FetchOptions} options Fetch options\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n */\nfunction fetch(filename, options, callback) {\n    if (typeof options === \"function\") {\n        callback = options;\n        options = {};\n    } else if (!options)\n        options = {};\n\n    if (!callback)\n        return asPromise(fetch, this, filename, options); // eslint-disable-line no-invalid-this\n\n    // if a node-like filesystem is present, try it first but fall back to XHR if nothing is found.\n    if (!options.xhr && fs && fs.readFile)\n        return fs.readFile(filename, function fetchReadFileCallback(err, contents) {\n            return err && typeof XMLHttpRequest !== \"undefined\"\n                ? fetch.xhr(filename, options, callback)\n                : err\n                ? callback(err)\n                : callback(null, options.binary ? contents : contents.toString(\"utf8\"));\n        });\n\n    // use the XHR version otherwise.\n    return fetch.xhr(filename, options, callback);\n}\n\n/**\n * Fetches the contents of a file.\n * @name util.fetch\n * @function\n * @param {string} path File path or url\n * @param {FetchCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n\n/**\n * Fetches the contents of a file.\n * @name util.fetch\n * @function\n * @param {string} path File path or url\n * @param {FetchOptions} [options] Fetch options\n * @returns {Promise<string|Uint8Array>} Promise\n * @variation 3\n */\n\n/**/\nfetch.xhr = function fetch_xhr(filename, options, callback) {\n    var xhr = new XMLHttpRequest();\n    xhr.onreadystatechange /* works everywhere */ = function fetchOnReadyStateChange() {\n\n        if (xhr.readyState !== 4)\n            return undefined;\n\n        // local cors security errors return status 0 / empty string, too. afaik this cannot be\n        // reliably distinguished from an actually empty file for security reasons. feel free\n        // to send a pull request if you are aware of a solution.\n        if (xhr.status !== 0 && xhr.status !== 200)\n            return callback(Error(\"status \" + xhr.status));\n\n        // if binary data is expected, make sure that some sort of array is returned, even if\n        // ArrayBuffers are not supported. the binary string fallback, however, is unsafe.\n        if (options.binary) {\n            var buffer = xhr.response;\n            if (!buffer) {\n                buffer = [];\n                for (var i = 0; i < xhr.responseText.length; ++i)\n                    buffer.push(xhr.responseText.charCodeAt(i) & 255);\n            }\n            return callback(null, typeof Uint8Array !== \"undefined\" ? new Uint8Array(buffer) : buffer);\n        }\n        return callback(null, xhr.responseText);\n    };\n\n    if (options.binary) {\n        // ref: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Sending_and_Receiving_Binary_Data#Receiving_binary_data_in_older_browsers\n        if (\"overrideMimeType\" in xhr)\n            xhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\n        xhr.responseType = \"arraybuffer\";\n    }\n\n    xhr.open(\"GET\", filename);\n    xhr.send();\n};\n\n},{\"1\":1,\"6\":6}],6:[function(require,module,exports){\n\"use strict\";\nmodule.exports = inquire;\n\n/**\n * Requires a module only if available.\n * @memberof util\n * @param {string} moduleName Module to require\n * @returns {?Object} Required module if available and not empty, otherwise `null`\n */\nfunction inquire(moduleName) {\n    try {\n        var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\n        if (mod && (mod.length || Object.keys(mod).length))\n            return mod;\n    } catch (e) {} // eslint-disable-line no-empty\n    return null;\n}\n\n},{}],7:[function(require,module,exports){\n\"use strict\";\n\n/**\n * A minimal path module to resolve Unix, Windows and URL paths alike.\n * @memberof util\n * @namespace\n */\nvar path = exports;\n\nvar isAbsolute =\n/**\n * Tests if the specified path is absolute.\n * @param {string} path Path to test\n * @returns {boolean} `true` if path is absolute\n */\npath.isAbsolute = function isAbsolute(path) {\n    return /^(?:\\/|\\w+:)/.test(path);\n};\n\nvar normalize =\n/**\n * Normalizes the specified path.\n * @param {string} path Path to normalize\n * @returns {string} Normalized path\n */\npath.normalize = function normalize(path) {\n    path = path.replace(/\\\\/g, \"/\")\n               .replace(/\\/{2,}/g, \"/\");\n    var parts    = path.split(\"/\"),\n        absolute = isAbsolute(path),\n        prefix   = \"\";\n    if (absolute)\n        prefix = parts.shift() + \"/\";\n    for (var i = 0; i < parts.length;) {\n        if (parts[i] === \"..\") {\n            if (i > 0 && parts[i - 1] !== \"..\")\n                parts.splice(--i, 2);\n            else if (absolute)\n                parts.splice(i, 1);\n            else\n                ++i;\n        } else if (parts[i] === \".\")\n            parts.splice(i, 1);\n        else\n            ++i;\n    }\n    return prefix + parts.join(\"/\");\n};\n\n/**\n * Resolves the specified include path against the specified origin path.\n * @param {string} originPath Path to the origin file\n * @param {string} includePath Include path relative to origin path\n * @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized\n * @returns {string} Path to the include file\n */\npath.resolve = function resolve(originPath, includePath, alreadyNormalized) {\n    if (!alreadyNormalized)\n        includePath = normalize(includePath);\n    if (isAbsolute(includePath))\n        return includePath;\n    if (!alreadyNormalized)\n        originPath = normalize(originPath);\n    return (originPath = originPath.replace(/(?:\\/|^)[^/]+$/, \"\")).length ? normalize(originPath + \"/\" + includePath) : includePath;\n};\n\n},{}],8:[function(require,module,exports){\n\"use strict\";\nmodule.exports = pool;\n\n/**\n * An allocator as used by {@link util.pool}.\n * @typedef PoolAllocator\n * @type {function}\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\n\n/**\n * A slicer as used by {@link util.pool}.\n * @typedef PoolSlicer\n * @type {function}\n * @param {number} start Start offset\n * @param {number} end End offset\n * @returns {Uint8Array} Buffer slice\n * @this {Uint8Array}\n */\n\n/**\n * A general purpose buffer pool.\n * @memberof util\n * @function\n * @param {PoolAllocator} alloc Allocator\n * @param {PoolSlicer} slice Slicer\n * @param {number} [size=8192] Slab size\n * @returns {PoolAllocator} Pooled allocator\n */\nfunction pool(alloc, slice, size) {\n    var SIZE   = size || 8192;\n    var MAX    = SIZE >>> 1;\n    var slab   = null;\n    var offset = SIZE;\n    return function pool_alloc(size) {\n        if (size < 1 || size > MAX)\n            return alloc(size);\n        if (offset + size > SIZE) {\n            slab = alloc(SIZE);\n            offset = 0;\n        }\n        var buf = slice.call(slab, offset, offset += size);\n        if (offset & 7) // align to 32 bit\n            offset = (offset | 7) + 1;\n        return buf;\n    };\n}\n\n},{}],9:[function(require,module,exports){\n\"use strict\";\n\n/**\n * A minimal UTF8 implementation for number arrays.\n * @memberof util\n * @namespace\n */\nvar utf8 = exports;\n\n/**\n * Calculates the UTF8 byte length of a string.\n * @param {string} string String\n * @returns {number} Byte length\n */\nutf8.length = function utf8_length(string) {\n    var len = 0,\n        c = 0;\n    for (var i = 0; i < string.length; ++i) {\n        c = string.charCodeAt(i);\n        if (c < 128)\n            len += 1;\n        else if (c < 2048)\n            len += 2;\n        else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\n            ++i;\n            len += 4;\n        } else\n            len += 3;\n    }\n    return len;\n};\n\n/**\n * Reads UTF8 bytes as a string.\n * @param {Uint8Array} buffer Source buffer\n * @param {number} start Source start\n * @param {number} end Source end\n * @returns {string} String read\n */\nutf8.read = function utf8_read(buffer, start, end) {\n    var len = end - start;\n    if (len < 1)\n        return \"\";\n    var parts = null,\n        chunk = [],\n        i = 0, // char offset\n        t;     // temporary\n    while (start < end) {\n        t = buffer[start++];\n        if (t < 128)\n            chunk[i++] = t;\n        else if (t > 191 && t < 224)\n            chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\n        else if (t > 239 && t < 365) {\n            t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\n            chunk[i++] = 0xD800 + (t >> 10);\n            chunk[i++] = 0xDC00 + (t & 1023);\n        } else\n            chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\n        if (i > 8191) {\n            (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\n            i = 0;\n        }\n    }\n    if (parts) {\n        if (i)\n            parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\n        return parts.join(\"\");\n    }\n    return String.fromCharCode.apply(String, chunk.slice(0, i));\n};\n\n/**\n * Writes a string as UTF8 bytes.\n * @param {string} string Source string\n * @param {Uint8Array} buffer Destination buffer\n * @param {number} offset Destination offset\n * @returns {number} Bytes written\n */\nutf8.write = function utf8_write(string, buffer, offset) {\n    var start = offset,\n        c1, // character 1\n        c2; // character 2\n    for (var i = 0; i < string.length; ++i) {\n        c1 = string.charCodeAt(i);\n        if (c1 < 128) {\n            buffer[offset++] = c1;\n        } else if (c1 < 2048) {\n            buffer[offset++] = c1 >> 6       | 192;\n            buffer[offset++] = c1       & 63 | 128;\n        } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\n            c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\n            ++i;\n            buffer[offset++] = c1 >> 18      | 240;\n            buffer[offset++] = c1 >> 12 & 63 | 128;\n            buffer[offset++] = c1 >> 6  & 63 | 128;\n            buffer[offset++] = c1       & 63 | 128;\n        } else {\n            buffer[offset++] = c1 >> 12      | 224;\n            buffer[offset++] = c1 >> 6  & 63 | 128;\n            buffer[offset++] = c1       & 63 | 128;\n        }\n    }\n    return offset - start;\n};\n\n},{}],10:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Class;\n\nvar Message = require(21),\n    util    = require(36);\n\nvar Type; // cyclic\n\n/**\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\n * @classdesc Runtime class providing the tools to create your own custom classes.\n * @constructor\n * @param {Type} type Reflected message type\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\n * @returns {Message} Message prototype\n */\nfunction Class(type, ctor) {\n    if (!Type)\n        Type = require(34);\n\n    if (!(type instanceof Type))\n        throw TypeError(\"type must be a Type\");\n\n    if (ctor) {\n        if (typeof ctor !== \"function\")\n            throw TypeError(\"ctor must be a function\");\n    } else\n        ctor = Class.generate(type).eof(type.name); // named constructor function (codegen is required anyway)\n\n    // Let's pretend...\n    ctor.constructor = Class;\n\n    // new Class() -> Message.prototype\n    (ctor.prototype = new Message()).constructor = ctor;\n\n    // Static methods on Message are instance methods on Class and vice versa\n    util.merge(ctor, Message, true);\n\n    // Classes and messages reference their reflected type\n    ctor.$type = type;\n    ctor.prototype.$type = type;\n\n    // Messages have non-enumerable default values on their prototype\n    var i = 0;\n    for (; i < /* initializes */ type.fieldsArray.length; ++i) {\n        // objects on the prototype must be immmutable. users must assign a new object instance and\n        // cannot use Array#push on empty arrays on the prototype for example, as this would modify\n        // the value on the prototype for ALL messages of this type. Hence, these objects are frozen.\n        ctor.prototype[type._fieldsArray[i].name] = Array.isArray(type._fieldsArray[i].resolve().defaultValue)\n            ? util.emptyArray\n            : util.isObject(type._fieldsArray[i].defaultValue) && !type._fieldsArray[i].long\n              ? util.emptyObject\n              : type._fieldsArray[i].defaultValue; // if a long, it is frozen when initialized\n    }\n\n    // Messages have non-enumerable getters and setters for each virtual oneof field\n    var ctorProperties = {};\n    for (i = 0; i < /* initializes */ type.oneofsArray.length; ++i)\n        ctorProperties[type._oneofsArray[i].resolve().name] = {\n            get: util.oneOfGetter(type._oneofsArray[i].oneof),\n            set: util.oneOfSetter(type._oneofsArray[i].oneof)\n        };\n    if (i)\n        Object.defineProperties(ctor.prototype, ctorProperties);\n\n    // Register\n    type.ctor = ctor;\n\n    return ctor.prototype;\n}\n\n/**\n * Generates a constructor function for the specified type.\n * @param {Type} type Type to use\n * @returns {Codegen} Codegen instance\n */\nClass.generate = function generate(type) { // eslint-disable-line no-unused-vars\n    /* eslint-disable no-unexpected-multiline */\n    var gen = util.codegen(\"p\");\n    // see issue #700\n    /*\n    for (var i = 0, field; i < type.fieldsArray.length; ++i)\n        if ((field = type._fieldsArray[i]).map) gen\n            (\"this%s={}\", util.safeProp(field.name));\n        else if (field.repeated) gen\n            (\"this%s=[]\", util.safeProp(field.name));\n    */\n    return gen\n    (\"if(p){\")\n        (\"for(var ks=Object.keys(p),i=0;i<ks.length;++i)\")\n            (\"this[ks[i]]=p[ks[i]];\")\n    (\"}\");\n    /* eslint-enable no-unexpected-multiline */\n};\n\n/**\n * Constructs a new message prototype for the specified reflected type and sets up its constructor.\n * @function\n * @param {Type} type Reflected message type\n * @param {*} [ctor] Custom constructor to set up, defaults to create a generic one if omitted\n * @returns {Message} Message prototype\n */\nClass.create = Class;\n\n// Static methods on Message are instance methods on Class and vice versa\nClass.prototype = Message;\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @name Class#fromObject\n * @function\n * @param {Object.<string,*>} object Plain object\n * @returns {Message} Message instance\n */\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * This is an alias of {@link Class#fromObject}.\n * @name Class#from\n * @function\n * @param {Object.<string,*>} object Plain object\n * @returns {Message} Message instance\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @name Class#toObject\n * @function\n * @param {Message} message Message instance\n * @param {ConversionOptions} [options] Conversion options\n * @returns {Object.<string,*>} Plain object\n */\n\n/**\n * Encodes a message of this type.\n * @name Class#encode\n * @function\n * @param {Message|Object} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n */\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @name Class#encodeDelimited\n * @function\n * @param {Message|Object} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n */\n\n/**\n * Decodes a message of this type.\n * @name Class#decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {Message} Decoded message\n */\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Class#decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {Message} Decoded message\n */\n\n/**\n * Verifies a message of this type.\n * @name Class#verify\n * @function\n * @param {Message|Object} message Message or plain object to verify\n * @returns {?string} `null` if valid, otherwise the reason why it is not\n */\n\n},{\"21\":21,\"34\":34,\"36\":36}],11:[function(require,module,exports){\n\"use strict\";\nmodule.exports = common;\n\n/**\n * Provides common type definitions.\n * Can also be used to provide additional google types or your own custom types.\n * @param {string} name Short name as in `google/protobuf/[name].proto` or full file name\n * @param {Object.<string,*>} json JSON definition within `google.protobuf` if a short name, otherwise the file's root definition\n * @returns {undefined}\n * @property {Object.<string,*>} google/protobuf/any.proto Any\n * @property {Object.<string,*>} google/protobuf/duration.proto Duration\n * @property {Object.<string,*>} google/protobuf/empty.proto Empty\n * @property {Object.<string,*>} google/protobuf/struct.proto Struct, Value, NullValue and ListValue\n * @property {Object.<string,*>} google/protobuf/timestamp.proto Timestamp\n * @property {Object.<string,*>} google/protobuf/wrappers.proto Wrappers\n * @example\n * // manually provides descriptor.proto (assumes google/protobuf/ namespace and .proto extension)\n * protobuf.common(\"descriptor\", descriptorJson);\n *\n * // manually provides a custom definition (uses my.foo namespace)\n * protobuf.common(\"my/foo/bar.proto\", myFooBarJson);\n */\nfunction common(name, json) {\n    if (!commonRe.test(name)) {\n        name = \"google/protobuf/\" + name + \".proto\";\n        json = { nested: { google: { nested: { protobuf: { nested: json } } } } };\n    }\n    common[name] = json;\n}\n\nvar commonRe = /\\/|\\./;\n\n// Not provided because of limited use (feel free to discuss or to provide yourself):\n//\n// google/protobuf/descriptor.proto\n// google/protobuf/field_mask.proto\n// google/protobuf/source_context.proto\n// google/protobuf/type.proto\n//\n// Stripped and pre-parsed versions of these non-bundled files are instead available as part of\n// the repository or package within the google/protobuf directory.\n\ncommon(\"any\", {\n    Any: {\n        fields: {\n            type_url: {\n                type: \"string\",\n                id: 1\n            },\n            value: {\n                type: \"bytes\",\n                id: 2\n            }\n        }\n    }\n});\n\nvar timeType;\n\ncommon(\"duration\", {\n    Duration: timeType = {\n        fields: {\n            seconds: {\n                type: \"int64\",\n                id: 1\n            },\n            nanos: {\n                type: \"int32\",\n                id: 2\n            }\n        }\n    }\n});\n\ncommon(\"timestamp\", {\n    Timestamp: timeType\n});\n\ncommon(\"empty\", {\n    Empty: {\n        fields: {}\n    }\n});\n\ncommon(\"struct\", {\n    Struct: {\n        fields: {\n            fields: {\n                keyType: \"string\",\n                type: \"Value\",\n                id: 1\n            }\n        }\n    },\n    Value: {\n        oneofs: {\n            kind: {\n                oneof: [\n                    \"nullValue\",\n                    \"numberValue\",\n                    \"stringValue\",\n                    \"boolValue\",\n                    \"structValue\",\n                    \"listValue\"\n                ]\n            }\n        },\n        fields: {\n            nullValue: {\n                type: \"NullValue\",\n                id: 1\n            },\n            numberValue: {\n                type: \"double\",\n                id: 2\n            },\n            stringValue: {\n                type: \"string\",\n                id: 3\n            },\n            boolValue: {\n                type: \"bool\",\n                id: 4\n            },\n            structValue: {\n                type: \"Struct\",\n                id: 5\n            },\n            listValue: {\n                type: \"ListValue\",\n                id: 6\n            }\n        }\n    },\n    NullValue: {\n        values: {\n            NULL_VALUE: 0\n        }\n    },\n    ListValue: {\n        fields: {\n            values: {\n                rule: \"repeated\",\n                type: \"Value\",\n                id: 1\n            }\n        }\n    }\n});\n\ncommon(\"wrappers\", {\n    DoubleValue: {\n        fields: {\n            value: {\n                type: \"double\",\n                id: 1\n            }\n        }\n    },\n    FloatValue: {\n        fields: {\n            value: {\n                type: \"float\",\n                id: 1\n            }\n        }\n    },\n    Int64Value: {\n        fields: {\n            value: {\n                type: \"int64\",\n                id: 1\n            }\n        }\n    },\n    UInt64Value: {\n        fields: {\n            value: {\n                type: \"uint64\",\n                id: 1\n            }\n        }\n    },\n    Int32Value: {\n        fields: {\n            value: {\n                type: \"int32\",\n                id: 1\n            }\n        }\n    },\n    UInt32Value: {\n        fields: {\n            value: {\n                type: \"uint32\",\n                id: 1\n            }\n        }\n    },\n    BoolValue: {\n        fields: {\n            value: {\n                type: \"bool\",\n                id: 1\n            }\n        }\n    },\n    StringValue: {\n        fields: {\n            value: {\n                type: \"string\",\n                id: 1\n            }\n        }\n    },\n    BytesValue: {\n        fields: {\n            value: {\n                type: \"bytes\",\n                id: 1\n            }\n        }\n    }\n});\n\n},{}],12:[function(require,module,exports){\n\"use strict\";\n/**\n * Runtime message from/to plain object converters.\n * @namespace\n */\nvar converter = exports;\n\nvar Enum = require(15),\n    util = require(36);\n\n/**\n * Generates a partial value fromObject conveter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_fromObject(gen, field, fieldIndex, prop) {\n    /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n    if (field.resolvedType) {\n        if (field.resolvedType instanceof Enum) { gen\n            (\"switch(d%s){\", prop);\n            for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {\n                if (field.repeated && values[keys[i]] === field.typeDefault) gen\n                (\"default:\");\n                gen\n                (\"case%j:\", keys[i])\n                (\"case %j:\", values[keys[i]])\n                    (\"m%s=%j\", prop, values[keys[i]])\n                    (\"break\");\n            } gen\n            (\"}\");\n        } else gen\n            (\"if(typeof d%s!==\\\"object\\\")\", prop)\n                (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n            (\"m%s=types[%d].fromObject(d%s)\", prop, fieldIndex, prop);\n    } else {\n        var isUnsigned = false;\n        switch (field.type) {\n            case \"double\":\n            case \"float\":gen\n                (\"m%s=Number(d%s)\", prop, prop);\n                break;\n            case \"uint32\":\n            case \"fixed32\": gen\n                (\"m%s=d%s>>>0\", prop, prop);\n                break;\n            case \"int32\":\n            case \"sint32\":\n            case \"sfixed32\": gen\n                (\"m%s=d%s|0\", prop, prop);\n                break;\n            case \"uint64\":\n                isUnsigned = true;\n                // eslint-disable-line no-fallthrough\n            case \"int64\":\n            case \"sint64\":\n            case \"fixed64\":\n            case \"sfixed64\": gen\n                (\"if(util.Long)\")\n                    (\"(m%s=util.Long.fromValue(d%s)).unsigned=%j\", prop, prop, isUnsigned)\n                (\"else if(typeof d%s===\\\"string\\\")\", prop)\n                    (\"m%s=parseInt(d%s,10)\", prop, prop)\n                (\"else if(typeof d%s===\\\"number\\\")\", prop)\n                    (\"m%s=d%s\", prop, prop)\n                (\"else if(typeof d%s===\\\"object\\\")\", prop)\n                    (\"m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)\", prop, prop, prop, isUnsigned ? \"true\" : \"\");\n                break;\n            case \"bytes\": gen\n                (\"if(typeof d%s===\\\"string\\\")\", prop)\n                    (\"util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)\", prop, prop, prop)\n                (\"else if(d%s.length)\", prop)\n                    (\"m%s=d%s\", prop, prop);\n                break;\n            case \"string\": gen\n                (\"m%s=String(d%s)\", prop, prop);\n                break;\n            case \"bool\": gen\n                (\"m%s=Boolean(d%s)\", prop, prop);\n                break;\n            /* default: gen\n                (\"m%s=d%s\", prop, prop);\n                break; */\n        }\n    }\n    return gen;\n    /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a plain object to runtime message converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.fromObject = function fromObject(mtype) {\n    /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n    var fields = mtype.fieldsArray;\n    var gen = util.codegen(\"d\")\n    (\"if(d instanceof this.ctor)\")\n        (\"return d\");\n    if (!fields.length) return gen\n    (\"return new this.ctor\");\n    gen\n    (\"var m=new this.ctor\");\n    for (var i = 0; i < fields.length; ++i) {\n        var field  = fields[i].resolve(),\n            prop   = util.safeProp(field.name);\n\n        // Map fields\n        if (field.map) { gen\n    (\"if(d%s){\", prop)\n        (\"if(typeof d%s!==\\\"object\\\")\", prop)\n            (\"throw TypeError(%j)\", field.fullName + \": object expected\")\n        (\"m%s={}\", prop)\n        (\"for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){\", prop);\n            genValuePartial_fromObject(gen, field, i, prop + \"[ks[i]]\")\n        (\"}\")\n    (\"}\");\n\n        // Repeated fields\n        } else if (field.repeated) { gen\n    (\"if(d%s){\", prop)\n        (\"if(!Array.isArray(d%s))\", prop)\n            (\"throw TypeError(%j)\", field.fullName + \": array expected\")\n        (\"m%s=[]\", prop)\n        (\"for(var i=0;i<d%s.length;++i){\", prop);\n            genValuePartial_fromObject(gen, field, i, prop + \"[i]\")\n        (\"}\")\n    (\"}\");\n\n        // Non-repeated fields\n        } else {\n            if (!(field.resolvedType instanceof Enum)) gen // no need to test for null/undefined if an enum (uses switch)\n    (\"if(d%s!==undefined&&d%s!==null){\", prop, prop);\n        genValuePartial_fromObject(gen, field, i, prop);\n            if (!(field.resolvedType instanceof Enum)) gen\n    (\"}\");\n        }\n    } return gen\n    (\"return m\");\n    /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n};\n\n/**\n * Generates a partial value toObject converter.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} prop Property reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genValuePartial_toObject(gen, field, fieldIndex, prop) {\n    /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n    if (field.resolvedType) {\n        if (field.resolvedType instanceof Enum) gen\n            (\"d%s=o.enums===String?types[%d].values[m%s]:m%s\", prop, fieldIndex, prop, prop);\n        else gen\n            (\"d%s=types[%d].toObject(m%s,o)\", prop, fieldIndex, prop);\n    } else {\n        var isUnsigned = false;\n        switch (field.type) {\n            case \"uint64\":\n                isUnsigned = true;\n                // eslint-disable-line no-fallthrough\n            case \"int64\":\n            case \"sint64\":\n            case \"fixed64\":\n            case \"sfixed64\": gen\n            (\"if(typeof m%s===\\\"number\\\")\", prop)\n                (\"d%s=o.longs===String?String(m%s):m%s\", prop, prop, prop)\n            (\"else\") // Long-like\n                (\"d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s\", prop, prop, prop, prop, isUnsigned ? \"true\": \"\", prop);\n                break;\n            case \"bytes\": gen\n            (\"d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s\", prop, prop, prop, prop, prop);\n                break;\n            default: gen\n            (\"d%s=m%s\", prop, prop);\n                break;\n        }\n    }\n    return gen;\n    /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n\n/**\n * Generates a runtime message to plain object converter specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nconverter.toObject = function toObject(mtype) {\n    /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n    var fields = mtype.fieldsArray;\n    if (!fields.length)\n        return util.codegen()(\"return {}\");\n    var gen = util.codegen(\"m\", \"o\")\n    (\"if(!o)\")\n        (\"o={}\")\n    (\"var d={}\");\n\n    var repeatedFields = [],\n        mapFields = [],\n        otherFields = [],\n        i = 0;\n    for (; i < fields.length; ++i)\n        if (fields[i].resolve().repeated)\n            repeatedFields.push(fields[i]);\n        else if (fields[i].map)\n            mapFields.push(fields[i]);\n        else\n            otherFields.push(fields[i]);\n\n    if (repeatedFields.length) { gen\n    (\"if(o.arrays||o.defaults){\");\n        for (i = 0; i < repeatedFields.length; ++i) gen\n        (\"d%s=[]\", util.safeProp(repeatedFields[i].name));\n        gen\n    (\"}\");\n    }\n\n    if (mapFields.length) { gen\n    (\"if(o.objects||o.defaults){\");\n        for (i = 0; i < mapFields.length; ++i) gen\n        (\"d%s={}\", util.safeProp(mapFields[i].name));\n        gen\n    (\"}\");\n    }\n\n    if (otherFields.length) { gen\n    (\"if(o.defaults){\");\n        for (i = 0, field; i < otherFields.length; ++i) {\n            var field = otherFields[i],\n                prop  = util.safeProp(field.name);\n            if (field.resolvedType instanceof Enum) gen\n        (\"d%s=o.enums===String?%j:%j\", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);\n            else if (field.long) gen\n        (\"if(util.Long){\")\n            (\"var n=new util.Long(%d,%d,%j)\", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)\n            (\"d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n\", prop)\n        (\"}else\")\n            (\"d%s=o.longs===String?%j:%d\", prop, field.typeDefault.toString(), field.typeDefault.toNumber());\n            else if (field.bytes) gen\n        (\"d%s=o.bytes===String?%j:%s\", prop, String.fromCharCode.apply(String, field.typeDefault), \"[\" + Array.prototype.slice.call(field.typeDefault).join(\",\") + \"]\");\n            else gen\n        (\"d%s=%j\", prop, field.typeDefault); // also messages (=null)\n        } gen\n    (\"}\");\n    }\n    for (i = 0, field; i < fields.length; ++i) {\n        var field = fields[i],\n            prop  = util.safeProp(field.name); gen\n    (\"if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){\", prop, prop, field.name);\n        if (field.map) { gen\n        (\"d%s={}\", prop)\n        (\"for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){\", prop);\n            genValuePartial_toObject(gen, field, i, prop + \"[ks2[j]]\")\n        (\"}\");\n        } else if (field.repeated) { gen\n        (\"d%s=[]\", prop)\n        (\"for(var j=0;j<m%s.length;++j){\", prop);\n            genValuePartial_toObject(gen, field, i, prop + \"[j]\")\n        (\"}\");\n        } else\n        genValuePartial_toObject(gen, field, i, prop);\n        gen\n    (\"}\");\n    }\n    return gen\n    (\"return d\");\n    /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n};\n\n},{\"15\":15,\"36\":36}],13:[function(require,module,exports){\n\"use strict\";\nmodule.exports = decoder;\n\ndecoder.compat = true;\n\nvar Enum    = require(15),\n    types   = require(35),\n    util    = require(36);\n\nfunction missing(field) {\n    return \"missing required '\" + field.name + \"'\";\n}\n\n/**\n * Generates a decoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n * @property {boolean} compat=true Generates backward/forward compatible decoders (packed fields)\n */\nfunction decoder(mtype) {\n    /* eslint-disable no-unexpected-multiline */\n    var gen = util.codegen(\"r\", \"l\")\n    (\"if(!(r instanceof Reader))\")\n        (\"r=Reader.create(r)\")\n    (\"var c=l===undefined?r.len:r.pos+l,m=new this.ctor\")\n    (\"while(r.pos<c){\")\n        (\"var t=r.uint32()\");\n    if (mtype.group) gen\n        (\"if((t&7)===4)\")\n            (\"break\");\n    gen\n        (\"switch(t>>>3){\");\n\n    var i = 0;\n    for (; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n        var field = mtype._fieldsArray[i].resolve(),\n            type  = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\n            ref   = \"m\" + util.safeProp(field.name); gen\n            (\"case %d:\", field.id);\n\n        // Map fields\n        if (field.map) { gen\n\n                (\"r.skip().pos++\") // assumes id 1 + key wireType\n                (\"if(%s===util.emptyObject)\", ref)\n                    (\"%s={}\", ref)\n                (\"var k=r.%s()\", field.keyType)\n                (\"r.pos++\"); // assumes id 2 + value wireType\n            if (types.basic[type] === undefined) gen\n                (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())\", ref, i); // can't be groups\n            else gen\n                (\"%s[typeof k===\\\"object\\\"?util.longToHash(k):k]=r.%s()\", ref, type);\n\n        // Repeated fields\n        } else if (field.repeated) { gen\n\n                (\"if(!(%s&&%s.length))\", ref, ref)\n                    (\"%s=[]\", ref);\n\n            // Packable (always check for forward and backward compatiblity)\n            if ((decoder.compat || field.packed) && types.packed[type] !== undefined) gen\n                (\"if((t&7)===2){\")\n                    (\"var c2=r.uint32()+r.pos\")\n                    (\"while(r.pos<c2)\")\n                        (\"%s.push(r.%s())\", ref, type)\n                (\"}else\");\n\n            // Non-packed\n            if (types.basic[type] === undefined) gen(field.resolvedType.group\n                    ? \"%s.push(types[%d].decode(r))\"\n                    : \"%s.push(types[%d].decode(r,r.uint32()))\", ref, i);\n            else gen\n                    (\"%s.push(r.%s())\", ref, type);\n\n        // Non-repeated\n        } else if (types.basic[type] === undefined) gen(field.resolvedType.group\n                ? \"%s=types[%d].decode(r)\"\n                : \"%s=types[%d].decode(r,r.uint32())\", ref, i);\n        else gen\n                (\"%s=r.%s()\", ref, type);\n        gen\n                (\"break\");\n\n    // Unknown fields\n    } gen\n            (\"default:\")\n                (\"r.skipType(t&7)\")\n                (\"break\")\n\n        (\"}\")\n    (\"}\");\n\n    // Field presence\n    for (i = 0; i < mtype._fieldsArray.length; ++i) {\n        var rfield = mtype._fieldsArray[i];\n        if (rfield.required) gen\n    (\"if(!m.hasOwnProperty(%j))\", rfield.name)\n        (\"throw util.ProtocolError(%j,{instance:m})\", missing(rfield));\n    }\n\n    return gen\n    (\"return m\");\n    /* eslint-enable no-unexpected-multiline */\n}\n\n},{\"15\":15,\"35\":35,\"36\":36}],14:[function(require,module,exports){\n\"use strict\";\nmodule.exports = encoder;\n\nencoder.compat = true;\n\nvar Enum     = require(15),\n    types    = require(35),\n    util     = require(36);\n\n/**\n * Generates a partial message type encoder.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genTypePartial(gen, field, fieldIndex, ref) {\n    return field.resolvedType.group\n        ? gen(\"types[%d].encode(%s,w.uint32(%d)).uint32(%d)\", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0)\n        : gen(\"types[%d].encode(%s,w.uint32(%d).fork()).ldelim()\", fieldIndex, ref, (field.id << 3 | 2) >>> 0);\n}\n\n/**\n * Compares reflected fields by id.\n * @param {Field} a First field\n * @param {Field} b Second field\n * @returns {number} Comparison value\n * @ignore\n */\nfunction compareFieldsById(a, b) {\n    return a.id - b.id;\n}\n\n/**\n * Generates an encoder specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n * @property {boolean} compat=true Generates encoders serializing in ascending field order\n */\nfunction encoder(mtype) {\n    /* eslint-disable no-unexpected-multiline, block-scoped-var, no-redeclare */\n    var gen = util.codegen(\"m\", \"w\")\n    (\"if(!w)\")\n        (\"w=Writer.create()\");\n\n    var i, ref;\n\n    // \"when a message is serialized its known fields should be written sequentially by field number\"\n    var fields = /* initializes */ mtype.fieldsArray;\n    /* istanbul ignore else */\n    if (encoder.compat)\n        fields = fields.slice().sort(compareFieldsById);\n\n    for (var i = 0; i < fields.length; ++i) {\n        var field    = fields[i].resolve(),\n            index    = encoder.compat ? mtype._fieldsArray.indexOf(field) : /* istanbul ignore next */ i;\n        if (field.partOf) // see below for oneofs\n            continue;\n        var type     = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\n            wireType = types.basic[type];\n            ref      = \"m\" + util.safeProp(field.name);\n\n        // Map fields\n        if (field.map) {\n            gen\n    (\"if(%s&&m.hasOwnProperty(%j)){\", ref, field.name)\n        (\"for(var ks=Object.keys(%s),i=0;i<ks.length;++i){\", ref)\n            (\"w.uint32(%d).fork().uint32(%d).%s(ks[i])\", (field.id << 3 | 2) >>> 0, 8 | types.mapKey[field.keyType], field.keyType);\n            if (wireType === undefined) gen\n            (\"types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()\", index, ref); // can't be groups\n            else gen\n            (\".uint32(%d).%s(%s[ks[i]]).ldelim()\", 16 | wireType, type, ref);\n            gen\n        (\"}\")\n    (\"}\");\n\n        // Repeated fields\n        } else if (field.repeated) {\n\n            // Packed repeated\n            if (field.packed && types.packed[type] !== undefined) { gen\n\n    (\"if(%s&&%s.length&&m.hasOwnProperty(%j)){\", ref, ref, field.name)\n        (\"w.uint32(%d).fork()\", (field.id << 3 | 2) >>> 0)\n        (\"for(var i=0;i<%s.length;++i)\", ref)\n            (\"w.%s(%s[i])\", type, ref)\n        (\"w.ldelim()\")\n    (\"}\");\n\n            // Non-packed\n            } else { gen\n\n    (\"if(%s!==undefined&&m.hasOwnProperty(%j)){\", ref, field.name)\n        (\"for(var i=0;i<%s.length;++i)\", ref);\n                if (wireType === undefined)\n            genTypePartial(gen, field, index, ref + \"[i]\");\n                else gen\n            (\"w.uint32(%d).%s(%s[i])\", (field.id << 3 | wireType) >>> 0, type, ref);\n                gen\n    (\"}\");\n\n            }\n\n        // Non-repeated\n        } else {\n            if (!field.required) {\n\n                if (field.long) gen\n    (\"if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))\", ref, ref, field.name);\n                else if (field.bytes || field.resolvedType && !(field.resolvedType instanceof Enum)) gen\n    (\"if(%s&&m.hasOwnProperty(%j))\", ref, field.name);\n                else gen\n    (\"if(%s!==undefined&&m.hasOwnProperty(%j))\", ref, field.name);\n\n            }\n\n            if (wireType === undefined)\n        genTypePartial(gen, field, index, ref);\n            else gen\n        (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n\n        }\n    }\n\n    // oneofs\n    for (var i = 0; i < /* initializes */ mtype.oneofsArray.length; ++i) {\n        var oneof = mtype._oneofsArray[i]; gen\n        (\"switch(%s){\", \"m\" + util.safeProp(oneof.name));\n        for (var j = 0; j < /* direct */ oneof.fieldsArray.length; ++j) {\n            var field    = oneof.fieldsArray[j],\n                type     = field.resolvedType instanceof Enum ? \"uint32\" : field.type,\n                wireType = types.basic[type];\n                ref      = \"m\" + util.safeProp(field.name); gen\n            (\"case%j:\", field.name);\n            if (wireType === undefined)\n                genTypePartial(gen, field, mtype._fieldsArray.indexOf(field), ref);\n            else gen\n                (\"w.uint32(%d).%s(%s)\", (field.id << 3 | wireType) >>> 0, type, ref);\n            gen\n                (\"break\");\n        } gen\n        (\"}\");\n    }\n\n    return gen\n    (\"return w\");\n    /* eslint-enable no-unexpected-multiline, block-scoped-var, no-redeclare */\n}\n},{\"15\":15,\"35\":35,\"36\":36}],15:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Enum;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Enum.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum).className = \"Enum\";\n\nvar util = require(36);\n\n/**\n * Constructs a new enum instance.\n * @classdesc Reflected enum.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {Object.<string,number>} [values] Enum values as an object, by name\n * @param {Object.<string,*>} [options] Declared options\n */\nfunction Enum(name, values, options) {\n    ReflectionObject.call(this, name, options);\n\n    if (values && typeof values !== \"object\")\n        throw TypeError(\"values must be an object\");\n\n    /**\n     * Enum values by id.\n     * @type {Object.<number,string>}\n     */\n    this.valuesById = {};\n\n    /**\n     * Enum values by name.\n     * @type {Object.<string,number>}\n     */\n    this.values = Object.create(this.valuesById); // toJSON, marker\n\n    /**\n     * Value comment texts, if any.\n     * @type {Object.<string,string>}\n     */\n    this.comments = {};\n\n    // Note that values inherit valuesById on their prototype which makes them a TypeScript-\n    // compatible enum. This is used by pbts to write actual enum definitions that work for\n    // static and reflection code alike instead of emitting generic object definitions.\n\n    if (values)\n        for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)\n            this.valuesById[ this.values[keys[i]] = values[keys[i]] ] = keys[i];\n}\n\n/**\n * Creates an enum from JSON.\n * @param {string} name Enum name\n * @param {Object.<string,*>} json JSON object\n * @returns {Enum} Created enum\n * @throws {TypeError} If arguments are invalid\n */\nEnum.fromJSON = function fromJSON(name, json) {\n    return new Enum(name, json.values, json.options);\n};\n\n/**\n * @override\n */\nEnum.prototype.toJSON = function toJSON() {\n    return {\n        options : this.options,\n        values  : this.values\n    };\n};\n\n/**\n * Adds a value to this enum.\n * @param {string} name Value name\n * @param {number} id Value id\n * @param {?string} comment Comment, if any\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a value with this name or id\n */\nEnum.prototype.add = function(name, id, comment) {\n    // utilized by the parser but not by .fromJSON\n\n    if (!util.isString(name))\n        throw TypeError(\"name must be a string\");\n\n    if (!util.isInteger(id))\n        throw TypeError(\"id must be an integer\");\n\n    if (this.values[name] !== undefined)\n        throw Error(\"duplicate name\");\n\n    if (this.valuesById[id] !== undefined) {\n        if (!(this.options && this.options.allow_alias))\n            throw Error(\"duplicate id\");\n        this.values[name] = id;\n    } else\n        this.valuesById[this.values[name] = id] = name;\n\n    this.comments[name] = comment || null;\n    return this;\n};\n\n/**\n * Removes a value from this enum\n * @param {string} name Value name\n * @returns {Enum} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `name` is not a name of this enum\n */\nEnum.prototype.remove = function(name) {\n\n    if (!util.isString(name))\n        throw TypeError(\"name must be a string\");\n\n    var val = this.values[name];\n    if (val === undefined)\n        throw Error(\"name does not exist\");\n\n    delete this.valuesById[val];\n    delete this.values[name];\n    delete this.comments[name];\n\n    return this;\n};\n\n},{\"24\":24,\"36\":36}],16:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Field;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = \"Field\";\n\nvar Enum  = require(15),\n    types = require(35),\n    util  = require(36);\n\nvar Type; // cyclic\n\nvar ruleRe = /^required|optional|repeated$/;\n\n/**\n * Constructs a new message field instance. Note that {@link MapField|map fields} have their own class.\n * @classdesc Reflected message field.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} type Value type\n * @param {string|Object.<string,*>} [rule=\"optional\"] Field rule\n * @param {string|Object.<string,*>} [extend] Extended type if different from parent\n * @param {Object.<string,*>} [options] Declared options\n */\nfunction Field(name, id, type, rule, extend, options) {\n\n    if (util.isObject(rule)) {\n        options = rule;\n        rule = extend = undefined;\n    } else if (util.isObject(extend)) {\n        options = extend;\n        extend = undefined;\n    }\n\n    ReflectionObject.call(this, name, options);\n\n    if (!util.isInteger(id) || id < 0)\n        throw TypeError(\"id must be a non-negative integer\");\n\n    if (!util.isString(type))\n        throw TypeError(\"type must be a string\");\n\n    if (rule !== undefined && !ruleRe.test(rule = rule.toString().toLowerCase()))\n        throw TypeError(\"rule must be a string rule\");\n\n    if (extend !== undefined && !util.isString(extend))\n        throw TypeError(\"extend must be a string\");\n\n    /**\n     * Field rule, if any.\n     * @type {string|undefined}\n     */\n    this.rule = rule && rule !== \"optional\" ? rule : undefined; // toJSON\n\n    /**\n     * Field type.\n     * @type {string}\n     */\n    this.type = type; // toJSON\n\n    /**\n     * Unique field id.\n     * @type {number}\n     */\n    this.id = id; // toJSON, marker\n\n    /**\n     * Extended type if different from parent.\n     * @type {string|undefined}\n     */\n    this.extend = extend || undefined; // toJSON\n\n    /**\n     * Whether this field is required.\n     * @type {boolean}\n     */\n    this.required = rule === \"required\";\n\n    /**\n     * Whether this field is optional.\n     * @type {boolean}\n     */\n    this.optional = !this.required;\n\n    /**\n     * Whether this field is repeated.\n     * @type {boolean}\n     */\n    this.repeated = rule === \"repeated\";\n\n    /**\n     * Whether this field is a map or not.\n     * @type {boolean}\n     */\n    this.map = false;\n\n    /**\n     * Message this field belongs to.\n     * @type {?Type}\n     */\n    this.message = null;\n\n    /**\n     * OneOf this field belongs to, if any,\n     * @type {?OneOf}\n     */\n    this.partOf = null;\n\n    /**\n     * The field type's default value.\n     * @type {*}\n     */\n    this.typeDefault = null;\n\n    /**\n     * The field's default value on prototypes.\n     * @type {*}\n     */\n    this.defaultValue = null;\n\n    /**\n     * Whether this field's value should be treated as a long.\n     * @type {boolean}\n     */\n    this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;\n\n    /**\n     * Whether this field's value is a buffer.\n     * @type {boolean}\n     */\n    this.bytes = type === \"bytes\";\n\n    /**\n     * Resolved type if not a basic type.\n     * @type {?(Type|Enum)}\n     */\n    this.resolvedType = null;\n\n    /**\n     * Sister-field within the extended type if a declaring extension field.\n     * @type {?Field}\n     */\n    this.extensionField = null;\n\n    /**\n     * Sister-field within the declaring namespace if an extended field.\n     * @type {?Field}\n     */\n    this.declaringField = null;\n\n    /**\n     * Internally remembers whether this field is packed.\n     * @type {?boolean}\n     * @private\n     */\n    this._packed = null;\n}\n\n/**\n * Determines whether this field is packed. Only relevant when repeated and working with proto2.\n * @name Field#packed\n * @type {boolean}\n * @readonly\n */\nObject.defineProperty(Field.prototype, \"packed\", {\n    get: function() {\n        // defaults to packed=true if not explicity set to false\n        if (this._packed === null)\n            this._packed = this.getOption(\"packed\") !== false;\n        return this._packed;\n    }\n});\n\n/**\n * @override\n */\nField.prototype.setOption = function setOption(name, value, ifNotSet) {\n    if (name === \"packed\") // clear cached before setting\n        this._packed = null;\n    return ReflectionObject.prototype.setOption.call(this, name, value, ifNotSet);\n};\n\n/**\n * Constructs a field from JSON.\n * @param {string} name Field name\n * @param {Object.<string,*>} json JSON object\n * @returns {Field} Created field\n * @throws {TypeError} If arguments are invalid\n */\nField.fromJSON = function fromJSON(name, json) {\n    return new Field(name, json.id, json.type, json.rule, json.extend, json.options);\n};\n\n/**\n * @override\n */\nField.prototype.toJSON = function toJSON() {\n    return {\n        rule    : this.rule !== \"optional\" && this.rule || undefined,\n        type    : this.type,\n        id      : this.id,\n        extend  : this.extend,\n        options : this.options\n    };\n};\n\n/**\n * Resolves this field's type references.\n * @returns {Field} `this`\n * @throws {Error} If any reference cannot be resolved\n */\nField.prototype.resolve = function resolve() {\n\n    if (this.resolved)\n        return this;\n\n    if ((this.typeDefault = types.defaults[this.type]) === undefined) { // if not a basic type, resolve it\n\n        /* istanbul ignore if */\n        if (!Type)\n            Type = require(34);\n\n        var scope = this.declaringField ? this.declaringField.parent : this.parent;\n        if (this.resolvedType = scope.lookup(this.type, Type))\n            this.typeDefault = null;\n        else if (this.resolvedType = scope.lookup(this.type, Enum))\n            this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined\n        else\n            throw Error(\"unresolvable field type: \" + this.type + \" in \" + scope);\n    }\n\n    // use explicitly set default value if present\n    if (this.options && this.options[\"default\"] !== undefined) {\n        this.typeDefault = this.options[\"default\"];\n        if (this.resolvedType instanceof Enum && typeof this.typeDefault === \"string\")\n            this.typeDefault = this.resolvedType.values[this.typeDefault];\n    }\n\n    // remove unnecessary packed option (parser adds this) if not referencing an enum\n    if (this.options && this.options.packed !== undefined && this.resolvedType && !(this.resolvedType instanceof Enum))\n        delete this.options.packed;\n\n    // convert to internal data type if necesssary\n    if (this.long) {\n        this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === \"u\");\n\n        /* istanbul ignore else */\n        if (Object.freeze)\n            Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)\n\n    } else if (this.bytes && typeof this.typeDefault === \"string\") {\n        var buf;\n        if (util.base64.test(this.typeDefault))\n            util.base64.decode(this.typeDefault, buf = util.newBuffer(util.base64.length(this.typeDefault)), 0);\n        else\n            util.utf8.write(this.typeDefault, buf = util.newBuffer(util.utf8.length(this.typeDefault)), 0);\n        this.typeDefault = buf;\n    }\n\n    // take special care of maps and repeated fields\n    if (this.map)\n        this.defaultValue = util.emptyObject;\n    else if (this.repeated)\n        this.defaultValue = util.emptyArray;\n    else\n        this.defaultValue = this.typeDefault;\n\n    return ReflectionObject.prototype.resolve.call(this);\n};\n\n},{\"15\":15,\"24\":24,\"34\":34,\"35\":35,\"36\":36}],17:[function(require,module,exports){\n\"use strict\";\nvar protobuf = module.exports = require(18);\n\nprotobuf.build = \"light\";\n\n/**\n * A node-style callback as used by {@link load} and {@link Root#load}.\n * @typedef LoadCallback\n * @type {function}\n * @param {?Error} error Error, if any, otherwise `null`\n * @param {Root} [root] Root, if there hasn't been an error\n * @returns {undefined}\n */\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} root Root namespace, defaults to create a new one if omitted.\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n */\nfunction load(filename, root, callback) {\n    if (typeof root === \"function\") {\n        callback = root;\n        root = new protobuf.Root();\n    } else if (!root)\n        root = new protobuf.Root();\n    return root.load(filename, callback);\n}\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @see {@link Root#load}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.\n * @name load\n * @function\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Promise<Root>} Promise\n * @see {@link Root#load}\n * @variation 3\n */\n// function load(filename:string, [root:Root]):Promise<Root>\n\nprotobuf.load = load;\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).\n * @param {string|string[]} filename One or multiple files to load\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n * @see {@link Root#loadSync}\n */\nfunction loadSync(filename, root) {\n    if (!root)\n        root = new protobuf.Root();\n    return root.loadSync(filename);\n}\n\nprotobuf.loadSync = loadSync;\n\n// Serialization\nprotobuf.encoder          = require(14);\nprotobuf.decoder          = require(13);\nprotobuf.verifier         = require(39);\nprotobuf.converter        = require(12);\n\n// Reflection\nprotobuf.ReflectionObject = require(24);\nprotobuf.Namespace        = require(23);\nprotobuf.Root             = require(29);\nprotobuf.Enum             = require(15);\nprotobuf.Type             = require(34);\nprotobuf.Field            = require(16);\nprotobuf.OneOf            = require(25);\nprotobuf.MapField         = require(20);\nprotobuf.Service          = require(32);\nprotobuf.Method           = require(22);\n\n// Runtime\nprotobuf.Class            = require(10);\nprotobuf.Message          = require(21);\n\n// Utility\nprotobuf.types            = require(35);\nprotobuf.util             = require(36);\n\n// Configure reflection\nprotobuf.ReflectionObject._configure(protobuf.Root);\nprotobuf.Namespace._configure(protobuf.Type, protobuf.Service);\nprotobuf.Root._configure(protobuf.Type);\n\n},{\"10\":10,\"12\":12,\"13\":13,\"14\":14,\"15\":15,\"16\":16,\"18\":18,\"20\":20,\"21\":21,\"22\":22,\"23\":23,\"24\":24,\"25\":25,\"29\":29,\"32\":32,\"34\":34,\"35\":35,\"36\":36,\"39\":39}],18:[function(require,module,exports){\n\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available accross modules.\n * @name roots\n * @type {Object.<string,Root>}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\nprotobuf.roots = {};\n\n// Serialization\nprotobuf.Writer       = require(40);\nprotobuf.BufferWriter = require(41);\nprotobuf.Reader       = require(27);\nprotobuf.BufferReader = require(28);\n\n// Utility\nprotobuf.util         = require(38);\nprotobuf.rpc          = require(30);\nprotobuf.configure    = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n    protobuf.Reader._configure(protobuf.BufferReader);\n    protobuf.util._configure();\n}\n\n// Configure serialization\nprotobuf.Writer._configure(protobuf.BufferWriter);\nconfigure();\n\n},{\"27\":27,\"28\":28,\"30\":30,\"38\":38,\"40\":40,\"41\":41}],19:[function(require,module,exports){\n\"use strict\";\nvar protobuf = module.exports = require(17);\n\nprotobuf.build = \"full\";\n\n// Parser\nprotobuf.tokenize         = require(33);\nprotobuf.parse            = require(26);\nprotobuf.common           = require(11);\n\n// Configure parser\nprotobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common);\n\n},{\"11\":11,\"17\":17,\"26\":26,\"33\":33}],20:[function(require,module,exports){\n\"use strict\";\nmodule.exports = MapField;\n\n// extends Field\nvar Field = require(16);\n((MapField.prototype = Object.create(Field.prototype)).constructor = MapField).className = \"MapField\";\n\nvar types   = require(35),\n    util    = require(36);\n\n/**\n * Constructs a new map field instance.\n * @classdesc Reflected map field.\n * @extends Field\n * @constructor\n * @param {string} name Unique name within its namespace\n * @param {number} id Unique id within its namespace\n * @param {string} keyType Key type\n * @param {string} type Value type\n * @param {Object.<string,*>} [options] Declared options\n */\nfunction MapField(name, id, keyType, type, options) {\n    Field.call(this, name, id, type, options);\n\n    /* istanbul ignore next */\n    if (!util.isString(keyType))\n        throw TypeError(\"keyType must be a string\");\n\n    /**\n     * Key type.\n     * @type {string}\n     */\n    this.keyType = keyType; // toJSON, marker\n\n    /**\n     * Resolved key type if not a basic type.\n     * @type {?ReflectionObject}\n     */\n    this.resolvedKeyType = null;\n\n    // Overrides Field#map\n    this.map = true;\n}\n\n/**\n * Constructs a map field from JSON.\n * @param {string} name Field name\n * @param {Object.<string,*>} json JSON object\n * @returns {MapField} Created map field\n * @throws {TypeError} If arguments are invalid\n */\nMapField.fromJSON = function fromJSON(name, json) {\n    return new MapField(name, json.id, json.keyType, json.type, json.options);\n};\n\n/**\n * @override\n */\nMapField.prototype.toJSON = function toJSON() {\n    return {\n        keyType : this.keyType,\n        type    : this.type,\n        id      : this.id,\n        extend  : this.extend,\n        options : this.options\n    };\n};\n\n/**\n * @override\n */\nMapField.prototype.resolve = function resolve() {\n    if (this.resolved)\n        return this;\n\n    // Besides a value type, map fields have a key type that may be \"any scalar type except for floating point types and bytes\"\n    if (types.mapKey[this.keyType] === undefined)\n        throw Error(\"invalid key type: \" + this.keyType);\n\n    return Field.prototype.resolve.call(this);\n};\n\n},{\"16\":16,\"35\":35,\"36\":36}],21:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Message;\n\nvar util = require(36);\n\n/**\n * Constructs a new message instance.\n *\n * This function should also be called from your custom constructors, i.e. `Message.call(this, properties)`.\n * @classdesc Abstract runtime message.\n * @constructor\n * @param {Object.<string,*>} [properties] Properties to set\n * @see {@link Class.create}\n */\nfunction Message(properties) {\n    if (properties)\n        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)\n            this[keys[i]] = properties[keys[i]];\n}\n\n/**\n * Reference to the reflected type.\n * @name Message.$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Reference to the reflected type.\n * @name Message#$type\n * @type {Type}\n * @readonly\n */\n\n/**\n * Encodes a message of this type.\n * @param {Message|Object} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n */\nMessage.encode = function encode(message, writer) {\n    return this.$type.encode(message, writer);\n};\n\n/**\n * Encodes a message of this type preceeded by its length as a varint.\n * @param {Message|Object} message Message to encode\n * @param {Writer} [writer] Writer to use\n * @returns {Writer} Writer\n */\nMessage.encodeDelimited = function encodeDelimited(message, writer) {\n    return this.$type.encodeDelimited(message, writer);\n};\n\n/**\n * Decodes a message of this type.\n * @name Message.decode\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {Message} Decoded message\n */\nMessage.decode = function decode(reader) {\n    return this.$type.decode(reader);\n};\n\n/**\n * Decodes a message of this type preceeded by its length as a varint.\n * @name Message.decodeDelimited\n * @function\n * @param {Reader|Uint8Array} reader Reader or buffer to decode\n * @returns {Message} Decoded message\n */\nMessage.decodeDelimited = function decodeDelimited(reader) {\n    return this.$type.decodeDelimited(reader);\n};\n\n/**\n * Verifies a message of this type.\n * @name Message.verify\n * @function\n * @param {Message|Object} message Message or plain object to verify\n * @returns {?string} `null` if valid, otherwise the reason why it is not\n */\nMessage.verify = function verify(message) {\n    return this.$type.verify(message);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.<string,*>} object Plain object\n * @returns {Message} Message instance\n */\nMessage.fromObject = function fromObject(object) {\n    return this.$type.fromObject(object);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * This is an alias of {@link Message.fromObject}.\n * @function\n * @param {Object.<string,*>} object Plain object\n * @returns {Message} Message instance\n */\nMessage.from = Message.fromObject;\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message} message Message instance\n * @param {ConversionOptions} [options] Conversion options\n * @returns {Object.<string,*>} Plain object\n */\nMessage.toObject = function toObject(message, options) {\n    return this.$type.toObject(message, options);\n};\n\n/**\n * Creates a plain object from this message. Also converts values to other types if specified.\n * @param {ConversionOptions} [options] Conversion options\n * @returns {Object.<string,*>} Plain object\n */\nMessage.prototype.toObject = function toObject(options) {\n    return this.$type.toObject(this, options);\n};\n\n/**\n * Converts this message to JSON.\n * @returns {Object.<string,*>} JSON object\n */\nMessage.prototype.toJSON = function toJSON() {\n    return this.$type.toObject(this, util.toJSONOptions);\n};\n\n},{\"36\":36}],22:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Method;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = \"Method\";\n\nvar util = require(36);\n\n/**\n * Constructs a new service method instance.\n * @classdesc Reflected service method.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Method name\n * @param {string|undefined} type Method type, usually `\"rpc\"`\n * @param {string} requestType Request message type\n * @param {string} responseType Response message type\n * @param {boolean|Object.<string,*>} [requestStream] Whether the request is streamed\n * @param {boolean|Object.<string,*>} [responseStream] Whether the response is streamed\n * @param {Object.<string,*>} [options] Declared options\n */\nfunction Method(name, type, requestType, responseType, requestStream, responseStream, options) {\n\n    /* istanbul ignore next */\n    if (util.isObject(requestStream)) {\n        options = requestStream;\n        requestStream = responseStream = undefined;\n    /* istanbul ignore next */\n    } else if (util.isObject(responseStream)) {\n        options = responseStream;\n        responseStream = undefined;\n    }\n\n    /* istanbul ignore next */\n    if (!(type === undefined || util.isString(type)))\n        throw TypeError(\"type must be a string\");\n    /* istanbul ignore next */\n    if (!util.isString(requestType))\n        throw TypeError(\"requestType must be a string\");\n    /* istanbul ignore next */\n    if (!util.isString(responseType))\n        throw TypeError(\"responseType must be a string\");\n\n    ReflectionObject.call(this, name, options);\n\n    /**\n     * Method type.\n     * @type {string}\n     */\n    this.type = type || \"rpc\"; // toJSON\n\n    /**\n     * Request type.\n     * @type {string}\n     */\n    this.requestType = requestType; // toJSON, marker\n\n    /**\n     * Whether requests are streamed or not.\n     * @type {boolean|undefined}\n     */\n    this.requestStream = requestStream ? true : undefined; // toJSON\n\n    /**\n     * Response type.\n     * @type {string}\n     */\n    this.responseType = responseType; // toJSON\n\n    /**\n     * Whether responses are streamed or not.\n     * @type {boolean|undefined}\n     */\n    this.responseStream = responseStream ? true : undefined; // toJSON\n\n    /**\n     * Resolved request type.\n     * @type {?Type}\n     */\n    this.resolvedRequestType = null;\n\n    /**\n     * Resolved response type.\n     * @type {?Type}\n     */\n    this.resolvedResponseType = null;\n}\n\n/**\n * Constructs a service method from JSON.\n * @param {string} name Method name\n * @param {Object.<string,*>} json JSON object\n * @returns {Method} Created method\n * @throws {TypeError} If arguments are invalid\n */\nMethod.fromJSON = function fromJSON(name, json) {\n    return new Method(name, json.type, json.requestType, json.responseType, json.requestStream, json.responseStream, json.options);\n};\n\n/**\n * @override\n */\nMethod.prototype.toJSON = function toJSON() {\n    return {\n        type           : this.type !== \"rpc\" && /* istanbul ignore next */ this.type || undefined,\n        requestType    : this.requestType,\n        requestStream  : this.requestStream,\n        responseType   : this.responseType,\n        responseStream : this.responseStream,\n        options        : this.options\n    };\n};\n\n/**\n * @override\n */\nMethod.prototype.resolve = function resolve() {\n\n    /* istanbul ignore if */\n    if (this.resolved)\n        return this;\n\n    this.resolvedRequestType = this.parent.lookupType(this.requestType);\n    this.resolvedResponseType = this.parent.lookupType(this.responseType);\n\n    return ReflectionObject.prototype.resolve.call(this);\n};\n\n},{\"24\":24,\"36\":36}],23:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Namespace;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = \"Namespace\";\n\nvar Enum     = require(15),\n    Field    = require(16),\n    util     = require(36);\n\nvar Type,    // cyclic\n    Service; // \"\n\n/**\n * Constructs a new namespace instance.\n * @name Namespace\n * @classdesc Reflected namespace.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.<string,*>} [options] Declared options\n */\n\n/**\n * Constructs a namespace from JSON.\n * @memberof Namespace\n * @function\n * @param {string} name Namespace name\n * @param {Object.<string,*>} json JSON object\n * @returns {Namespace} Created namespace\n * @throws {TypeError} If arguments are invalid\n */\nNamespace.fromJSON = function fromJSON(name, json) {\n    return new Namespace(name, json.options).addJSON(json.nested);\n};\n\n/**\n * Converts an array of reflection objects to JSON.\n * @memberof Namespace\n * @param {ReflectionObject[]} array Object array\n * @returns {Object.<string,*>|undefined} JSON object or `undefined` when array is empty\n */\nfunction arrayToJSON(array) {\n    if (!(array && array.length))\n        return undefined;\n    var obj = {};\n    for (var i = 0; i < array.length; ++i)\n        obj[array[i].name] = array[i].toJSON();\n    return obj;\n}\n\nNamespace.arrayToJSON = arrayToJSON;\n\n/**\n * Not an actual constructor. Use {@link Namespace} instead.\n * @classdesc Base class of all reflection objects containing nested objects. This is not an actual class but here for the sake of having consistent type definitions.\n * @exports NamespaceBase\n * @extends ReflectionObject\n * @abstract\n * @constructor\n * @param {string} name Namespace name\n * @param {Object.<string,*>} [options] Declared options\n * @see {@link Namespace}\n */\nfunction Namespace(name, options) {\n    ReflectionObject.call(this, name, options);\n\n    /**\n     * Nested objects by name.\n     * @type {Object.<string,ReflectionObject>|undefined}\n     */\n    this.nested = undefined; // toJSON\n\n    /**\n     * Cached nested objects as an array.\n     * @type {?ReflectionObject[]}\n     * @private\n     */\n    this._nestedArray = null;\n}\n\nfunction clearCache(namespace) {\n    namespace._nestedArray = null;\n    return namespace;\n}\n\n/**\n * Nested objects of this namespace as an array for iteration.\n * @name NamespaceBase#nestedArray\n * @type {ReflectionObject[]}\n * @readonly\n */\nObject.defineProperty(Namespace.prototype, \"nestedArray\", {\n    get: function() {\n        return this._nestedArray || (this._nestedArray = util.toArray(this.nested));\n    }\n});\n\n/**\n * @override\n */\nNamespace.prototype.toJSON = function toJSON() {\n    return {\n        options : this.options,\n        nested  : arrayToJSON(this.nestedArray)\n    };\n};\n\n/**\n * Adds nested elements to this namespace from JSON.\n * @param {Object.<string,*>} nestedJson Nested JSON\n * @returns {Namespace} `this`\n */\nNamespace.prototype.addJSON = function addJSON(nestedJson) {\n    var ns = this;\n    /* istanbul ignore else */\n    if (nestedJson) {\n        for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {\n            nested = nestedJson[names[i]];\n            ns.add( // most to least likely\n                ( nested.fields !== undefined\n                ? Type.fromJSON\n                : nested.values !== undefined\n                ? Enum.fromJSON\n                : nested.methods !== undefined\n                ? Service.fromJSON\n                : nested.id !== undefined\n                ? Field.fromJSON\n                : Namespace.fromJSON )(names[i], nested)\n            );\n        }\n    }\n    return this;\n};\n\n/**\n * Gets the nested object of the specified name.\n * @param {string} name Nested object name\n * @returns {?ReflectionObject} The reflection object or `null` if it doesn't exist\n */\nNamespace.prototype.get = function get(name) {\n    return this.nested && this.nested[name]\n        || null;\n};\n\n/**\n * Gets the values of the nested {@link Enum|enum} of the specified name.\n * This methods differs from {@link Namespace#get|get} in that it returns an enum's values directly and throws instead of returning `null`.\n * @param {string} name Nested enum name\n * @returns {Object.<string,number>} Enum values\n * @throws {Error} If there is no such enum\n */\nNamespace.prototype.getEnum = function getEnum(name) {\n    if (this.nested && this.nested[name] instanceof Enum)\n        return this.nested[name].values;\n    throw Error(\"no such enum\");\n};\n\n/**\n * Adds a nested object to this namespace.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name\n */\nNamespace.prototype.add = function add(object) {\n\n    if (!(object instanceof Field && object.extend !== undefined || object instanceof Type || object instanceof Enum || object instanceof Service || object instanceof Namespace))\n        throw TypeError(\"object must be a valid nested object\");\n\n    if (!this.nested)\n        this.nested = {};\n    else {\n        var prev = this.get(object.name);\n        if (prev) {\n            if (prev instanceof Namespace && object instanceof Namespace && !(prev instanceof Type || prev instanceof Service)) {\n                // replace plain namespace but keep existing nested elements and options\n                var nested = prev.nestedArray;\n                for (var i = 0; i < nested.length; ++i)\n                    object.add(nested[i]);\n                this.remove(prev);\n                if (!this.nested)\n                    this.nested = {};\n                object.setOptions(prev.options, true);\n\n            } else\n                throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n        }\n    }\n    this.nested[object.name] = object;\n    object.onAdd(this);\n    return clearCache(this);\n};\n\n/**\n * Removes a nested object from this namespace.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Namespace} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this namespace\n */\nNamespace.prototype.remove = function remove(object) {\n\n    if (!(object instanceof ReflectionObject))\n        throw TypeError(\"object must be a ReflectionObject\");\n    if (object.parent !== this)\n        throw Error(object + \" is not a member of \" + this);\n\n    delete this.nested[object.name];\n    if (!Object.keys(this.nested).length)\n        this.nested = undefined;\n\n    object.onRemove(this);\n    return clearCache(this);\n};\n\n/**\n * Defines additial namespaces within this one if not yet existing.\n * @param {string|string[]} path Path to create\n * @param {*} [json] Nested types to create from JSON\n * @returns {Namespace} Pointer to the last namespace created or `this` if path is empty\n */\nNamespace.prototype.define = function define(path, json) {\n\n    if (util.isString(path))\n        path = path.split(\".\");\n    else if (!Array.isArray(path))\n        throw TypeError(\"illegal path\");\n    if (path && path.length && path[0] === \"\")\n        throw Error(\"path must be relative\");\n\n    var ptr = this;\n    while (path.length > 0) {\n        var part = path.shift();\n        if (ptr.nested && ptr.nested[part]) {\n            ptr = ptr.nested[part];\n            if (!(ptr instanceof Namespace))\n                throw Error(\"path conflicts with non-namespace objects\");\n        } else\n            ptr.add(ptr = new Namespace(part));\n    }\n    if (json)\n        ptr.addJSON(json);\n    return ptr;\n};\n\n/**\n * Resolves this namespace's and all its nested objects' type references. Useful to validate a reflection tree, but comes at a cost.\n * @returns {Namespace} `this`\n */\nNamespace.prototype.resolveAll = function resolveAll() {\n    var nested = this.nestedArray, i = 0;\n    while (i < nested.length)\n        if (nested[i] instanceof Namespace)\n            nested[i++].resolveAll();\n        else\n            nested[i++].resolve();\n    return this.resolve();\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @param {string|string[]} path Path to look up\n * @param {function(new: ReflectionObject)} filterType Filter type, one of `protobuf.Type`, `protobuf.Enum`, `protobuf.Service` etc.\n * @param {boolean} [parentAlreadyChecked=false] If known, whether the parent has already been checked\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\n */\nNamespace.prototype.lookup = function lookup(path, filterType, parentAlreadyChecked) {\n\n    /* istanbul ignore next */\n    if (typeof filterType === \"boolean\") {\n        parentAlreadyChecked = filterType;\n        filterType = undefined;\n    }\n\n    if (util.isString(path) && path.length) {\n        if (path === \".\")\n            return this.root;\n        path = path.split(\".\");\n    } else if (!path.length)\n        return this;\n\n    // Start at root if path is absolute\n    if (path[0] === \"\")\n        return this.root.lookup(path.slice(1), filterType);\n    // Test if the first part matches any nested object, and if so, traverse if path contains more\n    var found = this.get(path[0]);\n    if (found) {\n        if (path.length === 1) {\n            if (!filterType || found instanceof filterType)\n                return found;\n        } else if (found instanceof Namespace && (found = found.lookup(path.slice(1), filterType, true)))\n            return found;\n    }\n    // If there hasn't been a match, try again at the parent\n    if (this.parent === null || parentAlreadyChecked)\n        return null;\n    return this.parent.lookup(path, filterType);\n};\n\n/**\n * Looks up the reflection object at the specified path, relative to this namespace.\n * @name NamespaceBase#lookup\n * @function\n * @param {string|string[]} path Path to look up\n * @param {boolean} [parentAlreadyChecked=false] Whether the parent has already been checked\n * @returns {?ReflectionObject} Looked up object or `null` if none could be found\n * @variation 2\n */\n// lookup(path: string, [parentAlreadyChecked: boolean])\n\n/**\n * Looks up the {@link Type|type} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Type} Looked up type\n * @throws {Error} If `path` does not point to a type\n */\nNamespace.prototype.lookupType = function lookupType(path) {\n    var found = this.lookup(path, Type);\n    if (!found)\n        throw Error(\"no such type\");\n    return found;\n};\n\n/**\n * Looks up the {@link Service|service} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Service} Looked up service\n * @throws {Error} If `path` does not point to a service\n */\nNamespace.prototype.lookupService = function lookupService(path) {\n    var found = this.lookup(path, Service);\n    if (!found)\n        throw Error(\"no such service\");\n    return found;\n};\n\n/**\n * Looks up the values of the {@link Enum|enum} at the specified path, relative to this namespace.\n * Besides its signature, this methods differs from {@link Namespace#lookup|lookup} in that it returns the enum's values directly and throws instead of returning `null`.\n * @param {string|string[]} path Path to look up\n * @returns {Object.<string,number>} Enum values\n * @throws {Error} If `path` does not point to an enum\n */\nNamespace.prototype.lookupEnum = function lookupEnum(path) {\n    var found = this.lookup(path, Enum);\n    if (!found)\n        throw Error(\"no such enum\");\n    return found.values;\n};\n\nNamespace._configure = function(Type_, Service_) {\n    Type    = Type_;\n    Service = Service_;\n};\n\n},{\"15\":15,\"16\":16,\"24\":24,\"36\":36}],24:[function(require,module,exports){\n\"use strict\";\nmodule.exports = ReflectionObject;\n\nReflectionObject.className = \"ReflectionObject\";\n\nvar util = require(36);\n\nvar Root; // cyclic\n\n/**\n * Constructs a new reflection object instance.\n * @classdesc Base class of all reflection objects.\n * @constructor\n * @param {string} name Object name\n * @param {Object.<string,*>} [options] Declared options\n * @abstract\n */\nfunction ReflectionObject(name, options) {\n\n    if (!util.isString(name))\n        throw TypeError(\"name must be a string\");\n\n    if (options && !util.isObject(options))\n        throw TypeError(\"options must be an object\");\n\n    /**\n     * Options.\n     * @type {Object.<string,*>|undefined}\n     */\n    this.options = options; // toJSON\n\n    /**\n     * Unique name within its namespace.\n     * @type {string}\n     */\n    this.name = name;\n\n    /**\n     * Parent namespace.\n     * @type {?Namespace}\n     */\n    this.parent = null;\n\n    /**\n     * Whether already resolved or not.\n     * @type {boolean}\n     */\n    this.resolved = false;\n\n    /**\n     * Comment text, if any.\n     * @type {?string}\n     */\n    this.comment = null;\n\n    /**\n     * Defining file name.\n     * @type {?string}\n     */\n    this.filename = null;\n}\n\nObject.defineProperties(ReflectionObject.prototype, {\n\n    /**\n     * Reference to the root namespace.\n     * @name ReflectionObject#root\n     * @type {Root}\n     * @readonly\n     */\n    root: {\n        get: function() {\n            var ptr = this;\n            while (ptr.parent !== null)\n                ptr = ptr.parent;\n            return ptr;\n        }\n    },\n\n    /**\n     * Full name including leading dot.\n     * @name ReflectionObject#fullName\n     * @type {string}\n     * @readonly\n     */\n    fullName: {\n        get: function() {\n            var path = [ this.name ],\n                ptr = this.parent;\n            while (ptr) {\n                path.unshift(ptr.name);\n                ptr = ptr.parent;\n            }\n            return path.join(\".\");\n        }\n    }\n});\n\n/**\n * Converts this reflection object to its JSON representation.\n * @returns {Object.<string,*>} JSON object\n * @abstract\n */\nReflectionObject.prototype.toJSON = /* istanbul ignore next */ function toJSON() {\n    throw Error(); // not implemented, shouldn't happen\n};\n\n/**\n * Called when this object is added to a parent.\n * @param {ReflectionObject} parent Parent added to\n * @returns {undefined}\n */\nReflectionObject.prototype.onAdd = function onAdd(parent) {\n    if (this.parent && this.parent !== parent)\n        this.parent.remove(this);\n    this.parent = parent;\n    this.resolved = false;\n    var root = parent.root;\n    if (root instanceof Root)\n        root._handleAdd(this);\n};\n\n/**\n * Called when this object is removed from a parent.\n * @param {ReflectionObject} parent Parent removed from\n * @returns {undefined}\n */\nReflectionObject.prototype.onRemove = function onRemove(parent) {\n    var root = parent.root;\n    if (root instanceof Root)\n        root._handleRemove(this);\n    this.parent = null;\n    this.resolved = false;\n};\n\n/**\n * Resolves this objects type references.\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.resolve = function resolve() {\n    if (this.resolved)\n        return this;\n    if (this.root instanceof Root)\n        this.resolved = true; // only if part of a root\n    return this;\n};\n\n/**\n * Gets an option value.\n * @param {string} name Option name\n * @returns {*} Option value or `undefined` if not set\n */\nReflectionObject.prototype.getOption = function getOption(name) {\n    if (this.options)\n        return this.options[name];\n    return undefined;\n};\n\n/**\n * Sets an option.\n * @param {string} name Option name\n * @param {*} value Option value\n * @param {boolean} [ifNotSet] Sets the option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOption = function setOption(name, value, ifNotSet) {\n    if (!ifNotSet || !this.options || this.options[name] === undefined)\n        (this.options || (this.options = {}))[name] = value;\n    return this;\n};\n\n/**\n * Sets multiple options.\n * @param {Object.<string,*>} options Options to set\n * @param {boolean} [ifNotSet] Sets an option only if it isn't currently set\n * @returns {ReflectionObject} `this`\n */\nReflectionObject.prototype.setOptions = function setOptions(options, ifNotSet) {\n    if (options)\n        for (var keys = Object.keys(options), i = 0; i < keys.length; ++i)\n            this.setOption(keys[i], options[keys[i]], ifNotSet);\n    return this;\n};\n\n/**\n * Converts this instance to its string representation.\n * @returns {string} Class name[, space, full name]\n */\nReflectionObject.prototype.toString = function toString() {\n    var className = this.constructor.className,\n        fullName  = this.fullName;\n    if (fullName.length)\n        return className + \" \" + fullName;\n    return className;\n};\n\nReflectionObject._configure = function(Root_) {\n    Root = Root_;\n};\n\n},{\"36\":36}],25:[function(require,module,exports){\n\"use strict\";\nmodule.exports = OneOf;\n\n// extends ReflectionObject\nvar ReflectionObject = require(24);\n((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = \"OneOf\";\n\nvar Field = require(16);\n\n/**\n * Constructs a new oneof instance.\n * @classdesc Reflected oneof.\n * @extends ReflectionObject\n * @constructor\n * @param {string} name Oneof name\n * @param {string[]|Object} [fieldNames] Field names\n * @param {Object.<string,*>} [options] Declared options\n */\nfunction OneOf(name, fieldNames, options) {\n    if (!Array.isArray(fieldNames)) {\n        options = fieldNames;\n        fieldNames = undefined;\n    }\n    ReflectionObject.call(this, name, options);\n\n    /* istanbul ignore next */\n    if (!(fieldNames === undefined || Array.isArray(fieldNames)))\n        throw TypeError(\"fieldNames must be an Array\");\n\n    /**\n     * Field names that belong to this oneof.\n     * @type {string[]}\n     */\n    this.oneof = fieldNames || []; // toJSON, marker\n\n    /**\n     * Fields that belong to this oneof as an array for iteration.\n     * @type {Field[]}\n     * @readonly\n     */\n    this.fieldsArray = []; // declared readonly for conformance, possibly not yet added to parent\n}\n\n/**\n * Constructs a oneof from JSON.\n * @param {string} name Oneof name\n * @param {Object.<string,*>} json JSON object\n * @returns {MapField} Created oneof\n * @throws {TypeError} If arguments are invalid\n */\nOneOf.fromJSON = function fromJSON(name, json) {\n    return new OneOf(name, json.oneof, json.options);\n};\n\n/**\n * @override\n */\nOneOf.prototype.toJSON = function toJSON() {\n    return {\n        oneof   : this.oneof,\n        options : this.options\n    };\n};\n\n/**\n * Adds the fields of the specified oneof to the parent if not already done so.\n * @param {OneOf} oneof The oneof\n * @returns {undefined}\n * @inner\n * @ignore\n */\nfunction addFieldsToParent(oneof) {\n    if (oneof.parent)\n        for (var i = 0; i < oneof.fieldsArray.length; ++i)\n            if (!oneof.fieldsArray[i].parent)\n                oneof.parent.add(oneof.fieldsArray[i]);\n}\n\n/**\n * Adds a field to this oneof and removes it from its current parent, if any.\n * @param {Field} field Field to add\n * @returns {OneOf} `this`\n */\nOneOf.prototype.add = function add(field) {\n\n    /* istanbul ignore next */\n    if (!(field instanceof Field))\n        throw TypeError(\"field must be a Field\");\n    if (field.parent && field.parent !== this.parent)\n        field.parent.remove(field);\n    this.oneof.push(field.name);\n    this.fieldsArray.push(field);\n    field.partOf = this; // field.parent remains null\n    addFieldsToParent(this);\n    return this;\n};\n\n/**\n * Removes a field from this oneof and puts it back to the oneof's parent.\n * @param {Field} field Field to remove\n * @returns {OneOf} `this`\n */\nOneOf.prototype.remove = function remove(field) {\n\n    /* istanbul ignore next */\n    if (!(field instanceof Field))\n        throw TypeError(\"field must be a Field\");\n\n    var index = this.fieldsArray.indexOf(field);\n    /* istanbul ignore next */\n    if (index < 0)\n        throw Error(field + \" is not a member of \" + this);\n\n    this.fieldsArray.splice(index, 1);\n    index = this.oneof.indexOf(field.name);\n    /* istanbul ignore else */\n    if (index > -1) // theoretical\n        this.oneof.splice(index, 1);\n    field.partOf = null;\n    return this;\n};\n\n/**\n * @override\n */\nOneOf.prototype.onAdd = function onAdd(parent) {\n    ReflectionObject.prototype.onAdd.call(this, parent);\n    var self = this;\n    // Collect present fields\n    for (var i = 0; i < this.oneof.length; ++i) {\n        var field = parent.get(this.oneof[i]);\n        if (field && !field.partOf) {\n            field.partOf = self;\n            self.fieldsArray.push(field);\n        }\n    }\n    // Add not yet present fields\n    addFieldsToParent(this);\n};\n\n/**\n * @override\n */\nOneOf.prototype.onRemove = function onRemove(parent) {\n    for (var i = 0, field; i < this.fieldsArray.length; ++i)\n        if ((field = this.fieldsArray[i]).parent)\n            field.parent.remove(field);\n    ReflectionObject.prototype.onRemove.call(this, parent);\n};\n\n},{\"16\":16,\"24\":24}],26:[function(require,module,exports){\n\"use strict\";\nmodule.exports = parse;\n\nparse.filename = null;\nparse.defaults = { keepCase: false };\n\nvar tokenize  = require(33),\n    Root      = require(29),\n    Type      = require(34),\n    Field     = require(16),\n    MapField  = require(20),\n    OneOf     = require(25),\n    Enum      = require(15),\n    Service   = require(32),\n    Method    = require(22),\n    types     = require(35),\n    util      = require(36);\n\nvar base10Re    = /^[1-9][0-9]*$/,\n    base10NegRe = /^-?[1-9][0-9]*$/,\n    base16Re    = /^0[x][0-9a-f]+$/,\n    base16NegRe = /^-?0[x][0-9a-f]+$/,\n    base8Re     = /^0[0-7]+$/,\n    base8NegRe  = /^-?0[0-7]+$/,\n    numberRe    = /^(?!e)[0-9]*(?:\\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/,\n    nameRe      = /^[a-zA-Z_][a-zA-Z_0-9]*$/,\n    typeRefRe   = /^(?:\\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,\n    fqTypeRefRe = /^(?:\\.[a-zA-Z][a-zA-Z_0-9]*)+$/;\n\nfunction lower(token) {\n    return token === null ? null : token.toLowerCase();\n}\n\nvar camelCaseRe = /_([a-z])(?=[a-z]|$)/g;\n\nfunction camelCase(str) {\n    return str.substring(0,1)\n         + str.substring(1)\n               .replace(camelCaseRe, function($0, $1) { return $1.toUpperCase(); });\n}\n\n/**\n * Result object returned from {@link parse}.\n * @typedef ParserResult\n * @type {Object.<string,*>}\n * @property {string|undefined} package Package name, if declared\n * @property {string[]|undefined} imports Imports, if any\n * @property {string[]|undefined} weakImports Weak imports, if any\n * @property {string|undefined} syntax Syntax, if specified (either `\"proto2\"` or `\"proto3\"`)\n * @property {Root} root Populated root instance\n */\n\n/**\n * Options modifying the behavior of {@link parse}.\n * @typedef ParseOptions\n * @type {Object.<string,*>}\n * @property {boolean} [keepCase=false] Keeps field casing instead of converting to camel case\n */\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @function\n * @param {string} source Source contents\n * @param {Root} root Root to populate\n * @param {ParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {ParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {ParseOptions} defaults Default {@link ParseOptions}\n */\nfunction parse(source, root, options) {\n    /* eslint-disable callback-return */\n    if (!(root instanceof Root)) {\n        options = root;\n        root = new Root();\n    }\n    if (!options)\n        options = parse.defaults;\n\n    var tn = tokenize(source),\n        next = tn.next,\n        push = tn.push,\n        peek = tn.peek,\n        skip = tn.skip,\n        cmnt = tn.cmnt;\n\n    var head = true,\n        pkg,\n        imports,\n        weakImports,\n        syntax,\n        isProto3 = false;\n\n    var ptr = root;\n\n    var applyCase = options.keepCase ? function(name) { return name; } : camelCase;\n\n    /* istanbul ignore next */\n    function illegal(token, name, insideTryCatch) {\n        var filename = parse.filename;\n        if (!insideTryCatch)\n            parse.filename = null;\n        return Error(\"illegal \" + (name || \"token\") + \" '\" + token + \"' (\" + (filename ? filename + \", \" : \"\") + \"line \" + tn.line() + \")\");\n    }\n\n    function readString() {\n        var values = [],\n            token;\n        /* istanbul ignore next */\n        do {\n            if ((token = next()) !== \"\\\"\" && token !== \"'\")\n                throw illegal(token);\n            values.push(next());\n            skip(token);\n            token = peek();\n        } while (token === \"\\\"\" || token === \"'\");\n        return values.join(\"\");\n    }\n\n    function readValue(acceptTypeRef) {\n        var token = next();\n        switch (lower(token)) {\n            case \"'\":\n            case \"\\\"\":\n                push(token);\n                return readString();\n            case \"true\":\n                return true;\n            case \"false\":\n                return false;\n        }\n        try {\n            return parseNumber(token, /* insideTryCatch */ true);\n        } catch (e) {\n            /* istanbul ignore else */\n            if (acceptTypeRef && typeRefRe.test(token))\n                return token;\n            /* istanbul ignore next */\n            throw illegal(token, \"value\");\n        }\n    }\n\n    function readRanges(target, acceptStrings) {\n        var token, start;\n        do {\n            if (acceptStrings && ((token = peek()) === \"\\\"\" || token === \"'\"))\n                target.push(readString());\n            else\n                target.push([ start = parseId(next()), skip(\"to\", true) ? parseId(next()) : start ]);\n        } while (skip(\",\", true));\n        skip(\";\");\n    }\n\n    function parseNumber(token, insideTryCatch) {\n        var sign = 1;\n        if (token.charAt(0) === \"-\") {\n            sign = -1;\n            token = token.substring(1);\n        }\n        var tokenLower = lower(token);\n        switch (tokenLower) {\n            case \"inf\": return sign * Infinity;\n            case \"nan\": return NaN;\n            case \"0\": return 0;\n        }\n        if (base10Re.test(token))\n            return sign * parseInt(token, 10);\n        if (base16Re.test(tokenLower))\n            return sign * parseInt(token, 16);\n        if (base8Re.test(token))\n            return sign * parseInt(token, 8);\n        if (numberRe.test(tokenLower))\n            return sign * parseFloat(token);\n        /* istanbul ignore next */\n        throw illegal(token, \"number\", insideTryCatch);\n    }\n\n    function parseId(token, acceptNegative) {\n        var tokenLower = lower(token);\n        switch (tokenLower) {\n            case \"max\": return 536870911;\n            case \"0\": return 0;\n        }\n        /* istanbul ignore next */\n        if (token.charAt(0) === \"-\" && !acceptNegative)\n            throw illegal(token, \"id\");\n        if (base10NegRe.test(token))\n            return parseInt(token, 10);\n        if (base16NegRe.test(tokenLower))\n            return parseInt(token, 16);\n        /* istanbul ignore else */\n        if (base8NegRe.test(token))\n            return parseInt(token, 8);\n        /* istanbul ignore next */\n        throw illegal(token, \"id\");\n    }\n\n    function parsePackage() {\n        /* istanbul ignore next */\n        if (pkg !== undefined)\n            throw illegal(\"package\");\n        pkg = next();\n        /* istanbul ignore next */\n        if (!typeRefRe.test(pkg))\n            throw illegal(pkg, \"name\");\n        ptr = ptr.define(pkg);\n        skip(\";\");\n    }\n\n    function parseImport() {\n        var token = peek();\n        var whichImports;\n        switch (token) {\n            case \"weak\":\n                whichImports = weakImports || (weakImports = []);\n                next();\n                break;\n            case \"public\":\n                next();\n                // eslint-disable-line no-fallthrough\n            default:\n                whichImports = imports || (imports = []);\n                break;\n        }\n        token = readString();\n        skip(\";\");\n        whichImports.push(token);\n    }\n\n    function parseSyntax() {\n        skip(\"=\");\n        syntax = lower(readString());\n        isProto3 = syntax === \"proto3\";\n        /* istanbul ignore next */\n        if (!isProto3 && syntax !== \"proto2\")\n            throw illegal(syntax, \"syntax\");\n        skip(\";\");\n    }\n\n    function parseCommon(parent, token) {\n        switch (token) {\n\n            case \"option\":\n                parseOption(parent, token);\n                skip(\";\");\n                return true;\n\n            case \"message\":\n                parseType(parent, token);\n                return true;\n\n            case \"enum\":\n                parseEnum(parent, token);\n                return true;\n\n            case \"service\":\n                parseService(parent, token);\n                return true;\n\n            case \"extend\":\n                parseExtension(parent, token);\n                return true;\n        }\n        return false;\n    }\n\n    function parseType(parent, token) {\n        var name = next();\n        /* istanbul ignore next */\n        if (!nameRe.test(name))\n            throw illegal(name, \"type name\");\n        var type = new Type(name);\n        type.comment = cmnt();\n        type.filename = parse.filename;\n        if (skip(\"{\", true)) {\n            while ((token = next()) !== \"}\") {\n                var tokenLower = lower(token);\n                if (parseCommon(type, token))\n                    continue;\n                switch (tokenLower) {\n\n                    case \"map\":\n                        parseMapField(type, tokenLower);\n                        break;\n\n                    case \"required\":\n                    case \"optional\":\n                    case \"repeated\":\n                        parseField(type, tokenLower);\n                        break;\n\n                    case \"oneof\":\n                        parseOneOf(type, tokenLower);\n                        break;\n\n                    case \"extensions\":\n                        readRanges(type.extensions || (type.extensions = []));\n                        break;\n\n                    case \"reserved\":\n                        readRanges(type.reserved || (type.reserved = []), true);\n                        break;\n\n                    default:\n                        /* istanbul ignore next */\n                        if (!isProto3 || !typeRefRe.test(token))\n                            throw illegal(token);\n                        push(token);\n                        parseField(type, \"optional\");\n                        break;\n                }\n            }\n            skip(\";\", true);\n        } else\n            skip(\";\");\n        parent.add(type);\n    }\n\n    function parseField(parent, rule, extend) {\n        var type = next();\n        if (type === \"group\") {\n            parseGroup(parent, rule);\n            return;\n        }\n        /* istanbul ignore next */\n        if (!typeRefRe.test(type))\n            throw illegal(type, \"type\");\n        var name = next();\n        /* istanbul ignore next */\n        if (!nameRe.test(name))\n            throw illegal(name, \"name\");\n        name = applyCase(name);\n        skip(\"=\");\n        var field = new Field(name, parseId(next()), type, rule, extend),\n            trailingLine = tn.line();\n        field.comment = cmnt();\n        field.filename = parse.filename;\n        parseInlineOptions(field);\n        if (!field.comment)\n            field.comment = cmnt(trailingLine);\n        // JSON defaults to packed=true if not set so we have to set packed=false explicity when\n        // parsing proto2 descriptors without the option, where applicable. This must be done for\n        // any type (not just packable types) because enums also use varint encoding and it is not\n        // yet known whether a type is an enum or not.\n        if (!isProto3 && field.repeated)\n            field.setOption(\"packed\", false, /* ifNotSet */ true);\n        parent.add(field);\n    }\n\n    function parseGroup(parent, rule) {\n        var name = next();\n        /* istanbul ignore next */\n        if (!nameRe.test(name))\n            throw illegal(name, \"name\");\n        var fieldName = util.lcFirst(name);\n        if (name === fieldName)\n            name = util.ucFirst(name);\n        skip(\"=\");\n        var id = parseId(next());\n        var type = new Type(name);\n        type.group = true;\n        type.comment = cmnt();\n        var field = new Field(fieldName, id, name, rule);\n        type.filename = field.filename = parse.filename;\n        skip(\"{\");\n        while ((token = next()) !== \"}\") {\n            switch (token = lower(token)) {\n                case \"option\":\n                    parseOption(type, token);\n                    skip(\";\");\n                    break;\n                case \"required\":\n                case \"optional\":\n                case \"repeated\":\n                    parseField(type, token);\n                    break;\n\n                /* istanbul ignore next */\n                default:\n                    throw illegal(token); // there are no groups with proto3 semantics\n            }\n        }\n        skip(\";\", true);\n        parent.add(type).add(field);\n    }\n\n    function parseMapField(parent) {\n        skip(\"<\");\n        var keyType = next();\n\n        /* istanbul ignore next */\n        if (types.mapKey[keyType] === undefined)\n            throw illegal(keyType, \"type\");\n        skip(\",\");\n        var valueType = next();\n        /* istanbul ignore next */\n        if (!typeRefRe.test(valueType))\n            throw illegal(valueType, \"type\");\n        skip(\">\");\n        var name = next();\n        /* istanbul ignore next */\n        if (!nameRe.test(name))\n            throw illegal(name, \"name\");\n\n        name = applyCase(name);\n        skip(\"=\");\n        var field = new MapField(name, parseId(next()), keyType, valueType),\n            trailingLine = tn.line();\n        field.comment = cmnt();\n        field.filename = parse.filename;\n        parseInlineOptions(field);\n        if (!field.comment)\n            field.comment = cmnt(trailingLine);\n        parent.add(field);\n    }\n\n    function parseOneOf(parent, token) {\n        var name = next();\n\n        /* istanbul ignore next */\n        if (!nameRe.test(name))\n            throw illegal(name, \"name\");\n\n        name = applyCase(name);\n        var oneof = new OneOf(name),\n            trailingLine = tn.line();\n        oneof.comment = cmnt();\n        oneof.filename = parse.filename;\n        if (skip(\"{\", true)) {\n            while ((token = next()) !== \"}\") {\n                if (token === \"option\") {\n                    parseOption(oneof, token);\n                    skip(\";\");\n                } else {\n                    push(token);\n                    parseField(oneof, \"optional\");\n                }\n            }\n            skip(\";\", true);\n        } else {\n            skip(\";\");\n            if (!oneof.comment)\n                oneof.comment = cmnt(trailingLine);\n        }\n        parent.add(oneof);\n    }\n\n    function parseEnum(parent, token) {\n        var name = next();\n\n        /* istanbul ignore next */\n        if (!nameRe.test(name))\n            throw illegal(name, \"name\");\n\n        var enm = new Enum(name);\n        enm.comment = cmnt();\n        enm.filename = parse.filename;\n        if (skip(\"{\", true)) {\n            while ((token = next()) !== \"}\") {\n                if (lower(token) === \"option\") {\n                    parseOption(enm, token);\n                    skip(\";\");\n                } else\n                    parseEnumValue(enm, token);\n            }\n            skip(\";\", true);\n        } else\n            skip(\";\");\n        parent.add(enm);\n    }\n\n    function parseEnumValue(parent, token) {\n\n        /* istanbul ignore next */\n        if (!nameRe.test(token))\n            throw illegal(token, \"name\");\n\n        var name = token;\n        skip(\"=\");\n        var value = parseId(next(), true),\n            trailingLine = tn.line();\n        parent.add(name, value, cmnt());\n        parseInlineOptions({}); // skips enum value options\n        if (!parent.comments[name])\n            parent.comments[name] = cmnt(trailingLine);\n    }\n\n    function parseOption(parent, token) {\n        var custom = skip(\"(\", true);\n        var name = next();\n\n        /* istanbul ignore next */\n        if (!typeRefRe.test(name))\n            throw illegal(name, \"name\");\n\n        if (custom) {\n            skip(\")\");\n            name = \"(\" + name + \")\";\n            token = peek();\n            if (fqTypeRefRe.test(token)) {\n                name += token;\n                next();\n            }\n        }\n        skip(\"=\");\n        parseOptionValue(parent, name);\n    }\n\n    function parseOptionValue(parent, name) {\n        if (skip(\"{\", true)) { // { a: \"foo\" b { c: \"bar\" } }\n            /* istanbul ignore next */\n            do {\n                if (!nameRe.test(token = next()))\n                    throw illegal(token, \"name\");\n                if (peek() === \"{\")\n                    parseOptionValue(parent, name + \".\" + token);\n                else {\n                    skip(\":\");\n                    setOption(parent, name + \".\" + token, readValue(true));\n                }\n            } while (!skip(\"}\", true));\n        } else\n            setOption(parent, name, readValue(true));\n        // Does not enforce a delimiter to be universal\n    }\n\n    function setOption(parent, name, value) {\n        if (parent.setOption)\n            parent.setOption(name, value);\n    }\n\n    function parseInlineOptions(parent) {\n        if (skip(\"[\", true)) {\n            do {\n                parseOption(parent, \"option\");\n            } while (skip(\",\", true));\n            skip(\"]\");\n        }\n        skip(\";\");\n        return parent;\n    }\n\n    function parseService(parent, token) {\n        token = next();\n\n        /* istanbul ignore next */\n        if (!nameRe.test(token))\n            throw illegal(token, \"service name\");\n\n        var name = token;\n        var service = new Service(name);\n        service.comment = cmnt();\n        service.filename = parse.filename;\n        if (skip(\"{\", true)) {\n            while ((token = next()) !== \"}\") {\n                var tokenLower = lower(token);\n                switch (tokenLower) {\n                    case \"option\":\n                        parseOption(service, tokenLower);\n                        skip(\";\");\n                        break;\n                    case \"rpc\":\n                        parseMethod(service, tokenLower);\n                        break;\n\n                    /* istanbul ignore next */\n                    default:\n                        throw illegal(token);\n                }\n            }\n            skip(\";\", true);\n        } else\n            skip(\";\");\n        parent.add(service);\n    }\n\n    function parseMethod(parent, token) {\n        var type = token;\n        var name = next();\n\n        /* istanbul ignore next */\n        if (!nameRe.test(name))\n            throw illegal(name, \"name\");\n        var requestType, requestStream,\n            responseType, responseStream;\n        skip(\"(\");\n        if (skip(\"stream\", true))\n            requestStream = true;\n        /* istanbul ignore next */\n        if (!typeRefRe.test(token = next()))\n            throw illegal(token);\n        requestType = token;\n        skip(\")\"); skip(\"returns\"); skip(\"(\");\n        if (skip(\"stream\", true))\n            responseStream = true;\n        /* istanbul ignore next */\n        if (!typeRefRe.test(token = next()))\n            throw illegal(token);\n\n        responseType = token;\n        skip(\")\");\n        var method = new Method(name, type, requestType, responseType, requestStream, responseStream),\n            trailingLine = tn.line();\n        method.comment = cmnt();\n        method.filename = parse.filename;\n        if (skip(\"{\", true)) {\n            while ((token = next()) !== \"}\") {\n                var tokenLower = lower(token);\n                switch (tokenLower) {\n                    case \"option\":\n                        parseOption(method, tokenLower);\n                        skip(\";\");\n                        break;\n\n                    /* istanbul ignore next */\n                    default:\n                        throw illegal(token);\n                }\n            }\n            skip(\";\", true);\n        } else {\n            skip(\";\");\n            if (!method.comment)\n                method.comment = cmnt(trailingLine);\n        }\n        parent.add(method);\n    }\n\n    function parseExtension(parent, token) {\n        var reference = next();\n\n        /* istanbul ignore next */\n        if (!typeRefRe.test(reference))\n            throw illegal(reference, \"reference\");\n\n        if (skip(\"{\", true)) {\n            while ((token = next()) !== \"}\") {\n                var tokenLower = lower(token);\n                switch (tokenLower) {\n                    case \"required\":\n                    case \"repeated\":\n                    case \"optional\":\n                        parseField(parent, tokenLower, reference);\n                        break;\n                    default:\n                        /* istanbul ignore next */\n                        if (!isProto3 || !typeRefRe.test(token))\n                            throw illegal(token);\n                        push(token);\n                        parseField(parent, \"optional\", reference);\n                        break;\n                }\n            }\n            skip(\";\", true);\n        } else\n            skip(\";\");\n    }\n\n    var token;\n    while ((token = next()) !== null) {\n        var tokenLower = lower(token);\n        switch (tokenLower) {\n\n            case \"package\":\n                /* istanbul ignore next */\n                if (!head)\n                    throw illegal(token);\n                parsePackage();\n                break;\n\n            case \"import\":\n                /* istanbul ignore next */\n                if (!head)\n                    throw illegal(token);\n                parseImport();\n                break;\n\n            case \"syntax\":\n                /* istanbul ignore next */\n                if (!head)\n                    throw illegal(token);\n                parseSyntax();\n                break;\n\n            case \"option\":\n                /* istanbul ignore next */\n                if (!head)\n                    throw illegal(token);\n                parseOption(ptr, token);\n                skip(\";\");\n                break;\n\n            default:\n                /* istanbul ignore else */\n                if (parseCommon(ptr, token)) {\n                    head = false;\n                    continue;\n                }\n                /* istanbul ignore next */\n                throw illegal(token);\n        }\n    }\n\n    parse.filename = null;\n    return {\n        \"package\"     : pkg,\n        \"imports\"     : imports,\n         weakImports  : weakImports,\n         syntax       : syntax,\n         root         : root\n    };\n}\n\n/**\n * Parses the given .proto source and returns an object with the parsed contents.\n * @name parse\n * @function\n * @param {string} source Source contents\n * @param {ParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {ParserResult} Parser result\n * @property {string} filename=null Currently processing file name for error reporting, if known\n * @property {ParseOptions} defaults Default {@link ParseOptions}\n * @variation 2\n */\n\n},{\"15\":15,\"16\":16,\"20\":20,\"22\":22,\"25\":25,\"29\":29,\"32\":32,\"33\":33,\"34\":34,\"35\":35,\"36\":36}],27:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Reader;\n\nvar util      = require(38);\n\nvar BufferReader; // cyclic\n\nvar LongBits  = util.LongBits,\n    utf8      = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n    return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n    /**\n     * Read buffer.\n     * @type {Uint8Array}\n     */\n    this.buf = buffer;\n\n    /**\n     * Read buffer position.\n     * @type {number}\n     */\n    this.pos = 0;\n\n    /**\n     * Read buffer length.\n     * @type {number}\n     */\n    this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n    ? function create_typed_array(buffer) {\n        if (buffer instanceof Uint8Array || Array.isArray(buffer))\n            return new Reader(buffer);\n        throw Error(\"illegal buffer\");\n    }\n    /* istanbul ignore next */\n    : function create_array(buffer) {\n        if (Array.isArray(buffer))\n            return new Reader(buffer);\n        throw Error(\"illegal buffer\");\n    };\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = util.Buffer\n    ? function create_buffer_setup(buffer) {\n        return (Reader.create = function create_buffer(buffer) {\n            return util.Buffer.isBuffer(buffer)\n                ? new BufferReader(buffer)\n                /* istanbul ignore next */\n                : create_array(buffer);\n        })(buffer);\n    }\n    /* istanbul ignore next */\n    : create_array;\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n    var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n    return function read_uint32() {\n        value = (         this.buf[this.pos] & 127       ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n        value = (value | (this.buf[this.pos] & 127) <<  7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n        value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n        value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n        value = (value | (this.buf[this.pos] &  15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n        /* istanbul ignore next */\n        if ((this.pos += 5) > this.len) {\n            this.pos = this.len;\n            throw indexOutOfRange(this, 10);\n        }\n        return value;\n    };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n    return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n    var value = this.uint32();\n    return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n    // tends to deopt with local vars for octet etc.\n    var bits = new LongBits(0, 0);\n    var i = 0;\n    if (this.len - this.pos > 4) { // fast route (lo)\n        for (; i < 4; ++i) {\n            // 1st..4th\n            bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n            if (this.buf[this.pos++] < 128)\n                return bits;\n        }\n        // 5th\n        bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n        bits.hi = (bits.hi | (this.buf[this.pos] & 127) >>  4) >>> 0;\n        if (this.buf[this.pos++] < 128)\n            return bits;\n        i = 0;\n    } else {\n        for (; i < 3; ++i) {\n            /* istanbul ignore next */\n            if (this.pos >= this.len)\n                throw indexOutOfRange(this);\n            // 1st..3th\n            bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n            if (this.buf[this.pos++] < 128)\n                return bits;\n        }\n        // 4th\n        bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n        return bits;\n    }\n    if (this.len - this.pos > 4) { // fast route (hi)\n        for (; i < 5; ++i) {\n            // 6th..10th\n            bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n            if (this.buf[this.pos++] < 128)\n                return bits;\n        }\n    } else {\n        for (; i < 5; ++i) {\n            /* istanbul ignore next */\n            if (this.pos >= this.len)\n                throw indexOutOfRange(this);\n            // 6th..10th\n            bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n            if (this.buf[this.pos++] < 128)\n                return bits;\n        }\n    }\n    /* istanbul ignore next */\n    throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long|number} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long|number} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long|number} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n    return this.uint32() !== 0;\n};\n\nfunction readFixed32(buf, end) {\n    return (buf[end - 4]\n          | buf[end - 3] << 8\n          | buf[end - 2] << 16\n          | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n    /* istanbul ignore next */\n    if (this.pos + 4 > this.len)\n        throw indexOutOfRange(this, 4);\n\n    return readFixed32(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n    /* istanbul ignore next */\n    if (this.pos + 4 > this.len)\n        throw indexOutOfRange(this, 4);\n\n    return readFixed32(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n    /* istanbul ignore next */\n    if (this.pos + 8 > this.len)\n        throw indexOutOfRange(this, 8);\n\n    return new LongBits(readFixed32(this.buf, this.pos += 4), readFixed32(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long|number} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long|number} Value read\n */\n\nvar readFloat = typeof Float32Array !== \"undefined\"\n    ? (function() {\n        var f32 = new Float32Array(1),\n            f8b = new Uint8Array(f32.buffer);\n        f32[0] = -0;\n        return f8b[3] // already le?\n            ? function readFloat_f32(buf, pos) {\n                f8b[0] = buf[pos    ];\n                f8b[1] = buf[pos + 1];\n                f8b[2] = buf[pos + 2];\n                f8b[3] = buf[pos + 3];\n                return f32[0];\n            }\n            /* istanbul ignore next */\n            : function readFloat_f32_le(buf, pos) {\n                f8b[0] = buf[pos + 3];\n                f8b[1] = buf[pos + 2];\n                f8b[2] = buf[pos + 1];\n                f8b[3] = buf[pos    ];\n                return f32[0];\n            };\n    })()\n    /* istanbul ignore next */\n    : function readFloat_ieee754(buf, pos) {\n        var uint = readFixed32(buf, pos + 4),\n            sign = (uint >> 31) * 2 + 1,\n            exponent = uint >>> 23 & 255,\n            mantissa = uint & 8388607;\n        return exponent === 255\n            ? mantissa\n              ? NaN\n              : sign * Infinity\n            : exponent === 0 // denormal\n              ? sign * 1.401298464324817e-45 * mantissa\n              : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\n    };\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n    /* istanbul ignore next */\n    if (this.pos + 4 > this.len)\n        throw indexOutOfRange(this, 4);\n\n    var value = readFloat(this.buf, this.pos);\n    this.pos += 4;\n    return value;\n};\n\nvar readDouble = typeof Float64Array !== \"undefined\"\n    ? (function() {\n        var f64 = new Float64Array(1),\n            f8b = new Uint8Array(f64.buffer);\n        f64[0] = -0;\n        return f8b[7] // already le?\n            ? function readDouble_f64(buf, pos) {\n                f8b[0] = buf[pos    ];\n                f8b[1] = buf[pos + 1];\n                f8b[2] = buf[pos + 2];\n                f8b[3] = buf[pos + 3];\n                f8b[4] = buf[pos + 4];\n                f8b[5] = buf[pos + 5];\n                f8b[6] = buf[pos + 6];\n                f8b[7] = buf[pos + 7];\n                return f64[0];\n            }\n            /* istanbul ignore next */\n            : function readDouble_f64_le(buf, pos) {\n                f8b[0] = buf[pos + 7];\n                f8b[1] = buf[pos + 6];\n                f8b[2] = buf[pos + 5];\n                f8b[3] = buf[pos + 4];\n                f8b[4] = buf[pos + 3];\n                f8b[5] = buf[pos + 2];\n                f8b[6] = buf[pos + 1];\n                f8b[7] = buf[pos    ];\n                return f64[0];\n            };\n    })()\n    /* istanbul ignore next */\n    : function readDouble_ieee754(buf, pos) {\n        var lo = readFixed32(buf, pos + 4),\n            hi = readFixed32(buf, pos + 8);\n        var sign = (hi >> 31) * 2 + 1,\n            exponent = hi >>> 20 & 2047,\n            mantissa = 4294967296 * (hi & 1048575) + lo;\n        return exponent === 2047\n            ? mantissa\n              ? NaN\n              : sign * Infinity\n            : exponent === 0 // denormal\n              ? sign * 5e-324 * mantissa\n              : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\n    };\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n    /* istanbul ignore next */\n    if (this.pos + 8 > this.len)\n        throw indexOutOfRange(this, 4);\n\n    var value = readDouble(this.buf, this.pos);\n    this.pos += 8;\n    return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n    var length = this.uint32(),\n        start  = this.pos,\n        end    = this.pos + length;\n\n    /* istanbul ignore next */\n    if (end > this.len)\n        throw indexOutOfRange(this, length);\n\n    this.pos += length;\n    return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1\n        ? new this.buf.constructor(0)\n        : this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n    var bytes = this.bytes();\n    return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n    if (typeof length === \"number\") {\n        /* istanbul ignore next */\n        if (this.pos + length > this.len)\n            throw indexOutOfRange(this, length);\n        this.pos += length;\n    } else {\n        /* istanbul ignore next */\n        do {\n            if (this.pos >= this.len)\n                throw indexOutOfRange(this);\n        } while (this.buf[this.pos++] & 128);\n    }\n    return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n    switch (wireType) {\n        case 0:\n            this.skip();\n            break;\n        case 1:\n            this.skip(8);\n            break;\n        case 2:\n            this.skip(this.uint32());\n            break;\n        case 3:\n            do { // eslint-disable-line no-constant-condition\n                if ((wireType = this.uint32() & 7) === 4)\n                    break;\n                this.skipType(wireType);\n            } while (true);\n            break;\n        case 5:\n            this.skip(4);\n            break;\n\n        /* istanbul ignore next */\n        default:\n            throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n    }\n    return this;\n};\n\nReader._configure = function(BufferReader_) {\n    BufferReader = BufferReader_;\n\n    var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n    util.merge(Reader.prototype, {\n\n        int64: function read_int64() {\n            return readLongVarint.call(this)[fn](false);\n        },\n\n        uint64: function read_uint64() {\n            return readLongVarint.call(this)[fn](true);\n        },\n\n        sint64: function read_sint64() {\n            return readLongVarint.call(this).zzDecode()[fn](false);\n        },\n\n        fixed64: function read_fixed64() {\n            return readFixed64.call(this)[fn](true);\n        },\n\n        sfixed64: function read_sfixed64() {\n            return readFixed64.call(this)[fn](false);\n        }\n\n    });\n};\n\n},{\"38\":38}],28:[function(require,module,exports){\n\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(27);\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(38);\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n    Reader.call(this, buffer);\n\n    /**\n     * Read buffer.\n     * @name BufferReader#buf\n     * @type {Buffer}\n     */\n}\n\n/* istanbul ignore else */\nif (util.Buffer)\n    BufferReader.prototype._slice = util.Buffer.prototype.slice;\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n    var len = this.uint32(); // modifies pos\n    return this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\n},{\"27\":27,\"38\":38}],29:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Root;\n\n// extends Namespace\nvar Namespace = require(23);\n((Root.prototype = Object.create(Namespace.prototype)).constructor = Root).className = \"Root\";\n\nvar Field   = require(16),\n    Enum    = require(15),\n    util    = require(36);\n\nvar Type,   // cyclic\n    parse,  // might be excluded\n    common; // \"\n\n/**\n * Constructs a new root namespace instance.\n * @classdesc Root namespace wrapping all types, enums, services, sub-namespaces etc. that belong together.\n * @extends NamespaceBase\n * @constructor\n * @param {Object.<string,*>} [options] Top level options\n */\nfunction Root(options) {\n    Namespace.call(this, \"\", options);\n\n    /**\n     * Deferred extension fields.\n     * @type {Field[]}\n     */\n    this.deferred = [];\n\n    /**\n     * Resolved file names of loaded files.\n     * @type {string[]}\n     */\n    this.files = [];\n}\n\n/**\n * Loads a JSON definition into a root namespace.\n * @param {Object.<string,*>} json JSON definition\n * @param {Root} [root] Root namespace, defaults to create a new one if omitted\n * @returns {Root} Root namespace\n */\nRoot.fromJSON = function fromJSON(json, root) {\n    if (!root)\n        root = new Root();\n    if (json.options)\n        root.setOptions(json.options);\n    return root.addJSON(json.nested);\n};\n\n/**\n * Resolves the path of an imported file, relative to the importing origin.\n * This method exists so you can override it with your own logic in case your imports are scattered over multiple directories.\n * @function\n * @param {string} origin The file name of the importing file\n * @param {string} target The file name being imported\n * @returns {?string} Resolved path to `target` or `null` to skip the file\n */\nRoot.prototype.resolvePath = util.path.resolve;\n\n// A symbol-like function to safely signal synchronous loading\n/* istanbul ignore next */\nfunction SYNC() {} // eslint-disable-line no-empty-function\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {ParseOptions} options Parse options\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n */\nRoot.prototype.load = function load(filename, options, callback) {\n    if (typeof options === \"function\") {\n        callback = options;\n        options = undefined;\n    }\n    var self = this;\n    if (!callback)\n        return util.asPromise(load, self, filename, options);\n\n    var sync = callback === SYNC; // undocumented\n\n    // Finishes loading by calling the callback (exactly once)\n    function finish(err, root) {\n        /* istanbul ignore next */\n        if (!callback)\n            return;\n        var cb = callback;\n        callback = null;\n        if (sync)\n            throw err;\n        cb(err, root);\n    }\n\n    // Processes a single file\n    function process(filename, source) {\n        try {\n            if (util.isString(source) && source.charAt(0) === \"{\")\n                source = JSON.parse(source);\n            if (!util.isString(source))\n                self.setOptions(source.options).addJSON(source.nested);\n            else {\n                parse.filename = filename;\n                var parsed = parse(source, self, options),\n                    resolved,\n                    i = 0;\n                if (parsed.imports)\n                    for (; i < parsed.imports.length; ++i)\n                        if (resolved = self.resolvePath(filename, parsed.imports[i]))\n                            fetch(resolved);\n                if (parsed.weakImports)\n                    for (i = 0; i < parsed.weakImports.length; ++i)\n                        if (resolved = self.resolvePath(filename, parsed.weakImports[i]))\n                            fetch(resolved, true);\n            }\n        } catch (err) {\n            finish(err);\n        }\n        if (!sync && !queued)\n            finish(null, self); // only once anyway\n    }\n\n    // Fetches a single file\n    function fetch(filename, weak) {\n\n        // Strip path if this file references a bundled definition\n        var idx = filename.lastIndexOf(\"google/protobuf/\");\n        if (idx > -1) {\n            var altname = filename.substring(idx);\n            if (altname in common)\n                filename = altname;\n        }\n\n        // Skip if already loaded / attempted\n        if (self.files.indexOf(filename) > -1)\n            return;\n        self.files.push(filename);\n\n        // Shortcut bundled definitions\n        if (filename in common) {\n            if (sync)\n                process(filename, common[filename]);\n            else {\n                ++queued;\n                setTimeout(function() {\n                    --queued;\n                    process(filename, common[filename]);\n                });\n            }\n            return;\n        }\n\n        // Otherwise fetch from disk or network\n        if (sync) {\n            var source;\n            try {\n                source = util.fs.readFileSync(filename).toString(\"utf8\");\n            } catch (err) {\n                if (!weak)\n                    finish(err);\n                return;\n            }\n            process(filename, source);\n        } else {\n            ++queued;\n            util.fetch(filename, function(err, source) {\n                --queued;\n                /* istanbul ignore next */\n                if (!callback)\n                    return; // terminated meanwhile\n                if (err) {\n                    if (!weak)\n                        finish(err);\n                    else /* istanbul ignore next */ if (!queued) // can't be covered reliably\n                        finish(null, self);\n                    return;\n                }\n                process(filename, source);\n            });\n        }\n    }\n    var queued = 0;\n\n    // Assembling the root namespace doesn't require working type\n    // references anymore, so we can load everything in parallel\n    if (util.isString(filename))\n        filename = [ filename ];\n    for (var i = 0, resolved; i < filename.length; ++i)\n        if (resolved = self.resolvePath(\"\", filename[i]))\n            fetch(resolved);\n\n    if (sync)\n        return self;\n    if (!queued)\n        finish(null, self);\n    return undefined;\n};\n// function load(filename:string, options:ParseOptions, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and calls the callback.\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {LoadCallback} callback Callback function\n * @returns {undefined}\n * @variation 2\n */\n// function load(filename:string, callback:LoadCallback):undefined\n\n/**\n * Loads one or multiple .proto or preprocessed .json files into this root namespace and returns a promise.\n * @name Root#load\n * @function\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {ParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Promise<Root>} Promise\n * @variation 3\n */\n// function load(filename:string, [options:ParseOptions]):Promise<Root>\n\n/**\n * Synchronously loads one or multiple .proto or preprocessed .json files into this root namespace (node only).\n * @name Root#loadSync\n * @function\n * @param {string|string[]} filename Names of one or multiple files to load\n * @param {ParseOptions} [options] Parse options. Defaults to {@link parse.defaults} when omitted.\n * @returns {Root} Root namespace\n * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid\n */\nRoot.prototype.loadSync = function loadSync(filename, options) {\n    if (!util.isNode)\n        throw Error(\"not supported\");\n    return this.load(filename, options, SYNC);\n};\n\n/**\n * @override\n */\nRoot.prototype.resolveAll = function resolveAll() {\n    if (this.deferred.length)\n        throw Error(\"unresolvable extensions: \" + this.deferred.map(function(field) {\n            return \"'extend \" + field.extend + \"' in \" + field.parent.fullName;\n        }).join(\", \"));\n    return Namespace.prototype.resolveAll.call(this);\n};\n\n// only uppercased (and thus conflict-free) children are exposed, see below\nvar exposeRe = /^[A-Z]/;\n\n/**\n * Handles a deferred declaring extension field by creating a sister field to represent it within its extended type.\n * @param {Root} root Root instance\n * @param {Field} field Declaring extension field witin the declaring type\n * @returns {boolean} `true` if successfully added to the extended type, `false` otherwise\n * @inner\n * @ignore\n */\nfunction tryHandleExtension(root, field) {\n    var extendedType = field.parent.lookup(field.extend);\n    if (extendedType) {\n        var sisterField = new Field(field.fullName, field.id, field.type, field.rule, undefined, field.options);\n        sisterField.declaringField = field;\n        field.extensionField = sisterField;\n        extendedType.add(sisterField);\n        return true;\n    }\n    return false;\n}\n\n/**\n * Called when any object is added to this root or its sub-namespaces.\n * @param {ReflectionObject} object Object added\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleAdd = function _handleAdd(object) {\n    if (object instanceof Field) {\n\n        if (/* an extension field (implies not part of a oneof) */ object.extend !== undefined && /* not already handled */ !object.extensionField)\n            if (!tryHandleExtension(this, object))\n                this.deferred.push(object);\n\n    } else if (object instanceof Enum) {\n\n        if (exposeRe.test(object.name))\n            object.parent[object.name] = object.values; // expose enum values as property of its parent\n\n    } else /* everything else is a namespace */ {\n\n        if (object instanceof Type) // Try to handle any deferred extensions\n            for (var i = 0; i < this.deferred.length;)\n                if (tryHandleExtension(this, this.deferred[i]))\n                    this.deferred.splice(i, 1);\n                else\n                    ++i;\n        for (var j = 0; j < /* initializes */ object.nestedArray.length; ++j) // recurse into the namespace\n            this._handleAdd(object._nestedArray[j]);\n        if (exposeRe.test(object.name))\n            object.parent[object.name] = object; // expose namespace as property of its parent\n    }\n\n    // The above also adds uppercased (and thus conflict-free) nested types, services and enums as\n    // properties of namespaces just like static code does. This allows using a .d.ts generated for\n    // a static module with reflection-based solutions where the condition is met.\n};\n\n/**\n * Called when any object is removed from this root or its sub-namespaces.\n * @param {ReflectionObject} object Object removed\n * @returns {undefined}\n * @private\n */\nRoot.prototype._handleRemove = function _handleRemove(object) {\n    if (object instanceof Field) {\n\n        if (/* an extension field */ object.extend !== undefined) {\n            if (/* already handled */ object.extensionField) { // remove its sister field\n                object.extensionField.parent.remove(object.extensionField);\n                object.extensionField = null;\n            } else { // cancel the extension\n                var index = this.deferred.indexOf(object);\n                /* istanbul ignore else */\n                if (index > -1)\n                    this.deferred.splice(index, 1);\n            }\n        }\n\n    } else if (object instanceof Enum) {\n\n        if (exposeRe.test(object.name))\n            delete object.parent[object.name]; // unexpose enum values\n\n    } else if (object instanceof Namespace) {\n\n        for (var i = 0; i < /* initializes */ object.nestedArray.length; ++i) // recurse into the namespace\n            this._handleRemove(object._nestedArray[i]);\n\n        if (exposeRe.test(object.name))\n            delete object.parent[object.name]; // unexpose namespaces\n\n    }\n};\n\nRoot._configure = function(Type_, parse_, common_) {\n    Type = Type_;\n    parse = parse_;\n    common = common_;\n};\n\n},{\"15\":15,\"16\":16,\"23\":23,\"36\":36}],30:[function(require,module,exports){\n\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n *     if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n *         throw Error(\"no such method\");\n *     asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n *         callback(err, responseData);\n *     });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {?Error} error Error, if any, otherwise `null`\n * @param {?Uint8Array} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(31);\n\n},{\"31\":31}],31:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Service;\n\nvar util = require(38);\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @type {function}\n * @param {?Error} error Error, if any\n * @param {?Message} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.ServiceMethodMixin|ServiceMethodMixin} and thus {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @type {function}\n * @param {Message|Object} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise<Message>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * A service method mixin.\n *\n * When using TypeScript, mixed in service methods are only supported directly with a type definition of a static module (used with reflection). Otherwise, explicit casting is required.\n * @typedef rpc.ServiceMethodMixin\n * @type {Object.<string,rpc.ServiceMethod>}\n * @example\n * // Explicit casting with TypeScript\n * (myRpcService[\"myMethod\"] as protobuf.rpc.ServiceMethod)(...)\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @augments rpc.ServiceMethodMixin\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n    if (typeof rpcImpl !== \"function\")\n        throw TypeError(\"rpcImpl must be a function\");\n\n    util.EventEmitter.call(this);\n\n    /**\n     * RPC implementation. Becomes `null` once the service is ended.\n     * @type {?RPCImpl}\n     */\n    this.rpcImpl = rpcImpl;\n\n    /**\n     * Whether requests are length-delimited.\n     * @type {boolean}\n     */\n    this.requestDelimited = Boolean(requestDelimited);\n\n    /**\n     * Whether responses are length-delimited.\n     * @type {boolean}\n     */\n    this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {function} requestCtor Request constructor\n * @param {function} responseCtor Response constructor\n * @param {Message|Object} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n    if (!request)\n        throw TypeError(\"request must be specified\");\n\n    var self = this;\n    if (!callback)\n        return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n    if (!self.rpcImpl) {\n        setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n        return undefined;\n    }\n\n    try {\n        return self.rpcImpl(\n            method,\n            requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n            function rpcCallback(err, response) {\n\n                if (err) {\n                    self.emit(\"error\", err, method);\n                    return callback(err);\n                }\n\n                if (response === null) {\n                    self.end(/* endedByRPC */ true);\n                    return undefined;\n                }\n\n                if (!(response instanceof responseCtor)) {\n                    try {\n                        response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n                    } catch (err) {\n                        self.emit(\"error\", err, method);\n                        return callback(err);\n                    }\n                }\n\n                self.emit(\"data\", response, method);\n                return callback(null, response);\n            }\n        );\n    } catch (err) {\n        self.emit(\"error\", err, method);\n        setTimeout(function() { callback(err); }, 0);\n        return undefined;\n    }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n    if (this.rpcImpl) {\n        if (!endedByRPC) // signal end to rpcImpl\n            this.rpcImpl(null, null, null);\n        this.rpcImpl = null;\n        this.emit(\"end\").off();\n    }\n    return this;\n};\n\n},{\"38\":38}],32:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Service;\n\n// extends Namespace\nvar Namespace = require(23);\n((Service.prototype = Object.create(Namespace.prototype)).constructor = Service).className = \"Service\";\n\nvar Method = require(22),\n    util   = require(36),\n    rpc    = require(30);\n\n/**\n * Constructs a new service instance.\n * @classdesc Reflected service.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Service name\n * @param {Object.<string,*>} [options] Service options\n * @throws {TypeError} If arguments are invalid\n */\nfunction Service(name, options) {\n    Namespace.call(this, name, options);\n\n    /**\n     * Service methods.\n     * @type {Object.<string,Method>}\n     */\n    this.methods = {}; // toJSON, marker\n\n    /**\n     * Cached methods as an array.\n     * @type {?Method[]}\n     * @private\n     */\n    this._methodsArray = null;\n}\n\n/**\n * Constructs a service from JSON.\n * @param {string} name Service name\n * @param {Object.<string,*>} json JSON object\n * @returns {Service} Created service\n * @throws {TypeError} If arguments are invalid\n */\nService.fromJSON = function fromJSON(name, json) {\n    var service = new Service(name, json.options);\n    /* istanbul ignore else */\n    if (json.methods)\n        for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)\n            service.add(Method.fromJSON(names[i], json.methods[names[i]]));\n    return service;\n};\n\n/**\n * Methods of this service as an array for iteration.\n * @name Service#methodsArray\n * @type {Method[]}\n * @readonly\n */\nObject.defineProperty(Service.prototype, \"methodsArray\", {\n    get: function() {\n        return this._methodsArray || (this._methodsArray = util.toArray(this.methods));\n    }\n});\n\nfunction clearCache(service) {\n    service._methodsArray = null;\n    return service;\n}\n\n/**\n * @override\n */\nService.prototype.toJSON = function toJSON() {\n    var inherited = Namespace.prototype.toJSON.call(this);\n    return {\n        options : inherited && inherited.options || undefined,\n        methods : Namespace.arrayToJSON(this.methodsArray) || /* istanbul ignore next */ {},\n        nested  : inherited && inherited.nested || undefined\n    };\n};\n\n/**\n * @override\n */\nService.prototype.get = function get(name) {\n    return this.methods[name]\n        || Namespace.prototype.get.call(this, name);\n};\n\n/**\n * @override\n */\nService.prototype.resolveAll = function resolveAll() {\n    var methods = this.methodsArray;\n    for (var i = 0; i < methods.length; ++i)\n        methods[i].resolve();\n    return Namespace.prototype.resolve.call(this);\n};\n\n/**\n * @override\n */\nService.prototype.add = function add(object) {\n    /* istanbul ignore next */\n    if (this.get(object.name))\n        throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n    if (object instanceof Method) {\n        this.methods[object.name] = object;\n        object.parent = this;\n        return clearCache(this);\n    }\n    return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * @override\n */\nService.prototype.remove = function remove(object) {\n    if (object instanceof Method) {\n\n        /* istanbul ignore next */\n        if (this.methods[object.name] !== object)\n            throw Error(object + \" is not a member of \" + this);\n\n        delete this.methods[object.name];\n        object.parent = null;\n        return clearCache(this);\n    }\n    return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Creates a runtime service using the specified rpc implementation.\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n * @returns {rpc.Service} RPC service. Useful where requests and/or responses are streamed.\n */\nService.prototype.create = function create(rpcImpl, requestDelimited, responseDelimited) {\n    var rpcService = new rpc.Service(rpcImpl, requestDelimited, responseDelimited);\n    for (var i = 0; i < /* initializes */ this.methodsArray.length; ++i) {\n        rpcService[util.lcFirst(this._methodsArray[i].resolve().name)] = util.codegen(\"r\",\"c\")(\"return this.rpcCall(m,q,s,r,c)\").eof(util.lcFirst(this._methodsArray[i].name), {\n            m: this._methodsArray[i],\n            q: this._methodsArray[i].resolvedRequestType.ctor,\n            s: this._methodsArray[i].resolvedResponseType.ctor\n        });\n    }\n    return rpcService;\n};\n\n},{\"22\":22,\"23\":23,\"30\":30,\"36\":36}],33:[function(require,module,exports){\n\"use strict\";\nmodule.exports = tokenize;\n\nvar delimRe        = /[\\s{}=;:[\\],'\"()<>]/g,\n    stringDoubleRe = /(?:\"([^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\")/g,\n    stringSingleRe = /(?:'([^'\\\\]*(?:\\\\.[^'\\\\]*)*)')/g;\n\nvar setCommentRe = /^ *[*/]+ */,\n    setCommentSplitRe = /\\n/g,\n    whitespaceRe = /\\s/,\n    unescapeRe = /\\\\(.?)/g;\n\nvar unescapeMap = {\n    \"0\": \"\\0\",\n    \"r\": \"\\r\",\n    \"n\": \"\\n\",\n    \"t\": \"\\t\"\n};\n\n/**\n * Unescapes a string.\n * @param {string} str String to unescape\n * @returns {string} Unescaped string\n * @property {Object.<string,string>} map Special characters map\n * @ignore\n */\nfunction unescape(str) {\n    return str.replace(unescapeRe, function($0, $1) {\n        switch ($1) {\n            case \"\\\\\":\n            case \"\":\n                return $1;\n            default:\n                return unescapeMap[$1] || \"\";\n        }\n    });\n}\n\ntokenize.unescape = unescape;\n\n/**\n * Handle object returned from {@link tokenize}.\n * @typedef {Object.<string,*>} TokenizerHandle\n * @property {function():number} line Gets the current line number\n * @property {function():?string} next Gets the next token and advances (`null` on eof)\n * @property {function():?string} peek Peeks for the next token (`null` on eof)\n * @property {function(string)} push Pushes a token back to the stack\n * @property {function(string, boolean=):boolean} skip Skips a token, returns its presence and advances or, if non-optional and not present, throws\n * @property {function(number=):?string} cmnt Gets the comment on the previous line or the line comment on the specified line, if any\n */\n\n/**\n * Tokenizes the given .proto source and returns an object with useful utility functions.\n * @param {string} source Source contents\n * @returns {TokenizerHandle} Tokenizer handle\n * @property {function(string):string} unescape Unescapes a string\n */\nfunction tokenize(source) {\n    /* eslint-disable callback-return */\n    source = source.toString();\n\n    var offset = 0,\n        length = source.length,\n        line = 1,\n        commentType = null,\n        commentText = null,\n        commentLine = 0;\n\n    var stack = [];\n\n    var stringDelim = null;\n\n    /* istanbul ignore next */\n    /**\n     * Creates an error for illegal syntax.\n     * @param {string} subject Subject\n     * @returns {Error} Error created\n     * @inner\n     */\n    function illegal(subject) {\n        return Error(\"illegal \" + subject + \" (line \" + line + \")\");\n    }\n\n    /**\n     * Reads a string till its end.\n     * @returns {string} String read\n     * @inner\n     */\n    function readString() {\n        var re = stringDelim === \"'\" ? stringSingleRe : stringDoubleRe;\n        re.lastIndex = offset - 1;\n        var match = re.exec(source);\n        if (!match)\n            throw illegal(\"string\");\n        offset = re.lastIndex;\n        push(stringDelim);\n        stringDelim = null;\n        return unescape(match[1]);\n    }\n\n    /**\n     * Gets the character at `pos` within the source.\n     * @param {number} pos Position\n     * @returns {string} Character\n     * @inner\n     */\n    function charAt(pos) {\n        return source.charAt(pos);\n    }\n\n    /**\n     * Sets the current comment text.\n     * @param {number} start Start offset\n     * @param {number} end End offset\n     * @returns {undefined}\n     * @inner\n     */\n    function setComment(start, end) {\n        commentType = source.charAt(start++);\n        commentLine = line;\n        var lines = source\n            .substring(start, end)\n            .split(setCommentSplitRe);\n        for (var i = 0; i < lines.length; ++i)\n            lines[i] = lines[i].replace(setCommentRe, \"\").trim();\n        commentText = lines\n            .join(\"\\n\")\n            .trim();\n    }\n\n    /**\n     * Obtains the next token.\n     * @returns {?string} Next token or `null` on eof\n     * @inner\n     */\n    function next() {\n        if (stack.length > 0)\n            return stack.shift();\n        if (stringDelim)\n            return readString();\n        var repeat,\n            prev,\n            curr,\n            start,\n            isComment;\n        do {\n            if (offset === length)\n                return null;\n            repeat = false;\n            while (whitespaceRe.test(curr = charAt(offset))) {\n                if (curr === \"\\n\")\n                    ++line;\n                if (++offset === length)\n                    return null;\n            }\n            if (charAt(offset) === \"/\") {\n                if (++offset === length)\n                    throw illegal(\"comment\");\n                if (charAt(offset) === \"/\") { // Line\n                    isComment = charAt(start = offset + 1) === \"/\";\n                    while (charAt(++offset) !== \"\\n\")\n                        if (offset === length)\n                            return null;\n                    ++offset;\n                    if (isComment)\n                        setComment(start, offset - 1);\n                    ++line;\n                    repeat = true;\n                } else if ((curr = charAt(offset)) === \"*\") { /* Block */\n                    isComment = charAt(start = offset + 1) === \"*\";\n                    do {\n                        if (curr === \"\\n\")\n                            ++line;\n                        if (++offset === length)\n                            throw illegal(\"comment\");\n                        prev = curr;\n                        curr = charAt(offset);\n                    } while (prev !== \"*\" || curr !== \"/\");\n                    ++offset;\n                    if (isComment)\n                        setComment(start, offset - 2);\n                    repeat = true;\n                } else\n                    return \"/\";\n            }\n        } while (repeat);\n\n        // offset !== length if we got here\n\n        var end = offset;\n        delimRe.lastIndex = 0;\n        var delim = delimRe.test(charAt(end++));\n        if (!delim)\n            while (end < length && !delimRe.test(charAt(end)))\n                ++end;\n        var token = source.substring(offset, offset = end);\n        if (token === \"\\\"\" || token === \"'\")\n            stringDelim = token;\n        return token;\n    }\n\n    /**\n     * Pushes a token back to the stack.\n     * @param {string} token Token\n     * @returns {undefined}\n     * @inner\n     */\n    function push(token) {\n        stack.push(token);\n    }\n\n    /**\n     * Peeks for the next token.\n     * @returns {?string} Token or `null` on eof\n     * @inner\n     */\n    function peek() {\n        if (!stack.length) {\n            var token = next();\n            if (token === null)\n                return null;\n            push(token);\n        }\n        return stack[0];\n    }\n\n    /**\n     * Skips a token.\n     * @param {string} expected Expected token\n     * @param {boolean} [optional=false] Whether the token is optional\n     * @returns {boolean} `true` when skipped, `false` if not\n     * @throws {Error} When a required token is not present\n     * @inner\n     */\n    function skip(expected, optional) {\n        var actual = peek(),\n            equals = actual === expected;\n        if (equals) {\n            next();\n            return true;\n        }\n        if (!optional)\n            throw illegal(\"token '\" + actual + \"', '\" + expected + \"' expected\");\n        return false;\n    }\n\n    return {\n        next: next,\n        peek: peek,\n        push: push,\n        skip: skip,\n        line: function() {\n            return line;\n        },\n        cmnt: function(trailingLine) {\n            var ret;\n            if (trailingLine === undefined)\n                ret = commentLine === line - 1 && commentText || null;\n            else {\n                if (!commentText)\n                    peek();\n                ret = commentLine === trailingLine && commentType === \"/\" && commentText || null;\n            }\n            if (ret) {\n                commentType = commentText = null;\n                commentLine = 0;\n            }\n            return ret;\n        }\n    };\n    /* eslint-enable callback-return */\n}\n\n},{}],34:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Type;\n\n// extends Namespace\nvar Namespace = require(23);\n((Type.prototype = Object.create(Namespace.prototype)).constructor = Type).className = \"Type\";\n\nvar Enum      = require(15),\n    OneOf     = require(25),\n    Field     = require(16),\n    MapField  = require(20),\n    Service   = require(32),\n    Class     = require(10),\n    Message   = require(21),\n    Reader    = require(27),\n    Writer    = require(40),\n    util      = require(36),\n    encoder   = require(14),\n    decoder   = require(13),\n    verifier  = require(39),\n    converter = require(12);\n\n/**\n * Creates a type from JSON.\n * @param {string} name Message name\n * @param {Object.<string,*>} json JSON object\n * @returns {Type} Created message type\n */\nType.fromJSON = function fromJSON(name, json) {\n    var type = new Type(name, json.options);\n    type.extensions = json.extensions;\n    type.reserved = json.reserved;\n    var names = Object.keys(json.fields),\n        i = 0;\n    for (; i < names.length; ++i)\n        type.add(\n            ( typeof json.fields[names[i]].keyType !== \"undefined\"\n            ? MapField.fromJSON\n            : Field.fromJSON )(names[i], json.fields[names[i]])\n        );\n    if (json.oneofs)\n        for (names = Object.keys(json.oneofs), i = 0; i < names.length; ++i)\n            type.add(OneOf.fromJSON(names[i], json.oneofs[names[i]]));\n    if (json.nested)\n        for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {\n            var nested = json.nested[names[i]];\n            type.add( // most to least likely\n                ( nested.id !== undefined\n                ? Field.fromJSON\n                : nested.fields !== undefined\n                ? Type.fromJSON\n                : nested.values !== undefined\n                ? Enum.fromJSON\n                : nested.methods !== undefined\n                ? Service.fromJSON\n                : Namespace.fromJSON )(names[i], nested)\n            );\n        }\n    if (json.extensions && json.extensions.length)\n        type.extensions = json.extensions;\n    if (json.reserved && json.reserved.length)\n        type.reserved = json.reserved;\n    if (json.group)\n        type.group = true;\n    return type;\n};\n\n/**\n * Constructs a new reflected message type instance.\n * @classdesc Reflected message type.\n * @extends NamespaceBase\n * @constructor\n * @param {string} name Message name\n * @param {Object.<string,*>} [options] Declared options\n */\nfunction Type(name, options) {\n    Namespace.call(this, name, options);\n\n    /**\n     * Message fields.\n     * @type {Object.<string,Field>}\n     */\n    this.fields = {};  // toJSON, marker\n\n    /**\n     * Oneofs declared within this namespace, if any.\n     * @type {Object.<string,OneOf>}\n     */\n    this.oneofs = undefined; // toJSON\n\n    /**\n     * Extension ranges, if any.\n     * @type {number[][]}\n     */\n    this.extensions = undefined; // toJSON\n\n    /**\n     * Reserved ranges, if any.\n     * @type {Array.<number[]|string>}\n     */\n    this.reserved = undefined; // toJSON\n\n    /*?\n     * Whether this type is a legacy group.\n     * @type {boolean|undefined}\n     */\n    this.group = undefined; // toJSON\n\n    /**\n     * Cached fields by id.\n     * @type {?Object.<number,Field>}\n     * @private\n     */\n    this._fieldsById = null;\n\n    /**\n     * Cached fields as an array.\n     * @type {?Field[]}\n     * @private\n     */\n    this._fieldsArray = null;\n\n    /**\n     * Cached oneofs as an array.\n     * @type {?OneOf[]}\n     * @private\n     */\n    this._oneofsArray = null;\n\n    /**\n     * Cached constructor.\n     * @type {*}\n     * @private\n     */\n    this._ctor = null;\n}\n\nObject.defineProperties(Type.prototype, {\n\n    /**\n     * Message fields by id.\n     * @name Type#fieldsById\n     * @type {Object.<number,Field>}\n     * @readonly\n     */\n    fieldsById: {\n        get: function() {\n            /* istanbul ignore next */\n            if (this._fieldsById)\n                return this._fieldsById;\n            this._fieldsById = {};\n            for (var names = Object.keys(this.fields), i = 0; i < names.length; ++i) {\n                var field = this.fields[names[i]],\n                    id = field.id;\n\n                /* istanbul ignore next */\n                if (this._fieldsById[id])\n                    throw Error(\"duplicate id \" + id + \" in \" + this);\n\n                this._fieldsById[id] = field;\n            }\n            return this._fieldsById;\n        }\n    },\n\n    /**\n     * Fields of this message as an array for iteration.\n     * @name Type#fieldsArray\n     * @type {Field[]}\n     * @readonly\n     */\n    fieldsArray: {\n        get: function() {\n            return this._fieldsArray || (this._fieldsArray = util.toArray(this.fields));\n        }\n    },\n\n    /**\n     * Oneofs of this message as an array for iteration.\n     * @name Type#oneofsArray\n     * @type {OneOf[]}\n     * @readonly\n     */\n    oneofsArray: {\n        get: function() {\n            return this._oneofsArray || (this._oneofsArray = util.toArray(this.oneofs));\n        }\n    },\n\n    /**\n     * The registered constructor, if any registered, otherwise a generic constructor.\n     * @name Type#ctor\n     * @type {Class}\n     */\n    ctor: {\n        get: function() {\n            return this._ctor || (this._ctor = Class(this).constructor);\n        },\n        set: function(ctor) {\n            if (ctor && !(ctor.prototype instanceof Message))\n                throw TypeError(\"ctor must be a Message constructor\");\n            if (!ctor.from)\n                ctor.from = Message.from;\n            this._ctor = ctor;\n        }\n    }\n});\n\nfunction clearCache(type) {\n    type._fieldsById = type._fieldsArray = type._oneofsArray = type._ctor = null;\n    delete type.encode;\n    delete type.decode;\n    delete type.verify;\n    return type;\n}\n\n/**\n * @override\n */\nType.prototype.toJSON = function toJSON() {\n    var inherited = Namespace.prototype.toJSON.call(this);\n    return {\n        options    : inherited && inherited.options || undefined,\n        oneofs     : Namespace.arrayToJSON(this.oneofsArray),\n        fields     : Namespace.arrayToJSON(this.fieldsArray.filter(function(obj) { return !obj.declaringField; })) || {},\n        extensions : this.extensions && this.extensions.length ? this.extensions : undefined,\n        reserved   : this.reserved && this.reserved.length ? this.reserved : undefined,\n        group      : this.group || undefined,\n        nested     : inherited && inherited.nested || undefined\n    };\n};\n\n/**\n * @override\n */\nType.prototype.resolveAll = function resolveAll() {\n    var fields = this.fieldsArray, i = 0;\n    while (i < fields.length)\n        fields[i++].resolve();\n    var oneofs = this.oneofsArray; i = 0;\n    while (i < oneofs.length)\n        oneofs[i++].resolve();\n    return Namespace.prototype.resolve.call(this);\n};\n\n/**\n * @override\n */\nType.prototype.get = function get(name) {\n    return this.fields[name]\n        || this.oneofs && this.oneofs[name]\n        || this.nested && this.nested[name]\n        || null;\n};\n\n/**\n * Adds a nested object to this type.\n * @param {ReflectionObject} object Nested object to add\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If there is already a nested object with this name or, if a field, when there is already a field with this id\n */\nType.prototype.add = function add(object) {\n\n    if (this.get(object.name))\n        throw Error(\"duplicate name '\" + object.name + \"' in \" + this);\n\n    if (object instanceof Field && object.extend === undefined) {\n        // NOTE: Extension fields aren't actual fields on the declaring type, but nested objects.\n        // The root object takes care of adding distinct sister-fields to the respective extended\n        // type instead.\n\n        // avoids calling the getter if not absolutely necessary because it's called quite frequently\n        if (this._fieldsById ? /* istanbul ignore next */ this._fieldsById[object.id] : this.fieldsById[object.id])\n            throw Error(\"duplicate id \" + object.id + \" in \" + this);\n        if (this.isReservedId(object.id))\n            throw Error(\"id \" + object.id + \" is reserved in \" + this);\n        if (this.isReservedName(object.name))\n            throw Error(\"name '\" + object.name + \"' is reserved in \" + this);\n\n        if (object.parent)\n            object.parent.remove(object);\n        this.fields[object.name] = object;\n        object.message = this;\n        object.onAdd(this);\n        return clearCache(this);\n    }\n    if (object instanceof OneOf) {\n        if (!this.oneofs)\n            this.oneofs = {};\n        this.oneofs[object.name] = object;\n        object.onAdd(this);\n        return clearCache(this);\n    }\n    return Namespace.prototype.add.call(this, object);\n};\n\n/**\n * Removes a nested object from this type.\n * @param {ReflectionObject} object Nested object to remove\n * @returns {Type} `this`\n * @throws {TypeError} If arguments are invalid\n * @throws {Error} If `object` is not a member of this type\n */\nType.prototype.remove = function remove(object) {\n    if (object instanceof Field && object.extend === undefined) {\n        // See Type#add for the reason why extension fields are excluded here.\n        /* istanbul ignore next */\n        if (!this.fields || this.fields[object.name] !== object)\n            throw Error(object + \" is not a member of \" + this);\n        delete this.fields[object.name];\n        object.parent = null;\n        object.onRemove(this);\n        return clearCache(this);\n    }\n    if (object instanceof OneOf) {\n        /* istanbul ignore next */\n        if (!this.oneofs || this.oneofs[object.name] !== object)\n            throw Error(object + \" is not a member of \" + this);\n        delete this.oneofs[object.name];\n        object.parent = null;\n        object.onRemove(this);\n        return clearCache(this);\n    }\n    return Namespace.prototype.remove.call(this, object);\n};\n\n/**\n * Tests if the specified id is reserved.\n * @param {number} id Id to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedId = function isReservedId(id) {\n    if (this.reserved)\n        for (var i = 0; i < this.reserved.length; ++i)\n            if (typeof this.reserved[i] !== \"string\" && this.reserved[i][0] <= id && this.reserved[i][1] >= id)\n                return true;\n    return false;\n};\n\n/**\n * Tests if the specified name is reserved.\n * @param {string} name Name to test\n * @returns {boolean} `true` if reserved, otherwise `false`\n */\nType.prototype.isReservedName = function isReservedName(name) {\n    if (this.reserved)\n        for (var i = 0; i < this.reserved.length; ++i)\n            if (this.reserved[i] === name)\n                return true;\n    return false;\n};\n\n/**\n * Creates a new message of this type using the specified properties.\n * @param {Object.<string,*>} [properties] Properties to set\n * @returns {Message} Runtime message\n */\nType.prototype.create = function create(properties) {\n    return new this.ctor(properties);\n};\n\n/**\n * Sets up {@link Type#encode|encode}, {@link Type#decode|decode} and {@link Type#verify|verify}.\n * @returns {Type} `this`\n */\nType.prototype.setup = function setup() {\n    // Sets up everything at once so that the prototype chain does not have to be re-evaluated\n    // multiple times (V8, soft-deopt prototype-check).\n    var fullName = this.fullName,\n        types    = [];\n    for (var i = 0; i < /* initializes */ this.fieldsArray.length; ++i)\n        types.push(this._fieldsArray[i].resolve().resolvedType);\n    this.encode = encoder(this).eof(fullName + \"$encode\", {\n        Writer : Writer,\n        types  : types,\n        util   : util\n    });\n    this.decode = decoder(this).eof(fullName + \"$decode\", {\n        Reader : Reader,\n        types  : types,\n        util   : util\n    });\n    this.verify = verifier(this).eof(fullName + \"$verify\", {\n        types : types,\n        util  : util\n    });\n    this.fromObject = this.from = converter.fromObject(this).eof(fullName + \"$fromObject\", {\n        types : types,\n        util  : util\n    });\n    this.toObject = converter.toObject(this).eof(fullName + \"$toObject\", {\n        types : types,\n        util  : util\n    });\n    return this;\n};\n\n/**\n * Encodes a message of this type. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message|Object} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encode = function encode_setup(message, writer) {\n    return this.setup().encode(message, writer); // overrides this method\n};\n\n/**\n * Encodes a message of this type preceeded by its byte length as a varint. Does not implicitly {@link Type#verify|verify} messages.\n * @param {Message|Object} message Message instance or plain object\n * @param {Writer} [writer] Writer to encode to\n * @returns {Writer} writer\n */\nType.prototype.encodeDelimited = function encodeDelimited(message, writer) {\n    return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();\n};\n\n/**\n * Decodes a message of this type.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @param {number} [length] Length of the message, if known beforehand\n * @returns {Message} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decode = function decode_setup(reader, length) {\n    return this.setup().decode(reader, length); // overrides this method\n};\n\n/**\n * Decodes a message of this type preceeded by its byte length as a varint.\n * @param {Reader|Uint8Array} reader Reader or buffer to decode from\n * @returns {Message} Decoded message\n * @throws {Error} If the payload is not a reader or valid buffer\n * @throws {util.ProtocolError} If required fields are missing\n */\nType.prototype.decodeDelimited = function decodeDelimited(reader) {\n    if (!(reader instanceof Reader))\n        reader = Reader.create(reader);\n    return this.decode(reader, reader.uint32());\n};\n\n/**\n * Verifies that field values are valid and that required fields are present.\n * @param {Message|Object} message Message to verify\n * @returns {?string} `null` if valid, otherwise the reason why it is not\n */\nType.prototype.verify = function verify_setup(message) {\n    return this.setup().verify(message); // overrides this method\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * @param {Object.<string,*>} object Plain object\n * @returns {Message} Message instance\n */\nType.prototype.fromObject = function fromObject(object) {\n    return this.setup().fromObject(object);\n};\n\n/**\n * Creates a new message of this type from a plain object. Also converts values to their respective internal types.\n * This is an alias of {@link Type#fromObject}.\n * @function\n * @param {Object.<string,*>} object Plain object\n * @returns {Message} Message instance\n */\nType.prototype.from = Type.prototype.fromObject;\n\n/**\n * Conversion options as used by {@link Type#toObject} and {@link Message.toObject}.\n * @typedef ConversionOptions\n * @type {Object}\n * @property {*} [longs] Long conversion type.\n * Valid values are `String` and `Number` (the global types).\n * Defaults to copy the present value, which is a possibly unsafe number without and a {@link Long} with a long library.\n * @property {*} [enums] Enum value conversion type.\n * Only valid value is `String` (the global type).\n * Defaults to copy the present value, which is the numeric id.\n * @property {*} [bytes] Bytes value conversion type.\n * Valid values are `Array` and (a base64 encoded) `String` (the global types).\n * Defaults to copy the present value, which usually is a Buffer under node and an Uint8Array in the browser.\n * @property {boolean} [defaults=false] Also sets default values on the resulting object\n * @property {boolean} [arrays=false] Sets empty arrays for missing repeated fields even if `defaults=false`\n * @property {boolean} [objects=false] Sets empty objects for missing map fields even if `defaults=false`\n */\n\n/**\n * Creates a plain object from a message of this type. Also converts values to other types if specified.\n * @param {Message} message Message instance\n * @param {ConversionOptions} [options] Conversion options\n * @returns {Object.<string,*>} Plain object\n */\nType.prototype.toObject = function toObject(message, options) {\n    return this.setup().toObject(message, options);\n};\n\n},{\"10\":10,\"12\":12,\"13\":13,\"14\":14,\"15\":15,\"16\":16,\"20\":20,\"21\":21,\"23\":23,\"25\":25,\"27\":27,\"32\":32,\"36\":36,\"39\":39,\"40\":40}],35:[function(require,module,exports){\n\"use strict\";\n\n/**\n * Common type constants.\n * @namespace\n */\nvar types = exports;\n\nvar util = require(36);\n\nvar s = [\n    \"double\",   // 0\n    \"float\",    // 1\n    \"int32\",    // 2\n    \"uint32\",   // 3\n    \"sint32\",   // 4\n    \"fixed32\",  // 5\n    \"sfixed32\", // 6\n    \"int64\",    // 7\n    \"uint64\",   // 8\n    \"sint64\",   // 9\n    \"fixed64\",  // 10\n    \"sfixed64\", // 11\n    \"bool\",     // 12\n    \"string\",   // 13\n    \"bytes\"     // 14\n];\n\nfunction bake(values, offset) {\n    var i = 0, o = {};\n    offset |= 0;\n    while (i < values.length) o[s[i + offset]] = values[i++];\n    return o;\n}\n\n/**\n * Basic type wire types.\n * @type {Object.<string,number>}\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n * @property {number} bytes=2 Ldelim wire type\n */\ntypes.basic = bake([\n    /* double   */ 1,\n    /* float    */ 5,\n    /* int32    */ 0,\n    /* uint32   */ 0,\n    /* sint32   */ 0,\n    /* fixed32  */ 5,\n    /* sfixed32 */ 5,\n    /* int64    */ 0,\n    /* uint64   */ 0,\n    /* sint64   */ 0,\n    /* fixed64  */ 1,\n    /* sfixed64 */ 1,\n    /* bool     */ 0,\n    /* string   */ 2,\n    /* bytes    */ 2\n]);\n\n/**\n * Basic type defaults.\n * @type {Object.<string,*>}\n * @property {number} double=0 Double default\n * @property {number} float=0 Float default\n * @property {number} int32=0 Int32 default\n * @property {number} uint32=0 Uint32 default\n * @property {number} sint32=0 Sint32 default\n * @property {number} fixed32=0 Fixed32 default\n * @property {number} sfixed32=0 Sfixed32 default\n * @property {number} int64=0 Int64 default\n * @property {number} uint64=0 Uint64 default\n * @property {number} sint64=0 Sint32 default\n * @property {number} fixed64=0 Fixed64 default\n * @property {number} sfixed64=0 Sfixed64 default\n * @property {boolean} bool=false Bool default\n * @property {string} string=\"\" String default\n * @property {Array.<number>} bytes=Array(0) Bytes default\n * @property {Message} message=null Message default\n */\ntypes.defaults = bake([\n    /* double   */ 0,\n    /* float    */ 0,\n    /* int32    */ 0,\n    /* uint32   */ 0,\n    /* sint32   */ 0,\n    /* fixed32  */ 0,\n    /* sfixed32 */ 0,\n    /* int64    */ 0,\n    /* uint64   */ 0,\n    /* sint64   */ 0,\n    /* fixed64  */ 0,\n    /* sfixed64 */ 0,\n    /* bool     */ false,\n    /* string   */ \"\",\n    /* bytes    */ util.emptyArray,\n    /* message  */ null\n]);\n\n/**\n * Basic long type wire types.\n * @type {Object.<string,number>}\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n */\ntypes.long = bake([\n    /* int64    */ 0,\n    /* uint64   */ 0,\n    /* sint64   */ 0,\n    /* fixed64  */ 1,\n    /* sfixed64 */ 1\n], 7);\n\n/**\n * Allowed types for map keys with their associated wire type.\n * @type {Object.<string,number>}\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n * @property {number} string=2 Ldelim wire type\n */\ntypes.mapKey = bake([\n    /* int32    */ 0,\n    /* uint32   */ 0,\n    /* sint32   */ 0,\n    /* fixed32  */ 5,\n    /* sfixed32 */ 5,\n    /* int64    */ 0,\n    /* uint64   */ 0,\n    /* sint64   */ 0,\n    /* fixed64  */ 1,\n    /* sfixed64 */ 1,\n    /* bool     */ 0,\n    /* string   */ 2\n], 2);\n\n/**\n * Allowed types for packed repeated fields with their associated wire type.\n * @type {Object.<string,number>}\n * @property {number} double=1 Fixed64 wire type\n * @property {number} float=5 Fixed32 wire type\n * @property {number} int32=0 Varint wire type\n * @property {number} uint32=0 Varint wire type\n * @property {number} sint32=0 Varint wire type\n * @property {number} fixed32=5 Fixed32 wire type\n * @property {number} sfixed32=5 Fixed32 wire type\n * @property {number} int64=0 Varint wire type\n * @property {number} uint64=0 Varint wire type\n * @property {number} sint64=0 Varint wire type\n * @property {number} fixed64=1 Fixed64 wire type\n * @property {number} sfixed64=1 Fixed64 wire type\n * @property {number} bool=0 Varint wire type\n */\ntypes.packed = bake([\n    /* double   */ 1,\n    /* float    */ 5,\n    /* int32    */ 0,\n    /* uint32   */ 0,\n    /* sint32   */ 0,\n    /* fixed32  */ 5,\n    /* sfixed32 */ 5,\n    /* int64    */ 0,\n    /* uint64   */ 0,\n    /* sint64   */ 0,\n    /* fixed64  */ 1,\n    /* sfixed64 */ 1,\n    /* bool     */ 0\n]);\n\n},{\"36\":36}],36:[function(require,module,exports){\n\"use strict\";\n\n/**\n * Various utility functions.\n * @namespace\n */\nvar util = module.exports = require(38);\n\nutil.codegen = require(3);\nutil.fetch   = require(5);\nutil.path    = require(7);\n\n/**\n * Node's fs module if available.\n * @type {Object.<string,*>}\n */\nutil.fs = util.inquire(\"fs\");\n\n/**\n * Converts an object's values to an array.\n * @param {Object.<string,*>} object Object to convert\n * @returns {Array.<*>} Converted array\n */\nutil.toArray = function toArray(object) {\n    var array = [];\n    if (object)\n        for (var keys = Object.keys(object), i = 0; i < keys.length; ++i)\n            array.push(object[keys[i]]);\n    return array;\n};\n\nvar safePropBackslashRe = /\\\\/g,\n    safePropQuoteRe     = /\"/g;\n\n/**\n * Returns a safe property accessor for the specified properly name.\n * @param {string} prop Property name\n * @returns {string} Safe accessor\n */\nutil.safeProp = function safeProp(prop) {\n    return \"[\\\"\" + prop.replace(safePropBackslashRe, \"\\\\\\\\\").replace(safePropQuoteRe, \"\\\\\\\"\") + \"\\\"]\";\n};\n\n/**\n * Converts the first character of a string to upper case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.ucFirst = function ucFirst(str) {\n    return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\n},{\"3\":3,\"38\":38,\"5\":5,\"7\":7}],37:[function(require,module,exports){\n\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(38);\n\n/**\n * Any compatible Long instance.\n *\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @typedef Long\n * @type {Object}\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n    // note that the casts below are theoretically unnecessary as of today, but older statically\n    // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n    /**\n     * Low bits.\n     * @type {number}\n     */\n    this.lo = lo >>> 0;\n\n    /**\n     * High bits.\n     * @type {number}\n     */\n    this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n    if (value === 0)\n        return zero;\n    var sign = value < 0;\n    if (sign)\n        value = -value;\n    var lo = value >>> 0,\n        hi = (value - lo) / 4294967296 >>> 0;\n    if (sign) {\n        hi = ~hi >>> 0;\n        lo = ~lo >>> 0;\n        if (++lo > 4294967295) {\n            lo = 0;\n            if (++hi > 4294967295)\n                hi = 0;\n        }\n    }\n    return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n    if (typeof value === \"number\")\n        return LongBits.fromNumber(value);\n    if (util.isString(value)) {\n        /* istanbul ignore else */\n        if (util.Long)\n            value = util.Long.fromString(value);\n        else\n            return LongBits.fromNumber(parseInt(value, 10));\n    }\n    return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n    if (!unsigned && this.hi >>> 31) {\n        var lo = ~this.lo + 1 >>> 0,\n            hi = ~this.hi     >>> 0;\n        if (!lo)\n            hi = hi + 1 >>> 0;\n        return -(lo + hi * 4294967296);\n    }\n    return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n    return util.Long\n        ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n        /* istanbul ignore next */\n        : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n    if (hash === zeroHash)\n        return zero;\n    return new LongBits(\n        ( charCodeAt.call(hash, 0)\n        | charCodeAt.call(hash, 1) << 8\n        | charCodeAt.call(hash, 2) << 16\n        | charCodeAt.call(hash, 3) << 24) >>> 0\n    ,\n        ( charCodeAt.call(hash, 4)\n        | charCodeAt.call(hash, 5) << 8\n        | charCodeAt.call(hash, 6) << 16\n        | charCodeAt.call(hash, 7) << 24) >>> 0\n    );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n    return String.fromCharCode(\n        this.lo        & 255,\n        this.lo >>> 8  & 255,\n        this.lo >>> 16 & 255,\n        this.lo >>> 24      ,\n        this.hi        & 255,\n        this.hi >>> 8  & 255,\n        this.hi >>> 16 & 255,\n        this.hi >>> 24\n    );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n    var mask =   this.hi >> 31;\n    this.hi  = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n    this.lo  = ( this.lo << 1                   ^ mask) >>> 0;\n    return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n    var mask = -(this.lo & 1);\n    this.lo  = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n    this.hi  = ( this.hi >>> 1                  ^ mask) >>> 0;\n    return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n    var part0 =  this.lo,\n        part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n        part2 =  this.hi >>> 24;\n    return part2 === 0\n         ? part1 === 0\n           ? part0 < 16384\n             ? part0 < 128 ? 1 : 2\n             : part0 < 2097152 ? 3 : 4\n           : part1 < 16384\n             ? part1 < 128 ? 5 : 6\n             : part1 < 2097152 ? 7 : 8\n         : part2 < 128 ? 9 : 10;\n};\n\n},{\"38\":38}],38:[function(require,module,exports){\n\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(1);\n\n// converts to / from base64 encoded strings\nutil.base64 = require(2);\n\n// base class of rpc.Service\nutil.EventEmitter = require(4);\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(6);\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(9);\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(8);\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(37);\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(global.process && global.process.versions && global.process.versions.node);\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n    return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n    return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n    return value && typeof value === \"object\";\n};\n\n/**\n * Node's Buffer class if available.\n * @type {?function(new: Buffer)}\n */\nutil.Buffer = (function() {\n    try {\n        var Buffer = util.inquire(\"buffer\").Buffer;\n        // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n        return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n    } catch (e) {\n        /* istanbul ignore next */\n        return null;\n    }\n})();\n\n/**\n * Internal alias of or polyfull for Buffer.from.\n * @type {?function}\n * @param {string|number[]} value Value\n * @param {string} [encoding] Encoding if value is a string\n * @returns {Uint8Array}\n * @private\n */\nutil._Buffer_from = null;\n\n/**\n * Internal alias of or polyfill for Buffer.allocUnsafe.\n * @type {?function}\n * @param {number} size Buffer size\n * @returns {Uint8Array}\n * @private\n */\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n    /* istanbul ignore next */\n    return typeof sizeOrArray === \"number\"\n        ? util.Buffer\n            ? util._Buffer_allocUnsafe(sizeOrArray)\n            : new util.Array(sizeOrArray)\n        : util.Buffer\n            ? util._Buffer_from(sizeOrArray)\n            : typeof Uint8Array === \"undefined\"\n                ? sizeOrArray\n                : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {?function(new: Uint8Array, *)}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Long.js's Long class if available.\n * @type {?function(new: Long)}\n */\nutil.Long = /* istanbul ignore next */ global.dcodeIO && /* istanbul ignore next */ global.dcodeIO.Long || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n    return value\n        ? util.LongBits.from(value).toHash()\n        : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n    var bits = util.LongBits.fromHash(hash);\n    if (util.Long)\n        return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n    return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.<string,*>} dst Destination object\n * @param {Object.<string,*>} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.<string,*>} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n    for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n        if (dst[keys[i]] === undefined || !ifNotSet)\n            dst[keys[i]] = src[keys[i]];\n    return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n    return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {function} Custom error constructor\n */\nfunction newError(name) {\n\n    function CustomError(message, properties) {\n\n        if (!(this instanceof CustomError))\n            return new CustomError(message, properties);\n\n        // Error.call(this, message);\n        // ^ just returns a new error instance because the ctor can be called as a function\n\n        Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n        /* istanbul ignore next */\n        if (Error.captureStackTrace) // node\n            Error.captureStackTrace(this, CustomError);\n        else\n            Object.defineProperty(this, \"stack\", { value: (new Error()).stack || \"\" });\n\n        if (properties)\n            merge(this, properties);\n    }\n\n    (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;\n\n    Object.defineProperty(CustomError.prototype, \"name\", { get: function() { return name; } });\n\n    CustomError.prototype.toString = function toString() {\n        return this.name + \": \" + this.message;\n    };\n\n    return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @constructor\n * @param {string} message Error message\n * @param {Object.<string,*>=} properties Additional properties\n * @example\n * try {\n *     MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n *     if (e instanceof ProtocolError && e.instance)\n *         console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {function():string|undefined} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n    var fieldMap = {};\n    for (var i = 0; i < fieldNames.length; ++i)\n        fieldMap[fieldNames[i]] = 1;\n\n    /**\n     * @returns {string|undefined} Set field name, if any\n     * @this Object\n     * @ignore\n     */\n    return function() { // eslint-disable-line consistent-return\n        for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n            if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n                return keys[i];\n    };\n};\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {function(?string):undefined} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n    /**\n     * @param {string} name Field name\n     * @returns {undefined}\n     * @this Object\n     * @ignore\n     */\n    return function(name) {\n        for (var i = 0; i < fieldNames.length; ++i)\n            if (fieldNames[i] !== name)\n                delete this[fieldNames[i]];\n    };\n};\n\n/**\n * Lazily resolves fully qualified type names against the specified root.\n * @param {Root} root Root instanceof\n * @param {Object.<number,string|ReflectionObject>} lazyTypes Type names\n * @returns {undefined}\n */\nutil.lazyResolve = function lazyResolve(root, lazyTypes) {\n    for (var i = 0; i < lazyTypes.length; ++i) {\n        for (var keys = Object.keys(lazyTypes[i]), j = 0; j < keys.length; ++j) {\n            var path = lazyTypes[i][keys[j]].split(\".\"),\n                ptr  = root;\n            while (path.length)\n                ptr = ptr[path.shift()];\n            lazyTypes[i][keys[j]] = ptr;\n        }\n    }\n};\n\n/**\n * Default conversion options used for toJSON implementations. Converts longs, enums and bytes to strings.\n * @type {ConversionOptions}\n */\nutil.toJSONOptions = {\n    longs: String,\n    enums: String,\n    bytes: String\n};\n\nutil._configure = function() {\n    var Buffer = util.Buffer;\n    /* istanbul ignore if */\n    if (!Buffer) {\n        util._Buffer_from = util._Buffer_allocUnsafe = null;\n        return;\n    }\n    // because node 4.x buffers are incompatible & immutable\n    // see: https://github.com/dcodeIO/protobuf.js/pull/665\n    util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n        /* istanbul ignore next */\n        function Buffer_from(value, encoding) {\n            return new Buffer(value, encoding);\n        };\n    util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n        /* istanbul ignore next */\n        function Buffer_allocUnsafe(size) {\n            return new Buffer(size);\n        };\n};\n\n},{\"1\":1,\"2\":2,\"37\":37,\"4\":4,\"6\":6,\"8\":8,\"9\":9}],39:[function(require,module,exports){\n\"use strict\";\nmodule.exports = verifier;\n\nvar Enum      = require(15),\n    util      = require(36);\n\nfunction invalid(field, expected) {\n    return field.name + \": \" + expected + (field.repeated && expected !== \"array\" ? \"[]\" : field.map && expected !== \"object\" ? \"{k:\"+field.keyType+\"}\" : \"\") + \" expected\";\n}\n\n/**\n * Generates a partial value verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {number} fieldIndex Field index\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyValue(gen, field, fieldIndex, ref) {\n    /* eslint-disable no-unexpected-multiline */\n    if (field.resolvedType) {\n        if (field.resolvedType instanceof Enum) { gen\n            (\"switch(%s){\", ref)\n                (\"default:\")\n                    (\"return%j\", invalid(field, \"enum value\"));\n            for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen\n                (\"case %d:\", field.resolvedType.values[keys[j]]);\n            gen\n                    (\"break\")\n            (\"}\");\n        } else gen\n            (\"var e=types[%d].verify(%s);\", fieldIndex, ref)\n            (\"if(e)\")\n                (\"return%j+e\", field.name + \".\");\n    } else {\n        switch (field.type) {\n            case \"int32\":\n            case \"uint32\":\n            case \"sint32\":\n            case \"fixed32\":\n            case \"sfixed32\": gen\n                (\"if(!util.isInteger(%s))\", ref)\n                    (\"return%j\", invalid(field, \"integer\"));\n                break;\n            case \"int64\":\n            case \"uint64\":\n            case \"sint64\":\n            case \"fixed64\":\n            case \"sfixed64\": gen\n                (\"if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))\", ref, ref, ref, ref)\n                    (\"return%j\", invalid(field, \"integer|Long\"));\n                break;\n            case \"float\":\n            case \"double\": gen\n                (\"if(typeof %s!==\\\"number\\\")\", ref)\n                    (\"return%j\", invalid(field, \"number\"));\n                break;\n            case \"bool\": gen\n                (\"if(typeof %s!==\\\"boolean\\\")\", ref)\n                    (\"return%j\", invalid(field, \"boolean\"));\n                break;\n            case \"string\": gen\n                (\"if(!util.isString(%s))\", ref)\n                    (\"return%j\", invalid(field, \"string\"));\n                break;\n            case \"bytes\": gen\n                (\"if(!(%s&&typeof %s.length===\\\"number\\\"||util.isString(%s)))\", ref, ref, ref)\n                    (\"return%j\", invalid(field, \"buffer\"));\n                break;\n        }\n    }\n    return gen;\n    /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a partial key verifier.\n * @param {Codegen} gen Codegen instance\n * @param {Field} field Reflected field\n * @param {string} ref Variable reference\n * @returns {Codegen} Codegen instance\n * @ignore\n */\nfunction genVerifyKey(gen, field, ref) {\n    /* eslint-disable no-unexpected-multiline */\n    switch (field.keyType) {\n        case \"int32\":\n        case \"uint32\":\n        case \"sint32\":\n        case \"fixed32\":\n        case \"sfixed32\": gen\n            (\"if(!util.key32Re.test(%s))\", ref)\n                (\"return%j\", invalid(field, \"integer key\"));\n            break;\n        case \"int64\":\n        case \"uint64\":\n        case \"sint64\":\n        case \"fixed64\":\n        case \"sfixed64\": gen\n            (\"if(!util.key64Re.test(%s))\", ref) // see comment above: x is ok, d is not\n                (\"return%j\", invalid(field, \"integer|Long key\"));\n            break;\n        case \"bool\": gen\n            (\"if(!util.key2Re.test(%s))\", ref)\n                (\"return%j\", invalid(field, \"boolean key\"));\n            break;\n    }\n    return gen;\n    /* eslint-enable no-unexpected-multiline */\n}\n\n/**\n * Generates a verifier specific to the specified message type.\n * @param {Type} mtype Message type\n * @returns {Codegen} Codegen instance\n */\nfunction verifier(mtype) {\n    /* eslint-disable no-unexpected-multiline */\n\n    var gen = util.codegen(\"m\")\n    (\"if(typeof m!==\\\"object\\\"||m===null)\")\n        (\"return%j\", \"object expected\");\n\n    for (var i = 0; i < /* initializes */ mtype.fieldsArray.length; ++i) {\n        var field = mtype._fieldsArray[i].resolve(),\n            ref   = \"m\" + util.safeProp(field.name);\n\n        // map fields\n        if (field.map) { gen\n            (\"if(%s!==undefined){\", ref)\n                (\"if(!util.isObject(%s))\", ref)\n                    (\"return%j\", invalid(field, \"object\"))\n                (\"var k=Object.keys(%s)\", ref)\n                (\"for(var i=0;i<k.length;++i){\");\n                    genVerifyKey(gen, field, \"k[i]\");\n                    genVerifyValue(gen, field, i, ref + \"[k[i]]\")\n                (\"}\")\n            (\"}\");\n\n        // repeated fields\n        } else if (field.repeated) { gen\n            (\"if(%s!==undefined){\", ref)\n                (\"if(!Array.isArray(%s))\", ref)\n                    (\"return%j\", invalid(field, \"array\"))\n                (\"for(var i=0;i<%s.length;++i){\", ref);\n                    genVerifyValue(gen, field, i, ref + \"[i]\")\n                (\"}\")\n            (\"}\");\n\n        // required or present fields\n        } else {\n            if (!field.required) {\n                if (field.resolvedType && !(field.resolvedType instanceof Enum)) gen\n            (\"if(%s!==undefined&&%s!==null){\", ref, ref);\n                else gen\n            (\"if(%s!==undefined){\", ref);\n            }\n                genVerifyValue(gen, field, i, ref);\n            if (!field.required) gen\n            (\"}\");\n        }\n    } return gen\n    (\"return null\");\n    /* eslint-enable no-unexpected-multiline */\n}\n},{\"15\":15,\"36\":36}],40:[function(require,module,exports){\n\"use strict\";\nmodule.exports = Writer;\n\nvar util      = require(38);\n\nvar BufferWriter; // cyclic\n\nvar LongBits  = util.LongBits,\n    base64    = util.base64,\n    utf8      = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n    /**\n     * Function to call.\n     * @type {function(Uint8Array, number, *)}\n     */\n    this.fn = fn;\n\n    /**\n     * Value byte length.\n     * @type {number}\n     */\n    this.len = len;\n\n    /**\n     * Next operation.\n     * @type {Writer.Op|undefined}\n     */\n    this.next = undefined;\n\n    /**\n     * Value to write.\n     * @type {*}\n     */\n    this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @private\n * @ignore\n */\nfunction State(writer) {\n\n    /**\n     * Current head.\n     * @type {Writer.Op}\n     */\n    this.head = writer.head;\n\n    /**\n     * Current tail.\n     * @type {Writer.Op}\n     */\n    this.tail = writer.tail;\n\n    /**\n     * Current buffer length.\n     * @type {number}\n     */\n    this.len = writer.len;\n\n    /**\n     * Next state.\n     * @type {?State}\n     */\n    this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n    /**\n     * Current length.\n     * @type {number}\n     */\n    this.len = 0;\n\n    /**\n     * Operations head.\n     * @type {Object}\n     */\n    this.head = new Op(noop, 0, 0);\n\n    /**\n     * Operations tail\n     * @type {Object}\n     */\n    this.tail = this.head;\n\n    /**\n     * Linked forked states.\n     * @type {?Object}\n     */\n    this.states = null;\n\n    // When a value is written, the writer calculates its byte length and puts it into a linked\n    // list of operations to perform when finish() is called. This both allows us to allocate\n    // buffers of the exact required size and reduces the amount of work we have to do compared\n    // to first calculating over objects and then encoding over objects. In our case, the encoding\n    // part is just a linked list walk calling operations with already prepared values.\n}\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = util.Buffer\n    ? function create_buffer_setup() {\n        return (Writer.create = function create_buffer() {\n            return new BufferWriter();\n        })();\n    }\n    /* istanbul ignore next */\n    : function create_array() {\n        return new Writer();\n    };\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n    return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n    Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.push = function push(fn, len, val) {\n    this.tail = this.tail.next = new Op(fn, len, val);\n    this.len += len;\n    return this;\n};\n\nfunction writeByte(val, buf, pos) {\n    buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n    while (val > 127) {\n        buf[pos++] = val & 127 | 128;\n        val >>>= 7;\n    }\n    buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n    this.len = len;\n    this.next = undefined;\n    this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n    // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n    // uint32 is by far the most frequently used operation and benefits significantly from this.\n    this.len += (this.tail = this.tail.next = new VarintOp(\n        (value = value >>> 0)\n                < 128       ? 1\n        : value < 16384     ? 2\n        : value < 2097152   ? 3\n        : value < 268435456 ? 4\n        :                     5,\n    value)).len;\n    return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n    return value < 0\n        ? this.push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n        : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n    return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n    while (val.hi) {\n        buf[pos++] = val.lo & 127 | 128;\n        val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n        val.hi >>>= 7;\n    }\n    while (val.lo > 127) {\n        buf[pos++] = val.lo & 127 | 128;\n        val.lo = val.lo >>> 7;\n    }\n    buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n    var bits = LongBits.from(value);\n    return this.push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n    var bits = LongBits.from(value).zzEncode();\n    return this.push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n    return this.push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n    buf[pos++] =  val         & 255;\n    buf[pos++] =  val >>> 8   & 255;\n    buf[pos++] =  val >>> 16  & 255;\n    buf[pos  ] =  val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n    return this.push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n    var bits = LongBits.from(value);\n    return this.push(writeFixed32, 4, bits.lo).push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\nvar writeFloat = typeof Float32Array !== \"undefined\"\n    ? (function() {\n        var f32 = new Float32Array(1),\n            f8b = new Uint8Array(f32.buffer);\n        f32[0] = -0;\n        return f8b[3] // already le?\n            ? function writeFloat_f32(val, buf, pos) {\n                f32[0] = val;\n                buf[pos++] = f8b[0];\n                buf[pos++] = f8b[1];\n                buf[pos++] = f8b[2];\n                buf[pos  ] = f8b[3];\n            }\n            /* istanbul ignore next */\n            : function writeFloat_f32_le(val, buf, pos) {\n                f32[0] = val;\n                buf[pos++] = f8b[3];\n                buf[pos++] = f8b[2];\n                buf[pos++] = f8b[1];\n                buf[pos  ] = f8b[0];\n            };\n    })()\n    /* istanbul ignore next */\n    : function writeFloat_ieee754(value, buf, pos) {\n        var sign = value < 0 ? 1 : 0;\n        if (sign)\n            value = -value;\n        if (value === 0)\n            writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\n        else if (isNaN(value))\n            writeFixed32(2147483647, buf, pos);\n        else if (value > 3.4028234663852886e+38) // +-Infinity\n            writeFixed32((sign << 31 | 2139095040) >>> 0, buf, pos);\n        else if (value < 1.1754943508222875e-38) // denormal\n            writeFixed32((sign << 31 | Math.round(value / 1.401298464324817e-45)) >>> 0, buf, pos);\n        else {\n            var exponent = Math.floor(Math.log(value) / Math.LN2),\n                mantissa = Math.round(value * Math.pow(2, -exponent) * 8388608) & 8388607;\n            writeFixed32((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\n        }\n    };\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n    return this.push(writeFloat, 4, value);\n};\n\nvar writeDouble = typeof Float64Array !== \"undefined\"\n    ? (function() {\n        var f64 = new Float64Array(1),\n            f8b = new Uint8Array(f64.buffer);\n        f64[0] = -0;\n        return f8b[7] // already le?\n            ? function writeDouble_f64(val, buf, pos) {\n                f64[0] = val;\n                buf[pos++] = f8b[0];\n                buf[pos++] = f8b[1];\n                buf[pos++] = f8b[2];\n                buf[pos++] = f8b[3];\n                buf[pos++] = f8b[4];\n                buf[pos++] = f8b[5];\n                buf[pos++] = f8b[6];\n                buf[pos  ] = f8b[7];\n            }\n            /* istanbul ignore next */\n            : function writeDouble_f64_le(val, buf, pos) {\n                f64[0] = val;\n                buf[pos++] = f8b[7];\n                buf[pos++] = f8b[6];\n                buf[pos++] = f8b[5];\n                buf[pos++] = f8b[4];\n                buf[pos++] = f8b[3];\n                buf[pos++] = f8b[2];\n                buf[pos++] = f8b[1];\n                buf[pos  ] = f8b[0];\n            };\n    })()\n    /* istanbul ignore next */\n    : function writeDouble_ieee754(value, buf, pos) {\n        var sign = value < 0 ? 1 : 0;\n        if (sign)\n            value = -value;\n        if (value === 0) {\n            writeFixed32(0, buf, pos);\n            writeFixed32(1 / value > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + 4);\n        } else if (isNaN(value)) {\n            writeFixed32(4294967295, buf, pos);\n            writeFixed32(2147483647, buf, pos + 4);\n        } else if (value > 1.7976931348623157e+308) { // +-Infinity\n            writeFixed32(0, buf, pos);\n            writeFixed32((sign << 31 | 2146435072) >>> 0, buf, pos + 4);\n        } else {\n            var mantissa;\n            if (value < 2.2250738585072014e-308) { // denormal\n                mantissa = value / 5e-324;\n                writeFixed32(mantissa >>> 0, buf, pos);\n                writeFixed32((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + 4);\n            } else {\n                var exponent = Math.floor(Math.log(value) / Math.LN2);\n                if (exponent === 1024)\n                    exponent = 1023;\n                mantissa = value * Math.pow(2, -exponent);\n                writeFixed32(mantissa * 4503599627370496 >>> 0, buf, pos);\n                writeFixed32((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + 4);\n            }\n        }\n    };\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n    return this.push(writeDouble, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n    ? function writeBytes_set(val, buf, pos) {\n        buf.set(val, pos); // also works for plain array values\n    }\n    /* istanbul ignore next */\n    : function writeBytes_for(val, buf, pos) {\n        for (var i = 0; i < val.length; ++i)\n            buf[pos + i] = val[i];\n    };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n    var len = value.length >>> 0;\n    if (!len)\n        return this.push(writeByte, 1, 0);\n    if (util.isString(value)) {\n        var buf = Writer.alloc(len = base64.length(value));\n        base64.decode(value, buf, 0);\n        value = buf;\n    }\n    return this.uint32(len).push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n    var len = utf8.length(value);\n    return len\n        ? this.uint32(len).push(utf8.write, len, value)\n        : this.push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n    this.states = new State(this);\n    this.head = this.tail = new Op(noop, 0, 0);\n    this.len = 0;\n    return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n    if (this.states) {\n        this.head   = this.states.head;\n        this.tail   = this.states.tail;\n        this.len    = this.states.len;\n        this.states = this.states.next;\n    } else {\n        this.head = this.tail = new Op(noop, 0, 0);\n        this.len  = 0;\n    }\n    return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n    var head = this.head,\n        tail = this.tail,\n        len  = this.len;\n    this.reset().uint32(len);\n    if (len) {\n        this.tail.next = head.next; // skip noop\n        this.tail = tail;\n        this.len += len;\n    }\n    return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n    var head = this.head.next, // skip noop\n        buf  = this.constructor.alloc(this.len),\n        pos  = 0;\n    while (head) {\n        head.fn(head.val, buf, pos);\n        pos += head.len;\n        head = head.next;\n    }\n    // this.head = this.tail = null;\n    return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n    BufferWriter = BufferWriter_;\n};\n\n},{\"38\":38}],41:[function(require,module,exports){\n\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(40);\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(38);\n\nvar Buffer = util.Buffer;\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n    Writer.call(this);\n}\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\nBufferWriter.alloc = function alloc_buffer(size) {\n    return (BufferWriter.alloc = util._Buffer_allocUnsafe)(size);\n};\n\nvar writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name === \"set\"\n    ? function writeBytesBuffer_set(val, buf, pos) {\n        buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n                           // also works for plain array values\n    }\n    /* istanbul ignore next */\n    : function writeBytesBuffer_copy(val, buf, pos) {\n        if (val.copy) // Buffer values\n            val.copy(buf, pos, 0, val.length);\n        else for (var i = 0; i < val.length;) // plain array values\n            buf[pos++] = val[i++];\n    };\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n    if (util.isString(value))\n        value = util._Buffer_from(value, \"base64\");\n    var len = value.length >>> 0;\n    this.uint32(len);\n    if (len)\n        this.push(writeBytesBuffer, len, value);\n    return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n    if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n        util.utf8.write(val, buf, pos);\n    else\n        buf.utf8Write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n    var len = Buffer.byteLength(value);\n    this.uint32(len);\n    if (len)\n        this.push(writeStringBuffer, len, value);\n    return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\n},{\"38\":38,\"40\":40}]},{},[19])\n\n})(typeof window===\"object\"&&window||typeof self===\"object\"&&self||this);\n//# sourceMappingURL=protobuf.js.map\n"
  },
  {
    "path": "public/libs/laya/worker.js",
    "content": "function testCanImageData(){try{cc=new ImageData(20,20),canUseImageData=!0}catch(t){}}function loadImage(t){PNG.load(t.url,pngLoaded)}function loadImage2(t){var e,a=t.url;e=new XMLHttpRequest,e.open(\"GET\",a,!0),e.responseType=\"arraybuffer\",e.onload=function(){var t,i,r=e.response||e.mozResponseArrayBuffer;if(t=new Uint8Array(r),self.createImageBitmap)return void doCreateImageBitmap(t,a);try{startTime=getTimeNow(),i=new PNG(t),i.url=a,i.startTime=startTime,i.decodeEndTime=getTimeNow(),i.decodeTime=i.decodeEndTime-startTime,pngLoaded(i)}catch(s){pngFail(a,\"parse fail\"+s.toString()+\":ya\")}},e.onerror=function(t){pngFail(a,\"loadFail\")},e.send(null)}function doCreateImageBitmap(t,e){try{var a=getTimeNow();t=new self.Blob([t],{type:\"image/png\"}),self.createImageBitmap(t).then(function(t){var i={};i.url=e,i.imageBitmap=t,i.dataType=\"imageBitmap\",i.startTime=a,i.decodeTime=getTimeNow()-a,i.sendTime=getTimeNow(),console.log(\"Decode By createImageBitmap,\"+i.decodeTime,e),i.type=\"Image\",postMessage(i,[i.imageBitmap])})[\"catch\"](function(t){showMsgToMain(\"cache:\"+t),pngFail(e,\"parse fail\"+t+\":ya\")})}catch(i){pngFail(e,\"parse fail\"+i.toString()+\":ya\")}}function getTimeNow(){return(new Date).getTime()}function pngFail(t,e){var a={};a.url=t,a.imagedata=null,a.type=\"Image\",a.msg=e,console.log(e),postMessage(a)}function showMsgToMain(t){var e={};e.type=\"Msg\",e.msg=t,postMessage(e)}function pngLoaded(t){var e={};e.url=t.url,canUseImageData?(e.imagedata=t.getImageData(),e.dataType=\"imagedata\"):(e.buffer=t.getImageDataBuffer(),e.dataType=\"buffer\"),e.width=t.width,e.height=t.height,e.decodeTime=getTimeNow()-t.startTime,console.log(\"Decode By PNG.js,\"+(getTimeNow()-t.startTime),t.url),e.type=\"Image\",canUseImageData?postMessage(e,[e.imagedata.data.buffer]):postMessage(e,[e.buffer.buffer])}var DecodeStream=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(t){var e=this.buffer,a=e?e.byteLength:0;if(a>t)return e;for(var i=512;t>i;)i<<=1;for(var r=new Uint8Array(i),s=0;a>s;++s)r[s]=e[s];return this.buffer=r},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var a=e+t;!this.eof&&this.bufferLength<a;)this.readBlock();var i=this.bufferLength;a>i&&(a=i)}else{for(;!this.eof;)this.readBlock();var a=this.bufferLength}return this.pos=a,this.buffer.subarray(e,a)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,a){for(var i=t+e;this.bufferLength<=i&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,a)},skip:function(t){t||(t=1),this.pos+=t},reset:function(){this.pos=0}},t}(),FlateStream=function(){function t(t){throw new Error(t)}function e(e){var a=0,i=e[a++],r=e[a++];-1!=i&&-1!=r||t(\"Invalid header in flate stream\"),8!=(15&i)&&t(\"Unknown compression method in flate stream\"),((i<<8)+r)%31!=0&&t(\"Bad FCHECK in flate stream\"),32&r&&t(\"FDICT bit set in flate stream\"),this.bytes=e,this.bytesPos=a,this.codeSize=0,this.codeBuf=0,DecodeStream.call(this)}var a=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),i=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),s=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],n=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];return e.prototype=Object.create(DecodeStream.prototype),e.prototype.getBits=function(e){for(var a,i=this.codeSize,r=this.codeBuf,s=this.bytes,n=this.bytesPos;e>i;)\"undefined\"==typeof(a=s[n++])&&t(\"Bad encoding in flate stream\"),r|=a<<i,i+=8;return a=r&(1<<e)-1,this.codeBuf=r>>e,this.codeSize=i-=e,this.bytesPos=n,a},e.prototype.getCode=function(e){for(var a=e[0],i=e[1],r=this.codeSize,s=this.codeBuf,n=this.bytes,o=this.bytesPos;i>r;){var h;\"undefined\"==typeof(h=n[o++])&&t(\"Bad encoding in flate stream\"),s|=h<<r,r+=8}var f=a[s&(1<<i)-1],d=f>>16,c=65535&f;return(0==r||d>r||0==d)&&t(\"Bad encoding in flate stream\"),this.codeBuf=s>>d,this.codeSize=r-d,this.bytesPos=o,c},e.prototype.generateHuffmanTable=function(t){for(var e=t.length,a=0,i=0;e>i;++i)t[i]>a&&(a=t[i]);for(var r=1<<a,s=new Uint32Array(r),n=1,o=0,h=2;a>=n;++n,o<<=1,h<<=1)for(var f=0;e>f;++f)if(t[f]==n){for(var d=0,c=o,i=0;n>i;++i)d=d<<1|1&c,c>>=1;for(var i=d;r>i;i+=h)s[i]=n<<16|f;++o}return[s,a]},e.prototype.readBlock=function(){function e(t,e,a,i,r){for(var s=t.getBits(a)+i;s-- >0;)e[I++]=r}var o=this.getBits(3);if(1&o&&(this.eof=!0),o>>=1,0==o){var h,f=this.bytes,d=this.bytesPos;\"undefined\"==typeof(h=f[d++])&&t(\"Bad block header in flate stream\");var c=h;\"undefined\"==typeof(h=f[d++])&&t(\"Bad block header in flate stream\"),c|=h<<8,\"undefined\"==typeof(h=f[d++])&&t(\"Bad block header in flate stream\");var l=h;\"undefined\"==typeof(h=f[d++])&&t(\"Bad block header in flate stream\"),l|=h<<8,l!=(65535&~c)&&t(\"Bad uncompressed block length in flate stream\"),this.codeBuf=0,this.codeSize=0;var u=this.bufferLength,p=this.ensureBuffer(u+c),g=u+c;this.bufferLength=g;for(var m=u;g>m;++m){if(\"undefined\"==typeof(h=f[d++])){this.eof=!0;break}p[m]=h}return void(this.bytesPos=d)}var y,v;if(1==o)y=s,v=n;else if(2==o){for(var b=this.getBits(5)+257,w=this.getBits(5)+1,B=this.getBits(4)+4,T=Array(a.length),I=0;B>I;)T[a[I++]]=this.getBits(3);for(var U=this.generateHuffmanTable(T),D=0,I=0,k=b+w,A=new Array(k);k>I;){var C=this.getCode(U);16==C?e(this,A,2,3,D):17==C?e(this,A,3,3,D=0):18==C?e(this,A,7,11,D=0):A[I++]=D=C}y=this.generateHuffmanTable(A.slice(0,b)),v=this.generateHuffmanTable(A.slice(b,k))}else t(\"Unknown block type in flate stream\");for(var p=this.buffer,S=p?p.length:0,P=this.bufferLength;;){var M=this.getCode(y);if(256>M)P+1>=S&&(p=this.ensureBuffer(P+1),S=p.length),p[P++]=M;else{if(256==M)return void(this.bufferLength=P);M-=257,M=i[M];var L=M>>16;L>0&&(L=this.getBits(L));var D=(65535&M)+L;M=this.getCode(v),M=r[M],L=M>>16,L>0&&(L=this.getBits(L));var x=(65535&M)+L;P+D>=S&&(p=this.ensureBuffer(P+D),S=p.length);for(var N=0;D>N;++N,++P)p[P]=p[P-x]}}},e}();(function(){var t;t=function(){function t(t){var e,a,i,r,s,n,o,h,f,d,c,l,u,p;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},s=null;;){switch(e=this.readUInt32(),f=function(){var t,e;for(e=[],n=t=0;4>t;n=++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join(\"\")){case\"IHDR\":if(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++],0!=this.interlaceMethod)throw new Error(\"Invalid interlaceMethod: \"+this.interlaceMethod);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\":s&&this.animation.frames.push(s),this.pos+=4,s={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},r=this.readUInt16(),i=this.readUInt16()||100,s.delay=1e3*r/i,s.disposeOp=this.data[this.pos++],s.blendOp=this.data[this.pos++],s.data=[];break;case\"IDAT\":case\"fdAT\":for(\"fdAT\"===f&&(this.pos+=4,e-=4),t=(null!=s?s.data:void 0)||this.imgData,n=l=0;e>=0?e>l:l>e;n=e>=0?++l:--l)t.push(this.data[this.pos++]);break;case\"tRNS\":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),d=255-this.transparency.indexed.length,d>0)for(n=u=0;d>=0?d>u:u>d;n=d>=0?++u:--u)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\":c=this.read(e),o=c.indexOf(0),h=String.fromCharCode.apply(String,c.slice(0,o)),this.text[h]=String.fromCharCode.apply(String,c.slice(o+1));break;case\"IEND\":return s&&this.animation.frames.push(s),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===(p=this.colorType)||6===p,a=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*a,this.colorSpace=function(){switch(this.colors){case 1:return\"DeviceGray\";case 3:return\"DeviceRGB\"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error(\"Incomplete or corrupt PNG file\")}}var e,a,i,r,s,n;return t.load=function(e,a){var i;return\"function\"==typeof canvas&&(a=canvas),i=new XMLHttpRequest,i.open(\"GET\",e,!0),i.responseType=\"arraybuffer\",i.onload=function(){var r,s;return r=new Uint8Array(i.response||i.mozResponseArrayBuffer),s=new t(r),s.url=e,\"function\"==typeof a?a(s):void 0},i.send(null)},r=0,i=1,s=2,a=0,e=1,t.prototype.read=function(t){var e,a,i;for(i=[],e=a=0;t>=0?t>a:a>t;e=t>=0?++a:--a)i.push(this.data[this.pos++]);return i},t.prototype.readUInt32=function(){var t,e,a,i;return t=this.data[this.pos++]<<24,e=this.data[this.pos++]<<16,a=this.data[this.pos++]<<8,i=this.data[this.pos++],t|e|a|i},t.prototype.readUInt16=function(){var t,e;return t=this.data[this.pos++]<<8,e=this.data[this.pos++],t|e},t.prototype.decodePixels=function(t){var e,a,i,r,s,n,o,h,f,d,c,l,u,p,g,m,y,v,b,w,B,T,I;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=new FlateStream(t),t=t.getBytes(),l=this.pixelBitlength/8,m=l*this.width,u=new Uint8Array(m*this.height),n=t.length,g=0,p=0,a=0;n>p;){switch(t[p++]){case 0:for(r=b=0;m>b;r=b+=1)u[a++]=t[p++];break;case 1:for(r=w=0;m>w;r=w+=1)e=t[p++],s=l>r?0:u[a-l],u[a++]=(e+s)%256;break;case 2:for(r=B=0;m>B;r=B+=1)e=t[p++],i=(r-r%l)/l,y=g&&u[(g-1)*m+i*l+r%l],u[a++]=(y+e)%256;break;case 3:for(r=T=0;m>T;r=T+=1)e=t[p++],i=(r-r%l)/l,s=l>r?0:u[a-l],y=g&&u[(g-1)*m+i*l+r%l],u[a++]=(e+Math.floor((s+y)/2))%256;break;case 4:for(r=I=0;m>I;r=I+=1)e=t[p++],i=(r-r%l)/l,s=l>r?0:u[a-l],0===g?y=v=0:(y=u[(g-1)*m+i*l+r%l],v=i&&u[(g-1)*m+(i-1)*l+r%l]),o=s+y-v,h=Math.abs(o-s),d=Math.abs(o-y),c=Math.abs(o-v),f=d>=h&&c>=h?s:c>=d?y:v,u[a++]=(e+f)%256;break;default:throw new Error(\"Invalid filter algorithm: \"+t[p-1])}g++}return u},t.prototype.decodePalette=function(){var t,e,a,i,r,s,n,o,h,f;i=this.palette,n=this.transparency.indexed||[];var d;for(d=4*i.length/3,s=new Uint8Array(d),r=0,a=i.length,t=0,e=o=0,h=i.length;h>o;e=o+=3)s[r++]=i[e],s[r++]=i[e+1],s[r++]=i[e+2],s[r++]=null!=(f=n[t++])?f:255;return s},t.prototype.getImageData=function(){var t=new self.ImageData(this.width,this.height);return this.copyToImageData(t,this.decodePixels()),t},t.prototype.getImageDataBuffer=function(){var t;return t=self.Uint8ClampedArray?new self.Uint8ClampedArray(this.width*this.height*4):new self.Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},t.prototype.copyToImageData=function(t,e){var a,i,r,s,n,o,h,f,d,c,l;if(i=this.colors,d=null,a=this.hasAlphaChannel,this.palette.length&&(d=null!=(l=this._decodedPalette)?l:this._decodedPalette=this.decodePalette(),i=4,a=!0),r=t.data||t,f=r.length,n=d||e,s=o=0,1===i)for(;f>s;)h=d?4*e[s/4]:o,c=n[h++],r[s++]=c,r[s++]=c,r[s++]=c,r[s++]=a?n[h++]:255,o=h;else for(;f>s;)h=d?4*e[s/4]:o,r[s++]=n[h++],r[s++]=n[h++],r[s++]=n[h++],r[s++]=a?n[h++]:255,o=h},t.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},t.prototype.decodeFrames=function(t){var e,a,i,r,s,o,h,f;if(this.animation){for(h=this.animation.frames,f=[],a=s=0,o=h.length;o>s;a=++s)e=h[a],i=t.createImageData(e.width,e.height),r=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(i,r),e.imageData=i,f.push(e.image=n(i));return f}},t}(),this.PNG=t}).call(this),onmessage=function(t){var e=t.data;switch(e.type){case\"load\":loadImage2(e)}};var canUseImageData=!1;testCanImageData();"
  },
  {
    "path": "public/particle/fly.part",
    "content": "{\"textureName\":\"images/texture/texture_1.png\",\"positionVariance\":{\"0\":0,\"1\":0,\"2\":0},\"minVerticalVelocity\":-100,\"minVerticalEndRadian\":0,\"minStartSize\":0,\"minStartRadius\":0,\"minRotateSpeed\":0,\"minHorizontalVelocity\":100,\"minHorizontalEndRadian\":0,\"minEndSize\":18.55,\"minEndRadius\":218.75,\"minColor\":{\"0\":0.15,\"1\":0.92,\"2\":0.91,\"3\":0.6000000238418579},\"maxVerticalVelocity\":100,\"maxVerticalEndRadian\":0,\"maxStartSize\":2.04,\"maxStartRadius\":0,\"maxRotateSpeed\":0,\"maxPartices\":400,\"maxHorizontalVelocity\":100,\"maxHorizontalEndRadian\":0,\"maxEndSize\":24.35,\"maxEndRadius\":84.82,\"maxColor\":{\"0\":0.57,\"1\":1,\"2\":0,\"3\":1},\"gravity\":{\"0\":0,\"1\":0,\"2\":0},\"endVelocity\":2,\"emitterVelocitySensitivity\":56.89,\"duration\":9.52,\"colorComponentInter\":true,\"blendState\":0,\"ageAddScale\":10,\"backColor\":\"#ffffff\",\"textureFileName\":\"comp\\\\clip_num.png\",\"textureCount\":1,\"minHorizontalStartRadian\":0,\"maxHorizontalStartRadian\":0,\"minVerticalStartRadian\":0,\"maxVerticalStartRadian\":0,\"emitterType\":\"null\",\"emissionRate\":0,\"sphereEmitterRadius\":1,\"sphereEmitterVelocity\":0,\"sphereEmitterVelocityAddVariance\":0,\"ringEmitterRadius\":30,\"ringEmitterVelocity\":0,\"ringEmitterVelocityAddVariance\":0,\"ringEmitterUp\":2,\"minStartColor\":{\"0\":0.5,\"1\":0.5,\"2\":0.5,\"3\":0.2},\"maxStartColor\":{\"0\":1,\"1\":1,\"2\":1,\"3\":1},\"minEndColor\":{\"0\":0,\"1\":0,\"2\":0,\"3\":0.08},\"maxEndColor\":{\"0\":1,\"1\":1,\"2\":1,\"3\":1},\"pointEmitterPosition\":{\"0\":0,\"1\":0,\"2\":0},\"pointEmitterPositionVariance\":{\"0\":0,\"1\":0,\"2\":0},\"pointEmitterVelocity\":{\"0\":0,\"1\":0,\"2\":0},\"pointEmitterVelocityAddVariance\":{\"0\":0,\"1\":0,\"2\":0},\"boxEmitterCenterPosition\":{\"0\":0,\"1\":0,\"2\":0},\"boxEmitterSize\":{\"0\":0,\"1\":0,\"2\":0},\"boxEmitterVelocity\":{\"0\":0,\"1\":0,\"2\":0},\"boxEmitterVelocityAddVariance\":{\"0\":0,\"1\":0,\"2\":0},\"sphereEmitterCenterPosition\":{\"0\":0,\"1\":0,\"2\":0},\"ringEmitterCenterPosition\":{\"0\":0,\"1\":0,\"2\":0},\"useEndRadian\":true,\"disableColor\":false}"
  },
  {
    "path": "public/unpack.json",
    "content": "[\"images/accessories/insert_coin@3x.png\",\"images/accessories/title@3x.png\",\"images/accessories/titlebar@3x.png\",\"images/accessories/title_neon@3x.png\",\"images/background/background_1@3x.png\",\"images/background/background_2@3x.png\",\"images/border/achievement_complete@3x.png\",\"images/border/border_1@3x.png\",\"images/border/border_2@3x.png\",\"images/border/card@3x.png\",\"images/border/talent_item@3x.png\",\"images/border/talent_item_selected@3x.png\",\"images/border/up@3x.png\",\"images/button/button_main@3x.png\",\"images/slider/vslider_1@3x$bar.png\",\"images/slider/vslider_1@3x.png\"]"
  },
  {
    "path": "public/view/CyberTheme/animation/bottomBreath.ani",
    "content": "{\"type\":\"View\",\"props\":{\"sceneWidth\":200,\"sceneHeight\":200,\"sceneColor\":\"#000000\"},\"compId\":1,\"child\":[{\"type\":\"GraphicNode\",\"props\":{},\"compId\":2}],\"animations\":[{\"nodes\":[{\"target\":2,\"keyframes\":{\"y\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"y\",\"index\":0}],\"x\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"x\",\"index\":0}],\"skin\":[{\"value\":\"images/resource/bottombreath.png\",\"tweenMethod\":\"linearNone\",\"tween\":false,\"target\":2,\"key\":\"skin\",\"index\":0}],\"anchorY\":[{\"value\":1,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"anchorY\",\"index\":0}],\"anchorX\":[{\"value\":0.5,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"anchorX\",\"index\":0}],\"alpha\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"alpha\",\"index\":0},{\"value\":0.5,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"alpha\",\"index\":36},{\"value\":1,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"alpha\",\"index\":48},{\"value\":0.8,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"alpha\",\"index\":96},{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"alpha\",\"index\":120}]}}],\"name\":\"ani1\",\"id\":1,\"frameRate\":24,\"action\":0}]}"
  },
  {
    "path": "public/view/CyberTheme/animation/circleFlash.ani",
    "content": "{\"type\":\"View\",\"props\":{\"sceneWidth\":200,\"sceneHeight\":200,\"sceneColor\":\"#000000\"},\"compId\":1,\"child\":[{\"type\":\"GraphicNode\",\"props\":{},\"compId\":2}],\"animations\":[{\"nodes\":[{\"target\":2,\"keyframes\":{\"y\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"y\",\"index\":0}],\"x\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"x\",\"index\":0}],\"skin\":[{\"value\":\"images/resource/circleflash.png\",\"tweenMethod\":\"linearNone\",\"tween\":false,\"target\":2,\"key\":\"skin\",\"index\":0}],\"skewX\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"skewX\",\"index\":0}],\"scaleX\":[{\"value\":-1,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"scaleX\",\"index\":0}],\"rotation\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":0},{\"value\":-90,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":10},{\"value\":-135,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":15},{\"value\":-270,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":20},{\"value\":-360,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":25},{\"value\":-650,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":35},{\"value\":-680,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":37},{\"value\":-710,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":39},{\"value\":-720,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":41}],\"anchorY\":[{\"value\":0.5,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"anchorY\",\"index\":0}],\"anchorX\":[{\"value\":0.5,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"anchorX\",\"index\":0}]}}],\"name\":\"ani1\",\"id\":1,\"frameRate\":24,\"action\":0}]}"
  },
  {
    "path": "public/view/CyberTheme/animation/jumpBackground.ani",
    "content": "{\"type\":\"View\",\"props\":{\"sceneWidth\":200,\"sceneHeight\":200,\"sceneColor\":\"#000000\"},\"compId\":1,\"child\":[{\"type\":\"GraphicNode\",\"props\":{},\"compId\":3}],\"animations\":[{\"nodes\":[{\"target\":3,\"keyframes\":{\"y\":[{\"value\":-13,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":0},{\"value\":-13,\"tweenMethod\":\"strongOut\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":2},{\"value\":-5,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":3},{\"value\":-3,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":5},{\"value\":-15,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":6},{\"value\":-15,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":9},{\"value\":3,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":10},{\"value\":-14,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":11},{\"value\":-14,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":15},{\"value\":-22,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":16},{\"value\":-22,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":19},{\"value\":-13,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"y\",\"index\":20}],\"x\":[{\"value\":-18,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":0},{\"value\":-18,\"tweenMethod\":\"strongOut\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":2},{\"value\":-3,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":3},{\"value\":-5,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":5},{\"value\":-16,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":6},{\"value\":-12,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":9},{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":10},{\"value\":-8,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":11},{\"value\":-8,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":15},{\"value\":-11,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":16},{\"value\":-11,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":19},{\"value\":-18,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"x\",\"index\":20}],\"skin\":[{\"value\":\"images/background/background_1@3x.png\",\"tweenMethod\":\"linearNone\",\"tween\":false,\"target\":3,\"key\":\"skin\",\"index\":0}],\"scaleY\":[{\"value\":1.01,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"scaleY\",\"index\":0}],\"scaleX\":[{\"value\":1.01,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":3,\"key\":\"scaleX\",\"index\":0}]}}],\"name\":\"ani1\",\"id\":1,\"frameRate\":24,\"action\":0}]}"
  },
  {
    "path": "public/view/CyberTheme/animation/lightRotation.ani",
    "content": "{\"type\":\"View\",\"props\":{\"sceneWidth\":600,\"sceneHeight\":400,\"sceneColor\":\"#000000\"},\"compId\":1,\"child\":[{\"type\":\"GraphicNode\",\"props\":{},\"compId\":2}],\"animations\":[{\"nodes\":[{\"target\":2,\"keyframes\":{\"y\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"y\",\"index\":0}],\"x\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"x\",\"index\":0}],\"width\":[{\"value\":1715,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"width\",\"index\":0}],\"skin\":[{\"value\":\"images/background/background_2@3x.png\",\"tweenMethod\":\"linearNone\",\"tween\":false,\"target\":2,\"key\":\"skin\",\"index\":0}],\"rotation\":[{\"value\":0,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":0},{\"value\":360,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"rotation\",\"index\":279}],\"pivotY\":[{\"value\":862,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"pivotY\",\"index\":0}],\"pivotX\":[{\"value\":868,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"pivotX\",\"index\":0}],\"height\":[{\"value\":1716,\"tweenMethod\":\"linearNone\",\"tween\":true,\"target\":2,\"key\":\"height\",\"index\":0}]}}],\"name\":\"ani1\",\"id\":1,\"frameRate\":24,\"action\":0}]}"
  },
  {
    "path": "repl/app.js",
    "content": "import { fileURLToPath } from 'url'\nimport { dirname } from 'path'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = dirname(__filename)\nimport { readFile } from 'fs/promises'\nimport Life from '../src/modules/life.js'\nimport $lang from '../src/i18n/zh-cn.js'\nglobalThis.$lang = $lang\n\nglobalThis.json = async fileName =>\n    JSON.parse(await readFile(`${__dirname}/../public/data/${fileName}.json`))\n\nglobalThis.$$eventMap = new Map()\nglobalThis.$$event = (tag, data) => {\n    const listener = $$eventMap.get(tag)\n    if (listener) listener.forEach(fn => fn(data))\n}\nglobalThis.$$on = (tag, fn) => {\n    let listener = $$eventMap.get(tag)\n    if (!listener) {\n        listener = new Set()\n        $$eventMap.set(tag, listener)\n    }\n    listener.add(fn)\n}\nglobalThis.$$off = (tag, fn) => {\n    const listener = $$eventMap.get(tag)\n    if (listener) listener.delete(fn)\n}\n\nclass App {\n    constructor() {\n        this.#life.config({\n            defaultPropertyPoints: 20, // default number of points for a property\n            talentSelectLimit: 3, // max number of talents that can be selected\n            propertyAllocateLimit: [0, 10], // scoop of properties that can be allocated,\n            defaultPropertys: { SPR: 5 }, // default properties\n            talentConfig: {\n                // config for talent\n                talentPullCount: 10, // number of talents to pull from the talent pool\n                talentRate: { 1: 100, 2: 10, 3: 1, total: 1000 }, // rate of talent pull\n                additions: {\n                    TMS: [\n                        [10, { 2: 1 }],\n                        [30, { 2: 2 }],\n                        [50, { 2: 3 }],\n                        [70, { 2: 4 }],\n                        [100, { 2: 5 }],\n                    ],\n                    CACHV: [\n                        [10, { 2: 1 }],\n                        [30, { 2: 2 }],\n                        [50, { 2: 3 }],\n                        [70, { 2: 4 }],\n                        [100, { 2: 5 }],\n                    ],\n                },\n            },\n            propertyConfig: {\n                // config for property\n                judge: {\n                    // type: [min, grade, judge]\n                    RTLT: [\n                        [0, 0],\n                        [0.3, 1],\n                        [0.6, 2],\n                        [0.9, 3],\n                    ],\n                    REVT: [\n                        [0, 0],\n                        [0.2, 1],\n                        [0.4, 2],\n                        [0.6, 3],\n                    ],\n                    TMS: [\n                        [0, 0, 'UI_Remake_Times_Judge_Level_0'],\n                        [10, 1, 'UI_Remake_Times_Judge_Level_1'],\n                        [30, 1, 'UI_Remake_Times_Judge_Level_2'],\n                        [50, 2, 'UI_Remake_Times_Judge_Level_3'],\n                        [70, 2, 'UI_Remake_Times_Judge_Level_4'],\n                        [100, 3, 'UI_Remake_Times_Judge_Level_5'],\n                    ],\n                    CACHV: [\n                        [0, 0, 'UI_Achievement_Count_Judge_Level_0'],\n                        [10, 1, 'UI_Achievement_Count_Judge_Level_1'],\n                        [30, 1, 'UI_Achievement_Count_Judge_Level_2'],\n                        [50, 2, 'UI_Achievement_Count_Judge_Level_3'],\n                        [70, 2, 'UI_Achievement_Count_Judge_Level_4'],\n                        [100, 3, 'UI_Achievement_Count_Judge_Level_5'],\n                    ],\n                    HCHR: [\n                        [0, 0, 'UI_Judge_Level_0'],\n                        [1, 0, 'UI_Judge_Level_1'],\n                        [2, 0, 'UI_Judge_Level_2'],\n                        [4, 0, 'UI_Judge_Level_3'],\n                        [7, 1, 'UI_Judge_Level_4'],\n                        [9, 2, 'UI_Judge_Level_5'],\n                        [11, 3, 'UI_Judge_Level_6'],\n                    ],\n                    HMNY: [\n                        [0, 0, 'UI_Judge_Level_0'],\n                        [1, 0, 'UI_Judge_Level_1'],\n                        [2, 0, 'UI_Judge_Level_2'],\n                        [4, 0, 'UI_Judge_Level_3'],\n                        [7, 1, 'UI_Judge_Level_4'],\n                        [9, 2, 'UI_Judge_Level_5'],\n                        [11, 3, 'UI_Judge_Level_6'],\n                    ],\n                    HSPR: [\n                        [0, 0, 'UI_Spirit_Judge_Level_0'],\n                        [1, 0, 'UI_Spirit_Judge_Level_1'],\n                        [2, 0, 'UI_Spirit_Judge_Level_2'],\n                        [4, 0, 'UI_Spirit_Judge_Level_3'],\n                        [7, 1, 'UI_Spirit_Judge_Level_4'],\n                        [9, 2, 'UI_Spirit_Judge_Level_5'],\n                        [11, 3, 'UI_Spirit_Judge_Level_6'],\n                    ],\n                    HINT: [\n                        [0, 0, 'UI_Judge_Level_0'],\n                        [1, 0, 'UI_Judge_Level_1'],\n                        [2, 0, 'UI_Judge_Level_2'],\n                        [4, 0, 'UI_Judge_Level_3'],\n                        [7, 1, 'UI_Judge_Level_4'],\n                        [9, 2, 'UI_Judge_Level_5'],\n                        [11, 3, 'UI_Judge_Level_6'],\n                        [21, 3, 'UI_Intelligence_Judge_Level_7'],\n                        [131, 3, 'UI_Intelligence_Judge_Level_8'],\n                        [501, 3, 'UI_Intelligence_Judge_Level_9'],\n                    ],\n                    HSTR: [\n                        [0, 0, 'UI_Judge_Level_0'],\n                        [1, 0, 'UI_Judge_Level_1'],\n                        [2, 0, 'UI_Judge_Level_2'],\n                        [4, 0, 'UI_Judge_Level_3'],\n                        [7, 1, 'UI_Judge_Level_4'],\n                        [9, 2, 'UI_Judge_Level_5'],\n                        [11, 3, 'UI_Judge_Level_6'],\n                        [21, 3, 'UI_Strength_Judge_Level_7'],\n                        [101, 3, 'UI_Strength_Judge_Level_8'],\n                        [401, 3, 'UI_Strength_Judge_Level_9'],\n                        [1001, 3, 'UI_Strength_Judge_Level_10'],\n                        [2001, 3, 'UI_Strength_Judge_Level_11'],\n                    ],\n                    HAGE: [\n                        [0, 0, 'UI_AGE_Judge_Level_0'],\n                        [1, 0, 'UI_AGE_Judge_Level_1'],\n                        [10, 0, 'UI_AGE_Judge_Level_2'],\n                        [18, 0, 'UI_AGE_Judge_Level_3'],\n                        [40, 0, 'UI_AGE_Judge_Level_4'],\n                        [60, 1, 'UI_AGE_Judge_Level_5'],\n                        [70, 1, 'UI_AGE_Judge_Level_6'],\n                        [80, 2, 'UI_AGE_Judge_Level_7'],\n                        [90, 2, 'UI_AGE_Judge_Level_8'],\n                        [95, 3, 'UI_AGE_Judge_Level_9'],\n                        [100, 3, 'UI_AGE_Judge_Level_10'],\n                        [500, 3, 'UI_AGE_Judge_Level_11'],\n                    ],\n                    SUM: [\n                        [0, 0, 'UI_Judge_Level_0'],\n                        [41, 0, 'UI_Judge_Level_1'],\n                        [50, 0, 'UI_Judge_Level_2'],\n                        [60, 0, 'UI_Judge_Level_3'],\n                        [80, 1, 'UI_Judge_Level_4'],\n                        [100, 2, 'UI_Judge_Level_5'],\n                        [110, 3, 'UI_Judge_Level_6'],\n                        [120, 3, 'UI_Judge_Level_7'],\n                    ],\n                },\n            },\n            characterConfig: {\n                // config for character\n                characterPullCount: 3,\n                rateableKnife: 10,\n                propertyWeight: [\n                    [0, 1],\n                    [1, 2],\n                    [2, 3],\n                    [3, 4],\n                    [4, 5],\n                    [5, 6],\n                    [6, 5],\n                    [7, 4],\n                    [8, 3],\n                    [9, 2],\n                    [10, 1],\n                ],\n                talentWeight: [\n                    [1, 1],\n                    [2, 2],\n                    [3, 3],\n                    [4, 2],\n                    [5, 1],\n                ],\n            },\n        })\n    }\n\n    Steps = {\n        TALENT: 'talent',\n        PROPERTY: 'property',\n        TRAJECTORY: 'trajectory',\n        SUMMARY: 'summary',\n    }\n    #language = 'zh-cn'\n    #step = this.Steps.SUMMARY\n    #life = new Life()\n    #talentSelected = new Set()\n    #talentExtend = new Set()\n    #auto\n    #isEnd\n    #propertyAllocation\n    #output\n    #exit\n    #interval\n    #style = {\n        warn: ['\\x1B[93m', '\\x1B[39m'], // Bright Yellow\n        grade1: ['\\x1B[94m', '\\x1B[39m'], // Bright Blue\n        grade2: ['\\x1B[95m', '\\x1B[39m'], // Bright Magenta\n        grade3: ['\\x1B[93m', '\\x1B[39m'], // Bright Yellow\n        grade1b: ['\\x1B[94m\\x1B[7m', '\\x1B[0m'], // Bright Blue BG\n        grade2b: ['\\x1B[95m\\x1B[7m', '\\x1B[0m'], // Bright Magenta BG\n        grade3b: ['\\x1B[93m\\x1B[7m', '\\x1B[0m'], // Bright Yellow BG\n    }\n    #randomTalents\n\n    style(type, str) {\n        const style = this.#style[type]\n        if (!style) return str\n        return `${style[0]}${str}${style[1]}`\n    }\n\n    async initial() {\n        this.output('Now Loading...')\n        this.#talentExtend = localStorage.talentExtend\n        await this.#life.initial(\n            dataSet => json(`${this.#language}/${dataSet}`),\n            json\n        )\n        this.output(\n            `\\rLoading Complete.\n人生重开模拟器\n这垃圾人生一秒也不想待了\n\n键入 \\x1B[4m/remake\\x1B[24m 开始游戏\n键入 \\x1B[4m/help\\x1B[24m 获取帮助`,\n            true\n        )\n        $$on('achievement', ({ name }) =>\n            this.output(`\n-------------------------\n    解锁成就【${name}】\n-------------------------\n`)\n        )\n    }\n\n    io(input, output, exit) {\n        this.#output = output\n        this.#exit = exit\n        input(command => {\n            const ret = this.repl(command)\n            if (!ret) return\n            if (typeof ret == 'string') return this.output(ret, true)\n            if (Array.isArray(ret)) return this.output(...ret)\n            const { message, isRepl } = ret\n            return this.output(message, isRepl)\n        })\n    }\n\n    output(data, isRepl) {\n        if (!this.#output) return\n        this.#output(data, isRepl)\n    }\n\n    exit(code) {\n        if (this.#exit) this.#exit(code)\n        process.exit(code)\n    }\n\n    repl(command) {\n        command = command.split(/\\s+/)\n        switch (command.shift()) {\n            case 'r':\n            case 'remake':\n            case '/remake':\n                return this.remake()\n\n            case 's':\n            case 'select':\n            case '/select':\n                return this.select(...command)\n\n            case 'u':\n            case 'unselect':\n            case '/unselect':\n                return this.unselect(...command)\n\n            case 'n':\n            case 'next':\n            case '/next':\n            case '':\n                return this.next(true)\n\n            case 'a':\n            case 'alloc':\n            case 'allocate':\n            case 'attrib':\n            case 'attribute':\n            case '/alloc':\n            case '/allocate':\n            case '/attrib':\n            case '/attribute':\n                return this.attrib(...command)\n\n            case 'rd':\n            case 'random':\n            case '/random':\n                return this.random()\n\n            case 'at':\n            case 'auto':\n            case '/auto':\n                return this.auto(...command)\n\n            case 'x':\n            case 'exit':\n            case '/exit':\n                return this.exit(0)\n\n            case '?':\n            case 'h':\n            case 'help':\n            case '/?':\n            case '/h':\n            case '/help':\n            default:\n                return this.help(...command)\n        }\n    }\n\n    help(key) {\n        switch (key) {\n            case 'x':\n            case 'exit':\n            case '/exit':\n                return `退出\n    x, exit, /exit      命令同等效果`\n\n            case 'r':\n            case 'remake':\n            case '/remake':\n                return `重开\n    r, remake, /remake  命令同等效果`\n\n            case 's':\n            case 'select':\n            case '/select':\n                return `选择\n    s, select, /select  命令同等效果\n\n    Example:    /select 1 2 3 意味着选择 1 2 3 三个天赋\n\n                /select <id1> [id2] [id3]\n\n    参数解释     <id1>   通常来说要指定至少一个id\n                        虽然不指定也可以\n                [id2]\n                [id3]   可以不指定`\n\n            case 'u':\n            case 'unselect':\n            case '/unselect':\n                return `取消选择\n    u, unselect,\n    /unselect           命令同等效果\n\n    Example:    /unselect 1 2 3\n                意味着取消选择 1 2 3 三个天赋\n\n    参数解释     /unselect <id1> [id2] [id3]\n\n                <id1>   通常来说要指定至少一个id\n                        虽然不指定也可以\n                [id2]\n                [id3]   可以不指定`\n\n            case 'a':\n            case 'alloc':\n            case 'allocate':\n            case 'attrib':\n            case 'attribute':\n            case '/alloc':\n            case '/allocate':\n            case '/attrib':\n            case '/attribute':\n                return `分配或查看属性点\n    a, alloc, allocate, attrib, attribute\n    /alloc, /allocate, /attrib, /attribute 命令同等效果\n\n    Example:    /attribute\n                /allocate STR 1\n                /allocate INT -3\n                /allocate CHR +5\n\n    效果        在属性分配时分配属性点\n                在人生的过程中查看当前属性点\n\n    参数解释    /allocate <TAG> <[+/-]value>\n\n                <TAG>   表示要分配的属性标签\n                        可选有\n                            CHR, chr, c, C 表示颜值\n                            INT, int, i, I 表示智力\n                            STR, str, s, S 表示体质\n                            MNY, mny, m, M 表示家境\n                        必填\n\n                <[+/-]value>\n                        表示属性的调整\n                        其中\n                            + 表示在当前基础上增加\n                            - 表示在当前基础上减少\n                            无符号表示直接设置为此值\n                        必填`\n\n            case 'n':\n            case 'next':\n            case '/next':\n                return `继续\n    n, next, /next      命令同等效果\n\n    效果                通常用于各步骤结束后\n                        例如：  选择天赋后\n                                分配属性后\n                                每个年龄事件后\n                                总评后\n                                继承天赋后`\n\n            case 'at':\n            case 'auto':\n            case '/auto':\n                return `自动播放\n    at, auto, /auto    命令同等效果\n\n    效果                用于人生的过程中\n                        每个年龄会自动下一年\n                        播放速度 1 秒 1 年`\n\n            case '?':\n            case 'h':\n            case 'help':\n            case '/?':\n            case '/h':\n            case '/help':\n                return `显示帮助\n    ？, h, help\n    /?, /h, /help           命令同等效果\n\n    Example:            /help\n                        /help /select\n\n    参数解释             /help [command]\n\n            [command]   要详细显示帮助的命令\n                        可以不填`\n        }\n        return `Help ---\n    命令            说明            示例\n    x\n    exit\n    /exit           退出            /exit\n\n    r\n    remake\n    /remake         重开            /remake\n\n    s\n    select\n    /select         选择天赋        /select <id1> [id2] [id3]\n\n    u\n    unselect\n    /unselect       取消选择        /unselect <id1> [id2] [id3]\n\n    a\n    alloc\n    allocate\n    attrib\n    attribute\n    /alloc\n    /allocate\n    /attrib\n    /attribute      分配或查看属性点 /allocate <TAG> <[+/-]value>\n\n    n\n    next\n    /next           继续            /next\n\n    at\n    auto\n    /auto           自动播放        /auto\n\n    ?\n    h\n    help\n    /?\n    /h\n    /help           显示帮助        /help [command]`\n    }\n\n    auto(arg) {\n        this.#auto = arg != 'off'\n        return this.next(true)\n    }\n\n    remake() {\n        if (this.#talentExtend) {\n            this.#life.talentExtend(this.#talentExtend)\n            dumpLocalStorage()\n            this.#talentExtend = null\n        }\n\n        this.#isEnd = false\n        this.#talentSelected.clear()\n        this.#propertyAllocation = {\n            CHR: 0,\n            INT: 0,\n            STR: 0,\n            MNY: 0,\n            SPR: 5,\n        }\n        this.#step = this.Steps.TALENT\n        this.#randomTalents = this.#life.talentRandom()\n        return this.list()\n    }\n\n    select(...select) {\n        switch (this.#step) {\n            case this.Steps.TALENT:\n                return this.talentSelect(...select)\n            case this.Steps.SUMMARY:\n                return this.talentExtend(...select)\n        }\n    }\n\n    unselect(...select) {\n        switch (this.#step) {\n            case this.Steps.TALENT:\n                return this.talentUnSelect(...select)\n            case this.Steps.SUMMARY:\n                return this.talentExtendCancle(...select)\n        }\n    }\n\n    talentSelect(...select) {\n        const warn = str => `${this.list()}\\n${this.style('warn', str)}`\n        for (const number of select) {\n            const s = this.#randomTalents[number]\n            if (!s) return warn(`${number} 为未知天赋`)\n            if (this.#talentSelected.has(s)) continue\n            if (this.#talentSelected.size == 3)\n                return warn(\n                    '你只能选3个天赋。请使用 \\x1B[4m/unselect\\x1B[24m 取消选择你不想要的天赋'\n                )\n\n            const exclusive = this.#life.exclude(\n                Array.from(this.#talentSelected).map(({ id }) => id),\n                s.id\n            )\n\n            if (exclusive != null)\n                for (const { name, id } of this.#talentSelected)\n                    if (id == exclusive)\n                        return warn(\n                            `天赋【${s.name}】与已选择的天赋【${name}】冲突`\n                        )\n\n            this.#talentSelected.add(s)\n        }\n\n        return this.list()\n    }\n\n    talentUnSelect(...select) {\n        for (const number of select) {\n            const s = this.#randomTalents[number]\n            if (this.#talentSelected.has(s)) this.#talentSelected.delete(s)\n        }\n        return this.list()\n    }\n\n    talentExtend(select) {\n        const warn = str => `${this.list()}\\n${this.style('warn', str)}`\n        const list = Array.from(this.#talentSelected)\n        const s = list[select]\n        if (!s) return warn(`${select} 为未知天赋`)\n        this.#talentExtend = s.id\n        return this.list()\n    }\n\n    talentExtendCancle() {\n        this.#talentExtend = null\n        return this.list()\n    }\n\n    list() {\n        let description, list, check\n        switch (this.#step) {\n            case this.Steps.TALENT:\n                description = '🎉 请选择（\\x1B[4m/select\\x1B[24m）3 个天赋'\n                list = this.#randomTalents\n                check = talent => this.#talentSelected.has(talent)\n                break\n            case this.Steps.SUMMARY:\n                description =\n                    '🎉 你可以选（\\x1B[4m/select\\x1B[24m）一个天赋继承'\n                list = Array.from(this.#talentSelected)\n                check = ({ id }) => this.#talentExtend == id\n                break\n        }\n        if (!list) return ''\n\n        return [\n            description,\n            list.map((talent, i) =>\n                this.style(\n                    `grade${talent.grade}b`,\n                    `${check(talent) ? '√' : ' '} ${i} ${talent.name}（${\n                        talent.description\n                    }）`\n                )\n            ),\n        ]\n            .flat()\n            .join('\\n')\n    }\n\n    next(enter) {\n        const warn = (a, b) =>\n            `${a}\\n${this.style('warn', this.style('warn', b))}`\n        switch (this.#step) {\n            case this.Steps.TALENT:\n                if (this.#talentSelected.size != 3)\n                    return warn(this.list(), `请选择 3 个天赋`)\n                this.#step = this.Steps.PROPERTY\n                this.#life.remake(\n                    Array.from(this.#talentSelected).map(({ id }) => id)\n                )\n                this.#propertyAllocation.total = this.#life.getPropertyPoints()\n                return this.prop()\n            case this.Steps.PROPERTY:\n                const less = this.less()\n                if (less > 0)\n                    return warn(this.prop(), `你还有 ${less} 属性点没有分配完`)\n                this.#step = this.Steps.TRAJECTORY\n                delete this.#propertyAllocation.total\n                this.#life.start(this.#propertyAllocation)\n                return this.trajectory(enter)\n            case this.Steps.TRAJECTORY:\n                if (!this.#isEnd) return this.trajectory(enter)\n                this.#step = this.Steps.SUMMARY\n                return `${this.summary()}\\n\\n${this.list()}`\n            case this.Steps.SUMMARY:\n                return this.remake()\n        }\n    }\n\n    trajectory(enter) {\n        if (enter) {\n            if (this.#interval) {\n                clearInterval(this.#interval)\n                this.#interval = null\n                this.#auto = false\n            } else if (this.#auto) {\n                this.#interval = setInterval(() => {\n                    const trajectory = this.next()\n                    if (this.#isEnd && this.#interval) {\n                        clearInterval(this.#interval)\n                        this.#interval = null\n                    }\n                    if (!this.#isEnd) return this.output(`${trajectory}\\n`)\n                    return this.output(trajectory, true)\n                }, Number(this.#auto) || 1000)\n                return\n            }\n        }\n\n        const trajectory = this.#life.next()\n        const { age, content, isEnd } = trajectory\n        if (isEnd) this.#isEnd = true\n        return `${age}岁：\\t${content\n            .map(({ type, description, grade, name, postEvent }) => {\n                switch (type) {\n                    case 'TLT':\n                        return `天赋【${name}】发动：${description}`\n                    case 'EVT':\n                        return (\n                            description + (postEvent ? `\\n\\t${postEvent}` : '')\n                        )\n                }\n            })\n            .join('\\n\\t')}`\n    }\n\n    prop() {\n        const { CHR, INT, STR, MNY } = this.#propertyAllocation\n        return `🎉 属性分配\n请使用 \\x1B[4m/alloc\\x1B[24m <TAG> <value> 分配属性\n剩余点数 ${this.less()}\n\n属性(TAG)       当前值\n颜值(CHR)         ${CHR}\n智力(INT)         ${INT}\n体质(STR)         ${STR}\n家境(MNY)         ${MNY}\n        `\n    }\n\n    less() {\n        const { total, CHR, INT, STR, MNY } = this.#propertyAllocation\n        return total - CHR - INT - STR - MNY\n    }\n\n    attrib(tag, value) {\n        switch (this.#step) {\n            case this.Steps.PROPERTY:\n                return this.alloc(tag, value)\n\n            case this.Steps.TRAJECTORY:\n                return this.showProperty()\n\n            default:\n                return undefined\n        }\n    }\n\n    showProperty() {\n        let property = this.#life.getLastRecord()\n        return `当前属性\n\n属性(TAG)       当前值\n颜值(CHR)         ${property.CHR}\n智力(INT)         ${property.INT}\n体质(STR)         ${property.STR}\n家境(MNY)         ${property.MNY}\n快乐(SPR)         ${property.SPR}`\n    }\n\n    alloc(tag, value) {\n        const warn = str => `${this.prop()}\\n${this.style('warn', str)}`\n        if (!value) return warn('⚠ 分配的数值没有给定')\n        const isSet = !(value[0] == '-' || value[0] == '+')\n\n        value = Number(value)\n        if (isNaN(value)) return warn('⚠ 分配的数值不正确')\n\n        switch (tag) {\n            case 'c':\n            case 'chr':\n            case 'C':\n                tag = 'CHR'\n                break\n            case 'i':\n            case 'int':\n            case 'I':\n                tag = 'INT'\n                break\n            case 's':\n            case 'S':\n            case 'str':\n                tag = 'STR'\n                break\n            case 'm':\n            case 'M':\n            case 'mny':\n                tag = 'MNY'\n                break\n        }\n\n        switch (tag) {\n            case 'CHR':\n            case 'INT':\n            case 'STR':\n            case 'MNY':\n                break\n            default:\n                return warn('⚠ 未知的tag')\n        }\n\n        if (isSet) value = value - this.#propertyAllocation[tag]\n\n        const tempLess = this.less() - value\n        const tempSet = this.#propertyAllocation[tag] + value\n\n        if (tempLess < 0) return warn('⚠ 你没有更多的点数可以分配了')\n        if (tempLess > this.#propertyAllocation.total || tempSet < 0)\n            return warn('⚠ 不能分配负数属性')\n        if (tempSet > 10) return warn('⚠ 单项属性最高分配10点')\n\n        this.#propertyAllocation[tag] += value\n\n        return this.prop()\n    }\n\n    random() {\n        switch (this.#step) {\n            case this.Steps.TALENT:\n                this.#talentSelected.clear()\n                Array.from(this.#randomTalents)\n                    .sort(() => Math.random() - 0.5)\n                    .slice(0, 3)\n                    .forEach(talent => {\n                        this.#talentSelected.add(talent)\n                    })\n                return this.list()\n            case this.Steps.PROPERTY:\n                let t = this.#propertyAllocation.total\n                const arr = [10, 10, 10, 10]\n                while (t > 0) {\n                    const sub =\n                        Math.round(Math.random() * (Math.min(t, 10) - 1)) + 1\n                    while (true) {\n                        const select = Math.floor(Math.random() * 4) % 4\n                        if (arr[select] - sub < 0) continue\n                        arr[select] -= sub\n                        t -= sub\n                        break\n                    }\n                }\n                this.#propertyAllocation.CHR = 10 - arr[0]\n                this.#propertyAllocation.INT = 10 - arr[1]\n                this.#propertyAllocation.STR = 10 - arr[2]\n                this.#propertyAllocation.MNY = 10 - arr[3]\n                return this.prop()\n            case this.Steps.SUMMARY:\n                this.#talentExtend = Array.from(this.#talentSelected).sort(\n                    () => Math.random() - 0.5\n                )[0].id\n                return this.list()\n        }\n    }\n\n    summary() {\n        const summaryData = this.#life.summary\n        const format = (name, type) => {\n            const { judge, grade, value } = summaryData[type]\n            return this.style(\n                `grade${grade}b`,\n                `${name}：${value} ${$lang[judge]}`\n            )\n        }\n\n        return [\n            '🎉 总评',\n            format('颜值', this.#life.PropertyTypes.HCHR),\n            format('智力', this.#life.PropertyTypes.HINT),\n            format('体质', this.#life.PropertyTypes.HSTR),\n            format('家境', this.#life.PropertyTypes.HMNY),\n            format('快乐', this.#life.PropertyTypes.HSPR),\n            format('享年', this.#life.PropertyTypes.HAGE),\n            format('总评', this.#life.PropertyTypes.SUM),\n        ].join('\\n')\n    }\n}\n\nexport default App\n"
  },
  {
    "path": "repl/index.js",
    "content": "import { fileURLToPath } from 'url'\nimport { dirname } from 'path'\n\nconst __filename = fileURLToPath(import.meta.url)\nconst __dirname = dirname(__filename)\n\nimport App from './app.js'\nimport { readFile, writeFile } from 'fs/promises'\n\nasync function main() {\n    try {\n        globalThis.localStorage = JSON.parse(\n            await readFile(__dirname + '/__localStorage.json')\n        )\n    } catch (e) {\n        globalThis.localStorage = {}\n    }\n    localStorage.getItem = key =>\n        localStorage[key] === void 0 ? null : localStorage[key]\n    localStorage.setItem = (key, value) => (localStorage[key] = value)\n\n    globalThis.dumpLocalStorage = async () =>\n        await writeFile(\n            __dirname + '/__localStorage.json',\n            JSON.stringify(global.localStorage)\n        )\n\n    const app = new App()\n    app.io(\n        repl => process.stdin.on('data', data => repl(data.toString().trim())),\n        (data, isRepl) => process.stdout.write(`${data}${isRepl ? '\\n>' : ''}`),\n        code => process.exit(code)\n    )\n    await app.initial()\n}\n\nmain()\n\n// process.stdin.setRawMode(true);\n\n// process.openStdin().on('keypress', function (chunk, key) {\n//   process.stdout.write('Get Chunk: ' + chunk + '\\n');\n//   if (key && key.ctrl && key.name == 'c') process.exit();\n// });\n"
  },
  {
    "path": "src/@types/LayaAir.d.ts",
    "content": "declare module laya.ani {\n    /**\n     * @private\n     * @author ...\n     */\n    class AnimationContent {\n        nodes: Array<any>;\n        name: string;\n        playTime: number;\n        bone3DMap: any;\n        totalKeyframeDatasLength: number;\n    }\n}\ndeclare module laya.ani {\n    /**\n     * @private\n     * @author ...\n     */\n    class AnimationNodeContent {\n        name: string;\n        parentIndex: number;\n        parent: AnimationNodeContent;\n        keyframeWidth: number;\n        lerpType: number;\n        interpolationMethod: Array<any>;\n        childs: Array<any>;\n        keyFrame: Array<any>;\n        playTime: number;\n        extenData: ArrayBuffer;\n        dataOffset: number;\n    }\n}\ndeclare module laya.ani {\n    import Byte = laya.utils.Byte;\n    /**\n     * @private\n     */\n    class AnimationParser01 {\n        /**\n         * @private\n         */\n        static parse(templet: AnimationTemplet, reader: Byte): void;\n    }\n}\ndeclare module laya.ani {\n    import Byte = laya.utils.Byte;\n    /**\n     * @private\n     */\n    class AnimationParser02 {\n        /**\n         * @private\n         */\n        static parse(templet: AnimationTemplet, reader: Byte): void;\n        static READ_ANIMATIONS(): void;\n    }\n}\ndeclare module laya.ani {\n    import EventDispatcher = laya.events.EventDispatcher;\n    import IDestroy = laya.resource.IDestroy;\n    /**\n     * <code>AnimationPlayer</code> 类用于动画播放器。\n     */\n    class AnimationPlayer extends EventDispatcher implements IDestroy {\n        _fullFrames: Array<any>;\n        /**是否缓存*/\n        isCache: boolean;\n        /** 播放速率*/\n        playbackRate: number;\n        /** 停止时是否归零*/\n        returnToZeroStopped: boolean;\n        /**\n         * 获取动画数据模板\n         * @param\tvalue 动画数据模板\n         */\n        /**\n         * 设置动画数据模板,注意：修改此值会有计算开销。\n         * @param\tvalue 动画数据模板\n         */\n        templet: AnimationTemplet;\n        /**\n         * 动画播放的起始时间位置。\n         * @return\t 起始时间位置。\n         */\n        readonly playStart: number;\n        /**\n         * 动画播放的结束时间位置。\n         * @return\t 结束时间位置。\n         */\n        readonly playEnd: number;\n        /**\n         * 获取动画播放一次的总时间\n         * @return\t 动画播放一次的总时间\n         */\n        readonly playDuration: number;\n        /**\n         * 获取动画播放的总总时间\n         * @return\t 动画播放的总时间\n         */\n        readonly overallDuration: number;\n        /**\n         * 获取当前动画索引\n         * @return\tvalue 当前动画索引\n         */\n        readonly currentAnimationClipIndex: number;\n        /**\n         * 获取当前帧数\n         * @return\t 当前帧数\n         */\n        readonly currentKeyframeIndex: number;\n        /**\n         *  获取当前精确时间，不包括重播时间\n         * @return\tvalue 当前时间\n         */\n        readonly currentPlayTime: number;\n        /**\n         *  获取当前帧时间，不包括重播时间\n         * @return\tvalue 当前时间\n         */\n        readonly currentFrameTime: number;\n        /**\n         *  获取缓存播放速率。*\n         * @return\t 缓存播放速率。\n         */\n        /**\n         *  设置缓存播放速率,默认值为1.0,注意：修改此值会有计算开销。*\n         * @return\tvalue 缓存播放速率。\n         */\n        cachePlayRate: number;\n        /**\n         *  获取默认帧率*\n         * @return\tvalue 默认帧率\n         */\n        /**\n         *  设置默认帧率,每秒60帧,注意：修改此值会有计算开销。*\n         * @return\tvalue 缓存帧率\n         */\n        cacheFrameRate: number;\n        /**\n         * 设置当前播放位置\n         * @param\tvalue 当前时间\n         */\n        currentTime: number;\n        /**\n         * 获取当前是否暂停\n         * @return\t是否暂停\n         */\n        /**\n         * 设置是否暂停\n         * @param\tvalue 是否暂停\n         */\n        paused: boolean;\n        /**\n         * 获取缓存帧率间隔时间\n         * @return\t缓存帧率间隔时间\n         */\n        readonly cacheFrameRateInterval: number;\n        /**\n         * 获取当前播放状态\n         * @return\t当前播放状态\n         */\n        readonly state: number;\n        /**\n         * 获取是否已销毁。\n         * @return 是否已销毁。\n         */\n        readonly destroyed: boolean;\n        /**\n         * 创建一个 <code>AnimationPlayer</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _onTempletLoadedComputeFullKeyframeIndices(cachePlayRate: number, cacheFrameRate: number, templet: AnimationTemplet): void;\n        /**\n         * @private\n         */\n        _update(elapsedTime: number): void;\n        /**\n         * @private\n         */\n        _destroy(): void;\n        /**\n         * 播放动画。\n         * @param\tindex 动画索引。\n         * @param\tplaybackRate 播放速率。\n         * @param\tduration 播放时长（0为1次,Number.MAX_VALUE为循环播放）。\n         * @param\tplayStart 播放的起始时间位置。\n         * @param\tplayEnd 播放的结束时间位置。（0为动画一次循环的最长结束时间位置）。\n         */\n        play(index?: number, playbackRate?: number, overallDuration?: number, playStart?: number, playEnd?: number): void;\n        /**\n         * 播放动画。\n         * @param\tindex 动画索引。\n         * @param\tplaybackRate 播放速率。\n         * @param\tduration 播放时长（0为1次,Number.MAX_VALUE为循环播放）。\n         * @param\tplayStartFrame 播放的原始起始帧率位置。\n         * @param\tplayEndFrame 播放的原始结束帧率位置。（0为动画一次循环的最长结束时间位置）。\n         */\n        playByFrame(index?: number, playbackRate?: number, overallDuration?: number, playStartFrame?: number, playEndFrame?: number, fpsIn3DBuilder?: number): void;\n        /**\n         * 停止播放当前动画\n         * @param\timmediate 是否立即停止\n         */\n        stop(immediate?: boolean): void;\n    }\n}\ndeclare module laya.ani {\n    /**\n     * @private\n     */\n    class AnimationState {\n        static stopped: number;\n        static paused: number;\n        static playing: number;\n        constructor();\n    }\n}\ndeclare module laya.ani {\n    import Resource = laya.resource.Resource;\n    /**\n     * <code>AnimationTemplet</code> 类用于动画模板资源。\n     */\n    class AnimationTemplet extends Resource {\n        static interpolation: Array<any>;\n        /**\n         * 加载动画模板。\n         * @param url 动画模板地址。\n         */\n        static load(url: string): AnimationTemplet;\n        _aniVersion: string;\n        _anis: Array<any>;\n        _aniMap: any;\n        _publicExtData: ArrayBuffer;\n        _useParent: boolean;\n        protected unfixedCurrentFrameIndexes: Uint32Array;\n        protected unfixedCurrentTimes: Float32Array;\n        protected unfixedKeyframes: Array<any>;\n        protected unfixedLastAniIndex: number;\n        _aniClassName: string;\n        _animationDatasCache: any;\n        constructor();\n        /**\n         * @private\n         */\n        parse(data: ArrayBuffer): void;\n        /**\n         * @private\n         */\n        _calculateKeyFrame(node: AnimationNodeContent, keyframeCount: number, keyframeDataCount: number): void;\n        /**\n         * @inheritDoc\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        protected disposeResource(): void;\n        getAnimationCount(): number;\n        getAnimation(aniIndex: number): any;\n        getAniDuration(aniIndex: number): number;\n        getNodes(aniIndex: number): any;\n        getNodeIndexWithName(aniIndex: number, name: string): number;\n        getNodeCount(aniIndex: number): number;\n        getTotalkeyframesLength(aniIndex: number): number;\n        getPublicExtData(): ArrayBuffer;\n        getAnimationDataWithCache(key: any, cacheDatas: any, aniIndex: number, frameIndex: number): Float32Array;\n        setAnimationDataWithCache(key: any, cacheDatas: Array<any>, aniIndex: number, frameIndex: number, data: any): void;\n        getOriginalData(aniIndex: number, originalData: Float32Array, nodesFrameIndices: Array<any>, frameIndex: number, playCurTime: number): void;\n        getNodesCurrentFrameIndex(aniIndex: number, playCurTime: number): Uint32Array;\n        getOriginalDataUnfixedRate(aniIndex: number, originalData: Float32Array, playCurTime: number): void;\n    }\n}\ndeclare module laya.ani.bone {\n    import Matrix = laya.maths.Matrix;\n    /**\n     * @private\n     */\n    class Bone {\n        static ShowBones: any;\n        name: string;\n        root: Bone;\n        parentBone: Bone;\n        length: number;\n        transform: Transform;\n        resultTransform: Transform;\n        resultMatrix: Matrix;\n        inheritScale: boolean;\n        inheritRotation: boolean;\n        rotation: number;\n        resultRotation: number;\n        d: number;\n        constructor();\n        setTempMatrix(matrix: Matrix): void;\n        update(pMatrix?: Matrix): void;\n        updateChild(): void;\n        setRotation(rd: number): void;\n        updateDraw(x: number, y: number): void;\n        addChild(bone: Bone): void;\n        findBone(boneName: string): Bone;\n        localToWorld(local: Array<any>): void;\n    }\n}\ndeclare module laya.ani.bone {\n    import GraphicsAni = laya.ani.GraphicsAni;\n    import Graphics = laya.display.Graphics;\n    import Matrix = laya.maths.Matrix;\n    import Texture = laya.resource.Texture;\n    /**\n     * @private\n     */\n    class BoneSlot {\n        /** 插槽名称 */\n        name: string;\n        /** 插槽绑定的骨骼名称 */\n        parent: string;\n        /** 插糟显示数据数据的名称 */\n        attachmentName: string;\n        /** 原始数据的索引 */\n        srcDisplayIndex: number;\n        /** 判断对象是否是原对象 */\n        type: string;\n        /** 模板的指针 */\n        templet: Templet;\n        /** 当前插槽对应的数据 */\n        currSlotData: SlotData;\n        /** 当前插槽显示的纹理 */\n        currTexture: Texture;\n        /** 显示对象对应的数据 */\n        currDisplayData: SkinSlotDisplayData;\n        /** 显示皮肤的索引 */\n        displayIndex: number;\n        deformData: Array<any>;\n        /**\n         * 设置要显示的插槽数据\n         * @param\tslotData\n         * @param\tdisIndex\n         * @param\tfreshIndex 是否重置纹理\n         */\n        showSlotData(slotData: SlotData, freshIndex?: boolean): void;\n        /**\n         * 通过名字显示指定对象\n         * @param\tname\n         */\n        showDisplayByName(name: string): void;\n        /**\n         * 替换贴图名\n         * @param\ttarName 要替换的贴图名\n         * @param\tnewName 替换后的贴图名\n         */\n        replaceDisplayByName(tarName: string, newName: string): void;\n        /**\n         * 替换贴图索引\n         * @param\ttarIndex 要替换的索引\n         * @param\tnewIndex 替换后的索引\n         */\n        replaceDisplayByIndex(tarIndex: number, newIndex: number): void;\n        /**\n         * 指定显示对象\n         * @param\tindex\n         */\n        showDisplayByIndex(index: number): void;\n        /**\n         * 替换皮肤\n         * @param\t_texture\n         */\n        replaceSkin(_texture: Texture): void;\n        /**\n         * 保存父矩阵的索引\n         * @param\tparentMatrix\n         */\n        setParentMatrix(parentMatrix: Matrix): void;\n        static createSkinMesh(): any;\n        /**\n         * 把纹理画到Graphics上\n         * @param\tgraphics\n         * @param\tnoUseSave\n         */\n        draw(graphics: GraphicsAni, boneMatrixArray: Array<any>, noUseSave?: boolean, alpha?: number): void;\n        /**\n         * 画骨骼的起始点，方便调试\n         * @param\tgraphics\n         */\n        drawBonePoint(graphics: Graphics): void;\n        /**\n         * 得到插糟的矩阵\n         * @return\n         */\n        getMatrix(): Matrix;\n        /**\n         * 用原始数据拷贝出一个\n         * @return\n         */\n        copy(): BoneSlot;\n    }\n}\ndeclare module laya.ani.bone.canvasmesh {\n    import Rectangle = laya.maths.Rectangle;\n    import HTMLCanvas = laya.resource.HTMLCanvas;\n    import Texture = laya.resource.Texture;\n    /**\n     * @private\n     * 将mesh元素缓存到canvas中并进行绘制\n     */\n    class CacheAbleSkinMesh extends SkinMeshCanvas {\n        constructor();\n        isCached: boolean;\n        canvas: HTMLCanvas;\n        tex: Texture;\n        rec: Rectangle;\n        getCanvasPic(): Texture;\n        render(context: any, x: number, y: number): void;\n        _renderTextureToContext(context: any): void;\n    }\n}\ndeclare module laya.ani.bone.canvasmesh {\n    import Matrix = laya.maths.Matrix;\n    import RenderContext = laya.renders.RenderContext;\n    /**\n     * @private\n     * canvas mesh渲染器\n     */\n    class CanvasMeshRender {\n        /**\n         * mesh数据\n         */\n        mesh: MeshData;\n        /**\n         * 矩阵\n         */\n        transform: Matrix;\n        /**\n         * 绘图环境\n         */\n        context: any;\n        /**\n         * 绘制mesh的模式  0:顶点索引模式 1：无顶点索引模式\n         */\n        mode: number;\n        /**\n         * 将mesh数据渲染到context上面\n         * @param context\n         *\n         */\n        renderToContext(context: RenderContext): void;\n        /**\n         * 无顶点索引的模式\n         * @param mesh\n         *\n         */\n        _renderNoIndexes(mesh: MeshData): void;\n        /**\n         * 使用顶点索引模式绘制\n         * @param mesh\n         *\n         */\n        _renderWithIndexes(mesh: MeshData): void;\n        /**\n         * 绘制三角形\n         * @param mesh mesh\n         * @param index0 顶点0\n         * @param index1 顶点1\n         * @param index2 顶点2\n         *\n         */\n        _renderDrawTriangle(mesh: MeshData, index0: number, index1: number, index2: number): void;\n    }\n}\ndeclare module laya.ani.bone.canvasmesh {\n    import Matrix = laya.maths.Matrix;\n    import Rectangle = laya.maths.Rectangle;\n    import Texture = laya.resource.Texture;\n    /**\n     * @private\n     */\n    class MeshData {\n        /**\n         * 纹理\n         */\n        texture: Texture;\n        /**\n         * uv数据\n         */\n        uvs: Array<any>;\n        /**\n         * 顶点数据\n         */\n        vertices: Array<any>;\n        /**\n         * 顶点索引\n         */\n        indexes: Array<any>;\n        /**\n         * uv变换矩阵\n         */\n        uvTransform: Matrix;\n        /**\n         * 是否有uv变化矩阵\n         */\n        useUvTransform: boolean;\n        /**\n         * 扩展像素,用来去除黑边\n         */\n        canvasPadding: number;\n        /**\n         * 计算mesh的Bounds\n         * @return\n         *\n         */\n        getBounds(): Rectangle;\n    }\n}\ndeclare module laya.ani.bone.canvasmesh {\n    import RenderContext = laya.renders.RenderContext;\n    import Texture = laya.resource.Texture;\n    /**\n     * @private\n     * 简化mesh绘制，多顶点mesh改为四顶点mesh，只绘制矩形不绘制三角形\n     */\n    class SimpleSkinMeshCanvas extends SkinMeshCanvas {\n        init2(texture: Texture, vs: Array<any>, ps: Array<any>, verticles: Array<any>, uvs: Array<any>): void;\n        renderToContext(context: RenderContext): void;\n        _renderWithIndexes(mesh: MeshData): void;\n        _renderDrawTriangle(mesh: MeshData, index0: number, index1: number, index2: number): void;\n    }\n}\ndeclare module laya.ani.bone.canvasmesh {\n    import Matrix = laya.maths.Matrix;\n    import Texture = laya.resource.Texture;\n    /**\n     * @private\n     * Canvas版本的SkinMesh\n     */\n    class SkinMeshCanvas extends CanvasMeshRender {\n        constructor();\n        init2(texture: Texture, vs: Array<any>, ps: Array<any>, verticles: Array<any>, uvs: Array<any>): void;\n        static _tempMatrix: Matrix;\n        render(context: any, x: number, y: number): void;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class DeformAniData {\n        skinName: string;\n        deformSlotDataList: Array<any>;\n        constructor();\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class DeformSlotData {\n        deformSlotDisplayList: Array<any>;\n        constructor();\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class DeformSlotDisplayData {\n        boneSlot: BoneSlot;\n        slotIndex: number;\n        attachment: string;\n        timeList: Array<any>;\n        vectices: Array<any>;\n        tweenKeyList: Array<any>;\n        deformData: Array<any>;\n        frameIndex: number;\n        constructor();\n        apply(time: number, boneSlot: BoneSlot, alpha?: number): void;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class DrawOrderData {\n        time: number;\n        drawOrder: Array<any>;\n        constructor();\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class EventData {\n        name: string;\n        intValue: number;\n        floatValue: number;\n        stringValue: string;\n        time: number;\n        constructor();\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class IkConstraint {\n        name: string;\n        mix: number;\n        bendDirection: number;\n        isSpine: boolean;\n        static radDeg: number;\n        static degRad: number;\n        constructor(data: IkConstraintData, bones: Array<any>);\n        apply(): void;\n        updatePos(x: number, y: number): void;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class IkConstraintData {\n        name: string;\n        targetBoneName: string;\n        boneNames: Array<any>;\n        bendDirection: number;\n        mix: number;\n        isSpine: boolean;\n        targetBoneIndex: number;\n        boneIndexs: Array<any>;\n        constructor();\n    }\n}\ndeclare module laya.ani.bone {\n    import MeshData = laya.ani.bone.canvasmesh.MeshData;\n    import Point = laya.maths.Point;\n    /**\n     * @private\n     * Mesh数据处理工具\n     * @version 1.0\n     *\n     * @created  2017-4-28 下午2:46:23\n     */\n    class MeshTools {\n        /**\n         * 查找边界索引\n         * @param verticles 顶点表\n         * @param offI 0表示x 1表示y\n         * @param min 是否是最小值\n         * @return\n         *\n         */\n        static findEdge(verticles: Array<any>, offI?: number, min?: boolean): number;\n        /**\n         * 从顶点列表中选取一个跨度最大的三角形\n         * @param verticles 顶点列表\n         * @return 三角形顶点索引数组\n         *\n         */\n        static findBestTriangle(verticles: Array<any>): Array<any>;\n        /**\n         * 根据mesh的多顶点列表生成四顶点列表\n         * @param mesh mesh数据\n         * @param rst\n         * @return\n         *\n         */\n        static solveMesh(mesh: MeshData, rst?: Array<any>): Array<any>;\n        /**\n         * 计算ab列表，pointC=point0+a*v1+b*v2\n         * @param pointList pointC列表\n         * @param oX point0.x\n         * @param oY point0.y\n         * @param v1x v1.x\n         * @param v1y v1.y\n         * @param v2x v2.x\n         * @param v2y v2.y\n         * @param rst\n         * @return\n         *\n         */\n        static solvePoints(pointList: Array<any>, oX: number, oY: number, v1x: number, v1y: number, v2x: number, v2y: number, rst?: Array<any>): Array<any>;\n        /**\n         * 根据偏移ab列表，生成对应的点，pointC=point0+a*v1+b*v2\n         * @param abs ab列表\n         * @param oX point0.x\n         * @param oY point0.y\n         * @param v1x v1.x\n         * @param v1y v1.y\n         * @param v2x v2.x\n         * @param v2y v2.y\n         * @param rst\n         * @return\n         *\n         */\n        static transPoints(abs: Array<any>, oX: number, oY: number, v1x: number, v1y: number, v2x: number, v2y: number, rst?: Array<any>): Array<any>;\n        /**\n         * 获取 pointC=point0+a*v1+b*v2\n         * @param a\n         * @param b\n         * @param oX point0.x\n         * @param oY point0.y\n         * @param v1x v1.x\n         * @param v1y v1.y\n         * @param v2x v2.x\n         * @param v2y v2.y\n         * @param rst\n         * @return\n         *\n         */\n        static transPoint(a: number, b: number, oX: number, oY: number, v1x: number, v1y: number, v2x: number, v2y: number, rst?: Array<any>): Array<any>;\n        /**\n         * 解方程 求解 pointC=point0+a*v1+b*v2,计算过程要求v1.x!=0\n         * @param rx pointC.x\n         * @param ry pointC.y\n         * @param oX point0.x\n         * @param oY point0.y\n         * @param v1x v1.x\n         * @param v1y v1.y\n         * @param v2x v2.x\n         * @param v2y v2.y\n         * @param rv 是否交换v1,v2\n         * @param rst\n         * @return\n         *\n         */\n        static solve2(rx: number, ry: number, oX: number, oY: number, v1x: number, v1y: number, v2x: number, v2y: number, rv?: boolean, rst?: Array<any>): Array<any>;\n        /**\n         * 求解 pointC=point0+a*v1+b*v2,计算过程要求v1.x!=0\n         * v1,v2为不平行的向量\n         * @param pointC 目标点\n         * @param point0 起点\n         * @param v1 向量1\n         * @param v2 向量2\n         * @return\n         *\n         */\n        static solve(pointC: Point, point0: Point, v1: Point, v2: Point): Array<any>;\n    }\n}\ndeclare module laya.ani.bone {\n    import Graphics = laya.display.Graphics;\n    /**\n     * @private\n     * 路径作用器\n     * 1，生成根据骨骼计算控制点\n     * 2，根据控制点生成路径，并计算路径上的节点\n     * 3，根据节点，重新调整骨骼位置\n     */\n    class PathConstraint {\n        target: BoneSlot;\n        data: PathConstraintData;\n        bones: Array<any>;\n        position: number;\n        spacing: number;\n        rotateMix: number;\n        translateMix: number;\n        constructor(data: PathConstraintData, bones: Array<any>);\n        /**\n         * 计算骨骼在路径上的节点\n         * @param\tboneSlot\n         * @param\tboneMatrixArray\n         * @param\tgraphics\n         */\n        apply(boneList: Array<any>, graphics: Graphics): void;\n        /**\n         * 计算顶点的世界坐标\n         * @param\tboneSlot\n         * @param\tboneList\n         * @param\tstart\n         * @param\tcount\n         * @param\tworldVertices\n         * @param\toffset\n         */\n        computeWorldVertices2(boneSlot: BoneSlot, boneList: Array<any>, start: number, count: number, worldVertices: Array<any>, offset: number): void;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class PathConstraintData {\n        name: string;\n        bones: Array<any>;\n        target: string;\n        positionMode: string;\n        spacingMode: string;\n        rotateMode: string;\n        offsetRotation: number;\n        position: number;\n        spacing: number;\n        rotateMix: number;\n        translateMix: number;\n        constructor();\n    }\n}\ndeclare module laya.ani.bone {\n    import AnimationPlayer = laya.ani.AnimationPlayer;\n    import Sprite = laya.display.Sprite;\n    import Texture = laya.resource.Texture;\n    import Handler = laya.utils.Handler;\n    /**\n     * 骨骼动画由<code>Templet</code>，<code>AnimationPlayer</code>，<code>Skeleton</code>三部分组成。\n     */\n    class Skeleton extends Sprite {\n        /**\n         * 在canvas模式是否使用简化版的mesh绘制，简化版的mesh将不进行三角形绘制，而改为矩形绘制，能极大提高性能，但是可能某些mesh动画效果会不太正常\n         */\n        static useSimpleMeshInCanvas: boolean;\n        protected _templet: Templet;\n        protected _player: AnimationPlayer;\n        protected _curOriginalData: Float32Array;\n        protected _aniClipIndex: number;\n        protected _clipIndex: number;\n        protected _boneList: Array<any>;\n        protected _aniSectionDic: any;\n        /**\n         * 创建一个Skeleton对象\n         *\n         * @param\ttemplet\t骨骼动画模板\n         * @param\taniMode\t动画模式，0不支持换装，1、2支持换装\n         */\n        constructor(templet?: Templet, aniMode?: number);\n        /**\n         * 初始化动画\n         * @param\ttemplet\t\t模板\n         * @param\taniMode\t\t动画模式\n         * <table>\n         * \t<tr><th>模式</th><th>描述</th></tr>\n         * \t<tr>\n         * \t\t<td>0</td> <td>使用模板缓冲的数据，模板缓冲的数据，不允许修改（内存开销小，计算开销小，不支持换装）</td>\n         * \t</tr>\n         * \t<tr>\n         * \t\t<td>1</td> <td>使用动画自己的缓冲区，每个动画都会有自己的缓冲区，相当耗费内存\t（内存开销大，计算开销小，支持换装）</td>\n         * \t</tr>\n         * \t<tr>\n         * \t\t<td>2</td> <td>使用动态方式，去实时去画（内存开销小，计算开销大，支持换装,不建议使用）</td>\n         * </tr>\n         * </table>\n         */\n        init(templet: Templet, aniMode?: number): void;\n        /**\n         * 得到资源的URL\n         */\n        /**\n         * 设置动画路径\n         */\n        url: string;\n        /**\n         * 通过加载直接创建动画\n         * @param\tpath\t\t要加载的动画文件路径\n         * @param\tcomplete\t加载完成的回调函数\n         * @param\taniMode\t\t与<code>Skeleton.init</code>的<code>aniMode</code>作用一致\n         */\n        load(path: string, complete?: Handler, aniMode?: number): void;\n        protected _createGraphics(_clipIndex?: number): void;\n        /**\n         * 得到当前动画的数量\n         * @return 当前动画的数量\n         */\n        getAnimNum(): number;\n        /**\n         * 得到指定动画的名字\n         * @param\tindex\t动画的索引\n         */\n        getAniNameByIndex(index: number): string;\n        /**\n         * 通过名字得到插槽的引用\n         * @param\tname\t动画的名字\n         * @return 插槽的引用\n         */\n        getSlotByName(name: string): BoneSlot;\n        /**\n         * 通过名字显示一套皮肤\n         * @param\tname\t皮肤的名字\n         * @param\tfreshSlotIndex\t是否将插槽纹理重置到初始化状态\n         */\n        showSkinByName(name: string, freshSlotIndex?: boolean): void;\n        /**\n         * 通过索引显示一套皮肤\n         * @param\tskinIndex\t皮肤索引\n         * @param\tfreshSlotIndex\t是否将插槽纹理重置到初始化状态\n         */\n        showSkinByIndex(skinIndex: number, freshSlotIndex?: boolean): void;\n        /**\n         * 设置某插槽的皮肤\n         * @param\tslotName\t插槽名称\n         * @param\tindex\t插糟皮肤的索引\n         */\n        showSlotSkinByIndex(slotName: string, index: number): void;\n        /**\n         * 设置某插槽的皮肤\n         * @param\tslotName\t插槽名称\n         * @param\tname\t皮肤名称\n         */\n        showSlotSkinByName(slotName: string, name: string): void;\n        /**\n         * 替换插槽贴图名\n         * @param\tslotName 插槽名称\n         * @param\toldName 要替换的贴图名\n         * @param\tnewName 替换后的贴图名\n         */\n        replaceSlotSkinName(slotName: string, oldName: string, newName: string): void;\n        /**\n         * 替换插槽的贴图索引\n         * @param\tslotName 插槽名称\n         * @param\toldIndex 要替换的索引\n         * @param\tnewIndex 替换后的索引\n         */\n        replaceSlotSkinByIndex(slotName: string, oldIndex: number, newIndex: number): void;\n        /**\n         * 设置自定义皮肤\n         * @param\tname\t\t插糟的名字\n         * @param\ttexture\t\t自定义的纹理\n         */\n        setSlotSkin(slotName: string, texture: Texture): void;\n        /**\n         * 播放动画\n         *\n         * @param\tnameOrIndex\t动画名字或者索引\n         * @param\tloop\t\t是否循环播放\n         * @param\tforce\t\tfalse,如果要播的动画跟上一个相同就不生效,true,强制生效\n         * @param\tstart\t\t起始时间\n         * @param\tend\t\t\t结束时间\n         * @param\tfreshSkin\t是否刷新皮肤数据\n         */\n        play(nameOrIndex: any, loop: boolean, force?: boolean, start?: number, end?: number, freshSkin?: boolean): void;\n        /**\n         * 停止动画\n         */\n        stop(): void;\n        /**\n         * 设置动画播放速率\n         * @param\tvalue\t1为标准速率\n         */\n        playbackRate(value: number): void;\n        /**\n         * 暂停动画的播放\n         */\n        paused(): void;\n        /**\n         * 恢复动画的播放\n         */\n        resume(): void;\n        /**\n         * 销毁当前动画\n         */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * @private\n         * 得到帧索引\n         */\n        /**\n         * @private\n         * 设置帧索引\n         */\n        index: number;\n        /**\n         * 得到总帧数据\n         */\n        readonly total: number;\n        /**\n         * 得到播放器的引用\n         */\n        readonly player: AnimationPlayer;\n        /**\n         * 得到动画模板的引用\n         */\n        readonly templet: Templet;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class SkinData {\n        name: string;\n        slotArr: Array<any>;\n    }\n}\ndeclare module laya.ani.bone {\n    import Texture = laya.resource.Texture;\n    /**\n     * @private\n     */\n    class SkinSlotDisplayData {\n        name: string;\n        attachmentName: string;\n        type: number;\n        transform: Transform;\n        width: number;\n        height: number;\n        texture: Texture;\n        bones: Array<any>;\n        uvs: Array<any>;\n        weights: Array<any>;\n        triangles: Array<any>;\n        vertices: Array<any>;\n        lengths: Array<any>;\n        verLen: number;\n        createTexture(currTexture: Texture): Texture;\n        destory(): void;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class SlotData {\n        name: string;\n        displayArr: Array<any>;\n        getDisplayByName(name: string): number;\n    }\n}\ndeclare module laya.ani.bone {\n    import AnimationTemplet = laya.ani.AnimationTemplet;\n    import Graphics = laya.display.Graphics;\n    import Matrix = laya.maths.Matrix;\n    import Texture = laya.resource.Texture;\n    /**\n     * 动画模板类\n     */\n    class Templet extends AnimationTemplet {\n        static LAYA_ANIMATION_VISION: string;\n        static TEMPLET_DICTIONARY: any;\n        /** 存放原始骨骼信息 */\n        srcBoneMatrixArr: Array<any>;\n        /** IK数据 */\n        ikArr: Array<any>;\n        /** transform数据 */\n        tfArr: Array<any>;\n        /** path数据 */\n        pathArr: Array<any>;\n        /** 存放插槽数据的字典 */\n        boneSlotDic: any;\n        /** 绑定插槽数据的字典 */\n        bindBoneBoneSlotDic: any;\n        /** 存放插糟数据的数组 */\n        boneSlotArray: Array<any>;\n        /** 皮肤数据 */\n        skinDataArray: Array<any>;\n        /** 皮肤的字典数据 */\n        skinDic: any;\n        /** 存放纹理数据 */\n        subTextureDic: any;\n        /** 是否解析失败 */\n        isParseFail: boolean;\n        /** 反转矩阵，有些骨骼动画要反转才能显示 */\n        yReverseMatrix: Matrix;\n        /** 渲染顺序动画数据 */\n        drawOrderAniArr: Array<any>;\n        /** 事件动画数据 */\n        eventAniArr: Array<any>;\n        attachmentNames: Array<any>;\n        /** 顶点动画数据 */\n        deformAniArr: Array<any>;\n        /** 实际显示对象列表，用于销毁用 */\n        skinSlotDisplayDataArr: Array<any>;\n        isParserComplete: boolean;\n        aniSectionDic: any;\n        tMatrixDataLen: number;\n        mRootBone: Bone;\n        mBoneArr: Array<any>;\n        loadAni(url: string): void;\n        /**\n         * 解析骨骼动画数据\n         * @param\ttexture\t\t\t骨骼动画用到的纹理\n         * @param\tskeletonData\t骨骼动画信息及纹理分块信息\n         * @param\tplaybackRate\t缓冲的帧率数据（会根据帧率去分帧）\n         */\n        parseData(texture: Texture, skeletonData: ArrayBuffer, playbackRate?: number): void;\n        /**\n         * 创建动画\n         * 0,使用模板缓冲的数据，模板缓冲的数据，不允许修改\t\t\t\t\t（内存开销小，计算开销小，不支持换装）\n         * 1,使用动画自己的缓冲区，每个动画都会有自己的缓冲区，相当耗费内存\t（内存开销大，计算开销小，支持换装）\n         * 2,使用动态方式，去实时去画\t\t\t\t\t\t\t\t\t\t（内存开销小，计算开销大，支持换装,不建议使用）\n         * @param\taniMode 0\t动画模式，0:不支持换装,1,2支持换装\n         * @return\n         */\n        buildArmature(aniMode?: number): Skeleton;\n        /**\n         * @private\n         * 解析动画\n         * @param\tdata\t\t\t解析的二进制数据\n         * @param\tplaybackRate\t帧率\n         */\n        parse(data: ArrayBuffer): void;\n        /**\n         * 得到指定的纹理\n         * @param\tname\t纹理的名字\n         * @return\n         */\n        getTexture(name: string): Texture;\n        /**\n         * @private\n         * 显示指定的皮肤\n         * @param\tboneSlotDic\t插糟字典的引用\n         * @param\tskinIndex\t皮肤的索引\n         * @param\tfreshDisplayIndex\t是否重置插槽纹理\n         */\n        showSkinByIndex(boneSlotDic: any, skinIndex: number, freshDisplayIndex?: boolean): boolean;\n        /**\n         * 通过皮肤名字得到皮肤索引\n         * @param\tskinName 皮肤名称\n         * @return\n         */\n        getSkinIndexByName(skinName: string): number;\n        /**\n         * @private\n         * 得到缓冲数据\n         * @param\taniIndex\t动画索引\n         * @param\tframeIndex\t帧索引\n         * @return\n         */\n        getGrahicsDataWithCache(aniIndex: number, frameIndex: number): Graphics;\n        /**\n         * @private\n         * 保存缓冲grahpics\n         * @param\taniIndex\t动画索引\n         * @param\tframeIndex\t帧索引\n         * @param\tgraphics\t要保存的数据\n         */\n        setGrahicsDataWithCache(aniIndex: number, frameIndex: number, graphics: Graphics): void;\n        /**\n         * 释放纹理\n         */\n        destroy(): void;\n        /**\n         * 通过索引得动画名称\n         * @param\tindex\n         * @return\n         */\n        getAniNameByIndex(index: number): string;\n        rate: number;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class TfConstraint {\n        target: Bone;\n        rotateMix: number;\n        translateMix: number;\n        scaleMix: number;\n        shearMix: number;\n        constructor(data: TfConstraintData, bones: Array<any>);\n        apply(): void;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * @private\n     */\n    class TfConstraintData {\n        name: string;\n        boneIndexs: Array<any>;\n        targetIndex: number;\n        rotateMix: number;\n        translateMix: number;\n        scaleMix: number;\n        shearMix: number;\n        offsetRotation: number;\n        offsetX: number;\n        offsetY: number;\n        offsetScaleX: number;\n        offsetScaleY: number;\n        offsetShearY: number;\n    }\n}\ndeclare module laya.ani.bone {\n    import Matrix = laya.maths.Matrix;\n    /**\n     * @private\n     */\n    class Transform {\n        skX: number;\n        skY: number;\n        scX: number;\n        scY: number;\n        x: number;\n        y: number;\n        skewX: number;\n        skewY: number;\n        initData(data: any): void;\n        getMatrix(): Matrix;\n        skew(m: Matrix, x: number, y: number): Matrix;\n    }\n}\ndeclare module laya.ani.bone {\n    /**\n     * 用于UV转换的工具类\n     * @private\n     */\n    class UVTools {\n        constructor();\n        /**\n         * 将相对于大图图集的小UV转换成相对某个大图的UV\n         * @param\tbigUV 某个大图的UV\n         * @param\tsmallUV 大图图集中的UV\n         * @return 相对于某个大图的UV\n         */\n        static getRelativeUV(bigUV: Array<any>, smallUV: Array<any>, rst?: Array<any>): Array<any>;\n        /**\n         * 将相对于某个大图的UV转换成相对于大图图集的UV\n         * @param\tbigUV 某个大图的UV\n         * @param\tsmallUV 相对于某个大图的UV\n         * @return 相对于大图图集的UV\n         */\n        static getAbsoluteUV(bigUV: Array<any>, smallUV: Array<any>, rst?: Array<any>): Array<any>;\n    }\n}\ndeclare module laya.ani {\n    import Graphics = laya.display.Graphics;\n    /**\n     * @private\n     */\n    class GraphicsAni extends Graphics {\n        constructor();\n        /**\n         * @private\n         * 画自定义蒙皮动画\n         * @param\tskin\n         */\n        drawSkin(skin: any): void;\n    }\n}\ndeclare module laya.ani {\n    /**\n     * @private\n     * @author ...\n     */\n    class KeyFramesContent {\n        startTime: number;\n        duration: number;\n        interpolationData: Array<any>;\n        data: Float32Array;\n        nextData: Float32Array;\n    }\n}\ndeclare module laya.ani.math {\n    /**\n     * @private\n     * ...\n     * @author ww\n     */\n    class BezierLerp {\n        constructor();\n        static getBezierRate(t: number, px0: number, py0: number, px1: number, py1: number): number;\n    }\n}\ndeclare module laya.ani.swf {\n    import Sprite = laya.display.Sprite;\n    import Byte = laya.utils.Byte;\n    import Handler = laya.utils.Handler;\n    /**\n     * <p> <code>MovieClip</code> 用于播放经过工具处理后的 swf 动画。</p>\n     */\n    class MovieClip extends Sprite {\n        protected static _ValueList: Array<any>;\n        protected _start: number;\n        protected _Pos: number;\n        protected _data: Byte;\n        protected _curIndex: number;\n        protected _preIndex: number;\n        protected _playIndex: number;\n        protected _playing: boolean;\n        protected _ended: boolean;\n        protected _count: number;\n        _ids: any;\n        protected _loadedImage: any;\n        _idOfSprite: Array<any>;\n        _parentMovieClip: MovieClip;\n        _movieClipList: Array<any>;\n        protected _labels: any;\n        /**资源根目录。*/\n        basePath: string;\n        /** 播放间隔(单位：毫秒)。*/\n        interval: number;\n        /**是否循环播放 */\n        loop: boolean;\n        /**\n         * 创建一个 <code>MovieClip</code> 实例。\n         * @param parentMovieClip 父MovieClip,自己创建时不需要传该参数\n         */\n        constructor(parentMovieClip?: MovieClip);\n        /**\n         * <p>销毁此对象。以及销毁引用的Texture</p>\n         * @param\tdestroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n         */\n        destroy(destroyChild?: boolean): void;\n        _setDisplay(value: boolean): void;\n        updates(): void;\n        /**当前播放索引。*/\n        index: number;\n        /**\n         * 增加一个标签到index帧上，播放到此index后会派发label事件\n         * @param\tlabel\t标签名称\n         * @param\tindex\t索引位置\n         */\n        addLabel(label: string, index: number): void;\n        /**\n         * 删除某个标签\n         * @param\tlabel 标签名字，如果label为空，则删除所有Label\n         */\n        removeLabel(label: string): void;\n        /**\n         * 帧总数。\n         */\n        readonly count: number;\n        /**\n         * 是否在播放中\n         */\n        readonly playing: boolean;\n        /**\n         * 停止播放动画。\n         */\n        stop(): void;\n        /**\n         * 跳到某帧并停止播放动画。\n         * @param frame 要跳到的帧\n         */\n        gotoAndStop(index: number): void;\n        /**\n         * 播放动画。\n         * @param\tindex 帧索引。\n         */\n        play(index?: number, loop?: boolean): void;\n        _setData(data: Byte, start: number): void;\n        /**\n         * 资源地址。\n         */\n        url: string;\n        /**\n         * 加载资源。\n         * @param\turl swf 资源地址。\n         * @param   atlas  是否使用图集资源\n         * @param   atlasPath  图集路径，默认使用与swf同名的图集\n         */\n        load(url: string, atlas?: boolean, atlasPath?: string): void;\n        /**\n         * 从开始索引播放到结束索引，结束之后出发complete回调\n         * @param\tstart\t开始索引\n         * @param\tend\t\t结束索引\n         * @param\tcomplete\t结束回调\n         */\n        playTo(start: number, end: number, complete?: Handler): void;\n    }\n}\ndeclare module laya.d3.animation {\n    import Animator = laya.d3.component.Animator;\n    import Avatar = laya.d3.core.Avatar;\n    import Resource = laya.resource.Resource;\n    /**\n     * <code>AnimationClip</code> 类用于动画片段资源。\n     */\n    class AnimationClip extends Resource {\n        /**\n         * 加载动画模板。\n         * @param url 动画模板地址。\n         */\n        static load(url: string): AnimationClip;\n        _version: string;\n        _nodes: Array<any>;\n        _nodesMap: any;\n        _cachePropertyMap: Int32Array;\n        _nodeToCachePropertyMap: Int32Array;\n        _unCachePropertyMap: Int32Array;\n        _duration: number;\n        _frameRate: number;\n        _animationEvents: Array<any>;\n        _publicClipDatas: Array<any>;\n        /**是否循环。*/\n        islooping: boolean;\n        /**\n         * 获取动画片段时长。\n         */\n        duration(): number;\n        /**\n         * 创建一个 <code>AnimationClip</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _getFullKeyframeIndicesWithCache(cacheInterval: number): Array<any>;\n        /**\n         * @private\n         */\n        _cacheFullKeyframeIndices(cacheInterval: number, datas: Array<any>): void;\n        /**\n         * @private\n         */\n        _getAnimationDataWithCache(cacheRate: number, frameIndex: number): Array<any>;\n        /**\n         * @private\n         */\n        _cacheAnimationData(cacheRate: number, frameIndex: number, datas: Array<any>): void;\n        /**\n         * @private\n         */\n        _getAvatarDataWithCache(avatar: Avatar, cacheRate: number, frameIndex: number): Array<any>;\n        /**\n         * @private\n         */\n        _cacheAvatarData(avatar: Avatar, cacheRate: number, frameIndex: number, datas: Array<any>): void;\n        /**\n         * @private\n         */\n        _evaluateAnimationlDatasCacheMode(nodeOwners: any, nodesFrameIndices: Array<any>, animator: Animator, clipDatas: Array<Float32Array>, propertyMap: Int32Array): void;\n        /**\n         * @private\n         */\n        _evaluateAnimationlDatasRealTime(nodeOwners: any, playCurTime: number, outAnimationDatas: Array<Float32Array>, propertyMap: Int32Array): void;\n        /**\n         * 添加动画事件。\n         */\n        addEvent(event: AnimationEvent): void;\n        /**\n         * @inheritDoc\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.animation {\n    import Byte = laya.utils.Byte;\n    /**\n     * @private\n     */\n    class AnimationClipParser01 {\n        /**\n         * @private\n         */\n        static parse(clip: AnimationClip, reader: Byte): void;\n        /**\n         * @private\n         */\n        static READ_ANIMATIONS(): void;\n    }\n}\ndeclare module laya.d3.animation {\n    import Byte = laya.utils.Byte;\n    /**\n     * @private\n     */\n    class AnimationClipParser02 {\n        /**\n         * @private\n         */\n        static parse(clip: AnimationClip, reader: Byte): void;\n        /**\n         * @private\n         */\n        static READ_ANIMATIONS(): void;\n    }\n}\ndeclare module laya.d3.animation {\n    /**\n     * <code>AnimationEvent</code> 类用于实现动画事件。\n     */\n    class AnimationEvent {\n        /** 事件触发时间。*/\n        time: number;\n        /** 事件触发名称。*/\n        eventName: string;\n        /** 事件触发参数。*/\n        params: Array<any>;\n        /**\n         * 创建一个 <code>AnimationEvent</code> 实例。\n         */\n        constructor();\n    }\n}\ndeclare module laya.d3.animation {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>BoneNode</code> 类用于实现骨骼节点。\n     */\n    class AnimationNode implements IClone {\n        static _propertyIndexDic: any;\n        static _propertySetFuncs: Array<any>;\n        static _propertyGetFuncs: Array<any>;\n        /**\n         *@private\n         */\n        static __init__(): void;\n        /**\n         *注册Animator动画。\n         */\n        static registerAnimationNodeProperty(propertyName: string, getFunc: Function, setFunc: Function): void;\n        _parent: AnimationNode;\n        transform: AnimationTransform3D;\n        /**节点名称。 */\n        name: string;\n        /**\n         * 创建一个新的 <code>BoneNode</code> 实例。\n         */\n        constructor();\n        /**\n         * 添加子节点。\n         * @param\tchild  子节点。\n         */\n        addChild(child: AnimationNode): void;\n        /**\n         * 移除子节点。\n         * @param\tchild 子节点。\n         */\n        removeChild(child: AnimationNode): void;\n        /**\n         * 根据名字获取子节点。\n         * @param\tname 名字。\n         */\n        getChildByName(name: string): AnimationNode;\n        /**\n         * 根据索引获取子节点。\n         * @param\tindex 索引。\n         */\n        getChildByIndex(index: number): AnimationNode;\n        /**\n         * 获取子节点的个数。\n         */\n        getChildCount(): number;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.animation {\n    import Transform3D = laya.d3.core.Transform3D;\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <code>Transform3D</code> 类用于实现3D变换。\n     */\n    class AnimationTransform3D extends EventDispatcher {\n        _localRotationEuler: Float32Array;\n        _owner: AnimationNode;\n        _worldUpdate: boolean;\n        _entity: Transform3D;\n        /**\n         * 创建一个 <code>Transform3D</code> 实例。\n         * @param owner 所属精灵。\n         */\n        constructor(owner: AnimationNode);\n        /**\n         * @private\n         */\n        _setWorldMatrixAndUpdate(matrix: Float32Array): void;\n        /**\n         * @private\n         */\n        _setWorldMatrixNoUpdate(matrix: Float32Array): void;\n        /**\n         * @private\n         */\n        _setWorldMatrixIgnoreUpdate(matrix: Float32Array): void;\n        /**\n         * 获取局部位置。\n         * @return\t局部位置。\n         */\n        getLocalPosition(): Float32Array;\n        /**\n         * 设置局部位置。\n         * @param value 局部位置。\n         */\n        setLocalPosition(value: Float32Array): void;\n        /**\n         * 获取局部旋转。\n         * @return\t局部旋转。\n         */\n        getLocalRotation(): Float32Array;\n        /**\n         * 设置局部旋转。\n         * @param value\t局部旋转。\n         */\n        setLocalRotation(value: Float32Array): void;\n        /**\n         * 获取局部缩放。\n         * @return\t局部缩放。\n         */\n        getLocalScale(): Float32Array;\n        /**\n         * 设置局部缩放。\n         * @param\tvalue 局部缩放。\n         */\n        setLocalScale(value: Float32Array): void;\n        /**\n         * 获取局部空间的旋转角度。\n         * @return\t欧拉角的旋转值，顺序为x、y、z。\n         */\n        getLocalRotationEuler(): Float32Array;\n        /**\n         * 设置局部空间的旋转角度。\n         * @param\tvalue 欧拉角的旋转值，顺序为x、y、z。\n         */\n        setLocalRotationEuler(value: Float32Array): void;\n        /**\n         * 获取世界矩阵。\n         * @return\t世界矩阵。\n         */\n        getWorldMatrix(): Float32Array;\n        /**\n         * 设置父3D变换。\n         * @param\tvalue 父3D变换。\n         */\n        setParent(value: AnimationTransform3D): void;\n    }\n}\ndeclare module laya.d3.animation {\n    /**\n     * @private\n     */\n    class Keyframe {\n        startTime: number;\n        inTangent: Float32Array;\n        outTangent: Float32Array;\n        data: Float32Array;\n        duration: number;\n        next: Keyframe;\n    }\n}\ndeclare module laya.d3.animation {\n    /**\n     * @private\n     */\n    class KeyframeNode {\n        _cacheProperty: boolean;\n        path: Array<any>;\n        componentType: string;\n        propertyNameID: number;\n        keyFrameWidth: number;\n        defaultData: Float32Array;\n        keyFrames: Array<any>;\n    }\n}\ndeclare module laya.d3.component.animation {\n    import AnimationPlayer = laya.ani.AnimationPlayer;\n    import AnimationTemplet = laya.ani.AnimationTemplet;\n    import Component3D = laya.d3.component.Component3D;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    /**\n     * <code>KeyframeAnimation</code> 类用于帧动画组件的父类。\n     */\n    class KeyframeAnimations extends Component3D {\n        protected _player: AnimationPlayer;\n        protected _templet: AnimationTemplet;\n        /**\n         * 设置url地址。\n         * @param value 地址。\n         */\n        url: string;\n        /**\n         * 获取动画模板。\n         * @return value 动画模板。\n         */\n        /**\n         * 设置动画模板。\n         * @param value 设置动画模板。\n         */\n        templet: AnimationTemplet;\n        /**\n         * 获取动画播放器。\n         * @return 动画播放器。\n         */\n        readonly player: AnimationPlayer;\n        /**\n         * 获取播放器帧数。\n         * @return 播放器帧数。\n         */\n        readonly currentFrameIndex: number;\n        /**\n         * 获取播放器的动画索引。\n         * @return 动画索引。\n         */\n        readonly currentAnimationClipIndex: number;\n        /**\n         * 获取播放器当前动画的节点数量。\n         * @return 节点数量。\n         */\n        readonly nodeCount: number;\n        /**\n         * 创建一个新的 <code>KeyframeAnimation</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         * 载入组件时执行\n         */\n        _load(owner: ComponentNode): void;\n        /**\n         * @private\n         * 卸载组件时执行\n         */\n        _unload(owner: ComponentNode): void;\n    }\n}\ndeclare module laya.d3.component.animation {\n    import AnimationTemplet = laya.ani.AnimationTemplet;\n    import RenderState = laya.d3.core.render.RenderState;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    /**\n     * <code>RigidAnimations</code> 类用于创建变换动画组件。\n     */\n    class RigidAnimations extends KeyframeAnimations {\n        /**\n         * 设置url地址。\n         * @param value 地址。\n         */\n        url: string;\n        templet: AnimationTemplet;\n        /**\n         * 创建一个新的 <code>RigidAnimations</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         * 初始化载入摄像机动画组件。\n         * @param\towner 所属精灵对象。\n         */\n        _load(owner: ComponentNode): void;\n        /**\n         * @private\n         * 更新摄像机动画组件。\n         * @param\tstate 渲染状态。\n         */\n        _update(state: RenderState): void;\n        /**\n         * @private\n         * 卸载组件时执行。\n         */\n        _unload(owner: ComponentNode): void;\n    }\n}\ndeclare module laya.d3.component.animation {\n    import AnimationTemplet = laya.ani.AnimationTemplet;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import MeshSprite3D = laya.d3.core.MeshSprite3D;\n    import RenderState = laya.d3.core.render.RenderState;\n    /**\n     * <code>SkinAnimations</code> 类用于创建蒙皮动画组件。\n     */\n    class SkinAnimations extends KeyframeAnimations {\n        protected static _splitAnimationDatas(indices: Uint8Array, bonesData: Float32Array, subAnimationDatas: Float32Array): void;\n        protected _tempCurAnimationData: Array<any>;\n        protected _tempCurBonesData: Float32Array;\n        protected _curOriginalData: Float32Array;\n        protected _lastFrameIndex: number;\n        protected _curMeshAnimationData: Float32Array;\n        protected _curBonesDatas: Float32Array;\n        protected _curAnimationDatas: Array<any>;\n        protected _ownerMesh: MeshSprite3D;\n        protected _boneIndexToMeshList: Array<any>;\n        protected _oldVersion: boolean;\n        /**\n         * 获取骨骼数据。\n         * @return 骨骼数据。\n         */\n        readonly curBonesDatas: Float32Array;\n        templet: AnimationTemplet;\n        /**\n         * 创建一个新的 <code>SkinAnimations</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         * 初始化载入蒙皮动画组件。\n         * @param\towner 所属精灵对象。\n         */\n        _load(owner: ComponentNode): void;\n        /**\n         * @private\n         * 更新蒙皮动画组件。\n         * @param\tstate 渲染状态参数。\n         */\n        _update(state: RenderState): void;\n        /**\n         * @private\n         * 在渲染前更新蒙皮动画组件渲染参数。\n         * @param\tstate 渲染状态参数。\n         */\n        _preRenderUpdate(state: RenderState): void;\n        /**\n         * @private\n         * 卸载组件时执行\n         */\n        _unload(owner: ComponentNode): void;\n    }\n}\ndeclare module laya.d3.component {\n    import AnimationClip = laya.d3.animation.AnimationClip;\n    import Avatar = laya.d3.core.Avatar;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import RenderState = laya.d3.core.render.RenderState;\n    import IDestroy = laya.resource.IDestroy;\n    /**\n     * <code>Animations</code> 类用于创建动画组件。\n     */\n    class Animator extends Component3D implements IDestroy {\n        /**无效矩阵,禁止修改*/\n        static deafaultMatrix: Float32Array;\n        _cacheNodesSpriteOwners: Array<any>;\n        _curAvatarNodeDatas: Array<any>;\n        _cacheNodesToSpriteMap: Array<any>;\n        _cacheSpriteToNodesMap: Array<any>;\n        _cacheFullFrames: Array<any>;\n        /**@private\t*/\n        _avatarNodeMap: any;\n        /**@private\t*/\n        _avatarNodes: Array<any>;\n        /**@private\t*/\n        _canCache: boolean;\n        _lastFrameIndex: number;\n        /**\t是否为缓存模式*/\n        isCache: boolean;\n        /** 播放速率*/\n        playbackRate: number;\n        /**\t激活时是否自动播放*/\n        playOnWake: boolean;\n        /**\n         * 获取avatar。\n         * @return avator。\n         */\n        /**\n         * 设置avatar。\n         * @param value avatar。\n         */\n        avatar: Avatar;\n        /**\n         * 获取默认动画片段。\n         * @return  默认动画片段。\n         */\n        /**\n         * 设置默认动画片段,AnimationClip名称为默认playName。\n         * @param value 默认动画片段。\n         */\n        clip: AnimationClip;\n        /**\n         *  获取缓存播放帧，缓存模式下生效。\n         * @return\tvalue 缓存播放帧率。\n         */\n        /**\n         *  设置缓存播放帧率，缓存模式下生效。注意：修改此值会有计算开销。*\n         * @return\tvalue 缓存播放帧率\n         */\n        cacheFrameRate: number;\n        /**\n         *  获取缓存播放速率，缓存模式下生效。*\n         * @return\t 缓存播放速率。\n         */\n        /**\n         *  设置缓存播放速率，缓存模式下生效。注意：修改此值会有计算开销。*\n         * @return\tvalue 缓存播放速率。\n         */\n        cachePlayRate: number;\n        /**\n         * 获取当前动画索引\n         * @return\tvalue 当前动画索引\n         */\n        readonly currentPlayClip: AnimationClip;\n        /**\n         * 获取当前帧数\n         * @return\t 当前帧数\n         */\n        readonly currentFrameIndex: number;\n        /**\n         *  获取当前精确时间，不包括重播时间\n         * @return\tvalue 当前时间\n         */\n        readonly currentPlayTime: number;\n        /**\n         *  获取当前帧时间，不包括重播时间\n         * @return\tvalue 当前时间\n         */\n        readonly currentFrameTime: number;\n        /**\n         * 获取当前播放状态\n         * @return\t当前播放状态\n         */\n        readonly playState: number;\n        /**\n         * 设置当前播放位置\n         * @param\tvalue 当前时间\n         */\n        playbackTime: number;\n        /**\n         * 创建一个 <code>Animation</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _handleSpriteOwnersBySprite(clipIndex: number, isLink: boolean, path: Array<any>, sprite: Sprite3D): void;\n        /**\n         *@private\n         */\n        _evaluateAvatarNodesCacheMode(avatarOwners: Array<any>, clip: AnimationClip, publicClipDatas: Array<any>, avatarNodeDatas: Array<any>, unCacheMap: Int32Array): void;\n        /**\n         *@private\n         */\n        _evaluateAvatarNodesRealTime(avatarOwners: Array<any>, clip: AnimationClip, publicClipDatas: Array<any>, avatarNodeDatas: Array<any>, unCacheMap: Int32Array): void;\n        /**\n         *@private\n         */\n        _updateAvatarNodesToSpriteCacheMode(clip: AnimationClip, avatarNodeDatas: Array<any>): void;\n        /**\n         *@private\n         */\n        _updateAvatarNodesToSpriteRealTime(): void;\n        /**\n         * @private\n         */\n        _updatePlayer(elapsedTime: number): void;\n        /**\n         * @private\n         * 更新蒙皮动画组件。\n         * @param\tstate 渲染状态参数。\n         */\n        _update(state: RenderState): void;\n        /**\n         * @inheritDoc\n         */\n        _load(owner: ComponentNode): void;\n        /**\n         * @inheritDoc\n         */\n        _unload(owner: ComponentNode): void;\n        /**\n         * @private\n         */\n        _destroy(): void;\n        /**\n         * @private\n         */\n        _cloneTo(dest: Component3D): void;\n        /**\n         * 添加动画片段。\n         * @param\tclip 动画片段。\n         * @param\tplayName 动画片段播放名称，如果为null,则使用clip.name作为播放名称。\n         * @param   开始帧率。\n         * @param   结束帧率。\n         */\n        addClip(clip: AnimationClip, playName?: string, startFrame?: number, endFrame?: number): void;\n        /**\n         * 移除动画片段。\n         * @param\tclip 动画片段。\n         */\n        removeClip(clip: AnimationClip): void;\n        /**\n         * 通过播放名字移除动画片段。\n         * @param\tplayName 播放名字。\n         */\n        removeClipByName(playName: string): void;\n        /**\n         * 通过播放名字获取动画片段。\n         * @param\tplayName 播放名字。\n         * @return 动画片段。\n         */\n        getClip(playName: string): AnimationClip;\n        /**\n         * 获取动画片段个数。\n         * @return\t动画个数。\n         */\n        getClipCount(): number;\n        /**\n         * 播放动画。\n         * @param\tname 如果为null则播放默认动画，否则按名字播放动画片段。\n         * @param\tplaybackRate 播放速率。\n         * @param\tstartFrame 开始帧率。\n         * @param\tendFrame 结束帧率.-1表示为最大结束帧率。\n         */\n        play(name?: string, playbackRate?: number): void;\n        /**\n         * 停止播放当前动画\n         */\n        stop(): void;\n        /**\n         * 关联精灵节点到Avatar节点,此Animator必须有Avatar文件。\n         * @param nodeName 关联节点的名字。\n         * @param sprite3D 精灵节点。\n         * @return 是否关联成功。\n         */\n        linkSprite3DToAvatarNode(nodeName: string, sprite3D: Sprite3D): boolean;\n        /**\n         * 解除精灵节点到Avatar节点的关联,此Animator必须有Avatar文件。\n         * @param sprite3D 精灵节点。\n         * @return 是否解除关联成功。\n         */\n        unLinkSprite3DToAvatarNode(sprite3D: Sprite3D): boolean;\n        /**\n         * 获取当前是否暂停\n         * @return\t是否暂停\n         */\n        /**\n         * 设置是否暂停\n         * @param\tvalue 是否暂停\n         */\n        paused: boolean;\n    }\n}\ndeclare module laya.d3.component {\n    import SkinAnimations = laya.d3.component.animation.SkinAnimations;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import RenderState = laya.d3.core.render.RenderState;\n    /**\n     * <code>AttachPoint</code> 类用于创建挂点组件。\n     */\n    class AttachPoint extends Component3D {\n        protected _attachSkeleton: SkinAnimations;\n        protected _extenData: Float32Array;\n        /**挂点骨骼的名称。*/\n        attachBones: Array<any>;\n        /**挂点骨骼的变换矩阵。*/\n        matrixs: Array<any>;\n        /**\n         * 创建一个新的 <code>AttachPoint</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         * 初始化载入挂点组件。\n         * @param\towner 所属精灵对象。\n         */\n        _load(owner: ComponentNode): void;\n        /**\n         * @private\n         * 更新挂点组件。\n         * @param\tstate 渲染状态。\n         */\n        _update(state: RenderState): void;\n    }\n}\ndeclare module laya.d3.component {\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import IUpdate = laya.d3.core.render.IUpdate;\n    import RenderState = laya.d3.core.render.RenderState;\n    import EventDispatcher = laya.events.EventDispatcher;\n    import IDestroy = laya.resource.IDestroy;\n    /**\n     * <code>Component3D</code> 类用于创建组件的父类。\n     */\n    class Component3D extends EventDispatcher implements IUpdate, IDestroy {\n        protected static _uniqueIDCounter: number;\n        protected _id: number;\n        protected _enable: boolean;\n        protected _owner: ComponentNode;\n        /**是否已执行start函数。*/\n        started: boolean;\n        /**\n         * 获取唯一标识ID。\n         * @return 唯一标识ID。\n         */\n        readonly id: number;\n        /**\n         * 获取所属Sprite3D节点。\n         * @return 所属Sprite3D节点。\n         */\n        readonly owner: ComponentNode;\n        /**\n         * 获取是否启用。\n         * @return 是否启动。\n         */\n        /**\n         * 设置是否启用。\n         * @param value 是否启动\n         */\n        enable: boolean;\n        /**\n         * 获取是否为单实例组件。\n         * @return  是否为单实例组件。\n         */\n        readonly isSingleton: boolean;\n        /**\n         * 获取是否已销毁。\n         * @return 是否已销毁。\n         */\n        readonly destroyed: boolean;\n        /**\n         * 创建一个新的 <code>Component3D</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         * 初始化组件。\n         * @param\towner 所属Sprite3D节点。\n         */\n        _initialize(owner: ComponentNode): void;\n        /**\n         * @private\n         * 销毁组件。\n         */\n        _destroy(): void;\n        /**\n         * @private\n         * 载入组件时执行,可重写此函数。\n         */\n        _load(owner: ComponentNode): void;\n        /**\n         * @private\n         * 在任意第一次更新时执行,可重写此函数。\n         */\n        _start(state: RenderState): void;\n        /**\n         * @private\n         * 更新组件,可重写此函数。\n         * @param\tstate 渲染状态参数。\n         */\n        _update(state: RenderState): void;\n        /**\n         * @private\n         * 更新的最后阶段执行,可重写此函数。\n         * @param state 渲染状态参数。\n         */\n        _lateUpdate(state: RenderState): void;\n        /**\n         * @private\n         * 渲染前设置组件相关参数,可重写此函数。\n         * @param\tstate 渲染状态参数。\n         */\n        _preRenderUpdate(state: RenderState): void;\n        /**\n         *  @private\n         * 渲染的最后阶段执行,可重写此函数。\n         * @param\tstate 渲染状态参数。\n         */\n        _postRenderUpdate(state: RenderState): void;\n        /**\n         * @private\n         * 卸载组件时执行,可重写此函数。\n         */\n        _unload(owner: ComponentNode): void;\n        /**\n         * @private\n         */\n        _cloneTo(dest: Component3D): void;\n    }\n}\ndeclare module laya.d3.component {\n    import Sprite3D = laya.d3.core.Sprite3D;\n    /**\n     * <code>PathFinding</code> 类用于创建寻路。\n     */\n    class PathFind extends Component3D {\n        _setting: any;\n        /**寻路网格。*/\n        grid: any;\n        /**\n         * 获取寻路设置。\n         * @return 寻路设置。\n         */\n        /**\n         * 设置寻路设置。\n         * @param value 寻路设置。\n         */\n        setting: any;\n        /**\n         * 创建一个新的 <code>PathFinding</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         * 初始化载入蒙皮动画组件。\n         * @param\towner 所属精灵对象。\n         */\n        _load(owner: Sprite3D): void;\n        /**\n         * 寻找路径。\n         * @param\tstartX 开始X。\n         * @param\tstartZ 开始Z。\n         * @param\tendX 结束X。\n         * @param\tendZ 结束Z。\n         * @return  路径。\n         */\n        findPath(startX: number, startZ: number, endX: number, endZ: number): Array<any>;\n    }\n}\ndeclare module laya.d3.component.physics {\n    import Component3D = laya.d3.component.Component3D;\n    import BoundBox = laya.d3.math.BoundBox;\n    import OrientedBoundBox = laya.d3.math.OrientedBoundBox;\n    import Ray = laya.d3.math.Ray;\n    import Vector3 = laya.d3.math.Vector3;\n    import RaycastHit = laya.d3.utils.RaycastHit;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    /**\n     * <code>BoxCollider</code> 类用于创建盒子碰撞器。\n     */\n    class BoxCollider extends Collider {\n        /** 中心点 */\n        center: Vector3;\n        /**\n         * 获取盒子碰撞器长宽高的一半。\n         * @return 长宽高的一半。\n         */\n        /**\n         * 设置盒子碰撞器长宽高的一半。\n         * @param 长宽高的一半。\n         */\n        size: Vector3;\n        /**\n         * 获取包围盒子,只读,不允许修改。\n         * @return 包围球。\n         */\n        readonly boundBox: OrientedBoundBox;\n        /**\n         * 创建一个 <code>BoxCollider</code> 实例。\n         */\n        constructor();\n        /**\n         * @inheritDoc\n         */\n        _initialize(owner: ComponentNode): void;\n        /**\n         * @inheritDoc\n         */\n        _getType(): number;\n        /**\n         * @inheritDoc\n         */\n        _collisonTo(other: Collider): boolean;\n        /**\n         * @inheritDoc\n         */\n        _cloneTo(dest: Component3D): void;\n        /**\n         * @inheritDoc\n         */\n        raycast(ray: Ray, hitInfo: RaycastHit, maxDistance?: number): boolean;\n        /**\n         * 从AABB碰撞盒设置center和Size。\n         * @param\tboundBox 碰撞盒。\n         */\n        setFromBoundBox(boundBox: BoundBox): void;\n    }\n}\ndeclare module laya.d3.component.physics {\n    import Component3D = laya.d3.component.Component3D;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import Ray = laya.d3.math.Ray;\n    import RaycastHit = laya.d3.utils.RaycastHit;\n    /**\n     * <code>Collider</code> 类用于创建碰撞器的父类，抽象类，不允许实例。\n     */\n    class Collider extends Component3D {\n        protected _needUpdate: boolean;\n        _isRigidbody: boolean;\n        _runtimeCollisonMap: any;\n        _runtimeCollisonTestMap: any;\n        _ignoreCollisonMap: any;\n        /** 是否为触发器。*/\n        isTrigger: boolean;\n        /**\n         * @inheritDoc\n         */\n        enable: boolean;\n        /**\n         * @inheritDoc\n         */\n        readonly isSingleton: boolean;\n        /**\n         * 创建一个 <code>Collider</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _clearCollsionMap(): void;\n        /**\n         * @inheritDoc\n         */\n        _unload(owner: ComponentNode): void;\n        /**\n         * @private\n         */\n        _setIsRigidbody(value: boolean): void;\n        /**\n         *@private\n         */\n        _getType(): number;\n        /**\n         * @private\n         */\n        _collisonTo(other: Collider): boolean;\n        /**\n         * 在场景中投下可与球体碰撞器碰撞的一条光线,获取发生碰撞的球体碰撞器信息。\n         * @param  ray        射线\n         * @param  outHitInfo 与该射线发生碰撞球体碰撞器的碰撞信息\n         * @param  distance   射线长度,默认为最大值\n         */\n        raycast(ray: Ray, hitInfo: RaycastHit, maxDistance?: number): boolean;\n    }\n}\ndeclare module laya.d3.component.physics {\n    import Component3D = laya.d3.component.Component3D;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import BoundBox = laya.d3.math.BoundBox;\n    import Ray = laya.d3.math.Ray;\n    import BaseMesh = laya.d3.resource.models.BaseMesh;\n    import RaycastHit = laya.d3.utils.RaycastHit;\n    /**\n     * <code>MeshCollider</code> 类用于创建网格碰撞器。\n     */\n    class MeshCollider extends Collider {\n        /**\n         * @private 只读,不允许修改。\n         */\n        readonly _boundBox: BoundBox;\n        /**\n         * 获取碰撞器网格。\n         * @return 碰撞其网格。\n         */\n        /**\n         * 设置碰撞器网格。\n         * @param value 碰撞其网格。\n         */\n        mesh: BaseMesh;\n        /**\n         * 创建一个 <code>SphereCollider</code> 实例。\n         */\n        constructor();\n        /**\n         * @inheritDoc\n         */\n        _initialize(owner: ComponentNode): void;\n        /**\n         * @inheritDoc\n         */\n        _getType(): number;\n        /**\n         * @inheritDoc\n         */\n        _collisonTo(other: Collider): boolean;\n        /**\n         * @inheritDoc\n         */\n        _cloneTo(dest: Component3D): void;\n        /**\n         * @inheritDoc\n         */\n        raycast(ray: Ray, hitInfo: RaycastHit, maxDistance?: number): boolean;\n    }\n}\ndeclare module laya.d3.component.physics {\n    import Component3D = laya.d3.component.Component3D;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Ray = laya.d3.math.Ray;\n    import Vector3 = laya.d3.math.Vector3;\n    import RaycastHit = laya.d3.utils.RaycastHit;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    /**\n     * <code>SphereCollider</code> 类用于创建球碰撞器。\n     */\n    class SphereCollider extends Collider {\n        /**\n         * 获取中心点。\n         * @return 中心点。\n         */\n        /**\n         * 设置中心点。\n         * @param value 中心点。\n         */\n        center: Vector3;\n        /**\n         * 获取半径。\n         * @return 半径。\n         */\n        /**\n         * 设置半径。\n         * @param value 半径。\n         */\n        radius: number;\n        /**\n         * 获取包围球,只读,不允许修改。\n         * @return 包围球。\n         */\n        readonly boundSphere: BoundSphere;\n        /**\n         * 创建一个 <code>SphereCollider</code> 实例。\n         */\n        constructor();\n        /**\n         * @inheritDoc\n         */\n        _initialize(owner: ComponentNode): void;\n        /**\n         * @inheritDoc\n         */\n        _getType(): number;\n        /**\n         * @inheritDoc\n         */\n        _collisonTo(other: Collider): boolean;\n        /**\n         * @inheritDoc\n         */\n        _cloneTo(dest: Component3D): void;\n        /**\n         * @inheritDoc\n         */\n        raycast(ray: Ray, hitInfo: RaycastHit, maxDistance?: number): boolean;\n    }\n}\ndeclare module laya.d3.component {\n    /**\n     * <code>Rigidbody</code> 类用于创建动画组件。\n     */\n    class Rigidbody extends Component3D {\n        /**\n         * @inheritDoc\n         */\n        enable: boolean;\n        /**\n         * 创建一个 <code>Rigidbody</code> 实例。\n         */\n        constructor();\n    }\n}\ndeclare module laya.d3.component {\n    import Collider = laya.d3.component.physics.Collider;\n    /**\n     * <code>Script</code> 类用于创建脚本的父类。\n     */\n    class Script extends Component3D {\n        /**\n         * @inheritDoc\n         */\n        readonly isSingleton: boolean;\n        /**\n         * 创建一个新的 <code>Script</code> 实例。\n         */\n        constructor();\n        /**\n         *当其他碰撞器进入时触发。\n         */\n        onTriggerEnter(other: Collider): void;\n        /**\n         *当其他碰撞器退出时触发。\n         */\n        onTriggerExit(other: Collider): void;\n        /**\n         *当其他碰撞器保持进入状态时逐帧触发。\n         */\n        onTriggerStay(other: Collider): void;\n    }\n}\ndeclare module laya.d3.core {\n    import Animator = laya.d3.component.Animator;\n    import Resource = laya.resource.Resource;\n    /**\n     * <code>Avatar</code> 类用于创建Avatar。\n     */\n    class Avatar extends Resource implements IClone {\n        _version: string;\n        /**\n         * 加载Avatar文件。\n         * @param url Avatar文件。\n         */\n        static load(url: string): Avatar;\n        /**\n         * 创建一个 <code>Avatar</code> 实例。\n         */\n        constructor();\n        /**\n         * @inheritDoc\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * 克隆数据到Avatr。\n         * @param\tdestObject 克隆源。\n         */\n        _cloneDatasToAnimator(destAnimator: Animator): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core {\n    import RenderState = laya.d3.core.render.RenderState;\n    import Scene = laya.d3.core.scene.Scene;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    import RenderTexture = laya.d3.resource.RenderTexture;\n    import Sky = laya.d3.resource.models.Sky;\n    import Size = laya.d3.utils.Size;\n    import WebGLContext = laya.webgl.WebGLContext;\n    /**\n     * <code>BaseCamera</code> 类用于创建摄像机的父类。\n     */\n    class BaseCamera extends Sprite3D {\n        static CAMERAPOS: number;\n        static VIEWMATRIX: number;\n        static PROJECTMATRIX: number;\n        static VPMATRIX: number;\n        static VPMATRIX_NO_TRANSLATE: number;\n        static CAMERADIRECTION: number;\n        static CAMERAUP: number;\n        static ENVIRONMENTDIFFUSE: number;\n        static ENVIRONMENTSPECULAR: number;\n        static SIMLODINFO: number;\n        static DIFFUSEIRRADMATR: number;\n        static DIFFUSEIRRADMATG: number;\n        static DIFFUSEIRRADMATB: number;\n        static HDREXPOSURE: number;\n        /**渲染模式,延迟光照渲染，暂未开放。*/\n        static RENDERINGTYPE_DEFERREDLIGHTING: string;\n        /**渲染模式,前向渲染。*/\n        static RENDERINGTYPE_FORWARDRENDERING: string;\n        /**清除标记，固定颜色。*/\n        static CLEARFLAG_SOLIDCOLOR: number;\n        /**清除标记，天空。*/\n        static CLEARFLAG_SKY: number;\n        /**清除标记，仅深度。*/\n        static CLEARFLAG_DEPTHONLY: number;\n        /**清除标记，不清除。*/\n        static CLEARFLAG_NONE: number;\n        protected _tempVector3: Vector3;\n        protected _orthographic: boolean;\n        protected _renderTarget: RenderTexture;\n        protected _useUserProjectionMatrix: boolean;\n        protected _viewportExpressedInClipSpace: boolean;\n        /**清楚标记。*/\n        clearFlag: number;\n        /**摄像机的清除颜色。*/\n        clearColor: Vector4;\n        /** 可视遮罩图层。 */\n        cullingMask: number;\n        /** 渲染时是否用遮挡剔除。 */\n        useOcclusionCulling: boolean;\n        /**获取天空。*/\n        /**设置天空。*/\n        sky: Sky;\n        /**获取位置。*/\n        readonly position: Vector3;\n        /**\n         * 获取上向量。\n         * @return 上向量。\n         */\n        readonly up: Vector3;\n        /**\n         * 获取前向量。\n         * @return 前向量。\n         */\n        readonly forward: Vector3;\n        /**\n         * 获取右向量。\n         * @return 右向量。\n         */\n        readonly right: Vector3;\n        /**\n         * 获取渲染场景的渲染目标。\n         * @return 渲染场景的渲染目标。\n         */\n        /**\n         * 设置渲染场景的渲染目标。\n         * @param value 渲染场景的渲染目标。\n         */\n        renderTarget: RenderTexture;\n        /**\n         * 获取渲染目标的尺寸\n         * @return 渲染目标的尺寸。\n         */\n        /**\n         * 设置渲染目标的尺寸\n         * @param value 渲染目标的尺寸。\n         */\n        renderTargetSize: Size;\n        /**\n         * 获取视野。\n         * @return 视野。\n         */\n        /**\n         * 设置视野。\n         * @param value 视野。\n         */\n        fieldOfView: number;\n        /**\n         * 获取近裁面。\n         * @return 近裁面。\n         */\n        /**\n         * 设置近裁面。\n         * @param value 近裁面。\n         */\n        nearPlane: number;\n        /**\n         * 获取远裁面。\n         * @return 远裁面。\n         */\n        /**\n         * 设置远裁面。\n         * @param value 远裁面。\n         */\n        farPlane: number;\n        /**\n         * 获取是否正交投影矩阵。\n         * @return 是否正交投影矩阵。\n         */\n        /**\n         * 设置是否正交投影矩阵。\n         * @param 是否正交投影矩阵。\n         */\n        orthographic: boolean;\n        /**\n         * 获取正交投影垂直矩阵尺寸。\n         * @return 正交投影垂直矩阵尺寸。\n         */\n        /**\n         * 设置正交投影垂直矩阵尺寸。\n         * @param 正交投影垂直矩阵尺寸。\n         */\n        orthographicVerticalSize: number;\n        renderingOrder: number;\n        /**\n         * 创建一个 <code>BaseCamera</code> 实例。\n         * @param\tfieldOfView 视野。\n         * @param\tnearPlane 近裁面。\n         * @param\tfarPlane 远裁面。\n         */\n        constructor(nearPlane?: number, farPlane?: number);\n        createConchModel(): any;\n        /**\n         * 通过RenderingOrder属性对摄像机机型排序。\n         */\n        _sortCamerasByRenderingOrder(): void;\n        protected _calculateProjectionMatrix(): void;\n        /**\n         * @private\n         */\n        _prepareCameraToRender(): void;\n        /**\n         * @private\n         */\n        _prepareCameraViewProject(viewMatrix: Matrix4x4, projectMatrix: Matrix4x4): void;\n        /**\n         * @private\n         */\n        _renderCamera(gl: WebGLContext, state: RenderState, scene: Scene): void;\n        /**\n         * 增加可视图层。\n         * @param layer 图层。\n         */\n        addLayer(layer: Layer): void;\n        /**\n         * 移除可视图层。\n         * @param layer 图层。\n         */\n        removeLayer(layer: Layer): void;\n        /**\n         * 增加所有图层。\n         */\n        addAllLayers(): void;\n        /**\n         * 移除所有图层。\n         */\n        removeAllLayers(): void;\n        ResetProjectionMatrix(): void;\n        /**\n         * 向前移动。\n         * @param distance 移动距离。\n         */\n        moveForward(distance: number): void;\n        /**\n         * 向右移动。\n         * @param distance 移动距离。\n         */\n        moveRight(distance: number): void;\n        /**\n         * 向上移动。\n         * @param distance 移动距离。\n         */\n        moveVertical(distance: number): void;\n        protected _addSelfRenderObjects(): void;\n        protected _clearSelfRenderObjects(): void;\n        /**\n         * @inheritDoc\n         */\n        destroy(destroyChild?: boolean): void;\n    }\n}\ndeclare module laya.d3.core {\n    import RenderState = laya.d3.core.render.RenderState;\n    import Scene = laya.d3.core.scene.Scene;\n    import BoundFrustum = laya.d3.math.BoundFrustum;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Ray = laya.d3.math.Ray;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Viewport = laya.d3.math.Viewport;\n    import WebGLContext = laya.webgl.WebGLContext;\n    /**\n     * <code>Camera</code> 类用于创建摄像机。\n     */\n    class Camera extends BaseCamera {\n        /**\n         * 获取横纵比。\n         * @return 横纵比。\n         */\n        /**\n         * 设置横纵比。\n         * @param value 横纵比。\n         */\n        aspectRatio: number;\n        /**\n         * 获取屏幕空间的视口。\n         * @return 屏幕空间的视口。\n         */\n        /**\n         * 设置屏幕空间的视口。\n         * @param 屏幕空间的视口。\n         */\n        viewport: Viewport;\n        /**\n         * 获取裁剪空间的视口。\n         * @return 裁剪空间的视口。\n         */\n        /**\n         * 设置裁剪空间的视口。\n         * @return 裁剪空间的视口。\n         */\n        normalizedViewport: Viewport;\n        readonly needViewport: boolean;\n        /**\n         * 获取视图矩阵。\n         * @return 视图矩阵。\n         */\n        readonly viewMatrix: Matrix4x4;\n        /**获取投影矩阵。*/\n        /**设置投影矩阵。*/\n        projectionMatrix: Matrix4x4;\n        /**\n         * 获取视图投影矩阵。\n         * @return 视图投影矩阵。\n         */\n        readonly projectionViewMatrix: Matrix4x4;\n        /**\n         * 获取摄像机视锥。\n         */\n        readonly boundFrustum: BoundFrustum;\n        /**\n         * 创建一个 <code>Camera</code> 实例。\n         * @param\taspectRatio 横纵比。\n         * @param\tnearPlane 近裁面。\n         * @param\tfarPlane 远裁面。\n         */\n        constructor(aspectRatio?: number, nearPlane?: number, farPlane?: number);\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, json: any): void;\n        protected _calculateProjectionMatrix(): void;\n        /**\n         * @inheritDoc\n         */\n        _update(state: RenderState): void;\n        /**\n         * @inheritDoc\n         */\n        _renderCamera(gl: WebGLContext, state: RenderState, scene: Scene): void;\n        /**\n         * 计算从屏幕空间生成的射线。\n         * @param\tpoint 屏幕空间的位置位置。\n         * @return  out  输出射线。\n         */\n        viewportPointToRay(point: Vector2, out: Ray): void;\n        /**\n         * 计算从裁切空间生成的射线。\n         * @param\tpoint 裁切空间的位置。。\n         * @return  out  输出射线。\n         */\n        normalizedViewportPointToRay(point: Vector2, out: Ray): void;\n        /**\n         * 计算从世界空间准换三维坐标到屏幕空间。\n         * @param\tposition 世界空间的位置。\n         * @return  out  输出位置。\n         */\n        worldToViewportPoint(position: Vector3, out: Vector3): void;\n        /**\n         * 计算从世界空间准换三维坐标到裁切空间。\n         * @param\tposition 世界空间的位置。\n         * @return  out  输出位置。\n         */\n        worldToNormalizedViewportPoint(position: Vector3, out: Vector3): void;\n        /**\n         * 转换2D屏幕坐标系统到3D正交投影下的坐标系统，注:只有正交模型下有效。\n         * @param   source 源坐标。\n         * @param   out 输出坐标。\n         * @return 是否转换成功。\n         */\n        convertScreenCoordToOrthographicCoord(source: Vector3, out: Vector3): boolean;\n    }\n}\ndeclare module laya.d3.core {\n    import Component3D = laya.d3.component.Component3D;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Node = laya.display.Node;\n    /**\n     * @private\n     * <code>ComponentNode</code> 类用于实现组件精灵,该类为抽象类。\n     */\n    class ComponentNode extends Node {\n        protected _componentsMap: Array<any>;\n        protected _typeComponentsIndices: Array<any>;\n        protected _components: Array<any>;\n        _scripts: Array<any>;\n        /**\n         * 创建一个 <code>ComponentNode</code> 实例。\n         */\n        constructor();\n        /**\n         * 添加指定类型组件。\n         * @param\ttype 组件类型。\n         * @return\t组件。\n         */\n        addComponent(type: any): Component3D;\n        protected _removeComponent(mapIndex: number, index: number): void;\n        /**\n         * 通过指定类型和类型索引获得组件。\n         * @param\ttype 组件类型。\n         * @param\ttypeIndex 类型索引。\n         * @return 组件。\n         */\n        getComponentByType(type: any, typeIndex?: number): Component3D;\n        /**\n         * 通过指定类型获得所有组件。\n         * @param\ttype 组件类型。\n         * @param\tcomponents 组件输出队列。\n         */\n        getComponentsByType(type: any, components: Array<any>): void;\n        /**\n         * 通过指定索引获得组件。\n         * @param\tindex 索引。\n         * @return 组件。\n         */\n        getComponentByIndex(index: number): Component3D;\n        /**\n         * 通过指定类型和类型索引移除组件。\n         * @param\ttype 组件类型。\n         * @param\ttypeIndex 类型索引。\n         */\n        removeComponentByType(type: any, typeIndex?: number): void;\n        /**\n         * 通过指定类型移除所有组件。\n         * @param\ttype 组件类型。\n         */\n        removeComponentsByType(type: any): void;\n        /**\n         * 移除全部组件。\n         */\n        removeAllComponent(): void;\n        protected _updateComponents(state: RenderState): void;\n        protected _lateUpdateComponents(state: RenderState): void;\n        /**\n         * @private\n         */\n        _preRenderUpdateComponents(state: RenderState): void;\n        /**\n         * @private\n         */\n        _postRenderUpdateComponents(state: RenderState): void;\n    }\n}\ndeclare module laya.d3.core {\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import EventDispatcher = laya.events.EventDispatcher;\n    import IDestroy = laya.resource.IDestroy;\n    /**\n     * <code>GeometryFilter</code> 类用于创建集合体过滤器,抽象类不允许实例。\n     */\n    class GeometryFilter extends EventDispatcher implements IDestroy {\n        readonly _isAsyncLoaded: boolean;\n        /**\n         * @private\n         */\n        readonly _originalBoundingSphere: BoundSphere;\n        /**\n         * @private\n         */\n        readonly _originalBoundingBox: BoundBox;\n        /**\n         * @private\n         */\n        readonly _originalBoundingBoxCorners: Array<any>;\n        /**\n         * 获取是否已销毁。\n         * @return 是否已销毁。\n         */\n        readonly destroyed: boolean;\n        /**\n         * 创建一个 <code>GeometryFilter</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _destroy(): void;\n    }\n}\ndeclare module laya.d3.core.glitter {\n    import GlitterRender = laya.d3.core.GlitterRender;\n    import RenderableSprite3D = laya.d3.core.RenderableSprite3D;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Vector3 = laya.d3.math.Vector3;\n    import GlitterTemplet = laya.d3.resource.tempelet.GlitterTemplet;\n    /**\n     * <code>Glitter</code> 类用于创建闪光。\n     */\n    class Glitter extends RenderableSprite3D {\n        static CURRENTTIME: number;\n        static DURATION: number;\n        /**\n         * 获取闪光模板。\n         * @return  闪光模板。\n         */\n        readonly templet: GlitterTemplet;\n        /**\n         * 获取刀光渲染器。\n         * @return  刀光渲染器。\n         */\n        readonly glitterRender: GlitterRender;\n        /**\n         * 创建一个 <code>Glitter</code> 实例。\n         *  @param\tsettings 配置信息。\n         */\n        constructor();\n        protected _clearSelfRenderObjects(): void;\n        protected _addSelfRenderObjects(): void;\n        _update(state: RenderState): void;\n        /**\n         * 通过位置添加刀光。\n         * @param position0 位置0。\n         * @param position1 位置1。\n         */\n        addGlitterByPositions(position0: Vector3, position1: Vector3): void;\n        /**\n         * 通过位置和速度添加刀光。\n         * @param position0 位置0。\n         * @param velocity0 速度0。\n         * @param position1 位置1。\n         * @param velocity1 速度1。\n         */\n        addGlitterByPositionsVelocitys(position0: Vector3, velocity0: Vector3, position1: Vector3, velocity1: Vector3): void;\n        cloneTo(destObject: any): void;\n        /**\n         * <p>销毁此对象。</p>\n         * @param\tdestroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n         */\n        destroy(destroyChild?: boolean): void;\n    }\n}\ndeclare module laya.d3.core.glitter {\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>SplineCurvePosition</code> 类用于通过顶点创建闪光插值。\n     */\n    class SplineCurvePosition extends SplineCurvePositionVelocity {\n        /**\n         * 创建一个 <code>SplineCurvePosition</code> 实例。\n         */\n        constructor();\n        /**\n         * 初始化插值所需信息。\n         * @param\tlastPosition0 顶点0的上次位置。\n         * @param\tposition0 顶点0的位置。\n         * @param\tlastPosition1 顶点1的上次位置。\n         * @param\tposition1 顶点1的位置。\n         */\n        Init(lastPosition0: Vector3, position0: Vector3, lastPosition1: Vector3, position1: Vector3): void;\n    }\n}\ndeclare module laya.d3.core.glitter {\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>SplineCurvePositionVelocity</code> 类用于通过顶点和速度创建闪光插值。\n     */\n    class SplineCurvePositionVelocity {\n        protected _tempVector30: Vector3;\n        protected _tempVector31: Vector3;\n        protected _tempVector32: Vector3;\n        protected _a: Vector3;\n        protected _b: Vector3;\n        protected _c: Vector3;\n        protected _d: Vector3;\n        /**\n         * 创建一个 <code>SplineCurvePositionVelocity</code> 实例。\n         */\n        constructor();\n        /**\n         * 初始化插值所需信息。\n         * @param\tposition0 顶点0的位置。\n         * @param\tvelocity0 顶点0的速度。\n         * @param\tposition1 顶点1的位置。\n         * @param\tvelocity1 顶点1的速度。\n         */\n        Init(position0: Vector3, velocity0: Vector3, position1: Vector3, velocity1: Vector3): void;\n        /**\n         * 初始化插值所需信息。\n         * @param\tt 插值比例\n         * @param\tout 输出结果\n         */\n        Slerp(t: number, out: Vector3): void;\n    }\n}\ndeclare module laya.d3.core {\n    import Glitter = laya.d3.core.glitter.Glitter;\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * ...\n     * @author ...\n     */\n    class GlitterRender extends BaseRender {\n        constructor(owner: Glitter);\n        protected _calculateBoundingBox(): void;\n        protected _calculateBoundingSphere(): void;\n        /**\n         * @private\n         */\n        _renderUpdate(projectionView: Matrix4x4): boolean;\n    }\n}\ndeclare module laya.d3.core {\n    import Vector2 = laya.d3.math.Vector2;\n    import Texture2D = laya.d3.resource.Texture2D;\n    import Mesh = laya.d3.resource.models.Mesh;\n    /**\n     * <code>HeightMap</code> 类用于实现高度图数据。\n     */\n    class HeightMap {\n        /**\n         * 从网格精灵生成高度图。\n         * @param meshSprite 网格精灵。\n         * @param width\t高度图宽度。\n         * @param height 高度图高度。\n         * @param outCellSize 输出 单元尺寸。\n         */\n        static creatFromMesh(mesh: Mesh, width: number, height: number, outCellSize: Vector2): HeightMap;\n        /**\n         * 从图片生成高度图。\n         * @param image 图片。\n         * @param maxHeight 最小高度。\n         * @param maxHeight 最大高度。\n         */\n        static createFromImage(texture: Texture2D, minHeight: number, maxHeight: number): HeightMap;\n        /**\n         * 获取宽度。\n         * @return value 宽度。\n         */\n        readonly width: number;\n        /**\n         * 获取高度。\n         * @return value 高度。\n         */\n        readonly height: number;\n        /**\n         * 最大高度。\n         * @return value 最大高度。\n         */\n        readonly maxHeight: number;\n        /**\n         * 最大高度。\n         * @return value 最大高度。\n         */\n        readonly minHeight: number;\n        /**\n         * 创建一个 <code>HeightMap</code> 实例。\n         * @param width 宽度。\n         * @param height 高度。\n         * @param minHeight 最大高度。\n         * @param maxHeight 最大高度。\n         */\n        constructor(width: number, height: number, minHeight: number, maxHeight: number);\n        /**\n         * 获取高度。\n         * @param row 列数。\n         * @param col 行数。\n         * @return 高度。\n         */\n        getHeight(row: number, col: number): number;\n    }\n}\ndeclare module laya.d3.core {\n    /**\n     * @private\n     * <code>IClone</code> 资源克隆接口。\n     */\n    interface IClone {\n        clone(): any;\n        cloneTo(destObject: any): void;\n    }\n}\ndeclare module laya.d3.core {\n    import Collider = laya.d3.component.physics.Collider;\n    /**\n     * <code>Layer</code> 类用于实现层。\n     */\n    class Layer {\n        static _collsionTestList: Array<any>;\n        static _currentCameraCullingMask: number;\n        static maxCount: number;\n        /**当前创建精灵所属遮罩层。*/\n        static currentCreationLayer: Layer;\n        /**\n         *获取Layer显示层。\n         * @return 显示层。\n         */\n        /**\n         *设置Layer显示层。\n         * @param value 显示层。\n         */\n        static visibleLayers: number;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         *通过编号获取蒙版。\n         * @param number 编号。\n         * @return 蒙版。\n         */\n        static getLayerByNumber(number: number): Layer;\n        /**\n         *通过蒙版值获取蒙版。\n         * @param name 名字。\n         * @return 蒙版。\n         */\n        static getLayerByName(name: string): Layer;\n        /**\n         *通过蒙版值获取蒙版是否显示。\n         * @param mask 蒙版值。\n         * @return 是否显示。\n         */\n        static isVisible(mask: number): boolean;\n        _nonRigidbodyOffset: number;\n        _colliders: Array<any>;\n        /**名字。*/\n        name: string;\n        /**\n         *获取编号。\n         * @return 编号。\n         */\n        readonly number: number;\n        /**\n         *获取蒙版值。\n         * @return 蒙版值。\n         */\n        readonly mask: number;\n        /**\n         *获取是否显示。\n         * @return 是否显示。\n         */\n        /**\n         *设置是否显示。\n         * @param value 是否显示。\n         */\n        visible: boolean;\n        /**\n         * 创建一个 <code>Layer</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _addCollider(collider: Collider): void;\n        /**\n         * @private\n         */\n        _removeCollider(collider: Collider): void;\n    }\n}\ndeclare module laya.d3.core.light {\n    import RenderState = laya.d3.core.render.RenderState;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>DirectionLight</code> 类用于创建平行光。\n     */\n    class DirectionLight extends LightSprite {\n        /**\n         * @inheritDoc\n         */\n        shadow: boolean;\n        /**\n         * 创建一个 <code>DirectionLight</code> 实例。\n         */\n        constructor();\n        protected _addSelfRenderObjects(): void;\n        protected _clearSelfRenderObjects(): void;\n        /**\n         * 更新平行光相关渲染状态参数。\n         * @param state 渲染状态参数。\n         */\n        _prepareToScene(state: RenderState): boolean;\n        /**\n         * 获取平行光的方向。\n         * @return 平行光的方向。\n         */\n        /**\n         * 设置平行光的方向。\n         * @param value 平行光的方向。\n         */\n        direction: Vector3;\n    }\n}\ndeclare module laya.d3.core.light {\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Vector3 = laya.d3.math.Vector3;\n    import ParallelSplitShadowMap = laya.d3.shadowMap.ParallelSplitShadowMap;\n    /**\n     * <code>LightSprite</code> 类用于创建灯光的父类。\n     */\n    class LightSprite extends Sprite3D {\n        /** 灯光烘培类型-实时。*/\n        static LIGHTMAPBAKEDTYPE_REALTIME: number;\n        /** 灯光烘培类型-混合。*/\n        static LIGHTMAPBAKEDTYPE_MIXED: number;\n        /** 灯光烘培类型-烘焙。*/\n        static LIGHTMAPBAKEDTYPE_BAKED: number;\n        protected _intensityColor: Vector3;\n        protected _intensity: number;\n        protected _shadow: boolean;\n        protected _shadowFarPlane: number;\n        protected _shadowMapSize: number;\n        protected _shadowMapCount: number;\n        protected _shadowMapPCFType: number;\n        protected _parallelSplitShadowMap: ParallelSplitShadowMap;\n        _lightmapBakedType: number;\n        /** 灯光颜色。 */\n        color: Vector3;\n        /**\n         * 获取灯光强度。\n         * @return 灯光强度\n         */\n        /**\n         * 设置灯光强度。\n         * @param value 灯光强度\n         */\n        intensity: number;\n        /**\n         * 获取是否产生阴影。\n         * @return 是否产生阴影。\n         */\n        /**\n         * 设置是否产生阴影。\n         * @param value 是否产生阴影。\n         */\n        shadow: boolean;\n        /**\n         * 获取阴影最远范围。\n         * @return 阴影最远范围。\n         */\n        /**\n         * 设置阴影最远范围。\n         * @param value 阴影最远范围。\n         */\n        shadowDistance: number;\n        /**\n         * 获取阴影贴图尺寸。\n         * @return 阴影贴图尺寸。\n         */\n        /**\n         * 设置阴影贴图尺寸。\n         * @param value 阴影贴图尺寸。\n         */\n        shadowResolution: number;\n        /**\n         * 获取阴影分段数。\n         * @return 阴影分段数。\n         */\n        /**\n         * 设置阴影分段数。\n         * @param value 阴影分段数。\n         */\n        shadowPSSMCount: number;\n        /**\n         * 获取阴影PCF类型。\n         * @return PCF类型。\n         */\n        /**\n         * 设置阴影PCF类型。\n         * @param value PCF类型。\n         */\n        shadowPCFType: number;\n        /**\n         * 获取灯光烘培类型。\n         */\n        /**\n         * 设置灯光烘培类型。\n         */\n        lightmapBakedType: number;\n        /**\n         * 创建一个 <code>LightSprite</code> 实例。\n         */\n        constructor();\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, nodeData: any): void;\n        protected _addSelfRenderObjects(): void;\n        protected _clearSelfRenderObjects(): void;\n        /**\n         * 更新灯光相关渲染状态参数。\n         * @param state 渲染状态参数。\n         */\n        _prepareToScene(state: RenderState): boolean;\n        /**\n         * 获取灯光的漫反射颜色。\n         * @return 灯光的漫反射颜色。\n         */\n        /**\n         * 设置灯光的漫反射颜色。\n         * @param value 灯光的漫反射颜色。\n         */\n        diffuseColor: Vector3;\n    }\n}\ndeclare module laya.d3.core.light {\n    import RenderState = laya.d3.core.render.RenderState;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>PointLight</code> 类用于创建点光。\n     */\n    class PointLight extends LightSprite {\n        /**\n         * 创建一个 <code>PointLight</code> 实例。\n         */\n        constructor();\n        /**\n         * 获取点光的范围。\n         * @return 点光的范围。\n         */\n        /**\n         * 设置点光的范围。\n         * @param  value 点光的范围。\n         */\n        range: number;\n        protected _clearSelfRenderObjects(): void;\n        /**\n         * 更新点光相关渲染状态参数。\n         * @param state 渲染状态参数。\n         */\n        _prepareToScene(state: RenderState): boolean;\n        /**\n         * 获取点光的衰减。\n         * @return 点光的衰减。\n         */\n        /**\n         * 设置点光的衰减。\n         * @param value 点光的衰减。\n         */\n        attenuation: Vector3;\n    }\n}\ndeclare module laya.d3.core.light {\n    import RenderState = laya.d3.core.render.RenderState;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>SpotLight</code> 类用于创建聚光。\n     */\n    class SpotLight extends LightSprite {\n        /**\n         * 创建一个 <code>SpotLight</code> 实例。\n         */\n        constructor();\n        /**\n         * 获取聚光的聚光值。\n         * @return 聚光的聚光值。\n         */\n        /**\n         * 设置聚光的聚光值。\n         * @param value 聚光的聚光值。\n         */\n        spot: number;\n        /**\n         * 获取聚光的范围。\n         * @return 聚光的范围值。\n         */\n        /**\n         * 设置聚光的范围。\n         * @param value 聚光的范围值。\n         */\n        range: number;\n        protected _clearSelfRenderObjects(): void;\n        /**\n         * 更新聚光相关渲染状态参数。\n         * @param state 渲染状态参数。\n         */\n        _prepareToScene(state: RenderState): boolean;\n        /**\n         * 获取聚光的衰减。\n         * @return 聚光的衰减。\n         */\n        /**\n         * 设置聚光的衰减。\n         * @param value 聚光的衰减。\n         */\n        attenuation: Vector3;\n        /**\n         * 获取平行光的方向。\n         * @return 平行光的方向。\n         */\n        /**\n         * 设置平行光的方向。\n         * @param value 平行光的方向。\n         */\n        direction: Vector3;\n    }\n}\ndeclare module laya.d3.core.material {\n    import IClone = laya.d3.core.IClone;\n    import Transform3D = laya.d3.core.Transform3D;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import Shader3D = laya.d3.shader.Shader3D;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    import Resource = laya.resource.Resource;\n    /**\n     * <code>BaseMaterial</code> 类用于创建材质,抽象类,不允许实例。\n     */\n    class BaseMaterial extends Resource implements IClone {\n        /**剔除枚举_不剔除。*/\n        static CULL_NONE: number;\n        /**剔除枚举_剔除正面。*/\n        static CULL_FRONT: number;\n        /**剔除枚举_剔除背面。*/\n        static CULL_BACK: number;\n        /**混合枚举_禁用。*/\n        static BLEND_DISABLE: number;\n        /**混合枚举_启用_RGB和Alpha统一混合。*/\n        static BLEND_ENABLE_ALL: number;\n        /**混合枚举_启用_RGB和Alpha单独混合。*/\n        static BLEND_ENABLE_SEPERATE: number;\n        /**混合参数枚举_零,例：RGB(0,0,0),Alpha:(1)。*/\n        static BLENDPARAM_ZERO: number;\n        /**混合参数枚举_一,例：RGB(1,1,1),Alpha:(1)。*/\n        static BLENDPARAM_ONE: number;\n        /**混合参数枚举_源颜色,例：RGB(Rs,Gs,Bs)，Alpha(As)。*/\n        static BLENDPARAM_SRC_COLOR: number;\n        /**混合参数枚举_一减源颜色,例：RGB(1-Rs,1-Gs,1-Bs)，Alpha(1-As)。*/\n        static BLENDPARAM_ONE_MINUS_SRC_COLOR: number;\n        /**混合参数枚举_目标颜色,例：RGB(Rd,Gd,Bd),Alpha(Ad)。*/\n        static BLENDPARAM_DST_COLOR: number;\n        /**混合参数枚举_一减目标颜色,例：RGB(1-Rd,1-Gd,1-Bd)，Alpha(1-Ad)。*/\n        static BLENDPARAM_ONE_MINUS_DST_COLOR: number;\n        /**混合参数枚举_源透明,例:RGB(As,As,As),Alpha(1-As)。*/\n        static BLENDPARAM_SRC_ALPHA: number;\n        /**混合参数枚举_一减源阿尔法,例:RGB(1-As,1-As,1-As),Alpha(1-As)。*/\n        static BLENDPARAM_ONE_MINUS_SRC_ALPHA: number;\n        /**混合参数枚举_目标阿尔法，例：RGB(Ad,Ad,Ad),Alpha(Ad)。*/\n        static BLENDPARAM_DST_ALPHA: number;\n        /**混合参数枚举_一减目标阿尔法,例：RGB(1-Ad,1-Ad,1-Ad),Alpha(Ad)。*/\n        static BLENDPARAM_ONE_MINUS_DST_ALPHA: number;\n        /**混合参数枚举_阿尔法饱和，例：RGB(min(As,1 - Ad),min(As,1 - Ad),min(As,1 - Ad)),Alpha(1)。*/\n        static BLENDPARAM_SRC_ALPHA_SATURATE: number;\n        /**混合方程枚举_加法,例：source + destination*/\n        static BLENDEQUATION_ADD: number;\n        /**混合方程枚举_减法，例：source - destination*/\n        static BLENDEQUATION_SUBTRACT: number;\n        /**混合方程枚举_反序减法，例：destination - source*/\n        static BLENDEQUATION_REVERSE_SUBTRACT: number;\n        /**深度测试函数枚举_关闭深度测试。*/\n        static DEPTHTEST_OFF: number;\n        /**深度测试函数枚举_从不通过。*/\n        static DEPTHTEST_NEVER: number;\n        /**深度测试函数枚举_小于时通过。*/\n        static DEPTHTEST_LESS: number;\n        /**深度测试函数枚举_等于时通过。*/\n        static DEPTHTEST_EQUAL: number;\n        /**深度测试函数枚举_小于等于时通过。*/\n        static DEPTHTEST_LEQUAL: number;\n        /**深度测试函数枚举_大于时通过。*/\n        static DEPTHTEST_GREATER: number;\n        /**深度测试函数枚举_不等于时通过。*/\n        static DEPTHTEST_NOTEQUAL: number;\n        /**深度测试函数枚举_大于等于时通过。*/\n        static DEPTHTEST_GEQUAL: number;\n        /**深度测试函数枚举_总是通过。*/\n        static DEPTHTEST_ALWAYS: number;\n        static SHADERDEFINE_ALPHATEST: number;\n        static ALPHATESTVALUE: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**渲染剔除状态。*/\n        cull: number;\n        /**透明混合。*/\n        blend: number;\n        /**源混合参数,在blend为BLEND_ENABLE_ALL时生效。*/\n        srcBlend: number;\n        /**目标混合参数,在blend为BLEND_ENABLE_ALL时生效。*/\n        dstBlend: number;\n        /**RGB源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。*/\n        srcBlendRGB: number;\n        /**RGB目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。*/\n        dstBlendRGB: number;\n        /**Alpha源混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。*/\n        srcBlendAlpha: number;\n        /**Alpha目标混合参数,在blend为BLEND_ENABLE_SEPERATE时生效。*/\n        dstBlendAlpha: number;\n        /**混合常量颜色。*/\n        blendConstColor: Vector4;\n        /**混合方程。*/\n        blendEquation: number;\n        /**RGB混合方程。*/\n        blendEquationRGB: number;\n        /**Alpha混合方程。*/\n        blendEquationAlpha: number;\n        /**深度测试函数。*/\n        depthTest: number;\n        /**是否深度写入。*/\n        depthWrite: boolean;\n        /** 所属渲染队列. */\n        renderQueue: number;\n        _conchMaterial: any;\n        /**\n         * 获取透明测试模式裁剪值。\n         * @return 透明测试模式裁剪值。\n         */\n        /**\n         * 设置透明测试模式裁剪值。\n         * @param value 透明测试模式裁剪值。\n         */\n        alphaTestValue: number;\n        /**\n         * 获取是否透明裁剪。\n         * @return 是否透明裁剪。\n         */\n        /**\n         * 设置是否透明裁剪。\n         * @param value 是否透明裁剪。\n         */\n        alphaTest: boolean;\n        /**\n         * 创建一个 <code>BaseMaterial</code> 实例。\n         */\n        constructor();\n        protected _addShaderDefine(value: number): void;\n        protected _removeShaderDefine(value: number): void;\n        protected _addDisablePublicShaderDefine(value: number): void;\n        protected _removeDisablePublicShaderDefine(value: number): void;\n        protected _setBuffer(shaderIndex: number, buffer: Float32Array): void;\n        protected _getBuffer(shaderIndex: number): any;\n        protected _setMatrix4x4(shaderIndex: number, matrix4x4: Matrix4x4): void;\n        protected _getMatrix4x4(shaderIndex: number): any;\n        protected _setInt(shaderIndex: number, i: number): void;\n        protected _getInt(shaderIndex: number): any;\n        protected _setNumber(shaderIndex: number, number: number): void;\n        protected _getNumber(shaderIndex: number): any;\n        protected _setBool(shaderIndex: number, b: boolean): void;\n        protected _getBool(shaderIndex: number): any;\n        protected _setVector2(shaderIndex: number, vector2: Vector2): void;\n        protected _getVector2(shaderIndex: number): any;\n        protected _setColor(shaderIndex: number, color: any): void;\n        protected _getColor(shaderIndex: number): any;\n        protected _setTexture(shaderIndex: number, texture: BaseTexture): void;\n        protected _getTexture(shaderIndex: number): BaseTexture;\n        /**\n         * 上传材质。\n         * @param state 相关渲染状态。\n         * @param bufferUsageShader Buffer相关绑定。\n         * @param shader 着色器。\n         * @return  是否成功。\n         */\n        _upload(): void;\n        /**\n         * @private\n         */\n        _getShader(sceneDefineValue: number, vertexDefineValue: number, spriteDefineValue: number): Shader3D;\n        /**\n         * 设置渲染相关状态。\n         */\n        _setRenderStateBlendDepth(): void;\n        /**\n         * 设置渲染相关状态。\n         */\n        _setRenderStateFrontFace(isTarget: boolean, transform: Transform3D): void;\n        /**\n         * @inheritDoc\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * @inheritDoc\n         */\n        _addReference(): void;\n        /**\n         * @inheritDoc\n         */\n        _removeReference(): void;\n        protected disposeResource(): void;\n        /**\n         * 设置使用Shader名字。\n         * @param name 名称。\n         */\n        setShaderName(name: string): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.material {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * <code>BlinnPhongMaterial</code> 类用于实现Blinn-Phong材质。\n     */\n    class BlinnPhongMaterial extends BaseMaterial {\n        /**高光强度数据源_漫反射贴图的Alpha通道。*/\n        static SPECULARSOURCE_DIFFUSEMAPALPHA: number;\n        /**高光强度数据源_高光贴图的RGB通道。*/\n        static SPECULARSOURCE_SPECULARMAP: number;\n        /**渲染状态_不透明。*/\n        static RENDERMODE_OPAQUE: number;\n        /**渲染状态_透明测试。*/\n        static RENDERMODE_CUTOUT: number;\n        /**渲染状态__透明混合。*/\n        static RENDERMODE_TRANSPARENT: number;\n        /**渲染状态__加色法混合。*/\n        static RENDERMODE_ADDTIVE: number;\n        static SHADERDEFINE_DIFFUSEMAP: number;\n        static SHADERDEFINE_NORMALMAP: number;\n        static SHADERDEFINE_SPECULARMAP: number;\n        static SHADERDEFINE_REFLECTMAP: number;\n        static SHADERDEFINE_TILINGOFFSET: number;\n        static SHADERDEFINE_ADDTIVEFOG: number;\n        static ALBEDOTEXTURE: number;\n        static NORMALTEXTURE: number;\n        static SPECULARTEXTURE: number;\n        static EMISSIVETEXTURE: number;\n        static REFLECTTEXTURE: number;\n        static ALBEDOCOLOR: number;\n        static MATERIALSPECULAR: number;\n        static SHININESS: number;\n        static MATERIALREFLECT: number;\n        static TILINGOFFSET: number;\n        /** 默认材质，禁止修改*/\n        static defaultMaterial: BlinnPhongMaterial;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载标准材质。\n         * @param url 标准材质地址。\n         */\n        static load(url: string): BlinnPhongMaterial;\n        /**\n         * 设置渲染模式。\n         * @return 渲染模式。\n         */\n        renderMode: number;\n        /**\n         * 获取纹理平铺和偏移。\n         * @return 纹理平铺和偏移。\n         */\n        /**\n         * 获取纹理平铺和偏移。\n         * @param value 纹理平铺和偏移。\n         */\n        tilingOffset: Vector4;\n        /**\n         * 获取漫反射颜色。\n         * @return 漫反射颜色。\n         */\n        /**\n         * 设置漫反射颜色。\n         * @param value 漫反射颜色。\n         */\n        albedoColor: Vector4;\n        /**\n         * 获取漫反射颜色。\n         * @return 漫反射颜色。\n         */\n        /**\n         * 设置漫反射颜色。\n         * @param value 漫反射颜色。\n         */\n        albedoIntensity: number;\n        /**\n         * 获取高光颜色。\n         * @return 高光颜色。\n         */\n        /**\n         * 设置高光颜色。\n         * @param value 高光颜色。\n         */\n        specularColor: Vector3;\n        /**\n         * 获取高光强度,范围为0到1。\n         * @return 高光强度。\n         */\n        /**\n         * 设置高光强度,范围为0到1。\n         * @param value 高光强度。\n         */\n        shininess: number;\n        /**\n         * 获取反射颜色。\n         * @return value 反射颜色。\n         */\n        /**\n         * 设置反射颜色。\n         * @param value 反射颜色。\n         */\n        reflectColor: Vector3;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        albedoTexture: BaseTexture;\n        /**\n         * 获取法线贴图。\n         * @return 法线贴图。\n         */\n        /**\n         * 设置法线贴图。\n         * @param value 法线贴图。\n         */\n        normalTexture: BaseTexture;\n        /**\n         * 获取高光贴图。\n         * @return 高光贴图。\n         */\n        /**\n         * 设置高光贴图，高光强度则从该贴图RGB值中获取,如果该值为空则从漫反射贴图的Alpha通道获取。\n         * @param value  高光贴图。\n         */\n        specularTexture: BaseTexture;\n        /**\n         * 获取反射贴图。\n         * @return 反射贴图。\n         */\n        /**\n         * 设置反射贴图。\n         * @param value 反射贴图。\n         */\n        reflectTexture: BaseTexture;\n        /**\n         * 获取是否启用光照。\n         * @return 是否启用光照。\n         */\n        /**\n         * 设置是否启用光照。\n         * @param value 是否启用光照。\n         */\n        enableLighting: boolean;\n        constructor();\n        /**\n         * 禁用灯光。\n         */\n        disableLight(): void;\n        /**\n         * 禁用雾化。\n         */\n        disableFog(): void;\n    }\n}\ndeclare module laya.d3.core.material {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author ...\n     */\n    class ExtendTerrainMaterial extends BaseMaterial {\n        /**渲染状态_不透明。*/\n        static RENDERMODE_OPAQUE: number;\n        /**渲染状态_透明混合。*/\n        static RENDERMODE_TRANSPARENT: number;\n        /**渲染状态_透明混合。*/\n        static SPLATALPHATEXTURE: number;\n        static DIFFUSETEXTURE1: number;\n        static DIFFUSETEXTURE2: number;\n        static DIFFUSETEXTURE3: number;\n        static DIFFUSETEXTURE4: number;\n        static DIFFUSETEXTURE5: number;\n        static DIFFUSESCALEOFFSET1: number;\n        static DIFFUSESCALEOFFSET2: number;\n        static DIFFUSESCALEOFFSET3: number;\n        static DIFFUSESCALEOFFSET4: number;\n        static DIFFUSESCALEOFFSET5: number;\n        static MATERIALAMBIENT: number;\n        static MATERIALDIFFUSE: number;\n        static MATERIALSPECULAR: number;\n        static MATERIALALBEDO: number;\n        /**地形细节宏定义。*/\n        static SHADERDEFINE_DETAIL_NUM1: number;\n        static SHADERDEFINE_DETAIL_NUM2: number;\n        static SHADERDEFINE_DETAIL_NUM3: number;\n        static SHADERDEFINE_DETAIL_NUM4: number;\n        static SHADERDEFINE_DETAIL_NUM5: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 获取splatAlpha贴图。\n         * @return splatAlpha贴图。\n         */\n        /**\n         * 设置splatAlpha贴图。\n         * @param value splatAlpha贴图。\n         */\n        splatAlphaTexture: BaseTexture;\n        /**\n         * 设置第一层贴图。\n         * @param value 第一层贴图。\n         */\n        diffuseTexture1: BaseTexture;\n        /**\n         * 获取第二层贴图。\n         * @return 第二层贴图。\n         */\n        /**\n         * 设置第二层贴图。\n         * @param value 第二层贴图。\n         */\n        diffuseTexture2: BaseTexture;\n        /**\n         * 获取第三层贴图。\n         * @return 第三层贴图。\n         */\n        /**\n         * 设置第三层贴图。\n         * @param value 第三层贴图。\n         */\n        diffuseTexture3: BaseTexture;\n        /**\n         * 获取第四层贴图。\n         * @return 第四层贴图。\n         */\n        /**\n         * 设置第四层贴图。\n         * @param value 第四层贴图。\n         */\n        diffuseTexture4: BaseTexture;\n        /**\n         * 获取第五层贴图。\n         * @return 第五层贴图。\n         */\n        /**\n         * 设置第五层贴图。\n         * @param value 第五层贴图。\n         */\n        diffuseTexture5: BaseTexture;\n        diffuseScaleOffset1: Vector4;\n        diffuseScaleOffset2: Vector4;\n        diffuseScaleOffset3: Vector4;\n        diffuseScaleOffset4: Vector4;\n        diffuseScaleOffset5: Vector4;\n        /**\n         * 获取反射率颜色。\n         * @return 反射率颜色。\n         */\n        /**\n         * 设置反射率颜色。\n         * @param value 反射率颜色。\n         */\n        albedo: Vector4;\n        /**\n         * 获取环境光颜色。\n         * @return 环境光颜色。\n         */\n        /**\n         * 设置环境光颜色。\n         * @param value 环境光颜色\n         */\n        ambientColor: Vector3;\n        /**\n        * 获取漫反射颜色。\n        * @return 漫反射颜色。\n        */\n        /**\n         * 设置漫反射颜色。\n         * @param value 漫反射颜色。\n         */\n        diffuseColor: Vector3;\n        /**\n         * 获取高光颜色。\n         * @return 高光颜色。\n         */\n        /**\n         * 设置高光颜色。\n         * @param value 高光颜色。\n         */\n        specularColor: Vector4;\n        /**\n         * 设置禁受光照影响。\n         */\n        disableLight(): void;\n        /**\n         * 设置渲染模式。\n         * @return 渲染模式。\n         */\n        renderMode: number;\n        constructor();\n    }\n}\ndeclare module laya.d3.core.material {\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    /**\n     * ...\n     * @author ...\n     */\n    class GlitterMaterial extends BaseMaterial {\n        /**渲染状态_不透明。*/\n        static RENDERMODE_OPAQUE: number;\n        /**渲染状态_不透明_双面。*/\n        static RENDERMODE_OPAQUEDOUBLEFACE: number;\n        /**渲染状态_透明混合。*/\n        static RENDERMODE_TRANSPARENT: number;\n        /**渲染状态_透明混合_双面。*/\n        static RENDERMODE_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_加色法混合。*/\n        static RENDERMODE_ADDTIVE: number;\n        /**渲染状态_加色法混合_双面。*/\n        static RENDERMODE_ADDTIVEDOUBLEFACE: number;\n        /**渲染状态_只读深度_透明混合。*/\n        static RENDERMODE_DEPTHREAD_TRANSPARENT: number;\n        /**渲染状态_只读深度_透明混合_双面。*/\n        static RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_只读深度_加色法混合。*/\n        static RENDERMODE_DEPTHREAD_ADDTIVE: number;\n        /**渲染状态_只读深度_加色法混合_双面。*/\n        static RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE: number;\n        /**渲染状态_无深度_透明混合。*/\n        static RENDERMODE_NONDEPTH_TRANSPARENT: number;\n        /**渲染状态_无深度_透明混合_双面。*/\n        static RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_无深度_加色法混合。*/\n        static RENDERMODE_NONDEPTH_ADDTIVE: number;\n        /**渲染状态_无深度_加色法混合_双面。*/\n        static RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE: number;\n        static DIFFUSETEXTURE: number;\n        static ALBEDO: number;\n        static UNICOLOR: number;\n        /** 默认材质，禁止修改*/\n        static defaultMaterial: GlitterMaterial;\n        /**\n         * 加载闪光材质。\n         * @param url 闪光材质地址。\n         */\n        static load(url: string): GlitterMaterial;\n        /**\n         * 设置渲染模式。\n         * @return 渲染模式。\n         */\n        renderMode: number;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        diffuseTexture: BaseTexture;\n        /**\n         * 获取颜色。\n         * @return 漫反射颜色。\n         */\n        /**\n         * 设置颜色。\n         * @param value 颜色。\n         */\n        color: Vector4;\n        /**\n         * 获取反射率。\n         * @return 反射率。\n         */\n        /**\n         * 设置反射率。\n         * @param value 反射率。\n         */\n        albedo: Vector4;\n        /**\n         * @inheritDoc\n         */\n        setShaderName(name: string): void;\n        constructor();\n    }\n}\ndeclare module laya.d3.core.material {\n    import TransformUV = laya.d3.core.TransformUV;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import DataTexture2D = laya.d3.resource.DataTexture2D;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    class PBRMaterial extends BaseMaterial {\n        static DIFFUSETEXTURE: number;\n        static NORMALTEXTURE: number;\n        static PBRINFOTEXTURE: number;\n        static PBRLUTTEXTURE: number;\n        static UVANIAGE: number;\n        static MATERIALROUGHNESS: number;\n        static MATERIALMETALESS: number;\n        static UVMATRIX: number;\n        static UVAGE: number;\n        static AOOBJPOS: number;\n        static HSNOISETEXTURE: number;\n        static SHADERDEFINE_FIX_ROUGHNESS: number;\n        static SHADERDEFINE_FIX_METALESS: number;\n        static SHADERDEFINE_HAS_TANGENT: number;\n        static SHADERDEFINE_TEST_CLIPZ: number;\n        static SHADERDEFINE_HAS_PBRINFO: number;\n        static SHADERDEFINE_USE_GROUNDTRUTH: number;\n        /**渲染状态_不透明。*/\n        static RENDERMODE_OPAQUE: number;\n        /**渲染状态_不透明_双面。*/\n        static RENDERMODE_OPAQUEDOUBLEFACE: number;\n        /**渲染状态_透明测试。*/\n        static RENDERMODE_CUTOUT: number;\n        /**渲染状态_透明测试_双面。*/\n        static RENDERMODE_CUTOUTDOUBLEFACE: number;\n        /**渲染状态_透明混合。*/\n        static RENDERMODE_TRANSPARENT: number;\n        static pbrlutTex: DataTexture2D;\n        static HammersleyNoiseTex: DataTexture2D;\n        protected _transformUV: TransformUV;\n        /** 默认材质，禁止修改*/\n        static defaultMaterial: PBRMaterial;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载标准材质。\n         * @param url 标准材质地址。\n         */\n        static load(url: string): PBRMaterial;\n        /**\n         * 获取粗糙度的值，0为特别光滑，1为特别粗糙。\n         * @return 粗糙度的值。\n         */\n        /**\n         * 设置粗糙度的值，0为特别光滑，1为特别粗糙。\n         * @param value 粗糙度。\n         */\n        roughness: number;\n        metaless: number;\n        has_tangent: boolean;\n        use_groundtruth: boolean;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        diffuseTexture: BaseTexture;\n        /**\n         * 获取PBRLUT贴图。\n         * @return PBRLUT贴图。\n         */\n        /**\n         * 设置PBRLUT贴图。\n         * @param value PBRLUT贴图。\n         */\n        pbrlutTexture: BaseTexture;\n        /**\n         * 获取法线贴图。\n         * @return 法线贴图。\n         */\n        /**\n         * 设置法线贴图。\n         * @param value 法线贴图。\n         */\n        normalTexture: BaseTexture;\n        /**\n         * 获取pbr信息贴图。\n         * @return pbr信息贴图。\n         */\n        /**\n         * 设置pbr信息贴图。\n         * @param value pbr信息贴图。\n         */\n        pbrInfoTexture: BaseTexture;\n        /**\n         * 获取UV变换。\n         * @return  UV变换。\n         */\n        /**\n         * 设置UV变换。\n         * @param value UV变换。\n         */\n        transformUV: TransformUV;\n        constructor();\n        /**\n         * 禁用灯光。\n         */\n        disableLight(): void;\n        /**\n         * 禁用雾化。\n         */\n        disableFog(): void;\n        renderMode: number;\n        testClipZ: boolean;\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * vdc算法产生的序列。这个比random要均匀一些。\n         */\n        radicalInverse_VdC(bits: number): number;\n        /**\n         *\n         */\n        createHammersleyTex(w: number, h: number): Uint8Array;\n    }\n}\ndeclare module laya.d3.core.material {\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author WuTaiLang\n     */\n    class PBRSpecularMaterial extends BaseMaterial {\n        static SmoothnessSource_MetallicGlossTexture_Alpha: number;\n        static SmoothnessSource_DiffuseTexture_Alpha: number;\n        static SHADERDEFINE_DIFFUSETEXTURE: number;\n        static SHADERDEFINE_NORMALTEXTURE: number;\n        static SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA: number;\n        static SHADERDEFINE_SPECULARTEXTURE: number;\n        static SHADERDEFINE_OCCLUSIONTEXTURE: number;\n        static SHADERDEFINE_PARALLAXTEXTURE: number;\n        static SHADERDEFINE_EMISSION: number;\n        static SHADERDEFINE_EMISSIONTEXTURE: number;\n        static SHADERDEFINE_TILINGOFFSET: number;\n        static DIFFUSETEXTURE: number;\n        static SPECULARTEXTURE: number;\n        static NORMALTEXTURE: number;\n        static PARALLAXTEXTURE: number;\n        static OCCLUSIONTEXTURE: number;\n        static EMISSIONTEXTURE: number;\n        static DIFFUSECOLOR: number;\n        static SPECULARCOLOR: number;\n        static EMISSIONCOLOR: number;\n        static SMOOTHNESS: number;\n        static SMOOTHNESSSCALE: number;\n        static SMOOTHNESSSOURCE: number;\n        static OCCLUSIONSTRENGTH: number;\n        static NORMALSCALE: number;\n        static PARALLAXSCALE: number;\n        static ENABLEEMISSION: number;\n        static TILINGOFFSET: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 获取漫反射颜色。\n         * @return 漫反射颜色。\n         */\n        /**\n         * 设置漫反射颜色。\n         * @param value 漫反射颜色。\n         */\n        albedoColor: Vector4;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        albedoTexture: BaseTexture;\n        /**\n         * 获取法线贴图。\n         * @return 法线贴图。\n         */\n        /**\n         * 设置法线贴图。\n         * @param value 法线贴图。\n         */\n        normalTexture: BaseTexture;\n        /**\n         * 获取法线贴图缩放系数。\n         * @return 法线贴图缩放系数。\n         */\n        /**\n         * 设置法线贴图缩放系数。\n         * @param value 法线贴图缩放系数。\n         */\n        normalTextureScale: number;\n        /**\n         * 获取视差贴图。\n         * @return 视察贴图。\n         */\n        /**\n         * 设置视差贴图。\n         * @param value 视察贴图。\n         */\n        parallaxTexture: BaseTexture;\n        /**\n         * 获取视差贴图缩放系数。\n         * @return 视差缩放系数。\n         */\n        /**\n         * 设置视差贴图缩放系数。\n         * @param value 视差缩放系数。\n         */\n        parallaxTextureScale: number;\n        /**\n         * 获取遮挡贴图。\n         * @return 遮挡贴图。\n         */\n        /**\n         * 设置遮挡贴图。\n         * @param value 遮挡贴图。\n         */\n        occlusionTexture: BaseTexture;\n        /**\n         * 获取遮挡贴图强度。\n         * @return 遮挡贴图强度,范围为0到1。\n         */\n        /**\n         * 设置遮挡贴图强度。\n         * @param value 遮挡贴图强度,范围为0到1。\n         */\n        occlusionTextureStrength: number;\n        /**\n         * 获取高光贴图。\n         * @return 高光贴图。\n         */\n        /**\n         * 设置高光贴图。\n         * @param value 高光贴图。\n         */\n        specularTexture: BaseTexture;\n        /**\n         * 获取高光颜色。\n         * @return 高光颜色。\n         */\n        /**\n         * 设置高光颜色。\n         * @param value 高光颜色。\n         */\n        specularColor: Vector4;\n        /**\n         * 获取光滑度。\n         * @return 光滑度,范围为0到1。\n         */\n        /**\n         * 设置光滑度。\n         * @param value 光滑度,范围为0到1。\n         */\n        smoothness: number;\n        /**\n         * 获取光滑度缩放系数。\n         * @return 光滑度缩放系数,范围为0到1。\n         */\n        /**\n         * 设置光滑度缩放系数。\n         * @param value 光滑度缩放系数,范围为0到1。\n         */\n        smoothnessTextureScale: number;\n        /**\n         * 获取光滑度数据源\n         * @return 光滑滑度数据源,0或1。\n         */\n        /**\n         * 设置光滑度数据源。\n         * @param value 光滑滑度数据源,0或1。\n         */\n        smoothnessSource: number;\n        /**\n         * 获取是否激活放射属性。\n         * @return 是否激活放射属性。\n         */\n        /**\n         * 设置是否激活放射属性。\n         * @param value 是否激活放射属性\n         */\n        enableEmission: boolean;\n        /**\n         * 获取放射颜色。\n         * @return 放射颜色。\n         */\n        /**\n         * 设置放射颜色。\n         * @param value 放射颜色。\n         */\n        emissionColor: Vector4;\n        /**\n         * 获取放射贴图。\n         * @return 放射贴图。\n         */\n        /**\n         * 设置放射贴图。\n         * @param value 放射贴图。\n         */\n        emissionTexture: BaseTexture;\n        /**\n         * 获取纹理平铺和偏移。\n         * @return 纹理平铺和偏移。\n         */\n        /**\n         * 设置纹理平铺和偏移。\n         * @param value 纹理平铺和偏移。\n         */\n        tilingOffset: Vector4;\n        constructor();\n    }\n}\ndeclare module laya.d3.core.material {\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author WuTaiLang\n     */\n    class PBRStandardMaterial extends BaseMaterial {\n        static SmoothnessSource_MetallicGlossTexture_Alpha: number;\n        static SmoothnessSource_DiffuseTexture_Alpha: number;\n        static SHADERDEFINE_DIFFUSETEXTURE: number;\n        static SHADERDEFINE_NORMALTEXTURE: number;\n        static SHADERDEFINE_SMOOTHNESSSOURCE_DIFFUSETEXTURE_ALPHA: number;\n        static SHADERDEFINE_METALLICGLOSSTEXTURE: number;\n        static SHADERDEFINE_OCCLUSIONTEXTURE: number;\n        static SHADERDEFINE_PARALLAXTEXTURE: number;\n        static SHADERDEFINE_EMISSION: number;\n        static SHADERDEFINE_EMISSIONTEXTURE: number;\n        static SHADERDEFINE_TILINGOFFSET: number;\n        static DIFFUSETEXTURE: number;\n        static METALLICGLOSSTEXTURE: number;\n        static NORMALTEXTURE: number;\n        static PARALLAXTEXTURE: number;\n        static OCCLUSIONTEXTURE: number;\n        static EMISSIONTEXTURE: number;\n        static DIFFUSECOLOR: number;\n        static EMISSIONCOLOR: number;\n        static METALLIC: number;\n        static SMOOTHNESS: number;\n        static SMOOTHNESSSCALE: number;\n        static SMOOTHNESSSOURCE: number;\n        static OCCLUSIONSTRENGTH: number;\n        static NORMALSCALE: number;\n        static PARALLAXSCALE: number;\n        static ENABLEEMISSION: number;\n        static TILINGOFFSET: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 获取漫反射颜色。\n         * @return 漫反射颜色。\n         */\n        /**\n         * 设置漫反射颜色。\n         * @param value 漫反射颜色。\n         */\n        albedoColor: Vector4;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        albedoTexture: BaseTexture;\n        /**\n         * 获取法线贴图。\n         * @return 法线贴图。\n         */\n        /**\n         * 设置法线贴图。\n         * @param value 法线贴图。\n         */\n        normalTexture: BaseTexture;\n        /**\n         * 获取法线贴图缩放系数。\n         * @return 法线贴图缩放系数。\n         */\n        /**\n         * 设置法线贴图缩放系数。\n         * @param value 法线贴图缩放系数。\n         */\n        normalTextureScale: number;\n        /**\n         * 获取视差贴图。\n         * @return 视察贴图。\n         */\n        /**\n         * 设置视差贴图。\n         * @param value 视察贴图。\n         */\n        parallaxTexture: BaseTexture;\n        /**\n         * 获取视差贴图缩放系数。\n         * @return 视差缩放系数。\n         */\n        /**\n         * 设置视差贴图缩放系数。\n         * @param value 视差缩放系数。\n         */\n        parallaxTextureScale: number;\n        /**\n         * 获取遮挡贴图。\n         * @return 遮挡贴图。\n         */\n        /**\n         * 设置遮挡贴图。\n         * @param value 遮挡贴图。\n         */\n        occlusionTexture: BaseTexture;\n        /**\n         * 获取遮挡贴图强度。\n         * @return 遮挡贴图强度,范围为0到1。\n         */\n        /**\n         * 设置遮挡贴图强度。\n         * @param value 遮挡贴图强度,范围为0到1。\n         */\n        occlusionTextureStrength: number;\n        /**\n         * 获取金属光滑度贴图。\n         * @return 金属光滑度贴图。\n         */\n        /**\n         * 设置金属光滑度贴图。\n         * @param value 金属光滑度贴图。\n         */\n        metallicGlossTexture: BaseTexture;\n        /**\n         * 获取金属度。\n         * @return 金属度,范围为0到1。\n         */\n        /**\n         * 设置金属度。\n         * @param value 金属度,范围为0到1。\n         */\n        metallic: number;\n        /**\n         * 获取光滑度。\n         * @return 光滑度,范围为0到1。\n         */\n        /**\n         * 设置光滑度。\n         * @param value 光滑度,范围为0到1。\n         */\n        smoothness: number;\n        /**\n         * 获取光滑度缩放系数。\n         * @return 光滑度缩放系数,范围为0到1。\n         */\n        /**\n         * 设置光滑度缩放系数。\n         * @param value 光滑度缩放系数,范围为0到1。\n         */\n        smoothnessTextureScale: number;\n        /**\n         * 获取光滑度数据源\n         * @return 光滑滑度数据源,0或1。\n         */\n        /**\n         * 设置光滑度数据源。\n         * @param value 光滑滑度数据源,0或1。\n         */\n        smoothnessSource: number;\n        /**\n         * 获取是否激活放射属性。\n         * @return 是否激活放射属性。\n         */\n        /**\n         * 设置是否激活放射属性。\n         * @param value 是否激活放射属性\n         */\n        enableEmission: boolean;\n        /**\n         * 获取放射颜色。\n         * @return 放射颜色。\n         */\n        /**\n         * 设置放射颜色。\n         * @param value 放射颜色。\n         */\n        emissionColor: Vector4;\n        /**\n         * 获取放射贴图。\n         * @return 放射贴图。\n         */\n        /**\n         * 设置放射贴图。\n         * @param value 放射贴图。\n         */\n        emissionTexture: BaseTexture;\n        /**\n         * 获取纹理平铺和偏移。\n         * @return 纹理平铺和偏移。\n         */\n        /**\n         * 设置纹理平铺和偏移。\n         * @param value 纹理平铺和偏移。\n         */\n        tilingOffset: Vector4;\n        constructor();\n    }\n}\ndeclare module laya.d3.core.material {\n    import TransformUV = laya.d3.core.TransformUV;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author ...\n     */\n    class StandardMaterial extends BaseMaterial {\n        /**渲染状态_不透明。*/\n        static RENDERMODE_OPAQUE: number;\n        /**渲染状态_不透明_双面。*/\n        static RENDERMODE_OPAQUEDOUBLEFACE: number;\n        /**渲染状态_透明测试。*/\n        static RENDERMODE_CUTOUT: number;\n        /**渲染状态_透明测试_双面。*/\n        static RENDERMODE_CUTOUTDOUBLEFACE: number;\n        /**渲染状态_透明混合。*/\n        static RENDERMODE_TRANSPARENT: number;\n        /**渲染状态_透明混合_双面。*/\n        static RENDERMODE_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_加色法混合。*/\n        static RENDERMODE_ADDTIVE: number;\n        /**渲染状态_加色法混合_双面。*/\n        static RENDERMODE_ADDTIVEDOUBLEFACE: number;\n        /**渲染状态_只读深度_透明混合。*/\n        static RENDERMODE_DEPTHREAD_TRANSPARENT: number;\n        /**渲染状态_只读深度_透明混合_双面。*/\n        static RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_只读深度_加色法混合。*/\n        static RENDERMODE_DEPTHREAD_ADDTIVE: number;\n        /**渲染状态_只读深度_加色法混合_双面。*/\n        static RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE: number;\n        /**渲染状态_无深度_透明混合。*/\n        static RENDERMODE_NONDEPTH_TRANSPARENT: number;\n        /**渲染状态_无深度_透明混合_双面。*/\n        static RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_无深度_加色法混合。*/\n        static RENDERMODE_NONDEPTH_ADDTIVE: number;\n        /**渲染状态_无深度_加色法混合_双面。*/\n        static RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE: number;\n        static SHADERDEFINE_DIFFUSEMAP: number;\n        static SHADERDEFINE_NORMALMAP: number;\n        static SHADERDEFINE_SPECULARMAP: number;\n        static SHADERDEFINE_EMISSIVEMAP: number;\n        static SHADERDEFINE_AMBIENTMAP: number;\n        static SHADERDEFINE_REFLECTMAP: number;\n        static SHADERDEFINE_UVTRANSFORM: number;\n        static SHADERDEFINE_TILINGOFFSET: number;\n        static SHADERDEFINE_ADDTIVEFOG: number;\n        static DIFFUSETEXTURE: number;\n        static NORMALTEXTURE: number;\n        static SPECULARTEXTURE: number;\n        static EMISSIVETEXTURE: number;\n        static AMBIENTTEXTURE: number;\n        static REFLECTTEXTURE: number;\n        static ALBEDO: number;\n        static UVANIAGE: number;\n        static MATERIALAMBIENT: number;\n        static MATERIALDIFFUSE: number;\n        static MATERIALSPECULAR: number;\n        static MATERIALREFLECT: number;\n        static UVMATRIX: number;\n        static UVAGE: number;\n        static TILINGOFFSET: number;\n        /** 默认材质，禁止修改*/\n        static defaultMaterial: StandardMaterial;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载标准材质。\n         * @param url 标准材质地址。\n         */\n        static load(url: string): StandardMaterial;\n        protected _transformUV: TransformUV;\n        /**\n         * 设置渲染模式。\n         * @return 渲染模式。\n         */\n        renderMode: number;\n        /**\n         * 获取纹理平铺和偏移。\n         * @return 纹理平铺和偏移。\n         */\n        /**\n         * 获取纹理平铺和偏移。\n         * @param value 纹理平铺和偏移。\n         */\n        tilingOffset: Vector4;\n        /**\n         * 设置环境光颜色。\n         * @param value 环境光颜色。\n         */\n        ambientColor: Vector3;\n        /**\n         * 设置漫反射光颜色。\n         * @param value 漫反射光颜色。\n         */\n        diffuseColor: Vector3;\n        /**\n         * 设置高光颜色。\n         * @param value 高光颜色。\n         */\n        specularColor: Vector4;\n        /**\n         * 设置反射颜色。\n         * @param value 反射颜色。\n         */\n        reflectColor: Vector3;\n        /**\n         * 设置反射率。\n         * @param value 反射率。\n         */\n        albedoColor: Vector4;\n        /**\n         * 设置反射率。\n         * @param value 反射率。\n         */\n        albedo: Vector4;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        diffuseTexture: BaseTexture;\n        /**\n         * 获取法线贴图。\n         * @return 法线贴图。\n         */\n        /**\n         * 设置法线贴图。\n         * @param value 法线贴图。\n         */\n        normalTexture: BaseTexture;\n        /**\n         * 获取高光贴图。\n         * @return 高光贴图。\n         */\n        /**\n         * 设置高光贴图。\n         * @param value  高光贴图。\n         */\n        specularTexture: BaseTexture;\n        /**\n         * 获取放射贴图。\n         * @return 放射贴图。\n         */\n        /**\n         * 设置放射贴图。\n         * @param value 放射贴图。\n         */\n        emissiveTexture: BaseTexture;\n        /**\n         * 获取环境贴图。\n         * @return 环境贴图。\n         */\n        /**\n         * 设置环境贴图。\n         * @param  value 环境贴图。\n         */\n        ambientTexture: BaseTexture;\n        /**\n         * 获取反射贴图。\n         * @return 反射贴图。\n         */\n        /**\n         * 设置反射贴图。\n         * @param value 反射贴图。\n         */\n        reflectTexture: BaseTexture;\n        /**\n         * 获取UV变换。\n         * @return  UV变换。\n         */\n        /**\n         * 设置UV变换。\n         * @param value UV变换。\n         */\n        transformUV: TransformUV;\n        constructor();\n        /**\n         * @private\n         */\n        static _parseStandardMaterial(textureMap: any, material: StandardMaterial, json: any): void;\n        /**\n         * 禁用灯光。\n         */\n        disableLight(): void;\n        /**\n         * 禁用雾化。\n         */\n        disableFog(): void;\n        /**\n         * @inheritDoc\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * @inheritDoc\n         */\n        cloneTo(destObject: any): void;\n    }\n}\ndeclare module laya.d3.core.material {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author ...\n     */\n    class TerrainMaterial extends BaseMaterial {\n        /**渲染状态_不透明。*/\n        static RENDERMODE_OPAQUE: number;\n        /**渲染状态_透明混合。*/\n        static RENDERMODE_TRANSPARENT: number;\n        /**渲染状态_透明混合。*/\n        static SPLATALPHATEXTURE: number;\n        static NORMALTEXTURE: number;\n        static DIFFUSETEXTURE1: number;\n        static DIFFUSETEXTURE2: number;\n        static DIFFUSETEXTURE3: number;\n        static DIFFUSETEXTURE4: number;\n        static DIFFUSESCALE1: number;\n        static DIFFUSESCALE2: number;\n        static DIFFUSESCALE3: number;\n        static DIFFUSESCALE4: number;\n        static MATERIALAMBIENT: number;\n        static MATERIALDIFFUSE: number;\n        static MATERIALSPECULAR: number;\n        /**地形细节宏定义。*/\n        static SHADERDEFINE_DETAIL_NUM1: number;\n        static SHADERDEFINE_DETAIL_NUM2: number;\n        static SHADERDEFINE_DETAIL_NUM3: number;\n        static SHADERDEFINE_DETAIL_NUM4: number;\n        /** 默认材质，禁止修改*/\n        static defaultMaterial: TerrainMaterial;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载闪光材质。\n         * @param url 闪光材质地址。\n         */\n        static load(url: string): TerrainMaterial;\n        setDiffuseScale1(x: number, y: number): void;\n        setDiffuseScale2(x: number, y: number): void;\n        setDiffuseScale3(x: number, y: number): void;\n        setDiffuseScale4(x: number, y: number): void;\n        setDetailNum(value: number): void;\n        ambientColor: Vector3;\n        diffuseColor: Vector3;\n        specularColor: Vector4;\n        /**\n         * 设置渲染模式。\n         * @return 渲染模式。\n         */\n        renderMode: number;\n        /**\n         * 获取第一层贴图。\n         * @return 第一层贴图。\n         */\n        /**\n         * 设置第一层贴图。\n         * @param value 第一层贴图。\n         */\n        diffuseTexture1: BaseTexture;\n        /**\n         * 获取第二层贴图。\n         * @return 第二层贴图。\n         */\n        /**\n         * 设置第二层贴图。\n         * @param value 第二层贴图。\n         */\n        diffuseTexture2: BaseTexture;\n        /**\n         * 获取第三层贴图。\n         * @return 第三层贴图。\n         */\n        /**\n         * 设置第三层贴图。\n         * @param value 第三层贴图。\n         */\n        diffuseTexture3: BaseTexture;\n        /**\n         * 获取第四层贴图。\n         * @return 第四层贴图。\n         */\n        /**\n         * 设置第四层贴图。\n         * @param value 第四层贴图。\n         */\n        diffuseTexture4: BaseTexture;\n        /**\n         * 获取splatAlpha贴图。\n         * @return splatAlpha贴图。\n         */\n        /**\n         * 设置splatAlpha贴图。\n         * @param value splatAlpha贴图。\n         */\n        splatAlphaTexture: BaseTexture;\n        normalTexture: BaseTexture;\n        disableLight(): void;\n        /**\n         * @inheritDoc\n         */\n        setShaderName(name: string): void;\n        constructor();\n    }\n}\ndeclare module laya.d3.core.material {\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    class WaterMaterial extends BaseMaterial {\n        static DIFFUSETEXTURE: number;\n        static NORMALTEXTURE: number;\n        static UNDERWATERTEXTURE: number;\n        static VERTEXDISPTEXTURE: number;\n        static UVANIAGE: number;\n        static UVMATRIX: number;\n        static UVAGE: number;\n        static CURTM: number;\n        static DETAILTEXTURE: number;\n        static DEEPCOLORTEXTURE: number;\n        static SKYTEXTURE: number;\n        static WAVEINFO: number;\n        static WAVEINFOD: number;\n        static WAVEMAINDIR: number;\n        static SCRSIZE: number;\n        static WATERINFO: number;\n        static FOAMTEXTURE: number;\n        static GEOWAVE_UV_SCALE: number;\n        static SEA_COLOR: number;\n        static WAVEINFODEEPSCALE: number;\n        static SHADERDEFINE_SHOW_NORMAL: number;\n        static SHADERDEFINE_CUBE_ENV: number;\n        static SHADERDEFINE_HDR_ENV: number;\n        static SHADERDEFINE_USE_FOAM: number;\n        static SHADERDEFINE_USE_REFRACT_TEX: number;\n        /**\n         * 如果定义了这个宏，就不再使用深度纹理，可以提高速度，但是建模麻烦一些。\n         */\n        static SHADERDEFINE_USEVERTEXHEIGHT: number;\n        /**渲染状态_不透明。*/\n        static RENDERMODE_OPAQUE: number;\n        /**渲染状态_不透明_双面。*/\n        static RENDERMODE_OPAQUEDOUBLEFACE: number;\n        /**渲染状态_透明测试。*/\n        static RENDERMODE_CUTOUT: number;\n        /**渲染状态_透明测试_双面。*/\n        static RENDERMODE_CUTOUTDOUBLEFACE: number;\n        /**渲染状态_透明混合。*/\n        static RENDERMODE_TRANSPARENT: number;\n        /** 默认材质，禁止修改*/\n        static defaultMaterial: WaterMaterial;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载标准材质。\n         * @param url 标准材质地址。\n         */\n        static load(url: string): WaterMaterial;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        diffuseTexture: BaseTexture;\n        /**\n         * 获取法线贴图。\n         * @return 法线贴图。\n         */\n        /**\n         * 设置法线贴图。\n         * @param value 法线贴图。\n         */\n        normalTexture: BaseTexture;\n        underWaterTexture: BaseTexture;\n        skyTexture: BaseTexture;\n        waterInfoTexture: BaseTexture;\n        foamTexture: BaseTexture;\n        /**\n         * 对定点进行变换的纹理。现在不用\n         */\n        vertexDispTexture: BaseTexture;\n        detailTexture: BaseTexture;\n        deepColorTexture: BaseTexture;\n        currentTm: number;\n        waveInfo: Float32Array;\n        waveInfoD: Float32Array;\n        waveMainDir: number;\n        deepScale: number;\n        geoWaveUVScale: number;\n        scrsize: Float32Array;\n        seaColor: Float32Array;\n        useVertexDeep: boolean;\n        windDir: number;\n        windSpeed: number;\n        useFoam: boolean;\n        useRefractTexture: boolean;\n        constructor();\n        /**\n         * 禁用雾化。\n         */\n        disableFog(): void;\n        renderMode: number;\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n    }\n}\ndeclare module laya.d3.core {\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import BaseMesh = laya.d3.resource.models.BaseMesh;\n    /**\n     * <code>MeshFilter</code> 类用于创建网格过滤器。\n     */\n    class MeshFilter extends GeometryFilter {\n        /**\n         * 获取共享网格。\n         * @return 共享网格。\n         */\n        /**\n         * 设置共享网格。\n         * @return  value 共享网格。\n         */\n        sharedMesh: BaseMesh;\n        /**\n         * @inheritDoc\n         */\n        readonly _isAsyncLoaded: boolean;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingSphere: BoundSphere;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingBox: BoundBox;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingBoxCorners: Array<any>;\n        /**\n         * 创建一个新的 <code>MeshFilter</code> 实例。\n         * @param owner 所属网格精灵。\n         */\n        constructor(owner: RenderableSprite3D);\n        /**\n         * @inheritDoc\n         */\n        _destroy(): void;\n    }\n}\ndeclare module laya.d3.core {\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * <code>MeshRender</code> 类用于网格渲染器。\n     */\n    class MeshRender extends BaseRender {\n        /**\n         * 创建一个新的 <code>MeshRender</code> 实例。\n         */\n        constructor(owner: RenderableSprite3D);\n        protected _calculateBoundingSphereByInitSphere(boundSphere: BoundSphere): void;\n        protected _calculateBoundBoxByInitCorners(corners: Array<any>): void;\n        protected _calculateBoundingSphere(): void;\n        protected _calculateBoundingBox(): void;\n        /**\n         * @private\n         */\n        _renderUpdate(projectionView: Matrix4x4): boolean;\n    }\n}\ndeclare module laya.d3.core {\n    import BaseMesh = laya.d3.resource.models.BaseMesh;\n    import Mesh = laya.d3.resource.models.Mesh;\n    /**\n     * <code>MeshSprite3D</code> 类用于创建网格。\n     */\n    class MeshSprite3D extends RenderableSprite3D {\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载网格模板。\n         * @param url 模板地址。\n         */\n        static load(url: string): MeshSprite3D;\n        /**\n         * 获取网格过滤器。\n         * @return  网格过滤器。\n         */\n        readonly meshFilter: MeshFilter;\n        /**\n         * 获取网格渲染器。\n         * @return  网格渲染器。\n         */\n        readonly meshRender: MeshRender;\n        /**\n         * 创建一个 <code>MeshSprite3D</code> 实例。\n         * @param mesh 网格,同时会加载网格所用默认材质。\n         * @param name 名字。\n         */\n        constructor(mesh?: BaseMesh, name?: string);\n        protected _clearSelfRenderObjects(): void;\n        protected _addSelfRenderObjects(): void;\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, json: any): void;\n        /**\n         * @private\n         */\n        _applyMeshMaterials(mesh: Mesh): void;\n        /**\n         * @inheritDoc\n         */\n        _addToInitStaticBatchManager(): void;\n        /**\n         * @inheritDoc\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * @inheritDoc\n         */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * @private\n         */\n        createConchModel(): any;\n    }\n}\ndeclare module laya.d3.core {\n    import RenderState = laya.d3.core.render.RenderState;\n    import Texture2D = laya.d3.resource.Texture2D;\n    import Mesh = laya.d3.resource.models.Mesh;\n    /**\n     * <code>TerrainMeshSprite3D</code> 类用于创建网格。\n     */\n    class MeshTerrainSprite3D extends MeshSprite3D {\n        /**\n         * 从网格创建一个TerrainMeshSprite3D实例和其高度图属性。\n         * @param mesh 网格。\n         * @param heightMapWidth 高度图宽度。\n         * @param heightMapHeight 高度图高度。\n         * @param name 名字。\n         */\n        static createFromMesh(mesh: Mesh, heightMapWidth: number, heightMapHeight: number, name?: string): MeshTerrainSprite3D;\n        /**\n         * 从网格创建一个TerrainMeshSprite3D实例、图片读取高度图属性。\n         * @param mesh 网格。\n         * @param image 高度图。\n         * @param name 名字。\n         */\n        static createFromMeshAndHeightMap(mesh: Mesh, texture: Texture2D, minHeight: number, maxHeight: number, name?: string): MeshTerrainSprite3D;\n        /**\n         * 获取地形X轴最小位置。\n         * @return  地形X轴最小位置。\n         */\n        readonly minX: number;\n        /**\n         * 获取地形Z轴最小位置。\n         * @return  地形X轴最小位置。\n         */\n        readonly minZ: number;\n        /**\n         * 获取地形X轴长度。\n         * @return  地形X轴长度。\n         */\n        readonly width: number;\n        /**\n         * 获取地形Z轴长度。\n         * @return  地形Z轴长度。\n         */\n        readonly depth: number;\n        /**\n         * 创建一个 <code>TerrainMeshSprite3D</code> 实例。\n         * @param mesh 网格。\n         * @param heightMap 高度图。\n         * @param name 名字。\n         */\n        constructor(mesh: Mesh, heightMap: HeightMap, name?: string);\n        /**\n         * @private\n         */\n        _update(state: RenderState): void;\n        /**\n         * 获取地形高度。\n         * @param x X轴坐标。\n         * @param z Z轴坐标。\n         */\n        getHeight(x: number, z: number): number;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>Burst</code> 类用于粒子的爆裂描述。\n     */\n    class Burst implements IClone {\n        /**\n         * 获取爆裂时间,单位为秒。\n         * @return 爆裂时间,单位为秒。\n         */\n        readonly time: number;\n        /**\n         * 获取爆裂的最小数量。\n         * @return 爆裂的最小数量。\n         */\n        readonly minCount: number;\n        /**\n         * 获取爆裂的最大数量。\n         * @return 爆裂的最大数量。\n         */\n        readonly maxCount: number;\n        /**\n         * 创建一个 <code>Burst</code> 实例。\n         * @param time 爆裂时间,单位为秒。\n         * @param minCount 爆裂的最小数量。\n         * @param time 爆裂的最大数量。\n         */\n        constructor(time: number, minCount: number, maxCount: number);\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    /**\n     * <code>ColorOverLifetime</code> 类用于粒子的生命周期颜色。\n     */\n    class ColorOverLifetime {\n        /**是否启用。*/\n        enbale: boolean;\n        /**\n         *获取颜色。\n         */\n        readonly color: GradientColor;\n        /**\n         * 创建一个 <code>ColorOverLifetime</code> 实例。\n         */\n        constructor(color: GradientColor);\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    import IDestroy = laya.resource.IDestroy;\n    /**\n     * <code>Emission</code> 类用于粒子发射器。\n     */\n    class Emission implements IClone, IDestroy {\n        _bursts: Array<any>;\n        /**是否启用。*/\n        enbale: boolean;\n        /**\n         * 获取粒子发射速率。\n         * @return 粒子发射速率 (个/秒)。\n         */\n        /**\n         * 设置粒子发射速率。\n         * @param emissionRate 粒子发射速率 (个/秒)。\n         */\n        emissionRate: number;\n        /**\n         * 获取是否已销毁。\n         * @return 是否已销毁。\n         */\n        readonly destroyed: boolean;\n        /**\n         * 创建一个 <code>Emission</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _destroy(): void;\n        /**\n         * 获取粒子爆裂个数。\n         * @return 粒子爆裂个数。\n         */\n        getBurstsCount(): number;\n        /**\n         * 通过索引获取粒子爆裂。\n         * @param index 爆裂索引。\n         * @return 粒子爆裂。\n         */\n        getBurstByIndex(index: number): Burst;\n        /**\n         * 增加粒子爆裂。\n         * @param burst 爆裂。\n         */\n        addBurst(burst: Burst): void;\n        /**\n         * 移除粒子爆裂。\n         * @param burst 爆裂。\n         */\n        removeBurst(burst: Burst): void;\n        /**\n         * 通过索引移除粒子爆裂。\n         * @param index 爆裂索引。\n         */\n        removeBurstByIndex(index: number): void;\n        /**\n         * 清空粒子爆裂。\n         */\n        clearBurst(): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>FrameOverTime</code> 类用于创建时间帧。\n     */\n    class FrameOverTime implements IClone {\n        /**\n         * 通过固定帧创建一个 <code>FrameOverTime</code> 实例。\n         * @param\tconstant 固定帧。\n         * @return 时间帧。\n         */\n        static createByConstant(constant: number): FrameOverTime;\n        /**\n         * 通过时间帧创建一个 <code>FrameOverTime</code> 实例。\n         * @param\toverTime 时间帧。\n         * @return 时间帧。\n         */\n        static createByOverTime(overTime: GradientDataInt): FrameOverTime;\n        /**\n         * 通过随机双固定帧创建一个 <code>FrameOverTime</code> 实例。\n         * @param\tconstantMin 最小固定帧。\n         * @param\tconstantMax 最大固定帧。\n         * @return 时间帧。\n         */\n        static createByRandomTwoConstant(constantMin: number, constantMax: number): FrameOverTime;\n        /**\n         * 通过随机双时间帧创建一个 <code>FrameOverTime</code> 实例。\n         * @param\tgradientFrameMin 最小时间帧。\n         * @param\tgradientFrameMax 最大时间帧。\n         * @return 时间帧。\n         */\n        static createByRandomTwoOverTime(gradientFrameMin: GradientDataInt, gradientFrameMax: GradientDataInt): FrameOverTime;\n        /**\n         *生命周期旋转类型,0常量模式，1曲线模式，2随机双常量模式，3随机双曲线模式。\n         */\n        readonly type: number;\n        /**\n         * 固定帧。\n         */\n        readonly constant: number;\n        /**\n         * 时间帧。\n         */\n        readonly frameOverTimeData: GradientDataInt;\n        /**\n         * 最小固定帧。\n         */\n        readonly constantMin: number;\n        /**\n         * 最大固定帧。\n         */\n        readonly constantMax: number;\n        /**\n         * 最小时间帧。\n         */\n        readonly frameOverTimeDataMin: GradientDataInt;\n        /**\n         * 最大时间帧。\n         */\n        readonly frameOverTimeDataMax: GradientDataInt;\n        /**\n         * 创建一个 <code>FrameOverTime,不允许new，请使用静态创建函数。</code> 实例。\n         */\n        constructor();\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>GradientRotation</code> 类用于创建渐变角速度。\n     */\n    class GradientAngularVelocity implements IClone {\n        /**\n         * 通过固定角速度创建一个 <code>GradientAngularVelocity</code> 实例。\n         * @param\tconstant 固定角速度。\n         * @return 渐变角速度。\n         */\n        static createByConstant(constant: number): GradientAngularVelocity;\n        /**\n         * 通过分轴固定角速度创建一个 <code>GradientAngularVelocity</code> 实例。\n         * @param\tseparateConstant 分轴固定角速度。\n         * @return 渐变角速度。\n         */\n        static createByConstantSeparate(separateConstant: Vector4): GradientAngularVelocity;\n        /**\n         * 通过渐变角速度创建一个 <code>GradientAngularVelocity</code> 实例。\n         * @param\tgradient 渐变角速度。\n         * @return 渐变角速度。\n         */\n        static createByGradient(gradient: GradientDataNumber): GradientAngularVelocity;\n        /**\n         * 通过分轴渐变角速度创建一个 <code>GradientAngularVelocity</code> 实例。\n         * @param\tgradientX X轴渐变角速度。\n         * @param\tgradientY Y轴渐变角速度。\n         * @param\tgradientZ Z轴渐变角速度。\n         * @return  渐变角速度。\n         */\n        static createByGradientSeparate(gradientX: GradientDataNumber, gradientY: GradientDataNumber, gradientZ: GradientDataNumber, gradientW: GradientDataNumber): GradientAngularVelocity;\n        /**\n         * 通过随机双固定角速度创建一个 <code>GradientAngularVelocity</code> 实例。\n         * @param\tconstantMin 最小固定角速度。\n         * @param\tconstantMax 最大固定角速度。\n         * @return 渐变角速度。\n         */\n        static createByRandomTwoConstant(constantMin: number, constantMax: number): GradientAngularVelocity;\n        /**\n         * 通过随机分轴双固定角速度创建一个 <code>GradientAngularVelocity</code> 实例。\n         * @param\tseparateConstantMin  最小分轴固定角速度。\n         * @param\tseparateConstantMax  最大分轴固定角速度。\n         * @return  渐变角速度。\n         */\n        static createByRandomTwoConstantSeparate(separateConstantMin: Vector3, separateConstantMax: Vector3): GradientAngularVelocity;\n        /**\n         * 通过随机双渐变角速度创建一个 <code>GradientAngularVelocity</code> 实例。\n         * @param\tgradientMin 最小渐变角速度。\n         * @param\tgradientMax 最大渐变角速度。\n         * @return  渐变角速度。\n         */\n        static createByRandomTwoGradient(gradientMin: GradientDataNumber, gradientMax: GradientDataNumber): GradientAngularVelocity;\n        /**\n         * 通过分轴随机双渐变角速度创建一个 <code>GradientAngularVelocity</code> 实例。\n         * @param\tgradientXMin  最小X轴渐变角速度。\n         * @param\tgradientXMax  最大X轴渐变角速度。\n         * @param\tgradientYMin  最小Y轴渐变角速度。\n         * @param\tgradientYMax  最大Y轴渐变角速度。\n         * @param\tgradientZMin  最小Z轴渐变角速度。\n         * @param\tgradientZMax  最大Z轴渐变角速度。\n         * @return  渐变角速度。\n         */\n        static createByRandomTwoGradientSeparate(gradientXMin: GradientDataNumber, gradientXMax: GradientDataNumber, gradientYMin: GradientDataNumber, gradientYMax: GradientDataNumber, gradientZMin: GradientDataNumber, gradientZMax: GradientDataNumber, gradientWMin: GradientDataNumber, gradientWMax: GradientDataNumber): GradientAngularVelocity;\n        /**\n         *生命周期角速度类型,0常量模式，1曲线模式，2随机双常量模式，3随机双曲线模式。\n         */\n        readonly type: number;\n        /**\n         *是否分轴。\n         */\n        readonly separateAxes: boolean;\n        /**\n         * 固定角速度。\n         */\n        readonly constant: number;\n        /**\n         * 分轴固定角速度。\n         */\n        readonly constantSeparate: Vector4;\n        /**\n         * 渐变角速度。\n         */\n        readonly gradient: GradientDataNumber;\n        /**\n         * 渐变角角速度X。\n         */\n        readonly gradientX: GradientDataNumber;\n        /**\n         * 渐变角速度Y。\n         */\n        readonly gradientY: GradientDataNumber;\n        /**\n         *渐变角速度Z。\n         */\n        readonly gradientZ: GradientDataNumber;\n        /**\n         *渐变角速度Z。\n         */\n        readonly gradientW: GradientDataNumber;\n        /**\n         * 最小随机双固定角速度。\n         */\n        readonly constantMin: number;\n        /**\n         * 最大随机双固定角速度。\n         */\n        readonly constantMax: number;\n        /**\n         * 最小分轴随机双固定角速度。\n         */\n        readonly constantMinSeparate: Vector3;\n        /**\n         * 最大分轴随机双固定角速度。\n         */\n        readonly constantMaxSeparate: Vector3;\n        /**\n         *最小渐变角速度。\n         */\n        readonly gradientMin: GradientDataNumber;\n        /**\n         * 最大渐变角速度。\n         */\n        readonly gradientMax: GradientDataNumber;\n        /**\n         * 最小渐变角速度X。\n         */\n        readonly gradientXMin: GradientDataNumber;\n        /**\n         * 最大渐变角速度X。\n         */\n        readonly gradientXMax: GradientDataNumber;\n        /**\n         * 最小渐变角速度Y。\n         */\n        readonly gradientYMin: GradientDataNumber;\n        /**\n         *最大渐变角速度Y。\n         */\n        readonly gradientYMax: GradientDataNumber;\n        /**\n         * 最小渐变角速度Z。\n         */\n        readonly gradientZMin: GradientDataNumber;\n        /**\n         * 最大渐变角速度Z。\n         */\n        readonly gradientZMax: GradientDataNumber;\n        /**\n         * 最小渐变角速度Z。\n         */\n        readonly gradientWMin: GradientDataNumber;\n        /**\n         * 最大渐变角速度Z。\n         */\n        readonly gradientWMax: GradientDataNumber;\n        /**\n         * 创建一个 <code>GradientAngularVelocity,不允许new，请使用静态创建函数。</code> 实例。\n         */\n        constructor();\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>GradientColor</code> 类用于创建渐变颜色。\n     */\n    class GradientColor implements IClone {\n        /**\n         * 通过固定颜色创建一个 <code>GradientColor</code> 实例。\n         * @param constant 固定颜色。\n         */\n        static createByConstant(constant: Vector4): GradientColor;\n        /**\n         * 通过渐变颜色创建一个 <code>GradientColor</code> 实例。\n         * @param gradient 渐变色。\n         */\n        static createByGradient(gradient: GradientDataColor): GradientColor;\n        /**\n         * 通过随机双固定颜色创建一个 <code>GradientColor</code> 实例。\n         * @param minConstant 最小固定颜色。\n         * @param maxConstant 最大固定颜色。\n         */\n        static createByRandomTwoConstant(minConstant: Vector4, maxConstant: Vector4): GradientColor;\n        /**\n         * 通过随机双渐变颜色创建一个 <code>GradientColor</code> 实例。\n         * @param minGradient 最小渐变颜色。\n         * @param maxGradient 最大渐变颜色。\n         */\n        static createByRandomTwoGradient(minGradient: GradientDataColor, maxGradient: GradientDataColor): GradientColor;\n        /**\n         *生命周期颜色类型,0为固定颜色模式,1渐变模式,2为随机双固定颜色模式,3随机双渐变模式。\n         */\n        readonly type: number;\n        /**\n         * 固定颜色。\n         */\n        readonly constant: Vector4;\n        /**\n         * 最小固定颜色。\n         */\n        readonly constantMin: Vector4;\n        /**\n         * 最大固定颜色。\n         */\n        readonly constantMax: Vector4;\n        /**\n         * 渐变颜色。\n         */\n        readonly gradient: GradientDataColor;\n        /**\n         * 最小渐变颜色。\n         */\n        readonly gradientMin: GradientDataColor;\n        /**\n         * 最大渐变颜色。\n         */\n        readonly gradientMax: GradientDataColor;\n        /**\n         * 创建一个 <code>GradientColor,不允许new，请使用静态创建函数。</code> 实例。\n         */\n        constructor();\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>GradientDataColor</code> 类用于创建颜色渐变。\n     */\n    class GradientDataColor implements IClone {\n        _alphaElements: Float32Array;\n        _rgbElements: Float32Array;\n        /**渐变Alpha数量。*/\n        readonly alphaGradientCount: number;\n        /**渐变RGB数量。*/\n        readonly rgbGradientCount: number;\n        /**\n         * 创建一个 <code>GradientDataColor</code> 实例。\n         */\n        constructor();\n        /**\n         * 增加Alpha渐变。\n         * @param\tkey 生命周期，范围为0到1。\n         * @param\tvalue rgb值。\n         */\n        addAlpha(key: number, value: number): void;\n        /**\n         * 增加RGB渐变。\n         * @param\tkey 生命周期，范围为0到1。\n         * @param\tvalue RGB值。\n         */\n        addRGB(key: number, value: Vector3): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>GradientDataInt</code> 类用于创建整形渐变。\n     */\n    class GradientDataInt implements IClone {\n        _elements: Float32Array;\n        /**整形渐变数量。*/\n        readonly gradientCount: number;\n        /**\n         * 创建一个 <code>GradientDataInt</code> 实例。\n         */\n        constructor();\n        /**\n         * 增加整形渐变。\n         * @param\tkey 生命周期，范围为0到1。\n         * @param\tvalue 整形值。\n         */\n        add(key: number, value: number): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>GradientDataNumber</code> 类用于创建浮点渐变。\n     */\n    class GradientDataNumber implements IClone {\n        _elements: Float32Array;\n        /**渐变浮点数量。*/\n        readonly gradientCount: number;\n        /**\n         * 创建一个 <code>GradientDataNumber</code> 实例。\n         */\n        constructor();\n        /**\n         * 增加浮点渐变。\n         * @param\tkey 生命周期，范围为0到1。\n         * @param\tvalue 浮点值。\n         */\n        add(key: number, value: number): void;\n        /**\n         * 通过索引获取键。\n         * @param\tindex 索引。\n         * @return\tvalue 键。\n         */\n        getKeyByIndex(index: number): number;\n        /**\n         * 通过索引获取值。\n         * @param\tindex 索引。\n         * @return\tvalue 值。\n         */\n        getValueByIndex(index: number): number;\n        /**\n         * 获取平均值。\n         */\n        getAverageValue(): number;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    import Vector2 = laya.d3.math.Vector2;\n    /**\n     * <code>GradientDataVector2</code> 类用于创建二维向量渐变。\n     */\n    class GradientDataVector2 implements IClone {\n        _elements: Float32Array;\n        /**二维向量渐变数量。*/\n        readonly gradientCount: number;\n        /**\n         * 创建一个 <code>GradientDataVector2</code> 实例。\n         */\n        constructor();\n        /**\n         * 增加二维向量渐变。\n         * @param\tkey 生命周期，范围为0到1。\n         * @param\tvalue 二维向量值。\n         */\n        add(key: number, value: Vector2): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>GradientSize</code> 类用于创建渐变尺寸。\n     */\n    class GradientSize implements IClone {\n        /**\n         * 通过渐变尺寸创建一个 <code>GradientSize</code> 实例。\n         * @param\tgradient 渐变尺寸。\n         * @return  渐变尺寸。\n         */\n        static createByGradient(gradient: GradientDataNumber): GradientSize;\n        /**\n         * 通过分轴渐变尺寸创建一个 <code>GradientSize</code> 实例。\n         * @param\tgradientX 渐变尺寸X。\n         * @param\tgradientY 渐变尺寸Y。\n         * @param\tgradientZ 渐变尺寸Z。\n         * @return  渐变尺寸。\n         */\n        static createByGradientSeparate(gradientX: GradientDataNumber, gradientY: GradientDataNumber, gradientZ: GradientDataNumber): GradientSize;\n        /**\n         * 通过随机双固定尺寸创建一个 <code>GradientSize</code> 实例。\n         * @param\tconstantMin 最小固定尺寸。\n         * @param\tconstantMax 最大固定尺寸。\n         * @return 渐变尺寸。\n         */\n        static createByRandomTwoConstant(constantMin: number, constantMax: number): GradientSize;\n        /**\n         * 通过分轴随机双固定尺寸创建一个 <code>GradientSize</code> 实例。\n         * @param\tconstantMinSeparate 分轴最小固定尺寸.\n         * @param\tconstantMaxSeparate 分轴最大固定尺寸。\n         * @return   渐变尺寸。\n         */\n        static createByRandomTwoConstantSeparate(constantMinSeparate: Vector3, constantMaxSeparate: Vector3): GradientSize;\n        /**\n         * 通过随机双渐变尺寸创建一个 <code>GradientSize</code> 实例。\n         * @param\tgradientMin 最小渐变尺寸。\n         * @param\tgradientMax 最大渐变尺寸。\n         * @return 渐变尺寸。\n         */\n        static createByRandomTwoGradient(gradientMin: GradientDataNumber, gradientMax: GradientDataNumber): GradientSize;\n        /**\n         * 通过分轴随机双渐变尺寸创建一个 <code>GradientSize</code> 实例。\n         * @param\tgradientXMin X轴最小渐变尺寸。\n         * @param\tgradientXMax X轴最大渐变尺寸。\n         * @param\tgradientYMin Y轴最小渐变尺寸。\n         * @param\tgradientYMax Y轴最大渐变尺寸。\n         * @param\tgradientZMin Z轴最小渐变尺寸。\n         * @param\tgradientZMax Z轴最大渐变尺寸。\n         * @return  渐变尺寸。\n         */\n        static createByRandomTwoGradientSeparate(gradientXMin: GradientDataNumber, gradientXMax: GradientDataNumber, gradientYMin: GradientDataNumber, gradientYMax: GradientDataNumber, gradientZMin: GradientDataNumber, gradientZMax: GradientDataNumber): GradientSize;\n        /**\n         *生命周期尺寸类型，0曲线模式，1随机双常量模式，2随机双曲线模式。\n         */\n        readonly type: number;\n        /**\n         *是否分轴。\n         */\n        readonly separateAxes: boolean;\n        /**\n         * 渐变尺寸。\n         */\n        readonly gradient: GradientDataNumber;\n        /**\n         * 渐变尺寸X。\n         */\n        readonly gradientX: GradientDataNumber;\n        /**\n         * 渐变尺寸Y。\n         */\n        readonly gradientY: GradientDataNumber;\n        /**\n         *渐变尺寸Z。\n         */\n        readonly gradientZ: GradientDataNumber;\n        /**\n         *最小随机双固定尺寸。\n         */\n        readonly constantMin: number;\n        /**\n         * 最大随机双固定尺寸。\n         */\n        readonly constantMax: number;\n        /**\n         * 最小分轴随机双固定尺寸。\n         */\n        readonly constantMinSeparate: Vector3;\n        /**\n         *  最小分轴随机双固定尺寸。\n         */\n        readonly constantMaxSeparate: Vector3;\n        /**\n         *渐变最小尺寸。\n         */\n        readonly gradientMin: GradientDataNumber;\n        /**\n         * 渐变最大尺寸。\n         */\n        readonly gradientMax: GradientDataNumber;\n        /**\n         * 渐变最小尺寸X。\n         */\n        readonly gradientXMin: GradientDataNumber;\n        /**\n         * 渐变最大尺寸X。\n         */\n        readonly gradientXMax: GradientDataNumber;\n        /**\n         * 渐变最小尺寸Y。\n         */\n        readonly gradientYMin: GradientDataNumber;\n        /**\n         *渐变最大尺寸Y。\n         */\n        readonly gradientYMax: GradientDataNumber;\n        /**\n         * 渐变最小尺寸Z。\n         */\n        readonly gradientZMin: GradientDataNumber;\n        /**\n         * 渐变最大尺寸Z。\n         */\n        readonly gradientZMax: GradientDataNumber;\n        /**\n         * 创建一个 <code>GradientSize,不允许new，请使用静态创建函数。</code> 实例。\n         */\n        constructor();\n        /**\n         * 获取最大尺寸。\n         */\n        getMaxSizeInGradient(): number;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>GradientVelocity</code> 类用于创建渐变速度。\n     */\n    class GradientVelocity implements IClone {\n        /**\n         * 通过固定速度创建一个 <code>GradientVelocity</code> 实例。\n         * @param\tconstant 固定速度。\n         * @return 渐变速度。\n         */\n        static createByConstant(constant: Vector3): GradientVelocity;\n        /**\n         * 通过渐变速度创建一个 <code>GradientVelocity</code> 实例。\n         * @param\tgradientX 渐变速度X。\n         * @param\tgradientY 渐变速度Y。\n         * @param\tgradientZ 渐变速度Z。\n         * @return  渐变速度。\n         */\n        static createByGradient(gradientX: GradientDataNumber, gradientY: GradientDataNumber, gradientZ: GradientDataNumber): GradientVelocity;\n        /**\n         * 通过随机双固定速度创建一个 <code>GradientVelocity</code> 实例。\n         * @param\tconstantMin 最小固定角速度。\n         * @param\tconstantMax 最大固定角速度。\n         * @return 渐变速度。\n         */\n        static createByRandomTwoConstant(constantMin: Vector3, constantMax: Vector3): GradientVelocity;\n        /**\n         * 通过随机双渐变速度创建一个 <code>GradientVelocity</code> 实例。\n         * @param\tgradientXMin X轴最小渐变速度。\n         * @param\tgradientXMax X轴最大渐变速度。\n         * @param\tgradientYMin Y轴最小渐变速度。\n         * @param\tgradientYMax Y轴最大渐变速度。\n         * @param\tgradientZMin Z轴最小渐变速度。\n         * @param\tgradientZMax Z轴最大渐变速度。\n         * @return  渐变速度。\n         */\n        static createByRandomTwoGradient(gradientXMin: GradientDataNumber, gradientXMax: GradientDataNumber, gradientYMin: GradientDataNumber, gradientYMax: GradientDataNumber, gradientZMin: GradientDataNumber, gradientZMax: GradientDataNumber): GradientVelocity;\n        /**\n         *生命周期速度类型，0常量模式，1曲线模式，2随机双常量模式，3随机双曲线模式。\n         */\n        readonly type: number;\n        /**固定速度。*/\n        readonly constant: Vector3;\n        /**\n         * 渐变速度X。\n         */\n        readonly gradientX: GradientDataNumber;\n        /**\n         * 渐变速度Y。\n         */\n        readonly gradientY: GradientDataNumber;\n        /**\n         *渐变速度Z。\n         */\n        readonly gradientZ: GradientDataNumber;\n        /**最小固定速度。*/\n        readonly constantMin: Vector3;\n        /**最大固定速度。*/\n        readonly constantMax: Vector3;\n        /**\n         * 渐变最小速度X。\n         */\n        readonly gradientXMin: GradientDataNumber;\n        /**\n         * 渐变最大速度X。\n         */\n        readonly gradientXMax: GradientDataNumber;\n        /**\n         * 渐变最小速度Y。\n         */\n        readonly gradientYMin: GradientDataNumber;\n        /**\n         *渐变最大速度Y。\n         */\n        readonly gradientYMax: GradientDataNumber;\n        /**\n         * 渐变最小速度Z。\n         */\n        readonly gradientZMin: GradientDataNumber;\n        /**\n         * 渐变最大速度Z。\n         */\n        readonly gradientZMax: GradientDataNumber;\n        /**\n         * 创建一个 <code>GradientVelocity,不允许new，请使用静态创建函数。</code> 实例。\n         */\n        constructor();\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>RotationOverLifetime</code> 类用于粒子的生命周期旋转。\n     */\n    class RotationOverLifetime implements IClone {\n        /**是否启用*/\n        enbale: boolean;\n        /**\n         *获取角速度。\n         */\n        readonly angularVelocity: GradientAngularVelocity;\n        /**\n         * 创建一个 <code>RotationOverLifetime,不允许new，请使用静态创建函数。</code> 实例。\n         */\n        constructor(angularVelocity: GradientAngularVelocity);\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module.shape {\n    import IClone = laya.d3.core.IClone;\n    import BoundBox = laya.d3.math.BoundBox;\n    import Rand = laya.d3.math.Rand;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>BaseShape</code> 类用于粒子形状。\n     */\n    class BaseShape implements IClone {\n        /**是否启用。*/\n        enable: boolean;\n        /**随机方向。*/\n        randomDirection: boolean;\n        /**\n         * 创建一个 <code>BaseShape</code> 实例。\n         */\n        constructor();\n        protected _getShapeBoundBox(boundBox: BoundBox): void;\n        protected _getSpeedBoundBox(boundBox: BoundBox): void;\n        /**\n         * 用于生成粒子初始位置和方向。\n         * @param\tposition 粒子位置。\n         * @param\tdirection 粒子方向。\n         */\n        generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;\n        /**\n         * @private\n         */\n        _calculateProceduralBounds(boundBox: BoundBox, emitterPosScale: Vector3, minMaxBounds: Vector2): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module.shape {\n    import BoundBox = laya.d3.math.BoundBox;\n    import Rand = laya.d3.math.Rand;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>BoxShape</code> 类用于创建球形粒子形状。\n     */\n    class BoxShape extends BaseShape {\n        /**发射器X轴长度。*/\n        x: number;\n        /**发射器Y轴长度。*/\n        y: number;\n        /**发射器Z轴长度。*/\n        z: number;\n        /**\n         * 创建一个 <code>BoxShape</code> 实例。\n         */\n        constructor();\n        protected _getShapeBoundBox(boundBox: BoundBox): void;\n        protected _getSpeedBoundBox(boundBox: BoundBox): void;\n        /**\n         *  用于生成粒子初始位置和方向。\n         * @param\tposition 粒子位置。\n         * @param\tdirection 粒子方向。\n         */\n        generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;\n        cloneTo(destObject: any): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module.shape {\n    import BoundBox = laya.d3.math.BoundBox;\n    import Rand = laya.d3.math.Rand;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>CircleShape</code> 类用于创建环形粒子形状。\n     */\n    class CircleShape extends BaseShape {\n        protected static _tempPositionPoint: Vector2;\n        /**发射器半径。*/\n        radius: number;\n        /**环形弧度。*/\n        arc: number;\n        /**从边缘发射。*/\n        emitFromEdge: boolean;\n        /**\n         * 创建一个 <code>CircleShape</code> 实例。\n         */\n        constructor();\n        protected _getShapeBoundBox(boundBox: BoundBox): void;\n        protected _getSpeedBoundBox(boundBox: BoundBox): void;\n        /**\n         *  用于生成粒子初始位置和方向。\n         * @param\tposition 粒子位置。\n         * @param\tdirection 粒子方向。\n         */\n        generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;\n        cloneTo(destObject: any): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module.shape {\n    import BoundBox = laya.d3.math.BoundBox;\n    import Rand = laya.d3.math.Rand;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>ConeShape</code> 类用于创建锥形粒子形状。\n     */\n    class ConeShape extends BaseShape {\n        protected static _tempPositionPoint: Vector2;\n        protected static _tempDirectionPoint: Vector2;\n        /**发射角度。*/\n        angle: number;\n        /**发射器半径。*/\n        radius: number;\n        /**椎体长度。*/\n        length: number;\n        /**发射类型,0为Base,1为BaseShell,2为Volume,3为VolumeShell。*/\n        emitType: number;\n        /**\n         * 创建一个 <code>ConeShape</code> 实例。\n         */\n        constructor();\n        protected _getShapeBoundBox(boundBox: BoundBox): void;\n        protected _getSpeedBoundBox(boundBox: BoundBox): void;\n        /**\n         *  用于生成粒子初始位置和方向。\n         * @param\tposition 粒子位置。\n         * @param\tdirection 粒子方向。\n         */\n        generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;\n        cloneTo(destObject: any): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module.shape {\n    import BoundBox = laya.d3.math.BoundBox;\n    import Rand = laya.d3.math.Rand;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>HemisphereShape</code> 类用于创建半球形粒子形状。\n     */\n    class HemisphereShape extends BaseShape {\n        /**发射器半径。*/\n        radius: number;\n        /**从外壳发射。*/\n        emitFromShell: boolean;\n        /**\n         * 创建一个 <code>HemisphereShape</code> 实例。\n         */\n        constructor();\n        protected _getShapeBoundBox(boundBox: BoundBox): void;\n        protected _getSpeedBoundBox(boundBox: BoundBox): void;\n        /**\n         *  用于生成粒子初始位置和方向。\n         * @param\tposition 粒子位置。\n         * @param\tdirection 粒子方向。\n         */\n        generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;\n        cloneTo(destObject: any): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module.shape {\n    import Rand = laya.d3.math.Rand;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * ...\n     * @author ...\n     */\n    class ShapeUtils {\n        static _randomPointUnitArcCircle(arc: number, out: Vector2, rand?: Rand): void;\n        static _randomPointInsideUnitArcCircle(arc: number, out: Vector2, rand?: Rand): void;\n        static _randomPointUnitCircle(out: Vector2, rand?: Rand): void;\n        static _randomPointInsideUnitCircle(out: Vector2, rand?: Rand): void;\n        static _randomPointUnitSphere(out: Vector3, rand?: Rand): void;\n        static _randomPointInsideUnitSphere(out: Vector3, rand?: Rand): void;\n        static _randomPointInsideHalfUnitBox(out: Vector3, rand?: Rand): void;\n        constructor();\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module.shape {\n    import BoundBox = laya.d3.math.BoundBox;\n    import Rand = laya.d3.math.Rand;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>SphereShape</code> 类用于创建球形粒子形状。\n     */\n    class SphereShape extends BaseShape {\n        /**发射器半径。*/\n        radius: number;\n        /**从外壳发射。*/\n        emitFromShell: boolean;\n        /**\n         * 创建一个 <code>SphereShape</code> 实例。\n         */\n        constructor();\n        protected _getShapeBoundBox(boundBox: BoundBox): void;\n        protected _getSpeedBoundBox(boundBox: BoundBox): void;\n        /**\n         *  用于生成粒子初始位置和方向。\n         * @param\tposition 粒子位置。\n         * @param\tdirection 粒子方向。\n         */\n        generatePositionAndDirection(position: Vector3, direction: Vector3, rand?: Rand, randomSeeds?: Uint32Array): void;\n        cloneTo(destObject: any): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>SizeOverLifetime</code> 类用于粒子的生命周期尺寸。\n     */\n    class SizeOverLifetime implements IClone {\n        /**是否启用*/\n        enbale: boolean;\n        /**\n         *获取尺寸。\n         */\n        readonly size: GradientSize;\n        /**\n         * 创建一个 <code>SizeOverLifetime</code> 实例。\n         */\n        constructor(size: GradientSize);\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>StartFrame</code> 类用于创建开始帧。\n     */\n    class StartFrame implements IClone {\n        /**\n         * 通过随机常量旋转创建一个 <code>StartFrame</code> 实例。\n         * @param\tconstant  固定帧。\n         * @return 开始帧。\n         */\n        static createByConstant(constant: number): StartFrame;\n        /**\n         *  通过随机双常量旋转创建一个 <code>StartFrame</code> 实例。\n         * @param\tconstantMin 最小固定帧。\n         * @param\tconstantMax 最大固定帧。\n         * @return 开始帧。\n         */\n        static createByRandomTwoConstant(constantMin: number, constantMax: number): StartFrame;\n        /**\n         *开始帧类型,0常量模式，1随机双常量模式。\n         */\n        readonly type: number;\n        /**\n         * 固定帧。\n         */\n        readonly constant: number;\n        /**\n         * 最小固定帧。\n         */\n        readonly constantMin: number;\n        /**\n         * 最大固定帧。\n         */\n        readonly constantMax: number;\n        /**\n         * 创建一个 <code>StartFrame,不允许new，请使用静态创建函数。</code> 实例。\n         */\n        constructor();\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    import Vector2 = laya.d3.math.Vector2;\n    /**\n     * <code>TextureSheetAnimation</code> 类用于创建粒子帧动画。\n     */\n    class TextureSheetAnimation implements IClone {\n        /**纹理平铺。*/\n        tiles: Vector2;\n        /**类型,0为whole sheet、1为singal row。*/\n        type: number;\n        /**是否随机行，type为1时有效。*/\n        randomRow: boolean;\n        /**行索引,type为1时有效。*/\n        rowIndex: number;\n        /**循环次数。*/\n        cycles: number;\n        /**UV通道类型,0为Noting,1为Everything,待补充,暂不支持。*/\n        enableUVChannels: number;\n        /**是否启用*/\n        enable: boolean;\n        /**获取时间帧率。*/\n        readonly frame: FrameOverTime;\n        /**获取开始帧率。*/\n        readonly startFrame: StartFrame;\n        /**\n         * 创建一个 <code>TextureSheetAnimation</code> 实例。\n         * @param frame 动画帧。\n         * @param  startFrame 开始帧。\n         */\n        constructor(frame: FrameOverTime, startFrame: StartFrame);\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen.module {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>VelocityOverLifetime</code> 类用于粒子的生命周期速度。\n     */\n    class VelocityOverLifetime implements IClone {\n        /**是否启用*/\n        enbale: boolean;\n        /**速度空间,0为local,1为world。*/\n        space: number;\n        /**\n         *获取尺寸。\n         */\n        readonly velocity: GradientVelocity;\n        /**\n         * 创建一个 <code>VelocityOverLifetime</code> 实例。\n         */\n        constructor(velocity: GradientVelocity);\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen {\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import RenderableSprite3D = laya.d3.core.RenderableSprite3D;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * <code>ShuriKenParticle3D</code> 3D粒子。\n     */\n    class ShuriKenParticle3D extends RenderableSprite3D {\n        static SHADERDEFINE_RENDERMODE_BILLBOARD: number;\n        static SHADERDEFINE_RENDERMODE_STRETCHEDBILLBOARD: number;\n        static SHADERDEFINE_RENDERMODE_HORIZONTALBILLBOARD: number;\n        static SHADERDEFINE_RENDERMODE_VERTICALBILLBOARD: number;\n        static SHADERDEFINE_COLOROVERLIFETIME: number;\n        static SHADERDEFINE_RANDOMCOLOROVERLIFETIME: number;\n        static SHADERDEFINE_VELOCITYOVERLIFETIMECONSTANT: number;\n        static SHADERDEFINE_VELOCITYOVERLIFETIMECURVE: number;\n        static SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCONSTANT: number;\n        static SHADERDEFINE_VELOCITYOVERLIFETIMERANDOMCURVE: number;\n        static SHADERDEFINE_TEXTURESHEETANIMATIONCURVE: number;\n        static SHADERDEFINE_TEXTURESHEETANIMATIONRANDOMCURVE: number;\n        static SHADERDEFINE_ROTATIONOVERLIFETIME: number;\n        static SHADERDEFINE_ROTATIONOVERLIFETIMESEPERATE: number;\n        static SHADERDEFINE_ROTATIONOVERLIFETIMECONSTANT: number;\n        static SHADERDEFINE_ROTATIONOVERLIFETIMECURVE: number;\n        static SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCONSTANTS: number;\n        static SHADERDEFINE_ROTATIONOVERLIFETIMERANDOMCURVES: number;\n        static SHADERDEFINE_SIZEOVERLIFETIMECURVE: number;\n        static SHADERDEFINE_SIZEOVERLIFETIMECURVESEPERATE: number;\n        static SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVES: number;\n        static SHADERDEFINE_SIZEOVERLIFETIMERANDOMCURVESSEPERATE: number;\n        static SHADERDEFINE_RENDERMODE_MESH: number;\n        static SHADERDEFINE_SHAPE: number;\n        static WORLDPOSITION: number;\n        static WORLDROTATION: number;\n        static POSITIONSCALE: number;\n        static SIZESCALE: number;\n        static SCALINGMODE: number;\n        static GRAVITY: number;\n        static THREEDSTARTROTATION: number;\n        static STRETCHEDBILLBOARDLENGTHSCALE: number;\n        static STRETCHEDBILLBOARDSPEEDSCALE: number;\n        static SIMULATIONSPACE: number;\n        static CURRENTTIME: number;\n        static VOLVELOCITYCONST: number;\n        static VOLVELOCITYGRADIENTX: number;\n        static VOLVELOCITYGRADIENTY: number;\n        static VOLVELOCITYGRADIENTZ: number;\n        static VOLVELOCITYCONSTMAX: number;\n        static VOLVELOCITYGRADIENTXMAX: number;\n        static VOLVELOCITYGRADIENTYMAX: number;\n        static VOLVELOCITYGRADIENTZMAX: number;\n        static VOLSPACETYPE: number;\n        static COLOROVERLIFEGRADIENTALPHAS: number;\n        static COLOROVERLIFEGRADIENTCOLORS: number;\n        static MAXCOLOROVERLIFEGRADIENTALPHAS: number;\n        static MAXCOLOROVERLIFEGRADIENTCOLORS: number;\n        static SOLSIZEGRADIENT: number;\n        static SOLSIZEGRADIENTX: number;\n        static SOLSIZEGRADIENTY: number;\n        static SOLSizeGradientZ: number;\n        static SOLSizeGradientMax: number;\n        static SOLSIZEGRADIENTXMAX: number;\n        static SOLSIZEGRADIENTYMAX: number;\n        static SOLSizeGradientZMAX: number;\n        static ROLANGULARVELOCITYCONST: number;\n        static ROLANGULARVELOCITYCONSTSEPRARATE: number;\n        static ROLANGULARVELOCITYGRADIENT: number;\n        static ROLANGULARVELOCITYGRADIENTX: number;\n        static ROLANGULARVELOCITYGRADIENTY: number;\n        static ROLANGULARVELOCITYGRADIENTZ: number;\n        static ROLANGULARVELOCITYGRADIENTW: number;\n        static ROLANGULARVELOCITYCONSTMAX: number;\n        static ROLANGULARVELOCITYCONSTMAXSEPRARATE: number;\n        static ROLANGULARVELOCITYGRADIENTMAX: number;\n        static ROLANGULARVELOCITYGRADIENTXMAX: number;\n        static ROLANGULARVELOCITYGRADIENTYMAX: number;\n        static ROLANGULARVELOCITYGRADIENTZMAX: number;\n        static ROLANGULARVELOCITYGRADIENTWMAX: number;\n        static TEXTURESHEETANIMATIONCYCLES: number;\n        static TEXTURESHEETANIMATIONSUBUVLENGTH: number;\n        static TEXTURESHEETANIMATIONGRADIENTUVS: number;\n        static TEXTURESHEETANIMATIONGRADIENTMAXUVS: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载网格模板。\n         * @param url 模板地址。\n         */\n        static load(url: string): ShuriKenParticle3D;\n        /**\n         * 获取粒子系统。\n         * @return  粒子系统。\n         */\n        readonly particleSystem: ShurikenParticleSystem;\n        /**\n         * 获取粒子渲染器。\n         * @return  粒子渲染器。\n         */\n        readonly particleRender: ShurikenParticleRender;\n        /**\n         * 创建一个 <code>Particle3D</code> 实例。\n         * @param settings value 粒子配置。\n         */\n        constructor(material?: ShurikenParticleMaterial);\n        protected _clearSelfRenderObjects(): void;\n        protected _addSelfRenderObjects(): void;\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, nodeData: any): void;\n        /**\n         * @inheritDoc\n         */\n        _activeHierarchy(): void;\n        /**\n         * @inheritDoc\n         */\n        _inActiveHierarchy(): void;\n        /**\n         * @private\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * <p>销毁此对象。</p>\n         * @param\tdestroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n         */\n        destroy(destroyChild?: boolean): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen {\n    import Transform3D = laya.d3.core.Transform3D;\n    /**\n     *  @private\n     */\n    class ShurikenParticleData {\n        static startLifeTime: number;\n        static startColor: Float32Array;\n        static startSize: Float32Array;\n        static startRotation: Float32Array;\n        static startSpeed: number;\n        static startUVInfo: Float32Array;\n        static simulationWorldPostion: Float32Array;\n        static simulationWorldRotation: Float32Array;\n        constructor();\n        /**\n         * @private\n         */\n        static create(particleSystem: ShurikenParticleSystem, particleRender: ShurikenParticleRender, transform: Transform3D): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen {\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author ...\n     */\n    class ShurikenParticleMaterial extends BaseMaterial {\n        /**渲染状态_不透明。*/\n        static RENDERMODE_OPAQUE: number;\n        /**渲染状态_不透明_双面。*/\n        static RENDERMODE_OPAQUEDOUBLEFACE: number;\n        /**渲染状态_透明测试。*/\n        static RENDERMODE_CUTOUT: number;\n        /**渲染状态_透明测试_双面。*/\n        static RENDERMODE_CUTOUTDOUBLEFACE: number;\n        /**渲染状态_透明混合。*/\n        static RENDERMODE_TRANSPARENT: number;\n        /**渲染状态_透明混合_双面。*/\n        static RENDERMODE_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_加色法混合。*/\n        static RENDERMODE_ADDTIVE: number;\n        /**渲染状态_加色法混合_双面。*/\n        static RENDERMODE_ADDTIVEDOUBLEFACE: number;\n        /**渲染状态_只读深度_透明混合。*/\n        static RENDERMODE_DEPTHREAD_TRANSPARENT: number;\n        /**渲染状态_只读深度_透明混合_双面。*/\n        static RENDERMODE_DEPTHREAD_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_只读深度_加色法混合。*/\n        static RENDERMODE_DEPTHREAD_ADDTIVE: number;\n        /**渲染状态_只读深度_加色法混合_双面。*/\n        static RENDERMODE_DEPTHREAD_ADDTIVEDOUBLEFACE: number;\n        /**渲染状态_无深度_透明混合。*/\n        static RENDERMODE_NONDEPTH_TRANSPARENT: number;\n        /**渲染状态_无深度_透明混合_双面。*/\n        static RENDERMODE_NONDEPTH_TRANSPARENTDOUBLEFACE: number;\n        /**渲染状态_无深度_加色法混合。*/\n        static RENDERMODE_NONDEPTH_ADDTIVE: number;\n        /**渲染状态_无深度_加色法混合_双面。*/\n        static RENDERMODE_NONDEPTH_ADDTIVEDOUBLEFACE: number;\n        static SHADERDEFINE_DIFFUSEMAP: number;\n        static SHADERDEFINE_TINTCOLOR: number;\n        static SHADERDEFINE_TILINGOFFSET: number;\n        static SHADERDEFINE_ADDTIVEFOG: number;\n        static DIFFUSETEXTURE: number;\n        static TINTCOLOR: number;\n        static TILINGOFFSET: number;\n        /** 默认材质，禁止修改*/\n        static defaultMaterial: ShurikenParticleMaterial;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载手里剑粒子材质。\n         * @param url 手里剑粒子材质地址。\n         */\n        static load(url: string): ShurikenParticleMaterial;\n        /**\n         * 设置渲染模式。\n         * @return 渲染模式。\n         */\n        renderMode: number;\n        /**\n         * 获取颜色。\n         * @return  颜色。\n         */\n        /**\n         * 设置颜色。\n         * @param value 颜色。\n         */\n        tintColor: Vector4;\n        /**\n         * 获取纹理平铺和偏移。\n         * @return 纹理平铺和偏移。\n         */\n        /**\n         * 获取纹理平铺和偏移。\n         * @param value 纹理平铺和偏移。\n         */\n        tilingOffset: Vector4;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        diffuseTexture: BaseTexture;\n        constructor();\n        /**\n         * @private\n         */\n        static _parseShurikenParticleMaterial(textureMap: any, material: ShurikenParticleMaterial, json: any): void;\n        /**\n         *@private\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen {\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import BoundBox = laya.d3.math.BoundBox;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Mesh = laya.d3.resource.models.Mesh;\n    /**\n     * <code>ShurikenParticleRender</code> 类用于创建3D粒子渲染器。\n     */\n    class ShurikenParticleRender extends BaseRender {\n        /**拉伸广告牌模式摄像机速度缩放,暂不支持。*/\n        stretchedBillboardCameraSpeedScale: number;\n        /**拉伸广告牌模式速度缩放。*/\n        stretchedBillboardSpeedScale: number;\n        /**拉伸广告牌模式长度缩放。*/\n        stretchedBillboardLengthScale: number;\n        /**\n         * 获取渲染模式。\n         * @return 渲染模式。\n         */\n        /**\n         * 设置渲染模式,0为BILLBOARD、1为STRETCHEDBILLBOARD、2为HORIZONTALBILLBOARD、3为VERTICALBILLBOARD、4为MESH。\n         * @param value 渲染模式。\n         */\n        renderMode: number;\n        /**\n         * 获取网格渲染模式所使用的Mesh,rendderMode为4时生效。\n         * @return 网格模式所使用Mesh。\n         */\n        /**\n         * 设置网格渲染模式所使用的Mesh,rendderMode为4时生效。\n         * @param value 网格模式所使用Mesh。\n         */\n        mesh: Mesh;\n        /**\n         * 创建一个 <code>ShurikenParticleRender</code> 实例。\n         */\n        constructor(owner: ShuriKenParticle3D);\n        protected _calculateBoundingBox(): void;\n        protected _calculateBoundingSphere(): void;\n        /**\n         * @inheritDoc\n         */\n        _renderUpdate(projectionView: Matrix4x4): boolean;\n        /**\n         * @inheritDoc\n         */\n        readonly boundingBox: BoundBox;\n        /**\n         * @inheritDoc\n         */\n        _destroy(): void;\n    }\n}\ndeclare module laya.d3.core.particleShuriKen {\n    import GeometryFilter = laya.d3.core.GeometryFilter;\n    import IClone = laya.d3.core.IClone;\n    import ColorOverLifetime = laya.d3.core.particleShuriKen.module.ColorOverLifetime;\n    import Emission = laya.d3.core.particleShuriKen.module.Emission;\n    import GradientDataNumber = laya.d3.core.particleShuriKen.module.GradientDataNumber;\n    import RotationOverLifetime = laya.d3.core.particleShuriKen.module.RotationOverLifetime;\n    import SizeOverLifetime = laya.d3.core.particleShuriKen.module.SizeOverLifetime;\n    import TextureSheetAnimation = laya.d3.core.particleShuriKen.module.TextureSheetAnimation;\n    import VelocityOverLifetime = laya.d3.core.particleShuriKen.module.VelocityOverLifetime;\n    import BaseShape = laya.d3.core.particleShuriKen.module.shape.BaseShape;\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Rand = laya.d3.math.Rand;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>ShurikenParticleSystem</code> 类用于创建3D粒子数据模板。\n     */\n    class ShurikenParticleSystem extends GeometryFilter implements IRenderable, IClone {\n        static _RANDOMOFFSET: Uint32Array;\n        static _maxElapsedTime: number;\n        _boundingSphere: BoundSphere;\n        _boundingBox: BoundBox;\n        _boundingBoxCorners: Array<any>;\n        _currentTime: number;\n        _startUpdateLoopCount: number;\n        _rand: Rand;\n        _randomSeeds: Uint32Array;\n        /**粒子运行的总时长，单位为秒。*/\n        duration: number;\n        /**是否循环。*/\n        looping: boolean;\n        /**是否预热。暂不支持*/\n        prewarm: boolean;\n        /**开始延迟类型，0为常量模式,1为随机随机双常量模式，不能和prewarm一起使用。*/\n        startDelayType: number;\n        /**开始播放延迟，不能和prewarm一起使用。*/\n        startDelay: number;\n        /**开始播放最小延迟，不能和prewarm一起使用。*/\n        startDelayMin: number;\n        /**开始播放最大延迟，不能和prewarm一起使用。*/\n        startDelayMax: number;\n        /**开始速度模式，0为恒定速度，2为两个恒定速度的随机插值。缺少1、3模式*/\n        startSpeedType: number;\n        /**开始速度,0模式。*/\n        startSpeedConstant: number;\n        /**最小开始速度,1模式。*/\n        startSpeedConstantMin: number;\n        /**最大开始速度,1模式。*/\n        startSpeedConstantMax: number;\n        /**开始尺寸是否为3D模式。*/\n        threeDStartSize: boolean;\n        /**开始尺寸模式,0为恒定尺寸，2为两个恒定尺寸的随机插值。缺少1、3模式和对应的二种3D模式*/\n        startSizeType: number;\n        /**开始尺寸，0模式。*/\n        startSizeConstant: number;\n        /**开始三维尺寸，0模式。*/\n        startSizeConstantSeparate: Vector3;\n        /**最小开始尺寸，2模式。*/\n        startSizeConstantMin: number;\n        /**最大开始尺寸，2模式。*/\n        startSizeConstantMax: number;\n        /**最小三维开始尺寸，2模式。*/\n        startSizeConstantMinSeparate: Vector3;\n        /**最大三维开始尺寸，2模式。*/\n        startSizeConstantMaxSeparate: Vector3;\n        /**3D开始旋转，暂不支持*/\n        threeDStartRotation: boolean;\n        /**开始旋转模式,0为恒定尺寸，2为两个恒定旋转的随机插值,缺少2种模式,和对应的四种3D模式。*/\n        startRotationType: number;\n        /**开始旋转，0模式。*/\n        startRotationConstant: number;\n        /**开始三维旋转，0模式。*/\n        startRotationConstantSeparate: Vector3;\n        /**最小开始旋转，1模式。*/\n        startRotationConstantMin: number;\n        /**最大开始旋转，1模式。*/\n        startRotationConstantMax: number;\n        /**最小开始三维旋转，1模式。*/\n        startRotationConstantMinSeparate: Vector3;\n        /**最大开始三维旋转，1模式。*/\n        startRotationConstantMaxSeparate: Vector3;\n        /**随机旋转方向，范围为0.0到1.0*/\n        randomizeRotationDirection: number;\n        /**开始颜色模式，0为恒定颜色，2为两个恒定颜色的随机插值,缺少2种模式。*/\n        startColorType: number;\n        /**开始颜色，0模式。*/\n        startColorConstant: Vector4;\n        /**最小开始颜色，1模式。*/\n        startColorConstantMin: Vector4;\n        /**最大开始颜色，1模式。*/\n        startColorConstantMax: Vector4;\n        /**重力敏感度。*/\n        gravityModifier: number;\n        /**模拟器空间,0为World,1为Local。暂不支持Custom。*/\n        simulationSpace: number;\n        /**缩放模式，0为Hiercachy,1为Local,2为World。暂不支持1,2*/\n        scaleMode: number;\n        /**激活时是否自动播放。*/\n        playOnAwake: boolean;\n        /**随机种子,注:play()前设置有效。*/\n        randomSeed: Uint32Array;\n        /**是否使用随机种子。 */\n        autoRandomSeed: boolean;\n        /**是否为性能模式,性能模式下会延迟粒子释放。*/\n        isPerformanceMode: boolean;\n        /**获取最大粒子数。*/\n        /**设置最大粒子数,注意:谨慎修改此属性，有性能损耗。*/\n        maxParticles: number;\n        /**\n         * 获取发射器。\n         */\n        readonly emission: Emission;\n        /**\n         * 粒子存活个数。\n         */\n        readonly aliveParticleCount: number;\n        /**\n         * 获取一次循环内的累计时间。\n         * @return 一次循环内的累计时间。\n         */\n        readonly emissionTime: number;\n        /**\n         * 获取形状。\n         */\n        /**\n         * 设置形状。\n         */\n        shape: BaseShape;\n        /**\n         * 是否存活。\n         */\n        readonly isAlive: boolean;\n        /**\n         * 是否正在发射。\n         */\n        readonly isEmitting: boolean;\n        /**\n         * 是否正在播放。\n         */\n        readonly isPlaying: boolean;\n        /**\n         * 是否已暂停。\n         */\n        readonly isPaused: boolean;\n        /**\n         * 获取开始生命周期模式,0为固定时间，1为渐变时间，2为两个固定之间的随机插值,3为两个渐变时间的随机插值。\n         */\n        /**\n         * 设置开始生命周期模式,0为固定时间，1为渐变时间，2为两个固定之间的随机插值,3为两个渐变时间的随机插值。\n         */\n        startLifetimeType: number;\n        /**\n         * 获取开始生命周期，0模式,单位为秒。\n         */\n        /**\n         * 设置开始生命周期，0模式,单位为秒。\n         */\n        startLifetimeConstant: number;\n        /**\n         * 获取开始渐变生命周期，1模式,单位为秒。\n         */\n        /**\n         * 设置开始渐变生命周期，1模式,单位为秒。\n         */\n        startLifeTimeGradient: GradientDataNumber;\n        /**\n         * 获取最小开始生命周期，2模式,单位为秒。\n         */\n        /**\n         * 设置最小开始生命周期，2模式,单位为秒。\n         */\n        startLifetimeConstantMin: number;\n        /**\n         * 获取最大开始生命周期，2模式,单位为秒。\n         */\n        /**\n         * 设置最大开始生命周期，2模式,单位为秒。\n         */\n        startLifetimeConstantMax: number;\n        /**\n         * 获取开始渐变最小生命周期，3模式,单位为秒。\n         */\n        /**\n         * 设置开始渐变最小生命周期，3模式,单位为秒。\n         */\n        startLifeTimeGradientMin: GradientDataNumber;\n        /**\n         * 获取开始渐变最大生命周期，3模式,单位为秒。\n         */\n        /**\n         * 设置开始渐变最大生命周期，3模式,单位为秒。\n         */\n        startLifeTimeGradientMax: GradientDataNumber;\n        /**\n         * 获取生命周期速度,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @return 生命周期速度.\n         */\n        /**\n         * 设置生命周期速度,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @param value 生命周期速度.\n         */\n        velocityOverLifetime: VelocityOverLifetime;\n        /**\n         * 获取生命周期颜色,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @return 生命周期颜色\n         */\n        /**\n         * 设置生命周期颜色,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @param value 生命周期颜色\n         */\n        colorOverLifetime: ColorOverLifetime;\n        /**\n         * 获取生命周期尺寸,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @return 生命周期尺寸\n         */\n        /**\n         * 设置生命周期尺寸,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @param value 生命周期尺寸\n         */\n        sizeOverLifetime: SizeOverLifetime;\n        /**\n         * 获取生命周期旋转,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @return 生命周期旋转。\n         */\n        /**\n         * 设置生命周期旋转,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @param value 生命周期旋转。\n         */\n        rotationOverLifetime: RotationOverLifetime;\n        /**\n         * 获取生命周期纹理动画,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @return 生命周期纹理动画。\n         */\n        /**\n         * 设置生命周期纹理动画,注意:如修改该值的某些属性,需重新赋值此属性才可生效。\n         * @param value 生命周期纹理动画。\n         */\n        textureSheetAnimation: TextureSheetAnimation;\n        readonly _vertexBufferCount: number;\n        readonly triangleCount: number;\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n        _getIndexBuffer(): IndexBuffer3D;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingSphere: BoundSphere;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingBox: BoundBox;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingBoxCorners: Array<any>;\n        constructor(owner: ShuriKenParticle3D);\n        /**\n         * @private\n         */\n        _generateBoundingSphere(): void;\n        /**\n         * @private\n         */\n        _generateBoundingBox(): void;\n        /**\n         * @private\n         */\n        _initBufferDatas(): void;\n        /**\n         * @private\n         */\n        _destroy(): void;\n        /**\n         * 发射一个粒子。\n         */\n        emit(time: number): boolean;\n        addParticle(position: Vector3, direction: Vector3, time: number): boolean;\n        addNewParticlesToVertexBuffer(): void;\n        _beforeRender(state: RenderState): boolean;\n        /**\n         * @private\n         */\n        _render(state: RenderState): void;\n        /**\n         * 开始发射粒子。\n         */\n        play(): void;\n        /**\n         * 暂停发射粒子。\n         */\n        pause(): void;\n        /**\n         * 通过指定时间增加粒子播放进度，并暂停播放。\n         * @param time 进度时间.如果restart为true,粒子播放时间会归零后再更新进度。\n         * @param restart 是否重置播放状态。\n         */\n        simulate(time: number, restart?: boolean): void;\n        /**\n         * 停止发射粒子。\n         */\n        stop(): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n        /**\n         * @private\n         */\n        _getVertexBuffers(): Array<any>;\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n    }\n}\ndeclare module laya.d3.core {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    import ShaderCompile3D = laya.d3.shader.ShaderCompile3D;\n    /**\n     * @private\n     * <code>PhasorSpriter3D</code> 类用于创建矢量笔刷。\n     */\n    class PhasorSpriter3D {\n        protected _shaderCompile: ShaderCompile3D;\n        constructor();\n        line(startPosition: Vector3, startColor: Vector4, endPosition: Vector3, endColor: Vector4): PhasorSpriter3D;\n        circle(radius: number, numberOfPoints: number, r: number, g: number, b: number, a: number): PhasorSpriter3D;\n        plane(positionX: number, positionY: number, positionZ: number, width: number, height: number, r: number, g: number, b: number, a: number): PhasorSpriter3D;\n        box(positionX: number, positionY: number, positionZ: number, width: number, height: number, depth: number, r: number, g: number, b: number, a: number): PhasorSpriter3D;\n        cone(radius: number, length: number, Slices: number, r: number, g: number, b: number, a: number): PhasorSpriter3D;\n        boundingBoxLine(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, r: number, g: number, b: number, a: number): PhasorSpriter3D;\n        begin(primitive: number, camera: BaseCamera): PhasorSpriter3D;\n        end(): PhasorSpriter3D;\n    }\n}\ndeclare module laya.d3.core.render {\n    import RenderableSprite3D = laya.d3.core.RenderableSprite3D;\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import ITreeNode = laya.d3.core.scene.ITreeNode;\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import EventDispatcher = laya.events.EventDispatcher;\n    import IDestroy = laya.resource.IDestroy;\n    /**\n     * <code>Render</code> 类用于渲染器的父类，抽象类不允许实例。\n     */\n    class BaseRender extends EventDispatcher implements IDestroy {\n        static _tempBoundBoxCorners: Array<any>;\n        protected _boundingSphere: BoundSphere;\n        protected _boundingBox: BoundBox;\n        protected _boundingBoxCenter: Vector3;\n        protected _boundingSphereNeedChange: boolean;\n        protected _boundingBoxNeedChange: boolean;\n        protected _boundingBoxCenterNeedChange: boolean;\n        protected _octreeNodeNeedChange: boolean;\n        _indexInSceneFrustumCullingObjects: number;\n        _materials: Array<any>;\n        _owner: RenderableSprite3D;\n        _renderElements: Array<any>;\n        _distanceForSort: number;\n        _treeNode: ITreeNode;\n        _isPartOfStaticBatch: boolean;\n        _staticBatchRootSprite3D: Sprite3D;\n        _staticBatchRenderElements: Array<any>;\n        /**排序矫正值。*/\n        sortingFudge: number;\n        /** 是否产生阴影。 */\n        castShadow: boolean;\n        /**\n         * 获取唯一标识ID,通常用于识别。\n         */\n        readonly id: number;\n        /**\n         * 获取光照贴图的索引。\n         * @return 光照贴图的索引。\n         */\n        /**\n         * 设置光照贴图的索引。\n         * @param value 光照贴图的索引。\n         */\n        lightmapIndex: number;\n        /**\n         * 获取光照贴图的缩放和偏移。\n         * @return  光照贴图的缩放和偏移。\n         */\n        /**\n         * 设置光照贴图的缩放和偏移。\n         * @param  光照贴图的缩放和偏移。\n         */\n        lightmapScaleOffset: Vector4;\n        /**\n         * 获取是否可用。\n         * @return 是否可用。\n         */\n        /**\n         * 设置是否可用。\n         * @param value 是否可用。\n         */\n        enable: boolean;\n        /**\n         * 返回第一个实例材质,第一次使用会拷贝实例对象。\n         * @return 第一个实例材质。\n         */\n        /**\n         * 设置第一个实例材质。\n         * @param value 第一个实例材质。\n         */\n        material: BaseMaterial;\n        /**\n         * 获取潜拷贝实例材质列表,第一次使用会拷贝实例对象。\n         * @return 浅拷贝实例材质列表。\n         */\n        /**\n         * 设置实例材质列表。\n         * @param value 实例材质列表。\n         */\n        materials: Array<any>;\n        /**\n         * 返回第一个材质。\n         * @return 第一个材质。\n         */\n        /**\n         * 设置第一个材质。\n         * @param value 第一个材质。\n         */\n        sharedMaterial: BaseMaterial;\n        /**\n         * 获取浅拷贝材质列表。\n         * @return 浅拷贝材质列表。\n         */\n        /**\n         * 设置材质列表。\n         * @param value 材质列表。\n         */\n        sharedMaterials: Array<any>;\n        /**\n         * 获取包围球,只读,不允许修改其值。\n         * @return 包围球。\n         */\n        readonly boundingSphere: BoundSphere;\n        /**\n         * 获取包围盒,只读,不允许修改其值。\n         * @return 包围盒。\n         */\n        readonly boundingBox: BoundBox;\n        /**\n         * 获取包围盒中心,不允许修改其值。\n         * @return 包围盒中心。\n         */\n        readonly boundingBoxCenter: Vector3;\n        /**\n         * 获得是否接收阴影属性\n         */\n        /**\n         * 设置是否接收阴影属性\n         */\n        receiveShadow: boolean;\n        /**\n         * 获取是否已销毁。\n         * @return 是否已销毁。\n         */\n        readonly destroyed: boolean;\n        /**\n         * 创建一个新的 <code>BaseRender</code> 实例。\n         */\n        constructor(owner: RenderableSprite3D);\n        protected _onWorldMatNeedChange(): void;\n        protected _renderRenderableBoundBox(): void;\n        protected _calculateBoundingSphere(): void;\n        protected _calculateBoundingBox(): void;\n        /**\n         * @private\n         */\n        _setShaderValueTexture(shaderName: number, texture: BaseTexture): void;\n        /**\n         * @private\n         */\n        _setShaderValueMatrix4x4(shaderName: number, matrix4x4: Matrix4x4): void;\n        /**\n         * 设置颜色。\n         * @param\tshaderIndex shader索引。\n         * @param\tcolor 颜色向量。\n         */\n        _setShaderValueColor(shaderIndex: number, color: any): void;\n        /**\n         * 设置Buffer。\n         * @param\tshaderIndex shader索引。\n         * @param\tbuffer  buffer数据。\n         */\n        _setShaderValueBuffer(shaderIndex: number, buffer: Float32Array): void;\n        /**\n         * 设置整型。\n         * @param\tshaderIndex shader索引。\n         * @param\ti 整形。\n         */\n        _setShaderValueInt(shaderIndex: number, i: number): void;\n        /**\n         * 设置布尔。\n         * @param\tshaderIndex shader索引。\n         * @param\tb 布尔。\n         */\n        _setShaderValueBool(shaderIndex: number, b: boolean): void;\n        /**\n         * 设置浮点。\n         * @param\tshaderIndex shader索引。\n         * @param\ti 浮点。\n         */\n        _setShaderValueNumber(shaderIndex: number, number: number): void;\n        /**\n         * 设置二维向量。\n         * @param\tshaderIndex shader索引。\n         * @param\tvector2 二维向量。\n         */\n        _setShaderValueVector2(shaderIndex: number, vector2: Vector2): void;\n        /**\n         * 增加Shader宏定义。\n         * @param value 宏定义。\n         */\n        _addShaderDefine(value: number): void;\n        /**\n         * 移除Shader宏定义。\n         * @param value 宏定义。\n         */\n        _removeShaderDefine(value: number): void;\n        /**\n         * @private\n         */\n        _renderUpdate(projectionView: Matrix4x4): boolean;\n        /**\n         * @private\n         */\n        _applyLightMapParams(): void;\n        /**\n         * @private\n         */\n        _updateOctreeNode(): void;\n        /**\n         * @private\n         */\n        _destroy(): void;\n    }\n}\ndeclare module laya.d3.core.render {\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    /**\n     * <code>IRender</code> 接口用于实现3D对象的渲染相关功能。\n     */\n    interface IRenderable {\n        _getVertexBuffer(index: number): VertexBuffer3D;\n        _getIndexBuffer(): IndexBuffer3D;\n        _beforeRender(state: RenderState): boolean;\n        _getVertexBuffers(): Array<VertexBuffer3D>;\n        _render(state: RenderState): void;\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n    }\n}\ndeclare module laya.d3.core.render {\n    /**\n     * <code>IUpdate</code> 接口用于实现3D对象的更新相关功能。\n     */\n    interface IUpdate {\n        _update(state: RenderState): void;\n    }\n}\ndeclare module laya.d3.core.render {\n    import RenderableSprite3D = laya.d3.core.RenderableSprite3D;\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import StaticBatch = laya.d3.graphics.StaticBatch;\n    import ValusArray = laya.d3.shader.ValusArray;\n    /**\n     * @private\n     * <code>RenderElement</code> 类用于实现渲染物体。\n     */\n    class RenderElement {\n        _type: number;\n        _mainSortID: number;\n        _render: BaseRender;\n        _sprite3D: RenderableSprite3D;\n        _material: BaseMaterial;\n        _staticBatch: StaticBatch;\n        _tempBatchIndexStart: number;\n        _tempBatchIndexEnd: number;\n        _canDynamicBatch: boolean;\n        /**当前ShaderValue。*/\n        _shaderValue: ValusArray;\n        _onPreRenderFunction: Function;\n        _conchSubmesh: any;\n        /**\n         * 获取唯一标识ID,通常用于识别。\n         */\n        readonly id: number;\n        renderObj: IRenderable;\n        /**\n         * 创建一个 <code>RenderElement</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        getDynamicBatchBakedVertexs(index: number): Float32Array;\n        /**\n         * @private\n         */\n        getBakedIndices(): any;\n        /**\n         * @private\n         */\n        _destroy(): void;\n    }\n}\ndeclare module laya.d3.core.render {\n    import Scene = laya.d3.core.scene.Scene;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * @private\n     * <code>RenderQuene</code> 类用于实现渲染队列。\n     */\n    class RenderQueue {\n        /** 定义非透明渲染队列标记。*/\n        static OPAQUE: number;\n        /** 透明混合渲染队列标记。*/\n        static TRANSPARENT: number;\n        _renderElements: Array<any>;\n        /**\n         * 获取唯一标识ID(通常用于优化或识别)。\n         */\n        readonly id: number;\n        /**\n         * 创建一个 <code>RenderQuene</code> 实例。\n         * @param renderConfig 渲染配置。\n         */\n        constructor(scene: Scene);\n        /**\n         * @private\n         */\n        _sortAlpha(cameraPos: Vector3): void;\n        /**\n         * @private\n         */\n        _sortOpaque(cameraPos: Vector3): void;\n        /**\n         * @private\n         * 准备渲染队列。\n         * @param\tstate 渲染状态。\n         */\n        _preRender(state: RenderState): void;\n        /**\n         * @private\n         * 渲染队列。\n         * @param\tstate 渲染状态。\n         */\n        _render(state: RenderState, isTarget: boolean): void;\n        /**\n         * @private\n         * 渲染队列。\n         * @param\tstate 渲染状态。\n         */\n        _renderShadow(state: RenderState, isOnePSSM: boolean): void;\n        /**\n         * 清空队列中的渲染物体。\n         */\n        _clearRenderElements(): void;\n        /**\n         * 添加渲染物体。\n         * @param renderObj 渲染物体。\n         */\n        _addRenderElement(renderElement: RenderElement): void;\n        /**\n         * 添加动态批处理。\n         * @param renderObj 动态批处理。\n         */\n        _addDynamicBatchElement(dynamicBatchElement: RenderElement): void;\n    }\n}\ndeclare module laya.d3.core.render {\n    import BaseCamera = laya.d3.core.BaseCamera;\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import Scene = laya.d3.core.scene.Scene;\n    import StaticBatch = laya.d3.graphics.StaticBatch;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Viewport = laya.d3.math.Viewport;\n    import Shader3D = laya.d3.shader.Shader3D;\n    /**\n     * <code>RenderState</code> 类用于实现渲染状态。\n     */\n    class RenderState {\n        /**渲染区宽度。*/\n        static clientWidth: number;\n        /**渲染区高度。*/\n        static clientHeight: number;\n        _staticBatch: StaticBatch;\n        _batchIndexStart: number;\n        _batchIndexEnd: number;\n        _viewMatrix: Matrix4x4;\n        _projectionMatrix: Matrix4x4;\n        _projectionViewMatrix: Matrix4x4;\n        _viewport: Viewport;\n        _shader: Shader3D;\n        /**距上一帧间隔时间。*/\n        elapsedTime: number;\n        /**当前场景。*/\n        scene: Scene;\n        /**当前渲染3D精灵。*/\n        owner: Sprite3D;\n        /**当前渲染物体。*/\n        renderElement: RenderElement;\n        /**当前摄像机。*/\n        camera: BaseCamera;\n        /**\n         * 创建一个 <code>RenderState</code> 实例。\n         */\n        constructor();\n    }\n}\ndeclare module laya.d3.core.render {\n    /**\n     * @private\n     */\n    class SubMeshRenderElement extends RenderElement {\n        _batchIndexStart: number;\n        _batchIndexEnd: number;\n        _skinAnimationDatas: Array<any>;\n        constructor();\n    }\n}\ndeclare module laya.d3.core {\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Scene = laya.d3.core.scene.Scene;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * <code>RenderableSprite3D</code> 类用于可渲染3D精灵的父类，抽象类不允许实例。\n     */\n    class RenderableSprite3D extends Sprite3D {\n        /**精灵级着色器宏定义,光照贴图便宜和缩放。*/\n        static SHADERDEFINE_SCALEOFFSETLIGHTINGMAPUV: number;\n        /**精灵级着色器宏定义,光照贴图。*/\n        static SAHDERDEFINE_LIGHTMAP: number;\n        /**着色器变量名，光照贴图缩放和偏移。*/\n        static LIGHTMAPSCALEOFFSET: number;\n        /**着色器变量名，光照贴图缩。*/\n        static LIGHTMAP: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        _render: BaseRender;\n        _geometryFilter: GeometryFilter;\n        /**\n         * 创建一个 <code>RenderableSprite3D</code> 实例。\n         */\n        constructor(name?: string);\n        /**\n         * @private\n         */\n        _addToInitStaticBatchManager(): void;\n        /**\n         * @inheritDoc\n         */\n        _setBelongScene(scene: Scene): void;\n        /**\n         * @inheritDoc\n         */\n        _setUnBelongScene(): void;\n        /**\n         * @inheritDoc\n         */\n        _update(state: RenderState): void;\n        /**\n         * @inheritDoc\n         */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * @inheritDoc\n         */\n        _updateConch(state: RenderState): void;\n    }\n}\ndeclare module laya.d3.core.scene {\n    import PhasorSpriter3D = laya.d3.core.PhasorSpriter3D;\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import RenderQueue = laya.d3.core.render.RenderQueue;\n    import BoundFrustum = laya.d3.math.BoundFrustum;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * ...\n     * @author lv\n     */\n    interface ITreeNode {\n        init(center: Vector3, treeSize: Vector3): void;\n        addTreeNode(renderObj: BaseRender): void;\n        cullingObjects(boundFrustum: BoundFrustum, testVisible: boolean, flags: number, cameraPosition: Vector3, projectionView: Matrix4x4): void;\n        cullingShadowObjects(lightBoundFrustum: Array<BoundFrustum>, splitShadowQueues: Array<RenderQueue>, testVisible: boolean, flags: number, scene: Scene): void;\n        cullingShadowObjectsOnePSSM(lightBoundFrustum: BoundFrustum, splitShadowQueues: Array<RenderQueue>, lightViewProjectMatrix: Matrix4x4, testVisible: boolean, flags: number, scene: Scene): void;\n        renderBoudingBox(linePhasor: PhasorSpriter3D): void;\n        removeObject(object: BaseRender): boolean;\n        updateObject(object: BaseRender): void;\n    }\n}\ndeclare module laya.d3.core.scene {\n    import PhasorSpriter3D = laya.d3.core.PhasorSpriter3D;\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundFrustum = laya.d3.math.BoundFrustum;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector3 = laya.d3.math.Vector3;\n    class OctreeNode implements ITreeNode {\n        /**是否开启四/八叉树调试模式。 */\n        static debugMode: boolean;\n        _children: Array<any>;\n        init(center: Vector3, treeSize: Vector3): void;\n        addTreeNode(render: BaseRender): void;\n        exactBox: BoundBox;\n        relaxBox: BoundBox;\n        constructor(scene: Scene, currentDepth: number);\n        addChild(index: number): OctreeNode;\n        addObject(object: BaseRender): void;\n        removeObject(object: BaseRender): boolean;\n        clearObject(): void;\n        addNodeUp(render: BaseRender, depth: number): void;\n        addNodeDown(render: BaseRender, depth: number): void;\n        inChildIndex(objectCenter: Vector3): number;\n        updateObject(render: BaseRender): void;\n        cullingObjects(boundFrustum: BoundFrustum, testVisible: boolean, flags: number, cameraPosition: Vector3, projectionView: Matrix4x4): void;\n        /**\n         * @private\n         */\n        cullingShadowObjects(lightBoundFrustum: Array<any>, splitShadowQueues: Array<any>, testVisible: boolean, flags: number, scene: Scene): void;\n        /**\n         * @private\n         */\n        cullingShadowObjectsOnePSSM(lightBoundFrustum: BoundFrustum, splitShadowQueues: Array<any>, lightViewProjectMatrix: Matrix4x4, testVisible: boolean, flags: number, scene: Scene): void;\n        renderBoudingBox(linePhasor: PhasorSpriter3D): void;\n        buildAllChild(depth: number): void;\n    }\n}\ndeclare module laya.d3.core.scene {\n    import Component3D = laya.d3.component.Component3D;\n    import Script = laya.d3.component.Script;\n    import BaseCamera = laya.d3.core.BaseCamera;\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import LightSprite = laya.d3.core.light.LightSprite;\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import RenderQueue = laya.d3.core.render.RenderQueue;\n    import RenderState = laya.d3.core.render.RenderState;\n    import DynamicBatchManager = laya.d3.graphics.DynamicBatchManager;\n    import BoundFrustum = laya.d3.math.BoundFrustum;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector3 = laya.d3.math.Vector3;\n    import RenderTexture = laya.d3.resource.RenderTexture;\n    import ValusArray = laya.d3.shader.ValusArray;\n    import Node = laya.display.Node;\n    import Sprite = laya.display.Sprite;\n    import RenderContext = laya.renders.RenderContext;\n    import ICreateResource = laya.resource.ICreateResource;\n    import WebGLContext = laya.webgl.WebGLContext;\n    import ISubmit = laya.webgl.submit.ISubmit;\n    /**\n     * <code>BaseScene</code> 类用于实现场景。\n     */\n    class Scene extends Sprite implements ISubmit, ICreateResource {\n        static FOGCOLOR: number;\n        static FOGSTART: number;\n        static FOGRANGE: number;\n        static LIGHTDIRECTION: number;\n        static LIGHTDIRCOLOR: number;\n        static POINTLIGHTPOS: number;\n        static POINTLIGHTRANGE: number;\n        static POINTLIGHTATTENUATION: number;\n        static POINTLIGHTCOLOR: number;\n        static SPOTLIGHTPOS: number;\n        static SPOTLIGHTDIRECTION: number;\n        static SPOTLIGHTSPOT: number;\n        static SPOTLIGHTRANGE: number;\n        static SPOTLIGHTATTENUATION: number;\n        static SPOTLIGHTCOLOR: number;\n        static SHADOWDISTANCE: number;\n        static SHADOWLIGHTVIEWPROJECT: number;\n        static SHADOWMAPPCFOFFSET: number;\n        static SHADOWMAPTEXTURE1: number;\n        static SHADOWMAPTEXTURE2: number;\n        static SHADOWMAPTEXTURE3: number;\n        static AMBIENTCOLOR: number;\n        /**\n         * 加载场景,注意:不缓存。\n         * @param url 模板地址。\n         */\n        static load(url: string): Scene;\n        protected _renderState: RenderState;\n        protected _lights: Array<any>;\n        protected _enableLightCount: number;\n        protected _renderTargetTexture: RenderTexture;\n        protected _customRenderQueneIndex: number;\n        protected _lastCurrentTime: number;\n        protected _enableFog: boolean;\n        protected _enableDepthFog: boolean;\n        protected _fogStart: number;\n        protected _fogRange: number;\n        protected _fogColor: Vector3;\n        protected _ambientColor: Vector3;\n        _shaderValues: ValusArray;\n        _shaderDefineValue: number;\n        _cullingRendersLength: number;\n        _cullingRenders: Array<any>;\n        _dynamicBatchManager: DynamicBatchManager;\n        _quenes: Array<any>;\n        _cameraPool: Array<any>;\n        _renderableSprite3Ds: Array<any>;\n        /** 是否启用灯光。*/\n        enableLight: boolean;\n        /** 四/八叉树的根节点。*/\n        treeRoot: ITreeNode;\n        /** 四/八叉树的尺寸。*/\n        treeSize: Vector3;\n        /** 四/八叉树的层数。*/\n        treeLevel: number;\n        parallelSplitShadowMaps: Array<any>;\n        protected _componentsMap: Array<any>;\n        protected _typeComponentsIndices: Array<any>;\n        protected _components: Array<any>;\n        /**\n         * @private\n         */\n        _loaded: boolean;\n        /**\n         * 获取资源的URL地址。\n         * @return URL地址。\n         */\n        readonly url: string;\n        /**\n         * 获取是否已加载完成。\n         */\n        readonly loaded: boolean;\n        /**\n         * 获取是否允许雾化。\n         * @return 是否允许雾化。\n         */\n        /**\n         * 设置是否允许雾化。\n         * @param value 是否允许雾化。\n         */\n        enableFog: boolean;\n        enableDepthFog: boolean;\n        /**\n         * 获取雾化颜色。\n         * @return 雾化颜色。\n         */\n        /**\n         * 设置雾化颜色。\n         * @param value 雾化颜色。\n         */\n        fogColor: Vector3;\n        /**\n         * 获取雾化起始位置。\n         * @return 雾化起始位置。\n         */\n        /**\n         * 设置雾化起始位置。\n         * @param value 雾化起始位置。\n         */\n        fogStart: number;\n        /**\n         * 获取雾化范围。\n         * @return 雾化范围。\n         */\n        /**\n         * 设置雾化范围。\n         * @param value 雾化范围。\n         */\n        fogRange: number;\n        /**\n         * 获取环境光颜色。\n         * @return 环境光颜色。\n         */\n        /**\n         * 设置环境光颜色。\n         * @param value 环境光颜色。\n         */\n        ambientColor: Vector3;\n        /**\n         * 获取当前场景。\n         * @return 当前场景。\n         */\n        readonly scene: Scene;\n        /**\n         * 获取场景的可渲染精灵。\n         */\n        readonly renderableSprite3Ds: Array<any>;\n        /**\n         * 创建一个 <code>Scene</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _setUrl(url: string): void;\n        /**\n         * @private\n         */\n        _getGroup(): string;\n        /**\n         * @private\n         */\n        _setGroup(value: string): void;\n        /**\n         * 初始化八叉树。\n         * @param\twidth 八叉树宽度。\n         * @param\theight 八叉树高度。\n         * @param\tdepth 八叉树深度。\n         * @param\tcenter 八叉树中心点\n         * @param\tlevel 八叉树层级。\n         */\n        initOctree(width: number, height: number, depth: number, center: Vector3, level?: number): void;\n        protected _prepareUpdateToRenderState(gl: WebGLContext, state: RenderState): void;\n        protected _prepareSceneToRender(state: RenderState): void;\n        protected _updateChilds(state: RenderState): void;\n        protected _updateChildsConch(state: RenderState): void;\n        /**\n         * @private\n         */\n        _preRenderScene(gl: WebGLContext, state: RenderState, boundFrustum: BoundFrustum): void;\n        /**\n         * @private\n         */\n        _clear(gl: WebGLContext, state: RenderState): void;\n        /**\n         * @private\n         */\n        _renderScene(gl: WebGLContext, state: RenderState): void;\n        protected _set3DRenderConfig(gl: WebGLContext): void;\n        protected _set2DRenderConfig(gl: WebGLContext): void;\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, nodeData: any): void;\n        /**\n         * @private\n         */\n        _addLight(light: LightSprite): void;\n        /**\n         * @private\n         */\n        _removeLight(light: LightSprite): void;\n        /**\n         * @private\n         */\n        _updateScene(): void;\n        /**\n         * @private\n         */\n        _updateSceneConch(): void;\n        protected _preRenderShadow(state: RenderState, lightFrustum: Array<any>, shdowQueues: Array<any>, lightViewProjectMatrix: Matrix4x4, nPSSMNum: number): void;\n        /**\n         * @private\n         */\n        _renderShadowMap(gl: WebGLContext, state: RenderState, sceneCamera: BaseCamera): void;\n        /**\n         * @private\n         */\n        addTreeNode(renderObj: BaseRender): void;\n        /**\n         * @private\n         */\n        removeTreeNode(renderObj: BaseRender): void;\n        /**\n         * 设置光照贴图。\n         * @param value 光照贴图。\n         */\n        setlightmaps(value: Array<any>): void;\n        /**\n         * 获取光照贴图。\n         * @return 获取光照贴图。\n         */\n        getlightmaps(): Array<any>;\n        /**\n         * @inheritDoc\n         */\n        addChildAt(node: Node, index: number): Node;\n        /**\n         * @inheritDoc\n         */\n        addChild(node: Node): Node;\n        /**\n         * @inheritDoc\n         */\n        removeChildAt(index: number): Node;\n        /**\n         * @inheritDoc\n         */\n        removeChildren(beginIndex?: number, endIndex?: number): Node;\n        /**\n         * @inheritDoc\n         */\n        addFrustumCullingObject(renderObject: BaseRender): void;\n        /**\n         * @private\n         */\n        removeFrustumCullingObject(renderObject: BaseRender): void;\n        /**\n         * 获得某个渲染队列。\n         * @param index 渲染队列索引。\n         * @return 渲染队列。\n         */\n        getRenderQueue(index: number): RenderQueue;\n        /**\n         * 添加渲染队列。\n         * @param renderConfig 渲染队列配置文件。\n         */\n        addRenderQuene(): void;\n        /**\n         * 增加shader宏定义。\n         * @param\tdefine shader宏定义。\n         */\n        addShaderDefine(define: number): void;\n        /**\n         * 移除shader宏定义。\n         * @param\tdefine shader宏定义。\n         */\n        removeShaderDefine(define: number): void;\n        /**\n         * 添加指定类型脚本。\n         * @param\ttype 脚本类型。\n         * @return\t组件。\n         */\n        addScript(type: any): Script;\n        /**\n         * 通过指定类型和类型索引获得脚本。\n         * @param\ttype 脚本类型。\n         * @param\ttypeIndex 脚本索引。\n         * @return 脚本。\n         */\n        getScriptByType(type: any, typeIndex?: number): Script;\n        /**\n         * 通过指定类型获得所有脚本。\n         * @param\ttype 脚本类型。\n         * @param\tscripts 脚本输出队列。\n         */\n        getScriptsByType(type: any, scripts: Array<any>): void;\n        /**\n         * 通过指定索引获得脚本。\n         * @param\tindex 索引。\n         * @return 脚本。\n         */\n        getScriptByIndex(index: number): Script;\n        /**\n         * 通过指定类型和类型索引移除脚本。\n         * @param\ttype 脚本类型。\n         * @param\ttypeIndex 类型索引。\n         */\n        removeScriptByType(type: any, typeIndex?: number): void;\n        /**\n         * 通过指定类型移除所有脚本。\n         * @param\ttype 组件类型。\n         */\n        removeScriptsByType(type: any): void;\n        /**\n         * 移除全部脚本。\n         */\n        removeAllScript(): void;\n        /**\n         * @private\n         */\n        render(context: RenderContext, x: number, y: number): void;\n        /**\n         * @private\n         */\n        renderSubmit(): number;\n        /**\n         *@private\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         *@private\n         */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * @private\n         */\n        getRenderType(): number;\n        /**\n         * @private\n         */\n        releaseRender(): void;\n        /**\n         * @private\n         */\n        createConchModel(): any;\n        protected _addComponent(type: any): Component3D;\n        protected _removeComponent(mapIndex: number, index: number): void;\n        protected _getComponentByType(type: any, typeIndex?: number): Component3D;\n        protected _getComponentsByType(type: any, components: Array<any>): void;\n        protected _getComponentByIndex(index: number): Component3D;\n        protected _removeComponentByType(type: any, typeIndex?: number): void;\n        protected _removeComponentsByType(type: any): void;\n        protected _removeAllComponent(): void;\n        protected _updateComponents(state: RenderState): void;\n        protected _lateUpdateComponents(state: RenderState): void;\n        /**\n         * @private\n         */\n        _preRenderUpdateComponents(state: RenderState): void;\n        /**\n         * @private\n         */\n        _postRenderUpdateComponents(state: RenderState): void;\n    }\n}\ndeclare module laya.d3.core.scene {\n    /**\n     * ...\n     * @author ...\n     */\n    class SceneManager {\n        constructor();\n    }\n}\ndeclare module laya.d3.core {\n    import Animator = laya.d3.component.Animator;\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>SkinMeshRender</code> 类用于蒙皮渲染器。\n     */\n    class SkinnedMeshRender extends MeshRender {\n        _rootBone: string;\n        /**用于裁剪的包围球。 */\n        localBoundSphere: BoundSphere;\n        /**\n         * 获取包围球。\n         * @return 包围球。\n         */\n        /**\n         * 设置包围球。\n         * @param value\n         */\n        localBoundBox: BoundBox;\n        /**\n         * @inheritDoc\n         */\n        readonly boundingSphere: BoundSphere;\n        /**\n         * @inheritDoc\n         */\n        readonly boundingBox: BoundBox;\n        /**\n         * @inheritDoc\n         */\n        readonly boundingBoxCenter: Vector3;\n        /**\n         * 创建一个新的 <code>SkinnedMeshRender</code> 实例。\n         */\n        constructor(owner: RenderableSprite3D);\n        /**\n         * @private\n         */\n        _setCacheAnimator(animator: Animator): void;\n        /**\n         * @private\n         */\n        _setRootBone(name: string): void;\n        /**\n         * @private\n         */\n        _setCacheAvatar(value: Avatar): void;\n        protected _calculateBoundingBox(): void;\n        protected _calculateBoundingSphere(): void;\n        /**\n         * @inheritDoc\n         */\n        _updateOctreeNode(): void;\n        /**\n         * @inheritDoc\n         */\n        _renderUpdate(projectionView: Matrix4x4): boolean;\n        _hasIndependentBound: boolean;\n    }\n}\ndeclare module laya.d3.core {\n    import Animator = laya.d3.component.Animator;\n    import BaseMesh = laya.d3.resource.models.BaseMesh;\n    import Mesh = laya.d3.resource.models.Mesh;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * <code>SkinnedMeshSprite3D</code> 类用于创建网格。\n     */\n    class SkinnedMeshSprite3D extends RenderableSprite3D {\n        /**精灵级着色器宏定义,蒙皮动画。*/\n        static SHADERDEFINE_BONE: number;\n        /**着色器变量名，蒙皮动画。*/\n        static BONES: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载网格模板。\n         * @param url 模板地址。\n         */\n        static load(url: string): SkinnedMeshSprite3D;\n        /**\n         * 获取网格过滤器。\n         * @return  网格过滤器。\n         */\n        readonly meshFilter: MeshFilter;\n        /**\n         * 获取网格渲染器。\n         * @return  网格渲染器。\n         */\n        readonly skinnedMeshRender: SkinnedMeshRender;\n        /**\n         * 创建一个 <code>MeshSprite3D</code> 实例。\n         * @param mesh 网格,同时会加载网格所用默认材质。\n         * @param name 名字。\n         */\n        constructor(mesh?: BaseMesh, name?: string);\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, json: any): void;\n        protected _changeHierarchyAnimator(animator: Animator): void;\n        protected _clearSelfRenderObjects(): void;\n        protected _addSelfRenderObjects(): void;\n        /**\n         * @private\n         */\n        _applyMeshMaterials(mesh: Mesh): void;\n        /**\n         * @inheritDoc\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * @inheritDoc\n         */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * @private\n         */\n        createConchModel(): any;\n    }\n}\ndeclare module laya.d3.core {\n    import AnimationNode = laya.d3.animation.AnimationNode;\n    import Animator = laya.d3.component.Animator;\n    import Component3D = laya.d3.component.Component3D;\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import IUpdate = laya.d3.core.render.IUpdate;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Scene = laya.d3.core.scene.Scene;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Quaternion = laya.d3.math.Quaternion;\n    import Vector3 = laya.d3.math.Vector3;\n    import ValusArray = laya.d3.shader.ValusArray;\n    import Node = laya.display.Node;\n    import ICreateResource = laya.resource.ICreateResource;\n    /**\n     * <code>Sprite3D</code> 类用于实现3D精灵。\n     */\n    class Sprite3D extends ComponentNode implements IUpdate, ICreateResource, IClone {\n        static WORLDMATRIX: number;\n        static MVPMATRIX: number;\n        protected static _uniqueIDCounter: number;\n        protected static _nameNumberCounter: number;\n        /**\n         * 创建精灵的克隆实例。\n         * @param\toriginal  原始精灵。\n         * @param   parent    父节点。\n         * @param   worldPositionStays 是否保持自身世界变换。\n         * @param\tposition  世界位置,worldPositionStays为false时生效。\n         * @param\trotation  世界旋转,worldPositionStays为false时生效。\n         * @return  克隆实例。\n         */\n        static instantiate(original: Sprite3D, parent?: Node, worldPositionStays?: boolean, position?: Vector3, rotation?: Quaternion): Sprite3D;\n        /**\n         * 加载网格模板。\n         * @param url 模板地址。\n         */\n        static load(url: string): Sprite3D;\n        _projectionViewWorldUpdateLoopCount: number;\n        _projectionViewWorldUpdateCamera: BaseCamera;\n        protected _active: boolean;\n        protected _activeInHierarchy: boolean;\n        protected _layer: Layer;\n        _shaderDefineValue: number;\n        _shaderValues: ValusArray;\n        _colliders: Array<any>;\n        _scene: Scene;\n        _transform: Transform3D;\n        _hierarchyAnimator: Animator;\n        /**是否静态,静态包含一系列的静态处理。*/\n        isStatic: boolean;\n        /**\n         * @private\n         */\n        _loaded: boolean;\n        /**\n         * 获取唯一标识ID。\n         *   @return\t唯一标识ID。\n         */\n        readonly id: number;\n        /**\n         * 获取是否已加载完成。\n         */\n        readonly loaded: boolean;\n        /**\n         * 获取自身是否激活。\n         *   @return\t自身是否激活。\n         */\n        /**\n         * 设置是否激活。\n         * @param\tvalue 是否激活。\n         */\n        active: boolean;\n        /**\n         * 获取在场景中是否激活。\n         *   @return\t在场景中是否激活。\n         */\n        readonly activeInHierarchy: boolean;\n        /**\n         * 获取蒙版。\n         * @return\t蒙版。\n         */\n        /**\n         * 设置蒙版。\n         * @param\tvalue 蒙版。\n         */\n        layer: Layer;\n        /**\n         * 获得所属场景。\n         * @return\t场景。\n         */\n        readonly scene: Scene;\n        /**\n         * 获得组件的数量。\n         * @return\t组件数量。\n         */\n        readonly componentsCount: number;\n        /**\n         * 获取资源的URL地址。\n         * @return URL地址。\n         */\n        readonly url: string;\n        /**\n         * 获取精灵变换。\n         */\n        readonly transform: Transform3D;\n        /**\n         * 创建一个 <code>Sprite3D</code> 实例。\n         */\n        constructor(name?: string);\n        /**\n         * @private\n         */\n        _setUrl(url: string): void;\n        /**\n         * @private\n         */\n        _getGroup(): string;\n        /**\n         * @private\n         */\n        _setGroup(value: string): void;\n        protected _changeHierarchyAnimator(animator: Animator): void;\n        /**\n         * @private\n         */\n        _isLinkSpriteToAnimationNode(animator: Animator, node: AnimationNode, isLink: boolean): void;\n        /**\n         * @private\n         */\n        _setBelongScene(scene: Scene): void;\n        /**\n         * @private\n         */\n        _setUnBelongScene(): void;\n        /**\n         * @private\n         */\n        _activeHierarchy(): void;\n        /**\n         * @private\n         */\n        _inActiveHierarchy(): void;\n        /**\n         * @private\n         */\n        addComponent(type: any): Component3D;\n        protected _removeComponent(mapIndex: number, index: number): void;\n        /**\n         * @private\n         */\n        createConchModel(): any;\n        protected _clearSelfRenderObjects(): void;\n        protected _addSelfRenderObjects(): void;\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, nodeData: any): void;\n        protected _updateChilds(state: RenderState): void;\n        protected _updateChildsConch(state: RenderState): void;\n        /**\n         * 排序函数。\n         * @param\tstate 渲染相关状态。\n         */\n        _getSortID(renderElement: IRenderable, material: BaseMaterial): number;\n        /**\n         * 更新\n         * @param\tstate 渲染相关状态\n         */\n        _update(state: RenderState): void;\n        /**\n         * 更新\n         * @param\tstate 渲染相关状态\n         */\n        _updateConch(state: RenderState): void;\n        /**\n         * 获取投影视图世界矩阵。\n         * @param\tprojectionViewMatrix 投影视图矩阵。\n         * @return  投影视图世界矩阵。\n         */\n        getProjectionViewWorldMatrix(projectionViewMatrix: Matrix4x4): Matrix4x4;\n        /**\n         * 加载层级文件，并作为该节点的子节点。\n         * @param\turl\n         */\n        loadHierarchy(url: string): void;\n        /**\n         * @inheritDoc\n         */\n        addChildAt(node: Node, index: number): Node;\n        /**\n         * @inheritDoc\n         */\n        addChild(node: Node): Node;\n        /**\n         * @inheritDoc\n         */\n        removeChildAt(index: number): Node;\n        /**\n         * @inheritDoc\n         */\n        removeChildren(beginIndex?: number, endIndex?: number): Node;\n        /**\n         *@private\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n        /**\n         * @inheritDoc\n         */\n        destroy(destroyChild?: boolean): void;\n    }\n}\ndeclare module laya.d3.core.trail.module {\n    class Color {\n        /**\n         * 红色\n         */\n        static RED: Color;\n        /**\n         * 绿色\n         */\n        static GREEN: Color;\n        /**\n         * 蓝色\n         */\n        static BLUE: Color;\n        /**\n         * 蓝绿色\n         */\n        static CYAN: Color;\n        /**\n         * 黄色\n         */\n        static YELLOW: Color;\n        /**\n         * 品红色\n         */\n        static MAGENTA: Color;\n        /**\n         * 灰色\n         */\n        static GRAY: Color;\n        /**\n         * 白色\n         */\n        static WHITE: Color;\n        /**\n         * 黑色\n         */\n        static BLACK: Color;\n        r: number;\n        g: number;\n        b: number;\n        a: number;\n        constructor(r: number, g: number, b: number, a: number);\n    }\n}\ndeclare module laya.d3.core.trail.module {\n    class Gradient {\n        _colorKeyData: Float32Array;\n        _alphaKeyData: Float32Array;\n        /**\n         * 获取梯度模式。\n         * @return  梯度模式。\n         */\n        /**\n         * 设置梯度模式。\n         * @param value 梯度模式。\n         */\n        mode: number;\n        /**\n         * 获取颜色值关键帧数据\n         */\n        /**\n         * 设置颜色值关键帧数据\n         */\n        colorKeys: Array<any>;\n        /**\n         * 获取透明度关键帧数据\n         */\n        /**\n         * 设置透明度关键帧数据\n         */\n        alphaKeys: Array<any>;\n        constructor();\n        /**\n         * 设置渐变，使用一组颜色关键帧数据和透明度关键帧数据。\n         * @param\tcolorKeys 渐变的颜色值关键帧数据(最大长度为10)。\n         * @param\talphaKeys 渐变的透明度关键帧数据(最大长度为10)。\n         */\n        setKeys(colorKeys: Array<any>, alphaKeys: Array<any>): void;\n    }\n}\ndeclare module laya.d3.core.trail.module {\n    class GradientAlphaKey {\n        /**\n         * 获取透明度。\n         * @return  透明度。\n         */\n        /**\n         * 设置透明度。\n         * @param value 透明度。\n         */\n        alpha: number;\n        /**\n         * 获取时间。\n         * @return  时间。\n         */\n        /**\n         * 设置时间。\n         * @param value 时间。\n         */\n        time: number;\n        constructor(alpha: number, time: number);\n    }\n}\ndeclare module laya.d3.core.trail.module {\n    class GradientColorKey {\n        /**\n         * 获取颜色值。\n         * @return  颜色值。\n         */\n        /**\n         * 设置颜色值。\n         * @param value 颜色值。\n         */\n        color: Color;\n        /**\n         * 获取时间。\n         * @return  时间。\n         */\n        /**\n         * 设置时间。\n         * @param value 时间。\n         */\n        time: number;\n        constructor(color: Color, time: number);\n    }\n}\ndeclare module laya.d3.core.trail.module {\n    /**\n     * ...\n     * @author ...\n     */\n    class GradientMode {\n        /**\n         * 找到与请求的评估时间相邻的两个键,并线性插值在他们之间,以获得一种混合的颜色。\n         */\n        static Blend: number;\n        /**\n         * 返回一个固定的颜色，通过查找第一个键的时间值大于所请求的评估时间。\n         */\n        static Fixed: number;\n    }\n}\ndeclare module laya.d3.core.trail.module {\n    /**\n     * ...\n     * @author ...\n     */\n    class TextureMode {\n        /**\n         * 拉伸模式。\n         */\n        static Stretch: number;\n        /**\n         * 平铺模式。\n         */\n        static Tile: number;\n    }\n}\ndeclare module laya.d3.core.trail.module {\n    class TrailKeyFrame {\n        time: number;\n        inTangent: number;\n        outTangent: number;\n        value: number;\n    }\n}\ndeclare module laya.d3.core.trail {\n    import GeometryFilter = laya.d3.core.GeometryFilter;\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Gradient = laya.d3.core.trail.module.Gradient;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * ...\n     * @author ...\n     */\n    class TrailFilter extends GeometryFilter {\n        _owner: TrailSprite3D;\n        _curtime: number;\n        _curSubTrailFinishPosition: Vector3;\n        _curSubTrailFinishDirection: Vector3;\n        _curSubTrailFinishCurTime: number;\n        _curSubTrailFinished: boolean;\n        _hasLifeSubTrail: boolean;\n        _trailTotalLength: number;\n        _trailSupplementLength: number;\n        _trailDeadLength: number;\n        /**\n         * 获取淡出时间。\n         * @return  淡出时间。\n         */\n        /**\n         * 设置淡出时间。\n         * @param value 淡出时间。\n         */\n        time: number;\n        /**\n         * 获取新旧顶点之间最小距离。\n         * @return  新旧顶点之间最小距离。\n         */\n        /**\n         * 设置新旧顶点之间最小距离。\n         * @param value 新旧顶点之间最小距离。\n         */\n        minVertexDistance: number;\n        /**\n         * 获取宽度倍数。\n         * @return  宽度倍数。\n         */\n        /**\n         * 设置宽度倍数。\n         * @param value 宽度倍数。\n         */\n        widthMultiplier: number;\n        /**\n         * 获取宽度曲线。\n         * @return  宽度曲线。\n         */\n        /**\n         * 设置宽度曲线。\n         * @param value 宽度曲线。\n         */\n        widthCurve: Array<any>;\n        /**\n         * 获取颜色梯度。\n         * @return  颜色梯度。\n         */\n        /**\n         * 设置颜色梯度。\n         * @param value 颜色梯度。\n         */\n        colorGradient: Gradient;\n        /**\n         * 获取纹理模式。\n         * @return  纹理模式。\n         */\n        /**\n         * 设置纹理模式。\n         * @param value 纹理模式。\n         */\n        textureMode: number;\n        constructor(owner: TrailSprite3D);\n        getRenderElementsCount(): number;\n        addRenderElement(): number;\n        getRenderElement(index: number): IRenderable;\n        _update(state: RenderState): void;\n        /**\n         * @private\n         */\n        _destroy(): void;\n    }\n}\ndeclare module laya.d3.core.trail {\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author ...\n     */\n    class TrailMaterial extends BaseMaterial {\n        /** 默认材质，禁止修改*/\n        static defaultMaterial: TrailMaterial;\n        static SHADERDEFINE_DIFFUSETEXTURE: number;\n        static SHADERDEFINE_TILINGOFFSET: number;\n        static DIFFUSETEXTURE: number;\n        static TINTCOLOR: number;\n        static TILINGOFFSET: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 加载标准材质。\n         * @param url 标准材质地址。\n         */\n        static load(url: string): TrailMaterial;\n        /**\n         * 获取颜色。\n         * @return 颜色。\n         */\n        /**\n         * 设置颜色。\n         * @param value 颜色。\n         */\n        tintColor: Vector4;\n        /**\n         * 获取贴图。\n         * @return 贴图。\n         */\n        /**\n         * 设置贴图。\n         * @param value 贴图。\n         */\n        diffuseTexture: BaseTexture;\n        /**\n         * 获取纹理平铺和偏移。\n         * @return 纹理平铺和偏移。\n         */\n        /**\n         * 设置纹理平铺和偏移。\n         * @param value 纹理平铺和偏移。\n         */\n        tilingOffset: Vector4;\n        constructor();\n    }\n}\ndeclare module laya.d3.core.trail {\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    /**\n     * ...\n     * @author ...\n     */\n    class TrailRenderElement implements IRenderable {\n        _id: number;\n        _isDead: boolean;\n        constructor(owner: TrailFilter);\n        /**\n         * 更新VertexBuffer2数据\n         */\n        _updateVertexBuffer2(): void;\n        /**\n         * @private\n         */\n        _updateDisappear(): void;\n        /**\n         * 渲染前调用\n         * @param\tstate 渲染状态\n         * @return  是否渲染\n         */\n        _beforeRender(state: RenderState): boolean;\n        /**\n         * 渲染时调用\n         * @param\tstate 渲染状态\n         */\n        _render(state: RenderState): void;\n        /**\n         * 获取vertexBuffer\n         * @param\tindex vertexBuffer索引\n         * @return vertexBuffer\n         */\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n        /**\n         * 获取vertexBuffer数组\n         * @return vertexBuffer数组\n         */\n        _getVertexBuffers(): Array<any>;\n        /**\n         * 获取顶点索引缓冲\n         * @return 顶点索引缓冲\n         */\n        _getIndexBuffer(): IndexBuffer3D;\n        /**\n         * 获取vertexBuffer数量\n         * @return vertexBuffer数量\n         */\n        readonly _vertexBufferCount: number;\n        /**\n         * 获取三角面数量\n         * @return 三角面数量\n         */\n        readonly triangleCount: number;\n        /**\n         * @private\n         */\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n        /**\n         * 重新激活该renderElement\n         */\n        reActivate(): void;\n        /**\n         * @private\n         */\n        _destroy(): void;\n    }\n}\ndeclare module laya.d3.core.trail {\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * ...\n     * @author ...\n     */\n    class TrailRenderer extends BaseRender {\n        constructor(owner: TrailSprite3D);\n        protected _calculateBoundingBox(): void;\n        protected _calculateBoundingSphere(): void;\n        _renderUpdate(projectionView: Matrix4x4): boolean;\n    }\n}\ndeclare module laya.d3.core.trail {\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import RenderableSprite3D = laya.d3.core.RenderableSprite3D;\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import RenderState = laya.d3.core.render.RenderState;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author ...\n     */\n    class TrailSprite3D extends RenderableSprite3D {\n        static CURTIME: number;\n        static LIFETIME: number;\n        static WIDTHCURVE: number;\n        static WIDTHCURVEKEYLENGTH: number;\n        static GRADIENTCOLORKEY: number;\n        static GRADIENTALPHAKEY: number;\n        static SHADERDEFINE_GRADIENTMODE_BLEND: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 获取Trail过滤器。\n         * @return  Trail过滤器。\n         */\n        readonly trailFilter: TrailFilter;\n        /**\n         * 获取Trail渲染器。\n         * @return  Trail渲染器。\n         */\n        readonly trailRender: TrailRenderer;\n        constructor();\n        _changeRenderObjectsByMaterial(sender: TrailRenderer, index: number, material: BaseMaterial): void;\n        _changeRenderObjectsByRenderElement(index: number, trailRenderElement: TrailRenderElement): void;\n        protected _clearSelfRenderObjects(): void;\n        protected _addSelfRenderObjects(): void;\n        _update(state: RenderState): void;\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, json: any): void;\n        /**\n         * <p>销毁此对象。</p>\n         * @param\tdestroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n         */\n        destroy(destroyChild?: boolean): void;\n    }\n}\ndeclare module laya.d3.core.trail {\n    import IVertex = laya.d3.graphics.IVertex;\n    import VertexDeclaration = laya.d3.graphics.VertexDeclaration;\n    /**\n     * <code>VertexTrail</code> 类用于创建拖尾顶点结构。\n     */\n    class VertexTrail implements IVertex {\n        static readonly vertexDeclaration1: VertexDeclaration;\n        static readonly vertexDeclaration2: VertexDeclaration;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor();\n    }\n}\ndeclare module laya.d3.core {\n    import AnimationTransform3D = laya.d3.animation.AnimationTransform3D;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Quaternion = laya.d3.math.Quaternion;\n    import Vector3 = laya.d3.math.Vector3;\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <code>Transform3D</code> 类用于实现3D变换。\n     */\n    class Transform3D extends EventDispatcher {\n        /** 变换中心点,注意:该中心点不受变换的影响。*/\n        pivot: Vector3;\n        /**\n         * @private\n         */\n        readonly _isFrontFaceInvert: boolean;\n        /**\n         * 获取所属精灵。\n         */\n        readonly owner: Sprite3D;\n        /**\n         * 获取世界矩阵是否需要更新。\n         * @return\t世界矩阵是否需要更新。\n         */\n        readonly worldNeedUpdate: boolean;\n        /**\n         * 获取局部矩阵。\n         * @return\t局部矩阵。\n         */\n        /**\n         * 设置局部矩阵。\n         * @param value\t局部矩阵。\n         */\n        localMatrix: Matrix4x4;\n        /**\n         * 获取世界矩阵。\n         * @return\t世界矩阵。\n         */\n        /**\n         * 设置世界矩阵。\n         * @param\tvalue 世界矩阵。\n         */\n        worldMatrix: Matrix4x4;\n        /**\n         * 获取局部位置。\n         * @return\t局部位置。\n         */\n        /**\n         * 设置局部位置。\n         * @param value\t局部位置。\n         */\n        localPosition: Vector3;\n        /**\n         * 获取局部旋转。\n         * @return\t局部旋转。\n         */\n        /**\n         * 设置局部旋转。\n         * @param value\t局部旋转。\n         */\n        localRotation: Quaternion;\n        /**\n         * 获取局部缩放。\n         * @return\t局部缩放。\n         */\n        /**\n         * 设置局部缩放。\n         * @param\tvalue 局部缩放。\n         */\n        localScale: Vector3;\n        /**\n         * 获取局部空间的旋转角度。\n         * @return\t欧拉角的旋转值，顺序为x、y、z。\n         */\n        /**\n         * 设置局部空间的旋转角度。\n         * @param\tvalue 欧拉角的旋转值，顺序为x、y、z。\n         */\n        localRotationEuler: Vector3;\n        /**\n         * 获取世界位置。\n         * @return\t世界位置。\n         */\n        /**\n         * 设置世界位置。\n         * @param\tvalue 世界位置。\n         */\n        position: Vector3;\n        /**\n         * 获取世界旋转。\n         * @return\t世界旋转。\n         */\n        /**\n         * 设置世界旋转。\n         * @param value\t世界旋转。\n         */\n        rotation: Quaternion;\n        /**\n         * 获取世界缩放。\n         * @return\t世界缩放。\n         */\n        /**\n         * 设置世界缩放。\n         * @param value\t世界缩放。\n         */\n        scale: Vector3;\n        /**\n         * 设置局部空间的旋转角度。\n         * @param\t欧拉角的旋转值，顺序为x、y、z。\n         */\n        rotationEuler: Vector3;\n        /**\n         * 获取向前方向。\n         * @return\t向前方向。\n         */\n        readonly forward: Vector3;\n        /**\n         * 获取向上方向。\n         * @return\t向上方向。\n         */\n        readonly up: Vector3;\n        /**\n         * 获取向右方向。\n         * @return\t向右方向。\n         */\n        readonly right: Vector3;\n        /**\n         * 获取父3D变换。\n         * @return 父3D变换。\n         */\n        /**\n         * 设置父3D变换。\n         * @param\tvalue 父3D变换。\n         */\n        parent: Transform3D;\n        /**\n         *获取关联虚拟变换。\n         * @return 虚拟变换。\n         */\n        /**\n         *设置关联虚拟变换。\n         * @param value 虚拟变换。\n         */\n        dummy: AnimationTransform3D;\n        /**\n         * 创建一个 <code>Transform3D</code> 实例。\n         * @param owner 所属精灵。\n         */\n        constructor(owner: Sprite3D);\n        /**\n         * @private\n         */\n        _onWorldTransform(): void;\n        /**\n         * 平移变换。\n         * @param \ttranslation 移动距离。\n         * @param \tisLocal 是否局部空间。\n         */\n        translate(translation: Vector3, isLocal?: boolean): void;\n        /**\n         * 旋转变换。\n         * @param \trotations 旋转幅度。\n         * @param \tisLocal 是否局部空间。\n         * @param \tisRadian 是否弧度制。\n         */\n        rotate(rotation: Vector3, isLocal?: boolean, isRadian?: boolean): void;\n        /**\n         * 观察目标位置。\n         * @param\ttarget 观察目标。\n         * @param\tup 向上向量。\n         * @param\tisLocal 是否局部空间。\n         */\n        lookAt(target: Vector3, up: Vector3, isLocal?: boolean): void;\n    }\n}\ndeclare module laya.d3.core {\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Quaternion = laya.d3.math.Quaternion;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <code>TransformUV</code> 类用于实现UV变换。\n     */\n    class TransformUV extends EventDispatcher implements IClone {\n        protected static _tempOffsetV3: Vector3;\n        protected static _tempRotationQua: Quaternion;\n        protected static _tempTitlingV3: Vector3;\n        protected _matrix: Matrix4x4;\n        protected _offset: Vector2;\n        protected _rotation: number;\n        protected _tiling: Vector2;\n        protected _matNeedUpdte: boolean;\n        /**\n         *获取变换矩阵。\n         * @return 变换矩阵。\n         */\n        readonly matrix: Matrix4x4;\n        /**\n         *获取偏移。\n         * @return 偏移。\n         */\n        /**\n         *设置偏移。\n         * @param value 偏移。\n         */\n        offset: Vector2;\n        /**\n         *获取旋转。\n         * @return 旋转。\n         */\n        /**\n         *设置旋转。\n         * @param value 旋转。\n         */\n        rotation: number;\n        /**\n         *获取平铺次数。\n         * @return 平铺次数。\n         */\n        /**\n         *设置平铺次数。\n         * @param value 平铺次数。\n         */\n        tiling: Vector2;\n        /**\n         * 创建一个 <code>TransformUV</code> 实例。\n         */\n        constructor();\n        protected _updateMatrix(): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.core {\n    import RenderState = laya.d3.core.render.RenderState;\n    import Scene = laya.d3.core.scene.Scene;\n    import BoundFrustum = laya.d3.math.BoundFrustum;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Viewport = laya.d3.math.Viewport;\n    import WebGLContext = laya.webgl.WebGLContext;\n    /**\n     * <code>Camera</code> 类用于创建VR摄像机。\n     */\n    class VRCamera extends BaseCamera {\n        /**\n         * 获取左横纵比。\n         * @return 左横纵比。\n         */\n        readonly leftAspectRatio: number;\n        /**\n         * 获取右横纵比。\n         * @return 右横纵比。\n         */\n        readonly rightAspectRatio: number;\n        /**\n         * 设置横纵比。\n         * @param value 横纵比。\n         */\n        aspectRatio: number;\n        /**\n         * 获取屏幕空间的左视口。\n         * @return 屏幕空间的左视口。\n         */\n        readonly leftViewport: Viewport;\n        /**\n         * 获取屏幕空间的右视口。\n         * @return 屏幕空间的右视口。\n         */\n        readonly rightViewport: Viewport;\n        /**\n         * 设置屏幕空间的视口。\n         * @param 屏幕空间的视口。\n         */\n        viewport: Viewport;\n        /**\n         * 获取裁剪空间的左视口。\n         * @return 裁剪空间的左视口。\n         */\n        readonly leftNormalizedViewport: Viewport;\n        /**\n         * 获取裁剪空间的右视口。\n         * @return 裁剪空间的右视口。\n         */\n        readonly rightNormalizedViewport: Viewport;\n        /**\n         * 设置裁剪空间的视口。\n         * @return 裁剪空间的视口。\n         */\n        normalizedViewport: Viewport;\n        readonly needLeftViewport: boolean;\n        readonly needRightViewport: boolean;\n        /**\n         * 获取左视图矩阵。\n         * @return 左视图矩阵。\n         */\n        readonly leftViewMatrix: Matrix4x4;\n        /**\n         * 获取右视图矩阵。\n         * @return 右视图矩阵。\n         */\n        readonly rightViewMatrix: Matrix4x4;\n        /**\n         * 获取左投影矩阵。\n         * @return 左投影矩阵。\n         */\n        readonly leftProjectionMatrix: Matrix4x4;\n        /**\n         * 获取右投影矩阵。\n         * @return 右投影矩阵。\n         */\n        readonly rightProjectionMatrix: Matrix4x4;\n        /**\n         * 获取左投影视图矩阵。\n         * @return 左投影视图矩阵。\n         */\n        readonly leftProjectionViewMatrix: Matrix4x4;\n        /**\n         * 获取右投影视图矩阵。\n         * @return 右投影视图矩阵。\n         */\n        readonly rightProjectionViewMatrix: Matrix4x4;\n        /**\n         * 获取摄像机左视锥。\n         */\n        readonly leftBoundFrustum: BoundFrustum;\n        /**\n         * 获取摄像机右视锥。\n         */\n        readonly rightBoundFrustum: BoundFrustum;\n        /**\n         * 创建一个 <code>VRCamera</code> 实例。\n         * @param\tleftViewport 左视口。\n         * @param\trightViewport 右视口。\n         * @param\tpupilDistande 瞳距。\n         * @param\tfieldOfView 视野。\n         * @param\tleftAspectRatio 左横纵比。\n         * @param\trightAspectRatio 右横纵比。\n         * @param\tnearPlane 近裁面。\n         * @param\tfarPlane 远裁面。\n         */\n        constructor(pupilDistande?: number, leftAspectRatio?: number, rightAspectRatio?: number, nearPlane?: number, farPlane?: number);\n        protected _calculateProjectionMatrix(): void;\n        /**\n         * @inheritDoc\n         */\n        _renderCamera(gl: WebGLContext, state: RenderState, scene: Scene): void;\n    }\n}\ndeclare module laya.d3.extension.cartoonRender {\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import Vector4 = laya.d3.math.Vector4;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    class CartoonMaterial extends BaseMaterial {\n        static ALBEDOTEXTURE: number;\n        static SPECULARTEXTURE: number;\n        static TILINGOFFSET: number;\n        static SHADOWCOLOR: number;\n        static SHADOWRANGE: number;\n        static SHADOWINTENSITY: number;\n        static SPECULARRANGE: number;\n        static SPECULARINTENSITY: number;\n        static SHADERDEFINE_ALBEDOTEXTURE: number;\n        static SHADERDEFINE_SPECULARTEXTURE: number;\n        static SHADERDEFINE_TILINGOFFSET: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 获取漫反射贴图。\n         * @return 漫反射贴图。\n         */\n        /**\n         * 设置漫反射贴图。\n         * @param value 漫反射贴图。\n         */\n        albedoTexture: BaseTexture;\n        /**\n         * 获取高光贴图。\n         * @return 高光贴图。\n         */\n        /**\n         * 设置高光贴图。\n         * @param value 高光贴图。\n         */\n        specularTexture: BaseTexture;\n        /**\n         * 获取阴影颜色。\n         * @return 阴影颜色。\n         */\n        /**\n         * 设置阴影颜色。\n         * @param value 阴影颜色。\n         */\n        shadowColor: Vector4;\n        /**\n         * 获取阴影范围。\n         * @return 阴影范围,范围为0到1。\n         */\n        /**\n         * 设置阴影范围。\n         * @param value 阴影范围,范围为0到1。\n         */\n        shadowRange: number;\n        /**\n         * 获取阴影强度。\n         * @return 阴影强度,范围为0到1。\n         */\n        /**\n         * 设置阴影强度。\n         * @param value 阴影强度,范围为0到1。\n         */\n        shadowIntensity: number;\n        /**\n         * 获取高光范围。\n         * @return 高光范围,范围为0.9到1。\n         */\n        /**\n         * 设置高光范围。\n         * @param value 高光范围,范围为0.9到1。\n         */\n        specularRange: number;\n        /**\n         * 获取高光强度。\n         * @return 高光强度,范围为0到1。\n         */\n        /**\n         * 设置高光强度。\n         * @param value 高光范围,范围为0到1。\n         */\n        specularIntensity: number;\n        /**\n         * 获取纹理平铺和偏移。\n         * @return 纹理平铺和偏移。\n         */\n        /**\n         * 设置纹理平铺和偏移。\n         * @param value 纹理平铺和偏移。\n         */\n        tilingOffset: Vector4;\n        static initShader(): void;\n        constructor();\n    }\n}\ndeclare module laya.d3.extension.cartoonRender {\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import ShaderDefines = laya.d3.shader.ShaderDefines;\n    /**\n     * ...\n     * @author ...\n     */\n    class OutlineMaterial extends BaseMaterial {\n        static OUTLINETEXTURE: number;\n        static OUTLINEWIDTH: number;\n        static OUTLINELIGHTNESS: number;\n        static SHADERDEFINE_OUTLINETEXTURE: number;\n        static shaderDefines: ShaderDefines;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 获取漫轮廓贴图。\n         * @return 轮廓贴图。\n         */\n        /**\n         * 设置轮廓贴图。\n         * @param value 轮廓贴图。\n         */\n        outlineTexture: BaseTexture;\n        /**\n         * 获取轮廓宽度。\n         * @return 轮廓宽度,范围为0到0.05。\n         */\n        /**\n         * 设置轮廓宽度。\n         * @param value 轮廓宽度,范围为0到0.05。\n         */\n        outlineWidth: number;\n        /**\n         * 获取轮廓亮度。\n         * @return 轮廓亮度,范围为0到1。\n         */\n        /**\n         * 设置轮廓亮度。\n         * @param value 轮廓亮度,范围为0到1。\n         */\n        outlineLightness: number;\n        static initShader(): void;\n        constructor();\n    }\n}\ndeclare module laya.d3.graphics {\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Scene = laya.d3.core.scene.Scene;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * @private\n     * <code>DynamicBatch</code> 类用于动态批处理。\n     */\n    class DynamicBatch implements IRenderable {\n        static maxVertexCount: number;\n        static maxIndexCount: number;\n        static maxCombineTriangleCount: number;\n        _vertexDeclaration: VertexDeclaration;\n        readonly _vertexBufferCount: number;\n        readonly triangleCount: number;\n        readonly combineRenderElementsCount: number;\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n        _getIndexBuffer(): IndexBuffer3D;\n        constructor(vertexDeclaration: VertexDeclaration);\n        _addCombineRenderObjTest(renderElement: RenderElement): boolean;\n        _addCombineRenderObj(renderElement: RenderElement): void;\n        _addCombineMaterial(material: BaseMaterial): void;\n        _addMaterialToRenderElementOffset(offset: number): void;\n        _clearRenderElements(): void;\n        _addToRenderQueue(scene: Scene, view: Matrix4x4, projection: Matrix4x4, projectionView: Matrix4x4): void;\n        _beforeRender(state: RenderState): boolean;\n        _render(state: RenderState): void;\n        /**\n         * @private\n         */\n        _getVertexBuffers(): Array<any>;\n        /**NATIVE*/\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import Scene = laya.d3.core.scene.Scene;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * @private\n     * <code>DynamicBatchManager</code> 类用于管理动态批处理。\n     */\n    class DynamicBatchManager {\n        constructor();\n        getDynamicBatch(_vertexDeclaration: VertexDeclaration, number: number): DynamicBatch;\n        /**需手动调用*/\n        _garbageCollection(): void;\n        _addPrepareRenderElement(renderElement: RenderElement): void;\n        _finishCombineDynamicBatch(scene: Scene): void;\n        _clearRenderElements(): void;\n        _addToRenderQueue(scene: Scene, view: Matrix4x4, projection: Matrix4x4, projectionView: Matrix4x4): void;\n        dispose(): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import BaseCamera = laya.d3.core.BaseCamera;\n    import Scene = laya.d3.core.scene.Scene;\n    import BoundFrustum = laya.d3.math.BoundFrustum;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * @private\n     */\n    class FrustumCulling {\n        constructor();\n        /**\n         * @private\n         */\n        static renderShadowObjectCulling(scene: Scene, lightFrustum: Array<any>, shadowQueues: Array<any>, lightViewProjectMatrix: Matrix4x4, nPSSMNum: number): void;\n        /**\n         * @private\n         */\n        static renderShadowObjectCullingOctree(scene: Scene, lightFrustum: Array<any>, quenesResult: Array<any>, lightViewProjectMatrix: Matrix4x4, nPSSMNum: number): void;\n        /**\n         * @private\n         */\n        static renderObjectCulling(boundFrustum: BoundFrustum, scene: Scene, camera: BaseCamera, view: Matrix4x4, projection: Matrix4x4, projectionView: Matrix4x4): void;\n        /**\n         * @private\n         */\n        static renderObjectCullingOctree(boundFrustum: BoundFrustum, scene: Scene, camera: BaseCamera, view: Matrix4x4, projection: Matrix4x4, projectionView: Matrix4x4): void;\n        /**\n         * @private\n         */\n        static renderObjectCullingNoBoundFrustum(scene: Scene, camera: BaseCamera, view: Matrix4x4, projection: Matrix4x4, projectionView: Matrix4x4): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Buffer = laya.webgl.utils.Buffer;\n    /**\n     * <code>IndexBuffer3D</code> 类用于创建索引缓冲。\n     */\n    class IndexBuffer3D extends Buffer {\n        /** 8位ubyte无符号索引类型。*/\n        static INDEXTYPE_UBYTE: string;\n        /** 16位ushort无符号索引类型。*/\n        static INDEXTYPE_USHORT: string;\n        /**\n         * 创建IndexBuffer3D。\n         * @param\tindexType 索引类型。\n         * @param\tindexCount 索引个数。\n         * @param\tbufferUsage IndexBuffer3D用途类型。\n         * @param\tcanRead 是否可读。\n         * @return\t    索引缓冲。\n         */\n        static create: Function;\n        /**\n         * 获取索引类型。\n         *   @return\t索引类型。\n         */\n        readonly indexType: string;\n        /**\n         * 获取索引类型字节数量。\n         *   @return\t索引类型字节数量。\n         */\n        readonly indexTypeByteCount: number;\n        /**\n         * 获取索引个数。\n         *   @return\t索引个数。\n         */\n        readonly indexCount: number;\n        /**\n         * 获取是否可读。\n         *   @return\t是否可读。\n         */\n        readonly canRead: boolean;\n        /**\n         * 创建一个 <code>IndexBuffer3D,不建议开发者使用并用IndexBuffer3D.create()代替</code> 实例。\n         * @param\tindexType 索引类型。\n         * @param\tindexCount 索引个数。\n         * @param\tbufferUsage IndexBuffer3D用途类型。\n         * @param\tcanRead 是否可读。\n         */\n        constructor(indexType: string, indexCount: number, bufferUsage?: number, canRead?: boolean);\n        /**\n         * 设置数据。\n         * @param\tdata 索引数据。\n         * @param\tbufferOffset 索引缓冲中的偏移。\n         * @param\tdataStartIndex 索引数据的偏移。\n         * @param\tdataCount 索引数据的数量。\n         */\n        setData(data: any, bufferOffset?: number, dataStartIndex?: number, dataCount?: number): void;\n        /**\n         * 获取索引数据。\n         *   @return\t索引数据。\n         */\n        getData(): Uint16Array;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    /**\n     * <code>IVertex</code> 接口用于实现创建顶点声明。\n     */\n    interface IVertex {\n    }\n}\ndeclare module laya.d3.graphics {\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import SubMeshRenderElement = laya.d3.core.render.SubMeshRenderElement;\n    /**\n     * @private\n     * <code>MeshSprite3DStaticBatchManager</code> 类用于网格精灵静态批处理管理。\n     */\n    class MeshSprite3DStaticBatchManager extends StaticBatchManager {\n        /**\n         * @private\n         */\n        static _sortPrepareStaticBatch(a: SubMeshRenderElement, b: SubMeshRenderElement): any;\n        /**i\n         * 创建一个 <code>MeshSprite3DStaticBatchManager</code> 实例。\n         */\n        constructor();\n        protected _initStaticBatchs(rootOwner: Sprite3D): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Scene = laya.d3.core.scene.Scene;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import IDispose = laya.resource.IDispose;\n    /**\n     * <code>StaticBatch</code> 类用于静态合并的父类,该类为抽象类。\n     */\n    class StaticBatch implements IRenderable, IDispose {\n        static maxBatchVertexCount: number;\n        /**\n         * 兼容性接口,请使用StaticBatchManager.combine()代替。\n         */\n        static combine(staticBatchRoot: Sprite3D): void;\n        protected _combineRenderElementPoolIndex: number;\n        protected _combineRenderElementPool: Array<any>;\n        _initBatchRenderElements: Array<any>;\n        _batchRenderElements: Array<any>;\n        _material: BaseMaterial;\n        _rootOwner: Sprite3D;\n        _key: string;\n        _manager: StaticBatchManager;\n        readonly _vertexBufferCount: number;\n        readonly triangleCount: number;\n        /**\n         * 创建一个 <code>StaticBatch</code> 实例。\n         */\n        constructor(key: string, manager: StaticBatchManager, rootOwner: Sprite3D);\n        protected _compareBatchRenderElement(a: RenderElement, b: RenderElement): boolean;\n        protected _getVertexDecLightMap(vertexDeclaration: VertexDeclaration): VertexDeclaration;\n        protected _getCombineRenderElementFromPool(): RenderElement;\n        /**\n         * @private\n         */\n        _addBatchRenderElement(renderElement: RenderElement): void;\n        /**\n         * @private\n         */\n        _updateToRenderQueue(scene: Scene, projectionView: Matrix4x4): void;\n        protected _getRenderElement(mergeElements: Array<any>, scene: Scene, projectionView: Matrix4x4): void;\n        /**\n         * @private\n         */\n        _finishInit(): void;\n        /**\n         * @private\n         */\n        _clearRenderElements(): void;\n        /**\n         * @private\n         */\n        dispose(): void;\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n        _getIndexBuffer(): IndexBuffer3D;\n        _beforeRender(state: RenderState): boolean;\n        _render(state: RenderState): void;\n        /**\n         * @private\n         */\n        _getVertexBuffers(): Array<any>;\n        /**NATIVE*/\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import RenderableSprite3D = laya.d3.core.RenderableSprite3D;\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import Scene = laya.d3.core.scene.Scene;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * @private\n     * <code>StaticBatchManager</code> 类用于静态批处理管理的父类。\n     */\n    class StaticBatchManager {\n        static _staticBatchManagers: Array<any>;\n        /**\n         * 静态批处理合并，合并后子节点修改Transform属性无效，根节点staticBatchRoot可为null,如果根节点不为null，根节点可移动。\n         * 如果renderableSprite3Ds为null，合并staticBatchRoot以及其所有子节点为静态批处理，staticBatchRoot作为静态根节点。\n         * 如果renderableSprite3Ds不为null,合并renderableSprite3Ds为静态批处理，staticBatchRoot作为静态根节点。\n         * @param staticBatchRoot 静态批处理根节点。\n         * @param renderableSprite3Ds 静态批处理子节点队列。\n         */\n        static combine(staticBatchRoot: Sprite3D, renderableSprite3Ds?: Array<any>): void;\n        protected _initBatchRenderElements: Array<any>;\n        protected _staticBatches: any;\n        /**\n         * 创建一个 <code>StaticBatchManager</code> 实例。\n         */\n        constructor();\n        protected _finishInit(): void;\n        protected _initStaticBatchs(rootSprite: Sprite3D): void;\n        /**\n         * @private\n         */\n        _addInitBatchSprite(renderableSprite3D: RenderableSprite3D): void;\n        /**\n         * @private\n         */\n        _clearRenderElements(): void;\n        /**\n         * @private\n         */\n        _garbageCollection(renderElement: RenderElement): void;\n        /**\n         * @private\n         */\n        _addToRenderQueue(scene: Scene, view: Matrix4x4, projection: Matrix4x4, projectionView: Matrix4x4): void;\n        dispose(): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import Scene = laya.d3.core.scene.Scene;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * <code>SubMeshStaticBatch</code> 类用于网格静态合并。\n     */\n    class SubMeshStaticBatch extends StaticBatch {\n        _vertexDeclaration: VertexDeclaration;\n        /**\n         * 创建一个 <code>SubMeshStaticBatch</code> 实例。\n         */\n        constructor(key: string, manager: StaticBatchManager, rootOwner: Sprite3D, vertexDeclaration: VertexDeclaration, material: BaseMaterial);\n        protected _compareBatchRenderElement(a: RenderElement, b: RenderElement): boolean;\n        /**\n         * @private\n         */\n        _addCombineBatchRenderObjTest(renderElement: RenderElement): boolean;\n        /**\n         * @private\n         */\n        _addCombineBatchRenderObj(renderElement: RenderElement): void;\n        /**\n         * @private\n         */\n        _deleteCombineBatchRenderObj(renderElement: RenderElement): void;\n        /**\n         * @inheritDoc\n         */\n        _finishInit(): void;\n        protected _getCombineRenderElementFromPool(): RenderElement;\n        protected _getRenderElement(renderQueueElements: Array<any>, scene: Scene, projectionView: Matrix4x4): void;\n        /**\n         * @inheritDoc\n         */\n        _beforeRender(state: RenderState): boolean;\n        /**\n         * @inheritDoc\n         */\n        _render(state: RenderState): void;\n        /**\n         * @inheritDoc\n         */\n        dispose(): void;\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Buffer = laya.webgl.utils.Buffer;\n    /**\n     * <code>VertexBuffer3D</code> 类用于创建顶点缓冲。\n     */\n    class VertexBuffer3D extends Buffer {\n        /**\n         * 创建VertexBuffer3D。\n         * @param\tvertexDeclaration 顶点声明。\n         * @param\tvertexCount 顶点个数。\n         * @param\tbufferUsage VertexBuffer3D用途类型。\n         * @param\tcanRead 是否可读。\n         * @return\t    顶点缓冲。\n         */\n        static create: Function;\n        /**\n         * 获取顶点结构声明。\n         *   @return\t顶点结构声明。\n         */\n        readonly vertexDeclaration: VertexDeclaration;\n        /**\n         * 获取顶点个数。\n         *   @return\t顶点个数。\n         */\n        readonly vertexCount: number;\n        /**\n         * 获取是否可读。\n         *   @return\t是否可读。\n         */\n        readonly canRead: boolean;\n        /**\n         * 创建一个 <code>VertexBuffer3D,不建议开发者使用并用VertexBuffer3D.create()代替</code> 实例。\n         * @param\tvertexDeclaration 顶点声明。\n         * @param\tvertexCount 顶点个数。\n         * @param\tbufferUsage VertexBuffer3D用途类型。\n         * @param\tcanRead 是否可读。\n         */\n        constructor(vertexDeclaration: VertexDeclaration, vertexCount: number, bufferUsage: number, canRead?: boolean);\n        /**\n         * 和索引缓冲一起绑定。\n         * @param\tib 索引缓冲。\n         */\n        bindWithIndexBuffer(ib: IndexBuffer3D): void;\n        /**\n         * 设置数据。\n         * @param\tdata 顶点数据。\n         * @param\tbufferOffset 顶点缓冲中的偏移。\n         * @param\tdataStartIndex 顶点数据的偏移。\n         * @param\tdataCount 顶点数据的数量。\n         */\n        setData(data: Float32Array, bufferOffset?: number, dataStartIndex?: number, dataCount?: number): void;\n        /**\n         * 获取顶点数据。\n         *   @return\t顶点数据。\n         */\n        getData(): Float32Array;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import ValusArray = laya.d3.shader.ValusArray;\n    /**\n     * ...\n     * @author ...\n     */\n    class VertexDeclaration {\n        static _maxVertexDeclarationBit: number;\n        static maxVertexDeclaration: number;\n        static getVertexStride(vertexElements: Array<any>): number;\n        _conchVertexDeclaration: any;\n        /**\n         * 获取唯一标识ID(通常用于优化或识别)。\n         * @return 唯一标识ID\n         */\n        readonly id: number;\n        readonly vertexStride: number;\n        readonly shaderValues: ValusArray;\n        readonly shaderDefineValue: number;\n        /**\n         * 增加Shader宏定义。\n         * @param value 宏定义。\n         */\n        _addShaderDefine(value: number): void;\n        protected _removeShaderDefine(value: number): void;\n        constructor(vertexStride: number, vertexElements: Array<any>);\n        getVertexElements(): Array<any>;\n        getVertexElementByUsage(usage: number): VertexElement;\n        unBinding(): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    /**\n     * <code>VertexElement</code> 类用于创建顶点结构分配。\n     */\n    class VertexElement {\n        offset: number;\n        elementFormat: string;\n        elementUsage: number;\n        constructor(offset: number, elementFormat: string, elementUsage: number);\n    }\n}\ndeclare module laya.d3.graphics {\n    /**\n     * ...\n     * @author ...\n     */\n    class VertexElementFormat {\n        static Single: string;\n        static Vector2: string;\n        static Vector3: string;\n        static Vector4: string;\n        static Color: string;\n        static Byte4: string;\n        static Short2: string;\n        static Short4: string;\n        static NormalizedShort2: string;\n        static NormalizedShort4: string;\n        static HalfVector2: string;\n        static HalfVector4: string;\n    }\n}\ndeclare module laya.d3.graphics {\n    /**\n     * ...\n     * @author ...\n     */\n    class VertexElementUsage {\n        static POSITION0: number;\n        static COLOR0: number;\n        static TEXTURECOORDINATE0: number;\n        static NORMAL0: number;\n        static BINORMAL0: number;\n        static TANGENT0: number;\n        static BLENDINDICES0: number;\n        static BLENDWEIGHT0: number;\n        static DEPTH0: number;\n        static FOG0: number;\n        static POINTSIZE0: number;\n        static SAMPLE0: number;\n        static TESSELLATEFACTOR0: number;\n        static COLOR1: number;\n        static NEXTTEXTURECOORDINATE0: number;\n        static TEXTURECOORDINATE1: number;\n        static NEXTTEXTURECOORDINATE1: number;\n        static CORNERTEXTURECOORDINATE0: number;\n        static VELOCITY0: number;\n        static STARTCOLOR0: number;\n        static STARTSIZE: number;\n        static AGEADDSCALE0: number;\n        static STARTROTATION: number;\n        static ENDCOLOR0: number;\n        static STARTLIFETIME: number;\n        static TIME0: number;\n        static SHAPEPOSITIONSTARTLIFETIME: number;\n        static DIRECTIONTIME: number;\n        static SIZEROTATION0: number;\n        static RADIUS0: number;\n        static RADIAN0: number;\n        static STARTSPEED: number;\n        static RANDOM0: number;\n        static RANDOM1: number;\n        static SIMULATIONWORLDPOSTION: number;\n        static SIMULATIONWORLDROTATION: number;\n        static TEXTURECOORDINATE0X: number;\n        static TEXTURECOORDINATE0X1: number;\n        static TEXTURECOORDINATE0Y: number;\n        static OFFSETVECTOR: number;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalColorTangent</code> 类用于创建粒子顶点结构。\n     */\n    class VertexGlitter implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly time: number;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, textureCoordinate: Vector2, time: number);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTangent</code> 类用于创建粒子顶点结构。\n     */\n    class VertexParticle implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly cornerTextureCoordinate: Vector4;\n        readonly position: Vector3;\n        readonly velocity: Vector3;\n        readonly startColor: Vector4;\n        readonly endColor: Vector4;\n        readonly sizeRotation: Vector3;\n        readonly radius: Vector2;\n        readonly radian: Vector4;\n        readonly ageAddScale: number;\n        readonly time: number;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(cornerTextureCoordinate: Vector4, position: Vector3, velocity: Vector3, startColor: Vector4, endColor: Vector4, sizeRotation: Vector3, radius: Vector2, radian: Vector4, ageAddScale: number, time: number);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    class VertexPosition implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    class VertexPositionNormal implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColor</code> 类用于创建位置、法线、颜色顶点结构。\n     */\n    class VertexPositionNormalColor implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorSkin</code> 类用于创建位置、法线、颜色、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorSkin implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorSkin</code> 类用于创建位置、法线、颜色、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorSkinSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, tangent: Vector4, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorSkin</code> 类用于创建位置、法线、颜色、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorSkinTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, tangent: Vector4, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTangent</code> 类用于创建位置、法线、颜色、切线顶点结构。\n     */\n    class VertexPositionNormalColorSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly tangent: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, tangent: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTangent</code> 类用于创建位置、法线、颜色、切线顶点结构。\n     */\n    class VertexPositionNormalColorTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly tangent: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, tangent: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTexture</code> 类用于创建位置、法线、颜色、纹理顶点结构。\n     */\n    class VertexPositionNormalColorTexture implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate: Vector2;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate: Vector2);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTexture</code> 类用于创建位置、法线、颜色、纹理顶点结构。\n     */\n    class VertexPositionNormalColorTexture0Texture1 implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate0: Vector2, textureCoordinate1: Vector2);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTextureSkin</code> 类用于创建位置、法线、颜色、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorTexture0Texture1Skin implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate0: Vector2, textureCoordinate1: Vector2, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorTexture0Texture1SkinSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorTexture0Texture1SkinTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        VertexPositionNormalColorTexture0SkinTangent(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTextureTangent</code> 类用于创建位置、法线、颜色、纹理、切线顶点结构。\n     */\n    class VertexPositionNormalColorTexture0Texture1STangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTextureTangent</code> 类用于创建位置、法线、颜色、纹理、切线顶点结构。\n     */\n    class VertexPositionNormalColorTexture0Texture1Tangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        VertexPositionNormalColorTexture0Tangent(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTextureSkin</code> 类用于创建位置、法线、颜色、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorTextureSkin implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate: Vector2, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorTextureSkinSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalColorTextureSkinTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTextureTangent</code> 类用于创建位置、法线、颜色、纹理、切线顶点结构。\n     */\n    class VertexPositionNormalColorTextureSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate: Vector2;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate: Vector2, tangent: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTextureTangent</code> 类用于创建位置、法线、颜色、纹理、切线顶点结构。\n     */\n    class VertexPositionNormalColorTextureTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly color: Vector4;\n        readonly textureCoordinate: Vector2;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, color: Vector4, textureCoordinate: Vector2, tangent: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    class VertexPositionNormalSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, tangent: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    class VertexPositionNormalTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, tangent: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTexture</code> 类用于创建位置、法线、纹理顶点结构。\n     */\n    class VertexPositionNormalTexture implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate: Vector2);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTexture</code> 类用于创建位置、法线、纹理顶点结构。\n     */\n    class VertexPositionNormalTexture0Texture1 implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate0: Vector2, textureCoordinate1: Vector2);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTextureSkin</code> 类用于创建位置、法线、颜色、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalTexture0Texture1Skin implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate0: Vector2, textureCoordinate1: Vector2, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalTexture0Texture1SkinSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalTexture0Texture1SkinTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        VertexPositionNormalTexture0SkinTangent(position: Vector3, normal: Vector3, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTextureTangent</code> 类用于创建位置、法线、纹理、切线顶点结构。\n     */\n    class VertexPositionNormalTexture0Texture1STangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTextureTangent</code> 类用于创建位置、法线、纹理、切线顶点结构。\n     */\n    class VertexPositionNormalTexture0Texture1Tangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        VertexPositionNormalTexture0Tangent(position: Vector3, normal: Vector3, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3): void;\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalColorTextureSkin</code> 类用于创建位置、法线、颜色、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalTextureSkin implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate: Vector2, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalTextureSkinSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNormalTextureSkinTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTextureTangent</code> 类用于创建位置、法线、纹理、切线顶点结构。\n     */\n    class VertexPositionNormalTextureSTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate: Vector2, tangent: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTextureTangent</code> 类用于创建位置、法线、纹理、切线顶点结构。\n     */\n    class VertexPositionNormalTextureTangent implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate: Vector2, tangent: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTexture</code> 类用于创建位置、法线、纹理顶点结构。\n     */\n    class VertexPositionNTBTexture implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate: Vector2);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexPositionNormalTextureSkin</code> 类用于创建位置、法线、纹理、骨骼索引、骨骼权重顶点结构。\n     */\n    class VertexPositionNTBTexture0Texture1Skin implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        binormal: Vector3;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate0: Vector2;\n        readonly textureCoordinate1: Vector2;\n        readonly blendIndex: Vector4;\n        readonly blendWeight: Vector4;\n        readonly tangent: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, binormal: Vector3, textureCoordinate0: Vector2, textureCoordinate1: Vector2, tangent: Vector3, blendIndex: Vector4, blendWeight: Vector4);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTexture</code> 类用于创建位置、法线、纹理顶点结构。\n     */\n    class VertexPositionNTBTextureSkin implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoordinate: Vector2;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoordinate: Vector2);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionTerrain</code> 类用于创建位置、法线、纹理1、纹理2顶点结构。\n     */\n    class VertexPositionTerrain implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly normal: Vector3;\n        readonly textureCoord0: Vector2;\n        readonly textureCoord1: Vector2;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, normal: Vector3, textureCoord0: Vector2, textureCoord1: Vector2);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>VertexPositionNormalTexture</code> 类用于创建位置、纹理顶点结构。\n     */\n    class VertexPositionTexture0 implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly position: Vector3;\n        readonly textureCoordinate0: Vector2;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(position: Vector3, textureCoordinate0: Vector2);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexShurikenParticle</code> 类用于创建粒子顶点结构。\n     */\n    class VertexShurikenParticleBillboard implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly cornerTextureCoordinate: Vector4;\n        readonly positionStartLifeTime: Vector4;\n        readonly velocity: Vector3;\n        readonly startColor: Vector4;\n        readonly startSize: Vector3;\n        readonly startRotation0: Vector3;\n        readonly startRotation1: Vector3;\n        readonly startRotation2: Vector3;\n        readonly startLifeTime: number;\n        readonly time: number;\n        readonly startSpeed: number;\n        readonly random0: Vector4;\n        readonly random1: Vector4;\n        readonly simulationWorldPostion: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(cornerTextureCoordinate: Vector4, positionStartLifeTime: Vector4, velocity: Vector3, startColor: Vector4, startSize: Vector3, startRotation0: Vector3, startRotation1: Vector3, startRotation2: Vector3, ageAddScale: number, time: number, startSpeed: number, randoms0: Vector4, randoms1: Vector4, simulationWorldPostion: Vector3);\n    }\n}\ndeclare module laya.d3.graphics {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>VertexShurikenParticle</code> 类用于创建粒子顶点结构。\n     */\n    class VertexShurikenParticleMesh implements IVertex {\n        static readonly vertexDeclaration: VertexDeclaration;\n        readonly cornerTextureCoordinate: Vector4;\n        readonly position: Vector4;\n        readonly velocity: Vector3;\n        readonly startColor: Vector4;\n        readonly startSize: Vector3;\n        readonly startRotation0: Vector3;\n        readonly startRotation1: Vector3;\n        readonly startRotation2: Vector3;\n        readonly startLifeTime: number;\n        readonly time: number;\n        readonly startSpeed: number;\n        readonly random0: Vector4;\n        readonly random1: Vector4;\n        readonly simulationWorldPostion: Vector3;\n        readonly vertexDeclaration: VertexDeclaration;\n        constructor(cornerTextureCoordinate: Vector4, positionStartLifeTime: Vector4, velocity: Vector3, startColor: Vector4, startSize: Vector3, startRotation0: Vector3, startRotation1: Vector3, startRotation2: Vector3, ageAddScale: number, time: number, startSpeed: number, randoms0: Vector4, randoms1: Vector4, simulationWorldPostion: Vector3);\n    }\n}\ndeclare module laya.d3.loaders {\n    import Mesh = laya.d3.resource.models.Mesh;\n    import Byte = laya.utils.Byte;\n    /**\n     * @private\n     * <code>LoadModel</code> 类用于模型加载。\n     */\n    class LoadModelV01 {\n        readonly mesh: Mesh;\n        /**\n         * 创建一个 <code>LoadModel</code> 实例。\n         */\n        constructor(readData: Byte, version: string, mesh: Mesh, materials: Array<any>, subMeshes: Array<any>, materialMap: any);\n        onError(): void;\n        READ_BLOCK(): boolean;\n        READ_DATA(): boolean;\n        READ_STRINGS(): boolean;\n        READ_MATERIAL(): boolean;\n        READ_MESH(): boolean;\n        READ_SUBMESH(): boolean;\n        READ_DATAAREA(): boolean;\n    }\n}\ndeclare module laya.d3.loaders {\n    import Mesh = laya.d3.resource.models.Mesh;\n    import Byte = laya.utils.Byte;\n    /**\n     * @private\n     * <code>LoadModel</code> 类用于模型加载。\n     */\n    class LoadModelV02 {\n        /**\n         * @private\n         */\n        static parse(readData: Byte, version: string, mesh: Mesh, materials: Array<any>, subMeshes: Array<any>, materialMap: any): void;\n    }\n}\ndeclare module laya.d3.loaders {\n    import Mesh = laya.d3.resource.models.Mesh;\n    import Byte = laya.utils.Byte;\n    /**\n     * @private\n     * <code>LoadModel</code> 类用于模型加载。\n     */\n    class LoadModelV03 {\n        static _vertexDeclarationMap_Discard: any;\n        static _vertexDeclarationMap: any;\n        /**\n         * @private\n         */\n        static parse(readData: Byte, version: string, mesh: Mesh, subMeshes: Array<any>, materialMap: any): void;\n    }\n}\ndeclare module laya.d3.loaders {\n    import Mesh = laya.d3.resource.models.Mesh;\n    /**\n     * ...\n     * @author ...\n     */\n    class MeshReader {\n        constructor();\n        static read(data: ArrayBuffer, mesh: Mesh, materials: Array<any>, subMeshes: Array<any>, materialMap: any): void;\n    }\n}\ndeclare module laya.d3.math {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>BoundBox</code> 类用于创建包围盒。\n     */\n    class BoundBox implements IClone {\n        /**最小顶点。*/\n        min: Vector3;\n        /**最大顶点。*/\n        max: Vector3;\n        /**\n         * 创建一个 <code>BoundBox</code> 实例。\n         * @param\tmin 包围盒的最小顶点。\n         * @param\tmax 包围盒的最大顶点。\n         */\n        constructor(min: Vector3, max: Vector3);\n        /**\n         * 获取包围盒的8个角顶点。\n         * @param\tcorners 返回顶点的输出队列。\n         */\n        getCorners(corners: Array<any>): void;\n        toDefault(): void;\n        /**\n         * 从顶点生成包围盒。\n         * @param\tpoints 所需顶点队列。\n         * @param\tout 生成的包围盒。\n         */\n        static createfromPoints(points: Array<any>, out: BoundBox): void;\n        /**\n         * 合并两个包围盒。\n         * @param\tbox1 包围盒1。\n         * @param\tbox2 包围盒2。\n         * @param\tout 生成的包围盒。\n         */\n        static merge(box1: BoundBox, box2: BoundBox, out: BoundBox): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>BoundFrustum</code> 类用于创建锥截体。\n     */\n    class BoundFrustum {\n        /**\n         * 创建一个 <code>BoundFrustum</code> 实例。\n         * @param\tmatrix 锥截体的描述4x4矩阵。\n         */\n        constructor(matrix: Matrix4x4);\n        /**\n         * 获取描述矩阵。\n         * @return  描述矩阵。\n         */\n        /**\n         * 设置描述矩阵。\n         * @param matrix 描述矩阵。\n         */\n        matrix: Matrix4x4;\n        /**\n         * 获取近平面。\n         * @return  近平面。\n         */\n        readonly near: Plane;\n        /**\n         * 获取远平面。\n         * @return  远平面。\n         */\n        readonly far: Plane;\n        /**\n         * 获取左平面。\n         * @return  左平面。\n         */\n        readonly left: Plane;\n        /**\n         * 获取右平面。\n         * @return  右平面。\n         */\n        readonly right: Plane;\n        /**\n         * 获取顶平面。\n         * @return  顶平面。\n         */\n        readonly top: Plane;\n        /**\n         * 获取底平面。\n         * @return  底平面。\n         */\n        readonly bottom: Plane;\n        /**\n         * 判断是否与其他锥截体相等。\n         * @param\tother 锥截体。\n         */\n        equalsBoundFrustum(other: BoundFrustum): boolean;\n        /**\n         * 判断是否与其他对象相等。\n         * @param\tobj 对象。\n         */\n        equalsObj(obj: any): boolean;\n        /**\n         * 获取锥截体的任意一平面。\n         * 0:近平面\n         * 1:远平面\n         * 2:左平面\n         * 3:右平面\n         * 4:顶平面\n         * 5:底平面\n         * @param\tindex 索引。\n         */\n        getPlane(index: number): Plane;\n        /**\n         * 锥截体的8个顶点。\n         * @param  corners  返回顶点的输出队列。\n         */\n        getCorners(corners: Array<any>): void;\n        /**\n         * 与点的位置关系。返回-1,包涵;0,相交;1,不相交\n         * @param  point  点。\n         */\n        containsPoint(point: Vector3): number;\n        /**\n         * 与包围盒的位置关系。返回-1,包涵;0,相交;1,不相交\n         * @param  box  包围盒。\n         */\n        containsBoundBox(box: BoundBox): number;\n        /**\n         * 与包围球的位置关系。返回-1,包涵;0,相交;1,不相交\n         * @param  sphere  包围球。\n         */\n        containsBoundSphere(sphere: BoundSphere): number;\n    }\n}\ndeclare module laya.d3.math {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>BoundSphere</code> 类用于创建包围球。\n     */\n    class BoundSphere implements IClone {\n        /**包围球的中心。*/\n        center: Vector3;\n        /**包围球的半径。*/\n        radius: number;\n        /**\n         * 创建一个 <code>BoundSphere</code> 实例。\n         * @param\tcenter 包围球的中心。\n         * @param\tradius 包围球的半径。\n         */\n        constructor(center: Vector3, radius: number);\n        toDefault(): void;\n        /**\n         * 从顶点的子队列生成包围球。\n         * @param\tpoints 顶点的队列。\n         * @param\tstart 顶点子队列的起始偏移。\n         * @param\tcount 顶点子队列的顶点数。\n         * @param\tresult 生成的包围球。\n         */\n        static createFromSubPoints(points: Array<any>, start: number, count: number, out: BoundSphere): void;\n        /**\n         * 从顶点队列生成包围球。\n         * @param\tpoints 顶点的队列。\n         * @param\tresult 生成的包围球。\n         */\n        static createfromPoints(points: Array<any>, out: BoundSphere): void;\n        /**\n         * 判断射线是否与碰撞球交叉，并返回交叉距离。\n         * @param\tray 射线。\n         * @return 距离交叉点的距离，-1表示不交叉。\n         */\n        intersectsRayDistance(ray: Ray): number;\n        /**\n         * 判断射线是否与碰撞球交叉，并返回交叉点。\n         * @param\tray  射线。\n         * @param\toutPoint 交叉点。\n         * @return  距离交叉点的距离，-1表示不交叉。\n         */\n        intersectsRayPoint(ray: Ray, outPoint: Vector3): number;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>Collision</code> 类用于检测碰撞。\n     */\n    class Collision {\n        /**\n         * 创建一个 <code>Collision</code> 实例。\n         */\n        constructor();\n        /**\n         * 空间中点到平面的距离\n         * @param\tplane 平面\n         * @param\tpoint 点\n         */\n        static distancePlaneToPoint(plane: Plane, point: Vector3): number;\n        /**\n         * 空间中点到包围盒的距离\n         * @param\tbox 包围盒\n         * @param\tpoint 点\n         */\n        static distanceBoxToPoint(box: BoundBox, point: Vector3): number;\n        /**\n         * 空间中包围盒到包围盒的距离\n         * @param\tbox1 包围盒1\n         * @param\tbox2 包围盒2\n         */\n        static distanceBoxToBox(box1: BoundBox, box2: BoundBox): number;\n        /**\n         * 空间中点到包围球的距离\n         * @param\tsphere 包围球\n         * @param\tpoint  点\n         */\n        static distanceSphereToPoint(sphere: BoundSphere, point: Vector3): number;\n        /**\n         * 空间中包围球到包围球的距离\n         * @param\tsphere1 包围球1\n         * @param\tsphere2 包围球2\n         */\n        static distanceSphereToSphere(sphere1: BoundSphere, sphere2: BoundSphere): number;\n        /**\n         * 空间中射线和三角面是否相交,输出距离\n         * @param\tray 射线\n         * @param\tvertex1 三角面顶点1\n         * @param\tvertex2\t三角面顶点2\n         * @param\tvertex3 三角面顶点3\n         * @param\tout 点和三角面的距离\n         * @return  是否相交\n         */\n        static intersectsRayAndTriangleRD(ray: Ray, vertex1: Vector3, vertex2: Vector3, vertex3: Vector3, out: number): boolean;\n        /**\n         * 空间中射线和三角面是否相交,输出相交点\n         * @param\tray 射线\n         * @param\tvertex1 三角面顶点1\n         * @param\tvertex2\t三角面顶点2\n         * @param\tvertex3 三角面顶点3\n         * @param\tout 相交点\n         * @return  是否相交\n         */\n        static intersectsRayAndTriangleRP(ray: Ray, vertex1: Vector3, vertex2: Vector3, vertex3: Vector3, out: Vector3): boolean;\n        /**\n         * 空间中射线和点是否相交\n         * @param\tray   射线\n         * @param\tpoint 点\n         */\n        static intersectsRayAndPoint(ray: Ray, point: Vector3): boolean;\n        /**\n         * 空间中射线和射线是否相交\n         * @param\tray1 射线1\n         * @param\tray2 射线2\n         * @param\tout 相交点\n         */\n        static intersectsRayAndRay(ray1: Ray, ray2: Ray, out: Vector3): boolean;\n        /**\n         * 空间中平面和三角面是否相交\n         * @param\tplane 平面\n         * @param\tvertex1 三角面顶点1\n         * @param\tvertex2 三角面顶点2\n         * @param\tvertex3 三角面顶点3\n         * @return  返回空间位置关系\n         */\n        static intersectsPlaneAndTriangle(plane: Plane, vertex1: Vector3, vertex2: Vector3, vertex3: Vector3): number;\n        /**\n         * 空间中射线和平面是否相交\n         * @param\tray   射线\n         * @param\tplane 平面\n         * @param\tout 相交距离,如果为0,不相交\n         */\n        static intersectsRayAndPlaneRD(ray: Ray, plane: Plane, out: number): boolean;\n        /**\n         * 空间中射线和平面是否相交\n         * @param\tray   射线\n         * @param\tplane 平面\n         * @param\tout 相交点\n         */\n        static intersectsRayAndPlaneRP(ray: Ray, plane: Plane, out: Vector3): boolean;\n        /**\n         * 空间中射线和包围盒是否相交\n         * @param\tray 射线\n         * @param\tbox\t包围盒\n         * @param\tout 相交距离,如果为0,不相交\n         */\n        static intersectsRayAndBoxRD(ray: Ray, box: BoundBox): number;\n        /**\n         * 空间中射线和包围盒是否相交\n         * @param\tray 射线\n         * @param\tbox\t包围盒\n         * @param\tout 相交点\n         */\n        static intersectsRayAndBoxRP(ray: Ray, box: BoundBox, out: Vector3): number;\n        /**\n         * 空间中射线和包围球是否相交\n         * @param\tray    射线\n         * @param\tsphere 包围球\n         * @return\t相交距离,-1表示不相交\n         */\n        static intersectsRayAndSphereRD(ray: Ray, sphere: BoundSphere): number;\n        /**\n         * 空间中射线和包围球是否相交\n         * @param\tray    射线\n         * @param\tsphere 包围球\n         * @param\tout    相交点\n         * @return  相交距离,-1表示不相交\n         */\n        static intersectsRayAndSphereRP(ray: Ray, sphere: BoundSphere, out: Vector3): number;\n        /**\n         * 空间中包围球和三角面是否相交\n         * @param\tsphere 包围球\n         * @param\tvertex1 三角面顶点1\n         * @param\tvertex2 三角面顶点2\n         * @param\tvertex3 三角面顶点3\n         * @return  返回是否相交\n         */\n        static intersectsSphereAndTriangle(sphere: BoundSphere, vertex1: Vector3, vertex2: Vector3, vertex3: Vector3): boolean;\n        /**\n         * 空间中点和平面是否相交\n         * @param\tplane  平面\n         * @param\tpoint  点\n         * @return  碰撞状态\n         */\n        static intersectsPlaneAndPoint(plane: Plane, point: Vector3): number;\n        /**\n         * 空间中平面和平面是否相交\n         * @param\tplane1 平面1\n         * @param\tplane2 平面2\n         * @return  是否相交\n         */\n        static intersectsPlaneAndPlane(plane1: Plane, plane2: Plane): boolean;\n        /**\n         * 空间中平面和平面是否相交\n         * @param\tplane1 平面1\n         * @param\tplane2 平面2\n         * @param\tline   相交线\n         * @return  是否相交\n         */\n        static intersectsPlaneAndPlaneRL(plane1: Plane, plane2: Plane, line: Ray): boolean;\n        /**\n         * 空间中平面和包围盒是否相交\n         * @param\tplane 平面\n         * @param   box  包围盒\n         * @return  碰撞状态\n         */\n        static intersectsPlaneAndBox(plane: Plane, box: BoundBox): number;\n        /**\n         * 空间中平面和包围球是否相交\n         * @param\tplane 平面\n         * @param   sphere 包围球\n         * @return  碰撞状态\n         */\n        static intersectsPlaneAndSphere(plane: Plane, sphere: BoundSphere): number;\n        /**\n         * 空间中包围盒和包围盒是否相交\n         * @param\tbox1 包围盒1\n         * @param   box2 包围盒2\n         * @return  是否相交\n         */\n        static intersectsBoxAndBox(box1: BoundBox, box2: BoundBox): boolean;\n        /**\n         * 空间中包围盒和包围球是否相交\n         * @param\tbox 包围盒\n         * @param   sphere 包围球\n         * @return  是否相交\n         */\n        static intersectsBoxAndSphere(box: BoundBox, sphere: BoundSphere): boolean;\n        /**\n         * 空间中包围球和包围球是否相交\n         * @param\tsphere1 包围球1\n         * @param   sphere2 包围球2\n         * @return  是否相交\n         */\n        static intersectsSphereAndSphere(sphere1: BoundSphere, sphere2: BoundSphere): boolean;\n        /**\n         * 空间中包围盒是否包含另一个点\n         * @param\tbox 包围盒\n         * @param   point 点\n         * @return  位置关系:0 不想交,1 包含, 2 相交\n         */\n        static boxContainsPoint(box: BoundBox, point: Vector3): number;\n        /**\n         * 空间中包围盒是否包含另一个包围盒\n         * @param\tbox1 包围盒1\n         * @param   box2 包围盒2\n         * @return  位置关系:0 不想交,1 包含, 2 相交\n         */\n        static boxContainsBox(box1: BoundBox, box2: BoundBox): number;\n        /**\n         * 空间中包围盒是否包含另一个包围球\n         * @param\tbox 包围盒\n         * @param   sphere 包围球\n         * @return  位置关系:0 不想交,1 包含, 2 相交\n         */\n        static boxContainsSphere(box: BoundBox, sphere: BoundSphere): number;\n        /**\n         * 空间中包围球是否包含另一个点\n         * @param\tsphere 包围球\n         * @param   point 点\n         * @return  位置关系:0 不想交,1 包含, 2 相交\n         */\n        static sphereContainsPoint(sphere: BoundSphere, point: Vector3): number;\n        /**\n         * 空间中包围球是否包含另一个三角面\n         * @param\tsphere\n         * @param\tvertex1 三角面顶点1\n         * @param\tvertex2 三角面顶点2\n         * @param\tvertex3 三角面顶点3\n         * @return  返回空间位置关系\n         */\n        static sphereContainsTriangle(sphere: BoundSphere, vertex1: Vector3, vertex2: Vector3, vertex3: Vector3): number;\n        /**\n         * 空间中包围球是否包含另一包围盒\n         * @param\tsphere 包围球\n         * @param   box 包围盒\n         * @return  位置关系:0 不想交,1 包含, 2 相交\n         */\n        static sphereContainsBox(sphere: BoundSphere, box: BoundBox): number;\n        /**\n         * 空间中包围球是否包含另一包围球\n         * @param\tsphere1 包围球\n         * @param   sphere2 包围球\n         * @return  位置关系:0 不想交,1 包含, 2 相交\n         */\n        static sphereContainsSphere(sphere1: BoundSphere, sphere2: BoundSphere): number;\n        /**\n         * 空间中点与三角面的最近点\n         * @param\tpoint 点\n         * @param\tvertex1 三角面顶点1\n         * @param\tvertex2\t三角面顶点2\n         * @param\tvertex3 三角面顶点3\n         * @param\tout 最近点\n         */\n        static closestPointPointTriangle(point: Vector3, vertex1: Vector3, vertex2: Vector3, vertex3: Vector3, out: Vector3): void;\n        /**\n         * 空间中平面与一点的最近点\n         * @param\tplane 平面\n         * @param\tpoint 点\n         * @param\tout 最近点\n         */\n        static closestPointPlanePoint(plane: Plane, point: Vector3, out: Vector3): void;\n        /**\n         * 空间中包围盒与一点的最近点\n         * @param\tbox 包围盒\n         * @param\tpoint 点\n         * @param\tout 最近点\n         */\n        static closestPointBoxPoint(box: BoundBox, point: Vector3, out: Vector3): void;\n        /**\n         * 空间中包围球与一点的最近点\n         * @param\tsphere 包围球\n         * @param\tpoint 点\n         * @param\tout 最近点\n         */\n        static closestPointSpherePoint(sphere: BoundSphere, point: Vector3, out: Vector3): void;\n        /**\n         * 空间中包围球与包围球的最近点\n         * @param\tsphere1 包围球1\n         * @param\tsphere2 包围球2\n         * @param\tout 最近点\n         */\n        static closestPointSphereSphere(sphere1: BoundSphere, sphere2: BoundSphere, out: Vector3): void;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>ContainmentType</code> 类用于定义空间物体位置关系。\n     */\n    class ContainmentType {\n        static Disjoint: number;\n        static Contains: number;\n        static Intersects: number;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>MathUtils</code> 类用于创建数学工具。\n     */\n    class MathUtils3D {\n        /**单精度浮点(float)零的容差*/\n        static zeroTolerance: number;\n        /**浮点数默认最大值*/\n        static MaxValue: number;\n        /**浮点数默认最小值*/\n        static MinValue: number;\n        /**\n         * 创建一个 <code>MathUtils</code> 实例。\n         */\n        constructor();\n        /**\n         * 是否在容差的范围内近似于0\n         * @param  判断值\n         * @return  是否近似于0\n         */\n        static isZero(v: number): boolean;\n        /**\n         * 两个值是否在容差的范围内近似相等Sqr Magnitude\n         * @param  判断值\n         * @return  是否近似于0\n         */\n        static nearEqual(n1: number, n2: number): boolean;\n        static fastInvSqrt(value: number): number;\n    }\n}\ndeclare module laya.d3.math {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>Matrix3x3</code> 类用于创建3x3矩阵。\n     */\n    class Matrix3x3 implements IClone {\n        /**默认矩阵,禁止修改*/\n        static DEFAULT: Matrix3x3;\n        /**\n         * 根据指定平移生成3x3矩阵\n         * @param\ttra 平移\n         * @param\tout 输出矩阵\n         */\n        static createFromTranslation(trans: Vector2, out: Matrix3x3): void;\n        /**\n         * 根据指定旋转生成3x3矩阵\n         * @param\trad  旋转值\n         * @param\tout 输出矩阵\n         */\n        static createFromRotation(rad: number, out: Matrix3x3): void;\n        /**\n         * 根据制定缩放生成3x3矩阵\n         * @param\tscale 缩放值\n         * @param\tout 输出矩阵\n         */\n        static createFromScaling(scale: Vector2, out: Matrix3x3): void;\n        /**\n         * 从4x4矩阵转换为一个3x3的矩阵（原则为upper-left,忽略第四行四列）\n         * @param\tsou 4x4源矩阵\n         * @param\tout 3x3输出矩阵\n         */\n        static createFromMatrix4x4(sou: Matrix4x4, out: Matrix3x3): void;\n        /**\n         *  两个3x3矩阵的相乘\n         * @param\tleft 左矩阵\n         * @param\tright  右矩阵\n         * @param\tout  输出矩阵\n         */\n        static multiply(left: Matrix3x3, right: Matrix3x3, out: Matrix3x3): void;\n        /**矩阵元素数组*/\n        elements: Float32Array;\n        /**\n         * 创建一个 <code>Matrix3x3</code> 实例。\n         */\n        constructor();\n        /**\n         * 计算3x3矩阵的行列式\n         * @return    矩阵的行列式\n         */\n        determinant(): number;\n        /**\n         * 通过一个二维向量转换3x3矩阵\n         * @param\ttra 转换向量\n         * @param\tout 输出矩阵\n         */\n        translate(trans: Vector2, out: Matrix3x3): void;\n        /**\n         * 根据指定角度旋转3x3矩阵\n         * @param\trad 旋转角度\n         * @param\tout 输出矩阵\n         */\n        rotate(rad: number, out: Matrix3x3): void;\n        /**\n         *根据制定缩放3x3矩阵\n         * @param\tscale 缩放值\n         * @param\tout 输出矩阵\n         */\n        scale(scale: Vector2, out: Matrix3x3): void;\n        /**\n         * 计算3x3矩阵的逆矩阵\n         * @param\tout 输出的逆矩阵\n         */\n        invert(out: Matrix3x3): void;\n        /**\n         * 计算3x3矩阵的转置矩阵\n         * @param \tout 输出矩阵\n         */\n        transpose(out: Matrix3x3): void;\n        /** 设置已有的矩阵为单位矩阵*/\n        identity(): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n        /**\n         * 计算观察3x3矩阵\n         * @param\teye    观察者位置\n         * @param\ttarget 目标位置\n         * @param\tup     上向量\n         * @param\tout    输出3x3矩阵\n         */\n        static lookAt(eye: Vector3, target: Vector3, up: Vector3, out: Matrix3x3): void;\n    }\n}\ndeclare module laya.d3.math {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>Matrix4x4</code> 类用于创建4x4矩阵。\n     */\n    class Matrix4x4 implements IClone {\n        /**默认矩阵,禁止修改*/\n        static DEFAULT: Matrix4x4;\n        /**默认矩阵,禁止修改*/\n        static ZERO: Matrix4x4;\n        /**\n         * 绕X轴旋转\n         * @param\trad  旋转角度\n         * @param\tout 输出矩阵\n         */\n        static createRotationX(rad: number, out: Matrix4x4): void;\n        /**\n         *\n         * 绕Y轴旋转\n         * @param\trad  旋转角度\n         * @param\tout 输出矩阵\n         */\n        static createRotationY(rad: number, out: Matrix4x4): void;\n        /**\n         * 绕Z轴旋转\n         * @param\trad  旋转角度\n         * @param\tout 输出矩阵\n         */\n        static createRotationZ(rad: number, out: Matrix4x4): void;\n        /**\n         * 通过yaw pitch roll旋转创建旋转矩阵。\n         * @param\tyaw\n         * @param\tpitch\n         * @param\troll\n         * @param\tresult\n         */\n        static createRotationYawPitchRoll(yaw: number, pitch: number, roll: number, result: Matrix4x4): void;\n        /**\n         * 通过旋转轴axis和旋转角度angle计算旋转矩阵。\n         * @param\taxis 旋转轴,假定已经归一化。\n         * @param\tangle 旋转角度。\n         * @param\tresult 结果矩阵。\n         */\n        static createRotationAxis(axis: Vector3, angle: number, result: Matrix4x4): void;\n        /**\n         * 通过四元数创建旋转矩阵。\n         * @param\trotation 旋转四元数。\n         * @param\tresult 输出旋转矩阵\n         */\n        static createRotationQuaternion(rotation: Quaternion, result: Matrix4x4): void;\n        /**\n         * 根据平移计算输出矩阵\n         * @param\ttrans  平移向量\n         * @param\tout 输出矩阵\n         */\n        static createTranslate(trans: Vector3, out: Matrix4x4): void;\n        /**\n         * 根据缩放计算输出矩阵\n         * @param\tscale  缩放值\n         * @param\tout 输出矩阵\n         */\n        static createScaling(scale: Vector3, out: Matrix4x4): void;\n        /**\n         * 计算两个矩阵的乘法\n         * @param\tleft left矩阵\n         * @param\tright  right矩阵\n         * @param\tout  输出矩阵\n         */\n        static multiply(left: Matrix4x4, right: Matrix4x4, out: Matrix4x4): void;\n        /**\n         * 从四元数计算旋转矩阵\n         * @param\trotation 四元数\n         * @param\tout 输出矩阵\n         */\n        static createFromQuaternion(rotation: Quaternion, out: Matrix4x4): void;\n        /**\n         * 计算仿射矩阵\n         * @param\ttrans 平移\n         * @param\trot 旋转\n         * @param\tscale 缩放\n         * @param\tout 输出矩阵\n         */\n        static createAffineTransformation(trans: Vector3, rot: Quaternion, scale: Vector3, out: Matrix4x4): void;\n        /**\n         *  计算观察矩阵\n         * @param\teye 视点位置\n         * @param\tcenter 视点目标\n         * @param\tup 向上向量\n         * @param\tout 输出矩阵\n         */\n        static createLookAt(eye: Vector3, target: Vector3, up: Vector3, out: Matrix4x4): void;\n        /**\n         * 计算透视投影矩阵。\n         * @param\tfov  视角。\n         * @param\taspect 横纵比。\n         * @param\tnear 近裁面。\n         * @param\tfar 远裁面。\n         * @param\tout 输出矩阵。\n         */\n        static createPerspective(fov: number, aspect: number, near: number, far: number, out: Matrix4x4): void;\n        /**\n         * 计算正交投影矩阵。\n         * @param\tleft 视椎左边界。\n         * @param\tright 视椎右边界。\n         * @param\tbottom 视椎底边界。\n         * @param\ttop 视椎顶边界。\n         * @param\tnear 视椎近边界。\n         * @param\tfar 视椎远边界。\n         * @param\tout 输出矩阵。\n         */\n        static createOrthoOffCenterRH(left: number, right: number, bottom: number, top: number, near: number, far: number, out: Matrix4x4): void;\n        /**矩阵元素数组*/\n        elements: Float32Array;\n        /**\n         * 创建一个 <code>Matrix4x4</code> 实例。\n         * @param\t4x4矩阵的各元素\n         */\n        constructor(m11?: number, m12?: number, m13?: number, m14?: number, m21?: number, m22?: number, m23?: number, m24?: number, m31?: number, m32?: number, m33?: number, m34?: number, m41?: number, m42?: number, m43?: number, m44?: number);\n        getElementByRowColumn(row: number, column: number): number;\n        setElementByRowColumn(row: number, column: number, value: number): void;\n        /**\n         * 判断两个4x4矩阵的值是否相等。\n         * @param\tother 4x4矩阵\n         */\n        equalsOtherMatrix(other: Matrix4x4): boolean;\n        /**\n         * 分解矩阵为平移向量、旋转四元数、缩放向量。\n         * @param\ttranslation 平移向量。\n         * @param\trotation 旋转四元数。\n         * @param\tscale 缩放向量。\n         * @return 是否分解成功。\n         */\n        decomposeTransRotScale(translation: Vector3, rotation: Quaternion, scale: Vector3): boolean;\n        /**\n         * 分解矩阵为平移向量、旋转矩阵、缩放向量。\n         * @param\ttranslation 平移向量。\n         * @param\trotationMatrix 旋转矩阵。\n         * @param\tscale 缩放向量。\n         * @return 是否分解成功。\n         */\n        decomposeTransRotMatScale(translation: Vector3, rotationMatrix: Matrix4x4, scale: Vector3): boolean;\n        /**\n         * 分解旋转矩阵的旋转为YawPitchRoll欧拉角。\n         * @param\tout float yaw\n         * @param\tout float pitch\n         * @param\tout float roll\n         * @return\n         */\n        decomposeYawPitchRoll(yawPitchRoll: Vector3): void;\n        /**归一化矩阵 */\n        normalize(): void;\n        /**计算矩阵的转置矩阵*/\n        transpose(): Matrix4x4;\n        /**\n         * 计算一个矩阵的逆矩阵\n         * @param\tout 输出矩阵\n         */\n        invert(out: Matrix4x4): void;\n        /**设置矩阵为单位矩阵*/\n        identity(): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n        static translation(v3: Vector3, out: Matrix4x4): void;\n        /**\n         * 获取平移向量。\n         * @param\tout 平移向量。\n         */\n        getTranslationVector(out: Vector3): void;\n        /**\n         * 设置平移向量。\n         * @param\ttranslate 平移向量。\n         */\n        setTranslationVector(translate: Vector3): void;\n        /**\n         * 获取前向量。\n         * @param\tout 前向量。\n         */\n        getForward(out: Vector3): void;\n        /**\n         * 设置前向量。\n         * @param\tforward 前向量。\n         */\n        setForward(forward: Vector3): void;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>OrientedBoundBox</code> 类用于创建OBB包围盒。\n     */\n    class OrientedBoundBox {\n        /**每个轴长度的一半*/\n        extents: Vector3;\n        /**这个矩阵表示包围盒的位置和缩放,它的平移向量表示该包围盒的中心*/\n        transformation: Matrix4x4;\n        /**\n         * 创建一个 <code>OrientedBoundBox</code> 实例。\n         * @param\textents 每个轴长度的一半\n         * @param\ttransformation  包围盒的位置和缩放,\n         */\n        constructor(extents: Vector3, transformation: Matrix4x4);\n        /**\n         * 根据AABB包围盒创建一个 <code>OrientedBoundBox</code> 实例。\n         * @param\tbox AABB包围盒。\n         */\n        static createByBoundBox(box: BoundBox, out: OrientedBoundBox): void;\n        /**\n         * 根据包围盒的最大最小两顶点创建一个 <code>OrientedBoundBox</code> 实例。\n         * @param\tmin 包围盒的最小顶点。\n         * @param\tmax 包围盒的最大顶点。\n         */\n        static createByMinAndMaxVertex(min: Vector3, max: Vector3): OrientedBoundBox;\n        /**\n         * 获取OBB包围盒的8个顶点。\n         * @param\tcorners 返回顶点的输出队列。\n         */\n        getCorners(corners: Array<any>): void;\n        /**\n         * 变换该包围盒的矩阵信息。\n         * @param\tmat 矩阵\n         */\n        transform(mat: Matrix4x4): void;\n        /**\n         * 缩放该包围盒\n         * @param\tscaling 各轴的缩放比。\n         */\n        scale(scaling: Vector3): void;\n        /**\n         * 平移该包围盒。\n         * @param\ttranslation 平移参数\n         */\n        translate(translation: Vector3): void;\n        /**\n         * 该包围盒的尺寸。\n         * @param\tout 输出\n         */\n        Size(out: Vector3): void;\n        /**\n         * 该包围盒需要考虑的尺寸\n         * @param\tout 输出\n         */\n        getSize(out: Vector3): void;\n        /**\n         * 该包围盒需要考虑尺寸的平方\n         * @param\tout 输出\n         */\n        getSizeSquared(out: Vector3): void;\n        /**\n         * 该包围盒的几何中心\n         */\n        getCenter(center: Vector3): void;\n        /**\n         * 该包围盒是否包含空间中一点\n         * @param\tpoint 点\n         * @return  返回位置关系\n         */\n        containsPoint(point: Vector3): number;\n        /**\n         * 该包围盒是否包含空间中多点\n         * @param\tpoint 点\n         * @return  返回位置关系\n         */\n        containsPoints(points: Array<any>): number;\n        /**\n         * 该包围盒是否包含空间中一包围球\n         * @param\tsphere 包围球\n         * @param\tignoreScale 是否考虑该包围盒的缩放\n         * @return  返回位置关系\n         */\n        containsSphere(sphere: BoundSphere, ignoreScale?: boolean): number;\n        /**\n         *  For accuracy, The transformation matrix for both <see cref=\"OrientedBoundingBox\"/> must not have any scaling applied to it.\n         *  Anyway, scaling using Scale method will keep this method accurate.\n         * 该包围盒是否包含空间中另一OBB包围盒\n         * @param\tobb OBB包围盒\n         * @return  返回位置关系\n         */\n        containsOrientedBoundBox(obb: OrientedBoundBox): number;\n        /**\n         * 该包围盒是否包含空间中一条线\n         * @param\tpoint1 点1\n         * @param\tpoint2 点2\n         * @return  返回位置关系\n         */\n        containsLine(point1: Vector3, point2: Vector3): number;\n        /**\n         * 该包围盒是否包含空间中另一OBB包围盒\n         * @param\tbox 包围盒\n         * @return  返回位置关系\n         */\n        containsBoundBox(box: BoundBox): number;\n        /**\n         * 该包围盒是否与空间中另一射线相交\n         * @param\tray\n         * @param\tout\n         * @return\n         */\n        intersectsRay(ray: Ray, out: Vector3): number;\n        /**\n         * 计算Obb包围盒变换到另一Obb包围盒的矩阵\n         * @param\ta Obb包围盒\n         * @param\tb Obb包围盒\n         * @param\tnoMatrixScaleApplied 是否考虑缩放\n         * @param\tout 输出变换矩阵\n         */\n        static getObbtoObbMatrix4x4(a: OrientedBoundBox, b: OrientedBoundBox, noMatrixScaleApplied: boolean, out: Matrix4x4): void;\n        /**\n         * 把一个Obb类型的包围盒b合入另一Obb型包围盒a\n         * @param\ta obb包围盒\n         * @param\tb obb包围盒\n         * @param\tnoMatrixScaleApplied 是否考虑缩放\n         */\n        static merge(a: OrientedBoundBox, b: OrientedBoundBox, noMatrixScaleApplied: boolean): void;\n        /**\n         * 判断两个包围盒是否相等\n         * @param\tobb obb包围盒\n         * @return  Boolean\n         */\n        equals(obb: OrientedBoundBox): boolean;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>Plane</code> 类用于创建平面。\n     */\n    class Plane {\n        /**平面的向量*/\n        normal: Vector3;\n        /**平面到坐标系原点的距离*/\n        distance: number;\n        /**平面与其他几何体相交类型*/\n        static PlaneIntersectionType_Back: number;\n        static PlaneIntersectionType_Front: number;\n        static PlaneIntersectionType_Intersecting: number;\n        /**\n         * 创建一个 <code>Plane</code> 实例。\n         * @param\tnormal 平面的向量\n         * @param\td  平面到原点的距离\n         */\n        constructor(normal: Vector3, d?: number);\n        /**\n         * 创建一个 <code>Plane</code> 实例。\n         * @param\tpoint1 第一点\n         * @param\tpoint2 第二点\n         * @param\tpoint3 第三点\n         */\n        static createPlaneBy3P(point1: Vector3, point2: Vector3, point3: Vector3): Plane;\n        /**\n         * 更改平面法线向量的系数，使之成单位长度。\n         */\n        normalize(): void;\n    }\n}\ndeclare module laya.d3.math {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>Quaternion</code> 类用于创建四元数。\n     */\n    class Quaternion implements IClone {\n        static TEMPVector30: Vector3;\n        static TEMPVector31: Vector3;\n        static TEMPVector32: Vector3;\n        static TEMPVector33: Vector3;\n        static TEMPMatrix0: Matrix4x4;\n        static TEMPMatrix1: Matrix4x4;\n        static _tempMatrix3x3: Matrix3x3;\n        /**默认矩阵,禁止修改*/\n        static DEFAULT: Quaternion;\n        /**无效矩阵,禁止修改*/\n        static NAN: Quaternion;\n        /**\n         *  从欧拉角生成四元数（顺序为Yaw、Pitch、Roll）\n         * @param\tyaw yaw值\n         * @param\tpitch pitch值\n         * @param\troll roll值\n         * @param\tout 输出四元数\n         */\n        static createFromYawPitchRoll(yaw: number, pitch: number, roll: number, out: Quaternion): void;\n        /**\n         * 计算两个四元数相乘\n         * @param\tleft left四元数\n         * @param\tright  right四元数\n         * @param\tout 输出四元数\n         */\n        static multiply(left: Quaternion, right: Quaternion, out: Quaternion): void;\n        /**\n         * 从指定的轴和角度计算四元数\n         * @param\taxis  轴\n         * @param\trad  角度\n         * @param\tout  输出四元数\n         */\n        static createFromAxisAngle(axis: Vector3, rad: number, out: Quaternion): void;\n        /**\n         * 根据3x3矩阵计算四元数\n         * @param\tsou 源矩阵\n         * @param\tout 输出四元数\n         */\n        static createFromMatrix3x3(sou: Matrix3x3, out: Quaternion): void;\n        /**\n         *  从旋转矩阵计算四元数\n         * @param\tmat 旋转矩阵\n         * @param\tout  输出四元数\n         */\n        static createFromMatrix4x4(mat: Matrix4x4, out: Quaternion): void;\n        /**\n         * 球面插值\n         * @param\tleft left四元数\n         * @param\tright  right四元数\n         * @param\ta 插值比例\n         * @param\tout 输出四元数\n         * @return   输出Float32Array\n         */\n        static slerp(left: Quaternion, right: Quaternion, t: number, out: Quaternion): Float32Array;\n        /**\n         * 计算两个四元数的线性插值\n         * @param\tleft left四元数\n         * @param\tright right四元数b\n         * @param\tt 插值比例\n         * @param\tout 输出四元数\n         */\n        static lerp(left: Quaternion, right: Quaternion, t: number, out: Quaternion): void;\n        /**\n         * 计算两个四元数的和\n         * @param\tleft  left四元数\n         * @param\tright right 四元数\n         * @param\tout 输出四元数\n         */\n        static add(left: Quaternion, right: Quaternion, out: Quaternion): void;\n        /**\n         * 计算两个四元数的点积\n         * @param\tleft left四元数\n         * @param\tright right四元数\n         * @return  点积\n         */\n        static dot(left: Quaternion, right: Quaternion): number;\n        /**四元数元素数组*/\n        elements: Float32Array;\n        /**\n         * 获取四元数的x值\n         */\n        readonly x: number;\n        /**\n         * 获取四元数的y值\n         */\n        readonly y: number;\n        /**\n         * 获取四元数的z值\n         */\n        readonly z: number;\n        /**\n         * 获取四元数的w值\n         */\n        readonly w: number;\n        /**\n         * 创建一个 <code>Quaternion</code> 实例。\n         * @param\tx 四元数的x值\n         * @param\ty 四元数的y值\n         * @param\tz 四元数的z值\n         * @param\tw 四元数的w值\n         */\n        constructor(x?: number, y?: number, z?: number, w?: number);\n        /**\n         * 根据缩放值缩放四元数\n         * @param\tscale 缩放值\n         * @param\tout 输出四元数\n         */\n        scaling(scaling: number, out: Quaternion): void;\n        /**\n         * 归一化四元数\n         * @param\tout 输出四元数\n         */\n        normalize(out: Quaternion): void;\n        /**\n         * 计算四元数的长度\n         * @return  长度\n         */\n        length(): number;\n        /**\n         * 根据绕X轴的角度旋转四元数\n         * @param\trad 角度\n         * @param\tout 输出四元数\n         */\n        rotateX(rad: number, out: Quaternion): void;\n        /**\n         * 根据绕Y轴的制定角度旋转四元数\n         * @param\trad 角度\n         * @param\tout 输出四元数\n         */\n        rotateY(rad: number, out: Quaternion): void;\n        /**\n         * 根据绕Z轴的制定角度旋转四元数\n         * @param\trad 角度\n         * @param\tout 输出四元数\n         */\n        rotateZ(rad: number, out: Quaternion): void;\n        /**\n         * 分解四元数到欧拉角（顺序为Yaw、Pitch、Roll），参考自http://xboxforums.create.msdn.com/forums/p/4574/23988.aspx#23988,问题绕X轴翻转超过±90度时有，会产生瞬间反转\n         * @param\tquaternion 源四元数\n         * @param\tout 欧拉角值\n         */\n        getYawPitchRoll(out: Vector3): void;\n        /**\n         * 求四元数的逆\n         * @param\tout  输出四元数\n         */\n        invert(out: Quaternion): void;\n        /**\n         *设置四元数为单位算数\n         * @param out  输出四元数\n         */\n        identity(): void;\n        /**\n         * 从Array数组拷贝值。\n         * @param  array 数组。\n         * @param  offset 数组偏移。\n         */\n        fromArray(array: Array<any>, offset?: number): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n        equals(b: Quaternion): boolean;\n        /**\n         * 计算旋转观察四元数\n         * @param\tforward 方向\n         * @param\tup     上向量\n         * @param\tout    输出四元数\n         */\n        static rotationLookAt(forward: Vector3, up: Vector3, out: Quaternion): void;\n        /**\n         * 计算观察四元数\n         * @param\teye    观察者位置\n         * @param\ttarget 目标位置\n         * @param\tup     上向量\n         * @param\tout    输出四元数\n         */\n        static lookAt(eye: Vector3, target: Vector3, up: Vector3, out: Quaternion): void;\n        /**\n         * 计算长度的平方。\n         * @return 长度的平方。\n         */\n        lengthSquared(): number;\n        /**\n         * 计算四元数的逆四元数。\n         * @param\tvalue 四元数。\n         * @param\tout 逆四元数。\n         */\n        static invert(value: Quaternion, out: Quaternion): void;\n        /**\n         * 通过一个3x3矩阵创建一个四元数\n         * @param\tmatrix3x3  3x3矩阵\n         * @param\tout        四元数\n         */\n        static rotationMatrix(matrix3x3: Matrix3x3, out: Quaternion): void;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>Rand</code> 类用于通过32位无符号整型随机种子创建随机数。\n     */\n    class Rand {\n        /**\n         * 通过无符号32位整形，获取32位浮点随机数。\n         * @param 无符号32位整形随机数。\n         * @return 32位浮点随机数。\n         */\n        static getFloatFromInt(v: number): number;\n        /**\n         * 通过无符号32位整形，获取无符号8位字节随机数。\n         * @param 无符号32位整形随机数。\n         * @return 无符号8位字节随机数。\n         */\n        static getByteFromInt(v: number): number;\n        /**获取随机种子。*/\n        seeds: Uint32Array;\n        /**\n         * 获取随机种子。\n         * @return 随机种子。\n         */\n        /**\n         * 设置随机种子。\n         * @param\tseed 随机种子。\n         */\n        seed: number;\n        /**\n         * 创建一个 <code>Rand</code> 实例。\n         * @param\tseed  32位无符号整型随机种子。\n         */\n        constructor(seed: number);\n        /**\n         * 获取无符号32位整形随机数。\n         * @return 无符号32位整形随机数。\n         */\n        getUint(): number;\n        /**\n         * 获取0到1之间的浮点随机数。\n         * @return 0到1之间的浮点随机数。\n         */\n        getFloat(): number;\n        /**\n         * 获取-1到1之间的浮点随机数。\n         * @return -1到1之间的浮点随机数。\n         */\n        getSignedFloat(): number;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>Rand</code> 类用于通过128位整型种子创建随机数,算法来自:https://github.com/AndreasMadsen/xorshift。\n     */\n    class RandX {\n        /**基于时间种子的随机数。*/\n        static defaultRand: RandX;\n        /**\n         * 创建一个 <code>Rand</code> 实例。\n         * @param\tseed  随机种子。\n         */\n        constructor(seed: Array<any>);\n        /**\n         * 通过2x32位的数组，返回64位的随机数。\n         * @return 64位的随机数。\n         */\n        randomint(): Array<any>;\n        /**\n         * 返回[0,1)之间的随机数。\n         * @return\n         */\n        random(): number;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>Ray</code> 类用于创建射线。\n     */\n    class Ray {\n        /**原点*/\n        origin: Vector3;\n        /**方向*/\n        direction: Vector3;\n        /**\n         * 创建一个 <code>Ray</code> 实例。\n         * @param\torigin 射线的起点\n         * @param\tdirection  射线的方向\n         */\n        constructor(origin: Vector3, direction: Vector3);\n    }\n}\ndeclare module laya.d3.math {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>Vector2</code> 类用于创建二维向量。\n     */\n    class Vector2 implements IClone {\n        /**零向量,禁止修改*/\n        static ZERO: Vector2;\n        /**一向量,禁止修改*/\n        static ONE: Vector2;\n        /**二维向量元素数组*/\n        elements: any;\n        /**\n         * 获取X轴坐标。\n         * @return\tX轴坐标。\n         */\n        /**\n         * 设置X轴坐标。\n         * @param value X轴坐标。\n         */\n        x: number;\n        /**\n         * 获取Y轴坐标。\n         * @return Y轴坐标。\n         */\n        /**\n         * 设置Y轴坐标。\n         * @param value Y轴坐标。\n         */\n        y: number;\n        /**\n         * 创建一个 <code>Vector2</code> 实例。\n         * @param\tx  X轴坐标。\n         * @param\ty  Y轴坐标。\n         */\n        constructor(x?: number, y?: number);\n        /**\n         * 缩放二维向量。\n         * @param\ta 源二维向量。\n         * @param\tb 缩放值。\n         * @param\tout 输出二维向量。\n         */\n        static scale(a: Vector2, b: number, out: Vector2): void;\n        /**\n         * 从Array数组拷贝值。\n         * @param  array 数组。\n         * @param  offset 数组偏移。\n         */\n        fromArray(array: Array<any>, offset?: number): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n    }\n}\ndeclare module laya.d3.math {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>Vector3</code> 类用于创建三维向量。\n     */\n    class Vector3 implements IClone {\n        /**@private\t*/\n        static _tempVector4: Vector4;\n        /**零向量，禁止修改*/\n        static ZERO: Vector3;\n        /**一向量，禁止修改*/\n        static ONE: Vector3;\n        /**X轴单位向量，禁止修改*/\n        static NegativeUnitX: Vector3;\n        /**X轴单位向量，禁止修改*/\n        static UnitX: Vector3;\n        /**Y轴单位向量，禁止修改*/\n        static UnitY: Vector3;\n        /**Z轴单位向量，禁止修改*/\n        static UnitZ: Vector3;\n        /**右手坐标系统前向量，禁止修改*/\n        static ForwardRH: Vector3;\n        /**左手坐标系统前向量,禁止修改*/\n        static ForwardLH: Vector3;\n        /**上向量,禁止修改*/\n        static Up: Vector3;\n        /**无效矩阵,禁止修改*/\n        static NAN: Vector3;\n        /**\n         * 两个三维向量距离的平方。\n         * @param\tvalue1 向量1。\n         * @param\tvalue2 向量2。\n         * @return\t距离的平方。\n         */\n        static distanceSquared(value1: Vector3, value2: Vector3): number;\n        /**\n         * 两个三维向量距离。\n         * @param\tvalue1 向量1。\n         * @param\tvalue2 向量2。\n         * @return\t距离。\n         */\n        static distance(value1: Vector3, value2: Vector3): number;\n        /**\n         * 分别取两个三维向量x、y、z的最小值计算新的三维向量。\n         * @param\ta。\n         * @param\tb。\n         * @param\tout。\n         */\n        static min(a: Vector3, b: Vector3, out: Vector3): void;\n        /**\n         * 分别取两个三维向量x、y、z的最大值计算新的三维向量。\n         * @param\ta a三维向量。\n         * @param\tb b三维向量。\n         * @param\tout 结果三维向量。\n         */\n        static max(a: Vector3, b: Vector3, out: Vector3): void;\n        /**\n         * 根据四元数旋转三维向量。\n         * @param\tsource 源三维向量。\n         * @param\trotation 旋转四元数。\n         * @param\tout 输出三维向量。\n         */\n        static transformQuat(source: Vector3, rotation: Quaternion, out: Vector3): void;\n        /**\n         * 计算标量长度。\n         * @param\ta 源三维向量。\n         * @return 标量长度。\n         */\n        static scalarLength(a: Vector3): number;\n        /**\n         * 计算标量长度。\n         * @param\ta 源三维向量。\n         * @return 标量长度的平方。\n         */\n        static scalarLengthSquared(a: Vector3): number;\n        /**\n         * 归一化三维向量。\n         * @param\ts 源三维向量。\n         * @param\tout 输出三维向量。\n         */\n        static normalize(s: Vector3, out: Vector3): void;\n        /**\n         * 计算两个三维向量的乘积。\n         * @param\ta left三维向量。\n         * @param\tb right三维向量。\n         * @param\tout 输出三维向量。\n         */\n        static multiply(a: Vector3, b: Vector3, out: Vector3): void;\n        /**\n         * 缩放三维向量。\n         * @param\ta 源三维向量。\n         * @param\tb 缩放值。\n         * @param\tout 输出三维向量。\n         */\n        static scale(a: Vector3, b: number, out: Vector3): void;\n        /**\n         * 插值三维向量。\n         * @param\ta left向量。\n         * @param\tb right向量。\n         * @param\tt 插值比例。\n         * @param\tout 输出向量。\n         */\n        static lerp(a: Vector3, b: Vector3, t: number, out: Vector3): void;\n        /**\n         * 通过矩阵转换一个三维向量到另外一个三维向量。\n         * @param\tvector 源三维向量。\n         * @param\ttransform  变换矩阵。\n         * @param\tresult 输出三维向量。\n         */\n        static transformV3ToV3(vector: Vector3, transform: Matrix4x4, result: Vector3): void;\n        /**\n         * 通过矩阵转换一个三维向量到另外一个四维向量。\n         * @param\tvector 源三维向量。\n         * @param\ttransform  变换矩阵。\n         * @param\tresult 输出四维向量。\n         */\n        static transformV3ToV4(vector: Vector3, transform: Matrix4x4, result: Vector4): void;\n        /**\n         * 通过法线矩阵转换一个法线三维向量到另外一个三维向量。\n         * @param\tnormal 源法线三维向量。\n         * @param\ttransform  法线变换矩阵。\n         * @param\tresult 输出法线三维向量。\n         */\n        static TransformNormal(normal: Vector3, transform: Matrix4x4, result: Vector3): void;\n        /**\n         * 通过矩阵转换一个三维向量到另外一个归一化的三维向量。\n         * @param\tvector 源三维向量。\n         * @param\ttransform  变换矩阵。\n         * @param\tresult 输出三维向量。\n         */\n        static transformCoordinate(coordinate: Vector3, transform: Matrix4x4, result: Vector3): void;\n        /**\n         * 求一个指定范围的向量\n         * @param\tvalue clamp向量\n         * @param\tmin  最小\n         * @param\tmax  最大\n         * @param   out 输出向量\n         */\n        static Clamp(value: Vector3, min: Vector3, max: Vector3, out: Vector3): void;\n        /**\n         * 求两个三维向量的和。\n         * @param\ta left三维向量。\n         * @param\tb right三维向量。\n         * @param\tout 输出向量。\n         */\n        static add(a: Vector3, b: Vector3, out: Vector3): void;\n        /**\n         * 求两个三维向量的差。\n         * @param\ta  left三维向量。\n         * @param\tb  right三维向量。\n         * @param\to out 输出向量。\n         */\n        static subtract(a: Vector3, b: Vector3, o: Vector3): void;\n        /**\n         * 求两个三维向量的叉乘。\n         * @param\ta left向量。\n         * @param\tb right向量。\n         * @param\to 输出向量。\n         */\n        static cross(a: Vector3, b: Vector3, o: Vector3): void;\n        /**\n         * 求两个三维向量的点积。\n         * @param\ta left向量。\n         * @param\tb right向量。\n         * @return   点积。\n         */\n        static dot(a: Vector3, b: Vector3): number;\n        /**\n         * 判断两个三维向量是否相等。\n         * @param\ta 三维向量。\n         * @param\tb 三维向量。\n         * @return  是否相等。\n         */\n        static equals(a: Vector3, b: Vector3): boolean;\n        /**三维向量元素数组*/\n        elements: Float32Array;\n        /**\n         * 获取X轴坐标。\n         * @return\tX轴坐标。\n         */\n        /**\n         * 设置X轴坐标。\n         * @param\tvalue  X轴坐标。\n         */\n        x: number;\n        /**\n         * 获取Y轴坐标。\n         * @return\tY轴坐标。\n         */\n        /**\n         * 设置Y轴坐标。\n         * @param\tvalue  Y轴坐标。\n         */\n        y: number;\n        /**\n         * 获取Z轴坐标。\n         * @return\tZ轴坐标。\n         */\n        /**\n         * 设置Z轴坐标。\n         * @param\tvalue  Z轴坐标。\n         */\n        z: number;\n        /**\n         * 创建一个 <code>Vector3</code> 实例。\n         * @param\tx  X轴坐标。\n         * @param\ty  Y轴坐标。\n         * @param\tz  Z轴坐标。\n         */\n        constructor(x?: number, y?: number, z?: number);\n        /**\n         * 从Array数组拷贝值。\n         * @param  array 数组。\n         * @param  offset 数组偏移。\n         */\n        fromArray(array: Array<any>, offset?: number): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n        toDefault(): void;\n    }\n}\ndeclare module laya.d3.math {\n    import IClone = laya.d3.core.IClone;\n    /**\n     * <code>Vector4</code> 类用于创建四维向量。\n     */\n    class Vector4 implements IClone {\n        /**零向量，禁止修改*/\n        static ZERO: Vector4;\n        static ONE: Vector4;\n        static UnitX: Vector4;\n        static UnitY: Vector4;\n        static UnitZ: Vector4;\n        static UnitW: Vector4;\n        /**四维向量元素数组*/\n        elements: any;\n        /**\n         * 获取X轴坐标。\n         * @return  X轴坐标。\n         */\n        /**\n         * 设置X轴坐标。\n         * @param value X轴坐标。\n         */\n        x: number;\n        /**\n         * 获取Y轴坐标。\n         * @return\tY轴坐标。\n         */\n        /**\n         * 设置Y轴坐标。\n         * @param\tvalue  Y轴坐标。\n         */\n        y: number;\n        /**\n         * 获取Z轴坐标。\n         * @return\t Z轴坐标。\n         */\n        /**\n         * 设置Z轴坐标。\n         * @param\tvalue  Z轴坐标。\n         */\n        z: number;\n        /**\n         * 获取W轴坐标。\n         * @return\tW轴坐标。\n         */\n        /**\n         * 设置W轴坐标。\n         * @param value\tW轴坐标。\n         */\n        w: number;\n        /**\n         * 创建一个 <code>Vector4</code> 实例。\n         * @param\tx  X轴坐标。\n         * @param\ty  Y轴坐标。\n         * @param\tz  Z轴坐标。\n         * @param\tw  W轴坐标。\n         */\n        constructor(x?: number, y?: number, z?: number, w?: number);\n        /**\n         * 从Array数组拷贝值。\n         * @param  array 数组。\n         * @param  offset 数组偏移。\n         */\n        fromArray(array: Array<any>, offset?: number): void;\n        /**\n         * 克隆。\n         * @param\tdestObject 克隆源。\n         */\n        cloneTo(destObject: any): void;\n        /**\n         * 克隆。\n         * @return\t 克隆副本。\n         */\n        clone(): any;\n        /**\n         * 插值四维向量。\n         * @param\ta left向量。\n         * @param\tb right向量。\n         * @param\tt 插值比例。\n         * @param\tout 输出向量。\n         */\n        static lerp(a: Vector4, b: Vector4, t: number, out: Vector4): void;\n        /**\n         * 通过4x4矩阵把一个四维向量转换为另一个四维向量\n         * @param\tvector4 带转换四维向量。\n         * @param\tM4x4    4x4矩阵。\n         * @param\tout     转换后四维向量。\n         */\n        static transformByM4x4(vector4: Vector4, m4x4: Matrix4x4, out: Vector4): void;\n        /**\n         * 判断两个四维向量是否相等。\n         * @param\ta 四维向量。\n         * @param\tb 四维向量。\n         * @return  是否相等。\n         */\n        static equals(a: Vector4, b: Vector4): boolean;\n        /**\n         * 求四维向量的长度。\n         * @return  长度。\n         */\n        length(): number;\n        /**\n         * 求四维向量长度的平方。\n         * @return  长度的平方。\n         */\n        lengthSquared(): number;\n        /**\n         * 归一化四维向量。\n         * @param\ts   源四维向量。\n         * @param\tout 输出四维向量。\n         */\n        static normalize(s: Vector4, out: Vector4): void;\n        /**\n         * 求两个四维向量的和。\n         * @param\ta   四维向量。\n         * @param\tb   四维向量。\n         * @param\tout 输出向量。\n         */\n        static add(a: Vector4, b: Vector4, out: Vector4): void;\n        /**\n         * 求两个四维向量的差。\n         * @param\ta   四维向量。\n         * @param\tb   四维向量。\n         * @param\tout 输出向量。\n         */\n        static subtract(a: Vector4, b: Vector4, out: Vector4): void;\n        /**\n         * 计算两个四维向量的乘积。\n         * @param\ta   四维向量。\n         * @param\tb   四维向量。\n         * @param\tout 输出向量。\n         */\n        static multiply(a: Vector4, b: Vector4, out: Vector4): void;\n        /**\n         * 缩放四维向量。\n         * @param\ta   源四维向量。\n         * @param\tb   缩放值。\n         * @param\tout 输出四维向量。\n         */\n        static scale(a: Vector4, b: number, out: Vector4): void;\n        /**\n         * 求一个指定范围的四维向量\n         * @param\tvalue clamp向量\n         * @param\tmin   最小\n         * @param\tmax   最大\n         * @param   out   输出向量\n         */\n        static Clamp(value: Vector4, min: Vector4, max: Vector4, out: Vector4): void;\n        /**\n         * 两个四维向量距离的平方。\n         * @param\tvalue1 向量1。\n         * @param\tvalue2 向量2。\n         * @return\t距离的平方。\n         */\n        static distanceSquared(value1: Vector4, value2: Vector4): number;\n        /**\n         * 两个四维向量距离。\n         * @param\tvalue1 向量1。\n         * @param\tvalue2 向量2。\n         * @return\t距离。\n         */\n        static distance(value1: Vector4, value2: Vector4): number;\n        /**\n         * 求两个四维向量的点积。\n         * @param\ta 向量。\n         * @param\tb 向量。\n         * @return  点积。\n         */\n        static dot(a: Vector4, b: Vector4): number;\n        /**\n         * 分别取两个四维向量x、y、z的最小值计算新的四维向量。\n         * @param\ta   四维向量。\n         * @param\tb   四维向量。\n         * @param\tout 结果三维向量。\n         */\n        static min(a: Vector4, b: Vector4, out: Vector4): void;\n        /**\n         * 分别取两个四维向量x、y、z的最大值计算新的四维向量。\n         * @param\ta   四维向量。\n         * @param\tb   四维向量。\n         * @param\tout 结果三维向量。\n         */\n        static max(a: Vector4, b: Vector4, out: Vector4): void;\n    }\n}\ndeclare module laya.d3.math {\n    /**\n     * <code>Viewport</code> 类用于创建视口。\n     */\n    class Viewport {\n        /**X轴坐标*/\n        x: number;\n        /**Y轴坐标*/\n        y: number;\n        /**宽度*/\n        width: number;\n        /**高度*/\n        height: number;\n        /**最小深度*/\n        minDepth: number;\n        /**最大深度*/\n        maxDepth: number;\n        /**\n         * 创建一个 <code>Viewport</code> 实例。\n         * @param\tx x坐标。\n         * @param\ty y坐标。\n         * @param\twidth 宽度。\n         * @param\theight 高度。\n         */\n        constructor(x: number, y: number, width: number, height: number);\n        /**\n         * 变换一个三维向量。\n         * @param\tsource 源三维向量。\n         * @param\tmatrix 变换矩阵。\n         * @param\tvector 输出三维向量。\n         */\n        project(source: Vector3, matrix: Matrix4x4, out: Vector3): void;\n        /**\n         * 反变换一个三维向量。\n         * @param\tsource 源三维向量。\n         * @param\tmatrix 变换矩阵。\n         * @param\tvector 输出三维向量。\n         */\n        unprojectFromMat(source: Vector3, matrix: Matrix4x4, out: Vector3): void;\n        /**\n         * 反变换一个三维向量。\n         * @param\tsource 源三维向量。\n         * @param\tprojection  透视投影矩阵。\n         * @param\tview 视图矩阵。\n         * @param\tworld 世界矩阵,可设置为null。\n         * @param   out 输出向量。\n         */\n        unprojectFromWVP(source: Vector3, projection: Matrix4x4, view: Matrix4x4, world: Matrix4x4, out: Vector3): void;\n    }\n}\ndeclare module laya.d3.resource {\n    import Size = laya.d3.utils.Size;\n    import Resource = laya.resource.Resource;\n    /**\n     * <code>BaseTexture</code> 纹理的父类，抽象类，不允许实例。\n     */\n    class BaseTexture extends Resource {\n        protected _type: number;\n        protected _width: number;\n        protected _height: number;\n        protected _size: Size;\n        protected _repeat: boolean;\n        protected _mipmap: boolean;\n        protected _minFifter: number;\n        protected _magFifter: number;\n        protected _format: number;\n        protected _source: any;\n        _conchTexture: any;\n        /**\n         * 获取宽度。\n         */\n        readonly width: number;\n        /**\n         * 获取高度。\n         */\n        readonly height: number;\n        /**\n         * 获取尺寸。\n         */\n        readonly size: Size;\n        /**\n         * 是否使用重复模式纹理寻址\n         */\n        /**\n         * 是否使用重复模式纹理寻址\n         */\n        repeat: boolean;\n        /**\n         * 是否使用mipLevel\n         */\n        /**\n         * 是否使用mipLevel\n         */\n        mipmap: boolean;\n        /**\n         * 缩小过滤器\n         */\n        /**\n         * 缩小过滤器\n         */\n        minFifter: number;\n        /**\n         * 放大过滤器\n         */\n        /**\n         * 放大过滤器\n         */\n        magFifter: number;\n        /**\n         * 纹理格式\n         */\n        readonly format: number;\n        /**\n         * 获取纹理资源。\n         */\n        readonly source: any;\n        /**\n         * 获取纹理资源。\n         */\n        readonly defaulteTexture: BaseTexture;\n        /**\n         * 创建一个 <code>BaseTexture</code> 实例。\n         */\n        constructor();\n    }\n}\ndeclare module laya.d3.resource {\n    class DataTexture2D extends BaseTexture {\n        simLodInfo: Float32Array;\n        static simLodRect: Uint32Array;\n        static create(data: ArrayBuffer, w: number, h: number, magfilter?: number, minfilter?: number, mipmap?: boolean): DataTexture2D;\n        /**\n         * 加载Texture2D。\n         * @param url Texture2D地址。\n         */\n        static load(url: string, w?: number, h?: number, magfilter?: number, minfilter?: number): DataTexture2D;\n        /**\n         * 获取文件路径全名。\n         */\n        readonly src: string;\n        /**\n         * 创建一个 <code>Texture2D</code> 实例。\n         */\n        constructor();\n        protected recreateResource(): void;\n        /**\n         *@private\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * 返回图片像素。\n         * @return 图片像素。\n         */\n        getPixels(): Uint8Array;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Resource = laya.resource.Resource;\n    /**\n     * <code>BaseMesh</code> 类用于创建网格,抽象类,不允许实例。\n     */\n    class BaseMesh extends Resource {\n        protected _subMeshCount: number;\n        protected _boundingBox: BoundBox;\n        protected _boundingSphere: BoundSphere;\n        protected _boundingBoxCorners: Array<any>;\n        _positions: Array<any>;\n        /**\n         * 获取SubMesh的个数。\n         * @return SubMesh的个数。\n         */\n        readonly subMeshCount: number;\n        /**\n         * 获取AABB包围盒,禁止修改其数据。\n         * @return AABB包围盒。\n         */\n        readonly boundingBox: BoundBox;\n        /**\n         * 获取包围球,禁止修改其数据。\n         * @return 包围球。\n         */\n        readonly boundingSphere: BoundSphere;\n        /**\n         * 获取包围球顶点,禁止修改其数据。\n         * @return 包围球。\n         */\n        readonly boundingBoxCorners: Array<any>;\n        /**\n         * 创建一个 <code>BaseMesh</code> 实例。\n         */\n        constructor();\n        /**\n         * 获取网格顶点,请重载此方法。\n         * @return 网格顶点。\n         */\n        _getPositions(): Array<any>;\n        protected _generateBoundingObject(): void;\n        /**\n         * 获取渲染单元数量,请重载此方法。\n         * @return 渲染单元数量。\n         */\n        getRenderElementsCount(): number;\n        /**\n         * 获取渲染单元,请重载此方法。\n         * @param\tindex 索引。\n         * @return 渲染单元。\n         */\n        getRenderElement(index: number): IRenderable;\n    }\n}\ndeclare module laya.d3.resource.models {\n    /**\n     * <code>Sphere</code> 类用于创建方体。\n     */\n    class BoxMesh extends PrimitiveMesh {\n        /**\n         * 返回长度\n         * @return 长\n         */\n        /**\n         * 设置长度（改变此属性会重新生成顶点和索引）\n         * @param  value 长度\n         */\n        long: number;\n        /**\n         * 返回宽度\n         * @return 宽\n         */\n        /**\n         * 设置宽度（改变此属性会重新生成顶点和索引）\n         * @param  value 宽度\n         */\n        width: number;\n        /**\n         * 返回高度\n         * @return 高\n         */\n        /**\n         * 设置高度（改变此属性会重新生成顶点和索引）\n         * @param  value 高度\n         */\n        height: number;\n        /**\n         * 创建一个方体模型\n         * @param radius 半径\n         * @param stacks 水平层数\n         * @param slices 垂直层数\n         */\n        constructor(long?: number, width?: number, height?: number);\n        protected recreateResource(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    /**\n     * <code>CapsuleMesh</code> 类用于创建胶囊体。\n     */\n    class CapsuleMesh extends PrimitiveMesh {\n        /**\n         * 返回半径\n         * @return 半径\n         */\n        /**\n         * 设置半径（改变此属性会重新生成顶点和索引）\n         * @param  value 半径\n         */\n        radius: number;\n        /**\n         * 返回高度\n         * @return 高度\n         */\n        /**\n         * 设置高度（改变此属性会重新生成顶点和索引）\n         * @param  value 高度\n         */\n        height: number;\n        /**\n         * 获取高度分段\n         * @return 高度分段\n         */\n        /**\n         * 设置高度分段（改变此属性会重新生成顶点和索引）\n         * @param  value高度分段\n         */\n        stacks: number;\n        /**\n         * 获取宽度分段\n         * @return 宽度分段\n         */\n        /**\n         * 设置宽度分段（改变此属性会重新生成顶点和索引）\n         * @param  value 宽度分段\n         */\n        slices: number;\n        /**\n         * 创建一个胶囊体模型\n         * @param radius 半径\n         * @param height 高度\n         * @param stacks 水平层数,一般设为垂直层数的一半\n         * @param slices 垂直层数\n         */\n        constructor(radius?: number, height?: number, stacks?: number, slices?: number);\n        protected recreateResource(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    /**\n     * <code>CylinderMesh</code> 类用于创建圆柱体。\n     */\n    class CylinderMesh extends PrimitiveMesh {\n        /**\n         * 返回半径\n         * @return 半径\n         */\n        /**\n         * 设置半径（改变此属性会重新生成顶点和索引）\n         * @param  value 半径\n         */\n        radius: number;\n        /**\n         * 返回高度\n         * @return 高度\n         */\n        /**\n         * 设置高度（改变此属性会重新生成顶点和索引）\n         * @param  value 高度\n         */\n        height: number;\n        /**\n         * 获取宽度分段\n         * @return 宽度分段\n         */\n        /**\n         * 设置宽度分段（改变此属性会重新生成顶点和索引）\n         * @param  value 宽度分段\n         */\n        slices: number;\n        /**\n         * 创建一个圆柱体模型\n         * @param radius 半径\n         * @param height 高度\n         * @param slices 垂直层数\n         */\n        constructor(radius?: number, height?: number, slices?: number);\n        protected recreateResource(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    /**\n     * <code>Mesh</code> 类用于创建文件网格数据模板。\n     */\n    class Mesh extends BaseMesh {\n        /**\n         * 加载网格模板。\n         * @param url 模板地址。\n         */\n        static load(url: string): Mesh;\n        _vertexBuffers: Array<any>;\n        _indexBuffer: IndexBuffer3D;\n        _boneNames: Array<any>;\n        _inverseBindPoses: Array<any>;\n        _skinnedDatas: Float32Array;\n        /**\n         * 获取材质队列的浅拷贝。\n         * @return  材质队列的浅拷贝。\n         */\n        readonly materials: Array<any>;\n        /**\n         * 获取网格的全局默认绑定动作逆矩阵。\n         * @return  网格的全局默认绑定动作逆矩阵。\n         */\n        readonly InverseAbsoluteBindPoses: Array<any>;\n        /**\n         * 创建一个 <code>Mesh</code> 实例,禁止使用。\n         * @param url 文件地址。\n         */\n        constructor();\n        /**\n         * 获取网格顶点，并产生数据\n         * @return 网格顶点。\n         */\n        _getPositions(): Array<any>;\n        /**\n         * 添加子网格（开发者禁止修改）。\n         * @param subMesh 子网格。\n         */\n        _setSubMeshes(subMeshes: Array<any>): void;\n        /**\n         *@private\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * 获得子网格。\n         * @param index 子网格索引。\n         * @return  子网格。\n         */\n        getSubMesh(index: number): SubMesh;\n        /**\n         * 获得子网格数量。\n         * @return  子网格数量。\n         */\n        getSubMeshCount(): number;\n        /**\n         * @inheritDoc\n         */\n        getRenderElementsCount(): number;\n        /**\n         * @inheritDoc\n         */\n        getRenderElement(index: number): IRenderable;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    /**\n     * <code>QuadMesh</code> 类用于创建平面。\n     */\n    class PlaneMesh extends PrimitiveMesh {\n        /**\n         * 返回长度\n         * @return 长\n         */\n        /**\n         * 设置长度（改变此属性会重新生成顶点和索引）\n         * @param  value 长度\n         */\n        long: number;\n        /**\n         * 返回宽度\n         * @return 宽\n         */\n        /**\n         * 设置宽度（改变此属性会重新生成顶点和索引）\n         * @param  value 宽度\n         */\n        width: number;\n        /**\n         * 获取长度分段\n         * @return 长度分段\n         */\n        /**\n         * 设置长度分段（改变此属性会重新生成顶点和索引）\n         * @param  value长度分段\n         */\n        stacks: number;\n        /**\n         * 获取宽度分段\n         * @return 宽度分段\n         */\n        /**\n         * 设置宽度分段（改变此属性会重新生成顶点和索引）\n         * @param  value 宽度分段\n         */\n        slices: number;\n        /**\n         * 创建一个平面模型\n         * @param long  长\n         * @param width 宽\n         */\n        constructor(long?: number, width?: number, stacks?: number, slices?: number);\n        protected recreateResource(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    /**\n     * @private\n     * <code>PrimitiveMesh</code> 类用于创建基本网格的父类。\n     */\n    class PrimitiveMesh extends BaseMesh implements IRenderable {\n        protected _numberVertices: number;\n        protected _numberIndices: number;\n        protected _vertexBuffer: VertexBuffer3D;\n        protected _indexBuffer: IndexBuffer3D;\n        readonly _vertexBufferCount: number;\n        readonly triangleCount: number;\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n        _getVertexBuffers(): Array<any>;\n        _getIndexBuffer(): IndexBuffer3D;\n        constructor();\n        /**\n         * 获取网格顶点\n         * @return 网格顶点。\n         */\n        _getPositions(): Array<any>;\n        getRenderElement(index: number): IRenderable;\n        getRenderElementsCount(): number;\n        protected disposeResource(): void;\n        _beforeRender(state: RenderState): boolean;\n        _render(state: RenderState): void;\n        /**NATIVE*/\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    /**\n     * <code>QuadMesh</code> 类用于创建四边形。\n     */\n    class QuadMesh extends PrimitiveMesh {\n        /**\n         * 返回长度\n         * @return 长\n         */\n        /**\n         * 设置长度（改变此属性会重新生成顶点和索引）\n         * @param  value 长度\n         */\n        long: number;\n        /**\n         * 返回宽度\n         * @return 宽\n         */\n        /**\n         * 设置宽度（改变此属性会重新生成顶点和索引）\n         * @param  value 宽度\n         */\n        width: number;\n        /**\n         * 创建一个四边形模型\n         * @param long  长\n         * @param width 宽\n         */\n        constructor(long?: number, width?: number);\n        protected recreateResource(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    import BaseCamera = laya.d3.core.BaseCamera;\n    import RenderState = laya.d3.core.render.RenderState;\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    import BaseTexture = laya.d3.resource.BaseTexture;\n    import Shader3D = laya.d3.shader.Shader3D;\n    import ShaderCompile3D = laya.d3.shader.ShaderCompile3D;\n    import ValusArray = laya.d3.shader.ValusArray;\n    /**\n     * <code>Sky</code> 类用于创建天空的父类，抽象类不允许实例。\n     */\n    class Sky {\n        static MVPMATRIX: number;\n        static INTENSITY: number;\n        static ALPHABLENDING: number;\n        static DIFFUSETEXTURE: number;\n        protected __ownerCamera: BaseCamera;\n        protected _alphaBlending: number;\n        protected _colorIntensity: number;\n        protected _vertexBuffer: VertexBuffer3D;\n        protected _indexBuffer: IndexBuffer3D;\n        protected _sharderNameID: number;\n        protected _shader: Shader3D;\n        protected _shaderValue: ValusArray;\n        protected _shaderCompile: ShaderCompile3D;\n        protected _environmentDiffuse: BaseTexture;\n        protected _environmentSpecular: BaseTexture;\n        _conchSky: any;\n        /**\n         * @private\n         */\n        _ownerCamera: BaseCamera;\n        /**\n         * 获取透明混合度。\n         * @return 透明混合度。\n         */\n        /**\n         * 设置透明混合度。\n         * @param value 透明混合度。\n         */\n        alphaBlending: number;\n        /**\n         * 获取颜色强度。\n         * @return 颜色强度。\n         */\n        /**\n         * 设置颜色强度。\n         * @param value 颜色强度。\n         */\n        colorIntensity: number;\n        /**\n         * 获取环境漫反射贴图。\n         * @return 环境漫反射贴图。\n         */\n        /**\n         * 设置环境漫反射贴图。\n         * @param value 环境漫反射贴图。\n         */\n        environmentDiffuse: BaseTexture;\n        /**\n         * 获取环境高光贴图。\n         * @return 环境高光贴图。\n         */\n        /**\n         * 设置环境高光贴图。\n         * @param value 环境高光贴图。\n         */\n        environmentSpecular: BaseTexture;\n        envDiffuseSHRed: Float32Array;\n        envDiffuseSHGreen: Float32Array;\n        envDiffuseSHBlue: Float32Array;\n        /**\n         *\n         * 创建一个 <code>Sky</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _render(state: RenderState): void;\n        /**\n         * 销毁天空。\n         */\n        destroy(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    import RenderState = laya.d3.core.render.RenderState;\n    import TextureCube = laya.d3.resource.TextureCube;\n    import Shader3D = laya.d3.shader.Shader3D;\n    /**\n     * <code>Sky</code> 类用于创建天空盒。\n     */\n    class SkyBox extends Sky {\n        /**\n         * 获取天空立方体纹理。\n         * @return 天空立方体纹理。\n         */\n        /**\n         * 设置天空立方体纹理。\n         * @param value 天空立方体纹理。\n         */\n        textureCube: TextureCube;\n        /**\n         * 创建一个 <code>SkyBox</code> 实例。\n         */\n        constructor();\n        protected _getShader(state: RenderState): Shader3D;\n        protected createResource(): void;\n        protected loadShaderParams(): void;\n        _render(state: RenderState): void;\n        /**\n         * @inheritDoc\n         */\n        destroy(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    import RenderState = laya.d3.core.render.RenderState;\n    import Texture2D = laya.d3.resource.Texture2D;\n    import Shader3D = laya.d3.shader.Shader3D;\n    /**\n     * <code>Sky</code> 类用于创建天空盒。\n     */\n    class SkyDome extends Sky {\n        /**\n         * 获取天空立方体纹理。\n         * @return 天空立方体纹理。\n         */\n        /**\n         * 设置天空纹理。\n         * @param value 天空纹理。\n         */\n        texture: Texture2D;\n        /**\n         * 创建一个 <code>SkyBox</code> 实例。\n         */\n        constructor();\n        protected _getShader(state: RenderState): Shader3D;\n        protected recreateResource(): void;\n        protected loadShaderParams(): void;\n        _render(state: RenderState): void;\n        onEnvDescLoaded(envInfoFile: string): void;\n        loadEnvInfo(envInfo: string): void;\n        /**\n         * @inheritDoc\n         */\n        destroy(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    /**\n     * <code>Sphere</code> 类用于创建球体。\n     */\n    class SphereMesh extends PrimitiveMesh {\n        /**\n         * 返回半径\n         * @return 半径\n         */\n        /**\n         * 设置半径（改变此属性会重新生成顶点和索引）\n         * @param  value 半径\n         */\n        radius: number;\n        /**\n         * 获取宽度分段\n         * @return 宽度分段\n         */\n        /**\n         * 设置宽度分段（改变此属性会重新生成顶点和索引）\n         * @param  value 宽度分段\n         */\n        slices: number;\n        /**\n         * 获取高度分段\n         * @return 高度分段\n         */\n        /**\n         * 设置高度分段（改变此属性会重新生成顶点和索引）\n         * @param  value高度分段\n         */\n        stacks: number;\n        /**\n         * 创建一个球体模型\n         * @param radius 半径\n         * @param stacks 水平层数\n         * @param slices 垂直层数\n         */\n        constructor(radius?: number, stacks?: number, slices?: number);\n        protected recreateResource(): void;\n    }\n}\ndeclare module laya.d3.resource.models {\n    import MeshSprite3D = laya.d3.core.MeshSprite3D;\n    import Transform3D = laya.d3.core.Transform3D;\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    import IDispose = laya.resource.IDispose;\n    /**\n     * <code>SubMesh</code> 类用于创建子网格数据模板。\n     */\n    class SubMesh implements IRenderable, IDispose {\n        _boneIndicesList: Array<any>;\n        _subIndexBufferStart: Array<any>;\n        _subIndexBufferCount: Array<any>;\n        _skinAnimationDatas: Array<any>;\n        _bufferUsage: any;\n        _indexInMesh: number;\n        _vertexBuffer: VertexBuffer3D;\n        _vertexStart: number;\n        _vertexCount: number;\n        _indexBuffer: IndexBuffer3D;\n        _indexStart: number;\n        _indexCount: number;\n        _indices: Uint16Array;\n        /**\n         * @private\n         */\n        readonly _vertexBufferCount: number;\n        /**\n         * @private\n         */\n        readonly triangleCount: number;\n        /**\n         * 创建一个 <code>SubMesh</code> 实例。\n         * @param\tmesh  网格数据模板。\n         */\n        constructor(mesh: Mesh);\n        /**\n         * @private\n         */\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n        /**\n         * @private\n         */\n        _getIndexBuffer(): IndexBuffer3D;\n        /**\n         * @private\n         */\n        _getStaticBatchBakedVertexs(batchOwnerTransform: Transform3D, owner: MeshSprite3D): Float32Array;\n        /**\n         * @private\n         */\n        _getVertexBuffers(): Array<any>;\n        /**\n         * @private\n         */\n        _beforeRender(state: RenderState): boolean;\n        /**\n         * @private\n         * 渲染。\n         * @param\tstate 渲染状态。\n         */\n        _render(state: RenderState): void;\n        /**\n         * @private\n         */\n        getIndices(): Uint16Array;\n        /**\n         * <p>彻底清理资源。</p>\n         * <p><b>注意：</b>会强制解锁清理。</p>\n         */\n        dispose(): void;\n        /**NATIVE*/\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n    }\n}\ndeclare module laya.d3.resource {\n    /**\n     * <code>RenderTarget</code> 类用于创建渲染目标。\n     */\n    class RenderTexture extends BaseTexture {\n        /**\n         * 获取表面格式。\n         *@return 表面格式。\n         */\n        readonly surfaceFormat: number;\n        /**\n         * 获取表面类型。\n         *@return 表面类型。\n         */\n        readonly surfaceType: number;\n        /**\n         * 获取深度格式。\n         *@return 深度格式。\n         */\n        readonly depthStencilFormat: number;\n        readonly frameBuffer: any;\n        readonly depthStencilBuffer: any;\n        /**\n         * 获取RenderTarget数据源,如果alreadyResolved等于false，则返回null。\n         * @return RenderTarget数据源。\n         */\n        readonly source: any;\n        /**\n         * 创建一个 <code>RenderTarget</code> 实例。\n         * @param\twidth  宽度。\n         * @param\theight  高度。\n         * @param\tmipMap  是否生成mipMap。\n         * @param\tsurfaceFormat  表面格式。\n         *   @param\tsurfaceType  表面类型。\n         *   @param\tdepthFormat  深度格式。\n         */\n        constructor(width: number, height: number, surfaceFormat?: number, surfaceType?: number, depthStencilFormat?: number, mipMap?: boolean, repeat?: boolean, minFifter?: number, magFifter?: number);\n        protected recreateResource(): void;\n        /**\n         * 开始绑定。\n         */\n        start(): void;\n        /**\n         * 结束绑定。\n         */\n        end(): void;\n        /**\n         * 获得像素数据。\n         * @param x X像素坐标。\n         * @param y Y像素坐标。\n         * @param width 宽度。\n         * @param height 高度。\n         * @return 像素数据。\n         */\n        getData(x: number, y: number, width: number, height: number): Uint8Array;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.resource {\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>SolidColorTexture2D</code> 二维纯色纹理。\n     */\n    class SolidColorTexture2D extends BaseTexture {\n        /**洋红色纯色纹理。*/\n        static magentaTexture: SolidColorTexture2D;\n        /**灰色纯色纹理。*/\n        static grayTexture: SolidColorTexture2D;\n        /**\n         * 创建一个 <code>SolidColorTexture2D</code> 实例。\n         */\n        constructor(color: Vector4);\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.resource {\n    import Vector4 = laya.d3.math.Vector4;\n    class SolidColorTextureCube extends BaseTexture {\n        /**洋红色纯色纹理。*/\n        static magentaTexture: SolidColorTextureCube;\n        /**灰色纯色纹理。*/\n        static grayTexture: SolidColorTextureCube;\n        constructor(color: Vector4);\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.resource.tempelet {\n    import GeometryFilter = laya.d3.core.GeometryFilter;\n    import Glitter = laya.d3.core.glitter.Glitter;\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * @private\n     * <code>GlitterTemplet</code> 类用于创建闪光数据模板。\n     */\n    class GlitterTemplet extends GeometryFilter implements IRenderable {\n        _currentTime: number;\n        /** 声明周期。 */\n        lifeTime: number;\n        /** 最小分段距离。 */\n        minSegmentDistance: number;\n        /** 最小插值距离。 */\n        minInterpDistance: number;\n        /** 最大插值数量。 */\n        maxSlerpCount: number;\n        /** 最大段数。 */\n        _maxSegments: number;\n        /**获取最大分段数。*/\n        /**设置最大分段数,注意:谨慎修改此属性，有性能损耗。*/\n        maxSegments: number;\n        readonly _vertexBufferCount: number;\n        readonly triangleCount: number;\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n        _getIndexBuffer(): IndexBuffer3D;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingSphere: BoundSphere;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingBox: BoundBox;\n        constructor(owner: Glitter);\n        _onActiveHierarchyChanged(active: boolean): void;\n        /**\n         * @private\n         * 更新闪光。\n         * @param\telapsedTime 间隔时间\n         */\n        _update(elapsedTime: number): void;\n        _beforeRender(state: RenderState): boolean;\n        /**\n         * @private\n         * 渲染闪光。\n         * @param\tstate 相关渲染状态\n         */\n        _render(state: RenderState): void;\n        /**\n         * 通过位置添加刀光。\n         * @param position0 位置0。\n         * @param position1 位置1。\n         */\n        addVertexPosition(position0: Vector3, position1: Vector3): void;\n        /**\n         * 通过位置和速度添加刀光。\n         * @param position0 位置0。\n         * @param velocity0 速度0。\n         * @param position1 位置1。\n         * @param velocity1 速度1。\n         */\n        addVertexPositionVelocity(position0: Vector3, velocity0: Vector3, position1: Vector3, velocity1: Vector3): void;\n        _destroy(): void;\n        /**\n         * @private\n         */\n        _getVertexBuffers(): Array<any>;\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n    }\n}\ndeclare module laya.d3.resource {\n    /**\n     * <code>Texture2D</code> 二维纹理。\n     */\n    class Texture2D extends BaseTexture {\n        /**\n         * 加载Texture2D。\n         * @param url Texture2D地址。\n         */\n        static load(url: string): Texture2D;\n        readonly _src: string;\n        readonly src: string;\n        /**\n         * 创建一个 <code>Texture2D</code> 实例。\n         */\n        constructor(canRead?: boolean, reapeat?: boolean, format?: number, mipmap?: boolean);\n        protected recreateResource(): void;\n        /**\n         *@private\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * 返回图片像素。\n         * @return 图片像素。\n         */\n        getPixels(): Uint8Array;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.resource {\n    class TextureCube extends BaseTexture {\n        /**\n         * 加载TextureCube。\n         * @param url TextureCube地址。\n         */\n        static load(url: string): TextureCube;\n        /**\n         * @inheritDoc\n         */\n        readonly defaulteTexture: BaseTexture;\n        constructor();\n        protected recreateResource(): void;\n        /**\n         * @private\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.d3.shader {\n    import BaseCamera = laya.d3.core.BaseCamera;\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import Scene = laya.d3.core.scene.Scene;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    import StringKey = laya.utils.StringKey;\n    import BaseShader = laya.webgl.shader.BaseShader;\n    class Shader3D extends BaseShader {\n        /**shader变量提交周期，逐渲染单元。*/\n        static PERIOD_RENDERELEMENT: number;\n        /**shader变量提交周期，逐材质。*/\n        static PERIOD_MATERIAL: number;\n        /**shader变量提交周期，逐精灵和相机，注：因为精灵包含MVP矩阵，为复合属性，所以摄像机发生变化时也应提交。*/\n        static PERIOD_SPRITE: number;\n        /**shader变量提交周期，逐相机。*/\n        static PERIOD_CAMERA: number;\n        /**shader变量提交周期，逐场景。*/\n        static PERIOD_SCENE: number;\n        protected static shaderParamsMap: any;\n        static nameKey: StringKey;\n        static create(vs: string, ps: string, attributeMap: any, sceneUniformMap: any, cameraUniformMap: any, spriteUniformMap: any, materialUniformMap: any, renderElementUniformMap: any): Shader3D;\n        static addInclude(fileName: string, txt: string): void;\n        _vshader: any;\n        _pshader: any;\n        _program: any;\n        _attributeParams: Array<any>;\n        _uniformParams: Array<any>;\n        _attributeParamsMap: Array<any>;\n        _sceneUniformParamsMap: Array<any>;\n        _cameraUniformParamsMap: Array<any>;\n        _spriteUniformParamsMap: Array<any>;\n        _materialUniformParamsMap: Array<any>;\n        _renderElementUniformParamsMap: Array<any>;\n        _id: number;\n        _uploadLoopCount: number;\n        _uploadRenderElement: RenderElement;\n        _uploadMaterial: BaseMaterial;\n        _uploadSprite3D: Sprite3D;\n        _uploadCamera: BaseCamera;\n        _uploadScene: Scene;\n        _uploadVertexBuffer: any;\n        /**\n         * 根据vs和ps信息生成shader对象\n         * @param\tvs\n         * @param\tps\n         * @param\tname:\n         * @param\tnameMap 帮助里要详细解释为什么需要nameMap\n         */\n        constructor(vs: string, ps: string, attributeMap: any, sceneUniformMap: any, cameraUniformMap: any, spriteUniformMap: any, materialUniformMap: any, renderElementUniformMap: any);\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n        bind(): boolean;\n        /**\n         * 按数组的定义提交\n         * @param\tshaderValue 数组格式[name,value,...]\n         */\n        uploadAttributes(attributeShaderValue: Array<any>, _bufferUsage: any): void;\n        /**\n         * 按数组的定义提交\n         * @param\tshaderValue 数组格式[name,value,...]\n         */\n        uploadAttributesX(attributeShaderValue: Array<any>, vb: VertexBuffer3D): void;\n        /**\n         * 按数组的定义提交\n         * @param\tshaderValue 数组格式[name,value,...]\n         */\n        uploadSceneUniforms(shaderValue: Array<any>): void;\n        /**\n         * 按数组的定义提交\n         * @param\tshaderValue 数组格式[name,value,...]\n         */\n        uploadCameraUniforms(shaderValue: Array<any>): void;\n        /**\n         * 按数组的定义提交\n         * @param\tshaderValue 数组格式[name,value,...]\n         */\n        uploadSpriteUniforms(shaderValue: Array<any>): void;\n        /**\n         * 按数组的定义提交\n         * @param\tshaderValue 数组格式[name,value,...]\n         */\n        uploadMaterialUniforms(shaderValue: Array<any>): void;\n        /**\n         * 按数组的定义提交\n         * @param\tshaderValue 数组格式[name,value,...]\n         */\n        uploadRenderElementUniforms(shaderValue: Array<any>): void;\n    }\n}\ndeclare module laya.d3.shader {\n    import ShaderCompile = laya.webgl.utils.ShaderCompile;\n    /**\n     * @private\n     * <code>ShaderCompile</code> 类用于创建Shader编译类型。\n     */\n    class ShaderCompile3D extends ShaderCompile {\n        static _preCompileShader: any;\n        /**是否开启调试模式。 */\n        static debugMode: boolean;\n        static SHADERDEFINE_HIGHPRECISION: number;\n        static SHADERDEFINE_FOG: number;\n        static SHADERDEFINE_DIRECTIONLIGHT: number;\n        static SHADERDEFINE_POINTLIGHT: number;\n        static SHADERDEFINE_SPOTLIGHT: number;\n        static SHADERDEFINE_UV0: number;\n        static SHADERDEFINE_COLOR: number;\n        static SHADERDEFINE_UV1: number;\n        static SAHDERDEFINE_DEPTHFOG: number;\n        /**\n         * @private\n         */\n        static _globalRegDefine(name: string, value: number): void;\n        /**\n         * 添加预编译shader文件，主要是处理宏定义\n         * @param\tnameID,一般是特殊宏+shaderNameID*0.0002组成的一个浮点数当做唯一标识\n         * @param\tvs\n         * @param\tps\n         */\n        static add(nameID: number, vs: string, ps: string, attributeMap: any, uniformMap: any): ShaderCompile3D;\n        /**\n         * 获取ShaderCompile3D。\n         * @param\tname\n         * @return ShaderCompile3D。\n         */\n        static get(name: string): ShaderCompile3D;\n        sharders: Array<any>;\n        _materialInt2name: Array<any>;\n        _materialName2Int: any;\n        _conchShader: any;\n        /**\n         * @private\n         */\n        constructor(name: number, vs: string, ps: string, attributeMap: any, uniformMap: any, includeFiles: any);\n        /**\n         * 根据宏动态生成shader文件，支持#include?COLOR_FILTER \"parts/ColorFilter_ps_logic.glsl\";条件嵌入文件\n         * @param\tname\n         * @param\tvs\n         * @param\tps\n         * @param\tdefine 宏定义，格式:\n         * @return\n         */\n        withCompile(publicDefine: number, spriteDefine: number, materialDefine: number): Shader3D;\n        /**\n         * 通过宏定义预编译shader。\n         * @param\tspriteIntToNameDic 精灵宏定义数组。\n         * @param\tpublicDefine 公共宏定义值。\n         * @param\tspriteDefine 精灵宏定义值。\n         * @param\tmaterialDefine 材质宏定义值。\n         */\n        precompileShaderWithShaderDefine(publicDefine: number, spriteDefine: number, materialDefine: number): void;\n        /**\n         * 注册材质宏定义。\n         * @param\tname 宏定义名称。\n         * @return\n         */\n        addMaterialDefines(shaderdefines: ShaderDefines): void;\n        /**\n         * 注册精灵宏定义。\n         * @param\tname 宏定义名称。\n         * @return\n         */\n        addSpriteDefines(shaderdefines: ShaderDefines): void;\n        /**\n         * 通过名称获取宏定义值。\n         * @param\tname 名称。\n         * @return 宏定义值。\n         */\n        getMaterialDefineByName(name: string): number;\n        /**\n         * 注册材质宏定义。\n         * @param\tname 宏定义名称。\n         * @return\n         */\n        registerMaterialDefine(name: string): number;\n        /**\n * 注册精灵宏定义。\n * @param\tname 宏定义名称。\n * @return\n */\n        registerSpriteDefine(name: string): number;\n    }\n}\ndeclare module laya.d3.shader {\n    /**\n     * @private\n     */\n    class ShaderDefines {\n        defineCounter: number;\n        defines: Array<any>;\n        /**\n         * @private\n         */\n        constructor(shaderdefines?: ShaderDefines);\n        /**\n         * @private\n         */\n        registerDefine(name: string): number;\n    }\n}\ndeclare module laya.d3.shader {\n    /**\n     * @private\n     * <code>ShaderInit</code> 类用于初始化内置Shader。\n     */\n    class ShaderInit3D {\n        /**\n         * 创建一个 <code>ShaderInit</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        static __init__(): void;\n    }\n}\ndeclare module laya.d3.shader {\n    /**\n     * @private\n     * <code>Shader3D</code> 主要用数组的方式保存shader变量定义，后期合并ShaderValue不使用for in，性能较高。\n     */\n    class ValusArray {\n        constructor();\n        setValue(name: number, value: any): void;\n        readonly data: Array<any>;\n    }\n}\ndeclare module laya.d3.shadowMap {\n    import BaseCamera = laya.d3.core.BaseCamera;\n    import Camera = laya.d3.core.Camera;\n    import Scene = laya.d3.core.scene.Scene;\n    import BoundFrustum = laya.d3.math.BoundFrustum;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector3 = laya.d3.math.Vector3;\n    import RenderTexture = laya.d3.resource.RenderTexture;\n    /**\n     * ...\n     * @author ...\n     */\n    class ParallelSplitShadowMap {\n        static SHADERDEFINE_RECEIVE_SHADOW: number;\n        static SHADERDEFINE_CAST_SHADOW: number;\n        static SHADERDEFINE_SHADOW_PSSM1: number;\n        static SHADERDEFINE_SHADOW_PSSM2: number;\n        static SHADERDEFINE_SHADOW_PSSM3: number;\n        static SHADERDEFINE_SHADOW_PCF_NO: number;\n        static SHADERDEFINE_SHADOW_PCF1: number;\n        static SHADERDEFINE_SHADOW_PCF2: number;\n        static SHADERDEFINE_SHADOW_PCF3: number;\n        static MAX_PSSM_COUNT: number;\n        _lightCulling: Array<any>;\n        _renderTarget: Array<any>;\n        _lightVPMatrix: Array<any>;\n        _shadowQuenes: Array<any>;\n        _boundingBox: Array<any>;\n        constructor();\n        setInfo(scene: Scene, maxDistance: number, globalParallelDir: Vector3, shadowMapTextureSize: number, numberOfPSSM: number, PCFType: number): void;\n        setPCFType(PCFtype: number): void;\n        getPCFType(): number;\n        setFarDistance(value: number): void;\n        getFarDistance(): number;\n        PSSMNum: number;\n        _setGlobalParallelLightDir(dir: Vector3): void;\n        getGlobalParallelLightDir(): Vector3;\n        getCurrentPSSM(): number;\n        getLightCamera(index: number): Camera;\n        /**\n         * @private\n         */\n        endSampler(sceneCamera: BaseCamera): void;\n        /**\n         * @private\n         */\n        _calcAllLightCameraInfo(sceneCamera: BaseCamera): void;\n        /**\n         * @private\n         */\n        _calcBoundingBox(fieldOfView: number, aspectRatio: number): void;\n        calcSplitFrustum(sceneCamera: BaseCamera): void;\n        /**\n         * 计算两个矩阵的乘法\n         * @param\tleft left矩阵\n         * @param\tright  right矩阵\n         * @param\tout  输出矩阵\n         */\n        static multiplyMatrixOutFloat32Array(left: Matrix4x4, right: Matrix4x4, out: Float32Array): void;\n        getLightFrustumCulling(currentPSSM: number): BoundFrustum;\n        getSplitFrustumCulling(): BoundFrustum;\n        getSplitDistance(index: number): number;\n        setShadowMapTextureSize(size: number): void;\n        getShadowMapTextureSize(): number;\n        beginRenderTarget(index: number): void;\n        endRenderTarget(index: number): void;\n        getRenderTarget(index: number): RenderTexture;\n        disposeAllRenderTarget(): void;\n    }\n}\ndeclare module laya.d3.terrain {\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>Terrain</code> 类用于创建地块。\n     */\n    class Terrain extends Sprite3D {\n        static RENDER_LINE_MODEL: boolean;\n        static LOD_TOLERANCE_VALUE: number;\n        static LOD_DISTANCE_FACTOR: number;\n        static __VECTOR3__: Vector3;\n        terrainRes: TerrainRes;\n        /**\n         * 加载网格模板,注意:不缓存。\n         * @param url 模板地址。\n         */\n        static load(url: string): Terrain;\n        /**\n         * 创建一个 <code>MeshSprite3D</code> 实例。\n         * @param mesh 网格,同时会加载网格所用默认材质。\n         * @param name 名字。\n         */\n        constructor(terrainRes?: TerrainRes);\n        protected _parseCustomProps(rootNode: ComponentNode, innerResouMap: any, customProps: any, json: any): void;\n        setLightmapIndex(value: number): void;\n        setLightmapScaleOffset(value: Vector4): void;\n        disableLight(): void;\n        buildTerrain(terrainRes: TerrainRes): void;\n        /**\n         * 获取地形X轴长度。\n         * @return  地形X轴长度。\n         */\n        width(): number;\n        /**\n         * 获取地形Z轴长度。\n         * @return  地形Z轴长度。\n         */\n        depth(): number;\n        /**\n         * 获取地形高度。\n         * @param x X轴坐标。\n         * @param z Z轴坐标。\n         */\n        getHeightXZ(x: number, z: number): number;\n    }\n}\ndeclare module laya.d3.terrain {\n    import RenderableSprite3D = laya.d3.core.RenderableSprite3D;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    import Mesh = laya.d3.resource.models.Mesh;\n    /**\n     * <code>TerrainChunk</code> 类用于创建地块。\n     */\n    class TerrainChunk extends RenderableSprite3D {\n        /**\n         * 加载网格模板,注意:不缓存。\n         * @param url 模板地址。\n         */\n        static load(url: string): TerrainChunk;\n        /**\n         * 获取地形过滤器。\n         * @return  地形过滤器。\n         */\n        readonly terrainFilter: TerrainFilter;\n        /**\n         * 获取地形渲染器。\n         * @return  地形渲染器。\n         */\n        readonly terrainRender: TerrainRender;\n        /**\n         * 创建一个 <code>MeshSprite3D</code> 实例。\n         * @param mesh 网格,同时会加载网格所用默认材质。\n         * @param name 名字。\n         */\n        constructor(chunkOffsetX: number, chunkOffsetZ: number, girdSize: number, terrainHeightData: Float32Array, heightDataWidth: number, heightDataHeight: number, cameraCoordinateInverse: boolean, name?: string);\n        buildRenderElementAndMaterial(detailNum: number, normalMap: string, alphaMapUrl: string, detailUrl1: string, detailUrl2: string, detailUrl3: string, detailUrl4: string, ambientColor: Vector3, diffuseColor: Vector3, specularColor: Vector4, sx1?: number, sy1?: number, sx2?: number, sy2?: number, sx3?: number, sy3?: number, sx4?: number, sy4?: number): void;\n        /**\n         * @private\n         */\n        createConchModel(): any;\n        protected _clearSelfRenderObjects(): void;\n        protected _addSelfRenderObjects(): void;\n        /**\n         * @private\n         */\n        _applyMeshMaterials(mesh: Mesh): void;\n        cloneTo(destObject: any): void;\n        destroy(destroyChild?: boolean): void;\n    }\n}\ndeclare module laya.d3.terrain {\n    import Camera = laya.d3.core.Camera;\n    import GeometryFilter = laya.d3.core.GeometryFilter;\n    import IRenderable = laya.d3.core.render.IRenderable;\n    import RenderElement = laya.d3.core.render.RenderElement;\n    import RenderState = laya.d3.core.render.RenderState;\n    import IndexBuffer3D = laya.d3.graphics.IndexBuffer3D;\n    import VertexBuffer3D = laya.d3.graphics.VertexBuffer3D;\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>TerrainFilter</code> 类用于创建TerrainFilter过滤器。\n     */\n    class TerrainFilter extends GeometryFilter implements IRenderable {\n        static _TEMP_ARRAY_BUFFER: Uint32Array;\n        _owner: TerrainChunk;\n        _gridSize: number;\n        memorySize: number;\n        protected _numberVertices: number;\n        protected _maxNumberIndices: number;\n        protected _currentNumberIndices: number;\n        protected _numberTriangle: number;\n        protected _vertexBuffer: VertexBuffer3D;\n        protected _indexBuffer: IndexBuffer3D;\n        protected _boundingSphere: BoundSphere;\n        protected _boundingBox: BoundBox;\n        protected _indexArrayBuffer: Uint16Array;\n        _boundingBoxCorners: Array<any>;\n        /**\n         * 创建一个新的 <code>MeshFilter</code> 实例。\n         * @param owner 所属网格精灵。\n         */\n        constructor(owner: TerrainChunk, chunkOffsetX: number, chunkOffsetZ: number, gridSize: number, terrainHeightData: Float32Array, heightDataWidth: number, heightDataHeight: number, cameraCoordinateInverse: boolean);\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingSphere: BoundSphere;\n        /**\n         * @inheritDoc\n         */\n        readonly _originalBoundingBox: BoundBox;\n        /**\n         * @inheritDoc\n         */\n        _destroy(): void;\n        protected recreateResource(): void;\n        protected assembleIndexInit(): void;\n        protected isNeedAssemble(camera: Camera, cameraPostion: Vector3): number;\n        protected assembleIndex(camera: Camera, cameraPostion: Vector3): boolean;\n        calcOriginalBoudingBoxAndSphere(): void;\n        calcLeafBoudingBox(worldMatrix: Matrix4x4): void;\n        calcLeafBoudingSphere(worldMatrix: Matrix4x4, maxScale: number): void;\n        readonly _vertexBufferCount: number;\n        readonly triangleCount: number;\n        _getVertexBuffer(index?: number): VertexBuffer3D;\n        _getIndexBuffer(): IndexBuffer3D;\n        _beforeRender(state: RenderState): boolean;\n        /**\n         * @private\n         */\n        _getVertexBuffers(): Array<any>;\n        _render(state: RenderState): void;\n        _renderRuntime(conchGraphics3D: any, renderElement: RenderElement, state: RenderState): void;\n    }\n}\ndeclare module laya.d3.terrain {\n    import Resource = laya.resource.Resource;\n    /**\n     * <code>TerrainHeightData</code> 类用于描述地形高度信息。\n     */\n    class TerrainHeightData extends Resource {\n        _terrainHeightData: Float32Array;\n        _width: number;\n        _height: number;\n        _bitType: number;\n        _value: number;\n        /**\n         * 加载地形高度模板,注意:不缓存。\n         * @param url 模板地址。\n         * @param width 高度图的宽。\n         * @param height 高度图的高。\n         */\n        static load(url: string, widht: number, height: number, bitType: number, value: number): TerrainHeightData;\n        /**\n         * 创建一个 <code>TerrainHeightData</code> 实例。\n         */\n        constructor();\n        /**\n         * 异步回调\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n    }\n}\ndeclare module laya.d3.terrain {\n    import BoundBox = laya.d3.math.BoundBox;\n    import BoundSphere = laya.d3.math.BoundSphere;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>TerrainLeaf</code> Terrain的叶子节点\n     */\n    class TerrainLeaf {\n        static CHUNK_GRID_NUM: number;\n        static LEAF_GRID_NUM: number;\n        static LEAF_PLANE_VERTEXT_COUNT: number;\n        static LEAF_SKIRT_VERTEXT_COUNT: number;\n        static LEAF_VERTEXT_COUNT: number;\n        static LEAF_PLANE_MAX_INDEX_COUNT: number;\n        static LEAF_SKIRT_MAX_INDEX_COUNT: number;\n        static LEAF_MAX_INDEX_COUNT: number;\n        static __ADAPT_MATRIX__: Matrix4x4;\n        static __ADAPT_MATRIX_INV__: Matrix4x4;\n        static __VECTOR3__: Vector3;\n        _boundingSphere: BoundSphere;\n        _boundingBox: BoundBox;\n        _sizeOfY: Vector2;\n        _currentLODLevel: number;\n        static __init__(): void;\n        static getPlaneLODIndex(leafIndex: number, LODLevel: number): Uint16Array;\n        static getSkirtLODIndex(leafIndex: number, LODLevel: number): Uint16Array;\n        static getHeightFromTerrainHeightData(x: number, z: number, terrainHeightData: Float32Array, heighDataWidth: number, heightDataHeight: number): number;\n        /**\n         * 创建一个新的 <code>TerrainLeaf</code> 实例。\n         * @param owner 地形的叶子。\n         */\n        constructor();\n        calcVertextNorml(x: number, z: number, terrainHeightData: Float32Array, heighDataWidth: number, heightDataHeight: number, normal: Vector3): void;\n        calcVertextNormlUV(x: number, z: number, terrainWidth: number, terrainHeight: number, normal: Vector3): void;\n        calcVertextBuffer(offsetChunkX: number, offsetChunkZ: number, beginX: number, beginZ: number, girdSize: number, vertextBuffer: Float32Array, offset: number, strideSize: number, terrainHeightData: Float32Array, heighDataWidth: number, heightDataHeight: number, cameraCoordinateInverse: boolean): void;\n        calcSkirtVertextBuffer(offsetChunkX: number, offsetChunkZ: number, beginX: number, beginZ: number, girdSize: number, vertextBuffer: Float32Array, offset: number, strideSize: number, terrainHeightData: Float32Array, heighDataWidth: number, heightDataHeight: number): void;\n        calcOriginalBoudingBoxAndSphere(): void;\n        calcLeafBoudingBox(worldMatrix: Matrix4x4): void;\n        calcLeafBoudingSphere(worldMatrix: Matrix4x4, maxScale: number): void;\n        calcLODErrors(terrainHeightData: Float32Array, heighDataWidth: number, heightDataHeight: number): void;\n        determineLod(eyePos: Vector3, perspectiveFactor: number, tolerance: number, tolerAndPerspectiveChanged: boolean): number;\n    }\n}\ndeclare module laya.d3.terrain {\n    import BaseRender = laya.d3.core.render.BaseRender;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    /**\n     * <code>MeshRender</code> 类用于网格渲染器。\n     */\n    class TerrainRender extends BaseRender {\n        /**\n         * 创建一个新的 <code>MeshRender</code> 实例。\n         */\n        constructor(owner: TerrainChunk);\n        protected _calculateBoundingSphere(): void;\n        protected _calculateBoundingBox(): void;\n        /**\n         * @private\n         */\n        _renderUpdate(projectionView: Matrix4x4): boolean;\n        /**\n         * @private\n         */\n        _destroy(): void;\n    }\n}\ndeclare module laya.d3.terrain {\n    import MaterialInfo = laya.d3.terrain.unit.MaterialInfo;\n    import Resource = laya.resource.Resource;\n    /**\n     * <code>TerrainRes</code> 类用于描述地形信息。\n     */\n    class TerrainRes extends Resource {\n        _version: number;\n        _cameraCoordinateInverse: boolean;\n        _gridSize: number;\n        _chunkNumX: number;\n        _chunkNumZ: number;\n        _heightDataX: number;\n        _heightDataZ: number;\n        _heightDataBitType: number;\n        _heightDataValue: number;\n        _heightDataUrl: string;\n        _detailTextureInfos: Array<any>;\n        _chunkInfos: Array<any>;\n        _heightData: TerrainHeightData;\n        _materialInfo: MaterialInfo;\n        _alphaMaps: Array<any>;\n        _normalMaps: Array<any>;\n        /**\n         * 加载地形模板,注意:不缓存。\n         * @param url 模板地址。\n         */\n        static load(url: string): TerrainRes;\n        /**\n         * 创建一个 <code>TerrainHeightData</code> 实例。\n         */\n        constructor();\n        parseData(data: any): boolean;\n        onLoadTerrainComplete(heightData: TerrainHeightData): void;\n        /**\n         * 异步回调\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n    }\n}\ndeclare module laya.d3.terrain.unit {\n    /**\n     * <code>DetailTextureInfo</code> 类用于描述地形细节纹理。\n     */\n    class ChunkInfo {\n        alphaMap: Array<any>;\n        detailID: Array<any>;\n        normalMap: string;\n        constructor();\n    }\n}\ndeclare module laya.d3.terrain.unit {\n    import Vector2 = laya.d3.math.Vector2;\n    /**\n     * <code>DetailTextureInfo</code> 类用于描述地形细节纹理。\n     */\n    class DetailTextureInfo {\n        diffuseTexture: string;\n        normalTexture: string;\n        scale: Vector2;\n        offset: Vector2;\n        constructor();\n    }\n}\ndeclare module laya.d3.terrain.unit {\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>MaterialInfo</code> 类用于描述地形材质信息。\n     */\n    class MaterialInfo {\n        ambientColor: Vector3;\n        diffuseColor: Vector3;\n        specularColor: Vector4;\n        constructor();\n    }\n}\ndeclare module laya.d3.utils {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <code>CollsionManager</code> 类用于碰撞管理器。\n     */\n    class CollisionManager extends EventDispatcher {\n        /**\n         *@private\n         */\n        static _triggerCollision(): void;\n        /**\n         * 创建一个新的 <code>CollsionManager</code> 实例。\n         */\n        constructor();\n    }\n}\ndeclare module laya.d3.utils {\n    import Collider = laya.d3.component.physics.Collider;\n    import Layer = laya.d3.core.Layer;\n    import Ray = laya.d3.math.Ray;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * <code>Physics</code> 类用于简单物理检测。\n     */\n    class Physics {\n        static _layerCollsionMatrix: Array<any>;\n        /**碰撞管理器。*/\n        static collisionManager: CollisionManager;\n        /**重力值。*/\n        static gravity: Vector3;\n        /**\n         * @private\n         */\n        static __init__(): void;\n        /**\n         * 创建一个 <code>Physics</code> 实例。\n         */\n        constructor();\n        /**\n         * 是否忽略两个层之间所有碰撞器的碰撞检测。\n         * @param\tlayer1 层一。\n         * @param\tlayer2 层二。\n         * @param\tignore 是否忽略。\n         */\n        static setLayerCollision(layer1: Layer, layer2: Layer, collison: boolean): void;\n        /**\n         * 获取两个层之间是否忽略碰撞检测。\n         * @param\tlayer1 层一。\n         * @param\tlayer2 层二。\n         * @return\t是否忽略。\n         */\n        static getLayerCollision(layer1: Layer, layer2: Layer): boolean;\n        /**\n         * 是否忽略两个碰撞器的碰撞检测。\n         * @param\tcollider1 碰撞器一。\n         * @param\tcollider2 碰撞器二。\n         * @param\tignore 是否忽略。\n         */\n        static setColliderCollision(collider1: Collider, collider2: Collider, collsion: boolean): void;\n        /**\n         * 获取是否忽略两个碰撞器的碰撞检测。\n         * @param\tcollider1 碰撞器一。\n         * @param\tcollider2 碰撞器二。\n         * @return\t是否忽略。\n         */\n        static getIColliderCollision(collider1: Collider, collider2: Collider): boolean;\n        /**\n         * 在场景中投下可与所有碰撞器碰撞的一条光线,获取发生碰撞的第一个碰撞器。\n         * @param  ray        射线\n         * @param  outHitInfo 与该射线发生碰撞的第一个碰撞器的碰撞信息\n         * @param  distance   射线长度,默认为最大值\n         * @param  layer      选定制定层内的碰撞器,其他层内碰撞器忽略\n         */\n        static rayCast(ray: Ray, outHitInfo: RaycastHit, distance?: number, layer?: number): void;\n        /**\n         * 在场景中投下可与所有碰撞器碰撞的一条光线,获取发生碰撞的所有碰撞器。\n         * @param  ray        射线\n         * @param  outHitAllInfo 与该射线发生碰撞的所有碰撞器的碰撞信息\n         * @param  distance   射线长度,默认为最大值\n         * @param  layer      选定制定层内的碰撞器,其他层内碰撞器忽略\n         */\n        static rayCastAll(ray: Ray, outHitAllInfo: Array<RaycastHit>, distance?: number, layer?: number): void;\n    }\n}\ndeclare module laya.d3.utils {\n    import VertexDeclaration = laya.d3.graphics.VertexDeclaration;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Ray = laya.d3.math.Ray;\n    import Vector2 = laya.d3.math.Vector2;\n    import Vector3 = laya.d3.math.Vector3;\n    import Viewport = laya.d3.math.Viewport;\n    /**\n     * <code>Picker</code> 类用于创建拾取。\n     */\n    class Picker {\n        /**\n         * 创建一个 <code>Picker</code> 实例。\n         */\n        constructor();\n        /**\n         * 计算鼠标生成的射线。\n         * @param\tpoint 鼠标位置。\n         * @param\tviewPort 视口。\n         * @param\tprojectionMatrix 透视投影矩阵。\n         * @param\tviewMatrix 视图矩阵。\n         * @param\tworld 世界偏移矩阵。\n         * @return  out  输出射线。\n         */\n        static calculateCursorRay(point: Vector2, viewPort: Viewport, projectionMatrix: Matrix4x4, viewMatrix: Matrix4x4, world: Matrix4x4, out: Ray): void;\n        /**\n         * 计算射线和三角形碰撞并返回碰撞三角形和碰撞距离。\n         * @param\tray 射线。\n         * @param\tpositions 顶点数据。\n         * @param\tindices 索引数据。\n         * @param\toutVertex0 输出三角形顶点0。\n         * @param\toutVertex1 输出三角形顶点1。\n         * @param\toutVertex2 输出三角形顶点2。\n         * @return   射线距离三角形的距离，返回Number.NaN则不相交。\n         */\n        static rayIntersectsPositionsAndIndices(ray: Ray, vertexDatas: Float32Array, vertexDeclaration: VertexDeclaration, indices: Uint16Array, outHitInfo: RaycastHit): boolean;\n        /**\n         * 计算射线和三角形碰撞并返回碰撞距离。\n         * @param\tray 射线。\n         * @param\tvertex1 顶点1。\n         * @param\tvertex2 顶点2。\n         * @param\tvertex3 顶点3。\n         * @return   射线距离三角形的距离，返回Number.NaN则不相交。\n         */\n        static rayIntersectsTriangle(ray: Ray, vertex1: Vector3, vertex2: Vector3, vertex3: Vector3): number;\n    }\n}\ndeclare module laya.d3.utils {\n    import Sprite3D = laya.d3.core.Sprite3D;\n    import Vector3 = laya.d3.math.Vector3;\n    /**\n     * ...\n     * @author ...\n     */\n    class RaycastHit {\n        distance: number;\n        trianglePositions: Array<any>;\n        triangleNormals: Array<any>;\n        position: Vector3;\n        sprite3D: Sprite3D;\n        constructor();\n        cloneTo(dec: RaycastHit): void;\n    }\n}\ndeclare module laya.d3.utils {\n    class Size {\n        static readonly fullScreen: Size;\n        readonly width: number;\n        readonly height: number;\n        constructor(width: number, height: number);\n    }\n}\ndeclare module laya.d3.utils {\n    import ComponentNode = laya.d3.core.ComponentNode;\n    import Matrix4x4 = laya.d3.math.Matrix4x4;\n    import Quaternion = laya.d3.math.Quaternion;\n    import Vector3 = laya.d3.math.Vector3;\n    import Vector4 = laya.d3.math.Vector4;\n    /**\n     * <code>Utils3D</code> 类用于创建3D工具。\n     */\n    class Utils3D {\n        /**\n         * @private\n         */\n        static _createNodeByJson(rootNode: ComponentNode, nodeData: any, node: any, innerResouMap: any): any;\n        static _computeBoneAndAnimationDatasByBindPoseMatrxix(bones: any, curData: Float32Array, inverGlobalBindPose: Array<any>, outBonesDatas: Float32Array, outAnimationDatas: Float32Array, boneIndexToMesh: Array<any>): void;\n        static _computeAnimationDatasByArrayAndMatrixFast(inverGlobalBindPose: Array<any>, bonesDatas: Float32Array, outAnimationDatas: Float32Array, boneIndexToMesh: Array<any>): void;\n        static _computeBoneAndAnimationDatasByBindPoseMatrxixOld(bones: any, curData: Float32Array, inverGlobalBindPose: Array<any>, outBonesDatas: Float32Array, outAnimationDatas: Float32Array): void;\n        static _computeAnimationDatasByArrayAndMatrixFastOld(inverGlobalBindPose: Array<any>, bonesDatas: Float32Array, outAnimationDatas: Float32Array): void;\n        static _computeRootAnimationData(bones: any, curData: Float32Array, animationDatas: Float32Array): void;\n        /**\n         * 根据四元数旋转三维向量。\n         * @param\tsource 源三维向量。\n         * @param\trotation 旋转四元数。\n         * @param\tout 输出三维向量。\n         */\n        static transformVector3ArrayByQuat(sourceArray: Float32Array, sourceOffset: number, rotation: Quaternion, outArray: Float32Array, outOffset: number): void;\n        /**\n         *通过数组数据计算矩阵乘法。\n         * @param leftArray left矩阵数组。\n         * @param leftOffset left矩阵数组的偏移。\n         * @param rightArray right矩阵数组。\n         * @param rightOffset right矩阵数组的偏移。\n         * @param outArray 输出矩阵数组。\n         * @param outOffset 输出矩阵数组的偏移。\n         */\n        static mulMatrixByArray(leftArray: Float32Array, leftOffset: number, rightArray: Float32Array, rightOffset: number, outArray: Float32Array, outOffset: number): void;\n        /**\n         *通过数组数据计算矩阵乘法,rightArray和outArray不能为同一数组引用。\n         * @param leftArray left矩阵数组。\n         * @param leftOffset left矩阵数组的偏移。\n         * @param rightArray right矩阵数组。\n         * @param rightOffset right矩阵数组的偏移。\n         * @param outArray 结果矩阵数组。\n         * @param outOffset 结果矩阵数组的偏移。\n         */\n        static mulMatrixByArrayFast(leftArray: Float32Array, leftOffset: number, rightArray: Float32Array, rightOffset: number, outArray: Float32Array, outOffset: number): void;\n        /**\n         *通过数组数据计算矩阵乘法,rightArray和outArray不能为同一数组引用。\n         * @param leftArray left矩阵数组。\n         * @param leftOffset left矩阵数组的偏移。\n         * @param rightMatrix right矩阵。\n         * @param outArray 结果矩阵数组。\n         * @param outOffset 结果矩阵数组的偏移。\n         */\n        static mulMatrixByArrayAndMatrixFast(leftArray: Float32Array, leftOffset: number, rightMatrix: Matrix4x4, outArray: Float32Array, outOffset: number): void;\n        /**\n         *通过数平移、旋转、缩放值计算到结果矩阵数组。\n         * @param tX left矩阵数组。\n         * @param tY left矩阵数组的偏移。\n         * @param tZ right矩阵数组。\n         * @param qX right矩阵数组的偏移。\n         * @param qY 输出矩阵数组。\n         * @param qZ 输出矩阵数组的偏移。\n         * @param qW 输出矩阵数组的偏移。\n         * @param sX 输出矩阵数组的偏移。\n         * @param sY 输出矩阵数组的偏移。\n         * @param sZ 输出矩阵数组的偏移。\n         * @param outArray 结果矩阵数组。\n         * @param outOffset 结果矩阵数组的偏移。\n         */\n        static createAffineTransformationArray(tX: number, tY: number, tZ: number, rX: number, rY: number, rZ: number, rW: number, sX: number, sY: number, sZ: number, outArray: Float32Array, outOffset: number): void;\n        /**\n         * 通过矩阵转换一个三维向量数组到另外一个归一化的三维向量数组。\n         * @param\tsource 源三维向量所在数组。\n         * @param\tsourceOffset 源三维向量数组偏移。\n         * @param\ttransform  变换矩阵。\n         * @param\tresult 输出三维向量所在数组。\n         * @param\tresultOffset 输出三维向量数组偏移。\n         */\n        static transformVector3ArrayToVector3ArrayCoordinate(source: Float32Array, sourceOffset: number, transform: Matrix4x4, result: Float32Array, resultOffset: number): void;\n        /**\n         * @private\n         */\n        static transformLightingMapTexcoordByUV0Array(source: Float32Array, sourceOffset: number, lightingMapScaleOffset: Vector4, result: Float32Array, resultOffset: number): void;\n        /**\n         * @private\n         */\n        static transformLightingMapTexcoordByUV1Array(source: Float32Array, sourceOffset: number, lightingMapScaleOffset: Vector4, result: Float32Array, resultOffset: number): void;\n        /**\n         * 获取URL版本字符。\n         * @param\turl\n         * @return\n         */\n        static getURLVerion(url: string): string;\n        /**\n         * @private\n         */\n        static _quaternionCreateFromYawPitchRollArray(yaw: number, pitch: number, roll: number, out: Float32Array): void;\n        /**\n         * @private\n         */\n        static _createAffineTransformationArray(trans: Float32Array, rot: Float32Array, scale: Float32Array, outE: Float32Array): void;\n        /**\n         * @private\n         */\n        static _mulMatrixArray(leftMatrixE: Float32Array, rightMatrix: Matrix4x4, outArray: Float32Array, outOffset: number): void;\n        static getYawPitchRoll(quaternion: Float32Array, out: Float32Array): void;\n        static transformQuat(source: Vector3, rotation: Float32Array, out: Vector3): void;\n        /**\n         * @private\n         */\n        static quaterionNormalize(f: Float32Array, e: Float32Array): void;\n        static matrix4x4MultiplyFFF(a: Float32Array, b: Float32Array, e: Float32Array): void;\n        static matrix4x4MultiplyMFM(left: Matrix4x4, right: Float32Array, out: Matrix4x4): void;\n    }\n}\ndeclare module laya.d3.water {\n    import BaseMaterial = laya.d3.core.material.BaseMaterial;\n    /**\n     * ...\n     * @author ...\n     */\n    class WaterDetailMaterial extends BaseMaterial {\n        static WAVEINFO: number;\n        static WAVEINFOD: number;\n        static WAVEMAINDIR: number;\n        static TEXWAVE_UV_SCALE: number;\n        constructor();\n        static init(): void;\n        currentTm: number;\n        waveInfo: Float32Array;\n        waveInfoD: Float32Array;\n        texWaveUVScale: number;\n    }\n}\ndeclare module laya.d3.water {\n    import RenderableSprite3D = laya.d3.core.RenderableSprite3D;\n    import BaseRender = laya.d3.core.render.BaseRender;\n    /**\n     * ...\n     * @author ...\n     */\n    class WaterRender extends BaseRender {\n        constructor(owner: RenderableSprite3D);\n        protected _calculateBoundingSphere(): void;\n        protected _calculateBoundingBox(): void;\n        _destroy(): void;\n    }\n}\ndeclare module laya.device.geolocation {\n    import Handler = laya.utils.Handler;\n    /**\n     * 使用前可用<code>supported</code>查看浏览器支持。\n     */\n    class Geolocation {\n        /**\n         * 由于权限被拒绝造成的地理信息获取失败。\n         */\n        static PERMISSION_DENIED: number;\n        /**\n         * 由于内部位置源返回了内部错误导致地理信息获取失败。\n         */\n        static POSITION_UNAVAILABLE: number;\n        /**\n         * 信息获取所用时长超出<code>timeout</code>所设置时长。\n         */\n        static TIMEOUT: number;\n        /**\n         * 是否支持。\n         */\n        static supported: boolean;\n        /**\n         * 如果<code>enableHighAccuracy</code>为true，并且设备能够提供一个更精确的位置，则会获取最佳可能的结果。\n         * 请注意,这可能会导致较慢的响应时间或增加电量消耗（如使用GPS）。\n         * 另一方面，如果设置为false，将会得到更快速的响应和更少的电量消耗。\n         * 默认值为false。\n         */\n        static enableHighAccuracy: boolean;\n        static timeout: number;\n        /**\n         * 表示可被返回的缓存位置信息的最大时限。\n         * 如果设置为0，意味着设备不使用缓存位置，并且尝试获取实时位置。\n         * 如果设置为Infinity，设备必须返回缓存位置而无论其时限。\n         */\n        static maximumAge: number;\n        constructor();\n        /**\n         * 获取设备当前位置。\n         * @param\tonSuccess\t带有唯一<code>Position</code>参数的回调处理器。\n         * @param\tonError\t\t可选的。带有错误信息的回调处理器。错误代码为Geolocation.PERMISSION_DENIED、Geolocation.POSITION_UNAVAILABLE和Geolocation.TIMEOUT之一。\n         */\n        static getCurrentPosition(onSuccess: Handler, onError?: Handler): void;\n        /**\n         * 监视设备当前位置。回调处理器在设备位置改变时被执行。\n         * @param\tonSuccess\t带有唯一<code>Position</code>参数的回调处理器。\n         * @param\tonError\t\t可选的。带有错误信息的回调处理器。错误代码为Geolocation.PERMISSION_DENIED、Geolocation.POSITION_UNAVAILABLE和Geolocation.TIMEOUT之一。\n         */\n        static watchPosition(onSuccess: Handler, onError: Handler): number;\n        /**\n         * 移除<code>watchPosition</code>安装的指定处理器。\n         * @param\tid\n         */\n        static clearWatch(id: number): void;\n    }\n}\ndeclare module laya.device.geolocation {\n    class GeolocationInfo {\n        setPosition(pos: any): void;\n        readonly latitude: number;\n        readonly longitude: number;\n        readonly altitude: number;\n        readonly accuracy: number;\n        readonly altitudeAccuracy: number;\n        readonly heading: number;\n        readonly speed: number;\n        readonly timestamp: number;\n    }\n}\ndeclare module laya.device.media {\n    import Bitmap = laya.resource.Bitmap;\n    /**\n     * @private\n     */\n    class HtmlVideo extends Bitmap {\n        protected video: any;\n        constructor();\n        static create: Function;\n        setSource(url: string, extension: number): void;\n        getVideo(): any;\n    }\n}\ndeclare module laya.device.media {\n    import Handler = laya.utils.Handler;\n    /**\n     * Media用于捕捉摄像头和麦克风。可以捕捉任意之一，或者同时捕捉两者。<code>getCamera</code>前可以使用<code>supported()</code>检查当前浏览器是否支持。\n     * <b>NOTE:</b>\n     * <p>目前Media在移动平台只支持Android，不支持IOS。只可在FireFox完整地使用，Chrome测试时无法捕捉视频。</p>\n     */\n    class Media {\n        constructor();\n        /**\n         * 检查浏览器兼容性。\n         */\n        static supported(): boolean;\n        /**\n         * 获取用户媒体。\n         * @param\toptions\t简单的可选项可以使<code>\n         * @param\tonSuccess 获取成功的处理器，唯一参数返回媒体的Blob地址，可以将其传给Video。\n         * @param\tonError\t获取失败的处理器，唯一参数是Error。\n         */\n        static getMedia(options: any, onSuccess: Handler, onError: Handler): void;\n    }\n}\ndeclare module laya.device.media {\n    import Sprite = laya.display.Sprite;\n    /**\n     * <code>Video</code>将视频显示到Canvas上。<code>Video</code>可能不会在所有浏览器有效。\n     * <p>关于Video支持的所有事件参见：<i>http://www.w3school.com.cn/tags/html_ref_audio_video_dom.asp</i>。</p>\n     * <p>\n     * <b>注意：</b><br/>\n     * 在PC端可以在任何时机调用<code>play()</code>因此，可以在程序开始运行时就使Video开始播放。但是在移动端，只有在用户第一次触碰屏幕后才可以调用play()，所以移动端不可能在程序开始运行时就自动开始播放Video。\n     * </p>\n     *\n     * <p>MDN Video链接： <i>https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video</i></p>\n     */\n    class Video extends Sprite {\n        static MP4: number;\n        static OGG: number;\n        static CAMERA: number;\n        static WEBM: number;\n        /** 表示最有可能支持。 */\n        static SUPPORT_PROBABLY: string;\n        /** 表示可能支持。*/\n        static SUPPORT_MAYBY: string;\n        /** 表示不支持。 */\n        static SUPPORT_NO: string;\n        constructor(width?: number, height?: number);\n        /**\n         * 设置播放源。\n         * @param url\t播放源路径。\n         */\n        load(url: string): void;\n        /**\n         * 开始播放视频。\n         */\n        play(): void;\n        /**\n         * 暂停视频播放。\n         */\n        pause(): void;\n        /**\n         * 重新加载视频。\n         */\n        reload(): void;\n        /**\n         * 检测是否支持播放指定格式视频。\n         * @param type\t参数为Video.MP4 / Video.OGG / Video.WEBM之一。\n         * @return 表示支持的级别。可能的值：\n         * <ul>\n         * <li>\"probably\"，Video.SUPPORT_PROBABLY - 浏览器最可能支持该音频/视频类型</li>\n         * <li>\"maybe\"，Video.SUPPORT_MAYBY - 浏览器也许支持该音频/视频类型</li>\n         * <li>\"\"，Video.SUPPORT_NO- （空字符串）浏览器不支持该音频/视频类型</li>\n         * </ul>\n         */\n        canPlayType(type: number): string;\n        /**\n         * buffered 属性返回 TimeRanges(JS)对象。TimeRanges 对象表示用户的音视频缓冲范围。缓冲范围指的是已缓冲音视频的时间范围。如果用户在音视频中跳跃播放，会得到多个缓冲范围。\n         * <p>buffered.length返回缓冲范围个数。如获取第一个缓冲范围则是buffered.start(0)和buffered.end(0)。以秒计。</p>\n         * @return TimeRanges(JS)对象\n         */\n        readonly buffered: any;\n        /**\n         * 获取当前播放源路径。\n         */\n        readonly currentSrc: string;\n        /**\n         * 设置和获取当前播放头位置。\n         */\n        currentTime: number;\n        /**\n         * 设置和获取当前音量。\n         */\n        volume: number;\n        /**\n         * 表示视频元素的就绪状态：\n         * <ul>\n         * <li>0 = HAVE_NOTHING - 没有关于音频/视频是否就绪的信息</li>\n         * <li>1 = HAVE_METADATA - 关于音频/视频就绪的元数据</li>\n         * <li>2 = HAVE_CURRENT_DATA - 关于当前播放位置的数据是可用的，但没有足够的数据来播放下一帧/毫秒</li>\n         * <li>3 = HAVE_FUTURE_DATA - 当前及至少下一帧的数据是可用的</li>\n         * <li>4 = HAVE_ENOUGH_DATA - 可用数据足以开始播放</li>\n         * </ul>\n         */\n        readonly readyState: any;\n        /**\n         * 获取视频源尺寸。ready事件触发后可用。\n         */\n        readonly videoWidth: number;\n        readonly videoHeight: number;\n        /**\n         * 获取视频长度（秒）。ready事件触发后可用。\n         */\n        readonly duration: number;\n        /**\n         * 返回音频/视频的播放是否已结束\n         */\n        readonly ended: boolean;\n        /**\n         * 返回表示音频/视频错误状态的 MediaError（JS）对象。\n         */\n        readonly error: boolean;\n        /**\n         * 设置或返回音频/视频是否应在结束时重新播放。\n         */\n        loop: boolean;\n        /**\n         * playbackRate 属性设置或返回音频/视频的当前播放速度。如：\n         * <ul>\n         * <li>1.0 正常速度</li>\n         * <li>0.5 半速（更慢）</li>\n         * <li>2.0 倍速（更快）</li>\n         * <li>-1.0 向后，正常速度</li>\n         * <li>-0.5 向后，半速</li>\n         * </ul>\n         * <p>只有 Google Chrome 和 Safari 支持 playbackRate 属性。</p>\n         */\n        playbackRate: number;\n        /**\n         * 获取和设置静音状态。\n         */\n        muted: boolean;\n        /**\n         * 返回视频是否暂停\n         */\n        readonly paused: boolean;\n        /**\n         * preload 属性设置或返回是否在页面加载后立即加载视频。可赋值如下：\n         * <ul>\n         * <li>auto\t指示一旦页面加载，则开始加载视频。</li>\n         * <li>metadata\t指示当页面加载后仅加载音频/视频的元数据。</li>\n         * <li>none\t指示页面加载后不应加载音频/视频。</li>\n         * </ul>\n         */\n        preload: string;\n        /**\n         * 参见 <i>http://www.w3school.com.cn/tags/av_prop_seekable.asp</i>。\n         */\n        readonly seekable: any;\n        /**\n         * seeking 属性返回用户目前是否在音频/视频中寻址。\n         * 寻址中（Seeking）指的是用户在音频/视频中移动/跳跃到新的位置。\n         */\n        readonly seeking: boolean;\n        height: number;\n        size(width: number, height: number): Sprite;\n        width: number;\n        /**\n         * 销毁内部事件绑定。\n         */\n        destroy(detroyChildren?: boolean): void;\n    }\n}\ndeclare module laya.device.media {\n    import HtmlVideo = laya.device.media.HtmlVideo;\n    /**\n     * @private\n     */\n    class WebGLVideo extends HtmlVideo {\n        constructor();\n        updateTexture(): void;\n    }\n}\ndeclare module laya.device.motion {\n    /**\n     * 加速度x/y/z的单位均为m/s²。\n     * 在硬件（陀螺仪）不支持的情况下，alpha、beta和gamma值为null。\n     *\n     * @author Survivor\n     */\n    class AccelerationInfo {\n        /**\n         * x轴上的加速度值。\n         */\n        x: number;\n        /**\n         * y轴上的加速度值。\n         */\n        y: number;\n        /**\n         * z轴上的加速度值。\n         */\n        z: number;\n        constructor();\n    }\n}\ndeclare module laya.device.motion {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * Accelerator.instance获取唯一的Accelerator引用，请勿调用构造函数。\n     *\n     * <p>\n     * listen()的回调处理器接受四个参数：\n     * <ol>\n     * <li><b>acceleration</b>: 表示用户给予设备的加速度。</li>\n     * <li><b>accelerationIncludingGravity</b>: 设备受到的总加速度（包含重力）。</li>\n     * <li><b>rotationRate</b>: 设备的自转速率。</li>\n     * <li><b>interval</b>: 加速度获取的时间间隔（毫秒）。</li>\n     * </ol>\n     * </p>\n     * <p>\n     * <b>NOTE</b><br/>\n     * 如，rotationRate的alpha在apple和moz文档中都是z轴旋转角度，但是实测是x轴旋转角度。为了使各属性表示的值与文档所述相同，实际值与其他属性进行了对调。\n     * 其中：\n     * <ul>\n     * <li>alpha使用gamma值。</li>\n     * <li>beta使用alpha值。</li>\n     * <li>gamma使用beta。</li>\n     * </ul>\n     * 目前孰是孰非尚未可知，以此为注。\n     * </p>\n     */\n    class Accelerator extends EventDispatcher {\n        static readonly instance: Accelerator;\n        constructor(singleton: number);\n        /**\n         * 侦听加速器运动。\n         * @param observer\t回调函数接受4个参数，见类说明。\n         */\n        on(type: string, caller: any, listener: Function, args?: Array<any>): EventDispatcher;\n        /**\n         * 取消侦听加速器。\n         * @param\thandle\t侦听加速器所用处理器。\n         */\n        off(type: string, caller: any, listener: Function, onceOnly?: boolean): EventDispatcher;\n        /**\n         * 把加速度值转换为视觉上正确的加速度值。依赖于Browser.window.orientation，可能在部分低端机无效。\n         * @param\tacceleration\n         * @return\n         */\n        static getTransformedAcceleration(acceleration: AccelerationInfo): AccelerationInfo;\n    }\n}\ndeclare module laya.device.motion {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * 使用Gyroscope.instance获取唯一的Gyroscope引用，请勿调用构造函数。\n     *\n     * <p>\n     * listen()的回调处理器接受两个参数：\n     * <code>function onOrientationChange(absolute:Boolean, info:RotationInfo):void</code>\n     * <ol>\n     * <li><b>absolute</b>: 指示设备是否可以提供绝对方位数据（指向地球坐标系），或者设备决定的任意坐标系。关于坐标系参见<i>https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained</i>。</li>\n     * <li><b>info</b>: <code>RotationInfo</code>类型参数，保存设备的旋转值。</li>\n     * </ol>\n     * </p>\n     *\n     * <p>\n     * 浏览器兼容性参见：<i>http://caniuse.com/#search=deviceorientation</i>\n     * </p>\n     */\n    class Gyroscope extends EventDispatcher {\n        static readonly instance: Gyroscope;\n        constructor(singleton: number);\n        /**\n         * 监视陀螺仪运动。\n         * @param\tobserver\t回调函数接受一个Boolean类型的<code>absolute</code>和<code>GyroscopeInfo</code>类型参数。\n         */\n        on(type: string, caller: any, listener: Function, args?: Array<any>): EventDispatcher;\n        /**\n         * 取消指定处理器对陀螺仪的监视。\n         * @param\tobserver\n         */\n        off(type: string, caller: any, listener: Function, onceOnly?: boolean): EventDispatcher;\n    }\n}\ndeclare module laya.device.motion {\n    /**\n     * 保存旋转信息的类。请勿修改本类的属性。\n     * @author Survivor\n     */\n    class RotationInfo {\n        /**\n         * <p>\n         * 指示设备是否可以提供绝对方位数据（指向地球坐标系），或者设备决定的任意坐标系。\n         * 关于坐标系参见<i>https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Orientation_and_motion_data_explained</i>。\n         * </p>\n         * 需要注意的是，IOS环境下，该值始终为false。即使如此，你依旧可以从<code>alpha</code>中取得正确的值。\n         */\n        absolute: boolean;\n        /**\n         * Z轴旋转角度，其值范围从0至360。\n         * 若<code>absolute</code>为true或者在IOS中，alpha值是从北方到当前设备方向的角度值。\n         */\n        alpha: number;\n        /**\n         * X轴旋转角度, 其值范围从-180至180。代表设备从前至后的运动。\n         */\n        beta: number;\n        /**\n         * Y轴旋转角度，其值范围从-90至90。代表设备从左至右的运动。\n         */\n        gamma: number;\n        /**\n         * 罗盘数据的精确度（角度）。仅IOS可用。\n         */\n        compassAccuracy: number;\n        constructor();\n    }\n}\ndeclare module laya.device {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * Shake只能在支持此操作的设备上有效。\n     *\n     * @author Survivor\n     */\n    class Shake extends EventDispatcher {\n        constructor();\n        static readonly instance: Shake;\n        /**\n         * 开始响应设备摇晃。\n         * @param\tthroushold\t响应的瞬时速度阈值，轻度摇晃的值约在5~10间。\n         * @param\ttimeout\t\t设备摇晃的响应间隔时间。\n         * @param\tcallback\t在设备摇晃触发时调用的处理器。\n         */\n        start(throushold: number, interval: number): void;\n        /**\n         * 停止响应设备摇晃。\n         */\n        stop(): void;\n    }\n}\ndeclare module laya.display {\n    import Handler = laya.utils.Handler;\n    /**\n     * <p> <code>Animation</code> 是Graphics动画类。实现了基于Graphics的动画创建、播放、控制接口。</p>\n     * <p>本类使用了动画模版缓存池，它以一定的内存开销来节省CPU开销，当相同的动画模版被多次使用时，相比于每次都创建新的动画模版，使用动画模版缓存池，只需创建一次，缓存之后多次复用，从而节省了动画模版创建的开销。</p>\n     * <p>动画模版缓存池，以key-value键值对存储，key可以自定义，也可以从指定的配置文件中读取，value为对应的动画模版，是一个Graphics对象数组，每个Graphics对象对应一个帧图像，动画的播放实质就是定时切换Graphics对象。</p>\n     * <p>使用set source、loadImages(...)、loadAtlas(...)、loadAnimation(...)方法可以创建动画模版。使用play(...)可以播放指定动画。</p>\n     * @example <caption>以下示例代码，创建了一个 <code>Text</code> 实例。</caption>\n     * package\n     * {\n     * \timport laya.display.Animation;\n     * \timport laya.net.Loader;\n     * \timport laya.utils.Handler;\n     * \tpublic class Animation_Example\n     * \t{\n     * \t\tpublic function Animation_Example()\n     * \t\t{\n     * \t\t\tLaya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     * \t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     * \t\t\tinit();//初始化\n     * \t\t}\n     * \t\tprivate function init():void\n     * \t\t{\n     * \t\t\tvar animation:Animation = new Animation();//创建一个 Animation 类的实例对象 animation 。\n     * \t\t\tanimation.loadAtlas(\"resource/ani/fighter.json\");//加载图集并播放\n     * \t\t\tanimation.x = 200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n     * \t\t\tanimation.y = 200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n     * \t\t\tanimation.interval = 50;//设置 animation 对象的动画播放间隔时间，单位：毫秒。\n     * \t\t\tanimation.play();//播放动画。\n     * \t\t\tLaya.stage.addChild(animation);//将 animation 对象添加到显示列表。\n     * \t\t}\n     * \t}\n     * }\n     *\n     * @example\n     * Animation_Example();\n     * function Animation_Example(){\n     *     Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *     Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *     init();//初始化\n     * }\n     * function init()\n     * {\n     *     var animation = new Laya.Animation();//创建一个 Animation 类的实例对象 animation 。\n     *     animation.loadAtlas(\"resource/ani/fighter.json\");//加载图集并播放\n     *     animation.x = 200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n     *     animation.y = 200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n     *     animation.interval = 50;//设置 animation 对象的动画播放间隔时间，单位：毫秒。\n     *     animation.play();//播放动画。\n     *     Laya.stage.addChild(animation);//将 animation 对象添加到显示列表。\n     * }\n     *\n     * @example\n     * import Animation = laya.display.Animation;\n     * class Animation_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         this.init();\n     *     }\n     *     private init(): void {\n     *         var animation:Animation = new Laya.Animation();//创建一个 Animation 类的实例对象 animation 。\n     *         animation.loadAtlas(\"resource/ani/fighter.json\");//加载图集并播放\n     *         animation.x = 200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n     *         animation.y = 200;//设置 animation 对象的属性 x 的值，用于控制 animation 对象的显示位置。\n     *         animation.interval = 50;//设置 animation 对象的动画播放间隔时间，单位：毫秒。\n     *         animation.play();//播放动画。\n     *         Laya.stage.addChild(animation);//将 animation 对象添加到显示列表。\n     *     }\n     * }\n     * new Animation_Example();\n     */\n    class Animation extends AnimationPlayerBase {\n        /**\n         * <p>动画模版缓存池，以key-value键值对存储，key可以自定义，也可以从指定的配置文件中读取，value为对应的动画模版，是一个Graphics对象数组，每个Graphics对象对应一个帧图像，动画的播放实质就是定时切换Graphics对象。</p>\n         * <p>使用loadImages(...)、loadAtlas(...)、loadAnimation(...)、set source方法可以创建动画模版。使用play(...)可以播放指定动画。</p>\n         */\n        static framesMap: any;\n        protected _frames: Array<any>;\n        protected _url: string;\n        /**\n         * 创建一个新的 <code>Animation</code> 实例。\n         */\n        constructor();\n        /** @inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * <p>开始播放动画。会在动画模版缓存池中查找key值为name的动画模版，存在则用此动画模版初始化当前序列帧， 如果不存在，则使用当前序列帧。</p>\n         * <p>play(...)方法被设计为在创建实例后的任何时候都可以被调用，调用后就处于播放状态，当相应的资源加载完毕、调用动画帧填充方法(set frames)或者将实例显示在舞台上时，会判断是否处于播放状态，如果是，则开始播放。</p>\n         * <p>配合wrapMode属性，可设置动画播放顺序类型。</p>\n         * @param\tstart\t（可选）指定动画播放开始的索引(int)或帧标签(String)。帧标签可以通过addLabel(...)和removeLabel(...)进行添加和删除。\n         * @param\tloop\t（可选）是否循环播放。\n         * @param\tname\t（可选）动画模板在动画模版缓存池中的key，也可认为是动画名称。如果name为空，则播放当前动画序列帧；如果不为空，则在动画模版缓存池中寻找key值为name的动画模版，如果存在则用此动画模版初始化当前序列帧并播放，如果不存在，则仍然播放当前动画序列帧；如果没有当前动画的帧数据，则不播放，但该实例仍然处于播放状态。\n         * @param\tshowWarn（可选）是否动画不存在时打印警告\n         */\n        play(start?: any, loop?: boolean, name?: string, showWarn?: boolean): void;\n        protected _setFramesFromCache(name: string, showWarn?: boolean): boolean;\n        protected _frameLoop(): void;\n        protected _displayToIndex(value: number): void;\n        /**\n         * 当前动画的帧图像数组。本类中，每个帧图像是一个Graphics对象，而动画播放就是定时切换Graphics对象的过程。\n         */\n        frames: Array<any>;\n        /**\n         * <p>动画数据源。</p>\n         * <p>类型如下：<br/>\n         * 1. LayaAir IDE动画文件路径：使用此类型需要预加载所需的图集资源，否则会创建失败，如果不想预加载或者需要创建完毕的回调，请使用loadAnimation(...)方法；<br/>\n         * 2. 图集路径：使用此类型创建的动画模版不会被缓存到动画模版缓存池中，如果需要缓存或者创建完毕的回调，请使用loadAtlas(...)方法；<br/>\n         * 3. 图片路径集合：使用此类型创建的动画模版不会被缓存到动画模版缓存池中，如果需要缓存，请使用loadImages(...)方法。</p>\n         * @param value\t数据源。比如：图集：\"xx/a1.atlas\"；图片集合：\"a1.png,a2.png,a3.png\"；LayaAir IDE动画\"xx/a1.ani\"。\n         */\n        source: string;\n        /**\n         * 设置自动播放的动画名称，在LayaAir IDE中可以创建的多个动画组成的动画集合，选择其中一个动画名称进行播放。\n         */\n        autoAnimation: string;\n        /**\n         * 是否自动播放，默认为false。如果设置为true，则动画被创建并添加到舞台后自动播放。\n         */\n        autoPlay: boolean;\n        /**\n         * 停止动画播放，并清理对象属性。之后可存入对象池，方便对象复用。\n         */\n        clear(): void;\n        /**\n         * <p>根据指定的动画模版初始化当前动画序列帧。选择动画模版的过程如下：1. 动画模版缓存池中key为cacheName的动画模版；2. 如果不存在，则加载指定的图片集合并创建动画模版。注意：只有指定不为空的cacheName，才能将创建好的动画模版以此为key缓存到动画模版缓存池，否则不进行缓存。</p>\n         * <p>动画模版缓存池是以一定的内存开销来节省CPU开销，当相同的动画模版被多次使用时，相比于每次都创建新的动画模版，使用动画模版缓存池，只需创建一次，缓存之后多次复用，从而节省了动画模版创建的开销。</p>\n         * <p>因为返回值为Animation对象本身，所以可以使用如下语法：ani.loadImages(...).loadImages(...).play(...);。</p>\n         * @param\turls\t\t图片路径集合。需要创建动画模版时，会以此为数据源。参数形如：[url1,url2,url3,...]。\n         * @param\tcacheName\t（可选）动画模板在动画模版缓存池中的key。如果此参数不为空，表示使用动画模版缓存池。如果动画模版缓存池中存在key为cacheName的动画模版，则使用此模版。否则，创建新的动画模版，如果cacheName不为空，则以cacheName为key缓存到动画模版缓存池中，如果cacheName为空，不进行缓存。\n         * @return \t返回Animation对象本身。\n         */\n        loadImages(urls: Array<any>, cacheName?: string): Animation;\n        /**\n         * <p>根据指定的动画模版初始化当前动画序列帧。选择动画模版的过程如下：1. 动画模版缓存池中key为cacheName的动画模版；2. 如果不存在，则加载指定的图集并创建动画模版。</p>\n         * <p>注意：只有指定不为空的cacheName，才能将创建好的动画模版以此为key缓存到动画模版缓存池，否则不进行缓存。</p>\n         * <p>动画模版缓存池是以一定的内存开销来节省CPU开销，当相同的动画模版被多次使用时，相比于每次都创建新的动画模版，使用动画模版缓存池，只需创建一次，缓存之后多次复用，从而节省了动画模版创建的开销。</p>\n         * <p>因为返回值为Animation对象本身，所以可以使用如下语法：ani.loadAtlas(...).loadAtlas(...).play(...);。</p>\n         * @param\turl\t\t\t图集路径。需要创建动画模版时，会以此为数据源。\n         * @param\tloaded\t\t（可选）使用指定图集初始化动画完毕的回调。\n         * @param\tcacheName\t（可选）动画模板在动画模版缓存池中的key。如果此参数不为空，表示使用动画模版缓存池。如果动画模版缓存池中存在key为cacheName的动画模版，则使用此模版。否则，创建新的动画模版，如果cacheName不为空，则以cacheName为key缓存到动画模版缓存池中，如果cacheName为空，不进行缓存。\n         * @return \t返回动画本身。\n         */\n        loadAtlas(url: string, loaded?: Handler, cacheName?: string): Animation;\n        /**\n         * <p>加载并解析由LayaAir IDE制作的动画文件，此文件中可能包含多个动画。默认帧率为在IDE中设计的帧率，如果调用过set interval，则使用此帧间隔对应的帧率。加载后创建动画模版，并缓存到动画模版缓存池，key \"url#动画名称\" 对应相应动画名称的动画模板，key \"url#\" 对应动画模版集合的默认动画模版。</p>\n         * <p>注意：如果调用本方法前，还没有预加载动画使用的图集，请将atlas参数指定为对应的图集路径，否则会导致动画创建失败。</p>\n         * <p>动画模版缓存池是以一定的内存开销来节省CPU开销，当相同的动画模版被多次使用时，相比于每次都创建新的动画模版，使用动画模版缓存池，只需创建一次，缓存之后多次复用，从而节省了动画模版创建的开销。</p>\n         * <p>因为返回值为Animation对象本身，所以可以使用如下语法：ani.loadAnimation(...).loadAnimation(...).play(...);。</p>\n         * @param\turl \t动画文件路径。可由LayaAir IDE创建并发布。\n         * @param\tloaded\t（可选）使用指定动画资源初始化动画完毕的回调。\n         * @param\tatlas\t（可选）动画用到的图集地址（可选）。\n         * @return \t返回动画本身。\n         */\n        loadAnimation(url: string, loaded?: Handler, atlas?: string): Animation;\n        protected _parseGraphicAnimation(animationData: any): any;\n        protected _parseGraphicAnimationByData(animationObject: any): any;\n        /**\n         * <p>创建动画模板，多个动画可共享同一份动画模板，而不必每次都创建一份新的，从而节省创建Graphics集合的开销。</p>\n         * @param\turl\t\t\t图集路径或者图片路径数组。如果是图集路径，需要相应图集已经被预加载，如果没有预加载，会导致创建失败。\n         * @param\tname\t\t动画模板在动画模版缓存池中的key。如果不为空，则以此为key缓存动画模板，否则不缓存。\n         * @return\t动画模板。\n         */\n        static createFrames(url: any, name: string): Array<any>;\n        /**\n         * <p>从动画模版缓存池中清除指定key值的动画数据。</p>\n         * <p>开发者在调用创建动画模版函数时，可以手动指定此值。而如果是由LayaAir IDE创建的动画集，解析后的key格式为：\"url#\"：表示动画集的默认动画模版，如果以此值为参数，会清除整个动画集数据；\"url#aniName\"：表示相应名称的动画模版。</p>\n         * @param key 动画模板在动画模版缓存池中的key。\n         */\n        static clearCache(key: string): void;\n    }\n}\ndeclare module laya.display {\n    /**\n     * <p>动画播放基类，提供了基础的动画播放控制方法和帧标签事件相关功能。</p>\n     * <p>可以继承此类，但不要直接实例化此类，因为有些方法需要由子类实现。</p>\n     */\n    class AnimationPlayerBase extends Sprite {\n        /**动画播放顺序类型：正序播放。 */\n        static WRAP_POSITIVE: number;\n        /**动画播放顺序类型：逆序播放。 */\n        static WRAP_REVERSE: number;\n        /**动画播放顺序类型：pingpong播放(当按指定顺序播放完结尾后，如果继续播发，则会改变播放顺序)。 */\n        static WRAP_PINGPONG: number;\n        /**\n         * 是否循环播放，调用play(...)方法时，会将此值设置为指定的参数值。\n         */\n        loop: boolean;\n        /**\n         * <p>播放顺序类型：AnimationPlayerBase.WRAP_POSITIVE为正序播放，AnimationPlayerBase.WRAP_REVERSE为倒序播放，AnimationPlayerBase.WRAP_PINGPONG为pingpong播放(当按指定顺序播放完结尾后，如果继续播发，则会改变播放顺序)。</p>\n         * <p>默认为正序播放。</p>\n         */\n        wrapMode: number;\n        protected _interval: number;\n        protected _index: number;\n        protected _count: number;\n        protected _isPlaying: boolean;\n        protected _labels: any;\n        protected _isReverse: boolean;\n        protected _frameRateChanged: boolean;\n        protected _actionName: string;\n        /**\n         * 可以继承此类，但不要直接实例化此类，因为有些方法需要由子类实现。\n         */\n        constructor();\n        /**\n         * <p>开始播放动画。play(...)方法被设计为在创建实例后的任何时候都可以被调用，当相应的资源加载完毕、调用动画帧填充方法(set frames)或者将实例显示在舞台上时，会判断是否正在播放中，如果是，则进行播放。</p>\n         * <p>配合wrapMode属性，可设置动画播放顺序类型。</p>\n         * @param\tstart\t（可选）指定动画播放开始的索引(int)或帧标签(String)。帧标签可以通过addLabel(...)和removeLabel(...)进行添加和删除。\n         * @param\tloop\t（可选）是否循环播放。\n         * @param\tname\t（可选）动画名称。\n         * @param\tshowWarn（可选）是否动画不存在时打印警告\n         */\n        play(start?: any, loop?: boolean, name?: string, showWarn?: boolean): void;\n        /**\n         * <p>动画播放的帧间隔时间(单位：毫秒)。默认值依赖于Config.animationInterval=50，通过Config.animationInterval可以修改默认帧间隔时间。</p>\n         * <p>要想为某动画设置独立的帧间隔时间，可以使用set interval，注意：如果动画正在播放，设置后会重置帧循环定时器的起始时间为当前时间，也就是说，如果频繁设置interval，会导致动画帧更新的时间间隔会比预想的要慢，甚至不更新。</p>\n         */\n        interval: number;\n        protected _getFrameByLabel(label: string): number;\n        protected _frameLoop(): void;\n        _setControlNode(node: Sprite): void;\n        _setDisplay(value: boolean): void;\n        protected _checkResumePlaying(): void;\n        /**\n         * 停止动画播放。\n         */\n        stop(): void;\n        /**\n         * 是否正在播放中。\n         */\n        readonly isPlaying: boolean;\n        /**\n         * 增加一个帧标签到指定索引的帧上。当动画播放到此索引的帧时会派发Event.LABEL事件，派发事件是在完成当前帧画面更新之后。\n         * @param\tlabel\t帧标签名称\n         * @param\tindex\t帧索引\n         */\n        addLabel(label: string, index: number): void;\n        /**\n         * 删除指定的帧标签。\n         * @param\tlabel 帧标签名称。注意：如果为空，则删除所有帧标签！\n         */\n        removeLabel(label: string): void;\n        /**\n         * 将动画切换到指定帧并停在那里。\n         * @param\tposition 帧索引或帧标签\n         */\n        gotoAndStop(position: any): void;\n        /**\n         * 动画当前帧的索引。\n         */\n        index: number;\n        protected _displayToIndex(value: number): void;\n        /**\n         * 当前动画中帧的总数。\n         */\n        readonly count: number;\n        /**\n         * 停止动画播放，并清理对象属性。之后可存入对象池，方便对象复用。\n         */\n        clear(): void;\n    }\n}\ndeclare module laya.display {\n    import Texture = laya.resource.Texture;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>BitmapFont</code> 是位图字体类，用于定义位图字体信息。\n     */\n    class BitmapFont {\n        protected _texture: Texture;\n        protected _fontCharDic: any;\n        protected _fontWidthMap: any;\n        protected _complete: Handler;\n        protected _path: string;\n        protected _maxWidth: number;\n        protected _spaceWidth: number;\n        protected _padding: Array<any>;\n        /**当前位图字体字号。*/\n        fontSize: number;\n        /**表示是否根据实际使用的字体大小缩放位图字体大小。*/\n        autoScaleSize: boolean;\n        /**字符间距（以像素为单位）。*/\n        letterSpacing: number;\n        /**\n         * 通过指定位图字体文件路径，加载位图字体文件，加载完成后会自动解析。\n         * @param\tpath\t\t位图字体文件的路径。\n         * @param\tcomplete\t加载并解析完成的回调。如果成功返回this,如果失败返回null\n         */\n        loadFont(path: string, complete: Handler): void;\n        protected onLoaded(): void;\n        /**\n         * 解析字体文件。\n         * @param\txml\t\t\t字体文件XML。\n         * @param\ttexture\t\t字体的纹理。\n         */\n        parseFont(xml: any, texture: Texture): void;\n        /**\n         * @private\n         * 解析字体文件。\n         * @param\txml\t\t\t字体文件XML。\n         * @param\ttexture\t\t字体的纹理。\n         */\n        parseFont2(xml: any, texture: Texture): void;\n        /**\n         * 获取指定字符的字体纹理对象。\n         * @param\tchar 字符。\n         * @return 指定的字体纹理对象。\n         */\n        getCharTexture(char: string): Texture;\n        /**\n         * 销毁位图字体，调用Text.unregisterBitmapFont 时，默认会销毁。\n         */\n        destroy(): void;\n        /**\n         * 设置空格的宽（如果字体库有空格，这里就可以不用设置了）。\n         * @param\tspaceWidth 宽度，单位为像素。\n         */\n        setSpaceWidth(spaceWidth: number): void;\n        /**\n         * 获取指定字符的宽度。\n         * @param\tchar 字符。\n         * @return  宽度。\n         */\n        getCharWidth(char: string): number;\n        /**\n         * 获取指定文本内容的宽度。\n         * @param\ttext 文本内容。\n         * @return  宽度。\n         */\n        getTextWidth(text: string): number;\n        /**\n         * 获取最大字符宽度。\n         */\n        getMaxWidth(): number;\n        /**\n         * 获取最大字符高度。\n         */\n        getMaxHeight(): number;\n        /**\n         * @private\n         * 将指定的文本绘制到指定的显示对象上。\n         */\n        drawText(text: string, sprite: Sprite, drawX: number, drawY: number, align: string, width: number): void;\n    }\n}\ndeclare module laya.display.css {\n    import Sprite = laya.display.Sprite;\n    import Style = laya.display.css.Style;\n    import URL = laya.net.URL;\n    import RenderContext = laya.renders.RenderContext;\n    /**\n     * @private\n     * <code>CSSStyle</code> 类是元素CSS样式定义类。\n     */\n    class CSSStyle extends Style {\n        static EMPTY: CSSStyle;\n        /**\n         * 样式表信息。\n         */\n        static styleSheets: any;\n        /**水平居中对齐方式。 */\n        static ALIGN_CENTER: number;\n        /**水平居右对齐方式。 */\n        static ALIGN_RIGHT: number;\n        /**垂直居中对齐方式。 */\n        static VALIGN_MIDDLE: number;\n        /**垂直居底部对齐方式。 */\n        static VALIGN_BOTTOM: number;\n        /**添加布局。 */\n        static ADDLAYOUTED: number;\n        underLine: number;\n        /**\n         * 是否显示为块级元素。\n         */\n        block: boolean;\n        /**行高。 */\n        lineHeight: number;\n        /**\n         * 创建一个新的 <code>CSSStyle</code> 类实例。\n         * @param\tower 当前 CSSStyle 对象的拥有者。\n         */\n        constructor(ower: Sprite);\n        /**@inheritDoc\t */\n        destroy(): void;\n        /**\n         * 复制传入的 CSSStyle 属性值。\n         * @param\tsrc 待复制的 CSSStyle 对象。\n         */\n        inherit(src: CSSStyle): void;\n        _widthAuto(): boolean;\n        /**@inheritDoc\t */\n        widthed(sprite: any): boolean;\n        /**\n         * @private\n         */\n        _calculation(type: string, value: string): boolean;\n        /**\n         * 宽度。\n         */\n        width: any;\n        /**\n         * 高度。\n         */\n        height: any;\n        /**\n         * 是否已设置高度。\n         * @param\tsprite 显示对象 Sprite。\n         * @return 一个Boolean 表示是否已设置高度。\n         */\n        heighted(sprite: any): boolean;\n        /**\n         * 设置宽高。\n         * @param\tw 宽度。\n         * @param\th 高度。\n         */\n        size(w: number, h: number): void;\n        /**\n         * 表示左边距。\n         */\n        left: any;\n        /**\n         * 表示上边距。\n         */\n        top: any;\n        /**\n         * 边距信息。\n         */\n        padding: Array<any>;\n        /**\n         * 是否是行元素。\n         */\n        lineElement: boolean;\n        /**\n         * 水平对齐方式。\n         */\n        align: string;\n        _getAlign(): number;\n        /**\n         * 垂直对齐方式。\n         */\n        valign: string;\n        _getValign(): number;\n        /**\n         * 浮动方向。\n         */\n        cssFloat: string;\n        _getCssFloat(): number;\n        /**\n         * 设置如何处理元素内的空白。\n         */\n        whiteSpace: string;\n        /**\n         * 表示是否换行。\n         */\n        wordWrap: boolean;\n        /**\n         * 表示是否加粗。\n         */\n        bold: boolean;\n        /**\n         * <p>指定文本字段是否是密码文本字段。</p>\n         * 如果此属性的值为 true，则文本字段被视为密码文本字段，并使用星号而不是实际字符来隐藏输入的字符。如果为 false，则不会将文本字段视为密码文本字段。\n         */\n        password: boolean;\n        /**\n         * 字体信息。\n         */\n        font: string;\n        /**\n         * 文本的粗细。\n         */\n        weight: string;\n        /**\n         * 间距。\n         */\n        letterSpacing: number;\n        /**\n         * 字体大小。\n         */\n        fontSize: number;\n        /**\n         * 行间距。\n         */\n        leading: number;\n        /**\n         * 表示是否为斜体。\n         */\n        italic: boolean;\n        /**\n         * 字体系列。\n         */\n        fontFamily: string;\n        /**\n         * 字体粗细。\n         */\n        fontWeight: string;\n        /**\n         * 添加到文本的修饰。\n         */\n        textDecoration: string;\n        /**\n         * 字体颜色。\n         */\n        color: string;\n        /**\n         * <p>描边宽度（以像素为单位）。</p>\n         * 默认值0，表示不描边。\n         * @default 0\n         */\n        stroke: number;\n        /**\n         * <p>描边颜色，以字符串表示。</p>\n         * @default \"#000000\";\n         */\n        strokeColor: string;\n        /**\n         * 边框属性，比如border=\"5px solid red\"\n         */\n        border: string;\n        /**\n         * 边框的颜色。\n         */\n        borderColor: string;\n        /**\n         * 背景颜色。\n         */\n        backgroundColor: string;\n        background: string;\n        /**@inheritDoc\t */\n        render(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        /**@inheritDoc\t */\n        getCSSStyle(): CSSStyle;\n        /**\n         * 设置 CSS 样式字符串。\n         * @param\ttext CSS样式字符串。\n         */\n        cssText(text: string): void;\n        /**\n         * 根据传入的属性名、属性值列表，设置此对象的属性值。\n         * @param\tattrs 属性名与属性值列表。\n         */\n        attrs(attrs: Array<any>): void;\n        /**\n         * 元素的定位类型。\n         */\n        position: string;\n        /**@inheritDoc\t */\n        readonly absolute: boolean;\n        /**\n         * 规定元素应该生成的框的类型。\n         */\n        display: string;\n        /**@inheritDoc\t */\n        setTransform(value: any): void;\n        /**@inheritDoc\t */\n        readonly paddingLeft: number;\n        /**@inheritDoc\t */\n        readonly paddingTop: number;\n        /**\n         * 定义 X 轴、Y 轴移动转换。\n         * @param\tx X 轴平移量。\n         * @param\ty Y 轴平移量。\n         */\n        translate(x: number, y: number): void;\n        /**\n         * 定义 缩放转换。\n         * @param\tx X 轴缩放值。\n         * @param\ty Y 轴缩放值。\n         */\n        scale(x: number, y: number): void;\n        _enableLayout(): boolean;\n        /**\n         * 通过传入的分割符，分割解析CSS样式字符串，返回样式列表。\n         * @param\ttext CSS样式字符串。\n         * @param\tclipWord 分割符；\n         * @return 样式列表。\n         */\n        static parseOneCSS(text: string, clipWord: string): Array<any>;\n        /**\n         * 解析 CSS 样式文本。\n         * @param\ttext CSS 样式文本。\n         * @param\turi URL对象。\n         * @internal 此处需要再详细点注释。\n         */\n        static parseCSS(text: string, uri: URL): void;\n    }\n}\ndeclare module laya.display.css {\n    /**\n     * @private\n     * <code>Font</code> 类是字体显示定义类。\n     */\n    class Font {\n        /**\n         * 一个默认字体 <code>Font</code> 对象。\n         */\n        static EMPTY: Font;\n        /**\n         * 默认的颜色。\n         */\n        static defaultColor: string;\n        /**\n         * 默认字体大小。\n         */\n        static defaultSize: number;\n        /**\n         * 默认字体名称系列。\n         */\n        static defaultFamily: string;\n        /**\n         * 默认字体属性。\n         */\n        static defaultFont: string;\n        static _STROKE: Array<any>;\n        static __init__(): void;\n        /**\n         * 字体名称系列。\n         */\n        family: string;\n        /**\n         * 描边宽度（以像素为单位）列表。\n         */\n        stroke: Array<any>;\n        /**\n         * 首行缩进 （以像素为单位）。\n         */\n        indent: number;\n        /**\n         * 字体大小。\n         */\n        size: number;\n        /**\n         * 创建一个新的 <code>Font</code> 类实例。\n         * @param\tsrc 将此 Font 的成员属性值复制给当前 Font 对象。\n         */\n        constructor(src: Font);\n        /**\n         * 字体样式字符串。\n         */\n        set(value: string): void;\n        /**\n         * 表示颜色字符串。\n         */\n        color: string;\n        /**\n         * 表示是否为斜体。\n         */\n        italic: boolean;\n        /**\n         * 表示是否为粗体。\n         */\n        bold: boolean;\n        /**\n         * 表示是否为密码格式。\n         */\n        password: boolean;\n        /**\n         * 返回字体样式字符串。\n         * @return 字体样式字符串。\n         */\n        toString(): string;\n        /**\n         * 文本的粗细。\n         */\n        weight: string;\n        /**\n         * 规定添加到文本的修饰。\n         */\n        decoration: string;\n        /**\n         * 将当前的属性值复制到传入的 <code>Font</code> 对象。\n         * @param\tdec  一个 Font 对象。\n         */\n        copyTo(dec: Font): void;\n    }\n}\ndeclare module laya.display.css {\n    import Sprite = laya.display.Sprite;\n    import CSSStyle = laya.display.css.CSSStyle;\n    import Rectangle = laya.maths.Rectangle;\n    import RenderContext = laya.renders.RenderContext;\n    /**\n     * @private\n     * <code>Style</code> 类是元素样式定义类。\n     */\n    class Style {\n        /** 一个默认样式 <code>Style</code> 对象。*/\n        static EMPTY: Style;\n        protected static _TF_EMPTY: TransformInfo;\n        _tf: TransformInfo;\n        /**透明度。*/\n        alpha: number;\n        /**表示是否显示。*/\n        visible: boolean;\n        /**表示滚动区域。*/\n        scrollRect: Rectangle;\n        /**混合模式。*/\n        blendMode: string;\n        _type: number;\n        static __init__(): void;\n        /**元素应用的 2D 或 3D 转换的值。该属性允许我们对元素进行旋转、缩放、移动或倾斜。*/\n        transform: any;\n        getTransform(): any;\n        setTransform(value: any): void;\n        /**定义转换，只是用 X 轴的值。*/\n        translateX: number;\n        setTranslateX(value: number): void;\n        /**定义转换，只是用 Y 轴的值。*/\n        translateY: number;\n        setTranslateY(value: number): void;\n        /**X 轴缩放值。*/\n        scaleX: number;\n        setScaleX(value: number): void;\n        setScale(x: number, y: number): void;\n        /**Y 轴缩放值。*/\n        scaleY: number;\n        setScaleY(value: number): void;\n        /**定义旋转角度。*/\n        rotate: number;\n        setRotate(value: number): void;\n        /**定义沿着 X 轴的 2D 倾斜转换。*/\n        skewX: number;\n        setSkewX(value: number): void;\n        /**定义沿着 Y 轴的 2D 倾斜转换。*/\n        skewY: number;\n        setSkewY(value: number): void;\n        /**表示元素是否显示为块级元素。*/\n        readonly block: boolean;\n        /**表示元素的左内边距。*/\n        readonly paddingLeft: number;\n        /**表示元素的上内边距。*/\n        readonly paddingTop: number;\n        /**是否为绝对定位。*/\n        readonly absolute: boolean;\n        /**销毁此对象。*/\n        destroy(): void;\n        render(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        getCSSStyle(): CSSStyle;\n        _enableLayout(): boolean;\n    }\n}\ndeclare module laya.display.css {\n    /**\n     * @private\n     */\n    class TransformInfo {\n        translateX: number;\n        translateY: number;\n        scaleX: number;\n        scaleY: number;\n        rotate: number;\n        skewX: number;\n        skewY: number;\n    }\n}\ndeclare module laya.display {\n    /**\n     * <p> 动效模板。用于为指定目标对象添加动画效果。每个动效有唯一的目标对象，而同一个对象可以添加多个动效。 当一个动效开始播放时，其他动效会自动停止播放。</p>\n     * <p> 可以通过LayaAir IDE创建。 </p>\n     */\n    class EffectAnimation extends FrameAnimation {\n        /**\n         * 动效开始事件。\n         */\n        static EffectAnimationBegin: string;\n        /**\n         * 本实例的目标对象。通过本实例控制目标对象的属性变化。\n         * @param v 指定的目标对象。\n         */\n        target: any;\n        /**\n         * 设置开始播放的事件。本实例会侦听目标对象的指定事件，触发后播放相应动画效果。\n         * @param event\n         */\n        playEvent: string;\n        play(start?: any, loop?: boolean, name?: string, showWarn?: boolean): void;\n        /**\n         * 设置提供数据的类。\n         * @param classStr 类路径\n         */\n        effectClass: string;\n        /**\n         * 设置动画数据。\n         * @param uiData\n         */\n        effectData: any;\n        protected _displayToIndex(value: number): void;\n        protected _displayNodeToFrame(node: any, frame: number, targetDic?: any): void;\n        protected _calculateNodeKeyFrames(node: any): void;\n    }\n}\ndeclare module laya.display {\n    /**\n     * 关键帧动画播放类。\n     */\n    class FrameAnimation extends AnimationPlayerBase {\n        constructor();\n        /**\n         * @private\n         * id对象表\n         */\n        _targetDic: any;\n        /**\n         * @private\n         * 动画数据\n         */\n        _animationData: any;\n        protected _animationNewFrames: Array<any>;\n        /**\n         * @private\n         * 初始化动画数据\n         * @param targetDic 对象表\n         * @param animationData 动画数据\n         *\n         */\n        _setUp(targetDic: any, animationData: any): void;\n        /**@inheritDoc */\n        clear(): void;\n        protected _displayToIndex(value: number): void;\n        protected _displayNodeToFrame(node: any, frame: number, targetDic?: any): void;\n        protected _calculateNodeKeyFrames(node: any): void;\n        /**\n         * 将动画控制对象还原到动画控制之前的状态\n         */\n        resetToInitState(): void;\n    }\n}\ndeclare module laya.display {\n    import Matrix = laya.maths.Matrix;\n    import Point = laya.maths.Point;\n    import Rectangle = laya.maths.Rectangle;\n    import RenderContext = laya.renders.RenderContext;\n    import Texture = laya.resource.Texture;\n    /**\n     * <code>Graphics</code> 类用于创建绘图显示对象。Graphics可以同时绘制多个位图或者矢量图，还可以结合save，restore，transform，scale，rotate，translate，alpha等指令对绘图效果进行变化。\n     * Graphics以命令流方式存储，可以通过cmds属性访问所有命令流。Graphics是比Sprite更轻量级的对象，合理使用能提高应用性能(比如把大量的节点绘图改为一个节点的Graphics命令集合，能减少大量节点创建消耗)。\n     * @see laya.display.Sprite#graphics\n     */\n    class Graphics {\n        _sp: Sprite;\n        _one: Array<any>;\n        _render: Function;\n        static __init__(): void;\n        /**\n         * 创建一个新的 <code>Graphics</code> 类实例。\n         */\n        constructor();\n        /**\n         * <p>销毁此对象。</p>\n         */\n        destroy(): void;\n        /**\n         * <p>清空绘制命令。</p>\n         * @param recoverCmds 是否回收绘图指令\n         */\n        clear(recoverCmds?: boolean): void;\n        /**\n         * @private\n         * 重绘此对象。\n         */\n        _repaint(): void;\n        _isOnlyOne(): boolean;\n        /**\n         * @private\n         * 命令流。存储了所有绘制命令。\n         */\n        cmds: Array<any>;\n        /**\n         * 获取位置及宽高信息矩阵(比较耗CPU，频繁使用会造成卡顿，尽量少用)。\n         * @param realSize\t（可选）使用图片的真实大小，默认为false\n         * @return 位置与宽高组成的 一个 Rectangle 对象。\n         */\n        getBounds(realSize?: boolean): Rectangle;\n        /**\n         * @private\n         * @param realSize\t（可选）使用图片的真实大小，默认为false\n         * 获取端点列表。\n         */\n        getBoundPoints(realSize?: boolean): Array<any>;\n        setFilters(fs: Array<any>): void;\n        /**\n         * 绘制纹理。\n         * @param tex\t\t纹理。\n         * @param x \t\t（可选）X轴偏移量。\n         * @param y \t\t（可选）Y轴偏移量。\n         * @param width\t\t（可选）宽度。\n         * @param height\t（可选）高度。\n         * @param m\t\t\t（可选）矩阵信息。\n         * @param alpha\t\t（可选）透明度。\n         */\n        drawTexture(tex: Texture, x?: number, y?: number, width?: number, height?: number, m?: Matrix, alpha?: number): Array<any>;\n        /**\n         * @private 清理贴图并替换为最新的\n         * @param tex\n         */\n        cleanByTexture(tex: Texture, x: number, y: number, width?: number, height?: number): void;\n        /**\n         * 批量绘制同样纹理。\n         * @param tex 纹理。\n         * @param pos 绘制坐标。\n         */\n        drawTextures(tex: Texture, pos: Array<any>): void;\n        /**\n         * 用texture填充。\n         * @param tex\t\t纹理。\n         * @param x\t\t\tX轴偏移量。\n         * @param y\t\t\tY轴偏移量。\n         * @param width\t\t（可选）宽度。\n         * @param height\t（可选）高度。\n         * @param type\t\t（可选）填充类型 repeat|repeat-x|repeat-y|no-repeat\n         * @param offset\t（可选）贴图纹理偏移\n         */\n        fillTexture(tex: Texture, x: number, y: number, width?: number, height?: number, type?: string, offset?: Point): void;\n        /**\n         * 填充一个圆形。这是一个临时函数，以后会删除，建议用户自己实现。\n         * @param\tx\n         * @param\ty\n         * @param\ttex\n         * @param\tcx\t\t圆心位置。\n         * @param\tcy\n         * @param\tradius\n         * @param\tsegNum\t分段数，越大越平滑。\n         */\n        fillCircle(x: number, y: number, tex: Texture, cx: number, cy: number, radius: number, segNum: number): void;\n        /**\n         * 绘制一组三角形\n         * @param texture\t纹理。\n         * @param x\t\t\tX轴偏移量。\n         * @param y\t\t\tY轴偏移量。\n         * @param vertices  顶点数组。\n         * @param indices\t顶点索引。\n         * @param uvData\tUV数据。\n         * @param matrix\t缩放矩阵。\n         * @param alpha\t\talpha\n         * @param color\t\t颜色变换\n         * @param blendMode\tblend模式\n         */\n        drawTriangles(texture: Texture, x: number, y: number, vertices: Float32Array, uvs: Float32Array, indices: Uint16Array, matrix?: Matrix, alpha?: number, color?: string, blendMode?: string): void;\n        /**\n         * @private\n         * 保存到命令流。\n         */\n        _saveToCmd(fun: Function, args: Array<any>): Array<any>;\n        /**\n         * 设置剪裁区域，超出剪裁区域的坐标不显示。\n         * @param x X 轴偏移量。\n         * @param y Y 轴偏移量。\n         * @param width 宽度。\n         * @param height 高度。\n         */\n        clipRect(x: number, y: number, width: number, height: number): void;\n        /**\n         * 在画布上绘制文本。\n         * @param text 在画布上输出的文本。\n         * @param x 开始绘制文本的 x 坐标位置（相对于画布）。\n         * @param y 开始绘制文本的 y 坐标位置（相对于画布）。\n         * @param font 定义字号和字体，比如\"20px Arial\"。\n         * @param color 定义文本颜色，比如\"#ff0000\"。\n         * @param textAlign 文本对齐方式，可选值：\"left\"，\"center\"，\"right\"。\n         */\n        fillText(text: string, x: number, y: number, font: string, color: string, textAlign: string, underLine?: number): void;\n        /**\n         * 在画布上绘制“被填充且镶边的”文本。\n         * @param text\t\t\t在画布上输出的文本。\n         * @param x\t\t\t\t开始绘制文本的 x 坐标位置（相对于画布）。\n         * @param y\t\t\t\t开始绘制文本的 y 坐标位置（相对于画布）。\n         * @param font\t\t\t定义字体和字号，比如\"20px Arial\"。\n         * @param fillColor\t\t定义文本颜色，比如\"#ff0000\"。\n         * @param borderColor\t定义镶边文本颜色。\n         * @param lineWidth\t\t镶边线条宽度。\n         * @param textAlign\t\t文本对齐方式，可选值：\"left\"，\"center\"，\"right\"。\n         */\n        fillBorderText(text: any, x: number, y: number, font: string, fillColor: string, borderColor: string, lineWidth: number, textAlign: string): void;\n        /**\n         * 在画布上绘制文本（没有填色）。文本的默认颜色是黑色。\n         * @param text\t\t在画布上输出的文本。\n         * @param x\t\t\t开始绘制文本的 x 坐标位置（相对于画布）。\n         * @param y\t\t\t开始绘制文本的 y 坐标位置（相对于画布）。\n         * @param font\t\t定义字体和字号，比如\"20px Arial\"。\n         * @param color\t\t定义文本颜色，比如\"#ff0000\"。\n         * @param lineWidth\t线条宽度。\n         * @param textAlign\t文本对齐方式，可选值：\"left\"，\"center\"，\"right\"。\n         */\n        strokeText(text: any, x: number, y: number, font: string, color: string, lineWidth: number, textAlign: string): void;\n        /**\n         * 设置透明度。\n         * @param value 透明度。\n         */\n        alpha(value: number): void;\n        /**\n         * 设置当前透明度。\n         * @param\tvalue 透明度。\n         */\n        setAlpha(value: number): void;\n        /**\n         * 替换绘图的当前转换矩阵。\n         * @param mat 矩阵。\n         * @param pivotX\t（可选）水平方向轴心点坐标。\n         * @param pivotY\t（可选）垂直方向轴心点坐标。\n         */\n        transform(matrix: Matrix, pivotX?: number, pivotY?: number): void;\n        /**\n         * 旋转当前绘图。(推荐使用transform，性能更高)\n         * @param angle\t\t旋转角度，以弧度计。\n         * @param pivotX\t（可选）水平方向轴心点坐标。\n         * @param pivotY\t（可选）垂直方向轴心点坐标。\n         */\n        rotate(angle: number, pivotX?: number, pivotY?: number): void;\n        /**\n         * 缩放当前绘图至更大或更小。(推荐使用transform，性能更高)\n         * @param scaleX\t水平方向缩放值。\n         * @param scaleY\t垂直方向缩放值。\n         * @param pivotX\t（可选）水平方向轴心点坐标。\n         * @param pivotY\t（可选）垂直方向轴心点坐标。\n         */\n        scale(scaleX: number, scaleY: number, pivotX?: number, pivotY?: number): void;\n        /**\n         * 重新映射画布上的 (0,0) 位置。\n         * @param x 添加到水平坐标（x）上的值。\n         * @param y 添加到垂直坐标（y）上的值。\n         */\n        translate(x: number, y: number): void;\n        /**\n         * 保存当前环境的状态。\n         */\n        save(): void;\n        /**\n         * 返回之前保存过的路径状态和属性。\n         */\n        restore(): void;\n        /**\n         * @private\n         * 替换文本内容。\n         * @param text 文本内容。\n         * @return 替换成功则值为true，否则值为flase。\n         */\n        replaceText(text: string): boolean;\n        /**\n         * @private\n         * 替换文本颜色。\n         * @param color 颜色。\n         */\n        replaceTextColor(color: string): void;\n        /**\n         * 加载并显示一个图片。\n         * @param url\t\t图片地址。\n         * @param x\t\t\t（可选）显示图片的x位置。\n         * @param y\t\t\t（可选）显示图片的y位置。\n         * @param width\t\t（可选）显示图片的宽度，设置为0表示使用图片默认宽度。\n         * @param height\t（可选）显示图片的高度，设置为0表示使用图片默认高度。\n         * @param complete\t（可选）加载完成回调。\n         */\n        loadImage(url: string, x?: number, y?: number, width?: number, height?: number, complete?: Function): void;\n        /**\n         * @private\n         */\n        _renderEmpty(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        /**\n         * @private\n         */\n        _renderAll(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        /**\n         * @private\n         */\n        _renderOne(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        /**\n         * @private\n         */\n        _renderOneImg(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        /**\n         * 绘制一条线。\n         * @param fromX\t\tX轴开始位置。\n         * @param fromY\t\tY轴开始位置。\n         * @param toX\t\tX轴结束位置。\n         * @param toY\t\tY轴结束位置。\n         * @param lineColor\t颜色。\n         * @param lineWidth\t（可选）线条宽度。\n         */\n        drawLine(fromX: number, fromY: number, toX: number, toY: number, lineColor: string, lineWidth?: number): void;\n        /**\n         * 绘制一系列线段。\n         * @param x\t\t\t开始绘制的X轴位置。\n         * @param y\t\t\t开始绘制的Y轴位置。\n         * @param points\t线段的点集合。格式:[x1,y1,x2,y2,x3,y3...]。\n         * @param lineColor\t线段颜色，或者填充绘图的渐变对象。\n         * @param lineWidth\t（可选）线段宽度。\n         */\n        drawLines(x: number, y: number, points: Array<any>, lineColor: any, lineWidth?: number): void;\n        /**\n         * 绘制一系列曲线。\n         * @param x\t\t\t开始绘制的 X 轴位置。\n         * @param y\t\t\t开始绘制的 Y 轴位置。\n         * @param points\t线段的点集合，格式[startx,starty,ctrx,ctry,startx,starty...]。\n         * @param lineColor\t线段颜色，或者填充绘图的渐变对象。\n         * @param lineWidth\t（可选）线段宽度。\n         */\n        drawCurves(x: number, y: number, points: Array<any>, lineColor: any, lineWidth?: number): void;\n        /**\n         * 绘制矩形。\n         * @param x\t\t\t开始绘制的 X 轴位置。\n         * @param y\t\t\t开始绘制的 Y 轴位置。\n         * @param width\t\t矩形宽度。\n         * @param height\t矩形高度。\n         * @param fillColor\t填充颜色，或者填充绘图的渐变对象。\n         * @param lineColor\t（可选）边框颜色，或者填充绘图的渐变对象。\n         * @param lineWidth\t（可选）边框宽度。\n         */\n        drawRect(x: number, y: number, width: number, height: number, fillColor: any, lineColor?: any, lineWidth?: number): void;\n        /**\n         * 绘制圆形。\n         * @param x\t\t\t圆点X 轴位置。\n         * @param y\t\t\t圆点Y 轴位置。\n         * @param radius\t半径。\n         * @param fillColor\t填充颜色，或者填充绘图的渐变对象。\n         * @param lineColor\t（可选）边框颜色，或者填充绘图的渐变对象。\n         * @param lineWidth\t（可选）边框宽度。\n         */\n        drawCircle(x: number, y: number, radius: number, fillColor: any, lineColor?: any, lineWidth?: number): void;\n        /**\n         * 绘制扇形。\n         * @param x\t\t\t\t开始绘制的 X 轴位置。\n         * @param y\t\t\t\t开始绘制的 Y 轴位置。\n         * @param radius\t\t扇形半径。\n         * @param startAngle\t开始角度。\n         * @param endAngle\t\t结束角度。\n         * @param fillColor\t\t填充颜色，或者填充绘图的渐变对象。\n         * @param lineColor\t\t（可选）边框颜色，或者填充绘图的渐变对象。\n         * @param lineWidth\t\t（可选）边框宽度。\n         */\n        drawPie(x: number, y: number, radius: number, startAngle: number, endAngle: number, fillColor: any, lineColor?: any, lineWidth?: number): void;\n        /**\n         * 绘制多边形。\n         * @param x\t\t\t开始绘制的 X 轴位置。\n         * @param y\t\t\t开始绘制的 Y 轴位置。\n         * @param points\t多边形的点集合。\n         * @param fillColor\t填充颜色，或者填充绘图的渐变对象。\n         * @param lineColor\t（可选）边框颜色，或者填充绘图的渐变对象。\n         * @param lineWidth\t（可选）边框宽度。\n         */\n        drawPoly(x: number, y: number, points: Array<any>, fillColor: any, lineColor?: any, lineWidth?: number): void;\n        /**\n         * 绘制路径。\n         * @param x\t\t开始绘制的 X 轴位置。\n         * @param y\t\t开始绘制的 Y 轴位置。\n         * @param paths\t路径集合，路径支持以下格式：[[\"moveTo\",x,y],[\"lineTo\",x,y,x,y,x,y],[\"arcTo\",x1,y1,x2,y2,r],[\"closePath\"]]。\n         * @param brush\t（可选）刷子定义，支持以下设置\n         * @param pen\t（可选）画笔定义，支持以下设置\n         */\n        drawPath(x: number, y: number, paths: Array<any>, brush?: any, pen?: any): void;\n    }\n}\ndeclare module laya.display {\n    import Rectangle = laya.maths.Rectangle;\n    /**\n     * @private\n     * Graphic bounds数据类\n     */\n    class GraphicsBounds {\n        _graphics: Graphics;\n        /**\n         * 销毁\n         */\n        destroy(): void;\n        /**\n         * 重置数据\n         */\n        reset(): void;\n        /**\n         * 获取位置及宽高信息矩阵(比较耗CPU，频繁使用会造成卡顿，尽量少用)。\n         * @param realSize\t（可选）使用图片的真实大小，默认为false\n         * @return 位置与宽高组成的 一个 Rectangle 对象。\n         */\n        getBounds(realSize?: boolean): Rectangle;\n        /**\n         * @private\n         * @param realSize\t（可选）使用图片的真实大小，默认为false\n         * 获取端点列表。\n         */\n        getBoundPoints(realSize?: boolean): Array<any>;\n    }\n}\ndeclare module laya.display {\n    import CSSStyle = laya.display.css.CSSStyle;\n    /**\n     * @private\n     *  <code>ILayout</code> 类是显示对象的布局接口。\n     */\n    interface ILayout {\n        _isChar(): boolean;\n        _getCSSStyle(): CSSStyle;\n    }\n}\ndeclare module laya.display {\n    /**\n     * <p><code>Input</code> 类用于创建显示对象以显示和输入文本。</p>\n     * <p>Input 类封装了原生的文本输入框，由于不同浏览器的差异，会导致此对象的默认文本的位置与用户点击输入时的文本的位置有少许的偏差。</p>\n     */\n    class Input extends Text {\n        /** 常规文本域。*/\n        /** password 类型用于密码域输入。*/\n        /** email 类型用于应该包含 e-mail 地址的输入域。*/\n        static TYPE_EMAIL: string;\n        /** url 类型用于应该包含 URL 地址的输入域。*/\n        static TYPE_URL: string;\n        /** number 类型用于应该包含数值的输入域。*/\n        static TYPE_NUMBER: string;\n        /**\n         * <p>range 类型用于应该包含一定范围内数字值的输入域。</p>\n         * <p>range 类型显示为滑动条。</p>\n         * <p>您还能够设定对所接受的数字的限定。</p>\n         */\n        static TYPE_RANGE: string;\n        /**  选取日、月、年。*/\n        static TYPE_DATE: string;\n        /** month - 选取月、年。*/\n        static TYPE_MONTH: string;\n        /** week - 选取周和年。*/\n        static TYPE_WEEK: string;\n        /** time - 选取时间（小时和分钟）。*/\n        static TYPE_TIME: string;\n        /** datetime - 选取时间、日、月、年（UTC 时间）。*/\n        static TYPE_DATE_TIME: string;\n        /** datetime-local - 选取时间、日、月、年（本地时间）。*/\n        static TYPE_DATE_TIME_LOCAL: string;\n        /**\n         * <p>search 类型用于搜索域，比如站点搜索或 Google 搜索。</p>\n         * <p>search 域显示为常规的文本域。</p>\n         */\n        static TYPE_SEARCH: string;\n        protected static input: any;\n        protected static area: any;\n        protected static inputElement: any;\n        protected static inputContainer: any;\n        protected static confirmButton: any;\n        protected static promptStyleDOM: any;\n        protected _focus: boolean;\n        protected _multiline: boolean;\n        protected _editable: boolean;\n        protected _restrictPattern: any;\n        protected _maxChars: number;\n        static IOS_IFRAME: boolean;\n        /**表示是否处于输入状态。*/\n        static isInputting: boolean;\n        /**创建一个新的 <code>Input</code> 类实例。*/\n        constructor();\n        static __init__(): void;\n        /**\n         * 设置光标位置和选取字符。\n         * @param\tstartIndex\t光标起始位置。\n         * @param\tendIndex\t光标结束位置。\n         */\n        setSelection(startIndex: number, endIndex: number): void;\n        /**表示是否是多行输入框。*/\n        multiline: boolean;\n        /**\n         * 获取对输入框的引用实例。\n         */\n        readonly nativeInput: any;\n        /**选中当前实例的所有文本。*/\n        select(): void;\n        /**\n         * 表示焦点是否在此实例上。\n         */\n        focus: boolean;\n        /**@inheritDoc */\n        text: string;\n        changeText(text: string): void;\n        /**@inheritDoc */\n        color: string;\n        /**限制输入的字符。*/\n        restrict: string;\n        /**\n         * 是否可编辑。\n         */\n        editable: boolean;\n        /**\n         * <p>字符数量限制，默认为10000。</p>\n         * <p>设置字符数量限制时，小于等于0的值将会限制字符数量为10000。</p>\n         */\n        maxChars: number;\n        /**\n         * 设置输入提示符。\n         */\n        prompt: string;\n        /**\n         * 设置输入提示符颜色。\n         */\n        promptColor: string;\n        /**\n         * <p>输入框类型为Input静态常量之一。</p>\n         * <ul>\n         * <li>TYPE_TEXT</li>\n         * <li>TYPE_PASSWORD</li>\n         * <li>TYPE_EMAIL</li>\n         * <li>TYPE_URL</li>\n         * <li>TYPE_NUMBER</li>\n         * <li>TYPE_RANGE</li>\n         * <li>TYPE_DATE</li>\n         * <li>TYPE_MONTH</li>\n         * <li>TYPE_WEEK</li>\n         * <li>TYPE_TIME</li>\n         * <li>TYPE_DATE_TIME</li>\n         * <li>TYPE_DATE_TIME_LOCAL</li>\n         * </ul>\n         * <p>平台兼容性参见http://www.w3school.com.cn/html5/html_5_form_input_types.asp。</p>\n         */\n        type: string;\n        /**\n         * <p>原生输入框 X 轴调整值，用来调整输入框坐标。</p>\n         * <p>由于即使设置了该值，在各平台和浏览器之间也不一定一致，inputElementXAdjuster已弃用。</p>\n         * @deprecated\n         */\n        inputElementXAdjuster: number;\n        inputElementYAdjuster: number;\n        asPassword: boolean;\n    }\n}\ndeclare module laya.display {\n    import EventDispatcher = laya.events.EventDispatcher;\n    import Timer = laya.utils.Timer;\n    /**\n     *  <code>Node</code> 类是可放在显示列表中的所有对象的基类。该显示列表管理 Laya 运行时中显示的所有对象。使用 Node 类排列显示列表中的显示对象。Node 对象可以有子显示对象。\n     */\n    class Node extends EventDispatcher {\n        static NOTICE_DISPLAY: number;\n        static MOUSEENABLE: number;\n        _childs: Array<any>;\n        protected _displayedInStage: boolean;\n        _parent: Node;\n        _$P: any;\n        conchModel: any;\n        /**节点名称。*/\n        name: string;\n        /**[只读]是否已经销毁。对象销毁后不能再使用。*/\n        _destroyed: boolean;\n        /**时间控制器，默认为Laya.timer。*/\n        timer: Timer;\n        /**\n         * [只读]是否已经销毁。对象销毁后不能再使用。\n         * @return\n         */\n        readonly destroyed: boolean;\n        /**\n         * <code>Node</code> 类用于创建节点对象，节点是最基本的元素。\n         */\n        constructor();\n        _setBit(type: number, value: boolean): void;\n        _getBit(type: number): boolean;\n        _setUpNoticeChain(): void;\n        _setUpNoticeType(type: number): void;\n        /**\n         * <p>增加事件侦听器，以使侦听器能够接收事件通知。</p>\n         * <p>如果侦听鼠标事件，则会自动设置自己和父亲节点的属性 mouseEnabled 的值为 true(如果父节点mouseEnabled=false，则停止设置父节点mouseEnabled属性)。</p>\n         * @param\ttype\t\t事件的类型。\n         * @param\tcaller\t\t事件侦听函数的执行域。\n         * @param\tlistener\t事件侦听函数。\n         * @param\targs\t\t（可选）事件侦听函数的回调参数。\n         * @return 此 EventDispatcher 对象。\n         */\n        on(type: string, caller: any, listener: Function, args?: Array<any>): EventDispatcher;\n        /**\n         * <p>增加事件侦听器，以使侦听器能够接收事件通知，此侦听事件响应一次后则自动移除侦听。</p>\n         * <p>如果侦听鼠标事件，则会自动设置自己和父亲节点的属性 mouseEnabled 的值为 true(如果父节点mouseEnabled=false，则停止设置父节点mouseEnabled属性)。</p>\n         * @param\ttype\t\t事件的类型。\n         * @param\tcaller\t\t事件侦听函数的执行域。\n         * @param\tlistener\t事件侦听函数。\n         * @param\targs\t\t（可选）事件侦听函数的回调参数。\n         * @return 此 EventDispatcher 对象。\n         */\n        once(type: string, caller: any, listener: Function, args?: Array<any>): EventDispatcher;\n        createConchModel(): any;\n        /**\n         * <p>销毁此对象。destroy对象默认会把自己从父节点移除，并且清理自身引用关系，等待js自动垃圾回收机制回收。destroy后不能再使用。</p>\n         * <p>destroy时会移除自身的事情监听，自身的timer监听，移除子对象及从父节点移除自己。</p>\n         * @param destroyChild\t（可选）是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n         */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * 销毁所有子对象，不销毁自己本身。\n         */\n        destroyChildren(): void;\n        /**\n         * 添加子节点。\n         * @param\tnode 节点对象\n         * @return\t返回添加的节点\n         */\n        addChild(node: Node): Node;\n        /**\n         * 批量增加子节点\n         * @param\t...args 无数子节点。\n         */\n        addChildren(...args: any[]): void;\n        /**\n         * 添加子节点到指定的索引位置。\n         * @param\tnode 节点对象。\n         * @param\tindex 索引位置。\n         * @return\t返回添加的节点。\n         */\n        addChildAt(node: Node, index: number): Node;\n        /**\n         * 根据子节点对象，获取子节点的索引位置。\n         * @param\tnode 子节点。\n         * @return\t子节点所在的索引位置。\n         */\n        getChildIndex(node: Node): number;\n        /**\n         * 根据子节点的名字，获取子节点对象。\n         * @param\tname 子节点的名字。\n         * @return\t节点对象。\n         */\n        getChildByName(name: string): Node;\n        _get$P(key: string): any;\n        _set$P(key: string, value: any): any;\n        /**\n         * 根据子节点的索引位置，获取子节点对象。\n         * @param\tindex 索引位置\n         * @return\t子节点\n         */\n        getChildAt(index: number): Node;\n        /**\n         * 设置子节点的索引位置。\n         * @param\tnode 子节点。\n         * @param\tindex 新的索引。\n         * @return\t返回子节点本身。\n         */\n        setChildIndex(node: Node, index: number): Node;\n        protected _childChanged(child?: Node): void;\n        /**\n         * 删除子节点。\n         * @param\tnode 子节点\n         * @return\t被删除的节点\n         */\n        removeChild(node: Node): Node;\n        /**\n         * 从父容器删除自己，如已经被删除不会抛出异常。\n         * @return 当前节点（ Node ）对象。\n         */\n        removeSelf(): Node;\n        /**\n         * 根据子节点名字删除对应的子节点对象，如果找不到不会抛出异常。\n         * @param\tname 对象名字。\n         * @return 查找到的节点（ Node ）对象。\n         */\n        removeChildByName(name: string): Node;\n        /**\n         * 根据子节点索引位置，删除对应的子节点对象。\n         * @param\tindex 节点索引位置。\n         * @return\t被删除的节点。\n         */\n        removeChildAt(index: number): Node;\n        /**\n         * 删除指定索引区间的所有子对象。\n         * @param\tbeginIndex 开始索引。\n         * @param\tendIndex 结束索引。\n         * @return 当前节点对象。\n         */\n        removeChildren(beginIndex?: number, endIndex?: number): Node;\n        /**\n         * 替换子节点。\n         * @internal 将传入的新节点对象替换到已有子节点索引位置处。\n         * @param\tnewNode 新节点。\n         * @param\toldNode 老节点。\n         * @return\t返回新节点。\n         */\n        replaceChild(newNode: Node, oldNode: Node): Node;\n        /**\n         * 子对象数量。\n         */\n        readonly numChildren: number;\n        /**父节点。*/\n        parent: Node;\n        /**表示是否在显示列表中显示。*/\n        readonly displayedInStage: boolean;\n        _setDisplay(value: boolean): void;\n        /**\n         * 当前容器是否包含指定的 <code>Node</code> 节点对象 。\n         * @param\tnode  指定的 <code>Node</code> 节点对象 。\n         * @return\t一个布尔值表示是否包含指定的 <code>Node</code> 节点对象 。\n         */\n        contains(node: Node): boolean;\n        /**\n         * 定时重复执行某函数。功能同Laya.timer.timerLoop()。\n         * @param\tdelay\t\t间隔时间(单位毫秒)。\n         * @param\tcaller\t\t执行域(this)。\n         * @param\tmethod\t\t结束时的回调方法。\n         * @param\targs\t\t（可选）回调参数。\n         * @param\tcoverBefore\t（可选）是否覆盖之前的延迟执行，默认为true。\n         * @param\tjumpFrame 时钟是否跳帧。基于时间的循环回调，单位时间间隔内，如能执行多次回调，出于性能考虑，引擎默认只执行一次，设置jumpFrame=true后，则回调会连续执行多次\n         */\n        timerLoop(delay: number, caller: any, method: Function, args?: Array<any>, coverBefore?: boolean, jumpFrame?: boolean): void;\n        /**\n         * 定时执行某函数一次。功能同Laya.timer.timerOnce()。\n         * @param\tdelay\t\t延迟时间(单位毫秒)。\n         * @param\tcaller\t\t执行域(this)。\n         * @param\tmethod\t\t结束时的回调方法。\n         * @param\targs\t\t（可选）回调参数。\n         * @param\tcoverBefore\t（可选）是否覆盖之前的延迟执行，默认为true。\n         */\n        timerOnce(delay: number, caller: any, method: Function, args?: Array<any>, coverBefore?: boolean): void;\n        /**\n         * 定时重复执行某函数(基于帧率)。功能同Laya.timer.frameLoop()。\n         * @param\tdelay\t\t间隔几帧(单位为帧)。\n         * @param\tcaller\t\t执行域(this)。\n         * @param\tmethod\t\t结束时的回调方法。\n         * @param\targs\t\t（可选）回调参数。\n         * @param\tcoverBefore\t（可选）是否覆盖之前的延迟执行，默认为true。\n         */\n        frameLoop(delay: number, caller: any, method: Function, args?: Array<any>, coverBefore?: boolean): void;\n        /**\n         * 定时执行一次某函数(基于帧率)。功能同Laya.timer.frameOnce()。\n         * @param\tdelay\t\t延迟几帧(单位为帧)。\n         * @param\tcaller\t\t执行域(this)\n         * @param\tmethod\t\t结束时的回调方法\n         * @param\targs\t\t（可选）回调参数\n         * @param\tcoverBefore\t（可选）是否覆盖之前的延迟执行，默认为true\n         */\n        frameOnce(delay: number, caller: any, method: Function, args?: Array<any>, coverBefore?: boolean): void;\n        /**\n         * 清理定时器。功能同Laya.timer.clearTimer()。\n         * @param\tcaller 执行域(this)。\n         * @param\tmethod 结束时的回调方法。\n         */\n        clearTimer(caller: any, method: Function): void;\n    }\n}\ndeclare module laya.display {\n    import CSSStyle = laya.display.css.CSSStyle;\n    import Style = laya.display.css.Style;\n    import EventDispatcher = laya.events.EventDispatcher;\n    import Matrix = laya.maths.Matrix;\n    import Point = laya.maths.Point;\n    import Rectangle = laya.maths.Rectangle;\n    import RenderContext = laya.renders.RenderContext;\n    import HTMLCanvas = laya.resource.HTMLCanvas;\n    import Texture = laya.resource.Texture;\n    import Handler = laya.utils.Handler;\n    /**\n     * <p> <code>Sprite</code> 是基本的显示图形的显示列表节点。 <code>Sprite</code> 默认没有宽高，默认不接受鼠标事件。通过 <code>graphics</code> 可以绘制图片或者矢量图，支持旋转，缩放，位移等操作。<code>Sprite</code>同时也是容器类，可用来添加多个子节点。</p>\n     * <p>注意： <code>Sprite</code> 默认没有宽高，可以通过<code>getBounds</code>函数获取；也可手动设置宽高；还可以设置<code>autoSize=true</code>，然后再获取宽高。<code>Sprite</code>的宽高一般用于进行碰撞检测和排版，并不影响显示图像大小，如果需要更改显示图像大小，请使用 <code>scaleX</code> ， <code>scaleY</code> ， <code>scale</code>。</p>\n     * <p> <code>Sprite</code> 默认不接受鼠标事件，即<code>mouseEnabled=false</code>，但是只要对其监听任意鼠标事件，会自动打开自己以及所有父对象的<code>mouseEnabled=true</code>。所以一般也无需手动设置<code>mouseEnabled</code>。</p>\n     * <p>LayaAir引擎API设计精简巧妙。核心显示类只有一个<code>Sprite</code>。<code>Sprite</code>针对不同的情况做了渲染优化，所以保证一个类实现丰富功能的同时，又达到高性能。</p>\n     *\n     * @example <caption>创建了一个 <code>Sprite</code> 实例。</caption>\n     * package\n     * {\n     * \timport laya.display.Sprite;\n     * \timport laya.events.Event;\n     *\n     * \tpublic class Sprite_Example\n     * \t{\n     * \t\tprivate var sprite:Sprite;\n     * \t\tprivate var shape:Sprite\n     * \t\tpublic function Sprite_Example()\n     * \t\t{\n     * \t\t\tLaya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     * \t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     * \t\t\tonInit();\n     * \t\t}\n     * \t\tprivate function onInit():void\n     * \t\t{\n     * \t\t\tsprite = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n     * \t\t\tsprite.loadImage(\"resource/ui/bg.png\");//加载并显示图片。\n     * \t\t\tsprite.x = 200;//设置 sprite 对象相对于父容器的水平方向坐标值。\n     * \t\t\tsprite.y = 200;//设置 sprite 对象相对于父容器的垂直方向坐标值。\n     * \t\t\tsprite.pivotX = 0;//设置 sprite 对象的水平方法轴心点坐标。\n     * \t\t\tsprite.pivotY = 0;//设置 sprite 对象的垂直方法轴心点坐标。\n     * \t\t\tLaya.stage.addChild(sprite);//将此 sprite 对象添加到显示列表。\n     * \t\t\tsprite.on(Event.CLICK, this, onClickSprite);//给 sprite 对象添加点击事件侦听。\n    \n     * \t\t\tshape = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n     * \t\t\tshape.graphics.drawRect(0, 0, 100, 100, \"#ccff00\", \"#ff0000\", 2);//绘制一个有边框的填充矩形。\n     * \t\t\tshape.x = 400;//设置 shape 对象相对于父容器的水平方向坐标值。\n     * \t\t\tshape.y = 200;//设置 shape 对象相对于父容器的垂直方向坐标值。\n     * \t\t\tshape.width = 100;//设置 shape 对象的宽度。\n     * \t\t\tshape.height = 100;//设置 shape 对象的高度。\n     * \t\t\tshape.pivotX = 50;//设置 shape 对象的水平方法轴心点坐标。\n     * \t\t\tshape.pivotY = 50;//设置 shape 对象的垂直方法轴心点坐标。\n     * \t\t\tLaya.stage.addChild(shape);//将此 shape 对象添加到显示列表。\n     * \t\t\tshape.on(Event.CLICK, this, onClickShape);//给 shape 对象添加点击事件侦听。\n     * \t\t}\n     * \t\tprivate function onClickSprite():void\n     * \t\t{\n     * \t\t\ttrace(\"点击 sprite 对象。\");\n     * \t\t\tsprite.rotation += 5;//旋转 sprite 对象。\n     * \t\t}\n     * \t\tprivate function onClickShape():void\n     * \t\t{\n     * \t\t\ttrace(\"点击 shape 对象。\");\n     * \t\t\tshape.rotation += 5;//旋转 shape 对象。\n     * \t\t}\n     * \t}\n     * }\n     *\n     * @example\n     * var sprite;\n     * var shape;\n     * Sprite_Example();\n     * function Sprite_Example()\n     * {\n     *     Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *     Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *     onInit();\n     * }\n     * function onInit()\n     * {\n     *     sprite = new laya.display.Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n     *     sprite.loadImage(\"resource/ui/bg.png\");//加载并显示图片。\n     *     sprite.x = 200;//设置 sprite 对象相对于父容器的水平方向坐标值。\n     *     sprite.y = 200;//设置 sprite 对象相对于父容器的垂直方向坐标值。\n     *     sprite.pivotX = 0;//设置 sprite 对象的水平方法轴心点坐标。\n     *     sprite.pivotY = 0;//设置 sprite 对象的垂直方法轴心点坐标。\n     *     Laya.stage.addChild(sprite);//将此 sprite 对象添加到显示列表。\n     *     sprite.on(Event.CLICK, this, onClickSprite);//给 sprite 对象添加点击事件侦听。\n    \n     *     shape = new laya.display.Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n     *     shape.graphics.drawRect(0, 0, 100, 100, \"#ccff00\", \"#ff0000\", 2);//绘制一个有边框的填充矩形。\n     *     shape.x = 400;//设置 shape 对象相对于父容器的水平方向坐标值。\n     *     shape.y = 200;//设置 shape 对象相对于父容器的垂直方向坐标值。\n     *     shape.width = 100;//设置 shape 对象的宽度。\n     *     shape.height = 100;//设置 shape 对象的高度。\n     *     shape.pivotX = 50;//设置 shape 对象的水平方法轴心点坐标。\n     *     shape.pivotY = 50;//设置 shape 对象的垂直方法轴心点坐标。\n     *     Laya.stage.addChild(shape);//将此 shape 对象添加到显示列表。\n     *     shape.on(laya.events.Event.CLICK, this, onClickShape);//给 shape 对象添加点击事件侦听。\n     * }\n     * function onClickSprite()\n     * {\n     *     console.log(\"点击 sprite 对象。\");\n     *     sprite.rotation += 5;//旋转 sprite 对象。\n     * }\n     * function onClickShape()\n     * {\n     *     console.log(\"点击 shape 对象。\");\n     *     shape.rotation += 5;//旋转 shape 对象。\n     * }\n     *\n     * @example\n     * import Sprite = laya.display.Sprite;\n     * class Sprite_Example {\n     *     private sprite: Sprite;\n     *     private shape: Sprite\n     *     public Sprite_Example() {\n     *         Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         this.onInit();\n     *     }\n     *     private onInit(): void {\n     *         this.sprite = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n     *         this.sprite.loadImage(\"resource/ui/bg.png\");//加载并显示图片。\n     *         this.sprite.x = 200;//设置 sprite 对象相对于父容器的水平方向坐标值。\n     *         this.sprite.y = 200;//设置 sprite 对象相对于父容器的垂直方向坐标值。\n     *         this.sprite.pivotX = 0;//设置 sprite 对象的水平方法轴心点坐标。\n     *         this.sprite.pivotY = 0;//设置 sprite 对象的垂直方法轴心点坐标。\n     *         Laya.stage.addChild(this.sprite);//将此 sprite 对象添加到显示列表。\n     *         this.sprite.on(laya.events.Event.CLICK, this, this.onClickSprite);//给 sprite 对象添加点击事件侦听。\n    \n     *         this.shape = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。\n     *         this.shape.graphics.drawRect(0, 0, 100, 100, \"#ccff00\", \"#ff0000\", 2);//绘制一个有边框的填充矩形。\n     *         this.shape.x = 400;//设置 shape 对象相对于父容器的水平方向坐标值。\n     *         this.shape.y = 200;//设置 shape 对象相对于父容器的垂直方向坐标值。\n     *         this.shape.width = 100;//设置 shape 对象的宽度。\n     *         this.shape.height = 100;//设置 shape 对象的高度。\n     *         this.shape.pivotX = 50;//设置 shape 对象的水平方法轴心点坐标。\n     *         this.shape.pivotY = 50;//设置 shape 对象的垂直方法轴心点坐标。\n     *         Laya.stage.addChild(this.shape);//将此 shape 对象添加到显示列表。\n     *         this.shape.on(laya.events.Event.CLICK, this, this.onClickShape);//给 shape 对象添加点击事件侦听。\n     *     }\n     *     private onClickSprite(): void {\n     *         console.log(\"点击 sprite 对象。\");\n     *         this.sprite.rotation += 5;//旋转 sprite 对象。\n     *     }\n     *     private onClickShape(): void {\n     *         console.log(\"点击 shape 对象。\");\n     *         this.shape.rotation += 5;//旋转 shape 对象。\n     *     }\n     * }\n     */\n    class Sprite extends Node implements ILayout {\n        protected _transform: Matrix;\n        protected _tfChanged: boolean;\n        protected _x: number;\n        protected _y: number;\n        _width: number;\n        _height: number;\n        protected _repaint: number;\n        protected _mouseEnableState: number;\n        _zOrder: number;\n        _style: Style;\n        _graphics: Graphics;\n        _renderType: number;\n        /**\n         * <p>鼠标事件与此对象的碰撞检测是否可穿透。碰撞检测发生在鼠标事件的捕获阶段，此阶段引擎会从stage开始递归检测stage及其子对象，直到找到命中的目标对象或者未命中任何对象。</p>\n         * <p>穿透表示鼠标事件发生的位置处于本对象绘图区域内时，才算命中，而与对象宽高和值为Rectangle对象的hitArea属性无关。如果sprite.hitArea值是HitArea对象，表示显式声明了此对象的鼠标事件响应区域，而忽略对象的宽高、mouseThrough属性。</p>\n         * <p>影响对象鼠标事件响应区域的属性为：width、height、hitArea，优先级顺序为：hitArea(type:HitArea)>hitArea(type:Rectangle)>width/height。</p>\n         * @default false\t不可穿透，此对象的鼠标响应区域由width、height、hitArea属性决定。</p>\n         */\n        mouseThrough: boolean;\n        /**\n         * <p>指定是否自动计算宽高数据。默认值为 false 。</p>\n         * <p>Sprite宽高默认为0，并且不会随着绘制内容的变化而变化，如果想根据绘制内容获取宽高，可以设置本属性为true，或者通过getBounds方法获取。设置为true，对性能有一定影响。</p>\n         */\n        autoSize: boolean;\n        /**\n         * <p>指定鼠标事件检测是优先检测自身，还是优先检测其子对象。鼠标事件检测发生在鼠标事件的捕获阶段，此阶段引擎会从stage开始递归检测stage及其子对象，直到找到命中的目标对象或者未命中任何对象。</p>\n         * <p>如果为false，优先检测子对象，当有子对象被命中时，中断检测，获得命中目标。如果未命中任何子对象，最后再检测此对象；如果为true，则优先检测本对象，如果本对象没有被命中，直接中断检测，表示没有命中目标；如果本对象被命中，则进一步递归检测其子对象，以确认最终的命中目标。</p>\n         * <p>合理使用本属性，能减少鼠标事件检测的节点，提高性能。可以设置为true的情况：开发者并不关心此节点的子节点的鼠标事件检测结果，也就是以此节点作为其子节点的鼠标事件检测依据。</p>\n         * <p>Stage对象和UI的View组件默认为true。</p>\n         * @default false\t优先检测此对象的子对象，当递归检测完所有子对象后，仍然没有找到目标对象，最后再检测此对象。\n         */\n        hitTestPrior: boolean;\n        /**\n         * <p>视口大小，视口外的子对象，将不被渲染(如果想实现裁剪效果，请使用srollRect)，合理使用能提高渲染性能。比如由一个个小图片拼成的地图块，viewport外面的小图片将不渲染</p>\n         * <p>srollRect和viewport的区别：<br/>\n         * 1. srollRect自带裁剪效果，viewport只影响子对象渲染是否渲染，不具有裁剪效果（性能更高）。<br/>\n         * 2. 设置rect的x,y属性均能实现区域滚动效果，但scrollRect会保持0,0点位置不变。</p>\n         * @default null\n         */\n        viewport: Rectangle;\n        createConchModel(): any;\n        /**\n         * <p>指定是否对使用了 scrollRect 的显示对象进行优化处理。默认为false(不优化)。</p>\n         * <p>当值为ture时：将对此对象使用了scrollRect 设定的显示区域以外的显示内容不进行渲染，以提高性能(如果子对象有旋转缩放或者中心点偏移，则显示筛选会不精确)。</p>\n         */\n        optimizeScrollRect: boolean;\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        /**根据zOrder进行重新排序。*/\n        updateZOrder(): void;\n        /**\n         * 指定显示对象是否缓存为静态图像。功能同cacheAs的normal模式。建议优先使用cacheAs代替。\n         */\n        cacheAsBitmap: boolean;\n        /**\n         * 设置是否开启自定义渲染，只有开启自定义渲染，才能使用customRender函数渲染。\n         */\n        customRenderEnable: boolean;\n        /**\n         * <p>指定显示对象是否缓存为静态图像，cacheAs时，子对象发生变化，会自动重新缓存，同时也可以手动调用reCache方法更新缓存。</p>\n         * <p>建议把不经常变化的“复杂内容”缓存为静态图像，能极大提高渲染性能。cacheAs有\"none\"，\"normal\"和\"bitmap\"三个值可选。\n         * <li>默认为\"none\"，不做任何缓存。</li>\n         * <li>当值为\"normal\"时，canvas模式下进行画布缓存，webgl模式下进行命令缓存。</li>\n         * <li>当值为\"bitmap\"时，canvas模式下进行依然是画布缓存，webgl模式下使用renderTarget缓存。</li></p>\n         * <p>webgl下renderTarget缓存模式缺点：会额外创建renderTarget对象，增加内存开销，缓存面积有最大2048限制，不断重绘时会增加CPU开销。优点：大幅减少drawcall，渲染性能最高。\n         * webgl下命令缓存模式缺点：只会减少节点遍历及命令组织，不会减少drawcall数，性能中等。优点：没有额外内存开销，无需renderTarget支持。</p>\n         */\n        cacheAs: string;\n        /**\n         * 是否静态缓存此对象的当前帧的最终属性。为 true 时，子对象变化时不会自动更新缓存，但是可以通过调用 reCache 方法手动刷新。\n         * <b>注意：</b> 1. 设置 cacheAs 为非空和非\"none\"时才有效。 2. 由于渲染的时机在脚本执行之后，也就是说当前帧渲染的是对象的最终属性，所以如果在当前帧渲染之前、设置静态缓存之后改变对象属性，则最终渲染结果表现的是对象的最终属性。\n         */\n        staticCache: boolean;\n        /**在设置cacheAs的情况下，调用此方法会重新刷新缓存。*/\n        reCache(): void;\n        /**表示显示对象相对于父容器的水平方向坐标值。*/\n        x: number;\n        /**表示显示对象相对于父容器的垂直方向坐标值。*/\n        y: number;\n        /**\n         * <p>显示对象的宽度，单位为像素，默认为0。</p>\n         * <p>此宽度用于鼠标碰撞检测，并不影响显示对象图像大小。需要对显示对象的图像进行缩放，请使用scale、scaleX、scaleY。</p>\n         * <p>可以通过getbounds获取显示对象图像的实际宽度。</p>\n         */\n        width: number;\n        /**\n         * <p>显示对象的高度，单位为像素，默认为0。</p>\n         * <p>此高度用于鼠标碰撞检测，并不影响显示对象图像大小。需要对显示对象的图像进行缩放，请使用scale、scaleX、scaleY。</p>\n         * <p>可以通过getbounds获取显示对象图像的实际高度。</p>\n         */\n        height: number;\n        /**\n         * <p>设置对象在自身坐标系下的边界范围。与 <code>getSelfBounds</code> 对应。当 autoSize==true 时，会影响对象宽高。设置后，当需要获取自身边界范围时，就不再需要计算，合理使用能提高性能。比如 <code>getBounds</code> 会优先使用 <code>setBounds</code> 指定的值，如果没有指定则进行计算，此计算会对性能消耗比较大。</p>\n         * <p><b>注意：</b> <code>setBounds</code> 与 <code>getBounds</code> 并非对应相等关系， <code>getBounds</code> 获取的是本对象在父容器坐标系下的边界范围，通过设置 <code>setBounds</code> 会影响 <code>getBounds</code> 的结果。</p>\n         * @param\tbound bounds矩形区域\n         */\n        setBounds(bound: Rectangle): void;\n        /**\n         * <p>获取本对象在父容器坐标系的矩形显示区域。</p>\n         * <p><b>注意：</b> 1.计算量较大，尽量少用，如果需要频繁使用，可以通过手动设置 <code>setBounds</code> 来缓存自身边界信息，从而避免比较消耗性能的计算。2. <code>setBounds</code> 与 <code>getBounds</code> 并非对应相等关系， <code>getBounds</code> 获取的是本对象在父容器坐标系下的边界范围，通过设置 <code>setBounds</code> 会影响 <code>getBounds</code> 的结果。</p>\n         * @return 矩形区域。\n         */\n        getBounds(): Rectangle;\n        /**\n         * 获取对象在自身坐标系的边界范围。与 <code>setBounds</code> 对应。\n         * <p><b>注意：</b>计算量较大，尽量少用，如果需要频繁使用，可以提前手动设置 <code>setBounds</code> 来缓存自身边界信息，从而避免比较消耗性能的计算。</p>\n         * @return 矩形区域。\n         */\n        getSelfBounds(): Rectangle;\n        /**\n         * @private\n         * 获取本对象在父容器坐标系的显示区域多边形顶点列表。\n         * 当显示对象链中有旋转时，返回多边形顶点列表，无旋转时返回矩形的四个顶点。\n         * @param ifRotate\t（可选）之前的对象链中是否有旋转。\n         * @return 顶点列表。结构：[x1,y1,x2,y2,x3,y3,...]。\n         */\n        _boundPointsToParent(ifRotate?: boolean): Array<any>;\n        /**\n         * 返回此实例中的绘图对象（ <code>Graphics</code> ）的显示区域，不包括子对象。\n         * @param realSize\t（可选）使用图片的真实大小，默认为false\n         * @return 一个 Rectangle 对象，表示获取到的显示区域。\n         */\n        getGraphicBounds(realSize?: boolean): Rectangle;\n        /**\n         * @private\n         * 获取自己坐标系的显示区域多边形顶点列表\n         * @param ifRotate\t（可选）当前的显示对象链是否由旋转\n         * @return 顶点列表。结构：[x1,y1,x2,y2,x3,y3,...]。\n         */\n        _getBoundPointsM(ifRotate?: boolean): Array<any>;\n        /**\n         * @private\n         * 获取样式。\n         * @return  样式 Style 。\n         */\n        getStyle(): Style;\n        /**\n         * @private\n         * 设置样式。\n         * @param\tvalue 样式。\n         */\n        setStyle(value: Style): void;\n        /**X轴缩放值，默认值为1。设置为负数，可以实现水平反转效果，比如scaleX=-1。*/\n        scaleX: number;\n        /**Y轴缩放值，默认值为1。设置为负数，可以实现垂直反转效果，比如scaleX=-1。*/\n        scaleY: number;\n        /**旋转角度，默认值为0。以角度为单位。*/\n        rotation: number;\n        /**水平倾斜角度，默认值为0。以角度为单位。*/\n        skewX: number;\n        /**垂直倾斜角度，默认值为0。以角度为单位。*/\n        skewY: number;\n        protected _adjustTransform(): Matrix;\n        /**\n         * <p>对象的矩阵信息。通过设置矩阵可以实现节点旋转，缩放，位移效果。</p>\n         * <p>矩阵更多信息请参考 <code>Matrix</code></p>\n         */\n        transform: Matrix;\n        /**X轴 轴心点的位置，单位为像素，默认为0。轴心点会影响对象位置，缩放中心，旋转中心。*/\n        pivotX: number;\n        /**Y轴 轴心点的位置，单位为像素，默认为0。轴心点会影响对象位置，缩放中心，旋转中心。*/\n        pivotY: number;\n        /**透明度，值为0-1，默认值为1，表示不透明。更改alpha值会影响drawcall。*/\n        alpha: number;\n        /**表示是否可见，默认为true。如果设置不可见，节点将不被渲染。*/\n        visible: boolean;\n        /**指定要使用的混合模式。目前只支持\"lighter\"。*/\n        blendMode: string;\n        /**绘图对象。封装了绘制位图和矢量图的接口，Sprite所有的绘图操作都通过Graphics来实现的。*/\n        graphics: Graphics;\n        /**\n         * <p>显示对象的滚动矩形范围，具有裁剪效果(如果只想限制子对象渲染区域，请使用viewport)，设置optimizeScrollRect=true，可以优化裁剪区域外的内容不进行渲染。</p>\n         * <p> srollRect和viewport的区别：<br/>\n         * 1.srollRect自带裁剪效果，viewport只影响子对象渲染是否渲染，不具有裁剪效果（性能更高）。<br/>\n         * 2.设置rect的x,y属性均能实现区域滚动效果，但scrollRect会保持0,0点位置不变。</p>\n         */\n        scrollRect: Rectangle;\n        /**\n         * <p>设置坐标位置。相当于分别设置x和y属性。</p>\n         * <p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.pos(...).scale(...);</p>\n         * @param\tx\t\t\tX轴坐标。\n         * @param\ty\t\t\tY轴坐标。\n         * @param \tspeedMode\t（可选）是否极速模式，正常是调用this.x=value进行赋值，极速模式直接调用内部函数处理，如果未重写x,y属性，建议设置为急速模式性能更高。\n         * @return\t返回对象本身。\n         */\n        pos(x: number, y: number, speedMode?: boolean): Sprite;\n        /**\n         * <p>设置轴心点。相当于分别设置pivotX和pivotY属性。</p>\n         * <p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.pivot(...).pos(...);</p>\n         * @param\tx X轴心点。\n         * @param\ty Y轴心点。\n         * @return\t返回对象本身。\n         */\n        pivot(x: number, y: number): Sprite;\n        /**\n         * <p>设置宽高。相当于分别设置width和height属性。</p>\n         * <p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.size(...).pos(...);</p>\n         * @param\twidth 宽度值。\n         * @param\thegiht 高度值。\n         * @return\t返回对象本身。\n         */\n        size(width: number, height: number): Sprite;\n        /**\n         * <p>设置缩放。相当于分别设置scaleX和scaleY属性。</p>\n         * <p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.scale(...).pos(...);</p>\n         * @param\tscaleX\t\tX轴缩放比例。\n         * @param\tscaleY\t\tY轴缩放比例。\n         * @param \tspeedMode\t（可选）是否极速模式，正常是调用this.scaleX=value进行赋值，极速模式直接调用内部函数处理，如果未重写scaleX,scaleY属性，建议设置为急速模式性能更高。\n         * @return\t返回对象本身。\n         */\n        scale(scaleX: number, scaleY: number, speedMode?: boolean): Sprite;\n        /**\n         * <p>设置倾斜角度。相当于分别设置skewX和skewY属性。</p>\n         * <p>因为返回值为Sprite对象本身，所以可以使用如下语法：spr.skew(...).pos(...);</p>\n         * @param\tskewX 水平倾斜角度。\n         * @param\tskewY 垂直倾斜角度。\n         * @return\t返回对象本身\n         */\n        skew(skewX: number, skewY: number): Sprite;\n        /**\n         * 更新、呈现显示对象。由系统调用。\n         * @param\tcontext 渲染的上下文引用。\n         * @param\tx X轴坐标。\n         * @param\ty Y轴坐标。\n         */\n        render(context: RenderContext, x: number, y: number): void;\n        /**\n         * <p>绘制 当前<code>Sprite</code> 到 <code>Canvas</code> 上，并返回一个HtmlCanvas。</p>\n         * <p>绘制的结果可以当作图片源，再次绘制到其他Sprite里面，示例：</p>\n         *\n         * var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面\n         * var texture:Texture = new Texture(htmlCanvas);//使用htmlCanvas创建Texture\n         * var sp:Sprite = new Sprite().pos(0, 200);//创建精灵并把它放倒200位置\n         * sp.graphics.drawTexture(texture);//把截图绘制到精灵上\n         * Laya.stage.addChild(sp);//把精灵显示到舞台\n         *\n         * <p>也可以获取原始图片数据，分享到网上，从而实现截图效果，示例：</p>\n         *\n         * var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);//把精灵绘制到canvas上面\n         *\n         * htmlCanvas.toBase64(\"image/png\",0.92,function(base64)\n         * \t\t\t\t\t\ttrace(base64);//打印图片base64信息，可以发给服务器或者保存为图片\n         * \t\t\t\t\t\t});\n         *\n         * @param\tcanvasWidth 画布宽度。\n         * @param\tcanvasHeight 画布高度。\n         * @param\tx 绘制的 X 轴偏移量。\n         * @param\ty 绘制的 Y 轴偏移量。\n         * @return  HTMLCanvas 对象。\n         */\n        drawToCanvas(canvasWidth: number, canvasHeight: number, offsetX: number, offsetY: number): HTMLCanvas;\n        /**\n         * <p>自定义更新、呈现显示对象。一般用来扩展渲染模式，请合理使用，可能会导致在加速器上无法渲染。</p>\n         * <p><b>注意</b>不要在此函数内增加或删除树节点，否则会对树节点遍历造成影响。</p>\n         * @param\tcontext  渲染的上下文引用。\n         * @param\tx X轴坐标。\n         * @param\ty Y轴坐标。\n         */\n        customRender(context: RenderContext, x: number, y: number): void;\n        /**\n         * @private\n         * 应用滤镜。\n         */\n        _applyFilters(): void;\n        /**滤镜集合。可以设置多个滤镜组合。*/\n        filters: Array<any>;\n        /**\n         * @private\n         * 查看当前原件中是否包含发光滤镜。\n         * @return 一个 Boolean 值，表示当前原件中是否包含发光滤镜。\n         */\n        _isHaveGlowFilter(): boolean;\n        /**\n         * 把本地坐标转换为相对stage的全局坐标。\n         * @param point\t\t\t\t本地坐标点。\n         * @param createNewPoint\t（可选）是否创建一个新的Point对象作为返回值，默认为false，使用输入的point对象返回，减少对象创建开销。\n         * @return 转换后的坐标的点。\n         */\n        localToGlobal(point: Point, createNewPoint?: boolean): Point;\n        /**\n         * 把stage的全局坐标转换为本地坐标。\n         * @param point\t\t\t\t全局坐标点。\n         * @param createNewPoint\t（可选）是否创建一个新的Point对象作为返回值，默认为false，使用输入的point对象返回，减少对象创建开销。\n         * @return 转换后的坐标的点。\n         */\n        globalToLocal(point: Point, createNewPoint?: boolean): Point;\n        /**\n         * 将本地坐标系坐标转转换到父容器坐标系。\n         * @param point 本地坐标点。\n         * @return  转换后的点。\n         */\n        toParentPoint(point: Point): Point;\n        /**\n         * 将父容器坐标系坐标转换到本地坐标系。\n         * @param point 父容器坐标点。\n         * @return  转换后的点。\n         */\n        fromParentPoint(point: Point): Point;\n        /**\n         * <p>增加事件侦听器，以使侦听器能够接收事件通知。</p>\n         * <p>如果侦听鼠标事件，则会自动设置自己和父亲节点的属性 mouseEnabled 的值为 true(如果父节点mouseEnabled=false，则停止设置父节点mouseEnabled属性)。</p>\n         * @param type\t\t事件的类型。\n         * @param caller\t事件侦听函数的执行域。\n         * @param listener\t事件侦听函数。\n         * @param args\t\t（可选）事件侦听函数的回调参数。\n         * @return 此 EventDispatcher 对象。\n         */\n        on(type: string, caller: any, listener: Function, args?: Array<any>): EventDispatcher;\n        /**\n         * <p>增加事件侦听器，以使侦听器能够接收事件通知，此侦听事件响应一次后则自动移除侦听。</p>\n         * <p>如果侦听鼠标事件，则会自动设置自己和父亲节点的属性 mouseEnabled 的值为 true(如果父节点mouseEnabled=false，则停止设置父节点mouseEnabled属性)。</p>\n         * @param type\t\t事件的类型。\n         * @param caller\t事件侦听函数的执行域。\n         * @param listener\t事件侦听函数。\n         * @param args\t\t（可选）事件侦听函数的回调参数。\n         * @return 此 EventDispatcher 对象。\n         */\n        once(type: string, caller: any, listener: Function, args?: Array<any>): EventDispatcher;\n        parent: Node;\n        /**\n         * <p>加载并显示一个图片。功能等同于graphics.loadImage方法。支持异步加载。</p>\n         * <p>注意：多次调用loadImage绘制不同的图片，会同时显示。</p>\n         * @param url\t\t图片地址。\n         * @param x\t\t\t（可选）显示图片的x位置。\n         * @param y\t\t\t（可选）显示图片的y位置。\n         * @param width\t\t（可选）显示图片的宽度，设置为0表示使用图片默认宽度。\n         * @param height\t（可选）显示图片的高度，设置为0表示使用图片默认高度。\n         * @param complete\t（可选）加载完成回调。\n         * @return\t返回精灵对象本身。\n         */\n        loadImage(url: string, x?: number, y?: number, width?: number, height?: number, complete?: Handler): Sprite;\n        /**\n         * 根据图片地址创建一个新的 <code>Sprite</code> 对象用于加载并显示此图片。\n         * @param\turl 图片地址。\n         * @return\t返回新的 <code>Sprite</code> 对象。\n         */\n        static fromImage(url: string): Sprite;\n        /**cacheAs后，设置自己和父对象缓存失效。*/\n        repaint(): void;\n        /**\n         * @private\n         * 获取是否重新缓存。\n         * @return 如果重新缓存值为 true，否则值为 false。\n         */\n        _needRepaint(): boolean;\n        protected _childChanged(child?: Node): void;\n        /**cacheAs时，设置所有父对象缓存失效。 */\n        parentRepaint(): void;\n        /**对舞台 <code>stage</code> 的引用。*/\n        readonly stage: Stage;\n        /**\n         * <p>可以设置一个Rectangle区域作为点击区域，或者设置一个<code>HitArea</code>实例作为点击区域，HitArea内可以设置可点击和不可点击区域。</p>\n         * <p>如果不设置hitArea，则根据宽高形成的区域进行碰撞。</p>\n         */\n        hitArea: any;\n        /**\n         * <p>遮罩，可以设置一个对象(支持位图和矢量图)，根据对象形状进行遮罩显示。</p>\n         * <p>【注意】遮罩对象坐标系是相对遮罩对象本身的，和Flash机制不同</p>\n         */\n        mask: Sprite;\n        /**\n         * 是否接受鼠标事件。\n         * 默认为false，如果监听鼠标事件，则会自动设置本对象及父节点的属性 mouseEnable 的值都为 true（如果父节点手动设置为false，则不会更改）。\n         * */\n        mouseEnabled: boolean;\n        /**\n         * 开始拖动此对象。\n         * @param area\t\t\t\t（可选）拖动区域，此区域为当前对象注册点活动区域（不包括对象宽高），可选。\n         * @param hasInertia\t\t（可选）鼠标松开后，是否还惯性滑动，默认为false，可选。\n         * @param elasticDistance\t（可选）橡皮筋效果的距离值，0为无橡皮筋效果，默认为0，可选。\n         * @param elasticBackTime\t（可选）橡皮筋回弹时间，单位为毫秒，默认为300毫秒，可选。\n         * @param data\t\t\t\t（可选）拖动事件携带的数据，可选。\n         * @param disableMouseEvent\t（可选）禁用其他对象的鼠标检测，默认为false，设置为true能提高性能。\n         * @param ratio\t\t\t\t（可选）惯性阻尼系数，影响惯性力度和时长。\n         */\n        startDrag(area?: Rectangle, hasInertia?: boolean, elasticDistance?: number, elasticBackTime?: number, data?: any, disableMouseEvent?: boolean, ratio?: number): void;\n        /**停止拖动此对象。*/\n        stopDrag(): void;\n        _setDisplay(value: boolean): void;\n        /**\n         * 检测某个点是否在此对象内。\n         * @param\tx 全局x坐标。\n         * @param\ty 全局y坐标。\n         * @return  表示是否在对象内。\n         */\n        hitTestPoint(x: number, y: number): boolean;\n        /**获得相对于本对象上的鼠标坐标信息。*/\n        getMousePoint(): Point;\n        /**\n         * 获得相对于stage的全局X轴缩放值（会叠加父亲节点的缩放值）。\n         */\n        readonly globalScaleX: number;\n        /**\n         * 获得相对于stage的全局Y轴缩放值（会叠加父亲节点的缩放值）。\n         */\n        readonly globalScaleY: number;\n        /**\n         * 返回鼠标在此对象坐标系上的 X 轴坐标信息。\n         */\n        readonly mouseX: number;\n        /**\n         * 返回鼠标在此对象坐标系上的 Y 轴坐标信息。\n         */\n        readonly mouseY: number;\n        /**z排序，更改此值，则会按照值的大小对同一容器的所有对象重新排序。值越大，越靠上。默认为0，则根据添加顺序排序。*/\n        zOrder: number;\n        /**设置一个Texture实例，并显示此图片（如果之前有其他绘制，则会被清除掉）。等同于graphics.clear();graphics.drawTexture()*/\n        texture: Texture;\n        _getWords(): Array<any>;\n        _addChildsToLayout(out: Array<any>): boolean;\n        _addToLayout(out: Array<any>): void;\n        _isChar(): boolean;\n        _getCSSStyle(): CSSStyle;\n        /**\n         * @private\n         * 设置指定属性名的属性值。\n         * @param\tname 属性名。\n         * @param\tvalue 属性值。\n         */\n        _setAttributes(name: string, value: string): void;\n        /**\n         * @private\n         */\n        _layoutLater(): void;\n    }\n}\ndeclare module laya.display {\n    import Matrix = laya.maths.Matrix;\n    import Point = laya.maths.Point;\n    import RenderContext = laya.renders.RenderContext;\n    /**\n     * <p> <code>Stage</code> 是舞台类，显示列表的根节点，所有显示对象都在舞台上显示。通过 Laya.stage 单例访问。</p>\n     * <p>Stage提供几种适配模式，不同的适配模式会产生不同的画布大小，画布越大，渲染压力越大，所以要选择合适的适配方案。</p>\n     * <p>Stage提供不同的帧率模式，帧率越高，渲染压力越大，越费电，合理使用帧率甚至动态更改帧率有利于改进手机耗电。</p>\n     */\n    class Stage extends Sprite {\n        /**应用保持设计宽高不变，不缩放不变型，stage的宽高等于设计宽高。*/\n        static SCALE_NOSCALE: string;\n        /**应用根据屏幕大小铺满全屏，非等比缩放会变型，stage的宽高等于设计宽高。*/\n        static SCALE_EXACTFIT: string;\n        /**应用显示全部内容，按照最小比率缩放，等比缩放不变型，一边可能会留空白，stage的宽高等于设计宽高。*/\n        static SCALE_SHOWALL: string;\n        /**应用按照最大比率缩放显示，宽或高方向会显示一部分，等比缩放不变型，stage的宽高等于设计宽高。*/\n        static SCALE_NOBORDER: string;\n        /**应用保持设计宽高不变，不缩放不变型，stage的宽高等于屏幕宽高。*/\n        static SCALE_FULL: string;\n        /**应用保持设计宽度不变，高度根据屏幕比缩放，stage的宽度等于设计高度，高度根据屏幕比率大小而变化*/\n        static SCALE_FIXED_WIDTH: string;\n        /**应用保持设计高度不变，宽度根据屏幕比缩放，stage的高度等于设计宽度，宽度根据屏幕比率大小而变化*/\n        static SCALE_FIXED_HEIGHT: string;\n        /**应用保持设计比例不变，全屏显示全部内容(类似showall，但showall非全屏，会有黑边)，根据屏幕长宽比，自动选择使用SCALE_FIXED_WIDTH或SCALE_FIXED_HEIGHT*/\n        static SCALE_FIXED_AUTO: string;\n        /**画布水平居左对齐。*/\n        static ALIGN_LEFT: string;\n        /**画布水平居右对齐。*/\n        static ALIGN_RIGHT: string;\n        /**画布水平居中对齐。*/\n        static ALIGN_CENTER: string;\n        /**画布垂直居上对齐。*/\n        static ALIGN_TOP: string;\n        /**画布垂直居中对齐。*/\n        static ALIGN_MIDDLE: string;\n        /**画布垂直居下对齐。*/\n        static ALIGN_BOTTOM: string;\n        /**不更改屏幕。*/\n        static SCREEN_NONE: string;\n        /**自动横屏。*/\n        static SCREEN_HORIZONTAL: string;\n        /**自动竖屏。*/\n        static SCREEN_VERTICAL: string;\n        /**全速模式，以60的帧率运行。*/\n        static FRAME_FAST: string;\n        /**慢速模式，以30的帧率运行。*/\n        static FRAME_SLOW: string;\n        /**自动模式，以30的帧率运行，但鼠标活动后会自动加速到60，鼠标不动2秒后降低为30帧，以节省消耗。*/\n        static FRAME_MOUSE: string;\n        /**休眠模式，以1的帧率运行*/\n        static FRAME_SLEEP: string;\n        /**当前焦点对象，此对象会影响当前键盘事件的派发主体。*/\n        focus: Node;\n        offset: Point;\n        /**设计宽度（初始化时设置的宽度Laya.init(width,height)）*/\n        designWidth: number;\n        /**设计高度（初始化时设置的高度Laya.init(width,height)）*/\n        designHeight: number;\n        /**画布是否发生翻转。*/\n        canvasRotation: boolean;\n        /**画布的旋转角度。*/\n        canvasDegree: number;\n        /**使用物理分辨率模式 */\n        useRetinalCanvas:boolean;\n        /**\n         * <p>设置是否渲染，设置为false，可以停止渲染，画面会停留到最后一次渲染上，减少cpu消耗，此设置不影响时钟。</p>\n         * <p>比如非激活状态，可以设置renderingEnabled=true以节省消耗。</p>\n         * */\n        renderingEnabled: boolean;\n        /**是否启用屏幕适配，可以适配后，在某个时候关闭屏幕适配，防止某些操作导致的屏幕以外改变*/\n        screenAdaptationEnabled: boolean;\n        _canvasTransform: Matrix;\n        _scenes: Array<any>;\n        static _wgColor: Array<any>;\n        static FRAME_MOUSE_THREDHOLD: number;\n        /**场景类，引擎中只有一个stage实例，此实例可以通过Laya.stage访问。*/\n        constructor();\n        /**帧率类型，支持三种模式：fast-60帧(默认)，slow-30帧，mouse-30帧（鼠标活动后会自动加速到60，鼠标不动2秒后降低为30帧，以节省消耗），sleep-1帧。*/\n        frameRate: string;\n        width: number;\n        height: number;\n        readonly transform: Matrix;\n        readonly desginWidth: number;\n        readonly desginHeight: number;\n        /**\n         * 舞台是否获得焦点。\n         */\n        readonly isFocused: boolean;\n        /**\n         * 舞台是否处于可见状态(是否进入后台)。\n         */\n        readonly isVisibility: boolean;\n        protected _resetCanvas(): void;\n        /**\n         * 设置屏幕大小，场景会根据屏幕大小进行适配。可以动态调用此方法，来更改游戏显示的大小。\n         * @param\tscreenWidth\t\t屏幕宽度。\n         * @param\tscreenHeight\t屏幕高度。\n         */\n        setScreenSize(screenWidth: number, screenHeight: number): void;\n        /**\n         * <p>缩放模式。默认值为 \"noscale\"。</p>\n         * <p><ul>取值范围：\n         * <li>\"noscale\" ：不缩放；</li>\n         * <li>\"exactfit\" ：全屏不等比缩放；</li>\n         * <li>\"showall\" ：最小比例缩放；</li>\n         * <li>\"noborder\" ：最大比例缩放；</li>\n         * <li>\"full\" ：不缩放，stage的宽高等于屏幕宽高；</li>\n         * <li>\"fixedwidth\" ：宽度不变，高度根据屏幕比缩放；</li>\n         * <li>\"fixedheight\" ：高度不变，宽度根据屏幕比缩放；</li>\n         * <li>\"fixedauto\" ：根据宽高比，自动选择使用fixedwidth或fixedheight；</li>\n         * </ul></p>\n         */\n        scaleMode: string;\n        /**\n         * <p>水平对齐方式。默认值为\"left\"。</p>\n         * <p><ul>取值范围：\n         * <li>\"left\" ：居左对齐；</li>\n         * <li>\"center\" ：居中对齐；</li>\n         * <li>\"right\" ：居右对齐；</li>\n         * </ul></p>\n         */\n        alignH: string;\n        /**\n         * <p>垂直对齐方式。默认值为\"top\"。</p>\n         * <p><ul>取值范围：\n         * <li>\"top\" ：居顶部对齐；</li>\n         * <li>\"middle\" ：居中对齐；</li>\n         * <li>\"bottom\" ：居底部对齐；</li>\n         * </ul></p>\n         */\n        alignV: string;\n        /**舞台的背景颜色，默认为黑色，null为透明。*/\n        bgColor: string;\n        /**鼠标在 Stage 上的 X 轴坐标。*/\n        readonly mouseX: number;\n        /**鼠标在 Stage 上的 Y 轴坐标。*/\n        readonly mouseY: number;\n        /**@inheritDoc */\n        getMousePoint(): Point;\n        /**当前视窗由缩放模式导致的 X 轴缩放系数。*/\n        readonly clientScaleX: number;\n        /**当前视窗由缩放模式导致的 Y 轴缩放系数。*/\n        readonly clientScaleY: number;\n        /**\n         * <p>场景布局类型。</p>\n         * <p><ul>取值范围：\n         * <li>\"none\" ：不更改屏幕</li>\n         * <li>\"horizontal\" ：自动横屏</li>\n         * <li>\"vertical\" ：自动竖屏</li>\n         * </ul></p>\n         */\n        screenMode: string;\n        /**@inheritDoc */\n        repaint(): void;\n        /**@inheritDoc */\n        parentRepaint(): void;\n        _loop(): boolean;\n        /**\n         * <p>获得距当前帧开始后，过了多少时间，单位为毫秒。</p>\n         * <p>可以用来判断函数内时间消耗，通过合理控制每帧函数处理消耗时长，避免一帧做事情太多，对复杂计算分帧处理，能有效降低帧率波动。</p>\n         */\n        getTimeFromFrameStart(): number;\n        visible: boolean;\n        /**@inheritDoc */\n        render(context: RenderContext, x: number, y: number): void;\n        /**\n         * <p>是否开启全屏，用户点击后进入全屏。</p>\n         * <p>兼容性提示：部分浏览器不允许点击进入全屏，比如Iphone等。</p>\n         */\n        fullScreenEnabled: boolean;\n        /**退出全屏模式*/\n        exitFullscreen(): void;\n    }\n}\ndeclare module laya.display {\n    import CSSStyle = laya.display.css.CSSStyle;\n    import Point = laya.maths.Point;\n    import Rectangle = laya.maths.Rectangle;\n    /**\n     * <p> <code>Text</code> 类用于创建显示对象以显示文本。</p>\n     * <p>\n     * 注意：如果运行时系统找不到设定的字体，则用系统默认的字体渲染文字，从而导致显示异常。(通常电脑上显示正常，在一些移动端因缺少设置的字体而显示异常)。\n     * </p>\n     * @example\n     * package\n     * {\n     * \timport laya.display.Text;\n     * \tpublic class Text_Example\n     * \t{\n     * \t\tpublic function Text_Example()\n     * \t\t{\n     * \t\t\tLaya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     * \t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     * \t\t\tonInit();\n     * \t\t}\n     * \t\tprivate function onInit():void\n     * \t\t{\n     * \t\t\tvar text:Text = new Text();//创建一个 Text 类的实例对象 text 。\n     * \t\t\ttext.text = \"这个是一个 Text 文本示例。\";\n     * \t\t\ttext.color = \"#008fff\";//设置 text 的文本颜色。\n     * \t\t\ttext.font = \"Arial\";//设置 text 的文本字体。\n     * \t\t\ttext.bold = true;//设置 text 的文本显示为粗体。\n     * \t\t\ttext.fontSize = 30;//设置 text 的字体大小。\n     * \t\t\ttext.wordWrap = true;//设置 text 的文本自动换行。\n     * \t\t\ttext.x = 100;//设置 text 对象的属性 x 的值，用于控制 text 对象的显示位置。\n     * \t\t\ttext.y = 100;//设置 text 对象的属性 y 的值，用于控制 text 对象的显示位置。\n     * \t\t\ttext.width = 300;//设置 text 的宽度。\n     * \t\t\ttext.height = 200;//设置 text 的高度。\n     * \t\t\ttext.italic = true;//设置 text 的文本显示为斜体。\n     * \t\t\ttext.borderColor = \"#fff000\";//设置 text 的文本边框颜色。\n     * \t\t\tLaya.stage.addChild(text);//将 text 添加到显示列表。\n     * \t\t}\n     * \t}\n     * }\n     * @example\n     * Text_Example();\n     * function Text_Example()\n     * {\n     *     Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *     Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *     onInit();\n     * }\n     * function onInit()\n     * {\n     *     var text = new laya.display.Text();//创建一个 Text 类的实例对象 text 。\n     *     text.text = \"这个是一个 Text 文本示例。\";\n     *     text.color = \"#008fff\";//设置 text 的文本颜色。\n     *     text.font = \"Arial\";//设置 text 的文本字体。\n     *     text.bold = true;//设置 text 的文本显示为粗体。\n     *     text.fontSize = 30;//设置 text 的字体大小。\n     *     text.wordWrap = true;//设置 text 的文本自动换行。\n     *     text.x = 100;//设置 text 对象的属性 x 的值，用于控制 text 对象的显示位置。\n     *     text.y = 100;//设置 text 对象的属性 y 的值，用于控制 text 对象的显示位置。\n     *     text.width = 300;//设置 text 的宽度。\n     *     text.height = 200;//设置 text 的高度。\n     *     text.italic = true;//设置 text 的文本显示为斜体。\n     *     text.borderColor = \"#fff000\";//设置 text 的文本边框颜色。\n     *     Laya.stage.addChild(text);//将 text 添加到显示列表。\n     * }\n     * @example\n     * class Text_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         this.onInit();\n     *     }\n     *     private onInit(): void {\n     *         var text: laya.display.Text = new laya.display.Text();//创建一个 Text 类的实例对象 text 。\n     *         text.text = \"这个是一个 Text 文本示例。\";\n     *         text.color = \"#008fff\";//设置 text 的文本颜色。\n     *         text.font = \"Arial\";//设置 text 的文本字体。\n     *         text.bold = true;//设置 text 的文本显示为粗体。\n     *         text.fontSize = 30;//设置 text 的字体大小。\n     *         text.wordWrap = true;//设置 text 的文本自动换行。\n     *         text.x = 100;//设置 text 对象的属性 x 的值，用于控制 text 对象的显示位置。\n     *         text.y = 100;//设置 text 对象的属性 y 的值，用于控制 text 对象的显示位置。\n     *         text.width = 300;//设置 text 的宽度。\n     *         text.height = 200;//设置 text 的高度。\n     *         text.italic = true;//设置 text 的文本显示为斜体。\n     *         text.borderColor = \"#fff000\";//设置 text 的文本边框颜色。\n     *         Laya.stage.addChild(text);//将 text 添加到显示列表。\n     *     }\n     * }\n     */\n    class Text extends Sprite {\n        static _testWord: string;\n        /**语言包*/\n        static langPacks: any;\n        /**visible不进行任何裁切。*/\n        static VISIBLE: string;\n        /**scroll 不显示文本域外的字符像素，并且支持 scroll 接口。*/\n        static SCROLL: string;\n        /**hidden 不显示超出文本域的字符。*/\n        static HIDDEN: string;\n        /**\n         * WebGL渲染文字时是否启用字符缓存，对于字形多的语种，禁用缓存。<br>\n         * 对于字形随字母组合变化的语种，如阿拉伯文，启用将使显示错误。但是即使禁用，自动换行也会在错误的地方截断。\n         */\n        static CharacterCache: boolean;\n        /**是否是从右向左的显示顺序*/\n        static RightToLeft: boolean;\n        protected _text: string;\n        protected _isChanged: boolean;\n        protected _textWidth: number;\n        protected _textHeight: number;\n        protected _lines: Array<any>;\n        protected _lineWidths: Array<any>;\n        protected _startX: number;\n        protected _startY: number;\n        protected _lastVisibleLineIndex: number;\n        protected _words: Array<any>;\n        protected _charSize: any;\n        protected static _fontFamilyMap: any;\n        /**\n         * <p>overflow 指定文本超出文本域后的行为。其值为\"hidden\"、\"visible\"和\"scroll\"之一。</p>\n         * <p>性能从高到低依次为：hidden > visible > scroll。</p>\n         */\n        overflow: string;\n        /**\n         * 是否显示下划线。\n         */\n        underline: boolean;\n        /**\n         * 创建一个新的 <code>Text</code> 实例。\n         */\n        constructor();\n        /**\n         * 注册位图字体。\n         * @param\tname\t\t位图字体的名称。\n         * @param\tbitmapFont\t位图字体文件。\n         */\n        static registerBitmapFont(name: string, bitmapFont: BitmapFont): void;\n        /**\n         * 移除注册的位图字体文件。\n         * @param\tname\t\t位图字体的名称。\n         * @param\tdestroy\t\t是否销毁指定的字体文件。\n         */\n        static unregisterBitmapFont(name: string, destroy?: boolean): void;\n        /**\n         * 设置文字排版模式为右到左。\n         */\n        static setTextRightToLeft(): void;\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * @private\n         * @inheritDoc\n         */\n        _getBoundPointsM(ifRotate?: boolean): Array<any>;\n        /**\n         * @inheritDoc\n         */\n        getGraphicBounds(realSize?: boolean): Rectangle;\n        /**\n         * @inheritDoc\n         */\n        width: number;\n        /**\n         * @private\n         * @inheritDoc\n         */\n        _getCSSStyle(): CSSStyle;\n        /**\n         * @inheritDoc\n         */\n        height: number;\n        /**\n         * 表示文本的宽度，以像素为单位。\n         */\n        readonly textWidth: number;\n        /**\n         * 表示文本的高度，以像素为单位。\n         */\n        readonly textHeight: number;\n        /** 当前文本的内容字符串。*/\n        text: string;\n        /**\n         * <p>根据指定的文本，从语言包中取当前语言的文本内容。并对此文本中的\n         * <p>设置Text.langPacks语言包后，即可使用lang获取里面的语言</p>\n         * <p>例如：\n         * <li>（1）text 的值为“我的名字”，先取到这个文本对应的当前语言版本里的值“My name”，将“My name”设置为当前文本的内容。</li>\n         * <li>（2）text 的值为“恭喜你赢得\n         * \t\t\t则先取到这个文本对应的当前语言版本里的值“Congratulations on your winning\n         * \t\t\t然后将文本里的\n         * \t\t\t将替换处理后的文本“Congratulations on your winning 100 diamonds, 200 experience.”设置为当前文本的内容。\n         * </li>\n         * </p>\n         * @param\ttext 文本内容。\n         * @param\t...args 文本替换参数。\n         */\n        lang(text: string, arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any, arg6?: any, arg7?: any, arg8?: any, arg9?: any, arg10?: any): void;\n        /**\n         * <p>文本的字体名称，以字符串形式表示。</p>\n         * <p>默认值为：\"Arial\"，可以通过Font.defaultFont设置默认字体。</p>\n         * <p>如果运行时系统找不到设定的字体，则用系统默认的字体渲染文字，从而导致显示异常。(通常电脑上显示正常，在一些移动端因缺少设置的字体而显示异常)。</p>\n         * @see laya.display.css.Font#defaultFamily\n         */\n        font: string;\n        /**\n         * <p>指定文本的字体大小（以像素为单位）。</p>\n         * <p>默认为20像素，可以通过 <code>Text.defaultSize</code> 设置默认大小。</p>\n         */\n        fontSize: number;\n        /**\n         * <p>指定文本是否为粗体字。</p>\n         * <p>默认值为 false，这意味着不使用粗体字。如果值为 true，则文本为粗体字。</p>\n         */\n        bold: boolean;\n        /**\n         * <p>表示文本的颜色值。可以通过 <code>Text.defaultColor</code> 设置默认颜色。</p>\n         * <p>默认值为黑色。</p>\n         */\n        color: string;\n        /**\n         * <p>表示使用此文本格式的文本是否为斜体。</p>\n         * <p>默认值为 false，这意味着不使用斜体。如果值为 true，则文本为斜体。</p>\n         */\n        italic: boolean;\n        /**\n         * <p>表示文本的水平显示方式。</p>\n         * <p><b>取值：</b>\n         * <li>\"left\"： 居左对齐显示。</li>\n         * <li>\"center\"： 居中对齐显示。</li>\n         * <li>\"right\"： 居右对齐显示。</li>\n         * </p>\n         */\n        align: string;\n        /**\n         * <p>表示文本的垂直显示方式。</p>\n         * <p><b>取值：</b>\n         * <li>\"top\"： 居顶部对齐显示。</li>\n         * <li>\"middle\"： 居中对齐显示。</li>\n         * <li>\"bottom\"： 居底部对齐显示。</li>\n         * </p>\n         */\n        valign: string;\n        /**\n         * <p>表示文本是否自动换行，默认为false。</p>\n         * <p>若值为true，则自动换行；否则不自动换行。</p>\n         */\n        wordWrap: boolean;\n        /**\n         * 垂直行间距（以像素为单位）。\n         */\n        leading: number;\n        /**\n         * <p>边距信息。</p>\n         * <p>数据格式：[上边距，右边距，下边距，左边距]（边距以像素为单位）。</p>\n         */\n        padding: Array<any>;\n        /**\n         * 文本背景颜色，以字符串表示。\n         */\n        bgColor: string;\n        /**\n         * 文本边框背景颜色，以字符串表示。\n         */\n        borderColor: string;\n        /**\n         * <p>描边宽度（以像素为单位）。</p>\n         * <p>默认值0，表示不描边。</p>\n         */\n        stroke: number;\n        /**\n         * <p>描边颜色，以字符串表示。</p>\n         * <p>默认值为 \"#000000\"（黑色）;</p>\n         */\n        strokeColor: string;\n        protected isChanged: boolean;\n        protected _isPassWordMode(): boolean;\n        protected _getPassWordTxt(txt: string): string;\n        protected renderText(begin: number, visibleLineCount: number): void;\n        /**\n         * <p>排版文本。</p>\n         * <p>进行宽高计算，渲染、重绘文本。</p>\n         */\n        typeset(): void;\n        /**\n         * <p>快速更改显示文本。不进行排版计算，效率较高。</p>\n         * <p>如果只更改文字内容，不更改文字样式，建议使用此接口，能提高效率。</p>\n         * @param text 文本内容。\n         */\n        changeText(text: string): void;\n        protected parseLines(text: string): void;\n        protected parseLine(line: string, wordWrapWidth: number): void;\n        /**\n         * 返回字符在本类实例的父坐标系下的坐标。\n         * @param charIndex\t索引位置。\n         * @param out\t\t（可选）输出的Point引用。\n         * @return Point 字符在本类实例的父坐标系下的坐标。如果out参数不为空，则将结果赋值给指定的Point对象，否则创建一个新的Point对象返回。建议使用Point.TEMP作为out参数，可以省去Point对象创建和垃圾回收的开销，尤其是在需要频繁执行的逻辑中，比如帧循环和MOUSE_MOVE事件回调函数里面。\n         */\n        getCharPoint(charIndex: number, out?: Point): Point;\n        /**\n         * 获取横向滚动量。\n         */\n        /**\n         * <p>设置横向滚动量。</p>\n         * <p>即使设置超出滚动范围的值，也会被自动限制在可能的最大值处。</p>\n         */\n        scrollX: number;\n        /**\n         * 获取纵向滚动量。\n         */\n        /**\n         * 设置纵向滚动量（px)。即使设置超出滚动范围的值，也会被自动限制在可能的最大值处。\n         */\n        scrollY: number;\n        /**\n         * 获取横向可滚动最大值。\n         */\n        readonly maxScrollX: number;\n        /**\n         * 获取纵向可滚动最大值。\n         */\n        readonly maxScrollY: number;\n        readonly lines: Array<any>;\n        underlineColor: string;\n        /**\n         * 判断系统是否支持指定的font。\n         *\n         * @param\tfont\t对font进行支持测试\n         * @return\ttrue表示系统支持\n         */\n        static supportFont(font: string): boolean;\n    }\n}\ndeclare module laya.events {\n    import Sprite = laya.display.Sprite;\n    /**\n     * <code>Event</code> 是事件类型的集合。一般当发生事件时，<code>Event</code> 对象将作为参数传递给事件侦听器。\n     */\n    class Event {\n        /** 一个空的 Event 对象。用于事件派发中转使用。*/\n        static EMPTY: Event;\n        /** 定义 mousedown 事件对象的 type 属性值。*/\n        static MOUSE_DOWN: string;\n        /** 定义 mouseup 事件对象的 type 属性值。*/\n        static MOUSE_UP: string;\n        /** 定义 click 事件对象的 type 属性值。*/\n        static CLICK: string;\n        /** 定义 rightmousedown 事件对象的 type 属性值。*/\n        static RIGHT_MOUSE_DOWN: string;\n        /** 定义 rightmouseup 事件对象的 type 属性值。*/\n        static RIGHT_MOUSE_UP: string;\n        /** 定义 rightclick 事件对象的 type 属性值。*/\n        static RIGHT_CLICK: string;\n        /** 定义 mousemove 事件对象的 type 属性值。*/\n        static MOUSE_MOVE: string;\n        /** 定义 mouseover 事件对象的 type 属性值。*/\n        static MOUSE_OVER: string;\n        /** 定义 mouseout 事件对象的 type 属性值。*/\n        static MOUSE_OUT: string;\n        /** 定义 mousewheel 事件对象的 type 属性值。*/\n        static MOUSE_WHEEL: string;\n        /** 定义 mouseover 事件对象的 type 属性值。*/\n        static ROLL_OVER: string;\n        /** 定义 mouseout 事件对象的 type 属性值。*/\n        static ROLL_OUT: string;\n        /** 定义 doubleclick 事件对象的 type 属性值。*/\n        static DOUBLE_CLICK: string;\n        /** 定义 change 事件对象的 type 属性值。*/\n        static CHANGE: string;\n        /** 定义 changed 事件对象的 type 属性值。*/\n        static CHANGED: string;\n        /** 定义 resize 事件对象的 type 属性值。*/\n        static RESIZE: string;\n        /** 定义 added 事件对象的 type 属性值。*/\n        static ADDED: string;\n        /** 定义 removed 事件对象的 type 属性值。*/\n        static REMOVED: string;\n        /** 定义 display 事件对象的 type 属性值。*/\n        static DISPLAY: string;\n        /** 定义 undisplay 事件对象的 type 属性值。*/\n        static UNDISPLAY: string;\n        /** 定义 error 事件对象的 type 属性值。*/\n        static ERROR: string;\n        /** 定义 complete 事件对象的 type 属性值。*/\n        static COMPLETE: string;\n        /** 定义 loaded 事件对象的 type 属性值。*/\n        static LOADED: string;\n        /** 定义 progress 事件对象的 type 属性值。*/\n        static PROGRESS: string;\n        /** 定义 input 事件对象的 type 属性值。*/\n        static INPUT: string;\n        /** 定义 render 事件对象的 type 属性值。*/\n        static RENDER: string;\n        /** 定义 open 事件对象的 type 属性值。*/\n        static OPEN: string;\n        /** 定义 message 事件对象的 type 属性值。*/\n        static MESSAGE: string;\n        /** 定义 close 事件对象的 type 属性值。*/\n        static CLOSE: string;\n        /** 定义 keydown 事件对象的 type 属性值。*/\n        static KEY_DOWN: string;\n        /** 定义 keypress 事件对象的 type 属性值。*/\n        static KEY_PRESS: string;\n        /** 定义 keyup 事件对象的 type 属性值。*/\n        static KEY_UP: string;\n        /** 定义 frame 事件对象的 type 属性值。*/\n        static FRAME: string;\n        /** 定义 dragstart 事件对象的 type 属性值。*/\n        static DRAG_START: string;\n        /** 定义 dragmove 事件对象的 type 属性值。*/\n        static DRAG_MOVE: string;\n        /** 定义 dragend 事件对象的 type 属性值。*/\n        static DRAG_END: string;\n        /** 定义 enter 事件对象的 type 属性值。*/\n        static ENTER: string;\n        /** 定义 select 事件对象的 type 属性值。*/\n        static SELECT: string;\n        /** 定义 blur 事件对象的 type 属性值。*/\n        static BLUR: string;\n        /** 定义 focus 事件对象的 type 属性值。*/\n        static FOCUS: string;\n        /** 定义 visibilitychange 事件对象的 type 属性值。*/\n        static VISIBILITY_CHANGE: string;\n        /** 定义 focuschange 事件对象的 type 属性值。*/\n        static FOCUS_CHANGE: string;\n        /** 定义 played 事件对象的 type 属性值。*/\n        static PLAYED: string;\n        /** 定义 paused 事件对象的 type 属性值。*/\n        static PAUSED: string;\n        /** 定义 stopped 事件对象的 type 属性值。*/\n        static STOPPED: string;\n        /** 定义 start 事件对象的 type 属性值。*/\n        static START: string;\n        /** 定义 end 事件对象的 type 属性值。*/\n        static END: string;\n        /** 定义 enablechanged 事件对象的 type 属性值。*/\n        static ENABLE_CHANGED: string;\n        /** 定义 activeinhierarchychanged 事件对象的 type 属性值。*/\n        static ACTIVE_IN_HIERARCHY_CHANGED: string;\n        /** 定义 componentadded 事件对象的 type 属性值。*/\n        static COMPONENT_ADDED: string;\n        /** 定义 componentremoved 事件对象的 type 属性值。*/\n        static COMPONENT_REMOVED: string;\n        /** 定义 layerchanged 事件对象的 type 属性值。*/\n        static LAYER_CHANGED: string;\n        /** 定义 hierarchyloaded 事件对象的 type 属性值。*/\n        static HIERARCHY_LOADED: string;\n        /** 定义 recovered 事件对象的 type 属性值。*/\n        static RECOVERED: string;\n        /** 定义 released 事件对象的 type 属性值。*/\n        static RELEASED: string;\n        /** 定义 link 事件对象的 type 属性值。*/\n        static LINK: string;\n        /** 定义 label 事件对象的 type 属性值。*/\n        static LABEL: string;\n        /**浏览器全屏更改时触发*/\n        static FULL_SCREEN_CHANGE: string;\n        /**显卡设备丢失时触发*/\n        static DEVICE_LOST: string;\n        /**模型更换时触发*/\n        static MESH_CHANGED: string;\n        /**材质更换时触发*/\n        static MATERIAL_CHANGED: string;\n        /**世界矩阵更新时触发。*/\n        static WORLDMATRIX_NEEDCHANGE: string;\n        /**更换动作时触发。*/\n        static ANIMATION_CHANGED: string;\n        /**进入触发器时触发。*/\n        static TRIGGER_ENTER: string;\n        /**保持触发器时触发。*/\n        static TRIGGER_STAY: string;\n        /**退出触发器时触发。*/\n        static TRIGGER_EXIT: string;\n        /**拖尾渲染节点改变时触发。*/\n        static TRAIL_FILTER_CHANGE: string;\n        /**多米诺渲染节点改变时触发。*/\n        static DOMINO_FILTER_CHANGE: string;\n        /** 事件类型。*/\n        type: string;\n        /** 原生浏览器事件。*/\n        nativeEvent: any;\n        /** 事件目标触发对象。*/\n        target: Sprite;\n        /** 事件当前冒泡对象。*/\n        currentTarget: Sprite;\n        _stoped: boolean;\n        /** 分配给触摸点的唯一标识号（作为 int）。*/\n        touchId: number;\n        /**键盘值*/\n        keyCode: number;\n        /**滚轮滑动增量*/\n        delta: number;\n        /**\n         * 设置事件数据。\n         * @param\ttype 事件类型。\n         * @param\tcurrentTarget 事件目标触发对象。\n         * @param\ttarget 事件当前冒泡对象。\n         * @return 返回当前 Event 对象。\n         */\n        setTo(type: string, currentTarget: Sprite, target: Sprite): Event;\n        /**\n         * 阻止对事件流中当前节点的后续节点中的所有事件侦听器进行处理。此方法不会影响当前节点 (currentTarget) 中的任何事件侦听器。\n         */\n        stopPropagation(): void;\n        /**\n         * 触摸点列表。\n         */\n        readonly touches: Array<any>;\n        /**\n         * 表示 Alt 键是处于活动状态 (true) 还是非活动状态 (false)。\n         */\n        readonly altKey: boolean;\n        /**\n         * 表示 Ctrl 键是处于活动状态 (true) 还是非活动状态 (false)。\n         */\n        readonly ctrlKey: boolean;\n        /**\n         * 表示 Shift 键是处于活动状态 (true) 还是非活动状态 (false)。\n         */\n        readonly shiftKey: boolean;\n        /**\n         * 包含按下或释放的键的字符代码值。字符代码值为英文键盘值。\n         */\n        readonly charCode: boolean;\n        /**\n         * 表示键在键盘上的位置。这对于区分在键盘上多次出现的键非常有用。<br>\n         * 例如，您可以根据此属性的值来区分左 Shift 键和右 Shift 键：左 Shift 键的值为 KeyLocation.LEFT，右 Shift 键的值为 KeyLocation.RIGHT。另一个示例是区分标准键盘 (KeyLocation.STANDARD) 与数字键盘 (KeyLocation.NUM_PAD) 上按下的数字键。\n         */\n        readonly keyLocation: number;\n        /**鼠标在 Stage 上的 X 轴坐标*/\n        readonly stageX: number;\n        /**鼠标在 Stage 上的 Y 轴坐标*/\n        readonly stageY: number;\n    }\n}\ndeclare module laya.events {\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>EventDispatcher</code> 类是可调度事件的所有类的基类。\n     */\n    class EventDispatcher {\n        static MOUSE_EVENTS: any;\n        /**\n         * 检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。\n         * @param\ttype 事件的类型。\n         * @return 如果指定类型的侦听器已注册，则值为 true；否则，值为 false。\n         */\n        hasListener(type: string): boolean;\n        /**\n         * 派发事件。\n         * @param type\t事件类型。\n         * @param data\t（可选）回调数据。<b>注意：</b>如果是需要传递多个参数 p1,p2,p3,...可以使用数组结构如：[p1,p2,p3,...] ；如果需要回调单个参数 p ，且 p 是一个数组，则需要使用结构如：[p]，其他的单个参数 p ，可以直接传入参数 p。\n         * @return 此事件类型是否有侦听者，如果有侦听者则值为 true，否则值为 false。\n         */\n        event(type: string, data?: any): boolean;\n        /**\n         * 使用 EventDispatcher 对象注册指定类型的事件侦听器对象，以使侦听器能够接收事件通知。\n         * @param type\t\t事件的类型。\n         * @param caller\t事件侦听函数的执行域。\n         * @param listener\t事件侦听函数。\n         * @param args\t\t（可选）事件侦听函数的回调参数。\n         * @return 此 EventDispatcher 对象。\n         */\n        on(type: string, caller: any, listener: Function, args?: Array<any>): EventDispatcher;\n        /**\n         * 使用 EventDispatcher 对象注册指定类型的事件侦听器对象，以使侦听器能够接收事件通知，此侦听事件响应一次后自动移除。\n         * @param type\t\t事件的类型。\n         * @param caller\t事件侦听函数的执行域。\n         * @param listener\t事件侦听函数。\n         * @param args\t\t（可选）事件侦听函数的回调参数。\n         * @return 此 EventDispatcher 对象。\n         */\n        once(type: string, caller: any, listener: Function, args?: Array<any>): EventDispatcher;\n        _createListener(type: string, caller: any, listener: Function, args: Array<any>, once: boolean, offBefore?: boolean): EventDispatcher;\n        /**\n         * 从 EventDispatcher 对象中删除侦听器。\n         * @param type\t\t事件的类型。\n         * @param caller\t事件侦听函数的执行域。\n         * @param listener\t事件侦听函数。\n         * @param onceOnly\t（可选）如果值为 true ,则只移除通过 once 方法添加的侦听器。\n         * @return 此 EventDispatcher 对象。\n         */\n        off(type: string, caller: any, listener: Function, onceOnly?: boolean): EventDispatcher;\n        /**\n         * 从 EventDispatcher 对象中删除指定事件类型的所有侦听器。\n         * @param type\t（可选）事件类型，如果值为 null，则移除本对象所有类型的侦听器。\n         * @return 此 EventDispatcher 对象。\n         */\n        offAll(type?: string): EventDispatcher;\n        /**\n         * 检测指定事件类型是否是鼠标事件。\n         * @param\ttype 事件的类型。\n         * @return\t如果是鼠标事件，则值为 true;否则，值为 false。\n         */\n        isMouseEvent(type: string): boolean;\n    }\n    class EventHandler extends Handler {\n        EventHandler(caller: any, method: Function, args: Array<any>, once: boolean): any;\n        recover(): void;\n        /**\n         * 从对象池内创建一个Handler，默认会执行一次回收，如果不需要自动回收，设置once参数为false。\n         * @param caller\t执行域(this)。\n         * @param method\t回调方法。\n         * @param args\t\t（可选）携带的参数。\n         * @param once\t\t（可选）是否只执行一次，如果为true，回调后执行recover()进行回收，默认为true。\n         * @return 返回创建的handler实例。\n         */\n        static create(caller: any, method: Function, args?: Array<any>, once?: boolean): Handler;\n    }\n}\ndeclare module laya.events {\n    /**\n     * <code>Keyboard</code> 类的属性是一些常数，这些常数表示控制游戏时最常用的键。\n     */\n    class Keyboard {\n        /** 与 0 的键控代码值(48)关联的常数。*/\n        static NUMBER_0: number;\n        /** 与 1 的键控代码值(49)关联的常数。*/\n        static NUMBER_1: number;\n        /** 与 2 的键控代码值(50)关联的常数。*/\n        static NUMBER_2: number;\n        /** 与 3 的键控代码值(51)关联的常数。*/\n        static NUMBER_3: number;\n        /** 与 4 的键控代码值(52)关联的常数。*/\n        static NUMBER_4: number;\n        /** 与 5 的键控代码值(53)关联的常数。*/\n        static NUMBER_5: number;\n        /** 与 6 的键控代码值(54)关联的常数。*/\n        static NUMBER_6: number;\n        /** 与 7 的键控代码值(55)关联的常数。*/\n        static NUMBER_7: number;\n        /** 与 8 的键控代码值(56)关联的常数。*/\n        static NUMBER_8: number;\n        /** 与 9 的键控代码值(57)关联的常数。*/\n        static NUMBER_9: number;\n        /** 与 A 键的键控代码值(65)关联的常数。*/\n        static A: number;\n        /** 与 B 键的键控代码值(66)关联的常数。*/\n        static B: number;\n        /** 与 C 键的键控代码值(67)关联的常数。*/\n        static C: number;\n        /** 与 D 键的键控代码值(68)关联的常数。*/\n        static D: number;\n        /** 与 E 键的键控代码值(69)关联的常数。*/\n        static E: number;\n        /** 与 F 键的键控代码值(70)关联的常数。*/\n        static F: number;\n        /** 与 G 键的键控代码值(71)关联的常数。*/\n        static G: number;\n        /** 与 H 键的键控代码值(72)关联的常数。*/\n        static H: number;\n        /** 与 I 键的键控代码值(73)关联的常数。*/\n        static I: number;\n        /** 与 J 键的键控代码值(74)关联的常数。*/\n        static J: number;\n        /** 与 K 键的键控代码值(75)关联的常数。*/\n        static K: number;\n        /** 与 L 键的键控代码值(76)关联的常数。*/\n        static L: number;\n        /** 与 M 键的键控代码值(77)关联的常数。*/\n        static M: number;\n        /** 与 N 键的键控代码值(78)关联的常数。*/\n        static N: number;\n        /** 与 O 键的键控代码值(79)关联的常数。*/\n        static O: number;\n        /** 与 P 键的键控代码值(80)关联的常数。*/\n        static P: number;\n        /** 与 Q 键的键控代码值(81)关联的常数。*/\n        static Q: number;\n        /** 与 R 键的键控代码值(82)关联的常数。*/\n        static R: number;\n        /** 与 S 键的键控代码值(83)关联的常数。*/\n        static S: number;\n        /** 与 T 键的键控代码值(84)关联的常数。*/\n        static T: number;\n        /** 与 U 键的键控代码值(85)关联的常数。*/\n        static U: number;\n        /** 与 V 键的键控代码值(86)关联的常数。*/\n        static V: number;\n        /** 与 W 键的键控代码值(87)关联的常数。*/\n        static W: number;\n        /** 与 X 键的键控代码值(88)关联的常数。*/\n        static X: number;\n        /** 与 Y 键的键控代码值(89)关联的常数。*/\n        static Y: number;\n        /** 与 Z 键的键控代码值(90)关联的常数。*/\n        static Z: number;\n        /** 与 F1 的键控代码值(112)关联的常数。*/\n        static F1: number;\n        /** 与 F2 的键控代码值(113)关联的常数。*/\n        static F2: number;\n        /** 与 F3 的键控代码值(114)关联的常数。*/\n        static F3: number;\n        /** 与 F4 的键控代码值(115)关联的常数。*/\n        static F4: number;\n        /** 与 F5 的键控代码值(116)关联的常数。*/\n        static F5: number;\n        /** 与 F6 的键控代码值(117)关联的常数。*/\n        static F6: number;\n        /** 与 F7 的键控代码值(118)关联的常数。*/\n        static F7: number;\n        /** 与 F8 的键控代码值(119)关联的常数。*/\n        static F8: number;\n        /** 与 F9 的键控代码值(120)关联的常数。*/\n        static F9: number;\n        /** 与 F10 的键控代码值(121)关联的常数。*/\n        static F10: number;\n        /** 与 F11 的键控代码值(122)关联的常数。*/\n        static F11: number;\n        /** 与 F12 的键控代码值(123)关联的常数。*/\n        static F12: number;\n        /** 与 F13 的键控代码值(124)关联的常数。*/\n        static F13: number;\n        /** 与 F14 的键控代码值(125)关联的常数。*/\n        static F14: number;\n        /** 与 F15 的键控代码值(126)关联的常数。*/\n        static F15: number;\n        /** 与数字键盘的伪键控代码(21)关联的常数。*/\n        static NUMPAD: number;\n        /** 与数字键盘上的数字 0 的键控代码值(96)关联的常数。*/\n        static NUMPAD_0: number;\n        /** 与数字键盘上的数字 1 的键控代码值(97)关联的常数。*/\n        static NUMPAD_1: number;\n        /** 与数字键盘上的数字 2 的键控代码值(98)关联的常数。*/\n        static NUMPAD_2: number;\n        /** 与数字键盘上的数字 3 的键控代码值(99)关联的常数。*/\n        static NUMPAD_3: number;\n        /** 与数字键盘上的数字 4 的键控代码值(100)关联的常数。*/\n        static NUMPAD_4: number;\n        /** 与数字键盘上的数字 5 的键控代码值(101)关联的常数。*/\n        static NUMPAD_5: number;\n        /** 与数字键盘上的数字 6 的键控代码值(102)关联的常数。*/\n        static NUMPAD_6: number;\n        /** 与数字键盘上的数字 7 的键控代码值(103)关联的常数。*/\n        static NUMPAD_7: number;\n        /** 与数字键盘上的数字 8 的键控代码值(104)关联的常数。*/\n        static NUMPAD_8: number;\n        /** 与数字键盘上的数字 9 的键控代码值(105)关联的常数。*/\n        static NUMPAD_9: number;\n        /** 与数字键盘上的加号(+)的键控代码值(107)关联的常数。*/\n        static NUMPAD_ADD: number;\n        /** 与数字键盘上的小数点(.)的键控代码值(110)关联的常数。*/\n        static NUMPAD_DECIMAL: number;\n        /** 与数字键盘上的除号(/)的键控代码值(111)关联的常数。*/\n        static NUMPAD_DIVIDE: number;\n        /** 与数字键盘上的 Enter 的键控代码值(108)关联的常数。*/\n        static NUMPAD_ENTER: number;\n        /** 与数字键盘上的乘号(*)的键控代码值(106)关联的常数。*/\n        static NUMPAD_MULTIPLY: number;\n        /** 与数字键盘上的减号(-)的键控代码值(109)关联的常数。*/\n        static NUMPAD_SUBTRACT: number;\n        /** 与 ; 键的键控代码值(186)关联的常数。*/\n        static SEMICOLON: number;\n        /** 与=键的键控代码值(187)关联的常数。*/\n        static EQUAL: number;\n        /** 与 F15 的键控代码值(188)关联的常数。*/\n        static COMMA: number;\n        /** 与 - 键的键控代码值(189)关联的常数。*/\n        static MINUS: number;\n        /** 与 . 键的键控代码值(190)关联的常数。*/\n        static PERIOD: number;\n        /** 与 / 键的键控代码值(191)关联的常数。*/\n        static SLASH: number;\n        /** 与 ` 键的键控代码值(192)关联的常数。*/\n        static BACKQUOTE: number;\n        /** 与 [ 键的键控代码值(219)关联的常数。*/\n        static LEFTBRACKET: number;\n        /** 与 \\ 键的键控代码值(220)关联的常数。*/\n        static BACKSLASH: number;\n        /** 与 ] 键的键控代码值(221)关联的常数。*/\n        static RIGHTBRACKET: number;\n        /** 与 ' 键的键控代码值(222)关联的常数。*/\n        static QUOTE: number;\n        /** 与 Alternate(Option)键的键控代码值(18)关联的常数。*/\n        static ALTERNATE: number;\n        /** 与 Backspace 的键控代码值(8)关联的常数。*/\n        static BACKSPACE: number;\n        /** 与 Caps Lock 的键控代码值(20)关联的常数。*/\n        static CAPS_LOCK: number;\n        /** 与 Mac 命令键(15)关联的常数。*/\n        static COMMAND: number;\n        /** 与 Ctrl 的键控代码值(17)关联的常数。*/\n        static CONTROL: number;\n        /** 与 Delete 的键控代码值(46)关联的常数。*/\n        static DELETE: number;\n        /** 与 Enter 的键控代码值(13)关联的常数。*/\n        static ENTER: number;\n        /** 与 Esc 的键控代码值(27)关联的常数。*/\n        static ESCAPE: number;\n        /** 与 Page Up 的键控代码值(33)关联的常数。*/\n        static PAGE_UP: number;\n        /** 与 Page Down 的键控代码值(34)关联的常数。*/\n        static PAGE_DOWN: number;\n        /** 与 End 的键控代码值(35)关联的常数。*/\n        static END: number;\n        /** 与 Home 的键控代码值(36)关联的常数。*/\n        static HOME: number;\n        /** 与向左箭头键的键控代码值(37)关联的常数。*/\n        static LEFT: number;\n        /** 与向上箭头键的键控代码值(38)关联的常数。*/\n        static UP: number;\n        /** 与向右箭头键的键控代码值(39)关联的常数。*/\n        static RIGHT: number;\n        /** 与向下箭头键的键控代码值(40)关联的常数。*/\n        static DOWN: number;\n        /** 与 Shift 的键控代码值(16)关联的常数。*/\n        static SHIFT: number;\n        /** 与空格键的键控代码值(32)关联的常数。*/\n        static SPACE: number;\n        /** 与 Tab 的键控代码值(9)关联的常数。*/\n        static TAB: number;\n        /** 与 Insert 的键控代码值(45)关联的常数。*/\n        static INSERT: number;\n    }\n}\ndeclare module laya.events {\n    /**\n     * <p><code>KeyBoardManager</code> 是键盘事件管理类。该类从浏览器中接收键盘事件，并派发该事件。</p>\n     * <p>派发事件时若 Stage.focus 为空则只从 Stage 上派发该事件，否则将从 Stage.focus 对象开始一直冒泡派发该事件。所以在 Laya.stage 上监听键盘事件一定能够收到，如果在其他地方监听，则必须处在Stage.focus的冒泡链上才能收到该事件。</p>\n     * <p>用户可以通过代码 Laya.stage.focus=someNode 的方式来设置focus对象。</p>\n     * <p>用户可统一的根据事件对象中 e.keyCode 来判断按键类型，该属性兼容了不同浏览器的实现。</p>\n     */\n    class KeyBoardManager {\n        /**是否开启键盘事件，默认为true*/\n        static enabled: boolean;\n        static _event: Event;\n        static __init__(): void;\n        /**\n         * 返回指定键是否被按下。\n         * @param\tkey 键值。\n         * @return 是否被按下。\n         */\n        static hasKeyDown(key: number): boolean;\n    }\n}\ndeclare module laya.events {\n    /**\n     * <p><code>KeyLocation</code> 类包含表示在键盘或类似键盘的输入设备上按键位置的常量。</p>\n     * <p><code>KeyLocation</code> 常数用在键盘事件对象的 <code>keyLocation </code>属性中。</p>\n     */\n    class KeyLocation {\n        /**\n         * 表示激活的键不区分位于左侧还是右侧，也不区分是否位于数字键盘（或者是使用对应于数字键盘的虚拟键激活的）。\n         */\n        static STANDARD: number;\n        /**\n         * 表示激活的键在左侧键位置（此键有多个可能的位置）。\n         */\n        static LEFT: number;\n        /**\n         * 表示激活的键在右侧键位置（此键有多个可能的位置）。\n         */\n        static RIGHT: number;\n        /**\n         * <p>表示激活的键位于数字键盘或者是使用对应于数字键盘的虚拟键激活的。</p>\n         * <p>注意：此属性只在flash模式下有效。</p>\n         * */\n        static NUM_PAD: number;\n    }\n}\ndeclare module laya.events {\n    import Stage = laya.display.Stage;\n    /**\n     * <p><code>MouseManager</code> 是鼠标、触摸交互管理器。</p>\n     * <p>鼠标事件流包括捕获阶段、目标阶段、冒泡阶段。<br/>\n     * 捕获阶段：此阶段引擎会从stage开始递归检测stage及其子对象，直到找到命中的目标对象或者未命中任何对象；<br/>\n     * 目标阶段：找到命中的目标对象；<br/>\n     * 冒泡阶段：事件离开目标对象，按节点层级向上逐层通知，直到到达舞台的过程。</p>\n     */\n    class MouseManager {\n        /**\n         * MouseManager 单例引用。\n         */\n        static instance: MouseManager;\n        /**是否开启鼠标检测，默认为true*/\n        static enabled: boolean;\n        /**是否开启多点触控*/\n        static multiTouchEnabled: boolean;\n        /** canvas 上的鼠标X坐标。*/\n        mouseX: number;\n        /** canvas 上的鼠标Y坐标。*/\n        mouseY: number;\n        /** 是否禁用除 stage 以外的鼠标事件检测。*/\n        disableMouseEvent: boolean;\n        /** 鼠标按下的时间。单位为毫秒。*/\n        mouseDownTime: number;\n        /** 鼠标移动精度。*/\n        mouseMoveAccuracy: number;\n        _event: Event;\n        /**\n         * @private\n         * 初始化。\n         */\n        __init__(stage: Stage, canvas: any): void;\n        /**\n         * 执行事件处理。\n         */\n        runEvent(): void;\n    }\n}\ndeclare module laya.events {\n    /**\n     * @private\n     * Touch事件管理类，处理多点触控下的鼠标事件\n     */\n    class TouchManager {\n        static I: TouchManager;\n        /**\n         * 是否启用\n         */\n        enable: boolean;\n        /**\n         * 用于派发事件用的Event对象\n         */\n        _event: Event;\n        /**\n         * 处理touchStart\n         * @param ele\t\t根节点\n         * @param touchID\ttouchID\n         * @param isLeft\t（可选）是否为左键\n         */\n        onMouseDown(ele: any, touchID: number, isLeft?: boolean): void;\n        /**\n         * 处理TouchMove事件\n         * @param ele 根节点\n         * @param touchID touchID\n         *\n         */\n        onMouseMove(ele: any, touchID: number): void;\n        getLastOvers(): Array<any>;\n        stageMouseOut(): void;\n        /**\n         * 处理TouchEnd事件\n         * @param ele\t\t根节点\n         * @param touchID\ttouchID\n         * @param isLeft\t是否为左键\n         */\n        onMouseUp(ele: any, touchID: number, isLeft?: boolean): void;\n    }\n}\ndeclare module laya.filters {\n    import Sprite = laya.display.Sprite;\n    /**\n     * 模糊滤镜\n     */\n    class BlurFilter extends Filter {\n        /**模糊滤镜的强度(值越大，越不清晰 */\n        strength: number;\n        strength_sig2_2sig2_gauss1: Array<any>;\n        /**\n         * 模糊滤镜\n         * @param\tstrength\t模糊滤镜的强度值\n         */\n        constructor(strength?: number);\n        /**\n         * @private\n         * 当前滤镜对应的操作器\n         */\n        readonly action: IFilterAction;\n        /**\n         * @private\n         * 当前滤镜的类型\n         */\n        readonly type: number;\n        /**\n         * @private 通知微端\n         */\n        callNative(sp: Sprite): void;\n    }\n}\ndeclare module laya.filters {\n    import Sprite = laya.display.Sprite;\n    /**\n     * <p><code>ColorFilter</code> 是颜色滤镜。使用 ColorFilter 类可以将 4 x 5 矩阵转换应用于输入图像上的每个像素的 RGBA 颜色和 Alpha 值，以生成具有一组新的 RGBA 颜色和 Alpha 值的结果。该类允许饱和度更改、色相旋转、亮度转 Alpha 以及各种其他效果。您可以将滤镜应用于任何显示对象（即，从 Sprite 类继承的对象）。</p>\n     * <p>注意：对于 RGBA 值，最高有效字节代表红色通道值，其后的有效字节分别代表绿色、蓝色和 Alpha 通道值。</p>\n     */\n    class ColorFilter extends Filter implements IFilter {\n        _mat: Float32Array;\n        _alpha: Float32Array;\n        /**\n         * 创建一个 <code>ColorFilter</code> 实例。\n         * @param mat\t（可选）由 20 个项目（排列成 4 x 5 矩阵）组成的数组，用于颜色转换。\n         */\n        constructor(mat?: Array<any>);\n        readonly type: number;\n        readonly action: IFilterAction;\n        /**\n         * @private 通知微端\n         */\n        callNative(sp: Sprite): void;\n    }\n}\ndeclare module laya.filters {\n    /**\n     * @private\n     * <code>ColorFilterAction</code> 是一个颜色滤镜应用类。\n     */\n    class ColorFilterAction implements IFilterAction {\n        data: ColorFilter;\n        /**\n         * 创建一个 <code>ColorFilterAction</code> 实例。\n         */\n        constructor();\n        /**\n         * 给指定的对象应用颜色滤镜。\n         * @param\tsrcCanvas 需要应用画布对象。\n         * @return 应用了滤镜后的画布对象。\n         */\n        apply(srcCanvas: any): any;\n    }\n}\ndeclare module laya.filters {\n    import Sprite = laya.display.Sprite;\n    /**\n     * <code>Filter</code> 是滤镜基类。\n     */\n    class Filter implements IFilter {\n        static BLUR: number;\n        static COLOR: number;\n        static GLOW: number;\n        static _filterStart: Function;\n        static _filterEnd: Function;\n        static _EndTarget: Function;\n        static _recycleScope: Function;\n        static _filter: Function;\n        static _useSrc: Function;\n        static _endSrc: Function;\n        static _useOut: Function;\n        static _endOut: Function;\n        _action: any;\n        /**\n         * 创建一个 <code>Filter</code> 实例。\n         * */\n        constructor();\n        readonly type: number;\n        readonly action: IFilterAction;\n        callNative(sp: Sprite): void;\n    }\n}\ndeclare module laya.filters {\n    /**\n     * 默认的FILTER,什么都不做\n     * @private\n     */\n    class FilterAction implements IFilterAction {\n        data: any;\n        apply(data: any): any;\n    }\n}\ndeclare module laya.filters {\n    import Sprite = laya.display.Sprite;\n    /**\n     *  发光滤镜(也可以当成阴影滤使用）\n     */\n    class GlowFilter extends Filter {\n        /**\n         * 创建发光滤镜\n         * @param\tcolor\t滤镜的颜色\n         * @param\tblur\t边缘模糊的大小\n         * @param\toffX\tX轴方向的偏移\n         * @param\toffY\tY轴方向的偏移\n         */\n        constructor(color: string, blur?: number, offX?: number, offY?: number);\n        /**\n         * @private\n         * 滤镜类型\n         */\n        readonly type: number;\n        readonly action: IFilterAction;\n        offY: number;\n        offX: number;\n        getColor(): Array<any>;\n        blur: number;\n        /**\n         * @private 通知微端\n         */\n        callNative(sp: Sprite): void;\n    }\n}\ndeclare module laya.filters {\n    /**\n     * 滤镜接口。\n     */\n    interface IFilter {\n    }\n}\ndeclare module laya.filters {\n    /**\n     * <code>IFilterAction</code> 是滤镜动画接口。\n     */\n    interface IFilterAction {\n        apply(srcCanvas: any): any;\n    }\n}\ndeclare module laya.filters {\n    import Sprite = laya.display.Sprite;\n    import RenderContext = laya.renders.RenderContext;\n    import Value2D = laya.webgl.shader.d2.value.Value2D;\n    import SubmitCMDScope = laya.webgl.submit.SubmitCMDScope;\n    interface IFilterActionGL extends IFilterAction {\n        setValue(shader: any): void;\n        setValueMix(shader: Value2D): void;\n        apply3d(scope: SubmitCMDScope, sprite: Sprite, context: RenderContext, x: number, y: number): any;\n    }\n}\ndeclare module laya.filters.webgl {\n    import Sprite = laya.display.Sprite;\n    import BlurFilter = laya.filters.BlurFilter;\n    import RenderContext = laya.renders.RenderContext;\n    import Value2D = laya.webgl.shader.d2.value.Value2D;\n    import SubmitCMDScope = laya.webgl.submit.SubmitCMDScope;\n    /**\n     * @private\n     */\n    class BlurFilterActionGL extends FilterActionGL {\n        data: BlurFilter;\n        constructor();\n        readonly typeMix: number;\n        setValueMix(shader: Value2D): void;\n        apply3d(scope: SubmitCMDScope, sprite: Sprite, context: RenderContext, x: number, y: number): any;\n        setValue(shader: any): void;\n    }\n}\ndeclare module laya.filters.webgl {\n    import Sprite = laya.display.Sprite;\n    import ColorFilter = laya.filters.ColorFilter;\n    import IFilterActionGL = laya.filters.IFilterActionGL;\n    import RenderContext = laya.renders.RenderContext;\n    import SubmitCMDScope = laya.webgl.submit.SubmitCMDScope;\n    class ColorFilterActionGL extends FilterActionGL implements IFilterActionGL {\n        data: ColorFilter;\n        constructor();\n        setValue(shader: any): void;\n        apply3d(scope: SubmitCMDScope, sprite: Sprite, context: RenderContext, x: number, y: number): any;\n    }\n}\ndeclare module laya.filters.webgl {\n    import Sprite = laya.display.Sprite;\n    import IFilterActionGL = laya.filters.IFilterActionGL;\n    import RenderContext = laya.renders.RenderContext;\n    import Value2D = laya.webgl.shader.d2.value.Value2D;\n    import SubmitCMDScope = laya.webgl.submit.SubmitCMDScope;\n    class FilterActionGL implements IFilterActionGL {\n        constructor();\n        readonly typeMix: number;\n        setValue(shader: any): void;\n        setValueMix(shader: Value2D): void;\n        apply3d(scope: SubmitCMDScope, sprite: Sprite, context: RenderContext, x: number, y: number): any;\n        apply(srcCanvas: any): any;\n    }\n}\ndeclare module laya.filters.webgl {\n    import Sprite = laya.display.Sprite;\n    import GlowFilter = laya.filters.GlowFilter;\n    import IFilterActionGL = laya.filters.IFilterActionGL;\n    import RenderContext = laya.renders.RenderContext;\n    import Value2D = laya.webgl.shader.d2.value.Value2D;\n    import SubmitCMDScope = laya.webgl.submit.SubmitCMDScope;\n    /**\n     * @private\n     */\n    class GlowFilterActionGL extends FilterActionGL implements IFilterActionGL {\n        data: GlowFilter;\n        constructor();\n        readonly typeMix: number;\n        setValueMix(shader: Value2D): void;\n        static tmpTarget(scope: SubmitCMDScope, sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        static startOut(scope: SubmitCMDScope, sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        static recycleTarget(scope: SubmitCMDScope, sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        apply3d(scope: SubmitCMDScope, sprite: Sprite, context: RenderContext, x: number, y: number): any;\n        setSpriteWH(sprite: Sprite): void;\n        setValue(shader: any): void;\n    }\n}\ndeclare module laya.filters {\n    /**\n     * @private\n     */\n    class WebGLFilter {\n        static enable(): void;\n    }\n}\ndeclare module laya.html.dom {\n    /**\n     * @private\n     */\n    class HTMLBrElement extends HTMLElement {\n        constructor();\n    }\n}\ndeclare module laya.html.dom {\n    /**\n     * DIV标签\n     */\n    class HTMLDivElement extends HTMLElement {\n        /** 实际内容的高 */\n        contextHeight: number;\n        /** 实际内容的宽 */\n        contextWidth: number;\n        constructor();\n        /**\n         * 设置标签内容\n         */\n        innerHTML: string;\n        /**\n         * 获取对象的宽\n         */\n        width: number;\n        /**\n         * 追加内容，解析并对显示对象排版\n         * @param\ttext\n         */\n        appendHTML(text: string): void;\n        /**\n         * @private\n         * @param\tout\n         * @return\n         */\n        _addChildsToLayout(out: Array<any>): boolean;\n        /**\n         * @private\n         * @param\tout\n         */\n        _addToLayout(out: Array<any>): void;\n        /**\n         * @private\n         * 对显示内容进行排版\n         */\n        layout(): void;\n        /**\n         * 获取对象的高\n         */\n        readonly height: number;\n    }\n}\ndeclare module laya.html.dom {\n    /**\n     * @private\n     */\n    class HTMLDocument extends HTMLElement {\n        static document: HTMLDocument;\n        all: Array<any>;\n        styleSheets: any;\n        constructor();\n        getElementById(id: string): HTMLElement;\n        setElementById(id: string, e: HTMLElement): void;\n    }\n}\ndeclare module laya.html.dom {\n    import Node = laya.display.Node;\n    import Sprite = laya.display.Sprite;\n    import CSSStyle = laya.display.css.CSSStyle;\n    import URL = laya.net.URL;\n    /**\n     * @private\n     */\n    class HTMLElement extends Sprite {\n        URI: URL;\n        constructor();\n        /**\n         * @private\n         */\n        layaoutCallNative(): void;\n        id: string;\n        text: string;\n        innerTEXT: string;\n        parent: Node;\n        appendChild(c: HTMLElement): HTMLElement;\n        readonly style: CSSStyle;\n        /**\n         * rtl模式的getWords函數\n         */\n        _getWords2(): Array<any>;\n        _getWords(): Array<any>;\n        showLinkSprite(): void;\n        _layoutLater(): void;\n        onClick: string;\n        _setAttributes(name: string, value: string): void;\n        href: string;\n        formatURL(url: string): string;\n        color: string;\n        className: string;\n        static fillWords(ele: HTMLElement, words: Array<any>, x: number, y: number, font: string, color: string, underLine: number): void;\n    }\n}\ndeclare module laya.html.dom {\n    /**\n     * iframe标签类，目前用于加载外并解析数据\n     */\n    class HTMLIframeElement extends HTMLDivElement {\n        constructor();\n        /**\n         * 加载html文件，并解析数据\n         * @param\turl\n         */\n        href: string;\n    }\n}\ndeclare module laya.html.dom {\n    import RenderContext = laya.renders.RenderContext;\n    /**\n     * @private\n     */\n    class HTMLImageElement extends HTMLElement {\n        constructor();\n        src: string;\n        _addToLayout(out: Array<any>): void;\n        render(context: RenderContext, x: number, y: number): void;\n        /**\n         * @private\n         */\n        layaoutCallNative(): void;\n    }\n}\ndeclare module laya.html.dom {\n    /**\n     * @private\n     */\n    class HTMLLinkElement extends HTMLElement {\n        type: string;\n        static _cuttingStyle: RegExp;\n        constructor();\n        _onload(data: string): void;\n        href: string;\n    }\n}\ndeclare module laya.html.dom {\n    /**\n     * @private\n     */\n    class HTMLStyleElement extends HTMLElement {\n        constructor();\n        /**\n         * 解析样式\n         */\n        text: string;\n    }\n}\ndeclare module laya.html.utils {\n    import HTMLDivElement = laya.html.dom.HTMLDivElement;\n    import URL = laya.net.URL;\n    /**\n     * @private\n     */\n    class HTMLParse {\n        /**\n         * 解析HTML\n         * @param\tower\n         * @param\txmlString\n         * @param\turl\n         */\n        static parse(ower: HTMLDivElement, xmlString: string, url: URL): void;\n    }\n}\ndeclare module laya.html.utils {\n    import Sprite = laya.display.Sprite;\n    /**\n     * @private\n     * HTML的布局类\n     * 对HTML的显示对象进行排版\n     */\n    class Layout {\n        static later(element: Sprite): void;\n        static layout(element: Sprite): Array<any>;\n        static _multiLineLayout(element: Sprite): Array<any>;\n        /**\n         * rtl模式的排版函数\n         */\n        static _multiLineLayout2(element: Sprite): Array<any>;\n    }\n}\ndeclare module laya.html.utils {\n    /**\n     * @private\n     */\n    class LayoutLine {\n        elements: Array<any>;\n        x: number;\n        y: number;\n        w: number;\n        h: number;\n        wordStartIndex: number;\n        minTextHeight: number;\n        mWidth: number;\n        constructor();\n        /**\n         * 底对齐（默认）\n         * @param\tleft\n         * @param\twidth\n         * @param\tdy\n         * @param\talign\t\t水平\n         * @param\tvalign\t\t垂直\n         * @param\tlineHeight\t行高\n         */\n        updatePos(left: number, width: number, lineNum: number, dy: number, align: number, valign: number, lineHeight: number): void;\n        /**\n         * 布局反向,目前用于将ltr模式布局转为rtl模式布局\n         */\n        revertOrder(width: number): void;\n    }\n}\ndeclare module laya.map {\n    import Sprite = laya.display.Sprite;\n    /**\n     * 地图的每层都会分块渲染处理\n     * 本类就是地图的块数据\n     * @author ...\n     */\n    class GridSprite extends Sprite {\n        /**相对于地图X轴的坐标*/\n        relativeX: number;\n        /**相对于地图Y轴的坐标*/\n        relativeY: number;\n        /**是否用于对象层的独立物件*/\n        isAloneObject: boolean;\n        /**当前GRID中是否有动画*/\n        isHaveAnimation: boolean;\n        /**当前GRID包含的动画*/\n        aniSpriteArray: Array<any>;\n        /**当前GRID包含多少个TILE(包含动画)*/\n        drawImageNum: number;\n        /**\n         * 传入必要的参数，用于裁剪，跟确认此对象类型\n         * @param\tmap\t把地图的引用传进来，参与一些裁剪计算\n         * @param\tobjectKey true:表示当前GridSprite是个活动对象，可以控制，false:地图层的组成块\n         */\n        initData(map: TiledMap, objectKey?: boolean): void;\n        _setDisplay(value: boolean): void;\n        /**\n         * 把一个动画对象绑定到当前GridSprite\n         * @param\tsprite 动画的显示对象\n         */\n        addAniSprite(sprite: TileAniSprite): void;\n        /**\n         * 显示当前GridSprite，并把上面的动画全部显示\n         */\n        show(): void;\n        /**\n         * 隐藏当前GridSprite，并把上面绑定的动画全部移除\n         */\n        hide(): void;\n        /**\n         * 刷新坐标，当我们自己控制一个GridSprite移动时，需要调用此函数，手动刷新\n         */\n        updatePos(): void;\n        /**\n         * 重置当前对象的所有属性\n         */\n        clearAll(): void;\n    }\n}\ndeclare module laya.map {\n    import Sprite = laya.display.Sprite;\n    import GridSprite = laya.map.GridSprite;\n    import Point = laya.maths.Point;\n    import RenderContext = laya.renders.RenderContext;\n    /**\n     * 地图支持多层渲染（例如，地表层，植被层，建筑层等）\n     * 本类就是层级类\n     * @author ...\n     */\n    class MapLayer extends Sprite {\n        _mapData: Array<any>;\n        /**\n         * @private\n         */\n        _gridSpriteArray: Array<any>;\n        /**被合到的层*/\n        tarLayer: MapLayer;\n        /**当前Layer的名称*/\n        layerName: string;\n        /**\n         * 解析LAYER数据，以及初始化一些数据\n         * @param\tlayerData 地图数据中，layer数据的引用\n         * @param\tmap 地图的引用\n         */\n        init(layerData: any, map: TiledMap): void;\n        /**\n         * 通过名字获取控制对象，如果找不到返回为null\n         * @param\tobjName 所要获取对象的名字\n         * @return\n         */\n        getObjectByName(objName: string): GridSprite;\n        /**\n         * 通过名字获取数据，如果找不到返回为null\n         * @param\tobjName 所要获取对象的名字\n         * @return\n         */\n        getObjectDataByName(objName: string): GridSprite;\n        /**\n         * 得到地图层的自定义属性\n         * @param\tname\n         * @return\n         */\n        getLayerProperties(name: string): any;\n        /**\n         * 得到指定格子的数据\n         * @param\ttileX 格子坐标X\n         * @param\ttileY 格子坐标Y\n         * @return\n         */\n        getTileData(tileX: number, tileY: number): number;\n        /**\n         * 通过地图坐标得到屏幕坐标\n         * @param\ttileX 格子坐标X\n         * @param\ttileY 格子坐标Y\n         * @param\tscreenPos 把计算好的屏幕坐标数据，放到此对象中\n         */\n        getScreenPositionByTilePos(tileX: number, tileY: number, screenPos?: Point): void;\n        /**\n         * 通过屏幕坐标来获取选中格子的数据\n         * @param\tscreenX 屏幕坐标x\n         * @param\tscreenY 屏幕坐标y\n         * @return\n         */\n        getTileDataByScreenPos(screenX: number, screenY: number): number;\n        /**\n         * 通过屏幕坐标来获取选中格子的索引\n         * @param\tscreenX 屏幕坐标x\n         * @param\tscreenY 屏幕坐标y\n         * @param\tresult 把计算好的格子坐标，放到此对象中\n         * @return\n         */\n        getTilePositionByScreenPos(screenX: number, screenY: number, result?: Point): boolean;\n        /**\n         * 得到一个GridSprite\n         * @param\tgridX 当前Grid的X轴索引\n         * @param\tgridY 当前Grid的Y轴索引\n         * @return  一个GridSprite对象\n         */\n        getDrawSprite(gridX: number, gridY: number): GridSprite;\n        /**\n         * 将gridSprite设为显示状态\n         * @param gridSprite\n         */\n        showGridSprite(gridSprite: GridSprite): void;\n        /**\n         * 将gridSprite设为隐藏状态\n         * @param gridSprite\n         *\n         */\n        hideGridSprite(gridSprite: GridSprite): void;\n        /**\n         * 更新此层中块的坐标\n         * 手动刷新的目的是，保持层级的宽和高保持最小，加快渲染\n         */\n        updateGridPos(): void;\n        /**\n         * 更新此层中的活动对象\n         */\n        updateAloneObject(): void;\n        /**\n         * 渲染时使用需要更新的列表进行渲染，减少遍历\n         * @param context\n         * @param x\n         * @param y\n         *\n         */\n        render(context: RenderContext, x: number, y: number): void;\n        /**\n         * @private\n         * 把tile画到指定的显示对象上\n         * @param\tgridSprite 被指定显示的目标\n         * @param\ttileX 格子的X轴坐标\n         * @param\ttileY 格子的Y轴坐标\n         * @return\n         */\n        drawTileTexture(gridSprite: GridSprite, tileX: number, tileY: number): boolean;\n        /**\n         * @private\n         * 清理当前对象\n         */\n        clearAll(): void;\n    }\n}\ndeclare module laya.map {\n    import Sprite = laya.display.Sprite;\n    /**\n     * TildMap的动画显示对象（一个动画（TileTexSet），可以绑定多个动画显示对象（TileAniSprite））\n     * @author ...\n     */\n    class TileAniSprite extends Sprite {\n        /**\n         * 确定当前显示对象的名称以及属于哪个动画\n         * @param\taniName\t当前动画显示对象的名字，名字唯一\n         * @param\ttileTextureSet 当前显示对象属于哪个动画（一个动画，可以绑定多个同类显示对象）\n         */\n        setTileTextureSet(aniName: string, tileTextureSet: TileTexSet): void;\n        /**\n         * 把当前动画加入到对应的动画刷新列表中\n         */\n        show(): void;\n        /**\n         * 把当前动画从对应的动画刷新列表中移除\n         */\n        hide(): void;\n        /**\n         * 清理\n         */\n        clearAll(): void;\n    }\n}\ndeclare module laya.map {\n    import Sprite = laya.display.Sprite;\n    import GridSprite = laya.map.GridSprite;\n    import Point = laya.maths.Point;\n    import Rectangle = laya.maths.Rectangle;\n    import Handler = laya.utils.Handler;\n    import MapLayer = laya.map.MapLayer;\n    /**\n     * tiledMap是整个地图的核心\n     * 地图以层级来划分地图（例如：地表层，植被层，建筑层）\n     * 每层又以分块（GridSprite)来处理显示对象，只显示在视口区域的区\n     * 每块又包括N*N个格子（tile)\n     * 格子类型又分为动画格子跟图片格子两种\n     * @author ...\n     */\n    class TiledMap {\n        /**四边形地图*/\n        static ORIENTATION_ORTHOGONAL: string;\n        /**菱形地图*/\n        static ORIENTATION_ISOMETRIC: string;\n        /**45度交错地图*/\n        static ORIENTATION_STAGGERED: string;\n        /**六边形地图*/\n        static ORIENTATION_HEXAGONAL: string;\n        /**地图格子从左上角开始渲染*/\n        static RENDERORDER_RIGHTDOWN: string;\n        /**地图格子从左下角开始渲染*/\n        static RENDERORDER_RIGHTUP: string;\n        /**地图格子从右上角开始渲染*/\n        static RENDERORDER_LEFTDOWN: string;\n        /**地图格子右下角开始渲染*/\n        static RENDERORDER_LEFTUP: string;\n        _viewPortX: number;\n        _viewPortY: number;\n        /**\n         * 是否自动缓存没有动画的地块\n         */\n        autoCache: boolean;\n        /**\n         * 自动缓存类型,地图较大时建议使用normal\n         */\n        autoCacheType: string;\n        /**\n         * 是否合并图层,开启合并图层时，图层属性内可添加layer属性，运行时将会将相邻的layer属性相同的图层进行合并以提高性能\n         */\n        enableMergeLayer: boolean;\n        /**\n         * 是否移除被覆盖的格子,地块可添加type属性，type不为0时表示不透明，被不透明地块遮挡的地块将会被剔除以提高性能\n         */\n        removeCoveredTile: boolean;\n        /**\n         * 是否显示大格子里显示的贴图数量\n         */\n        showGridTextureCount: boolean;\n        /**\n         * 是否调整地块边缘消除缩放导致的缝隙\n         */\n        antiCrack: boolean;\n        /**\n         * 是否在加载完成之后cache所有大格子\n         */\n        cacheAllAfterInit: boolean;\n        constructor();\n        /**\n         * 创建地图\n         * @param\tmapName \t\tJSON文件名字\n         * @param\tviewRect \t\t视口区域\n         * @param\tcompleteHandler 地图创建完成的回调函数\n         * @param\tviewRectPadding 视口扩充区域，把视口区域上、下、左、右扩充一下，防止视口移动时的穿帮\n         * @param\tgridSize \t\tgrid大小\n         * @param\tenableLinear \t是否开启线性取样（为false时，可以解决地图黑线的问题，但画质会锐化）\n         * @param\tlimitRange\t\t把地图限制在显示区域\n         */\n        createMap(mapName: string, viewRect: Rectangle, completeHandler: Handler, viewRectPadding?: Rectangle, gridSize?: Point, enableLinear?: boolean, limitRange?: boolean): void;\n        getTileUserData(id: number, sign: string, defaultV?: any): any;\n        /**\n         * 得到一块指定的地图纹理\n         * @param\tindex 纹理的索引值，默认从1开始\n         * @return\n         */\n        getTexture(index: number): TileTexSet;\n        /**\n         * 得到地图的自定义属性\n         * @param\tname\t\t属性名称\n         * @return\n         */\n        getMapProperties(name: string): any;\n        /**\n         * 得到tile自定义属性\n         * @param\tindex\t\t地图块索引\n         * @param\tid\t\t\t具体的TileSetID\n         * @param\tname\t\t属性名称\n         * @return\n         */\n        getTileProperties(index: number, id: number, name: string): any;\n        /**\n         * 通过纹理索引，生成一个可控制物件\n         * @param\tindex 纹理的索引值，默认从1开始\n         * @return\n         */\n        getSprite(index: number, width: number, height: number): GridSprite;\n        /**\n         * 设置视口的缩放中心点（例如：scaleX= scaleY= 0.5,就是以视口中心缩放）\n         * @param\tscaleX\n         * @param\tscaleY\n         */\n        setViewPortPivotByScale(scaleX: number, scaleY: number): void;\n        /**\n         * 得到当前地图的缩放\n         */\n        /**\n         * 设置地图缩放\n         * @param\tscale\n         */\n        scale: number;\n        /**\n         * 移动视口\n         * @param\tmoveX 视口的坐标x\n         * @param\tmoveY 视口的坐标y\n         */\n        moveViewPort(moveX: number, moveY: number): void;\n        /**\n         * 改变视口大小\n         * @param\tmoveX\t视口的坐标x\n         * @param\tmoveY\t视口的坐标y\n         * @param\twidth\t视口的宽\n         * @param\theight\t视口的高\n         */\n        changeViewPort(moveX: number, moveY: number, width: number, height: number): void;\n        /**\n         * 在锚点的基础上计算，通过宽和高，重新计算视口\n         * @param\twidth\t\t新视口宽\n         * @param\theight\t\t新视口高\n         * @param\trect\t\t返回的结果\n         * @return\n         */\n        changeViewPortBySize(width: number, height: number, rect?: Rectangle): Rectangle;\n        /**\n         * 得到对象层上的某一个物品\n         * @param\tlayerName   层的名称\n         * @param\tobjectName\t所找物品的名称\n         * @return\n         */\n        getLayerObject(layerName: string, objectName: string): GridSprite;\n        /**\n         * 销毁地图\n         */\n        destroy(): void;\n        readonly tileWidth: number;\n        /**\n         * 格子的高度\n         */\n        readonly tileHeight: number;\n        /**\n         * 地图的宽度\n         */\n        readonly width: number;\n        /**\n         * 地图的高度\n         */\n        readonly height: number;\n        /**\n         * 地图横向的格子数\n         */\n        readonly numColumnsTile: number;\n        /**\n         * 地图竖向的格子数\n         */\n        readonly numRowsTile: number;\n        /**\n         * @private\n         * 视口x坐标\n         */\n        readonly viewPortX: number;\n        /**\n         * @private\n         * 视口的y坐标\n         */\n        readonly viewPortY: number;\n        /**\n         * @private\n         * 视口的宽度\n         */\n        readonly viewPortWidth: number;\n        /**\n         * @private\n         * 视口的高度\n         */\n        readonly viewPortHeight: number;\n        /**\n         * 地图的x坐标\n         */\n        readonly x: number;\n        /**\n         * 地图的y坐标\n         */\n        readonly y: number;\n        /**\n         * 块的宽度\n         */\n        readonly gridWidth: number;\n        /**\n         * 块的高度\n         */\n        readonly gridHeight: number;\n        /**\n         * 地图的横向块数\n         */\n        readonly numColumnsGrid: number;\n        /**\n         * 地图的坚向块数\n         */\n        readonly numRowsGrid: number;\n        /**\n         * 当前地图类型\n         */\n        readonly orientation: string;\n        /**\n         * tile渲染顺序\n         */\n        readonly renderOrder: string;\n        /**\n         * 整个地图的显示容器\n         * @return 地图的显示容器\n         */\n        mapSprite(): Sprite;\n        /**\n         * 得到指定的MapLayer\n         * @param layerName 要找的层名称\n         * @return\n         */\n        getLayerByName(layerName: string): MapLayer;\n        /**\n         * 通过索引得MapLayer\n         * @param\tindex 要找的层索引\n         * @return\n         */\n        getLayerByIndex(index: number): MapLayer;\n    }\n    class GRect {\n        left: number;\n        top: number;\n        right: number;\n        bottom: number;\n        clearAll(): void;\n    }\n    class TileMapAniData {\n        mAniIdArray: Array<any>;\n        mDurationTimeArray: Array<any>;\n        mTileTexSetArr: Array<any>;\n        image: any;\n    }\n    class TileSet {\n        firstgid: number;\n        image: string;\n        imageheight: number;\n        imagewidth: number;\n        margin: number;\n        name: number;\n        properties: any;\n        spacing: number;\n        tileheight: number;\n        tilewidth: number;\n        titleoffsetX: number;\n        titleoffsetY: number;\n        tileproperties: any;\n        init(data: any): void;\n    }\n}\ndeclare module laya.map {\n    import TileAniSprite = laya.map.TileAniSprite;\n    import Texture = laya.resource.Texture;\n    /**\n     * 此类是子纹理类，也包括同类动画的管理\n     * TiledMap会把纹理分割成无数子纹理，也可以把其中的某块子纹理替换成一个动画序列\n     * 本类的实现就是如果发现子纹理被替换成一个动画序列，animationKey会被设为true\n     * 即animationKey为true,就使用TileAniSprite来做显示，把动画序列根据时间画到TileAniSprite上\n     * @author ...\n     */\n    class TileTexSet {\n        /**唯一标识*/\n        gid: number;\n        /**子纹理的引用*/\n        texture: Texture;\n        /**纹理显示时的坐标偏移X*/\n        offX: number;\n        /**纹理显示时的坐标偏移Y*/\n        offY: number;\n        /**当前要播放动画的纹理序列*/\n        textureArray: Array<any>;\n        /** 当前动画每帧的时间间隔*/\n        durationTimeArray: Array<any>;\n        /** 动画播放的总时间 */\n        animationTotalTime: number;\n        /**true表示当前纹理，是一组动画，false表示当前只有一个纹理*/\n        isAnimation: boolean;\n        /**\n         * 加入一个动画显示对象到此动画中\n         * @param\taniName\t//显示对象的名字\n         * @param\tsprite\t//显示对象\n         */\n        addAniSprite(aniName: string, sprite: TileAniSprite): void;\n        /**\n         * 移除不需要更新的SPRITE\n         * @param\t_name\n         */\n        removeAniSprite(_name: string): void;\n        /**\n         * 显示当前动画的使用情况\n         */\n        showDebugInfo(): string;\n        /**\n         * 清理\n         */\n        clearAll(): void;\n    }\n}\ndeclare module laya.maths {\n    /**\n     * @private\n     */\n    class Arith {\n        static formatR(r: number): number;\n        static isPOT(w: number, h: number): boolean;\n        static setMatToArray(mat: Matrix, array: any): void;\n    }\n}\ndeclare module laya.maths {\n    /**\n     * @private\n     * 计算贝塞尔曲线的工具类。\n     */\n    class Bezier {\n        /**\n         * 工具类单例\n         */\n        static I: Bezier;\n        /**\n         * 计算二次贝塞尔点。\n         * @param t\n         * @param rst\n         *\n         */\n        getPoint2(t: number, rst: Array<any>): void;\n        /**\n         * 计算三次贝塞尔点\n         * @param t\n         * @param rst\n         *\n         */\n        getPoint3(t: number, rst: Array<any>): void;\n        /**\n         * 计算贝塞尔点序列\n         * @param count\n         * @param rst\n         *\n         */\n        insertPoints(count: number, rst: Array<any>): void;\n        /**\n         * 获取贝塞尔曲线上的点。\n         * @param pList 控制点[x0,y0,x1,y1...]\n         * @param inSertCount 每次曲线的插值数量\n         * @return\n         *\n         */\n        getBezierPoints(pList: Array<any>, inSertCount?: number, count?: number): Array<any>;\n    }\n}\ndeclare module laya.maths {\n    /**\n     * @private\n     * 凸包算法。\n     */\n    class GrahamScan {\n        static multiply(p1: Point, p2: Point, p0: Point): number;\n        /**\n         * 计算两个点的距离。\n         * @param\tp1\n         * @param\tp2\n         * @return\n         */\n        static dis(p1: Point, p2: Point): number;\n        /**\n         * 将数组 src 从索引0位置 依次取 cout 个项添加至 tst 数组的尾部。\n         * @param\trst 原始数组，用于添加新的子元素。\n         * @param\tsrc 用于取子元素的数组。\n         * @param\tcount 需要取得子元素个数。\n         * @return 添加完子元素的 rst 对象。\n         */\n        static getFrom(rst: Array<any>, src: Array<any>, count: number): Array<any>;\n        /**\n         * 将数组 src 从末尾索引位置往头部索引位置方向 依次取 cout 个项添加至 tst 数组的尾部。\n         * @param\trst 原始数组，用于添加新的子元素。\n         * @param\tsrc 用于取子元素的数组。\n         * @param\tcount 需要取得子元素个数。\n         * @return 添加完子元素的 rst 对象。\n         */\n        static getFromR(rst: Array<any>, src: Array<any>, count: number): Array<any>;\n        /**\n         *  [x,y...]列表 转 Point列表\n         * @param pList Point列表\n         * @return [x,y...]列表\n         */\n        static pListToPointList(pList: Array<any>, tempUse?: boolean): Array<any>;\n        /**\n         * Point列表转[x,y...]列表\n         * @param pointList Point列表\n         * @return [x,y...]列表\n         */\n        static pointListToPlist(pointList: Array<any>): Array<any>;\n        /**\n         *  寻找包括所有点的最小多边形顶点集合\n         * @param pList 形如[x0,y0,x1,y1...]的点列表\n         * @return  最小多边形顶点集合\n         */\n        static scanPList(pList: Array<any>): Array<any>;\n        /**\n         * 寻找包括所有点的最小多边形顶点集合\n         * @param PointSet Point列表\n         * @return 最小多边形顶点集合\n         */\n        static scan(PointSet: Array<any>): Array<any>;\n    }\n}\ndeclare module laya.maths {\n    /**\n     * @private\n     * <code>MathUtil</code> 是一个数据处理工具类。\n     */\n    class MathUtil {\n        static subtractVector3(l: Float32Array, r: Float32Array, o: Float32Array): void;\n        static lerp(left: number, right: number, amount: number): number;\n        static scaleVector3(f: Float32Array, b: number, e: Float32Array): void;\n        static lerpVector3(l: Float32Array, r: Float32Array, t: number, o: Float32Array): void;\n        static lerpVector4(l: Float32Array, r: Float32Array, t: number, o: Float32Array): void;\n        static slerpQuaternionArray(a: Float32Array, Offset1: number, b: Float32Array, Offset2: number, t: number, out: Float32Array, Offset3: number): Float32Array;\n        /**\n         * 获取指定的两个点组成的线段的弧度值。\n         * @param\tx0 点一的 X 轴坐标值。\n         * @param\ty0 点一的 Y 轴坐标值。\n         * @param\tx1 点二的 X 轴坐标值。\n         * @param\ty1 点二的 Y 轴坐标值。\n         * @return 弧度值。\n         */\n        static getRotation(x0: number, y0: number, x1: number, y1: number): number;\n        /**\n         * 一个用来确定数组元素排序顺序的比较函数。\n         * @param\ta 待比较数字。\n         * @param\tb 待比较数字。\n         * @return 如果a等于b 则值为0；如果b>a则值为1；如果b<则值为-1。\n         */\n        static sortBigFirst(a: number, b: number): number;\n        /**\n         * 一个用来确定数组元素排序顺序的比较函数。\n         * @param\ta 待比较数字。\n         * @param\tb 待比较数字。\n         * @return 如果a等于b 则值为0；如果b>a则值为-1；如果b<则值为1。\n         */\n        static sortSmallFirst(a: number, b: number): number;\n        /**\n         * 将指定的元素转为数字进行比较。\n         * @param\ta 待比较元素。\n         * @param\tb 待比较元素。\n         * @return b、a转化成数字的差值 (b-a)。\n         */\n        static sortNumBigFirst(a: any, b: any): number;\n        /**\n         * 将指定的元素转为数字进行比较。\n         * @param\ta 待比较元素。\n         * @param\tb 待比较元素。\n         * @return a、b转化成数字的差值 (a-b)。\n         */\n        static sortNumSmallFirst(a: any, b: any): number;\n        /**\n         * 返回根据对象指定的属性进行排序的比较函数。\n         * @param\tkey 排序要依据的元素属性名。\n         * @param\tbigFirst 如果值为true，则按照由大到小的顺序进行排序，否则按照由小到大的顺序进行排序。\n         * @param\tforceNum 如果值为true，则将排序的元素转为数字进行比较。\n         * @return 排序函数。\n         */\n        static sortByKey(key: string, bigFirst?: boolean, forceNum?: boolean): Function;\n    }\n}\ndeclare module laya.maths {\n    /**\n     * <p> <code>Matrix</code> 类表示一个转换矩阵，它确定如何将点从一个坐标空间映射到另一个坐标空间。</p>\n     * <p>您可以对一个显示对象执行不同的图形转换，方法是设置 Matrix 对象的属性，将该 Matrix 对象应用于 Transform 对象的 matrix 属性，然后应用该 Transform 对象作为显示对象的 transform 属性。这些转换函数包括平移（x 和 y 重新定位）、旋转、缩放和倾斜。</p>\n     */\n    class Matrix {\n        static EMPTY: Matrix;\n        /** 用于中转使用的 <code>Matrix</code> 对象。*/\n        static TEMP: Matrix;\n        static _cache: any;\n        /**缩放或旋转图像时影响像素沿 x 轴定位的值。*/\n        a: number;\n        /**旋转或倾斜图像时影响像素沿 y 轴定位的值。*/\n        b: number;\n        /**旋转或倾斜图像时影响像素沿 x 轴定位的值。*/\n        c: number;\n        /**缩放或旋转图像时影响像素沿 y 轴定位的值。*/\n        d: number;\n        /**沿 x 轴平移每个点的距离。*/\n        tx: number;\n        /**沿 y 轴平移每个点的距离。*/\n        ty: number;\n        inPool: boolean;\n        bTransform: boolean;\n        /**\n         * 使用指定参数创建新的 <code>Matrix</code> 对象。\n         * @param a\t\t（可选）缩放或旋转图像时影响像素沿 x 轴定位的值。\n         * @param b\t\t（可选）旋转或倾斜图像时影响像素沿 y 轴定位的值。\n         * @param c\t\t（可选）旋转或倾斜图像时影响像素沿 x 轴定位的值。\n         * @param d\t\t（可选）缩放或旋转图像时影响像素沿 y 轴定位的值。\n         * @param tx\t（可选）沿 x 轴平移每个点的距离。\n         * @param ty\t（可选）沿 y 轴平移每个点的距离。\n         */\n        constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);\n        /**\n         * 将本矩阵设置为单位矩阵。\n         * @return 返回当前矩形。\n         */\n        identity(): Matrix;\n        _checkTransform(): boolean;\n        /**\n         * 设置沿 x 、y 轴平移每个点的距离。\n         * @param\tx 沿 x 轴平移每个点的距离。\n         * @param\ty 沿 y 轴平移每个点的距离。\n         * @return\t返回对象本身\n         */\n        setTranslate(x: number, y: number): Matrix;\n        /**\n         * 沿 x 和 y 轴平移矩阵，平移的变化量由 x 和 y 参数指定。\n         * @param\tx 沿 x 轴向右移动的量（以像素为单位）。\n         * @param\ty 沿 y 轴向下移动的量（以像素为单位）。\n         * @return 返回此矩形对象。\n         */\n        translate(x: number, y: number): Matrix;\n        /**\n         * 对矩阵应用缩放转换。\n         * @param\tx 用于沿 x 轴缩放对象的乘数。\n         * @param\ty 用于沿 y 轴缩放对象的乘数。\n         */\n        scale(x: number, y: number): void;\n        /**\n         * 对 Matrix 对象应用旋转转换。\n         * @param\tangle 以弧度为单位的旋转角度。\n         */\n        rotate(angle: number): void;\n        /**\n         * 对 Matrix 对象应用倾斜转换。\n         * @param\tx 沿着 X 轴的 2D 倾斜弧度。\n         * @param\ty 沿着 Y 轴的 2D 倾斜弧度。\n         * @return 当前 Matrix 对象。\n         */\n        skew(x: number, y: number): Matrix;\n        /**\n         * 对指定的点应用当前矩阵的逆转化并返回此点。\n         * @param\tout 待转化的点 Point 对象。\n         * @return\t返回out\n         */\n        invertTransformPoint(out: Point): Point;\n        /**\n         * 将 Matrix 对象表示的几何转换应用于指定点。\n         * @param\tout 用来设定输出结果的点。\n         * @return\t返回out\n         */\n        transformPoint(out: Point): Point;\n        /**\n         * 将 Matrix 对象表示的几何转换应用于指定点，忽略tx、ty。\n         * @param\tout 用来设定输出结果的点。\n         * @return\t返回out\n         */\n        transformPointN(out: Point): Point;\n        /**\n         * @private\n         * 将 Matrix 对象表示的几何转换应用于指定点。\n         * @param\tdata 点集合。\n         * @param\tout 存储应用转化的点的列表。\n         * @return\t返回out数组\n         */\n        transformPointArray(data: Array<any>, out: Array<any>): Array<any>;\n        /**\n         * @private\n         * 将 Matrix 对象表示的几何缩放转换应用于指定点。\n         * @param\tdata 点集合。\n         * @param\tout 存储应用转化的点的列表。\n         * @return\t返回out数组\n         */\n        transformPointArrayScale(data: Array<any>, out: Array<any>): Array<any>;\n        /**\n         * 获取 X 轴缩放值。\n         * @return  X 轴缩放值。\n         */\n        getScaleX(): number;\n        /**\n         * 获取 Y 轴缩放值。\n         * @return Y 轴缩放值。\n         */\n        getScaleY(): number;\n        /**\n         * 执行原始矩阵的逆转换。\n         * @return 当前矩阵对象。\n         */\n        invert(): Matrix;\n        /**\n         *  将 Matrix 的成员设置为指定值。\n         * @param\ta 缩放或旋转图像时影响像素沿 x 轴定位的值。\n         * @param\tb 旋转或倾斜图像时影响像素沿 y 轴定位的值。\n         * @param\tc 旋转或倾斜图像时影响像素沿 x 轴定位的值。\n         * @param\td 缩放或旋转图像时影响像素沿 y 轴定位的值。\n         * @param\ttx 沿 x 轴平移每个点的距离。\n         * @param\tty 沿 y 轴平移每个点的距离。\n         * @return 当前矩阵对象。\n         */\n        setTo(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix;\n        /**\n         * 将指定矩阵与当前矩阵连接，从而将这两个矩阵的几何效果有效地结合在一起。\n         * @param\tmatrix 要连接到源矩阵的矩阵。\n         * @return 当前矩阵。\n         */\n        concat(matrix: Matrix): Matrix;\n        /**\n         * 将指定的两个矩阵相乘后的结果赋值给指定的输出对象。\n         * @param\tm1 矩阵一。\n         * @param\tm2 矩阵二。\n         * @param\tout 输出对象。\n         * @return 结果输出对象 out。\n         */\n        static mul(m1: Matrix, m2: Matrix, out: Matrix): Matrix;\n        /**\n         * 将指定的两个矩阵相乘，结果赋值给指定的输出数组，长度为16。\n         * @param m1\t矩阵一。\n         * @param m2\t矩阵二。\n         * @param out\t输出对象Array。\n         * @return 结果输出对象 out。\n         */\n        static mul16(m1: Matrix, m2: Matrix, out: Array<any>): Array<any>;\n        /**\n         * @private\n         * 对矩阵应用缩放转换。反向相乘\n         * @param\tx 用于沿 x 轴缩放对象的乘数。\n         * @param\ty 用于沿 y 轴缩放对象的乘数。\n         */\n        scaleEx(x: number, y: number): void;\n        /**\n         * @private\n         * 对 Matrix 对象应用旋转转换。反向相乘\n         * @param\tangle 以弧度为单位的旋转角度。\n         */\n        rotateEx(angle: number): void;\n        static mulPre(m1: Matrix, ba: number, bb: number, bc: number, bd: number, btx: number, bty: number, out: Matrix): Matrix;\n        static mulPos(m1: Matrix, aa: number, ab: number, ac: number, ad: number, atx: number, aty: number, out: Matrix): Matrix;\n        static preMul(parent: Matrix, self: Matrix, out: Matrix): Matrix;\n        static preMulXY(parent: Matrix, x: number, y: number, out: Matrix): Matrix;\n        /**\n         * 返回此 Matrix 对象的副本。\n         * @return 与原始实例具有完全相同的属性的新 Matrix 实例。\n         */\n        clone(): Matrix;\n        /**\n         * 将当前 Matrix 对象中的所有矩阵数据复制到指定的 Matrix 对象中。\n         * @param\tdec 要复制当前矩阵数据的 Matrix 对象。\n         * @return 已复制当前矩阵数据的 Matrix 对象。\n         */\n        copyTo(dec: Matrix): Matrix;\n        /**\n         * 返回列出该 Matrix 对象属性的文本值。\n         * @return 一个字符串，它包含 Matrix 对象的属性值：a、b、c、d、tx 和 ty。\n         */\n        toString(): string;\n        /**\n         * 销毁此对象。\n         */\n        destroy(): void;\n        /**\n         * 从对象池中创建一个 <code>Matrix</code> 对象。\n         * @return <code>Matrix</code> 对象。\n         */\n        static create(): Matrix;\n    }\n}\ndeclare module laya.maths {\n    /**\n     * <code>Point</code> 对象表示二维坐标系统中的某个位置，其中 x 表示水平轴，y 表示垂直轴。\n     */\n    class Point {\n        /**临时使用的公用对象。*/\n        static TEMP: Point;\n        static EMPTY: Point;\n        /**该点的水平坐标。*/\n        x: number;\n        /**该点的垂直坐标。*/\n        y: number;\n        /**\n         * 根据指定坐标，创建一个新的 <code>Point</code> 对象。\n         * @param x\t（可选）水平坐标。\n         * @param y\t（可选）垂直坐标。\n         */\n        constructor(x?: number, y?: number);\n        /**\n         * 将 <code>Point</code> 的成员设置为指定值。\n         * @param\tx 水平坐标。\n         * @param\ty 垂直坐标。\n         * @return 当前 Point 对象。\n         */\n        setTo(x: number, y: number): Point;\n        /**\n         * 计算当前点和目标点(x，y)的距离。\n         * @param\tx 水平坐标。\n         * @param\ty 垂直坐标。\n         * @return\t返回当前点和目标点之间的距离。\n         */\n        distance(x: number, y: number): number;\n        /**返回包含 x 和 y 坐标的值的字符串。*/\n        toString(): string;\n        /**\n         * 标准化向量。\n         */\n        normalize(): void;\n    }\n}\ndeclare module laya.maths {\n    /**\n     * <p><code>Rectangle</code> 对象是按其位置（由它左上角的点 (x, y) 确定）以及宽度和高度定义的区域。</p>\n     * <p>Rectangle 类的 x、y、width 和 height 属性相互独立；更改一个属性的值不会影响其他属性。</p>\n     */\n    class Rectangle {\n        static EMPTY: Rectangle;\n        /**全局临时的矩形区域，此对象用于全局复用，以减少对象创建*/\n        static TEMP: Rectangle;\n        /** 矩形左上角的 X 轴坐标。*/\n        x: number;\n        /** 矩形左上角的 Y 轴坐标。*/\n        y: number;\n        /** 矩形的宽度。*/\n        width: number;\n        /** 矩形的高度。*/\n        height: number;\n        /**\n         * 创建一个 <code>Rectangle</code> 对象。\n         * @param\tx 矩形左上角的 X 轴坐标。\n         * @param\ty 矩形左上角的 Y 轴坐标。\n         * @param\twidth 矩形的宽度。\n         * @param\theight 矩形的高度。\n         */\n        constructor(x?: number, y?: number, width?: number, height?: number);\n        /** 此矩形右侧的 X 轴坐标。 x 和 width 属性的和。*/\n        readonly right: number;\n        /** 此矩形底端的 Y 轴坐标。y 和 height 属性的和。*/\n        readonly bottom: number;\n        /**\n         * 将 Rectangle 的属性设置为指定值。\n         * @param\tx\tx 矩形左上角的 X 轴坐标。\n         * @param\ty\tx 矩形左上角的 Y 轴坐标。\n         * @param\twidth\t矩形的宽度。\n         * @param\theight\t矩形的高。\n         * @return\t返回属性值修改后的矩形对象本身。\n         */\n        setTo(x: number, y: number, width: number, height: number): Rectangle;\n        /**\n         * 复制 source 对象的属性值到此矩形对象中。\n         * @param\tsourceRect\t源 Rectangle 对象。\n         * @return\t返回属性值修改后的矩形对象本身。\n         */\n        copyFrom(source: Rectangle): Rectangle;\n        /**\n         * 确定由此 Rectangle 对象定义的矩形区域内是否包含指定的点。\n         * @param x\t点的 X 轴坐标值（水平位置）。\n         * @param y\t点的 Y 轴坐标值（垂直位置）。\n         * @return\t如果 Rectangle 对象包含指定的点，则值为 true；否则为 false。\n         */\n        contains(x: number, y: number): boolean;\n        /**\n         * 确定在 rect 参数中指定的对象是否与此 Rectangle 对象相交。此方法检查指定的 Rectangle 对象的 x、y、width 和 height 属性，以查看它是否与此 Rectangle 对象相交。\n         * @param\trect Rectangle 对象。\n         * @return\t如果传入的矩形对象与此对象相交，则返回 true 值，否则返回 false。\n         */\n        intersects(rect: Rectangle): boolean;\n        /**\n         * 如果在 rect 参数中指定的 Rectangle 对象与此 Rectangle 对象相交，则返回交集区域作为 Rectangle 对象。如果矩形不相交，则此方法返回null。\n         * @param rect\t待比较的矩形区域。\n         * @param out\t（可选）待输出的矩形区域。如果为空则创建一个新的。建议：尽量复用对象，减少对象创建消耗。\n         * @return\t返回相交的矩形区域对象。\n         */\n        intersection(rect: Rectangle, out?: Rectangle): Rectangle;\n        /**\n         * <p>矩形联合，通过填充两个矩形之间的水平和垂直空间，将这两个矩形组合在一起以创建一个新的 Rectangle 对象。</p>\n         * <p>注意：union() 方法忽略高度或宽度值为 0 的矩形，如：var rect2:Rectangle = new Rectangle(300,300,50,0);</p>\n         * @param\t要添加到此 Rectangle 对象的 Rectangle 对象。\n         * @param\tout\t用于存储输出结果的矩形对象。如果为空，则创建一个新的。建议：尽量复用对象，减少对象创建消耗。Rectangle.TEMP对象用于对象复用。\n         * @return\t充当两个矩形的联合的新 Rectangle 对象。\n         */\n        union(source: Rectangle, out?: Rectangle): Rectangle;\n        /**\n         * 返回一个 Rectangle 对象，其 x、y、width 和 height 属性的值与当前 Rectangle 对象的对应值相同。\n         * @param out\t（可选）用于存储结果的矩形对象。如果为空，则创建一个新的。建议：尽量复用对象，减少对象创建消耗。。Rectangle.TEMP对象用于对象复用。\n         * @return Rectangle 对象，其 x、y、width 和 height 属性的值与当前 Rectangle 对象的对应值相同。\n         */\n        clone(out?: Rectangle): Rectangle;\n        /**\n         * 当前 Rectangle 对象的水平位置 x 和垂直位置 y 以及高度 width 和宽度 height 以逗号连接成的字符串。\n         */\n        toString(): string;\n        /**\n         * 检测传入的 Rectangle 对象的属性是否与当前 Rectangle 对象的属性 x、y、width、height 属性值都相等。\n         * @param\trect 待比较的 Rectangle 对象。\n         * @return\t如果判断的属性都相等，则返回 true ,否则返回 false。\n         */\n        equals(rect: Rectangle): boolean;\n        /**\n         * <p>为当前矩形对象加一个点，以使当前矩形扩展为包含当前矩形和此点的最小矩形。</p>\n         * <p>此方法会修改本对象。</p>\n         * @param x\t点的 X 坐标。\n         * @param y\t点的 Y 坐标。\n         * @return 返回此 Rectangle 对象。\n         */\n        addPoint(x: number, y: number): Rectangle;\n        /**\n         * @private\n         * 返回代表当前矩形的顶点数据。\n         * @return 顶点数据。\n         */\n        _getBoundPoints(): Array<any>;\n        /**\n         * @private\n         * 返回矩形的顶点数据。\n         */\n        static _getBoundPointS(x: number, y: number, width: number, height: number): Array<any>;\n        /**\n         * @private\n         * 返回包含所有点的最小矩形。\n         * @param pointList 点列表。\n         * @return 包含所有点的最小矩形矩形对象。\n         */\n        static _getWrapRec(pointList: Array<any>, rst?: Rectangle): Rectangle;\n        /**\n         * 确定此 Rectangle 对象是否为空。\n         * @return 如果 Rectangle 对象的宽度或高度小于等于 0，则返回 true 值，否则返回 false。\n         */\n        isEmpty(): boolean;\n    }\n}\ndeclare module laya.media.h5audio {\n    import EventDispatcher = laya.events.EventDispatcher;\n    import SoundChannel = laya.media.SoundChannel;\n    /**\n     * @private\n     * 使用Audio标签播放声音\n     */\n    class AudioSound extends EventDispatcher {\n        /**\n         * 声音URL\n         */\n        url: string;\n        /**\n         * 播放用的audio标签\n         */\n        audio: any;\n        /**\n         * 是否已加载完成\n         */\n        loaded: boolean;\n        static _musicAudio: any;\n        /**\n         * 释放声音\n         *\n         */\n        dispose(): void;\n        static _initMusicAudio(): void;\n        /**\n         * 加载声音\n         * @param url\n         *\n         */\n        load(url: string): void;\n        /**\n         * 播放声音\n         * @param startTime 起始时间\n         * @param loops 循环次数\n         * @return\n         *\n         */\n        play(startTime?: number, loops?: number): SoundChannel;\n        /**\n         * 获取总时间。\n         */\n        readonly duration: number;\n    }\n}\ndeclare module laya.media.h5audio {\n    import SoundChannel = laya.media.SoundChannel;\n    /**\n     * @private\n     * audio标签播放声音的音轨控制\n     */\n    class AudioSoundChannel extends SoundChannel {\n        constructor(audio: any);\n        /**\n         * 播放\n         */\n        play(): void;\n        /**\n         * 当前播放到的位置\n         * @return\n         *\n         */\n        readonly position: number;\n        /**\n         * 获取总时间。\n         */\n        readonly duration: number;\n        /**\n         * 停止播放\n         *\n         */\n        stop(): void;\n        pause(): void;\n        resume(): void;\n        /**\n         * 获取音量\n         * @return\n         *\n         */\n        /**\n         * 设置音量\n         * @param v\n         *\n         */\n        volume: number;\n    }\n}\ndeclare module laya.media {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <code>Sound</code> 类是用来播放控制声音的类。\n     */\n    class Sound extends EventDispatcher {\n        /**\n         * 加载声音。\n         * @param url 地址。\n         *\n         */\n        load(url: string): void;\n        /**\n         * 播放声音。\n         * @param startTime 开始时间,单位秒\n         * @param loops 循环次数,0表示一直循环\n         * @return 声道 SoundChannel 对象。\n         *\n         */\n        play(startTime?: number, loops?: number): SoundChannel;\n        /**\n         * 获取总时间。\n         */\n        readonly duration: number;\n        /**\n         * 释放声音资源。\n         *\n         */\n        dispose(): void;\n    }\n}\ndeclare module laya.media {\n    import EventDispatcher = laya.events.EventDispatcher;\n    import Handler = laya.utils.Handler;\n    /**\n     * <p> <code>SoundChannel</code> 用来控制程序中的声音。每个声音均分配给一个声道，而且应用程序可以具有混合在一起的多个声道。</p>\n     * <p> <code>SoundChannel</code> 类包含控制声音的播放、暂停、停止、音量的方法，以及获取声音的播放状态、总时间、当前播放时间、总循环次数、播放地址等信息的方法。</p>\n     */\n    class SoundChannel extends EventDispatcher {\n        /**\n         * 声音地址。\n         */\n        url: string;\n        /**\n         * 循环次数。\n         */\n        loops: number;\n        /**\n         * 开始时间。\n         */\n        startTime: number;\n        /**\n         * 表示声音是否已暂停。\n         */\n        isStopped: boolean;\n        /**\n         * 播放完成处理器。\n         */\n        completeHandler: Handler;\n        /**\n         * 音量范围从 0（静音）至 1（最大音量）。\n         */\n        volume: number;\n        /**\n         * 获取当前播放时间。\n         */\n        readonly position: number;\n        /**\n         * 获取总时间。\n         */\n        readonly duration: number;\n        /**\n         * 播放。\n         */\n        play(): void;\n        /**\n         * 停止。\n         */\n        stop(): void;\n        /**\n         * 暂停。\n         */\n        pause(): void;\n        /**\n         * 继续播放。\n         */\n        resume(): void;\n        protected __runComplete(handler: Handler): void;\n    }\n}\ndeclare module laya.media {\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>SoundManager</code> 是一个声音管理类。提供了对背景音乐、音效的播放控制方法。\n     * 引擎默认有两套声音方案：WebAudio和H5Audio\n     * 播放音效，优先使用WebAudio播放声音，如果WebAudio不可用，则用H5Audio播放，H5Audio在部分机器上有兼容问题（比如不能混音，播放有延迟等）。\n     * 播放背景音乐，则使用H5Audio播放（使用WebAudio会增加特别大的内存，并且要等加载完毕后才能播放，有延迟）\n     * 建议背景音乐用mp3类型，音效用wav或者mp3类型（如果打包为app，音效只能用wav格式）。\n     * 详细教程及声音格式请参考：http://ldc.layabox.com/doc/?nav=ch-as-1-7-0\n     */\n    class SoundManager {\n        /**\n         * 背景音乐音量。\n         * @default 1\n         */\n        static musicVolume: number;\n        /**\n         * 音效音量。\n         * @default 1\n         */\n        static soundVolume: number;\n        /**\n         * 声音播放速率。\n         * @default 1\n         */\n        static playbackRate: number;\n        static _tMusic: string;\n        static _soundClass: any;\n        static _musicClass: any;\n        /**\n         * 音效播放后自动删除。\n         * @default true\n         */\n        static autoReleaseSound: boolean;\n        /**\n         * 添加播放的声音实例。\n         * @param channel <code>SoundChannel</code> 对象。\n         */\n        static addChannel(channel: SoundChannel): void;\n        /**\n         * 移除播放的声音实例。\n         * @param channel <code>SoundChannel</code> 对象。\n         */\n        static removeChannel(channel: SoundChannel): void;\n        static disposeSoundIfNotUsed(url: string): void;\n        /**\n         * 失去焦点后是否自动停止背景音乐。\n         */\n        /**\n         * 失去焦点后是否自动停止背景音乐。\n         * @param v Boolean 失去焦点后是否自动停止背景音乐。\n         *\n         */\n        static autoStopMusic: boolean;\n        /**\n         * 背景音乐和所有音效是否静音。\n         */\n        static muted: boolean;\n        /**\n         * 所有音效（不包括背景音乐）是否静音。\n         */\n        static soundMuted: boolean;\n        /**\n         * 背景音乐（不包括音效）是否静音。\n         */\n        static musicMuted: boolean;\n        static useAudioMusic: boolean;\n        /**\n         * 播放音效。音效可以同时播放多个。\n         * @param url\t\t\t声音文件地址。\n         * @param loops\t\t\t循环次数,0表示无限循环。\n         * @param complete\t\t声音播放完成回调  Handler对象。\n         * @param soundClass\t使用哪个声音类进行播放，null表示自动选择。\n         * @param startTime\t\t声音播放起始时间。\n         * @return SoundChannel对象，通过此对象可以对声音进行控制，以及获取声音信息。\n         */\n        static playSound(url: string, loops?: number, complete?: Handler, soundClass?: any, startTime?: number): SoundChannel;\n        /**\n         * 释放声音资源。\n         * @param url\t声音播放地址。\n         */\n        static destroySound(url: string): void;\n        /**\n         * 播放背景音乐。背景音乐同时只能播放一个，如果在播放背景音乐时再次调用本方法，会先停止之前的背景音乐，再播发当前的背景音乐。\n         * @param url\t\t声音文件地址。\n         * @param loops\t\t循环次数,0表示无限循环。\n         * @param complete\t声音播放完成回调。\n         * @param startTime\t声音播放起始时间。\n         * @return SoundChannel对象，通过此对象可以对声音进行控制，以及获取声音信息。\n         */\n        static playMusic(url: string, loops?: number, complete?: Handler, startTime?: number): SoundChannel;\n        /**\n         * 停止声音播放。此方法能够停止任意声音的播放（包括背景音乐和音效），只需传入对应的声音播放地址。\n         * @param url  声音文件地址。\n         */\n        static stopSound(url: string): void;\n        /**\n         * 停止播放所有声音（包括背景音乐和音效）。\n         */\n        static stopAll(): void;\n        /**\n         * 停止播放所有音效（不包括背景音乐）。\n         */\n        static stopAllSound(): void;\n        /**\n         * 停止播放背景音乐（不包括音效）。\n         * @param url  声音文件地址。\n         */\n        static stopMusic(): void;\n        /**\n         * 设置声音音量。根据参数不同，可以分别设置指定声音（背景音乐或音效）音量或者所有音效（不包括背景音乐）音量。\n         * @param volume\t音量。初始值为1。音量范围从 0（静音）至 1（最大音量）。\n         * @param url\t\t(default = null)声音播放地址。默认为null。为空表示设置所有音效（不包括背景音乐）的音量，不为空表示设置指定声音（背景音乐或音效）的音量。\n         */\n        static setSoundVolume(volume: number, url?: string): void;\n        /**\n         * 设置背景音乐音量。音量范围从 0（静音）至 1（最大音量）。\n         * @param volume\t音量。初始值为1。音量范围从 0（静音）至 1（最大音量）。\n         */\n        static setMusicVolume(volume: number): void;\n    }\n}\ndeclare module laya.media {\n    import Sprite = laya.display.Sprite;\n    import Handler = laya.utils.Handler;\n    /**\n     * @private\n     */\n    class SoundNode extends Sprite {\n        url: string;\n        constructor();\n        /**\n         * 播放\n         * @param loops 循环次数\n         * @param complete 完成回调\n         *\n         */\n        play(loops?: number, complete?: Handler): void;\n        /**\n         * 停止播放\n         *\n         */\n        stop(): void;\n        /**\n         * 设置触发播放的事件\n         * @param events\n         *\n         */\n        playEvent: string;\n        /**\n         * 设置控制播放的对象\n         * @param tar\n         *\n         */\n        target: Sprite;\n        /**\n         * 设置触发停止的事件\n         * @param events\n         *\n         */\n        stopEvent: string;\n    }\n}\ndeclare module laya.media.webaudio {\n    import EventDispatcher = laya.events.EventDispatcher;\n    import SoundChannel = laya.media.SoundChannel;\n    /**\n     * @private\n     * web audio api方式播放声音\n     */\n    class WebAudioSound extends EventDispatcher {\n        static window: any;\n        /**\n         * 是否支持web audio api\n         */\n        static webAudioEnabled: boolean;\n        /**\n         * 播放设备\n         */\n        static ctx: any;\n        /**\n         * 当前要解码的声音文件列表\n         */\n        static buffs: Array<any>;\n        /**\n         * 是否在解码中\n         */\n        static isDecoding: boolean;\n        /**\n         * 用于播放解锁声音以及解决Ios9版本的内存释放\n         */\n        static _miniBuffer: any;\n        /**\n         * 事件派发器，用于处理加载解码完成事件的广播\n         */\n        static e: EventDispatcher;\n        /**\n         * 当前解码的声音信息\n         */\n        static tInfo: any;\n        /**\n         * 声音URL\n         */\n        url: string;\n        /**\n         * 是否已加载完成\n         */\n        loaded: boolean;\n        /**\n         * 声音文件数据\n         */\n        data: ArrayBuffer;\n        /**\n         * 声音原始文件数据\n         */\n        audioBuffer: any;\n        /**\n         * 解码声音文件\n         *\n         */\n        static decode(): void;\n        static initWebAudio(): void;\n        /**\n         * 加载声音\n         * @param url\n         *\n         */\n        load(url: string): void;\n        /**\n         * 播放声音\n         * @param startTime 起始时间\n         * @param loops 循环次数\n         * @return\n         *\n         */\n        play(startTime?: number, loops?: number, channel?: SoundChannel): SoundChannel;\n        readonly duration: number;\n        dispose(): void;\n    }\n}\ndeclare module laya.media.webaudio {\n    import SoundChannel = laya.media.SoundChannel;\n    /**\n     * @private\n     * web audio api方式播放声音的音轨控制\n     */\n    class WebAudioSoundChannel extends SoundChannel {\n        /**\n         * 声音原始文件数据\n         */\n        audioBuffer: any;\n        constructor();\n        /**\n         * 播放声音\n         */\n        play(): void;\n        /**\n         * 获取当前播放位置\n         */\n        readonly position: number;\n        readonly duration: number;\n        /**\n         * 停止播放\n         */\n        stop(): void;\n        pause(): void;\n        resume(): void;\n        /**\n         * 获取音量\n         */\n        /**\n         * 设置音量\n         */\n        volume: number;\n    }\n}\ndeclare module laya.net {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <p> <code>HttpRequest</code> 通过封装 HTML <code>XMLHttpRequest</code> 对象提供了对 HTTP 协议的完全的访问，包括做出 POST 和 HEAD 请求以及普通的 GET 请求的能力。 <code>HttpRequest</code> 只提供以异步的形式返回 Web 服务器的响应，并且能够以文本或者二进制的形式返回内容。</p>\n     * <p><b>注意：</b>建议每次请求都使用新的 <code>HttpRequest</code> 对象，因为每次调用该对象的send方法时，都会清空之前设置的数据，并重置 HTTP 请求的状态，这会导致之前还未返回响应的请求被重置，从而得不到之前请求的响应结果。</p>\n     */\n    class HttpRequest extends EventDispatcher {\n        protected _http: any;\n        protected _responseType: string;\n        protected _data: any;\n        /**\n         * 发送 HTTP 请求。\n         * @param\turl\t\t\t\t请求的地址。大多数浏览器实施了一个同源安全策略，并且要求这个 URL 与包含脚本的文本具有相同的主机名和端口。\n         * @param\tdata\t\t\t(default = null)发送的数据。\n         * @param\tmethod\t\t\t(default = \"get\")用于请求的 HTTP 方法。值包括 \"get\"、\"post\"、\"head\"。\n         * @param\tresponseType\t(default = \"text\")Web 服务器的响应类型，可设置为 \"text\"、\"json\"、\"xml\"、\"arraybuffer\"。\n         * @param\theaders\t\t\t(default = null) HTTP 请求的头部信息。参数形如key-value数组：key是头部的名称，不应该包括空白、冒号或换行；value是头部的值，不应该包括换行。比如[\"Content-Type\", \"application/json\"]。\n         */\n        send(url: string, data?: any, method?: string, responseType?: string, headers?: Array<any>): void;\n        protected _onProgress(e: any): void;\n        protected _onAbort(e: any): void;\n        protected _onError(e: any): void;\n        protected _onLoad(e: any): void;\n        protected error(message: string): void;\n        protected complete(): void;\n        protected clear(): void;\n        /** 请求的地址。*/\n        readonly url: string;\n        /** 返回的数据。*/\n        readonly data: any;\n        /**\n         * 本对象所封装的原生 XMLHttpRequest 引用。\n         */\n        readonly http: any;\n    }\n}\ndeclare module laya.net {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <code>Loader</code> 类可用来加载文本、JSON、XML、二进制、图像等资源。\n     */\n    class Loader extends EventDispatcher {\n        /** 文本类型，加载完成后返回文本。*/\n        static TEXT: string;\n        /** JSON 类型，加载完成后返回json数据。*/\n        static JSON: string;\n        /** XML 类型，加载完成后返回domXML。*/\n        static XML: string;\n        /** 二进制类型，加载完成后返回arraybuffer二进制数据。*/\n        static BUFFER: string;\n        /** 纹理类型，加载完成后返回Texture。*/\n        static IMAGE: string;\n        /** 声音类型，加载完成后返回sound。*/\n        static SOUND: string;\n        /** 图集类型，加载完成后返回图集json信息(并创建图集内小图Texture)。*/\n        static ATLAS: string;\n        /** 位图字体类型，加载完成后返回BitmapFont。*/\n        static FONT: string;\n        /** TTF字体类型，加载完成后返回null。*/\n        static TTF: string;\n        static PKM: string;\n        /** 文件后缀和类型对应表。*/\n        static typeMap: any;\n        /**资源解析函数对应表，用来扩展更多类型的资源加载解析。*/\n        static parserMap: any;\n        /** 资源分组对应表。*/\n        static groupMap: any;\n        /** 每帧回调最大超时时间，如果超时，则下帧再处理。*/\n        static maxTimeOut: number;\n        static loadedMap: any;\n        static preLoadedAtlasConfigMap: any;\n        protected static _loaders: Array<any>;\n        protected static _isWorking: boolean;\n        protected static _startIndex: number;\n        _data: any;\n        _class: any;\n        protected _url: string;\n        protected _type: string;\n        protected _cache: boolean;\n        protected _http: HttpRequest;\n        _customParse: boolean;\n        /**\n         * 加载资源。加载错误会派发 Event.ERROR 事件，参数为错误信息。\n         * @param\turl\t\t\t资源地址。\n         * @param\ttype\t\t(default = null)资源类型。可选值为：Loader.TEXT、Loader.JSON、Loader.XML、Loader.BUFFER、Loader.IMAGE、Loader.SOUND、Loader.ATLAS、Loader.FONT。如果为null，则根据文件后缀分析类型。\n         * @param\tcache\t\t(default = true)是否缓存数据。\n         * @param\tgroup\t\t(default = null)分组名称。\n         * @param\tignoreCache (default = false)是否忽略缓存，强制重新加载。\n         */\n        load(url: string, type?: string, cache?: boolean, group?: string, ignoreCache?: boolean): void;\n        protected getTypeFromUrl(url: string): string;\n        protected _loadTTF(url: string): void;\n        protected _loadImage(url: string): void;\n        protected _loadSound(url: string): void;\n        protected onProgress(value: number): void;\n        protected onError(message: string): void;\n        protected onLoaded(data?: any): void;\n        protected complete(data: any): void;\n        /**\n         * 结束加载，处理是否缓存及派发完成事件 <code>Event.COMPLETE</code> 。\n         * @param\tcontent 加载后的数据\n         */\n        endLoad(content?: any): void;\n        /** 加载地址。*/\n        readonly url: string;\n        /**加载类型。*/\n        readonly type: string;\n        /**是否缓存。*/\n        readonly cache: boolean;\n        /**返回的数据。*/\n        readonly data: any;\n        /**\n         * 清理指定资源地址的缓存。\n         * 如果是Texture，则采用引用计数方式销毁，【注意】如果图片本身在自动合集里面（默认图片小于512*512），内存是不能被销毁的，此图片会被大图合集管理器管理\n         * @param\turl 资源地址。\n         * @param\tforceDispose 是否强制销毁，有些资源是采用引用计数方式销毁，如果forceDispose=true，则忽略引用计数，直接销毁，比如Texture，默认为false\n         */\n        static clearRes(url: string, forceDispose?: boolean): void;\n        /**\n         * 销毁Texture使用的图片资源，保留texture壳，如果下次渲染的时候，发现texture使用的图片资源不存在，则会自动恢复\n         * 相比clearRes，clearTextureRes只是清理texture里面使用的图片资源，并不销毁texture，再次使用到的时候会自动恢复图片资源\n         * 而clearRes会彻底销毁texture，导致不能再使用；clearTextureRes能确保立即销毁图片资源，并且不用担心销毁错误，clearRes则采用引用计数方式销毁\n         * 【注意】如果图片本身在自动合集里面（默认图片小于512*512），内存是不能被销毁的，此图片被大图合集管理器管理\n         * @param\turl\t图集地址或者texture地址，比如 Loader.clearTextureRes(\"res/atlas/comp.atlas\"); Loader.clearTextureRes(\"hall/bg.jpg\");\n         */\n        static clearTextureRes(url: string): void;\n        /**\n         * 设置预加载的图集配置文件\n         * @param\turl 资源地址。\n         * @param\tconfigO 配置数据\n         */\n        static setAtlasConfigs(url: string, config: any): void;\n        /**\n         * 获取指定资源地址的资源。\n         * @param\turl 资源地址。\n         * @return\t返回资源。\n         */\n        static getRes(url: string): any;\n        /**\n         * 获取指定资源地址的图集地址列表。\n         * @param\turl 图集地址。\n         * @return\t返回地址集合。\n         */\n        static getAtlas(url: string): Array<any>;\n        /**\n         * 缓存资源。\n         * @param\turl 资源地址。\n         * @param\tdata 要缓存的内容。\n         */\n        static cacheRes(url: string, data: any): void;\n        /**\n         * 设置资源分组。\n         * @param url 资源地址。\n         * @param group 分组名。\n         */\n        static setGroup(url: string, group: string): void;\n        /**\n         * 根据分组清理资源。\n         * @param group 分组名。\n         */\n        static clearResByGroup(group: string): void;\n    }\n}\ndeclare module laya.net {\n    import EventDispatcher = laya.events.EventDispatcher;\n    import Handler = laya.utils.Handler;\n    /**\n     * <p> <code>LoaderManager</code> 类用于用于批量加载资源。此类是单例，不要手动实例化此类，请通过Laya.loader访问。</p>\n     * <p>全部队列加载完成，会派发 Event.COMPLETE 事件；如果队列中任意一个加载失败，会派发 Event.ERROR 事件，事件回调参数值为加载出错的资源地址。</p>\n     * <p> <code>LoaderManager</code> 类提供了以下几种功能：<br/>\n     * 多线程：默认5个加载线程，可以通过maxLoader属性修改线程数量；<br/>\n     * 多优先级：有0-4共5个优先级，优先级高的优先加载。0最高，4最低；<br/>\n     * 重复过滤：自动过滤重复加载（不会有多个相同地址的资源同时加载）以及复用缓存资源，防止重复加载；<br/>\n     * 错误重试：资源加载失败后，会重试加载（以最低优先级插入加载队列），retryNum设定加载失败后重试次数，retryDelay设定加载重试的时间间隔。</p>\n     * @see laya.net.Loader\n     */\n    class LoaderManager extends EventDispatcher {\n        static createMap: any;\n        /** 加载出错后的重试次数，默认重试一次*/\n        retryNum: number;\n        /** 延迟时间多久再进行错误重试，默认立即重试*/\n        retryDelay: number;\n        /** 最大下载线程，默认为5个*/\n        maxLoader: number;\n        /**\n         * <p>创建一个新的 <code>LoaderManager</code> 实例。</p>\n         * <p><b>注意：</b>请使用Laya.loader加载资源，这是一个单例，不要手动实例化此类，否则会导致不可预料的问题。</p>\n         */\n        constructor();\n        /**\n         * <p>根据clas类型创建一个未初始化资源的对象，随后进行异步加载，资源加载完成后，初始化对象的资源，并通过此对象派发 Event.LOADED 事件，事件回调参数值为此对象本身。套嵌资源的子资源会保留资源路径\"?\"后的部分。</p>\n         * <p>如果url为数组，返回true；否则返回指定的资源类对象，可以通过侦听此对象的 Event.LOADED 事件来判断资源是否已经加载完毕。</p>\n         * <p><b>注意：</b>cache参数只能对文件后缀为atlas的资源进行缓存控制，其他资源会忽略缓存，强制重新加载。</p>\n         * @param\turl\t\t\t资源地址或者数组。如果url和clas同时指定了资源类型，优先使用url指定的资源类型。参数形如：[\n         * @param\tcomplete\t加载结束回调。根据url类型不同分为2种情况：1. url为String类型，也就是单个资源地址，如果加载成功，则回调参数值为加载完成的资源，否则为null；2. url为数组类型，指定了一组要加载的资源，如果全部加载成功，则回调参数值为true，否则为false。\n         * @param\tprogress\t资源加载进度回调，回调参数值为当前资源加载的进度信息(0-1)。\n         * @param\tclas\t\t资源类名。如果url和clas同时指定了资源类型，优先使用url指定的资源类型。参数形如：Texture。\n         * @param\tparams\t\t资源构造参数。\n         * @param\tpriority\t(default = 1)加载的优先级，优先级高的优先加载。有0-4共5个优先级，0最高，4最低。\n         * @param\tcache\t\t是否缓存加载的资源。\n         * @return\t如果url为数组，返回true；否则返回指定的资源类对象。\n         */\n        create(url: any, complete?: Handler, progress?: Handler, clas?: any, params?: Array<any>, priority?: number, cache?: boolean, group?: string): any;\n        /**\n         * <p>加载资源。资源加载错误时，本对象会派发 Event.ERROR 事件，事件回调参数值为加载出错的资源地址。</p>\n         * <p>因为返回值为 LoaderManager 对象本身，所以可以使用如下语法：Laya.loader.load(...).load(...);</p>\n         * @param\turl\t\t\t要加载的单个资源地址或资源信息数组。比如：简单数组：[\"a.png\",\"b.png\"]；复杂数组[\n         * @param\tcomplete\t加载结束回调。根据url类型不同分为2种情况：1. url为String类型，也就是单个资源地址，如果加载成功，则回调参数值为加载完成的资源，否则为null；2. url为数组类型，指定了一组要加载的资源，如果全部加载成功，则回调参数值为true，否则为false。\n         * @param\tprogress\t加载进度回调。回调参数值为当前资源的加载进度信息(0-1)。\n         * @param\ttype\t\t资源类型。比如：Loader.IMAGE。\n         * @param\tpriority\t(default = 1)加载的优先级，优先级高的优先加载。有0-4共5个优先级，0最高，4最低。\n         * @param\tcache\t\t是否缓存加载结果。\n         * @param\tgroup\t\t分组，方便对资源进行管理。\n         * @param\tignoreCache\t是否忽略缓存，强制重新加载。\n         * @return 此 LoaderManager 对象本身。\n         */\n        load(url: any, complete?: Handler, progress?: Handler, type?: string, priority?: number, cache?: boolean, group?: string, ignoreCache?: boolean): LoaderManager;\n        /**\n         * @private\n         */\n        _createLoad(item: any, url: any, complete?: Handler, progress?: Handler, type?: string, priority?: number, cache?: boolean, group?: string, ignoreCache?: boolean): LoaderManager;\n        /**\n         * 清理指定资源地址缓存。\n         * @param\turl 资源地址。\n         * @param\tforceDispose 是否强制销毁，有些资源是采用引用计数方式销毁，如果forceDispose=true，则忽略引用计数，直接销毁，比如Texture，默认为false\n         */\n        clearRes(url: string, forceDispose?: boolean): void;\n        /**\n         * 获取指定资源地址的资源。\n         * @param\turl 资源地址。\n         * @return\t返回资源。\n         */\n        getRes(url: string): any;\n        /**\n         * 缓存资源。\n         * @param\turl 资源地址。\n         * @param\tdata 要缓存的内容。\n         */\n        cacheRes(url: string, data: any): void;\n        /**\n         * 销毁Texture使用的图片资源，保留texture壳，如果下次渲染的时候，发现texture使用的图片资源不存在，则会自动恢复\n         * 相比clearRes，clearTextureRes只是清理texture里面使用的图片资源，并不销毁texture，再次使用到的时候会自动恢复图片资源\n         * 而clearRes会彻底销毁texture，导致不能再使用；clearTextureRes能确保立即销毁图片资源，并且不用担心销毁错误，clearRes则采用引用计数方式销毁\n         * 【注意】如果图片本身在自动合集里面（默认图片小于512*512），内存是不能被销毁的，此图片被大图合集管理器管理\n         * @param\turl\t图集地址或者texture地址，比如 Loader.clearTextureRes(\"res/atlas/comp.atlas\"); Loader.clearTextureRes(\"hall/bg.jpg\");\n         */\n        clearTextureRes(url: string): void;\n        /**\n         * 设置资源分组。\n         * @param url 资源地址。\n         * @param group 分组名\n         */\n        setGroup(url: string, group: string): void;\n        /**\n         * 根据分组清理资源。\n         * @param group 分组名\n         */\n        clearResByGroup(group: string): void;\n        /**\n         * @private\n         * 缓存资源。\n         * @param\turl 资源地址。\n         * @param\tdata 要缓存的内容。\n         */\n        static cacheRes(url: string, data: any): void;\n        /** 清理当前未完成的加载，所有未加载的内容全部停止加载。*/\n        clearUnLoaded(): void;\n        /**\n         * 根据地址集合清理掉未加载的内容\n         * @param\turls 资源地址集合\n         */\n        cancelLoadByUrls(urls: Array<any>): void;\n        /**\n         * 根据地址清理掉未加载的内容\n         * @param\turl 资源地址\n         */\n        cancelLoadByUrl(url: string): void;\n    }\n    class ResInfo extends EventDispatcher {\n        url: string;\n        type: string;\n        cache: boolean;\n        group: string;\n        ignoreCache: boolean;\n        clas: any;\n    }\n}\ndeclare module laya.net {\n    /**\n     * <p> <code>LocalStorage</code> 类用于没有时间限制的数据存储。</p>\n     */\n    class LocalStorage {\n        static _baseClass: any;\n        /**\n         *  数据列表。\n         */\n        static items: any;\n        /**\n         * 表示是否支持  <code>LocalStorage</code>。\n         */\n        static support: boolean;\n        static __init__(): void;\n        /**\n         * 存储指定键名和键值，字符串类型。\n         * @param key 键名。\n         * @param value 键值。\n         */\n        static setItem(key: string, value: string): void;\n        /**\n         * 获取指定键名的值。\n         * @param key 键名。\n         * @return 字符串型值。\n         */\n        static getItem(key: string): string;\n        /**\n         * 存储指定键名及其对应的 <code>Object</code> 类型值。\n         * @param key 键名。\n         * @param value 键值。是 <code>Object</code> 类型，此致会被转化为 JSON 字符串存储。\n         */\n        static setJSON(key: string, value: any): void;\n        /**\n         * 获取指定键名对应的 <code>Object</code> 类型值。\n         * @param key 键名。\n         * @return <code>Object</code> 类型值\n         */\n        static getJSON(key: string): any;\n        /**\n         * 删除指定键名的信息。\n         * @param key 键名。\n         */\n        static removeItem(key: string): void;\n        /**\n         * 清除本地存储信息。\n         */\n        static clear(): void;\n    }\n    class Storage {\n        /**\n         *  数据列表。\n         */\n        static items: any;\n        /**\n         * 表示是否支持  <code>LocalStorage</code>。\n         */\n        static support: boolean;\n        static init(): void;\n        /**\n         * 存储指定键名和键值，字符串类型。\n         * @param key 键名。\n         * @param value 键值。\n         */\n        static setItem(key: string, value: string): void;\n        /**\n         * 获取指定键名的值。\n         * @param key 键名。\n         * @return 字符串型值。\n         */\n        static getItem(key: string): string;\n        /**\n         * 存储指定键名和它的 <code>Object</code> 类型值。\n         * @param key 键名。\n         * @param value 键值。是 <code>Object</code> 类型，此致会被转化为 JSON 字符串存储。\n         */\n        static setJSON(key: string, value: any): void;\n        /**\n         * 获取指定键名的 <code>Object</code> 类型值。\n         * @param key 键名。\n         * @return <code>Object</code> 类型值\n         */\n        static getJSON(key: string): any;\n        /**\n         * 删除指定键名的信息。\n         * @param key 键名。\n         */\n        static removeItem(key: string): void;\n        /**\n         * 清除本地存储信息。\n         */\n        static clear(): void;\n    }\n}\ndeclare module laya.net {\n    import Handler = laya.utils.Handler;\n    /**\n     * <p>资源版本的生成由layacmd或IDE完成，使用 <code>ResourceVersion</code> 简化使用过程。</p>\n     * <p>调用 <code>enable</code> 启用资源版本管理。</p>\n     */\n    class ResourceVersion {\n        /**基于文件夹的资源管理方式（老版本IDE默认类型）*/\n        static FOLDER_VERSION: number;\n        /**基于文件名映射管理方式（新版本IDE默认类型）*/\n        static FILENAME_VERSION: number;\n        /**版本清单*/\n        static manifest: any;\n        /**当前使用的版本管理类型*/\n        static type: number;\n        /**\n         * <p>启用资源版本管理。</p>\n         * <p>由于只有发布版本需要资源管理。因此没有资源管理文件时，可以设置manifestFile为null或者不存在的路径。</p>\n         * @param\tmanifestFile\t清单（json）文件的路径。\n         * @param   callback\t\t清单（json）文件加载完成后执行。\n         * @param   type\t\t\tFOLDER_VERSION为基于文件夹管理方式（老版本IDE默认类型），FILENAME_VERSION为基于文件名映射管理（新版本IDE默认类型\n         */\n        static enable(manifestFile: string, callback: Handler, type?: number): void;\n        /**\n         * 为加载路径添加版本前缀。\n         * @param\toriginURL\t源路径。\n         * @return 格式化后的新路径。\n         */\n        static addVersionPrefix(originURL: string): string;\n    }\n}\ndeclare module laya.net {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <p> <code>Socket</code> 封装了 HTML5 WebSocket ，允许服务器端与客户端进行全双工（full-duplex）的实时通信，并且允许跨域通信。在建立连接后，服务器和 Browser/Client Agent 都能主动的向对方发送或接收文本和二进制数据。</p>\n     * <p>要使用 <code>Socket</code> 类的方法，请先使用构造函数 <code>new Socket</code> 创建一个 <code>Socket</code> 对象。 <code>Socket</code> 以异步方式传输和接收数据。</p>\n     */\n    class Socket extends EventDispatcher {\n        /**\n         * <p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。</p>\n         * <p> LITTLE_ENDIAN ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。</p>\n         * <p> BIG_ENDIAN ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。有时也称之为网络字节序。</p>\n         */\n        static LITTLE_ENDIAN: string;\n        /**\n         * <p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。</p>\n         * <p> BIG_ENDIAN ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。有时也称之为网络字节序。</p>\n         * <p> LITTLE_ENDIAN ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。</p>\n         */\n        static BIG_ENDIAN: string;\n        _endian: string;\n        protected _socket: any;\n        /**\n         * @private\n         * 表示建立连接时需等待的毫秒数。\n         */\n        timeout: number;\n        /**\n         * @private\n         * 在写入或读取对象时，控制所使用的 AMF 的版本。\n         */\n        objectEncoding: number;\n        /**\n         * 不再缓存服务端发来的数据。\n         */\n        disableInput: boolean;\n        /**\n         * <p>子协议名称。子协议名称字符串，或由多个子协议名称字符串构成的数组。必须在调用 connect 或者 connectByUrl 之前进行赋值，否则无效。</p>\n         * <p>指定后，只有当服务器选择了其中的某个子协议，连接才能建立成功，否则建立失败，派发 Event.ERROR 事件。</p>\n         * @see https://html.spec.whatwg.org/multipage/comms.html#dom-websocket\n         */\n        protocols: any;\n        /**\n         * 缓存的服务端发来的数据。\n         */\n        readonly input: any;\n        /**\n         * 表示需要发送至服务端的缓冲区中的数据。\n         */\n        readonly output: any;\n        /**\n         * 表示此 Socket 对象目前是否已连接。\n         */\n        readonly connected: boolean;\n        /**\n         * <p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。</p>\n         * <p> LITTLE_ENDIAN ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。</p>\n         * <p> BIG_ENDIAN ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。</p>\n         */\n        endian: string;\n        /**\n         * <p>创建新的 Socket 对象。默认字节序为 Socket.BIG_ENDIAN 。若未指定参数，将创建一个最初处于断开状态的套接字。若指定了有效参数，则尝试连接到指定的主机和端口。</p>\n         * <p><b>注意：</b>强烈建议使用<b>不带参数</b>的构造函数形式，并添加任意事件侦听器和设置 protocols 等属性，然后使用 host 和 port 参数调用 connect 方法。此顺序将确保所有事件侦听器和其他相关流程工作正常。</p>\n         * @param host\t\t服务器地址。\n         * @param port\t\t服务器端口。\n         * @param byteClass\t用于接收和发送数据的 Byte 类。如果为 null ，则使用 Byte 类，也可传入 Byte 类的子类。\n         * @see laya.utils.Byte\n         */\n        constructor(host?: string, port?: number, byteClass?: any);\n        /**\n         * <p>连接到指定的主机和端口。</p>\n         * <p>连接成功派发 Event.OPEN 事件；连接失败派发 Event.ERROR 事件；连接被关闭派发 Event.CLOSE 事件；接收到数据派发 Event.MESSAGE 事件； 除了 Event.MESSAGE 事件参数为数据内容，其他事件参数都是原生的 HTML DOM Event 对象。</p>\n         * @param host\t服务器地址。\n         * @param port\t服务器端口。\n         */\n        connect(host: string, port: number): void;\n        /**\n         * <p>连接到指定的服务端 WebSocket URL。 URL 类似 ws://yourdomain:port。</p>\n         * <p>连接成功派发 Event.OPEN 事件；连接失败派发 Event.ERROR 事件；连接被关闭派发 Event.CLOSE 事件；接收到数据派发 Event.MESSAGE 事件； 除了 Event.MESSAGE 事件参数为数据内容，其他事件参数都是原生的 HTML DOM Event 对象。</p>\n         * @param url\t要连接的服务端 WebSocket URL。 URL 类似 ws://yourdomain:port。\n         */\n        connectByUrl(url: string): void;\n        /**\n         * 清理socket。\n         */\n        cleanSocket(): void;\n        /**\n         * 关闭连接。\n         */\n        close(): void;\n        protected _onOpen(e: any): void;\n        protected _onMessage(msg: any): void;\n        protected _onClose(e: any): void;\n        protected _onError(e: any): void;\n        /**\n         * 发送数据到服务器。\n         * @param\tdata 需要发送的数据，可以是String或者ArrayBuffer。\n         */\n        send(data: any): void;\n        /**\n         * 发送缓冲区中的数据到服务器。\n         */\n        flush(): void;\n    }\n}\ndeclare module laya.net {\n    import Handler = laya.utils.Handler;\n    /**\n     * @private\n     */\n    class TTFLoader {\n        constructor();\n        fontName: string;\n        complete: Handler;\n        err: Handler;\n        load(fontPath: string): void;\n    }\n}\ndeclare module laya.net {\n    /**\n     * <p> <code>URL</code> 类用于定义地址信息。</p>\n     */\n    class URL {\n        /**版本号。*/\n        static version: any;\n        /**创建一个新的 <code>URL</code> 实例。*/\n        constructor(url: string);\n        /**格式化后的地址。*/\n        readonly url: string;\n        /**地址的路径。*/\n        readonly path: string;\n        /**基础路径。*/\n        static basePath: string;\n        /**根路径。*/\n        static rootPath: string;\n        /** 自定义url格式化。例如： customFormat=function(url:string):string} */\n        static customFormat: Function;\n        /**\n         * 格式化指定的地址并\t返回。\n         * @param\turl 地址。\n         * @param\tbase 路径。\n         * @return 格式化处理后的地址。\n         */\n        static formatURL(url: string, base?: string): string;\n        /**\n         * @private\n         * 获取指定 URL 的路径。\n         * <p><b>注意：</b>末尾有斜杠（/）。</p>\n         * @param\turl 地址。\n         * @return  url 的路径。\n         */\n        static getPath(url: string): string;\n        /**\n         * 获取指定 URL 的文件名。\n         * @param\turl 地址。\n         * @return url 的文件名。\n         */\n        static getFileName(url: string): string;\n    }\n}\ndeclare module laya.net {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * @private\n     * Worker Image加载器\n     */\n    class WorkerLoader extends EventDispatcher {\n        /**\n         * 图片加载完成事件\n         */\n        static IMAGE_LOADED: string;\n        /**\n         * 图片加载失败事件\n         */\n        static IMAGE_ERR: string;\n        /**\n         * 图片加载过程中的信息\n         */\n        static IMAGE_MSG: string;\n        /**\n         * 实例\n         */\n        static I: WorkerLoader;\n        /**\n         * worker.js的路径\n         */\n        static workerPath: string;\n        /**\n         * 是否禁用js解码，如果禁用则如果浏览器不支持解码接口自动关闭WorkerLoader\n         */\n        static disableJSDecode: boolean;\n        /**\n         * 尝试使用Work加载Image\n         * @return 是否启动成功\n         */\n        static __init__(): boolean;\n        /**\n         * 是否支持worker\n         * @return 是否支持worker\n         */\n        static workerSupported(): boolean;\n        /**\n         * 是否启用。\n         */\n        static enable: boolean;\n        /**\n         * 使用的Worker对象。\n         */\n        worker: Worker;\n        constructor();\n        /**\n         * 加载图片\n         * @param\turl 图片地址\n         */\n        loadImage(url: string): void;\n        protected _loadImage(url: string): void;\n    }\n}\ndeclare module laya.particle.emitter {\n    import ParticleSetting = laya.particle.ParticleSetting;\n    import ParticleTemplateBase = laya.particle.ParticleTemplateBase;\n    /**\n     *\n     * @private\n     */\n    class Emitter2D extends EmitterBase {\n        setting: ParticleSetting;\n        constructor(_template: ParticleTemplateBase);\n        template: ParticleTemplateBase;\n        emit(): void;\n        getRandom(value: number): number;\n        webGLEmit(): void;\n        canvasEmit(): void;\n    }\n}\ndeclare module laya.particle.emitter {\n    import ParticleTemplateBase = laya.particle.ParticleTemplateBase;\n    /**\n     * <code>EmitterBase</code> 类是粒子发射器类\n     */\n    class EmitterBase {\n        protected _frameTime: number;\n        protected _emissionRate: number;\n        protected _emissionTime: number;\n        /**\n         * 发射粒子最小时间间隔\n         */\n        minEmissionTime: number;\n        _particleTemplate: ParticleTemplateBase;\n        /**\n         * 设置粒子粒子模板\n         * @param particleTemplate 粒子模板\n         *\n         */\n        particleTemplate: ParticleTemplateBase;\n        /**\n         * 获取粒子发射速率\n         * @return 发射速率  粒子发射速率 (个/秒)\n         */\n        /**\n         * 设置粒子发射速率\n         * @param emissionRate 粒子发射速率 (个/秒)\n         */\n        emissionRate: number;\n        /**\n         * 开始发射粒子\n         * @param duration 发射持续的时间(秒)\n         */\n        start(duration?: number): void;\n        /**\n         * 停止发射粒子\n         * @param clearParticles 是否清理当前的粒子\n         */\n        stop(): void;\n        /**\n         * 清理当前的活跃粒子\n         * @param clearTexture 是否清理贴图数据,若清除贴图数据将无法再播放\n         */\n        clear(): void;\n        /**\n         * 发射一个粒子\n         *\n         */\n        emit(): void;\n        /**\n         * 时钟前进\n         * @param passedTime 前进时间\n         *\n         */\n        advanceTime(passedTime?: number): void;\n    }\n}\ndeclare module laya.particle {\n    import Sprite = laya.display.Sprite;\n    import EmitterBase = laya.particle.emitter.EmitterBase;\n    import RenderContext = laya.renders.RenderContext;\n    /**\n     * <code>Particle2D</code> 类是2D粒子播放类\n     *\n     */\n    class Particle2D extends Sprite {\n        /**是否自动播放*/\n        autoPlay: boolean;\n        /**\n         * 创建一个新的 <code>Particle2D</code> 类实例。\n         * @param setting 粒子配置数据\n         */\n        constructor(setting: ParticleSetting);\n        /**\n         * 设置 粒子文件地址\n         * @param path 粒子文件地址\n         */\n        url: string;\n        /**\n         * 加载粒子文件\n         * @param url 粒子文件地址\n         */\n        load(url: string): void;\n        /**\n         * 设置粒子配置数据\n         * @param settings 粒子配置数据\n         */\n        setParticleSetting(setting: ParticleSetting): void;\n        /**\n         * 获取粒子发射器\n         */\n        readonly emitter: EmitterBase;\n        /**\n         * 播放\n         */\n        play(): void;\n        /**\n         * 停止\n         */\n        stop(): void;\n        /**\n         * 时钟前进\n         * @param passedTime 时钟前进时间\n         */\n        advanceTime(passedTime?: number): void;\n        customRender(context: RenderContext, x: number, y: number): void;\n        destroy(destroyChild?: boolean): void;\n    }\n}\ndeclare module laya.particle {\n    /**\n     *  @private\n     */\n    class ParticleData {\n        position: Float32Array;\n        velocity: Float32Array;\n        startColor: Float32Array;\n        endColor: Float32Array;\n        sizeRotation: Float32Array;\n        radius: Float32Array;\n        radian: Float32Array;\n        durationAddScale: number;\n        time: number;\n        constructor();\n        static Create(settings: ParticleSetting, position: Float32Array, velocity: Float32Array, time: number): ParticleData;\n    }\n}\ndeclare module laya.particle {\n    /**\n     *  @private\n     */\n    class ParticleEmitter {\n        constructor(templet: ParticleTemplateBase, particlesPerSecond: number, initialPosition: Float32Array);\n        update(elapsedTime: number, newPosition: Float32Array): void;\n    }\n}\ndeclare module laya.particle {\n    /**\n     * <code>ParticleSettings</code> 类是粒子配置数据类\n     */\n    class ParticleSetting {\n        /**贴图*/\n        textureName: string;\n        /**贴图个数,默认为1可不设置*/\n        textureCount: number;\n        /**最大同屏粒子个数，最大饱和粒子数为maxPartices-1。注意:WebGL模式下释放粒子时间为最大声明周期，可能会出现释放延迟,实际看到的同屏粒子数小于该数值，如连续喷发出现中断，请调大该数值。*/\n        maxPartices: number;\n        /**粒子持续时间(单位:秒）*/\n        duration: number;\n        /**如果大于0，某些粒子的持续时间会小于其他粒子,并具有随机性(单位:无）*/\n        ageAddScale: number;\n        /**粒子受发射器速度的敏感度（需在自定义发射器中编码设置）*/\n        emitterVelocitySensitivity: number;\n        /**最小开始尺寸（单位：2D像素、3D坐标）*/\n        minStartSize: number;\n        /**最大开始尺寸（单位：2D像素、3D坐标）*/\n        maxStartSize: number;\n        /**最小结束尺寸（单位：2D像素、3D坐标）*/\n        minEndSize: number;\n        /**最大结束尺寸（单位：2D像素、3D坐标）*/\n        maxEndSize: number;\n        /**最小水平速度（单位：2D像素、3D坐标）*/\n        minHorizontalVelocity: number;\n        /**最大水平速度（单位：2D像素、3D坐标）*/\n        maxHorizontalVelocity: number;\n        /**最小垂直速度（单位：2D像素、3D坐标）*/\n        minVerticalVelocity: number;\n        /**最大垂直速度（单位：2D像素、3D坐标）*/\n        maxVerticalVelocity: number;\n        /**等于1时粒子从出生到消亡保持一致的速度，等于0时粒子消亡时速度为0，大于1时粒子会保持加速（单位：无）*/\n        endVelocity: number;\n        /**（单位：2D像素、3D坐标）*/\n        gravity: Float32Array;\n        /**最小旋转速度（单位：2D弧度/秒、3D弧度/秒）*/\n        minRotateSpeed: number;\n        /**最大旋转速度（单位：2D弧度/秒、3D弧度/秒）*/\n        maxRotateSpeed: number;\n        /**最小开始半径（单位：2D像素、3D坐标）*/\n        minStartRadius: number;\n        /**最大开始半径（单位：2D像素、3D坐标）*/\n        maxStartRadius: number;\n        /**最小结束半径（单位：2D像素、3D坐标）*/\n        minEndRadius: number;\n        /**最大结束半径（单位：2D像素、3D坐标）*/\n        maxEndRadius: number;\n        /**最小水平开始弧度（单位：2D弧度、3D弧度）*/\n        minHorizontalStartRadian: number;\n        /**最大水平开始弧度（单位：2D弧度、3D弧度）*/\n        maxHorizontalStartRadian: number;\n        /**最小垂直开始弧度（单位：2D弧度、3D弧度）*/\n        minVerticalStartRadian: number;\n        /**最大垂直开始弧度（单位：2D弧度、3D弧度）*/\n        maxVerticalStartRadian: number;\n        /**是否使用结束弧度,false为结束时与起始弧度保持一致,true为根据minHorizontalEndRadian、maxHorizontalEndRadian、minVerticalEndRadian、maxVerticalEndRadian计算结束弧度。*/\n        useEndRadian: boolean;\n        /**最小水平结束弧度（单位：2D弧度、3D弧度）*/\n        minHorizontalEndRadian: number;\n        /**最大水平结束弧度（单位：2D弧度、3D弧度）*/\n        maxHorizontalEndRadian: number;\n        /**最小垂直结束弧度（单位：2D弧度、3D弧度）*/\n        minVerticalEndRadian: number;\n        /**最大垂直结束弧度（单位：2D弧度、3D弧度）*/\n        maxVerticalEndRadian: number;\n        /**最小开始颜色*/\n        minStartColor: Float32Array;\n        /**最大开始颜色*/\n        maxStartColor: Float32Array;\n        /**最小结束颜色*/\n        minEndColor: Float32Array;\n        /**最大结束颜色*/\n        maxEndColor: Float32Array;\n        /**false代表RGBA整体插值，true代表RGBA逐分量插值*/\n        colorComponentInter: boolean;\n        /**false代表使用参数颜色数据，true代表使用原图颜色数据*/\n        disableColor: boolean;\n        /**混合模式，待调整，引擎中暂无BlendState抽象*/\n        blendState: number;\n        /**发射器类型,\"point\",\"box\",\"sphere\",\"ring\"*/\n        emitterType: string;\n        /**发射器发射速率*/\n        emissionRate: number;\n        /**点发射器位置*/\n        pointEmitterPosition: Float32Array;\n        /**点发射器位置随机值*/\n        pointEmitterPositionVariance: Float32Array;\n        /**点发射器速度*/\n        pointEmitterVelocity: Float32Array;\n        /**点发射器速度随机值*/\n        pointEmitterVelocityAddVariance: Float32Array;\n        /**盒发射器中心位置*/\n        boxEmitterCenterPosition: Float32Array;\n        /**盒发射器尺寸*/\n        boxEmitterSize: Float32Array;\n        /**盒发射器速度*/\n        boxEmitterVelocity: Float32Array;\n        /**盒发射器速度随机值*/\n        boxEmitterVelocityAddVariance: Float32Array;\n        /**球发射器中心位置*/\n        sphereEmitterCenterPosition: Float32Array;\n        /**球发射器半径*/\n        sphereEmitterRadius: number;\n        /**球发射器速度*/\n        sphereEmitterVelocity: number;\n        /**球发射器速度随机值*/\n        sphereEmitterVelocityAddVariance: number;\n        /**环发射器中心位置*/\n        ringEmitterCenterPosition: Float32Array;\n        /**环发射器半径*/\n        ringEmitterRadius: number;\n        /**环发射器速度*/\n        ringEmitterVelocity: number;\n        /**环发射器速度随机值*/\n        ringEmitterVelocityAddVariance: number;\n        /**环发射器up向量，0代表X轴,1代表Y轴,2代表Z轴*/\n        ringEmitterUp: number;\n        /**发射器位置随机值,2D使用*/\n        positionVariance: Float32Array;\n        /**\n         * 创建一个新的 <code>ParticleSettings</code> 类实例。\n         *\n         */\n        constructor();\n        static checkSetting(setting: any): void;\n    }\n}\ndeclare module laya.particle {\n    import ParticleShaderValue = laya.particle.shader.value.ParticleShaderValue;\n    import ISubmit = laya.webgl.submit.ISubmit;\n    /**\n     *  @private\n     */\n    class ParticleTemplate2D extends ParticleTemplateWebGL implements ISubmit {\n        static activeBlendType: number;\n        x: number;\n        y: number;\n        protected _blendFn: Function;\n        sv: ParticleShaderValue;\n        constructor(parSetting: ParticleSetting);\n        getRenderType(): number;\n        releaseRender(): void;\n        addParticleArray(position: Float32Array, velocity: Float32Array): void;\n        protected loadContent(): void;\n        addNewParticlesToVertexBuffer(): void;\n        renderSubmit(): number;\n        blend(): void;\n        dispose(): void;\n    }\n}\ndeclare module laya.particle {\n    import Texture = laya.resource.Texture;\n    /**\n     *\n     * <code>ParticleTemplateBase</code> 类是粒子模板基类\n     *\n     */\n    class ParticleTemplateBase {\n        /**\n         * 粒子配置数据\n         */\n        settings: ParticleSetting;\n        protected texture: Texture;\n        /**\n         * 创建一个新的 <code>ParticleTemplateBase</code> 类实例。\n         *\n         */\n        constructor();\n        /**\n         * 添加一个粒子\n         * @param position 粒子位置\n         * @param velocity 粒子速度\n         *\n         */\n        addParticleArray(position: Float32Array, velocity: Float32Array): void;\n    }\n}\ndeclare module laya.particle {\n    import RenderContext = laya.renders.RenderContext;\n    /**\n     *  @private\n     */\n    class ParticleTemplateCanvas extends ParticleTemplateBase {\n        /**\n         * 贴图列表\n         */\n        textureList: Array<any>;\n        /**\n         * 粒子列表\n         */\n        particleList: Array<any>;\n        /**\n         * 贴图中心偏移x\n         */\n        pX: number;\n        /**\n         * 贴图中心偏移y\n         */\n        pY: number;\n        /**\n         * 当前活跃的粒子\n         */\n        activeParticles: Array<any>;\n        /**\n         * 粒子pool\n         */\n        deadParticles: Array<any>;\n        /**\n         * 粒子播放进度列表\n         */\n        iList: Array<any>;\n        protected _maxNumParticles: number;\n        /**\n         * 纹理的宽度\n         */\n        textureWidth: number;\n        /**\n         * 宽度倒数\n         */\n        dTextureWidth: number;\n        /**\n         * 是否支持颜色变化\n         */\n        colorChange: boolean;\n        /**\n         * 采样步长\n         */\n        step: number;\n        constructor(particleSetting: ParticleSetting);\n        clear(clearTexture?: boolean): void;\n        /**\n         * 设置纹理\n         * @param texture\n         *\n         */\n        setTexture(texture: any): void;\n        static changeTexture(texture: any, rst: Array<any>, settings?: ParticleSetting): Array<any>;\n        addParticleArray(position: Float32Array, velocity: Float32Array): void;\n        advanceTime(passedTime?: number): void;\n        render(context: RenderContext, x: number, y: number): void;\n        noColorRender(context: RenderContext, x: number, y: number): void;\n        canvasRender(context: RenderContext, x: number, y: number): void;\n    }\n}\ndeclare module laya.particle {\n    import Buffer = laya.webgl.utils.Buffer;\n    /**\n     *  @private\n     */\n    class ParticleTemplateWebGL extends ParticleTemplateBase {\n        protected _vertices: Float32Array;\n        protected _vertexBuffer: Buffer;\n        protected _indexBuffer: Buffer;\n        protected _floatCountPerVertex: number;\n        protected _firstActiveElement: number;\n        protected _firstNewElement: number;\n        protected _firstFreeElement: number;\n        protected _firstRetiredElement: number;\n        _currentTime: number;\n        protected _drawCounter: number;\n        constructor(parSetting: ParticleSetting);\n        protected initialize(): void;\n        protected loadContent(): void;\n        update(elapsedTime: number): void;\n        addNewParticlesToVertexBuffer(): void;\n        addParticleArray(position: Float32Array, velocity: Float32Array): void;\n    }\n}\ndeclare module laya.particle.particleUtils {\n    /**\n     *  @private\n     */\n    class CanvasShader {\n        u_Duration: number;\n        u_EndVelocity: number;\n        u_Gravity: Float32Array;\n        a_Position: Float32Array;\n        a_Velocity: Float32Array;\n        a_StartColor: Float32Array;\n        a_EndColor: Float32Array;\n        a_SizeRotation: Float32Array;\n        a_Radius: Float32Array;\n        a_Radian: Float32Array;\n        a_AgeAddScale: number;\n        _color: Float32Array;\n        gl_Position: Float32Array;\n        v_Color: Float32Array;\n        oSize: number;\n        _position: Float32Array;\n        constructor();\n        getLen(position: Float32Array): number;\n        ComputeParticlePosition(position: Float32Array, velocity: Float32Array, age: number, normalizedAge: number): Float32Array;\n        ComputeParticleSize(startSize: number, endSize: number, normalizedAge: number): number;\n        ComputeParticleRotation(rot: number, age: number): number;\n        ComputeParticleColor(startColor: Float32Array, endColor: Float32Array, normalizedAge: number): Float32Array;\n        clamp(value: number, min: number, max: number): number;\n        getData(age: number): Array<any>;\n    }\n}\ndeclare module laya.particle.particleUtils {\n    /**\n     *\n     *  @private\n     *\n     * @created  2015-8-25 下午3:41:07\n     */\n    class CMDParticle {\n        constructor();\n        /**\n         * 最大帧\n         */\n        maxIndex: number;\n        /**\n         * 帧命令数组\n         */\n        cmds: Array<any>;\n        /**\n         * 粒子id\n         */\n        id: number;\n        setCmds(cmds: Array<any>): void;\n    }\n}\ndeclare module laya.particle.particleUtils {\n    class PicTool {\n        static getCanvasPic(img: any, color: number): any;\n        static getRGBPic(img: any): Array<any>;\n    }\n}\ndeclare module laya.particle.shader {\n    import Shader = laya.webgl.shader.Shader;\n    /**\n     *  @private\n     */\n    class ParticleShader extends Shader {\n        static vs: string;\n        static ps: string;\n        constructor();\n    }\n}\ndeclare module laya.particle.shader.value {\n    import Value2D = laya.webgl.shader.d2.value.Value2D;\n    /**\n     *  @private\n     */\n    class ParticleShaderValue extends Value2D {\n        a_CornerTextureCoordinate: Array<any>;\n        a_Position: Array<any>;\n        a_Velocity: Array<any>;\n        a_StartColor: Array<any>;\n        a_EndColor: Array<any>;\n        a_SizeRotation: Array<any>;\n        a_Radius: Array<any>;\n        a_Radian: Array<any>;\n        a_AgeAddScale: Array<any>;\n        a_Time: Array<any>;\n        u_CurrentTime: number;\n        u_Duration: number;\n        u_Gravity: Float32Array;\n        u_EndVelocity: number;\n        u_texture: any;\n        constructor();\n        upload(): void;\n    }\n}\ndeclare module laya.renders {\n    import HTMLCanvas = laya.resource.HTMLCanvas;\n    /**\n     * @private\n     * <code>Render</code> 是渲染管理类。它是一个单例，可以使用 Laya.render 访问。\n     */\n    class Render {\n        static _context: RenderContext;\n        static _mainCanvas: HTMLCanvas;\n        static WebGL: any;\n        /**是否是Flash模式*/\n        static isFlash: boolean;\n        /**加速器模式下设置是否是节点模式 如果是否就是非节点模式 默认为canvas模式 如果设置了isConchWebGL则是webGL模式*/\n        static isConchNode: boolean;\n        /**是否是加速器 只读*/\n        static isConchApp: boolean;\n        /**加速器模式下设置是否是节点模式 如果是否就是非节点模式 默认为canvas模式 如果设置了isConchWebGL则是webGL模式*/\n        static isConchWebGL: boolean;\n        /**是否是WebGL模式*/\n        static isWebGL: boolean;\n        /** 表示是否是 3D 模式。*/\n        static is3DMode: boolean;\n        static optimizeTextureMemory: Function;\n        constructor(width: number, height: number);\n        /** 目前使用的渲染器。*/\n        static readonly context: RenderContext;\n        /** 渲染使用的原生画布引用。 */\n        static readonly canvas: any;\n    }\n}\ndeclare module laya.renders {\n    import Matrix = laya.maths.Matrix;\n    import HTMLCanvas = laya.resource.HTMLCanvas;\n    import Texture = laya.resource.Texture;\n    /**\n     * @private\n     * 渲染环境\n     */\n    class RenderContext {\n        /**Math.PI*2的结果缓存 */\n        static PI2: number;\n        /**全局x坐标 */\n        x: number;\n        /**全局y坐标 */\n        y: number;\n        /**当前使用的画布 */\n        canvas: HTMLCanvas;\n        /**当前使用的画布上下文 */\n        ctx: any;\n        /**销毁当前渲染环境*/\n        destroy(): void;\n        constructor(width: number, height: number, canvas?: HTMLCanvas);\n        drawTexture(tex: Texture, x: number, y: number, width: number, height: number): void;\n        _drawTexture: Function;\n        _drawTextures(x: number, y: number, args: Array<any>): void;\n        _fillTexture: Function;\n        drawTextureWithTransform(tex: Texture, x: number, y: number, width: number, height: number, m: Matrix, alpha: number): void;\n        _drawTextureWithTransform: Function;\n        fillQuadrangle(tex: any, x: number, y: number, point4: Array<any>, m: Matrix): void;\n        _fillQuadrangle: Function;\n        drawCanvas(canvas: HTMLCanvas, x: number, y: number, width: number, height: number): void;\n        drawRect(x: number, y: number, width: number, height: number, color: string, lineWidth?: number): void;\n        _drawRect: Function;\n        _drawPie: Function;\n        clipRect(x: number, y: number, width: number, height: number): void;\n        _clipRect: Function;\n        fillRect(x: number, y: number, width: number, height: number, fillStyle: any): void;\n        _fillRect: Function;\n        drawCircle(x: number, y: number, radius: number, color: string, lineWidth?: number): void;\n        _drawCircle: Function;\n        /**\n         * 绘制三角形\n         * @param\tx\n         * @param\ty\n         * @param\ttex\n         * @param\targs [x, y, texture,vertices,indices,uvs,matrix]\n         */\n        drawTriangles(x: number, y: number, args: Array<any>): void;\n        fillCircle(x: number, y: number, radius: number, color: string): void;\n        _fillCircle: Function;\n        setShader(shader: any): void;\n        _setShader: Function;\n        drawLine(fromX: number, fromY: number, toX: number, toY: number, color: string, lineWidth?: number): void;\n        _drawLine: Function;\n        _drawLines: Function;\n        _drawLinesWebGL: Function;\n        _drawCurves: Function;\n        _draw: Function;\n        clear(): void;\n        transformByMatrix(value: Matrix): void;\n        _transformByMatrix: Function;\n        setTransform(a: number, b: number, c: number, d: number, tx: number, ty: number): void;\n        _setTransform: Function;\n        setTransformByMatrix(value: Matrix): void;\n        _setTransformByMatrix: Function;\n        save(): void;\n        _save: Function;\n        restore(): void;\n        _restore: Function;\n        translate(x: number, y: number): void;\n        _translate: Function;\n        transform(a: number, b: number, c: number, d: number, tx: number, ty: number): void;\n        _transform: Function;\n        rotate(angle: number): void;\n        _rotate: Function;\n        scale(scaleX: number, scaleY: number): void;\n        _scale: Function;\n        alpha(value: number): void;\n        _alpha: Function;\n        setAlpha(value: number): void;\n        _setAlpha: Function;\n        fillWords(words: Array<any>, x: number, y: number, font: string, color: string, underLine?: number): void;\n        fillBorderWords(words: Array<any>, x: number, y: number, font: string, fillColor: string, borderColor: string, lineWidth: number): void;\n        fillText(text: string, x: number, y: number, font: string, color: string, textAlign: string): void;\n        _fillText: Function;\n        strokeText(text: string, x: number, y: number, font: string, color: string, lineWidth: number, textAlign: string): void;\n        _strokeText: Function;\n        _fillBorderText: Function;\n        blendMode(type: string): void;\n        _blendMode: Function;\n        flush(): void;\n        addRenderObject(o: any): void;\n        beginClip(x: number, y: number, w: number, h: number): void;\n        _beginClip: Function;\n        endClip(): void;\n        _setIBVB: Function;\n        fillTrangles(x: number, y: number, args: Array<any>): void;\n        _fillTrangles: Function;\n        _drawPath: Function;\n        drawPoly: Function;\n        _drawPoly: Function;\n        _drawSkin: Function;\n        _drawParticle: Function;\n        _setFilters: Function;\n    }\n}\ndeclare module laya.renders {\n    import Sprite = laya.display.Sprite;\n    /**\n     * @private\n     * 精灵渲染器\n     */\n    class RenderSprite {\n        static IMAGE: number;\n        static ALPHA: number;\n        static TRANSFORM: number;\n        static BLEND: number;\n        static CANVAS: number;\n        static FILTERS: number;\n        static MASK: number;\n        static CLIP: number;\n        static STYLE: number;\n        static GRAPHICS: number;\n        static CUSTOM: number;\n        static CHILDS: number;\n        static INIT: number;\n        static renders: Array<any>;\n        protected static NORENDER: RenderSprite;\n        _next: RenderSprite;\n        _fun: Function;\n        static __init__(): void;\n        constructor(type: number, next: RenderSprite);\n        protected onCreate(type: number): void;\n        _style(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _no(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _custom(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _clip(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _blend(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _mask(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _graphics(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _image(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _image2(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _alpha(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _transform(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _canvas(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n    }\n}\ndeclare module laya.resource {\n    /**\n     * @private\n     * <code>Bitmap</code> 是图片资源类。\n     */\n    class Bitmap extends Resource {\n        protected _source: any;\n        protected _w: number;\n        protected _h: number;\n        /***\n         * 宽度。\n         */\n        readonly width: number;\n        /***\n         * 高度。\n         */\n        readonly height: number;\n        /***\n         * HTML Image 或 HTML Canvas 或 WebGL Texture 。\n         */\n        readonly source: any;\n        /**\n         * 创建一个 <code>Bitmap</code> 实例。\n         */\n        constructor();\n    }\n}\ndeclare module laya.resource {\n    import Matrix = laya.maths.Matrix;\n    import Point = laya.maths.Point;\n    /**\n     * @private\n     * Context扩展类\n     */\n    class Context {\n        _canvas: HTMLCanvas;\n        _repaint: boolean;\n        static __init__(to?: any): void;\n        setIsMainContext(): void;\n        font: string;\n        textBaseline: string;\n        fillStyle: any;\n        translate(x: number, y: number): void;\n        scale(scaleX: number, scaleY: number): void;\n        drawImage(...args: any[]): void;\n        getImageData(...args: any[]): any;\n        measureText(text: string): any;\n        setTransform(...args: any[]): void;\n        beginPath(): void;\n        strokeStyle: any;\n        globalCompositeOperation: string;\n        rect(x: number, y: number, width: number, height: number): void;\n        stroke(): void;\n        transform(a: number, b: number, c: number, d: number, tx: number, ty: number): void;\n        save(): void;\n        restore(): void;\n        clip(): void;\n        arcTo(x1: number, y1: number, x2: number, y2: number, r: number): void;\n        quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\n        lineJoin: string;\n        lineCap: string;\n        miterLimit: string;\n        globalAlpha: number;\n        clearRect(x: number, y: number, width: number, height: number): void;\n        drawTextures(tex: Texture, pos: Array<any>, tx: number, ty: number): void;\n        drawCanvas(canvas: HTMLCanvas, x: number, y: number, width: number, height: number): void;\n        fillRect(x: number, y: number, width: number, height: number, style: any): void;\n        fillText(text: any, x: number, y: number, font: string, color: string, textAlign: string): void;\n        fillBorderText(text: any, x: number, y: number, font: string, fillColor: string, borderColor: string, lineWidth: number, textAlign: string): void;\n        strokeText(text: any, x: number, y: number, font: string, color: string, lineWidth: number, textAlign: string): void;\n        transformByMatrix(value: Matrix): void;\n        setTransformByMatrix(value: Matrix): void;\n        clipRect(x: number, y: number, width: number, height: number): void;\n        drawTexture(tex: Texture, x: number, y: number, width: number, height: number, tx: number, ty: number): void;\n        drawTextureWithTransform(tex: Texture, x: number, y: number, width: number, height: number, m: Matrix, tx: number, ty: number, alpha: number): void;\n        drawTexture2(x: number, y: number, pivotX: number, pivotY: number, m: Matrix, alpha: number, blendMode: string, args2: Array<any>): void;\n        fillTexture(texture: Texture, x: number, y: number, width: number, height: number, type: string, offset: Point, other: any): void;\n        drawTriangle(texture: Texture, vertices: Float32Array, uvs: Float32Array, index0: number, index1: number, index2: number, matrix: Matrix, canvasPadding: boolean): void;\n        flush(): number;\n        fillWords(words: Array<any>, x: number, y: number, font: string, color: string, underLine: number): void;\n        fillBorderWords(words: Array<any>, x: number, y: number, font: string, color: string, borderColor: string, lineWidth: number): void;\n        destroy(): void;\n        clear(): void;\n        drawCurves(x: number, y: number, args: Array<any>): void;\n    }\n}\ndeclare module laya.resource {\n    /**\n     * @private\n     * <code>FileBitmap</code> 是图片文件资源类。\n     */\n    class FileBitmap extends Bitmap {\n        protected _src: string;\n        /**\n         * 文件路径全名。\n         */\n        src: string;\n        protected _onload: Function;\n        protected _onerror: Function;\n        /**\n         * 载入完成处理函数。\n         */\n        onload: Function;\n        /**\n         * 错误处理函数。\n         */\n        onerror: Function;\n    }\n}\ndeclare module laya.resource {\n    /**\n     * <code>HTMLCanvas</code> 是 Html Canvas 的代理类，封装了 Canvas 的属性和方法。。请不要直接使用 new HTMLCanvas！\n     */\n    class HTMLCanvas extends Bitmap {\n        /**\n         * 根据指定的类型，创建一个 <code>HTMLCanvas</code> 实例。\n         * @param\ttype 类型。2D、3D。\n         */\n        static create: Function;\n        /** 2D 模式。*/\n        static TYPE2D: string;\n        /** 3D 模式。*/\n        static TYPE3D: string;\n        /** 自动模式。*/\n        static TYPEAUTO: string;\n        static _createContext: Function;\n        /**\n         * 根据指定的类型，创建一个 <code>HTMLCanvas</code> 实例。请不要直接使用 new HTMLCanvas！\n         * @param\ttype 类型。2D、3D。\n         */\n        constructor(type: string, canvas?: any);\n        /**\n         * 清空画布内容。\n         */\n        clear(): void;\n        /**\n         * 销毁。\n         */\n        destroy(): void;\n        /**\n         * 释放。\n         */\n        release(): void;\n        /**\n         * Canvas 渲染上下文。\n         */\n        readonly context: Context;\n        /**\n         * @private\n         * 设置 Canvas 渲染上下文。\n         * @param\tcontext Canvas 渲染上下文。\n         */\n        _setContext(context: Context): void;\n        /**\n         * 获取 Canvas 渲染上下文。\n         * @param\tcontextID 上下文ID.\n         * @param\tother\n         * @return  Canvas 渲染上下文 Context 对象。\n         */\n        getContext: Function;\n        /**\n         * 获取内存大小。\n         * @return 内存大小。\n         */\n        getMemSize(): number;\n        return: any;\n        asBitmap: boolean;\n        /**\n         * 设置宽高。\n         * @param\tw 宽度。\n         * @param\th 高度。\n         */\n        size(w: number, h: number): void;\n        getCanvas(): any;\n        toBase64(type: string, encoderOptions: number, callBack: Function): void;\n    }\n}\ndeclare module laya.resource {\n    /**\n     * @private\n     * <p> <code>HTMLImage</code> 用于创建 HTML Image 元素。</p>\n     * <p>请使用 <code>HTMLImage.create()<code>获取新实例，不要直接使用 <code>new HTMLImage<code> 。</p>\n     */\n    class HTMLImage extends FileBitmap {\n        /**\n         * <p>创建一个 <code>HTMLImage</code> 实例。</p>\n         * <p>请使用 <code>HTMLImage.create()<code>创建实例，不要直接使用 <code>new HTMLImage<code> 。</p>\n         */\n        static create: Function;\n        protected _recreateLock: boolean;\n        protected _needReleaseAgain: boolean;\n        /**\n         * @inheritDoc\n         */\n        onload: Function;\n        /**\n         * @inheritDoc\n         */\n        onerror: Function;\n        /**\n         * <p>创建一个 <code>HTMLImage</code> 实例。</p>\n         * <p>请使用 <code>HTMLImage.create()<code>创建实例，不要直接使用 <code>new HTMLImage<code> 。</p>\n         */\n        constructor(src: string, def?: any);\n        protected _init_(src: string, def: any): void;\n        enableMerageInAtlas: boolean;\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n        protected onresize(): void;\n    }\n}\ndeclare module laya.resource {\n    /**\n     * @private\n     */\n    class HTMLSubImage extends Bitmap {\n        static create: Function;\n        constructor(canvas: any, offsetX: number, offsetY: number, width: number, height: number, atlasImage: any, src: string, allowMerageInAtlas: boolean);\n    }\n}\ndeclare module laya.resource {\n    /**\n     * @private\n     * <code>ICreateResource</code> 对象创建接口。\n     */\n    interface ICreateResource {\n        _getGroup(): string;\n        _setGroup(value: string): void;\n        _setUrl(url: string): void;\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n    }\n}\ndeclare module laya.resource {\n    /**\n     * @private\n     * <code>IDestroy</code> 是对象销毁的接口。\n     */\n    interface IDestroy {\n        _destroy(): void;\n    }\n}\ndeclare module laya.resource {\n    /**\n     * @private\n     * <code>IDispose</code> 是资源销毁的接口。\n     */\n    interface IDispose {\n        dispose(): void;\n    }\n}\ndeclare module laya.resource {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * @private\n     * <code>Resource</code> 资源存取类。\n     */\n    class Resource extends EventDispatcher implements ICreateResource, IDispose {\n        /**\n         * 通过资源ID返回已载入资源。\n         * @param id 资源ID\n         * @return 资源 <code>Resource</code> 对象。\n         */\n        static getResourceByID(id: number): Resource;\n        /**\n         * 通过url返回已载入资源。\n         * @param url 资源URL\n         * @param index 索引\n         * @return 资源 <code>Resource</code> 对象。\n         */\n        static getResourceByURL(url: string, index?: number): Resource;\n        /**\n         * 通过url返回已载入资源。\n         * @param url 资源URL\n         * @return 资源 <code>Resource</code> 对象。\n         * @param index 索引\n         */\n        static getResourceCountByURL(url: string): number;\n        /**\n         * 销毁当前没有被使用的资源,该函数会忽略lock=true的资源。\n         * @param group 指定分组。\n         */\n        static destroyUnusedResources(group?: string): void;\n        protected _url: string;\n        _resourceManager: ResourceManager;\n        _lastUseFrameCount: number;\n        /**是否加锁，如果true为不能使用自动释放机制。*/\n        lock: boolean;\n        /**名称。 */\n        name: string;\n        /**\n         * @private\n         */\n        _loaded: boolean;\n        /**\n         * 获取唯一标识ID,通常用于识别。\n         */\n        readonly id: number;\n        /**\n         * 资源管理员。\n         */\n        readonly resourceManager: ResourceManager;\n        /**\n         * 占用内存尺寸。\n         */\n        /**\n         * @private\n         */\n        memorySize: number;\n        /**\n         * 是否已释放。\n         */\n        readonly released: boolean;\n        /**\n         * 是否已处理。\n         */\n        readonly destroyed: boolean;\n        /**\n         * 获取是否已加载完成。\n         */\n        readonly loaded: boolean;\n        /**\n         * 获取资源的URL地址。\n         * @return URL地址。\n         */\n        readonly url: string;\n        /**\n         * 获取资源组名。\n         */\n        /**\n         * 设置资源组名。\n         */\n        group: string;\n        /**\n         * 获取资源的引用计数。\n         */\n        readonly referenceCount: number;\n        /**\n         * 创建一个 <code>Resource</code> 实例。\n         */\n        constructor();\n        /**\n         * @private\n         */\n        _setUrl(url: string): void;\n        /**\n         * @private\n         */\n        _getGroup(): string;\n        /**\n         * @private\n         */\n        _setGroup(value: string): void;\n        /**\n         * @private\n         */\n        _addReference(): void;\n        /**\n         * @private\n         */\n        _removeReference(): void;\n        /**\n         * @private\n         */\n        _clearReference(): void;\n        /**\n         * @private\n         */\n        _endLoaded(): void;\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n        /**\n         * 激活资源，使用资源前应先调用此函数激活。\n         * @param force 是否强制创建。\n         */\n        activeResource(force?: boolean): void;\n        /**\n         * 释放资源。\n         * @param force 是否强制释放。\n         * @return 是否成功释放。\n         */\n        releaseResource(force?: boolean): boolean;\n        /**\n         *@private\n         */\n        onAsynLoaded(url: string, data: any, params: Array<any>): void;\n        /**\n         * <p>彻底处理资源，处理后不能恢复。</p>\n         * <p><b>注意：</b>会强制解锁清理。</p>\n         */\n        destroy(): void;\n        protected completeCreate(): void;\n        /**\n         * @private\n         */\n        dispose(): void;\n    }\n}\ndeclare module laya.resource {\n    /**\n     * @private\n     * <code>ResourceManager</code> 是资源管理类。它用于资源的载入、获取、销毁。\n     */\n    class ResourceManager implements IDispose {\n        /** 当前资源管理器。*/\n        static currentResourceManager: ResourceManager;\n        /**\n         * 系统资源管理器。\n         */\n        static readonly systemResourceManager: ResourceManager;\n        /**\n         * @private\n         * 资源管理类初始化。\n         */\n        static __init__(): void;\n        /**\n         * 获取指定索引的资源管理器。\n         * @param index 索引。\n         * @return 资源管理器。\n         */\n        static getLoadedResourceManagerByIndex(index: number): ResourceManager;\n        /**\n         * 获取资源管理器总个数。\n         *  @return  资源管理器总个数。\n         */\n        static getLoadedResourceManagersCount(): number;\n        /**\n         * 重新强制创建资源管理员以及所拥有资源（显卡丢失时处理）。\n         */\n        static recreateContentManagers(force?: boolean): void;\n        /**释放资源管理员所拥有资源（显卡丢失时处理）。*/\n        static releaseContentManagers(force?: boolean): void;\n        /** 是否启用自动释放机制。*/\n        autoRelease: boolean;\n        /**自动释放机制的内存触发上限,以字节为单位。*/\n        autoReleaseMaxSize: number;\n        /**\n         * 唯一标识 ID 。\n         */\n        readonly id: number;\n        /**\n         * 名字。\n         */\n        name: string;\n        /**\n         * 此管理器所管理资源的累计内存，以字节为单位。\n         */\n        readonly memorySize: number;\n        /**\n         * 创建一个 <code>ResourceManager</code> 实例。\n         */\n        constructor(name?: string);\n        /**\n         * 获取指定索引的资源 Resource 对象。\n         * @param 索引。\n         * @return 资源 Resource 对象。\n         */\n        getResourceByIndex(index: number): Resource;\n        /**\n         * 获取此管理器所管理的资源个数。\n         * @return 资源个数。\n         */\n        getResourcesLength(): number;\n        /**\n         * 添加指定资源。\n         * @param\tresource 需要添加的资源 Resource 对象。\n         * @return 是否添加成功。\n         */\n        addResource(resource: Resource): boolean;\n        /**\n         * 移除指定资源。\n         * @param\tresource 需要移除的资源 Resource 对象\n         * @return 是否移除成功。\n         */\n        removeResource(resource: Resource): boolean;\n        /**\n         * 卸载此资源管理器载入的资源。\n         */\n        unload(): void;\n        /** 释放资源。*/\n        dispose(): void;\n        /**\n         * 增加内存。\n         * @param add 需要增加的内存大小。\n         */\n        addSize(add: number): void;\n    }\n}\ndeclare module laya.resource {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <code>Texture</code> 是一个纹理处理类。\n     */\n    class Texture extends EventDispatcher {\n        /**默认 UV 信息。*/\n        static DEF_UV: Array<any>;\n        static INV_UV: Array<any>;\n        /** 图片或者canvas 。*/\n        bitmap: any;\n        /** UV信息。*/\n        uv: Array<any>;\n        /**沿 X 轴偏移量。*/\n        offsetX: number;\n        /**沿 Y 轴偏移量。*/\n        offsetY: number;\n        /**原始宽度（包括被裁剪的透明区域）。*/\n        sourceWidth: number;\n        /**原始高度（包括被裁剪的透明区域）。*/\n        sourceHeight: number;\n        _loaded: boolean;\n        protected _w: number;\n        protected _h: number;\n        $_GID: number;\n        /**图片地址*/\n        url: string;\n        _uvID: number;\n        _atlasID: number;\n        scaleRate: number;\n        /**\n         * 创建一个 <code>Texture</code> 实例。\n         * @param\tbitmap 位图资源。\n         * @param\tuv UV 数据信息。\n         */\n        constructor(bitmap?: Bitmap, uv?: Array<any>);\n        /**\n         * @private\n         */\n        _setUrl(url: string): void;\n        /**\n         * 设置此对象的位图资源、UV数据信息。\n         * @param\tbitmap 位图资源\n         * @param\tuv UV数据信息\n         */\n        setTo(bitmap?: Bitmap, uv?: Array<any>): void;\n        /**\n         * 平移 UV。\n         * @param offsetX 沿 X 轴偏移量。\n         * @param offsetY 沿 Y 轴偏移量。\n         * @param uv 需要平移操作的的 UV。\n         * @return 平移后的UV。\n         */\n        static moveUV(offsetX: number, offsetY: number, uv: Array<any>): Array<any>;\n        /**\n         *  根据指定资源和坐标、宽高、偏移量等创建 <code>Texture</code> 对象。\n         * @param\tsource 绘图资源 img 或者 Texture 对象。\n         * @param\tx 起始绝对坐标 x 。\n         * @param\ty 起始绝对坐标 y 。\n         * @param\twidth 宽绝对值。\n         * @param\theight 高绝对值。\n         * @param\toffsetX X 轴偏移量（可选）。\n         * @param\toffsetY Y 轴偏移量（可选）。\n         * @param\tsourceWidth 原始宽度，包括被裁剪的透明区域（可选）。\n         * @param\tsourceHeight 原始高度，包括被裁剪的透明区域（可选）。\n         * @return  <code>Texture</code> 对象。\n         */\n        static create(source: any, x: number, y: number, width: number, height: number, offsetX?: number, offsetY?: number, sourceWidth?: number, sourceHeight?: number): Texture;\n        /**\n         * 截取Texture的一部分区域，生成新的Texture，如果两个区域没有相交，则返回null。\n         * @param\ttexture\t目标Texture。\n         * @param\tx\t\t相对于目标Texture的x位置。\n         * @param\ty\t\t相对于目标Texture的y位置。\n         * @param\twidth\t截取的宽度。\n         * @param\theight\t截取的高度。\n         * @return 返回一个新的Texture。\n         */\n        static createFromTexture(texture: Texture, x: number, y: number, width: number, height: number): Texture;\n        /**\n         * 表示是否加载成功，只能表示初次载入成功（通常包含下载和载入）,并不能完全表示资源是否可立即使用（资源管理机制释放影响等）。\n         */\n        readonly loaded: boolean;\n        /**\n         * 表示资源是否已释放。\n         */\n        readonly released: boolean;\n        active(): void;\n        /** 激活并获取资源。*/\n        readonly source: any;\n        /**\n         * 销毁纹理（分直接销毁，跟计数销毁两种）。\n         * @param\tforceDispose\t(default = false)true为强制销毁主纹理，false是通过计数销毁纹理。\n         */\n        destroy(forceDispose?: boolean): void;\n        /** 实际宽度。*/\n        width: number;\n        /** 实际高度。*/\n        height: number;\n        /**\n         * 获取当前纹理是否启用了线性采样。\n         */\n        /**\n         * 设置线性采样的状态（目前只能第一次绘制前设置false生效,来关闭线性采样）。\n         */\n        isLinearSampling: boolean;\n        /**\n         * 获取当前纹理是否启用了纹理平铺\n         */\n        /**\n         * 通过外部设置是否启用纹理平铺(后面要改成在着色器里计算)\n         */\n        repeat: boolean;\n        /**\n         * 加载指定地址的图片。\n         * @param\turl 图片地址。\n         */\n        load(url: string): void;\n        addTextureToAtlas(e?: any): void;\n        /**\n         * 获取Texture上的某个区域的像素点\n         * @param\tx\n         * @param\ty\n         * @param\twidth\n         * @param\theight\n         * @return  返回像素点集合\n         */\n        getPixels(x: number, y: number, width: number, height: number): Array<any>;\n        onAsynLoaded(url: string, bitmap: Bitmap): void;\n    }\n}\ndeclare module laya.runtime {\n    import Graphics = laya.display.Graphics;\n    import Context = laya.resource.Context;\n    /**\n     * @private\n     */\n    interface IConchNode {\n        /**@private */\n        setRootNode(): void;\n        /**@private */\n        addChildAt(c: IConchNode, i: number): void;\n        /**@private */\n        removeChild(c: IConchNode): void;\n        /**@private */\n        size(w: number, h: number): void;\n        /**@private */\n        pos(x: number, y: number): void;\n        /**@private */\n        pivot(x: number, y: number): void;\n        /**@private */\n        scale(x: number, y: number): void;\n        /**@private */\n        skew(x: number, y: number): void;\n        /**@private */\n        rotate(r: number): void;\n        /**@private */\n        bgColor(bg: string): void;\n        /**@private */\n        font(str: string): void;\n        /**@private */\n        text(d: any): void;\n        /**@private */\n        transform(a: number, b: number, c: number, d: number, tx: number, ty: number): void;\n        /**@private */\n        alpha(a: number): void;\n        /**@private */\n        setFilterMatrix(mat: Float32Array, alpha: Float32Array): void;\n        /**@private */\n        visible(b: boolean): void;\n        /**@private */\n        blendMode(v: string): void;\n        /**@private */\n        scrollRect(x: number, y: number, w: number, h: number): void;\n        /**@private */\n        mask(node: IConchNode): void;\n        /**@private */\n        graphics(g: Graphics): void;\n        /**@private */\n        custom(context: Context): void;\n        /**@private */\n        removeType(type: number): void;\n        /**@private */\n        cacheAs(type: number): void;\n        /**@private */\n        border(color: string): void;\n        /**@private */\n        optimizeScrollRect(b: boolean): void;\n        /**@private */\n        blurFilter(strength: number): void;\n        /**@private */\n        glowFilter(color: string, blur: number, offX: number, offY: number): void;\n        /**@private */\n        repaint(): void;\n        /**@private */\n        setZOrder(z: number): void;\n        /**@private */\n        updateZOrder(): void;\n    }\n}\ndeclare module laya.runtime {\n    /**\n     * @private\n     * @author hugao\n     */\n    interface IConchRenderObject {\n        drawSubmesh(submesh: any, drawType: number, renderMode: number, offset: number, count: number): void;\n        matrix(matrix: Float32Array): void;\n        boundingBox(min: Float32Array, max: Float32Array): void;\n    }\n}\ndeclare module laya.runtime {\n    /**\n     * @private\n     * @author hugao\n     */\n    interface ICPlatformClass {\n        /**\n         * 创建平台类\n         * @param\tclsName  类全名\n         * @return 创建的类\n         */\n        createClass(clsName: string): IPlatformClass;\n    }\n}\ndeclare module laya.runtime {\n    /**\n     * @private\n     */\n    interface IMarket {\n        /**\n         * 登录\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        login(jsonParm: string, callback: Function): void;\n        /**\n         * 登出\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        logout(jsonParm: string, callback: Function): void;\n        /**\n         * 授权\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        authorize(jsonParm: string, callback: Function): void;\n        /**\n         * 进入论坛\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        enterBBS(jsonParm: string, callback: Function): void;\n        /**\n         * 刷新票据\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        refreshToken(jsonParm: string, callback: Function): void;\n        /**\n         * 支付\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        recharge(jsonParm: string, callback: Function): void;\n        /**\n         * 分享\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        enterShareAndFeed(jsonParm: string, callback: Function): void;\n        /**\n         * 邀请\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        enterInvite(jsonParm: string, callback: Function): void;\n        /**\n         * 获取游戏好友\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        getGameFriends(jsonParm: string, callback: Function): void;\n        /**\n         * 发送到桌面\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        sendToDesktop(jsonParm: string, callback: Function): void;\n        /**\n         * 发送自定义消息\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        sendMessageToPlatform(jsonParm: string, callback: Function): void;\n        /**\n         * 获取用户信息\n         * @param\tjsonParm\n         * @param\tcallback\n         */\n        getUserInfo(jsonParm: string, callback: Function): void;\n        /**\n         * 返回Market名称\n         */\n        getMarketName(): string;\n        /**\n         * 返回支付类型 自定义\n         */\n        getPayType(): number;\n        /**\n         * 返回登录类型 自定义\n         */\n        getLoginType(): number;\n        /**\n         *\n         */\n        getChargeType(): number;\n    }\n}\ndeclare module laya.runtime {\n    /**\n     * @private\n     * @author hugao\n     */\n    interface IPlatform {\n        /**\n         * 调用方法\n         * @param\tmethodName  方法名\n         * @param\t...args     参数\n         * @return 返回值 目前只用android能直接返回\n         */\n        call(methodName: string, ...args: any[]): any;\n        /**\n         * 调用方法通过回调接收返回值\n         * @param\tcallback     回调方法 参数为返回值\n         * @param\tmethodName   方法名\n         * @param\t...args     参数\n         */\n        callWithBack(callback: Function, methodName: string, ...args: any[]): void;\n    }\n}\ndeclare module laya.runtime {\n    /**\n     * @private\n     * @author hugao\n     */\n    interface IPlatformClass extends IPlatform {\n        /**\n         * 创建对象\n         * @param\t...args  构造函数的参数\n         * @return  创建出来的对象\n         */\n        newObject(...args: any[]): IPlatform;\n    }\n}\ndeclare module laya.system {\n    /**\n     * @private\n     */\n    class System {\n        /**\n         * 替换指定名称的定义。用来动态更改类的定义。\n         * @param\tname 属性名。\n         * @param\tclassObj 属性值。\n         */\n        static changeDefinition(name: string, classObj: any): void;\n        /**\n         * @private\n         * 初始化。\n         */\n        static __init__(): void;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * 异步Dialog的生命周期:show或者popup > onCreate(如果没有创建过) > onOpen > onClose > onDestroy(如果销毁)\n     * onCreate在页面未创建时执行一次，再次打开页面不会再执行，适合写一些只执行一次的逻辑，比如资源加载，节点事件监听\n     * onOpen在页面每次打开都会执行，适合做一些每次都需要处理的事情，比如消息请求，根据数据初始化页面\n     * onClose在每次关闭的时候调用，适合关闭时停止动画，网络消息监听等逻辑\n     * onDestroy在页面被销毁的时候调用，适合置空引用对象\n     */\n    class AsynDialog extends Dialog {\n        protected _uiView: any;\n        /**打开时是否关闭其他页面*/\n        isCloseOther: boolean;\n        protected createView(uiView: any): void;\n        protected _open(modal: boolean, closeOther: boolean, showEffect: boolean): void;\n        /**\n         * 在页面未创建时执行一次，再次打开页面不会再执行，适合写一些只执行一次的逻辑，比如资源加载，节点事件监听\n         */\n        onCreated(): void;\n        /**根据节点数据创建UI*/\n        createUI(): void;\n        /**\n         * 在页面每次打开都会执行，适合做一些每次都需要处理的事情，比如消息请求，根据数据初始化页面\n         */\n        onOpen(): void;\n        close(type?: string, showEffect?: boolean): void;\n        /**\n         * 在每次关闭的时候调用，适合关闭时停止动画，网络消息监听等逻辑\n         */\n        onClose(): void;\n        destroy(destroyChild?: boolean): void;\n        /**\n         * 在页面被销毁的时候调用，适合置空引用对象\n         */\n        onDestroy(): void;\n    }\n}\ndeclare module laya.ui {\n    import Graphics = laya.display.Graphics;\n    import Texture = laya.resource.Texture;\n    /**\n     * <code>AutoBitmap</code> 类是用于表示位图图像或绘制图形的显示对象。\n     * <p>封装了位置，宽高及九宫格的处理，供UI组件使用。</p>\n     */\n    class AutoBitmap extends Graphics {\n        autoCacheCmd: boolean;\n        protected _isChanged: boolean;\n        _offset: Array<any>;\n        /**@inheritDoc */\n        destroy(): void;\n        /**\n         * 当前实例的有效缩放网格数据。\n         * <p>如果设置为null,则在应用任何缩放转换时，将正常缩放整个显示对象。</p>\n         * <p>数据格式：[上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)]。\n         * <ul><li>例如：[4,4,4,4,1]</li></ul></p>\n         * <p> <code>sizeGrid</code> 的值如下所示：\n         * <ol>\n         * <li>上边距</li>\n         * <li>右边距</li>\n         * <li>下边距</li>\n         * <li>左边距</li>\n         * <li>是否重复填充(值为0：不重复填充，1：重复填充)</li>\n         * </ol></p>\n         * <p>当定义 <code>sizeGrid</code> 属性时，该显示对象被分割到以 <code>sizeGrid</code> 数据中的\"上边距,右边距,下边距,左边距\" 组成的矩形为基础的具有九个区域的网格中，该矩形定义网格的中心区域。网格的其它八个区域如下所示：\n         * <ul>\n         * <li>矩形上方的区域</li>\n         * <li>矩形外的右上角</li>\n         * <li>矩形左侧的区域</li>\n         * <li>矩形右侧的区域</li>\n         * <li>矩形外的左下角</li>\n         * <li>矩形下方的区域</li>\n         * <li>矩形外的右下角</li>\n         * <li>矩形外的左上角</li>\n         * </ul>\n         * 同时也支持3宫格，比如0,4,0,4,1为水平3宫格，4,0,4,0,1为垂直3宫格，3宫格性能比9宫格高。\n         * </p>\n         */\n        sizeGrid: Array<any>;\n        /**\n         * 表示显示对象的宽度，以像素为单位。\n         */\n        width: number;\n        /**\n         * 表示显示对象的高度，以像素为单位。\n         */\n        height: number;\n        /**\n         * 对象的纹理资源。\n         * @see laya.resource.Texture\n         */\n        source: Texture;\n        protected _setChanged(): void;\n        protected changeSource(): void;\n        clear(recoverCmds?: boolean): void;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * <code>Box</code> 类是一个控件容器类。\n     */\n    class Box extends Component implements IBox {\n        /**@inheritDoc */\n        dataSource: any;\n    }\n}\ndeclare module laya.ui {\n    import Text = laya.display.Text;\n    import Event = laya.events.Event;\n    import AutoBitmap = laya.ui.AutoBitmap;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>Button</code> 组件用来表示常用的多态按钮。 <code>Button</code> 组件可显示文本标签、图标或同时显示两者。\t *\n     * <p>可以是单态，两态和三态，默认三态(up,over,down)。</p>\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>Button</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.Button;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class Button_Example\n     *\t\t{\n     *\t\t\tpublic function Button_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load(\"resource/ui/button.png\", Handler.create(this,onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"资源加载完成！\");\n     *\t\t\t\tvar button:Button = new Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 类的实例对象 button ,并传入它的皮肤。\n     *\t\t\t\tbutton.x = 100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n     *\t\t\t\tbutton.y = 100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n     *\t\t\t\tbutton.clickHandler = new Handler(this, onClickButton,[button]);//设置 button 的点击事件处理器。\n     *\t\t\t\tLaya.stage.addChild(button);//将此 button 对象添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onClickButton(button:Button):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"按钮button被点击了！\");\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     * Laya.loader.load(\"resource/ui/button.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n     * function loadComplete()\n     * {\n     *     console.log(\"资源加载完成！\");\n     *     var button = new laya.ui.Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 类的实例对象 button ,传入它的皮肤skin和标签label。\n     *     button.x =100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n     *     button.y =100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n     *     button.clickHandler = laya.utils.Handler.create(this,onClickButton,[button],false);//设置 button 的点击事件处理函数。\n     *     Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n     * }\n     * function onClickButton(button)\n     * {\n     *     console.log(\"按钮被点击了。\",button);\n     * }\n     * @example\n     * import Button=laya.ui.Button;\n     * import Handler=laya.utils.Handler;\n     * class Button_Example{\n     *     constructor()\n     *     {\n     *         Laya.init(640, 800);\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load(\"resource/ui/button.png\", laya.utils.Handler.create(this,this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete()\n     *     {\n     *         var button:Button = new Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 类的实例对象 button ,并传入它的皮肤。\n     *         button.x = 100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n     *         button.y = 100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n     *         button.clickHandler = new Handler(this, this.onClickButton,[button]);//设置 button 的点击事件处理器。\n     *         Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n     *     }\n     *     private onClickButton(button:Button):void\n     *     {\n     *         console.log(\"按钮button被点击了！\")\n     *     }\n     * }\n     */\n    class Button extends Component implements ISelect {\n        protected static stateMap: any;\n        /**\n         * 指定按钮按下时是否是切换按钮的显示状态。\n         *\n         * @example 以下示例代码，创建了一个 <code>Button</code> 实例，并设置为切换按钮。\n         * @example\n         * package\n         *\t{\n         *\t\timport laya.ui.Button;\n         *\t\timport laya.utils.Handler;\n         *\t\tpublic class Button_toggle\n         *\t\t{\n         *\t\t\tpublic function Button_toggle()\n         *\t\t\t{\n         *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高、渲染模式。\n         *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n         *\t\t\t\tLaya.loader.load(\"resource/ui/button.png\", Handler.create(this,onLoadComplete));\n         *\t\t\t}\n         *\t\t\tprivate function onLoadComplete():void\n         *\t\t\t{\n         *\t\t\t\ttrace(\"资源加载完成！\");\n         *\t\t\t\tvar button:Button = new Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 实例对象 button ,传入它的皮肤skin和标签label。\n         *\t\t\t\tbutton.x = 100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n         *\t\t\t\tbutton.y = 100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n         *\t\t\t\tbutton.toggle = true;//设置 button 对象为切换按钮。\n         *\t\t\t\tbutton.clickHandler = new Handler(this, onClickButton,[button]);//设置 button 的点击事件处理器。\n         *\t\t\t\tLaya.stage.addChild(button);//将此 button 对象添加到显示列表。\n         *\t \t\t}\n         *\t\t\tprivate function onClickButton(button:Button):void\n         *\t\t\t{\n         *\t\t\t\ttrace(\"button.selected = \"+ button.selected);\n         *\t\t\t}\n         *\t\t}\n         *\t}\n         * @example\n         * Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n         * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n         * Laya.loader.load(\"resource/ui/button.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n         * function loadComplete()\n         * {\n         *     console.log(\"资源加载完成！\");\n         *     var button = new laya.ui.Button(\"resource/ui/button.png\",\"label\");//创建一个 Button 类的实例对象 button ,传入它的皮肤skin和标签label。\n         *     button.x =100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n         *     button.y =100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n         *     button.toggle = true;//设置 button 对象为切换按钮。\n         *     button.clickHandler = laya.utils.Handler.create(this,onClickButton,[button],false);//设置 button 的点击事件处理器。\n         *     Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n         * }\n         * function onClickButton(button)\n         * {\n         *     console.log(\"button.selected = \",button.selected);\n         * }\n         * @example\n         * Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n         * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n         * Laya.loader.load(\"button.png\", null,null, null, null, null);//加载资源\n         * function loadComplete() {\n         *     console.log(\"资源加载完成！\");\n         *     var button:laya.ui.Button = new laya.ui.Button(\"button.png\", \"label\");//创建一个 Button 类的实例对象 button ,传入它的皮肤skin和标签label。\n         *     button.x = 100;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n         *     button.y = 100;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n         *     button.toggle = true;//设置 button 对象为切换按钮。\n         *     button.clickHandler = laya.utils.Handler.create(this, onClickButton, [button], false);//设置 button 的点击事件处理器。\n         *     Laya.stage.addChild(button);//将此 button 对象添加到显示列表。\n         * }\n         * function onClickButton(button) {\n         *     console.log(\"button.selected = \", button.selected);\n         * }\n         */\n        toggle: boolean;\n        protected _bitmap: AutoBitmap;\n        protected _text: Text;\n        protected _labelColors: Array<any>;\n        protected _strokeColors: Array<any>;\n        protected _state: number;\n        protected _selected: boolean;\n        protected _skin: string;\n        protected _autoSize: boolean;\n        protected _stateNum: number;\n        protected _sources: Array<any>;\n        protected _clickHandler: Handler;\n        protected _stateChanged: boolean;\n        /**\n         * 创建一个新的 <code>Button</code> 类实例。\n         * @param skin 皮肤资源地址。\n         * @param label 按钮的文本内容。\n         */\n        constructor(skin?: string, label?: string);\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        protected createText(): void;\n        protected initialize(): void;\n        protected onMouse(e: Event): void;\n        /**\n         * <p>对象的皮肤资源地址。</p>\n         * 支持单态，两态和三态，用 <code>stateNum</code> 属性设置\n         * <p>对象的皮肤地址，以字符串表示。</p>\n         * @see #stateNum\n         */\n        skin: string;\n        /**\n         * <p>指定对象的状态值，以数字表示。</p>\n         * <p>默认值为3。此值决定皮肤资源图片的切割方式。</p>\n         * <p><b>取值：</b>\n         * <li>1：单态。图片不做切割，按钮的皮肤状态只有一种。</li>\n         * <li>2：两态。图片将以竖直方向被等比切割为2部分，从上向下，依次为\n         * 弹起状态皮肤、\n         * 按下和经过及选中状态皮肤。</li>\n         * <li>3：三态。图片将以竖直方向被等比切割为3部分，从上向下，依次为\n         * 弹起状态皮肤、\n         * 经过状态皮肤、\n         * 按下和选中状态皮肤</li>\n         * </p>\n         */\n        stateNum: number;\n        protected changeClips(): void;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        /**\n         * 按钮的文本内容。\n         */\n        label: string;\n        /**\n         * 表示按钮的选中状态。\n         * <p>如果值为true，表示该对象处于选中状态。否则该对象处于未选中状态。</p>\n         */\n        selected: boolean;\n        protected state: number;\n        protected changeState(): void;\n        /**\n         * 表示按钮各个状态下的文本颜色。\n         * <p><b>格式:</b> \"upColor,overColor,downColor,disableColor\"。</p>\n         */\n        labelColors: string;\n        /**\n         * 表示按钮各个状态下的描边颜色。\n         * <p><b>格式:</b> \"upColor,overColor,downColor,disableColor\"。</p>\n         */\n        strokeColors: string;\n        /**\n         * 表示按钮文本标签的边距。\n         * <p><b>格式：</b>\"上边距,右边距,下边距,左边距\"。</p>\n         */\n        labelPadding: string;\n        /**\n         * 表示按钮文本标签的字体大小。\n         * @see laya.display.Text.fontSize()\n         */\n        labelSize: number;\n        /**\n         * <p>描边宽度（以像素为单位）。</p>\n         * 默认值0，表示不描边。\n         * @see laya.display.Text.stroke()\n         */\n        labelStroke: number;\n        /**\n         * <p>描边颜色，以字符串表示。</p>\n         * 默认值为 \"#000000\"（黑色）;\n         * @see laya.display.Text.strokeColor()\n         */\n        labelStrokeColor: string;\n        /**\n         * 表示按钮文本标签是否为粗体字。\n         * @see laya.display.Text.bold()\n         */\n        labelBold: boolean;\n        /**\n         * 表示按钮文本标签的字体名称，以字符串形式表示。\n         * @see laya.display.Text.font()\n         */\n        labelFont: string;\n        /**标签对齐模式，默认为居中对齐。*/\n        labelAlign: string;\n        /**\n         * 对象的点击事件处理器函数（无默认参数）。\n         */\n        clickHandler: Handler;\n        /**\n         * 按钮文本标签 <code>Text</code> 控件。\n         */\n        readonly text: Text;\n        /**\n         * <p>当前实例的位图 <code>AutoImage</code> 实例的有效缩放网格数据。</p>\n         * <p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n         * <ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n         * @see laya.ui.AutoBitmap.sizeGrid\n         */\n        sizeGrid: string;\n        /**@inheritDoc */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        /**@inheritDoc */\n        dataSource: any;\n        /**图标x,y偏移，格式：100,100*/\n        iconOffset: string;\n        protected _setStateChanged(): void;\n    }\n}\ndeclare module laya.ui {\n    import Button = laya.ui.Button;\n    /**\n     * <code>CheckBox</code> 组件显示一个小方框，该方框内可以有选中标记。\n     * <code>CheckBox</code> 组件还可以显示可选的文本标签，默认该标签位于 CheckBox 右侧。\n     * <p><code>CheckBox</code> 使用 <code>dataSource</code>赋值时的的默认属性是：<code>selected</code>。</p>\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>CheckBox</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.CheckBox;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class CheckBox_Example\n     *\t\t{\n     *\t\t\tpublic function CheckBox_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     * \t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load(\"resource/ui/check.png\", Handler.create(this,onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"资源加载完成！\");\n     *\t\t\t\tvar checkBox:CheckBox = new CheckBox(\"resource/ui/check.png\", \"这个是一个CheckBox组件。\");//创建一个 CheckBox 类的实例对象 checkBox ,传入它的皮肤skin和标签label。\n     *\t\t\t\tcheckBox.x = 100;//设置 checkBox 对象的属性 x 的值，用于控制 checkBox 对象的显示位置。\n     *\t\t\t\tcheckBox.y = 100;//设置 checkBox 对象的属性 y 的值，用于控制 checkBox 对象的显示位置。\n     *\t\t\t\tcheckBox.clickHandler = new Handler(this, onClick, [checkBox]);//设置 checkBox 的点击事件处理器。\n     *\t\t\t\tLaya.stage.addChild(checkBox);//将此 checkBox 对象添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onClick(checkBox:CheckBox):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"输出选中状态: checkBox.selected = \" + checkBox.selected);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * Laya.loader.load(\"resource/ui/check.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n     * function loadComplete()\n     * {\n     *     console.log(\"资源加载完成！\");\n     *     var checkBox:laya.ui.CheckBox= new laya.ui.CheckBox(\"resource/ui/check.png\", \"这个是一个CheckBox组件。\");//创建一个 CheckBox 类的类的实例对象 checkBox ,传入它的皮肤skin和标签label。\n     *     checkBox.x =100;//设置 checkBox 对象的属性 x 的值，用于控制 checkBox 对象的显示位置。\n     *     checkBox.y =100;//设置 checkBox 对象的属性 y 的值，用于控制 checkBox 对象的显示位置。\n     *     checkBox.clickHandler = new laya.utils.Handler(this,this.onClick,[checkBox],false);//设置 checkBox 的点击事件处理器。\n     *     Laya.stage.addChild(checkBox);//将此 checkBox 对象添加到显示列表。\n     * }\n     * function onClick(checkBox)\n     * {\n     *     console.log(\"checkBox.selected = \",checkBox.selected);\n     * }\n     * @example\n     * import CheckBox= laya.ui.CheckBox;\n     * import Handler=laya.utils.Handler;\n     * class CheckBox_Example{\n     *     constructor()\n     *     {\n     *         Laya.init(640, 800);\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load(\"resource/ui/check.png\", Handler.create(this,this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete()\n     *     {\n     *         var checkBox:CheckBox = new CheckBox(\"resource/ui/check.png\", \"这个是一个CheckBox组件。\");//创建一个 CheckBox 类的实例对象 checkBox ,传入它的皮肤skin和标签label。\n     *         checkBox.x = 100;//设置 checkBox 对象的属性 x 的值，用于控制 checkBox 对象的显示位置。\n     *         checkBox.y = 100;//设置 checkBox 对象的属性 y 的值，用于控制 checkBox 对象的显示位置。\n     *         checkBox.clickHandler = new Handler(this, this.onClick,[checkBox]);//设置 checkBox 的点击事件处理器。\n     *         Laya.stage.addChild(checkBox);//将此 checkBox 对象添加到显示列表。\n     *     }\n     *     private onClick(checkBox:CheckBox):void\n     *     {\n     *         console.log(\"输出选中状态: checkBox.selected = \" + checkBox.selected);\n     *     }\n     * }\n     */\n    class CheckBox extends Button {\n        /**\n         * 创建一个新的 <code>CheckBox</code> 组件实例。\n         * @param skin 皮肤资源地址。\n         * @param label 文本标签的内容。\n         */\n        constructor(skin?: string, label?: string);\n        protected preinitialize(): void;\n        protected initialize(): void;\n        /**@inheritDoc */\n        dataSource: any;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    import Texture = laya.resource.Texture;\n    import Handler = laya.utils.Handler;\n    /**\n     * <p> <code>Clip</code> 类是位图切片动画。</p>\n     * <p> <code>Clip</code> 可将一张图片，按横向分割数量 <code>clipX</code> 、竖向分割数量 <code>clipY</code> ，\n     * 或横向分割每个切片的宽度 <code>clipWidth</code> 、竖向分割每个切片的高度 <code>clipHeight</code> ，\n     * 从左向右，从上到下，分割组合为一个切片动画。</p>\n     * Image和Clip组件是唯一支持异步加载的两个组件，比如clip.skin = \"abc/xxx.png\"，其他UI组件均不支持异步加载。\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>Clip</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.Clip;\n     *\t\tpublic class Clip_Example\n     *\t\t{\n     *\t\t\tprivate var clip:Clip;\n     *\t\t\tpublic function Clip_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tonInit();\n     *\t\t\t}\n     *\t\t\tprivate function onInit():void\n     *\t\t\t{\n     *\t\t\t\tclip = new Clip(\"resource/ui/clip_num.png\", 10, 1);//创建一个 Clip 类的实例对象 clip ,传入它的皮肤skin和横向分割数量、竖向分割数量。\n     *\t\t\t\tclip.autoPlay = true;//设置 clip 动画自动播放。\n     *\t\t\t\tclip.interval = 100;//设置 clip 动画的播放时间间隔。\n     *\t\t\t\tclip.x = 100;//设置 clip 对象的属性 x 的值，用于控制 clip 对象的显示位置。\n     *\t\t\t\tclip.y = 100;//设置 clip 对象的属性 y 的值，用于控制 clip 对象的显示位置。\n     *\t\t\t\tclip.on(Event.CLICK, this, onClick);//给 clip 添加点击事件函数侦听。\n     *\t\t\t\tLaya.stage.addChild(clip);//将此 clip 对象添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onClick():void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"clip 的点击事件侦听处理函数。clip.total=\"+ clip.total);\n     *\t\t\t\tif (clip.isPlaying == true)\n     *\t\t\t\t{\n     *\t\t\t\t\tclip.stop();//停止动画。\n     *\t\t\t\t}else {\n     *\t\t\t\t\tclip.play();//播放动画。\n     *\t\t\t\t}\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * var clip;\n     * Laya.loader.load(\"resource/ui/clip_num.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n     * function loadComplete() {\n     *     console.log(\"资源加载完成！\");\n     *     clip = new laya.ui.Clip(\"resource/ui/clip_num.png\",10,1);//创建一个 Clip 类的实例对象 clip ,传入它的皮肤skin和横向分割数量、竖向分割数量。\n     *     clip.autoPlay = true;//设置 clip 动画自动播放。\n     *     clip.interval = 100;//设置 clip 动画的播放时间间隔。\n     *     clip.x =100;//设置 clip 对象的属性 x 的值，用于控制 clip 对象的显示位置。\n     *     clip.y =100;//设置 clip 对象的属性 y 的值，用于控制 clip 对象的显示位置。\n     *     clip.on(Event.CLICK,this,onClick);//给 clip 添加点击事件函数侦听。\n     *     Laya.stage.addChild(clip);//将此 clip 对象添加到显示列表。\n     * }\n     * function onClick()\n     * {\n     *     console.log(\"clip 的点击事件侦听处理函数。\");\n     *     if(clip.isPlaying == true)\n     *     {\n     *         clip.stop();\n     *     }else {\n     *         clip.play();\n     *     }\n     * }\n     * @example\n     * import Clip = laya.ui.Clip;\n     * import Handler = laya.utils.Handler;\n     * class Clip_Example {\n     *     private clip: Clip;\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         this.onInit();\n     *     }\n     *     private onInit(): void {\n     *         this.clip = new Clip(\"resource/ui/clip_num.png\", 10, 1);//创建一个 Clip 类的实例对象 clip ,传入它的皮肤skin和横向分割数量、竖向分割数量。\n     *         this.clip.autoPlay = true;//设置 clip 动画自动播放。\n     *         this.clip.interval = 100;//设置 clip 动画的播放时间间隔。\n     *         this.clip.x = 100;//设置 clip 对象的属性 x 的值，用于控制 clip 对象的显示位置。\n     *         this.clip.y = 100;//设置 clip 对象的属性 y 的值，用于控制 clip 对象的显示位置。\n     *         this.clip.on(laya.events.Event.CLICK, this, this.onClick);//给 clip 添加点击事件函数侦听。\n     *         Laya.stage.addChild(this.clip);//将此 clip 对象添加到显示列表。\n     *     }\n     *     private onClick(): void {\n     *         console.log(\"clip 的点击事件侦听处理函数。clip.total=\" + this.clip.total);\n     *         if (this.clip.isPlaying == true) {\n     *             this.clip.stop();//停止动画。\n     *         } else {\n     *             this.clip.play();//播放动画。\n     *         }\n     *     }\n     * }\n     *\n     */\n    class Clip extends Component {\n        protected _sources: Array<any>;\n        protected _bitmap: AutoBitmap;\n        protected _skin: string;\n        protected _clipX: number;\n        protected _clipY: number;\n        protected _clipWidth: number;\n        protected _clipHeight: number;\n        protected _autoPlay: boolean;\n        protected _interval: number;\n        protected _complete: Handler;\n        protected _isPlaying: boolean;\n        protected _index: number;\n        protected _clipChanged: boolean;\n        protected _group: string;\n        protected _toIndex: number;\n        /**\n         * 创建一个新的 <code>Clip</code> 示例。\n         * @param url 资源类库名或者地址\n         * @param clipX x方向分割个数\n         * @param clipY y方向分割个数\n         */\n        constructor(url?: string, clipX?: number, clipY?: number);\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * 销毁对象并释放加载的皮肤资源。\n         */\n        dispose(): void;\n        protected createChildren(): void;\n        protected _onDisplay(e?: Event): void;\n        /**\n         * @copy laya.ui.Image#skin\n         */\n        skin: string;\n        /**X轴（横向）切片数量。*/\n        clipX: number;\n        /**Y轴(竖向)切片数量。*/\n        clipY: number;\n        /**\n         * 横向分割时每个切片的宽度，与 <code>clipX</code> 同时设置时优先级高于 <code>clipX</code> 。\n         */\n        clipWidth: number;\n        /**\n         * 竖向分割时每个切片的高度，与 <code>clipY</code> 同时设置时优先级高于 <code>clipY</code> 。\n         */\n        clipHeight: number;\n        protected changeClip(): void;\n        protected loadComplete(url: string, img: Texture): void;\n        /**\n         * 源数据。\n         */\n        sources: Array<any>;\n        /**\n         * 资源分组。\n         */\n        group: string;\n        /**@inheritDoc */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        /**\n         * <p>当前实例的位图 <code>AutoImage</code> 实例的有效缩放网格数据。</p>\n         * <p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n         * <ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n         * @see laya.ui.AutoBitmap.sizeGrid\n         */\n        sizeGrid: string;\n        /**\n         * 当前帧索引。\n         */\n        index: number;\n        /**\n         * 切片动画的总帧数。\n         */\n        readonly total: number;\n        /**\n         * 表示是否自动播放动画，若自动播放值为true,否则值为false;\n         * <p>可控制切片动画的播放、停止。</p>\n         */\n        autoPlay: boolean;\n        /**\n         * 表示动画播放间隔时间(以毫秒为单位)。\n         */\n        interval: number;\n        /**\n         * 表示动画的当前播放状态。\n         * 如果动画正在播放中，则为true，否则为flash。\n         */\n        isPlaying: boolean;\n        /**\n         * 播放动画。\n         * @param\tfrom\t开始索引\n         * @param\tto\t\t结束索引，-1为不限制\n         */\n        play(from?: number, to?: number): void;\n        protected _loop(): void;\n        /**\n         * 停止动画。\n         */\n        stop(): void;\n        /**@inheritDoc */\n        dataSource: any;\n        /**\n         * <code>AutoBitmap</code> 位图实例。\n         */\n        readonly bitmap: AutoBitmap;\n        protected _setClipChanged(): void;\n    }\n}\ndeclare module laya.ui {\n    import Input = laya.display.Input;\n    import Sprite = laya.display.Sprite;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>ColorPicker</code> 组件将显示包含多个颜色样本的列表，用户可以从中选择颜色。\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>ColorPicker</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.ColorPicker;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class ColorPicker_Example\n     *\t\t{\n     *\t\t\tpublic function ColorPicker_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load(\"resource/ui/color.png\", Handler.create(this,onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"资源加载完成！\");\n     *\t\t\t\tvar colorPicket:ColorPicker = new ColorPicker();//创建一个 ColorPicker 类的实例对象 colorPicket 。\n     *\t\t\t\tcolorPicket.skin = \"resource/ui/color.png\";//设置 colorPicket 的皮肤。\n     *\t\t\t\tcolorPicket.x = 100;//设置 colorPicket 对象的属性 x 的值，用于控制 colorPicket 对象的显示位置。\n     *\t\t\t\tcolorPicket.y = 100;//设置 colorPicket 对象的属性 y 的值，用于控制 colorPicket 对象的显示位置。\n     *\t\t\t\tcolorPicket.changeHandler = new Handler(this, onChangeColor,[colorPicket]);//设置 colorPicket 的颜色改变回调函数。\n     *\t\t\t\tLaya.stage.addChild(colorPicket);//将此 colorPicket 对象添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onChangeColor(colorPicket:ColorPicker):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"当前选择的颜色： \" + colorPicket.selectedColor);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * Laya.loader.load(\"resource/ui/color.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n     * function loadComplete()\n     * {\n     *     console.log(\"资源加载完成！\");\n     *     var colorPicket = new laya.ui.ColorPicker();//创建一个 ColorPicker 类的实例对象 colorPicket 。\n     *     colorPicket.skin = \"resource/ui/color.png\";//设置 colorPicket 的皮肤。\n     *     colorPicket.x = 100;//设置 colorPicket 对象的属性 x 的值，用于控制 colorPicket 对象的显示位置。\n     *     colorPicket.y = 100;//设置 colorPicket 对象的属性 y 的值，用于控制 colorPicket 对象的显示位置。\n     *     colorPicket.changeHandler = laya.utils.Handler.create(this, onChangeColor,[colorPicket],false);//设置 colorPicket 的颜色改变回调函数。\n     *     Laya.stage.addChild(colorPicket);//将此 colorPicket 对象添加到显示列表。\n     * }\n     * function onChangeColor(colorPicket)\n     * {\n     *     console.log(\"当前选择的颜色： \" + colorPicket.selectedColor);\n     * }\n     * @example\n     * import ColorPicker = laya.ui.ColorPicker;\n     * import Handler = laya.utils.Handler;\n     * class ColorPicker_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load(\"resource/ui/color.png\", Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         console.log(\"资源加载完成！\");\n     *         var colorPicket: ColorPicker = new ColorPicker();//创建一个 ColorPicker 类的实例对象 colorPicket 。\n     *         colorPicket.skin = \"resource/ui/color.png\";//设置 colorPicket 的皮肤。\n     *         colorPicket.x = 100;//设置 colorPicket 对象的属性 x 的值，用于控制 colorPicket 对象的显示位置。\n     *         colorPicket.y = 100;//设置 colorPicket 对象的属性 y 的值，用于控制 colorPicket 对象的显示位置。\n     *         colorPicket.changeHandler = new Handler(this, this.onChangeColor, [colorPicket]);//设置 colorPicket 的颜色改变回调函数。\n     *         Laya.stage.addChild(colorPicket);//将此 colorPicket 对象添加到显示列表。\n     *     }\n     *     private onChangeColor(colorPicket: ColorPicker): void {\n     *         console.log(\"当前选择的颜色： \" + colorPicket.selectedColor);\n     *     }\n     * }\n     */\n    class ColorPicker extends Component {\n        /**\n         * 当颜色发生改变时执行的函数处理器。\n         * 默认返回参数color：颜色值字符串。\n         */\n        changeHandler: Handler;\n        protected _gridSize: number;\n        protected _bgColor: string;\n        protected _borderColor: string;\n        protected _inputColor: string;\n        protected _inputBgColor: string;\n        protected _colorPanel: Box;\n        protected _colorTiles: Sprite;\n        protected _colorBlock: Sprite;\n        protected _colorInput: Input;\n        protected _colorButton: Button;\n        protected _colors: Array<any>;\n        protected _selectedColor: string;\n        protected _panelChanged: boolean;\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        protected initialize(): void;\n        protected changePanel(): void;\n        /**\n         * 打开颜色样本列表面板。\n         */\n        open(): void;\n        /**\n         * 关闭颜色样本列表面板。\n         */\n        close(): void;\n        protected getColorByMouse(): string;\n        /**\n         * 表示选择的颜色值。\n         */\n        selectedColor: string;\n        /**\n         * @copy laya.ui.Button#skin\n         */\n        skin: string;\n        /**\n         * 表示颜色样本列表面板的背景颜色值。\n         */\n        bgColor: string;\n        /**\n         * 表示颜色样本列表面板的边框颜色值。\n         */\n        borderColor: string;\n        /**\n         * 表示颜色样本列表面板选择或输入的颜色值。\n         */\n        inputColor: string;\n        /**\n         * 表示颜色输入框的背景颜色值。\n         */\n        inputBgColor: string;\n        protected _setPanelChanged(): void;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>ComboBox</code> 组件包含一个下拉列表，用户可以从该列表中选择单个值。\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>ComboBox</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.ComboBox;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class ComboBox_Example\n     *\t\t{\n     *\t\t\tpublic function ComboBox_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load(\"resource/ui/button.png\", Handler.create(this,onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"资源加载完成！\");\n     *\t\t\t\tvar comboBox:ComboBox = new ComboBox(\"resource/ui/button.png\", \"item0,item1,item2,item3,item4,item5\");//创建一个 ComboBox 类的实例对象 comboBox ,传入它的皮肤和标签集。\n     *\t\t\t\tcomboBox.x = 100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n     *\t\t\t\tcomboBox.y = 100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n     *\t\t\t\tcomboBox.selectHandler = new Handler(this, onSelect);//设置 comboBox 选择项改变时执行的处理器。\n     *\t\t\t\tLaya.stage.addChild(comboBox);//将此 comboBox 对象添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onSelect(index:int):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"当前选中的项对象索引： \",index);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高。\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     * Laya.loader.load(\"resource/ui/button.png\",laya.utils.Handler.create(this,loadComplete));//加载资源\n     * function loadComplete() {\n     *     console.log(\"资源加载完成！\");\n     *     var comboBox = new laya.ui.ComboBox(\"resource/ui/button.png\", \"item0,item1,item2,item3,item4,item5\");//创建一个 ComboBox 类的实例对象 comboBox ,传入它的皮肤和标签集。\n     *     comboBox.x = 100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n     *     comboBox.y = 100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n     *     comboBox.selectHandler = new laya.utils.Handler(this, onSelect);//设置 comboBox 选择项改变时执行的处理器。\n     *     Laya.stage.addChild(comboBox);//将此 comboBox 对象添加到显示列表。\n     * }\n     * function onSelect(index)\n     * {\n     *     console.log(\"当前选中的项对象索引： \",index);\n     * }\n     * @example\n     * import ComboBox = laya.ui.ComboBox;\n     * import Handler = laya.utils.Handler;\n     * class ComboBox_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load(\"resource/ui/button.png\", Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         console.log(\"资源加载完成！\");\n     *         var comboBox: ComboBox = new ComboBox(\"resource/ui/button.png\", \"item0,item1,item2,item3,item4,item5\");//创建一个 ComboBox 类的实例对象 comboBox ,传入它的皮肤和标签集。\n     *         comboBox.x = 100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n     *         comboBox.y = 100;//设置 comboBox 对象的属性 x 的值，用于控制 comboBox 对象的显示位置。\n     *         comboBox.selectHandler = new Handler(this, this.onSelect);//设置 comboBox 选择项改变时执行的处理器。\n     *         Laya.stage.addChild(comboBox);//将此 comboBox 对象添加到显示列表。\n     *     }\n     *     private onSelect(index: number): void {\n     *         console.log(\"当前选中的项对象索引： \", index);\n     *     }\n     * }\n     *\n     */\n    class ComboBox extends Component {\n        protected _visibleNum: number;\n        protected _button: Button;\n        protected _list: List;\n        protected _isOpen: boolean;\n        protected _itemColors: Array<any>;\n        protected _itemSize: number;\n        protected _labels: Array<any>;\n        protected _selectedIndex: number;\n        protected _selectHandler: Handler;\n        protected _itemHeight: number;\n        protected _listHeight: number;\n        protected _listChanged: boolean;\n        protected _itemChanged: boolean;\n        protected _scrollBarSkin: string;\n        protected _isCustomList: boolean;\n        /**\n         * 渲染项，用来显示下拉列表展示对象\n         */\n        itemRender: any;\n        /**\n         * 创建一个新的 <code>ComboBox</code> 组件实例。\n         * @param skin 皮肤资源地址。\n         * @param labels 下拉列表的标签集字符串。以逗号做分割，如\"item0,item1,item2,item3,item4,item5\"。\n         */\n        constructor(skin?: string, labels?: string);\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        /**\n         * @copy laya.ui.Button#skin\n         */\n        skin: string;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        protected changeList(): void;\n        protected onlistItemMouse(e: Event, index: number): void;\n        protected changeOpen(): void;\n        /**@inheritDoc */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        /**\n         * 标签集合字符串。\n         */\n        labels: string;\n        protected changeItem(): void;\n        /**\n         * 表示选择的下拉列表项的索引。\n         */\n        selectedIndex: number;\n        /**\n         * 改变下拉列表的选择项时执行的处理器(默认返回参数index:int)。\n         */\n        selectHandler: Handler;\n        /**\n         * 表示选择的下拉列表项的的标签。\n         */\n        selectedLabel: string;\n        /**\n         * 获取或设置没有滚动条的下拉列表中可显示的最大行数。\n         */\n        visibleNum: number;\n        /**\n         * 下拉列表项颜色。\n         * <p><b>格式：</b>\"悬停或被选中时背景颜色,悬停或被选中时标签颜色,标签颜色,边框颜色,背景颜色\"</p>\n         */\n        itemColors: string;\n        /**\n         * 下拉列表项标签的字体大小。\n         */\n        itemSize: number;\n        /**\n         * 表示下拉列表的打开状态。\n         */\n        isOpen: boolean;\n        protected removeList(e: Event): void;\n        /**\n         * 滚动条皮肤。\n         */\n        scrollBarSkin: string;\n        /**\n         * <p>当前实例的位图 <code>AutoImage</code> 实例的有效缩放网格数据。</p>\n         * <p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n         * <ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n         * @see laya.ui.AutoBitmap.sizeGrid\n         */\n        sizeGrid: string;\n        /**\n         * 获取对 <code>ComboBox</code> 组件所包含的 <code>VScrollBar</code> 滚动条组件的引用。\n         */\n        readonly scrollBar: VScrollBar;\n        /**\n         * 获取对 <code>ComboBox</code> 组件所包含的 <code>Button</code> 组件的引用。\n         */\n        readonly button: Button;\n        /**\n         * 获取对 <code>ComboBox</code> 组件所包含的 <code>List</code> 列表组件的引用。\n         */\n        list: List;\n        /**@inheritDoc */\n        dataSource: any;\n        /**\n         * 获取或设置对 <code>ComboBox</code> 组件所包含的 <code>Button</code> 组件的文本标签颜色。\n         * <p><b>格式：</b>upColor,overColor,downColor,disableColor</p>\n         */\n        labelColors: string;\n        /**\n         * 获取或设置对 <code>ComboBox</code> 组件所包含的 <code>Button</code> 组件的文本边距。\n         * <p><b>格式：</b>上边距,右边距,下边距,左边距</p>\n         */\n        labelPadding: string;\n        /**\n         * 获取或设置对 <code>ComboBox</code> 组件所包含的 <code>Button</code> 组件的标签字体大小。\n         */\n        labelSize: number;\n        /**\n         * 表示按钮文本标签是否为粗体字。\n         * @see laya.display.Text#bold\n         */\n        labelBold: boolean;\n        /**\n         * 表示按钮文本标签的字体名称，以字符串形式表示。\n         * @see laya.display.Text#font\n         */\n        labelFont: string;\n        /**\n         * 表示按钮的状态值。\n         * @see laya.ui.Button#stateNum\n         */\n        stateNum: number;\n    }\n}\ndeclare module laya.ui {\n    import Sprite = laya.display.Sprite;\n    /**\n     * <code>Component</code> 是ui控件类的基类。\n     * <p>生命周期：preinitialize > createChildren > initialize > 组件构造函数</p>\n     */\n    class Component extends Sprite implements IComponent {\n        protected _layout: LayoutStyle;\n        protected _dataSource: any;\n        protected _toolTip: any;\n        protected _tag: any;\n        protected _disabled: boolean;\n        protected _gray: boolean;\n        /**\n         * 是否启用相对布局\n         */\n        layoutEnabled: boolean;\n        /**\n         * <p>创建一个新的 <code>Component</code> 实例。</p>\n         */\n        constructor();\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected preinitialize(): void;\n        protected createChildren(): void;\n        protected initialize(): void;\n        /**\n         * <p>延迟运行指定的函数。</p>\n         * <p>在控件被显示在屏幕之前调用，一般用于延迟计算数据。</p>\n         * @param method 要执行的函数的名称。例如，functionName。\n         * @param args 传递给 <code>method</code> 函数的可选参数列表。\n         *\n         * @see #runCallLater()\n         */\n        callLater(method: Function, args?: Array<any>): void;\n        /**\n         * <p>如果有需要延迟调用的函数（通过 <code>callLater</code> 函数设置），则立即执行延迟调用函数。</p>\n         * @param method 要执行的函数名称。例如，functionName。\n         * @see #callLater()\n         */\n        runCallLater(method: Function): void;\n        /**\n         * <p>表示显示对象的宽度，以像素为单位。</p>\n         * <p><b>注：</b>当值为0时，宽度为自适应大小。</p>\n         */\n        width: number;\n        /**\n         * <p>对象的显示宽度（以像素为单位）。</p>\n         */\n        readonly displayWidth: number;\n        protected readonly measureWidth: number;\n        protected commitMeasure(): void;\n        /**\n         * <p>表示显示对象的高度，以像素为单位。</p>\n         * <p><b>注：</b>当值为0时，高度为自适应大小。</p>\n         */\n        height: number;\n        /**\n         * <p>对象的显示高度（以像素为单位）。</p>\n         */\n        readonly displayHeight: number;\n        protected readonly measureHeight: number;\n        /**@inheritDoc */\n        scaleX: number;\n        /**@inheritDoc */\n        scaleY: number;\n        protected changeSize(): void;\n        /**\n         * <p>数据赋值，通过对UI赋值来控制UI显示逻辑。</p>\n         * <p>简单赋值会更改组件的默认属性，使用大括号可以指定组件的任意属性进行赋值。</p>\n         * @example\n           //默认属性赋值\n           dataSource =\n           //任意属性赋值\n           dataSource =\n         */\n        dataSource: any;\n        /**\n         * <p>从组件顶边到其内容区域顶边之间的垂直距离（以像素为单位）。</p>\n         */\n        top: number;\n        /**\n         * <p>从组件底边到其内容区域底边之间的垂直距离（以像素为单位）。</p>\n         */\n        bottom: number;\n        /**\n         * <p>从组件左边到其内容区域左边之间的水平距离（以像素为单位）。</p>\n         */\n        left: number;\n        /**\n         * <p>从组件右边到其内容区域右边之间的水平距离（以像素为单位）。</p>\n         */\n        right: number;\n        /**\n         * <p>在父容器中，此对象的水平方向中轴线与父容器的水平方向中心线的距离（以像素为单位）。</p>\n         */\n        centerX: number;\n        /**\n         * <p>在父容器中，此对象的垂直方向中轴线与父容器的垂直方向中心线的距离（以像素为单位）。</p>\n         */\n        centerY: number;\n        /**X轴锚点，值为0-1*/\n        anchorX: number;\n        /**Y轴锚点，值为0-1*/\n        anchorY: number;\n        /**\n         * <p>对象的标签。</p>\n         * @internal 冗余字段，可以用来储存数据。\n         */\n        tag: any;\n        protected onCompResize(): void;\n        protected resetLayoutX(): void;\n        protected resetLayoutY(): void;\n        /**\n         * <p>鼠标悬停提示。</p>\n         * <p>可以赋值为文本 <code>String</code> 或函数 <code>Handler</code> ，用来实现自定义样式的鼠标提示和参数携带等。</p>\n         * @example\n         * private var _testTips:TestTipsUI = new TestTipsUI();\n         * private function testTips():void {\n          //简单鼠标提示\n         * btn2.toolTip = \"这里是鼠标提示&lt;b&gt;粗体&lt;/b&gt;&lt;br&gt;换行\";\n          //自定义的鼠标提示\n         * btn1.toolTip = showTips1;\n          //带参数的自定义鼠标提示\n         * clip.toolTip = new Handler(this,showTips2, [\"clip\"]);\n         * }\n         * private function showTips1():void {\n         * _testTips.label.text = \"这里是按钮[\" + btn1.label + \"]\";\n         * tip.addChild(_testTips);\n         * }\n         * private function showTips2(name:String):void {\n         * _testTips.label.text = \"这里是\" + name;\n         * tip.addChild(_testTips);\n         * }\n         */\n        toolTip: any;\n        /**\n         * XML 数据。\n         */\n        comXml: any;\n        /** 是否变灰。*/\n        gray: boolean;\n        /** 是否禁用页面，设置为true后，会变灰并且禁用鼠标。*/\n        disabled: boolean;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    import Rectangle = laya.maths.Rectangle;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>Dialog</code> 组件是一个弹出对话框，实现对话框弹出，拖动，模式窗口功能。\n     * 可以通过UIConfig设置弹出框背景透明度，模式窗口点击边缘是否关闭等\n     * 通过设置zOrder属性，可以更改弹出的层次\n     * 通过设置popupEffect和closeEffect可以设置弹出效果和关闭效果，如果不想有任何弹出关闭效果，可以设置前述属性为空\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>Dialog</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.Dialog;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class Dialog_Example\n     *\t\t{\n     *\t\t\tprivate var dialog:Dialog_Instance;\n     *\t\t\tpublic function Dialog_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load(\"resource/ui/btn_close.png\", Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tdialog = new Dialog_Instance();//创建一个 Dialog_Instance 类的实例对象 dialog。\n     *\t\t\t\tdialog.dragArea = \"0,0,150,50\";//设置 dialog 的拖拽区域。\n     *\t\t\t\tdialog.show();//显示 dialog。\n     *\t\t\t\tdialog.closeHandler = new Handler(this, onClose);//设置 dialog 的关闭函数处理器。\n     *\t\t\t}\n     *\t\t\tprivate function onClose(name:String):void\n     *\t\t\t{\n     *\t\t\t\tif (name == Dialog.CLOSE)\n     *\t\t\t\t{\n     *\t\t\t\t\ttrace(\"通过点击 name 为\" + name +\"的组件，关闭了dialog。\");\n     *\t\t\t\t}\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     *\timport laya.ui.Button;\n     *\timport laya.ui.Dialog;\n     *\timport laya.ui.Image;\n     *\tclass Dialog_Instance extends Dialog\n     *\t{\n     *\t\tfunction Dialog_Instance():void\n     *\t\t{\n     *\t\t\tvar bg:Image = new Image(\"resource/ui/bg.png\");\n     *\t\t\tbg.sizeGrid = \"40,10,5,10\";\n     *\t\t\tbg.width = 150;\n     *\t\t\tbg.height = 250;\n     *\t\t\taddChild(bg);\n     *\t\t\tvar image:Image = new Image(\"resource/ui/image.png\");\n     *\t\t\taddChild(image);\n     *\t\t\tvar button:Button = new Button(\"resource/ui/btn_close.png\");\n     *\t\t\tbutton.name = Dialog.CLOSE;//设置button的name属性值。\n     *\t\t\tbutton.x = 0;\n     *\t\t\tbutton.y = 0;\n     *\t\t\taddChild(button);\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高、渲染模式\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * var dialog;\n     * Laya.loader.load(\"resource/ui/btn_close.png\", laya.utils.Handler.create(this, loadComplete));//加载资源\n     * (function (_super) {//新建一个类Dialog_Instance继承自laya.ui.Dialog。\n     *     function Dialog_Instance() {\n     *         Dialog_Instance.__super.call(this);//初始化父类\n     *         var bg = new laya.ui.Image(\"resource/ui/bg.png\");//新建一个 Image 类的实例 bg 。\n     *         bg.sizeGrid = \"10,40,10,5\";//设置 bg 的网格信息。\n     *         bg.width = 150;//设置 bg 的宽度。\n     *         bg.height = 250;//设置 bg 的高度。\n     *         this.addChild(bg);//将 bg 添加到显示列表。\n     *         var image = new laya.ui.Image(\"resource/ui/image.png\");//新建一个 Image 类的实例 image 。\n     *         this.addChild(image);//将 image 添加到显示列表。\n     *         var button = new laya.ui.Button(\"resource/ui/btn_close.png\");//新建一个 Button 类的实例 bg 。\n     *         button.name = laya.ui.Dialog.CLOSE;//设置 button 的 name 属性值。\n     *         button.x = 0;//设置 button 对象的属性 x 的值，用于控制 button 对象的显示位置。\n     *         button.y = 0;//设置 button 对象的属性 y 的值，用于控制 button 对象的显示位置。\n     *         this.addChild(button);//将 button 添加到显示列表。\n     *     };\n     *     Laya.class(Dialog_Instance,\"mypackage.dialogExample.Dialog_Instance\",_super);//注册类Dialog_Instance。\n     * })(laya.ui.Dialog);\n     * function loadComplete() {\n     *     console.log(\"资源加载完成！\");\n     *     dialog = new mypackage.dialogExample.Dialog_Instance();//创建一个 Dialog_Instance 类的实例对象 dialog。\n     *     dialog.dragArea = \"0,0,150,50\";//设置 dialog 的拖拽区域。\n     *     dialog.show();//显示 dialog。\n     *     dialog.closeHandler = new laya.utils.Handler(this, onClose);//设置 dialog 的关闭函数处理器。\n     * }\n     * function onClose(name) {\n     *     if (name == laya.ui.Dialog.CLOSE) {\n     *         console.log(\"通过点击 name 为\" + name + \"的组件，关闭了dialog。\");\n     *     }\n     * }\n     * @example\n     * import Dialog = laya.ui.Dialog;\n     * import Handler = laya.utils.Handler;\n     * class Dialog_Example {\n     *     private dialog: Dialog_Instance;\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load(\"resource/ui/btn_close.png\", Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         this.dialog = new Dialog_Instance();//创建一个 Dialog_Instance 类的实例对象 dialog。\n     *         this.dialog.dragArea = \"0,0,150,50\";//设置 dialog 的拖拽区域。\n     *         this.dialog.show();//显示 dialog。\n     *         this.dialog.closeHandler = new Handler(this, this.onClose);//设置 dialog 的关闭函数处理器。\n     *     }\n     *     private onClose(name: string): void {\n     *         if (name == Dialog.CLOSE) {\n     *             console.log(\"通过点击 name 为\" + name + \"的组件，关闭了dialog。\");\n     *         }\n     *     }\n     * }\n     * import Button = laya.ui.Button;\n     * class Dialog_Instance extends Dialog {\n     *     Dialog_Instance(): void {\n     *         var bg: laya.ui.Image = new laya.ui.Image(\"resource/ui/bg.png\");\n     *         bg.sizeGrid = \"40,10,5,10\";\n     *         bg.width = 150;\n     *         bg.height = 250;\n     *         this.addChild(bg);\n     *         var image: laya.ui.Image = new laya.ui.Image(\"resource/ui/image.png\");\n     *         this.addChild(image);\n     *         var button: Button = new Button(\"resource/ui/btn_close.png\");\n     *         button.name = Dialog.CLOSE;//设置button的name属性值。\n     *         button.x = 0;\n     *         button.y = 0;\n     *         this.addChild(button);\n     *     }\n     * }\n     */\n    class Dialog extends View {\n        /**对话框内的某个按钮命名为close，点击此按钮则会关闭*/\n        static CLOSE: string;\n        /**对话框内的某个按钮命名为cancel，点击此按钮则会关闭*/\n        static CANCEL: string;\n        /**对话框内的某个按钮命名为sure，点击此按钮则会关闭*/\n        static SURE: string;\n        /**对话框内的某个按钮命名为no，点击此按钮则会关闭*/\n        static NO: string;\n        /**对话框内的某个按钮命名为ok，点击此按钮则会关闭*/\n        static OK: string;\n        /**对话框内的某个按钮命名为yes，点击此按钮则会关闭*/\n        static YES: string;\n        /**对话框管理容器，所有的对话框都在该容器内，并且受管理器管，可以自定义自己的管理器，来更改窗口管理的流程。\n         * 任意对话框打开和关闭，都会触发管理类的open和close事件*/\n        static manager: DialogManager;\n        /**\n         * 一个布尔值，指定对话框是否居中弹。\n         * <p>如果值为true，则居中弹出，否则，则根据对象坐标显示，默认为true。</p>\n         */\n        popupCenter: boolean;\n        /**\n         * 对话框被关闭时会触发的回调函数处理器。\n         * <p>回调函数参数为用户点击的按钮名字name:String。</p>\n         */\n        closeHandler: Handler;\n        /**\n         * 弹出对话框效果，可以设置一个效果代替默认的弹出效果，如果不想有任何效果，可以赋值为null\n         * 全局默认弹出效果可以通过manager.popupEffect修改\n         */\n        popupEffect: Handler;\n        /**\n         * 关闭对话框效果，可以设置一个效果代替默认的关闭效果，如果不想有任何效果，可以赋值为null\n         * 全局默认关闭效果可以通过manager.closeEffect修改\n         */\n        closeEffect: Handler;\n        /**组名称*/\n        group: string;\n        /**是否是模式窗口*/\n        isModal: boolean;\n        protected _dragArea: Rectangle;\n        protected initialize(): void;\n        protected _dealDragArea(): void;\n        protected _onClick(e: Event): void;\n        /**\n         * 显示对话框（以非模式窗口方式显示）。\n         * @param closeOther 是否关闭其它的对话框。若值为true则关闭其它对话框。\n         * @param showEffect 是否显示弹出效果\n         */\n        show(closeOther?: boolean, showEffect?: boolean): void;\n        /**\n         * 显示对话框（以模式窗口方式显示）。\n         * @param closeOther 是否关闭其它的对话框。若值为true则关闭其它对话框。\n         * @param showEffect 是否显示弹出效果\n         */\n        popup(closeOther?: boolean, showEffect?: boolean): void;\n        protected _open(modal: boolean, closeOther: boolean, showEffect: boolean): void;\n        /**打开完成后，调用此方法（如果有弹出动画，则在动画完成后执行）*/\n        onOpened(): void;\n        /**\n         * 关闭对话框。\n         * @param type 如果是点击默认关闭按钮触发，则传入关闭按钮的名字(name)，否则为null。\n         * @param showEffect 是否显示关闭效果\n         */\n        close(type?: string, showEffect?: boolean): void;\n        /**关闭完成后，调用此方法（如果有关闭动画，则在动画完成后执行）\n         * @param type 如果是点击默认关闭按钮触发，则传入关闭按钮的名字(name)，否则为null。\n         */\n        onClosed(type?: string): void;\n        /**\n         * 用来指定对话框的拖拽区域。默认值为\"0,0,0,0\"。\n         * <p><b>格式：</b>构成一个矩形所需的 x,y,width,heith 值，用逗号连接为字符串。\n         * 例如：\"0,0,100,200\"。\n         * </p>\n         *\n         * @see #includeExamplesSummary 请参考示例\n         */\n        dragArea: string;\n        /**\n         * 弹出框的显示状态；如果弹框处于显示中，则为true，否则为false;\n         */\n        readonly isPopup: boolean;\n        zOrder: number;\n        /**\n         * 设置锁定界面，在界面未准备好前显示锁定界面，准备完毕后则移除锁定层，如果为空则什么都不显示\n         * @param\tview 锁定界面内容\n         */\n        static setLockView(view: Component): void;\n        /**\n         * 锁定所有层，显示加载条信息，防止下面内容被点击\n         */\n        static lock(value: boolean): void;\n        /**关闭所有对话框。*/\n        static closeAll(): void;\n        /**\n         * 根据组获取对话框集合\n         * @param\tgroup 组名称\n         * @return\t对话框数组\n         */\n        static getDialogsByGroup(group: string): Array<any>;\n        /**\n         * 根据组关闭所有弹出框\n         * @param\tgroup 需要关闭的组名称\n         */\n        static closeByGroup(group: string): Array<any>;\n    }\n}\ndeclare module laya.ui {\n    import Sprite = laya.display.Sprite;\n    import Component = laya.ui.Component;\n    import Dialog = laya.ui.Dialog;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>DialogManager</code> 对话框管理容器，所有的对话框都在该容器内，并且受管理器管理。\n     * 任意对话框打开和关闭，都会出发管理类的open和close事件\n     * 可以通过UIConfig设置弹出框背景透明度，模式窗口点击边缘是否关闭，点击窗口是否切换层次等\n     * 通过设置对话框的zOrder属性，可以更改弹出的层次\n     */\n    class DialogManager extends Sprite {\n        /**遮罩层*/\n        maskLayer: Sprite;\n        /**锁屏层*/\n        lockLayer: Sprite;\n        popupEffect: Function;\n        closeEffect: Function;\n        /**全局默认关闭对话框效果，可以设置一个效果代替默认的关闭效果，如果不想有任何效果，可以赋值为null*/\n        popupEffectHandler: Handler;\n        /**全局默认弹出对话框效果，可以设置一个效果代替默认的弹出效果，如果不想有任何效果，可以赋值为null*/\n        closeEffectHandler: Handler;\n        /**\n         * 创建一个新的 <code>DialogManager</code> 类实例。\n         */\n        constructor();\n        /**设置锁定界面，如果为空则什么都不显示*/\n        setLockView(value: Component): void;\n        /**\n         * 显示对话框(非模式窗口类型)。\n         * @param dialog 需要显示的对象框 <code>Dialog</code> 实例。\n         * @param closeOther 是否关闭其它对话框，若值为ture，则关闭其它的对话框。\n         * @param showEffect 是否显示弹出效果\n         */\n        open(dialog: Dialog, closeOther?: boolean, showEffect?: boolean): void;\n        /**\n         * 执行打开对话框。\n         * @param dialog 需要关闭的对象框 <code>Dialog</code> 实例。\n         * @param type\t关闭的类型，默认为空\n         */\n        doOpen(dialog: Dialog): void;\n        /**\n         * 锁定所有层，显示加载条信息，防止双击\n         */\n        lock(value: boolean): void;\n        /**\n         * 关闭对话框。\n         * @param dialog 需要关闭的对象框 <code>Dialog</code> 实例。\n         * @param type\t关闭的类型，默认为空\n         * @param showEffect 是否显示弹出效果\n         */\n        close(dialog: Dialog, type?: string, showEffect?: boolean): void;\n        /**\n         * 执行关闭对话框。\n         * @param dialog 需要关闭的对象框 <code>Dialog</code> 实例。\n         * @param type\t关闭的类型，默认为空\n         */\n        doClose(dialog: Dialog, type?: string): void;\n        /**\n         * 关闭所有的对话框。\n         */\n        closeAll(): void;\n        /**\n         * 根据组获取所有对话框\n         * @param\tgroup 组名称\n         * @return\t对话框数组\n         */\n        getDialogsByGroup(group: string): Array<any>;\n        /**\n         * 根据组关闭所有弹出框\n         * @param\tgroup 需要关闭的组名称\n         * @return\t需要关闭的对话框数组\n         */\n        closeByGroup(group: string): Array<any>;\n        _checkMask(): void;\n    }\n}\ndeclare module laya.ui {\n    import Clip = laya.ui.Clip;\n    /**\n     * 字体切片，简化版的位图字体，只需设置一个切片图片和文字内容即可使用，效果同位图字体\n     * 使用方式：设置位图字体皮肤skin，设置皮肤对应的字体内容sheet（如果多行，可以使用空格换行），示例：\n     * fontClip.skin = \"font1.png\";//设置皮肤\n     * fontClip.sheet = \"abc123 456\";//设置皮肤对应的内容，空格换行。此皮肤为2行5列（显示时skin会被等分为2行5列），第一行对应的文字为\"abc123\"，第二行为\"456\"\n     * fontClip.value = \"a1326\";//显示\"a1326\"文字\n     */\n    class FontClip extends Clip {\n        protected _valueArr: string;\n        protected _indexMap: any;\n        protected _sheet: string;\n        protected _direction: string;\n        protected _spaceX: number;\n        protected _spaceY: number;\n        /**\n         * @param skin 位图字体皮肤\n         * @param sheet 位图字体内容，空格代表换行\n         */\n        constructor(skin?: string, sheet?: string);\n        protected createChildren(): void;\n        /**\n         * 设置位图字体内容，空格代表换行。比如\"abc123 456\"，代表第一行对应的文字为\"abc123\"，第二行为\"456\"\n         */\n        sheet: string;\n        /**\n         * 设置位图字体的显示内容\n         */\n        value: string;\n        /**\n         * 布局方向。\n         * <p>默认值为\"horizontal\"。</p>\n         * <p><b>取值：</b>\n         * <li>\"horizontal\"：表示水平布局。</li>\n         * <li>\"vertical\"：表示垂直布局。</li>\n         * </p>\n         */\n        direction: string;\n        /**X方向文字间隙*/\n        spaceX: number;\n        /**Y方向文字间隙*/\n        spaceY: number;\n        /**水平对齐方式*/\n        align: string;\n        protected changeValue(): void;\n        width: number;\n        height: number;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        destroy(destroyChild?: boolean): void;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * <code>HBox</code> 是一个水平布局容器类。\n     */\n    class HBox extends LayoutBox {\n        /**\n         * 无对齐。\n         */\n        static NONE: string;\n        /**\n         * 居顶部对齐。\n         */\n        static TOP: string;\n        /**\n         * 居中对齐。\n         */\n        static MIDDLE: string;\n        /**\n         * 居底部对齐。\n         */\n        static BOTTOM: string;\n        protected sortItem(items: Array<any>): void;\n        height: number;\n        protected changeItems(): void;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * 使用 <code>HScrollBar</code> （水平 <code>ScrollBar</code> ）控件，可以在因数据太多而不能在显示区域完全显示时控制显示的数据部分。\n     * @example <caption>以下示例代码，创建了一个 <code>HScrollBar</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.HScrollBar;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class HScrollBar_Example\n     *\t\t{\n     *\t\t\tprivate var hScrollBar:HScrollBar;\n     *\t\t\tpublic function HScrollBar_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/hscroll.png\", \"resource/ui/hscroll$bar.png\", \"resource/ui/hscroll$down.png\", \"resource/ui/hscroll$up.png\"], Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\thScrollBar = new HScrollBar();//创建一个 HScrollBar 类的实例对象 hScrollBar 。\n     *\t\t\t\thScrollBar.skin = \"resource/ui/hscroll.png\";//设置 hScrollBar 的皮肤。\n     *\t\t\t\thScrollBar.x = 100;//设置 hScrollBar 对象的属性 x 的值，用于控制 hScrollBar 对象的显示位置。\n     *\t\t\t\thScrollBar.y = 100;//设置 hScrollBar 对象的属性 y 的值，用于控制 hScrollBar 对象的显示位置。\n     *\t\t\t\thScrollBar.changeHandler = new Handler(this, onChange);//设置 hScrollBar 的滚动变化处理器。\n     *\t\t\t\tLaya.stage.addChild(hScrollBar);//将此 hScrollBar 对象添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onChange(value:Number):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"滚动条的位置： value=\" + value);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * var hScrollBar;\n     * var res  = [\"resource/ui/hscroll.png\", \"resource/ui/hscroll$bar.png\", \"resource/ui/hscroll$down.png\", \"resource/ui/hscroll$up.png\"];\n     * Laya.loader.load(res,laya.utils.Handler.create(this, onLoadComplete));//加载资源。\n     * function onLoadComplete() {\n     *     console.log(\"资源加载完成！\");\n     *     hScrollBar = new laya.ui.HScrollBar();//创建一个 HScrollBar 类的实例对象 hScrollBar 。\n     *     hScrollBar.skin = \"resource/ui/hscroll.png\";//设置 hScrollBar 的皮肤。\n     *     hScrollBar.x = 100;//设置 hScrollBar 对象的属性 x 的值，用于控制 hScrollBar 对象的显示位置。\n     *     hScrollBar.y = 100;//设置 hScrollBar 对象的属性 y 的值，用于控制 hScrollBar 对象的显示位置。\n     *     hScrollBar.changeHandler = new laya.utils.Handler(this, onChange);//设置 hScrollBar 的滚动变化处理器。\n     *     Laya.stage.addChild(hScrollBar);//将此 hScrollBar 对象添加到显示列表。\n     * }\n     * function onChange(value)\n     * {\n     *     console.log(\"滚动条的位置： value=\" + value);\n     * }\n     * @example\n     * import HScrollBar = laya.ui.HScrollBar;\n     * import Handler = laya.utils.Handler;\n     * class HScrollBar_Example {\n     *     private hScrollBar: HScrollBar;\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/hscroll.png\", \"resource/ui/hscroll$bar.png\", \"resource/ui/hscroll$down.png\", \"resource/ui/hscroll$up.png\"], Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         this.hScrollBar = new HScrollBar();//创建一个 HScrollBar 类的实例对象 hScrollBar 。\n     *         this.hScrollBar.skin = \"resource/ui/hscroll.png\";//设置 hScrollBar 的皮肤。\n     *         this.hScrollBar.x = 100;//设置 hScrollBar 对象的属性 x 的值，用于控制 hScrollBar 对象的显示位置。\n     *         this.hScrollBar.y = 100;//设置 hScrollBar 对象的属性 y 的值，用于控制 hScrollBar 对象的显示位置。\n     *         this.hScrollBar.changeHandler = new Handler(this, this.onChange);//设置 hScrollBar 的滚动变化处理器。\n     *         Laya.stage.addChild(this.hScrollBar);//将此 hScrollBar 对象添加到显示列表。\n     *     }\n     *     private onChange(value: number): void {\n     *         console.log(\"滚动条的位置： value=\" + value);\n     *     }\n     * }\n     */\n    class HScrollBar extends ScrollBar {\n        protected initialize(): void;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * 使用 <code>HSlider</code> 控件，用户可以通过在滑块轨道的终点之间移动滑块来选择值。\n     * <p> <code>HSlider</code> 控件采用水平方向。滑块轨道从左向右扩展，而标签位于轨道的顶部或底部。</p>\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>HSlider</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.HSlider;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class HSlider_Example\n     *\t\t{\n     *\t\t\tprivate var hSlider:HSlider;\n     *\t\t\tpublic function HSlider_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/hslider.png\", \"resource/ui/hslider$bar.png\"], Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\thSlider = new HSlider();//创建一个 HSlider 类的实例对象 hSlider 。\n     *\t\t\t\thSlider.skin = \"resource/ui/hslider.png\";//设置 hSlider 的皮肤。\n     *\t\t\t\thSlider.min = 0;//设置 hSlider 最低位置值。\n     *\t\t\t\thSlider.max = 10;//设置 hSlider 最高位置值。\n     *\t\t\t\thSlider.value = 2;//设置 hSlider 当前位置值。\n     *\t\t\t\thSlider.tick = 1;//设置 hSlider 刻度值。\n     *\t\t\t\thSlider.x = 100;//设置 hSlider 对象的属性 x 的值，用于控制 hSlider 对象的显示位置。\n     *\t\t\t\thSlider.y = 100;//设置 hSlider 对象的属性 y 的值，用于控制 hSlider 对象的显示位置。\n     *\t\t\t\thSlider.changeHandler = new Handler(this, onChange);//设置 hSlider 位置变化处理器。\n     *\t\t\t\tLaya.stage.addChild(hSlider);//把 hSlider 添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onChange(value:Number):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"滑块的位置： value=\" + value);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800, \"canvas\");//设置游戏画布宽高、渲染模式\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * var hSlider;\n     * var res = [\"resource/ui/hslider.png\", \"resource/ui/hslider$bar.png\"];\n     * Laya.loader.load(res, laya.utils.Handler.create(this, onLoadComplete));\n     * function onLoadComplete() {\n     *     console.log(\"资源加载完成！\");\n     *     hSlider = new laya.ui.HSlider();//创建一个 HSlider 类的实例对象 hSlider 。\n     *     hSlider.skin = \"resource/ui/hslider.png\";//设置 hSlider 的皮肤。\n     *     hSlider.min = 0;//设置 hSlider 最低位置值。\n     *     hSlider.max = 10;//设置 hSlider 最高位置值。\n     *     hSlider.value = 2;//设置 hSlider 当前位置值。\n     *     hSlider.tick = 1;//设置 hSlider 刻度值。\n     *     hSlider.x = 100;//设置 hSlider 对象的属性 x 的值，用于控制 hSlider 对象的显示位置。\n     *     hSlider.y = 100;//设置 hSlider 对象的属性 y 的值，用于控制 hSlider 对象的显示位置。\n     *     hSlider.changeHandler = new laya.utils.Handler(this, onChange);//设置 hSlider 位置变化处理器。\n     *     Laya.stage.addChild(hSlider);//把 hSlider 添加到显示列表。\n     * }\n     * function onChange(value)\n     * {\n     *     console.log(\"滑块的位置： value=\" + value);\n     * }\n     * @example\n     * import Handler = laya.utils.Handler;\n     * import HSlider = laya.ui.HSlider;\n     * class HSlider_Example {\n     *     private hSlider: HSlider;\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/hslider.png\", \"resource/ui/hslider$bar.png\"], Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         this.hSlider = new HSlider();//创建一个 HSlider 类的实例对象 hSlider 。\n     *         this.hSlider.skin = \"resource/ui/hslider.png\";//设置 hSlider 的皮肤。\n     *         this.hSlider.min = 0;//设置 hSlider 最低位置值。\n     *         this.hSlider.max = 10;//设置 hSlider 最高位置值。\n     *         this.hSlider.value = 2;//设置 hSlider 当前位置值。\n     *         this.hSlider.tick = 1;//设置 hSlider 刻度值。\n     *         this.hSlider.x = 100;//设置 hSlider 对象的属性 x 的值，用于控制 hSlider 对象的显示位置。\n     *         this.hSlider.y = 100;//设置 hSlider 对象的属性 y 的值，用于控制 hSlider 对象的显示位置。\n     *         this.hSlider.changeHandler = new Handler(this, this.onChange);//设置 hSlider 位置变化处理器。\n     *         Laya.stage.addChild(this.hSlider);//把 hSlider 添加到显示列表。\n     *     }\n     *     private onChange(value: number): void {\n     *         console.log(\"滑块的位置： value=\" + value);\n     *     }\n     * }\n     *\n     * @see laya.ui.Slider\n     */\n    class HSlider extends Slider {\n        /**\n         * 创建一个 <code>HSlider</code> 类实例。\n         * @param skin 皮肤。\n         */\n        constructor(skin?: string);\n    }\n}\ndeclare module laya.ui {\n    /**容器接口，实现了编辑器容器类型。*/\n    interface IBox extends IComponent {\n    }\n}\ndeclare module laya.ui {\n    /**组件接口，实现了编辑器组件类型。*/\n    interface IComponent {\n    }\n}\ndeclare module laya.ui {\n    /**\n     * Item接口。\n     */\n    interface IItem {\n        /**\n         * 初始化列表项。\n         */\n        initItems(): void;\n    }\n}\ndeclare module laya.ui {\n    import Texture = laya.resource.Texture;\n    import AutoBitmap = laya.ui.AutoBitmap;\n    import Component = laya.ui.Component;\n    /**\n     * <code>Image</code> 类是用于表示位图图像或绘制图形的显示对象。\n     * Image和Clip组件是唯一支持异步加载的两个组件，比如img.skin = \"abc/xxx.png\"，其他UI组件均不支持异步加载。\n     *\n     * @example <caption>以下示例代码，创建了一个新的 <code>Image</code> 实例，设置了它的皮肤、位置信息，并添加到舞台上。</caption>\n     *\tpackage\n     *\t {\n     *\t\timport laya.ui.Image;\n     *\t\tpublic class Image_Example\n     *\t\t{\n     *\t\t\tpublic function Image_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tonInit();\n     *\t\t\t}\n     *\t\t\tprivate function onInit():void\n     *\t \t\t{\n     *\t\t\t\tvar bg:Image = new Image(\"resource/ui/bg.png\");//创建一个 Image 类的实例对象 bg ,并传入它的皮肤。\n     *\t\t\t\tbg.x = 100;//设置 bg 对象的属性 x 的值，用于控制 bg 对象的显示位置。\n     *\t\t\t\tbg.y = 100;//设置 bg 对象的属性 y 的值，用于控制 bg 对象的显示位置。\n     *\t\t\t\tbg.sizeGrid = \"40,10,5,10\";//设置 bg 对象的网格信息。\n     *\t\t\t\tbg.width = 150;//设置 bg 对象的宽度。\n     *\t\t\t\tbg.height = 250;//设置 bg 对象的高度。\n     *\t\t\t\tLaya.stage.addChild(bg);//将此 bg 对象添加到显示列表。\n     *\t\t\t\tvar image:Image = new Image(\"resource/ui/image.png\");//创建一个 Image 类的实例对象 image ,并传入它的皮肤。\n     *\t\t\t\timage.x = 100;//设置 image 对象的属性 x 的值，用于控制 image 对象的显示位置。\n     *\t\t\t\timage.y = 100;//设置 image 对象的属性 y 的值，用于控制 image 对象的显示位置。\n     *\t\t\t\tLaya.stage.addChild(image);//将此 image 对象添加到显示列表。\n     *\t\t\t}\n     *\t\t}\n     *\t }\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * onInit();\n     * function onInit() {\n     *     var bg = new laya.ui.Image(\"resource/ui/bg.png\");//创建一个 Image 类的实例对象 bg ,并传入它的皮肤。\n     *     bg.x = 100;//设置 bg 对象的属性 x 的值，用于控制 bg 对象的显示位置。\n     *     bg.y = 100;//设置 bg 对象的属性 y 的值，用于控制 bg 对象的显示位置。\n     *     bg.sizeGrid = \"40,10,5,10\";//设置 bg 对象的网格信息。\n     *     bg.width = 150;//设置 bg 对象的宽度。\n     *     bg.height = 250;//设置 bg 对象的高度。\n     *     Laya.stage.addChild(bg);//将此 bg 对象添加到显示列表。\n     *     var image = new laya.ui.Image(\"resource/ui/image.png\");//创建一个 Image 类的实例对象 image ,并传入它的皮肤。\n     *     image.x = 100;//设置 image 对象的属性 x 的值，用于控制 image 对象的显示位置。\n     *     image.y = 100;//设置 image 对象的属性 y 的值，用于控制 image 对象的显示位置。\n     *     Laya.stage.addChild(image);//将此 image 对象添加到显示列表。\n     * }\n     * @example\n     * class Image_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         this.onInit();\n     *     }\n     *     private onInit(): void {\n     *         var bg: laya.ui.Image = new laya.ui.Image(\"resource/ui/bg.png\");//创建一个 Image 类的实例对象 bg ,并传入它的皮肤。\n     *         bg.x = 100;//设置 bg 对象的属性 x 的值，用于控制 bg 对象的显示位置。\n     *         bg.y = 100;//设置 bg 对象的属性 y 的值，用于控制 bg 对象的显示位置。\n     *         bg.sizeGrid = \"40,10,5,10\";//设置 bg 对象的网格信息。\n     *         bg.width = 150;//设置 bg 对象的宽度。\n     *         bg.height = 250;//设置 bg 对象的高度。\n     *         Laya.stage.addChild(bg);//将此 bg 对象添加到显示列表。\n     *         var image: laya.ui.Image = new laya.ui.Image(\"resource/ui/image.png\");//创建一个 Image 类的实例对象 image ,并传入它的皮肤。\n     *         image.x = 100;//设置 image 对象的属性 x 的值，用于控制 image 对象的显示位置。\n     *         image.y = 100;//设置 image 对象的属性 y 的值，用于控制 image 对象的显示位置。\n     *         Laya.stage.addChild(image);//将此 image 对象添加到显示列表。\n     *     }\n     * }\n     * @see laya.ui.AutoBitmap\n     */\n    class Image extends Component {\n        _bitmap: AutoBitmap;\n        protected _skin: string;\n        protected _group: string;\n        /**\n         * 创建一个 <code>Image</code> 实例。\n         * @param skin 皮肤资源地址。\n         */\n        constructor(skin?: string);\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * 销毁对象并释放加载的皮肤资源。\n         */\n        dispose(): void;\n        protected createChildren(): void;\n        /**\n         * <p>对象的皮肤地址，以字符串表示。</p>\n         * <p>如果资源未加载，则先加载资源，加载完成后应用于此对象。</p>\n         * <b>注意：</b>资源加载完成后，会自动缓存至资源库中。\n         */\n        skin: string;\n        /**\n         * @copy laya.ui.AutoBitmap#source\n         */\n        source: Texture;\n        /**\n         * 资源分组。\n         */\n        group: string;\n        protected setSource(url: string, img?: any): void;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        /**@inheritDoc */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        /**\n         * <p>当前实例的位图 <code>AutoImage</code> 实例的有效缩放网格数据。</p>\n         * <p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n         * <ul><li>例如：\"4,4,4,4,1\"。</li></ul></p>\n         * @see laya.ui.AutoBitmap#sizeGrid\n         */\n        sizeGrid: string;\n        /**@inheritDoc */\n        dataSource: any;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * <code>IRender</code> 接口，实现设置项的渲染类型。\n     */\n    interface IRender {\n    }\n}\ndeclare module laya.ui {\n    /**\n     * <code>ISelect</code> 接口，实现对象的 <code>selected</code> 属性和 <code>clickHandler</code> 选择回调函数处理器。\n     */\n    interface ISelect {\n    }\n}\ndeclare module laya.ui {\n    import Text = laya.display.Text;\n    import Component = laya.ui.Component;\n    /**\n     * <p> <code>Label</code> 类用于创建显示对象以显示文本。</p>\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>Label</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.Label;\n     *\t\tpublic class Label_Example\n     *\t\t{\n     *\t\t\tpublic function Label_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tonInit();\n     *\t\t\t}\n     *\t\t\tprivate function onInit():void\n     *\t\t\t{\n     *\t\t\t\tvar label:Label = new Label();//创建一个 Label 类的实例对象 label 。\n     *\t\t\t\tlabel.font = \"Arial\";//设置 label 的字体。\n     *\t\t\t\tlabel.bold = true;//设置 label 显示为粗体。\n     *\t\t\t\tlabel.leading = 4;//设置 label 的行间距。\n     *\t\t\t\tlabel.wordWrap = true;//设置 label 自动换行。\n     *\t\t\t\tlabel.padding = \"10,10,10,10\";//设置 label 的边距。\n     *\t\t\t\tlabel.color = \"#ff00ff\";//设置 label 的颜色。\n     *\t\t\t\tlabel.text = \"Hello everyone,我是一个可爱的文本！\";//设置 label 的文本内容。\n     *\t\t\t\tlabel.x = 100;//设置 label 对象的属性 x 的值，用于控制 label 对象的显示位置。\n     *\t\t\t\tlabel.y = 100;//设置 label 对象的属性 y 的值，用于控制 label 对象的显示位置。\n     *\t\t\t\tlabel.width = 300;//设置 label 的宽度。\n     *\t\t\t\tlabel.height = 200;//设置 label 的高度。\n     *\t\t\t\tLaya.stage.addChild(label);//将 label 添加到显示列表。\n     *\t\t\t\tvar passwordLabel:Label = new Label(\"请原谅我，我不想被人看到我心里话。\");//创建一个 Label 类的实例对象 passwordLabel 。\n     *\t\t\t\tpasswordLabel.asPassword = true;//设置 passwordLabel 的显示反式为密码显示。\n     *\t\t\t\tpasswordLabel.x = 100;//设置 passwordLabel 对象的属性 x 的值，用于控制 passwordLabel 对象的显示位置。\n     *\t\t\t\tpasswordLabel.y = 350;//设置 passwordLabel 对象的属性 y 的值，用于控制 passwordLabel 对象的显示位置。\n     *\t\t\t\tpasswordLabel.width = 300;//设置 passwordLabel 的宽度。\n     *\t\t\t\tpasswordLabel.color = \"#000000\";//设置 passwordLabel 的文本颜色。\n     *\t\t\t\tpasswordLabel.bgColor = \"#ccffff\";//设置 passwordLabel 的背景颜色。\n     *\t\t\t\tpasswordLabel.fontSize = 20;//设置 passwordLabel 的文本字体大小。\n     *\t\t\t\tLaya.stage.addChild(passwordLabel);//将 passwordLabel 添加到显示列表。\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * onInit();\n     * function onInit(){\n     *     var label = new laya.ui.Label();//创建一个 Label 类的实例对象 label 。\n     *     label.font = \"Arial\";//设置 label 的字体。\n     *     label.bold = true;//设置 label 显示为粗体。\n     *     label.leading = 4;//设置 label 的行间距。\n     *     label.wordWrap = true;//设置 label 自动换行。\n     *     label.padding = \"10,10,10,10\";//设置 label 的边距。\n     *     label.color = \"#ff00ff\";//设置 label 的颜色。\n     *     label.text = \"Hello everyone,我是一个可爱的文本！\";//设置 label 的文本内容。\n     *     label.x = 100;//设置 label 对象的属性 x 的值，用于控制 label 对象的显示位置。\n     *     label.y = 100;//设置 label 对象的属性 y 的值，用于控制 label 对象的显示位置。\n     *     label.width = 300;//设置 label 的宽度。\n     *     label.height = 200;//设置 label 的高度。\n     *     Laya.stage.addChild(label);//将 label 添加到显示列表。\n     *     var passwordLabel = new laya.ui.Label(\"请原谅我，我不想被人看到我心里话。\");//创建一个 Label 类的实例对象 passwordLabel 。\n     *     passwordLabel.asPassword = true;//设置 passwordLabel 的显示反式为密码显示。\n     *     passwordLabel.x = 100;//设置 passwordLabel 对象的属性 x 的值，用于控制 passwordLabel 对象的显示位置。\n     *     passwordLabel.y = 350;//设置 passwordLabel 对象的属性 y 的值，用于控制 passwordLabel 对象的显示位置。\n     *     passwordLabel.width = 300;//设置 passwordLabel 的宽度。\n     *     passwordLabel.color = \"#000000\";//设置 passwordLabel 的文本颜色。\n     *     passwordLabel.bgColor = \"#ccffff\";//设置 passwordLabel 的背景颜色。\n     *     passwordLabel.fontSize = 20;//设置 passwordLabel 的文本字体大小。\n     *     Laya.stage.addChild(passwordLabel);//将 passwordLabel 添加到显示列表。\n     * }\n     * @example\n     * import Label = laya.ui.Label;\n     * class Label_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         this.onInit();\n     *     }\n     *     private onInit(): void {\n     *         var label: Label = new Label();//创建一个 Label 类的实例对象 label 。\n     *         label.font = \"Arial\";//设置 label 的字体。\n     *         label.bold = true;//设置 label 显示为粗体。\n     *         label.leading = 4;//设置 label 的行间距。\n     *         label.wordWrap = true;//设置 label 自动换行。\n     *         label.padding = \"10,10,10,10\";//设置 label 的边距。\n     *         label.color = \"#ff00ff\";//设置 label 的颜色。\n     *         label.text = \"Hello everyone,我是一个可爱的文本！\";//设置 label 的文本内容。\n     *         label.x = 100;//设置 label 对象的属性 x 的值，用于控制 label 对象的显示位置。\n     *         label.y = 100;//设置 label 对象的属性 y 的值，用于控制 label 对象的显示位置。\n     *         label.width = 300;//设置 label 的宽度。\n     *         label.height = 200;//设置 label 的高度。\n     *         Laya.stage.addChild(label);//将 label 添加到显示列表。\n     *         var passwordLabel: Label = new Label(\"请原谅我，我不想被人看到我心里话。\");//创建一个 Label 类的实例对象 passwordLabel 。\n     *         passwordLabel.asPassword = true;//设置 passwordLabel 的显示反式为密码显示。\n     *         passwordLabel.x = 100;//设置 passwordLabel 对象的属性 x 的值，用于控制 passwordLabel 对象的显示位置。\n     *         passwordLabel.y = 350;//设置 passwordLabel 对象的属性 y 的值，用于控制 passwordLabel 对象的显示位置。\n     *         passwordLabel.width = 300;//设置 passwordLabel 的宽度。\n     *         passwordLabel.color = \"#000000\";//设置 passwordLabel 的文本颜色。\n     *         passwordLabel.bgColor = \"#ccffff\";//设置 passwordLabel 的背景颜色。\n     *         passwordLabel.fontSize = 20;//设置 passwordLabel 的文本字体大小。\n     *         Laya.stage.addChild(passwordLabel);//将 passwordLabel 添加到显示列表。\n     *     }\n     * }\n     * @see laya.display.Text\n     */\n    class Label extends Component {\n        protected _tf: Text;\n        /**\n         * 创建一个新的 <code>Label</code> 实例。\n         * @param text 文本内容字符串。\n         */\n        constructor(text?: string);\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        /**\n         * 当前文本内容字符串。\n         * @see laya.display.Text.text\n         */\n        text: string;\n        /**@copy laya.display.Text#changeText()\n         **/\n        changeText(text: string): void;\n        /**\n         * @copy laya.display.Text#wordWrap\n         */\n        /**\n         * @copy laya.display.Text#wordWrap\n         */\n        wordWrap: boolean;\n        /**\n         * @copy laya.display.Text#color\n         */\n        color: string;\n        /**\n         * @copy laya.display.Text#font\n         */\n        font: string;\n        /**\n         * @copy laya.display.Text#align\n         */\n        align: string;\n        /**\n         * @copy laya.display.Text#valign\n         */\n        valign: string;\n        /**\n         * @copy laya.display.Text#bold\n         */\n        bold: boolean;\n        /**\n         * @copy laya.display.Text#italic\n         */\n        italic: boolean;\n        /**\n         * @copy laya.display.Text#leading\n         */\n        leading: number;\n        /**\n         * @copy laya.display.Text#fontSize\n         */\n        fontSize: number;\n        /**\n         * <p>边距信息</p>\n         * <p>\"上边距，右边距，下边距 , 左边距（边距以像素为单位）\"</p>\n         * @see laya.display.Text.padding\n         */\n        padding: string;\n        /**\n         * @copy laya.display.Text#bgColor\n         */\n        bgColor: string;\n        /**\n         * @copy laya.display.Text#borderColor\n         */\n        borderColor: string;\n        /**\n         * @copy laya.display.Text#stroke\n         */\n        stroke: number;\n        /**\n         * @copy laya.display.Text#strokeColor\n         */\n        strokeColor: string;\n        /**\n         * 文本控件实体 <code>Text</code> 实例。\n         */\n        readonly textField: Text;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        /**\n         * @inheritDoc\n         */\n        /**\n         * @inheritDoc\n         */\n        width: number;\n        /**\n         * @inheritDoc\n         */\n        /**\n         * @inheritDoc\n         */\n        height: number;\n        /**@inheritDoc */\n        dataSource: any;\n        /**\n         * @copy laya.display.Text#overflow\n         */\n        /**\n         * @copy laya.display.Text#overflow\n         */\n        overflow: string;\n        /**\n         * @copy laya.display.Text#underline\n         */\n        /**\n         * @copy laya.display.Text#underline\n         */\n        underline: boolean;\n        /**\n         * @copy laya.display.Text#underlineColor\n         */\n        /**\n         * @copy laya.display.Text#underlineColor\n         */\n        underlineColor: string;\n    }\n}\ndeclare module laya.ui {\n    import Node = laya.display.Node;\n    /**\n     * <code>LayoutBox</code> 是一个布局容器类。\n     */\n    class LayoutBox extends Box {\n        protected _space: number;\n        protected _align: string;\n        protected _itemChanged: boolean;\n        /** @inheritDoc\t*/\n        addChild(child: Node): Node;\n        /** @inheritDoc\t*/\n        addChildAt(child: Node, index: number): Node;\n        /** @inheritDoc\t*/\n        removeChild(child: Node): Node;\n        /** @inheritDoc\t*/\n        removeChildAt(index: number): Node;\n        /** 刷新。*/\n        refresh(): void;\n        protected changeItems(): void;\n        /** 子对象的间隔。*/\n        space: number;\n        /** 子对象对齐方式。*/\n        align: string;\n        protected sortItem(items: Array<any>): void;\n        protected _setItemChanged(): void;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * <code>LayoutStyle</code> 是一个布局样式类。\n     */\n    class LayoutStyle {\n        /**一个已初始化的 <code>LayoutStyle</code> 实例。*/\n        static EMPTY: LayoutStyle;\n        /**表示距顶边的距离（以像素为单位）。*/\n        top: number;\n        /**表示距底边的距离（以像素为单位）。*/\n        bottom: number;\n        /**表示距左边的距离（以像素为单位）。*/\n        left: number;\n        /**表示距右边的距离（以像素为单位）。*/\n        right: number;\n        /**表示距水平方向中心轴的距离（以像素为单位）。*/\n        centerX: number;\n        /**表示距垂直方向中心轴的距离（以像素为单位）。*/\n        centerY: number;\n        /**X锚点，值为0-1。*/\n        anchorX: number;\n        /**Y锚点，值为0-1。*/\n        anchorY: number;\n        /**一个布尔值，表示是否有效。*/\n        enable: boolean;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    import Point = laya.maths.Point;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>List</code> 控件可显示项目列表。默认为垂直方向列表。可通过UI编辑器自定义列表。\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>List</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.List;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class List_Example\n     *\t\t{\n     *\t\t\tpublic function List_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800, \"false\");//设置游戏画布宽高、渲染模式。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\"], Handler.create(this, onLoadComplete));\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tvar arr:Array = [];//创建一个数组，用于存贮列表的数据信息。\n     *\t\t\t\tfor (var i:int = 0; i &lt; 20; i++)\n     *\t\t\t\t{\n     *\t\t\t\t\tarr.push({label: \"item\" + i});\n     *\t\t\t\t}\n     *\t\t\t\tvar list:List = new List();//创建一个 List 类的实例对象 list 。\n     *\t\t\t\tlist.itemRender = Item;//设置 list 的单元格渲染器。\n     *\t\t\t\tlist.repeatX = 1;//设置 list 的水平方向单元格数量。\n     *\t\t\t\tlist.repeatY = 10;//设置 list 的垂直方向单元格数量。\n     *\t\t\t\tlist.vScrollBarSkin = \"resource/ui/vscroll.png\";//设置 list 的垂直方向滚动条皮肤。\n     *\t\t\t\tlist.array = arr;//设置 list 的列表数据源。\n     *\t\t\t\tlist.pos(100, 100);//设置 list 的位置。\n     *\t\t\t\tlist.selectEnable = true;//设置 list 可选。\n     *\t\t\t\tlist.selectHandler = new Handler(this, onSelect);//设置 list 改变选择项执行的处理器。\n     *\t\t\t\tLaya.stage.addChild(list);//将 list 添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onSelect(index:int):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"当前选择的项目索引： index= \", index);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     *\timport laya.ui.Box;\n     *\timport laya.ui.Label;\n     *\tclass Item extends Box\n     *\t{\n     *\t\tpublic function Item()\n     *\t\t{\n     *\t\t\tgraphics.drawRect(0, 0, 100, 20,null, \"#ff0000\");\n     *\t\t\tvar label:Label = new Label();\n     *\t\t\tlabel.text = \"100000\";\n     *\t\t\tlabel.name = \"label\";//设置 label 的name属性值。\n     *\t\t\tlabel.size(100, 20);\n     *\t\t\taddChild(label);\n     *\t\t}\n     *\t}\n     * @example\n     * (function (_super){\n     *     function Item(){\n     *         Item.__super.call(this);//初始化父类\n     *         this.graphics.drawRect(0, 0, 100, 20, \"#ff0000\");\n     *         var label = new laya.ui.Label();//创建一个 Label 类的实例对象 label 。\n     *         label.text = \"100000\";//设置 label 的文本内容。\n     *         label.name = \"label\";//设置 label 的name属性值。\n     *         label.size(100, 20);//设置 label 的宽度、高度。\n     *         this.addChild(label);//将 label 添加到显示列表。\n     *     };\n     *     Laya.class(Item,\"mypackage.listExample.Item\",_super);//注册类 Item 。\n     * })(laya.ui.Box);\n    \n     * Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     * var res = [\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\"];\n     * Laya.loader.load(res, new laya.utils.Handler(this, onLoadComplete));//加载资源。\n    \n     * function onLoadComplete() {\n     *     var arr = [];//创建一个数组，用于存贮列表的数据信息。\n     *     for (var i = 0; i &lt; 20; i++) {\n     *         arr.push({label: \"item\" + i});\n     *     }\n    \n     *     var list = new laya.ui.List();//创建一个 List 类的实例对象 list 。\n     *     list.itemRender = mypackage.listExample.Item;//设置 list 的单元格渲染器。\n     *     list.repeatX = 1;//设置 list 的水平方向单元格数量。\n     *     list.repeatY = 10;//设置 list 的垂直方向单元格数量。\n     *     list.vScrollBarSkin = \"resource/ui/vscroll.png\";//设置 list 的垂直方向滚动条皮肤。\n     *     list.array = arr;//设置 list 的列表数据源。\n     *     list.pos(100, 100);//设置 list 的位置。\n     *     list.selectEnable = true;//设置 list 可选。\n     *     list.selectHandler = new laya.utils.Handler(this, onSelect);//设置 list 改变选择项执行的处理器。\n     *     Laya.stage.addChild(list);//将 list 添加到显示列表。\n     * }\n    \n     * function onSelect(index)\n     * {\n     *     console.log(\"当前选择的项目索引： index= \", index);\n     * }\n     *\n     * @example\n     * import List = laya.ui.List;\n     * import Handler = laya.utils.Handler;\n     * public class List_Example {\n     *     public List_Example() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\"], Handler.create(this, this.onLoadComplete));\n     *     }\n     *     private onLoadComplete(): void {\n     *         var arr= [];//创建一个数组，用于存贮列表的数据信息。\n     *         for (var i: number = 0; i &lt; 20; i++)\n     *         {\n     *             arr.push({ label: \"item\" + i });\n     *         }\n     *         var list: List = new List();//创建一个 List 类的实例对象 list 。\n     *         list.itemRender = Item;//设置 list 的单元格渲染器。\n     *         list.repeatX = 1;//设置 list 的水平方向单元格数量。\n     *         list.repeatY = 10;//设置 list 的垂直方向单元格数量。\n     *         list.vScrollBarSkin = \"resource/ui/vscroll.png\";//设置 list 的垂直方向滚动条皮肤。\n     *         list.array = arr;//设置 list 的列表数据源。\n     *         list.pos(100, 100);//设置 list 的位置。\n     *         list.selectEnable = true;//设置 list 可选。\n     *         list.selectHandler = new Handler(this, this.onSelect);//设置 list 改变选择项执行的处理器。\n     *         Laya.stage.addChild(list);//将 list 添加到显示列表。\n     *     }\n     *     private onSelect(index: number): void {\n     *         console.log(\"当前选择的项目索引： index= \", index);\n     *     }\n     * }\n     * import Box = laya.ui.Box;\n     * import Label = laya.ui.Label;\n     * class Item extends Box {\n     *     constructor() {\n     *         this.graphics.drawRect(0, 0, 100, 20, null, \"#ff0000\");\n     *         var label: Label = new Label();\n     *         label.text = \"100000\";\n     *         label.name = \"label\";//设置 label 的name属性值。\n     *         label.size(100, 20);\n     *         this.addChild(label);\n     *     }\n     * }\n     */\n    class List extends Box implements IRender, IItem {\n        /**改变 <code>List</code> 的选择项时执行的处理器，(默认返回参数： 项索引（index:number）)。*/\n        selectHandler: Handler;\n        /**单元格渲染处理器(默认返回参数cell:Box,index:number)。*/\n        renderHandler: Handler;\n        /**单元格鼠标事件处理器(默认返回参数e:Event,index:number)。*/\n        mouseHandler: Handler;\n        /**指定是否可以选择，若值为true则可以选择，否则不可以选择。 @default false*/\n        selectEnable: boolean;\n        /**最大分页数。*/\n        totalPage: number;\n        protected _content: Box;\n        protected _scrollBar: ScrollBar;\n        protected _itemRender: any;\n        protected _repeatX: number;\n        protected _repeatY: number;\n        protected _repeatX2: number;\n        protected _repeatY2: number;\n        protected _spaceX: number;\n        protected _spaceY: number;\n        protected _cells: Array<any>;\n        protected _array: Array<any>;\n        protected _startIndex: number;\n        protected _selectedIndex: number;\n        protected _page: number;\n        protected _isVertical: boolean;\n        protected _cellSize: number;\n        protected _cellOffset: number;\n        protected _isMoved: boolean;\n        /**是否缓存内容，如果数据源较少，并且list内无动画，设置此属性为true能大大提高性能 */\n        cacheContent: boolean;\n        protected _createdLine: number;\n        protected _cellChanged: boolean;\n        protected _offset: Point;\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        /**@inheritDoc */\n        cacheAs: string;\n        /**\n         * 获取对 <code>List</code> 组件所包含的内容容器 <code>Box</code> 组件的引用。\n         */\n        readonly content: Box;\n        /**\n         * 垂直方向滚动条皮肤。\n         */\n        vScrollBarSkin: string;\n        /**\n         * 水平方向滚动条皮肤。\n         */\n        hScrollBarSkin: string;\n        /**\n         * 获取对 <code>List</code> 组件所包含的滚动条 <code>ScrollBar</code> 组件的引用。\n         */\n        scrollBar: ScrollBar;\n        /**\n         * 单元格渲染器。\n         * <p><b>取值：</b>\n         * <ol>\n         * <li>单元格类对象。</li>\n         * <li> UI 的 JSON 描述。</li>\n         * </ol></p>\n         */\n        itemRender: any;\n        /**@inheritDoc */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        /**\n         * 水平方向显示的单元格数量。\n         */\n        repeatX: number;\n        /**\n         * 垂直方向显示的单元格数量。\n         */\n        repeatY: number;\n        /**\n         * 水平方向显示的单元格之间的间距（以像素为单位）。\n         */\n        spaceX: number;\n        /**\n         * 垂直方向显示的单元格之间的间距（以像素为单位）。\n         */\n        spaceY: number;\n        protected changeCells(): void;\n        protected createItem(): Box;\n        protected addCell(cell: Box): void;\n        /**\n         * 初始化单元格信息。\n         */\n        initItems(): void;\n        /**\n         * 设置可视区域大小。\n         * <p>以（0，0，width参数，height参数）组成的矩形区域为可视区域。</p>\n         * @param width 可视区域宽度。\n         * @param height 可视区域高度。\n         */\n        setContentSize(width: number, height: number): void;\n        protected onCellMouse(e: Event): void;\n        protected changeCellState(cell: Box, visable: boolean, index: number): void;\n        protected changeSize(): void;\n        protected onScrollBarChange(e?: Event): void;\n        /**\n         * 表示当前选择的项索引。selectedIndex值更改会引起list重新渲染\n         */\n        selectedIndex: number;\n        protected changeSelectStatus(): void;\n        /**\n         * 当前选中的单元格数据源。\n         */\n        selectedItem: any;\n        /**\n         * 获取或设置当前选择的单元格对象。\n         */\n        selection: Box;\n        /**\n         * 当前显示的单元格列表的开始索引。\n         */\n        startIndex: number;\n        protected renderItems(from?: number, to?: number): void;\n        protected renderItem(cell: any, index: number): void;\n        /**\n         * 列表数据源。\n         */\n        array: Array<any>;\n        /**\n         * 列表的当前页码。\n         */\n        page: number;\n        /**\n         * 列表的数据总个数。\n         */\n        readonly length: number;\n        /**@inheritDoc */\n        dataSource: any;\n        /**\n         * 单元格集合。\n         */\n        readonly cells: Array<any>;\n        /**\n         * 刷新列表数据源。\n         */\n        refresh(): void;\n        /**\n         * 获取单元格数据源。\n         * @param index 单元格索引。\n         */\n        getItem(index: number): any;\n        /**\n         * 修改单元格数据源。\n         * @param index 单元格索引。\n         * @param source 单元格数据源。\n         */\n        changeItem(index: number, source: any): void;\n        /**\n         * 设置单元格数据源。\n         * @param index 单元格索引。\n         * @param source 单元格数据源。\n         */\n        setItem(index: number, source: any): void;\n        /**\n         * 添加单元格数据源。\n         * @param souce 数据源。\n         */\n        addItem(souce: any): void;\n        /**\n         * 添加单元格数据源到对应的数据索引处。\n         * @param souce 单元格数据源。\n         * @param index 索引。\n         */\n        addItemAt(souce: any, index: number): void;\n        /**\n         * 通过数据源索引删除单元格数据源。\n         * @param index 需要删除的数据源索引值。\n         */\n        deleteItem(index: number): void;\n        /**\n         * 通过可视单元格索引，获取单元格。\n         * @param index 可视单元格索引。\n         * @return 单元格对象。\n         */\n        getCell(index: number): Box;\n        /**\n         * <p>滚动列表，以设定的数据索引对应的单元格为当前可视列表的第一项。</p>\n         * @param index 单元格在数据列表中的索引。\n         */\n        scrollTo(index: number): void;\n        /**\n         * <p>缓动滚动列表，以设定的数据索引对应的单元格为当前可视列表的第一项。</p>\n         * @param index 单元格在数据列表中的索引。\n         * @param time\t缓动时间。\n         * @param complete\t缓动结束回掉\n         */\n        tweenTo(index: number, time?: number, complete?: Handler): void;\n        protected _setCellChanged(): void;\n        protected commitMeasure(): void;\n    }\n}\ndeclare module laya.ui {\n    import Node = laya.display.Node;\n    import Sprite = laya.display.Sprite;\n    /**\n     * <code>Panel</code> 是一个面板容器类。\n     */\n    class Panel extends Box {\n        protected _content: Box;\n        protected _vScrollBar: VScrollBar;\n        protected _hScrollBar: HScrollBar;\n        protected _scrollChanged: boolean;\n        /**\n         * 创建一个新的 <code>Panel</code> 类实例。\n         * <p>在 <code>Panel</code> 构造函数中设置属性width、height的值都为100。</p>\n         */\n        constructor();\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        /**@inheritDoc */\n        destroyChildren(): void;\n        protected createChildren(): void;\n        /**@inheritDoc */\n        addChild(child: Node): Node;\n        /**@inheritDoc */\n        addChildAt(child: Node, index: number): Node;\n        /**@inheritDoc */\n        removeChild(child: Node): Node;\n        /**@inheritDoc */\n        removeChildAt(index: number): Node;\n        /**@inheritDoc */\n        removeChildren(beginIndex?: number, endIndex?: number): Node;\n        /**@inheritDoc */\n        getChildAt(index: number): Node;\n        /**@inheritDoc */\n        getChildByName(name: string): Node;\n        /**@inheritDoc */\n        getChildIndex(child: Node): number;\n        /**@inheritDoc */\n        readonly numChildren: number;\n        protected changeSize(): void;\n        /**\n         * @private\n         * 获取内容宽度（以像素为单位）。\n         */\n        readonly contentWidth: number;\n        /**\n         * @private\n         * 获取内容高度（以像素为单位）。\n         */\n        readonly contentHeight: number;\n        /**\n         * @inheritDoc\n         */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        /**\n         * 垂直方向滚动条皮肤。\n         */\n        vScrollBarSkin: string;\n        /**\n         * 水平方向滚动条皮肤。\n         */\n        hScrollBarSkin: string;\n        /**\n         * 垂直方向滚动条对象。\n         */\n        readonly vScrollBar: ScrollBar;\n        /**\n         * 水平方向滚动条对象。\n         */\n        readonly hScrollBar: ScrollBar;\n        /**\n         * 获取内容容器对象。\n         */\n        readonly content: Sprite;\n        protected onScrollBarChange(scrollBar: ScrollBar): void;\n        /**\n         * <p>滚动内容容器至设定的垂直、水平方向滚动条位置。</p>\n         * @param x 水平方向滚动条属性value值。滚动条位置数字。\n         * @param y 垂直方向滚动条属性value值。滚动条位置数字。\n         */\n        scrollTo(x?: number, y?: number): void;\n        /**\n         * 刷新滚动内容。\n         */\n        refresh(): void;\n        /**@inheritDoc */\n        cacheAs: string;\n        protected _setScrollChanged(): void;\n    }\n}\ndeclare module laya.ui {\n    import Component = laya.ui.Component;\n    import Image = laya.ui.Image;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>ProgressBar</code> 组件显示内容的加载进度。\n     * @example <caption>以下示例代码，创建了一个新的 <code>ProgressBar</code> 实例，设置了它的皮肤、位置、宽高、网格等信息，并添加到舞台上。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.ProgressBar;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class ProgressBar_Example\n     *\t\t{\n     *\t\t\tprivate var progressBar:ProgressBar;\n     *\t\t\tpublic function ProgressBar_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/progress.png\", \"resource/ui/progress$bar.png\"], Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tprogressBar = new ProgressBar(\"resource/ui/progress.png\");//创建一个 ProgressBar 类的实例对象 progressBar 。\n     *\t\t\t\tprogressBar.x = 100;//设置 progressBar 对象的属性 x 的值，用于控制 progressBar 对象的显示位置。\n     *\t\t\t\tprogressBar.y = 100;//设置 progressBar 对象的属性 y 的值，用于控制 progressBar 对象的显示位置。\n     *\t\t\t\tprogressBar.value = 0.3;//设置 progressBar 的进度值。\n     *\t\t\t\tprogressBar.width = 200;//设置 progressBar 的宽度。\n     *\t\t\t\tprogressBar.height = 50;//设置 progressBar 的高度。\n     *\t\t\t\tprogressBar.sizeGrid = \"5,10,5,10\";//设置 progressBar 的网格信息。\n     *\t\t\t\tprogressBar.changeHandler = new Handler(this, onChange);//设置 progressBar 的value值改变时执行的处理器。\n     *\t\t\t\tLaya.stage.addChild(progressBar);//将 progressBar 添加到显示列表。\n     *\t\t\t\tLaya.timer.once(3000, this, changeValue);//设定 3000ms（毫秒）后，执行函数changeValue。\n     *\t\t\t}\n     *\t\t\tprivate function changeValue():void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"改变进度条的进度值。\");\n     *\t\t\t\tprogressBar.value = 0.6;\n     *\t\t\t}\n     *\t\t\tprivate function onChange(value:Number):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"进度发生改变： value=\" ,value);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * var res = [\"resource/ui/progress.png\", \"resource/ui/progress$bar.png\"];\n     * Laya.loader.load(res, laya.utils.Handler.create(this, onLoadComplete));//加载资源。\n     * function onLoadComplete()\n     * {\n     *     progressBar = new laya.ui.ProgressBar(\"resource/ui/progress.png\");//创建一个 ProgressBar 类的实例对象 progressBar 。\n     *     progressBar.x = 100;//设置 progressBar 对象的属性 x 的值，用于控制 progressBar 对象的显示位置。\n     *     progressBar.y = 100;//设置 progressBar 对象的属性 y 的值，用于控制 progressBar 对象的显示位置。\n     *     progressBar.value = 0.3;//设置 progressBar 的进度值。\n     *     progressBar.width = 200;//设置 progressBar 的宽度。\n     *     progressBar.height = 50;//设置 progressBar 的高度。\n     *     progressBar.sizeGrid = \"10,5,10,5\";//设置 progressBar 的网格信息。\n     *     progressBar.changeHandler = new laya.utils.Handler(this, onChange);//设置 progressBar 的value值改变时执行的处理器。\n     *     Laya.stage.addChild(progressBar);//将 progressBar 添加到显示列表。\n     *     Laya.timer.once(3000, this, changeValue);//设定 3000ms（毫秒）后，执行函数changeValue。\n     * }\n     * function changeValue()\n     * {\n     *     console.log(\"改变进度条的进度值。\");\n     *     progressBar.value = 0.6;\n     * }\n     * function onChange(value)\n     * {\n     *     console.log(\"进度发生改变： value=\" ,value);\n     * }\n     * @example\n     * import ProgressBar = laya.ui.ProgressBar;\n     * import Handler = laya.utils.Handler;\n     * class ProgressBar_Example {\n     *     private progressBar: ProgressBar;\n     *     public ProgressBar_Example() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/progress.png\", \"resource/ui/progress$bar.png\"], Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         this.progressBar = new ProgressBar(\"resource/ui/progress.png\");//创建一个 ProgressBar 类的实例对象 progressBar 。\n     *         this.progressBar.x = 100;//设置 progressBar 对象的属性 x 的值，用于控制 progressBar 对象的显示位置。\n     *         this.progressBar.y = 100;//设置 progressBar 对象的属性 y 的值，用于控制 progressBar 对象的显示位置。\n     *         this.progressBar.value = 0.3;//设置 progressBar 的进度值。\n     *         this.progressBar.width = 200;//设置 progressBar 的宽度。\n     *         this.progressBar.height = 50;//设置 progressBar 的高度。\n     *         this.progressBar.sizeGrid = \"5,10,5,10\";//设置 progressBar 的网格信息。\n     *         this.progressBar.changeHandler = new Handler(this, this.onChange);//设置 progressBar 的value值改变时执行的处理器。\n     *         Laya.stage.addChild(this.progressBar);//将 progressBar 添加到显示列表。\n     *         Laya.timer.once(3000, this, this.changeValue);//设定 3000ms（毫秒）后，执行函数changeValue。\n     *     }\n     *     private changeValue(): void {\n     *         console.log(\"改变进度条的进度值。\");\n     *         this.progressBar.value = 0.6;\n     *     }\n     *     private onChange(value: number): void {\n     *         console.log(\"进度发生改变： value=\", value);\n     *     }\n     * }\n     */\n    class ProgressBar extends Component {\n        /**\n         * 当 <code>ProgressBar</code> 实例的 <code>value</code> 属性发生变化时的函数处理器。\n         * <p>默认返回参数<code>value</code> 属性（进度值）。</p>\n         */\n        changeHandler: Handler;\n        protected _bg: Image;\n        protected _bar: Image;\n        protected _skin: string;\n        protected _value: number;\n        /**\n         * 创建一个新的 <code>ProgressBar</code> 类实例。\n         * @param skin 皮肤地址。\n         */\n        constructor(skin?: string);\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        /**\n         * @copy laya.ui.Image#skin\n         */\n        skin: string;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        /**\n         * 当前的进度量。\n         * <p><b>取值：</b>介于0和1之间。</p>\n         */\n        value: number;\n        protected changeValue(): void;\n        /**\n         * 获取进度条对象。\n         */\n        readonly bar: Image;\n        /**\n         * 获取背景条对象。\n         */\n        readonly bg: Image;\n        /**\n         * <p>当前 <code>ProgressBar</code> 实例的进度条背景位图（ <code>Image</code> 实例）的有效缩放网格数据。</p>\n         * <p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n         * <ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n         * @see laya.ui.AutoBitmap.sizeGrid\n         */\n        sizeGrid: string;\n        /**@inheritDoc */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        /**@inheritDoc */\n        dataSource: any;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    import Button = laya.ui.Button;\n    /**\n     * <code>Radio</code> 控件使用户可在一组互相排斥的选择中做出一种选择。\n     * 用户一次只能选择 <code>Radio</code> 组中的一个成员。选择未选中的组成员将取消选择该组中当前所选的 <code>Radio</code> 控件。\n     * @see laya.ui.RadioGroup\n     */\n    class Radio extends Button {\n        protected _value: any;\n        /**\n         * 创建一个新的 <code>Radio</code> 类实例。\n         * @param skin 皮肤。\n         * @param label 标签。\n         */\n        constructor(skin?: string, label?: string);\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected preinitialize(): void;\n        protected initialize(): void;\n        protected onClick(e: Event): void;\n        /**\n         * 获取或设置 <code>Radio</code> 关联的可选用户定义值。\n         */\n        value: any;\n    }\n}\ndeclare module laya.ui {\n    import Sprite = laya.display.Sprite;\n    /**\n     * <code>RadioGroup</code> 控件定义一组 <code>Radio</code> 控件，这些控件相互排斥；\n     * 因此，用户每次只能选择一个 <code>Radio</code> 控件。\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>RadioGroup</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.Radio;\n     *\t\timport laya.ui.RadioGroup;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class RadioGroup_Example\n     *\t\t{\n     *\t\t\tpublic function RadioGroup_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/radio.png\"], Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tvar radioGroup:RadioGroup = new RadioGroup();//创建一个 RadioGroup 类的实例对象 radioGroup 。\n     *\t\t\t\tradioGroup.pos(100, 100);//设置 radioGroup 的位置信息。\n     *\t\t\t\tradioGroup.labels = \"item0,item1,item2\";//设置 radioGroup 的标签集。\n     *\t\t\t\tradioGroup.skin = \"resource/ui/radio.png\";//设置 radioGroup 的皮肤。\n     *\t\t\t\tradioGroup.space = 10;//设置 radioGroup 的项间隔距离。\n     *\t\t\t\tradioGroup.selectHandler = new Handler(this, onSelect);//设置 radioGroup 的选择项发生改变时执行的处理器。\n     *\t\t\t\tLaya.stage.addChild(radioGroup);//将 radioGroup 添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onSelect(index:int):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"当前选择的单选按钮索引: index= \", index);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高、渲染模式\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * Laya.loader.load([\"resource/ui/radio.png\"], laya.utils.Handler.create(this, onLoadComplete));\n     * function onLoadComplete() {\n     *     var radioGroup= new laya.ui.RadioGroup();//创建一个 RadioGroup 类的实例对象 radioGroup 。\n     *     radioGroup.pos(100, 100);//设置 radioGroup 的位置信息。\n     *     radioGroup.labels = \"item0,item1,item2\";//设置 radioGroup 的标签集。\n     *     radioGroup.skin = \"resource/ui/radio.png\";//设置 radioGroup 的皮肤。\n     *     radioGroup.space = 10;//设置 radioGroup 的项间隔距离。\n     *     radioGroup.selectHandler = new laya.utils.Handler(this, onSelect);//设置 radioGroup 的选择项发生改变时执行的处理器。\n     *     Laya.stage.addChild(radioGroup);//将 radioGroup 添加到显示列表。\n     * }\n     * function onSelect(index) {\n     *     console.log(\"当前选择的单选按钮索引: index= \", index);\n     * }\n     * @example\n     * import Radio = laya.ui.Radio;\n     * import RadioGroup = laya.ui.RadioGroup;\n     * import Handler = laya.utils.Handler;\n     * class RadioGroup_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/radio.png\"], Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         var radioGroup: RadioGroup = new RadioGroup();//创建一个 RadioGroup 类的实例对象 radioGroup 。\n     *         radioGroup.pos(100, 100);//设置 radioGroup 的位置信息。\n     *         radioGroup.labels = \"item0,item1,item2\";//设置 radioGroup 的标签集。\n     *         radioGroup.skin = \"resource/ui/radio.png\";//设置 radioGroup 的皮肤。\n     *         radioGroup.space = 10;//设置 radioGroup 的项间隔距离。\n     *         radioGroup.selectHandler = new Handler(this, this.onSelect);//设置 radioGroup 的选择项发生改变时执行的处理器。\n     *         Laya.stage.addChild(radioGroup);//将 radioGroup 添加到显示列表。\n     *     }\n     *     private onSelect(index: number): void {\n     *         console.log(\"当前选择的单选按钮索引: index= \", index);\n     *     }\n     * }\n     */\n    class RadioGroup extends UIGroup {\n        protected createItem(skin: string, label: string): Sprite;\n    }\n}\ndeclare module laya.ui {\n    import Sprite = laya.display.Sprite;\n    import Event = laya.events.Event;\n    import Point = laya.maths.Point;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>ScrollBar</code> 组件是一个滚动条组件。\n     * <p>当数据太多以至于显示区域无法容纳时，最终用户可以使用 <code>ScrollBar</code> 组件控制所显示的数据部分。</p>\n     * <p> 滚动条由四部分组成：两个箭头按钮、一个轨道和一个滑块。 </p>\t *\n     *\n     * @see laya.ui.VScrollBar\n     * @see laya.ui.HScrollBar\n     */\n    class ScrollBar extends Component {\n        /**滚动衰减系数*/\n        rollRatio: number;\n        /**滚动变化时回调，回传value参数。*/\n        changeHandler: Handler;\n        /**是否缩放滑动条，默认值为true。 */\n        scaleBar: boolean;\n        /**一个布尔值，指定是否自动隐藏滚动条(无需滚动时)，默认值为false。*/\n        autoHide: boolean;\n        /**橡皮筋效果极限距离，0为没有橡皮筋效果。*/\n        elasticDistance: number;\n        /**橡皮筋回弹时间，单位为毫秒。*/\n        elasticBackTime: number;\n        /**上按钮 */\n        upButton: Button;\n        /**下按钮 */\n        downButton: Button;\n        /**滑条 */\n        slider: Slider;\n        protected _showButtons: boolean;\n        protected _scrollSize: number;\n        protected _skin: string;\n        protected _thumbPercent: number;\n        protected _target: Sprite;\n        protected _lastPoint: Point;\n        protected _lastOffset: number;\n        protected _checkElastic: boolean;\n        protected _isElastic: boolean;\n        protected _value: number;\n        protected _hide: boolean;\n        protected _clickOnly: boolean;\n        protected _offsets: Array<any>;\n        protected _touchScrollEnable: boolean;\n        protected _mouseWheelEnable: boolean;\n        /**\n         * 创建一个新的 <code>ScrollBar</code> 实例。\n         * @param skin 皮肤资源地址。\n         */\n        constructor(skin?: string);\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        protected initialize(): void;\n        protected onSliderChange(): void;\n        protected onButtonMouseDown(e: Event): void;\n        protected startLoop(isUp: boolean): void;\n        protected slide(isUp: boolean): void;\n        protected onStageMouseUp(e: Event): void;\n        /**\n         * @copy laya.ui.Image#skin\n         */\n        skin: string;\n        protected changeScrollBar(): void;\n        protected changeSize(): void;\n        protected resetButtonPosition(): void;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        /**\n         * 设置滚动条信息。\n         * @param min 滚动条最小位置值。\n         * @param max 滚动条最大位置值。\n         * @param value 滚动条当前位置值。\n         */\n        setScroll(min: number, max: number, value: number): void;\n        /**\n         * 获取或设置表示最高滚动位置的数字。\n         */\n        max: number;\n        /**\n         * 获取或设置表示最低滚动位置的数字。\n         */\n        min: number;\n        /**\n         * 获取或设置表示当前滚动位置的数字。\n         */\n        value: number;\n        /**\n         * 一个布尔值，指示滚动条是否为垂直滚动。如果值为true，则为垂直滚动，否则为水平滚动。\n         * <p>默认值为：true。</p>\n         */\n        isVertical: boolean;\n        /**\n         * <p>当前实例的 <code>Slider</code> 实例的有效缩放网格数据。</p>\n         * <p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n         * <ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n         * @see laya.ui.AutoBitmap.sizeGrid\n         */\n        sizeGrid: string;\n        /**获取或设置一个值，该值表示按下滚动条轨道时页面滚动的增量。 */\n        scrollSize: number;\n        /**@inheritDoc */\n        dataSource: any;\n        /**获取或设置一个值，该值表示滑条长度比例，值为：（0-1）。 */\n        thumbPercent: number;\n        /**\n         * 设置滚动对象。\n         * @see laya.ui.TouchScroll#target\n         */\n        target: Sprite;\n        /**是否隐藏滚动条，不显示滚动条，但是可以正常滚动，默认为false。*/\n        hide: boolean;\n        /**一个布尔值，指定是否显示向上、向下按钮，默认值为true。*/\n        showButtons: boolean;\n        /**一个布尔值，指定是否开启触摸，默认值为true。*/\n        touchScrollEnable: boolean;\n        /** 一个布尔值，指定是否滑轮滚动，默认值为true。*/\n        mouseWheelEnable: boolean;\n        protected onTargetMouseWheel(e: Event): void;\n        protected onTargetMouseDown(e: Event): void;\n        protected loop(): void;\n        protected onStageMouseUp2(e: Event): void;\n        protected tweenMove(maxDistance: number): void;\n        /**\n         * 停止滑动。\n         */\n        stopScroll(): void;\n        /**\n         * 滚动的刻度值，滑动数值为tick的整数倍。默认值为1。\n         */\n        tick: number;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    import Point = laya.maths.Point;\n    import Handler = laya.utils.Handler;\n    /**\n     * 使用 <code>Slider</code> 控件，用户可以通过在滑块轨道的终点之间移动滑块来选择值。\n     * <p>滑块的当前值由滑块端点（对应于滑块的最小值和最大值）之间滑块的相对位置确定。</p>\n     * <p>滑块允许最小值和最大值之间特定间隔内的值。滑块还可以使用数据提示显示其当前值。</p>\n     *\n     * @see laya.ui.HSlider\n     * @see laya.ui.VSlider\n     */\n    class Slider extends Component {\n        static label: Label;\n        /**\n         * 数据变化处理器。\n         * <p>默认回调参数为滑块位置属性 <code>value</code>属性值：Number 。</p>\n         */\n        changeHandler: Handler;\n        /**\n         * 一个布尔值，指示是否为垂直滚动。如果值为true，则为垂直方向，否则为水平方向。\n         * <p>默认值为：true。</p>\n         * @default true\n         */\n        isVertical: boolean;\n        /**\n         * 一个布尔值，指示是否显示标签。\n         * @default true\n         */\n        showLabel: boolean;\n        protected _allowClickBack: boolean;\n        protected _max: number;\n        protected _min: number;\n        protected _tick: number;\n \n        protected _skin: string;\n        protected _bg: Image;\n        protected _progress: Image;\n        protected _bar: Button;\n        protected _tx: number;\n        protected _ty: number;\n        protected _maxMove: number;\n        protected _globalSacle: Point;\n        /**\n         * 创建一个新的 <code>Slider</code> 类示例。\n         * @param skin 皮肤。\n         */\n        constructor(skin?: string);\n        /**\n         *@inheritDoc\n         */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        protected initialize(): void;\n        protected onBarMouseDown(e: Event): void;\n        protected showValueText(): void;\n        protected hideValueText(): void;\n        protected sendChangeEvent(type?: string): void;\n        /**\n         * @copy laya.ui.Image#skin\n         */\n        skin: string;\n        protected setBarPoint(): void;\n        protected readonly measureWidth: number;\n        protected readonly measureHeight: number;\n        protected changeSize(): void;\n        /**\n         * <p>当前实例的背景图（ <code>Image</code> ）和滑块按钮（ <code>Button</code> ）实例的有效缩放网格数据。</p>\n         * <p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n         * <ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n         * @see laya.ui.AutoBitmap.sizeGrid\n         */\n        sizeGrid: string;\n        /**\n         * 设置滑动条的信息。\n         * @param min 滑块的最小值。\n         * @param max 滑块的最小值。\n         * @param value 滑块的当前值。\n         */\n        setSlider(min: number, max: number, value: number): void;\n        /**\n         * 滑动的刻度值，滑动数值为tick的整数倍。默认值为1。\n         */\n        tick: number;\n        /**\n         * @private\n         * 改变滑块的位置值。\n         */\n        changeValue(): void;\n        /**\n         * 获取或设置表示最高位置的数字。 默认值为100。\n         */\n        max: number;\n        /**\n         * 获取或设置表示最低位置的数字。 默认值为0。\n         */\n        min: number;\n        /**\n         * 获取或设置表示当前滑块位置的数字。\n         */\n        value: number;\n        /**\n         * 一个布尔值，指定是否允许通过点击滑动条改变 <code>Slider</code> 的 <code>value</code> 属性值。\n         */\n        allowClickBack: boolean;\n        protected onBgMouseDown(e: Event): void;\n        /**@inheritDoc */\n        dataSource: any;\n        /**\n         * 表示滑块按钮的引用。\n         */\n        readonly bar: Button;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * <code>Styles</code> 定义了组件常用的样式属性。\n     */\n    class Styles {\n        /**\n         * 默认九宫格信息。\n         * @see laya.ui.AutoBitmap#sizeGrid\n         */\n        static defaultSizeGrid: Array<any>;\n        /**\n         * 标签颜色。\n         */\n        static labelColor: string;\n        /**\n         * 标签的边距。\n         * <p><b>格式：</b>[上边距，右边距，下边距，左边距]。</p>\n         */\n        static labelPadding: Array<any>;\n        /**\n         * 标签的边距。\n         * <p><b>格式：</b>[上边距，右边距，下边距，左边距]。</p>\n         */\n        static inputLabelPadding: Array<any>;\n        /**\n         * 按钮皮肤的状态数，支持1,2,3三种状态值。\n         */\n        static buttonStateNum: number;\n        /**\n         * 按钮标签颜色。\n         * <p><b>格式：</b>[upColor,overColor,downColor,disableColor]。</p>\n         */\n        static buttonLabelColors: Array<any>;\n        /**\n         * 下拉框项颜色。\n         * <p><b>格式：</b>[overBgColor,overLabelColor,outLabelColor,borderColor,bgColor]。</p>\n         */\n        static comboBoxItemColors: Array<any>;\n        /**\n         * 滚动条的最小值。\n         */\n        static scrollBarMinNum: number;\n        /**\n         * 长按按钮，等待时间，使其可激活连续滚动。\n         */\n        static scrollBarDelayTime: number;\n    }\n}\ndeclare module laya.ui {\n    import Sprite = laya.display.Sprite;\n    import UIGroup = laya.ui.UIGroup;\n    /**\n     * <code>Tab</code> 组件用来定义选项卡按钮组。\t *\n     * @internal <p>属性：<code>selectedIndex</code> 的默认值为-1。</p>\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>Tab</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.Tab;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class Tab_Example\n     *\t\t{\n     *\t\t\tpublic function Tab_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/tab.png\"], Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tvar tab:Tab = new Tab();//创建一个 Tab 类的实例对象 tab 。\n     *\t\t\t\ttab.skin = \"resource/ui/tab.png\";//设置 tab 的皮肤。\n     *\t\t\t\ttab.labels = \"item0,item1,item2\";//设置 tab 的标签集。\n     *\t\t\t\ttab.x = 100;//设置 tab 对象的属性 x 的值，用于控制 tab 对象的显示位置。\n     *\t\t\t\ttab.y = 100;//设置 tab 对象的属性 y 的值，用于控制 tab 对象的显示位置。\n     *\t\t\t\ttab.selectHandler = new Handler(this, onSelect);//设置 tab 的选择项发生改变时执行的处理器。\n     *\t\t\t\tLaya.stage.addChild(tab);//将 tab 添到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onSelect(index:int):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"当前选择的表情页索引: index= \", index);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * Laya.loader.load([\"resource/ui/tab.png\"], laya.utils.Handler.create(this, onLoadComplete));\n     * function onLoadComplete() {\n     *     var tab = new laya.ui.Tab();//创建一个 Tab 类的实例对象 tab 。\n     *     tab.skin = \"resource/ui/tab.png\";//设置 tab 的皮肤。\n     *     tab.labels = \"item0,item1,item2\";//设置 tab 的标签集。\n     *     tab.x = 100;//设置 tab 对象的属性 x 的值，用于控制 tab 对象的显示位置。\n     *     tab.y = 100;//设置 tab 对象的属性 y 的值，用于控制 tab 对象的显示位置。\n     *     tab.selectHandler = new laya.utils.Handler(this, onSelect);//设置 tab 的选择项发生改变时执行的处理器。\n     *     Laya.stage.addChild(tab);//将 tab 添到显示列表。\n     * }\n     * function onSelect(index) {\n     *     console.log(\"当前选择的标签页索引: index= \", index);\n     * }\n     * @example\n     * import Tab = laya.ui.Tab;\n     * import Handler = laya.utils.Handler;\n     * class Tab_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/tab.png\"], Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         var tab: Tab = new Tab();//创建一个 Tab 类的实例对象 tab 。\n     *         tab.skin = \"resource/ui/tab.png\";//设置 tab 的皮肤。\n     *         tab.labels = \"item0,item1,item2\";//设置 tab 的标签集。\n     *         tab.x = 100;//设置 tab 对象的属性 x 的值，用于控制 tab 对象的显示位置。\n     *         tab.y = 100;//设置 tab 对象的属性 y 的值，用于控制 tab 对象的显示位置。\n     *         tab.selectHandler = new Handler(this, this.onSelect);//设置 tab 的选择项发生改变时执行的处理器。\n     *         Laya.stage.addChild(tab);//将 tab 添到显示列表。\n     *     }\n     *     private onSelect(index: number): void {\n     *         console.log(\"当前选择的表情页索引: index= \", index);\n     *     }\n     * }\n     */\n    class Tab extends UIGroup {\n        protected createItem(skin: string, label: string): Sprite;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    /**\n     * <code>TextArea</code> 类用于创建显示对象以显示和输入文本。\n     * @example <caption>以下示例代码，创建了一个 <code>TextArea</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.TextArea;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class TextArea_Example\n     *\t\t{\n     *\t\t\tpublic function TextArea_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/input.png\"], Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tvar textArea:TextArea = new TextArea(\"这个一个TextArea实例。\");//创建一个 TextArea 类的实例对象 textArea 。\n     *\t\t\t\ttextArea.skin = \"resource/ui/input.png\";//设置 textArea 的皮肤。\n     *\t\t\t\ttextArea.sizeGrid = \"4,4,4,4\";//设置 textArea 的网格信息。\n     *\t\t\t\ttextArea.color = \"#008fff\";//设置 textArea 的文本颜色。\n     *\t\t\t\ttextArea.font = \"Arial\";//设置 textArea 的字体。\n     *\t\t\t\ttextArea.bold = true;//设置 textArea 的文本显示为粗体。\n     *\t\t\t\ttextArea.fontSize = 20;//设置 textArea 的文本字体大小。\n     *\t\t\t\ttextArea.wordWrap = true;//设置 textArea 的文本自动换行。\n     *\t\t\t\ttextArea.x = 100;//设置 textArea 对象的属性 x 的值，用于控制 textArea 对象的显示位置。\n     *\t\t\t\ttextArea.y = 100;//设置 textArea 对象的属性 y 的值，用于控制 textArea 对象的显示位置。\n     *\t\t\t\ttextArea.width = 300;//设置 textArea 的宽度。\n     *\t\t\t\ttextArea.height = 200;//设置 textArea 的高度。\n     *\t\t\t\tLaya.stage.addChild(textArea);//将 textArea 添加到显示列表。\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高、渲染模式\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * Laya.loader.load([\"resource/ui/input.png\"], laya.utils.Handler.create(this, onLoadComplete));//加载资源。\n     * function onLoadComplete() {\n     *     var textArea = new laya.ui.TextArea(\"这个一个TextArea实例。\");//创建一个 TextArea 类的实例对象 textArea 。\n     *     textArea.skin = \"resource/ui/input.png\";//设置 textArea 的皮肤。\n     *     textArea.sizeGrid = \"4,4,4,4\";//设置 textArea 的网格信息。\n     *     textArea.color = \"#008fff\";//设置 textArea 的文本颜色。\n     *     textArea.font = \"Arial\";//设置 textArea 的字体。\n     *     textArea.bold = true;//设置 textArea 的文本显示为粗体。\n     *     textArea.fontSize = 20;//设置 textArea 的文本字体大小。\n     *     textArea.wordWrap = true;//设置 textArea 的文本自动换行。\n     *     textArea.x = 100;//设置 textArea 对象的属性 x 的值，用于控制 textArea 对象的显示位置。\n     *     textArea.y = 100;//设置 textArea 对象的属性 y 的值，用于控制 textArea 对象的显示位置。\n     *     textArea.width = 300;//设置 textArea 的宽度。\n     *     textArea.height = 200;//设置 textArea 的高度。\n     *     Laya.stage.addChild(textArea);//将 textArea 添加到显示列表。\n     * }\n     * @example\n     * import TextArea = laya.ui.TextArea;\n     * import Handler = laya.utils.Handler;\n     * class TextArea_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/input.png\"], Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n    \n     *     private onLoadComplete(): void {\n     *         var textArea: TextArea = new TextArea(\"这个一个TextArea实例。\");//创建一个 TextArea 类的实例对象 textArea 。\n     *         textArea.skin = \"resource/ui/input.png\";//设置 textArea 的皮肤。\n     *         textArea.sizeGrid = \"4,4,4,4\";//设置 textArea 的网格信息。\n     *         textArea.color = \"#008fff\";//设置 textArea 的文本颜色。\n     *         textArea.font = \"Arial\";//设置 textArea 的字体。\n     *         textArea.bold = true;//设置 textArea 的文本显示为粗体。\n     *         textArea.fontSize = 20;//设置 textArea 的文本字体大小。\n     *         textArea.wordWrap = true;//设置 textArea 的文本自动换行。\n     *         textArea.x = 100;//设置 textArea 对象的属性 x 的值，用于控制 textArea 对象的显示位置。\n     *         textArea.y = 100;//设置 textArea 对象的属性 y 的值，用于控制 textArea 对象的显示位置。\n     *         textArea.width = 300;//设置 textArea 的宽度。\n     *         textArea.height = 200;//设置 textArea 的高度。\n     *         Laya.stage.addChild(textArea);//将 textArea 添加到显示列表。\n     *     }\n     * }\n     */\n    class TextArea extends TextInput {\n        protected _vScrollBar: VScrollBar;\n        protected _hScrollBar: HScrollBar;\n        /**\n         * <p>创建一个新的 <code>TextArea</code> 示例。</p>\n         * @param text 文本内容字符串。\n         */\n        constructor(text?: string);\n        destroy(destroyChild?: boolean): void;\n        protected initialize(): void;\n        width: number;\n        height: number;\n        /**垂直滚动条皮肤*/\n        vScrollBarSkin: string;\n        /**水平滚动条皮肤*/\n        hScrollBarSkin: string;\n        protected onVBarChanged(e: Event): void;\n        protected onHBarChanged(e: Event): void;\n        /**垂直滚动条实体*/\n        readonly vScrollBar: VScrollBar;\n        /**水平滚动条实体*/\n        readonly hScrollBar: HScrollBar;\n        /**垂直滚动最大值*/\n        readonly maxScrollY: number;\n        /**垂直滚动值*/\n        readonly scrollY: number;\n        /**水平滚动最大值*/\n        readonly maxScrollX: number;\n        /**水平滚动值*/\n        readonly scrollX: number;\n        /**滚动到某个位置*/\n        scrollTo(y: number): void;\n    }\n}\ndeclare module laya.ui {\n    import AutoBitmap = laya.ui.AutoBitmap;\n    /**\n     * <code>TextInput</code> 类用于创建显示对象以显示和输入文本。\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>TextInput</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.display.Stage;\n     *\t\timport laya.ui.TextInput;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class TextInput_Example\n     *\t\t{\n     *\t\t\tpublic function TextInput_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/input.png\"], Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tvar textInput:TextInput = new TextInput(\"这是一个TextInput实例。\");//创建一个 TextInput 类的实例对象 textInput 。\n     *\t\t\t\ttextInput.skin = \"resource/ui/input.png\";//设置 textInput 的皮肤。\n     *\t\t\t\ttextInput.sizeGrid = \"4,4,4,4\";//设置 textInput 的网格信息。\n     *\t\t\t\ttextInput.color = \"#008fff\";//设置 textInput 的文本颜色。\n     *\t\t\t\ttextInput.font = \"Arial\";//设置 textInput 的文本字体。\n     *\t\t\t\ttextInput.bold = true;//设置 textInput 的文本显示为粗体。\n     *\t\t\t\ttextInput.fontSize = 30;//设置 textInput 的字体大小。\n     *\t\t\t\ttextInput.wordWrap = true;//设置 textInput 的文本自动换行。\n     *\t\t\t\ttextInput.x = 100;//设置 textInput 对象的属性 x 的值，用于控制 textInput 对象的显示位置。\n     *\t\t\t\ttextInput.y = 100;//设置 textInput 对象的属性 y 的值，用于控制 textInput 对象的显示位置。\n     *\t\t\t\ttextInput.width = 300;//设置 textInput 的宽度。\n     *\t\t\t\ttextInput.height = 200;//设置 textInput 的高度。\n     *\t\t\t\tLaya.stage.addChild(textInput);//将 textInput 添加到显示列表。\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * Laya.loader.load([\"resource/ui/input.png\"], laya.utils.Handler.create(this, onLoadComplete));//加载资源。\n     * function onLoadComplete() {\n     *     var textInput = new laya.ui.TextInput(\"这是一个TextInput实例。\");//创建一个 TextInput 类的实例对象 textInput 。\n     *     textInput.skin = \"resource/ui/input.png\";//设置 textInput 的皮肤。\n     *     textInput.sizeGrid = \"4,4,4,4\";//设置 textInput 的网格信息。\n     *     textInput.color = \"#008fff\";//设置 textInput 的文本颜色。\n     *     textInput.font = \"Arial\";//设置 textInput 的文本字体。\n     *     textInput.bold = true;//设置 textInput 的文本显示为粗体。\n     *     textInput.fontSize = 30;//设置 textInput 的字体大小。\n     *     textInput.wordWrap = true;//设置 textInput 的文本自动换行。\n     *     textInput.x = 100;//设置 textInput 对象的属性 x 的值，用于控制 textInput 对象的显示位置。\n     *     textInput.y = 100;//设置 textInput 对象的属性 y 的值，用于控制 textInput 对象的显示位置。\n     *     textInput.width = 300;//设置 textInput 的宽度。\n     *     textInput.height = 200;//设置 textInput 的高度。\n     *     Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。\n     * }\n     * @example\n     * import Stage = laya.display.Stage;\n     * import TextInput = laya.ui.TextInput;\n     * import Handler = laya.utils.Handler;\n     * class TextInput_Example {\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/input.png\"], Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         var textInput: TextInput = new TextInput(\"这是一个TextInput实例。\");//创建一个 TextInput 类的实例对象 textInput 。\n     *         textInput.skin = \"resource/ui/input.png\";//设置 textInput 的皮肤。\n     *         textInput.sizeGrid = \"4,4,4,4\";//设置 textInput 的网格信息。\n     *         textInput.color = \"#008fff\";//设置 textInput 的文本颜色。\n     *         textInput.font = \"Arial\";//设置 textInput 的文本字体。\n     *         textInput.bold = true;//设置 textInput 的文本显示为粗体。\n     *         textInput.fontSize = 30;//设置 textInput 的字体大小。\n     *         textInput.wordWrap = true;//设置 textInput 的文本自动换行。\n     *         textInput.x = 100;//设置 textInput 对象的属性 x 的值，用于控制 textInput 对象的显示位置。\n     *         textInput.y = 100;//设置 textInput 对象的属性 y 的值，用于控制 textInput 对象的显示位置。\n     *         textInput.width = 300;//设置 textInput 的宽度。\n     *         textInput.height = 200;//设置 textInput 的高度。\n     *         Laya.stage.addChild(textInput);//将 textInput 添加到显示列表。\n     *     }\n     * }\n     */\n    class TextInput extends Label {\n        protected _bg: AutoBitmap;\n        protected _skin: string;\n        /**\n         * 创建一个新的 <code>TextInput</code> 类实例。\n         * @param text 文本内容。\n         */\n        constructor(text?: string);\n        protected preinitialize(): void;\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        protected initialize(): void;\n        /**\n         * 表示此对象包含的文本背景 <code>AutoBitmap</code> 组件实例。\n         */\n        bg: AutoBitmap;\n        /**\n         * @copy laya.ui.Image#skin\n         */\n        skin: string;\n        /**\n         * <p>当前实例的背景图（ <code>AutoBitmap</code> ）实例的有效缩放网格数据。</p>\n         * <p>数据格式：\"上边距,右边距,下边距,左边距,是否重复填充(值为0：不重复填充，1：重复填充)\"，以逗号分隔。\n         * <ul><li>例如：\"4,4,4,4,1\"</li></ul></p>\n         * @see laya.ui.AutoBitmap.sizeGrid\n         */\n        sizeGrid: string;\n        /**\n         * 当前文本内容字符串。\n         * @see laya.display.Text.text\n         */\n        text: string;\n        /**@inheritDoc */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        /**\n         * <p>指示当前是否是文本域。</p>\n         * 值为true表示当前是文本域，否则不是文本域。\n         */\n        multiline: boolean;\n        /**\n         * 设置可编辑状态。\n         */\n        editable: boolean;\n        /**\n         * 设置原生input输入框的x坐标偏移。\n         */\n        inputElementXAdjuster: number;\n        /**\n         * 设置原生input输入框的y坐标偏移。\n         */\n        inputElementYAdjuster: number;\n        /**选中输入框内的文本。*/\n        select(): void;\n        /**限制输入的字符。*/\n        restrict: string;\n        /**\n         * @copy laya.display.Input#prompt\n         */\n        prompt: string;\n        /**\n         * @copy laya.display.Input#promptColor\n         */\n        promptColor: string;\n        /**\n         * @copy laya.display.Input#maxChars\n         */\n        maxChars: number;\n        /**\n         * @copy laya.display.Input#focus\n         */\n        focus: boolean;\n        /**\n         * @copy laya.display.Input#type\n         */\n        type: string;\n        /**\n         * @copy laya.display.Input#asPassword\n         */\n        asPassword: boolean;\n        setSelection(startIndex: number, endIndex: number): void;\n    }\n}\ndeclare module laya.ui {\n    import Sprite = laya.display.Sprite;\n    import Component = laya.ui.Component;\n    /**鼠标提示管理类*/\n    class TipManager extends Component {\n        static offsetX: number;\n        static offsetY: number;\n        static tipTextColor: string;\n        static tipBackColor: string;\n        static tipDelay: number;\n        constructor();\n        /**关闭所有鼠标提示*/\n        closeAll(): void;\n        /**\n         * 显示显示对象类型的tip\n         */\n        showDislayTip(tip: Sprite): void;\n        /**默认鼠标提示函数*/\n        defaultTipHandler: Function;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>Tree</code> 控件使用户可以查看排列为可扩展树的层次结构数据。\n     *\n     * @example\n     * package\n     *\t{\n     *\t\timport laya.ui.Tree;\n     *\t\timport laya.utils.Browser;\n     *\t\timport laya.utils.Handler;\n    \n     *\t\tpublic class Tree_Example\n     *\t\t{\n    \n     *\t\t\tpublic function Tree_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\", \"resource/ui/clip_selectBox.png\", \"resource/ui/clip_tree_folder.png\", \"resource/ui/clip_tree_arrow.png\"], Handler.create(this, onLoadComplete));\n     *\t\t\t}\n    \n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tvar xmlString:String;//创建一个xml字符串，用于存储树结构数据。\n     *\t\t\t\txmlString = \"&lt;root&gt;&lt;item label='box1'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;abc label='child5'/&gt;&lt;/item&gt;&lt;item label='box2'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;/item&gt;&lt;/root&gt;\";\n     *\t\t\t\tvar domParser:* = new Browser.window.DOMParser();//创建一个DOMParser实例domParser。\n     *\t\t\t\tvar xml:* = domParser.parseFromString(xmlString, \"text/xml\");//解析xml字符。\n    \n     *\t\t\t\tvar tree:Tree = new Tree();//创建一个 Tree 类的实例对象 tree 。\n     *\t\t\t\ttree.scrollBarSkin = \"resource/ui/vscroll.png\";//设置 tree 的皮肤。\n     *\t\t\t\ttree.itemRender = Item;//设置 tree 的项渲染器。\n     *\t\t\t\ttree.xml = xml;//设置 tree 的树结构数据。\n     *\t\t\t\ttree.x = 100;//设置 tree 对象的属性 x 的值，用于控制 tree 对象的显示位置。\n     *\t\t\t\ttree.y = 100;//设置 tree 对象的属性 y 的值，用于控制 tree 对象的显示位置。\n     *\t\t\t\ttree.width = 200;//设置 tree 的宽度。\n     *\t\t\t\ttree.height = 100;//设置 tree 的高度。\n     *\t\t\t\tLaya.stage.addChild(tree);//将 tree 添加到显示列表。\n     *\t\t\t}\n     *\t\t}\n     *\t}\n    \n     * import laya.ui.Box;\n     * import laya.ui.Clip;\n     * import laya.ui.Label;\n     *\tclass Item extends Box\n     *\t{\n     *\t\tpublic function Item()\n     *\t\t{\n     *\t\t\tthis.name = \"render\";\n     *\t\t\tthis.right = 0;\n     *\t\t\tthis.left = 0;\n    \n     *\t\t\tvar selectBox:Clip = new Clip(\"resource/ui/clip_selectBox.png\", 1, 2);\n     *\t\t\tselectBox.name = \"selectBox\";\n     *\t\t\tselectBox.height = 24;\n     *\t\t\tselectBox.x = 13;\n     *\t\t\tselectBox.y = 0;\n     *\t\t\tselectBox.left = 12;\n     *\t\t\taddChild(selectBox);\n    \n     *\t\t\tvar folder:Clip = new Clip(\"resource/ui/clip_tree_folder.png\", 1, 3);\n     *\t\t\tfolder.name = \"folder\";\n     *\t\t\tfolder.x = 14;\n     *\t\t\tfolder.y = 4;\n     *\t\t\taddChild(folder);\n    \n     *\t\t\tvar label:Label = new Label(\"treeItem\");\n     *\t\t\tlabel.name = \"label\";\n     *\t\t\tlabel.color = \"#ffff00\";\n     *\t\t\tlabel.width = 150;\n     *\t\t\tlabel.height = 22;\n     *\t\t\tlabel.x = 33;\n     *\t\t\tlabel.y = 1;\n     *\t\t\tlabel.left = 33;\n     *\t\t\tlabel.right = 0;\n     *\t\t\taddChild(label);\n    \n     *\t\t\tvar arrow:Clip = new Clip(\"resource/ui/clip_tree_arrow.png\", 1, 2);\n     *\t\t\tarrow.name = \"arrow\";\n     *\t\t\tarrow.x = 0;\n     *\t\t\tarrow.y = 5;\n     *\t\t\taddChild(arrow);\n     *\t\t}\n     *\t }\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高、渲染模式\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * var res = [\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\", \"resource/ui/clip_selectBox.png\", \"resource/ui/clip_tree_folder.png\", \"resource/ui/clip_tree_arrow.png\"];\n     * Laya.loader.load(res, new laya.utils.Handler(this, onLoadComplete));\n     * function onLoadComplete() {\n     *     var xmlString;//创建一个xml字符串，用于存储树结构数据。\n     *     xmlString = \"&lt;root&gt;&lt;item label='box1'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;abc label='child5'/&gt;&lt;/item&gt;&lt;item label='box2'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;/item&gt;&lt;/root&gt;\";\n     *     var domParser = new laya.utils.Browser.window.DOMParser();//创建一个DOMParser实例domParser。\n     *     var xml = domParser.parseFromString(xmlString, \"text/xml\");//解析xml字符。\n    \n     *     var tree = new laya.ui.Tree();//创建一个 Tree 类的实例对象 tree 。\n     *     tree.scrollBarSkin = \"resource/ui/vscroll.png\";//设置 tree 的皮肤。\n     *     tree.itemRender = mypackage.treeExample.Item;//设置 tree 的项渲染器。\n     *     tree.xml = xml;//设置 tree 的树结构数据。\n     *     tree.x = 100;//设置 tree 对象的属性 x 的值，用于控制 tree 对象的显示位置。\n     *     tree.y = 100;//设置 tree 对象的属性 y 的值，用于控制 tree 对象的显示位置。\n     *     tree.width = 200;//设置 tree 的宽度。\n     *     tree.height = 100;//设置 tree 的高度。\n     *     Laya.stage.addChild(tree);//将 tree 添加到显示列表。\n     * }\n     * (function (_super) {\n     *     function Item() {\n     *         Item.__super.call(this);//初始化父类。\n     *         this.right = 0;\n     *         this.left = 0;\n    \n     *         var selectBox = new laya.ui.Clip(\"resource/ui/clip_selectBox.png\", 1, 2);\n     *         selectBox.name = \"selectBox\";//设置 selectBox 的name 为“selectBox”时，将被识别为树结构的项的背景。2帧：悬停时背景、选中时背景。\n     *         selectBox.height = 24;\n     *         selectBox.x = 13;\n     *         selectBox.y = 0;\n     *         selectBox.left = 12;\n     *         this.addChild(selectBox);//需要使用this.访问父类的属性或方法。\n    \n     *         var folder = new laya.ui.Clip(\"resource/ui/clip_tree_folder.png\", 1, 3);\n     *         folder.name = \"folder\";//设置 folder 的name 为“folder”时，将被识别为树结构的文件夹开启状态图表。2帧：折叠状态、打开状态。\n     *         folder.x = 14;\n     *         folder.y = 4;\n     *         this.addChild(folder);\n    \n     *         var label = new laya.ui.Label(\"treeItem\");\n     *         label.name = \"label\";//设置 label 的name 为“label”时，此值将用于树结构数据赋值。\n     *         label.color = \"#ffff00\";\n     *         label.width = 150;\n     *         label.height = 22;\n     *         label.x = 33;\n     *         label.y = 1;\n     *         label.left = 33;\n     *         label.right = 0;\n     *         this.addChild(label);\n    \n     *         var arrow = new laya.ui.Clip(\"resource/ui/clip_tree_arrow.png\", 1, 2);\n     *         arrow.name = \"arrow\";//设置 arrow 的name 为“arrow”时，将被识别为树结构的文件夹开启状态图表。2帧：折叠状态、打开状态。\n     *         arrow.x = 0;\n     *         arrow.y = 5;\n     *         this.addChild(arrow);\n     *     };\n     *     Laya.class(Item,\"mypackage.treeExample.Item\",_super);//注册类 Item 。\n     * })(laya.ui.Box);\n     * @example\n     * import Tree = laya.ui.Tree;\n     * import Browser = laya.utils.Browser;\n     * import Handler = laya.utils.Handler;\n     * class Tree_Example {\n    \n     *     constructor() {\n     *         Laya.init(640, 800);\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\", \"resource/ui/vscroll$up.png\", \"resource/ui/clip_selectBox.png\", \"resource/ui/clip_tree_folder * . * png\", \"resource/ui/clip_tree_arrow.png\"], Handler.create(this, this.onLoadComplete));\n     *     }\n     *     private onLoadComplete(): void {\n     *         var xmlString: String;//创建一个xml字符串，用于存储树结构数据。\n     *         xmlString = \"&lt;root&gt;&lt;item label='box1'&gt;&lt;abc label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;abc label='child5'/&gt;&lt;/item&gt;&lt;item label='box2'&gt;&lt;abc  * label='child1'/&gt;&lt;abc label='child2'/&gt;&lt;abc label='child3'/&gt;&lt;abc label='child4'/&gt;&lt;/item&gt;&lt;/root&gt;\";\n     *         var domParser: any = new Browser.window.DOMParser();//创建一个DOMParser实例domParser。\n     *         var xml: any = domParser.parseFromString(xmlString, \"text/xml\");//解析xml字符。\n    \n     *         var tree: Tree = new Tree();//创建一个 Tree 类的实例对象 tree 。\n     *         tree.scrollBarSkin = \"resource/ui/vscroll.png\";//设置 tree 的皮肤。\n     *         tree.itemRender = Item;//设置 tree 的项渲染器。\n     *         tree.xml = xml;//设置 tree 的树结构数据。\n     *         tree.x = 100;//设置 tree 对象的属性 x 的值，用于控制 tree 对象的显示位置。\n     *         tree.y = 100;//设置 tree 对象的属性 y 的值，用于控制 tree 对象的显示位置。\n     *         tree.width = 200;//设置 tree 的宽度。\n     *         tree.height = 100;//设置 tree 的高度。\n     *         Laya.stage.addChild(tree);//将 tree 添加到显示列表。\n     *     }\n     * }\n     * import Box = laya.ui.Box;\n     * import Clip = laya.ui.Clip;\n     * import Label = laya.ui.Label;\n     * class Item extends Box {\n     *     constructor() {\n     *         super();\n     *         this.name = \"render\";\n     *         this.right = 0;\n     *         this.left = 0;\n     *         var selectBox: Clip = new Clip(\"resource/ui/clip_selectBox.png\", 1, 2);\n     *         selectBox.name = \"selectBox\";\n     *         selectBox.height = 24;\n     *         selectBox.x = 13;\n     *         selectBox.y = 0;\n     *         selectBox.left = 12;\n     *         this.addChild(selectBox);\n    \n     *         var folder: Clip = new Clip(\"resource/ui/clip_tree_folder.png\", 1, 3);\n     *         folder.name = \"folder\";\n     *         folder.x = 14;\n     *         folder.y = 4;\n     *         this.addChild(folder);\n    \n     *         var label: Label = new Label(\"treeItem\");\n     *         label.name = \"label\";\n     *         label.color = \"#ffff00\";\n     *         label.width = 150;\n     *         label.height = 22;\n     *         label.x = 33;\n     *         label.y = 1;\n     *         label.left = 33;\n     *         label.right = 0;\n     *         this.addChild(label);\n    \n     *         var arrow: Clip = new Clip(\"resource/ui/clip_tree_arrow.png\", 1, 2);\n     *         arrow.name = \"arrow\";\n     *         arrow.x = 0;\n     *         arrow.y = 5;\n     *         this.addChild(arrow);\n     *     }\n     * }\n     */\n    class Tree extends Box implements IRender {\n        protected _list: List;\n        protected _source: Array<any>;\n        protected _renderHandler: Handler;\n        protected _spaceLeft: number;\n        protected _spaceBottom: number;\n        protected _keepStatus: boolean;\n        /**\n         * 创建一个新的 <code>Tree</code> 类实例。\n         * <p>在 <code>Tree</code> 构造函数中设置属性width、height的值都为200。</p>\n         */\n        constructor();\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        protected createChildren(): void;\n        protected onListChange(e?: Event): void;\n        /**\n         * 数据源发生变化后，是否保持之前打开状态，默认为true。\n         * <p><b>取值：</b>\n         * <li>true：保持之前打开状态。</li>\n         * <li>false：不保持之前打开状态。</li>\n         * </p>\n         */\n        keepStatus: boolean;\n        /**\n         * 列表数据源，只包含当前可视节点数据。\n         */\n        array: Array<any>;\n        /**\n         * 数据源，全部节点数据。\n         */\n        readonly source: Array<any>;\n        /**\n         * 此对象包含的<code>List</code>实例对象。\n         */\n        readonly list: List;\n        /**\n         * 此对象包含的<code>List</code>实例的单元格渲染器。\n         * <p><b>取值：</b>\n         * <ol>\n         * <li>单元格类对象。</li>\n         * <li> UI 的 JSON 描述。</li>\n         * </ol></p>\n         */\n        itemRender: any;\n        /**\n         * 滚动条皮肤。\n         */\n        scrollBarSkin: string;\n        /**滚动条*/\n        readonly scrollBar: ScrollBar;\n        /**\n         * 单元格鼠标事件处理器。\n         * <p>默认返回参数（e:Event,index:int）。</p>\n         */\n        mouseHandler: Handler;\n        /**\n         * <code>Tree</code> 实例的渲染处理器。\n         */\n        renderHandler: Handler;\n        /**\n         * 左侧缩进距离（以像素为单位）。\n         */\n        spaceLeft: number;\n        /**\n         * 每一项之间的间隔距离（以像素为单位）。\n         */\n        spaceBottom: number;\n        /**\n         * 表示当前选择的项索引。\n         */\n        selectedIndex: number;\n        /**\n         * 当前选中的项对象的数据源。\n         */\n        selectedItem: any;\n        /**\n         * @inheritDoc\n         */\n        width: number;\n        /**@inheritDoc */\n        height: number;\n        protected getArray(): Array<any>;\n        protected getDepth(item: any, num?: number): number;\n        protected getParentOpenStatus(item: any): boolean;\n        protected renderItem(cell: Box, index: number): void;\n        /**\n         * 设置指定项索引的项对象的打开状态。\n         * @param index 项索引。\n         * @param isOpen 是否处于打开状态。\n         */\n        setItemState(index: number, isOpen: boolean): void;\n        /**\n         * 刷新项列表。\n         */\n        fresh(): void;\n        /**@inheritDoc */\n        dataSource: any;\n        /**\n         *  xml结构的数据源。\n         */\n        xml: any;\n        protected parseXml(xml: any, source: Array<any>, nodeParent: any, isRoot: boolean): void;\n        protected parseOpenStatus(oldSource: Array<any>, newSource: Array<any>): void;\n        protected isSameParent(item1: any, item2: any): boolean;\n        /**\n         * 表示选择的树节点项的<code>path</code>属性值。\n         */\n        readonly selectedPath: string;\n        /**\n         * 更新项列表，显示指定键名的数据项。\n         * @param\tkey 键名。\n         */\n        filter(key: string): void;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    /**\n     * <code>UIEvent</code> 类用来定义UI组件类的事件类型。\n     */\n    class UIEvent extends Event {\n        /**\n         * 显示提示信息。\n         */\n        static SHOW_TIP: string;\n        /**\n         * 隐藏提示信息。\n         */\n        static HIDE_TIP: string;\n    }\n}\ndeclare module laya.ui {\n    import Sprite = laya.display.Sprite;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>Group</code> 是一个可以自动布局的项集合控件。\n     * <p> <code>Group</code> 的默认项对象为 <code>Button</code> 类实例。\n     * <code>Group</code> 是 <code>Tab</code> 和 <code>RadioGroup</code> 的基类。</p>\n     */\n    class UIGroup extends Box implements IItem {\n        /**\n         * 改变 <code>Group</code> 的选择项时执行的处理器，(默认返回参数： 项索引（index:int）)。\n         */\n        selectHandler: Handler;\n        protected _items: Array<any>;\n        protected _selectedIndex: number;\n        protected _skin: string;\n        protected _direction: string;\n        protected _space: number;\n        protected _labels: string;\n        protected _labelColors: string;\n        protected _labelStrokeColor: string;\n        protected _strokeColors: string;\n        protected _labelStroke: number;\n        protected _labelSize: number;\n        protected _labelBold: boolean;\n        protected _labelPadding: string;\n        protected _labelAlign: string;\n        protected _stateNum: number;\n        protected _labelChanged: boolean;\n        /**\n         * 创建一个新的 <code>Group</code> 类实例。\n         * @param labels 标签集字符串。以逗号做分割，如\"item0,item1,item2,item3,item4,item5\"。\n         * @param skin 皮肤。\n         */\n        constructor(labels?: string, skin?: string);\n        protected preinitialize(): void;\n        /**@inheritDoc */\n        destroy(destroyChild?: boolean): void;\n        /**\n         * 添加一个项对象，返回此项对象的索引id。\n         *\n         * @param item 需要添加的项对象。\n         * @param autoLayOut 是否自动布局，如果为true，会根据 <code>direction</code> 和 <code>space</code> 属性计算item的位置。\n         * @return\n         */\n        addItem(item: ISelect, autoLayOut?: boolean): number;\n        /**\n         * 删除一个项对象。\n         * @param item 需要删除的项对象。\n         * @param autoLayOut 是否自动布局，如果为true，会根据 <code>direction</code> 和 <code>space</code> 属性计算item的位置。\n         */\n        delItem(item: ISelect, autoLayOut?: boolean): void;\n        /**\n         * 初始化项对象们。\n         */\n        initItems(): void;\n        protected itemClick(index: number): void;\n        /**\n         * 表示当前选择的项索引。默认值为-1。\n         */\n        selectedIndex: number;\n        protected setSelect(index: number, selected: boolean): void;\n        /**\n         * @copy laya.ui.Image#skin\n         */\n        skin: string;\n        /**\n         * 标签集合字符串。以逗号做分割，如\"item0,item1,item2,item3,item4,item5\"。\n         */\n        labels: string;\n        protected createItem(skin: string, label: string): Sprite;\n        /**\n         * @copy laya.ui.Button#labelColors()\n         */\n        labelColors: string;\n        /**\n         * <p>描边宽度（以像素为单位）。</p>\n         * 默认值0，表示不描边。\n         * @see laya.display.Text.stroke()\n         */\n        labelStroke: number;\n        /**\n         * <p>描边颜色，以字符串表示。</p>\n         * 默认值为 \"#000000\"（黑色）;\n         * @see laya.display.Text.strokeColor()\n         */\n        labelStrokeColor: string;\n        /**\n         * <p>表示各个状态下的描边颜色。</p>\n         * @see laya.display.Text.strokeColor()\n         */\n        strokeColors: string;\n        /**\n         * 表示按钮文本标签的字体大小。\n         */\n        labelSize: number;\n        /**\n         * 表示按钮的状态值，以数字表示，默认为3态。\n         * @see laya.ui.Button#stateNum\n         */\n        stateNum: number;\n        /**\n         * 表示按钮文本标签是否为粗体字。\n         */\n        labelBold: boolean;\n        /**\n         * 表示按钮文本标签的字体名称，以字符串形式表示。\n         * @see laya.display.Text.font()\n         */\n        labelFont: string;\n        /**\n         * 表示按钮文本标签的边距。\n         * <p><b>格式：</b>\"上边距,右边距,下边距,左边距\"。</p>\n         */\n        labelPadding: string;\n        /**\n         * 布局方向。\n         * <p>默认值为\"horizontal\"。</p>\n         * <p><b>取值：</b>\n         * <li>\"horizontal\"：表示水平布局。</li>\n         * <li>\"vertical\"：表示垂直布局。</li>\n         * </p>\n         */\n        direction: string;\n        /**\n         * 项对象们之间的间隔（以像素为单位）。\n         */\n        space: number;\n        protected changeLabels(): void;\n        protected commitMeasure(): void;\n        /**\n         * 项对象们的存放数组。\n         */\n        readonly items: Array<any>;\n        /**\n         * 获取或设置当前选择的项对象。\n         */\n        selection: ISelect;\n        /**@inheritDoc */\n        dataSource: any;\n        protected _setLabelChanged(): void;\n    }\n}\ndeclare module laya.ui {\n    import Sprite = laya.display.Sprite;\n    import IFilter = laya.filters.IFilter;\n    /**\n     * <code>UIUtils</code> 是文本工具集。\n     */\n    class UIUtils {\n        /**\n         * 需要替换的转义字符表\n         */\n        static escapeSequence: any;\n        /**\n         * 用字符串填充数组，并返回数组副本。\n         * @param\tarr 源数组对象。\n         * @param\tstr 用逗号连接的字符串。如\"p1,p2,p3,p4\"。\n         * @param\ttype 如果值不为null，则填充的是新增值得类型。\n         * @return 填充后的数组。\n         */\n        static fillArray(arr: Array<any>, str: string, type?: any): Array<any>;\n        /**\n         * 转换uint类型颜色值为字符型颜色值。\n         * @param color uint颜色值。\n         * @return 字符型颜色值。\n         */\n        static toColor(color: number): string;\n        /**\n         * 给指定的目标显示对象添加或移除灰度滤镜。\n         * @param\ttraget 目标显示对象。\n         * @param\tisGray 如果值true，则添加灰度滤镜，否则移除灰度滤镜。\n         */\n        static gray(traget: Sprite, isGray?: boolean): void;\n        /**\n         * 给指定的目标显示对象添加滤镜。\n         * @param\ttarget 目标显示对象。\n         * @param\tfilter 滤镜对象。\n         */\n        static addFilter(target: Sprite, filter: IFilter): void;\n        /**\n         * 移除目标显示对象的指定类型滤镜。\n         * @param\ttarget 目标显示对象。\n         * @param\tfilterType 滤镜类型。\n         */\n        static clearFilter(target: Sprite, filterType: any): void;\n        /**\n         * 替换字符串中的转义字符\n         * @param str\n         */\n        static adptString(str: string): string;\n        /**\n         * @private 根据字符串，返回函数表达式\n         */\n        static getBindFun(value: string): Function;\n    }\n}\ndeclare module laya.ui {\n    /**\n     * <code>VBox</code> 是一个垂直布局容器类。\n     */\n    class VBox extends LayoutBox {\n        /**\n         * 无对齐。\n         */\n        static NONE: string;\n        /**\n         * 左对齐。\n         */\n        static LEFT: string;\n        /**\n         * 居中对齐。\n         */\n        static CENTER: string;\n        /**\n         * 右对齐。\n         */\n        static RIGHT: string;\n        width: number;\n        protected changeItems(): void;\n    }\n}\ndeclare module laya.ui {\n    import Event = laya.events.Event;\n    import Box = laya.ui.Box;\n    import Component = laya.ui.Component;\n    /**\n     * <code>View</code> 是一个视图类。\n     * @internal <p><code>View</code></p>\n     */\n    class View extends Box {\n        /**存储UI配置数据(用于加载模式)。*/\n        static uiMap: any;\n        /**UI类映射。*/\n        static uiClassMap: any;\n        protected static viewClassMap: any;\n        static eventDic: any;\n        _idMap: any;\n        _aniList: Array<any>;\n        _watchMap: any;\n        static _sheet: any;\n        protected createView(uiView: any): void;\n        protected onEvent(type: string, event: Event): void;\n        protected loadUI(path: string): void;\n        /**\n         * 根据UI数据实例化组件。\n         * @param uiView UI数据。\n         * @param comp 组件本体，如果为空，会新创建一个。\n         * @param view 组件所在的视图实例，用来注册var全局变量，如果值为空则不注册。\n         * @return 一个 Component 对象。\n         */\n        static createComp(uiView: any, comp?: any, view?: View, dataMap?: Array<any>): any;\n        protected static getCompInstance(json: any): any;\n        /**\n         * 注册组件类映射。\n         * <p>用于扩展组件及修改组件对应关系。</p>\n         * @param key 组件类的关键字。\n         * @param compClass 组件类对象。\n         */\n        static regComponent(key: string, compClass: any): void;\n        /**\n         * 注册UI视图类的逻辑处理类。\n         * @internal 注册runtime解析。\n         * @param key UI视图类的关键字。\n         * @param compClass UI视图类对应的逻辑处理类。\n         */\n        static regViewRuntime(key: string, compClass: any): void;\n        /**\n         * <p>销毁此对象。</p>\n         * @param\tdestroyChild 是否同时销毁子节点，若值为true,则销毁子节点，否则不销毁子节点。\n         */\n        destroy(destroyChild?: boolean): void;\n        changeData(key: string): void;\n    }\n    class DataWatcher {\n        comp: Component;\n        prop: string;\n        value: string;\n        DataWatcher(comp: Component, prop: string, value: string): void;\n        exe(view: View): void;\n    }\n}\ndeclare module laya.ui {\n    import Node = laya.display.Node;\n    import Box = laya.ui.Box;\n    import Handler = laya.utils.Handler;\n    /**\n     * <code>ViewStack</code> 类用于视图堆栈类，用于视图的显示等设置处理。\n     */\n    class ViewStack extends Box implements IItem {\n        protected _items: Array<any>;\n        protected _setIndexHandler: Handler;\n        protected _selectedIndex: number;\n        /**\n         * 批量设置视图对象。\n         * @param views 视图对象数组。\n         */\n        setItems(views: Array<any>): void;\n        /**\n         * 添加视图。\n         * @internal 添加视图对象，并设置此视图对象的<code>name</code> 属性。\n         * @param view 需要添加的视图对象。\n         */\n        addItem(view: Node): void;\n        /**\n         * 初始化视图对象集合。\n         */\n        initItems(): void;\n        /**\n         * 表示当前视图索引。\n         */\n        selectedIndex: number;\n        protected setSelect(index: number, selected: boolean): void;\n        /**\n         * 获取或设置当前选择的项对象。\n         */\n        selection: Node;\n        /**\n         *  索引设置处理器。\n         * <p>默认回调参数：index:int</p>\n         */\n        setIndexHandler: Handler;\n        protected setIndex(index: number): void;\n        /**\n         * 视图集合数组。\n         */\n        readonly items: Array<any>;\n        /**@inheritDoc */\n        dataSource: any;\n    }\n}\ndeclare module laya.ui {\n    /**\n     *\n     * 使用 <code>VScrollBar</code> （垂直 <code>ScrollBar</code> ）控件，可以在因数据太多而不能在显示区域完全显示时控制显示的数据部分。\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>VScrollBar</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.vScrollBar;\n     *\t\timport laya.ui.VScrollBar;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class VScrollBar_Example\n     *\t\t{\n     *\t\t\tprivate var vScrollBar:VScrollBar;\n     *\t\t\tpublic function VScrollBar_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\"], Handler.create(this, onLoadComplete));\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tvScrollBar = new VScrollBar();//创建一个 vScrollBar 类的实例对象 hScrollBar 。\n     *\t\t\t\tvScrollBar.skin = \"resource/ui/vscroll.png\";//设置 vScrollBar 的皮肤。\n     *\t\t\t\tvScrollBar.x = 100;//设置 vScrollBar 对象的属性 x 的值，用于控制 vScrollBar 对象的显示位置。\n     *\t\t\t\tvScrollBar.y = 100;//设置 vScrollBar 对象的属性 y 的值，用于控制 vScrollBar 对象的显示位置。\n     *\t\t\t\tvScrollBar.changeHandler = new Handler(this, onChange);//设置 vScrollBar 的滚动变化处理器。\n     *\t\t\t\tLaya.stage.addChild(vScrollBar);//将此 vScrollBar 对象添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onChange(value:Number):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"滚动条的位置： value=\" + value);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * var vScrollBar;\n     * var res = [\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\"];\n     * Laya.loader.load(res, laya.utils.Handler.create(this, onLoadComplete));//加载资源。\n     * function onLoadComplete() {\n     *     vScrollBar = new laya.ui.VScrollBar();//创建一个 vScrollBar 类的实例对象 hScrollBar 。\n     *     vScrollBar.skin = \"resource/ui/vscroll.png\";//设置 vScrollBar 的皮肤。\n     *     vScrollBar.x = 100;//设置 vScrollBar 对象的属性 x 的值，用于控制 vScrollBar 对象的显示位置。\n     *     vScrollBar.y = 100;//设置 vScrollBar 对象的属性 y 的值，用于控制 vScrollBar 对象的显示位置。\n     *     vScrollBar.changeHandler = new laya.utils.Handler(this, onChange);//设置 vScrollBar 的滚动变化处理器。\n     *     Laya.stage.addChild(vScrollBar);//将此 vScrollBar 对象添加到显示列表。\n     * }\n     * function onChange(value) {\n     *     console.log(\"滚动条的位置： value=\" + value);\n     * }\n     * @example\n     * import VScrollBar = laya.ui.VScrollBar;\n     * import Handler = laya.utils.Handler;\n     * class VScrollBar_Example {\n     *     private vScrollBar: VScrollBar;\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高、渲染模式。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/vscroll.png\", \"resource/ui/vscroll$bar.png\", \"resource/ui/vscroll$down.png\", \"resource/ui/vscroll$up.png\"], Handler.create(this, this.onLoadComplete));\n     *     }\n     *     private onLoadComplete(): void {\n     *         this.vScrollBar = new VScrollBar();//创建一个 vScrollBar 类的实例对象 hScrollBar 。\n     *         this.vScrollBar.skin = \"resource/ui/vscroll.png\";//设置 vScrollBar 的皮肤。\n     *         this.vScrollBar.x = 100;//设置 vScrollBar 对象的属性 x 的值，用于控制 vScrollBar 对象的显示位置。\n     *         this.vScrollBar.y = 100;//设置 vScrollBar 对象的属性 y 的值，用于控制 vScrollBar 对象的显示位置。\n     *         this.vScrollBar.changeHandler = new Handler(this, this.onChange);//设置 vScrollBar 的滚动变化处理器。\n     *         Laya.stage.addChild(this.vScrollBar);//将此 vScrollBar 对象添加到显示列表。\n     *     }\n     *     private onChange(value: number): void {\n     *         console.log(\"滚动条的位置： value=\" + value);\n     *     }\n     * }\n     */\n    class VScrollBar extends ScrollBar {\n    }\n}\ndeclare module laya.ui {\n    /**\n     * 使用 <code>VSlider</code> 控件，用户可以通过在滑块轨道的终点之间移动滑块来选择值。\n     * <p> <code>VSlider</code> 控件采用垂直方向。滑块轨道从下往上扩展，而标签位于轨道的左右两侧。</p>\n     *\n     * @example <caption>以下示例代码，创建了一个 <code>VSlider</code> 实例。</caption>\n     * package\n     *\t{\n     *\t\timport laya.ui.HSlider;\n     *\t\timport laya.ui.VSlider;\n     *\t\timport laya.utils.Handler;\n     *\t\tpublic class VSlider_Example\n     *\t\t{\n     *\t\t\tprivate var vSlider:VSlider;\n     *\t\t\tpublic function VSlider_Example()\n     *\t\t\t{\n     *\t\t\t\tLaya.init(640, 800);//设置游戏画布宽高。\n     *\t\t\t\tLaya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *\t\t\t\tLaya.loader.load([\"resource/ui/vslider.png\", \"resource/ui/vslider$bar.png\"], Handler.create(this, onLoadComplete));//加载资源。\n     *\t\t\t}\n     *\t\t\tprivate function onLoadComplete():void\n     *\t\t\t{\n     *\t\t\t\tvSlider = new VSlider();//创建一个 VSlider 类的实例对象 vSlider 。\n     *\t\t\t\tvSlider.skin = \"resource/ui/vslider.png\";//设置 vSlider 的皮肤。\n     *\t\t\t\tvSlider.min = 0;//设置 vSlider 最低位置值。\n     *\t\t\t\tvSlider.max = 10;//设置 vSlider 最高位置值。\n     *\t\t\t\tvSlider.value = 2;//设置 vSlider 当前位置值。\n     *\t\t\t\tvSlider.tick = 1;//设置 vSlider 刻度值。\n     *\t\t\t\tvSlider.x = 100;//设置 vSlider 对象的属性 x 的值，用于控制 vSlider 对象的显示位置。\n     *\t\t\t\tvSlider.y = 100;//设置 vSlider 对象的属性 y 的值，用于控制 vSlider 对象的显示位置。\n     *\t\t\t\tvSlider.changeHandler = new Handler(this, onChange);//设置 vSlider 位置变化处理器。\n     *\t\t\t\tLaya.stage.addChild(vSlider);//把 vSlider 添加到显示列表。\n     *\t\t\t}\n     *\t\t\tprivate function onChange(value:Number):void\n     *\t\t\t{\n     *\t\t\t\ttrace(\"滑块的位置： value=\" + value);\n     *\t\t\t}\n     *\t\t}\n     *\t}\n     * @example\n     * Laya.init(640, 800);//设置游戏画布宽高\n     * Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色\n     * var vSlider;\n     * Laya.loader.load([\"resource/ui/vslider.png\", \"resource/ui/vslider$bar.png\"], laya.utils.Handler.create(this, onLoadComplete));//加载资源。\n     * function onLoadComplete() {\n     *     vSlider = new laya.ui.VSlider();//创建一个 VSlider 类的实例对象 vSlider 。\n     *     vSlider.skin = \"resource/ui/vslider.png\";//设置 vSlider 的皮肤。\n     *     vSlider.min = 0;//设置 vSlider 最低位置值。\n     *     vSlider.max = 10;//设置 vSlider 最高位置值。\n     *     vSlider.value = 2;//设置 vSlider 当前位置值。\n     *     vSlider.tick = 1;//设置 vSlider 刻度值。\n     *     vSlider.x = 100;//设置 vSlider 对象的属性 x 的值，用于控制 vSlider 对象的显示位置。\n     *     vSlider.y = 100;//设置 vSlider 对象的属性 y 的值，用于控制 vSlider 对象的显示位置。\n     *     vSlider.changeHandler = new laya.utils.Handler(this, onChange);//设置 vSlider 位置变化处理器。\n     *     Laya.stage.addChild(vSlider);//把 vSlider 添加到显示列表。\n     * }\n     * function onChange(value) {\n     *     console.log(\"滑块的位置： value=\" + value);\n     * }\n     * @example\n     * import HSlider = laya.ui.HSlider;\n     * import VSlider = laya.ui.VSlider;\n     * import Handler = laya.utils.Handler;\n     * class VSlider_Example {\n     *     private vSlider: VSlider;\n     *     constructor() {\n     *         Laya.init(640, 800);//设置游戏画布宽高。\n     *         Laya.stage.bgColor = \"#efefef\";//设置画布的背景颜色。\n     *         Laya.loader.load([\"resource/ui/vslider.png\", \"resource/ui/vslider$bar.png\"], Handler.create(this, this.onLoadComplete));//加载资源。\n     *     }\n     *     private onLoadComplete(): void {\n     *         this.vSlider = new VSlider();//创建一个 VSlider 类的实例对象 vSlider 。\n     *         this.vSlider.skin = \"resource/ui/vslider.png\";//设置 vSlider 的皮肤。\n     *         this.vSlider.min = 0;//设置 vSlider 最低位置值。\n     *         this.vSlider.max = 10;//设置 vSlider 最高位置值。\n     *         this.vSlider.value = 2;//设置 vSlider 当前位置值。\n     *         this.vSlider.tick = 1;//设置 vSlider 刻度值。\n     *         this.vSlider.x = 100;//设置 vSlider 对象的属性 x 的值，用于控制 vSlider 对象的显示位置。\n     *         this.vSlider.y = 100;//设置 vSlider 对象的属性 y 的值，用于控制 vSlider 对象的显示位置。\n     *         this.vSlider.changeHandler = new Handler(this, this.onChange);//设置 vSlider 位置变化处理器。\n     *         Laya.stage.addChild(this.vSlider);//把 vSlider 添加到显示列表。\n     *     }\n     *     private onChange(value: number): void {\n     *         console.log(\"滑块的位置： value=\" + value);\n     *     }\n     * }\n     * @see laya.ui.Slider\n     */\n    class VSlider extends Slider {\n    }\n}\ndeclare module laya.utils {\n    import Context = laya.resource.Context;\n    import HTMLCanvas = laya.resource.HTMLCanvas;\n    /**\n     * <code>Browser</code> 是浏览器代理类。封装浏览器及原生 js 提供的一些功能。\n     */\n    class Browser {\n        /** 浏览器代理信息。*/\n        static userAgent: string;\n        /** 表示是否在 ios 设备。*/\n        static onIOS: boolean;\n        /** 表示是否在 Mac 设备。*/\n        static onMac: boolean;\n        /** 表示是否在移动设备。*/\n        static onMobile: boolean;\n        /** 表示是否在 iphone设备。*/\n        static onIPhone: boolean;\n        /** 表示是否在 ipad 设备。*/\n        static onIPad: boolean;\n        /** 表示是否在 Android设备。*/\n        static onAndroid: boolean;\n        /** 表示是否在 Windows Phone 设备。*/\n        static onWP: boolean;\n        /** 表示是否在 QQ 浏览器。*/\n        static onQQBrowser: boolean;\n        /** 表示是否在移动端 QQ 或 QQ 浏览器。*/\n        static onMQQBrowser: boolean;\n        /** 表示是否在移动端 Safari。*/\n        static onSafari: boolean;\n        /** 表示是否在Firefox。*/\n        static onFirefox: boolean;\n        /** 表示是否在Edge。*/\n        static onEdge: boolean;\n        /** 表示是否在IE浏览器内*/\n        static onIE: boolean;\n        /** 微信内*/\n        static onWeiXin: boolean;\n        /** 表示是否在微信小游戏内 */\n        static onMiniGame: boolean;\n        /** 表示是否在百度内 */\n\t\tstatic onBDMiniGame: boolean;\n        static onLimixiu: boolean;\n        /** 表示是否在小米内 */\n        static onKGMiniGame:boolean;\n        /** 表示是否在oppo内 */\n        static onQGMiniGame:boolean;\n        /** 表示是否在 PC 端。*/\n        static onPC: boolean;\n        /** 表示是否是 HTTP 协议。*/\n        static httpProtocol: boolean;\n        static webAudioEnabled: boolean;\n        static soundType: string;\n        static enableTouch: boolean;\n        /** 全局画布实例（非主画布）。*/\n        static canvas: HTMLCanvas;\n        /** 全局画布上绘图的环境（非主画布）。 */\n        static context: Context;\n        static __init__(): void;\n        /**\n         * 创建浏览器原生节点。\n         * @param\ttype 节点类型。\n         * @return\t创建的节点对象的引用。\n         */\n        static createElement(type: string): any;\n        /**\n         * 返回 Document 对象中拥有指定 id 的第一个对象的引用。\n         * @param\ttype 节点id。\n         * @return\t节点对象。\n         */\n        static getElementById(type: string): any;\n        /**\n         * 移除指定的浏览器原生节点对象。\n         * @param\ttype 节点对象。\n         */\n        static removeElement(ele: any): void;\n        /**\n         * 获取浏览器当前时间戳，单位为毫秒。\n         */\n        static now(): number;\n        /**\n         * 浏览器窗口可视宽度。\n         * 通过分析浏览器信息获得。浏览器多个属性值优先级为：window.innerWidth(包含滚动条宽度) > document.body.clientWidth(不包含滚动条宽度)，如果前者为0或为空，则选择后者。\n         */\n        static readonly clientWidth: number;\n        /**\n         * 浏览器窗口可视高度。\n         * 通过分析浏览器信息获得。浏览器多个属性值优先级为：window.innerHeight(包含滚动条高度) > document.body.clientHeight(不包含滚动条高度) > document.documentElement.clientHeight(不包含滚动条高度)，如果前者为0或为空，则选择后者。\n         */\n        static readonly clientHeight: number;\n        /** 浏览器窗口物理宽度，其值等于clientWidth * pixelRatio，并且浏览器发生反转之后，宽高会互换。*/\n        static readonly width: number;\n        /** 浏览器窗口物理高度，其值等于clientHeight * pixelRatio，并且浏览器发生反转之后，宽高会互换。*/\n        static readonly height: number;\n        /** 设备像素比。*/\n        static readonly pixelRatio: number;\n        /**画布容器，用来盛放画布的容器。方便对画布进行控制*/\n        static container: any;\n        /** 浏览器原生 window 对象的引用。*/\n        static readonly window: any;\n        /** 浏览器原生 document 对象的引用。*/\n        static readonly document: any;\n    }\n}\ndeclare module laya.utils {\n    import Matrix = laya.maths.Matrix;\n    /**\n     * <p> <code>Byte</code> 类提供用于优化读取、写入以及处理二进制数据的方法和属性。</p>\n     * <p><b>注意：</b> <code>Byte</code> 类适用于需要在字节层访问数据的高级开发人员。</p>\n     */\n    class Byte {\n        /**\n         * <p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。通过 <code>getSystemEndian</code> 可以获取当前系统的字节序。</p>\n         * <p> <code>BIG_ENDIAN</code> ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。有时也称之为网络字节序。<br/>\n         *  <code>LITTLE_ENDIAN</code> ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。</p>\n         */\n        static BIG_ENDIAN: string;\n        /**\n         * <p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。通过 <code>getSystemEndian</code> 可以获取当前系统的字节序。</p>\n         * <p> <code>LITTLE_ENDIAN</code> ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。<br/>\n         *  <code>BIG_ENDIAN</code> ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。有时也称之为网络字节序。</p>\n         */\n        static LITTLE_ENDIAN: string;\n        protected _xd_: boolean;\n        protected _d_: any;\n        protected _u8d_: any;\n        protected _pos_: number;\n        protected _length: number;\n        /**\n         * <p>获取当前主机的字节序。</p>\n         * <p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。</p>\n         * <p> <code>BIG_ENDIAN</code> ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。有时也称之为网络字节序。<br/>\n         *  <code>LITTLE_ENDIAN</code> ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。</p>\n         * @return 当前系统的字节序。\n         */\n        static getSystemEndian(): string;\n        /**\n         * 创建一个 <code>Byte</code> 类的实例。\n         * @param\tdata\t用于指定初始化的元素数目，或者用于初始化的TypedArray对象、ArrayBuffer对象。如果为 null ，则预分配一定的内存空间，当可用空间不足时，优先使用这部分内存，如果还不够，则重新分配所需内存。\n         */\n        constructor(data?: any);\n        /**\n         * 获取此对象的 ArrayBuffer 数据，数据只包含有效数据部分。\n         */\n        readonly buffer: ArrayBuffer;\n        /**\n         * <p> <code>Byte</code> 实例的字节序。取值为：<code>BIG_ENDIAN</code> 或 <code>BIG_ENDIAN</code> 。</p>\n         * <p>主机字节序，是 CPU 存放数据的两种不同顺序，包括小端字节序和大端字节序。通过 <code>getSystemEndian</code> 可以获取当前系统的字节序。</p>\n         * <p> <code>BIG_ENDIAN</code> ：大端字节序，地址低位存储值的高位，地址高位存储值的低位。有时也称之为网络字节序。<br/>\n         *  <code>LITTLE_ENDIAN</code> ：小端字节序，地址低位存储值的低位，地址高位存储值的高位。</p>\n         */\n        endian: string;\n        /**\n         * <p> <code>Byte</code> 对象的长度（以字节为单位）。</p>\n         * <p>如果将长度设置为大于当前长度的值，则用零填充字节数组的右侧；如果将长度设置为小于当前长度的值，将会截断该字节数组。</p>\n         * <p>如果要设置的长度大于当前已分配的内存空间的字节长度，则重新分配内存空间，大小为以下两者较大者：要设置的长度、当前已分配的长度的2倍，并将原有数据拷贝到新的内存空间中；如果要设置的长度小于当前已分配的内存空间的字节长度，也会重新分配内存空间，大小为要设置的长度，并将原有数据从头截断为要设置的长度存入新的内存空间中。</p>\n         */\n        length: number;\n        /**\n         * <p>常用于解析固定格式的字节流。</p>\n         * <p>先从字节流的当前字节偏移位置处读取一个 <code>Uint16</code> 值，然后以此值为长度，读取此长度的字符串。</p>\n         * @return 读取的字符串。\n         */\n        getString(): string;\n        /**\n         * 从字节流中 <code>start</code> 参数指定的位置开始，读取 <code>len</code> 参数指定的字节数的数据，用于创建一个 <code>Float32Array</code> 对象并返回此对象。\n         * @param\tstart\t开始位置。\n         * @param\tlen\t\t需要读取的字节长度。如果要读取的长度超过可读取范围，则只返回可读范围内的值。\n         * @return  读取的 Float32Array 对象。\n         */\n        getFloat32Array(start: number, len: number): any;\n        /**\n         * 从字节流中 <code>start</code> 参数指定的位置开始，读取 <code>len</code> 参数指定的字节数的数据，用于创建一个 <code>Uint8Array</code> 对象并返回此对象。\n         * @param\tstart\t开始位置。\n         * @param\tlen\t\t需要读取的字节长度。如果要读取的长度超过可读取范围，则只返回可读范围内的值。\n         * @return  读取的 Uint8Array 对象。\n         */\n        getUint8Array(start: number, len: number): Uint8Array;\n        /**\n         * 从字节流中 <code>start</code> 参数指定的位置开始，读取 <code>len</code> 参数指定的字节数的数据，用于创建一个 <code>Int16Array</code> 对象并返回此对象。\n         * @param\tstart\t开始读取的字节偏移量位置。\n         * @param\tlen\t\t需要读取的字节长度。如果要读取的长度超过可读取范围，则只返回可读范围内的值。\n         * @return  读取的 Uint8Array 对象。\n         */\n        getInt16Array(start: number, len: number): any;\n        /**\n         * 从字节流的当前字节偏移位置处读取一个 IEEE 754 单精度（32 位）浮点数。\n         * @return 单精度（32 位）浮点数。\n         */\n        getFloat32(): number;\n        /**\n         * 从字节流的当前字节偏移量位置处读取一个 IEEE 754 双精度（64 位）浮点数。\n         * @return 双精度（64 位）浮点数。\n         */\n        getFloat64(): number;\n        /**\n         * 在字节流的当前字节偏移量位置处写入一个 IEEE 754 单精度（32 位）浮点数。\n         * @param\tvalue\t单精度（32 位）浮点数。\n         */\n        writeFloat32(value: number): void;\n        /**\n         * 在字节流的当前字节偏移量位置处写入一个 IEEE 754 双精度（64 位）浮点数。\n         * @param\tvalue\t双精度（64 位）浮点数。\n         */\n        writeFloat64(value: number): void;\n        /**\n         * 从字节流的当前字节偏移量位置处读取一个 Int32 值。\n         * @return Int32 值。\n         */\n        getInt32(): number;\n        /**\n         * 从字节流的当前字节偏移量位置处读取一个 Uint32 值。\n         * @return Uint32 值。\n         */\n        getUint32(): number;\n        /**\n         * 在字节流的当前字节偏移量位置处写入指定的 Int32 值。\n         * @param\tvalue\t需要写入的 Int32 值。\n         */\n        writeInt32(value: number): void;\n        /**\n         * 在字节流的当前字节偏移量位置处写入 Uint32 值。\n         * @param\tvalue\t需要写入的 Uint32 值。\n         */\n        writeUint32(value: number): void;\n        /**\n         * 从字节流的当前字节偏移量位置处读取一个 Int16 值。\n         * @return Int16 值。\n         */\n        getInt16(): number;\n        /**\n         * 从字节流的当前字节偏移量位置处读取一个 Uint16 值。\n         * @return Uint16 值。\n         */\n        getUint16(): number;\n        /**\n         * 在字节流的当前字节偏移量位置处写入指定的 Uint16 值。\n         * @param\tvalue\t需要写入的Uint16 值。\n         */\n        writeUint16(value: number): void;\n        /**\n         * 在字节流的当前字节偏移量位置处写入指定的 Int16 值。\n         * @param\tvalue\t需要写入的 Int16 值。\n         */\n        writeInt16(value: number): void;\n        /**\n         * 从字节流的当前字节偏移量位置处读取一个 Uint8 值。\n         * @return Uint8 值。\n         */\n        getUint8(): number;\n        /**\n         * 在字节流的当前字节偏移量位置处写入指定的 Uint8 值。\n         * @param\tvalue\t需要写入的 Uint8 值。\n         */\n        writeUint8(value: number): void;\n        /**\n         * @private\n         * 从字节流的指定字节偏移量位置处读取一个 Uint8 值。\n         * @param\tpos\t字节读取位置。\n         * @return Uint8 值。\n         */\n        _getUInt8(pos: number): number;\n        /**\n         * @private\n         * 从字节流的指定字节偏移量位置处读取一个 Uint16 值。\n         * @param\tpos\t字节读取位置。\n         * @return Uint16 值。\n         */\n        _getUint16(pos: number): number;\n        /**\n         * @private\n         * 使用 getFloat32() 读取6个值，用于创建并返回一个 Matrix 对象。\n         * @return  Matrix 对象。\n         */\n        _getMatrix(): Matrix;\n        /**\n         * @private\n         * 读取 <code>len</code> 参数指定的长度的字符串。\n         * @param\tlen\t要读取的字符串的长度。\n         * @return 指定长度的字符串。\n         */\n        getCustomString(len: number): string;\n        /**\n         * 移动或返回 Byte 对象的读写指针的当前位置（以字节为单位）。下一次调用读取方法时将在此位置开始读取，或者下一次调用写入方法时将在此位置开始写入。\n         */\n        pos: number;\n        /**\n         * 可从字节流的当前位置到末尾读取的数据的字节数。\n         */\n        readonly bytesAvailable: number;\n        /**\n         * 清除字节数组的内容，并将 length 和 pos 属性重置为 0。调用此方法将释放 Byte 实例占用的内存。\n         */\n        clear(): void;\n        /**\n         * @private\n         * 获取此对象的 ArrayBuffer 引用。\n         * @return\n         */\n        __getBuffer(): ArrayBuffer;\n        /**\n         * <p>将 UTF-8 字符串写入字节流。类似于 writeUTF() 方法，但 writeUTFBytes() 不使用 16 位长度的字为字符串添加前缀。</p>\n         * <p>对应的读取方法为： getUTFBytes 。</p>\n         * @param value 要写入的字符串。\n         */\n        writeUTFBytes(value: string): void;\n        /**\n         * <p>将 UTF-8 字符串写入字节流。先写入以字节表示的 UTF-8 字符串长度（作为 16 位整数），然后写入表示字符串字符的字节。</p>\n         * <p>对应的读取方法为： getUTFString 。</p>\n         * @param\tvalue 要写入的字符串值。\n         */\n        writeUTFString(value: string): void;\n        /**\n         * @private\n         * 读取 UTF-8 字符串。\n         * @return 读取的字符串。\n         */\n        readUTFString(): string;\n        /**\n         * <p>从字节流中读取一个 UTF-8 字符串。假定字符串的前缀是一个无符号的短整型（以此字节表示要读取的长度）。</p>\n         * <p>对应的写入方法为： writeUTFString 。</p>\n         * @return 读取的字符串。\n         */\n        getUTFString(): string;\n        /**\n         * @private\n         * 读字符串，必须是 writeUTFBytes 方法写入的字符串。\n         * @param len\t要读的buffer长度，默认将读取缓冲区全部数据。\n         * @return 读取的字符串。\n         */\n        readUTFBytes(len?: number): string;\n        /**\n         * <p>从字节流中读取一个由 length 参数指定的长度的 UTF-8 字节序列，并返回一个字符串。</p>\n         * <p>一般读取的是由 writeUTFBytes 方法写入的字符串。</p>\n         * @param len\t要读的buffer长度，默认将读取缓冲区全部数据。\n         * @return 读取的字符串。\n         */\n        getUTFBytes(len?: number): string;\n        /**\n         * <p>在字节流中写入一个字节。</p>\n         * <p>使用参数的低 8 位。忽略高 24 位。</p>\n         * @param\tvalue\n         */\n        writeByte(value: number): void;\n        /**\n         * @private\n         * 从字节流中读取带符号的字节。\n         */\n        readByte(): number;\n        /**\n         * <p>从字节流中读取带符号的字节。</p>\n         * <p>返回值的范围是从 -128 到 127。</p>\n         * @return 介于 -128 和 127 之间的整数。\n         */\n        getByte(): number;\n        /**\n         * <p>保证该字节流的可用长度不小于 <code>lengthToEnsure</code> 参数指定的值。</p>\n         * @param\tlengthToEnsure\t指定的长度。\n         */\n        ensureWrite(lengthToEnsure: number): void;\n        /**\n         * <p>将指定 arraybuffer 对象中的以 offset 为起始偏移量， length 为长度的字节序列写入字节流。</p>\n         * <p>如果省略 length 参数，则使用默认长度 0，该方法将从 offset 开始写入整个缓冲区；如果还省略了 offset 参数，则写入整个缓冲区。</p>\n         * <p>如果 offset 或 length 小于0，本函数将抛出异常。</p>\n         * $NEXTBIG 由于没有判断length和arraybuffer的合法性，当开发者填写了错误的length值时，会导致写入多余的空白数据甚至内存溢出，为了避免影响开发者正在使用此方法的功能，下个重大版本会修复这些问题。\n         * @param\tarraybuffer\t需要写入的 Arraybuffer 对象。\n         * @param\toffset\t\tArraybuffer 对象的索引的偏移量（以字节为单位）\n         * @param\tlength\t\t从 Arraybuffer 对象写入到 Byte 对象的长度（以字节为单位）\n         */\n        writeArrayBuffer(arraybuffer: any, offset?: number, length?: number): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * @private\n     * 对象缓存统一管理类\n     */\n    class CacheManager {\n        /**\n         * 单次清理检测允许执行的时间，单位ms。\n         */\n        static loopTimeLimit: number;\n        constructor();\n        /**\n         * 注册cache管理函数\n         * @param disposeFunction 释放函数 fun(force:Boolean)\n         * @param getCacheListFunction 获取cache列表函数fun():Array\n         *\n         */\n        static regCacheByFunction(disposeFunction: Function, getCacheListFunction: Function): void;\n        /**\n         * 移除cache管理函数\n         * @param disposeFunction 释放函数 fun(force:Boolean)\n         * @param getCacheListFunction 获取cache列表函数fun():Array\n         *\n         */\n        static unRegCacheByFunction(disposeFunction: Function, getCacheListFunction: Function): void;\n        /**\n         * 强制清理所有管理器\n         *\n         */\n        static forceDispose(): void;\n        /**\n         * 开始检测循环\n         * @param waitTime 检测间隔时间\n         *\n         */\n        static beginCheck(waitTime?: number): void;\n        /**\n         * 停止检测循环\n         *\n         */\n        static stopCheck(): void;\n    }\n}\ndeclare module laya.utils {\n    import Node = laya.display.Node;\n    import Sprite = laya.display.Sprite;\n    /**\n     * <code>ClassUtils</code> 是一个类工具类。\n     */\n    class ClassUtils {\n        static _classMap: any;\n        /**\n         * 注册 Class 映射。\n         * @param\tclassName 映射的名字，或者类名简写。\n         * @param\tclassDef 类的全名或者类的引用，全名比如:\"laya.display.Sprite\"。\n         */\n        static regClass(className: string, classDef: any): void;\n        /**\n         * 返回注册 Class 映射。\n         * @param\tclassName 映射的名字。\n         */\n        static getRegClass(className: string): any;\n        /**\n         * 根据名字返回类对象。\n         * @param\tclassName 类名。\n         * @return 类对象\n         */\n        static getClass: Function;\n        /**\n         * 根据名称创建 Class 实例。\n         * @param\tclassName 类名。\n         * @return\t返回类的实例。\n         */\n        static getInstance(className: string): any;\n        /**\n         * 根据指定的 json 数据创建节点对象。\n         * 比如:\n         *\n         * \t\"type\":\"Sprite\",\n         * \t\"props\":\n         * \t\t\"x\":100,\n         * \t\t\"y\":50,\n         * \t\t\"name\":\"item1\",\n         * \t\t\"scale\":[2,2]\n         * \t},\n         * \t\"customProps\":\n         * \t\t\"x\":100,\n         * \t\t\"y\":50,\n         * \t\t\"name\":\"item1\",\n         * \t\t\"scale\":[2,2]\n         * \t},\n         * \t\"child\":[\n         *\n         * \t\t\t\"type\":\"Text\",\n         * \t\t\t\"props\":\n         * \t\t\t\t\"text\":\"this is a test\",\n         * \t\t\t\t\"var\":\"label\",\n         * \t\t\t\t\"rumtime\":\"\"\n         * \t\t\t}\n         * \t\t}\n         * \t]\n         * }\n         * @param\tjson json字符串或者Object对象。\n         * @param\tnode node节点，如果为空，则新创建一个。\n         * @param\troot 根节点，用来设置var定义。\n         * @return\t生成的节点。\n         */\n        static createByJson(json: any, node?: any, root?: Node, customHandler?: Handler, instanceHandler?: Handler): any;\n        /**\n         * 将graphic对象添加到Sprite上\n         * @param graphicO graphic对象描述\n         * @param sprite\n         *\n         */\n        static addGraphicsToSprite(graphicO: any, sprite: Sprite): void;\n        /**\n         * 将graphic绘图指令添加到sprite上\n         * @param graphicO 绘图指令描述\n         * @param sprite\n         *\n         */\n        static addGraphicToSprite(graphicO: any, sprite: Sprite, isChild?: boolean): void;\n        /**\n         * @private\n         */\n        static isDrawType(type: string): boolean;\n        /**\n         * @private\n         */\n        static _getPointListByStr(str: string): Array<any>;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * @private\n     * <code>Color</code> 是一个颜色值处理类。\n     */\n    class Color {\n        static _SAVE: any;\n        static _SAVE_SIZE: number;\n        _color: Array<any>;\n        /** 字符串型颜色值。*/\n        strColor: string;\n        /** uint 型颜色值。*/\n        numColor: number;\n        _drawStyle: any;\n        /**\n         * 根据指定的属性值，创建一个 <code>Color</code> 类的实例。\n         * @param\tstr 颜色值。\n         */\n        constructor(str: any);\n        static _initDefault(): any;\n        static _initSaveMap(): void;\n        /**\n         * 根据指定的属性值，创建并返回一个 <code>Color</code> 类的实例。\n         * @param\tstr 颜色值。\n         * @return 一个 <code>Color</code> 类的实例。\n         */\n        static create(str: any): Color;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * <code>Dictionary</code> 是一个字典型的数据存取类。\n     */\n    class Dictionary {\n        /**\n         * 获取所有的子元素列表。\n         */\n        readonly values: Array<any>;\n        /**\n         * 获取所有的子元素键名列表。\n         */\n        readonly keys: Array<any>;\n        /**\n         * 给指定的键名设置值。\n         * @param\tkey 键名。\n         * @param\tvalue 值。\n         */\n        set(key: any, value: any): void;\n        /**\n         * 获取指定对象的键名索引。\n         * @param\tkey 键名对象。\n         * @return 键名索引。\n         */\n        indexOf(key: any): number;\n        /**\n         * 返回指定键名的值。\n         * @param\tkey 键名对象。\n         * @return 指定键名的值。\n         */\n        get(key: any): any;\n        /**\n         * 移除指定键名的值。\n         * @param\tkey 键名对象。\n         * @return 是否成功移除。\n         */\n        remove(key: any): boolean;\n        /**\n         * 清除此对象的键名列表和键值列表。\n         */\n        clear(): void;\n    }\n}\ndeclare module laya.utils {\n    import Sprite = laya.display.Sprite;\n    import Rectangle = laya.maths.Rectangle;\n    /**\n     * @private\n     * <code>Dragging</code> 类是触摸滑动控件。\n     */\n    class Dragging {\n        /** 被拖动的对象。*/\n        target: Sprite;\n        /** 缓动衰减系数。*/\n        ratio: number;\n        /** 单帧最大偏移量。*/\n        maxOffset: number;\n        /** 滑动范围。*/\n        area: Rectangle;\n        /** 表示拖动是否有惯性。*/\n        hasInertia: boolean;\n        /** 橡皮筋最大值。*/\n        elasticDistance: number;\n        /** 橡皮筋回弹时间，单位为毫秒。*/\n        elasticBackTime: number;\n        /** 事件携带数据。*/\n        data: any;\n        /**\n         * 开始拖拽。\n         * @param\ttarget 待拖拽的 <code>Sprite</code> 对象。\n         * @param\tarea 滑动范围。\n         * @param\thasInertia 拖动是否有惯性。\n         * @param\telasticDistance 橡皮筋最大值。\n         * @param\telasticBackTime 橡皮筋回弹时间，单位为毫秒。\n         * @param\tdata 事件携带数据。\n         * @param\tdisableMouseEvent 鼠标事件是否有效。\n         * @param\tratio 惯性阻尼系数\n         */\n        start(target: Sprite, area: Rectangle, hasInertia: boolean, elasticDistance: number, elasticBackTime: number, data: any, disableMouseEvent: boolean, ratio?: number): void;\n        /**\n         * 停止拖拽。\n         */\n        stop(): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * <code>Ease</code> 类定义了缓动函数，以便实现 <code>Tween</code> 动画的缓动效果。\n     */\n    class Ease {\n        /**\n         * 定义无加速持续运动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static linearNone(t: number, b: number, c: number, d: number): number;\n        /**\n         * 定义无加速持续运动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static linearIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 定义无加速持续运动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static linearInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 定义无加速持续运动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static linearOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 方法以零速率开始运动，然后在执行时加快运动速度。\n         * 它的运动是类似一个球落向地板又弹起后，几次逐渐减小的回弹运动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static bounceIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * 它的运动是类似一个球落向地板又弹起后，几次逐渐减小的回弹运动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static bounceInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * 它的运动是类似一个球落向地板又弹起后，几次逐渐减小的回弹运动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static bounceOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始时往后运动，然后反向朝目标移动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @param\ts 指定过冲量，此处数值越大，过冲越大。\n         * @return 指定时间的插补属性的值。\n         */\n        static backIn(t: number, b: number, c: number, d: number, s?: number): number;\n        /**\n         * 开始运动时是向后跟踪，再倒转方向并朝目标移动，稍微过冲目标，然后再次倒转方向，回来朝目标移动。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @param\ts 指定过冲量，此处数值越大，过冲越大。\n         * @return 指定时间的插补属性的值。\n         */\n        static backInOut(t: number, b: number, c: number, d: number, s?: number): number;\n        /**\n         * 开始运动时是朝目标移动，稍微过冲，再倒转方向回来朝着目标。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @param\ts 指定过冲量，此处数值越大，过冲越大。\n         * @return 指定时间的插补属性的值。\n         */\n        static backOut(t: number, b: number, c: number, d: number, s?: number): number;\n        /**\n         * 方法以零速率开始运动，然后在执行时加快运动速度。\n         * 其中的运动由按照指数方式衰减的正弦波来定义。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @param\ta 指定正弦波的幅度。\n         * @param\tp 指定正弦波的周期。\n         * @return 指定时间的插补属性的值。\n         */\n        static elasticIn(t: number, b: number, c: number, d: number, a?: number, p?: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * 其中的运动由按照指数方式衰减的正弦波来定义。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @param\ta 指定正弦波的幅度。\n         * @param\tp 指定正弦波的周期。\n         * @return 指定时间的插补属性的值。\n         */\n        static elasticInOut(t: number, b: number, c: number, d: number, a?: number, p?: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * 其中的运动由按照指数方式衰减的正弦波来定义。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @param\ta 指定正弦波的幅度。\n         * @param\tp 指定正弦波的周期。\n         * @return 指定时间的插补属性的值。\n         */\n        static elasticOut(t: number, b: number, c: number, d: number, a?: number, p?: number): number;\n        /**\n         * 以零速率开始运动，然后在执行时加快运动速度。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static strongIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static strongInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static strongOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * Sine 缓动方程中的运动加速度小于 Quad 方程中的运动加速度。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static sineInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以零速率开始运动，然后在执行时加快运动速度。\n         * Sine 缓动方程中的运动加速度小于 Quad 方程中的运动加速度。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static sineIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * Sine 缓动方程中的运动加速度小于 Quad 方程中的运动加速度。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static sineOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以零速率开始运动，然后在执行时加快运动速度。\n         * Quint 缓动方程的运动加速大于 Quart 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quintIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * Quint 缓动方程的运动加速大于 Quart 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quintInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * Quint 缓动方程的运动加速大于 Quart 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quintOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 方法以零速率开始运动，然后在执行时加快运动速度。\n         * Quart 缓动方程的运动加速大于 Cubic 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quartIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * Quart 缓动方程的运动加速大于 Cubic 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quartInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * Quart 缓动方程的运动加速大于 Cubic 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quartOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 方法以零速率开始运动，然后在执行时加快运动速度。\n         * Cubic 缓动方程的运动加速大于 Quad 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static cubicIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * Cubic 缓动方程的运动加速大于 Quad 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static cubicInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * Cubic 缓动方程的运动加速大于 Quad 缓动方程。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static cubicOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 方法以零速率开始运动，然后在执行时加快运动速度。\n         * Quad 缓动方程中的运动加速度等于 100% 缓动的时间轴补间的运动加速度，并且显著小于 Cubic 缓动方程中的运动加速度。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quadIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * Quad 缓动方程中的运动加速度等于 100% 缓动的时间轴补间的运动加速度，并且显著小于 Cubic 缓动方程中的运动加速度。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quadInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * Quad 缓动方程中的运动加速度等于 100% 缓动的时间轴补间的运动加速度，并且显著小于 Cubic 缓动方程中的运动加速度。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static quadOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 方法以零速率开始运动，然后在执行时加快运动速度。\n         * 其中每个时间间隔是剩余距离减去一个固定比例部分。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static expoIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * 其中每个时间间隔是剩余距离减去一个固定比例部分。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static expoInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * 其中每个时间间隔是剩余距离减去一个固定比例部分。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static expoOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 方法以零速率开始运动，然后在执行时加快运动速度。\n         * 缓动方程的运动加速会产生突然的速率变化。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static circIn(t: number, b: number, c: number, d: number): number;\n        /**\n         * 开始运动时速率为零，先对运动进行加速，再减速直到速率为零。\n         * 缓动方程的运动加速会产生突然的速率变化。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static circInOut(t: number, b: number, c: number, d: number): number;\n        /**\n         * 以较快速度开始运动，然后在执行时减慢运动速度，直至速率为零。\n         * 缓动方程的运动加速会产生突然的速率变化。\n         * @param\tt 指定当前时间，介于 0 和持续时间之间（包括二者）。\n         * @param\tb 指定动画属性的初始值。\n         * @param\tc 指定动画属性的更改总计。\n         * @param\td 指定运动的持续时间。\n         * @return 指定时间的插补属性的值。\n         */\n        static circOut(t: number, b: number, c: number, d: number): number;\n    }\n}\ndeclare module laya.utils {\n    import FrameAnimation = laya.display.FrameAnimation;\n    import Graphics = laya.display.Graphics;\n    import Matrix = laya.maths.Matrix;\n    /**\n     * @private\n     */\n    class GraphicAnimation extends FrameAnimation {\n        /**\n         * @private\n         */\n        animationList: Array<any>;\n        /**\n         * @private\n         */\n        animationDic: any;\n        protected _nodeList: Array<any>;\n        protected _nodeDefaultProps: any;\n        protected _gList: Array<any>;\n        protected _nodeIDAniDic: any;\n        protected static _temParam: Array<any>;\n        protected _createFrameGraphic(frame: number): any;\n        protected _nodeGDic: any;\n        protected _updateNodeGraphic(node: any, frame: number, parentTransfrom: Matrix, g: Graphics, alpha?: number): void;\n        protected _updateNoChilds(tNodeG: GraphicNode, g: Graphics): void;\n        protected _updateNodeGraphic2(node: any, frame: number, g: Graphics): void;\n        protected _calculateNodeKeyFrames(node: any): void;\n        protected getNodeDataByID(nodeID: number): any;\n        protected _getParams(obj: any, params: Array<any>, frame: number, obj2: any): Array<any>;\n        protected _getNodeGraphicData(nodeID: number, frame: number, rst: GraphicNode): GraphicNode;\n        protected _getTextureByUrl(url: string): any;\n        /**\n         * @private\n         */\n        setAniData(uiView: any, aniName?: string): void;\n        parseByData(aniData: any): any;\n        /**\n         * @private\n         */\n        setUpAniData(uiView: any): void;\n        protected _clear(): void;\n        static parseAnimationByData(animationObject: any): any;\n        static parseAnimationData(aniData: any): any;\n    }\n    class GraphicNode {\n        skin: string;\n        transform: Matrix;\n        resultTransform: Matrix;\n        width: number;\n        height: number;\n        alpha: number;\n        recover(): void;\n        static create(): GraphicNode;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * <p><code>Handler</code> 是事件处理器类。</p>\n     * <p>推荐使用 Handler.create() 方法从对象池创建，减少对象创建消耗。创建的 Handler 对象不再使用后，可以使用 Handler.recover() 将其回收到对象池，回收后不要再使用此对象，否则会导致不可预料的错误。</p>\n     * <p><b>注意：</b>由于鼠标事件也用本对象池，不正确的回收及调用，可能会影响鼠标事件的执行。</p>\n     */\n    class Handler {\n        /** 执行域(this)。*/\n        caller: any;\n        /** 处理方法。*/\n        method: Function;\n        /** 参数。*/\n        args: Array<any>;\n        /** 表示是否只执行一次。如果为true，回调后执行recover()进行回收，回收后会被再利用，默认为false 。*/\n        once: boolean;\n        protected _id: number;\n        /**\n         * 根据指定的属性值，创建一个 <code>Handler</code> 类的实例。\n         * @param\tcaller 执行域。\n         * @param\tmethod 处理函数。\n         * @param\targs 函数参数。\n         * @param\tonce 是否只执行一次。\n         */\n        constructor(caller?: any, method?: Function, args?: Array<any>, once?: boolean);\n        /**\n         * 设置此对象的指定属性值。\n         * @param\tcaller 执行域(this)。\n         * @param\tmethod 回调方法。\n         * @param\targs 携带的参数。\n         * @param\tonce 是否只执行一次，如果为true，执行后执行recover()进行回收。\n         * @return  返回 handler 本身。\n         */\n        setTo(caller: any, method: Function, args: Array<any>, once: boolean): Handler;\n        /**\n         * 执行处理器。\n         */\n        run(): any;\n        /**\n         * 执行处理器，携带额外数据。\n         * @param\tdata 附加的回调数据，可以是单数据或者Array(作为多参)。\n         */\n        runWith(data: any): any;\n        /**\n         * 清理对象引用。\n         */\n        clear(): Handler;\n        /**\n         * 清理并回收到 Handler 对象池内。\n         */\n        recover(): void;\n        /**\n         * 从对象池内创建一个Handler，默认会执行一次并立即回收，如果不需要自动回收，设置once参数为false。\n         * @param\tcaller 执行域(this)。\n         * @param\tmethod 回调方法。\n         * @param\targs 携带的参数。\n         * @param\tonce 是否只执行一次，如果为true，回调后执行recover()进行回收，默认为true。\n         * @return  返回创建的handler实例。\n         */\n        static create(caller: any, method: Function, args?: Array<any>, once?: boolean): Handler;\n    }\n}\ndeclare module laya.utils {\n    import Graphics = laya.display.Graphics;\n    /**\n     * 鼠标点击区域，可以设置绘制一系列矢量图作为点击区域和非点击区域（目前只支持圆形，矩形，多边形）\n     */\n    class HitArea {\n        /**\n         * 是否包含某个点\n         * @param x x坐标\n         * @param y y坐标\n         * @return 是否点击到\n         */\n        isHit(x: number, y: number): boolean;\n        /**\n         * 检测对象是否包含指定的点。\n         * @param\tx\t点的 X 轴坐标值（水平位置）。\n         * @param\ty\t点的 Y 轴坐标值（垂直位置）。\n         * @return\t如果包含指定的点，则值为 true；否则为 false。\n         */\n        contains(x: number, y: number): boolean;\n        /**\n         * @private\n         * 是否击中Graphic\n         */\n        static isHitGraphic(x: number, y: number, graphic: Graphics): boolean;\n        /**\n         * @private\n         * 是否击中绘图指令\n         */\n        static isHitCmd(x: number, y: number, cmd: Array<any>): boolean;\n        /**\n         * @private\n         * 坐标是否在多边形内\n         */\n        static ptInPolygon(x: number, y: number, areaPoints: Array<any>): boolean;\n        /**\n         * 可点击区域，可以设置绘制一系列矢量图作为点击区域（目前只支持圆形，矩形，多边形）\n         */\n        hit: Graphics;\n        /**\n         * 不可点击区域，可以设置绘制一系列矢量图作为非点击区域（目前只支持圆形，矩形，多边形）\n         */\n        unHit: Graphics;\n    }\n}\ndeclare module laya.utils {\n    import CSSStyle = laya.display.css.CSSStyle;\n    import ILayout = laya.display.ILayout;\n    import Sprite = laya.display.Sprite;\n    /**\n     * @private\n     * <code>HTMLChar</code> 是一个 HTML 字符类。\n     */\n    class HTMLChar implements ILayout {\n        /** 表示是否是正常单词(英文|.|数字)。*/\n        isWord: boolean;\n        /** 字符。*/\n        char: string;\n        /** 字符数量。*/\n        charNum: number;\n        /** CSS 样式。*/\n        style: CSSStyle;\n        /**\n         * 根据指定的字符、宽高、样式，创建一个 <code>HTMLChar</code> 类的实例。\n         * @param\tchar 字符。\n         * @param\tw 宽度。\n         * @param\th 高度。\n         * @param\tstyle CSS 样式。\n         */\n        constructor(char: string, w: number, h: number, style: CSSStyle);\n        /**\n         * 设置与此对象绑定的显示对象 <code>Sprite</code> 。\n         * @param\tsprite 显示对象 <code>Sprite</code> 。\n         */\n        setSprite(sprite: Sprite): void;\n        /**\n         * 获取与此对象绑定的显示对象 <code>Sprite</code>。\n         * @return\n         */\n        getSprite(): Sprite;\n        /**\n         * 此对象存储的 X 轴坐标值。\n         * 当设置此值时，如果此对象有绑定的 Sprite 对象，则改变 Sprite 对象的属性 x 的值。\n         */\n        x: number;\n        /**\n         * 此对象存储的 Y 轴坐标值。\n         * 当设置此值时，如果此对象有绑定的 Sprite 对象，则改变 Sprite 对象的属性 y 的值。\n         */\n        y: number;\n        /**\n         * 宽度。\n         */\n        width: number;\n        /**\n         * 高度。\n         */\n        height: number;\n        _isChar(): boolean;\n        _getCSSStyle(): CSSStyle;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * <code>Log</code> 类用于在界面内显示日志记录信息。\n     */\n    class Log {\n        /**最大打印数量，超过这个数量，则自动清理一次*/\n        static maxCount: number;\n        /**\n         * 激活Log系统，使用方法Laya.init(800,600,Laya.Log);\n         */\n        static enable(): void;\n        /**隐藏/显示日志面板*/\n        static toggle(): void;\n        /**\n         * 增加日志内容。\n         * @param\tvalue 需要增加的日志内容。\n         */\n        static print(value: string): void;\n        /**\n         * 清理日志\n         */\n        static clear(): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * <code>Mouse</code> 类用于控制鼠标光标。\n     */\n    class Mouse {\n        constructor();\n        /**\n         * 设置鼠标样式\n         * @param cursorStr\n         * 例如auto move no-drop col-resize\n         * all-scroll pointer not-allowed row-resize\n         * crosshair progress e-resize ne-resize\n         * default text n-resize nw-resize\n         * help vertical-text s-resize se-resize\n         * inherit wait w-resize sw-resize\n         *\n         */\n        static cursor: string;\n        /**\n         * 隐藏鼠标\n         *\n         */\n        static hide(): void;\n        /**\n         * 显示鼠标\n         *\n         */\n        static show(): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * <p> <code>Pool</code> 是对象池类，用于对象的存贮、重复使用。</p>\n     * <p>合理使用对象池，可以有效减少对象创建的开销，避免频繁的垃圾回收，从而优化游戏流畅度。</p>\n     */\n    class Pool {\n        /**\n         * 根据对象类型标识字符，获取对象池。\n         * @param sign 对象类型标识字符。\n         * @return 对象池。\n         */\n        static getPoolBySign(sign: string): Array<any>;\n        /**\n         * 清除对象池的对象。\n         * @param sign 对象类型标识字符。\n         */\n        static clearBySign(sign: string): void;\n        /**\n         * 将对象放到对应类型标识的对象池中。\n         * @param sign 对象类型标识字符。\n         * @param item 对象。\n         */\n        static recover(sign: string, item: any): void;\n        /**\n         * <p>根据传入的对象类型标识字符，获取对象池中此类型标识的一个对象实例。</p>\n         * <p>当对象池中无此类型标识的对象时，则根据传入的类型，创建一个新的对象返回。</p>\n         * @param sign 对象类型标识字符。\n         * @param cls 用于创建该类型对象的类。\n         * @return 此类型标识的一个对象。\n         */\n        static getItemByClass(sign: string, cls: any): any;\n        /**\n         * <p>根据传入的对象类型标识字符，获取对象池中此类型标识的一个对象实例。</p>\n         * <p>当对象池中无此类型标识的对象时，则使用传入的创建此类型对象的函数，新建一个对象返回。</p>\n         * @param sign 对象类型标识字符。\n         * @param createFun 用于创建该类型对象的方法。\n         * @return 此类型标识的一个对象。\n         */\n        static getItemByCreateFun(sign: string, createFun: Function): any;\n        /**\n         * 根据传入的对象类型标识字符，获取对象池中已存储的此类型的一个对象，如果对象池中无此类型的对象，则返回 null 。\n         * @param sign 对象类型标识字符。\n         * @return 对象池中此类型的一个对象，如果对象池中无此类型的对象，则返回 null 。\n         */\n        static getItem(sign: string): any;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * @private\n     * 基于个数的对象缓存管理器\n     */\n    class PoolCache {\n        /**\n         * 对象在Pool中的标识\n         */\n        sign: string;\n        /**\n         * 允许缓存的最大数量\n         */\n        maxCount: number;\n        /**\n         * 获取缓存的对象列表\n         * @return\n         *\n         */\n        getCacheList(): Array<any>;\n        /**\n         * 尝试清理缓存\n         * @param force 是否强制清理\n         *\n         */\n        tryDispose(force: boolean): void;\n        /**\n         * 添加对象缓存管理\n         * @param sign 对象在Pool中的标识\n         * @param maxCount 允许缓存的最大数量\n         *\n         */\n        static addPoolCacheManager(sign: string, maxCount?: number): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * @private\n     */\n    class RunDriver {\n        /**\n         * 滤镜动作集。\n         */\n        static FILTER_ACTIONS: Array<any>;\n        static now: Function;\n        static getWindow: Function;\n        static getPixelRatio: Function;\n        static getIncludeStr: Function;\n        static createShaderCondition: Function;\n        static measureText: Function;\n        /**\n         * @private\n         */\n        static getWebGLContext: Function;\n        /**\n         * 开始函数。\n         */\n        static beginFlush: Function;\n        static endFinish: Function;\n        /**\n         * 添加至图集的处理函数。\n         */\n        static addToAtlas: Function;\n        static flashFlushImage: Function;\n        /**\n         * 绘制到画布。\n         */\n        static drawToCanvas: Function;\n        /**\n         * 创建2D例子模型的处理函数。\n         */\n        static createParticleTemplate2D: Function;\n        /**\n         * 用于创建 WebGL 纹理。\n         */\n        static createGLTextur: Function;\n        /**\n         * 用于创建 WebGLContext2D 对象。\n         */\n        static createWebGLContext2D: Function;\n        /**\n         * 用于改变 WebGL宽高信息。\n         */\n        static changeWebGLSize: Function;\n        /**\n         * 用于创建 RenderSprite 对象。\n         */\n        static createRenderSprite: Function;\n        /**\n         * 用于创建滤镜动作。\n         */\n        static createFilterAction: Function;\n        /**\n         * 用于创建 Graphics 对象。\n         */\n        static createGraphics: Function;\n        static clear: Function;\n        /**\n         * 清空纹理函数。\n         */\n        static cancelLoadByUrl: Function;\n        /**\n         * 清空纹理函数。\n         */\n        static clearAtlas: Function;\n        static isAtlas: Function;\n        static addTextureToAtlas: Function;\n        static getTexturePixels: Function;\n        static skinAniSprite: Function;\n        static update3DLoop: Function;\n    }\n}\ndeclare module laya.utils {\n    import Sprite = laya.display.Sprite;\n    /**\n     * <p> <code>Stat</code> 是一个性能统计面板，可以实时更新相关的性能参数。</p>\n     * <p>参与统计的性能参数如下（所有参数都是每大约1秒进行更新）：<br/>\n     * FPS(Canvas)/FPS(WebGL)：Canvas 模式或者 WebGL 模式下的帧频，也就是每秒显示的帧数，值越高、越稳定，感觉越流畅；<br/>\n     * Sprite：统计所有渲染节点（包括容器）数量，它的大小会影响引擎进行节点遍历、数据组织和渲染的效率。其值越小，游戏运行效率越高；<br/>\n     * DrawCall：此值是决定性能的重要指标，其值越小，游戏运行效率越高。Canvas模式下表示每大约1秒的图像绘制次数；WebGL模式下表示每大约1秒的渲染提交批次，每次准备数据并通知GPU渲染绘制的过程称为1次DrawCall，在每次DrawCall中除了在通知GPU的渲染上比较耗时之外，切换材质与shader也是非常耗时的操作；<br/>\n     * CurMem：Canvas模式下，表示内存占用大小，值越小越好，过高会导致游戏闪退；WebGL模式下，表示内存与显存的占用，值越小越好；<br/>\n     * Shader：是 WebGL 模式独有的性能指标，表示每大约1秒 Shader 提交次数，值越小越好；<br/>\n     * Canvas：由三个数值组成，只有设置 CacheAs 后才会有值，默认为0/0/0。从左到右数值的意义分别为：每帧重绘的画布数量 / 缓存类型为\"normal\"类型的画布数量 / 缓存类型为\"bitmap\"类型的画布数量。</p>\n     */\n    class Stat {\n        /** 每秒帧数。*/\n        static FPS: number;\n        /**主舞台 <code>Stage</code> 渲染次数计数。 */\n        static loopCount: number;\n        /** 着色器请求次数。*/\n        static shaderCall: number;\n        /** 描绘次数。*/\n        static drawCall: number;\n        /** 三角形面数。*/\n        static trianglesFaces: number;\n        /** 精灵<code>Sprite</code> 的数量。*/\n        static spriteCount: number;\n        /** 精灵渲染使用缓存<code>Sprite</code> 的数量。*/\n        static spriteRenderUseCacheCount: number;\n        /** 八叉树节点检测次数。*/\n        static treeNodeCollision: number;\n        /** 八叉树精灵碰撞检测次数。*/\n        static treeSpriteCollision: number;\n        /** 画布 canvas 使用标准渲染的次数。*/\n        static canvasNormal: number;\n        /** 画布 canvas 使用位图渲染的次数。*/\n        static canvasBitmap: number;\n        /** 画布 canvas 缓冲区重绘次数。*/\n        static canvasReCache: number;\n        /** 表示当前使用的是否为慢渲染模式。*/\n        static renderSlow: boolean;\n        /** 资源管理器所管理资源的累计内存,以字节为单位。*/\n        static currentMemorySize: number;\n        static _sp: Sprite;\n        static _show: boolean;\n        static _useCanvas: boolean;\n        /**\n         * 显示性能统计信息。\n         * @param\tx X轴显示位置。\n         * @param\ty Y轴显示位置。\n         */\n        static show(x?: number, y?: number): void;\n        /**激活性能统计*/\n        static enable(): void;\n        /**\n         * 隐藏性能统计信息。\n         */\n        static hide(): void;\n        /**\n         * @private\n         * 清零性能统计计算相关的数据。\n         */\n        static clear(): void;\n        /**\n         * 点击性能统计显示区域的处理函数。\n         */\n        static onclick: Function;\n        /**\n         * @private\n         * 性能统计参数计算循环处理函数。\n         */\n        static loop(): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * @private\n     * <code>StringKey</code> 类用于存取字符串对应的数字。\n     */\n    class StringKey {\n        /**\n         * 添加一个字符。\n         * @param\tstr 字符，将作为key 存储相应生成的数字。\n         * @return 此字符对应的数字。\n         */\n        add(str: string): number;\n        /**\n         * 获取指定字符对应的ID。\n         * @param\tstr 字符。\n         * @return 此字符对应的ID。\n         */\n        getID(str: string): number;\n        /**\n         * 根据指定ID获取对应字符。\n         * @param  id ID。\n         * @return 此id对应的字符。\n         */\n        getName(id: number): string;\n    }\n}\ndeclare module laya.utils {\n    import EventDispatcher = laya.events.EventDispatcher;\n    /**\n     * <code>TimeLine</code> 是一个用来创建时间轴动画的类。\n     */\n    class TimeLine extends EventDispatcher {\n        /** 缩放动画播放的速度。*/\n        scale: number;\n        /**\n         * 控制一个对象，从当前点移动到目标点。\n         * @param\ttarget\t\t要控制的对象。\n         * @param\tprops\t\t要控制对象的属性。\n         * @param\tduration\t对象TWEEN的时间。\n         * @param\tease\t\t缓动类型\n         * @param\toffset\t\t相对于上一个对象，偏移多长时间（单位：毫秒）。\n         */\n        static to(target: any, props: any, duration: number, ease?: Function, offset?: number): TimeLine;\n        /**\n         * 从 props 属性，缓动到当前状态。\n         * @param\ttarget\t\ttarget 目标对象(即将更改属性值的对象)\n         * @param\tprops\t\t要控制对象的属性\n         * @param\tduration\t对象TWEEN的时间\n         * @param\tease\t\t缓动类型\n         * @param\toffset\t\t相对于上一个对象，偏移多长时间（单位：毫秒）\n         */\n        static from(target: any, props: any, duration: number, ease?: Function, offset?: number): TimeLine;\n        /**\n         * 控制一个对象，从当前点移动到目标点。\n         * @param\ttarget\t\t要控制的对象。\n         * @param\tprops\t\t要控制对象的属性。\n         * @param\tduration\t对象TWEEN的时间。\n         * @param\tease\t\t缓动类型\n         * @param\toffset\t\t相对于上一个对象，偏移多长时间（单位：毫秒）。\n         */\n        to(target: any, props: any, duration: number, ease?: Function, offset?: number): TimeLine;\n        /**\n         * 从 props 属性，缓动到当前状态。\n         * @param\ttarget\t\ttarget 目标对象(即将更改属性值的对象)\n         * @param\tprops\t\t要控制对象的属性\n         * @param\tduration\t对象TWEEN的时间\n         * @param\tease\t\t缓动类型\n         * @param\toffset\t\t相对于上一个对象，偏移多长时间（单位：毫秒）\n         */\n        from(target: any, props: any, duration: number, ease?: Function, offset?: number): TimeLine;\n        /**\n         * 在时间队列中加入一个标签。\n         * @param\tlabel\t标签名称。\n         * @param\toffset\t标签相对于上个动画的偏移时间(单位：毫秒)。\n         */\n        addLabel(label: string, offset: number): TimeLine;\n        /**\n         * 移除指定的标签\n         * @param\tlabel\n         */\n        removeLabel(label: string): void;\n        /**\n         * 动画从整个动画的某一时间开始。\n         * @param\ttime(单位：毫秒)。\n         */\n        gotoTime(time: number): void;\n        /**\n         * 从指定的标签开始播。\n         * @param\tLabel 标签名。\n         */\n        gotoLabel(Label: string): void;\n        /**\n         * 暂停整个动画。\n         */\n        pause(): void;\n        /**\n         * 恢复暂停动画的播放。\n         */\n        resume(): void;\n        /**\n         * 播放动画。\n         * @param\ttimeOrLabel 开启播放的时间点或标签名。\n         * @param\tloop 是否循环播放。\n         */\n        play(timeOrLabel?: any, loop?: boolean): void;\n        /**\n         * @private\n         * 得到帧索引\n         */\n        /**\n         * @private\n         * 设置帧索引\n         */\n        index: number;\n        /**\n         * 得到总帧数。\n         */\n        readonly total: number;\n        /**\n         * 重置所有对象，复用对象的时候使用。\n         */\n        reset(): void;\n        /**\n         * 彻底销毁此对象。\n         */\n        destroy(): void;\n    }\n    class tweenData {\n        type: number;\n        isTo: boolean;\n        startTime: number;\n        endTime: number;\n        target: any;\n        duration: number;\n        ease: Function;\n        data: any;\n        destroy(): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * <code>Timer</code> 是时钟管理类。它是一个单例，不要手动实例化此类，应该通过 Laya.timer 访问。\n     */\n    class Timer {\n        /** 时针缩放。*/\n        scale: number;\n        /** 当前帧开始的时间。*/\n        currTimer: number;\n        /** 当前的帧数。*/\n        currFrame: number;\n        /**\n         *两帧之间的时间间隔,单位毫秒。\n         */\n        readonly delta: number;\n        /**\n         * 创建 <code>Timer</code> 类的一个实例。\n         */\n        constructor();\n        protected _init(): void;\n        protected _now(): number;\n        /**\n         * @private\n         * 帧循环处理函数。\n         */\n        _update(): void;\n        _create(useFrame: boolean, repeat: boolean, delay: number, caller: any, method: Function, args: Array<any>, coverBefore: boolean): TimerHandler;\n        /**\n         * 定时执行一次。\n         * @param\tdelay\t延迟时间(单位为毫秒)。\n         * @param\tcaller\t执行域(this)。\n         * @param\tmethod\t定时器回调函数。\n         * @param\targs\t回调参数。\n         * @param\tcoverBefore\t是否覆盖之前的延迟执行，默认为 true 。\n         */\n        once(delay: number, caller: any, method: Function, args?: Array<any>, coverBefore?: boolean): void;\n        /**\n         * 定时重复执行。\n         * @param\tdelay\t间隔时间(单位毫秒)。\n         * @param\tcaller\t执行域(this)。\n         * @param\tmethod\t定时器回调函数。\n         * @param\targs\t回调参数。\n         * @param\tcoverBefore\t是否覆盖之前的延迟执行，默认为 true 。\n         * @param\tjumpFrame 时钟是否跳帧。基于时间的循环回调，单位时间间隔内，如能执行多次回调，出于性能考虑，引擎默认只执行一次，设置jumpFrame=true后，则回调会连续执行多次\n         */\n        loop(delay: number, caller: any, method: Function, args?: Array<any>, coverBefore?: boolean, jumpFrame?: boolean): void;\n        /**\n         * 定时执行一次(基于帧率)。\n         * @param\tdelay\t延迟几帧(单位为帧)。\n         * @param\tcaller\t执行域(this)。\n         * @param\tmethod\t定时器回调函数。\n         * @param\targs\t回调参数。\n         * @param\tcoverBefore\t是否覆盖之前的延迟执行，默认为 true 。\n         */\n        frameOnce(delay: number, caller: any, method: Function, args?: Array<any>, coverBefore?: boolean): void;\n        /**\n         * 定时重复执行(基于帧率)。\n         * @param\tdelay\t间隔几帧(单位为帧)。\n         * @param\tcaller\t执行域(this)。\n         * @param\tmethod\t定时器回调函数。\n         * @param\targs\t回调参数。\n         * @param\tcoverBefore\t是否覆盖之前的延迟执行，默认为 true 。\n         */\n        frameLoop(delay: number, caller: any, method: Function, args?: Array<any>, coverBefore?: boolean): void;\n        /** 返回统计信息。*/\n        toString(): string;\n        /**\n         * 清理定时器。\n         * @param\tcaller 执行域(this)。\n         * @param\tmethod 定时器回调函数。\n         */\n        clear(caller: any, method: Function): void;\n        /**\n         * 清理对象身上的所有定时器。\n         * @param\tcaller 执行域(this)。\n         */\n        clearAll(caller: any): void;\n        /**\n         * 延迟执行。\n         * @param\tcaller 执行域(this)。\n         * @param\tmethod 定时器回调函数。\n         * @param\targs 回调参数。\n         */\n        callLater(caller: any, method: Function, args?: Array<any>): void;\n        /**\n         * 立即执行 callLater 。\n         * @param\tcaller 执行域(this)。\n         * @param\tmethod 定时器回调函数。\n         */\n        runCallLater(caller: any, method: Function): void;\n        /**\n         * 立即提前执行定时器，执行之后从队列中删除\n         * @param\tcaller 执行域(this)。\n         * @param\tmethod 定时器回调函数。\n         */\n        runTimer(caller: any, method: Function): void;\n    }\n    class TimerHandler {\n        key: number;\n        repeat: boolean;\n        delay: number;\n        userFrame: boolean;\n        exeTime: number;\n        caller: any;\n        method: Function;\n        args: Array<any>;\n        jumpFrame: boolean;\n        clear(): void;\n        run(withClear: boolean): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * <code>Tween</code>  是一个缓动类。使用此类能够实现对目标对象属性的渐变。\n     */\n    class Tween {\n        gid: number;\n        /**更新回调，缓动数值发生变化时，回调变化的值*/\n        update: Handler;\n        /**\n         * 缓动对象的props属性到目标值。\n         * @param\ttarget 目标对象(即将更改属性值的对象)。\n         * @param\tprops 变化的属性列表，比如\n         * @param\tduration 花费的时间，单位毫秒。\n         * @param\tease 缓动类型，默认为匀速运动。\n         * @param\tcomplete 结束回调函数。\n         * @param\tdelay 延迟执行时间。\n         * @param\tcoverBefore 是否覆盖之前的缓动。\n         * @param\tautoRecover 是否自动回收，默认为true，缓动结束之后自动回收到对象池。\n         * @return\t返回Tween对象。\n         */\n        static to(target: any, props: any, duration: number, ease?: Function, complete?: Handler, delay?: number, coverBefore?: boolean, autoRecover?: boolean): Tween;\n        /**\n         * 从props属性，缓动到当前状态。\n         * @param\ttarget 目标对象(即将更改属性值的对象)。\n         * @param\tprops 变化的属性列表，比如\n         * @param\tduration 花费的时间，单位毫秒。\n         * @param\tease 缓动类型，默认为匀速运动。\n         * @param\tcomplete 结束回调函数。\n         * @param\tdelay 延迟执行时间。\n         * @param\tcoverBefore 是否覆盖之前的缓动。\n         * @param\tautoRecover 是否自动回收，默认为true，缓动结束之后自动回收到对象池。\n         * @return\t返回Tween对象。\n         */\n        static from(target: any, props: any, duration: number, ease?: Function, complete?: Handler, delay?: number, coverBefore?: boolean, autoRecover?: boolean): Tween;\n        /**\n         * 缓动对象的props属性到目标值。\n         * @param\ttarget 目标对象(即将更改属性值的对象)。\n         * @param\tprops 变化的属性列表，比如\n         * @param\tduration 花费的时间，单位毫秒。\n         * @param\tease 缓动类型，默认为匀速运动。\n         * @param\tcomplete 结束回调函数。\n         * @param\tdelay 延迟执行时间。\n         * @param\tcoverBefore 是否覆盖之前的缓动。\n         * @return\t返回Tween对象。\n         */\n        to(target: any, props: any, duration: number, ease?: Function, complete?: Handler, delay?: number, coverBefore?: boolean): Tween;\n        /**\n         * 从props属性，缓动到当前状态。\n         * @param\ttarget 目标对象(即将更改属性值的对象)。\n         * @param\tprops 变化的属性列表，比如\n         * @param\tduration 花费的时间，单位毫秒。\n         * @param\tease 缓动类型，默认为匀速运动。\n         * @param\tcomplete 结束回调函数。\n         * @param\tdelay 延迟执行时间。\n         * @param\tcoverBefore 是否覆盖之前的缓动。\n         * @return\t返回Tween对象。\n         */\n        from(target: any, props: any, duration: number, ease?: Function, complete?: Handler, delay?: number, coverBefore?: boolean): Tween;\n        _create(target: any, props: any, duration: number, ease: Function, complete: Handler, delay: number, coverBefore: boolean, isTo: boolean, usePool: boolean, runNow: boolean): Tween;\n        _updateEase(time: number): void;\n        /**设置当前执行比例**/\n        progress: number;\n        /**\n         * 立即结束缓动并到终点。\n         */\n        complete(): void;\n        /**\n         * 暂停缓动，可以通过resume或restart重新开始。\n         */\n        pause(): void;\n        /**\n         * 设置开始时间。\n         * @param\tstartTime 开始时间。\n         */\n        setStartTime(startTime: number): void;\n        /**\n         * 清理指定目标对象上的所有缓动。\n         * @param\ttarget 目标对象。\n         */\n        static clearAll(target: any): void;\n        /**\n         * 清理某个缓动。\n         * @param\ttween 缓动对象。\n         */\n        static clear(tween: Tween): void;\n        static clearTween(target: any): void;\n        /**\n         * 停止并清理当前缓动。\n         */\n        clear(): void;\n        /**\n         * @private\n         */\n        _clear(): void;\n        /** 回收到对象池。*/\n        recover(): void;\n        /**\n         * 重新开始暂停的缓动。\n         */\n        restart(): void;\n        /**\n         * 恢复暂停的缓动。\n         */\n        resume(): void;\n    }\n}\ndeclare module laya.utils {\n    import Sprite = laya.display.Sprite;\n    import Rectangle = laya.maths.Rectangle;\n    /**\n     * <code>Utils</code> 是工具类。\n     */\n    class Utils {\n        protected static _extReg: RegExp;\n        /**\n         * 角度转弧度。\n         * @param\tangle 角度值。\n         * @return\t返回弧度值。\n         */\n        static toRadian(angle: number): number;\n        /**\n         * 弧度转换为角度。\n         * @param\tradian 弧度值。\n         * @return\t返回角度值。\n         */\n        static toAngle(radian: number): number;\n        /**\n         * 将传入的 uint 类型颜色值转换为字符串型颜色值。\n         * @param color 颜色值。\n         * @return 字符串型颜色值。\n         */\n        static toHexColor(color: number): string;\n        /**获取一个全局唯一ID。*/\n        static getGID(): number;\n        /**\n         * 将字符串解析成 XML 对象。\n         * @param value 需要解析的字符串。\n         * @return js原生的XML对象。\n         */\n        static parseXMLFromString: Function;\n        /**\n         * @private\n         * <p>连接数组。和array的concat相比，此方法不创建新对象</p>\n         * <b>注意：</b>若 参数 a 不为空，则会改变参数 source 的值为连接后的数组。\n         * @param\tsource 待连接的数组目标对象。\n         * @param\tarray 待连接的数组对象。\n         * @return 连接后的数组。\n         */\n        static concatArray(source: Array<any>, array: Array<any>): Array<any>;\n        /**\n         * @private\n         * 清空数组对象。\n         * @param\tarray 数组。\n         * @return\t清空后的 array 对象。\n         */\n        static clearArray(array: Array<any>): Array<any>;\n        /**\n         * @private\n         * 清空source数组，复制array数组的值。\n         * @param\tsource 需要赋值的数组。\n         * @param\tarray 新的数组值。\n         * @return \t复制后的数据 source 。\n         */\n        static copyArray(source: Array<any>, array: Array<any>): Array<any>;\n        /**\n         * @private\n         * 根据传入的显示对象 <code>Sprite</code> 和此显示对象上的 两个点，返回此对象上的两个点在舞台坐标系上组成的最小的矩形区域对象。\n         * @param\tsprite 显示对象 <code>Sprite</code>。\n         * @param\tx0\t点一的 X 轴坐标点。\n         * @param\ty0\t点一的 Y 轴坐标点。\n         * @param\tx1\t点二的 X 轴坐标点。\n         * @param\ty1\t点二的 Y 轴坐标点。\n         * @return 两个点在舞台坐标系组成的矩形对象 <code>Rectangle</code>。\n         */\n        static getGlobalRecByPoints(sprite: Sprite, x0: number, y0: number, x1: number, y1: number): Rectangle;\n        /**\n         * 计算传入的显示对象 <code>Sprite</code> 的全局坐标系的坐标和缩放值，返回 <code>Rectangle</code> 对象存放计算出的坐标X值、Y值、ScaleX值、ScaleY值。\n         * @param\tsprite <code>Sprite</code> 对象。\n         * @return  矩形对象 <code>Rectangle</code>\n         */\n        static getGlobalPosAndScale(sprite: Sprite): Rectangle;\n        /**\n         * 给传入的函数绑定作用域，返回绑定后的函数。\n         * @param\tfun 函数对象。\n         * @param\tscope 函数作用域。\n         * @return 绑定后的函数。\n         */\n        static bind(fun: Function, scope: any): Function;\n        /**\n         * 测量文本在指定样式下的宽度、高度信息。\n         * @param\ttxt 文本内容。\n         * @param\tfont 文本字体样式。\n         * @return 文本的宽高信息对象。如：\n         */\n        static measureText(txt: string, font: string): any;\n        /**\n         * @private\n         * 对传入的数组列表，根据子项的属性 Z 值进行重新排序。返回是否已重新排序的 Boolean 值。\n         * @param\tarray 子对象数组。\n         * @return\tBoolean 值，表示是否已重新排序。\n         */\n        static updateOrder(array: Array<any>): boolean;\n        /**\n         * @private\n         * 批量移动点坐标。\n         * @param points 坐标列表。\n         * @param x x轴偏移量。\n         * @param y y轴偏移量。\n         */\n        static transPointList(points: Array<any>, x: number, y: number): void;\n        /**\n         * 解析一个字符串，并返回一个整数。和JS原生的parseInt不同：如果str为空或者非数字，原生返回NaN，这里返回0。\n         * @param\tstr\t\t要被解析的字符串。\n         * @param\tradix\t表示要解析的数字的基数。默认值为0，表示10进制，其他值介于 2 ~ 36 之间。如果它以 “0x” 或 “0X” 开头，将以 16 为基数。如果该参数不在上述范围内，则此方法返回 0。\n         * @return\t返回解析后的数字。\n         */\n        static parseInt(str: string, radix?: number): number;\n        static getFileExtension(path: string): string;\n        /**\n         * 获取指定区域内相对于窗口左上角的transform。\n         * @param\tcoordinateSpace\t坐标空间，不能是Stage引用\n         * @param\tx\t\t\t\t相对于coordinateSpace的x坐标\n         * @param\ty\t\t\t\t相对于coordinateSpace的y坐标\n         * @return\n         */\n        static getTransformRelativeToWindow(coordinateSpace: Sprite, x: number, y: number): any;\n        /**\n         * 使DOM元素使用舞台内的某块区域内。\n         * @param\tdom\t\t\t\tDOM元素引用\n         * @param\tcoordinateSpace\t坐标空间，不能是Stage引用\n         * @param\tx\t\t\t\t相对于coordinateSpace的x坐标\n         * @param\ty\t\t\t\t相对于coordinateSpace的y坐标\n         * @param\twidth\t\t\t宽度\n         * @param\theight\t\t\t高度\n         */\n        static fitDOMElementInArea(dom: any, coordinateSpace: Sprite, x: number, y: number, width: number, height: number): void;\n        /**\n         * @private\n         * 是否是可用的Texture数组\n         * @param\ttextureList\n         * @return\n         */\n        static isOkTextureList(textureList: Array<any>): boolean;\n        /**\n         * @private\n         * 是否是可用的绘图指令数组\n         * @param\tcmds\n         * @return\n         */\n        static isOKCmdList(cmds: Array<any>): boolean;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * @private\n     */\n    class VectorGraphManager {\n        static instance: VectorGraphManager;\n        useDic: any;\n        shapeDic: any;\n        shapeLineDic: any;\n        constructor();\n        static getInstance(): VectorGraphManager;\n        /**\n         * 得到个空闲的ID\n         * @return\n         */\n        getId(): number;\n        /**\n         * 添加一个图形到列表中\n         * @param\tid\n         * @param\tshape\n         */\n        addShape(id: number, shape: any): void;\n        /**\n         * 添加一个线图形到列表中\n         * @param\tid\n         * @param\tLine\n         */\n        addLine(id: number, Line: any): void;\n        /**\n         * 检测一个对象是否在使用中\n         * @param\tid\n         */\n        getShape(id: number): void;\n        /**\n         * 删除一个图形对象\n         * @param\tid\n         */\n        deleteShape(id: number): void;\n        /**\n         * 得到缓存列表\n         * @return\n         */\n        getCacheList(): Array<any>;\n        /**\n         * 开始清理状态，准备销毁\n         */\n        startDispose(key: boolean): void;\n        /**\n         * 确认销毁\n         */\n        endDispose(): void;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * 封装弱引用WeakMap\n     * 如果支持WeakMap，则使用WeakMap，如果不支持，则用Object代替\n     * 注意：如果采用Object，为了防止内存泄漏，则采用定时清理缓存策略\n     */\n    class WeakObject {\n        /**是否支持WeakMap*/\n        static supportWeakMap: boolean;\n        /**如果不支持WeakMap，则多少时间清理一次缓存，默认5分钟清理一次*/\n        static delInterval: number;\n        /**全局WeakObject单例*/\n        static I: WeakObject;\n        _obj: any;\n        static __init__(): void;\n        /**清理缓存，回收内存*/\n        static clearCache(): void;\n        constructor();\n        /**\n         * 设置缓存\n         * @param\tkey kye对象，可被回收\n         * @param\tvalue object对象，可被回收\n         */\n        set(key: any, value: any): void;\n        /**\n         * 获取缓存\n         * @param\tkey kye对象，可被回收\n         */\n        get(key: any): any;\n        /**\n         * 删除缓存\n         */\n        del(key: any): void;\n        /**\n         * 是否有缓存\n         */\n        has(key: any): boolean;\n    }\n}\ndeclare module laya.utils {\n    /**\n     * @private\n     */\n    class WordText {\n        id: number;\n        save: Array<any>;\n        toUpperCase: string;\n        changed: boolean;\n        setText(txt: string): void;\n        toString(): string;\n        readonly length: number;\n        charCodeAt(i: number): number;\n        charAt(i: number): string;\n    }\n}\ndeclare module laya.webgl.atlas {\n    import Texture = laya.resource.Texture;\n    import IMergeAtlasBitmap = laya.webgl.resource.IMergeAtlasBitmap;\n    class Atlaser extends AtlasGrid {\n        _inAtlasTextureKey: Array<any>;\n        _inAtlasTextureBitmapValue: Array<any>;\n        _inAtlasTextureOriUVValue: Array<any>;\n        readonly texture: AtlasWebGLCanvas;\n        readonly inAtlasWebGLImagesKey: any;\n        readonly InAtlasWebGLImagesOffsetValue: Array<any>;\n        constructor(gridNumX: number, gridNumY: number, width: number, height: number, atlasID: number);\n        findBitmapIsExist(bitmap: any): number;\n        /**\n         *\n         * @param\tinAtlasRes\n         * @return  是否已经存在队列中\n         */\n        addToAtlasTexture(mergeAtlasBitmap: IMergeAtlasBitmap, offsetX: number, offsetY: number): void;\n        addToAtlas(texture: Texture, offsetX: number, offsetY: number): void;\n        clear(): void;\n        dispose(): void;\n    }\n}\ndeclare module laya.webgl.atlas {\n    class AtlasGrid {\n        _atlasID: number;\n        constructor(width?: number, height?: number, atlasID?: number);\n        getAltasID(): number;\n        setAltasID(atlasID: number): void;\n        addTex(type: number, width: number, height: number): MergeFillInfo;\n    }\n    class TexRowInfo {\n        spaceCount: number;\n    }\n    class TexMergeTexSize {\n        width: number;\n        height: number;\n    }\n}\ndeclare module laya.webgl.atlas {\n    import Texture = laya.resource.Texture;\n    class AtlasResourceManager {\n        static gridSize: number;\n        static atlasTextureWidth: number;\n        static atlasTextureHeight: number;\n        static maxTextureCount: number;\n        static _atlasRestore: number;\n        static BOARDER_TYPE_NO: number;\n        static BOARDER_TYPE_RIGHT: number;\n        static BOARDER_TYPE_LEFT: number;\n        static BOARDER_TYPE_BOTTOM: number;\n        static BOARDER_TYPE_TOP: number;\n        static BOARDER_TYPE_ALL: number;\n        static readonly instance: AtlasResourceManager;\n        static readonly enabled: boolean;\n        static atlasLimitWidth: number;\n        static atlasLimitHeight: number;\n        static _enable(): void;\n        static _disable(): void;\n        static __init__(): void;\n        constructor(width: number, height: number, gridSize: number, maxTexNum: number);\n        setAtlasParam(width: number, height: number, gridSize: number, maxTexNum: number): boolean;\n        pushData(texture: Texture): boolean;\n        addToAtlas(tex: Texture): void;\n        /**\n         * 回收大图合集,不建议手动调用\n         * @return\n         */\n        garbageCollection(): boolean;\n        freeAll(): void;\n        getAtlaserCount(): number;\n        getAtlaserByIndex(index: number): Atlaser;\n    }\n}\ndeclare module laya.webgl.atlas {\n    import Bitmap = laya.resource.Bitmap;\n    import WebGLImage = laya.webgl.resource.WebGLImage;\n    class AtlasWebGLCanvas extends Bitmap {\n        _atlaser: Atlaser;\n        /***\n         * 设置图片宽度\n         * @param value 图片宽度\n         */\n        width: number;\n        /***\n         * 设置图片高度\n         * @param value 图片高度\n         */\n        height: number;\n        constructor();\n        /**兼容Stage3D使用*/\n        _flashCacheImage: WebGLImage;\n        _flashCacheImageNeedFlush: boolean;\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n        /**采样image到WebGLTexture的一部分*/\n        texSubImage2D(xoffset: number, yoffset: number, bitmap: any): void;\n        /**采样image到WebGLTexture的一部分*/\n        texSubImage2DPixel(xoffset: number, yoffset: number, width: number, height: number, pixel: any): void;\n    }\n}\ndeclare module laya.webgl.atlas {\n    class MergeFillInfo {\n        x: number;\n        y: number;\n        ret: boolean;\n        constructor();\n    }\n}\ndeclare module laya.webgl.canvas {\n    import WebGLContext = laya.webgl.WebGLContext;\n    class BlendMode {\n        static activeBlendFunction: Function;\n        static NAMES: Array<any>;\n        static TOINT: any;\n        static NORMAL: string;\n        static ADD: string;\n        static MULTIPLY: string;\n        static SCREEN: string;\n        static LIGHT: string;\n        static OVERLAY: string;\n        static DESTINATIONOUT: string;\n        static fns: Array<any>;\n        static targetFns: Array<any>;\n        static _init_(gl: WebGLContext): void;\n        static BlendNormal(gl: WebGLContext): void;\n        static BlendAdd(gl: WebGLContext): void;\n        static BlendMultiply(gl: WebGLContext): void;\n        static BlendScreen(gl: WebGLContext): void;\n        static BlendOverlay(gl: WebGLContext): void;\n        static BlendLight(gl: WebGLContext): void;\n        static BlendNormalTarget(gl: WebGLContext): void;\n        static BlendAddTarget(gl: WebGLContext): void;\n        static BlendMultiplyTarget(gl: WebGLContext): void;\n        static BlendScreenTarget(gl: WebGLContext): void;\n        static BlendOverlayTarget(gl: WebGLContext): void;\n        static BlendLightTarget(gl: WebGLContext): void;\n        static BlendMask(gl: WebGLContext): void;\n        static BlendDestinationOut(gl: WebGLContext): void;\n    }\n}\ndeclare module laya.webgl.canvas {\n    import Color = laya.utils.Color;\n    class DrawStyle {\n        static DEFAULT: DrawStyle;\n        _color: Color;\n        static create(value: any): DrawStyle;\n        constructor(value: any);\n        setValue(value: any): void;\n        reset(): void;\n        equal(value: any): boolean;\n        toColorStr(): string;\n    }\n}\ndeclare module laya.webgl.canvas {\n    import Rectangle = laya.maths.Rectangle;\n    import IShape = laya.webgl.shapes.IShape;\n    import IndexBuffer2D = laya.webgl.utils.IndexBuffer2D;\n    import VertexBuffer2D = laya.webgl.utils.VertexBuffer2D;\n    class Path {\n        _x: number;\n        _y: number;\n        _rect: Rectangle;\n        ib: IndexBuffer2D;\n        vb: VertexBuffer2D;\n        dirty: boolean;\n        geomatrys: Array<any>;\n        _curGeomatry: IShape;\n        offset: number;\n        count: number;\n        tempArray: Array<any>;\n        closePath: boolean;\n        constructor();\n        addPoint(pointX: number, pointY: number): void;\n        getEndPointX(): number;\n        getEndPointY(): number;\n        polygon(x: number, y: number, points: Array<any>, color: number, borderWidth: number, borderColor: any): IShape;\n        setGeomtry(shape: IShape): void;\n        drawLine(x: number, y: number, points: Array<any>, width: number, color: number): IShape;\n        update(): void;\n        reset(): void;\n        recover(): void;\n    }\n}\n\n\n\n\n\ndeclare module laya.webgl.display {\n    import Graphics = laya.display.Graphics;\n    import Shader = laya.webgl.shader.Shader;\n    import Buffer2D = laya.webgl.utils.Buffer2D;\n    class GraphicsGL extends Graphics {\n        constructor();\n        setShader(shader: Shader): void;\n        setIBVB(x: number, y: number, ib: Buffer2D, vb: Buffer2D, numElement: number, shader: Shader): void;\n        drawParticle(x: number, y: number, ps: any): void;\n    }\n}\ndeclare module laya.webgl.resource {\n    interface IMergeAtlasBitmap {\n        clearAtlasSource(): void;\n    }\n}\n\n\ndeclare module laya.webgl.resource {\n    import Bitmap = laya.resource.Bitmap;\n    import Context = laya.resource.Context;\n    class WebGLCanvas extends Bitmap {\n        static _createContext: Function;\n        flipY: boolean;\n        premulAlpha: boolean;\n        /**HTML Canvas*/\n        _canvas: any;\n        _imgData: any;\n        iscpuSource: boolean;\n        alwaysChange: boolean;\n        getCanvas(): any;\n        clear(): void;\n        destroy(): void;\n        readonly context: Context;\n        _setContext(context: Context): void;\n        getContext(contextID: string, other?: any): Context;\n        readonly source: any;\n        size(w: number, h: number): void;\n        asBitmap: boolean;\n        activeResource(force?: boolean): void;\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n        texSubImage2D(webglCanvas: WebGLCanvas, xoffset: number, yoffset: number): void;\n        toBase64(type: string, encoderOptions: number, callBack: Function): void;\n    }\n}\ndeclare module laya.webgl.resource {\n    import Bitmap = laya.resource.Bitmap;\n    import Texture = laya.resource.Texture;\n    class WebGLCharImage extends Bitmap implements IMergeAtlasBitmap {\n        /**HTML Canvas，绘制字符载体,非私有数据载体*/\n        canvas: any;\n        /**********************************************************************************/\n        cw: number;\n        ch: number;\n        xs: number;\n        ys: number;\n        char: string;\n        fillColor: string;\n        borderColor: string;\n        borderSize: number;\n        font: string;\n        fontSize: number;\n        texture: Texture;\n        lineWidth: number;\n        UV: Array<any>;\n        isSpace: boolean;\n        underLine: number;\n        /**\n         * 创建单个文字\n         * @param\tcontent\n         * @param\tdrawValue\n         * @return\n         */\n        static createOneChar(content: string, drawValue: any): WebGLCharImage;\n        active(): void;\n        readonly atlasSource: any;\n        /**\n         * 是否创建私有Source\n         * @return 是否创建\n         */\n        readonly allowMerageInAtlas: boolean;\n        /**\n         * 是否创建私有Source\n         * @return 是否创建\n         */\n        /**\n         * 是否创建私有Source,通常禁止修改\n         * @param value 是否创建\n         */\n        enableMerageInAtlas: boolean;\n        /**\n         * WebGLCharImage依赖于外部canvas,自身并无私有数据载体\n         * @param\tcanvas\n         * @param\tchar\n         */\n        constructor(content: string, drawValue: any);\n        protected recreateResource(): void;\n        clearAtlasSource(): void;\n    }\n}\ndeclare module laya.webgl.resource {\n    import HTMLImage = laya.resource.HTMLImage;\n    class WebGLImage extends HTMLImage implements IMergeAtlasBitmap {\n        _mipmap: boolean;\n        /**是否使用重复模式纹理寻址*/\n        repeat: boolean;\n        _image: any;\n        /**缩小过滤器*/\n        minFifter: number;\n        /**放大过滤器*/\n        magFifter: number;\n        /**\n         * 获取纹理格式。\n         */\n        readonly format: number;\n        /**\n         * 获取是否具有mipmap。\n         */\n        readonly mipmap: boolean;\n        readonly atlasSource: any;\n        /**\n         * 是否创建私有Source\n         * @return 是否创建\n         */\n        readonly allowMerageInAtlas: boolean;\n        /**\n         * 是否创建私有Source\n         * @return 是否创建\n         */\n        /**\n         * 是否创建私有Source,通常禁止修改\n         * @param value 是否创建\n         */\n        enableMerageInAtlas: boolean;\n        /***\n         * 设置onload函数\n         * @param value onload函数\n         */\n        onload: Function;\n        /***\n         * 设置onerror函数\n         * @param value onerror函数\n         */\n        onerror: Function;\n        constructor(data: string, def: any, format?: number, mipmap?: boolean);\n        protected _init_(src: string, def: any): void;\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n        protected onresize(): void;\n        clearAtlasSource(): void;\n    }\n}\ndeclare module laya.webgl.resource {\n    import Bitmap = laya.resource.Bitmap;\n    class WebGLRenderTarget extends Bitmap {\n        readonly frameBuffer: any;\n        readonly depthStencilBuffer: any;\n        constructor(width: number, height: number, surfaceFormat?: number, surfaceType?: number, depthStencilFormat?: number, mipMap?: boolean, repeat?: boolean, minFifter?: number, magFifter?: number);\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.webgl.resource {\n    import Bitmap = laya.resource.Bitmap;\n    class WebGLSubImage extends Bitmap implements IMergeAtlasBitmap {\n        /**HTML Canvas，绘制子图载体,非私有数据载体*/\n        canvas: any;\n        /**是否使用重复模式纹理寻址*/\n        repeat: boolean;\n        /**是否使用mipLevel*/\n        mipmap: boolean;\n        /**缩小过滤器*/\n        minFifter: number;\n        /**放大过滤器*/\n        magFifter: number;\n        atlasImage: any;\n        offsetX: number;\n        offsetY: number;\n        src: string;\n        readonly atlasSource: any;\n        /**\n         * 是否创建私有Source\n         * @return 是否创建\n         */\n        readonly allowMerageInAtlas: boolean;\n        /**\n         * 是否创建私有Source\n         * @return 是否创建\n         */\n        /**\n         * 是否创建私有Source,通常禁止修改\n         * @param value 是否创建\n         */\n        enableMerageInAtlas: boolean;\n        constructor(canvas: any, offsetX: number, offsetY: number, width: number, height: number, atlasImage: any, src: string);\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n        clearAtlasSource(): void;\n    }\n}\ndeclare module laya.webgl.shader {\n    import Resource = laya.resource.Resource;\n    /**\n     * ...\n     * @author ...\n     */\n    class BaseShader extends Resource {\n        static activeShader: BaseShader;\n        static bindShader: BaseShader;\n        constructor();\n    }\n}\ndeclare module laya.webgl.shader.d2 {\n    import Bitmap = laya.resource.Bitmap;\n    import DrawStyle = laya.webgl.canvas.DrawStyle;\n    import Shader = laya.webgl.shader.Shader;\n    class Shader2D {\n        ALPHA: number;\n        glTexture: Bitmap;\n        shader: Shader;\n        filters: Array<any>;\n        defines: ShaderDefines2D;\n        shaderType: number;\n        colorAdd: Array<any>;\n        strokeStyle: DrawStyle;\n        fillStyle: DrawStyle;\n        destroy(): void;\n        static __init__(): void;\n    }\n}\ndeclare module laya.webgl.shader.d2 {\n    import Shader = laya.webgl.shader.Shader;\n    import ShaderValue = laya.webgl.shader.ShaderValue;\n    class Shader2X extends Shader {\n        _params2dQuick1: Array<any>;\n        _params2dQuick2: Array<any>;\n        _shaderValueWidth: number;\n        _shaderValueHeight: number;\n        constructor(vs: string, ps: string, saveName?: any, nameMap?: any);\n        upload2dQuick1(shaderValue: ShaderValue): void;\n        _make2dQuick1(): Array<any>;\n        protected disposeResource(): void;\n        upload2dQuick2(shaderValue: ShaderValue): void;\n        _make2dQuick2(): Array<any>;\n        static create(vs: string, ps: string, saveName?: any, nameMap?: any): Shader;\n    }\n}\ndeclare module laya.webgl.shader.d2 {\n    import ShaderDefines = laya.webgl.shader.ShaderDefines;\n    class ShaderDefines2D extends ShaderDefines {\n        static TEXTURE2D: number;\n        static COLOR2D: number;\n        static PRIMITIVE: number;\n        static FILTERGLOW: number;\n        static FILTERBLUR: number;\n        static FILTERCOLOR: number;\n        static COLORADD: number;\n        static WORLDMAT: number;\n        static FILLTEXTURE: number;\n        static SKINMESH: number;\n        static SHADERDEFINE_FSHIGHPRECISION: number;\n        static __init__(): void;\n        constructor();\n        static reg(name: string, value: number): void;\n        static toText(value: number, int2name: Array<any>, int2nameMap: any): any;\n        static toInt(names: string): number;\n    }\n}\ndeclare module laya.webgl.shader.d2.skinAnishader {\n    import Matrix = laya.maths.Matrix;\n    import Texture = laya.resource.Texture;\n    import IndexBuffer2D = laya.webgl.utils.IndexBuffer2D;\n    import VertexBuffer2D = laya.webgl.utils.VertexBuffer2D;\n    /**\n     * 这里销毁的问题，后面待确认\n     */\n    class SkinMesh {\n        transform: Matrix;\n        constructor();\n        init(texture: Texture, vs: Array<any>, ps: Array<any>): void;\n        init2(texture: Texture, vs: Array<any>, ps: Array<any>, verticles: Array<any>, uvs: Array<any>): void;\n        getData2(vb: VertexBuffer2D, ib: IndexBuffer2D, start: number): void;\n        getData(vb: VertexBuffer2D, ib: IndexBuffer2D, start: number): void;\n        render(context: any, x: number, y: number): void;\n    }\n}\ndeclare module laya.webgl.shader.d2.skinAnishader {\n    import IndexBuffer2D = laya.webgl.utils.IndexBuffer2D;\n    import VertexBuffer2D = laya.webgl.utils.VertexBuffer2D;\n    class SkinMeshBuffer {\n        ib: IndexBuffer2D;\n        vb: VertexBuffer2D;\n        static instance: SkinMeshBuffer;\n        constructor();\n        static getInstance(): SkinMeshBuffer;\n        addSkinMesh(skinMesh: SkinMesh): void;\n        reset(): void;\n    }\n}\ndeclare module laya.webgl.shader.d2.skinAnishader {\n    import Value2D = laya.webgl.shader.d2.value.Value2D;\n    class SkinSV extends Value2D {\n        texcoord: any;\n        offsetX: number;\n        offsetY: number;\n        constructor(type: any);\n    }\n}\ndeclare module laya.webgl.shader.d2.value {\n    import Shader2D = laya.webgl.shader.d2.Shader2D;\n    class Color2dSV extends Value2D {\n        constructor(args: any);\n        setValue(value: Shader2D): void;\n    }\n}\ndeclare module laya.webgl.shader.d2.value {\n    import Shader2D = laya.webgl.shader.d2.Shader2D;\n    import Value2D = laya.webgl.shader.d2.value.Value2D;\n    class FillTextureSV extends Value2D {\n        texcoord: Array<any>;\n        u_colorMatrix: Array<any>;\n        strength: number;\n        colorMat: Array<any>;\n        colorAlpha: Array<any>;\n        u_TexRange: Array<any>;\n        u_offset: Array<any>;\n        constructor(type: any);\n        setValue(vo: Shader2D): void;\n        clear(): void;\n    }\n}\ndeclare module laya.webgl.shader.d2.value {\n    import Shader2D = laya.webgl.shader.d2.Shader2D;\n    class GlowSV extends TextureSV {\n        u_blurX: boolean;\n        u_color: Array<any>;\n        u_offset: Array<any>;\n        u_strength: number;\n        u_texW: number;\n        u_texH: number;\n        constructor(args: any);\n        setValue(vo: Shader2D): void;\n        clear(): void;\n    }\n}\ndeclare module laya.webgl.shader.d2.value {\n    class PrimitiveSV extends Value2D {\n        a_color: Array<any>;\n        u_pos: Array<any>;\n        constructor(args: any);\n    }\n}\ndeclare module laya.webgl.shader.d2.value {\n    class TextSV extends TextureSV {\n        static pool: Array<any>;\n        constructor(args: any);\n        release(): void;\n        clear(): void;\n        static create(): TextSV;\n    }\n}\ndeclare module laya.webgl.shader.d2.value {\n    import Shader2D = laya.webgl.shader.d2.Shader2D;\n    class TextureSV extends Value2D {\n        texcoord: Array<any>;\n        u_colorMatrix: Array<any>;\n        strength: number;\n        blurInfo: Array<any>;\n        colorMat: Array<any>;\n        colorAlpha: Array<any>;\n        constructor(subID?: number);\n        setValue(vo: Shader2D): void;\n        clear(): void;\n    }\n}\ndeclare module laya.webgl.shader.d2.value {\n    import Bitmap = laya.resource.Bitmap;\n    import Texture = laya.resource.Texture;\n    import DrawStyle = laya.webgl.canvas.DrawStyle;\n    import Shader = laya.webgl.shader.Shader;\n    import ShaderValue = laya.webgl.shader.ShaderValue;\n    import Shader2D = laya.webgl.shader.d2.Shader2D;\n    import ShaderDefines2D = laya.webgl.shader.d2.ShaderDefines2D;\n    class Value2D extends ShaderValue {\n        static _POSITION: Array<any>;\n        static _TEXCOORD: Array<any>;\n        protected static _cache: Array<any>;\n        protected static _typeClass: any;\n        static TEMPMAT4_ARRAY: Array<any>;\n        static __init__(): void;\n        defines: ShaderDefines2D;\n        position: Array<any>;\n        size: Array<any>;\n        alpha: number;\n        mmat: Array<any>;\n        ALPHA: number;\n        shader: Shader;\n        mainID: number;\n        subID: number;\n        filters: Array<any>;\n        textureHost: Texture;\n        texture: any;\n        fillStyle: DrawStyle;\n        color: Array<any>;\n        strokeStyle: DrawStyle;\n        colorAdd: Array<any>;\n        glTexture: Bitmap;\n        mul_mmat: Array<any>;\n        u_mmat2: Array<any>;\n        constructor(mainID: number, subID: number);\n        setValue(value: Shader2D): void;\n        refresh(): ShaderValue;\n        upload(): void;\n        setFilters(value: Array<any>): void;\n        clear(): void;\n        release(): void;\n        static create(mainType: number, subType: number): Value2D;\n    }\n}\ndeclare module laya.webgl.shader {\n    import StringKey = laya.utils.StringKey;\n    class Shader extends BaseShader {\n        static _preCompileShader: any;\n        static SHADERNAME2ID: number;\n        static nameKey: StringKey;\n        static sharders: Array<any>;\n        static getShader(name: any): Shader;\n        static create(vs: string, ps: string, saveName?: any, nameMap?: any): Shader;\n        /**\n         * 根据宏动态生成shader文件，支持#include?COLOR_FILTER \"parts/ColorFilter_ps_logic.glsl\";条件嵌入文件\n         * @param\tname\n         * @param\tvs\n         * @param\tps\n         * @param\tdefine 宏定义，格式:\n         * @return\n         */\n        static withCompile(nameID: number, define: any, shaderName: any, createShader: Function): Shader;\n        /**\n         * 根据宏动态生成shader文件，支持#include?COLOR_FILTER \"parts/ColorFilter_ps_logic.glsl\";条件嵌入文件\n         * @param\tname\n         * @param\tvs\n         * @param\tps\n         * @param\tdefine 宏定义，格式:\n         * @return\n         */\n        static withCompile2D(nameID: number, mainID: number, define: any, shaderName: any, createShader: Function): Shader;\n        static addInclude(fileName: string, txt: string): void;\n        /**\n         * 预编译shader文件，主要是处理宏定义\n         * @param\tnameID,一般是特殊宏+shaderNameID*0.0002组成的一个浮点数当做唯一标识\n         * @param\tvs\n         * @param\tps\n         */\n        static preCompile(nameID: number, vs: string, ps: string, nameMap: any): void;\n        /**\n         * 预编译shader文件，主要是处理宏定义\n         * @param\tnameID,一般是特殊宏+shaderNameID*0.0002组成的一个浮点数当做唯一标识\n         * @param\tvs\n         * @param\tps\n         */\n        static preCompile2D(nameID: number, mainID: number, vs: string, ps: string, nameMap: any): void;\n        tag: any;\n        _vshader: any;\n        _pshader: any;\n        _program: any;\n        _params: Array<any>;\n        _paramsMap: any;\n        _offset: number;\n        _id: number;\n        /**\n         * 根据vs和ps信息生成shader对象\n         * @param\tvs\n         * @param\tps\n         * @param\tname:\n         * @param\tnameMap 帮助里要详细解释为什么需要nameMap\n         */\n        constructor(vs: string, ps: string, saveName?: any, nameMap?: any);\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n        /**\n         * 根据变量名字获得\n         * @param\tname\n         * @return\n         */\n        getUniform(name: string): any;\n        uploadOne(name: string, value: any): void;\n        uploadTexture2D(value: any): void;\n        /**\n         * 提交shader到GPU\n         * @param\tshaderValue\n         */\n        upload(shaderValue: ShaderValue, params?: Array<any>): void;\n        /**\n         * 按数组的定义提交\n         * @param\tshaderValue 数组格式[name,value,...]\n         */\n        uploadArray(shaderValue: Array<any>, length: number, _bufferUsage: any): void;\n        /**\n         * 得到编译后的变量及相关预定义\n         * @return\n         */\n        getParams(): Array<any>;\n    }\n}\ndeclare module laya.webgl.shader {\n    class ShaderDefines {\n        _value: number;\n        constructor(name2int: any, int2name: Array<any>, int2nameMap: Array<any>);\n        add(value: any): number;\n        addInt(value: number): number;\n        remove(value: any): number;\n        isDefine(def: number): boolean;\n        getValue(): number;\n        setValue(value: number): void;\n        toNameDic(): any;\n        static _reg(name: string, value: number, _name2int: any, _int2name: Array<any>): void;\n        static _toText(value: number, _int2name: Array<any>, _int2nameMap: any): any;\n        static _toInt(names: string, _name2int: any): number;\n    }\n}\ndeclare module laya.webgl.shader {\n    class ShaderValue {\n        constructor();\n    }\n}\ndeclare module laya.webgl.shapes {\n    import Matrix = laya.maths.Matrix;\n    import Buffer2D = laya.webgl.utils.Buffer2D;\n    class BasePoly implements IShape {\n        x: number;\n        y: number;\n        r: number;\n        width: number;\n        height: number;\n        edges: number;\n        r0: number;\n        color: number;\n        borderColor: number;\n        borderWidth: number;\n        round: number;\n        fill: boolean;\n        protected mUint16Array: Uint16Array;\n        protected mFloat32Array: Float32Array;\n        constructor(x: number, y: number, width: number, height: number, edges: number, color: number, borderWidth: number, borderColor: number, round?: number);\n        getData(ib: Buffer2D, vb: Buffer2D, start: number): void;\n        rebuild(points: Array<any>): void;\n        setMatrix(mat: Matrix): void;\n        needUpdate(mat: Matrix): boolean;\n        protected sector(outVert: Array<any>, outIndex: Array<any>, start: number): void;\n        protected createLine2(p: Array<any>, indices: Array<any>, lineWidth: number, len: number, outVertex: Array<any>, indexCount: number): Array<any>;\n        protected createLine(p: Array<any>, indices: Array<any>, lineWidth: number, len: number): Array<any>;\n        createLoopLine(p: Array<any>, indices: Array<any>, lineWidth: number, len: number, outVertex?: Array<any>, outIndex?: Array<any>): Array<any>;\n    }\n}\ndeclare module laya.webgl.shapes {\n    class Earcut {\n        static earcut(data: any, holeIndices: any, dim: any): any;\n        static linkedList(data: any, start: any, end: any, dim: any, clockwise: any): any;\n        static filterPoints(start: any, end: any): any;\n        static earcutLinked(ear: any, triangles: any, dim: any, minX: any, minY: any, invSize: any, pass?: any): any;\n        static isEar(ear: any): any;\n        static isEarHashed(ear: any, minX: any, minY: any, invSize: any): boolean;\n        static cureLocalIntersections(start: any, triangles: any, dim: any): any;\n        static splitEarcut(start: any, triangles: any, dim: any, minX: any, minY: any, invSize: any): void;\n        static eliminateHoles(data: any, holeIndices: any, outerNode: any, dim: any): any;\n        static compareX(a: any, b: any): any;\n        static eliminateHole(hole: any, outerNode: any): void;\n        static findHoleBridge(hole: any, outerNode: any): any;\n        static indexCurve(start: any, minX: any, minY: any, invSize: any): void;\n        static sortLinked(list: any): any;\n        static zOrder(x: any, y: any, minX: any, minY: any, invSize: any): any;\n        static getLeftmost(start: any): any;\n        static pointInTriangle(ax: any, ay: any, bx: any, by: any, cx: any, cy: any, px: any, py: any): boolean;\n        static isValidDiagonal(a: any, b: any): boolean;\n        static area(p: any, q: any, r: any): any;\n        static equals(p1: any, p2: any): boolean;\n        static intersects(p1: any, q1: any, p2: any, q2: any): boolean;\n        static intersectsPolygon(a: any, b: any): boolean;\n        static locallyInside(a: any, b: any): boolean;\n        static middleInside(a: any, b: any): boolean;\n        static splitPolygon(a: any, b: any): any;\n        static insertNode(i: any, x: any, y: any, last: any): any;\n        static removeNode(p: any): void;\n        static signedArea(data: any, start: any, end: any, dim: any): any;\n    }\n}\ndeclare module laya.webgl.shapes {\n    class EarcutNode {\n        i: any;\n        x: any;\n        y: any;\n        prev: any;\n        next: any;\n        z: any;\n        prevZ: any;\n        nextZ: any;\n        steiner: any;\n        constructor(i: any, x: any, y: any);\n    }\n}\ndeclare module laya.webgl.shapes {\n    class Ellipse extends BasePoly {\n        constructor(x: number, y: number, width: number, height: number, color: number, borderWidth: number, borderColor: number);\n    }\n}\ndeclare module laya.webgl.shapes {\n    class GeometryData {\n        lineWidth: number;\n        lineColor: number;\n        lineAlpha: number;\n        fillColor: number;\n        fillAlpha: number;\n        shape: IShape;\n        fill: boolean;\n        constructor(lineWidth: number, lineColor: number, lineAlpha: number, fillColor: number, fillAlpha: number, fill: boolean, shape: IShape);\n        clone(): GeometryData;\n        getIndexData(): Uint16Array;\n        getVertexData(): Float32Array;\n        destroy(): void;\n    }\n}\ndeclare module laya.webgl.shapes {\n    import Matrix = laya.maths.Matrix;\n    import Buffer2D = laya.webgl.utils.Buffer2D;\n    interface IShape {\n        getData(ib: Buffer2D, vb: Buffer2D, start: number): void;\n        rebuild(points: Array<any>): void;\n        setMatrix(mat: Matrix): void;\n        needUpdate(mat: Matrix): boolean;\n    }\n}\ndeclare module laya.webgl.shapes {\n    import Buffer2D = laya.webgl.utils.Buffer2D;\n    class Line extends BasePoly {\n        constructor(x: number, y: number, points: Array<any>, borderWidth: number, color: number);\n        rebuild(points: Array<any>): void;\n        getData(ib: Buffer2D, vb: Buffer2D, start: number): void;\n    }\n}\ndeclare module laya.webgl.shapes {\n    import Buffer2D = laya.webgl.utils.Buffer2D;\n    class LoopLine extends BasePoly {\n        constructor(x: number, y: number, points: Array<any>, width: number, color: number);\n        getData(ib: Buffer2D, vb: Buffer2D, start: number): void;\n        createLoopLine(p: Array<any>, indices: Array<any>, lineWidth: number, len: number, outVertex?: Array<any>, outIndex?: Array<any>): Array<any>;\n    }\n}\ndeclare module laya.webgl.shapes {\n    import Matrix = laya.maths.Matrix;\n    import Buffer2D = laya.webgl.utils.Buffer2D;\n    class Polygon extends BasePoly {\n        constructor(x: number, y: number, points: Array<any>, color: number, borderWidth: number, borderColor: number);\n        rebuild(point: Array<any>): void;\n        setMatrix(mat: Matrix): void;\n        needUpdate(mat: Matrix): boolean;\n        getData(ib: Buffer2D, vb: Buffer2D, start: number): void;\n    }\n}\ndeclare module laya.webgl.shapes {\n    import Matrix = laya.maths.Matrix;\n    import Buffer2D = laya.webgl.utils.Buffer2D;\n    class Vertex implements IShape {\n        points: Float32Array;\n        constructor(p: any);\n        getData(ib: Buffer2D, vb: Buffer2D, start: number): void;\n        needUpdate(mat: Matrix): boolean;\n        rebuild(points: Array<any>): void;\n        setMatrix(mat: Matrix): void;\n    }\n}\ndeclare module laya.webgl.submit {\n    interface ISubmit {\n        renderSubmit(): number;\n        getRenderType(): number;\n        releaseRender(): void;\n    }\n}\n\n\ndeclare module laya.webgl.submit {\n    import ISubmit = laya.webgl.submit.ISubmit;\n    class SubmitCMD implements ISubmit {\n        static _cache: Array<any>;\n        fun: Function;\n        args: Array<any>;\n        constructor();\n        renderSubmit(): number;\n        getRenderType(): number;\n        releaseRender(): void;\n        static create(args: Array<any>, fun: Function): SubmitCMD;\n    }\n}\ndeclare module laya.webgl.submit {\n    class SubmitCMDScope {\n        constructor();\n        getValue(name: string): any;\n        addValue(name: string, value: any): any;\n        setValue(name: string, value: any): any;\n        clear(): void;\n        recycle(): void;\n        static create(): SubmitCMDScope;\n    }\n}\n\n\n\n\n\ndeclare module laya.webgl.text {\n    /**\n     * ...特殊的字符，如泰文，必须重新实现这个类\n     */\n    class CharSegment implements ICharSegment {\n        constructor();\n        textToSpit(str: string): void;\n        getChar(i: number): string;\n        getCharCode(i: number): number;\n        length(): number;\n    }\n}\n\ndeclare module laya.webgl.text {\n    class FontInContext {\n        static EMPTY: FontInContext;\n        static create(font: string): FontInContext;\n        constructor(font?: string);\n        setFont(value: string): void;\n        size: number;\n        getItalic(): number;\n        hasType(name: string): number;\n        removeType(name: string): void;\n        copyTo(dec: FontInContext): FontInContext;\n        toString(): string;\n    }\n}\ndeclare module laya.webgl.text {\n    interface ICharSegment {\n        textToSpit(str: string): void;\n        getChar(i: number): string;\n        getCharCode(i: number): number;\n        length(): number;\n    }\n}\ndeclare module laya.webgl.utils {\n    import Resource = laya.resource.Resource;\n    import WebGLContext = laya.webgl.WebGLContext;\n    class Buffer extends Resource {\n        protected static _gl: WebGLContext;\n        static _bindActive: any;\n        static _bindVertexBuffer: any;\n        static _enableAtributes: Array<any>;\n        protected _glBuffer: any;\n        protected _buffer: any;\n        protected _bufferType: number;\n        protected _bufferUsage: number;\n        _byteLength: number;\n        readonly bufferUsage: number;\n        constructor();\n        _bind(): void;\n        protected recreateResource(): void;\n        protected disposeResource(): void;\n    }\n}\ndeclare module laya.webgl.utils {\n    import WebGLContext = laya.webgl.WebGLContext;\n    class Buffer2D extends Buffer {\n        static FLOAT32: number;\n        static SHORT: number;\n        static __int__(gl: WebGLContext): void;\n        protected _maxsize: number;\n        _upload: boolean;\n        protected _uploadSize: number;\n        readonly bufferLength: number;\n        byteLength: number;\n        /**\n         * 在当前的基础上需要多大空间，单位是byte\n         * @param\tsz\n         * @return  增加大小之前的写位置。单位是byte\n         */\n        needSize(sz: number): number;\n        constructor();\n        protected _bufferData(): void;\n        protected _bufferSubData(offset?: number, dataStart?: number, dataLength?: number): void;\n        protected _checkArrayUse(): void;\n        _bind_upload(): boolean;\n        _bind_subUpload(offset?: number, dataStart?: number, dataLength?: number): boolean;\n        _resizeBuffer(nsz: number, copy: boolean): Buffer2D;\n        append(data: any): void;\n        /**\n         * 附加Uint16Array的数据。数据长度是len。byte的话要*2\n         * @param\tdata\n         * @param\tlen\n         */\n        appendU16Array(data: Uint16Array, len: number): void;\n        appendEx(data: any, type: any): void;\n        appendEx2(data: any, type: any, dataLen: number, perDataLen?: number): void;\n        getBuffer(): ArrayBuffer;\n        setNeedUpload(): void;\n        getNeedUpload(): boolean;\n        upload(): boolean;\n        subUpload(offset?: number, dataStart?: number, dataLength?: number): boolean;\n        protected disposeResource(): void;\n        clear(): void;\n    }\n}\ndeclare module laya.webgl.utils {\n    class CONST3D2D {\n        static BYTES_PE: number;\n        static BYTES_PIDX: number;\n        static defaultMatrix4: Array<any>;\n        static defaultMinusYMatrix4: Array<any>;\n        static uniformMatrix3: Array<any>;\n        static _TMPARRAY: Array<any>;\n        static _OFFSETX: number;\n        static _OFFSETY: number;\n    }\n}\ndeclare module laya.webgl.utils {\n    import Matrix = laya.maths.Matrix;\n    import Rectangle = laya.maths.Rectangle;\n    class GlUtils {\n        static make2DProjection(width: number, height: number, depth: number): any;\n        /**\n         *  初始化全局IB,IB索引如下:\n         *   0___1\n         *\t |\\  |\n         *\t | \\ |\n         *\t |__\\|\n         *\t 3   2\n         */\n        static fillIBQuadrangle(buffer: IndexBuffer2D, count: number): boolean;\n        static expandIBQuadrangle(buffer: IndexBuffer2D, count: number): void;\n        static mathCeilPowerOfTwo(value: number): number;\n        static fillQuadrangleImgVb(vb: VertexBuffer2D, x: number, y: number, point4: Array<any>, uv: Array<any>, m: Matrix, _x: number, _y: number): boolean;\n        static fillTranglesVB(vb: VertexBuffer2D, x: number, y: number, points: Array<any>, m: Matrix, _x: number, _y: number): boolean;\n        static copyPreImgVb(vb: VertexBuffer2D, dx: number, dy: number): void;\n        static fillRectImgVb(vb: VertexBuffer2D, clip: Rectangle, x: number, y: number, width: number, height: number, uv: Array<any>, m: Matrix, _x: number, _y: number, dx: number, dy: number, round?: boolean): boolean;\n        static fillLineVb(vb: VertexBuffer2D, clip: Rectangle, fx: number, fy: number, tx: number, ty: number, width: number, mat: Matrix): boolean;\n    }\n}\ndeclare module laya.webgl.utils {\n    class IndexBuffer2D extends Buffer2D {\n        static QuadrangleIB: IndexBuffer2D;\n        static create: Function;\n        protected _uint8Array: Uint8Array;\n        protected _uint16Array: Uint16Array;\n        constructor(bufferUsage?: number);\n        protected _checkArrayUse(): void;\n        getUint8Array(): Uint8Array;\n        getUint16Array(): Uint16Array;\n        destory(): void;\n    }\n}\ndeclare module laya.webgl.utils {\n    class MatirxArray {\n        /**\n         * 4*4矩阵数组相乘。\n         * o=a*b;\n         * @param\ta 4*4矩阵数组。\n         * @param\tb 4*4矩阵数组。\n         * @param\to 4*4矩阵数组。\n         */\n        static ArrayMul(a: Array<any>, b: Array<any>, o: Array<any>): void;\n        static copyArray(f: Array<any>, t: Array<any>): void;\n    }\n}\ndeclare module laya.webgl.utils {\n    /**\n     * Mesh2d只是保存数据。描述attribute用的。本身不具有渲染功能。\n     */\n    class Mesh2D {\n        _stride: number;\n        vertNum: number;\n        indexNum: number;\n        protected _applied: boolean;\n        protected _vb: VertexBuffer2D;\n        protected _ib: IndexBuffer2D;\n        protected _quadNum: number;\n        canReuse: boolean;\n        /**\n         *\n         * @param\tstride\n         * @param\tvballoc  vb预分配的大小。主要是用来提高效率。防止不断的resizebfufer\n         * @param\tiballoc\n         */\n        constructor(stride: number, vballoc: number, iballoc: number);\n        /**\n         * 重新创建一个mesh。复用这个对象的vertex结构，ib对象和attribinfo对象\n         */\n        cloneWithNewVB(): Mesh2D;\n        /**\n         * 创建一个mesh，使用当前对象的vertex结构。vb和ib自己提供。\n         * @return\n         */\n        cloneWithNewVBIB(): Mesh2D;\n        /**\n         * 获得一个可以写的vb对象\n         */\n        getVBW(): VertexBuffer2D;\n        /**\n         * 获得一个只读vb\n         */\n        getVBR(): VertexBuffer2D;\n        getIBR(): IndexBuffer2D;\n        /**\n         * 获得一个可写的ib\n         */\n        getIBW(): IndexBuffer2D;\n        /**\n         * 直接创建一个固定的ib。按照固定四边形的索引。\n         * @param\tvar QuadNum\n         */\n        createQuadIB(QuadNum: number): void;\n        /**\n         * 设置mesh的属性。每3个一组，对应的location分别是0,1,2...\n         * 含义是：type,size,offset\n         * 不允许多流。因此stride是固定的，offset只是在一个vertex之内。\n         * @param\tattribs\n         */\n        setAttributes(attribs: Array<any>): void;\n        getEleNum(): number;\n        /**\n         * 子类实现。用来把自己放到对应的回收池中，以便复用。\n         */\n        releaseMesh(): void;\n        /**\n         * 释放资源。\n         */\n        destroy(): void;\n        /**\n         * 清理vb数据\n         */\n        clearVB(): void;\n    }\n}\n\ndeclare module laya.webgl.utils {\n    import Sprite = laya.display.Sprite;\n    import RenderContext = laya.renders.RenderContext;\n    import RenderSprite = laya.renders.RenderSprite;\n    import SubmitCMDScope = laya.webgl.submit.SubmitCMDScope;\n    class RenderSprite3D extends RenderSprite {\n        static tempUV: Array<any>;\n        constructor(type: number, next: RenderSprite);\n        protected onCreate(type: number): void;\n        static tmpTarget(scope: SubmitCMDScope, context: RenderContext): void;\n        static endTmpTarget(scope: SubmitCMDScope): void;\n        static recycleTarget(scope: SubmitCMDScope): void;\n        _mask(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _blend(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n        _transform(sprite: Sprite, context: RenderContext, x: number, y: number): void;\n    }\n}\n\ndeclare module laya.webgl.utils {\n    import Shader = laya.webgl.shader.Shader;\n    /**\n     * @private\n     * <code>ShaderCompile</code> 类用于实现Shader编译。\n     */\n    class ShaderCompile {\n        static IFDEF_NO: number;\n        static IFDEF_YES: number;\n        static IFDEF_ELSE: number;\n        static IFDEF_PARENT: number;\n        static _removeAnnotation: RegExp;\n        static _reg: RegExp;\n        static _splitToWordExps: RegExp;\n        static includes: any;\n        static shaderParamsMap: any;\n        protected _VS: ShaderNode;\n        protected _PS: ShaderNode;\n        static addInclude(fileName: string, txt: string): void;\n        static preGetParams(vs: string, ps: string): any;\n        static splitToWords(str: string, block: ShaderNode): Array<any>;\n        constructor(name: number, vs: string, ps: string, nameMap: any, defs?: any);\n        createShader(define: any, shaderName: any, createShader: Function): Shader;\n    }\n    class ShaderNode {\n        childs: Array<any>;\n        text: string;\n        parent: ShaderNode;\n        name: string;\n        noCompile: boolean;\n        includefiles: Array<any>;\n        condition: any;\n        conditionType: number;\n        useFuns: string;\n        z: number;\n        src: string;\n        ShaderNode(includefiles: Array<any>): any;\n        setParent(parent: ShaderNode): void;\n        setCondition(condition: string, type: number): void;\n        toscript(def: any, out: Array<any>): Array<any>;\n    }\n    class InlcudeFile {\n        script: string;\n        codes: any;\n        funs: any;\n        curUseID: number;\n        funnames: string;\n        InlcudeFile(txt: string): any;\n        getWith(name?: string): string;\n        getFunsScript(funsdef: string): string;\n    }\n}\ndeclare module laya.webgl.utils {\n    class VertexBuffer2D extends Buffer2D {\n        static create: Function;\n        protected _floatArray32: Float32Array;\n        readonly vertexStride: number;\n        constructor(vertexStride: number, bufferUsage: number);\n        getFloat32Array(): any;\n        bind(ibBuffer: IndexBuffer2D): void;\n        insertData(data: Array<any>, pos: number): void;\n        bind_upload(ibBuffer: IndexBuffer2D): void;\n        protected _checkArrayUse(): void;\n        protected disposeResource(): void;\n        destory(): void;\n    }\n}\ndeclare module laya.webgl {\n    import Sprite = laya.display.Sprite;\n    import HTMLCanvas = laya.resource.HTMLCanvas;\n    /**\n     * @private\n     */\n    class WebGL {\n        static compressAstc: any;\n        static compressAtc: any;\n        static compressEtc: any;\n        static compressEtc1: any;\n        static compressPvrtc: any;\n        static compressS3tc: any;\n        static compressS3tc_srgb: any;\n        static mainCanvas: HTMLCanvas;\n        static mainContext: WebGLContext;\n        static antialias: boolean;\n        /**Shader是否支持高精度。 */\n        static shaderHighPrecision: boolean;\n        static enable(): boolean;\n        static onStageResize(width: number, height: number): void;\n        static doNodeRepaint(sprite: Sprite): void;\n        static init(canvas: HTMLCanvas, width: number, height: number): void;\n    }\n}\ndeclare module laya.webgl {\n    class WebGLContext {\n        static DEPTH_BUFFER_BIT: number;\n        static STENCIL_BUFFER_BIT: number;\n        static COLOR_BUFFER_BIT: number;\n        static POINTS: number;\n        static LINES: number;\n        static LINE_LOOP: number;\n        static LINE_STRIP: number;\n        static TRIANGLES: number;\n        static TRIANGLE_STRIP: number;\n        static TRIANGLE_FAN: number;\n        static ZERO: number;\n        static ONE: number;\n        static SRC_COLOR: number;\n        static ONE_MINUS_SRC_COLOR: number;\n        static SRC_ALPHA: number;\n        static ONE_MINUS_SRC_ALPHA: number;\n        static DST_ALPHA: number;\n        static ONE_MINUS_DST_ALPHA: number;\n        static DST_COLOR: number;\n        static ONE_MINUS_DST_COLOR: number;\n        static SRC_ALPHA_SATURATE: number;\n        static FUNC_ADD: number;\n        static BLEND_EQUATION: number;\n        static BLEND_EQUATION_RGB: number;\n        static BLEND_EQUATION_ALPHA: number;\n        static FUNC_SUBTRACT: number;\n        static FUNC_REVERSE_SUBTRACT: number;\n        static BLEND_DST_RGB: number;\n        static BLEND_SRC_RGB: number;\n        static BLEND_DST_ALPHA: number;\n        static BLEND_SRC_ALPHA: number;\n        static CONSTANT_COLOR: number;\n        static ONE_MINUS_CONSTANT_COLOR: number;\n        static CONSTANT_ALPHA: number;\n        static ONE_MINUS_CONSTANT_ALPHA: number;\n        static BLEND_COLOR: number;\n        static ARRAY_BUFFER: number;\n        static ELEMENT_ARRAY_BUFFER: number;\n        static ARRAY_BUFFER_BINDING: number;\n        static ELEMENT_ARRAY_BUFFER_BINDING: number;\n        static STREAM_DRAW: number;\n        static STATIC_DRAW: number;\n        static DYNAMIC_DRAW: number;\n        static BUFFER_SIZE: number;\n        static BUFFER_USAGE: number;\n        static CURRENT_VERTEX_ATTRIB: number;\n        static FRONT: number;\n        static BACK: number;\n        static CULL_FACE: number;\n        static FRONT_AND_BACK: number;\n        static BLEND: number;\n        static DITHER: number;\n        static STENCIL_TEST: number;\n        static DEPTH_TEST: number;\n        static SCISSOR_TEST: number;\n        static POLYGON_OFFSET_FILL: number;\n        static SAMPLE_ALPHA_TO_COVERAGE: number;\n        static SAMPLE_COVERAGE: number;\n        static NO_ERROR: number;\n        static INVALID_ENUM: number;\n        static INVALID_VALUE: number;\n        static INVALID_OPERATION: number;\n        static OUT_OF_MEMORY: number;\n        static CW: number;\n        static CCW: number;\n        static LINE_WIDTH: number;\n        static ALIASED_POINT_SIZE_RANGE: number;\n        static ALIASED_LINE_WIDTH_RANGE: number;\n        static CULL_FACE_MODE: number;\n        static FRONT_FACE: number;\n        static DEPTH_RANGE: number;\n        static DEPTH_WRITEMASK: number;\n        static DEPTH_CLEAR_VALUE: number;\n        static DEPTH_FUNC: number;\n        static STENCIL_CLEAR_VALUE: number;\n        static STENCIL_FUNC: number;\n        static STENCIL_FAIL: number;\n        static STENCIL_PASS_DEPTH_FAIL: number;\n        static STENCIL_PASS_DEPTH_PASS: number;\n        static STENCIL_REF: number;\n        static STENCIL_VALUE_MASK: number;\n        static STENCIL_WRITEMASK: number;\n        static STENCIL_BACK_FUNC: number;\n        static STENCIL_BACK_FAIL: number;\n        static STENCIL_BACK_PASS_DEPTH_FAIL: number;\n        static STENCIL_BACK_PASS_DEPTH_PASS: number;\n        static STENCIL_BACK_REF: number;\n        static STENCIL_BACK_VALUE_MASK: number;\n        static STENCIL_BACK_WRITEMASK: number;\n        static VIEWPORT: number;\n        static SCISSOR_BOX: number;\n        static COLOR_CLEAR_VALUE: number;\n        static COLOR_WRITEMASK: number;\n        static UNPACK_ALIGNMENT: number;\n        static PACK_ALIGNMENT: number;\n        static MAX_TEXTURE_SIZE: number;\n        static MAX_VIEWPORT_DIMS: number;\n        static SUBPIXEL_BITS: number;\n        static RED_BITS: number;\n        static GREEN_BITS: number;\n        static BLUE_BITS: number;\n        static ALPHA_BITS: number;\n        static DEPTH_BITS: number;\n        static STENCIL_BITS: number;\n        static POLYGON_OFFSET_UNITS: number;\n        static POLYGON_OFFSET_FACTOR: number;\n        static TEXTURE_BINDING_2D: number;\n        static SAMPLE_BUFFERS: number;\n        static SAMPLES: number;\n        static SAMPLE_COVERAGE_VALUE: number;\n        static SAMPLE_COVERAGE_INVERT: number;\n        static NUM_COMPRESSED_TEXTURE_FORMATS: number;\n        static COMPRESSED_TEXTURE_FORMATS: number;\n        static DONT_CARE: number;\n        static FASTEST: number;\n        static NICEST: number;\n        static GENERATE_MIPMAP_HINT: number;\n        static BYTE: number;\n        static UNSIGNED_BYTE: number;\n        static SHORT: number;\n        static UNSIGNED_SHORT: number;\n        static INT: number;\n        static UNSIGNED_INT: number;\n        static FLOAT: number;\n        static DEPTH_COMPONENT: number;\n        static ALPHA: number;\n        static RGB: number;\n        static RGBA: number;\n        static LUMINANCE: number;\n        static LUMINANCE_ALPHA: number;\n        static UNSIGNED_SHORT_4_4_4_4: number;\n        static UNSIGNED_SHORT_5_5_5_1: number;\n        static UNSIGNED_SHORT_5_6_5: number;\n        static FRAGMENT_SHADER: number;\n        static VERTEX_SHADER: number;\n        static MAX_VERTEX_ATTRIBS: number;\n        static MAX_VERTEX_UNIFORM_VECTORS: number;\n        static MAX_VARYING_VECTORS: number;\n        static MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;\n        static MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;\n        static MAX_TEXTURE_IMAGE_UNITS: number;\n        static MAX_FRAGMENT_UNIFORM_VECTORS: number;\n        static SHADER_TYPE: number;\n        static DELETE_STATUS: number;\n        static LINK_STATUS: number;\n        static VALIDATE_STATUS: number;\n        static ATTACHED_SHADERS: number;\n        static ACTIVE_UNIFORMS: number;\n        static ACTIVE_ATTRIBUTES: number;\n        static SHADING_LANGUAGE_VERSION: number;\n        static CURRENT_PROGRAM: number;\n        static NEVER: number;\n        static LESS: number;\n        static EQUAL: number;\n        static LEQUAL: number;\n        static GREATER: number;\n        static NOTEQUAL: number;\n        static GEQUAL: number;\n        static ALWAYS: number;\n        static KEEP: number;\n        static REPLACE: number;\n        static INCR: number;\n        static DECR: number;\n        static INVERT: number;\n        static INCR_WRAP: number;\n        static DECR_WRAP: number;\n        static VENDOR: number;\n        static RENDERER: number;\n        static VERSION: number;\n        static NEAREST: number;\n        static LINEAR: number;\n        static NEAREST_MIPMAP_NEAREST: number;\n        static LINEAR_MIPMAP_NEAREST: number;\n        static NEAREST_MIPMAP_LINEAR: number;\n        static LINEAR_MIPMAP_LINEAR: number;\n        static TEXTURE_MAG_FILTER: number;\n        static TEXTURE_MIN_FILTER: number;\n        static TEXTURE_WRAP_S: number;\n        static TEXTURE_WRAP_T: number;\n        static TEXTURE_2D: number;\n        static TEXTURE: number;\n        static TEXTURE_CUBE_MAP: number;\n        static TEXTURE_BINDING_CUBE_MAP: number;\n        static TEXTURE_CUBE_MAP_POSITIVE_X: number;\n        static TEXTURE_CUBE_MAP_NEGATIVE_X: number;\n        static TEXTURE_CUBE_MAP_POSITIVE_Y: number;\n        static TEXTURE_CUBE_MAP_NEGATIVE_Y: number;\n        static TEXTURE_CUBE_MAP_POSITIVE_Z: number;\n        static TEXTURE_CUBE_MAP_NEGATIVE_Z: number;\n        static MAX_CUBE_MAP_TEXTURE_SIZE: number;\n        static TEXTURE0: number;\n        static TEXTURE1: number;\n        static TEXTURE2: number;\n        static TEXTURE3: number;\n        static TEXTURE4: number;\n        static TEXTURE5: number;\n        static TEXTURE6: number;\n        static TEXTURE7: number;\n        static TEXTURE8: number;\n        static TEXTURE9: number;\n        static TEXTURE10: number;\n        static TEXTURE11: number;\n        static TEXTURE12: number;\n        static TEXTURE13: number;\n        static TEXTURE14: number;\n        static TEXTURE15: number;\n        static TEXTURE16: number;\n        static TEXTURE17: number;\n        static TEXTURE18: number;\n        static TEXTURE19: number;\n        static TEXTURE20: number;\n        static TEXTURE21: number;\n        static TEXTURE22: number;\n        static TEXTURE23: number;\n        static TEXTURE24: number;\n        static TEXTURE25: number;\n        static TEXTURE26: number;\n        static TEXTURE27: number;\n        static TEXTURE28: number;\n        static TEXTURE29: number;\n        static TEXTURE30: number;\n        static TEXTURE31: number;\n        static ACTIVE_TEXTURE: number;\n        static REPEAT: number;\n        static CLAMP_TO_EDGE: number;\n        static MIRRORED_REPEAT: number;\n        static FLOAT_VEC2: number;\n        static FLOAT_VEC3: number;\n        static FLOAT_VEC4: number;\n        static INT_VEC2: number;\n        static INT_VEC3: number;\n        static INT_VEC4: number;\n        static BOOL: number;\n        static BOOL_VEC2: number;\n        static BOOL_VEC3: number;\n        static BOOL_VEC4: number;\n        static FLOAT_MAT2: number;\n        static FLOAT_MAT3: number;\n        static FLOAT_MAT4: number;\n        static SAMPLER_2D: number;\n        static SAMPLER_CUBE: number;\n        static VERTEX_ATTRIB_ARRAY_ENABLED: number;\n        static VERTEX_ATTRIB_ARRAY_SIZE: number;\n        static VERTEX_ATTRIB_ARRAY_STRIDE: number;\n        static VERTEX_ATTRIB_ARRAY_TYPE: number;\n        static VERTEX_ATTRIB_ARRAY_NORMALIZED: number;\n        static VERTEX_ATTRIB_ARRAY_POINTER: number;\n        static VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;\n        static COMPILE_STATUS: number;\n        static LOW_FLOAT: number;\n        static MEDIUM_FLOAT: number;\n        static HIGH_FLOAT: number;\n        static LOW_INT: number;\n        static MEDIUM_INT: number;\n        static HIGH_INT: number;\n        static FRAMEBUFFER: number;\n        static RENDERBUFFER: number;\n        static RGBA4: number;\n        static RGB5_A1: number;\n        static RGB565: number;\n        static DEPTH_COMPONENT16: number;\n        static STENCIL_INDEX: number;\n        static STENCIL_INDEX8: number;\n        static DEPTH_STENCIL: number;\n        static RENDERBUFFER_WIDTH: number;\n        static RENDERBUFFER_HEIGHT: number;\n        static RENDERBUFFER_INTERNAL_FORMAT: number;\n        static RENDERBUFFER_RED_SIZE: number;\n        static RENDERBUFFER_GREEN_SIZE: number;\n        static RENDERBUFFER_BLUE_SIZE: number;\n        static RENDERBUFFER_ALPHA_SIZE: number;\n        static RENDERBUFFER_DEPTH_SIZE: number;\n        static RENDERBUFFER_STENCIL_SIZE: number;\n        static FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;\n        static FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;\n        static FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;\n        static FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;\n        static COLOR_ATTACHMENT0: number;\n        static DEPTH_ATTACHMENT: number;\n        static STENCIL_ATTACHMENT: number;\n        static DEPTH_STENCIL_ATTACHMENT: number;\n        static NONE: number;\n        static FRAMEBUFFER_COMPLETE: number;\n        static FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;\n        static FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;\n        static FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;\n        static FRAMEBUFFER_UNSUPPORTED: number;\n        static FRAMEBUFFER_BINDING: number;\n        static RENDERBUFFER_BINDING: number;\n        static MAX_RENDERBUFFER_SIZE: number;\n        static INVALID_FRAMEBUFFER_OPERATION: number;\n        static UNPACK_FLIP_Y_WEBGL: number;\n        static UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;\n        static CONTEXT_LOST_WEBGL: number;\n        static UNPACK_COLORSPACE_CONVERSION_WEBGL: number;\n        static BROWSER_DEFAULT_WEBGL: number;\n        static _useProgram: any;\n        static UseProgram(program: any): boolean;\n        static _depthTest: boolean;\n        static _depthMask: boolean;\n        static _depthFunc: number;\n        static _blend: boolean;\n        static _sFactor: number;\n        static _dFactor: number;\n        static _cullFace: boolean;\n        static _frontFace: number;\n        static curBindTexTarget: any;\n        static curBindTexValue: any;\n        static setDepthTest(gl: WebGLContext, value: boolean): void;\n        static setDepthMask(gl: WebGLContext, value: boolean): void;\n        static setDepthFunc(gl: WebGLContext, value: number): void;\n        static setBlend(gl: WebGLContext, value: boolean): void;\n        static setBlendFunc(gl: WebGLContext, sFactor: number, dFactor: number): void;\n        static setCullFace(gl: WebGLContext, value: boolean): void;\n        static setFrontFace(gl: WebGLContext, value: number): void;\n        static bindTexture(gl: WebGLContext, target: any, texture: any): void;\n        alpha: number;\n        depth: number;\n        stencil: number;\n        antialias: number;\n        premultipliedAlpha: number;\n        preserveDrawingBuffer: number;\n        drawingBufferWidth: number;\n        drawingBufferHeight: number;\n        getAttachedShaders: any;\n        uniform_float: any;\n        getContextAttributes(): any;\n        isContextLost(): void;\n        getSupportedExtensions(): any;\n        getExtension(name: string): any;\n        activeTexture(texture: any): void;\n        attachShader(program: any, shader: any): void;\n        bindAttribLocation(program: any, index: number, name: string): void;\n        bindBuffer(target: any, buffer: any): void;\n        bindFramebuffer(target: any, framebuffer: any): void;\n        bindRenderbuffer(target: any, renderbuffer: any): void;\n        bindTexture(target: any, texture: any): void;\n        useTexture(value: boolean): void;\n        blendColor(red: any, green: any, blue: any, alpha: number): void;\n        blendEquation(mode: any): void;\n        blendEquationSeparate(modeRGB: any, modeAlpha: any): void;\n        blendFunc(sfactor: any, dfactor: any): void;\n        blendFuncSeparate(srcRGB: any, dstRGB: any, srcAlpha: any, dstAlpha: any): void;\n        bufferData(target: any, size: any, usage: any): void;\n        bufferSubData(target: any, offset: number, data: any): void;\n        checkFramebufferStatus(target: any): any;\n        clear(mask: number): void;\n        clearColor(red: any, green: any, blue: any, alpha: number): void;\n        clearDepth(depth: any): void;\n        clearStencil(s: any): void;\n        colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;\n        compileShader(shader: any): void;\n        copyTexImage2D(target: any, level: any, internalformat: any, x: number, y: number, width: number, height: number, border: any): void;\n        copyTexSubImage2D(target: any, level: any, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;\n        createBuffer(): any;\n        createFramebuffer(): any;\n        createProgram(): any;\n        createRenderbuffer(): any;\n        createShader(type: any): any;\n        createTexture(): any;\n        cullFace(mode: any): void;\n        deleteBuffer(buffer: any): void;\n        deleteFramebuffer(framebuffer: any): void;\n        deleteProgram(program: any): void;\n        deleteRenderbuffer(renderbuffer: any): void;\n        deleteShader(shader: any): void;\n        deleteTexture(texture: any): void;\n        depthFunc(func: any): void;\n        depthMask(flag: any): void;\n        depthRange(zNear: any, zFar: any): void;\n        detachShader(program: any, shader: any): void;\n        disable(cap: any): void;\n        disableVertexAttribArray(index: number): void;\n        drawArrays(mode: any, first: number, count: number): void;\n        drawElements(mode: any, count: number, type: any, offset: number): void;\n        enable(cap: any): void;\n        enableVertexAttribArray(index: number): void;\n        finish(): void;\n        flush(): void;\n        framebufferRenderbuffer(target: any, attachment: any, renderbuffertarget: any, renderbuffer: any): void;\n        framebufferTexture2D(target: any, attachment: any, textarget: any, texture: any, level: any): void;\n        frontFace(mode: any): any;\n        generateMipmap(target: any): any;\n        getActiveAttrib(program: any, index: number): any;\n        getActiveUniform(program: any, index: number): any;\n        getAttribLocation(program: any, name: string): any;\n        getParameter(pname: any): any;\n        getBufferParameter(target: any, pname: any): any;\n        getError(): any;\n        getFramebufferAttachmentParameter(target: any, attachment: any, pname: any): void;\n        getProgramParameter(program: any, pname: any): number;\n        getProgramInfoLog(program: any): any;\n        getRenderbufferParameter(target: any, pname: any): any;\n        getShaderPrecisionFormat(...arg: any[]): any;\n        getShaderParameter(shader: any, pname: any): any;\n        getShaderInfoLog(shader: any): any;\n        getShaderSource(shader: any): any;\n        getTexParameter(target: any, pname: any): void;\n        getUniform(program: any, location: number): void;\n        getUniformLocation(program: any, name: string): any;\n        getVertexAttrib(index: number, pname: any): any;\n        getVertexAttribOffset(index: number, pname: any): any;\n        hint(target: any, mode: any): void;\n        isBuffer(buffer: any): void;\n        isEnabled(cap: any): void;\n        isFramebuffer(framebuffer: any): void;\n        isProgram(program: any): void;\n        isRenderbuffer(renderbuffer: any): void;\n        isShader(shader: any): void;\n        isTexture(texture: any): void;\n        lineWidth(width: number): void;\n        linkProgram(program: any): void;\n        pixelStorei(pname: any, param: any): void;\n        polygonOffset(factor: any, units: any): void;\n        readPixels(x: number, y: number, width: number, height: number, format: any, type: any, pixels: any): void;\n        renderbufferStorage(target: any, internalformat: any, width: number, height: number): void;\n        sampleCoverage(value: any, invert: any): void;\n        scissor(x: number, y: number, width: number, height: number): void;\n        shaderSource(shader: any, source: any): void;\n        stencilFunc(func: number, ref: number, mask: number): void;\n        stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;\n        stencilMask(mask: any): void;\n        stencilMaskSeparate(face: any, mask: any): void;\n        stencilOp(fail: number, zfail: number, zpass: number): void;\n        stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;\n        texImage2D(...args: any[]): void;\n        texParameterf(target: any, pname: any, param: any): void;\n        texParameteri(target: any, pname: any, param: any): void;\n        texSubImage2D(...args: any[]): void;\n        uniform1f(location: any, x: number): void;\n        uniform1fv(location: any, v: any): void;\n        uniform1i(location: any, x: number): void;\n        uniform1iv(location: any, v: any): void;\n        uniform2f(location: any, x: number, y: number): void;\n        uniform2fv(location: any, v: any): void;\n        uniform2i(location: any, x: number, y: number): void;\n        uniform2iv(location: any, v: any): void;\n        uniform3f(location: any, x: number, y: number, z: number): void;\n        uniform3fv(location: any, v: any): void;\n        uniform3i(location: any, x: number, y: number, z: number): void;\n        uniform3iv(location: any, v: any): void;\n        uniform4f(location: any, x: number, y: number, z: number, w: number): void;\n        uniform4fv(location: any, v: any): void;\n        uniform4i(location: any, x: number, y: number, z: number, w: number): void;\n        uniform4iv(location: any, v: any): void;\n        uniformMatrix2fv(location: any, transpose: any, value: any): void;\n        uniformMatrix3fv(location: any, transpose: any, value: any): void;\n        uniformMatrix4fv(location: any, transpose: any, value: any): void;\n        useProgram(program: any): void;\n        validateProgram(program: any): void;\n        vertexAttrib1f(indx: any, x: number): void;\n        vertexAttrib1fv(indx: any, values: any): void;\n        vertexAttrib2f(indx: any, x: number, y: number): void;\n        vertexAttrib2fv(indx: any, values: any): void;\n        vertexAttrib3f(indx: any, x: number, y: number, z: number): void;\n        vertexAttrib3fv(indx: any, values: any): void;\n        vertexAttrib4f(indx: any, x: number, y: number, z: number, w: number): void;\n        vertexAttrib4fv(indx: any, values: any): void;\n        vertexAttribPointer(indx: any, size: any, type: any, normalized: any, stride: any, offset: number): void;\n        viewport(x: number, y: number, width: number, height: number): void;\n        configureBackBuffer(width: number, height: number, antiAlias: number, enableDepthAndStencil?: boolean, wantsBestResolution?: boolean): void;\n        compressedTexImage2D(...args: any[]): void;\n    }\n}\n\ndeclare module Laya {\n    class AnimationContent extends laya.ani.AnimationContent {\n    }\n    class AnimationNodeContent extends laya.ani.AnimationNodeContent {\n    }\n    class AnimationParser01 extends laya.ani.AnimationParser01 {\n    }\n    class AnimationParser02 extends laya.ani.AnimationParser02 {\n    }\n    class AnimationPlayer extends laya.ani.AnimationPlayer {\n    }\n    class AnimationState extends laya.ani.AnimationState {\n    }\n    class AnimationTemplet extends laya.ani.AnimationTemplet {\n    }\n    class Bone extends laya.ani.bone.Bone {\n    }\n    class BoneSlot extends laya.ani.bone.BoneSlot {\n    }\n    class CacheAbleSkinMesh extends laya.ani.bone.canvasmesh.CacheAbleSkinMesh {\n    }\n    class CanvasMeshRender extends laya.ani.bone.canvasmesh.CanvasMeshRender {\n    }\n    class MeshData extends laya.ani.bone.canvasmesh.MeshData {\n    }\n    class SimpleSkinMeshCanvas extends laya.ani.bone.canvasmesh.SimpleSkinMeshCanvas {\n    }\n    class SkinMeshCanvas extends laya.ani.bone.canvasmesh.SkinMeshCanvas {\n    }\n    class DeformAniData extends laya.ani.bone.DeformAniData {\n    }\n    class DeformSlotData extends laya.ani.bone.DeformSlotData {\n    }\n    class DeformSlotDisplayData extends laya.ani.bone.DeformSlotDisplayData {\n    }\n    class DrawOrderData extends laya.ani.bone.DrawOrderData {\n    }\n    class EventData extends laya.ani.bone.EventData {\n    }\n    class IkConstraint extends laya.ani.bone.IkConstraint {\n    }\n    class IkConstraintData extends laya.ani.bone.IkConstraintData {\n    }\n    class MeshTools extends laya.ani.bone.MeshTools {\n    }\n    class PathConstraint extends laya.ani.bone.PathConstraint {\n    }\n    class PathConstraintData extends laya.ani.bone.PathConstraintData {\n    }\n    class Skeleton extends laya.ani.bone.Skeleton {\n    }\n    class SkinData extends laya.ani.bone.SkinData {\n    }\n    class SkinSlotDisplayData extends laya.ani.bone.SkinSlotDisplayData {\n    }\n    class SlotData extends laya.ani.bone.SlotData {\n    }\n    class Templet extends laya.ani.bone.Templet {\n    }\n    class TfConstraint extends laya.ani.bone.TfConstraint {\n    }\n    class TfConstraintData extends laya.ani.bone.TfConstraintData {\n    }\n    class Transform extends laya.ani.bone.Transform {\n    }\n    class UVTools extends laya.ani.bone.UVTools {\n    }\n    class GraphicsAni extends laya.ani.GraphicsAni {\n    }\n    class KeyFramesContent extends laya.ani.KeyFramesContent {\n    }\n    class BezierLerp extends laya.ani.math.BezierLerp {\n    }\n    class MovieClip extends laya.ani.swf.MovieClip {\n    }\n    class AnimationClip extends laya.d3.animation.AnimationClip {\n    }\n    class AnimationClipParser01 extends laya.d3.animation.AnimationClipParser01 {\n    }\n    class AnimationClipParser02 extends laya.d3.animation.AnimationClipParser02 {\n    }\n    class AnimationEvent extends laya.d3.animation.AnimationEvent {\n    }\n    class AnimationNode extends laya.d3.animation.AnimationNode {\n    }\n    class AnimationTransform3D extends laya.d3.animation.AnimationTransform3D {\n    }\n    class Keyframe extends laya.d3.animation.Keyframe {\n    }\n    class KeyframeNode extends laya.d3.animation.KeyframeNode {\n    }\n    class KeyframeAnimations extends laya.d3.component.animation.KeyframeAnimations {\n    }\n    class RigidAnimations extends laya.d3.component.animation.RigidAnimations {\n    }\n    class SkinAnimations extends laya.d3.component.animation.SkinAnimations {\n    }\n    class Animator extends laya.d3.component.Animator {\n    }\n    class AttachPoint extends laya.d3.component.AttachPoint {\n    }\n    class Component3D extends laya.d3.component.Component3D {\n    }\n    class PathFind extends laya.d3.component.PathFind {\n    }\n    class BoxCollider extends laya.d3.component.physics.BoxCollider {\n    }\n    class Collider extends laya.d3.component.physics.Collider {\n    }\n    class MeshCollider extends laya.d3.component.physics.MeshCollider {\n    }\n    class SphereCollider extends laya.d3.component.physics.SphereCollider {\n    }\n    class Rigidbody extends laya.d3.component.Rigidbody {\n    }\n    class Script extends laya.d3.component.Script {\n    }\n    class Avatar extends laya.d3.core.Avatar {\n    }\n    class BaseCamera extends laya.d3.core.BaseCamera {\n    }\n    class Camera extends laya.d3.core.Camera {\n    }\n    class ComponentNode extends laya.d3.core.ComponentNode {\n    }\n    class GeometryFilter extends laya.d3.core.GeometryFilter {\n    }\n    class Glitter extends laya.d3.core.glitter.Glitter {\n    }\n    class SplineCurvePosition extends laya.d3.core.glitter.SplineCurvePosition {\n    }\n    class SplineCurvePositionVelocity extends laya.d3.core.glitter.SplineCurvePositionVelocity {\n    }\n    class GlitterRender extends laya.d3.core.GlitterRender {\n    }\n    class HeightMap extends laya.d3.core.HeightMap {\n    }\n    interface IClone extends laya.d3.core.IClone {\n    }\n    class Layer extends laya.d3.core.Layer {\n    }\n    class DirectionLight extends laya.d3.core.light.DirectionLight {\n    }\n    class LightSprite extends laya.d3.core.light.LightSprite {\n    }\n    class PointLight extends laya.d3.core.light.PointLight {\n    }\n    class SpotLight extends laya.d3.core.light.SpotLight {\n    }\n    class BaseMaterial extends laya.d3.core.material.BaseMaterial {\n    }\n    class BlinnPhongMaterial extends laya.d3.core.material.BlinnPhongMaterial {\n    }\n    class ExtendTerrainMaterial extends laya.d3.core.material.ExtendTerrainMaterial {\n    }\n    class GlitterMaterial extends laya.d3.core.material.GlitterMaterial {\n    }\n    class PBRMaterial extends laya.d3.core.material.PBRMaterial {\n    }\n    class PBRSpecularMaterial extends laya.d3.core.material.PBRSpecularMaterial {\n    }\n    class PBRStandardMaterial extends laya.d3.core.material.PBRStandardMaterial {\n    }\n    class StandardMaterial extends laya.d3.core.material.StandardMaterial {\n    }\n    class TerrainMaterial extends laya.d3.core.material.TerrainMaterial {\n    }\n    class WaterMaterial extends laya.d3.core.material.WaterMaterial {\n    }\n    class MeshFilter extends laya.d3.core.MeshFilter {\n    }\n    class MeshRender extends laya.d3.core.MeshRender {\n    }\n    class MeshSprite3D extends laya.d3.core.MeshSprite3D {\n    }\n    class MeshTerrainSprite3D extends laya.d3.core.MeshTerrainSprite3D {\n    }\n    class Burst extends laya.d3.core.particleShuriKen.module.Burst {\n    }\n    class ColorOverLifetime extends laya.d3.core.particleShuriKen.module.ColorOverLifetime {\n    }\n    class Emission extends laya.d3.core.particleShuriKen.module.Emission {\n    }\n    class FrameOverTime extends laya.d3.core.particleShuriKen.module.FrameOverTime {\n    }\n    class GradientAngularVelocity extends laya.d3.core.particleShuriKen.module.GradientAngularVelocity {\n    }\n    class GradientColor extends laya.d3.core.particleShuriKen.module.GradientColor {\n    }\n    class GradientDataColor extends laya.d3.core.particleShuriKen.module.GradientDataColor {\n    }\n    class GradientDataInt extends laya.d3.core.particleShuriKen.module.GradientDataInt {\n    }\n    class GradientDataNumber extends laya.d3.core.particleShuriKen.module.GradientDataNumber {\n    }\n    class GradientDataVector2 extends laya.d3.core.particleShuriKen.module.GradientDataVector2 {\n    }\n    class GradientSize extends laya.d3.core.particleShuriKen.module.GradientSize {\n    }\n    class GradientVelocity extends laya.d3.core.particleShuriKen.module.GradientVelocity {\n    }\n    class RotationOverLifetime extends laya.d3.core.particleShuriKen.module.RotationOverLifetime {\n    }\n    class BaseShape extends laya.d3.core.particleShuriKen.module.shape.BaseShape {\n    }\n    class BoxShape extends laya.d3.core.particleShuriKen.module.shape.BoxShape {\n    }\n    class CircleShape extends laya.d3.core.particleShuriKen.module.shape.CircleShape {\n    }\n    class ConeShape extends laya.d3.core.particleShuriKen.module.shape.ConeShape {\n    }\n    class HemisphereShape extends laya.d3.core.particleShuriKen.module.shape.HemisphereShape {\n    }\n    class ShapeUtils extends laya.d3.core.particleShuriKen.module.shape.ShapeUtils {\n    }\n    class SphereShape extends laya.d3.core.particleShuriKen.module.shape.SphereShape {\n    }\n    class SizeOverLifetime extends laya.d3.core.particleShuriKen.module.SizeOverLifetime {\n    }\n    class StartFrame extends laya.d3.core.particleShuriKen.module.StartFrame {\n    }\n    class TextureSheetAnimation extends laya.d3.core.particleShuriKen.module.TextureSheetAnimation {\n    }\n    class VelocityOverLifetime extends laya.d3.core.particleShuriKen.module.VelocityOverLifetime {\n    }\n    class ShuriKenParticle3D extends laya.d3.core.particleShuriKen.ShuriKenParticle3D {\n    }\n    class ShurikenParticleData extends laya.d3.core.particleShuriKen.ShurikenParticleData {\n    }\n    class ShurikenParticleMaterial extends laya.d3.core.particleShuriKen.ShurikenParticleMaterial {\n    }\n    class ShurikenParticleRender extends laya.d3.core.particleShuriKen.ShurikenParticleRender {\n    }\n    class ShurikenParticleSystem extends laya.d3.core.particleShuriKen.ShurikenParticleSystem {\n    }\n    class PhasorSpriter3D extends laya.d3.core.PhasorSpriter3D {\n    }\n    class BaseRender extends laya.d3.core.render.BaseRender {\n    }\n    interface IRenderable extends laya.d3.core.render.IRenderable {\n    }\n    interface IUpdate extends laya.d3.core.render.IUpdate {\n    }\n    class RenderElement extends laya.d3.core.render.RenderElement {\n    }\n    class RenderQueue extends laya.d3.core.render.RenderQueue {\n    }\n    class RenderState extends laya.d3.core.render.RenderState {\n    }\n    class SubMeshRenderElement extends laya.d3.core.render.SubMeshRenderElement {\n    }\n    class RenderableSprite3D extends laya.d3.core.RenderableSprite3D {\n    }\n    interface ITreeNode extends laya.d3.core.scene.ITreeNode {\n    }\n    class OctreeNode extends laya.d3.core.scene.OctreeNode {\n    }\n    class Scene extends laya.d3.core.scene.Scene {\n    }\n    class SceneManager extends laya.d3.core.scene.SceneManager {\n    }\n    class SkinnedMeshRender extends laya.d3.core.SkinnedMeshRender {\n    }\n    class SkinnedMeshSprite3D extends laya.d3.core.SkinnedMeshSprite3D {\n    }\n    class Sprite3D extends laya.d3.core.Sprite3D {\n    }\n    class Color extends laya.d3.core.trail.module.Color {\n    }\n    class Gradient extends laya.d3.core.trail.module.Gradient {\n    }\n    class GradientAlphaKey extends laya.d3.core.trail.module.GradientAlphaKey {\n    }\n    class GradientColorKey extends laya.d3.core.trail.module.GradientColorKey {\n    }\n    class GradientMode extends laya.d3.core.trail.module.GradientMode {\n    }\n    class TextureMode extends laya.d3.core.trail.module.TextureMode {\n    }\n    class TrailKeyFrame extends laya.d3.core.trail.module.TrailKeyFrame {\n    }\n    class TrailFilter extends laya.d3.core.trail.TrailFilter {\n    }\n    class TrailMaterial extends laya.d3.core.trail.TrailMaterial {\n    }\n    class TrailRenderElement extends laya.d3.core.trail.TrailRenderElement {\n    }\n    class TrailRenderer extends laya.d3.core.trail.TrailRenderer {\n    }\n    class TrailSprite3D extends laya.d3.core.trail.TrailSprite3D {\n    }\n    class VertexTrail extends laya.d3.core.trail.VertexTrail {\n    }\n    class Transform3D extends laya.d3.core.Transform3D {\n    }\n    class TransformUV extends laya.d3.core.TransformUV {\n    }\n    class VRCamera extends laya.d3.core.VRCamera {\n    }\n    class CartoonMaterial extends laya.d3.extension.cartoonRender.CartoonMaterial {\n    }\n    class OutlineMaterial extends laya.d3.extension.cartoonRender.OutlineMaterial {\n    }\n    class DynamicBatch extends laya.d3.graphics.DynamicBatch {\n    }\n    class DynamicBatchManager extends laya.d3.graphics.DynamicBatchManager {\n    }\n    class FrustumCulling extends laya.d3.graphics.FrustumCulling {\n    }\n    class IndexBuffer3D extends laya.d3.graphics.IndexBuffer3D {\n    }\n    interface IVertex extends laya.d3.graphics.IVertex {\n    }\n    class MeshSprite3DStaticBatchManager extends laya.d3.graphics.MeshSprite3DStaticBatchManager {\n    }\n    class StaticBatch extends laya.d3.graphics.StaticBatch {\n    }\n    class StaticBatchManager extends laya.d3.graphics.StaticBatchManager {\n    }\n    class SubMeshStaticBatch extends laya.d3.graphics.SubMeshStaticBatch {\n    }\n    class VertexBuffer3D extends laya.d3.graphics.VertexBuffer3D {\n    }\n    class VertexDeclaration extends laya.d3.graphics.VertexDeclaration {\n    }\n    class VertexElement extends laya.d3.graphics.VertexElement {\n    }\n    class VertexElementFormat extends laya.d3.graphics.VertexElementFormat {\n    }\n    class VertexElementUsage extends laya.d3.graphics.VertexElementUsage {\n    }\n    class VertexGlitter extends laya.d3.graphics.VertexGlitter {\n    }\n    class VertexParticle extends laya.d3.graphics.VertexParticle {\n    }\n    class VertexPosition extends laya.d3.graphics.VertexPosition {\n    }\n    class VertexPositionNormal extends laya.d3.graphics.VertexPositionNormal {\n    }\n    class VertexPositionNormalColor extends laya.d3.graphics.VertexPositionNormalColor {\n    }\n    class VertexPositionNormalColorSkin extends laya.d3.graphics.VertexPositionNormalColorSkin {\n    }\n    class VertexPositionNormalColorSkinSTangent extends laya.d3.graphics.VertexPositionNormalColorSkinSTangent {\n    }\n    class VertexPositionNormalColorSkinTangent extends laya.d3.graphics.VertexPositionNormalColorSkinTangent {\n    }\n    class VertexPositionNormalColorSTangent extends laya.d3.graphics.VertexPositionNormalColorSTangent {\n    }\n    class VertexPositionNormalColorTangent extends laya.d3.graphics.VertexPositionNormalColorTangent {\n    }\n    class VertexPositionNormalColorTexture extends laya.d3.graphics.VertexPositionNormalColorTexture {\n    }\n    class VertexPositionNormalColorTexture0Texture1 extends laya.d3.graphics.VertexPositionNormalColorTexture0Texture1 {\n    }\n    class VertexPositionNormalColorTexture0Texture1Skin extends laya.d3.graphics.VertexPositionNormalColorTexture0Texture1Skin {\n    }\n    class VertexPositionNormalColorTexture0Texture1SkinSTangent extends laya.d3.graphics.VertexPositionNormalColorTexture0Texture1SkinSTangent {\n    }\n    class VertexPositionNormalColorTexture0Texture1SkinTangent extends laya.d3.graphics.VertexPositionNormalColorTexture0Texture1SkinTangent {\n    }\n    class VertexPositionNormalColorTexture0Texture1STangent extends laya.d3.graphics.VertexPositionNormalColorTexture0Texture1STangent {\n    }\n    class VertexPositionNormalColorTexture0Texture1Tangent extends laya.d3.graphics.VertexPositionNormalColorTexture0Texture1Tangent {\n    }\n    class VertexPositionNormalColorTextureSkin extends laya.d3.graphics.VertexPositionNormalColorTextureSkin {\n    }\n    class VertexPositionNormalColorTextureSkinSTangent extends laya.d3.graphics.VertexPositionNormalColorTextureSkinSTangent {\n    }\n    class VertexPositionNormalColorTextureSkinTangent extends laya.d3.graphics.VertexPositionNormalColorTextureSkinTangent {\n    }\n    class VertexPositionNormalColorTextureSTangent extends laya.d3.graphics.VertexPositionNormalColorTextureSTangent {\n    }\n    class VertexPositionNormalColorTextureTangent extends laya.d3.graphics.VertexPositionNormalColorTextureTangent {\n    }\n    class VertexPositionNormalSTangent extends laya.d3.graphics.VertexPositionNormalSTangent {\n    }\n    class VertexPositionNormalTangent extends laya.d3.graphics.VertexPositionNormalTangent {\n    }\n    class VertexPositionNormalTexture extends laya.d3.graphics.VertexPositionNormalTexture {\n    }\n    class VertexPositionNormalTexture0Texture1 extends laya.d3.graphics.VertexPositionNormalTexture0Texture1 {\n    }\n    class VertexPositionNormalTexture0Texture1Skin extends laya.d3.graphics.VertexPositionNormalTexture0Texture1Skin {\n    }\n    class VertexPositionNormalTexture0Texture1SkinSTangent extends laya.d3.graphics.VertexPositionNormalTexture0Texture1SkinSTangent {\n    }\n    class VertexPositionNormalTexture0Texture1SkinTangent extends laya.d3.graphics.VertexPositionNormalTexture0Texture1SkinTangent {\n    }\n    class VertexPositionNormalTexture0Texture1STangent extends laya.d3.graphics.VertexPositionNormalTexture0Texture1STangent {\n    }\n    class VertexPositionNormalTexture0Texture1Tangent extends laya.d3.graphics.VertexPositionNormalTexture0Texture1Tangent {\n    }\n    class VertexPositionNormalTextureSkin extends laya.d3.graphics.VertexPositionNormalTextureSkin {\n    }\n    class VertexPositionNormalTextureSkinSTangent extends laya.d3.graphics.VertexPositionNormalTextureSkinSTangent {\n    }\n    class VertexPositionNormalTextureSkinTangent extends laya.d3.graphics.VertexPositionNormalTextureSkinTangent {\n    }\n    class VertexPositionNormalTextureSTangent extends laya.d3.graphics.VertexPositionNormalTextureSTangent {\n    }\n    class VertexPositionNormalTextureTangent extends laya.d3.graphics.VertexPositionNormalTextureTangent {\n    }\n    class VertexPositionNTBTexture extends laya.d3.graphics.VertexPositionNTBTexture {\n    }\n    class VertexPositionNTBTexture0Texture1Skin extends laya.d3.graphics.VertexPositionNTBTexture0Texture1Skin {\n    }\n    class VertexPositionNTBTextureSkin extends laya.d3.graphics.VertexPositionNTBTextureSkin {\n    }\n    class VertexPositionTerrain extends laya.d3.graphics.VertexPositionTerrain {\n    }\n    class VertexPositionTexture0 extends laya.d3.graphics.VertexPositionTexture0 {\n    }\n    class VertexShurikenParticleBillboard extends laya.d3.graphics.VertexShurikenParticleBillboard {\n    }\n    class VertexShurikenParticleMesh extends laya.d3.graphics.VertexShurikenParticleMesh {\n    }\n    class LoadModelV01 extends laya.d3.loaders.LoadModelV01 {\n    }\n    class LoadModelV02 extends laya.d3.loaders.LoadModelV02 {\n    }\n    class LoadModelV03 extends laya.d3.loaders.LoadModelV03 {\n    }\n    class MeshReader extends laya.d3.loaders.MeshReader {\n    }\n    class BoundBox extends laya.d3.math.BoundBox {\n    }\n    class BoundFrustum extends laya.d3.math.BoundFrustum {\n    }\n    class BoundSphere extends laya.d3.math.BoundSphere {\n    }\n    class Collision extends laya.d3.math.Collision {\n    }\n    class ContainmentType extends laya.d3.math.ContainmentType {\n    }\n    class MathUtils3D extends laya.d3.math.MathUtils3D {\n    }\n    class Matrix3x3 extends laya.d3.math.Matrix3x3 {\n    }\n    class Matrix4x4 extends laya.d3.math.Matrix4x4 {\n    }\n    class OrientedBoundBox extends laya.d3.math.OrientedBoundBox {\n    }\n    class Plane extends laya.d3.math.Plane {\n    }\n    class Quaternion extends laya.d3.math.Quaternion {\n    }\n    class Rand extends laya.d3.math.Rand {\n    }\n    class RandX extends laya.d3.math.RandX {\n    }\n    class Ray extends laya.d3.math.Ray {\n    }\n    class Vector2 extends laya.d3.math.Vector2 {\n    }\n    class Vector3 extends laya.d3.math.Vector3 {\n    }\n    class Vector4 extends laya.d3.math.Vector4 {\n    }\n    class Viewport extends laya.d3.math.Viewport {\n    }\n    class BaseTexture extends laya.d3.resource.BaseTexture {\n    }\n    class DataTexture2D extends laya.d3.resource.DataTexture2D {\n    }\n    class BaseMesh extends laya.d3.resource.models.BaseMesh {\n    }\n    class BoxMesh extends laya.d3.resource.models.BoxMesh {\n    }\n    class CapsuleMesh extends laya.d3.resource.models.CapsuleMesh {\n    }\n    class CylinderMesh extends laya.d3.resource.models.CylinderMesh {\n    }\n    class Mesh extends laya.d3.resource.models.Mesh {\n    }\n    class PlaneMesh extends laya.d3.resource.models.PlaneMesh {\n    }\n    class PrimitiveMesh extends laya.d3.resource.models.PrimitiveMesh {\n    }\n    class QuadMesh extends laya.d3.resource.models.QuadMesh {\n    }\n    class Sky extends laya.d3.resource.models.Sky {\n    }\n    class SkyBox extends laya.d3.resource.models.SkyBox {\n    }\n    class SkyDome extends laya.d3.resource.models.SkyDome {\n    }\n    class SphereMesh extends laya.d3.resource.models.SphereMesh {\n    }\n    class SubMesh extends laya.d3.resource.models.SubMesh {\n    }\n    class RenderTexture extends laya.d3.resource.RenderTexture {\n    }\n    class SolidColorTexture2D extends laya.d3.resource.SolidColorTexture2D {\n    }\n    class SolidColorTextureCube extends laya.d3.resource.SolidColorTextureCube {\n    }\n    class GlitterTemplet extends laya.d3.resource.tempelet.GlitterTemplet {\n    }\n    class Texture2D extends laya.d3.resource.Texture2D {\n    }\n    class TextureCube extends laya.d3.resource.TextureCube {\n    }\n    class Shader3D extends laya.d3.shader.Shader3D {\n    }\n    class ShaderCompile3D extends laya.d3.shader.ShaderCompile3D {\n    }\n    class ShaderDefines extends laya.d3.shader.ShaderDefines {\n    }\n    class ShaderInit3D extends laya.d3.shader.ShaderInit3D {\n    }\n    class ValusArray extends laya.d3.shader.ValusArray {\n    }\n    class ParallelSplitShadowMap extends laya.d3.shadowMap.ParallelSplitShadowMap {\n    }\n    class Terrain extends laya.d3.terrain.Terrain {\n    }\n    class TerrainChunk extends laya.d3.terrain.TerrainChunk {\n    }\n    class TerrainFilter extends laya.d3.terrain.TerrainFilter {\n    }\n    class TerrainHeightData extends laya.d3.terrain.TerrainHeightData {\n    }\n    class TerrainLeaf extends laya.d3.terrain.TerrainLeaf {\n    }\n    class TerrainRender extends laya.d3.terrain.TerrainRender {\n    }\n    class TerrainRes extends laya.d3.terrain.TerrainRes {\n    }\n    class ChunkInfo extends laya.d3.terrain.unit.ChunkInfo {\n    }\n    class DetailTextureInfo extends laya.d3.terrain.unit.DetailTextureInfo {\n    }\n    class MaterialInfo extends laya.d3.terrain.unit.MaterialInfo {\n    }\n    class CollisionManager extends laya.d3.utils.CollisionManager {\n    }\n    class Physics extends laya.d3.utils.Physics {\n    }\n    class Picker extends laya.d3.utils.Picker {\n    }\n    class RaycastHit extends laya.d3.utils.RaycastHit {\n    }\n    class Size extends laya.d3.utils.Size {\n    }\n    class Utils3D extends laya.d3.utils.Utils3D {\n    }\n    class WaterDetailMaterial extends laya.d3.water.WaterDetailMaterial {\n    }\n    class WaterRender extends laya.d3.water.WaterRender {\n    }\n    class Geolocation extends laya.device.geolocation.Geolocation {\n    }\n    class GeolocationInfo extends laya.device.geolocation.GeolocationInfo {\n    }\n    class HtmlVideo extends laya.device.media.HtmlVideo {\n    }\n    class Media extends laya.device.media.Media {\n    }\n    class Video extends laya.device.media.Video {\n    }\n    class WebGLVideo extends laya.device.media.WebGLVideo {\n    }\n    class AccelerationInfo extends laya.device.motion.AccelerationInfo {\n    }\n    class Accelerator extends laya.device.motion.Accelerator {\n    }\n    class Gyroscope extends laya.device.motion.Gyroscope {\n    }\n    class RotationInfo extends laya.device.motion.RotationInfo {\n    }\n    class Shake extends laya.device.Shake {\n    }\n    class Animation extends laya.display.Animation {\n    }\n    class AnimationPlayerBase extends laya.display.AnimationPlayerBase {\n    }\n    class BitmapFont extends laya.display.BitmapFont {\n    }\n    class CSSStyle extends laya.display.css.CSSStyle {\n    }\n    class Font extends laya.display.css.Font {\n    }\n    class Style extends laya.display.css.Style {\n    }\n    class TransformInfo extends laya.display.css.TransformInfo {\n    }\n    class EffectAnimation extends laya.display.EffectAnimation {\n    }\n    class FrameAnimation extends laya.display.FrameAnimation {\n    }\n    class Graphics extends laya.display.Graphics {\n    }\n    class GraphicsBounds extends laya.display.GraphicsBounds {\n    }\n    interface ILayout extends laya.display.ILayout {\n    }\n    class Input extends laya.display.Input {\n    }\n    class Node extends laya.display.Node {\n    }\n    class Sprite extends laya.display.Sprite {\n    }\n    class Stage extends laya.display.Stage {\n    }\n    class Text extends laya.display.Text {\n    }\n    class Event extends laya.events.Event {\n    }\n    class EventDispatcher extends laya.events.EventDispatcher {\n    }\n    class Keyboard extends laya.events.Keyboard {\n    }\n    class KeyBoardManager extends laya.events.KeyBoardManager {\n    }\n    class KeyLocation extends laya.events.KeyLocation {\n    }\n    class MouseManager extends laya.events.MouseManager {\n    }\n    class TouchManager extends laya.events.TouchManager {\n    }\n    class BlurFilter extends laya.filters.BlurFilter {\n    }\n    class ColorFilter extends laya.filters.ColorFilter {\n    }\n    class ColorFilterAction extends laya.filters.ColorFilterAction {\n    }\n    class Filter extends laya.filters.Filter {\n    }\n    class FilterAction extends laya.filters.FilterAction {\n    }\n    class GlowFilter extends laya.filters.GlowFilter {\n    }\n    interface IFilter extends laya.filters.IFilter {\n    }\n    interface IFilterAction extends laya.filters.IFilterAction {\n    }\n    interface IFilterActionGL extends laya.filters.IFilterActionGL {\n    }\n    class BlurFilterActionGL extends laya.filters.webgl.BlurFilterActionGL {\n    }\n    class ColorFilterActionGL extends laya.filters.webgl.ColorFilterActionGL {\n    }\n    class FilterActionGL extends laya.filters.webgl.FilterActionGL {\n    }\n    class GlowFilterActionGL extends laya.filters.webgl.GlowFilterActionGL {\n    }\n    class WebGLFilter extends laya.filters.WebGLFilter {\n    }\n    class HTMLBrElement extends laya.html.dom.HTMLBrElement {\n    }\n    class HTMLDivElement extends laya.html.dom.HTMLDivElement {\n    }\n    class HTMLDocument extends laya.html.dom.HTMLDocument {\n    }\n    class HTMLElement extends laya.html.dom.HTMLElement {\n    }\n    class HTMLIframeElement extends laya.html.dom.HTMLIframeElement {\n    }\n    class HTMLImageElement extends laya.html.dom.HTMLImageElement {\n    }\n    class HTMLLinkElement extends laya.html.dom.HTMLLinkElement {\n    }\n    class HTMLStyleElement extends laya.html.dom.HTMLStyleElement {\n    }\n    class HTMLParse extends laya.html.utils.HTMLParse {\n    }\n    class Layout extends laya.html.utils.Layout {\n    }\n    class LayoutLine extends laya.html.utils.LayoutLine {\n    }\n    class GridSprite extends laya.map.GridSprite {\n    }\n    class MapLayer extends laya.map.MapLayer {\n    }\n    class TileAniSprite extends laya.map.TileAniSprite {\n    }\n    class TiledMap extends laya.map.TiledMap {\n    }\n    class TileTexSet extends laya.map.TileTexSet {\n    }\n    class Arith extends laya.maths.Arith {\n    }\n    class Bezier extends laya.maths.Bezier {\n    }\n    class GrahamScan extends laya.maths.GrahamScan {\n    }\n    class MathUtil extends laya.maths.MathUtil {\n    }\n    class Matrix extends laya.maths.Matrix {\n    }\n    class Point extends laya.maths.Point {\n    }\n    class Rectangle extends laya.maths.Rectangle {\n    }\n    class AudioSound extends laya.media.h5audio.AudioSound {\n    }\n    class AudioSoundChannel extends laya.media.h5audio.AudioSoundChannel {\n    }\n    class Sound extends laya.media.Sound {\n    }\n    class SoundChannel extends laya.media.SoundChannel {\n    }\n    class SoundManager extends laya.media.SoundManager {\n    }\n    class SoundNode extends laya.media.SoundNode {\n    }\n    class WebAudioSound extends laya.media.webaudio.WebAudioSound {\n    }\n    class WebAudioSoundChannel extends laya.media.webaudio.WebAudioSoundChannel {\n    }\n    class HttpRequest extends laya.net.HttpRequest {\n    }\n    class Loader extends laya.net.Loader {\n    }\n    class LoaderManager extends laya.net.LoaderManager {\n    }\n    class LocalStorage extends laya.net.LocalStorage {\n    }\n    class ResourceVersion extends laya.net.ResourceVersion {\n    }\n    class Socket extends laya.net.Socket {\n    }\n    class TTFLoader extends laya.net.TTFLoader {\n    }\n    class URL extends laya.net.URL {\n    }\n    class WorkerLoader extends laya.net.WorkerLoader {\n    }\n    class Emitter2D extends laya.particle.emitter.Emitter2D {\n    }\n    class EmitterBase extends laya.particle.emitter.EmitterBase {\n    }\n    class Particle2D extends laya.particle.Particle2D {\n    }\n    class ParticleData extends laya.particle.ParticleData {\n    }\n    class ParticleEmitter extends laya.particle.ParticleEmitter {\n    }\n    class ParticleSetting extends laya.particle.ParticleSetting {\n    }\n    class ParticleTemplate2D extends laya.particle.ParticleTemplate2D {\n    }\n    class ParticleTemplateBase extends laya.particle.ParticleTemplateBase {\n    }\n    class ParticleTemplateCanvas extends laya.particle.ParticleTemplateCanvas {\n    }\n    class ParticleTemplateWebGL extends laya.particle.ParticleTemplateWebGL {\n    }\n    class CanvasShader extends laya.particle.particleUtils.CanvasShader {\n    }\n    class CMDParticle extends laya.particle.particleUtils.CMDParticle {\n    }\n    class PicTool extends laya.particle.particleUtils.PicTool {\n    }\n    class ParticleShader extends laya.particle.shader.ParticleShader {\n    }\n    class ParticleShaderValue extends laya.particle.shader.value.ParticleShaderValue {\n    }\n    class Render extends laya.renders.Render {\n    }\n    class RenderContext extends laya.renders.RenderContext {\n    }\n    class RenderSprite extends laya.renders.RenderSprite {\n    }\n    class Bitmap extends laya.resource.Bitmap {\n    }\n    class Context extends laya.resource.Context {\n    }\n    class FileBitmap extends laya.resource.FileBitmap {\n    }\n    class HTMLCanvas extends laya.resource.HTMLCanvas {\n    }\n    class HTMLImage extends laya.resource.HTMLImage {\n    }\n    class HTMLSubImage extends laya.resource.HTMLSubImage {\n    }\n    interface ICreateResource extends laya.resource.ICreateResource {\n    }\n    interface IDestroy extends laya.resource.IDestroy {\n    }\n    interface IDispose extends laya.resource.IDispose {\n    }\n    class Resource extends laya.resource.Resource {\n    }\n    class ResourceManager extends laya.resource.ResourceManager {\n    }\n    class Texture extends laya.resource.Texture {\n    }\n    interface IConchNode extends laya.runtime.IConchNode {\n    }\n    interface IConchRenderObject extends laya.runtime.IConchRenderObject {\n    }\n    interface ICPlatformClass extends laya.runtime.ICPlatformClass {\n    }\n    interface IMarket extends laya.runtime.IMarket {\n    }\n    interface IPlatform extends laya.runtime.IPlatform {\n    }\n    interface IPlatformClass extends laya.runtime.IPlatformClass {\n    }\n    class System extends laya.system.System {\n    }\n    class AsynDialog extends laya.ui.AsynDialog {\n    }\n    class AutoBitmap extends laya.ui.AutoBitmap {\n    }\n    class Box extends laya.ui.Box {\n    }\n    class Button extends laya.ui.Button {\n    }\n    class CheckBox extends laya.ui.CheckBox {\n    }\n    class Clip extends laya.ui.Clip {\n    }\n    class ColorPicker extends laya.ui.ColorPicker {\n    }\n    class ComboBox extends laya.ui.ComboBox {\n    }\n    class Component extends laya.ui.Component {\n    }\n    class Dialog extends laya.ui.Dialog {\n    }\n    class DialogManager extends laya.ui.DialogManager {\n    }\n    class FontClip extends laya.ui.FontClip {\n    }\n    class HBox extends laya.ui.HBox {\n    }\n    class HScrollBar extends laya.ui.HScrollBar {\n    }\n    class HSlider extends laya.ui.HSlider {\n    }\n    interface IBox extends laya.ui.IBox {\n    }\n    interface IComponent extends laya.ui.IComponent {\n    }\n    interface IItem extends laya.ui.IItem {\n    }\n    class Image extends laya.ui.Image {\n    }\n    interface IRender extends laya.ui.IRender {\n    }\n    interface ISelect extends laya.ui.ISelect {\n    }\n    class Label extends laya.ui.Label {\n    }\n    class LayoutBox extends laya.ui.LayoutBox {\n    }\n    class LayoutStyle extends laya.ui.LayoutStyle {\n    }\n    class List extends laya.ui.List {\n    }\n    class Panel extends laya.ui.Panel {\n    }\n    class ProgressBar extends laya.ui.ProgressBar {\n    }\n    class Radio extends laya.ui.Radio {\n    }\n    class RadioGroup extends laya.ui.RadioGroup {\n    }\n    class ScrollBar extends laya.ui.ScrollBar {\n    }\n    class Slider extends laya.ui.Slider {\n    }\n    class Styles extends laya.ui.Styles {\n    }\n    class Tab extends laya.ui.Tab {\n    }\n    class TextArea extends laya.ui.TextArea {\n    }\n    class TextInput extends laya.ui.TextInput {\n    }\n    class TipManager extends laya.ui.TipManager {\n    }\n    class Tree extends laya.ui.Tree {\n    }\n    class UIEvent extends laya.ui.UIEvent {\n    }\n    class UIGroup extends laya.ui.UIGroup {\n    }\n    class UIUtils extends laya.ui.UIUtils {\n    }\n    class VBox extends laya.ui.VBox {\n    }\n    class View extends laya.ui.View {\n    }\n    class ViewStack extends laya.ui.ViewStack {\n    }\n    class VScrollBar extends laya.ui.VScrollBar {\n    }\n    class VSlider extends laya.ui.VSlider {\n    }\n    class Browser extends laya.utils.Browser {\n    }\n    class Byte extends laya.utils.Byte {\n    }\n    class CacheManager extends laya.utils.CacheManager {\n    }\n    class ClassUtils extends laya.utils.ClassUtils {\n    }\n    class Dictionary extends laya.utils.Dictionary {\n    }\n    class Dragging extends laya.utils.Dragging {\n    }\n    class Ease extends laya.utils.Ease {\n    }\n    class GraphicAnimation extends laya.utils.GraphicAnimation {\n    }\n    class Handler extends laya.utils.Handler {\n    }\n    class HitArea extends laya.utils.HitArea {\n    }\n    class HTMLChar extends laya.utils.HTMLChar {\n    }\n    class Log extends laya.utils.Log {\n    }\n    class Mouse extends laya.utils.Mouse {\n    }\n    class Pool extends laya.utils.Pool {\n    }\n    class PoolCache extends laya.utils.PoolCache {\n    }\n    class RunDriver extends laya.utils.RunDriver {\n    }\n    class Stat extends laya.utils.Stat {\n    }\n    class StringKey extends laya.utils.StringKey {\n    }\n    class TimeLine extends laya.utils.TimeLine {\n    }\n    class Timer extends laya.utils.Timer {\n    }\n    class Tween extends laya.utils.Tween {\n    }\n    class Utils extends laya.utils.Utils {\n    }\n    class VectorGraphManager extends laya.utils.VectorGraphManager {\n    }\n    class WeakObject extends laya.utils.WeakObject {\n    }\n    class WordText extends laya.utils.WordText {\n    }\n    class Atlaser extends laya.webgl.atlas.Atlaser {\n    }\n    class AtlasGrid extends laya.webgl.atlas.AtlasGrid {\n    }\n    class AtlasResourceManager extends laya.webgl.atlas.AtlasResourceManager {\n    }\n    class AtlasWebGLCanvas extends laya.webgl.atlas.AtlasWebGLCanvas {\n    }\n    class MergeFillInfo extends laya.webgl.atlas.MergeFillInfo {\n    }\n    class BlendMode extends laya.webgl.canvas.BlendMode {\n    }\n    class DrawStyle extends laya.webgl.canvas.DrawStyle {\n    }\n    class Path extends laya.webgl.canvas.Path {\n    }\n    \n    class GraphicsGL extends laya.webgl.display.GraphicsGL {\n    }\n    interface IMergeAtlasBitmap extends laya.webgl.resource.IMergeAtlasBitmap {\n    }\n\n    class WebGLCanvas extends laya.webgl.resource.WebGLCanvas {\n    }\n    class WebGLCharImage extends laya.webgl.resource.WebGLCharImage {\n    }\n    class WebGLImage extends laya.webgl.resource.WebGLImage {\n    }\n    class WebGLRenderTarget extends laya.webgl.resource.WebGLRenderTarget {\n    }\n    class WebGLSubImage extends laya.webgl.resource.WebGLSubImage {\n    }\n    class BaseShader extends laya.webgl.shader.BaseShader {\n    }\n    class Shader2D extends laya.webgl.shader.d2.Shader2D {\n    }\n    class Shader2X extends laya.webgl.shader.d2.Shader2X {\n    }\n    class ShaderDefines2D extends laya.webgl.shader.d2.ShaderDefines2D {\n    }\n    class SkinMesh extends laya.webgl.shader.d2.skinAnishader.SkinMesh {\n    }\n    class SkinMeshBuffer extends laya.webgl.shader.d2.skinAnishader.SkinMeshBuffer {\n    }\n    class SkinSV extends laya.webgl.shader.d2.skinAnishader.SkinSV {\n    }\n    class Color2dSV extends laya.webgl.shader.d2.value.Color2dSV {\n    }\n    class FillTextureSV extends laya.webgl.shader.d2.value.FillTextureSV {\n    }\n    class GlowSV extends laya.webgl.shader.d2.value.GlowSV {\n    }\n    class PrimitiveSV extends laya.webgl.shader.d2.value.PrimitiveSV {\n    }\n    class TextSV extends laya.webgl.shader.d2.value.TextSV {\n    }\n    class TextureSV extends laya.webgl.shader.d2.value.TextureSV {\n    }\n    class Value2D extends laya.webgl.shader.d2.value.Value2D {\n    }\n    class Shader extends laya.webgl.shader.Shader {\n    }\n    class ShaderValue extends laya.webgl.shader.ShaderValue {\n    }\n    class BasePoly extends laya.webgl.shapes.BasePoly {\n    }\n    class Earcut extends laya.webgl.shapes.Earcut {\n    }\n    class EarcutNode extends laya.webgl.shapes.EarcutNode {\n    }\n    class Ellipse extends laya.webgl.shapes.Ellipse {\n    }\n    class GeometryData extends laya.webgl.shapes.GeometryData {\n    }\n    interface IShape extends laya.webgl.shapes.IShape {\n    }\n    class Line extends laya.webgl.shapes.Line {\n    }\n    class LoopLine extends laya.webgl.shapes.LoopLine {\n    }\n    class Polygon extends laya.webgl.shapes.Polygon {\n    }\n    class Vertex extends laya.webgl.shapes.Vertex {\n    }\n    interface ISubmit extends laya.webgl.submit.ISubmit {\n    }\n    \n    class SubmitCMD extends laya.webgl.submit.SubmitCMD {\n    }\n    class SubmitCMDScope extends laya.webgl.submit.SubmitCMDScope {\n    }\n    \n    class CharSegment extends laya.webgl.text.CharSegment {\n    }\n    \n    class FontInContext extends laya.webgl.text.FontInContext {\n    }\n    interface ICharSegment extends laya.webgl.text.ICharSegment {\n    }\n    class Buffer extends laya.webgl.utils.Buffer {\n    }\n    class Buffer2D extends laya.webgl.utils.Buffer2D {\n    }\n    class CONST3D2D extends laya.webgl.utils.CONST3D2D {\n    }\n    class GlUtils extends laya.webgl.utils.GlUtils {\n    }\n    class IndexBuffer2D extends laya.webgl.utils.IndexBuffer2D {\n    }\n    class MatirxArray extends laya.webgl.utils.MatirxArray {\n    }\n    class Mesh2D extends laya.webgl.utils.Mesh2D {\n    }\n   \n    class RenderSprite3D extends laya.webgl.utils.RenderSprite3D {\n    }\n   \n    class ShaderCompile extends laya.webgl.utils.ShaderCompile {\n    }\n    class VertexBuffer2D extends laya.webgl.utils.VertexBuffer2D {\n    }\n    class WebGL extends laya.webgl.WebGL {\n    }\n    class WebGLContext extends laya.webgl.WebGLContext {\n    }\n \n    // class Node extends PathFinding.core.Node {\n    // }\n    \n    \n    class DebugPanel extends laya.debug.DebugPanel {\n    }\n    class DebugTool extends laya.debug.DebugTool {\n    }\n\n}\ndeclare class Laya3D {\n    /**\n     * 初始化Laya3D相关设置。\n     * @param    width  3D画布宽度。\n     * @param    height 3D画布高度。\n     */\n    static  init(width:number, height:number, antialias?:boolean, alpha?:boolean, premultipliedAlpha?:boolean):void \n}\n/**\n * <code>Laya</code> 是全局对象的引用入口集。\n */\ndeclare class Laya {\n    /** 舞台对象的引用。*/\n    static stage: laya.display.Stage;\n    /** 时间管理器的引用。*/\n    static timer: laya.utils.Timer;\n    /** 加载管理器的引用。*/\n    static loader: laya.net.LoaderManager;\n    /** Render 类的引用。*/\n    static render: laya.renders.Render;\n    /** 引擎版本。*/\n    static version: string;\n    /**@private */\n    static stageBox: laya.display.Sprite;\n    /**Market对象 只有加速器模式下才有值*/\n    static conchMarket: laya.runtime.IMarket;\n    /**PlatformClass类，只有加速器模式下才有值 */\n    static PlatformClass: laya.runtime.ICPlatformClass;\n    /**\n     * 初始化引擎。\n     * @param    width 游戏窗口宽度。\n     * @param    height    游戏窗口高度。\n     * @param    插件列表，比如 WebGL。\n     * @return    返回原生canvas，方便控制\n     */\n    static init(width: number, height: number, ...plugins: any[]): any;\n    /**\n     * 表示是否捕获全局错误并弹出提示。\n     */\n    static alertGlobalError: boolean;\n        \n    static class(functionRef:Function, fullQulifiedName:String, superClass:Function, miniName:String):void;\n\n    /**\n     * JS中为目标定义getter/setter。\n     * function getter() { console.log('getter'); }\n     * function setter(val) { console.log('setter'); }\n     * Laya.getset(true, Laya.Sprite, \"foo\", getter, setter);\n     * 上述代码为Laya.Sprite类加入了名为foo的getter/setter。通过Laya.Sprite.foo和Laya.Sprite.foo = val即可触发对应函数。\n     * 下面的代码为Laya.Sprite实例加入名为foo的getter/setter。\n     * function getter() { console.log('getter'); } function setter(val) { console.log('setter'); } var sp = new Laya.Sprite(); Laya.getset(false, sp, \"foo\", getter, setter); 通过sp.foo和sp.foo = val即可触发对应函数。\n     * @param isStatic \n     * @param target \n     * @param name \n     * @param getter \n     * @param setter \n     */\n    static getset(isStatic:Boolean, target:any, name:String, getter:Function, setter:Function):void;\n\n    /**\n     * JS中实现接口。如： 使Myclass实现接口a.interface: Laya.imps(Myclass.prototype, { a.interface: true});\n     * 使MyClass2实现接口a.interface和a.interface2: Laya.imps(MyClass2.prototype, { a.interface: true, a.interface2: true});\n     * @param prototypeChain \n     * @param superInterfaces \n     */\n    static imps(prototypeChain:any, superInterfaces:Object):void;\n\n    /**\n     * JS中定义接口。如 Laya.interface(\"a.b.myinterface\", null); Laya.interface(\"a.b.myInterface2\", BaseInterface);\n     * @param name \n     * @param superClass \n     */\n    static interface(name:String, superClass:Function):void;\n\n    static superSet(clas:any,o:any,prop:any,value:any);\n\n    static superGet(clas:any,o:any,prop:any);\n}\n/**全局配置*/\ndeclare class UIConfig {\n  /**是否开启触摸滚动（针对滚动条）*/\n        public static   touchScrollEnable:boolean;\n        /**是否开启滑轮滚动（针对滚动条）*/\n        public static   mouseWheelEnable:boolean ;\n        /**是否显示滚动条按钮*/\n        public static   showButtons:boolean;\n        /**弹出框背景颜色*/\n        public static   popupBgColor:string;\n        /**弹出框背景透明度*/\n        public static   popupBgAlpha:number;\n        /**模式窗口点击边缘，是否关闭窗口，默认是关闭的*/\n        public static   closeDialogOnSide:boolean;\n}\n/**\n *  Config 用于配置一些全局参数。\n */\ndeclare class Config {\n        /**\n         * WebGL模式下文本缓存最大数量。\n         */\n        public static  WebGLTextCacheCount:number;\n        /**\n         * 表示是否使用了大图合集功能。\n         */\n        public static  atlasEnable:boolean;\n        /**\n         * 是否显示画布图边框，用于调试。\n         */\n        public static  showCanvasMark:boolean;\n        /**\n         * 动画 Animation 的默认播放时间间隔，单位为毫秒。\n         */\n        public static  animationInterval:number;\n        /**\n         * 设置是否抗锯齿，只对2D(WebGL)、3D有效。\n         */\n        public static  isAntialias:boolean;\n        /**\n         * 设置画布是否透明，只对2D(WebGL)、3D有效。\n         */\n        public static  isAlpha:boolean;\n        /**\n         * 设置画布是否预乘，只对2D(WebGL)、3D有效。\n         */\n        public static  premultipliedAlpha:boolean;\n        /**\n         * 设置画布的模板缓冲，只对2D(WebGL)、3D有效。\n         */\n        public static  isStencil:boolean;\n        /**\n         * 是否强制WebGL同步刷新。\n         */\n        public static  preserveDrawingBuffer:boolean;\n}\ndeclare module laya.debug {\n    /**\n     *\n     * @author ww\n     * @version 1.0\n     *\n     * @created  2015-9-24 下午3:00:38\n     */\n    class DebugTool {\n        static init(cacheAnalyseEnable?: boolean, loaderAnalyseEnable?: boolean, createAnalyseEnable?: boolean, renderAnalyseEnable?: boolean): void;\n    }\n}\ndeclare module laya.debug{\n    class DebugPanel{\n        /**\n         * 初始化调试面板 \n         * @param underGame 是否在游戏下方显示，true:将改变原游戏的大小,false:直接覆盖在游戏上方\n         * @param bgColor 调试面板背景颜色\n         * \n         */     \n         static init(underGame?:boolean,bgColor?:string):void;\n    }\n}\n\n/**\n * ETH区块链相关\n */\ndeclare class LayaGCS{\n\t/*\n\t\tETH的功能类实例，封装了bip协议以及账户签名算法\n\t*/\n\tstatic ETHBip:Object;\n\n\t/*\n\t\t得到当前已经unlock的ETH账户，如果是undefined说明玩家还没登陆\n\t*/\n\tstatic get_current_account():string;\n\t/*\n\t\t初始化LayaGCS，需要传入Laya.stage根节点以及网络network\n\t\t //初始化LayaGCS\n   \t\t LayaGCS.initlize({\n\t\t\tlaya_stage_node:laya.stage,     //Laya Air根节点\n\t\t\tnetwork:0                       //ETH区块链网络（0位测试网络Rinkedby , 1为正式网络MainNet)\n\t\t\tauto_load_last_account:false    //自动读取上次登入的账户\n\t\t})\n\t*/\n\tstatic initlize(t:Object):void;\n\t/*\n\t\t是否已经初始化完成\n\t*/\n\tstatic initlized:boolean;\n\t/*\t\n\t\t当前使用的区块链网络，0为Rinkedby , 1是正式网络\n\t*/\n\tstatic network:number;\n\t/*\n\t\tsdk资源回调完成\n\t*/\n\tstatic onSDKResouceLoaded():void;\n\t/*\n\t\t设置初始化完成回调\n\t*/\n\tstatic set_inited_callback(t:Function):void;\n\t/*\n\t\t打开登陆界面（如果已经登录，进入账户界面)\n\t*/\n\tstatic show_login_ui(t:any):void;\n\t/*\n\t\t已经设定的Laya.stage\n\t*/\n\tstatic target_stage:Object;\n\t/*\n\t\t\n\t\t这是一个完整的web3实例。LayaGCS的web3有一些改动。\n\n\t\t由于LayaOne提供了一个全节点，所以游戏前端无需同步区块数据\n\n\t\t为了更好的游戏体验，LayaGCS.web3不再提供同步方法，例如\n\n\t\tvar balance = web3.eth.getBalance(LayaGCS.get_default_account()); //同步的写法，LayaGCS不再支持\n\n\t\t支持的写法\n\n\t\t1.\n\t\tco(function*(){\n\t\t\tvar balance = yield function(done){\n\t\t\tweb3.eth.getBalance(LayaGCS.get_default_account(),done)\n\t\t\t}\n\n\t\t\tconsole.log('账户余额为',balalnce)\n\t\t})\n\n\t\t2. web3.eth.getBalance(LayaGCS.get_default_account,function(err,result){\n\t\t\tconsole.log(result)\n\t\t})\n\n\n\t*/\n\tstatic web3:Object;\n}"
  },
  {
    "path": "src/@types/layaAir.minigame.d.ts",
    "content": "declare module laya.wx.mini {\n    import Handler = laya.utils.Handler;\n    class MiniAdpter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.bd.mini {\n    import Handler = laya.utils.Handler;\n    class BMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.mi.mini {\n    import Handler = laya.utils.Handler;\n    class KGMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.qg.mini {\n    import Handler = laya.utils.Handler;\n    class QGMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.vv.mini {\n    import Handler = laya.utils.Handler;\n    class VVMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.bili.mini {\n    import Handler = laya.utils.Handler;\n    class BLMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.Alipay.mini {\n    import Handler = laya.utils.Handler;\n    class ALIMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.qq.mini {\n    import Handler = laya.utils.Handler;\n    class QQMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.tt.mini {\n    import Handler = laya.utils.Handler;\n    class TTMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.hw.mini {\n    import Handler = laya.utils.Handler;\n    class HWMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.tb.mini {\n    import Handler = laya.utils.Handler;\n    class TBMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\ndeclare module laya.yk.mini {\n    import Handler = laya.utils.Handler;\n    class YKMiniAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module laya.tbplugin.mini {\n    import Handler = laya.utils.Handler;\n    class TBPluginAdapter {\n        static EnvConfig: any;\n        /**全局window对象**/\n        static window: any;\n        static systemInfo: any;\n        static isZiYu: boolean;\n        static isPosMsgYu: boolean;\n        /**是否自动缓存下载的图片跟声音文件，默认为true**/\n        static autoCacheFile: boolean;\n        /**50M缓存容量满时每次清理容量值,默认每次清理5M**/\n        static minClearSize: number;\n        /**本地资源列表**/\n        static nativefiles: Array<any>;\n        /**本地分包资源表**/\n        static subNativeFiles: any;\n        /**本地分包文件目录数组**/\n        static subNativeheads: Array<any>;\n        /**本地分包文件目录映射表**/\n        static subMaps: Array<any>;\n        static AutoCacheDownFile: boolean;\n        static getJson(data: string): any;\n        /**激活微信小游戏适配器*/\n        static enable(): void;\n        /**\n         * 初始化回调\n         * @param isPosMsg 是否需要在主域中自动将加载的文本数据自动传递到子域，默认 false\n         * @param isSon 是否是子域，默认为false\n         */\n        static init(isPosMsg?: boolean, isSon?: boolean): void;\n        /**\n         * 获取url对应的encoding值\n         * @param url 文件路径\n         * @param type 文件类型\n         * @return\n         */\n        static getUrlEncode(url: string, type: string): string;\n        /**\n         * 下载文件\n         * @param fileUrl 文件地址(全路径)\n         * @param fileType 文件类型(image、text、json、xml、arraybuffer、sound、atlas、font)\n         * @param callBack 文件加载回调,回调内容[errorCode码(0成功,1失败,2加载进度)\n         * @param encoding 文件编码默认utf8，非图片文件加载需要设置相应的编码，二进制编码为空字符串\n         */\n        static downLoadFile(fileUrl: string, fileType?: string, callBack?: Handler, encoding?: string): void;\n        /**\n         * 从本地删除文件\n         * @param fileUrl 文件地址(全路径)\n         * @param callBack 回调处理，在存储图片时用到\n         */\n        static remove(fileUrl: string, callBack?: Handler): void;\n        /**\n         * 清空缓存空间文件内容\n         */\n        static removeAll(): void;\n        /**\n         * 判断是否是4M包文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static hasNativeFile(fileUrl: string): boolean;\n        /**\n         * 判断缓存里是否存在文件\n         * @param fileUrl 文件地址(全路径)\n         * @return\n         */\n        static getFileInfo(fileUrl: string): any;\n        /**\n         * 获取缓存文件列表\n         * @return\n         */\n        static getFileList(): any;\n        static exitMiniProgram(): void;\n        static pixelRatio(): number;\n        static createElement(type: string): any;\n        static createShaderCondition(conditionScript: string): Function;\n        /**\n         * 传递图集url地址到\n         * @param url 为绝对地址\n         */\n        static sendAtlasToOpenDataContext(url: string): void;\n        /**\n         * 发送单张图片到开放数据域\n         * @param url\n         */\n        static sendSinglePicToOpenDataContext(url: string): void;\n        /**\n         * 传递json配置数据到开放数据域\n         * @param url 为绝对地址\n         */\n        static sendJsonDataToDataContext(url: string): void;\n    }\n}\n\ndeclare module Laya {\n    class MiniAdpter extends laya.wx.mini.MiniAdpter {\n    }\n    class BMiniAdapter extends laya.bd.mini.BMiniAdapter {\n    }\n    class KGMiniAdapter extends laya.mi.mini.KGMiniAdapter {\n    }\n    class QGMiniAdapter extends laya.qg.mini.QGMiniAdapter {\n    }\n    class VVMiniAdapter extends laya.vv.mini.VVMiniAdapter {\n    }\n    class BLMiniAdapter extends laya.bili.mini.BLMiniAdapter {\n    }\n    class ALIMiniAdapter extends laya.Alipay.mini.ALIMiniAdapter {\n    }\n    class QQMiniAdapter extends laya.qq.mini.QQMiniAdapter {\n    }\n    class TTMiniAdapter extends laya.tt.mini.TTMiniAdapter {\n    }\n    class HWMiniAdapter extends laya.hw.mini.HWMiniAdapter {\n    }\n    class TBMiniAdapter extends laya.tb.mini.TBMiniAdapter {\n    }\n    class YKMiniAdapter extends laya.yk.mini.YKMiniAdapter {\n    }\n    class TBPluginAdapter extends laya.tbplugin.mini.TBPluginAdapter {\n    }\n}"
  },
  {
    "path": "src/@types/union.d.ts",
    "content": "interface CanvasContext {\n  /**\n   * 创建一个颜色的渐变点。\n   */\n  addColorStop: () => void;\n\n  /**\n   * 画一条弧线。\n   */\n  arc: () => void;\n\n  /**\n   * 开始创建一个路径，需要调用fill或者stroke才会使用路径进行填充或描边。\n   */\n  beginPath: () => void;\n\n  /**\n   * 创建三次方贝塞尔曲线路径。\n   */\n  bezierCurveTo: () => void;\n\n  /**\n   * 清空绘图上下文的绘图动作。\n   */\n  clearActions: () => void;\n\n  /**\n   * 清除画布上在该矩形区域内的内容。\n   */\n  clearRect: () => void;\n\n  /**\n   * clip() 方法从原始画布中剪切任意形状和尺寸。一旦剪切了某个区域，则所有之后的绘图都会被限制在被剪切的区域内（不能访问画布上的其他区域）。可以在使用 clip() 方法前通过使用 save() 方法对当前画布区域进行保存，并在以后的任意时间对其进行恢复（通过 restore() 方法）。\n   */\n  clip: () => void;\n\n  /**\n   * 关闭一个路径\n   */\n  closePath: () => void;\n\n  /**\n   * 创建一个圆形的渐变颜色。\n   */\n  createCircularGradient: () => void;\n\n  /**\n   * 创建一个线性的渐变颜色。\n   */\n  createLinearGradient: () => void;\n\n  /**\n   * 将之前在绘图上下文中的描述（路径、变形、样式）画到 canvas 中。\n   */\n  draw: () => void;\n\n  /**\n   * 绘制图像到画布。\n   */\n  drawImage: () => void;\n\n  /**\n   * 对当前路径中的内容进行填充。默认的填充色为黑色。\n   */\n  fill: () => void;\n\n  /**\n   * 填充一个矩形。\n   */\n  fillRect: () => void;\n\n  /**\n   * 在画布上绘制被填充的文本。\n   */\n  fillText: () => void;\n\n  /**\n   * const ctx = wx.createCanvasContext('myCanvas')\n   */\n  lineTo: () => void;\n\n  /**\n   * 把路径移动到画布中的指定点，不创建线条。\n   */\n  moveTo: () => void;\n\n  /**\n   * 创建二次贝塞尔曲线路径。\n   */\n  quadraticCurveTo: () => void;\n\n  /**\n   * 创建一个矩形。\n   */\n  rect: () => void;\n\n  /**\n   * 以原点为中心，原点可以用 [translate](#translate)方法修改。顺时针旋转当前坐标轴。多次调用`rotate`，旋转的角度会叠加。\n   */\n  rotate: () => void;\n\n  /**\n   * 保存当前的绘图上下文。\n   */\n  save: () => void;\n\n  /**\n   * 在调用`scale`方法后，之后创建的路径其横纵坐标会被缩放。多次调用`scale`，倍数会相乘。\n   */\n  scale: () => void;\n\n  /**\n   * 设置填充色。\n   */\n  setFillStyle: () => void;\n\n  /**\n   * 设置字体的字号。\n   */\n  setFontSize: () => void;\n\n  /**\n   * 设置全局画笔透明度。\n   */\n  setGlobalAlpha: () => void;\n\n  /**\n   * 设置线条的端点样式。\n   */\n  setLineCap: () => void;\n\n  /**\n   * 设置线条的宽度。\n   */\n  setLineDash: () => void;\n\n  /**\n   * 设置线条的交点样式。\n   */\n  setLineJoin: () => void;\n\n  /**\n   * 设置线条的宽度。\n   */\n  setLineWidth: () => void;\n\n  /**\n   * 设置最大斜接长度，斜接长度指的是在两条线交汇处内角和外角之间的距离。 当 `setLineJoin()` 为 miter 时才有效。超过最大倾斜长度的，连接处将以 lineJoin 为 bevel 来显示\n   */\n  setMiterLimit: () => void;\n\n  /**\n   * 设置阴影样式。\n   */\n  setShadow: () => void;\n\n  /**\n   * 设置边框颜色。\n   */\n  setStrokeStyle: () => void;\n\n  /**\n   * 用于设置文字的对齐\n   */\n  setTextAlign: () => void;\n\n  /**\n   * 用于设置文字的水平对齐\n   */\n  setTextBaseline: () => void;\n\n  /**\n   * 画出当前路径的边框。默认颜色色为黑色。\n   */\n  stroke: () => void;\n\n  /**\n   * 画一个矩形(非填充)。\n   */\n  strokeRect: () => void;\n\n  /**\n   * 对当前坐标系的原点(0, 0)进行变换，默认的坐标系原点为页面左上角。\n   */\n  translate: () => void;\n}\n\ninterface _writeBLECharacteristicValueObject {\n  /**\n   * 蓝牙设备 id，参考 device 对象\n   */\n  deviceId: string;\n\n  /**\n   * 蓝牙特征值对应服务的 uuid\n   */\n  serviceId: string;\n\n  /**\n   * 蓝牙特征值的 uuid\n   */\n  characteristicId: string;\n\n  /**\n   * 蓝牙设备特征值对应的二进制值\n   */\n  value: any;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _writeBLECharacteristicValueSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\n\ninterface _writeBLECharacteristicValueSuccessObject {\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _vibrateShortObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _vibrateLongObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _uploadFileObject {\n  /**\n   * 开发者服务器 url\n   */\n  url: string;\n\n  /**\n   * 要上传文件资源的路径\n   */\n  filePath: string;\n\n  /**\n   * 文件对应的 key , 开发者在服务器端通过这个 key 可以获取到文件二进制内容\n   */\n  name: string;\n\n  /**\n   * HTTP 请求 Header, header 中不能设置 Referer\n   */\n  header: object;\n\n  /**\n   * HTTP 请求中其他额外的 form data\n   */\n  formData: object;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _uploadFileSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _uploadFileSuccessObject {\n  /**\n   * 开发者服务器返回的数据\n   */\n  data: string;\n\n  /**\n   * 开发者服务器返回的 HTTP 状态码\n   */\n  statusCode: number;\n}\n\ninterface _updateShareMenuObject {\n  /**\n   * 是否使用带 shareTicket 的转发[详情](./share.md#获取更多转发信息)\n   */\n  withShareTicket: boolean;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _switchTabObject {\n  /**\n   * 需要跳转的 tabBar 页面的路径（需在 app.json 的 [tabBar](../framework/config.md#tabbar) 字段定义的页面），路径后不能带参数\n   */\n  url: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _stopWifiObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _stopHCEObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _stopHCESuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _stopHCESuccessObject {\n  /**\n   * 错误信息\n   */\n  errMsg: string;\n\n  /**\n   * 错误码\n   */\n  errCode: number;\n}\n\ninterface _stopCompassObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _stopBluetoothDevicesDiscoveryObject {\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _stopBluetoothDevicesDiscoverySuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _stopBluetoothDevicesDiscoverySuccessObject {\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _stopBeaconDiscoveryObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _stopBeaconDiscoverySuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _stopBeaconDiscoverySuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _stopAccelerometerObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startWifiObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startSoterAuthenticationObject {\n  /**\n   * 请求使用的可接受的生物认证方式\n   */\n  requestAuthModes: any;\n\n  /**\n   * 挑战因子。挑战因子为调用者为此次生物鉴权准备的用于签名的字符串关键是别信息，将作为result_json的一部分，供调用者识别本次请求。例如：如果场景为请求用户对某订单进行授权确认，则可以将订单号填入此参数。\n   */\n  challenge: string;\n\n  /**\n   * 验证描述，即识别过程中显示在界面上的对话框提示内容\n   */\n  authContent: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _startSoterAuthenticationSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startSoterAuthenticationSuccessObject {\n  /**\n   * 错误码\n   */\n  errCode: number;\n\n  /**\n   * 生物认证方式\n   */\n  authMode: string;\n\n  /**\n   * 在设备安全区域（TEE）内获得的本机安全信息（如TEE名称版本号等以及防重放参数）以及本次认证信息（仅Android支持，本次认证的指纹ID）（仅Android支持，本次认证的指纹ID）\n   */\n  resultJSON: string;\n\n  /**\n   * 用SOTER安全密钥对result_json的签名(SHA256withRSA/PSS, saltlen=20)\n   */\n  resultJSONSignature: string;\n\n  /**\n   * 接口调用结果\n   */\n  errMsg: string;\n}\n\ninterface _startRecordObject {\n  /**\n   * 录音成功后调用，返回录音文件的临时文件路径，res = {tempFilePath: '录音文件的临时路径'}\n   */\n  success: (result: _startRecordSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startRecordSuccessObject {\n  /**\n   * 录音文件的临时路径\n   */\n  tempFilePath: any;\n}\n\ninterface _startPullDownRefreshObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _startPullDownRefreshSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startPullDownRefreshSuccessObject {\n  /**\n   * 接口调用结果\n   */\n  errMsg: string;\n}\n\ninterface _startHCEObject {\n  /**\n   * 需要注册到系统的 AID 列表，每个 AID 为 String 类型\n   */\n  aid_list: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _startHCESuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startHCESuccessObject {\n  /**\n   * 错误信息\n   */\n  errMsg: string;\n\n  /**\n   * 错误码\n   */\n  errCode: number;\n}\n\ninterface _startCompassObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startBluetoothDevicesDiscoveryObject {\n  /**\n   * 蓝牙设备主 service 的 uuid 列表\n   */\n  services: any;\n\n  /**\n   * 是否允许重复上报同一设备， 如果允许重复上报，则onDeviceFound 方法会多次上报同一设备，但是 RSSI 值会有不同\n   */\n  allowDuplicatesKey: boolean;\n\n  /**\n   * 上报设备的间隔，默认为0，意思是找到新设备立即上报，否则根据传入的间隔上报\n   */\n  interval: number;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _startBluetoothDevicesDiscoverySuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startBluetoothDevicesDiscoverySuccessObject {\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _startBeaconDiscoveryObject {\n  /**\n   * iBeacon设备广播的 uuids\n   */\n  uuids: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _startBeaconDiscoverySuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _startBeaconDiscoverySuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _startAccelerometerObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _showToastObject {\n  /**\n   * 提示的内容\n   */\n  title: string;\n\n  /**\n   * 图标，有效值 \"success\", \"loading\", \"none\"\n   */\n  icon: string;\n\n  /**\n   * 自定义图标的本地路径，image 的优先级高于 icon\n   */\n  image: string;\n\n  /**\n   * 提示的延迟时间，单位毫秒，默认：1500\n   */\n  duration: number;\n\n  /**\n   * 是否显示透明蒙层，防止触摸穿透，默认：false\n   */\n  mask: boolean;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _showTabBarRedDotObject {\n  /**\n   * tabBar的哪一项，从左边算起\n   */\n  index: number;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _showTabBarObject {\n  /**\n   * 是否需要动画效果，默认无\n   */\n  aniamtion: boolean;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _showShareMenuObject {\n  /**\n   * 是否使用带 shareTicket 的转发[详情](./share.md#获取更多转发信息)\n   */\n  withShareTicket: boolean;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _showModalObject {\n  /**\n   * 提示的标题\n   */\n  title: string;\n\n  /**\n   * 提示的内容\n   */\n  content: string;\n\n  /**\n   * 是否显示取消按钮，默认为 true\n   */\n  showCancel: boolean;\n\n  /**\n   * 取消按钮的文字，默认为\"取消\"，最多 4 个字符\n   */\n  cancelText: string;\n\n  /**\n   * 取消按钮的文字颜色，默认为\"#000000\"\n   */\n  cancelColor: any;\n\n  /**\n   * 确定按钮的文字，默认为\"确定\"，最多 4 个字符\n   */\n  confirmText: string;\n\n  /**\n   * 确定按钮的文字颜色，默认为\"#3CC51F\"\n   */\n  confirmColor: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _showModalSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _showModalSuccessObject {\n  /**\n   * 为 true 时，表示用户点击了确定按钮\n   */\n  confirm: boolean;\n\n  /**\n   * 为 true 时，表示用户点击了取消（用于 Android 系统区分点击蒙层关闭还是点击取消按钮关闭）\n   */\n  cancel: boolean;\n}\n\ninterface _showLoadingObject {\n  /**\n   * 提示的内容\n   */\n  title: string;\n\n  /**\n   * 是否显示透明蒙层，防止触摸穿透，默认：false\n   */\n  mask: boolean;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _showActionSheetObject {\n  /**\n   * 按钮的文字数组，数组长度最大为6个\n   */\n  itemList: any;\n\n  /**\n   * 按钮的文字颜色，默认为\"#000000\"\n   */\n  itemColor: any;\n\n  /**\n   * 接口调用成功的回调函数，详见返回参数说明\n   */\n  success: (result: _showActionSheetSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _showActionSheetSuccessObject {\n  /**\n   * 用户点击的按钮，从上到下的顺序，从0开始\n   */\n  tapIndex: number;\n}\n\ninterface _setWifiListObject {\n  /**\n   * 提供预设的 Wi-Fi 信息列表\n   */\n  wifiList: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setTopBarTextObject {\n  /**\n   * 置顶栏文字内容\n   */\n  text: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setTabBarStyleObject {\n  /**\n   * tab 上的文字默认颜色\n   */\n  color: any;\n\n  /**\n   * tab 上的文字选中时的颜色\n   */\n  selectedColor: any;\n\n  /**\n   * tab 的背景色\n   */\n  backgroundColor: any;\n\n  /**\n   * tabbar上边框的颜色， 仅支持 black/white\n   */\n  borderStyle: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setTabBarItemObject {\n  /**\n   * tabBar 的哪一项，从左边算起\n   */\n  index: number;\n\n  /**\n   * tab 上按钮文字\n   */\n  text: string;\n\n  /**\n   * 图片路径，icon 大小限制为40kb，建议尺寸为 81px * 81px，当 postion 为 top 时，此参数无效，不支持网络图片\n   */\n  iconPath: string;\n\n  /**\n   * 选中时的图片路径，icon 大小限制为40kb，建议尺寸为 81px * 81px ，当 postion 为 top 时，此参数无效\n   */\n  selectedIconPath: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setTabBarBadgeObject {\n  /**\n   * tabBar的哪一项，从左边算起\n   */\n  index: number;\n\n  /**\n   * 显示的文本，超过 3 个字符则显示成“…”\n   */\n  text: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setStorageObject {\n  /**\n   * 本地缓存中的指定的 key\n   */\n  key: string;\n\n  /**\n   * 需要存储的内容\n   */\n  data: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setScreenBrightnessObject {\n  /**\n   * 屏幕亮度值，范围 0~1，0 最暗，1 最亮\n   */\n  value: number;\n\n  /**\n   * 接口调用成功\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setNavigationBarTitleObject {\n  /**\n   * 页面标题\n   */\n  title: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setNavigationBarColorObject {\n  /**\n   * 前景颜色值，包括按钮、标题、状态栏的颜色，仅支持 #ffffff 和 #000000\n   */\n  frontColor: string;\n\n  /**\n   * 背景颜色值，有效值为十六进制颜色\n   */\n  backgroundColor: string;\n\n  /**\n   * 动画效果\n   */\n  animation: object;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _setNavigationBarColorSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setNavigationBarColorSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _setKeepScreenOnObject {\n  /**\n   * 是否保持屏幕常亮\n   */\n  keepScreenOn: boolean;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _setKeepScreenOnSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setKeepScreenOnSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _setEnableDebugObject {\n  /**\n   * 是否打开调试\n   */\n  enableDebug: boolean;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _setEnableDebugSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _setEnableDebugSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _setClipboardDataObject {\n  /**\n   * 需要设置的内容\n   */\n  data: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _sendSocketMessageObject {\n  /**\n   * 需要发送的内容\n   */\n  data: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _sendHCEMessageObject {\n  /**\n   * 二进制数据\n   */\n  data: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _sendHCEMessageSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _sendHCEMessageSuccessObject {\n  /**\n   * 错误信息\n   */\n  errMsg: string;\n\n  /**\n   * 错误码\n   */\n  errCode: number;\n}\n\ninterface _seekBackgroundAudioObject {\n  /**\n   * 音乐位置，单位：秒\n   */\n  position: number;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _scanCodeObject {\n  /**\n   * 是否只能从相机扫码，不允许从相册选择图片\n   */\n  onlyFromCamera: boolean;\n\n  /**\n   * 扫码类型，参数类型是数组，二维码是'qrCode'，一维码是'barCode'，DataMatrix是‘datamatrix’，pdf417是‘pdf417’。\n   */\n  scanType: any;\n\n  /**\n   * 接口调用成功的回调函数，返回内容详见返回参数说明。\n   */\n  success: (result: _scanCodeSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _scanCodeSuccessObject {\n  /**\n   * 所扫码的内容\n   */\n  result: any;\n\n  /**\n   * 所扫码的类型\n   */\n  scanType: any;\n\n  /**\n   * 所扫码的字符集\n   */\n  charSet: any;\n\n  /**\n   * 当所扫的码为当前小程序的合法二维码时，会返回此字段，内容为二维码携带的 path\n   */\n  path: any;\n}\n\ninterface _saveVideoToPhotosAlbumObject {\n  /**\n   * 视频文件路径，可以是临时文件路径也可以是永久文件路径\n   */\n  filePath: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _saveVideoToPhotosAlbumSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _saveVideoToPhotosAlbumSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _saveImageToPhotosAlbumObject {\n  /**\n   * 图片文件路径，可以是临时文件路径也可以是永久文件路径，不支持网络图片路径\n   */\n  filePath: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _saveImageToPhotosAlbumSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _saveImageToPhotosAlbumSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _saveFileObject {\n  /**\n   * 需要保存的文件的临时路径\n   */\n  tempFilePath: string;\n\n  /**\n   * 返回文件的保存路径，res = {savedFilePath: '文件的保存路径'}\n   */\n  success: (result: _saveFileSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _saveFileSuccessObject {\n  /**\n   * 文件的保存路径\n   */\n  savedFilePath: any;\n}\n\ninterface _requestPaymentObject {\n  /**\n   * 平台分配的游戏appId\n   */\n  appId:number;\n  /**\n   * 游戏包名\n   */\n  pkgName:string;\n  /**\n   * qg.login成功时获得的用户token\n   */\n  token:string;\n  /**\n   * 时间戳从1970年1月1日00:00:00至今的秒数,即当前的时间\n   */\n  timeStamp: string;\n  /**\n   * 下单订单号，由统一下单接口返回\n   */\n  orderNo:string;\n  /**\n   * 支付签名，CP服务端生成。注：paySign 由 CP 服务端使用 appKey (不是 appId )、orderNo、timestamp 进行签名算法生成返回。签名规则，跟\"统一下单接口\"的签名规则一致。\n   */\n  paySign:string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\n\ninterface _requestObject {\n  /**\n   * 开发者服务器接口地址\n   */\n  url: string;\n\n  /**\n   * 请求的参数\n   */\n  data: any;\n\n  /**\n   * 设置请求的 header，header 中不能设置 Referer。\n   */\n  header: object;\n\n  /**\n   * （需大写）有效值：OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT\n   */\n  method: string;\n\n  /**\n   * 如果设为json，会尝试对返回的数据做一次 JSON.parse\n   */\n  dataType: string;\n\n  /**\n   * 设置响应的数据类型。合法值：text、arraybuffer\n   */\n  responseType: string;\n\n  /**\n   * 收到开发者服务成功返回的回调函数\n   */\n  success: (result: _requestSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _requestSuccessObject {\n  /**\n   * 开发者服务器返回的数据\n   */\n  data: any;\n\n  /**\n   * 开发者服务器返回的 HTTP 状态码\n   */\n  statusCode: number;\n\n  /**\n   * 开发者服务器返回的 HTTP Response Header\n   */\n  header: object;\n}\n\ninterface _removeTabBarBadgeObject {\n  /**\n   * tabBar的哪一项，从左边算起\n   */\n  index: number;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _removeStorageObject {\n  /**\n   * 本地缓存中的指定的 key\n   */\n  key: string;\n\n  /**\n   * 接口调用的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _removeSavedFileObject {\n  /**\n   * 需要删除的文件路径\n   */\n  filePath: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _redirectToObject {\n  /**\n   * 需要跳转的应用内非 tabBar 的页面的路径，路径后可以带参数。参数与路径之间使用`?`分隔，参数键与参数值用`=`相连，不同参数用`&`分隔；如 'path?key=value&key2=value2'\n   */\n  url: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _readBLECharacteristicValueObject {\n  /**\n   * 蓝牙设备 id，参考 device 对象\n   */\n  deviceId: string;\n\n  /**\n   * 蓝牙特征值对应服务的 uuid\n   */\n  serviceId: string;\n\n  /**\n   * 蓝牙特征值的 uuid\n   */\n  characteristicId: string;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _readBLECharacteristicValueSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _readBLECharacteristicValueSuccessObject {\n  /**\n   * 错误码\n   */\n  errCode: number;\n\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _reLaunchObject {\n  /**\n   * 需要跳转的应用内页面路径 , 路径后可以带参数。参数与路径之间使用`?`分隔，参数键与参数值用`=`相连，不同参数用`&`分隔；如 'path?key=value&key2=value2'，如果跳转的页面路径是 tabBar 页面则不能带参数\n   */\n  url: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _previewImageObject {\n  /**\n   * 当前显示图片的链接，不填则默认为 urls 的第一张\n   */\n  current: string;\n\n  /**\n   * 需要预览的图片链接列表\n   */\n  urls: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _playVoiceObject {\n  /**\n   * 需要播放的语音文件的文件路径\n   */\n  filePath: string;\n\n  /**\n   * 指定录音时长，到达指定的录音时长后会自动停止录音，单位：秒，默认值：60\n   */\n  duration: number;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _playBackgroundAudioObject {\n  /**\n   * 音乐链接，目前支持的格式有 m4a, aac, mp3, wav\n   */\n  dataUrl: string;\n\n  /**\n   * 音乐标题\n   */\n  title: string;\n\n  /**\n   * 封面URL\n   */\n  coverImgUrl: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _pageScrollToObject {\n  /**\n   * 滚动到页面的目标位置（单位px）\n   */\n  scrollTop: number;\n\n  /**\n   * 滚动动画的时长，默认300ms，单位 ms\n   */\n  duration: number;\n}\ninterface _openSettingObject {\n  /**\n   * 接口调用成功的回调函数，返回内容详见返回参数说明。\n   */\n  success: (result: _openSettingSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _openSettingSuccessObject {\n  /**\n   * 用户授权结果，其中 key 为 scope 值，value 为 Bool 值，表示用户是否允许授权，详见 [scope 列表](./authorize-index.md#scope-列表)\n   */\n  authSetting: object;\n}\n\ninterface _openLocationObject {\n  /**\n   * 纬度，范围为-90~90，负数表示南纬\n   */\n  latitude: any;\n\n  /**\n   * 经度，范围为-180~180，负数表示西经\n   */\n  longitude: any;\n\n  /**\n   * 缩放比例，范围5~18，默认为18\n   */\n  scale: any;\n\n  /**\n   * 位置名\n   */\n  name: string;\n\n  /**\n   * 地址的详细说明\n   */\n  address: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _openDocumentObject {\n  /**\n   * 文件路径，可通过 downFile 获得\n   */\n  filePath: any;\n\n  /**\n   * 文件类型，指定文件类型打开文件，有效值 doc, xls, ppt, pdf, docx, xlsx, pptx\n   */\n  fileType: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: any;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: any;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: any;\n}\ninterface _openCardObject {\n  /**\n   * 需要打开的卡券列表，列表内参数详见[openCard 请求对象说明](#opencard-请求对象说明)\n   */\n  cardList: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _openBluetoothAdapterObject {\n  /**\n   * 成功则返回成功初始化信息\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _onWifiConnectedCallbackResult {\n  /**\n   * Wi-Fi 信息\n   */\n  wifi: object;\n}\ninterface _onUserCaptureScreenCallbackResult {}\ninterface _onSocketMessageCallbackResult {\n  /**\n   * 服务器返回的消息\n   */\n  data: any;\n}\ninterface _onNetworkStatusChangeCallbackResult {\n  /**\n   * 当前是否有网络连接\n   */\n  isConnected: boolean;\n\n  /**\n   * 网络类型\n   */\n  networkType: string;\n}\ninterface _onHCEMessageCallbackResult {\n  /**\n   * 消息类型\n   */\n  messageType: number;\n\n  /**\n   * 客户端接收到 NFC 设备的指令，此参数当且仅当 `messageType=1` 时有效\n   */\n  data: any;\n\n  /**\n   * 此参数当且仅当 `messageType=2` 时有效\n   */\n  reason: number;\n}\ninterface _onGetWifiListCallbackResult {\n  /**\n   * Wi-Fi 列表数据\n   */\n  wifiList: any;\n}\ninterface _onEvaluateWifiCallbackResult {\n  /**\n   * Wi-Fi 信息\n   */\n  wifi: object;\n}\ninterface _onCompassChangeCallbackResult {\n  /**\n   * 面对的方向度数\n   */\n  direction: number;\n}\ninterface _onBluetoothDeviceFoundCallbackResult {\n  /**\n   * 新搜索到的设备列表\n   */\n  devices: any;\n}\ninterface _onBluetoothAdapterStateChangeCallbackResult {\n  /**\n   * 蓝牙适配器是否可用\n   */\n  available: boolean;\n\n  /**\n   * 蓝牙适配器是否处于搜索状态\n   */\n  discovering: boolean;\n}\ninterface _onBeaconUpdateCallbackResult {\n  /**\n   * 当前搜寻到的所有 iBeacon 设备列表\n   */\n  beacons: any;\n}\ninterface _onBeaconServiceChangeCallbackResult {\n  /**\n   * 服务目前是否可用\n   */\n  available: boolean;\n\n  /**\n   * 目前是否处于搜索状态\n   */\n  discovering: boolean;\n}\ninterface _onBLEConnectionStateChangeCallbackResult {\n  /**\n   * 蓝牙设备 id，参考 device 对象\n   */\n  deviceId: string;\n\n  /**\n   * 连接目前的状态\n   */\n  connected: boolean;\n}\ninterface _onBLECharacteristicValueChangeCallbackResult {\n  /**\n   * 蓝牙设备 id，参考 device 对象\n   */\n  deviceId: string;\n\n  /**\n   * 特征值所属服务 uuid\n   */\n  serviceId: string;\n\n  /**\n   * 特征值 uuid\n   */\n  characteristicId: string;\n\n  /**\n   * 特征值最新的值 **（注意：vConsole 无法打印出 ArrayBuffer 类型数据）**\n   */\n  value: any;\n}\ninterface _onAccelerometerChangeCallbackResult {\n  /**\n   * X 轴\n   */\n  x: number;\n\n  /**\n   * Y 轴\n   */\n  y: number;\n\n  /**\n   * Z 轴\n   */\n  z: number;\n}\ninterface _notifyBLECharacteristicValueChangeObject {\n  /**\n   * 蓝牙设备 id，参考 device 对象\n   */\n  deviceId: string;\n\n  /**\n   * 蓝牙特征值对应服务的 uuid\n   */\n  serviceId: string;\n\n  /**\n   * 蓝牙特征值的 uuid\n   */\n  characteristicId: string;\n\n  /**\n   * true: 启用 notify; false: 停用 notify\n   */\n  state: boolean;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _notifyBLECharacteristicValueChangeSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _notifyBLECharacteristicValueChangeSuccessObject {\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _navigateToMiniProgramObject {\n  /**\n   * 要打开的小程序 appId\n   */\n  appId: string;\n\n  /**\n   * 打开的页面路径，如果为空则打开首页\n   */\n  path: string;\n\n  /**\n   * 需要传递给目标小程序的数据，目标小程序可在 `App.onLaunch()`，`App.onShow()` 中获取到这份数据。[详情](../framework/app-service/app.md)\n   */\n  extraData: object;\n\n  /**\n   * 要打开的小程序版本，有效值 develop（开发版），trial（体验版），release（正式版） ，仅在当前小程序为开发版或体验版时此参数有效；如果当前小程序是体验版或正式版，则打开的小程序必定是正式版。默认值 release\n   */\n  envVersion: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _navigateToMiniProgramSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _navigateToMiniProgramSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _navigateToObject {\n  /**\n   * 需要跳转的应用内非 tabBar 的页面的路径 , 路径后可以带参数。参数与路径之间使用`?`分隔，参数键与参数值用`=`相连，不同参数用`&`分隔；如 'path?key=value&key2=value2'\n   */\n  url: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _navigateBackMiniProgramObject {\n  /**\n   * 需要返回给上一个小程序的数据，上一个小程序可在 `App.onShow()` 中获取到这份数据。[详情](../framework/app-service/app.md)\n   */\n  extraData: object;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _navigateBackMiniProgramSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _navigateBackMiniProgramSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _navigateBackObject {\n  /**\n   * 返回的页面数，如果 delta 大于现有页面数，则返回到首页。\n   */\n  delta: number;\n}\ninterface _makeVoIPCallObject {\n  /**\n   * 是否展示切换按钮以允许用户转换到后置摄像头\n   */\n  allowBackCamera: boolean;\n\n  /**\n   * 是否显示对端视频流\n   */\n  showOther: boolean;\n\n  /**\n   * 客服头像的图像链接\n   */\n  avatarUrl: string;\n\n  /**\n   * 用于区分业务上下文的透传值\n   */\n  context: string;\n\n  /**\n   * 返回用户选择的收货地址信息\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _makePhoneCallObject {\n  /**\n   * 需要拨打的电话号码\n   */\n  phoneNumber: string;\n\n  /**\n   * 接口调用成功的回调\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _loginObject {\n  /**\n   * 游戏包名\n   */\n  pkgName: string;\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _loginSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _loginSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n\n  /**\n   * 用户登录凭证（有效期五分钟）。开发者需要在开发者服务器后台调用 api，使用 code 换取 openid 和 session_key 等信息\n   */\n  code: string;\n}\n\ninterface _hideTabBarRedDotObject {\n  /**\n   * tabBar的哪一项，从左边算起\n   */\n  index: number;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _hideTabBarObject {\n  /**\n   * 是否需要动画效果，默认无\n   */\n  aniamtion: boolean;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _hideShareMenuObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getWifiListObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getWeRunDataObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getWeRunDataSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getWeRunDataSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n\n  /**\n   * 包括敏感数据在内的完整用户信息的加密数据，详细见[加密数据解密算法](./signature.md#加密数据解密算法)\n   */\n  encryptedData: string;\n\n  /**\n   * 加密算法的初始向量，详细见[加密数据解密算法](./signature.md#加密数据解密算法)\n   */\n  iv: string;\n}\n\ninterface _getUserInfoObject {\n  /**\n   * 是否带上登录态信息\n   */\n  withCredentials: boolean;\n\n  /**\n   * 指定返回用户信息的语言，zh_CN 简体中文，zh_TW 繁体中文，en 英文。默认为en。\n   */\n  lang: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getUserInfoSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getUserInfoSuccessObject {\n  /**\n   * 用户信息对象，不包含 openid 等敏感信息\n   */\n  userInfo: object;\n\n  /**\n   * 不包括敏感信息的原始数据字符串，用于计算签名。\n   */\n  rawData: string;\n\n  /**\n   * 使用 sha1( rawData + sessionkey ) 得到字符串，用于校验用户信息，参考文档 [signature](./signature.md)。\n   */\n  signature: string;\n\n  /**\n   * 包括敏感数据在内的完整用户信息的加密数据，详细见[加密数据解密算法](./signature.md#加密数据解密算法)\n   */\n  encryptedData: string;\n\n  /**\n   * 加密算法的初始向量，详细见[加密数据解密算法](./signature.md#加密数据解密算法)\n   */\n  iv: string;\n}\n\ninterface _getSystemInfoSyncReturnValue {\n  /**\n   * 手机品牌\n   */\n  brand: any;\n\n  /**\n   * 手机型号\n   */\n  model: any;\n\n  /**\n   * 设备像素比\n   */\n  pixelRatio: any;\n\n  /**\n   * 屏幕宽度\n   */\n  screenWidth: any;\n\n  /**\n   * 屏幕高度\n   */\n  screenHeight: any;\n\n  /**\n   * 可使用窗口宽度\n   */\n  windowWidth: any;\n\n  /**\n   * 可使用窗口高度\n   */\n  windowHeight: any;\n\n  /**\n   * 状态栏的高度\n   */\n  statusBarHeight: any;\n\n  /**\n   * 微信设置的语言\n   */\n  language: any;\n\n  /**\n   * 微信版本号\n   */\n  version: any;\n\n  /**\n   * 操作系统版本\n   */\n  system: any;\n\n  /**\n   * 客户端平台\n   */\n  platform: any;\n\n  /**\n   * 用户字体大小设置。以“我-设置-通用-字体大小”中的设置为准，单位：px\n   */\n  fontSizeSetting: any;\n\n  /**\n   * 客户端基础库版本\n   */\n  SDKVersion: any;\n}\n\ninterface _getSystemInfoObject {\n  /**\n   * 接口调用成功的回调\n   */\n  success: (result: _getSystemInfoSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getSystemInfoSuccessObject {\n  /**\n   * 手机品牌\n   */\n  brand: any;\n\n  /**\n   * 手机型号\n   */\n  model: any;\n\n  /**\n   * 设备像素比\n   */\n  pixelRatio: any;\n\n  /**\n   * 屏幕宽度\n   */\n  screenWidth: any;\n\n  /**\n   * 屏幕高度\n   */\n  screenHeight: any;\n\n  /**\n   * 可使用窗口宽度\n   */\n  windowWidth: any;\n\n  /**\n   * 可使用窗口高度\n   */\n  windowHeight: any;\n\n  /**\n   * 状态栏的高度\n   */\n  statusBarHeight: any;\n\n  /**\n   * 微信设置的语言\n   */\n  language: any;\n\n  /**\n   * 微信版本号\n   */\n  version: any;\n\n  /**\n   * 操作系统版本\n   */\n  system: any;\n\n  /**\n   * 客户端平台\n   */\n  platform: any;\n\n  /**\n   * 用户字体大小设置。以“我-设置-通用-字体大小”中的设置为准，单位：px\n   */\n  fontSizeSetting: any;\n\n  /**\n   * 客户端基础库版本\n   */\n  SDKVersion: any;\n}\n\ninterface _getStorageInfoObject {\n  /**\n   * 接口调用的回调函数，详见返回参数说明\n   */\n  success: (result: _getStorageInfoSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getStorageInfoSuccessObject {\n  /**\n   * 当前storage中所有的key\n   */\n  keys: any;\n\n  /**\n   * 当前占用的空间大小, 单位kb\n   */\n  currentSize: number;\n\n  /**\n   * 限制的空间大小，单位kb\n   */\n  limitSize: number;\n}\n\ninterface _getStorageObject {\n  /**\n   * 本地缓存中的指定的 key\n   */\n  key: string;\n\n  /**\n   * 接口调用的回调函数,res = {data: key对应的内容}\n   */\n  success: (result: _getStorageSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getStorageSuccessObject {\n  /**\n   * key对应的内容\n   */\n  data: string;\n}\n\ninterface _getShareInfoObject {\n  /**\n   * shareTicket\n   */\n  shareTicket: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getShareInfoSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getShareInfoSuccessObject {\n  /**\n   * 错误信息\n   */\n  errMsg: string;\n\n  /**\n   * 包括敏感数据在内的完整转发信息的加密数据，详细见[加密数据解密算法](./signature.md#加密数据解密算法)\n   */\n  encryptedData: string;\n\n  /**\n   * 加密算法的初始向量，详细见[加密数据解密算法](./signature.md#加密数据解密算法)\n   */\n  iv: string;\n}\n\ninterface _getSettingObject {\n  /**\n   * 接口调用成功的回调函数，返回内容详见返回参数说明。\n   */\n  success: (result: _getSettingSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getSettingSuccessObject {\n  /**\n   * 用户授权结果，其中 key 为 scope 值，value 为 Bool 值，表示用户是否允许授权，详见 [scope 列表](./authorize-index.md#scope-列表)\n   */\n  authSetting: object;\n}\n\ninterface _getScreenBrightnessObject {\n  /**\n   * 接口调用成功\n   */\n  success: (result: _getScreenBrightnessSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getScreenBrightnessSuccessObject {\n  /**\n   * 屏幕亮度值，范围 0~1，0 最暗，1 最亮\n   */\n  value: number;\n}\n\ninterface _getSavedFileListObject {\n  /**\n   * 接口调用成功的回调函数，返回结果见`success返回参数说明`\n   */\n  success: (result: _getSavedFileListSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getSavedFileListSuccessObject {\n  /**\n   * 接口调用结果\n   */\n  errMsg: string;\n\n  /**\n   * 文件列表\n   */\n  fileList: any;\n}\n\ninterface _getSavedFileInfoObject {\n  /**\n   * 文件路径\n   */\n  filePath: string;\n\n  /**\n   * 接口调用成功的回调函数，返回结果见`success返回参数说明`\n   */\n  success: (result: _getSavedFileInfoSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getSavedFileInfoSuccessObject {\n  /**\n   * 接口调用结果\n   */\n  errMsg: string;\n\n  /**\n   * 文件大小，单位B\n   */\n  size: number;\n\n  /**\n   * 文件保存时的时间戳，从1970/01/01 08:00:00 到该时刻的秒数\n   */\n  createTime: number;\n}\n\ninterface _getOpenDeviceIdObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getOpenDeviceIdSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getOpenDeviceIdSuccessObject {\n  /**\n   * 接口调用结果\n   */\n  errMsg: string;\n\n  /**\n   * 包括敏感数据在内的完整用户信息的加密数据，详细见[加密数据解密算法](./signature.md#加密数据解密算法)\n   */\n  encryptedData: string;\n\n  /**\n   * 加密算法的初始向量，详细见[加密数据解密算法](./signature.md#加密数据解密算法)\n   */\n  iv: string;\n}\n\ninterface _getNetworkTypeObject {\n  /**\n   * 接口调用成功，返回网络类型 networkType\n   */\n  success: (result: _getNetworkTypeSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getNetworkTypeSuccessObject {\n  /**\n   * 网络类型\n   */\n  networkType: any;\n}\n\ninterface _getLocationObject {\n  /**\n   * 默认为 wgs84 返回 gps 坐标，gcj02 返回可用于`wx.openLocation`的坐标\n   */\n  type: string;\n\n  /**\n   * 传入 true 会返回高度信息，由于获取高度需要较高精确度，会减慢接口返回速度\n   */\n  altitude: boolean;\n\n  /**\n   * 接口调用成功的回调函数，返回内容详见返回参数说明。\n   */\n  success: (result: _getLocationSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getLocationSuccessObject {\n  /**\n   * 纬度，浮点数，范围为-90~90，负数表示南纬\n   */\n  latitude: any;\n\n  /**\n   * 经度，浮点数，范围为-180~180，负数表示西经\n   */\n  longitude: any;\n\n  /**\n   * 速度，浮点数，单位m/s\n   */\n  speed: any;\n\n  /**\n   * 位置的精确度\n   */\n  accuracy: any;\n\n  /**\n   * 高度，单位 m\n   */\n  altitude: any;\n\n  /**\n   * 垂直精度，单位 m（Android 无法获取，返回 0）\n   */\n  verticalAccuracy: any;\n\n  /**\n   * 水平精度，单位 m\n   */\n  horizontalAccuracy: any;\n}\n\ninterface _getImageInfoObject {\n  /**\n   * 图片的路径，可以是相对路径，临时文件路径，存储文件路径，网络图片路径\n   */\n  src: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getImageInfoSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getImageInfoSuccessObject {\n  /**\n   * 图片宽度，单位px\n   */\n  width: number;\n\n  /**\n   * 图片高度，单位px\n   */\n  height: number;\n\n  /**\n   * 返回图片的本地路径\n   */\n  path: string;\n}\n\ninterface _getHCEStateObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getHCEStateSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getHCEStateSuccessObject {\n  /**\n   * 错误信息\n   */\n  errMsg: string;\n\n  /**\n   * 错误码\n   */\n  errCode: number;\n}\n\ninterface _getFileInfoObject {\n  /**\n   * 本地文件路径\n   */\n  filePath: string;\n\n  /**\n   * 计算文件摘要的算法，默认值 md5，有效值：md5，sha1\n   */\n  digestAlgorithm: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getFileInfoSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getFileInfoSuccessObject {\n  /**\n   * 文件大小，单位：B\n   */\n  size: number;\n\n  /**\n   * 按照传入的 digestAlgorithm 计算得出的的文件摘要\n   */\n  digest: string;\n\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _getExtConfigSyncReturnValue {\n  /**\n   * 第三方平台自定义的数据\n   */\n  extConfig: object;\n}\n\ninterface _getExtConfigObject {\n  /**\n   * 返回第三方平台自定义的数据\n   */\n  success: (result: _getExtConfigSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getExtConfigSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n\n  /**\n   * 第三方平台自定义的数据\n   */\n  extConfig: object;\n}\n\ninterface _getConnectedWifiObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getConnectedWifiSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getConnectedWifiSuccessObject {\n  /**\n   * Wi-Fi 信息\n   */\n  wifi: object;\n}\n\ninterface _getConnectedBluetoothDevicesObject {\n  /**\n   * 蓝牙设备主 service 的 uuid 列表\n   */\n  services: any;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _getConnectedBluetoothDevicesSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getConnectedBluetoothDevicesSuccessObject {\n  /**\n   * 搜索到的设备列表\n   */\n  devices: any;\n\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _getClipboardDataObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getClipboardDataSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getClipboardDataSuccessObject {\n  /**\n   * 剪贴板的内容\n   */\n  data: string;\n}\n\ninterface _getBluetoothDevicesObject {\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _getBluetoothDevicesSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getBluetoothDevicesSuccessObject {\n  /**\n   * uuid 对应的的已连接设备列表\n   */\n  devices: any;\n\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _getBluetoothAdapterStateObject {\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _getBluetoothAdapterStateSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getBluetoothAdapterStateSuccessObject {\n  /**\n   * 是否正在搜索设备\n   */\n  discovering: boolean;\n\n  /**\n   * 蓝牙适配器是否可用\n   */\n  available: boolean;\n\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _getBeaconsObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getBeaconsSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getBeaconsSuccessObject {\n  /**\n   * iBeacon 设备列表\n   */\n  beacons: any;\n\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _getBackgroundAudioPlayerStateObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _getBackgroundAudioPlayerStateSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getBackgroundAudioPlayerStateSuccessObject {\n  /**\n   * 选定音频的长度（单位：s），只有在当前有音乐播放时返回\n   */\n  duration: any;\n\n  /**\n   * 选定音频的播放位置（单位：s），只有在当前有音乐播放时返回\n   */\n  currentPosition: any;\n\n  /**\n   * 播放状态（2：没有音乐在播放，1：播放中，0：暂停中）\n   */\n  status: any;\n\n  /**\n   * 音频的下载进度（整数，80 代表 80%），只有在当前有音乐播放时返回\n   */\n  downloadPercent: any;\n\n  /**\n   * 歌曲数据链接，只有在当前有音乐播放时返回\n   */\n  dataUrl: any;\n}\n\ninterface _getBackgroundAudioManagerReturnValue {\n  /**\n   * 当前音频的长度（单位：s），只有在当前有合法的 src 时返回\n   */\n  duration: number;\n\n  /**\n   * 当前音频的播放位置（单位：s），只有在当前有合法的 src 时返回\n   */\n  currentTime: number;\n\n  /**\n   * 当前是是否暂停或停止状态，true 表示暂停或停止，false 表示正在播放\n   */\n  paused: boolean;\n\n  /**\n   * 音频的数据源，默认为空字符串，**当设置了新的 src 时，会自动开始播放** ，目前支持的格式有 m4a, aac, mp3, wav\n   */\n  src: string;\n\n  /**\n   * 音频开始播放的位置（单位：s）\n   */\n  startTime: number;\n\n  /**\n   * 音频缓冲的时间点，仅保证当前播放时间点到此时间点内容已缓冲。\n   */\n  buffered: number;\n\n  /**\n   * 音频标题，用于做原生音频播放器音频标题。原生音频播放器中的分享功能，分享出去的卡片标题，也将使用该值。\n   */\n  title: string;\n\n  /**\n   * 专辑名，原生音频播放器中的分享功能，分享出去的卡片简介，也将使用该值。\n   */\n  epname: string;\n\n  /**\n   * 歌手名，原生音频播放器中的分享功能，分享出去的卡片简介，也将使用该值。\n   */\n  singer: string;\n\n  /**\n   * 封面图url，用于做原生音频播放器背景图。原生音频播放器中的分享功能，分享出去的卡片配图及背景也将使用该图。\n   */\n  coverImgUrl: string;\n\n  /**\n   * 页面链接，原生音频播放器中的分享功能，分享出去的卡片简介，也将使用该值。\n   */\n  webUrl: string;\n\n  /**\n   * 播放\n   */\n  play: () => void;\n\n  /**\n   * 暂停\n   */\n  pause: () => void;\n\n  /**\n   * 停止\n   */\n  stop: () => void;\n\n  /**\n   * 跳转到指定位置，单位 s\n   */\n  seek: () => void;\n\n  /**\n   * 背景音频进入可以播放状态，但不保证后面可以流畅播放\n   */\n  onCanplay: () => void;\n\n  /**\n   * 背景音频播放事件\n   */\n  onPlay: () => void;\n\n  /**\n   * 背景音频暂停事件\n   */\n  onPause: () => void;\n\n  /**\n   * 背景音频停止事件\n   */\n  onStop: () => void;\n\n  /**\n   * 背景音频自然播放结束事件\n   */\n  onEnded: () => void;\n\n  /**\n   * 背景音频播放进度更新事件\n   */\n  onTimeUpdate: () => void;\n\n  /**\n   * 用户在系统音乐播放面板点击上一曲事件（iOS only）\n   */\n  onPrev: () => void;\n\n  /**\n   * 用户在系统音乐播放面板点击下一曲事件（iOS only）\n   */\n  onNext: () => void;\n\n  /**\n   * 背景音频播放错误事件\n   */\n  onError: () => void;\n\n  /**\n   * 音频加载中事件，当音频因为数据不足，需要停下来加载时会触发\n   */\n  onWaiting: () => void;\n}\n\ninterface _getBLEDeviceServicesObject {\n  /**\n   * 蓝牙设备 id，参考 getDevices 接口\n   */\n  deviceId: string;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _getBLEDeviceServicesSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getBLEDeviceServicesSuccessObject {\n  /**\n   * 设备服务列表\n   */\n  services: any;\n\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _getBLEDeviceCharacteristicsObject {\n  /**\n   * 蓝牙设备 id，参考 device 对象\n   */\n  deviceId: string;\n\n  /**\n   * 蓝牙服务 uuid\n   */\n  serviceId: string;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _getBLEDeviceCharacteristicsSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _getBLEDeviceCharacteristicsSuccessObject {\n  /**\n   * 设备特征值列表\n   */\n  characteristics: any;\n\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _downloadFileObject {\n  /**\n   * 下载资源的 url\n   */\n  url: string;\n\n  /**\n   * HTTP 请求的 Header，Header 中不能设置 Referer\n   */\n  header: object;\n  /**\n   * \t指定文件下载后存储的路径 \n   */\n  filePath?:string;\n  /**\n   * \t接口调用成功的回调函\n   */\n  success: (result: _downloadFileSuccessObject) => void;\n\n  /**\n   * \t接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * \t接口调用结束的回调函数\n   */\n  complete: () => void;\n}\ninterface _downloadFileSuccessObject {\n  /**\n   * 临时文件路径，下载后的文件会存储到一个临时文件\n   */\n  tempFilePath: string;\n\n  /**\n   * 开发者服务器返回的 HTTP 状态码\n   */\n  statusCode: number;\n\n  /**\n   * 错误码\n   */\n  errCode:string;\n\n  /**\n  * 错误信息\n  */\n  errMsg:number;\n}\n\ninterface _createBLEConnectionObject {\n  /**\n   * 蓝牙设备 id，参考 getDevices 接口\n   */\n  deviceId: string;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _createBLEConnectionSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _createBLEConnectionSuccessObject {\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _createAnimationObject {\n  /**\n   * 动画持续时间，单位ms\n   */\n  duration: any;\n\n  /**\n   * 定义动画的效果\n   */\n  timingFunction: string;\n\n  /**\n   * 动画延迟时间，单位 ms\n   */\n  delay: any;\n\n  /**\n   * 设置transform-origin\n   */\n  transformOrigin: string;\n}\ninterface _connectWifiObject {\n  /**\n   * Wi-Fi 设备ssid\n   */\n  SSID: string;\n\n  /**\n   * Wi-Fi 设备bssid\n   */\n  BSSID: string;\n\n  /**\n   * Wi-Fi 设备密码\n   */\n  password: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _connectSocketObject {\n  /**\n   * 开发者服务器接口地址，必须是 wss 协议，且域名必须是后台配置的合法域名\n   */\n  url: string;\n\n  /**\n   * HTTP Header , header 中不能设置 Referer\n   */\n  header: object;\n\n  /**\n   * 默认是GET，有效值：OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT\n   */\n  method: string;\n\n  /**\n   * 子协议数组\n   */\n  protocols: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _closeSocketObject {\n  /**\n   * 一个数字值表示关闭连接的状态号，表示连接被关闭的原因。如果这个参数没有被指定，默认的取值是1000 （表示正常连接关闭）\n   */\n  code: number;\n\n  /**\n   * 一个可读的字符串，表示连接被关闭的原因。这个字符串必须是不长于123字节的UTF-8 文本（不是字符）\n   */\n  reason: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _closeBluetoothAdapterObject {\n  /**\n   * 成功则返回成功关闭模块信息\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _closeBLEConnectionObject {\n  /**\n   * 蓝牙设备 id，参考 getDevices 接口\n   */\n  deviceId: string;\n\n  /**\n   * 成功则返回本机蓝牙适配器状态\n   */\n  success: (result: _closeBLEConnectionSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _closeBLEConnectionSuccessObject {\n  /**\n   * 成功：ok，错误：详细信息\n   */\n  errMsg: string;\n}\n\ninterface _chooseVideoObject {\n  /**\n   * album 从相册选视频，camera 使用相机拍摄，默认为：['album', 'camera']\n   */\n  sourceType: any;\n\n  /**\n   * 是否压缩所选的视频源文件，默认值为true，需要压缩\n   */\n  compressed: any;\n\n  /**\n   * 拍摄视频最长拍摄时间，单位秒。最长支持 60 秒\n   */\n  maxDuration: number;\n\n  /**\n   * 接口调用成功，返回视频文件的临时文件路径，详见返回参数说明\n   */\n  success: (result: _chooseVideoSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _chooseVideoSuccessObject {\n  /**\n   * 选定视频的临时文件路径\n   */\n  tempFilePath: any;\n\n  /**\n   * 选定视频的时间长度\n   */\n  duration: any;\n\n  /**\n   * 选定视频的数据量大小\n   */\n  size: any;\n\n  /**\n   * 返回选定视频的长\n   */\n  height: any;\n\n  /**\n   * 返回选定视频的宽\n   */\n  width: any;\n}\n\ninterface _chooseLocationObject {\n  /**\n   * 接口调用成功的回调函数，返回内容详见返回参数说明。\n   */\n  success: (result: _chooseLocationSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _chooseLocationSuccessObject {\n  /**\n   * 位置名称\n   */\n  name: any;\n\n  /**\n   * 详细地址\n   */\n  address: any;\n\n  /**\n   * 纬度，浮点数，范围为-90~90，负数表示南纬\n   */\n  latitude: any;\n\n  /**\n   * 经度，浮点数，范围为-180~180，负数表示西经\n   */\n  longitude: any;\n}\n\ninterface _chooseInvoiceTitleObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _chooseInvoiceTitleSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _chooseInvoiceTitleSuccessObject {\n  /**\n   * 抬头类型（0：单位，1：个人）\n   */\n  type: string;\n\n  /**\n   * 抬头名称\n   */\n  title: string;\n\n  /**\n   * 抬头税号\n   */\n  taxNumber: string;\n\n  /**\n   * 单位地址\n   */\n  companyAddress: string;\n\n  /**\n   * 手机号码\n   */\n  telephone: string;\n\n  /**\n   * 银行名称\n   */\n  bankName: string;\n\n  /**\n   * 银行账号\n   */\n  bankAccount: string;\n\n  /**\n   * 接口调用结果\n   */\n  errMsg: string;\n}\n\ninterface _chooseImageObject {\n  /**\n   * 最多可以选择的图片张数，默认9\n   */\n  count: number;\n\n  /**\n   * original 原图，compressed 压缩图，默认二者都有\n   */\n  sizeType: any;\n\n  /**\n   * album 从相册选图，camera 使用相机，默认二者都有\n   */\n  sourceType: any;\n\n  /**\n   * 成功则返回图片的本地文件路径列表 tempFilePaths\n   */\n  success: (result: _chooseImageSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _chooseImageSuccessObject {\n  /**\n   * 图片的本地文件路径列表\n   */\n  tempFilePaths: any;\n\n  /**\n   * 图片的本地文件列表，每一项是一个 File 对象\n   */\n  tempFiles: any;\n}\n\ninterface _chooseContactObject {\n  /**\n   * 返回用户选择的联系人信息\n   */\n  success: (result: _chooseContactSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _chooseContactSuccessObject {\n  /**\n   * 电话号码\n   */\n  phoneNumber: any;\n\n  /**\n   * 联系人名称\n   */\n  displayName: any;\n}\n\ninterface _chooseAddressObject {\n  /**\n   * 返回用户选择的收货地址信息\n   */\n  success: (result: _chooseAddressSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _chooseAddressSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n\n  /**\n   * 收货人姓名\n   */\n  userName: string;\n\n  /**\n   * 邮编\n   */\n  postalCode: string;\n\n  /**\n   * 国标收货地址第一级地址\n   */\n  provinceName: string;\n\n  /**\n   * 国标收货地址第二级地址\n   */\n  cityName: string;\n\n  /**\n   * 国标收货地址第三级地址\n   */\n  countyName: string;\n\n  /**\n   * 详细收货地址信息\n   */\n  detailInfo: string;\n\n  /**\n   * 收货地址国家码\n   */\n  nationalCode: string;\n\n  /**\n   * 收货人手机号码\n   */\n  telNumber: string;\n}\n\ninterface _checkSessionObject {\n  /**\n   * 接口调用成功的回调函数，登录态未过期\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数，登录态已过期\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _checkIsSupportSoterAuthenticationObject {\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _checkIsSupportSoterAuthenticationSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _checkIsSupportSoterAuthenticationSuccessObject {\n  /**\n   * 该设备支持的可被SOTER识别的生物识别方式\n   */\n  supportMode: any;\n\n  /**\n   * 接口调用结果\n   */\n  errMsg: string;\n}\n\ninterface _checkIsSoterEnrolledInDeviceObject {\n  /**\n   * 认证方式\n   */\n  checkAuthMode: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _checkIsSoterEnrolledInDeviceSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _checkIsSoterEnrolledInDeviceSuccessObject {\n  /**\n   * 是否已录入信息\n   */\n  isEnrolled: boolean;\n\n  /**\n   * 接口调用结果\n   */\n  errMsg: string;\n}\n\ninterface _canvasToTempFilePathObject {\n  /**\n   * 画布x轴起点（默认0）\n   */\n  x: number;\n\n  /**\n   * 画布y轴起点（默认0）\n   */\n  y: number;\n\n  /**\n   * 画布宽度（默认为canvas宽度-x）\n   */\n  width: number;\n\n  /**\n   * 画布高度（默认为canvas高度-y）\n   */\n  height: number;\n\n  /**\n   * 输出图片宽度（默认为width）\n   */\n  destWidth: number;\n\n  /**\n   * 输出图片高度（默认为height）\n   */\n  destHeight: number;\n\n  /**\n   * 画布标识，传入 [`<canvas/>`](../../component/canvas.md) 的 canvas-id\n   */\n  canvasId: string;\n\n  /**\n   * 目标文件的类型，只支持 'jpg' 或 'png'。默认为 'png'\n   */\n  fileType: string;\n\n  /**\n   * 图片的质量，取值范围为 (0, 1]，不在范围内时当作1.0处理\n   */\n  quality: number;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _canvasPutImageDataObject {\n  /**\n   * 画布标识，传入 [`<canvas />`](../../component/canvas.md) 的 canvas-id\n   */\n  canvasId: string;\n\n  /**\n   * 图像像素点数据，一维数组，每四项表示一个像素点的rgba\n   */\n  data: any;\n\n  /**\n   * 源图像数据在目标画布中的位置偏移量（x 轴方向的偏移量）\n   */\n  x: number;\n\n  /**\n   * 源图像数据在目标画布中的位置偏移量（y 轴方向的偏移量）\n   */\n  y: number;\n\n  /**\n   * 源图像数据矩形区域的宽度\n   */\n  width: number;\n\n  /**\n   * 源图像数据矩形区域的高度\n   */\n  height: number;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _canvasGetImageDataObject {\n  /**\n   * 画布标识，传入 [`<canvas />`](../../component/canvas.md) 的 canvas-id\n   */\n  canvasId: string;\n\n  /**\n   * 将要被提取的图像数据矩形区域的左上角 x 坐标\n   */\n  x: number;\n\n  /**\n   * 将要被提取的图像数据矩形区域的左上角 y 坐标\n   */\n  y: number;\n\n  /**\n   * 将要被提取的图像数据矩形区域的宽度\n   */\n  width: number;\n\n  /**\n   * 将要被提取的图像数据矩形区域的高度\n   */\n  height: number;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _canvasGetImageDataSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _canvasGetImageDataSuccessObject {\n  /**\n   *\n   */\n  errMsg: string;\n\n  /**\n   * 图像数据矩形的宽度\n   */\n  width: number;\n\n  /**\n   * 图像数据矩形的高度\n   */\n  height: number;\n\n  /**\n   * 图像像素点数据，一维数组，每四项表示一个像素点的rgba\n   */\n  data: any;\n}\n\ninterface _authorizeObject {\n  /**\n   * 需要获取权限的scope，详见 [scope 列表](./authorize-index.md#scope-列表)\n   */\n  scope: string;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _authorizeSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _authorizeSuccessObject {\n  /**\n   * 调用结果\n   */\n  errMsg: string;\n}\n\ninterface _addPhoneContactObject {\n  /**\n   * 头像本地文件路径\n   */\n  photoFilePath: string;\n\n  /**\n   * 昵称\n   */\n  nickName: string;\n\n  /**\n   * 姓氏\n   */\n  lastName: string;\n\n  /**\n   * 中间名\n   */\n  middleName: string;\n\n  /**\n   * 名字\n   */\n  firstName: string;\n\n  /**\n   * 备注\n   */\n  remark: string;\n\n  /**\n   * 手机号\n   */\n  mobilePhoneNumber: string;\n\n  /**\n   * 微信号\n   */\n  weChatNumber: string;\n\n  /**\n   * 联系地址国家\n   */\n  addressCountry: string;\n\n  /**\n   * 联系地址省份\n   */\n  addressState: string;\n\n  /**\n   * 联系地址城市\n   */\n  addressCity: string;\n\n  /**\n   * 联系地址街道\n   */\n  addressStreet: string;\n\n  /**\n   * 联系地址邮政编码\n   */\n  addressPostalCode: string;\n\n  /**\n   * 公司\n   */\n  organization: string;\n\n  /**\n   * 职位\n   */\n  title: string;\n\n  /**\n   * 工作传真\n   */\n  workFaxNumber: string;\n\n  /**\n   * 工作电话\n   */\n  workPhoneNumber: string;\n\n  /**\n   * 公司电话\n   */\n  hostNumber: string;\n\n  /**\n   * 电子邮件\n   */\n  email: string;\n\n  /**\n   * 网站\n   */\n  url: string;\n\n  /**\n   * 工作地址国家\n   */\n  workAddressCountry: string;\n\n  /**\n   * 工作地址省份\n   */\n  workAddressState: string;\n\n  /**\n   * 工作地址城市\n   */\n  workAddressCity: string;\n\n  /**\n   * 工作地址街道\n   */\n  workAddressStreet: string;\n\n  /**\n   * 工作地址邮政编码\n   */\n  workAddressPostalCode: string;\n\n  /**\n   * 住宅传真\n   */\n  homeFaxNumber: string;\n\n  /**\n   * 住宅电话\n   */\n  homePhoneNumber: string;\n\n  /**\n   * 住宅地址国家\n   */\n  homeAddressCountry: string;\n\n  /**\n   * 住宅地址省份\n   */\n  homeAddressState: string;\n\n  /**\n   * 住宅地址城市\n   */\n  homeAddressCity: string;\n\n  /**\n   * 住宅地址街道\n   */\n  homeAddressStreet: string;\n\n  /**\n   * 住宅地址邮政编码\n   */\n  homeAddressPostalCode: string;\n\n  /**\n   * 接口调用成功\n   */\n  success: () => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _addCardObject {\n  /**\n   * 需要添加的卡券列表，列表内对象说明请参见[请求对象说明](#请求对象说明)\n   */\n  cardList: any;\n\n  /**\n   * 接口调用成功的回调函数\n   */\n  success: (result: _addCardSuccessObject) => void;\n\n  /**\n   * 接口调用失败的回调函数\n   */\n  fail: () => void;\n\n  /**\n   * 接口调用结束的回调函数（调用成功、失败都会执行）\n   */\n  complete: () => void;\n}\ninterface _addCardSuccessObject {\n  /**\n   * 卡券添加结果列表，列表内对象说明请详见[返回对象说明](#返回对象说明)\n   */\n  cardList: any;\n}\n\ninterface _ShareAppMessageReturnObject {\n  /**\n   * 分享标题。默认为当前小程序名称。\n   */\n\n  title: string;\n\n  /**\n   * 分享路径。默认为当前页面 path，必须是以 / 开头的完整路径。\n   */\n\n  path: string;\n}\n\ninterface _AppShowOptions {\n  /**\n   * 打开小程序的路径\n   */\n  path: string;\n\n  /**\n   * 打开小程序的query\n   */\n  query: object;\n\n  /**\n   * 打开小程序的场景值\n   */\n  scene: number;\n\n  /**\n   * shareTicket\n   */\n  shareTicket: string;\n}\n\ndeclare interface _AppOptions {\n  /**\n   * 当小程序初始化完成时，会触发 onLaunch（全局只触发一次）\n   */\n  onLaunch?: (options: _AppShowOptions) => void;\n\n  /**\n   * 当小程序启动，或从后台进入前台显示，会触发 onShow\n   */\n  onShow?: (options: _AppShowOptions) => void;\n\n  /**\n   * 当小程序从前台进入后台，会触发 onHide\n   */\n  onHide?: () => void;\n\n  /**\n   * 当小程序发生脚本错误，或者 api 调用失败时，会触发 onError 并带上错误信息\n   */\n  onError?: (msg: string) => void;\n}\n\ninterface _BatteryInfo{\n  /**\n   * \t设备电量，范围 1 - 100\n   */\n  level:number;\n  /**\n   * 是否正在充电中\n   */\n  isCharging:number;\n}\n\ninterface _FileSystemManager{\n  /**\n   * 判断文件/目录是否存在\n   */\n  access:(object:any)=>void;\n  /**\n   * FileSystemManager.access 的同步版本，判断文件/目录是否存在\n   */\n  accessSync:(path:string)=>any;\n  /**\n   * 在文件结尾追加内容\n   */\n  appendFile:(object:any)=>void;\n  /**\n   * FileSystemManager.appendFile 的同步版本，在文件结尾追加内容\n   * @param 要追加内容的文件路径\n   * @param 要追加的文本或二进制数据\n   * @param 指定写入文件的字符编码，当前支持：utf8、binary\n   */\n  appendFileSync:(filePath:string,data:any,encoding?:string)=>any;\n  /**\n   * 复制文件异步方式\n   */\n  copyFile:(object:any)=>void;\n  /**\n   * FileSystemManager.copyFile 的同步版本，拷贝文件\n   * @param 源文件路径，只可以是普通文件\n   * @param \t目标文件路径\n   */\n  copyFileSync:(srcPath:string,destPath:string)=>boolean;\n  /**\n   * 获取本地临时文件或本地用户文件的文件信息\n   */\n  getFileInfo:(object:any) => void;\n  /**\n   * 创建目录\n   */\n  mkdir:(object:any)=>void;\n  /**\n   * FileSystemManager.mkdir 的同步版本，创建目录\n   * @param 创建的目录路径\n   * @param 是否在递归创建该目录的上级目录后再创建该目录。如果对应的上级目录已经存在，则不创建该上级目录。如 dirPath 为 a/b/c/d 且 recursive 为 true，将创建 a 目录，再在 a 目录下创建 b 目录，以此类推直至创建 a/b/c 目录下的 d 目录。\n   */\n  mkdirSync:(dirPath:string,recursive:string)=>any;\n  /**\n   * 读取本地文件内容异步方式\n   */\n  readFile:(object:any)=>void;\n  /**\n   * FileSystemManager.readFile 的同步版本，读取文件\n   * @param \t要读取的文件的路径\n   * @param 指定读取文件的字符编码，默认为 binary\n   */\n  readFileSync:(filePath:string,encoding?:string)=>any;\n  /**\n   * 重命名文件，可以把文件从 oldPath 移动到 newPath\n   */\n  rename:(object:any)=>void;\n  /**\n   * FileSystemManager.rename 的同步版本，重命名文件\n   */\n  renameSync:(oldPath:string,newPath:string)=>any;\n  /**\n   * 删除目录\n   */\n  rmdir:(object:any)=>void;\n  /**\n   * FileSystemManager.rmdir 的同步版本，移除目录\n   * @param 要删除的目录路径\n   * @param 是否递归删除目录。如果为 true，则删除该目录和该目录下的所有子目录以及文件。\n   */\n  rmdirSync:(dirPath:string,recursive?:boolean)=>void;\n  /**\n   * 读取目录内文件列表\n   */\n  readdir:(object:any)=>void;\n  /**\n   * FileSystemManager.readdir 的同步版本，读取目录\n   */\n  readdirSync:(dirPath:string)=>Array<any>;\n  /**\n   * 删除文件\n   */\n  unlink:(object:any)=>void;\n  /**\n   * FileSystemManager.unlink 的同步版本，删除文件\n   */\n  unlinkSync:(filePath:string)=>any;\n  /**\n   * 解压文件\n   */\n  unzip:(object:any)=>void;\n  /**\n   * 写文件异步方式\n   */\n  writeFile:(object:any)=>void;\n  /**\n   * FileSystemManager.writeFile 的同步版本，写文件\n   * @param 要写入的文件路径\n   * @param 要写入的文本或二进制数据\n   * @param 指定写入文件的字符编码 utf8 or binary，默认值为 utf8\n   * @param 默认为 false，覆盖旧文件\n   */\n  writeFileSync:(filePath:string, data:any, encoding?:string, append?:boolean)=>boolean;\n  /**\n   * 保存临时文件到本地。此接口会移动临时文件，因此调用成功后，tempFilePath 将不可用。\n   */\n  saveFile:(object:any)=>void;\n  /**\n   * FileSystemManager.saveFile 的同步版本，保存临时文件到本地。\n   * @param 临时存储文件路径\n   * @param 要存储的文件路径\n   * @returns\t存储后的文件路径\n   */\n  saveFileSync:(tempFilePath:string, filePath?:string)=>string;\n  /**\n   * 删除该OPPO小游戏下已保存的本地缓存文件\n   */\n  removeSavedFile:(object:any )=>void;\n  /**\n   * 获取文件 Stats 对象\n   */\n  stat:(object:any)=>void;\n \n}\n\ninterface _LoadSubpackageTask{\n  /**\n   * 用于获取分包加载状态\n   */\n  onProgressUpdate:(callback:Function)=>void;\n}\n\ninterface _NativeAd{\n  /**\n   * 获取广告数据，成功回调 onLoad，失败回调 onError\n   */\n  load:()=>void;\n  /**\n   * 销毁广告组件，释放资源\n   */\n  destroy:()=>void;\n  /**\n   * 上报广告曝光，一个广告只有一次上报有效，adId 为 load 方法获取的广告数据的 adId 字段\n   */\n  reportAdShow:(callback:Function) => void;\n  /**\n   * 上报广告点击，一个广告只有一次上报有效，adId 为 load 方法获取的广告数据的 adId 字段\n   */\n  reportAdClick:(callback:Function) => void;\n  /**\n   * 设置广告加载成功回调\n   */\n  onLoad:(callback:Function)=>void;\n  /**\n   * 移除广告加载成功回调\n  */\n  offLoad:(callback:Function)=>void;\n  /**\n   * 设置出错回调\n   */\n  onError:(callback:Function)=>void;\n  /**\n   * 移除出错回调\n   */\n  offError:(callback:Function)=>void;\n}\n\ninterface _InsertAd{\n  /**\n   * 拉取插屏广告资源，成功回调 onLoad，失败回调 onError\n   */\n  load:()=>void;\n  /**\n   * 展示插屏广告，成功回调 onShow，失败回调 onError\n   */\n  show:()=>void;\n  /**\n   * 销毁组件，释放资源\n   */\n  destroy:()=>void;\n  /**\n   * 设置插屏广告加载成功回调\n   */\n  onLoad:(callback:Function)=>void;\n  /**\n   * 移除插屏广告加载成功回调\n   */\n  offLoad:(callback:Function)=>void;\n  /**\n   * 设置插屏广告展示成功回调\n   */\n  onShow:(callback:Function)=>void;\n  /**\n   * 移除banner 隐藏回调\n   */\n  offShow:(callback:Function)=>void;\n  /**\n   * 设置插屏广告失败回调\n   */\n  onError:(callback:Function)=>void;\n  /**\n   * 移除插屏广告失败回调\n   */\n  offError:(callback:Function)=>void;\n}\n\ninterface _VideoAd{\n  /**\n   * 手动拉取广告，成功回调 onLoad，失败回调 onError\n   */\n  load:()=>void;\n  /**\n   * 视频广告组件默认是隐藏的，调用 show 方法展示广告，成功回调 onVideoStart，失败回调 onError.\n   * 开发者不可控制视频广告的关闭，只有用户主动点击关闭按钮才会关闭广告\n   */\n  show:()=>void;\n  /**\n   * 销毁组件，释放资源\n   */\n  destroy:()=>void;\n  /**\n   * 设置视频广告加载成功回调\n   */\n  onLoad:(callback:Function)=>void;\n  /**\n   * 移除视频广告加载成功回调\n   */\n  offLoad:(callback:Function)=>void;\n  /**\n   * 设置视频广告开始播放回调\n   */\n  onVideoStart:(callback:Function)=>void;\n  /**\n   * 移除视频广告开始播放回调\n   */\n  offVideoStart:(callback:Function)=>void;\n  /**\n   * 设置视频奖励发放回调\n   */\n  onRewarded:(callback:Function)=>void;\n  /**\n   * 移除视频奖励发放回调\n   */\n  offRewarded:(callback:Function)=>void;\n  /**\n   * 设置视频广告出错回调\n   */\n  onError:(callback:Function)=>void;\n  /**\n   * 移除视频广告出错回调\n   */\n  offError:(callback:Function)=>void;\n}\n\ninterface _BannerAd{\n  /**\n   * 调用 load 方法请求展示 banner，成功的时候回调 onShow，出错的时候回调 onError\n   */\n  show:()=>void;\n  /**\n   * 隐藏 banner，成功回调 onHide, 出错的时候回调 onError\n   */\n  hide:()=>void;\n  /**\n   * 设置 banner 成功展示回调\n   */\n  onShow:(callback:Function)=>void;\n  /**\n   * 移除 banner 成功展示回调\n   */\n  offShow:(callback:Function)=>void;\n  /**\n   * 设置 banner 隐藏回调\n   */\n  onHide:(callback:Function)=>void;\n  /**\n   * 移除banner 隐藏回调\n   */\n  offHide:(callback:Function)=>void;\n  /**\n   * 设置失败回调\n   */\n  onError:(callback:Function)=>void;\n  /**\n   * 移除失败回调\n   */\n  offError:(callback:Function)=>void;\n}\n\ninterface _Battle {\n  /**\n   * 对战初始化。初始化完成后可以获得对战信息，进行其他操作。（游戏双方都调用该方法后，才能触发success回调）\n   */\n  init :(object:any) => void;\n  /**\n   * 发送游戏当前的状态给平台。**注：调用postGameStatus设置游戏状态时，每个状态都只能调用一次，不要重复调用。\n   */\n  postGameStatus :(object:any) =>void;\n  /**\n   * 平台通知游戏开始。平台主动调此方法触发开始逻辑。（双方都调用postGameStatus且status为1时，才会触发该方法）\n   */\n  onGameStart:(callback:Function)=>void;\n  /**\n   * 弹出确认对话框，提示是否退出对局。**注：该方法用于CP自己实现了退出按钮的通用处理逻辑，一般情况下不需要调用该方法；success回调不代表真正退出，仅将退出请求发送到服务端，退出游戏还是需要通过服务端驱动。\n   */\n  quit:(object:any)=>void;\n  /**\n   * 游戏发送消息。\n   */\n  postMessage:(object:any) =>void;\n  /**\n   * 游戏接收推送的消息。\n   */\n   onMessage:(callback:Function)=>void;\n   /**\n    * 游戏传数据给游戏平台。\n    */\n   writeBlackboard:(object:any)=>void;\n}\n\ninterface _DownloadTask {\n  /**\n   * 中断下载任务\n   */\n  abort:()=>void;\n  /**\n   * 监听下载进度变化事件\n   */\n  onProgressUpdate:(callback:Function)=>void;\n}\n\ndeclare function App(options: _AppOptions): void;\n\n/**\n * 获取到小程序实例\n */\ndeclare function getApp(): object;\n\ndeclare interface PageOptions {\n  /**\n   * 页面的初始数据\n   */\n  data?: any;\n\n  /**\n   * 生命周期函数--监听页面加载\n   */\n  onLoad?: (options?: object) => void;\n\n  /**\n   * 生命周期函数--监听页面初次渲染完成\n   */\n\n  onReady?: () => void;\n\n  /**\n   * 生命周期函数--监听页面显示\n   */\n\n  onShow?: () => void;\n\n  /**\n   * 生命周期函数--监听页面隐藏\n   */\n\n  onHide?: () => void;\n\n  /**\n   * 生命周期函数--监听页面卸载\n   */\n\n  onUnload?: () => void;\n\n  /**\n   * 页面相关事件处理函数--监听用户下拉动作\n   */\n\n  onPullDownRefresh?: () => void;\n\n  /**\n   * 页面上拉触底事件的处理函数\n   */\n\n  onReachBottom?: () => void;\n\n  /**\n   * 用户点击右上角分享\n   */\n\n  onShareAppMessage?: () => _ShareAppMessageReturnObject;\n}\n\ndeclare function Page(page: PageOptions): void;\n\ndeclare function getCurrentPages(): object[];\n\ndeclare namespace qg {\n  /**\n   * 批量添加卡券。\n   */\n  export function addCard(object: _addCardObject): void;\n\n  /**\n   * 调用后，用户可以选择将该表单以“新增联系人”或“添加到已有联系人”的方式，写入手机系统通讯录，完成手机通讯录联系人和联系方式的增加。\n   */\n  export function addPhoneContact(object: _addPhoneContactObject): void;\n\n  /**\n   * 将 ArrayBuffer 数据转成 Base64 字符串\n   */\n  export function arrayBufferToBase64(): void;\n\n  /**\n   * 提前向用户发起授权请求。调用后会立刻弹窗询问用户是否同意授权小程序使用某项功能或获取用户的某些数据，但不会实际调用对应接口。如果用户之前已经同意授权，则不会出现弹窗，直接返回成功。\n   */\n  export function authorize(object: _authorizeObject): void;\n\n  /**\n   * 将 Base64 字符串转成 ArrayBuffer 数据\n   */\n  export function base64ToArrayBuffer(base64: string): void;\n\n  /**\n   * 判断小程序的API，回调，参数，组件等是否在当前版本可用。\n   */\n  export function canIUse(string: string): void;\n\n  /**\n   * 返回一个数组，用来描述 canvas 区域隐含的像素数据\n   */\n  export function canvasGetImageData(object: _canvasGetImageDataObject): void;\n\n  /**\n   * 将像素数据绘制到画布的方法\n   */\n  export function canvasPutImageData(object: _canvasPutImageDataObject): void;\n\n  /**\n   * 把当前画布指定区域的内容导出生成指定大小的图片，并返回文件路径。\n   */\n  export function canvasToTempFilePath(\n    this: string,\n    object: _canvasToTempFilePathObject\n  ): void;\n\n  /**\n   * 获取设备内是否录入如指纹等生物信息的接口\n   */\n  export function checkIsSoterEnrolledInDevice(\n    object: _checkIsSoterEnrolledInDeviceObject\n  ): void;\n\n  /**\n   * 获取本机支持的 SOTER 生物认证方式\n   */\n  export function checkIsSupportSoterAuthentication(\n    object: _checkIsSupportSoterAuthenticationObject\n  ): void;\n\n  /**\n   * 通过上述接口获得的用户登录态拥有一定的时效性。用户越久未使用小程序，用户登录态越有可能失效。反之如果用户一直在使用小程序，则用户登录态一直保持有效。具体时效逻辑由微信维护，对开发者透明。开发者只需要调用wx.checkSession接口**检测当前用户登录态是否有效**。登录态过期后开发者可以再调用wx.login获取新的用户登录态。\n   */\n  export function checkSession(object: _checkSessionObject): void;\n\n  /**\n   * 调起用户编辑收货地址原生界面，并在编辑完成后返回用户选择的地址。\n   */\n  export function chooseAddress(object: _chooseAddressObject): void;\n\n  /**\n   * 调起选择手机通讯录联系人界面，返回用户选择的联系人信息。\n   */\n  export function chooseContact(object: _chooseContactObject): void;\n\n  /**\n   * 从本地相册选择图片或使用相机拍照。\n   */\n  export function chooseImage(object: _chooseImageObject): void;\n\n  /**\n   * 选择用户的发票抬头。\n   */\n  export function chooseInvoiceTitle(object: _chooseInvoiceTitleObject): void;\n\n  /**\n   * 打开地图选择位置。\n   */\n  export function chooseLocation(object: _chooseLocationObject): void;\n\n  /**\n   * 拍摄视频或从手机相册中选视频，返回视频的临时文件路径。\n   */\n  export function chooseVideo(object: _chooseVideoObject): void;\n\n  /**\n   * 清理本地数据缓存。\n   */\n  export function clearStorage(): void;\n\n  /**\n   * 同步清理本地数据缓存\n   */\n  export function clearStorageSync(): void;\n\n  /**\n   * 断开与低功耗蓝牙设备的连接\n   */\n  export function closeBLEConnection(object: _closeBLEConnectionObject): void;\n\n  /**\n   * 关闭蓝牙模块，使其进入未初始化状态。调用该方法将断开所有已建立的链接并释放系统资源。建议在使用小程序蓝牙流程后调用，与`wx.openBluetoothAdapter`成对调用。\n   */\n  export function closeBluetoothAdapter(\n    object: _closeBluetoothAdapterObject\n  ): void;\n\n  /**\n   * 关闭 WebSocket 连接。\n   */\n  export function closeSocket(object: _closeSocketObject): void;\n\n  /**\n   * 创建一个 [WebSocket](https://developer.mozilla.org/zh-CN/docs/Web/API/WebSocket) 连接。**使用前请先阅读[说明](./api-network.md)**。\n   */\n  export function connectSocket(object: _connectSocketObject): void;\n\n  /**\n   * 连接 Wi-Fi。若已知 Wi-Fi 信息，可以直接利用该接口连接。仅 Android 与 iOS 11 以上版本支持。\n   */\n  export function connectWifi(object: _connectWifiObject): void;\n\n  /**\n   * 创建一个动画实例[animation](#animation)。调用实例的方法来描述动画。最后通过动画实例的`export`方法导出动画数据传递给组件的`animation`属性。\n   */\n  export function createAnimation(object: _createAnimationObject): void;\n\n  /**\n   * 创建并返回 audio 上下文 `audioContext` 对象。在自定义组件下，第二个参数传入组件实例this，以操作组件内 `<audio/>` 组件\n   */\n  export function createAudioContext(this: string, audioid: string): void;\n\n  /**\n   * 连接低功耗蓝牙设备。\n   */\n  export function createBLEConnection(object: _createBLEConnectionObject): void;\n\n  /**\n   * 创建并返回 camera 上下文 `cameraContext` 对象，`cameraContext` 与页面的 `camera` 组件绑定，一个页面只能有一个camera，通过它可以操作对应的 `<camera/>` 组件。\n   */\n  export function createCameraContext(this: string): void;\n\n  /**\n   * 创建 canvas 绘图上下文（指定 canvasId）。在自定义组件下，第二个参数传入组件实例this，以操作组件内 `<canvas/>` 组件\n   */\n  export function createCanvasContext(\n    this: string,\n    canvasid: string\n  ): CanvasContext;\n\n  /**\n   * 创建并返回绘图上下文。\n   */\n  export function createContext(): CanvasContext;\n\n  /**\n   * 创建并返回内部 audio 上下文 `innerAudioContext` 对象。\n   */\n  export function createInnerAudioContext(): void;\n\n  /**\n   * 操作对应的 `<live-player/>` 组件。\n   */\n  export function createLivePlayerContext(this: string, domid: string): void;\n\n  /**\n   * 创建并返回 `live-pusher` 上下文 `LivePusherContext` 对象，`LivePusherContext` 与页面的 `<live-pusher />` 组件绑定，一个页面只能有一个 `live-pusher`，通过它可以操作对应的 `<live-pusher/>` 组件。\n   */\n  export function createLivePusherContext(): void;\n\n  /**\n   * 创建并返回 map 上下文 `mapContext` 对象。在自定义组件下，第二个参数传入组件实例this，以操作组件内 `<map/>` 组件\n   */\n  export function createMapContext(this: string, mapid: string): void;\n\n  /**\n   * undefined\n   */\n  export function createSelectorQuery(): void;\n\n  /**\n   * 创建并返回 video 上下文 `videoContext` 对象。在自定义组件下，第二个参数传入组件实例this，以操作组件内 `<video/>` 组件\n   */\n  export function createVideoContext(this: string, videoid: string): void;\n\n  /**\n   * 下载文件资源到本地，客户端直接发起一个 HTTP GET 请求，返回文件的本地临时路径。\n   */\n  export function downloadFile(object: _downloadFileObject):_DownloadTask;\n\n  /**\n   * 蓝牙设备characteristic(特征值)信息\n   */\n  export function getBLEDeviceCharacteristics(\n    object: _getBLEDeviceCharacteristicsObject\n  ): void;\n\n  /**\n   * 获取蓝牙设备所有 service（服务）\n   */\n  export function getBLEDeviceServices(\n    object: _getBLEDeviceServicesObject\n  ): void;\n\n  /**\n   * 获取**全局唯一**的背景音频管理器 `backgroundAudioManager`。\n   */\n  export function getBackgroundAudioManager(): _getBackgroundAudioManagerReturnValue;\n\n  /**\n   * 获取后台音乐播放状态。\n   */\n  export function getBackgroundAudioPlayerState(\n    object: _getBackgroundAudioPlayerStateObject\n  ): void;\n\n  /**\n   * 获取所有已搜索到的`iBeacon`设备\n   */\n  export function getBeacons(object: _getBeaconsObject): void;\n\n  /**\n   * 获取本机蓝牙适配器状态\n   */\n  export function getBluetoothAdapterState(\n    object: _getBluetoothAdapterStateObject\n  ): void;\n\n  /**\n   * 获取在小程序蓝牙模块生效期间所有已发现的蓝牙设备，包括已经和本机处于连接状态的设备。\n   */\n  export function getBluetoothDevices(object: _getBluetoothDevicesObject): void;\n\n  /**\n   * 获取系统剪贴板内容\n   */\n  export function getClipboardData(object: _getClipboardDataObject): void;\n\n  /**\n   * 根据 uuid 获取处于已连接状态的设备\n   */\n  export function getConnectedBluetoothDevices(\n    object: _getConnectedBluetoothDevicesObject\n  ): void;\n\n  /**\n   * 获取已连接中的 Wi-Fi 信息\n   */\n  export function getConnectedWifi(object: _getConnectedWifiObject): void;\n\n  /**\n   * 获取第三方平台自定义的数据字段。\n   */\n  export function getExtConfig(object: _getExtConfigObject): void;\n\n  /**\n   * 获取第三方平台自定义的数据字段的同步接口。\n   */\n  export function getExtConfigSync(): _getExtConfigSyncReturnValue;\n\n  /**\n   * 获取文件信息\n   */\n  export function getFileInfo(object: _getFileInfoObject): void;\n\n  /**\n   * 判断当前设备是否支持 HCE 能力。\n   */\n  export function getHCEState(object: _getHCEStateObject): void;\n\n  /**\n   * 获取图片信息\n   */\n  export function getImageInfo(object: _getImageInfoObject): void;\n\n  /**\n   * 获取当前的地理位置、速度。当用户离开小程序后，此接口无法调用；当用户点击“显示在聊天顶部”时，此接口可继续调用。\n   */\n  export function getLocation(object: _getLocationObject): void;\n\n  /**\n   * 获取网络类型。\n   */\n  export function getNetworkType(object: _getNetworkTypeObject): void;\n\n  /**\n   * 获取微信替设备生成的唯一标识，用于判断设备是否更换。获取的数据为AES加密数据，需要自行解密。\n   */\n  export function getOpenDeviceId(object: _getOpenDeviceIdObject): void;\n\n  /**\n   * 获取**全局唯一**的录音管理器 `recorderManager`。\n   */\n  export function getRecorderManager(): void;\n\n  /**\n   * 获取本地文件的文件信息。此接口只能用于获取已保存到本地的文件，若需要获取临时文件信息，请使用 [wx.getFileInfo](./getFileInfo.md) 接口。\n   */\n  export function getSavedFileInfo(object: _getSavedFileInfoObject): void;\n\n  /**\n   * 获取本地已保存的文件列表\n   */\n  export function getSavedFileList(object: _getSavedFileListObject): void;\n\n  /**\n   * 获取屏幕亮度。\n   */\n  export function getScreenBrightness(object: _getScreenBrightnessObject): void;\n\n  /**\n   * 获取用户的当前设置。\n   */\n  export function getSetting(object: _getSettingObject): void;\n\n  /**\n   * 获取转发详细信息\n   */\n  export function getShareInfo(object: _getShareInfoObject): void;\n\n  /**\n   * 从本地缓存中异步获取指定 key 对应的内容。\n   */\n  export function getStorage(object: _getStorageObject): void;\n\n  /**\n   * 异步获取当前storage的相关信息\n   */\n  export function getStorageInfo(object: _getStorageInfoObject): void;\n\n  /**\n   * 同步获取当前storage的相关信息\n   */\n  export function getStorageInfoSync(): void;\n\n  /**\n   * 从本地缓存中同步获取指定 key 对应的内容。\n   */\n  export function getStorageSync(key: string): void;\n\n  /**\n   * 获取系统信息。\n   */\n  export function getSystemInfo(object: _getSystemInfoObject): void;\n\n  /**\n   * 获取系统信息同步接口\n   */\n  export function getSystemInfoSync(): _getSystemInfoSyncReturnValue;\n\n  /**\n   * 获取用户信息，withCredentials 为 true 时需要先调用 [wx.login](./api-login.md#wxloginobject) 接口。\n   */\n  export function getUserInfo(object: _getUserInfoObject): void;\n\n  /**\n   * 获取用户过去三十天微信运动步数，需要先调用 [wx.login](./api-login.md#wxloginobject) 接口。\n   */\n  export function getWeRunData(object: _getWeRunDataObject): void;\n\n  /**\n   * 请求获取 Wi-Fi 列表，在 `onGetWifiList` 注册的回调中返回 wifiList 数据。iOS 将跳转到系统的 Wi-Fi 界面，Android 不会跳转。\n   */\n  export function getWifiList(object: _getWifiListObject): void;\n\n  /**\n   * 隐藏 loading 提示框\n   */\n  export function hideLoading(): void;\n\n  /**\n   * 隐藏导航条加载动画。\n   */\n  export function hideNavigationBarLoading(): void;\n\n  /**\n   * 隐藏转发按钮\n   */\n  export function hideShareMenu(object: _hideShareMenuObject): void;\n\n  /**\n   * 隐藏 tabBar\n   */\n  export function hideTabBar(object: _hideTabBarObject): void;\n\n  /**\n   * 隐藏 tabBar 某一项的右上角的红点\n   */\n  export function hideTabBarRedDot(object: _hideTabBarRedDotObject): void;\n\n  /**\n   * 隐藏消息提示框\n   */\n  export function hideToast(): void;\n\n  /**\n   * 调用接口获取**登录凭证（token）**进而换取用户登录态信息，包括用户的**唯一标识（uid）**等。\n   */\n  export function login(object: _loginObject): void;\n\n  /**\n   * wx.makePhoneCall({\n   */\n  export function makePhoneCall(object: _makePhoneCallObject): void;\n\n  /**\n   * 调起 VoIP 音视频通话界面。\n   */\n  export function makeVoIPCall(object: _makeVoIPCallObject): void;\n\n  /**\n   * 关闭当前页面，返回上一页面或多级页面。可通过 [`getCurrentPages()`](../framework/app-service/page.md#getCurrentPages()) 获取当前的页面栈，决定需要返回几层。\n   */\n  export function navigateBack(object: _navigateBackObject): void;\n\n  /**\n   * 返回到上一个小程序，只有在当前小程序是被其他小程序打开时可以调用成功\n   */\n  export function navigateBackMiniProgram(\n    object: _navigateBackMiniProgramObject\n  ): void;\n\n  /**\n   * 保留当前页面，跳转到应用内的某个页面，使用`wx.navigateBack`可以返回到原页面。\n   */\n  export function navigateTo(object: _navigateToObject): void;\n\n  /**\n   * 打开同一公众号下关联的另一个小程序。**（注：必须是同一公众号下，而非同个 open 账号下）**\n   */\n  export function navigateToMiniProgram(\n    object: _navigateToMiniProgramObject\n  ): void;\n\n  /**\n   * 启用低功耗蓝牙设备特征值变化时的 notify 功能，订阅特征值。注意：必须设备的特征值支持`notify`或者`indicate`才可以成功调用，具体参照 characteristic 的 properties 属性\n   */\n  export function notifyBLECharacteristicValueChange(\n    object: _notifyBLECharacteristicValueChangeObject\n  ): void;\n\n  /**\n   * 监听加速度数据，频率：5次/秒，接口调用后会自动开始监听，可使用 `wx.stopAccelerometer` 停止监听。\n   */\n  export function onAccelerometerChange(\n    callback: (x,y,z) => void\n  ): void;\n\n  /**\n   * 监听低功耗蓝牙设备的特征值变化。必须先启用`notify`接口才能接收到设备推送的notification。\n   */\n  export function onBLECharacteristicValueChange(\n    callback: (result: _onBLECharacteristicValueChangeCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听低功耗蓝牙连接的错误事件，包括设备丢失，连接异常断开等等。\n   */\n  export function onBLEConnectionStateChange(\n    callback: (result: _onBLEConnectionStateChangeCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听音乐暂停。\n   */\n  export function onBackgroundAudioPause(callback: string): void;\n\n  /**\n   * 监听音乐播放。\n   */\n  export function onBackgroundAudioPlay(callback: string): void;\n\n  /**\n   * 监听音乐停止。\n   */\n  export function onBackgroundAudioStop(callback: string): void;\n\n  /**\n   * 监听 `iBeacon` 服务的状态变化\n   */\n  export function onBeaconServiceChange(\n    callback: (result: _onBeaconServiceChangeCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听 `iBeacon` 设备的更新事件\n   */\n  export function onBeaconUpdate(\n    callback: (result: _onBeaconUpdateCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听蓝牙适配器状态变化事件\n   */\n  export function onBluetoothAdapterStateChange(\n    callback: (result: _onBluetoothAdapterStateChangeCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听寻找到新设备的事件\n   */\n  export function onBluetoothDeviceFound(\n    callback: (result: _onBluetoothDeviceFoundCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听罗盘数据，频率：5次/秒，接口调用后会自动开始监听，可使用`wx.stopCompass`停止监听。\n   */\n  export function onCompassChange(\n    callback: (result: _onCompassChangeCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听需要评估连上的 Wi-Fi 的请求，在回调里必须返回 `confidence` 字段\n   */\n  export function onEvaluateWifi(\n    callback: (result: _onEvaluateWifiCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听在获取到 Wi-Fi 列表数据时的事件，在回调中将返回 wifiList。\n   */\n  export function onGetWifiList(\n    callback: (result: _onGetWifiListCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听 NFC 设备的消息回调，并在回调中处理。返回参数中 `messageType` 表示消息类型，目前有如下值：\n   */\n  export function onHCEMessage(\n    callback: (result: _onHCEMessageCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听网络状态变化。\n   */\n  export function onNetworkStatusChange(\n    callback: (result: _onNetworkStatusChangeCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听WebSocket关闭。\n   */\n  export function onSocketClose(callback: string): void;\n\n  /**\n   * 监听WebSocket错误。\n   */\n  export function onSocketError(callback: string): void;\n\n  /**\n   * 监听WebSocket接受到服务器的消息事件。\n   */\n  export function onSocketMessage(\n    callback: (result: _onSocketMessageCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听WebSocket连接打开事件。\n   */\n  export function onSocketOpen(callback: string): void;\n\n  /**\n   * 监听用户主动截屏事件，用户使用系统截屏按键截屏时触发此事件\n   */\n  export function onUserCaptureScreen(\n    callback: (result: _onUserCaptureScreenCallbackResult) => void\n  ): void;\n\n  /**\n   * 监听连接上 Wi-Fi 的事件。\n   */\n  export function onWifiConnected(\n    callback: (result: _onWifiConnectedCallbackResult) => void\n  ): void;\n\n  /**\n   * 初始化小程序蓝牙模块，生效周期为调用`wx.openBluetoothAdapter`至调用`wx.closeBluetoothAdapter`或小程序被销毁为止。\n   */\n  export function openBluetoothAdapter(\n    object: _openBluetoothAdapterObject\n  ): void;\n\n  /**\n   * 查看微信卡包中的卡券。\n   */\n  export function openCard(object: _openCardObject): void;\n\n  /**\n   * 新开页面打开文档，支持格式：doc, xls, ppt, pdf, docx, xlsx, pptx\n   */\n  export function openDocument(object: _openDocumentObject): void;\n\n  /**\n   * ​使用微信内置地图查看位置。\n   */\n  export function openLocation(object: _openLocationObject): void;\n\n  /**\n   * 调起客户端小程序设置界面，返回用户设置的操作结果。\n   */\n  export function openSetting(object: _openSettingObject): void;\n\n  /**\n   * 将页面滚动到目标位置。\n   */\n  export function pageScrollTo(object: _pageScrollToObject): void;\n\n  /**\n   * 暂停播放音乐。\n   */\n  export function pauseBackgroundAudio(): void;\n\n  /**\n   * 暂停正在播放的语音。再次调用wx.playVoice播放同一个文件时，会从暂停处开始播放。如果想从头开始播放，需要先调用 wx.stopVoice。\n   */\n  export function pauseVoice(): void;\n\n  /**\n   * 使用后台播放器播放音乐，对于微信客户端来说，只能同时有一个后台音乐在播放。当用户离开小程序后，音乐将暂停播放；当用户点击“显示在聊天顶部”时，音乐不会暂停播放；当用户在其他小程序占用了音乐播放器，原有小程序内的音乐将停止播放。\n   */\n  export function playBackgroundAudio(object: _playBackgroundAudioObject): void;\n\n  /**\n   * 开始播放语音，同时只允许一个语音文件正在播放，如果前一个语音文件还没播放完，将中断前一个语音播放。\n   */\n  export function playVoice(object: _playVoiceObject): void;\n\n  /**\n   * 预览图片。\n   */\n  export function previewImage(object: _previewImageObject): void;\n\n  /**\n   * 关闭所有页面，打开到应用内的某个页面。\n   */\n  export function reLaunch(object: _reLaunchObject): void;\n\n  /**\n   * 读取低功耗蓝牙设备的特征值的二进制数据值。注意：必须设备的特征值支持`read`才可以成功调用，具体参照 characteristic 的 properties 属性\n   */\n  export function readBLECharacteristicValue(\n    object: _readBLECharacteristicValueObject\n  ): void;\n\n  /**\n   * 关闭当前页面，跳转到应用内的某个页面。\n   */\n  export function redirectTo(object: _redirectToObject): void;\n\n  /**\n   * 删除本地存储的文件\n   */\n  export function removeSavedFile(object: _removeSavedFileObject): void;\n\n  /**\n   * 从本地缓存中异步移除指定 key 。\n   */\n  export function removeStorage(object: _removeStorageObject): void;\n\n  /**\n   * 从本地缓存中同步移除指定 key 。\n   */\n  export function removeStorageSync(key: string): void;\n\n  /**\n   * 移除 tabBar 某一项右上角的文本\n   */\n  export function removeTabBarBadge(object: _removeTabBarBadgeObject): void;\n\n  /**\n   * 自定义分析数据上报接口。使用前，需要在小程序管理后台自定义分析中新建事件，配置好事件名与字段。\n   */\n  export function reportAnalytics(eventname: string, data: string): void;\n\n  /**\n   * 发起网络请求。**使用前请先阅读[说明](./api-network.md)**。\n   */\n  export function request(object: _requestObject): void;\n\n\n  /**\n   * 保存文件到本地。**注意：saveFile 会把临时文件移动，因此调用成功后传入的 tempFilePath 将不可用**\n   */\n  export function saveFile(object: _saveFileObject): void;\n\n  /**\n   * 保存图片到系统相册。需要[用户授权](./authorize-index.md) scope.writePhotosAlbum\n   */\n  export function saveImageToPhotosAlbum(\n    object: _saveImageToPhotosAlbumObject\n  ): void;\n\n  /**\n   * 保存视频到系统相册。需要[用户授权](./authorize-index.md) scope.writePhotosAlbum\n   */\n  export function saveVideoToPhotosAlbum(\n    object: _saveVideoToPhotosAlbumObject\n  ): void;\n\n  /**\n   * 调起客户端扫码界面，扫码成功后返回对应的结果\n   */\n  export function scanCode(object: _scanCodeObject): void;\n\n  /**\n   * 控制音乐播放进度。\n   */\n  export function seekBackgroundAudio(object: _seekBackgroundAudioObject): void;\n\n  /**\n   * 发送 NFC 消息。仅在安卓系统下有效。\n   */\n  export function sendHCEMessage(object: _sendHCEMessageObject): void;\n\n  /**\n   * 通过 WebSocket 连接发送数据，需要先 [wx.connectSocket](#wxconnectsocketobject)，并在 [wx.onSocketOpen](#wxonsocketopencallback) 回调之后才能发送。\n   */\n  export function sendSocketMessage(object: _sendSocketMessageObject): void;\n\n  /**\n   * 设置系统剪贴板的内容\n   */\n  export function setClipboardData(object: _setClipboardDataObject): void;\n\n  /**\n   * 设置是否打开调试开关，此开关对正式版也能生效。\n   */\n  export function setEnableDebug(object: _setEnableDebugObject): void;\n\n  /**\n   * 设置是否保持常亮状态。仅在当前小程序生效，离开小程序后设置失效。\n   */\n  export function setKeepScreenOn(object: _setKeepScreenOnObject): void;\n\n  /**\n   * wx.setNavigationBarColor({\n   */\n  export function setNavigationBarColor(\n    object: _setNavigationBarColorObject\n  ): void;\n\n  /**\n   * 动态设置当前页面的标题。\n   */\n  export function setNavigationBarTitle(\n    object: _setNavigationBarTitleObject\n  ): void;\n\n  /**\n   * 设置屏幕亮度。\n   */\n  export function setScreenBrightness(object: _setScreenBrightnessObject): void;\n\n  /**\n   * 将数据存储在本地缓存中指定的 key 中，会覆盖掉原来该 key 对应的内容，这是一个异步接口。\n   */\n  export function setStorage(object: _setStorageObject): void;\n\n  /**\n   * 将 data 存储在本地缓存中指定的 key 中，会覆盖掉原来该 key 对应的内容，这是一个同步接口。\n   */\n  export function setStorageSync(key: string): void;\n\n  /**\n   * 为 tabBar 某一项的右上角添加文本\n   */\n  export function setTabBarBadge(object: _setTabBarBadgeObject): void;\n\n  /**\n   * 动态设置 tabBar 某一项的内容\n   */\n  export function setTabBarItem(object: _setTabBarItemObject): void;\n\n  /**\n   * 动态设置 tabBar 的整体样式\n   */\n  export function setTabBarStyle(object: _setTabBarStyleObject): void;\n\n  /**\n   * 动态设置置顶栏文字内容，只有当前小程序被置顶时能生效，如果当前小程序没有被置顶，也能调用成功，但是不会立即生效，只有在用户将这个小程序置顶后才换上设置的文字内容。**注意：调用成功后，需间隔 5s 才能再次调用此接口，如果在 5s 内再次调用此接口，会回调 fail，errMsg：\"setTopBarText: fail invoke too frequently\"**\n   */\n  export function setTopBarText(object: _setTopBarTextObject): void;\n\n  /**\n   * 在 `onGetWifiList` 回调后，利用接口设置 wifiList 中 AP 的相关信息。\n   */\n  export function setWifiList(object: _setWifiListObject): void;\n\n  /**\n   * ​显示操作菜单\n   */\n  export function showActionSheet(object: _showActionSheetObject): void;\n\n  /**\n   * 显示 loading 提示框, 需主动调用 [wx.hideLoading](#wxhideloading) 才能关闭提示框\n   */\n  export function showLoading(object: _showLoadingObject): void;\n\n  /**\n   * ​显示模态弹窗\n   */\n  export function showModal(object: _showModalObject): void;\n\n  /**\n   * 在当前页面显示导航条加载动画。\n   */\n  export function showNavigationBarLoading(): void;\n\n  /**\n   * 显示当前页面的转发按钮\n   */\n  export function showShareMenu(object: _showShareMenuObject): void;\n\n  /**\n   * 显示 tabBar\n   */\n  export function showTabBar(object: _showTabBarObject): void;\n\n  /**\n   * 显示 tabBar 某一项的右上角的红点\n   */\n  export function showTabBarRedDot(object: _showTabBarRedDotObject): void;\n\n  /**\n   * 显示消息提示框\n   */\n  export function showToast(object: _showToastObject): void;\n\n  /**\n   * 开始监听加速度数据。\n   */\n  export function startAccelerometer(object: _startAccelerometerObject): void;\n\n  /**\n   * 开始搜索附近的`iBeacon`设备\n   */\n  export function startBeaconDiscovery(\n    object: _startBeaconDiscoveryObject\n  ): void;\n\n  /**\n   * 开始搜寻附近的蓝牙外围设备。注意，该操作比较耗费系统资源，请在搜索并连接到设备后调用 stop 方法停止搜索。\n   */\n  export function startBluetoothDevicesDiscovery(\n    object: _startBluetoothDevicesDiscoveryObject\n  ): void;\n\n  /**\n   * 开始监听罗盘数据。\n   */\n  export function startCompass(object: _startCompassObject): void;\n\n  /**\n   * 初始化 NFC 模块。\n   */\n  export function startHCE(object: _startHCEObject): void;\n\n  /**\n   * 开始下拉刷新，调用后触发下拉刷新动画，效果与用户手动下拉刷新一致\n   */\n  export function startPullDownRefresh(\n    object: _startPullDownRefreshObject\n  ): void;\n\n  /**\n   * 开始录音。当主动调用`wx.stopRecord`，或者录音超过1分钟时自动结束录音，返回录音文件的临时文件路径。当用户离开小程序时，此接口无法调用。\n   */\n  export function startRecord(object: _startRecordObject): void;\n\n  /**\n   * 开始 SOTER 生物认证\n   */\n  export function startSoterAuthentication(\n    object: _startSoterAuthenticationObject\n  ): void;\n\n  /**\n   * 初始化 Wi-Fi 模块。\n   */\n  export function startWifi(object: _startWifiObject): void;\n\n  /**\n   * 停止监听加速度数据。\n   */\n  export function stopAccelerometer(object: _stopAccelerometerObject): void;\n\n  /**\n   * 停止播放音乐。\n   */\n  export function stopBackgroundAudio(): void;\n\n  /**\n   * 停止搜索附近的`iBeacon`设备\n   */\n  export function stopBeaconDiscovery(object: _stopBeaconDiscoveryObject): void;\n\n  /**\n   * 停止搜寻附近的蓝牙外围设备。若已经找到需要的蓝牙设备并不需要继续搜索时，建议调用该接口停止蓝牙搜索。\n   */\n  export function stopBluetoothDevicesDiscovery(\n    object: _stopBluetoothDevicesDiscoveryObject\n  ): void;\n\n  /**\n   * 停止监听罗盘数据。\n   */\n  export function stopCompass(object: _stopCompassObject): void;\n\n  /**\n   * 关闭 NFC 模块。仅在安卓系统下有效。\n   */\n  export function stopHCE(object: _stopHCEObject): void;\n\n  /**\n   * 停止当前页面下拉刷新。\n   */\n  export function stopPullDownRefresh(): void;\n\n  /**\n   * ​主动调用停止录音。\n   */\n  export function stopRecord(): void;\n\n  /**\n   * 结束播放语音。\n   */\n  export function stopVoice(): void;\n\n  /**\n   * 关闭 Wi-Fi 模块。\n   */\n  export function stopWifi(object: _stopWifiObject): void;\n\n  /**\n   * 跳转到 tabBar 页面，并关闭其他所有非 tabBar 页面\n   */\n  export function switchTab(object: _switchTabObject): void;\n\n  /**\n   * 更新转发属性\n   */\n  export function updateShareMenu(object: _updateShareMenuObject): void;\n\n  /**\n   * 将本地资源上传到开发者服务器，客户端发起一个 HTTPS POST 请求，其中 `content-type` 为 `multipart/form-data` 。**使用前请先阅读[说明](./api-network.md)**。\n   */\n  export function uploadFile(object: _uploadFileObject): void;\n\n  /**\n   * 使手机发生较长时间的振动（400ms）\n   */\n  export function vibrateLong(object: _vibrateLongObject): void;\n\n  /**\n   * 使手机发生较短时间的振动（15ms）\n   */\n  export function vibrateShort(object: _vibrateShortObject): void;\n\n  /***\n   * 监听主域发送的消息\n   */\n  export function onMessage(callback:Function):void;\n  /**\n   * 拉取当前用户所有同玩好友的托管数据。该接口只可在开放数据域下使用\n   */\n  export function getFriendCloudStorage(object):void;\n  /**\n   * 对用户托管数据进行写数据操作。允许同时写多组 KV 数据。\n   * @param object \n   */\n  export function setUserCloudStorage(object):void;\n  /**\n   * 向低功耗蓝牙设备特征值中写入二进制数据。注意：必须设备的特征值支持`write`才可以成功调用，具体参照 characteristic 的 properties 属性\n   */\n  export function writeBLECharacteristicValue(\n    object: _writeBLECharacteristicValueObject\n  ): void;\n  /**\n   * 获取一个对战对象\n   */\n  export function getBattle():_Battle;\n  /**\n   * 设置游戏加载进度页面。如果游戏加载起来后3秒内没有调用setLoadingProgress，会自动关闭游戏加载进度页面。为了用户体验统一，务必在游戏加载后第一时间调用setLoadingProgress({progress: 0})，随后再传回真实的加载进度。\n   */\n  export function setLoadingProgress(object:any):void;\n  /**\n   * 支持最低平台版本号'1031' (minPlatformVersion>='1031')\n   * 隐藏游戏加载进度页面\n   */\n  export function loadingComplete(object:any):void;\n  /**\n   * 发起微信支付。\n   */\n  export function requestPayment(object: _requestPaymentObject): void;\n  /**\n   * 发起支付。\n   */\n  export function pay(object: _requestPaymentObject): void;\n  /**\n   * 初始化广告服务，在应用生命周期中，只需要初始化一次，在这里可以指定是否打开广告组件 Log，传入分配的广告 AppId\n   */\n  export function initAdService(object:any):void;\n  /**\n   * 创建 Banner 广告组件，如果已经创建过 Banner 广告组件，则会使用已创建的广告组件对象\n   */\n  export function createBannerAd(object:any):_BannerAd;\n  /**\n   * **确保广告服务已经初始化完毕**\n   * 创建激励视频广告组件，同一个 posId，如果已经创建，并且未 destroy，会复用之前的对象\n   */\n  export function  createRewardedVideoAd(object:any):_VideoAd;\n  /**\n   * **确保广告服务已经初始化完毕**\n   * 创建插屏广告组件，同一个 posId，如果已经创建，并且未 destroy，会复用之前的对象\n   */\n  export function createInsertAd(object:any):_InsertAd;\n  /**\n   * **确保广告服务已经初始化完毕**\n   * 原生广告是 cp 通过封装好的接口获取广告数据，根据实际场景自由选择绘制和展示方式的广告，更加灵活。 需要注意的是，每个原生广告组件对象只有一次有效曝光，一次有效点击。 同一个 posId，如果已经创建，并且未 destroy，会复用之前的对象。\n   */\n  export function createNativeAd(object:any):_NativeAd;\n  /**\n   * 加载游戏子包。注意：主包或子包不能引用未加载的包中的模块。\n   */\n  export function loadSubpackage(object:any):_LoadSubpackageTask;\n  /**\n   * 文件系统是小游戏提供的一套以小游戏和用户维度隔离的存储以及一套相应的管理接口。cp 使用文件系统来保存数据不必关心数据实际保存在硬盘(或者光盘)的地址为多少的数据块上。只需记住这个文件的所属目录和文件名。通过 qg.getFileSystemManager() 获取全局唯一的文件管理器，返回的是 FileSystemManager 文件管理器对象,所有的文件系统的管理操作通过 FileSystemManager (文件管理器对象)来调用。\n   */\n  export function getFileSystemManager():_FileSystemManager;\n  /**\n   * 获取设备电量\n   */\n  export function getBatteryInfo(object:any):void;\n  /**\n   * getBatteryInfo() 的同步版本，获取设备电量。\n   */\n  export function getBatteryInfoSync(object:any):_BatteryInfo;\n   /**\n   * 监听音频中断结束，在收到 onAudioInterruptionBegin 事件之后，OPPO小游戏内所有音频会暂停，收到此事件之后才可再次播放成功\n   */\n  export function onAudioInterruptionEnd(callback:Function):void;\n  /**\n   * 取消监听音频中断结束，在收到 onAudioInterruptionBegin 事件之后，OPPO小游戏内所有音频会暂停，收到此事件之后才可再次播放成功\n   */\n  export function offAudioInterruptionEnd(callback:Function):void;\n  /**\n   * 监听音频因为受到系统占用而被中断开始，以下场景会触发此事件：闹钟、电话、FaceTime 通话。此事件触发后，OPPO小游戏内所有音频会暂停。\n   */\n  export function onAudioInterruptionBegin(callback:Function):void;\n  /**\n   * 取消监听音频因为受到系统占用而被中断开始，以下场景会触发此事件：闹钟、电话、FaceTime 通话。此事件触发后，OPPO小游戏内所有音频会暂停。\n   */\n  export function offAudioInterruptionBegin(callback:Function):void;\n  /**\n   * 监听全局错误事件\n   */\n  export function onError(callback:Function):void;\n  /**\n   * 取消监听全局错误事件\n   */\n  export function offError(callback:Function):void;\n  /**\n   * 退出当前 OPPO 小游戏\n   */\n  export function exitApplication(object:any):void;\n  /**\n   * 返回 OPPO 小游戏启动参数\n   */\n  export function getLaunchOptionsSync():any;\n  /**\n   * 监听 OPPO 小游戏隐藏到后台事件。锁屏、按 HOME 键退到桌面等操作会触发此事件。\n   */\n  export function onHide(callback:Function):any;\n  /**\n   * 取消监听 OPPO 小游戏隐藏到后台事件。锁屏、按 HOME 键退到桌面、显示在聊天顶部等操作会触发此事件。\n   */\n  export function offHide(callback:Function):any;\n  /**\n   * 监听 OPPO 小游戏回到前台的事件\n   */\n  export function onShow(callback:Function):any;\n  /**\n   * 取消监听 OPPO 小游戏回到前台的事件\n   */\n  export function offShow(callback:Function):any;\n  /** \n   * 获取性能管理器\n   */\n  export function getPerformance():any;\n  /**\n   * 加快触发 JavaScript VM 进行（垃圾回收），GC 时机是由 JavaScript VM 来控制的，并不能保证调用后马上触发 GC。\n   */\n  export function triggerGC():void;\n  /**\n   * 获取一行文本的行高\n   */\n  export function getTextLineHeight(object:any):void;\n\n}\n\n"
  },
  {
    "path": "src/app.js",
    "content": "import './ui/laya.patch.js';\nimport './ui/runtime.js';\nimport './ui/pluginFunction.js'\nimport './ui/promisesLaya.js'\nimport './ui/layaUI.max.all.js';\nimport UIManager from './ui/uiManager.js';\nimport * as utils from './functions/util.js';\n\nglobalThis.UIManager =\n    globalThis.UI =\n    UIManager;\n\nglobalThis.$_ = utils;\n\nglobalThis.goto = async tag => {\n    let url;\n    switch (tag) {\n        case 'github': url = 'https://github.com/VickScarlet/lifeRestart'; break;\n        case 'discord': url = 'https://discord.gg/U3qrf49NMQ'; break;\n        case 'sponsor_afd': url = 'https://afdian.com/a/LifeRestart'; break;\n        case 'sponsor_ddf': url = 'https://dun.mianbaoduo.com/@vickscarlet'; break;\n    }\n    try {\n        if (Laya.Browser.onIOS) {\n            window.location.href = url;\n        } else {\n            window.open(url, '_blank');\n        }\n    } catch (error) {\n        console.error(error);\n    }\n}\nclass App {\n    constructor() {\n        this.name = 'lifeRestart';\n        this.version = '2.0.0';\n        console.log(`${this.name} ${this.version}`);\n    }\n\n    #language;\n    static languages = {\n        'zh-cn': 'zh-cn',\n        'en-us': 'en-us',\n    };\n\n    #initLaya() {\n        /**\n        *...特殊的字符，如泰文，必须重新实现这个类\n        */\n        //class laya.webgl.text.CharSegment\n        class CharSegment {\n            constructor() {\n                this._sourceStr = null;\n            }\n            textToSpit(str) {\n                this._sourceStr = str;\n                var texLen = str.length;\n                var idx = -1;\n                this._words = [];\n                while (++idx < texLen) {\n                    var character = str.charAt(idx);\n                    var code = str.charCodeAt(idx);\n                    if (code >= 0xD800 && code <= 0xDBFF) {\n                        this._words.push(character + str.charAt(++idx));\n                    } else {\n                        this._words.push(character);\n                    }\n                }\n            }\n            getChar(i) {\n                return this._words;\n            }\n            getCharCode(i) {\n                return this._words[i].codePointAt(0);\n            }\n            length() {\n                return this._words.length;\n            }\n        }\n        Laya.class(CharSegment, 'laya.webgl.text.CharSegment');\n        Laya.imps(CharSegment.prototype, { \"laya.webgl.text.ICharSegment\": true })\n\n\n        // Laya.init(1125, 2436, Laya.WebGL);\n        Laya.Config.isAntialias = true;\n        Laya.init(...this.#fitScreen, Laya.WebGL);\n\n        Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE;\n        Laya.stage.alignH = Laya.Stage.ALIGN_CENTER;\n\n        Laya.stage.scaleMode = \"showall\";\n        Laya.stage.bgColor = \"#000000\";\n        window.onresize = () => Laya.stage.size(...this.#fitScreen);\n    }\n\n    get #fitScreen() {\n        const designWidth = 1125;\n        const designHeight = 2436;\n        const maxWidth = designHeight * 3 / 4;\n        const maxHeight = designWidth * 24 / 9;\n        const designRatio = designWidth / designHeight;\n\n        const screenWidth = window.innerWidth;\n        const screenHeight = window.innerHeight;\n        const screenRatio = screenWidth / screenHeight;\n        if (screenRatio > designRatio) {\n            return [\n                Math.min(screenWidth * designHeight / screenHeight, maxWidth),\n                designHeight\n            ]\n        } else {\n            return [\n                designWidth,\n                Math.min(screenHeight * designWidth / screenWidth, maxHeight)\n            ]\n        }\n    }\n\n    async setLanguage(language) {\n        return this.#setLanguage(language);\n    }\n\n    async #setLanguage(language) {\n        switch (language) {\n            case App.languages['en-us']:\n            case App.languages['zh-cn']:\n                this.#language = language;\n                break;\n            default:\n                this.#language = App.languages['zh-cn'];\n                break;\n        }\n        globalThis.$lang =\n            Laya.Text.langPacks =\n            (await import(`./i18n/${this.#language}.js`)).default;\n    }\n\n    resigterEvent() {\n        $$on('achievement', achievement => {\n            $ui.popup(UI.popups.ACHIEVEMENT, { achievement });\n        })\n        $$on('message', ([message, ...args]) => {\n            if (Array.isArray(message)) {\n                message = message.map(([m, ...a]) => $_.format($lang[m], ...a)).join('\\n');\n            } else {\n                message = $_.format(\n                    $lang[message], ...args\n                );\n            }\n            $ui.popup(UI.popups.MESSAGE, { message });\n        })\n    }\n\n    async start({\n        language = App.languages['zh-cn'],\n        theme = 'default',\n    }) {\n        this.resigterEvent();\n        this.#initLaya();\n        globalThis.$ui = UIManager.getInstance();\n\n        if (theme == 'default') {\n            theme = localStorage.getItem('theme') || 'default';\n        }\n\n        $ui.theme = theme;\n        await this.#setLanguage(language);\n        await $ui.setLoading(UI.pages.LOADING);\n        await $ui.switchView(UI.pages.LOADING);\n        await core.initial(\n            dataSet => Laya.promises.loader.load(`data/${this.#language}/${dataSet}.json`, null, Laya.Loader.JSON),\n            dataSet => Laya.promises.loader.load(`data/${dataSet}.json`, null, Laya.Loader.JSON),\n        );\n        await $ui.switchView(UI.pages.MAIN);\n\n    }\n}\n\nexport default App;\n"
  },
  {
    "path": "src/functions/condition.js",
    "content": "function parseCondition(condition) {\n\n    const conditions = [];\n    const length = condition.length;\n    const stack = [];\n    stack.unshift(conditions);\n    let cursor = 0;\n    const catchString = i => {\n        const str = condition.substring(cursor, i).trim();\n        cursor = i;\n        if(str) stack[0].push(str);\n    };\n\n    for(let i=0; i<length; i++) {\n        switch(condition[i]) {\n            case ' ': continue;\n\n            case '(':\n                catchString(i);\n                cursor ++;\n                const sub = [];\n                stack[0].push(sub);\n                stack.unshift(sub);\n                break;\n\n            case ')':\n                catchString(i);\n                cursor ++;\n                stack.shift();\n                break;\n\n            case '|':\n            case '&':\n                catchString(i);\n                catchString(i+1);\n                break;\n            default: continue;\n        }\n    }\n\n    catchString(length);\n\n    return conditions;\n}\n\nexport function checkCondition(property, condition) {\n    const conditions = parseCondition(condition);\n    return checkParsedConditions(property, conditions);\n}\n\nfunction checkParsedConditions(property, conditions) {\n    if(!Array.isArray(conditions)) return checkProp(property, conditions);\n    if(conditions.length == 0) return true;\n    if(conditions.length == 1) return checkParsedConditions(property, conditions[0]);\n\n    let ret = checkParsedConditions(property, conditions[0]);\n    for(let i=1; i<conditions.length; i+=2) {\n        switch(conditions[i]) {\n            case '&':\n                if(ret) ret = checkParsedConditions(property, conditions[i+1]);\n                break;\n            case '|':\n                if(ret) return true;\n                ret = checkParsedConditions(property, conditions[i+1]);\n                break;\n            default: return false;\n        }\n    }\n    return ret;\n}\n\nfunction checkProp(property, condition) {\n\n    const length = condition.length;\n    let i = condition.search(/[><\\!\\?=]/);\n\n    const prop = condition.substring(0,i);\n    const symbol = condition.substring(i, i+=(condition[i+1]=='='?2:1));\n    const d = condition.substring(i, length);\n\n    const propData = property.get(prop);\n    const conditionData = d[0]=='['? JSON.parse(d): Number(d);\n\n    switch(symbol) {\n        case '>':  return propData >  conditionData;\n        case '<':  return propData <  conditionData;\n        case '>=': return propData >= conditionData;\n        case '<=': return propData <= conditionData;\n        case '=':\n            if(Array.isArray(propData))\n                return propData.includes(conditionData);\n            return propData == conditionData;\n        case '!=':\n            if(Array.isArray(propData))\n                return !propData.includes(conditionData);\n            return propData != conditionData;\n        case '?':\n            if(Array.isArray(propData)) {\n                for(const p of propData)\n                    if(conditionData.includes(p)) return true;\n                return false;\n            }\n            return conditionData.includes(propData);\n        case '!':\n            if(Array.isArray(propData)) {\n                for(const p of propData)\n                    if(conditionData.includes(p)) return false;\n                return true;\n            }\n            return !conditionData.includes(propData);\n\n        default: return false;\n    }\n}\n\nexport function extractMaxTriggers(condition) {\n    // Assuming only age related talents can be triggered multiple times.\n    const RE_AGE_CONDITION = /AGE\\?\\[([0-9\\,]+)\\]/;\n    const match_object = RE_AGE_CONDITION.exec(condition);\n    if (match_object == null) {\n        // Not age related, single trigger.\n        return 1;\n    }\n\n    const age_list = match_object[1].split(\",\");\n    return age_list.length;\n}"
  },
  {
    "path": "src/functions/condition.spec.js",
    "content": "import { expect, test, describe } from 'vitest'\nimport { checkCondition } from './condition'\n\nfunction withProp(prop) {\n    const p = {\n        get(key) {\n            return prop[key]\n        },\n    }\n    return condition => checkCondition(p, condition)\n}\n\ndescribe('condition', () => {\n    const check = withProp({\n        n1: 0,\n        n2: -10,\n        n3: 10,\n        nl1: [1, 2, 3],\n        nl2: [0],\n        nl3: [],\n    })\n    test('gt(>)', () => {\n        expect(check('n3>11')).toBe(false)\n        expect(check('n3>10')).toBe(false)\n        expect(check('n3>9')).toBe(true)\n    })\n    test('gte(>=)', () => {\n        expect(check('n3>=11')).toBe(false)\n        expect(check('n3>=10')).toBe(true)\n        expect(check('n3>=9')).toBe(true)\n    })\n    test('lt(<)', () => {\n        expect(check('n3<9')).toBe(false)\n        expect(check('n3<10')).toBe(false)\n        expect(check('n3<11')).toBe(true)\n    })\n    test('lte(<=)', () => {\n        expect(check('n3<=9')).toBe(false)\n        expect(check('n3<=10')).toBe(true)\n        expect(check('n3<=11')).toBe(true)\n    })\n    test('eq(=)', () => {\n        expect(check('n3=9')).toBe(false)\n        expect(check('n3=10')).toBe(true)\n        expect(check('n3=11')).toBe(false)\n        expect(check('nl1=0')).toBe(false)\n        expect(check('nl1=1')).toBe(true)\n        expect(check('nl1=2')).toBe(true)\n        expect(check('nl1=3')).toBe(true)\n    })\n    test('ne(!=)', () => {\n        expect(check('n3!=9')).toBe(true)\n        expect(check('n3!=10')).toBe(false)\n        expect(check('n3!=11')).toBe(true)\n        expect(check('nl1!=0')).toBe(true)\n        expect(check('nl1!=1')).toBe(false)\n        expect(check('nl1!=2')).toBe(false)\n        expect(check('nl1!=3')).toBe(false)\n    })\n    test('in(?)', () => {\n        expect(check('n3?[1,2,3]')).toBe(false)\n        expect(check('n3?[10,11,12]')).toBe(true)\n        expect(check('nl1?[0,1]')).toBe(true)\n        expect(check('nl2?[1,2,3]')).toBe(false)\n        expect(check('nl3?[1,2,3]')).toBe(false)\n        expect(check('nl2?[]')).toBe(false)\n        expect(check('nl3?[]')).toBe(false)\n    })\n    test('notin(!)', () => {\n        expect(check('n3![1,2,3]')).toBe(true)\n        expect(check('n3![10,11,12]')).toBe(false)\n        expect(check('nl1![0,1]')).toBe(false)\n        expect(check('nl2![1,2,3]')).toBe(true)\n        expect(check('nl3![1,2,3]')).toBe(true)\n        expect(check('nl2![]')).toBe(true)\n        expect(check('nl3![]')).toBe(true)\n    })\n    test('and(&)', () => {\n        expect(check('n1>=0&n2<0')).toBe(true)\n        expect(check('n2>0&n3>0')).toBe(false)\n        expect(check('n2<0&n3<0')).toBe(false)\n        expect(check('n2<0&n3>0')).toBe(true)\n        expect(check('n1=0&n2<0&n3>0')).toBe(true)\n        expect(check('n1=0&n2>0&n3>0')).toBe(false)\n    })\n    test('or(|)', () => {\n        expect(check('n1>=0|n2<0')).toBe(true)\n        expect(check('n2>0|n3>0')).toBe(true)\n        expect(check('n2<0|n3<0')).toBe(true)\n        expect(check('n2<0|n3>0')).toBe(true)\n        expect(check('n2>0|n3<0')).toBe(false)\n        expect(check('n1=0|n2<0|n3>0')).toBe(true)\n        expect(check('n1=0|n2>0|n3>0')).toBe(true)\n        expect(check('n1!=0|n2>0|n3<0')).toBe(false)\n    })\n    test('mix', () => {\n        expect(check('(n1=0|n2<0|n3>0)&(n1=0|n2>0|n3>0)')).toBe(true)\n        expect(check('(n1=0|n2<0|n3>0)&(n1!=0|n2>0|n3<0)')).toBe(false)\n        expect(check('n1=0|n2<0|n3>0&n1!=0|n2>0|n3<0')).toBe(true)\n        expect(check('(n1>0|n1?[-10,0])&(n2>0|n3![0,1])')).toBe(true)\n        expect(check('(n1>0&n1?[-10,0])|(n2<0&n3![0,1])')).toBe(true)\n    })\n})\n"
  },
  {
    "path": "src/functions/util.js",
    "content": "function clone(value) {\n    switch(typeof value) {\n        case 'object':\n            if(value === null) return null;\n            if(Array.isArray(value)) return value.map(v=>clone(v));\n            const newObj = {};\n            for(const key in value) newObj[key] = clone(value[key]);\n            return newObj;\n        default: return value;\n    }\n}\n\nfunction max(...arr) {\n    return Math.max(...arr.flat());\n}\n\nfunction min(...arr) {\n    return Math.min(...arr.flat());\n}\n\nfunction sum(...arr) {\n    let s = 0;\n    arr.flat().forEach(v=>s+=v);\n    return s;\n}\n\nfunction average(...arr) {\n    const s = sum(...arr);\n    return s / arr.flat().length;\n}\n\nfunction weightRandom(list) {\n    let totalWeights = 0;\n    for(const [, weight] of list)\n        totalWeights += weight;\n\n    let random = Math.random() * totalWeights;\n    for(const [id, weight] of list)\n        if((random-=weight)<0)\n            return id;\n    return list[list.length-1];\n}\n\nfunction listRandom(list) {\n    return list[Math.floor(Math.random() * list.length)];\n}\n\nfunction getListValuesMap(list, fn) {\n    const map = {};\n    list.forEach(key=>map[key] = fn(key));\n    return map;\n}\n\nfunction mapConvert(map, fn) {\n    for(const key in map)\n        map[key] = fn(key, map[key]);\n}\n\nfunction getConvertedMap(map, fn) {\n    const newMap = {};\n    for(const key in map)\n        newMap[key] = fn(key, map[key]);\n    return newMap;\n}\n\nfunction mapSet(target, source) {\n    for(const key in source)\n        target[key] = source[key];\n}\n\nfunction deepMapSet(target, source) {\n    for(const key in source) {\n        let value = source[key];\n        switch(typeof value) {\n            case 'function': value = value();\n            case 'object':\n                if(!Array.isArray(value)) {\n                    deepMapSet(target[key], value);\n                    break;\n                }\n            default: target[key] = value;\n        }\n    }\n    return target;\n}\n\nfunction deepGet(obj, path) {\n    for(const key of path.split('.')) {\n        if(!(key in obj)) return undefined;\n        obj = obj[key];\n    }\n    return obj;\n}\n\nfunction format(str, ...args) {\n    const replace = set => (match, key) => {\n        const value = deepGet(set, key);\n        switch(typeof value) {\n            case 'object': return JSON.stringify(value);\n            case 'boolean':\n            case 'number':\n            case 'string': return value;\n            default: return value?.toString?.() || match;\n        }\n    };\n\n    switch(args.length) {\n        case 0: return str;\n        case 1:\n            if (typeof(args[0]) != \"object\") break;\n            return str.replace(/{(.+?)}/g, replace(args[0]));\n    }\n    return str.replace(/{(\\d+)}/g, replace(args));\n}\n\nexport { clone, max, min, sum, average, weightRandom, listRandom, getListValuesMap, mapConvert, getConvertedMap, mapSet, deepMapSet, format };"
  },
  {
    "path": "src/i18n/en-us.js",
    "content": "export default ({\n    UI_Next: 'Next',\n    UI_Back: 'Back',\n    UI_Skip: 'Skip',\n    UI_Done: 'Done',\n    UI_Cancel: 'Cancel',\n    UI_Confirm: 'Confirm',\n    UI_Retry: 'Retry',\n    UI_Yes: 'Yes',\n    UI_No: 'No',\n    UI_OK: 'OK',\n    UI_Close: 'Close',\n    UI_Open: 'Open',\n    UI_Search: 'Search',\n    UI_Loading: 'Now Loading',\n    UI_Error: 'Error',\n\n    UI_Colon: ':',\n    UI_Times: 'Times',\n    UI_Count: '',\n\n    UI_Property_Charm: 'CHR',\n    UI_Property_Intelligence: 'INT',\n    UI_Property_Strength: 'STR',\n    UI_Property_Money: 'MNY',\n    UI_Property_Spirit: 'SPR',\n\n    UI_Title_Remake: 'Remake Simulate',\n    UI_Title_Subsequent: 'The rubbish life doesn\\'t want to stay for a second',\n    UI_Remake: '↻Remake Now',\n    UI_Thanks: 'Thx',\n    UI_Achievement: 'Achv',\n    UI_Cyber_Theme_Art_Design: 'UI Design by 晰晰',\n    UI_Banner: '作者的新作《纸上谈亲》已上线小程序\\n微信/抖音搜索“纸上谈亲”即可游玩～',\n\n    UI_Title_Talent: 'Talent Draw',\n    UI_Talent_Draw: '!10 Pulls!',\n    UI_Talent_Select_Uncomplete: 'Choose 3 Talents, Please.',\n\n    UI_Title_Property: 'Property Allocate',\n    UI_Left_Property_Point: 'Left Property Point',\n    UI_Selected_Talent: 'Selected Talent',\n    UI_Random_Allocate: 'Random Allocate',\n    UI_Make_New_Life: 'Make New Life',\n\n    UI_Manual: 'Manual',\n    UI_Auto: 'Auto',\n\n    UI_Goto_Summary: 'Goto Summary',\n    UI_Title_Summary: 'Life Summary',\n    UI_Talent_Extend: 'Talent, You can choose one to extend',\n    UI_Remake_Again: 'Remake Again',\n\n    UI_Final_Age: 'Age',\n    UI_Total_Judge: 'Judge',\n\n    UI_Achievement_Count: 'Achievement',\n    UI_Remake_Times: 'Remake Times',\n    UI_Event_Collection_Rate: 'Event Collection',\n    UI_Talent_Collection_Rate: 'Talent Collection',\n    UI_Statistics: 'Statistics',\n    UI_Rank: 'Rank',\n\n    UI_Achievement_Achieve: 'Achievement',\n\n    UI_Judge_Level_0: 'Hell', // 地狱\n    UI_Judge_Level_1: 'Worse', // 折磨\n    UI_Judge_Level_2: 'Bad', // 不佳\n    UI_Judge_Level_3: 'Normal', // 普通\n    UI_Judge_Level_4: 'Good', // 优秀\n    UI_Judge_Level_5: 'Great', // 罕见\n    UI_Judge_Level_6: 'Excellent', // 逆天\n    UI_Judge_Level_7: 'Perfect', // 传说\n\n    UI_Spirit_Judge_Level_0: 'Hell', // 地狱\n    UI_Spirit_Judge_Level_1: 'Tortured', // 折磨\n    UI_Spirit_Judge_Level_2: 'Unlucky', // 不幸\n    UI_Spirit_Judge_Level_3: 'Normal', // 普通\n    UI_Spirit_Judge_Level_4: 'Happy', // 幸福\n    UI_Spirit_Judge_Level_5: 'Blissful ', // 极乐\n    UI_Spirit_Judge_Level_6: 'Paradise', // 天命\n\n    UI_AGE_Judge_Level_0: 'Stillborn', // 胎死腹中\n    UI_AGE_Judge_Level_1: 'Early', // 早夭\n    UI_AGE_Judge_Level_2: 'Young', // 少年\n    UI_AGE_Judge_Level_3: 'Heyday', // 盛年\n    UI_AGE_Judge_Level_4: 'Middle', // 中年\n    UI_AGE_Judge_Level_5: 'Sexagenarian', // 花甲\n    UI_AGE_Judge_Level_6: 'Septuagenarian', // 古稀\n    UI_AGE_Judge_Level_7: 'Octogenarian', // 杖朝\n    UI_AGE_Judge_Level_8: 'Nonagenarian', // 南山\n    UI_AGE_Judge_Level_9: '不老', // 不老\n    UI_AGE_Judge_Level_10: '修仙', // 修仙\n    UI_AGE_Judge_Level_11: '仙寿', // 仙寿\n\n    UI_Intelligence_Judge_Level_7: '识海',\n    UI_Intelligence_Judge_Level_8: '元神',\n    UI_Intelligence_Judge_Level_9: '仙魂',\n\n    UI_Strength_Judge_Level_7: '凝气',\n    UI_Strength_Judge_Level_8: '筑基',\n    UI_Strength_Judge_Level_9: '金丹',\n    UI_Strength_Judge_Level_10: '元婴',\n    UI_Strength_Judge_Level_11: '仙体',\n\n    UI_Remake_Times_Judge_Level_0: 'Purple rate constant',\n    UI_Remake_Times_Judge_Level_1: 'Purple rate double',\n    UI_Remake_Times_Judge_Level_2: 'Purple rate triple',\n    UI_Remake_Times_Judge_Level_3: 'Purple rate Quadruple',\n    UI_Remake_Times_Judge_Level_4: 'Purple rate Quintuple',\n    UI_Remake_Times_Judge_Level_5: 'Purple rate Sextuple',\n\n    UI_Achievement_Count_Judge_Level_0: 'Orange rate constant',\n    UI_Achievement_Count_Judge_Level_1: 'Orange rate double',\n    UI_Achievement_Count_Judge_Level_2: 'Orange rate triple',\n    UI_Achievement_Count_Judge_Level_3: 'Orange rate Quadruple',\n    UI_Achievement_Count_Judge_Level_4: 'Orange rate Quintuple',\n    UI_Achievement_Count_Judge_Level_5: 'Orange rate Sextuple',\n\n    UI_Support_Programmer: 'Programmer',\n    UI_Support_Designer: 'Designer',\n\n    UI_Save: 'Save',\n    UI_Load: 'Load',\n    UI_Read: 'Copy',\n    UI_Write: 'Paste',\n\n    UI_CopySuccess: 'Copy to clipboard success',\n    UI_CopyFailed: 'Copy to clipboard Failed',\n\n    UI_PasteSuccessDecodeSuccess: 'Load Success!',\n    UI_PasteSuccessDecodeFailed: 'Paste success, but load Failed!',\n    UI_PasteFailedDecodeSuccess: 'Paste Failed, use input load success!',\n    UI_PasteFailedDecodeFailed: 'Paste Failed, use input load Failed!',\n\n    UI_LoadSuccess: 'Load Success!',\n    UI_LoadFailed: 'Load Failed!',\n\n    UI_Title_Celebrity: 'Past life was...',\n    UI_CustomMode: 'Custom',\n    UI_CustomModeDescription: '10 Talent\\nCustom property',\n    UI_CelebrityMode: 'Celebrity',\n    UI_CelebrityModeDescription: 'Past life is celebrity\\nRebirth to modern',\n    UI_AllNot: '↻All Not',\n    UI_UniqueWaTaShi: 'Unique of mine',\n    UI_UniqueWaTaShiContent: '\\nUnique character card different from other 60 million player\\nAll property, All talent, All random\\nAll has only one chance',\n    UI_GenerateNow: 'Generate Now',\n\n\n    M_NoRank: 'There is no rank',\n    M_PleaseSelectOne: 'Please Select One',\n    M_UnGenerate: 'Unique Character no generate',\n    M_DisableExtendTalent: 'Celebrity mode can\\'t extends talent',\n\n    F_RemakeTimes: 'Remake {0} Times',\n    F_AchievementCount: 'Achievement {0}',\n    F_TalentSelection: '{name} ({description})',\n    F_TalentConflict: 'Conflict with talent ({0})',\n    F_TalentSelectLimit: 'Talent select limit {0}',\n    F_TalentSelectNotComplect: 'Please select {0} talent',\n    F_PropertyPointLeft: 'You have left {0} property point',\n    F_TalentReplace: 'Talent replace [{source.name}] -> [{target.name}]',\n    F_PropertyStr: 'CHR{CHR} INT{INT} STR{STR} MNY{MNY}'\n});"
  },
  {
    "path": "src/i18n/zh-cn.js",
    "content": "export default ({\n    UI_Next: '下一步',\n    UI_Back: '返回',\n    UI_Skip: '跳过',\n    UI_Done: '完成',\n    UI_Cancel: '取消',\n    UI_Confirm: '确认',\n    UI_Retry: '重试',\n    UI_Yes: '是',\n    UI_No: '否',\n    UI_OK: '确定',\n    UI_Close: '关闭',\n    UI_Open: '打开',\n    UI_Search: '搜索',\n    UI_Loading: '加载中...',\n    UI_Error: '错误',\n\n    UI_BackupBtn: '上面没有效果就试试这个吧',\n\n    UI_Colon: '：',\n    UI_Times: '次',\n    UI_Count: '个',\n\n    UI_Property_Charm: '颜值',\n    UI_Property_Intelligence: '智力',\n    UI_Property_Strength: '体质',\n    UI_Property_Money: '家境',\n    UI_Property_Spirit: '快乐',\n\n    UI_Title_Remake: '人生重开模拟器',\n    UI_Title_Subsequent: '这垃圾人生一秒也不想待了',\n    UI_Remake: '↻立即重开',\n    UI_Thanks: '感谢',\n    UI_Achievement: '成就',\n    UI_Cyber_Theme_Art_Design: 'UI 设计 by 晰晰',\n    UI_Banner: '作者的新作《纸上谈亲》已上线小程序\\n微信/抖音搜索“纸上谈亲”即可游玩～',\n\n    UI_Title_Talent: '天赋抽卡',\n    UI_Talent_Draw: '10连抽！',\n    UI_Talent_Select_Uncomplete: '请选取 3 个天赋',\n\n    UI_Title_Property: '调整初始属性',\n    UI_Left_Property_Point: '剩余属性点',\n    UI_Selected_Talent: '已选天赋',\n    UI_Random_Allocate: '随机分配',\n    UI_Make_New_Life: '开始新人生',\n\n    UI_Manual: '手动',\n    UI_Auto: '自动',\n\n    UI_Goto_Summary: '人生总结',\n    UI_Title_Summary: '人生总结',\n    UI_Talent_Extend: '天赋：你可以选择一个，下辈子还能抽到',\n    UI_Remake_Again: '再次重开',\n\n    UI_Final_Age: '享年',\n    UI_Total_Judge: '总评',\n\n    UI_Achievement_Count: '获得成就',\n    UI_Remake_Times: '重开次数',\n    UI_Event_Collection_Rate: '事件收集率',\n    UI_Talent_Collection_Rate: '天赋收集率',\n    UI_Statistics: '统计',\n    UI_Rank: '排行榜',\n\n    UI_Achievement_Achieve: '获得成就',\n\n    UI_Judge_Level_0: '地狱',\n    UI_Judge_Level_1: '折磨',\n    UI_Judge_Level_2: '不佳',\n    UI_Judge_Level_3: '普通',\n    UI_Judge_Level_4: '优秀',\n    UI_Judge_Level_5: '罕见',\n    UI_Judge_Level_6: '逆天',\n    UI_Judge_Level_7: '传说',\n\n    UI_Spirit_Judge_Level_0: '地狱',\n    UI_Spirit_Judge_Level_1: '折磨',\n    UI_Spirit_Judge_Level_2: '不幸',\n    UI_Spirit_Judge_Level_3: '普通',\n    UI_Spirit_Judge_Level_4: '幸福',\n    UI_Spirit_Judge_Level_5: '极乐',\n    UI_Spirit_Judge_Level_6: '天命',\n\n    UI_AGE_Judge_Level_0: '胎死腹中',\n    UI_AGE_Judge_Level_1: '早夭',\n    UI_AGE_Judge_Level_2: '少年',\n    UI_AGE_Judge_Level_3: '盛年',\n    UI_AGE_Judge_Level_4: '中年',\n    UI_AGE_Judge_Level_5: '花甲',\n    UI_AGE_Judge_Level_6: '古稀',\n    UI_AGE_Judge_Level_7: '杖朝',\n    UI_AGE_Judge_Level_8: '南山',\n    UI_AGE_Judge_Level_9: '不老',\n    UI_AGE_Judge_Level_10: '修仙',\n    UI_AGE_Judge_Level_11: '仙寿',\n\n    UI_Intelligence_Judge_Level_7: '识海',\n    UI_Intelligence_Judge_Level_8: '元神',\n    UI_Intelligence_Judge_Level_9: '仙魂',\n\n    UI_Strength_Judge_Level_7: '凝气',\n    UI_Strength_Judge_Level_8: '筑基',\n    UI_Strength_Judge_Level_9: '金丹',\n    UI_Strength_Judge_Level_10: '元婴',\n    UI_Strength_Judge_Level_11: '仙体',\n\n    UI_Remake_Times_Judge_Level_0: '抽到紫色概率不变',\n    UI_Remake_Times_Judge_Level_1: '抽到紫色概率翻倍',\n    UI_Remake_Times_Judge_Level_2: '抽到紫色概率三倍',\n    UI_Remake_Times_Judge_Level_3: '抽到紫色概率四倍',\n    UI_Remake_Times_Judge_Level_4: '抽到紫色概率五倍',\n    UI_Remake_Times_Judge_Level_5: '抽到紫色概率六倍',\n\n    UI_Achievement_Count_Judge_Level_0: '抽到橙色概率不变',\n    UI_Achievement_Count_Judge_Level_1: '抽到橙色概率翻倍',\n    UI_Achievement_Count_Judge_Level_2: '抽到橙色概率三倍',\n    UI_Achievement_Count_Judge_Level_3: '抽到橙色概率四倍',\n    UI_Achievement_Count_Judge_Level_4: '抽到橙色概率五倍',\n    UI_Achievement_Count_Judge_Level_5: '抽到橙色概率六倍',\n\n    UI_Support_Programmer: '打赏程序(顿顿饭)',\n    UI_Support_Designer: '打赏策划(爱发电)',\n\n    UI_Save: '存档',\n    UI_Load: '读档',\n    UI_Read: '复制',\n    UI_Write: '粘贴',\n\n    UI_LoadSuccess: '读档成功！',\n    UI_LoadFailed: '读档失败！',\n\n    UI_CopySuccess: '成功复制存档到剪贴板',\n    UI_CopyFailed: '复制存档到剪贴板失败，请手动复制存档内容',\n\n    UI_PasteSuccessDecodeSuccess: '读档成功！',\n    UI_PasteSuccessDecodeFailed: '粘贴剪贴板存档内容成功，但剪贴板内容读档失败',\n    UI_PasteFailedDecodeSuccess: '粘贴剪贴板存档内容失败，使用输入的内容读档成功',\n    UI_PasteFailedDecodeFailed: '粘贴剪贴板存档内容失败，使用输入的内容读档失败',\n\n    UI_Title_Celebrity: '你的前世是...',\n    UI_CustomMode: '经典模式',\n    UI_CustomModeDescription: '10连抽天赋\\n自由分配属性',\n    UI_CelebrityMode: '名人模式',\n    UI_CelebrityModeDescription: '前世是古代名人\\n重开到了现代',\n    UI_AllNot: '↻都不是',\n    UI_UniqueWaTaShi: '独一无二的我',\n    UI_UniqueWaTaShiContent: '\\n6000万玩家中独一无二的角色卡\\n所有属性 所有天赋 随机生成\\n 每人只能生成一次',\n    UI_GenerateNow: '立即生成',\n\n    M_NoRank: '别卷了，没有排行榜',\n    M_PleaseSelectOne: '请选择一个名人',\n    M_UnGenerate: '独一无二的我还没有生成',\n    M_DisableExtendTalent: '名人模式不能继承天赋',\n\n    F_RemakeTimes: '已重开{0}次',\n    F_AchievementCount: '成就达成{0}个',\n    F_TalentSelection: '{name}（{description}）',\n    F_TalentConflict: '与已选的「{0}」天赋冲突',\n    F_TalentSelectLimit: '只能选 {0} 个天赋',\n    F_TalentSelectNotComplect: '要选满{0}个天赋',\n    F_PropertyPointLeft: '你还有 {0} 属性点没有分配完',\n    F_TalentReplace: '天赋替换【{source.name}】->【{target.name}】',\n    F_PropertyStr: '颜值{CHR} 智力{INT} 体质{STR} 家境{MNY}'\n});"
  },
  {
    "path": "src/index.js",
    "content": "import App from './app.js';\nimport Life from './modules/life.js';\n\nglobalThis.$$eventMap = new Map();\nglobalThis.$$event = (tag, data) => {\n    const listener = $$eventMap.get(tag);\n    if(listener) listener.forEach(fn=>fn(data));\n}\nglobalThis.$$on = (tag, fn) => {\n    let listener = $$eventMap.get(tag);\n    if(!listener) {\n        listener = new Set();\n        $$eventMap.set(tag, listener);\n    }\n    listener.add(fn);\n}\nglobalThis.$$off = (tag, fn) => {\n    const listener = $$eventMap.get(tag);\n    if(listener) listener.delete(fn);\n}\n\nglobalThis.$$copy = async text => {\n    const result = await navigator.permissions.query({ name: \"clipboard-write\" })\n    if (result.state == \"granted\" || result.state == \"prompt\") {\n        navigator.clipboard.writeText(text)\n        return true;\n    }\n    const input = document.createElement('input');\n    input.setAttribute('style', 'opacity: 0;');\n    document.body.appendChild(input);\n    input.value = text;\n    input.select();\n    const r = document.execCommand(\"copy\");\n    document.body.removeChild(input);\n    return r;\n}\n\nglobalThis.$$read = async ()=>{\n    const result = await navigator.permissions.query({ name: \"clipboard-read\" })\n    if (result.state == \"granted\" || result.state == \"prompt\") {\n        return await navigator.clipboard.readText();\n    }\n    const input = document.createElement('input');\n    input.setAttribute('style', 'opacity: 0;');\n    document.body.appendChild(input);\n    input.focus();\n    const r = document.execCommand(\"paste\");\n    const text = input.value;\n    document.body.removeChild(input);\n    return r?text:r;\n};\n\nconst core = new Life();\nconst game = new App();\nglobalThis.core = core;\nglobalThis.game = game;\n\nconst query = {};\nlocation.search.substr(1).split('&').forEach(item => {\n    const parts = item.split('=');\n    query[parts[0]] = parts[1];\n});\n\ncore.config({\n    defaultPropertyPoints: 20, // default number of points for a property\n    talentSelectLimit: 3, // max number of talents that can be selected\n    propertyAllocateLimit: [0, 10], // scoop of properties that can be allocated,\n    defaultPropertys: { SPR: 5 }, // default properties\n    talentConfig: { // config for talent\n        talentPullCount: 10, // number of talents to pull from the talent pool\n        talentRate: { 1:100, 2:10, 3:1, total: 1000 }, // rate of talent pull\n        additions: {\n            TMS: [\n                [ 10, { 2: 1 }],\n                [ 30, { 2: 2 }],\n                [ 50, { 2: 3 }],\n                [ 70, { 2: 4 }],\n                [100, { 2: 5 }],\n            ],\n            CACHV: [\n                [ 10, { 2: 1 }],\n                [ 30, { 2: 2 }],\n                [ 50, { 2: 3 }],\n                [ 70, { 2: 4 }],\n                [100, { 2: 5 }],\n            ]\n        },\n    },\n    propertyConfig: { // config for property\n        judge: {\n            // type: [min, grade, judge]\n            RTLT: [\n                [    0, 0],\n                [  0.3, 1],\n                [  0.6, 2],\n                [  0.9, 3],\n            ],\n            REVT: [\n                [    0, 0],\n                [  0.2, 1],\n                [  0.4, 2],\n                [  0.6, 3],\n            ],\n            TMS: [\n                [    0, 0, 'UI_Remake_Times_Judge_Level_0'],\n                [   10, 1, 'UI_Remake_Times_Judge_Level_1'],\n                [   30, 1, 'UI_Remake_Times_Judge_Level_2'],\n                [   50, 2, 'UI_Remake_Times_Judge_Level_3'],\n                [   70, 2, 'UI_Remake_Times_Judge_Level_4'],\n                [  100, 3, 'UI_Remake_Times_Judge_Level_5'],\n            ],\n            CACHV: [\n                [    0, 0, 'UI_Achievement_Count_Judge_Level_0'],\n                [   10, 1, 'UI_Achievement_Count_Judge_Level_1'],\n                [   30, 1, 'UI_Achievement_Count_Judge_Level_2'],\n                [   50, 2, 'UI_Achievement_Count_Judge_Level_3'],\n                [   70, 2, 'UI_Achievement_Count_Judge_Level_4'],\n                [  100, 3, 'UI_Achievement_Count_Judge_Level_5'],\n            ],\n            HCHR: [\n                [   0, 0, 'UI_Judge_Level_0'],\n                [   1, 0, 'UI_Judge_Level_1'],\n                [   2, 0, 'UI_Judge_Level_2'],\n                [   4, 0, 'UI_Judge_Level_3'],\n                [   7, 1, 'UI_Judge_Level_4'],\n                [   9, 2, 'UI_Judge_Level_5'],\n                [  11, 3, 'UI_Judge_Level_6'],\n            ],\n            HMNY: [\n                [   0, 0, 'UI_Judge_Level_0'],\n                [   1, 0, 'UI_Judge_Level_1'],\n                [   2, 0, 'UI_Judge_Level_2'],\n                [   4, 0, 'UI_Judge_Level_3'],\n                [   7, 1, 'UI_Judge_Level_4'],\n                [   9, 2, 'UI_Judge_Level_5'],\n                [  11, 3, 'UI_Judge_Level_6'],\n            ],\n            HSPR: [\n                [   0, 0, 'UI_Spirit_Judge_Level_0'],\n                [   1, 0, 'UI_Spirit_Judge_Level_1'],\n                [   2, 0, 'UI_Spirit_Judge_Level_2'],\n                [   4, 0, 'UI_Spirit_Judge_Level_3'],\n                [   7, 1, 'UI_Spirit_Judge_Level_4'],\n                [   9, 2, 'UI_Spirit_Judge_Level_5'],\n                [  11, 3, 'UI_Spirit_Judge_Level_6'],\n            ],\n            HINT: [\n                [   0, 0, 'UI_Judge_Level_0'],\n                [   1, 0, 'UI_Judge_Level_1'],\n                [   2, 0, 'UI_Judge_Level_2'],\n                [   4, 0, 'UI_Judge_Level_3'],\n                [   7, 1, 'UI_Judge_Level_4'],\n                [   9, 2, 'UI_Judge_Level_5'],\n                [  11, 3, 'UI_Judge_Level_6'],\n                [  21, 3, 'UI_Intelligence_Judge_Level_7'],\n                [ 131, 3, 'UI_Intelligence_Judge_Level_8'],\n                [ 501, 3, 'UI_Intelligence_Judge_Level_9'],\n            ],\n            HSTR: [\n                [   0, 0, 'UI_Judge_Level_0'],\n                [   1, 0, 'UI_Judge_Level_1'],\n                [   2, 0, 'UI_Judge_Level_2'],\n                [   4, 0, 'UI_Judge_Level_3'],\n                [   7, 1, 'UI_Judge_Level_4'],\n                [   9, 2, 'UI_Judge_Level_5'],\n                [  11, 3, 'UI_Judge_Level_6'],\n                [  21, 3, 'UI_Strength_Judge_Level_7'],\n                [ 101, 3, 'UI_Strength_Judge_Level_8'],\n                [ 401, 3, 'UI_Strength_Judge_Level_9'],\n                [1001, 3, 'UI_Strength_Judge_Level_10'],\n                [2001, 3, 'UI_Strength_Judge_Level_11'],\n            ],\n            HAGE: [\n                [   0, 0, 'UI_AGE_Judge_Level_0'],\n                [   1, 0, 'UI_AGE_Judge_Level_1'],\n                [  10, 0, 'UI_AGE_Judge_Level_2'],\n                [  18, 0, 'UI_AGE_Judge_Level_3'],\n                [  40, 0, 'UI_AGE_Judge_Level_4'],\n                [  60, 1, 'UI_AGE_Judge_Level_5'],\n                [  70, 1, 'UI_AGE_Judge_Level_6'],\n                [  80, 2, 'UI_AGE_Judge_Level_7'],\n                [  90, 2, 'UI_AGE_Judge_Level_8'],\n                [  95, 3, 'UI_AGE_Judge_Level_9'],\n                [ 100, 3, 'UI_AGE_Judge_Level_10'],\n                [ 500, 3, 'UI_AGE_Judge_Level_11'],\n            ],\n            SUM: [\n                [   0, 0, 'UI_Judge_Level_0'],\n                [  41, 0, 'UI_Judge_Level_1'],\n                [  50, 0, 'UI_Judge_Level_2'],\n                [  60, 0, 'UI_Judge_Level_3'],\n                [  80, 1, 'UI_Judge_Level_4'],\n                [ 100, 2, 'UI_Judge_Level_5'],\n                [ 110, 3, 'UI_Judge_Level_6'],\n                [ 120, 3, 'UI_Judge_Level_7'],\n            ],\n        },\n    },\n    characterConfig: { // config for character\n        characterPullCount: 3,\n        rateableKnife: 10,\n        propertyWeight: [\n            [ 0, 1],\n            [ 1, 2],\n            [ 2, 3],\n            [ 3, 4],\n            [ 4, 5],\n            [ 5, 6],\n            [ 6, 5],\n            [ 7, 4],\n            [ 8, 3],\n            [ 9, 2],\n            [10, 1],\n        ],\n        talentWeight: [\n            [ 1, 1],\n            [ 2, 2],\n            [ 3, 3],\n            [ 4, 2],\n            [ 5, 1],\n        ],\n    },\n});\ngame.start(query);\n"
  },
  {
    "path": "src/modules/achievement.js",
    "content": "class Achievement {\n    constructor(system) {\n        this.#system = system;\n    }\n\n    // 时机\n    Opportunity = {\n        START: \"START\",             // 分配完成点数，点击开始新人生后\n        TRAJECTORY: \"TRAJECTORY\",   // 每一年的人生经历中\n        SUMMARY: \"SUMMARY\",         // 人生结束，点击人生总结后\n        END: \"END\",                 // 游戏完成，点击重开 重开次数在这之后才会+1\n    };\n\n    #system;\n    #achievements;\n\n    initial({achievements}) {\n        this.#achievements = achievements;\n        return this.count;\n    }\n\n    get count() {\n        return Object.keys(this.#achievements).length;\n    }\n\n    get #prop() {\n        return this.#system.request(this.#system.Module.PROPERTY);\n    }\n\n    list() {\n        return Object\n            .values(this.#achievements)\n            .map(({\n                id, name, opportunity,\n                description, hide, grade,\n            })=>({\n                id, name, opportunity,\n                description, hide, grade,\n                isAchieved: this.isAchieved(id, this.#prop),\n            }));\n    }\n\n    get(achievementId) {\n        const achievement = this.#achievements[achievementId];\n        if(!achievement) throw new Error(`[ERROR] No Achievement[${achievementId}]`);\n        return this.#system.clone(achievement);\n    }\n\n    check(achievementId) {\n        const { condition } = this.get(achievementId);\n        return this.#system.check(condition);\n    }\n\n    isAchieved(achievementId) {\n        for(const [achieved] of (this.#prop.get(this.#prop.TYPES.ACHV)||[]))\n            if(achieved == achievementId) return true;\n        return false;\n    }\n\n    achieve(opportunity) {\n        this.list()\n            .filter(({isAchieved})=>!isAchieved)\n            .filter(({opportunity: o})=>o==opportunity)\n            .filter(({id})=>this.check(id, this.#prop))\n            .forEach(({id})=>{\n                this.#prop.achieve(this.#prop.TYPES.ACHV, id)\n                $$event('achievement', this.get(id))\n            });\n    }\n}\n\nexport default Achievement;"
  },
  {
    "path": "src/modules/character.js",
    "content": "class Character {\n    constructor(system) {\n        this.#system = system;\n    }\n\n    #system;\n    #characters;\n    #characterPullCount;\n    #rateableKnife;\n    #rate;\n    #pipe = [];\n    #uniqueWaTaShi;\n    #propertyWeight;\n    #talentWeight\n\n    initial({characters}) {\n        this.#characters = characters;\n        const uniqueWaTaShi = localStorage.getItem('uniqueWaTaShi');\n        if(uniqueWaTaShi != null || uniqueWaTaShi != 'undefined')\n            this.#uniqueWaTaShi = JSON.parse(uniqueWaTaShi);\n        return this.count;\n    }\n\n    get count() {\n        return Object.keys(this.#characters).length;\n    }\n\n    config({\n        characterPullCount = 3,\n        rateableKnife = 10,\n        propertyWeight,\n        talentWeight,\n    } = {}) {\n        this.#characterPullCount = characterPullCount;\n        this.#rateableKnife = rateableKnife;\n        this.#propertyWeight = propertyWeight;\n        this.#talentWeight = talentWeight;\n    }\n\n    get #unique() {\n        if(this.#uniqueWaTaShi) {\n            return this.#system.clone(this.#uniqueWaTaShi);\n        }\n\n        const now = Date.now();\n        this.#pipe.push(now);\n        if(this.#pipe.length < 10) return null;\n        const time = this.#pipe.shift();\n        if(now - time > 10000) return null;\n        return {unique: true, generate: false};\n    }\n\n    set #unique(data) {\n        this.#uniqueWaTaShi = this.#system.clone(data);\n        this.#uniqueWaTaShi.unique = true;\n        this.#uniqueWaTaShi.generate = true;\n        localStorage.setItem(\n            'uniqueWaTaShi',\n            JSON.stringify(this.#uniqueWaTaShi)\n        );\n    }\n\n    get #weightRandom() {\n        return this.#system.function(this.#system.Function.UTIL).weightRandom;\n    }\n\n    generateUnique() {\n        if(this.#uniqueWaTaShi) return this.#unique;\n        const weightRandom = this.#weightRandom;\n        const {CHR, INT, STR, MNY} = this.#system.PropertyTypes;\n\n        this.#unique = {\n            property: {\n                [CHR]: weightRandom(this.#propertyWeight),\n                [INT]: weightRandom(this.#propertyWeight),\n                [STR]: weightRandom(this.#propertyWeight),\n                [MNY]: weightRandom(this.#propertyWeight),\n            },\n            talent: this.#system\n                .request(this.#system.Module.TALENT)\n                .random(weightRandom(this.#talentWeight)),\n        }\n\n        return this.#unique;\n    }\n\n    random() {\n        return {\n            unique: this.#unique,\n            normal: this.#rateable(),\n        }\n    }\n\n    #rateable() {\n        if(!this.#rate) {\n            this.#rate = {};\n            for(const id in this.#characters) {\n                this.#rate[id] = 1;\n            }\n        }\n\n        const r = [];\n        const weightRandom = this.#weightRandom;\n        new Array(this.#characterPullCount)\n            .fill(0)\n            .forEach(()=>{\n                r.push(\n                    weightRandom(Object\n                        .keys(this.#rate)\n                        .filter(id=>!r.includes(id))\n                        .map(id=>([id,this.#rate[id]]))\n                    )\n                )\n            });\n\n        let min = Infinity;\n        for(const id in this.#rate) {\n            if(r.includes(id)) {\n                min = Math.min(min, this.#rate[id]);\n                continue;\n            }\n            min = Math.min(min, ++ this.#rate[id]);\n        }\n        if(min > this.#rateableKnife) {\n            for(const id in this.#rate) {\n                this.#rate[id] -= this.#rateableKnife;\n            }\n        }\n        return r.map(id=>this.#system.clone(this.#characters[id]));\n    }\n\n}\n\nexport default Character;"
  },
  {
    "path": "src/modules/event.js",
    "content": "class Event {\n    constructor(system) {\n        this.#system = system;\n    }\n\n    #system;\n    #events;\n\n    initial({events}) {\n        this.#events = events;\n        for(const id in events) {\n            const event = events[id];\n            if(!event.branch) continue;\n            event.branch = event.branch.map(b=>{\n                b = b.split(':');\n                b[1] = Number(b[1]);\n                return b;\n            });\n        }\n        return this.count;\n    }\n\n    get count() {\n        return Object.keys(this.#events).length;\n    }\n\n    check(eventId) {\n        const { include, exclude, NoRandom } = this.get(eventId);\n        if(NoRandom) return false;\n        if(exclude && this.#system.check(exclude)) return false;\n        if(include) return this.#system.check(include);\n        return true;\n    }\n\n    get(eventId) {\n        const event = this.#events[eventId];\n        if(!event) throw new Error(`[ERROR] No Event[${eventId}]`);\n        return this.#system.clone(event);\n    }\n\n    information(eventId) {\n        const { event: description } = this.get(eventId)\n        return { description };\n    }\n\n    do(eventId) {\n        const { effect, branch, event: description, postEvent, grade } = this.get(eventId);\n        if(branch)\n            for(const [cond, next] of branch)\n                if(this.#system.check(cond))\n                    return { effect, next, description, grade };\n        return { effect, postEvent, description, grade };\n    }\n\n}\n\nexport default Event;"
  },
  {
    "path": "src/modules/life.js",
    "content": "import * as util from '../functions/util.js';\nimport * as fCondition from '../functions/condition.js';\n\nimport Property from './property.js';\nimport Event from './event.js';\nimport Talent from './talent.js';\nimport Achievement from './achievement.js';\nimport Character from './character.js';\n\nclass Life {\n    constructor() {\n        this.#property = new Property(this);\n        this.#event = new Event(this);\n        this.#talent = new Talent(this);\n        this.#achievement = new Achievement(this);\n        this.#character = new Character(this);\n    }\n\n    Module = {\n        PROPERTY: 'PROPERTY',\n        TALENT: 'TALENT',\n        EVENT: 'EVENT',\n        ACHIEVEMENT: 'ACHIEVEMENT',\n        CHARACTER: 'CHARACTER',\n    }\n\n    Function = {\n        CONDITION: 'CONDITION',\n        UTIL: 'UTIL',\n    }\n\n    #property;\n    #event;\n    #talent;\n    #achievement;\n    #character;\n    #triggerTalents;\n    #defaultPropertyPoints;\n    #talentSelectLimit;\n    #propertyAllocateLimit;\n    #defaultPropertys;\n    #specialThanks;\n    #initialData;\n\n    async initial(i18nLoad, commonLoad) {\n        const [age, talents, events, achievements, characters, specialThanks] = await Promise.all([\n            i18nLoad('age'),\n            i18nLoad('talents'),\n            i18nLoad('events'),\n            i18nLoad('achievement'),\n            i18nLoad('character'),\n            commonLoad('specialthanks'),\n        ]);\n        this.#specialThanks = specialThanks;\n\n        const total = {\n            [this.PropertyTypes.TACHV]: this.#achievement.initial({achievements}),\n            [this.PropertyTypes.TEVT]: this.#event.initial({events}),\n            [this.PropertyTypes.TTLT]: this.#talent.initial({talents}),\n        };\n        this.#property.initial({age, total});\n        this.#character.initial({characters});\n    }\n\n    config({\n        defaultPropertyPoints = 20, // default number of points for a property\n        talentSelectLimit = 3, // max number of talents that can be selected\n        propertyAllocateLimit = [0, 10], // scoop of properties that can be allocated\n        defaultPropertys = {}, // default propertys\n        talentConfig, // config for talent\n        propertyConfig, // config for property\n        characterConfig, // config for character\n    } = {}) {\n        this.#defaultPropertyPoints = defaultPropertyPoints;\n        this.#talentSelectLimit = talentSelectLimit;\n        this.#propertyAllocateLimit = propertyAllocateLimit;\n        this.#defaultPropertys = defaultPropertys;\n        this.#talent.config(talentConfig);\n        this.#property.config(propertyConfig);\n        this.#character.config(characterConfig);\n    }\n\n    request(module) {\n        switch (module) {\n            case this.Module.ACHIEVEMENT: return this.#achievement;\n            case this.Module.CHARACTER: return this.#character;\n            case this.Module.EVENT: return this.#event;\n            case this.Module.PROPERTY: return this.#property;\n            case this.Module.TALENT: return this.#talent;\n            default: return null;\n        }\n    }\n\n    function(type) {\n        switch (type) {\n            case this.Function.CONDITION: return fCondition;\n            case this.Function.UTIL: return util;\n        }\n    }\n\n    check(condition) {\n        return fCondition.checkCondition(this.#property,condition);\n    }\n\n    clone(...args) {\n        return util.clone(...args);\n    }\n\n    remake(talents) {\n        this.#initialData = util.clone(this.#defaultPropertys);\n        this.#initialData.TLT = util.clone(talents);\n        this.#triggerTalents = {};\n        return this.talentReplace(this.#initialData.TLT);\n    }\n\n    start(allocation) {\n        for(const key in allocation) {\n            this.#initialData[key] = util.clone(allocation[key]);\n        }\n        this.#property.restart(this.#initialData);\n        this.doTalent()\n        this.#property.restartLastStep();\n        this.#achievement.achieve(this.AchievementOpportunity.START);\n    }\n\n    getPropertyPoints() {\n        return this.#defaultPropertyPoints + this.#talent.allocationAddition(this.#initialData.TLT);\n    }\n\n    getTalentCurrentTriggerCount(talentId) {\n        return this.#triggerTalents[talentId] || 0;\n    }\n\n    next() {\n        const {age, event, talent} = this.#property.ageNext();\n\n        const talentContent = this.doTalent(talent);\n        const eventContent = this.doEvent(this.random(event));\n\n        const isEnd = this.#property.isEnd();\n\n        const content = [talentContent, eventContent].flat();\n        this.#achievement.achieve(this.AchievementOpportunity.TRAJECTORY);\n        return { age, content, isEnd };\n    }\n\n    talentReplace(talents) {\n        const result = this.#talent.replace(talents);\n        const contents = [];\n        for(const id in result) {\n            talents.push(result[id]);\n            const source = this.#talent.get(id);\n            const target = this.#talent.get(result[id]);\n            contents.push({\n                type: 'talentReplace',\n                source, target\n            });\n        }\n        return contents;\n    }\n\n    doTalent(talents) {\n        if(talents) this.#property.change(this.PropertyTypes.TLT, talents);\n        talents = this.#property.get(this.PropertyTypes.TLT)\n            .filter(talentId => this.getTalentCurrentTriggerCount(talentId) < this.#talent.get(talentId).max_triggers);\n\n        const contents = [];\n        for(const talentId of talents) {\n            const result = this.#talent.do(talentId);\n            if(!result) continue;\n            this.#triggerTalents[talentId] = this.getTalentCurrentTriggerCount(talentId) + 1;\n            const { effect, name, description, grade } = result;\n            contents.push({\n                type: this.PropertyTypes.TLT,\n                name,\n                grade,\n                description: this.format(description),\n            })\n            if(!effect) continue;\n            this.#property.effect(effect);\n        }\n        return contents;\n    }\n\n    doEvent(eventId) {\n        const { effect, next, description, postEvent, grade } = this.#event.do(eventId);\n        this.#property.change(this.PropertyTypes.EVT, eventId);\n        this.#property.effect(effect);\n        const content = {\n            type: this.PropertyTypes.EVT,\n            description: this.format(description),\n            postEvent: postEvent && this.format(postEvent),\n            grade,\n        }\n        if(next) return [content, this.doEvent(next)].flat();\n        return [content];\n    }\n\n    random(events) {\n        return util.weightRandom(\n            events.filter(\n                ([eventId])=>this.#event.check(eventId, this.#property)\n            )\n        );\n    }\n\n    talentRandom() {\n        return this.#talent.talentRandom(\n            this.lastExtendTalent,\n            this.#getPropertys(\n                this.PropertyTypes.TMS,\n                this.PropertyTypes.CACHV,\n            )\n        );\n    }\n\n    characterRandom() {\n        const characters = this.#character.random();\n        const replaceTalent = v=>v.talent=v.talent.map(\n            id=>this.#talent.get(id)\n        );\n        characters.normal.forEach(replaceTalent);\n        if(characters.unique && characters.unique.talent)\n            replaceTalent(characters.unique);\n        return characters;\n    }\n\n    talentExtend(talentId) {\n        this.#property.set(this.PropertyTypes.EXT, talentId);\n    }\n\n    exclude(talents, exclusive) {\n        return this.#talent.exclude(talents, exclusive);\n    }\n\n    generateUnique() {\n        this.#character.generateUnique();\n    }\n\n    #getJudges(...types) {\n        return util.getListValuesMap(types.flat(), key => this.#property.judge(key));\n    }\n\n    #getPropertys(...types) {\n        return util.getListValuesMap(types.flat(), key => this.#property.get(key));\n    }\n\n    format(discription) {\n        return discription.replaceAll(/\\{\\s*[0-9a-zA-Z_-]+\\s*?\\}/g, (match) => this.#format(match));\n    }\n\n    #format(key) {\n        switch (key.slice(1, -1).trim().toLowerCase()) {\n            case 'currentyear': return new Date().getFullYear()\n            case 'age': return this.#property.get(this.PropertyTypes.AGE)\n            case 'charm': return this.#property.get(this.PropertyTypes.CHR)\n            case 'intelligence': return this.#property.get(this.PropertyTypes.INT)\n            case 'strength': return this.#property.get(this.PropertyTypes.STR)\n            case 'money': return this.#property.get(this.PropertyTypes.MNY)\n            case 'spirit': return this.#property.get(this.PropertyTypes.SPR)\n            default: return key\n        }\n    }\n\n    get lastExtendTalent() {\n        return this.#property.get(this.PropertyTypes.EXT);\n    }\n\n    get summary() {\n        this.#achievement.achieve(this.AchievementOpportunity.SUMMARY);\n\n        const pt = this.PropertyTypes;\n\n        return this.#getJudges(pt.SUM,\n            pt.HAGE, pt.HCHR, pt.HINT,\n            pt.HSTR, pt.HMNY, pt.HSPR,\n        );\n    }\n\n    get statistics() {\n        const pt = this.PropertyTypes;\n\n        return this.#getJudges( pt.TMS,\n            pt.CACHV, pt.RTLT, pt.REVT,\n        );\n    }\n    get achievements() {\n        const ticks = {};\n        this.#property\n            .get(this.PropertyTypes.ACHV)\n            .forEach(([id, tick]) => ticks[id] = tick);\n        return this\n            .#achievement\n            .list(this.#property)\n            .sort((\n                {id: a, grade: ag, hide: ah},\n                {id: b, grade: bg, hide: bh}\n            )=>{\n                a = ticks[a];\n                b = ticks[b];\n                if(a&&b) return b - a;\n                if(!a&&!b) {\n                    if(ah&&bh) return bg - ag;\n                    if(ah) return 1;\n                    if(bh) return -1;\n                    return bg - ag;\n                }\n                if(!a) return 1;\n                if(!b) return -1;\n            });\n    }\n\n    get PropertyTypes() { return this.#property.TYPES; }\n    get AchievementOpportunity() { return this.#achievement.Opportunity; }\n    get talentSelectLimit() { return this.#talentSelectLimit; }\n    get propertyAllocateLimit() { return util.clone(this.#propertyAllocateLimit); }\n\n    get propertys() { return this.#property.getPropertys(); }\n    get times() { return this.#property.get(this.PropertyTypes.TMS) || 0; }\n    set times(v) {\n        this.#property.set(this.PropertyTypes.TMS, v);\n        this.#achievement.achieve(this.AchievementOpportunity.END);\n    }\n    get specialThanks() { return this.#specialThanks; }\n}\n\nexport default Life;"
  },
  {
    "path": "src/modules/property.js",
    "content": "class Property {\n    constructor(system) {\n        this.#system = system;\n    }\n\n    TYPES = {\n        // 本局\n        AGE: \"AGE\", // 年龄 age AGE\n        CHR: \"CHR\", // 颜值 charm CHR\n        INT: \"INT\", // 智力 intelligence INT\n        STR: \"STR\", // 体质 strength STR\n        MNY: \"MNY\", // 家境 money MNY\n        SPR: \"SPR\", // 快乐 spirit SPR\n        LIF: \"LIF\", // 生命 life LIFE\n        TLT: \"TLT\", // 天赋 talent TLT\n        EVT: \"EVT\", // 事件 event EVT\n        TMS: \"TMS\", // 次数 times TMS\n\n        // Auto calc\n        LAGE: \"LAGE\", // 最低年龄 Low Age\n        HAGE: \"HAGE\", // 最高年龄 High Age\n        LCHR: \"LCHR\", // 最低颜值 Low Charm\n        HCHR: \"HCHR\", // 最高颜值 High Charm\n        LINT: \"LINT\", // 最低智力 Low Intelligence\n        HINT: \"HINT\", // 最高智力 High Intelligence\n        LSTR: \"LSTR\", // 最低体质 Low Strength\n        HSTR: \"HSTR\", // 最高体质 High Strength\n        LMNY: \"LMNY\", // 最低家境 Low Money\n        HMNY: \"HMNY\", // 最高家境 High Money\n        LSPR: \"LSPR\", // 最低快乐 Low Spirit\n        HSPR: \"HSPR\", // 最高快乐 High Spirit\n\n        SUM: \"SUM\", // 总评 summary SUM\n\n        EXT: \"EXT\", // 继承天赋\n\n        // 总计\n        // Achievement Total\n        ATLT: \"ATLT\", // 拥有过的天赋 Achieve Talent\n        AEVT: \"AEVT\", // 触发过的事件 Achieve Event\n        ACHV: \"ACHV\", // 达成的成就 Achievement\n\n        CTLT: \"CTLT\", // 天赋选择数 Count Talent\n        CEVT: \"CEVT\", // 事件收集数 Count Event\n        CACHV: \"CACHV\", // 成就达成数 Count Achievement\n\n        // 总数\n        TTLT: \"TTLT\", // 总天赋数 Total Talent\n        TEVT: \"TEVT\", // 总事件数 Total Event\n        TACHV: \"TACHV\", // 总成就数 Total Achievement\n\n        // 比率\n        REVT: \"REVT\", // 事件收集率 Rate Event\n        RTLT: \"RTLT\", // 天赋选择率 Rate Talent\n        RACHV: \"RACHV\", // 成就达成率 Rate Achievement\n\n        // SPECIAL\n        RDM: 'RDM', // 随机属性 random RDM\n\n    };\n\n    // 特殊类型\n    SPECIAL = {\n        RDM: [ // 随机属性 random RDM\n            this.TYPES.CHR,\n            this.TYPES.INT,\n            this.TYPES.STR,\n            this.TYPES.MNY,\n            this.TYPES.SPR,\n        ]\n    }\n\n    #system;\n    #ageData;\n    #data = {};\n    #total;\n    #judge;\n\n    get #util() {\n        return this.#system.function(this.#system.Function.UTIL);\n    }\n\n    initial({age, total}) {\n        this.#ageData = age;\n        for(const a in age) {\n            let { event, talent } = age[a];\n            if(!Array.isArray(event))\n                event = event?.split(',') || [];\n\n            event = event.map(v=>{\n                const value = `${v}`.split('*').map(n=>Number(n));\n                if(value.length==1) value.push(1);\n                return value;\n            });\n\n            if(!Array.isArray(talent))\n                talent = talent?.split(',') || [];\n\n            talent = talent.map(v=>Number(v));\n\n            age[a] = { event, talent };\n        }\n        this.#total = total;\n    }\n\n    config({judge = {}}) {\n        this.#judge = judge;\n    }\n\n    restart(data) {\n        this.#data = {\n            [this.TYPES.AGE]: -1,\n\n            [this.TYPES.CHR]: 0,\n            [this.TYPES.INT]: 0,\n            [this.TYPES.STR]: 0,\n            [this.TYPES.MNY]: 0,\n            [this.TYPES.SPR]: 0,\n\n            [this.TYPES.LIF]: 1,\n\n            [this.TYPES.TLT]: [],\n            [this.TYPES.EVT]: [],\n\n            [this.TYPES.LAGE]: Infinity,\n            [this.TYPES.LCHR]: Infinity,\n            [this.TYPES.LINT]: Infinity,\n            [this.TYPES.LSTR]: Infinity,\n            [this.TYPES.LSPR]: Infinity,\n            [this.TYPES.LMNY]: Infinity,\n\n            [this.TYPES.HAGE]: -Infinity,\n            [this.TYPES.HCHR]: -Infinity,\n            [this.TYPES.HINT]: -Infinity,\n            [this.TYPES.HSTR]: -Infinity,\n            [this.TYPES.HMNY]: -Infinity,\n            [this.TYPES.HSPR]: -Infinity,\n        };\n        for(const key in data)\n            this.change(key, data[key]);\n    }\n\n    restartLastStep() {\n        this.#data[this.TYPES.LAGE] = this.get(this.TYPES.AGE);\n        this.#data[this.TYPES.LCHR] = this.get(this.TYPES.CHR);\n        this.#data[this.TYPES.LINT] = this.get(this.TYPES.INT);\n        this.#data[this.TYPES.LSTR] = this.get(this.TYPES.STR);\n        this.#data[this.TYPES.LSPR] = this.get(this.TYPES.SPR);\n        this.#data[this.TYPES.LMNY] = this.get(this.TYPES.MNY);\n        this.#data[this.TYPES.HAGE] = this.get(this.TYPES.AGE);\n        this.#data[this.TYPES.HCHR] = this.get(this.TYPES.CHR);\n        this.#data[this.TYPES.HINT] = this.get(this.TYPES.INT);\n        this.#data[this.TYPES.HSTR] = this.get(this.TYPES.STR);\n        this.#data[this.TYPES.HMNY] = this.get(this.TYPES.MNY);\n        this.#data[this.TYPES.HSPR] = this.get(this.TYPES.SPR);\n    }\n\n    get(prop) {\n        const util = this.#util;\n        switch(prop) {\n            case this.TYPES.AGE:\n            case this.TYPES.CHR:\n            case this.TYPES.INT:\n            case this.TYPES.STR:\n            case this.TYPES.MNY:\n            case this.TYPES.SPR:\n            case this.TYPES.LIF:\n            case this.TYPES.TLT:\n            case this.TYPES.EVT:\n                return util.clone(this.#data[prop]);\n            case this.TYPES.LAGE:\n            case this.TYPES.LCHR:\n            case this.TYPES.LINT:\n            case this.TYPES.LSTR:\n            case this.TYPES.LMNY:\n            case this.TYPES.LSPR:\n                return util.min(\n                    this.#data[prop],\n                    this.get(this.fallback(prop))\n                );\n            case this.TYPES.HAGE:\n            case this.TYPES.HCHR:\n            case this.TYPES.HINT:\n            case this.TYPES.HSTR:\n            case this.TYPES.HMNY:\n            case this.TYPES.HSPR:\n                return util.max(\n                    this.#data[prop],\n                    this.get(this.fallback(prop))\n                );\n            case this.TYPES.SUM:\n                const HAGE = this.get(this.TYPES.HAGE);\n                const HCHR = this.get(this.TYPES.HCHR);\n                const HINT = this.get(this.TYPES.HINT);\n                const HSTR = this.get(this.TYPES.HSTR);\n                const HMNY = this.get(this.TYPES.HMNY);\n                const HSPR = this.get(this.TYPES.HSPR);\n                return Math.floor(util.sum(HCHR, HINT, HSTR, HMNY, HSPR)*2 + HAGE/2);\n            case this.TYPES.TMS:\n                return this.lsget('times') || 0;\n            case this.TYPES.EXT:\n                return this.lsget('extendTalent') || null;\n            case this.TYPES.ATLT:\n            case this.TYPES.AEVT:\n            case this.TYPES.ACHV:\n                return this.lsget(prop) || [];\n            case this.TYPES.CTLT:\n            case this.TYPES.CEVT:\n            case this.TYPES.CACHV:\n                return this.get(\n                    this.fallback(prop)\n                ).length;\n            case this.TYPES.TTLT:\n            case this.TYPES.TEVT:\n            case this.TYPES.TACHV:\n                return this.#total[prop];\n            case this.TYPES.RTLT:\n            case this.TYPES.REVT:\n            case this.TYPES.RACHV:\n                const fb = this.fallback(prop);\n                return this.get(fb[0]) / this.get(fb[1]);\n            default: return 0;\n        }\n    }\n\n    fallback(prop) {\n        switch(prop) {\n            case this.TYPES.LAGE:\n            case this.TYPES.HAGE: return this.TYPES.AGE;\n            case this.TYPES.LCHR:\n            case this.TYPES.HCHR: return this.TYPES.CHR;\n            case this.TYPES.LINT:\n            case this.TYPES.HINT: return this.TYPES.INT;\n            case this.TYPES.LSTR:\n            case this.TYPES.HSTR: return this.TYPES.STR;\n            case this.TYPES.LMNY:\n            case this.TYPES.HMNY: return this.TYPES.MNY;\n            case this.TYPES.LSPR:\n            case this.TYPES.HSPR: return this.TYPES.SPR;\n            case this.TYPES.CTLT: return this.TYPES.ATLT;\n            case this.TYPES.CEVT: return this.TYPES.AEVT;\n            case this.TYPES.CACHV: return this.TYPES.ACHV;\n            case this.TYPES.LIF: return this.TYPES.LIF;\n            case this.TYPES.RTLT: return [this.TYPES.CTLT, this.TYPES.TTLT];\n            case this.TYPES.REVT: return [this.TYPES.CEVT, this.TYPES.TEVT];\n            case this.TYPES.RACHV: return [this.TYPES.CACHV, this.TYPES.TACHV];\n            default: return;\n        }\n    }\n\n    set(prop, value) {\n        switch(prop) {\n            case this.TYPES.AGE:\n            case this.TYPES.CHR:\n            case this.TYPES.INT:\n            case this.TYPES.STR:\n            case this.TYPES.MNY:\n            case this.TYPES.SPR:\n            case this.TYPES.LIF:\n            case this.TYPES.TLT:\n            case this.TYPES.EVT:\n                this.hl(prop, this.#data[prop] = this.#system.clone(value));\n                this.achieve(prop, value);\n                return;\n            case this.TYPES.TMS:\n                this.lsset('times', parseInt(value) || 0);\n                return;\n            case this.TYPES.EXT:\n                this.lsset('extendTalent', value);\n                return\n            default: return;\n        }\n    }\n\n    getPropertys() {\n        return this.#system.clone({\n            [this.TYPES.AGE]: this.get(this.TYPES.AGE),\n            [this.TYPES.CHR]: this.get(this.TYPES.CHR),\n            [this.TYPES.INT]: this.get(this.TYPES.INT),\n            [this.TYPES.STR]: this.get(this.TYPES.STR),\n            [this.TYPES.MNY]: this.get(this.TYPES.MNY),\n            [this.TYPES.SPR]: this.get(this.TYPES.SPR),\n        });\n    }\n\n    change(prop, value) {\n        if(Array.isArray(value)) {\n            for(const v of value)\n                this.change(prop, Number(v));\n            return;\n        }\n        switch(prop) {\n            case this.TYPES.AGE:\n            case this.TYPES.CHR:\n            case this.TYPES.INT:\n            case this.TYPES.STR:\n            case this.TYPES.MNY:\n            case this.TYPES.SPR:\n            case this.TYPES.LIF:\n                this.hl(prop, this.#data[prop] += Number(value));\n                return;\n            case this.TYPES.TLT:\n            case this.TYPES.EVT:\n                const v = this.#data[prop];\n                if(value<0) {\n                    const index = v.indexOf(value);\n                    if(index!=-1) v.splice(index,1);\n                }\n                if(!v.includes(value)) v.push(value);\n                this.achieve(prop, value);\n                return;\n            case this.TYPES.TMS:\n                this.set(\n                    prop,\n                    this.get(prop) + parseInt(value)\n                );\n                return;\n            default: return;\n        }\n    }\n\n    hookSpecial(prop) {\n        switch(prop) {\n            case this.TYPES.RDM:\n                return this.#util.listRandom(this.SPECIAL.RDM);\n            default: return prop;\n        }\n    }\n\n    effect(effects) {\n        for(let prop in effects)\n            this.change(\n                this.hookSpecial(prop),\n                Number(effects[prop])\n            );\n    }\n\n    judge(prop) {\n        const value = this.get(prop);\n\n        const d = this.#judge[prop];\n        let length = d.length;\n\n        const progress = () => Math.max(Math.min(value, 10), 0) / 10;\n\n        while(length--) {\n            const [min, grade, judge] = d[length];\n            if(!length || min==void 0 || value >= min) return {prop, value, judge, grade, progress: progress()};\n        }\n    }\n\n    isEnd() {\n        return this.get(this.TYPES.LIF) < 1;\n    }\n\n    ageNext() {\n        this.change(this.TYPES.AGE, 1);\n        const age = this.get(this.TYPES.AGE);\n        const {event, talent} = this.getAgeData(age);\n        return {age, event, talent};\n    }\n\n    getAgeData(age) {\n        return this.#system.clone(this.#ageData[age]);\n    }\n\n    hl(prop, value) {\n        let keys;\n        switch(prop) {\n            case this.TYPES.AGE: keys = [this.TYPES.LAGE, this.TYPES.HAGE]; break;\n            case this.TYPES.CHR: keys = [this.TYPES.LCHR, this.TYPES.HCHR]; break;\n            case this.TYPES.INT: keys = [this.TYPES.LINT, this.TYPES.HINT]; break;\n            case this.TYPES.STR: keys = [this.TYPES.LSTR, this.TYPES.HSTR]; break;\n            case this.TYPES.MNY: keys = [this.TYPES.LMNY, this.TYPES.HMNY]; break;\n            case this.TYPES.SPR: keys = [this.TYPES.LSPR, this.TYPES.HSPR]; break;\n            default: return;\n        }\n        const [l, h] = keys;\n        this.#data[l] = this.#util.min(this.#data[l], value);\n        this.#data[h] = this.#util.max(this.#data[h], value);\n    }\n\n    achieve(prop, newData) {\n        let key;\n        switch(prop) {\n            case this.TYPES.ACHV:\n                const lastData = this.lsget(prop);\n                this.lsset(\n                    prop,\n                    (lastData || []).concat([[newData, Date.now()]])\n                );\n                return;\n            case this.TYPES.TLT: key = this.TYPES.ATLT; break;\n            case this.TYPES.EVT: key = this.TYPES.AEVT; break;\n            default: return;\n        }\n        const lastData = this.lsget(key) || [];\n        this.lsset(\n            key,\n            Array.from(\n                new Set(\n                    lastData\n                        .concat(newData||[])\n                        .flat()\n                )\n            )\n        )\n    }\n\n    lsget(key) {\n        const data = localStorage.getItem(key);\n        if(data === null || data === 'undefined') return;\n        return JSON.parse(data);\n    }\n\n    lsset(key, value) {\n        localStorage.setItem(\n            key,\n            JSON.stringify(value)\n        );\n    }\n}\n\nexport default Property;"
  },
  {
    "path": "src/modules/talent.js",
    "content": "class Talent {\n    constructor(system) {\n        this.#system = system;\n    }\n\n    #system;\n    #talents;\n    #talentPullCount;\n    #talentRate;\n    #additions;\n\n    initial({talents}) {\n        this.#talents = talents;\n        const emt = this.#system.function(this.#system.Function.CONDITION).extractMaxTriggers;\n        for(const id in talents) {\n            const talent = talents[id];\n            talent.id= Number(id);\n            talent.grade = Number(talent.grade);\n            talent.max_triggers = emt(talent.condition);\n            if(talent.replacement) {\n                for(let key in talent.replacement) {\n                    const obj = {};\n                    for(let value of talent.replacement[key]) {\n                        value = `${value}`.split('*');\n                        obj[value[0]||0] = Number(value[1]) || 1;\n                    }\n                    talent.replacement[key] = obj;\n                }\n            }\n        }\n        return this.count;\n    }\n\n    get count() {\n        return Object.keys(this.#talents).length;\n    }\n\n    get #prop() {\n        return this.#system.request(this.#system.Module.PROPERTY);\n    }\n\n    config({\n        talentPullCount = 10, // number of talents to pull from the talent pool\n        talentRate = { 1:100, 2:10, 3:1, total: 1000 }, // rate of talent pull\n        additions = {}, // additional additions\n    } = {}) {\n        this.#talentPullCount = talentPullCount;\n        this.#talentRate = talentRate;\n        this.#additions = additions;\n    }\n\n\n    check(talentId) {\n        const { condition } = this.get(talentId);\n        return this.#system.check(this.#prop, condition);\n    }\n\n    get(talentId) {\n        const talent = this.#talents[talentId];\n        if(!talent) throw new Error(`[ERROR] No Talent[${talentId}]`);\n        return this.#system.clone(talent);\n    }\n\n    information(talentId) {\n        const { grade, name, description } = this.get(talentId)\n        return { grade, name, description };\n    }\n\n    exclude(talents, excludeId) {\n        const { exclude } = this.get(excludeId);\n        for(const talent of talents) {\n            if(exclude) {\n                for(const e of exclude) {\n                    if(talent == e) return talent;\n                }\n            }\n            const excludeReverse = this.get(talent).exclude;\n            if(excludeReverse) {\n                for (const e of excludeReverse) {\n                    if (excludeId == e) return talent\n                }\n            }\n        }\n        return null;\n    }\n\n    getAddition(type, value) {\n        if(!this.#additions[type]) return {};\n        for(const [min, addition] of this.#additions[type]) {\n            if(value >= min) return addition;\n        }\n        return {};\n    }\n\n    getRate(additionValues = {}) {\n        const rate = this.#system.clone(this.#talentRate);\n        const addition = { 1:1, 2:1, 3:1, };\n\n        Object.keys(additionValues).forEach(key => {\n            const addi = this.getAddition(key, additionValues[key])\n            for(const grade in addi)\n                addition[grade] += addi[grade];\n        });\n\n        for(const grade in addition)\n            rate[grade] *= addition[grade];\n\n        return rate;\n    }\n\n    talentRandom(include, additionValues) {\n        const rate = this.getRate(additionValues);\n\n        const randomGrade = () => {\n            let randomNumber = Math.floor(Math.random() * rate.total);\n            if((randomNumber -= rate[3]) < 0) return 3;\n            if((randomNumber -= rate[2]) < 0) return 2;\n            if((randomNumber -  rate[1]) < 0) return 1;\n            return 0;\n        }\n\n        const talentList = {};\n        for(const talentId in this.#talents) {\n            const { id, grade, name, description, exclusive } = this.#talents[talentId];\n            if(!!exclusive) continue;\n            if(id == include) {\n                include = { grade, name, description, id };\n                continue;\n            }\n            if(!talentList[grade]) talentList[grade] = [{ grade, name, description, id }];\n            else talentList[grade].push({ grade, name, description, id });\n        }\n\n        return new Array(this.#talentPullCount)\n            .fill(1).map((v, i)=>{\n                if(!i && include) return include;\n                let grade = randomGrade();\n                while(talentList[grade].length == 0) grade--;\n                const length = talentList[grade].length;\n\n                const random = Math.floor(Math.random()*length) % length;\n                return talentList[grade].splice(random,1)[0];\n            });\n    }\n\n    random(count) {\n        const talents = Object\n            .keys(this.#talents)\n            .filter(id=>!this.#talents[id].exclusive);\n        return new Array(count)\n            .fill(1)\n            .map(()=>talents.splice(\n                    Math.floor(Math.random()*talents.length)%talents.length,\n                    1\n                )[0]\n            );\n    }\n\n    allocationAddition(talents) {\n        if(Array.isArray(talents)) {\n            let addition = 0;\n            for(const talent of talents)\n                addition += this.allocationAddition(talent);\n            return addition;\n        }\n        return Number(this.get(talents).status) || 0;\n    }\n\n    do(talentId) {\n        const { effect, condition, grade, name, description } = this.get(talentId);\n        if(condition && !this.#system.check(condition))\n            return null;\n        return { effect, grade, name, description };\n    }\n\n    replace(talents) {\n        const getReplaceList = (talent, talents) => {\n            const { replacement } = this.get(talent);\n            if(!replacement) return null;\n            const list = [];\n            if(replacement.grade) {\n                this.forEach(({id, grade, exclusive})=>{\n                    if(exclusive) return;\n                    if(!replacement.grade[grade]) return;\n                    if(this.exclude(talents, id)) return;\n                    list.push([id, replacement.grade[grade]]);\n                })\n            }\n            if(replacement.talent) {\n                for(let id in replacement.talent) {\n                    id = Number(id);\n                    if(this.exclude(talents, id)) continue;\n                    list.push([id, replacement.talent[id]]);\n                }\n            }\n            return list;\n        }\n\n        const wr = this.#system.function(this.#system.Function.UTIL).weightRandom;\n        const replace = (talent, talents) => {\n            const replaceList = getReplaceList(talent, talents);\n            if(!replaceList) return talent;\n            const rand = wr(replaceList);\n            return replace(\n                rand, talents.concat(rand)\n            );\n        }\n\n        const newTalents = this.#system.clone(talents);\n        const result = {};\n        for(const talent of talents) {\n            const replaceId = replace(talent, newTalents);\n            if(replaceId != talent) {\n                result[talent] = replaceId;\n                newTalents.push(replaceId);\n            }\n        }\n        return result;\n    }\n\n    forEach(callback) {\n        if(typeof callback != 'function') return;\n        for(const id in this.#talents)\n            callback(this.#system.clone(this.#talents[id]), id);\n    }\n\n}\n\nexport default Talent;"
  },
  {
    "path": "src/ui/laya.patch.js",
    "content": "// 滚动条太灵敏\nconst SCROLL_START_DISTANCE = 30;\nLaya.ScrollBar.prototype.loop=function(){\n    var mouseY=Laya.stage.mouseY;\n    var mouseX=Laya.stage.mouseX;\n    this._lastOffset=this.isVertical ? (mouseY-this._lastPoint.y):(mouseX-this._lastPoint.x);\n    if (this._clickOnly){\n        if (Math.abs(this._lastOffset *(this.isVertical ? Laya.stage._canvasTransform.getScaleY():Laya.stage._canvasTransform.getScaleX()))> SCROLL_START_DISTANCE){\n            this._clickOnly=false;\n            this._offsets || (this._offsets=[]);\n            this._offsets.length=0;\n            this._target.mouseEnabled=false;\n            if (!this.hide && this.autoHide){\n                this.alpha=1;\n                this.visible=true;\n            }\n            this.event(/*laya.events.Event.START*/\"start\");\n        }else return;\n    }\n    this._offsets.push(this._lastOffset);\n    this._lastPoint.x=mouseX;\n    this._lastPoint.y=mouseY;\n    if (this._lastOffset===0)return;\n    if (!this._checkElastic){\n        if (this.elasticDistance > 0){\n            if (!this._checkElastic && this._lastOffset !=0){\n                if ((this._lastOffset > 0 && this._value <=this.min)|| (this._lastOffset < 0 && this._value >=this.max)){\n                    this._isElastic=true;\n                    this._checkElastic=true;\n                    }else {\n                    this._isElastic=false;\n                }\n            }\n            }else {\n            this._checkElastic=true;\n        }\n    }\n    if (this._isElastic){\n        if (this._value <=this.min){\n            this.value-=this._lastOffset *Math.max(0,(1-((this.min-this._value)/ this.elasticDistance)));\n            }else if (this._value >=this.max){\n            this.value-=this._lastOffset *Math.max(0,(1-((this._value-this.max)/ this.elasticDistance)));\n        }\n        }else {\n        this.value-=this._lastOffset;\n    }\n}\n"
  },
  {
    "path": "src/ui/layaUI.max.all.js",
    "content": "var CLASS$=Laya.class;\nvar STATICATTR$=Laya.static;\nvar View=laya.ui.View;\nvar Dialog=laya.ui.Dialog;\nvar CelebrityUI=(function(_super){\n\t\tfunction CelebrityUI(){\n\t\t\t\n\t\t    this.panelCharacter=null;\n\t\t    this.vboxCharacter=null;\n\t\t    this.btnRetry=null;\n\t\t    this.btnNext=null;\n\n\t\t\tCelebrityUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CelebrityUI,'ui.view.CyberTheme.CelebrityUI',_super);\n\t\tvar __proto__=CelebrityUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CelebrityUI.uiView);\n\n\t\t}\n\n\t\tCelebrityUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"height\":2436},\"child\":[{\"type\":\"Box\",\"props\":{\"top\":40,\"right\":0,\"name\":\"title\",\"left\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/accessories/titlebar@3x.png\",\"right\":0,\"left\":0,\"sizeGrid\":\"0,348,116,348\"}},{\"type\":\"HBox\",\"props\":{\"y\":160,\"x\":563,\"space\":30,\"height\":70,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":10,\"x\":1,\"skin\":\"images/accessories/title_left@3x.png\",\"name\":\"left\"}},{\"type\":\"Label\",\"props\":{\"y\":0,\"x\":2,\"text\":\"UI_Title_Celebrity\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\"}},{\"type\":\"Image\",\"props\":{\"y\":10,\"x\":3,\"skin\":\"images/accessories/title_right@3x.png\",\"name\":\"right\"}}]}]},{\"type\":\"Panel\",\"props\":{\"var\":\"panelCharacter\",\"vScrollBarSkin\":\" \",\"top\":300,\"right\":0,\"name\":\"panelCharacter\",\"left\":0,\"bottom\":700},\"child\":[{\"type\":\"VBox\",\"props\":{\"y\":10,\"width\":1000,\"var\":\"vboxCharacter\",\"space\":20,\"name\":\"vboxCharacter\",\"centerX\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"right\":0,\"name\":\"boxCharacter\",\"left\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"right\":0,\"name\":\"boxName\",\"left\":0,\"height\":100},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/border_1@3x.png\",\"sizeGrid\":\"15,130,15,130\",\"right\":0,\"left\":0,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"}}]},{\"type\":\"VBox\",\"props\":{\"top\":100,\"space\":20,\"right\":25,\"name\":\"vboxStates\",\"left\":25},\"child\":[{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"height\":100,\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerX\":0,\"align\":\"center\"}}]}]},{\"type\":\"Box\",\"props\":{\"right\":25,\"name\":\"boxTalent\",\"left\":25,\"height\":100},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":-220,\"x\":-25,\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"}},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":15,\"visible\":false,\"name\":\"grade1\",\"height\":100},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":100,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":15,\"visible\":false,\"name\":\"grade2\",\"height\":100},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":100,\"fillColor\":\"#b17cff\"}}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":15,\"visible\":false,\"name\":\"grade3\",\"height\":100},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":100,\"fillColor\":\"#ffce45\"}}]}]},{\"type\":\"Box\",\"props\":{\"y\":10,\"x\":10,\"right\":0,\"name\":\"boxUniqueUnGenerate\",\"left\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"right\":0,\"name\":\"boxName\",\"left\":0,\"height\":100},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/border_1@3x.png\",\"sizeGrid\":\"15,130,15,130\",\"right\":0,\"left\":0,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"UI_UniqueWaTaShi\",\"name\":\"label\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"}}]},{\"type\":\"VBox\",\"props\":{\"top\":100,\"space\":20,\"right\":25,\"name\":\"vboxStates\",\"left\":25},\"child\":[{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"UI_UniqueWaTaShiContent\",\"right\":0,\"name\":\"label\",\"left\":0,\"leading\":30,\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"align\":\"center\"}},{\"type\":\"Box\",\"props\":{\"y\":12,\"x\":10,\"right\":0,\"name\":\"boxBtn\",\"left\":0,\"height\":200},\"child\":[{\"type\":\"Button\",\"props\":{\"width\":500,\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btn\",\"label\":\"UI_GenerateNow\",\"centerY\":0,\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"labelSize\":50,\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"right\":0,\"left\":0,\"height\":0,\"bottom\":0},\"child\":[{\"type\":\"Button\",\"props\":{\"y\":-450,\"width\":500,\"var\":\"btnRetry\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnRetry\",\"label\":\"UI_AllNot\",\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"labelSize\":50,\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]},{\"type\":\"Button\",\"props\":{\"y\":-200,\"width\":500,\"var\":\"btnNext\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnNext\",\"label\":\"UI_Make_New_Life\",\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"labelSize\":50,\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]}]}]};\n\t\treturn CelebrityUI;\n\t})(View);\nvar CyberAchievementUI=(function(_super){\n\t\tfunction CyberAchievementUI(){\n\t\t\t\n\t\t    this.btnBack=null;\n\t\t    this.btnRank=null;\n\t\t    this.btnStatistics=null;\n\t\t    this.btnAchievement=null;\n\t\t    this.boxPage=null;\n\t\t    this.boxA=null;\n\t\t    this.labRemakeTimes=null;\n\t\t    this.labRemakeTimesJudge=null;\n\t\t    this.labAchievementCount=null;\n\t\t    this.labAchievementCountJudge=null;\n\t\t    this.prgEventRate=null;\n\t\t    this.labEventRate=null;\n\t\t    this.prgTalentRate=null;\n\t\t    this.labTalentRate=null;\n\t\t    this.boxB=null;\n\t\t    this.listAchievements=null;\n\n\t\t\tCyberAchievementUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CyberAchievementUI,'ui.view.CyberTheme.CyberAchievementUI',_super);\n\t\tvar __proto__=CyberAchievementUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\t\t\tView.regComponent(\"Laya.runtime.ColorFilterItem\",Laya.runtime.ColorFilterItem);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CyberAchievementUI.uiView);\n\n\t\t}\n\n\t\tCyberAchievementUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Button\",\"props\":{\"y\":200,\"var\":\"btnBack\",\"skin\":\"images/button/button_back@3x.png\",\"name\":\"btnBack\",\"left\":30,\"stateNum\":1,\"label\":\" \",\"anchorX\":0,\"anchorY\":0.5,\"runtime\":\"Laya.runtime.ScaleButton\"}},{\"type\":\"Box\",\"props\":{\"width\":1,\"top\":0,\"right\":0,\"height\":1},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":200,\"x\":-170,\"width\":260,\"var\":\"btnRank\",\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/button/button_small@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"8,8,8,8\",\"stateNum\":1,\"label\":\" \",\"runtime\":\"Laya.runtime.ScaleButton\"}},{\"type\":\"Box\",\"props\":{\"width\":90,\"left\":8,\"height\":90},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_rank@3x.png\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Rank\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":40,\"anchorY\":0.5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"y\":310,\"x\":0,\"top\":310,\"right\":0,\"left\":0,\"height\":120},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":110,\"x\":140,\"var\":\"btnStatistics\",\"text\":\"UI_Statistics\",\"name\":\"btnStatistics\",\"fontSize\":100,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"anchorY\":1,\"anchorX\":0.5}},{\"type\":\"Label\",\"props\":{\"y\":110,\"x\":360,\"var\":\"btnAchievement\",\"text\":\"UI_Achievement\",\"name\":\"btnAchievement\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"anchorY\":1,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"x\":0,\"width\":2250,\"var\":\"boxPage\",\"top\":450,\"name\":\"boxPage\",\"bottom\":80},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":1125,\"var\":\"boxA\",\"top\":0,\"name\":\"boxA\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":1125,\"top\":0,\"height\":1125,\"centerX\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":40,\"skin\":\"images/border/border_2@3x.png\",\"right\":30,\"left\":30,\"bottom\":30,\"sizeGrid\":\"75,155,75,155\"}},{\"type\":\"Sprite\",\"props\":{\"y\":150,\"x\":100,\"width\":920,\"height\":380},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":-1,\"x\":460,\"width\":4,\"lineWidth\":1,\"lineColor\":\"#1a5459\",\"height\":320,\"fillColor\":\"#1a5459\"}},{\"type\":\"Rect\",\"props\":{\"y\":370,\"x\":0,\"width\":920,\"lineWidth\":1,\"lineColor\":\"#1a5459\",\"height\":5,\"fillColor\":\"#1a5459\"}}]},{\"type\":\"Box\",\"props\":{\"width\":400,\"top\":150,\"left\":100,\"height\":320},\"child\":[{\"type\":\"HBox\",\"props\":{\"y\":130,\"x\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labRemakeTimes\",\"text\":\"1\",\"name\":\"labRemakeTimes\",\"fontSize\":70,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bold\":true,\"anchorY\":1,\"anchorX\":0}},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Times\",\"fontSize\":70,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bold\":true,\"anchorY\":1,\"anchorX\":0}}]},{\"type\":\"Label\",\"props\":{\"y\":210,\"x\":0,\"text\":\"UI_Remake_Times\",\"fontSize\":62,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bold\":false,\"anchorY\":1,\"anchorX\":0}},{\"type\":\"Label\",\"props\":{\"y\":240,\"var\":\"labRemakeTimesJudge\",\"text\":\"抽到紫色几率不变\",\"name\":\"labRemakeTimesJudge\",\"fontSize\":42,\"font\":\"方正像素12\",\"color\":\"#93aaae\",\"bold\":false,\"anchorY\":0,\"anchorX\":0}}]},{\"type\":\"Box\",\"props\":{\"width\":400,\"top\":150,\"right\":100,\"height\":320},\"child\":[{\"type\":\"HBox\",\"props\":{\"y\":130},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labAchievementCount\",\"text\":\"1\",\"name\":\"labAchievementCount\",\"fontSize\":70,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bold\":true,\"anchorY\":1,\"anchorX\":0}},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Count\",\"fontSize\":70,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bold\":true,\"anchorY\":1,\"anchorX\":0}}]},{\"type\":\"Label\",\"props\":{\"y\":210,\"x\":0,\"text\":\"UI_Achievement_Count\",\"fontSize\":62,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bold\":false,\"anchorY\":1,\"anchorX\":0}},{\"type\":\"Label\",\"props\":{\"y\":240,\"x\":0,\"var\":\"labAchievementCountJudge\",\"text\":\"抽到橙色几率不变\",\"name\":\"labAchievementCountJudge\",\"fontSize\":42,\"font\":\"方正像素12\",\"color\":\"#93aaae\",\"bold\":false,\"anchorY\":0,\"anchorX\":0}}]},{\"type\":\"Box\",\"props\":{\"right\":100,\"left\":100,\"height\":450,\"bottom\":100},\"child\":[{\"type\":\"Box\",\"props\":{\"top\":25,\"right\":0,\"left\":0,\"height\":180},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":85,\"x\":0,\"text\":\"UI_Event_Collection_Rate\",\"fontSize\":62,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bold\":false,\"anchorY\":1,\"anchorX\":0}},{\"type\":\"ProgressBar\",\"props\":{\"y\":135,\"var\":\"prgEventRate\",\"value\":1,\"skin\":\"images/progress/progress_1@3x.png\",\"right\":240,\"name\":\"prgEventRate\",\"left\":0,\"anchorY\":0.5,\"anchorX\":0,\"sizeGrid\":\"24,24,24,24,1\"}},{\"type\":\"Label\",\"props\":{\"var\":\"labEventRate\",\"text\":\"100%\",\"right\":0,\"name\":\"labEventRate\",\"fontSize\":110,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"bold\":false,\"anchorY\":0.5,\"anchorX\":1}}]},{\"type\":\"Box\",\"props\":{\"right\":0,\"left\":0,\"height\":180,\"bottom\":30},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":85,\"x\":0,\"text\":\"UI_Talent_Collection_Rate\",\"fontSize\":62,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bold\":false,\"anchorY\":1,\"anchorX\":0}},{\"type\":\"ProgressBar\",\"props\":{\"y\":135,\"var\":\"prgTalentRate\",\"value\":0.73,\"skin\":\"images/progress/progress_1@3x.png\",\"right\":240,\"name\":\"prgTalentRate\",\"left\":0,\"anchorY\":0.5,\"anchorX\":0,\"sizeGrid\":\"24,24,24,24,1\"}},{\"type\":\"Label\",\"props\":{\"var\":\"labTalentRate\",\"text\":\"73%\",\"right\":0,\"name\":\"labTalentRate\",\"fontSize\":110,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"bold\":false,\"anchorY\":0.5,\"anchorX\":1}}]}]}]}]},{\"type\":\"Box\",\"props\":{\"width\":1125,\"var\":\"boxB\",\"top\":0,\"right\":0,\"name\":\"boxB\",\"bottom\":0},\"child\":[{\"type\":\"List\",\"props\":{\"y\":35,\"width\":1080,\"var\":\"listAchievements\",\"vScrollBarSkin\":\"images/slider/vslider_1@3x.png\",\"top\":35,\"name\":\"listAchievements\",\"centerX\":0,\"bottom\":35},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":530,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"renderType\":\"render\",\"height\":460},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":20,\"skin\":\"images/border/achievement@3x.png\",\"right\":20,\"name\":\"uncomplete\",\"left\":20,\"bottom\":20,\"sizeGrid\":\"16,16,16,16\"}},{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/achievement_complete@3x.png\",\"right\":0,\"name\":\"completed\",\"left\":0,\"bottom\":0,\"sizeGrid\":\"74,80,74,80\"}},{\"type\":\"Label\",\"props\":{\"text\":\"霹雳霹雳\",\"name\":\"name\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":-30,\"centerX\":0}},{\"type\":\"Label\",\"props\":{\"wordWrap\":true,\"text\":\"被第九重雷劫劈死\",\"right\":40,\"name\":\"description\",\"left\":40,\"height\":95,\"fontSize\":42,\"font\":\"方正像素12\",\"color\":\"#9ca5a9\",\"bottom\":25,\"align\":\"center\"}}]}]}]}]}]};\n\t\treturn CyberAchievementUI;\n\t})(View);\nvar CyberAchievementPopupUI=(function(_super){\n\t\tfunction CyberAchievementPopupUI(){\n\t\t\t\n\t\t    this.boxBg=null;\n\t\t    this.labName=null;\n\n\t\t\tCyberAchievementPopupUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CyberAchievementPopupUI,'ui.view.CyberTheme.CyberAchievementPopupUI',_super);\n\t\tvar __proto__=CyberAchievementPopupUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CyberAchievementPopupUI.uiView);\n\n\t\t}\n\n\t\tCyberAchievementPopupUI.uiView={\"type\":\"View\",\"props\":{\"y\":50,\"width\":570,\"mouseThrough\":true,\"mouseEnabled\":false,\"height\":150,\"alpha\":0.75},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":570,\"lineWidth\":1,\"height\":150,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"x\":0,\"var\":\"boxBg\",\"name\":\"boxBg\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":560,\"lineWidth\":1,\"height\":150,\"fillColor\":\"#272727\"}}]},{\"type\":\"Box\",\"props\":{\"width\":560,\"height\":150},\"child\":[{\"type\":\"Image\",\"props\":{\"x\":70,\"skin\":\"images/icons/icon_achievement@3x.png\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Label\",\"props\":{\"x\":150,\"var\":\"labName\",\"text\":\"所有人都是我\",\"name\":\"labName\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#cccccc\",\"centerY\":0}}]}]};\n\t\treturn CyberAchievementPopupUI;\n\t})(View);\nvar CyberMainUI=(function(_super){\n\t\tfunction CyberMainUI(){\n\t\t\t\n\t\t    this.imgBg=null;\n\t\t    this.imgTitle=null;\n\t\t    this.btnRemake=null;\n\t\t    this.btnThanks=null;\n\t\t    this.btnAchievement=null;\n\t\t    this.btnGithub=null;\n\t\t    this.btnDiscord=null;\n\t\t    this.btnSaveLoad=null;\n\t\t    this.btnThemes=null;\n\t\t    this.banner=null;\n\n\t\t\tCyberMainUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CyberMainUI,'ui.view.CyberTheme.CyberMainUI',_super);\n\t\tvar __proto__=CyberMainUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorFilterItem\",Laya.runtime.ColorFilterItem);\n\t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CyberMainUI.uiView);\n\n\t\t}\n\n\t\tCyberMainUI.uiView={\"type\":\"View\",\"props\":{\"y\":1218,\"x\":562,\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"var\":\"imgBg\",\"skin\":\"images/background/background_1@3x.png\",\"name\":\"imgBg\",\"centerY\":0,\"centerX\":0},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":0,\"x\":0,\"width\":1125,\"source\":\"view/CyberTheme/animation/jumpBackground.ani\",\"interval\":80,\"height\":2436,\"blendMode\":\"lighter\",\"autoPlay\":true,\"alpha\":0.3}}]},{\"type\":\"Image\",\"props\":{\"var\":\"imgTitle\",\"skin\":\"images/accessories/title@3x.png\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"name\":\"imgTitle\",\"centerY\":-350,\"centerX\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":8,\"x\":8,\"skin\":\"images/accessories/title_neon@3x.png\",\"renderType\":\"mask\"}},{\"type\":\"Animation\",\"props\":{\"y\":286,\"x\":436,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleY\":1.5,\"scaleX\":5,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]},{\"type\":\"Image\",\"props\":{\"skin\":\"images/accessories/insert_coin@3x.png\",\"centerY\":540,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Title_Remake\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":-135,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Label\",\"props\":{\"wordWrap\":true,\"text\":\"UI_Title_Subsequent\",\"right\":0,\"left\":0,\"fontSize\":48,\"font\":\"方正像素12\",\"color\":\"#828c95\",\"centerY\":-20,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Cyber_Theme_Art_Design\",\"right\":50,\"fontSize\":48,\"font\":\"方正像素12\",\"color\":\"#00fffd\",\"bottom\":30,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Button\",\"props\":{\"var\":\"btnRemake\",\"skin\":\"images/button/button_main@3x.png\",\"pivotY\":96,\"pivotX\":329,\"name\":\"btnRemake\",\"labelSize\":60,\"label\":\"UI_Remake\",\"centerY\":720,\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":93,\"x\":330,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":5,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":625,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":569,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":316,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":493,\"width\":120,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":487,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":613,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":632,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":621,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,305,0,311,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":330,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":4,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]},{\"type\":\"Box\",\"props\":{\"y\":200,\"x\":200,\"width\":225,\"var\":\"btnThanks\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnThanks\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/button/button_small@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"8,8,8,8\",\"stateNum\":1,\"label\":\" \",\"runtime\":\"Laya.runtime.ScaleButton\"}},{\"type\":\"Box\",\"props\":{\"width\":90,\"left\":8,\"height\":90},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_thanks@3x.png\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Thanks\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":40,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":1100,\"width\":1,\"top\":0,\"right\":0,\"height\":1},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":200,\"x\":-200,\"width\":225,\"var\":\"btnAchievement\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnAchievement\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/button/button_small@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"8,8,8,8\",\"stateNum\":1,\"label\":\" \",\"runtime\":\"Laya.runtime.ScaleButton\"}},{\"type\":\"Box\",\"props\":{\"width\":90,\"left\":8,\"height\":90},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_achievement@3x.png\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Achievement\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":40,\"anchorY\":0.5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"width\":1,\"left\":0,\"height\":1,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":-175,\"x\":100,\"width\":160,\"var\":\"btnGithub\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnGithub\",\"height\":160,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/icons/icon_github.png\",\"right\":0,\"left\":0,\"bottom\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"y\":-355,\"x\":100,\"width\":160,\"var\":\"btnDiscord\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnDiscord\",\"height\":160,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/icons/icon_discord.png\",\"right\":0,\"left\":0,\"bottom\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"right\":0,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":-300,\"x\":-100,\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnSaveLoad\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"width\":80,\"skin\":\"images/icons/icon_save.png\",\"height\":80,\"centerY\":0,\"centerX\":0}}]}]},{\"type\":\"Box\",\"props\":{\"y\":-175,\"x\":-100,\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnThemes\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnThemes\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"width\":90,\"skin\":\"images/icons/icon_themes.png\",\"height\":90,\"centerY\":0,\"centerX\":0}}]}]}]},{\"type\":\"Box\",\"props\":{\"x\":572,\"var\":\"banner\",\"centerX\":0,\"bottom\":100,\"anchorY\":1,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Banner\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#00fffd\"}}]}]};\n\t\treturn CyberMainUI;\n\t})(View);\nvar CyberPropertyUI=(function(_super){\n\t\tfunction CyberPropertyUI(){\n\t\t\t\n\t\t    this.labLeftPropertyPoint=null;\n\t\t    this.boxCharm=null;\n\t\t    this.boxCharmAllocate=null;\n\t\t    this.btnCharmReduce=null;\n\t\t    this.inputCharm=null;\n\t\t    this.btnCharmIncrease=null;\n\t\t    this.boxIntelligence=null;\n\t\t    this.boxIntelligenceAllocate=null;\n\t\t    this.btnIntelligenceReduce=null;\n\t\t    this.inputIntelligence=null;\n\t\t    this.btnIntelligenceIncrease=null;\n\t\t    this.boxStrength=null;\n\t\t    this.boxStrengthAllocate=null;\n\t\t    this.btnStrengthReduce=null;\n\t\t    this.inputStrength=null;\n\t\t    this.btnStrengthIncrease=null;\n\t\t    this.boxMoney=null;\n\t\t    this.boxMoneyAllocate=null;\n\t\t    this.btnMoneyReduce=null;\n\t\t    this.inputMoney=null;\n\t\t    this.btnMoneyIncrease=null;\n\t\t    this.listSelectedTalents=null;\n\t\t    this.btnRandomAllocate=null;\n\t\t    this.btnNext=null;\n\n\t\t\tCyberPropertyUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CyberPropertyUI,'ui.view.CyberTheme.CyberPropertyUI',_super);\n\t\tvar __proto__=CyberPropertyUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\t\t\tView.regComponent(\"Laya.runtime.ColorFilterItem\",Laya.runtime.ColorFilterItem);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CyberPropertyUI.uiView);\n\n\t\t}\n\n\t\tCyberPropertyUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Box\",\"props\":{\"top\":40,\"right\":0,\"name\":\"title\",\"left\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/accessories/titlebar@3x.png\",\"right\":0,\"left\":0,\"sizeGrid\":\"0,348,116,348\"}},{\"type\":\"HBox\",\"props\":{\"y\":160,\"x\":563,\"space\":30,\"height\":70,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":10,\"x\":1,\"skin\":\"images/accessories/title_left@3x.png\",\"name\":\"left\"}},{\"type\":\"Label\",\"props\":{\"y\":0,\"x\":2,\"text\":\"UI_Title_Property\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\"}},{\"type\":\"Image\",\"props\":{\"y\":10,\"x\":3,\"skin\":\"images/accessories/title_right@3x.png\",\"name\":\"right\"}}]}]},{\"type\":\"Box\",\"props\":{\"top\":340,\"right\":40,\"name\":\"propertyAllocate\",\"left\":40,\"height\":840},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":-15,\"skin\":\"images/border/border_2@3x.png\",\"right\":-15,\"left\":-15,\"bottom\":-15,\"sizeGrid\":\"75,155,75,155\"}},{\"type\":\"HBox\",\"props\":{\"top\":680,\"right\":80,\"height\":100},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":0,\"text\":\"UI_Left_Property_Point\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0}},{\"type\":\"Label\",\"props\":{\"x\":1,\"text\":\"UI_Colon\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0}},{\"type\":\"Label\",\"props\":{\"x\":2,\"var\":\"labLeftPropertyPoint\",\"text\":\"0\",\"name\":\"labLeftPropertyPoint\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0}}]},{\"type\":\"VBox\",\"props\":{\"top\":90,\"space\":22,\"right\":50,\"left\":50,\"height\":600},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"var\":\"boxCharm\",\"right\":0,\"name\":\"boxCharm\",\"left\":0,\"height\":130},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_chr@3x.png\",\"scaleY\":1.4,\"scaleX\":1.4,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":183,\"text\":\"UI_Property_Charm\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"width\":590,\"var\":\"boxCharmAllocate\",\"right\":30,\"name\":\"boxCharmAllocate\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnCharmReduce\",\"name\":\"btnCharmReduce\",\"left\":0,\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\"child\":[{\"type\":\"TextInput\",\"props\":{\"var\":\"inputCharm\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"skin\":\"images/border/up@3x.png\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputCharm\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\",\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"top\":0,\"right\":0,\"mouseThrough\":true,\"mouseEnabled\":false,\"left\":0,\"bottom\":0,\"alpha\":0.2},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}}]}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnCharmIncrease\",\"right\":0,\"name\":\"btnCharmIncrease\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":1,\"var\":\"boxIntelligence\",\"right\":0,\"name\":\"boxIntelligence\",\"left\":0,\"height\":130},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_int@3x.png\",\"scaleY\":1.4,\"scaleX\":1.4,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":183,\"text\":\"UI_Property_Intelligence\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"width\":590,\"var\":\"boxIntelligenceAllocate\",\"right\":30,\"name\":\"boxIntelligenceAllocate\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnIntelligenceReduce\",\"name\":\"btnIntelligenceReduce\",\"left\":0,\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\"child\":[{\"type\":\"TextInput\",\"props\":{\"var\":\"inputIntelligence\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"skin\":\"images/border/up@3x.png\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputIntelligence\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\",\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"top\":0,\"right\":0,\"mouseThrough\":true,\"mouseEnabled\":false,\"left\":0,\"bottom\":0,\"alpha\":0.2},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}}]}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnIntelligenceIncrease\",\"right\":0,\"name\":\"btnIntelligenceIncrease\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":2,\"var\":\"boxStrength\",\"right\":0,\"name\":\"boxStrength\",\"left\":0,\"height\":130},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_str@3x.png\",\"scaleY\":1.4,\"scaleX\":1.4,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":183,\"text\":\"UI_Property_Strength\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"width\":590,\"var\":\"boxStrengthAllocate\",\"right\":30,\"name\":\"boxStrengthAllocate\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnStrengthReduce\",\"name\":\"btnStrengthReduce\",\"left\":0,\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\"child\":[{\"type\":\"TextInput\",\"props\":{\"var\":\"inputStrength\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"skin\":\"images/border/up@3x.png\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputStrength\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\",\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"top\":0,\"right\":0,\"mouseThrough\":true,\"mouseEnabled\":false,\"left\":0,\"bottom\":0,\"alpha\":0.2},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}}]}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnStrengthIncrease\",\"right\":0,\"name\":\"btnStrengthIncrease\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":3,\"var\":\"boxMoney\",\"right\":0,\"name\":\"boxMoney\",\"left\":0,\"height\":130},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_mny@3x.png\",\"scaleY\":1.4,\"scaleX\":1.4,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":183,\"text\":\"UI_Property_Money\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"width\":590,\"var\":\"boxMoneyAllocate\",\"right\":30,\"name\":\"boxMoneyAllocate\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnMoneyReduce\",\"name\":\"btnMoneyReduce\",\"left\":0,\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\"child\":[{\"type\":\"TextInput\",\"props\":{\"var\":\"inputMoney\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"skin\":\"images/border/up@3x.png\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputMoney\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\",\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"top\":0,\"right\":0,\"mouseThrough\":true,\"mouseEnabled\":false,\"left\":0,\"bottom\":0,\"alpha\":0.2},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}}]}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnMoneyIncrease\",\"right\":0,\"name\":\"btnMoneyIncrease\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#55fffe\"}}]}]}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"right\":40,\"name\":\"selectedTalents\",\"left\":40,\"height\":700,\"bottom\":500},\"child\":[{\"type\":\"Label\",\"props\":{\"top\":20,\"text\":\"UI_Selected_Talent\",\"left\":20,\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\"}},{\"type\":\"List\",\"props\":{\"var\":\"listSelectedTalents\",\"vScrollBarSkin\":\" \",\"top\":110,\"spaceY\":30,\"right\":10,\"repeatY\":3,\"name\":\"listSelectedTalents\",\"left\":10,\"bottom\":10},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":20,\"right\":10,\"renderType\":\"render\",\"left\":10,\"height\":160},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade1\",\"height\":160},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade2\",\"height\":160},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#b17cff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade3\",\"height\":160},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#ffce45\"}}]},{\"type\":\"Label\",\"props\":{\"text\":\"Title\",\"name\":\"labTitle\",\"left\":52,\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0}},{\"type\":\"Label\",\"props\":{\"y\":10,\"text\":\"descriptipn\",\"right\":33,\"name\":\"labDescription\",\"fontSize\":44,\"font\":\"方正像素12\",\"color\":\"#76979d\",\"centerY\":0}}]}]}]},{\"type\":\"Box\",\"props\":{\"width\":1000,\"name\":\"buttonGroup\",\"height\":200,\"centerX\":0,\"bottom\":90},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":500,\"top\":0,\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"Button\",\"props\":{\"width\":500,\"var\":\"btnRandomAllocate\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnRandomAllocate\",\"label\":\"UI_Random_Allocate\",\"centerY\":0,\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"labelSize\":50,\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]}]},{\"type\":\"Box\",\"props\":{\"width\":500,\"top\":0,\"right\":0,\"bottom\":0},\"child\":[{\"type\":\"Button\",\"props\":{\"width\":500,\"var\":\"btnNext\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnNext\",\"label\":\"UI_Make_New_Life\",\"centerY\":0,\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"labelSize\":50,\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorFilterItem\",\"colorFilter\":\"#ffce45ff\",\"blendMode\":\"lighter\"},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorFilterItem\",\"colorFilter\":\"#ffce45ff\",\"blendMode\":\"lighter\"},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":250,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":4,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]}]}]}]};\n\t\treturn CyberPropertyUI;\n\t})(View);\nvar CyberSummaryUI=(function(_super){\n\t\tfunction CyberSummaryUI(){\n\t\t\t\n\t\t    this.labAge=null;\n\t\t    this.labAgeJudge=null;\n\t\t    this.labTotal=null;\n\t\t    this.labTotalJudge=null;\n\t\t    this.boxCharmGrade=null;\n\t\t    this.prgCharm=null;\n\t\t    this.labCharm=null;\n\t\t    this.labCharmJudge=null;\n\t\t    this.boxIntelligenceGrade=null;\n\t\t    this.prgIntelligence=null;\n\t\t    this.labIntelligence=null;\n\t\t    this.labIntelligenceJudge=null;\n\t\t    this.boxStrengthGrade=null;\n\t\t    this.prgStrength=null;\n\t\t    this.labStrength=null;\n\t\t    this.labStrengthJudge=null;\n\t\t    this.boxMoneyGrade=null;\n\t\t    this.prgMoney=null;\n\t\t    this.labMoney=null;\n\t\t    this.labMoneyJudge=null;\n\t\t    this.boxSpiritGrade=null;\n\t\t    this.prgSpirit=null;\n\t\t    this.labSpirit=null;\n\t\t    this.labSpiritJudge=null;\n\t\t    this.listSelectedTalents=null;\n\t\t    this.btnAgain=null;\n\n\t\t\tCyberSummaryUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CyberSummaryUI,'ui.view.CyberTheme.CyberSummaryUI',_super);\n\t\tvar __proto__=CyberSummaryUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorFilterItem\",Laya.runtime.ColorFilterItem);\n\t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CyberSummaryUI.uiView);\n\n\t\t}\n\n\t\tCyberSummaryUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Box\",\"props\":{\"top\":40,\"right\":0,\"name\":\"title\",\"left\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/accessories/titlebar@3x.png\",\"right\":0,\"left\":0,\"sizeGrid\":\"0,348,116,348\"}},{\"type\":\"HBox\",\"props\":{\"y\":160,\"x\":563,\"space\":30,\"height\":70,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":10,\"x\":1,\"skin\":\"images/accessories/title_left@3x.png\",\"name\":\"left\"}},{\"type\":\"Label\",\"props\":{\"y\":0,\"x\":2,\"text\":\"UI_Title_Summary\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\"}},{\"type\":\"Image\",\"props\":{\"y\":10,\"x\":3,\"skin\":\"images/accessories/title_right@3x.png\",\"name\":\"right\"}}]}]},{\"type\":\"Box\",\"props\":{\"y\":340,\"x\":40,\"top\":340,\"right\":40,\"name\":\"summary\",\"left\":40,\"height\":870},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":-15,\"skin\":\"images/border/border_2@3x.png\",\"right\":-15,\"left\":-15,\"bottom\":-15,\"sizeGrid\":\"75,155,75,155\"}},{\"type\":\"Box\",\"props\":{\"top\":60,\"right\":50,\"left\":50,\"height\":220},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":220,\"left\":20,\"height\":220,\"centerY\":0}},{\"type\":\"Box\",\"props\":{\"top\":0,\"right\":0,\"left\":250,\"height\":100},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":320,\"top\":5,\"left\":5,\"bottom\":5},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"15,15,15,15\"}},{\"type\":\"HBox\",\"props\":{\"left\":20,\"centerY\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":0,\"text\":\"UI_Final_Age\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"x\":1,\"text\":\"UI_Colon\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"var\":\"labAge\",\"text\":\"0\",\"right\":40,\"name\":\"labAge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"width\":220,\"var\":\"labAgeJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labAgeJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"right\":0,\"left\":250,\"height\":100,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":320,\"top\":5,\"left\":5,\"bottom\":5},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"15,15,15,15\"}},{\"type\":\"HBox\",\"props\":{\"left\":20,\"centerY\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":0,\"text\":\"UI_Total_Judge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"x\":1,\"text\":\"UI_Colon\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"var\":\"labTotal\",\"text\":\"0\",\"right\":40,\"name\":\"labTotal\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"width\":220,\"var\":\"labTotalJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labTotalJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]}]},{\"type\":\"VBox\",\"props\":{\"top\":340,\"space\":5,\"right\":50,\"left\":50},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"right\":0,\"name\":\"boxCharm\",\"left\":0,\"height\":90},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_chr@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":170,\"text\":\"UI_Property_Charm\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"var\":\"boxCharmGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxCharmGrade\",\"left\":255,\"bottom\":20},\"child\":[{\"type\":\"ProgressBar\",\"props\":{\"var\":\"prgCharm\",\"value\":0.91,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgCharm\",\"left\":0,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"var\":\"labCharm\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labCharm\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"width\":220,\"var\":\"labCharmJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labCharmJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"y\":1,\"right\":0,\"name\":\"boxIntelligence\",\"left\":0,\"height\":90},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_int@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":170,\"text\":\"UI_Property_Intelligence\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"var\":\"boxIntelligenceGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxIntelligenceGrade\",\"left\":255,\"bottom\":20},\"child\":[{\"type\":\"ProgressBar\",\"props\":{\"var\":\"prgIntelligence\",\"value\":0.57,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgIntelligence\",\"left\":0,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"var\":\"labIntelligence\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labIntelligence\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"width\":220,\"var\":\"labIntelligenceJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labIntelligenceJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"y\":2,\"right\":0,\"name\":\"boxStrength\",\"left\":0,\"height\":90},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_str@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":170,\"text\":\"UI_Property_Strength\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"var\":\"boxStrengthGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxStrengthGrade\",\"left\":255,\"bottom\":20},\"child\":[{\"type\":\"ProgressBar\",\"props\":{\"var\":\"prgStrength\",\"value\":0.235,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgStrength\",\"left\":0,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"var\":\"labStrength\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labStrength\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"width\":220,\"var\":\"labStrengthJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labStrengthJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"y\":3,\"right\":0,\"name\":\"boxMoney\",\"left\":0,\"height\":90},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_mny@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":170,\"text\":\"UI_Property_Money\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"var\":\"boxMoneyGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxMoneyGrade\",\"left\":255,\"bottom\":20},\"child\":[{\"type\":\"ProgressBar\",\"props\":{\"var\":\"prgMoney\",\"value\":0.8,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgMoney\",\"left\":0,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"var\":\"labMoney\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labMoney\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"width\":220,\"var\":\"labMoneyJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labMoneyJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"y\":4,\"right\":0,\"name\":\"boxSpirit\",\"left\":0,\"height\":90},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":120,\"left\":0,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_spr@3x.png\",\"scaleY\":1.1,\"scaleX\":1.1,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"x\":170,\"text\":\"UI_Property_Spirit\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"var\":\"boxSpiritGrade\",\"top\":20,\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":240,\"name\":\"boxSpiritGrade\",\"left\":255,\"bottom\":20},\"child\":[{\"type\":\"ProgressBar\",\"props\":{\"var\":\"prgSpirit\",\"value\":0.37,\"top\":0,\"skin\":\"images/progress/progress_2.png\",\"right\":0,\"name\":\"prgSpirit\",\"left\":0,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"var\":\"labSpirit\",\"text\":\"100\",\"strokeColor\":\"#323232\",\"stroke\":8,\"name\":\"labSpirit\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]},{\"type\":\"Label\",\"props\":{\"width\":220,\"var\":\"labSpiritJudge\",\"text\":\"Judge\",\"right\":0,\"name\":\"labSpiritJudge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#5cc8dc\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"right\":40,\"name\":\"selectedTalents\",\"left\":40,\"height\":700,\"bottom\":410},\"child\":[{\"type\":\"Label\",\"props\":{\"top\":20,\"text\":\"UI_Talent_Extend\",\"left\":20,\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\"}},{\"type\":\"List\",\"props\":{\"var\":\"listSelectedTalents\",\"vScrollBarSkin\":\" \",\"top\":110,\"spaceY\":30,\"right\":10,\"repeatY\":3,\"name\":\"listSelectedTalents\",\"left\":10,\"bottom\":10},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":20,\"right\":10,\"renderType\":\"render\",\"left\":10,\"height\":160},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"name\":\"unselected\",\"left\":0,\"bottom\":0,\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Box\",\"props\":{\"top\":0,\"right\":0,\"name\":\"selected\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":-22,\"x\":0,\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":1800,\"lineWidth\":1,\"height\":204,\"fillColor\":\"#ff0000\"}}]},{\"type\":\"Image\",\"props\":{\"top\":-19,\"skin\":\"images/border/achievement_complete@3x.png\",\"right\":-19,\"left\":-80,\"bottom\":-19,\"sizeGrid\":\"74,80,74,80\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade1\",\"height\":160},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#55fffe\"}}]},{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade2\",\"height\":160},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#b17cff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade3\",\"height\":160},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":160,\"fillColor\":\"#ffce45\"}}]},{\"type\":\"Label\",\"props\":{\"text\":\"Title\",\"name\":\"labTitle\",\"left\":52,\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0}},{\"type\":\"Label\",\"props\":{\"y\":10,\"text\":\"descriptipn\",\"right\":33,\"name\":\"labDescription\",\"fontSize\":44,\"font\":\"方正像素12\",\"color\":\"#76979d\",\"centerY\":0}}]}]}]},{\"type\":\"Box\",\"props\":{\"x\":10,\"width\":1000,\"name\":\"buttonGroup\",\"height\":200,\"centerX\":0,\"bottom\":70},\"child\":[{\"type\":\"Button\",\"props\":{\"y\":100,\"x\":250,\"width\":500,\"var\":\"btnAgain\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnAgain\",\"label\":\"UI_Remake_Again\",\"centerY\":0,\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"labelSize\":50,\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]}]}]};\n\t\treturn CyberSummaryUI;\n\t})(View);\nvar CyberTalentUI=(function(_super){\n\t\tfunction CyberTalentUI(){\n\t\t\t\n\t\t    this.pageDrawCard=null;\n\t\t    this.btnDrawCard=null;\n\t\t    this.pageResult=null;\n\t\t    this.listTalents=null;\n\t\t    this.btnNext=null;\n\n\t\t\tCyberTalentUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CyberTalentUI,'ui.view.CyberTheme.CyberTalentUI',_super);\n\t\tvar __proto__=CyberTalentUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CyberTalentUI.uiView);\n\n\t\t}\n\n\t\tCyberTalentUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Box\",\"props\":{\"var\":\"pageDrawCard\",\"top\":0,\"right\":0,\"name\":\"pageDrawCard\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":1117,\"x\":562,\"width\":2,\"height\":2,\"centerY\":-100,\"centerX\":0},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":1,\"x\":1,\"width\":100,\"source\":\"view/CyberTheme/animation/lightRotation.ani\",\"height\":100,\"autoPlay\":true}},{\"type\":\"Image\",\"props\":{\"y\":585,\"skin\":\"images/border/card@3x.png\",\"scaleY\":0.9,\"scaleX\":0.9,\"rotation\":15,\"centerY\":-50,\"centerX\":0,\"anchorY\":1.2,\"anchorX\":0.5,\"alpha\":0.8}},{\"type\":\"Image\",\"props\":{\"y\":634,\"skin\":\"images/border/card@3x.png\",\"scaleY\":0.9,\"scaleX\":0.9,\"rotation\":-15,\"centerY\":-50,\"centerX\":0,\"anchorY\":1.2,\"anchorX\":0.5,\"alpha\":0.8}},{\"type\":\"Image\",\"props\":{\"y\":634,\"skin\":\"images/border/card@3x.png\",\"centerY\":-50,\"centerX\":0,\"anchorY\":1.2,\"anchorX\":0.5,\"alpha\":0.8}},{\"type\":\"Image\",\"props\":{\"skin\":\"images/accessories/cardicon@3x.png\",\"centerY\":-30,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Button\",\"props\":{\"y\":1930,\"x\":563,\"width\":657,\"var\":\"btnDrawCard\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnDrawCard\",\"labelSize\":60,\"label\":\"UI_Talent_Draw\",\"height\":192,\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":93,\"x\":330,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":5,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":625,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":569,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":316,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":493,\"width\":120,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":487,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":613,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":632,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":621,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,305,0,311,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":330,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":4,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"var\":\"pageResult\",\"top\":0,\"right\":0,\"name\":\"pageResult\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"List\",\"props\":{\"width\":1085,\"var\":\"listTalents\",\"vScrollBarSkin\":\" \",\"top\":310,\"name\":\"listTalents\",\"centerX\":0,\"bottom\":370},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":537,\"renderType\":\"render\",\"height\":352},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/talent_item@3x.png\",\"right\":0,\"name\":\"unselected\",\"left\":0,\"bottom\":0}},{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/talent_item_selected@3x.png\",\"right\":0,\"name\":\"selected\",\"left\":0,\"bottom\":3,\"sizeGrid\":\"106,150,74,150\"}},{\"type\":\"HBox\",\"props\":{\"top\":104,\"space\":15,\"name\":\"hboxTitle\",\"left\":66,\"height\":58},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":15,\"name\":\"grades\",\"height\":58},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade1\",\"height\":58},\"child\":[{\"type\":\"Sprite\",\"props\":{},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":58,\"fillColor\":\"#55fffe\"}}]}]},{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade2\",\"height\":58},\"child\":[{\"type\":\"Sprite\",\"props\":{},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":58,\"fillColor\":\"#b17cff\"}}]}]},{\"type\":\"Box\",\"props\":{\"width\":15,\"name\":\"grade3\",\"height\":58},\"child\":[{\"type\":\"Sprite\",\"props\":{},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":15,\"lineWidth\":1,\"height\":58,\"fillColor\":\"#ffce45\"}}]}]}]},{\"type\":\"Label\",\"props\":{\"x\":1,\"text\":\"Title\",\"name\":\"labTitle\",\"fontSize\":58,\"font\":\"方正像素12\",\"color\":\"#ffffff\"}}]},{\"type\":\"Label\",\"props\":{\"y\":205,\"wordWrap\":true,\"text\":\"description\",\"right\":66,\"name\":\"labDescription\",\"left\":66,\"leading\":8,\"fontSize\":44,\"font\":\"方正像素12\",\"color\":\"#9dacaf\"}}]}]},{\"type\":\"Box\",\"props\":{\"right\":0,\"left\":0,\"height\":1,\"bottom\":0},\"child\":[{\"type\":\"Button\",\"props\":{\"width\":1040,\"var\":\"btnNext\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnNext\",\"labelSize\":60,\"label\":\"UI_Next\",\"height\":192,\"centerY\":-180,\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":96,\"x\":520,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":7,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":1010,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":954,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":700,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":877,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":871,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":998,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":1017,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":1004,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,687,0,693,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]}]}]},{\"type\":\"Box\",\"props\":{\"top\":40,\"right\":0,\"name\":\"title\",\"left\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/accessories/titlebar@3x.png\",\"right\":0,\"left\":0,\"sizeGrid\":\"0,348,116,348\"}},{\"type\":\"HBox\",\"props\":{\"y\":160,\"x\":563,\"space\":30,\"height\":70,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":10,\"x\":1,\"skin\":\"images/accessories/title_left@3x.png\",\"name\":\"left\"}},{\"type\":\"Label\",\"props\":{\"y\":0,\"x\":2,\"text\":\"UI_Title_Talent\",\"fontSize\":60,\"font\":\"方正像素12\",\"color\":\"#ffffff\"}},{\"type\":\"Image\",\"props\":{\"y\":10,\"x\":3,\"skin\":\"images/accessories/title_right@3x.png\",\"name\":\"right\"}}]}]}]};\n\t\treturn CyberTalentUI;\n\t})(View);\nvar CyberTrajectoryUI=(function(_super){\n\t\tfunction CyberTrajectoryUI(){\n\t\t\t\n\t\t    this.labCharm=null;\n\t\t    this.labMoney=null;\n\t\t    this.labIntelligence=null;\n\t\t    this.labStrength=null;\n\t\t    this.labSpirit=null;\n\t\t    this.btnSummary=null;\n\t\t    this.boxSpeed=null;\n\t\t    this.prgSpeed=null;\n\t\t    this.scbSpeed=null;\n\t\t    this.panelTrajectory=null;\n\t\t    this.vboxTrajectory=null;\n\t\t    this.btnUp=null;\n\t\t    this.btnDown=null;\n\t\t    this.boxParticle=null;\n\n\t\t\tCyberTrajectoryUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CyberTrajectoryUI,'ui.view.CyberTheme.CyberTrajectoryUI',_super);\n\t\tvar __proto__=CyberTrajectoryUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\t\t\tView.regComponent(\"Particle2D\",laya.particle.Particle2D);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CyberTrajectoryUI.uiView);\n\n\t\t}\n\n\t\tCyberTrajectoryUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Sprite\",\"props\":{\"y\":0,\"x\":0},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":1125,\"lineWidth\":1,\"height\":2436,\"fillColor\":\"#04131f\"}}]},{\"type\":\"Box\",\"props\":{\"top\":126,\"right\":20,\"left\":20,\"height\":275},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":-13,\"skin\":\"images/border/border_2@3x.png\",\"right\":-13,\"left\":-13,\"bottom\":-13,\"sizeGrid\":\"75,155,75,155\"}},{\"type\":\"Box\",\"props\":{\"width\":192,\"left\":36,\"height\":192,\"centerY\":0}},{\"type\":\"VBox\",\"props\":{\"space\":13,\"right\":45,\"left\":242,\"centerY\":0,\"align\":\"left\"},\"child\":[{\"type\":\"HBox\",\"props\":{\"y\":1,\"space\":13,\"align\":\"middle\"},\"child\":[{\"type\":\"Box\",\"props\":{\"x\":1,\"width\":260,\"name\":\"boxCharm\",\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"15,15,15,15\"}},{\"type\":\"Box\",\"props\":{\"width\":82,\"left\":5,\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_chr@3x.png\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Property_Charm\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labCharm\",\"text\":\"10\",\"name\":\"labCharm\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":2,\"width\":260,\"name\":\"boxMoney\",\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"15,15,15,15\"}},{\"type\":\"Box\",\"props\":{\"width\":82,\"left\":5,\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_mny@3x.png\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Property_Money\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labMoney\",\"text\":\"10\",\"name\":\"labMoney\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"x\":3,\"width\":260,\"name\":\"boxIntelligence\",\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"15,15,15,15\"}},{\"type\":\"Box\",\"props\":{\"width\":82,\"left\":5,\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_int@3x.png\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Property_Intelligence\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labIntelligence\",\"text\":\"10\",\"name\":\"labIntelligence\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}}]}]}]},{\"type\":\"HBox\",\"props\":{\"y\":2,\"space\":13,\"align\":\"middle\"},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":260,\"name\":\"boxStrength\",\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"15,15,15,15\"}},{\"type\":\"Box\",\"props\":{\"width\":82,\"left\":5,\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_str@3x.png\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Property_Strength\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labStrength\",\"text\":\"10\",\"name\":\"labStrength\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"width\":260,\"name\":\"boxSpirit\",\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":-10,\"x\":-5,\"top\":0,\"skin\":\"images/border/property@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"15,15,15,15\"}},{\"type\":\"Box\",\"props\":{\"width\":82,\"left\":5,\"height\":82},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_spr@3x.png\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Property_Spirit\",\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"y\":0,\"width\":82,\"right\":5,\"height\":82},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labSpirit\",\"text\":\"10\",\"name\":\"labSpirit\",\"fontSize\":55,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":5,\"anchorX\":0.5}}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"right\":0,\"left\":0,\"height\":1,\"bottom\":-1},\"child\":[{\"type\":\"Button\",\"props\":{\"y\":-155,\"width\":500,\"var\":\"btnSummary\",\"skin\":\"images/button/button_main@3x.png\",\"name\":\"btnSummary\",\"label\":\"UI_Goto_Summary\",\"centerX\":0,\"stateNum\":1,\"anchorX\":0.5,\"anchorY\":0.5,\"sizeGrid\":\"45,200,45,200\",\"labelFont\":\"方正像素12\",\"labelColors\":\"#00fffc,#00fffc,#00fffc\",\"labelSize\":50,\"runtime\":\"Laya.runtime.ScaleButton\"},\"child\":[{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":96,\"x\":250,\"width\":0,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"scaleX\":4,\"height\":0,\"blendMode\":\"lighter\",\"autoPlay\":true}},{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":25,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":37,\"x\":470,\"width\":7,\"lineWidth\":1,\"height\":116,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":44,\"width\":414,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":171,\"width\":160,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":44,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":163,\"x\":337,\"width\":121,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":148,\"x\":29,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":150,\"x\":331,\"width\":19,\"rotation\":55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":166,\"x\":160,\"width\":19,\"rotation\":-55,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":21,\"x\":458,\"width\":25,\"rotation\":40,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":26,\"x\":48,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}},{\"type\":\"Rect\",\"props\":{\"y\":153,\"x\":477,\"width\":25,\"rotation\":140,\"lineWidth\":1,\"height\":6,\"fillColor\":\"#ff0000\"}}]}]},{\"type\":\"Box\",\"props\":{},\"child\":[{\"type\":\"Box\",\"props\":{\"renderType\":\"mask\"},\"child\":[{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":35,\"points\":\"0,0,8,-6,8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":41,\"x\":464,\"points\":\"0,0,-8,-6,-8,113,0,107\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}},{\"type\":\"Poly\",\"props\":{\"y\":160,\"x\":177,\"points\":\"0,0,147,0,153,10,-6,10\",\"lineWidth\":1,\"lineColor\":\"#ff0000\",\"fillColor\":\"#00ffff\"}}]},{\"type\":\"Animation\",\"props\":{\"y\":172,\"x\":520,\"source\":\"view/CyberTheme/animation/bottomBreath.ani\",\"scaleX\":6,\"blendMode\":\"lighter\",\"autoPlay\":true}}]}]},{\"type\":\"Box\",\"props\":{\"y\":-155,\"var\":\"boxSpeed\",\"right\":100,\"name\":\"boxSpeed\",\"left\":100,\"height\":150,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"ProgressBar\",\"props\":{\"var\":\"prgSpeed\",\"skin\":\"images/progress/progress_s.png\",\"right\":0,\"name\":\"prgSpeed\",\"left\":0,\"bottom\":0}},{\"type\":\"HScrollBar\",\"props\":{\"var\":\"scbSpeed\",\"skin\":\"images/slider/hslider_s.png\",\"right\":0,\"name\":\"scbSpeed\",\"min\":0,\"max\":1000,\"left\":0,\"height\":60,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Manual\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bottom\":70}},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Auto\",\"right\":0,\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#55fffe\",\"bottom\":70}}]}]},{\"type\":\"Box\",\"props\":{\"top\":440,\"right\":20,\"left\":20,\"bottom\":250},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/border_1@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"130,130,130,130\"}},{\"type\":\"Panel\",\"props\":{\"var\":\"panelTrajectory\",\"vScrollBarSkin\":\"images/slider/vslider_1@3x.png\",\"top\":80,\"right\":20,\"name\":\"panelTrajectory\",\"left\":0,\"bottom\":80},\"child\":[{\"type\":\"VBox\",\"props\":{\"var\":\"vboxTrajectory\",\"top\":0,\"right\":40,\"name\":\"vboxTrajectory\",\"left\":20},\"child\":[{\"type\":\"Box\",\"props\":{\"right\":0,\"name\":\"boxTrajectoryItem\",\"left\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"width\":10,\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"boxGrade\",\"left\":0,\"height\":50}},{\"type\":\"HBox\",\"props\":{\"y\":0,\"x\":220,\"name\":\"hboxAge\",\"anchorX\":1,\"align\":\"middle\"},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":0,\"text\":\"3000\",\"name\":\"labAge\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#cfea5c\",\"anchorX\":0}},{\"type\":\"Label\",\"props\":{\"x\":1,\"text\":\"岁\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#cfea5c\",\"anchorX\":0}},{\"type\":\"Label\",\"props\":{\"x\":2,\"text\":\"：\",\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#cfea5c\",\"anchorX\":0}}]},{\"type\":\"Label\",\"props\":{\"wordWrap\":true,\"text\":\"你的父母开始辅导你数学和英语，智力+1\",\"right\":0,\"name\":\"labContent\",\"left\":240,\"leading\":44,\"fontSize\":50,\"font\":\"方正像素12\",\"color\":\"#ffffff\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":20,\"x\":20,\"var\":\"btnUp\",\"top\":20,\"right\":20,\"name\":\"btnUp\",\"left\":20,\"height\":50},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Box\",\"props\":{\"width\":60,\"height\":60,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_up@3x.png\",\"centerY\":0,\"centerX\":0}}]}]},{\"type\":\"Box\",\"props\":{\"y\":1676,\"x\":20,\"var\":\"btnDown\",\"right\":20,\"name\":\"btnDown\",\"left\":20,\"height\":50,\"bottom\":20},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/border/up@3x.png\",\"right\":0,\"left\":0,\"bottom\":0,\"sizeGrid\":\"4,4,4,4\"}},{\"type\":\"Box\",\"props\":{\"width\":60,\"rotation\":180,\"height\":60,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"skin\":\"images/icons/icon_up@3x.png\",\"centerY\":0,\"centerX\":0}}]}]}]},{\"type\":\"Box\",\"props\":{\"width\":10,\"var\":\"boxParticle\",\"name\":\"boxParticle\",\"height\":10,\"centerY\":0,\"centerX\":0},\"child\":[{\"type\":\"Particle2D\",\"props\":{\"y\":5,\"x\":5,\"url\":\"particle/fly.part\",\"autoPlay\":true}}]}]};\n\t\treturn CyberTrajectoryUI;\n\t})(View);\nvar ModeUI=(function(_super){\n\t\tfunction ModeUI(){\n\t\t\t\n\t\t    this.btnCustom=null;\n\t\t    this.btnCelebrity=null;\n\n\t\t\tModeUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(ModeUI,'ui.view.CyberTheme.ModeUI',_super);\n\t\tvar __proto__=ModeUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(ModeUI.uiView);\n\n\t\t}\n\n\t\tModeUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"height\":2436},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":10,\"x\":10,\"width\":600,\"var\":\"btnCustom\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btn\",\"height\":400,\"centerY\":-400,\"centerX\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":-15,\"skin\":\"images/border/achievement_complete@3x.png\",\"right\":-15,\"left\":-15,\"bottom\":-15,\"sizeGrid\":\"74,80,74,80\"}},{\"type\":\"Label\",\"props\":{\"top\":50,\"text\":\"UI_CustomMode\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerX\":0,\"bold\":true}},{\"type\":\"Label\",\"props\":{\"top\":200,\"text\":\"UI_CustomModeDescription\",\"right\":0,\"left\":0,\"leading\":20,\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#bcbcbc\",\"bottom\":0,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"y\":10,\"x\":20,\"width\":600,\"var\":\"btnCelebrity\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btn\",\"height\":400,\"centerY\":400,\"centerX\":0},\"child\":[{\"type\":\"Image\",\"props\":{\"y\":-15,\"x\":-15,\"top\":-15,\"skin\":\"images/border/achievement_complete@3x.png\",\"right\":-15,\"left\":-15,\"bottom\":-15,\"sizeGrid\":\"74,80,74,80\"}},{\"type\":\"Label\",\"props\":{\"top\":50,\"text\":\"UI_CelebrityMode\",\"fontSize\":80,\"font\":\"方正像素12\",\"color\":\"#ffffff\",\"centerX\":0,\"bold\":true}},{\"type\":\"Label\",\"props\":{\"top\":200,\"text\":\"UI_CelebrityModeDescription\",\"right\":0,\"left\":0,\"leading\":20,\"fontSize\":40,\"font\":\"方正像素12\",\"color\":\"#bcbcbc\",\"bottom\":0,\"align\":\"center\"}}]}]};\n\t\treturn ModeUI;\n\t})(View);\nvar AchievementUI=(function(_super){\n\t\tfunction AchievementUI(){\n\t\t\t\n\t\t    this.btnBack=null;\n\t\t    this.boxRemakeTimes=null;\n\t\t    this.labRemakeTimes=null;\n\t\t    this.labRemakeTimesJudge=null;\n\t\t    this.boxAchievementCount=null;\n\t\t    this.labAchievementCount=null;\n\t\t    this.labAchievementCountJudge=null;\n\t\t    this.boxEventRate=null;\n\t\t    this.prgEventRate=null;\n\t\t    this.labEventRate=null;\n\t\t    this.boxTalentRate=null;\n\t\t    this.prgTalentRate=null;\n\t\t    this.labTalentRate=null;\n\t\t    this.btnRank=null;\n\t\t    this.listAchievements=null;\n\n\t\t\tAchievementUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(AchievementUI,'ui.view.DefaultTheme.AchievementUI',_super);\n\t\tvar __proto__=AchievementUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(AchievementUI.uiView);\n\n\t\t}\n\n\t\tAchievementUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":80,\"text\":\"UI_Statistics\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0}},{\"type\":\"Box\",\"props\":{\"width\":260,\"var\":\"btnBack\",\"top\":50,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnBack\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":1028,\"x\":332,\"text\":\"UI_Back\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Box\",\"props\":{\"x\":33,\"width\":1060,\"top\":230,\"height\":540,\"centerX\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":500,\"var\":\"boxRemakeTimes\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"boxRemakeTimes\",\"left\":0,\"height\":240},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labRemakeTimes\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-60,\"bold\":true,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"var\":\"labRemakeTimesJudge\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":60,\"bold\":false,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"width\":500,\"var\":\"boxAchievementCount\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxAchievementCount\",\"height\":240},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labAchievementCount\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-60,\"bold\":true,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"var\":\"labAchievementCountJudge\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":60,\"bold\":false,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"width\":500,\"var\":\"boxEventRate\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"boxEventRate\",\"left\":0,\"height\":240,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":500,\"var\":\"prgEventRate\",\"height\":240,\"blendMode\":\"lighter\",\"alpha\":0.1},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":500,\"lineWidth\":1,\"height\":240,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Event_Collection_Rate\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-60,\"bold\":true,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"var\":\"labEventRate\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":60,\"bold\":false,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"width\":500,\"var\":\"boxTalentRate\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxTalentRate\",\"height\":240,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":500,\"var\":\"prgTalentRate\",\"height\":240,\"blendMode\":\"lighter\",\"alpha\":0.1},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":500,\"lineWidth\":1,\"height\":240,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Talent_Collection_Rate\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-60,\"bold\":true,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"var\":\"labTalentRate\",\"text\":\"label\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":60,\"bold\":false,\"align\":\"center\"}}]}]},{\"type\":\"Box\",\"props\":{\"width\":1060,\"top\":800,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"hr\",\"height\":10,\"centerX\":0}},{\"type\":\"Label\",\"props\":{\"top\":870,\"text\":\"UI_Achievement\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0}},{\"type\":\"Box\",\"props\":{\"x\":945,\"width\":260,\"var\":\"btnRank\",\"top\":870,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnRank\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Rank\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"List\",\"props\":{\"width\":1080,\"var\":\"listAchievements\",\"vScrollBarSkin\":\" \",\"top\":1000,\"spaceY\":60,\"spaceX\":60,\"repeatX\":2,\"name\":\"listAchievements\",\"centerX\":0,\"bottom\":35},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":10,\"x\":10,\"width\":500,\"runtime\":\"Laya.runtime.ColorfulBox\",\"renderType\":\"render\",\"height\":320},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"label\",\"right\":0,\"name\":\"name\",\"left\":0,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-80,\"bold\":true,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"text\":\"label\",\"right\":0,\"name\":\"description\",\"left\":0,\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":80,\"bold\":false,\"anchorY\":0,\"anchorX\":0,\"align\":\"center\"}},{\"type\":\"Box\",\"props\":{\"width\":500,\"name\":\"boxMask\",\"height\":320,\"alpha\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":500,\"lineWidth\":1,\"height\":320,\"fillColor\":\"#000000\"}}]}]}]}]};\n\t\treturn AchievementUI;\n\t})(View);\nvar AchievementPopupUI=(function(_super){\n\t\tfunction AchievementPopupUI(){\n\t\t\t\n\t\t    this.boxBg=null;\n\t\t    this.bg1=null;\n\t\t    this.labName=null;\n\n\t\t\tAchievementPopupUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(AchievementPopupUI,'ui.view.DefaultTheme.AchievementPopupUI',_super);\n\t\tvar __proto__=AchievementPopupUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(AchievementPopupUI.uiView);\n\n\t\t}\n\n\t\tAchievementPopupUI.uiView={\"type\":\"View\",\"props\":{\"y\":50,\"width\":570,\"mouseThrough\":true,\"mouseEnabled\":false,\"height\":150,\"alpha\":0.75},\"child\":[{\"type\":\"Box\",\"props\":{\"var\":\"boxBg\",\"top\":0,\"right\":0,\"name\":\"boxBg\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":560,\"width\":10,\"lineWidth\":1,\"height\":150,\"fillColor\":\"#84ff55\"}},{\"type\":\"Box\",\"props\":{\"var\":\"bg1\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":10,\"left\":0,\"bottom\":0}}]},{\"type\":\"Label\",\"props\":{\"y\":10,\"text\":\"UI_Achievement_Achieve\",\"left\":40,\"fontSize\":40,\"font\":\"SimHei\",\"color\":\"#84ff55\",\"bold\":true}},{\"type\":\"Label\",\"props\":{\"var\":\"labName\",\"text\":\"Achievement\",\"name\":\"labName\",\"left\":40,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#cccccc\",\"centerY\":30}}]};\n\t\treturn AchievementPopupUI;\n\t})(View);\nvar CelebrityUI=(function(_super){\n\t\tfunction CelebrityUI(){\n\t\t\t\n\t\t    this.panelCharacter=null;\n\t\t    this.vboxCharacter=null;\n\t\t    this.btnRetry=null;\n\t\t    this.btnNext=null;\n\n\t\t\tCelebrityUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(CelebrityUI,'ui.view.DefaultTheme.CelebrityUI',_super);\n\t\tvar __proto__=CelebrityUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(CelebrityUI.uiView);\n\n\t\t}\n\n\t\tCelebrityUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"height\":2436},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":80,\"text\":\"UI_Title_Celebrity\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0}},{\"type\":\"Panel\",\"props\":{\"var\":\"panelCharacter\",\"vScrollBarSkin\":\" \",\"top\":200,\"right\":0,\"name\":\"panelCharacter\",\"left\":0,\"bottom\":700},\"child\":[{\"type\":\"VBox\",\"props\":{\"y\":10,\"width\":1000,\"var\":\"vboxCharacter\",\"space\":20,\"name\":\"vboxCharacter\",\"centerX\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"right\":0,\"name\":\"boxCharacter\",\"left\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxName\",\"left\":0,\"height\":100},\"child\":[{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"}}]},{\"type\":\"VBox\",\"props\":{\"top\":100,\"space\":20,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":25,\"name\":\"vboxStates\",\"left\":25},\"child\":[{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"height\":100,\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"align\":\"center\"}}]}]},{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":25,\"name\":\"boxTalent\",\"left\":25,\"height\":100},\"child\":[{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"颜值10 智力10 体质10 家境Π\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"y\":10,\"x\":10,\"right\":0,\"name\":\"boxUniqueUnGenerate\",\"left\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxName\",\"left\":0,\"height\":100},\"child\":[{\"type\":\"Label\",\"props\":{\"valign\":\"middle\",\"text\":\"UI_UniqueWaTaShi\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"align\":\"center\"}}]},{\"type\":\"VBox\",\"props\":{\"top\":100,\"space\":20,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":25,\"name\":\"vboxStates\",\"left\":25},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":1,\"valign\":\"middle\",\"text\":\"UI_UniqueWaTaShiContent\",\"right\":0,\"name\":\"label\",\"left\":0,\"leading\":30,\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"align\":\"center\"}},{\"type\":\"Box\",\"props\":{\"y\":2,\"right\":0,\"name\":\"boxBtn\",\"left\":0,\"height\":150},\"child\":[{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btn\",\"left\":50,\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":30,\"x\":290,\"text\":\"UI_GenerateNow\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"width\":480,\"var\":\"btnRetry\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnRetry\",\"height\":150,\"centerX\":0,\"bottom\":400},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_AllNot\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Box\",\"props\":{\"width\":480,\"var\":\"btnNext\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnNext\",\"height\":150,\"centerX\":0,\"bottom\":150},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Make_New_Life\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]}]};\n\t\treturn CelebrityUI;\n\t})(View);\nvar MainUI=(function(_super){\n\t\tfunction MainUI(){\n\t\t\t\n\t\t    this.labSubTitle=null;\n\t\t    this.btnRemake=null;\n\t\t    this.btnThanks=null;\n\t\t    this.btnAchievement=null;\n\t\t    this.btnGithub=null;\n\t\t    this.btnDiscord=null;\n\t\t    this.btnSaveLoad=null;\n\t\t    this.btnThemes=null;\n\t\t    this.banner=null;\n\n\t\t\tMainUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(MainUI,'ui.view.DefaultTheme.MainUI',_super);\n\t\tvar __proto__=MainUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(MainUI.uiView);\n\n\t\t}\n\n\t\tMainUI.uiView={\"type\":\"View\",\"props\":{\"y\":1218,\"x\":562,\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Title_Remake\",\"name\":\"title\",\"fontSize\":130,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":-260,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Label\",\"props\":{\"wordWrap\":true,\"var\":\"labSubTitle\",\"text\":\"UI_Title_Subsequent\",\"right\":0,\"name\":\"title\",\"left\":0,\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#999999\",\"centerY\":-120,\"anchorY\":0.5,\"anchorX\":0.5,\"align\":\"center\"}},{\"type\":\"Box\",\"props\":{\"width\":600,\"var\":\"btnRemake\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnRemake\",\"height\":150,\"centerY\":600,\"centerX\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Remake\",\"name\":\"label\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Box\",\"props\":{\"width\":260,\"var\":\"btnThanks\",\"top\":50,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnSmall\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Thanks\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"width\":260,\"var\":\"btnAchievement\",\"top\":180,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnSmall\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Achievement\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":160,\"var\":\"btnGithub\",\"runtime\":\"Laya.runtime.ScaleButton\",\"rotation\":-45,\"name\":\"btnGithub\",\"height\":160,\"anchorY\":0,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":-70,\"width\":300,\"lineWidth\":1,\"height\":140,\"fillColor\":\"#000000\"}},{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/icons/icon_github.png\",\"rotation\":0,\"right\":0,\"left\":0,\"bottom\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":-70,\"width\":300,\"renderType\":\"hit\",\"lineWidth\":1,\"height\":140,\"fillColor\":\"#000000\"}},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":-70,\"renderType\":\"mask\"},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":300,\"lineWidth\":1,\"height\":140,\"fillColor\":\"#000000\"}}]}]},{\"type\":\"Box\",\"props\":{\"width\":160,\"left\":50,\"height\":160,\"bottom\":50},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":160,\"var\":\"btnDiscord\",\"runtime\":\"Laya.runtime.ScaleButton\",\"name\":\"btnDiscord\",\"height\":160,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"top\":0,\"skin\":\"images/icons/icon_discord.png\",\"right\":0,\"left\":0,\"bottom\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"y\":2201,\"x\":1020,\"width\":110,\"var\":\"btnSaveLoad\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnSmall\",\"height\":110,\"bottom\":180,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"width\":80,\"skin\":\"images/icons/icon_save.png\",\"height\":80,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnThemes\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnThemes\",\"height\":110,\"bottom\":50,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Image\",\"props\":{\"width\":90,\"skin\":\"images/icons/icon_themes.png\",\"height\":90,\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Box\",\"props\":{\"x\":562,\"var\":\"banner\",\"centerX\":0,\"bottom\":100,\"anchorY\":1,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Banner\",\"name\":\"title\",\"fontSize\":40,\"font\":\"SimHei\",\"color\":\"#ffffff\"}}]}]};\n\t\treturn MainUI;\n\t})(View);\nvar ModeUI=(function(_super){\n\t\tfunction ModeUI(){\n\t\t\t\n\t\t    this.btnCustom=null;\n\t\t    this.btnCelebrity=null;\n\n\t\t\tModeUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(ModeUI,'ui.view.DefaultTheme.ModeUI',_super);\n\t\tvar __proto__=ModeUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\t\t\tView.regComponent(\"Laya.runtime.ColorAgentLabel\",Laya.runtime.ColorAgentLabel);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(ModeUI.uiView);\n\n\t\t}\n\n\t\tModeUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"height\":2436},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":600,\"var\":\"btnCustom\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btn\",\"height\":400,\"centerY\":-400,\"centerX\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"top\":50,\"text\":\"UI_CustomMode\",\"name\":\"font_default\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"bold\":true}},{\"type\":\"Label\",\"props\":{\"top\":200,\"text\":\"UI_CustomModeDescription\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"leading\":20,\"fontSize\":40,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"runtime\":\"Laya.runtime.ColorAgentLabel\",\"name\":\"label\"}}]},{\"type\":\"Box\",\"props\":{\"x\":10,\"width\":600,\"var\":\"btnCelebrity\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btn\",\"height\":400,\"centerY\":400,\"centerX\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"top\":50,\"text\":\"UI_CelebrityMode\",\"name\":\"font_default\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"bold\":true}},{\"type\":\"Label\",\"props\":{\"top\":200,\"text\":\"UI_CelebrityModeDescription\",\"right\":0,\"name\":\"font_default\",\"left\":0,\"leading\":20,\"fontSize\":40,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"y\":10,\"x\":10,\"runtime\":\"Laya.runtime.ColorAgentLabel\",\"name\":\"label\"}}]}]};\n\t\treturn ModeUI;\n\t})(View);\nvar PropertyUI=(function(_super){\n\t\tfunction PropertyUI(){\n\t\t\t\n\t\t    this.title=null;\n\t\t    this.labLeftPropertyPoint=null;\n\t\t    this.boxCharm=null;\n\t\t    this.boxCharmAllocate=null;\n\t\t    this.btnCharmReduce=null;\n\t\t    this.inputCharm=null;\n\t\t    this.btnCharmIncrease=null;\n\t\t    this.boxIntelligence=null;\n\t\t    this.boxIntelligenceAllocate=null;\n\t\t    this.btnIntelligenceReduce=null;\n\t\t    this.inputIntelligence=null;\n\t\t    this.btnIntelligenceIncrease=null;\n\t\t    this.boxStrength=null;\n\t\t    this.boxStrengthAllocate=null;\n\t\t    this.btnStrengthReduce=null;\n\t\t    this.inputStrength=null;\n\t\t    this.btnStrengthIncrease=null;\n\t\t    this.boxMoney=null;\n\t\t    this.boxMoneyAllocate=null;\n\t\t    this.btnMoneyReduce=null;\n\t\t    this.inputMoney=null;\n\t\t    this.btnMoneyIncrease=null;\n\t\t    this.listSelectedTalents=null;\n\t\t    this.btnRandomAllocate=null;\n\t\t    this.btnNext=null;\n\n\t\t\tPropertyUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(PropertyUI,'ui.view.DefaultTheme.PropertyUI',_super);\n\t\tvar __proto__=PropertyUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorFilterItem\",Laya.runtime.ColorFilterItem);\n\t\t\tView.regComponent(\"Laya.runtime.ScaleButton\",Laya.runtime.ScaleButton);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(PropertyUI.uiView);\n\n\t\t}\n\n\t\tPropertyUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":80,\"var\":\"title\",\"text\":\"UI_Title_Property\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0}},{\"type\":\"Box\",\"props\":{\"top\":230,\"right\":40,\"name\":\"propertyAllocate\",\"left\":40,\"height\":1100},\"child\":[{\"type\":\"HBox\",\"props\":{\"top\":0,\"height\":100,\"centerX\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":0,\"text\":\"UI_Left_Property_Point\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0}},{\"type\":\"Label\",\"props\":{\"x\":1,\"text\":\"UI_Colon\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0}},{\"type\":\"Label\",\"props\":{\"x\":2,\"var\":\"labLeftPropertyPoint\",\"text\":\"0\",\"name\":\"font_default\",\"fontSize\":70,\"color\":\"#ffffff\",\"centerY\":0}}]},{\"type\":\"VBox\",\"props\":{\"top\":200,\"space\":100,\"right\":50,\"left\":50},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"var\":\"boxCharm\",\"right\":0,\"left\":0,\"height\":130},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":183,\"text\":\"UI_Property_Charm\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"width\":590,\"var\":\"boxCharmAllocate\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":30,\"name\":\"property\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnCharmReduce\",\"name\":\"btnCharmReduce\",\"left\":0,\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\"child\":[{\"type\":\"TextInput\",\"props\":{\"var\":\"inputCharm\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputCharm\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnCharmIncrease\",\"right\":0,\"name\":\"btnCharmIncrease\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":1,\"var\":\"boxIntelligence\",\"right\":0,\"left\":0,\"height\":130},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":183,\"text\":\"UI_Property_Intelligence\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"width\":590,\"var\":\"boxIntelligenceAllocate\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":30,\"name\":\"property\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnIntelligenceReduce\",\"name\":\"btnIntelligenceReduce\",\"left\":0,\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\"child\":[{\"type\":\"TextInput\",\"props\":{\"var\":\"inputIntelligence\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputIntelligence\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnIntelligenceIncrease\",\"right\":0,\"name\":\"btnIntelligenceIncrease\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":2,\"var\":\"boxStrength\",\"right\":0,\"left\":0,\"height\":130},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":183,\"text\":\"UI_Property_Strength\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"width\":590,\"var\":\"boxStrengthAllocate\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":30,\"name\":\"property\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnStrengthReduce\",\"name\":\"btnStrengthReduce\",\"left\":0,\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\"child\":[{\"type\":\"TextInput\",\"props\":{\"var\":\"inputStrength\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputStrength\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnStrengthIncrease\",\"right\":0,\"name\":\"btnStrengthIncrease\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":3,\"var\":\"boxMoney\",\"right\":0,\"left\":0,\"height\":130},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":183,\"text\":\"UI_Property_Money\",\"name\":\"font_default\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"width\":590,\"var\":\"boxMoneyAllocate\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":30,\"name\":\"property\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnMoneyReduce\",\"name\":\"btnMoneyReduce\",\"left\":0,\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":110,\"top\":0,\"right\":110,\"left\":110,\"bottom\":0},\"child\":[{\"type\":\"TextInput\",\"props\":{\"var\":\"inputMoney\",\"type\":\"number\",\"top\":0,\"text\":\"0\",\"right\":0,\"promptColor\":\"#828282\",\"prompt\":0,\"name\":\"inputMoney\",\"maxChars\":1,\"left\":0,\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":0,\"align\":\"center\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":370,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"var\":\"btnMoneyIncrease\",\"right\":0,\"name\":\"btnMoneyIncrease\",\"height\":110,\"centerY\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":110,\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":106,\"x\":0,\"width\":110,\"lineWidth\":1,\"height\":4,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}},{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":106,\"width\":4,\"lineWidth\":1,\"height\":110,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":110,\"runtime\":\"Laya.runtime.ScaleButton\",\"height\":110,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":48,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]},{\"type\":\"Box\",\"props\":{\"width\":48,\"rotation\":90,\"height\":12,\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Rect\",\"props\":{\"y\":0,\"x\":0,\"width\":48,\"lineWidth\":1,\"height\":12,\"fillColor\":\"#ffffff\"}}]}]}]}]}]}]}]},{\"type\":\"Box\",\"props\":{\"right\":40,\"name\":\"selectedTalents\",\"left\":40,\"height\":450,\"bottom\":300},\"child\":[{\"type\":\"Label\",\"props\":{\"top\":20,\"text\":\"UI_Selected_Talent\",\"name\":\"font_default\",\"left\":20,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\"}},{\"type\":\"List\",\"props\":{\"var\":\"listSelectedTalents\",\"vScrollBarSkin\":\" \",\"top\":110,\"spaceY\":20,\"right\":10,\"repeatY\":3,\"repeatX\":1,\"name\":\"listSelectedTalents\",\"left\":10,\"bottom\":10},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":15,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":15,\"renderType\":\"render\",\"left\":15,\"height\":80},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":20,\"text\":\"Title\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]}]}]},{\"type\":\"HBox\",\"props\":{\"space\":40,\"name\":\"buttonGroup\",\"height\":150,\"centerX\":0,\"bottom\":90},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":480,\"var\":\"btnRandomAllocate\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnRandomAllocate\",\"bottom\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Random_Allocate\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Box\",\"props\":{\"x\":1,\"width\":480,\"var\":\"btnNext\",\"top\":0,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnNext\",\"bottom\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Make_New_Life\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]}]}]};\n\t\treturn PropertyUI;\n\t})(View);\nvar SummaryUI=(function(_super){\n\t\tfunction SummaryUI(){\n\t\t\t\n\t\t    this.title=null;\n\t\t    this.listSummary=null;\n\t\t    this.listSelectedTalents=null;\n\t\t    this.btnAgain=null;\n\n\t\t\tSummaryUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(SummaryUI,'ui.view.DefaultTheme.SummaryUI',_super);\n\t\tvar __proto__=SummaryUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\t\t\tView.regComponent(\"Laya.runtime.BlankBox\",Laya.runtime.BlankBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(SummaryUI.uiView);\n\n\t\t}\n\n\t\tSummaryUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":80,\"var\":\"title\",\"text\":\"UI_Title_Summary\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0}},{\"type\":\"Box\",\"props\":{\"top\":230,\"right\":40,\"name\":\"summary\",\"left\":40,\"bottom\":800},\"child\":[{\"type\":\"List\",\"props\":{\"var\":\"listSummary\",\"top\":0,\"spaceY\":20,\"right\":0,\"repeatY\":7,\"repeatX\":1,\"name\":\"listSummary\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":15,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":15,\"renderType\":\"render\",\"left\":15,\"height\":160},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":20,\"text\":\"Title\",\"name\":\"label\",\"left\":100,\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0}}]}]}]},{\"type\":\"Box\",\"props\":{\"right\":40,\"name\":\"selectedTalents\",\"left\":40,\"height\":450,\"bottom\":300},\"child\":[{\"type\":\"Label\",\"props\":{\"top\":20,\"text\":\"UI_Talent_Extend\",\"name\":\"font_default\",\"left\":20,\"fontSize\":50,\"color\":\"#ffffff\"}},{\"type\":\"List\",\"props\":{\"var\":\"listSelectedTalents\",\"vScrollBarSkin\":\" \",\"top\":110,\"spaceY\":20,\"right\":0,\"repeatY\":3,\"repeatX\":1,\"name\":\"listSelectedTalents\",\"left\":0,\"bottom\":10},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":15,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":15,\"renderType\":\"render\",\"left\":15,\"height\":80},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":20,\"text\":\"Title\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}},{\"type\":\"Box\",\"props\":{\"top\":0,\"runtime\":\"Laya.runtime.BlankBox\",\"right\":0,\"name\":\"blank\",\"left\":0,\"bottom\":0,\"alpha\":0.3}}]}]}]},{\"type\":\"Box\",\"props\":{\"right\":1,\"name\":\"buttonGroup\",\"left\":1,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":600,\"var\":\"btnAgain\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnAgain\",\"height\":150,\"centerX\":0,\"bottom\":100},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Remake_Again\",\"name\":\"label\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]}]}]};\n\t\treturn SummaryUI;\n\t})(View);\nvar TalentUI=(function(_super){\n\t\tfunction TalentUI(){\n\t\t\t\n\t\t    this.title=null;\n\t\t    this.pageDrawCard=null;\n\t\t    this.btnDrawCard=null;\n\t\t    this.pageResult=null;\n\t\t    this.listTalents=null;\n\t\t    this.btnNext=null;\n\n\t\t\tTalentUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(TalentUI,'ui.view.DefaultTheme.TalentUI',_super);\n\t\tvar __proto__=TalentUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\t\t\tView.regComponent(\"Laya.runtime.BlankBox\",Laya.runtime.BlankBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(TalentUI.uiView);\n\n\t\t}\n\n\t\tTalentUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":80,\"var\":\"title\",\"text\":\"UI_Title_Talent\",\"name\":\"title\",\"fontSize\":80,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0}},{\"type\":\"Box\",\"props\":{\"var\":\"pageDrawCard\",\"top\":0,\"right\":0,\"name\":\"pageDrawCard\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":600,\"var\":\"btnDrawCard\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnDrawCard\",\"height\":150,\"centerY\":0,\"centerX\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Talent_Draw\",\"name\":\"label\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]}]},{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"var\":\"pageResult\",\"top\":0,\"right\":0,\"name\":\"pageResult\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"List\",\"props\":{\"width\":1085,\"var\":\"listTalents\",\"vScrollBarSkin\":\" \",\"top\":230,\"spaceY\":20,\"repeatX\":1,\"name\":\"listTalents\",\"centerX\":0,\"bottom\":250},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":15,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":15,\"renderType\":\"render\",\"left\":15,\"height\":80},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":20,\"text\":\"Title\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}},{\"type\":\"Box\",\"props\":{\"top\":0,\"runtime\":\"Laya.runtime.BlankBox\",\"right\":0,\"name\":\"blank\",\"left\":0,\"bottom\":0,\"alpha\":0.3}}]}]},{\"type\":\"Box\",\"props\":{\"x\":263,\"width\":1085,\"var\":\"btnNext\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnNext\",\"height\":150,\"centerX\":0,\"bottom\":30},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Next\",\"name\":\"label\",\"fontSize\":70,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]}]}]};\n\t\treturn TalentUI;\n\t})(View);\nvar ThanksUI=(function(_super){\n\t\tfunction ThanksUI(){\n\t\t\t\n\t\t    this.btnBack=null;\n\t\t    this.panelTopSupports=null;\n\t\t    this.vboxTopSupports=null;\n\t\t    this.listSupports=null;\n\t\t    this.btnDDF=null;\n\t\t    this.btnAFD=null;\n\n\t\t\tThanksUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(ThanksUI,'ui.view.DefaultTheme.ThanksUI',_super);\n\t\tvar __proto__=ThanksUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(ThanksUI.uiView);\n\n\t\t}\n\n\t\tThanksUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":95,\"x\":945,\"width\":260,\"var\":\"btnBack\",\"top\":50,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":50,\"name\":\"btnBack\",\"height\":90,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":1028,\"x\":332,\"text\":\"UI_Back\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Panel\",\"props\":{\"width\":1100,\"var\":\"panelTopSupports\",\"vScrollBarSkin\":\" \",\"top\":170,\"name\":\"panelTopSupports\",\"height\":400,\"centerX\":0},\"child\":[{\"type\":\"VBox\",\"props\":{\"y\":15,\"var\":\"vboxTopSupports\",\"space\":30,\"right\":-6,\"name\":\"vboxTopSupports\",\"left\":-6},\"child\":[{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxTopSupport\",\"left\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":25,\"wordWrap\":true,\"width\":250,\"text\":\"Sombody\",\"name\":\"name\",\"left\":50,\"leading\":25,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#000000\",\"align\":\"center\"}},{\"type\":\"Label\",\"props\":{\"y\":25,\"wordWrap\":true,\"text\":\"This is he say\",\"right\":20,\"name\":\"comment\",\"left\":350,\"leading\":25,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#000000\",\"align\":\"center\"}}]}]}]},{\"type\":\"List\",\"props\":{\"width\":1100,\"var\":\"listSupports\",\"vScrollBarSkin\":\" \",\"top\":600,\"spaceY\":50,\"spaceX\":50,\"name\":\"listSupports\",\"centerX\":0,\"bottom\":200},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":30,\"x\":25,\"width\":500,\"text\":\"label\",\"renderType\":\"render\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"align\":\"center\"}}]},{\"type\":\"Box\",\"props\":{\"width\":400,\"var\":\"btnDDF\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnDDF\",\"height\":100,\"centerX\":300,\"bottom\":50,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":1028,\"x\":332,\"text\":\"UI_Support_Programmer\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Box\",\"props\":{\"width\":400,\"var\":\"btnAFD\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnAFD\",\"height\":100,\"centerX\":-300,\"bottom\":50,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":1028,\"x\":332,\"text\":\"UI_Support_Designer\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]}]};\n\t\treturn ThanksUI;\n\t})(View);\nvar TrajectoryUI=(function(_super){\n\t\tfunction TrajectoryUI(){\n\t\t\t\n\t\t    this.labCharm=null;\n\t\t    this.labIntelligence=null;\n\t\t    this.labStrength=null;\n\t\t    this.labMoney=null;\n\t\t    this.labSpirit=null;\n\t\t    this.boxTrajectory=null;\n\t\t    this.panelTrajectory=null;\n\t\t    this.vboxTrajectory=null;\n\t\t    this.btnSummary=null;\n\t\t    this.boxSpeed=null;\n\t\t    this.prgSpeed=null;\n\t\t    this.scbSpeed=null;\n\t\t    this.boxParticle=null;\n\n\t\t\tTrajectoryUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(TrajectoryUI,'ui.view.DefaultTheme.TrajectoryUI',_super);\n\t\tvar __proto__=TrajectoryUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\t\t\tView.regComponent(\"Laya.runtime.ColorFilterItem\",Laya.runtime.ColorFilterItem);\n\t\t\tView.regComponent(\"Particle2D\",laya.particle.Particle2D);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(TrajectoryUI.uiView);\n\n\t\t}\n\n\t\tTrajectoryUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Box\",\"props\":{\"top\":80,\"right\":20,\"left\":20,\"height\":120},\"child\":[{\"type\":\"HBox\",\"props\":{\"space\":15,\"centerY\":0,\"centerX\":0,\"align\":\"middle\"},\"child\":[{\"type\":\"Box\",\"props\":{\"x\":0,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":30,\"text\":\"UI_Property_Charm\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labCharm\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"x\":1,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":30,\"text\":\"UI_Property_Intelligence\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labIntelligence\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"x\":2,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":30,\"text\":\"UI_Property_Strength\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labStrength\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"x\":3,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":30,\"text\":\"UI_Property_Money\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labMoney\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]}]},{\"type\":\"Box\",\"props\":{\"x\":4,\"width\":200,\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"propertyBox\",\"height\":120,\"centerY\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"y\":30,\"text\":\"UI_Property_Spirit\",\"name\":\"label\",\"fontSize\":45,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}},{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"propertyValue\",\"left\":0,\"height\":60,\"bottom\":0},\"child\":[{\"type\":\"Label\",\"props\":{\"var\":\"labSpirit\",\"text\":\"10\",\"name\":\"label\",\"fontSize\":55,\"font\":\"SimHei\",\"color\":\"#55fffe\",\"centerY\":0,\"centerX\":0,\"anchorY\":0.5,\"anchorX\":0.5}}]}]}]}]},{\"type\":\"Box\",\"props\":{\"x\":20,\"var\":\"boxTrajectory\",\"top\":240,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":20,\"name\":\"boxTrajectory\",\"left\":20,\"bottom\":250},\"child\":[{\"type\":\"Panel\",\"props\":{\"var\":\"panelTrajectory\",\"vScrollBarSkin\":\" \",\"top\":0,\"right\":0,\"name\":\"panelTrajectory\",\"left\":0,\"bottom\":0},\"child\":[{\"type\":\"VBox\",\"props\":{\"y\":15,\"var\":\"vboxTrajectory\",\"space\":20,\"right\":-6,\"name\":\"vboxTrajectory\",\"left\":-6},\"child\":[{\"type\":\"Box\",\"props\":{\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":0,\"name\":\"boxTrajectoryItem\",\"left\":0},\"child\":[{\"type\":\"HBox\",\"props\":{\"y\":25,\"x\":200,\"name\":\"hboxAge\",\"anchorX\":1,\"align\":\"middle\"},\"child\":[{\"type\":\"Label\",\"props\":{\"x\":0,\"text\":\"3000\",\"name\":\"labAge\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#cfea5c\",\"anchorX\":0}},{\"type\":\"Label\",\"props\":{\"x\":1,\"text\":\"岁\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#cfea5c\",\"anchorX\":0}},{\"type\":\"Label\",\"props\":{\"x\":2,\"text\":\"：\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#cfea5c\",\"anchorX\":0}}]},{\"type\":\"Label\",\"props\":{\"y\":25,\"wordWrap\":true,\"text\":\"你的父母开始辅导你数学和英语，智力+1\",\"right\":0,\"name\":\"labContent\",\"left\":220,\"leading\":25,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\"}}]}]}]}]},{\"type\":\"Box\",\"props\":{\"right\":0,\"left\":0,\"height\":1,\"bottom\":-1},\"child\":[{\"type\":\"Box\",\"props\":{\"width\":600,\"var\":\"btnSummary\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSummary\",\"height\":150,\"centerX\":0,\"bottom\":80},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Goto_Summary\",\"name\":\"label\",\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0}}]},{\"type\":\"Box\",\"props\":{\"y\":-155,\"var\":\"boxSpeed\",\"runtime\":\"Laya.runtime.ColorFilterItem\",\"right\":100,\"name\":\"boxSpeed\",\"left\":100,\"height\":150,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"ProgressBar\",\"props\":{\"var\":\"prgSpeed\",\"skin\":\"images/progress/progress_s.png\",\"right\":0,\"name\":\"prgSpeed\",\"left\":0,\"bottom\":0}},{\"type\":\"HScrollBar\",\"props\":{\"var\":\"scbSpeed\",\"skin\":\"images/slider/hslider_s.png\",\"right\":0,\"name\":\"scbSpeed\",\"min\":0,\"max\":1000,\"left\":0,\"height\":60,\"bottom\":0}},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Manual\",\"fontSize\":50,\"color\":\"#ffffff\",\"bottom\":70}},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Auto\",\"right\":0,\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":70}}]}]},{\"type\":\"Box\",\"props\":{\"width\":10,\"var\":\"boxParticle\",\"name\":\"boxParticle\",\"height\":10,\"centerY\":0,\"centerX\":0},\"child\":[{\"type\":\"Particle2D\",\"props\":{\"y\":5,\"x\":5,\"url\":\"particle/fly.part\",\"autoPlay\":true}}]}]};\n\t\treturn TrajectoryUI;\n\t})(View);\nvar LoadingUI=(function(_super){\n\t\tfunction LoadingUI(){\n\t\t\t\n\n\t\t\tLoadingUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(LoadingUI,'ui.view.LoadingUI',_super);\n\t\tvar __proto__=LoadingUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ViewBase\",Laya.runtime.ViewBase);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(LoadingUI.uiView);\n\n\t\t}\n\n\t\tLoadingUI.uiView={\"type\":\"View\",\"props\":{\"width\":1125,\"runtime\":\"Laya.runtime.ViewBase\",\"height\":2436},\"child\":[{\"type\":\"Sprite\",\"props\":{\"y\":0,\"x\":0,\"alpha\":0.3},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":2000,\"lineWidth\":1,\"height\":3000,\"fillColor\":\"#000000\"}}]},{\"type\":\"Box\",\"props\":{\"width\":200,\"scaleY\":2,\"scaleX\":2,\"height\":200,\"centerY\":0,\"centerX\":0},\"child\":[{\"type\":\"Animation\",\"props\":{\"y\":100,\"x\":100,\"source\":\"view/CyberTheme/animation/circleFlash.ani\",\"autoPlay\":true}},{\"type\":\"Image\",\"props\":{\"skin\":\"images/resource/circle.png\",\"renderType\":\"mask\"}}]},{\"type\":\"Label\",\"props\":{\"text\":\"UI_Loading\",\"fontSize\":80,\"font\":\"Impact\",\"color\":\"#ffffff\",\"centerY\":400,\"centerX\":0}}]};\n\t\treturn LoadingUI;\n\t})(View);\nvar MessagePopupUI=(function(_super){\n\t\tfunction MessagePopupUI(){\n\t\t\t\n\t\t    this.boxBg=null;\n\t\t    this.message=null;\n\n\t\t\tMessagePopupUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(MessagePopupUI,'ui.view.MessagePopupUI',_super);\n\t\tvar __proto__=MessagePopupUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(MessagePopupUI.uiView);\n\n\t\t}\n\n\t\tMessagePopupUI.uiView={\"type\":\"View\",\"props\":{\"width\":1100,\"mouseThrough\":true,\"mouseEnabled\":false,\"height\":230},\"child\":[{\"type\":\"Box\",\"props\":{\"var\":\"boxBg\",\"top\":10,\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":10,\"name\":\"boxBg\",\"left\":10,\"bottom\":10,\"alpha\":0.75}},{\"type\":\"Label\",\"props\":{\"wordWrap\":true,\"var\":\"message\",\"text\":\"消息\",\"right\":50,\"name\":\"message\",\"left\":50,\"fontSize\":60,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"align\":\"center\"}}]};\n\t\treturn MessagePopupUI;\n\t})(View);\nvar SaveLoadUI=(function(_super){\n\t\tfunction SaveLoadUI(){\n\t\t\t\n\t\t    this.input=null;\n\t\t    this.btnSave=null;\n\t\t    this.btnLoad=null;\n\t\t    this.btnRead=null;\n\t\t    this.btnWrite=null;\n\t\t    this.btnClose=null;\n\t\t    this.btnBackup=null;\n\n\t\t\tSaveLoadUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(SaveLoadUI,'ui.view.SaveLoadUI',_super);\n\t\tvar __proto__=SaveLoadUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(SaveLoadUI.uiView);\n\n\t\t}\n\n\t\tSaveLoadUI.uiView={\"type\":\"Dialog\",\"props\":{\"width\":645,\"height\":400},\"child\":[{\"type\":\"Box\",\"props\":{\"top\":0,\"right\":0,\"left\":0,\"bottom\":300},\"child\":[{\"type\":\"Box\",\"props\":{\"y\":0,\"x\":0,\"width\":645,\"height\":2},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":645,\"lineWidth\":1,\"height\":2,\"fillColor\":\"#97ffe6\"}}]},{\"type\":\"Box\",\"props\":{\"width\":645,\"height\":2,\"centerX\":0,\"bottom\":0},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":645,\"lineWidth\":1,\"height\":2,\"fillColor\":\"#97ffe6\"}}]},{\"type\":\"Box\",\"props\":{\"width\":645,\"height\":100,\"centerY\":0,\"centerX\":0,\"alpha\":0.2},\"child\":[{\"type\":\"Rect\",\"props\":{\"width\":645,\"lineWidth\":1,\"height\":100,\"fillColor\":\"#000000\"}}]}]},{\"type\":\"TextInput\",\"props\":{\"wordWrap\":false,\"var\":\"input\",\"valign\":\"middle\",\"top\":0,\"text\":\"content\",\"right\":0,\"overflow\":\"scroll\",\"left\":0,\"fontSize\":35,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"bottom\":300}},{\"type\":\"Box\",\"props\":{\"width\":120,\"var\":\"btnSave\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":5,\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Save\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"width\":120,\"var\":\"btnLoad\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":130,\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Load\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"width\":120,\"var\":\"btnRead\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":260,\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Read\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"width\":120,\"var\":\"btnWrite\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":390,\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_Write\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"x\":10,\"width\":120,\"var\":\"btnClose\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":5,\"name\":\"btnSmall\",\"height\":120,\"bottom\":155,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"×\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"y\":20,\"var\":\"btnBackup\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":5,\"name\":\"btnBackup\",\"left\":5,\"height\":120,\"bottom\":5,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"UI_BackupBtn\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}}]}]};\n\t\treturn SaveLoadUI;\n\t})(Dialog);\nvar ThemesUI=(function(_super){\n\t\tfunction ThemesUI(){\n\t\t\t\n\t\t    this.radioTheme=null;\n\t\t    this.btnOK=null;\n\t\t    this.btnClose=null;\n\n\t\t\tThemesUI.__super.call(this);\n\t\t}\n\n\t\tCLASS$(ThemesUI,'ui.view.ThemesUI',_super);\n\t\tvar __proto__=ThemesUI.prototype;\n\t\t__proto__.createChildren=function(){\n\t\t    \t\t\tView.regComponent(\"Laya.runtime.ColorfulBox\",Laya.runtime.ColorfulBox);\n\n\t\t\tlaya.ui.Component.prototype.createChildren.call(this);\n\t\t\tthis.createView(ThemesUI.uiView);\n\n\t\t}\n\n\t\tThemesUI.uiView={\"type\":\"Dialog\",\"props\":{\"width\":350,\"height\":550},\"child\":[{\"type\":\"Box\",\"props\":{\"top\":20,\"right\":20,\"left\":20,\"bottom\":130},\"child\":[{\"type\":\"RadioGroup\",\"props\":{\"var\":\"radioTheme\",\"name\":\"radioTheme\",\"height\":380,\"centerY\":0,\"centerX\":0},\"child\":[{\"type\":\"Radio\",\"props\":{\"width\":300,\"top\":0,\"skin\":\"images/radio/radio_cyber.png\",\"name\":\"item0\",\"height\":100}},{\"type\":\"Radio\",\"props\":{\"width\":300,\"skin\":\"images/radio/radio_dark.png\",\"name\":\"item1\",\"height\":100,\"centerY\":0}},{\"type\":\"Radio\",\"props\":{\"width\":300,\"skin\":\"images/radio/radio_light.png\",\"name\":\"item2\",\"height\":100,\"bottom\":0}}]}]},{\"type\":\"Box\",\"props\":{\"width\":90,\"var\":\"btnOK\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"name\":\"btnSmall\",\"left\":20,\"height\":90,\"bottom\":20,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"√\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}}]},{\"type\":\"Box\",\"props\":{\"width\":90,\"var\":\"btnClose\",\"runtime\":\"Laya.runtime.ColorfulBox\",\"right\":20,\"name\":\"btnSmall\",\"height\":90,\"bottom\":20,\"anchorY\":0.5,\"anchorX\":0.5},\"child\":[{\"type\":\"Label\",\"props\":{\"text\":\"×\",\"name\":\"label\",\"fontSize\":50,\"font\":\"SimHei\",\"color\":\"#ffffff\",\"centerY\":0,\"centerX\":0,\"bold\":true,\"anchorY\":0.5,\"anchorX\":0.5}}]}]};\n\t\treturn ThemesUI;\n\t})(Dialog);"
  },
  {
    "path": "src/ui/pluginFunction.js",
    "content": "const plugin =\nLaya.plugin = {};\n\nplugin.extractComponents = function(uiView, componentNames) {\n    const components = {};\n    const deepSearch = (uiView, componentNames) => {\n        if(!uiView.child) return;\n        for(let i = uiView.child.length - 1; i >= 0; i--) {\n            const child = uiView.child[i];\n            if(componentNames.includes(child?.props.name)) {\n                components[child.props.name] = child;\n                uiView.child.splice(i, 1);\n                continue;\n            }\n            deepSearch(child, componentNames, components);\n        }\n    };\n    deepSearch(uiView, componentNames);\n    return componentName => {\n        if(components[componentName]) {\n            return Laya.View.createComp(components[componentName]);\n        }\n        return null;\n    }\n}"
  },
  {
    "path": "src/ui/promisesLaya.js",
    "content": "Laya.promises = {\n    Tween: {\n        from: async function (target, props, duration, ease, delay, coverBefore) {\n            return new Promise(function (resolve, reject) {\n                try {\n                    Laya.Tween.from(target, props, duration, ease, Laya.Handler.create(null, ()=>resolve(), null, true), delay, coverBefore);\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        },\n        to: async function (target, props, duration, ease, delay, coverBefore) {\n            return new Promise(function (resolve, reject) {\n                try {\n                    Laya.Tween.to(target, props, duration, ease, Laya.Handler.create(null, ()=>resolve(), null, true), delay, coverBefore);\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        },\n    },\n    loader: {\n        load: async function (url, progress, type) {\n            return new Promise(function (resolve, reject) {\n                try {\n                    Laya.loader.load(url, Laya.Handler.create(null, ret=>resolve(ret), null, true), progress, type);\n                } catch (e) {\n                    reject(e);\n                }\n            });\n        }\n\n    }\n};"
  },
  {
    "path": "src/ui/runtime.js",
    "content": "const runtime =\nLaya.runtime = {};\n\nruntime.ColorFilterItem =\nclass ColorFilterItem extends Laya.Image {\n    constructor() {\n        super();\n    }\n\n    #hexToRgba = (hex) => {\n        const rgba = [];\n        hex = hex.replace('#', '');\n        hex = hex.match(new RegExp('(.{2})(.{2})(.{2})(.{2})', 'i'));\n        hex.forEach((item, index) => {\n            rgba[index] = parseInt(item, 16);\n        });\n        rgba.shift();\n        return rgba;\n    }\n\n    #rgbaToMatrix = (rgba) => {\n        let matrix = [\n            0, 0, 0, 0, 0,\n            0, 0, 0, 0, 0,\n            0, 0, 0, 0, 0,\n            0, 0, 0, 0, 0\n        ];\n        matrix[0] = rgba[0] / 255;\n        matrix[6] = rgba[1] / 255;\n        matrix[12] = rgba[2] / 255;\n        matrix[18] = rgba[3] / 255;\n        return matrix;\n    }\n\n    get colorFilter() {\n        return this._colorFilter;\n    }\n    set colorFilter(value) {\n        this._colorFilter = value;\n        if(value) {\n            const rgba = this.#hexToRgba(this.colorFilter);\n            const matrix = this.#rgbaToMatrix(rgba);\n            const colorFilter = new Laya.ColorFilter(matrix);\n            this.filters = [colorFilter];\n        } else {\n            this.filters = [];\n        }\n    }\n}\nruntime.UIBase =\nclass UIBase extends Laya.View {\n    constructor() {\n        super();\n    }\n}\n\nruntime.ViewBase =\nclass ViewBase extends runtime.UIBase {\n    constructor() {\n        super();\n    }\n}\n\nruntime.DialogBase =\nclass DialogBase extends runtime.UIBase {\n    constructor() {\n        super();\n    }\n}\n\nruntime.ScaleButton =\nclass ScaleButton extends Laya.Button {\n    constructor() {\n        super();\n        this.on(Laya.Event.MOUSE_DOWN, this, this.onMouse, [Laya.Event.MOUSE_DOWN]);\n        this.on(Laya.Event.MOUSE_OUT, this, this.onMouse, [Laya.Event.MOUSE_OUT]);\n        this.on(Laya.Event.MOUSE_UP, this, this.onMouse, [Laya.Event.MOUSE_UP]);\n    }\n\n    onMouse(type) {\n        Laya.Tween.clearAll(this);\n        switch (type) {\n            case Laya.Event.MOUSE_DOWN:\n                Laya.Tween.to(this, { scaleX: 0.9, scaleY: 0.9 }, 100);\n                break;\n            case Laya.Event.MOUSE_OUT:\n            case Laya.Event.MOUSE_UP:\n                Laya.Tween.to(this, { scaleX: 1, scaleY: 1 }, 100);\n                break;\n            default:\n                break;\n        }\n    }\n}\n\nruntime.RGBAItem =\nclass RGBAItem {\n    constructor(config={}) {\n        for(const key in config)\n            switch(key) {\n                case 'r':\n                case 'g':\n                case 'b':\n                case 'a':\n                case 'hex':\n                case 'hexa':\n                case 'rgb':\n                case 'rgba':\n                    this[key] = config[key];\n                    break;\n                case 'on':\n                    this.on(config[key]);\n                    break;\n                default:\n                    break;\n            }\n    }\n\n    #r;\n    #g;\n    #b;\n    #a;\n    #on = new Set();\n\n    on(fn) {\n        this.#on.add(fn);\n    }\n\n    off(fn) {\n        this.#on.delete(fn);\n    }\n\n    clear() {\n        this.#on.clear();\n    }\n\n    #event() {\n        this.#on.forEach(fn => fn(this));\n    }\n\n    #rgb(v) {\n        return [\n            this.#dec(v.slice(1, 3)),\n            this.#dec(v.slice(3, 5)),\n            this.#dec(v.slice(5, 7)),\n        ];\n    }\n\n    #rgba(v) {\n        return [\n            this.#dec(v.slice(1, 3)),\n            this.#dec(v.slice(3, 5)),\n            this.#dec(v.slice(5, 7)),\n            this.#dec(v.slice(7, 9)),\n        ];\n    }\n\n    #hex(v) {\n        v = parseInt(v).toString(16);\n        return v.length == 1 ? '0' + v : v;\n    }\n\n    #dec(v) {\n        return parseInt(v, 16);\n    }\n\n    get hex() {\n        return `#${\n            this.#hex(this.r)\n        }${\n            this.#hex(this.g)\n        }${\n            this.#hex(this.b)\n        }`;\n    }\n    set hex(v) {\n        [this.#r, this.#g, this.#b] = this.#rgb(v);\n        this.#event();\n    }\n\n    get hexa() {\n        return `#${\n            this.#hex(this.r)\n        }${\n            this.#hex(this.g)\n        }${\n            this.#hex(this.b)\n        }${\n            this.#hex(this.a)\n        }`;\n    }\n    set hexa(v) {\n        [this.#r, this.#g, this.#b] = this.#rgba(v);\n        this.#event();\n    }\n\n    get rgb() {\n        return [this.r, this.g, this.b];\n    }\n    set rgb(v) {\n        [this.#r, this.#g, this.#b] = v;\n        this.#event();\n    }\n\n    get rgba() {\n        return [this.r, this.g, this.b, this.a];\n    }\n    set rgba(v) {\n        [this.#r, this.#g, this.#b, this.#a] = v;\n        this.#event();\n    }\n\n\n    get r() {\n        return this.#r||0;\n    }\n    set r(value) {\n        this.#r = value;\n        this.#event();\n    }\n    get g() {\n        return this.#g||0;\n    }\n    set g(value) {\n        this.#g = value;\n        this.#event();\n    }\n    get b() {\n        return this.#b||0;\n    }\n    set b(value) {\n        this.#b = value;\n        this.#event();\n    }\n    get a() {\n        return this.#a||0;\n    }\n    set a(value) {\n        this.#a = value;\n        this.#event();\n    }\n\n    cRgb(hex) {\n        const [r, g, b] = this.#rgb(hex);\n        return {r, g, b};\n    }\n\n    cRgba(hexa) {\n        const [r, g, b, a] = this.#rgba(hexa);\n        return {r, g, b, a};\n    }\n\n    distance(left, right) {\n        const [lr, lg, lb] = this.#rgb(left);\n        const [rr, rg, rb] = this.#rgb(right);\n        const {r, g, b} = this;\n\n        const ddr = Math.abs(r - lr);\n        const ddg = Math.abs(g - lg);\n        const ddb = Math.abs(b - lb);\n\n        const result = (d, a, b) => ((d / Math.abs(b - a)) || 0);\n\n        switch(Math.max(ddr, ddg, ddb)) {\n            case ddr: return result(ddr, lr, rr);\n            case ddg: return result(ddg, lg, rg);\n            case ddb: return result(ddb, lb, rb);\n            default: return 1;\n        }\n    }\n}\nruntime.ColorfulBox =\nclass ColorfulBox extends Laya.Box {\n    constructor() {\n        super();\n        this.on(Laya.Event.MOUSE_OVER, this, this.onMouse, [Laya.Event.MOUSE_DOWN]);\n        // this.on(Laya.Event.MOUSE_DOWN, this, this.onMouse, [Laya.Event.MOUSE_DOWN]);\n        this.on(Laya.Event.MOUSE_OUT, this, this.onMouse, [Laya.Event.MOUSE_OUT]);\n        // this.on(Laya.Event.MOUSE_UP, this, this.onMouse, [Laya.Event.MOUSE_UP]);\n        this.#draw();\n    }\n\n    #defaultColor = '#ffffff';\n    #hoverColor = '#ffffff';\n    #defaultStroke = '#ffffff';\n    #hoverStroke = '#ffffff';\n    #defaultLabel = '#000000';\n    #hoverLabel = '#000000';\n    #color = new runtime.RGBAItem({hex: this.#defaultColor, on: ()=>this.#draw()});\n    #stroke = new runtime.RGBAItem({hex: this.#defaultStroke, on: ()=>this.#draw()});\n    #label = new runtime.RGBAItem({hex: this.#defaultLabel, on: ({hex})=>{\n        const label = this.getChildByName('label');\n        if (!label) return;\n        label.color = hex;\n    }});\n    #lineWidth = 0;\n    #radius = 0;\n    #animationTime = 200;\n    #state = 1;\n\n    onMouse(type) {\n        const label = this.getChildByName('label');\n        const tween = (colorItem, target, last) => {\n            Laya.Tween.clearAll(colorItem);\n            const distance = colorItem.distance(target, last);\n            if(!isFinite(distance)) {\n                colorItem.hex = target;\n                return;\n            }\n            Laya.Tween.to(colorItem, colorItem.cRgb(target), colorItem.distance(target, last) * this.#animationTime);\n        }\n        switch (type) {\n            case Laya.Event.MOUSE_OVER:\n            case Laya.Event.MOUSE_DOWN:\n                if(this.#state == 2) return;\n                this.#state = 2;\n                tween(this.#color, this.#hoverColor, this.#defaultColor);\n                tween(this.#stroke, this.#hoverStroke, this.#defaultStroke);\n                if(label) tween(this.#label, this.#hoverLabel, this.#defaultLabel);\n                break;\n            case Laya.Event.MOUSE_OUT:\n            case Laya.Event.MOUSE_UP:\n                if(this.#state == 1) return;\n                this.#state = 1;\n                tween(this.#color, this.#defaultColor, this.#hoverColor);\n                tween(this.#stroke, this.#defaultStroke, this.#hoverStroke);\n                if(label) tween(this.#label, this.#defaultLabel, this.#hoverLabel);\n                break;\n            default:\n                break;\n        }\n    }\n\n    #draw() {\n        this.graphics.clear();\n        const w = this.width;\n        const h = this.height;\n        const r = Math.min(this.#radius, w / 2, h / 2);\n        const fillStyle = this.#color.hex;\n        const strokeStyle = this.#stroke.hex;\n        const lineWidth = this.lineWidth;\n\n        if(r <= 0) {\n            this.graphics.drawRect(0, 0, w, h, fillStyle, strokeStyle, lineWidth);\n            return;\n        }\n\n        const a = w + lineWidth;\n        const b = h + lineWidth;\n        const c = r + lineWidth;\n        const d = a - r;\n        const e = b - r;\n        const f = -lineWidth;\n\n        this.graphics.drawPath(0, 0, [\n            [\"moveTo\", c, f],\n            [\"arcTo\",  a, f, a, c, c],\n            [\"arcTo\",  a, b, d, b, c],\n            [\"arcTo\",  f, b, f, e, c],\n            [\"arcTo\",  f, f, c, f, c],\n            [\"closePath\"],\n        ], { fillStyle: strokeStyle });\n\n        const x = w - r;\n        const y = h - r;\n        this.graphics.drawPath(0, 0, [\n            [\"moveTo\", r, 0],\n            [\"arcTo\",  w, 0, w, r, r],\n            [\"arcTo\",  w, h, x, h, r],\n            [\"arcTo\",  0, h, 0, y, r],\n            [\"arcTo\",  0, 0, r, 0, r],\n            [\"closePath\"],\n        ], { fillStyle });\n    }\n\n    get width() {\n        return super.width;\n    }\n    set width(value) {\n        super.width = value;\n        this.#draw();\n    }\n    get height() {\n        return super.height;\n    }\n    set height(value) {\n        super.height = value;\n        this.#draw();\n    }\n\n    get defaultColor() {\n        return this.#defaultColor;\n    }\n    set defaultColor(value) {\n        this.#defaultColor = value;\n        Laya.Tween.clearAll(this.#color);\n        Laya.Tween.clearAll(this.#stroke);\n        Laya.Tween.clearAll(this.#label);\n        this.#color.hex = value;\n    }\n\n    get hoverColor() {\n        return this.#hoverColor;\n    }\n    set hoverColor(value) {\n        this.#hoverColor = value;\n    }\n\n    get defaultStroke() {\n        return this.#defaultStroke;\n    }\n    set defaultStroke(value) {\n        this.#defaultStroke = value;\n        Laya.Tween.clearAll(this.#color);\n        Laya.Tween.clearAll(this.#stroke);\n        Laya.Tween.clearAll(this.#label);\n        this.#stroke.hex = value;\n    }\n\n    get hoverStroke() {\n        return this.#hoverStroke;\n    }\n    set hoverStroke(value) {\n        this.#hoverStroke = value;\n    }\n\n    get defaultLabel() {\n        return this.#defaultLabel;\n    }\n    set defaultLabel(value) {\n        this.#defaultLabel = value;\n        const label = this.getChildByName('label');\n        if (!label) return;\n        Laya.Tween.clearAll(this.#color);\n        Laya.Tween.clearAll(this.#stroke);\n        Laya.Tween.clearAll(this.#label);\n        label.color = value;\n    }\n\n    get hoverLabel() {\n        return this.#hoverLabel;\n    }\n    set hoverLabel(value) {\n        this.#hoverLabel = value;\n    }\n\n    get animationTime() {\n        return this.#animationTime;\n    }\n    set animationTime(value) {\n        this.#animationTime = value;\n    }\n\n    get radius() {\n        return this.#radius||0;\n    }\n    set radius(value) {\n        this.#radius = value;\n        this.#draw();\n    }\n\n    get lineWidth() {\n        return this.#lineWidth||0;\n    }\n    set lineWidth(value) {\n        this.#lineWidth = value;\n        this.#draw();\n    }\n    get label() {\n        return this.getChildByName('label')?.text;\n    }\n    set label(value) {\n        const label = this.getChildByName('label');\n        if (!label) return;\n        label.text = value;\n    }\n\n    get cacheAs() {return super.cacheAs;}\n    set cacheAs(value) {\n        if(value=='bitmap') debugger;\n        super.cacheAs = value;\n    }\n\n}\n\nruntime.BlankBox =\nclass BlankBox extends Laya.Box {\n    constructor() {\n        super();\n        this.mask = new Laya.Sprite();\n        this.#blank = new Laya.Sprite();\n        this.addChild(this.#blank);\n    }\n\n    #blank;\n    #timeLine;\n    #pause = true;\n\n    #draw() {\n        this.mask.graphics.clear();\n        this.#blank.graphics.clear();\n        this.mask.graphics.drawRect(0, 0, this.width, this.height, '#000000');\n        this.#blank.graphics.drawRect(0, 0, this.width, this.height, '#000000');\n        if(this.#timeLine) this.#timeLine.destroy();\n        this.#timeLine = new Laya.TimeLine()\n            .to(this.#blank, { x: this.width }, 2000)\n            .to(this.#blank, { x: -this.width }, 0);\n        this.#timeLine.play(0, true);\n        if(this.#pause) this.#timeLine.pause();\n    }\n    get pause() {\n        return this.#pause;\n    }\n    set pause(value) {\n        if(this.#pause == value) return;\n        this.#pause = value;\n        this.#blank.visible = !value;\n        if(value) this.#timeLine.pause();\n        else this.#timeLine.resume();\n    }\n\n    destroy(destroyChild) {\n        this.#timeLine.destroy(true);\n        super.destroy(destroyChild);\n    }\n\n    get width() {\n        return super.width;\n    }\n    set width(value) {\n        super.width = value;\n        this.#blank.x = -this.width;\n        this.#draw();\n    }\n\n    get height() {\n        return super.height;\n    }\n    set height(value) {\n        super.height = value;\n        this.#draw();\n    }\n}\n\nruntime.ColorAgentLabel =\nclass ColorAgentLabel extends Laya.Label {\n    constructor(...args) {\n        super(...args);\n    }\n\n    get #brothers() {\n        const brothers = [];\n        if(!this.parent) return brothers;\n        const deepFind = p => {\n            if(!p._childs) return;\n            for(const c of p._childs) {\n                if(c == this) continue;\n                if(c instanceof Laya.Label) brothers.push(c);\n                deepFind(c);\n            }\n        }\n        deepFind(this.parent);\n        return brothers;\n    }\n\n    get color() {return this.super.color;}\n    set color(c) {\n        super.color = c;\n        this.#brothers.forEach(b=>b.color=c);\n    }\n}"
  },
  {
    "path": "src/ui/themes/cyber/achievement.js",
    "content": "export default class CyberAchievement extends ui.view.CyberTheme.CyberAchievementUI {\n    constructor() {\n        super();\n        this.btnBack.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.MAIN));\n        const min = Math.min(this.btnAchievement.fontSize, this.btnStatistics.fontSize);\n        const max = Math.max(this.btnAchievement.fontSize, this.btnStatistics.fontSize);\n        this.#state = {min, max};\n        this.btnStatistics.on(Laya.Event.CLICK, this, ()=>this.switch('statistics'));\n        this.btnAchievement.on(Laya.Event.CLICK, this, ()=>this.switch('achievement'));\n        this.btnRank.on(Laya.Event.CLICK, this, $$event, ['message', ['M_NoRank']]);\n\n        this.listAchievements.renderHandler = new Laya.Handler(this, this.onRenderAchievement);\n        this.listAchievements.scrollBar.elasticDistance = 150;\n        this.on(Laya.Event.RESIZE, this, () => {\n            this.boxPage.width = 2 * this.width;\n            this.boxA.width = this.boxB.width = this.width;\n            if(this.boxPage.x < 0) {\n                this.boxPage.x = - this.width;\n            }\n\n            const renderWidth = this.listAchievements?._itemRender?.props?.width;\n            if(renderWidth) {\n                const col = Math.max(Math.floor((this.width - 65) / renderWidth), 1);\n                this.listAchievements.width = col * renderWidth + (col - 1) * (this.listAchievements.spaceY || 0) + 30;\n            }\n        });\n    }\n\n    #state;\n    #tweens;\n\n    init() {\n        this.switch('statistics', 0);\n\n        const {statistics, achievements, PropertyTypes: pt} = core;\n\n        this.listAchievements.array = achievements;\n\n        this.labRemakeTimes.text = statistics[pt.TMS].value;\n        this.labRemakeTimesJudge.text = statistics[pt.TMS].judge;\n        this.labAchievementCountJudge.color = $ui.common.grade[statistics[pt.TMS].grade];\n\n        this.labAchievementCount.text = statistics[pt.CACHV].value;\n        this.labAchievementCountJudge.text = statistics[pt.CACHV].judge;\n        this.labAchievementCountJudge.color = $ui.common.grade[statistics[pt.CACHV].grade];\n\n        this.labEventRate.text = parseInt(statistics[pt.REVT].value*100)+'%';\n        this.prgEventRate.value = statistics[pt.REVT].value;\n\n        this.labTalentRate.text = parseInt(statistics[pt.RTLT].value*100)+'%';\n        this.prgTalentRate.value = statistics[pt.RTLT].value;\n    }\n\n    switch(page, time=300) {\n        if(this.#tweens) {\n            this.#tweens.forEach(tween => Laya.Tween.clear(tween));\n        }\n        this.#tweens = [];\n\n        switch (page) {\n            case 'statistics':\n                time = - this.boxPage.x / this.width * time;\n                this.#tweens.push(\n                    Laya.Tween.to(this.boxPage, {x: 0}, time, Laya.Ease.backOut, Laya.Handler.create(this, () => this.#tweens = null)),\n                    Laya.Tween.to(this.btnStatistics, {fontSize: this.#state.max, anchorX: 0.5, anchorY: 1}, time, Laya.Ease.backOut),\n                    Laya.Tween.to(this.btnAchievement, {fontSize: this.#state.min, anchorX: 0.5, anchorY: 1}, time, Laya.Ease.backOut),\n                );\n                break;\n            case 'achievement':\n                time = (this.width + this.boxPage.x) / this.width * time;\n                this.#tweens.push(\n                    Laya.Tween.to(this.boxPage, {x: - this.width}, time, Laya.Ease.backOut, Laya.Handler.create(this, () => this.#tweens = null)),\n                    Laya.Tween.to(this.btnStatistics, {fontSize: this.#state.min, anchorX: 0.5, anchorY: 1}, time, Laya.Ease.backOut),\n                    Laya.Tween.to(this.btnAchievement, {fontSize: this.#state.max, anchorX: 0.5, anchorY: 1}, time, Laya.Ease.backOut),\n                );\n                break;\n        }\n    }\n\n    onRenderAchievement(box, index) {\n        const dataSource = box.dataSource;\n\n        const name = box.getChildByName('name');\n        const description = box.getChildByName('description');\n        const completed = box.getChildByName('completed');\n        const uncomplete = box.getChildByName('uncomplete');\n\n        if(dataSource.isAchieved) {\n            name.text = dataSource.name;\n            description.text = dataSource.description;\n            completed.visible = true;\n            uncomplete.visible = false;\n        } else {\n            name.text = dataSource.hide? '???': dataSource.name;\n            description.text = dataSource.hide? '???': dataSource.description;\n            completed.visible = false;\n            uncomplete.visible = true;\n        }\n\n        box.colorFilter = $ui.gradeFilter(dataSource.grade);\n    }\n}"
  },
  {
    "path": "src/ui/themes/cyber/celebrity.js",
    "content": "export default class CyberCelebrity extends ui.view.CyberTheme.CelebrityUI {\n    constructor() {\n        super();\n        this.btnRetry.on(Laya.Event.CLICK, this, ()=>this.random());\n        this.btnNext.on(Laya.Event.CLICK, this, this.next);\n        this.panelCharacter.vScrollBar.elasticDistance = 150;\n    }\n\n    #selected;\n    static #createComponent = Laya.plugin.extractComponents(CyberCelebrity.uiView, ['boxCharacter','boxTalent','boxUniqueUnGenerate']);\n    #createCharacterItem(dataSource, click) {\n        const {name, property, talent} = dataSource;\n        const item = CyberCelebrity.#createComponent('boxCharacter');\n        const vboxStates = item.getChildByName('vboxStates');\n        const boxName = item.getChildByName('boxName');\n        boxName.getChildByName('label').text = name;\n\n        const p = $_.clone(property);\n        for(const k in p)\n            if(Math.abs(p[k] - Math.PI) < 0.0000001)\n                p[k] = 'π';\n\n        vboxStates.getChildByName('label').text = $_.format($lang.F_PropertyStr, p);\n        for(const t of talent) {\n            const i = CyberCelebrity.#createComponent('boxTalent');\n            i.getChildByName('label').text = $_.format($lang.F_TalentSelection, t);\n            i.y = vboxStates.height+vboxStates.space;\n            let g = i.getChildByName(`grade${t.grade}`);\n            if(g) g.visible = true;\n            vboxStates.addChild(i);\n        }\n        const box = new Laya.Box();\n        box.height = vboxStates.space;\n        box.y = vboxStates.height;\n        vboxStates.addChild(box);\n        vboxStates.scaleY = 0;\n\n        item.dataSource = dataSource;\n        item.switch = showDetails => vboxStates.scaleY = !!showDetails?1:0;\n        item.click = (cb, caller) => {\n            boxName.offAll(Laya.Event.CLICK);\n            boxName.on(Laya.Event.CLICK, caller || this, cb);\n        }\n        if(click) item.click(click);\n        return item;\n    }\n    #createUniqueUnGenerateItem(generate) {\n        const item = CyberCelebrity.#createComponent('boxUniqueUnGenerate');\n        const boxName = item.getChildByName('boxName');\n        const vboxStates = item.getChildByName('vboxStates');\n        const label = vboxStates.getChildByName('label');\n        const boxBtn = vboxStates.getChildByName('boxBtn');\n        const btn = boxBtn.getChildByName('btn');\n\n        label.event(Laya.Event.RESIZE);\n        vboxStates.scaleY = 0;\n        item.dataSource = false;\n        item.switch = showDetails => vboxStates.scaleY = !!showDetails?1:0;\n        item.click = (cb, caller) => {\n            boxName.offAll(Laya.Event.CLICK);\n            boxName.on(Laya.Event.CLICK, caller || this, cb);\n        }\n        item.generate = (cb, caller) => {\n            btn.offAll(Laya.Event.CLICK);\n            btn.on(Laya.Event.CLICK, caller || this, cb);\n        }\n        if(generate) item.generate(generate);\n        return item;\n    }\n\n\n    init() {\n        this.random();\n    }\n\n    close() {\n        this.#selected = null;\n        this.vboxCharacter.destroyChildren(true);\n    }\n\n    random(g) {\n        this.#selected = null;\n        this.vboxCharacter.destroyChildren(true);\n        const {unique, normal} = core.characterRandom();\n        const items = [];\n        const uniqueItem = this.generateUnique(unique, ()=>{\n            core.generateUnique();\n            this.random(normal);\n\n        });\n        if(uniqueItem) items.push(uniqueItem);\n        (g||normal).forEach(character => items.push(this.#createCharacterItem(character)));\n\n        items.forEach((item, i) => {\n            item.y = i;\n            this.vboxCharacter.addChild(item);\n            item.click(()=>{\n                if(this.#selected) this.#selected.switch(false);\n                this.#selected = item;\n                item.switch(true);\n                item.event(Laya.Event.RESIZE);\n            })\n        });\n        if(g&&uniqueItem) {\n            this.#selected = uniqueItem;\n            uniqueItem.switch(true);\n            uniqueItem.event(Laya.Event.RESIZE);\n        }\n    }\n\n    generateUnique(data, generate) {\n        if(!data) return null;\n        if(!data.generate) return this.#createUniqueUnGenerateItem(generate);\n        data.name = $lang.UI_UniqueWaTaShi;\n        return this.#createCharacterItem(data);\n    }\n\n    next() {\n        if(!this.#selected) return $$event('message', ['M_PleaseSelectOne']);\n        if(!this.#selected.dataSource) return $$event('message', ['M_UnGenerate']);\n\n        const {property: propertyAllocate, talent: talents} = this.#selected.dataSource;\n        const replace = core.remake(talents.map(talent => talent.id));\n        if(replace.length > 0) {\n            $$event('message', [replace.map(v => ['F_TalentReplace', v])]);\n        }\n        $ui.switchView(\n            UI.pages.TRAJECTORY,\n            {\n                propertyAllocate, talents,\n                enableExtend: false,\n            }\n        );\n    }\n\n}"
  },
  {
    "path": "src/ui/themes/cyber/main.js",
    "content": "export default class CyberMain extends ui.view.CyberTheme.CyberMainUI {\n    constructor() {\n        super();\n        this.btnRemake.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.MODE));\n        this.btnAchievement.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.ACHIEVEMENT));\n        this.btnThanks.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.THANKS));\n        this.btnGithub.on(Laya.Event.CLICK, this, goto, ['github']);\n        this.btnDiscord.on(Laya.Event.CLICK, this, goto, ['discord']);\n        this.btnThemes.on(Laya.Event.CLICK, this, ()=>$ui.showDialog(UI.pages.THEMES));\n        this.btnSaveLoad.on(Laya.Event.CLICK, this, ()=>$ui.showDialog(UI.pages.SAVELOAD));\n        this.on(Laya.Event.RESIZE, this, () => {\n            const scale = Math.max(\n                this.width / this.imgBg.width,\n                this.height / this.imgBg.height\n            );\n            this.imgBg.scale(scale, scale);\n        });\n    }\n\n    static load() {\n        return [\n            \"fonts/方正像素12.ttf\",\n            \"images/atlas/images/accessories.atlas\",\n            \"images/atlas/images/border.atlas\",\n            \"images/atlas/images/button.atlas\",\n            \"images/atlas/images/icons.atlas\",\n            \"images/atlas/images/progress.atlas\",\n            \"images/atlas/images/slider.atlas\",\n        ]\n    }\n\n    init() {\n        this.banner.visible =\n        this.btnDiscord.visible =\n        this.btnAchievement.visible =\n        this.btnThanks.visible = !!core.times;\n    }\n}"
  },
  {
    "path": "src/ui/themes/cyber/mode.js",
    "content": "export default class CyberMode extends ui.view.CyberTheme.ModeUI {\n    constructor() {\n        super();\n        this.btnCustom.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.TALENT));\n        this.btnCelebrity.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.CELEBRITY));\n    }\n}"
  },
  {
    "path": "src/ui/themes/cyber/popup/achievementPopup.js",
    "content": "export default class CyberAchievementPopup extends ui.view.CyberTheme.CyberAchievementPopupUI {\n    constructor() {\n        super();\n    }\n\n    async popup({achievement}, parent) {\n        Laya.Tween.clearAll(this);\n        Laya.Tween.clearAll(this.boxBg);\n        this.alpha = 0.8;\n        this.labName.text = achievement.name;\n        this.labName.color = $ui.common.grade[achievement.grade];\n        this.x = - this.width;\n        this.boxBg.x = this.boxBg.width;\n        await Promise.all([\n            Laya.promises.Tween.to(this, {x: 0}, 300, Laya.Ease.strongOut),\n            Laya.promises.Tween.to(this.boxBg, {x: 0}, 300, Laya.Ease.strongOut, 50),\n        ])\n        await Laya.promises.Tween.to(this, {alpha: 0}, 3000, Laya.Ease.strongIn);\n    }\n}\n"
  },
  {
    "path": "src/ui/themes/cyber/property.js",
    "content": "export default class CyberProperty extends ui.view.CyberTheme.CyberPropertyUI {\n    constructor() {\n        super();\n\n        const types =\n        this.#types = core.PropertyTypes;\n\n        this.btnCharmIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.CHR, 1]);\n        this.btnCharmReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.CHR, -1]);\n\n        this.btnIntelligenceIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.INT, 1]);\n        this.btnIntelligenceReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.INT, -1]);\n\n        this.btnStrengthIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.STR, 1]);\n        this.btnStrengthReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.STR, -1]);\n\n        this.btnMoneyIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.MNY, 1]);\n        this.btnMoneyReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.MNY, -1]);\n\n        this.inputCharm.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.CHR]);\n        this.inputIntelligence.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.INT]);\n        this.inputStrength.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.STR]);\n        this.inputMoney.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.MNY]);\n\n        const selectAll = ({currentTarget: item}) => { item.text=''; };\n        this.inputCharm.on(Laya.Event.MOUSE_DOWN, this, selectAll);\n        this.inputIntelligence.on(Laya.Event.MOUSE_DOWN, this, selectAll);\n        this.inputStrength.on(Laya.Event.MOUSE_DOWN, this, selectAll);\n        this.inputMoney.on(Laya.Event.MOUSE_DOWN, this, selectAll);\n\n        this.btnRandomAllocate.on(Laya.Event.CLICK, this, this.random);\n        this.btnNext.on(Laya.Event.CLICK, this, this.next);\n\n        this.listSelectedTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);\n    }\n\n    #types;\n    #propertyPoints;\n    #propertyAllocate;\n    #propertyAllocateLimit;\n\n    init({talents}) {\n        this.listSelectedTalents.array = talents;\n        const replace = core.remake(talents.map(talent => talent.id));\n        if(replace.length > 0) {\n            $$event('message', [replace.map(v => ['F_TalentReplace', v])]);\n        }\n        this.#propertyPoints = core.getPropertyPoints();\n        this.#propertyAllocateLimit = core.propertyAllocateLimit;\n        this.labLeftPropertyPoint.text = this.#propertyPoints;\n        this.#propertyAllocate = {\n            [this.#types.CHR]: 0,\n            [this.#types.INT]: 0,\n            [this.#types.STR]: 0,\n            [this.#types.MNY]: 0,\n        }\n        this.updateAllocate();\n    }\n\n    next() {\n        const left = this.#propertyPoints - this.total;\n        if (left > 0) {\n            return $$event('message', ['F_PropertyPointLeft', left]);\n        }\n        $ui.switchView(\n            UI.pages.TRAJECTORY,\n            {\n                propertyAllocate: this.#propertyAllocate,\n                talents: this.listSelectedTalents.array,\n                enableExtend: true,\n            }\n        );\n    }\n\n    get total() {\n        return this.#propertyAllocate[this.#types.CHR]\n            +  this.#propertyAllocate[this.#types.INT]\n            +  this.#propertyAllocate[this.#types.STR]\n            +  this.#propertyAllocate[this.#types.MNY];\n    }\n\n    updateAllocate() {\n        const charm = this.#propertyAllocate[this.#types.CHR];\n        const intelligence = this.#propertyAllocate[this.#types.INT];\n        const strength = this.#propertyAllocate[this.#types.STR];\n        const money = this.#propertyAllocate[this.#types.MNY];\n\n        this.inputCharm.text = ''+charm;\n        this.inputIntelligence.text = ''+intelligence;\n        this.inputStrength.text = ''+strength;\n        this.inputMoney.text = ''+money;\n\n        this.labLeftPropertyPoint.text = this.#propertyPoints - this.total;\n\n        this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = false;\n        this.btnCharmReduce.disabled = this.btnCharmReduce.gray = false;\n        this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = false;\n        this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = false;\n        this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = false;\n        this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = false;\n        this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = false;\n        this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = false;\n\n        if (this.total >= this.#propertyPoints) {\n            this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = true;\n            this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = true;\n            this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = true;\n            this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = true;\n        } else if (this.total <= 0) {\n            this.btnCharmReduce.disabled = this.btnCharmReduce.gray = true;\n            this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = true;\n            this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = true;\n            this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = true;\n        }\n\n        if (charm <= this.#propertyAllocateLimit[0]) {\n            this.btnCharmReduce.disabled = this.btnCharmReduce.gray = true;\n        } else if (charm >= this.#propertyAllocateLimit[1]) {\n            this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = true;\n        }\n\n        if (intelligence <= this.#propertyAllocateLimit[0]) {\n            this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = true;\n        } else if (intelligence >= this.#propertyAllocateLimit[1]) {\n            this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = true;\n        }\n\n        if (strength <= this.#propertyAllocateLimit[0]) {\n            this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = true;\n        } else if (strength >= this.#propertyAllocateLimit[1]) {\n            this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = true;\n        }\n\n        if (money <= this.#propertyAllocateLimit[0]) {\n            this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = true;\n        } else if (money >= this.#propertyAllocateLimit[1]) {\n            this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = true;\n        }\n    }\n\n    check(left, right, value) {\n        if (value < left) return false;\n        if (value > right) return false;\n        return true;\n    }\n\n    random() {\n        let t = this.#propertyPoints;\n        const arr = new Array(4).fill(this.#propertyAllocateLimit[1]);\n\n        while (t > 0) {\n            const sub = Math.round(Math.random() * (Math.min(t, this.#propertyAllocateLimit[1]) - 1)) + 1;\n            while(true) {\n                const select = Math.floor(Math.random() * 4) % 4;\n                if(arr[select] - sub <0) continue;\n                arr[select] -= sub;\n                t -= sub;\n                break;\n            }\n        }\n        this.#propertyAllocate[this.#types.CHR] = this.#propertyAllocateLimit[1] - arr[0];\n        this.#propertyAllocate[this.#types.INT] = this.#propertyAllocateLimit[1] - arr[1];\n        this.#propertyAllocate[this.#types.STR] = this.#propertyAllocateLimit[1] - arr[2];\n        this.#propertyAllocate[this.#types.MNY] = this.#propertyAllocateLimit[1] - arr[3];\n\n        this.updateAllocate();\n    }\n\n    onPropertyAllocate(type, value) {\n        if (!this.check(\n                this.#propertyAllocateLimit[0],\n                this.#propertyAllocateLimit[1],\n                this.#propertyAllocate[type] + value\n        )) {\n            return;\n        }\n        if (!this.check(\n            0,\n            this.#propertyPoints,\n            this.total + value\n        )) {\n            return;\n        }\n        this.#propertyAllocate[type] += value;\n        this.updateAllocate();\n    }\n\n    onPropertyAllocateInput(type, inputItem) {\n        let value = parseInt(inputItem.text) || 0;\n        const total = this.total;\n        if (total + value < 0) {\n            value = this.#propertyAllocateLimit[0] * 4 - total;\n        } else if (total + value > this.#propertyPoints) {\n            value = this.#propertyPoints - total;\n        }\n\n        if (value < this.#propertyAllocateLimit[0]) {\n            value = this.#propertyAllocateLimit[0];\n        } else if (value > this.#propertyAllocateLimit[1]) {\n            value = this.#propertyAllocateLimit[1];\n        }\n\n\n        const alter = value - this.#propertyAllocate[type];\n        if (alter) {\n            this.onPropertyAllocate(type, alter);\n        } else {\n            this.updateAllocate();\n        }\n    }\n\n    renderTalent(box) {\n        const dataSource = box.dataSource;\n\n        const labTitle = box.getChildByName(\"labTitle\");\n        const grade1 = box.getChildByName(\"grade1\");\n        const grade2 = box.getChildByName(\"grade2\");\n        const grade3 = box.getChildByName(\"grade3\");\n        const labDescription = box.getChildByName(\"labDescription\");\n\n        labTitle.text = dataSource.name;\n        labDescription.text = dataSource.description;\n        switch (dataSource.grade) {\n            case 1:\n                grade1.visible = true;\n                grade2.visible = false;\n                grade3.visible = false;\n                break;\n            case 2:\n                grade1.visible = false;\n                grade2.visible = true;\n                grade3.visible = false;\n                break;\n            case 3:\n                grade1.visible = false;\n                grade2.visible = false;\n                grade3.visible = true;\n                break;\n            default:\n                grade1.visible = false;\n                grade2.visible = false;\n                grade3.visible = false;\n                break;\n        }\n    }\n}"
  },
  {
    "path": "src/ui/themes/cyber/summary.js",
    "content": "export default class CyberSummary extends ui.view.CyberTheme.CyberSummaryUI {\n    constructor() {\n        super();\n        this.listSelectedTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);\n        this.btnAgain.on(Laya.Event.CLICK, this, this.onAgain);\n    }\n\n    #selectedTalent;\n    #enableExtend;\n\n    onAgain() {\n        core.talentExtend(this.#selectedTalent);\n        core.times ++;\n        $ui.switchView(UI.pages.MAIN);\n    }\n\n    init({talents, enableExtend}) {\n        const {summary, lastExtendTalent} = core;\n        this.#enableExtend = enableExtend;\n\n        const gradeFilters = $ui.common.filter;\n        const gradeColors = $ui.common.grade;\n\n        const age = summary[core.PropertyTypes.HAGE];\n        this.labAge.text = ''+age.value;\n        this.labAgeJudge.text = age.judge;\n        this.labAgeJudge.color = gradeColors[age.grade];\n\n        const sum = summary[core.PropertyTypes.SUM];\n        this.labTotal.text = ''+sum.value;\n        this.labTotalJudge.text = sum.judge;\n        this.labTotalJudge.color = gradeColors[sum.grade];\n\n        const chr = summary[core.PropertyTypes.HCHR];\n        this.labCharm.text = ''+chr.value;\n        this.prgCharm.value = chr.progress;\n        this.labCharmJudge.text = chr.judge;\n        this.labCharmJudge.color = gradeColors[chr.grade];\n        this.boxCharmGrade.colorFilter = gradeFilters[chr.grade];\n\n        const int = summary[core.PropertyTypes.HINT];\n        this.labIntelligence.text = ''+int.value;\n        this.prgIntelligence.value = int.progress;\n        this.labIntelligenceJudge.text = int.judge;\n        this.labIntelligenceJudge.color = gradeColors[int.grade];\n        this.boxIntelligenceGrade.colorFilter = gradeFilters[int.grade];\n\n        const str = summary[core.PropertyTypes.HSTR];\n        this.labStrength.text = ''+str.value;\n        this.prgStrength.value = str.progress;\n        this.labStrengthJudge.text = str.judge;\n        this.labStrengthJudge.color = gradeColors[str.grade];\n        this.boxStrengthGrade.colorFilter = gradeFilters[str.grade];\n\n        const mny = summary[core.PropertyTypes.HMNY];\n        this.labMoney.text = ''+mny.value;\n        this.prgMoney.value = mny.progress;\n        this.labMoneyJudge.text = mny.judge;\n        this.labMoneyJudge.color = gradeColors[mny.grade];\n        this.boxMoneyGrade.colorFilter = gradeFilters[mny.grade];\n\n        const spr = summary[core.PropertyTypes.HSPR];\n        this.labSpirit.text = ''+spr.value;\n        this.prgSpirit.value = spr.progress;\n        this.labSpiritJudge.text = spr.judge;\n        this.labSpiritJudge.color = gradeColors[spr.grade];\n        this.boxSpiritGrade.colorFilter = gradeFilters[spr.grade];\n\n        talents.sort(({id:a, grade:ag}, {id:b, grade:bg},)=>{\n            if(a == lastExtendTalent) return -1;\n            if(b == lastExtendTalent) return 1;\n            return bg - ag;\n        });\n        if(this.#enableExtend) {\n            this.#selectedTalent = talents[0].id;\n        } else {\n            this.#selectedTalent = lastExtendTalent;\n        }\n        this.listSelectedTalents.array = talents;\n    }\n\n    renderTalent(box) {\n        const dataSource = box.dataSource;\n\n        const labTitle = box.getChildByName(\"labTitle\");\n        const grade1 = box.getChildByName(\"grade1\");\n        const grade2 = box.getChildByName(\"grade2\");\n        const grade3 = box.getChildByName(\"grade3\");\n        const labDescription = box.getChildByName(\"labDescription\");\n        const selected = box.getChildByName(\"selected\");\n        const unselected = box.getChildByName(\"unselected\");\n\n        labTitle.text = dataSource.name;\n        labDescription.text = dataSource.description;\n        switch (dataSource.grade) {\n            case 1:\n                grade1.visible = true;\n                grade2.visible = false;\n                grade3.visible = false;\n                break;\n            case 2:\n                grade1.visible = false;\n                grade2.visible = true;\n                grade3.visible = false;\n                break;\n            case 3:\n                grade1.visible = false;\n                grade2.visible = false;\n                grade3.visible = true;\n                break;\n            default:\n                grade1.visible = false;\n                grade2.visible = false;\n                grade3.visible = false;\n                break;\n        }\n\n        selected.visible = dataSource.id == this.#selectedTalent;\n        unselected.visible = !selected.visible;\n        box.off(Laya.Event.CLICK, this, this.onSelectTalent);\n        box.on(Laya.Event.CLICK, this, this.onSelectTalent, [dataSource.id]);\n    }\n\n    onSelectTalent(talentId) {\n        if(!this.#enableExtend) {\n            return $$event('message', ['M_DisableExtendTalent']);\n        }\n        if(talentId == this.#selectedTalent) {\n            this.#selectedTalent = null;\n        } else {\n            this.#selectedTalent = talentId;\n        }\n\n        this.listSelectedTalents.refresh();\n    }\n}"
  },
  {
    "path": "src/ui/themes/cyber/talent.js",
    "content": "export default class CyberTalent extends ui.view.CyberTheme.CyberTalentUI {\n    constructor() {\n        super();\n        this.btnDrawCard.on(Laya.Event.CLICK, this, this.onClickDrawCard);\n        this.btnNext.on(Laya.Event.CLICK, this, this.onClickNext);\n        this.listTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);\n        this.listTalents.scrollBar.elasticDistance = 150;\n        this.on(Laya.Event.RESIZE, this, () => {\n            const renderWidth = this.listTalents?._itemRender?.props?.width;\n            if(renderWidth) {\n                const col = Math.max(Math.floor((this.width - 40) / renderWidth), 1);\n                this.listTalents.width = col * renderWidth + (col - 1) * (this.listTalents.spaceY || 0);\n            }\n        });\n    }\n\n    #selected = new Set();\n    static load() {\n        return ['images/background/background_2@3x.png'];\n    }\n\n    init() {\n        this.pageDrawCard.visible = true;\n        this.pageResult.visible = false;\n        this.btnNext.label = 'UI_Talent_Select_Uncomplete';\n        this.#selected.clear();\n    }\n\n    close() {}\n\n    onClickDrawCard() {\n        this.pageDrawCard.visible = false;\n        this.pageResult.visible = true;\n        this.listTalents.array = core.talentRandom();\n    }\n\n    onClickNext() {\n        if(this.#selected.size < core.talentSelectLimit) {\n            return $$event('message', ['F_TalentSelectNotComplect', core.talentSelectLimit]);\n        }\n\n        const talents = [...this.#selected].map(index => this.listTalents.array[index]);\n        $ui.switchView(UI.pages.PROPERTY, { talents, enableExtend: true});\n    }\n\n    renderTalent(box, index) {\n        const dataSource = box.dataSource;\n\n        const hboxTitle = box.getChildByName(\"hboxTitle\");\n        const labTitle = hboxTitle.getChildByName(\"labTitle\");\n        const grades = hboxTitle.getChildByName(\"grades\");\n        const grade1 = grades.getChildByName(\"grade1\");\n        const grade2 = grades.getChildByName(\"grade2\");\n        const grade3 = grades.getChildByName(\"grade3\");\n        const labDescription = box.getChildByName(\"labDescription\");\n        const unselected = box.getChildByName(\"unselected\");\n        const selected = box.getChildByName(\"selected\");\n\n\n        switch (dataSource.grade) {\n            case 1:\n                grades.x = 0;\n                labTitle.x = 1;\n                grade1.visible = true;\n                grade2.visible = false;\n                grade3.visible = false;\n                break;\n            case 2:\n                grades.x = 0;\n                labTitle.x = 1;\n                grade1.visible = false;\n                grade2.visible = true;\n                grade3.visible = false;\n                break;\n            case 3:\n                grades.x = 0;\n                labTitle.x = 1;\n                grade1.visible = false;\n                grade2.visible = false;\n                grade3.visible = true;\n                break;\n            default:\n                grades.x = 1;\n                labTitle.x = 0;\n                grade1.visible = false;\n                grade2.visible = false;\n                grade3.visible = false;\n                break;\n        }\n        labTitle.text = dataSource.name;\n        labTitle.event(Laya.Event.RESIZE);\n        labDescription.text = dataSource.description;\n        unselected.visible = !( selected.visible = this.#selected.has(index) );\n        box.offAll(Laya.Event.CLICK);\n        box.on(Laya.Event.CLICK, this, () => {\n            if(this.#selected.has(index)) {\n                this.#selected.delete(index);\n            } else {\n                if(this.#selected.size >= core.talentSelectLimit) {\n                    return $$event('message', ['F_TalentSelectLimit', core.talentSelectLimit]);\n                }\n                const exclusive = core.exclude(\n                    [...this.#selected].map(index => this.listTalents.array[index].id),\n                    this.listTalents.array[index].id\n                );\n                if(exclusive != null) {\n                    for(const {name, id} of this.listTalents.array)\n                        if(exclusive == id)\n                            return $$event('message', ['F_TalentConflict', name]);\n                    return;\n                }\n                this.#selected.add(index);\n            }\n\n            this.btnNext.label = this.#selected.size === core.talentSelectLimit\n                ? 'UI_Next'\n                : 'UI_Talent_Select_Uncomplete';\n            unselected.visible = !( selected.visible = this.#selected.has(index) );\n        });\n    }\n}"
  },
  {
    "path": "src/ui/themes/cyber/trajectory.js",
    "content": "export default class CyberTrajectory extends ui.view.CyberTheme.CyberTrajectoryUI {\n    constructor() {\n        super();\n        let pos1 = [0, 0];\n        this.panelTrajectory.on(Laya.Event.MOUSE_DOWN, this, e => pos1 = [e.stageX, e.stageY]);\n        this.panelTrajectory.on(Laya.Event.MOUSE_UP, this, e => {\n            const distanceX = e.stageX - pos1[0];\n            const distanceY = e.stageY - pos1[1];\n            if(Math.sqrt(Math.abs(distanceX) + Math.abs(distanceY)) > 10) {\n                return;\n            }\n            this.onNext();\n        });\n        this.btnSummary.on(Laya.Event.CLICK, this, this.onSummary);\n\n        this.panelTrajectory.vScrollBar.elasticDistance = 150;\n\n        let interval = null;\n        let timeout = null;\n\n        const scroll = alter => {\n            let value = this.panelTrajectory.vScrollBar.value + alter;\n            if(value < 0) value = 0;\n            if(value > this.panelTrajectory.vScrollBar.max) value = this.panelTrajectory.vScrollBar.max;\n            this.panelTrajectory.scrollTo(0, value);\n        }\n        const on = (btn, alter) => {\n            btn.off(Laya.Event.CLICK, this, scroll);\n            btn.on(Laya.Event.CLICK, this, scroll, [100*alter]);\n            timeout = setTimeout(() => {\n                btn.off(Laya.Event.CLICK, this, scroll);\n                interval = setInterval(() => scroll(10*alter), 10);\n            }, 100);\n        }\n        const clear = () => {\n            if(interval) {\n                clearInterval(interval);\n                interval = null;\n            }\n            if(timeout) {\n                clearTimeout(timeout);\n                timeout = null;\n            }\n        };\n        this.btnUp.on(Laya.Event.MOUSE_DOWN, this, on, [this.btnUp, -1]);\n        this.btnDown.on(Laya.Event.MOUSE_DOWN, this, on, [this.btnDown, 1]);\n        this.btnUp.on(Laya.Event.MOUSE_UP, this, clear);\n        this.btnUp.on(Laya.Event.MOUSE_OUT, this, clear);\n        this.btnDown.on(Laya.Event.MOUSE_UP, this, clear);\n        this.btnDown.on(Laya.Event.MOUSE_OUT, this, clear);\n        this.scbSpeed.on(Laya.Event.CHANGE, this, () => this.speed = this.scbSpeed.value);\n        this.scbSpeed.on(Laya.Event.MOUSE_UP, this, () => this.onNext());\n    }\n\n    #speed;\n    #auto;\n\n    static #createComponent = Laya.plugin.extractComponents(CyberTrajectory.uiView, ['boxTrajectoryItem']);\n    #createTrajectoryItem() {\n        const item = CyberTrajectory.#createComponent('boxTrajectoryItem');\n        item.labContent = item.getChildByName('labContent');\n        item.labAge = item.getChildByName('hboxAge').getChildByName('labAge');\n        item.boxGrade = item.getChildByName('boxGrade');\n        return item;\n    }\n    #isEnd;\n    #trajectoryItems;\n    #talents;\n    #enableExtend;\n\n    init({propertyAllocate, talents, enableExtend}) {\n        this.#enableExtend = enableExtend;\n        this.boxParticle.visible = false;\n        this.boxSpeed.visible = true;\n        this.btnSummary.visible = false;\n        this.#trajectoryItems = [];\n        this.#isEnd = false;\n        this.#talents = talents;\n        core.start(propertyAllocate);\n        this.updateProperty();\n        this.onNext();\n    }\n\n    close() {\n        this.scbSpeed.value = 0;\n        this.speed = 0;\n        this.#trajectoryItems.forEach(item => {\n            item.removeSelf();\n            item.destroy();\n        });\n        this.#trajectoryItems = null;\n    }\n\n    updateProperty() {\n        const types = core.PropertyTypes;\n        const propertys = core.propertys;\n\n        this.labCharm.text = propertys[types.CHR];\n        this.labIntelligence.text = propertys[types.INT];\n        this.labStrength.text = propertys[types.STR];\n        this.labMoney.text = propertys[types.MNY];\n        this.labSpirit.text = propertys[types.SPR];\n    }\n\n    onNext() {\n        if(this.#isEnd) return;\n\n        const { age, content, isEnd } = core.next();\n        this.#isEnd = isEnd;\n\n        if(isEnd) {\n            this.boxSpeed.visible = false;\n            this.btnSummary.visible = true;\n            Laya.timer.frameOnce(1,this,()=>{\n                this.panelTrajectory.scrollTo(0, this.panelTrajectory.contentHeight);\n            });\n        }\n        this.panelTrajectory.scrollTo(0, this.panelTrajectory.contentHeight);\n        this.renderTrajectory(age, content);\n\n        if(age >= 100) {\n            this.boxParticle.visible = true;\n        }\n        this.updateProperty();\n    }\n\n    renderTrajectory(age, content) {\n        const item = this.#createTrajectoryItem();\n        item.labAge.text = ''+age;\n        item.labContent.text = content.map(\n            ({type, description, grade, name, postEvent}) => {\n                switch(type) {\n                    case 'TLT':\n                        return `天赋【${name}】发动：${description}`;\n                    case 'EVT':\n                        return description + (postEvent?`\\n${postEvent}`:'');\n                }\n            }\n        ).join('\\n');\n        $_.deepMapSet(\n            item.boxGrade,\n            $ui.common.gradeBlk[content[content.length - 1].grade || 0]\n        );\n        this.vboxTrajectory.addChild(item);\n        this.#trajectoryItems.push(item);\n        item.y = this.vboxTrajectory.height;\n    }\n\n    onSummary() {\n        const talents = this.#talents;\n        $ui.switchView(UI.pages.SUMMARY, { talents, enableExtend: this.#enableExtend });\n    }\n\n    get speed() {\n        return this.#speed;\n    }\n\n    set speed(speed) {\n        this.#speed = speed;\n        this.prgSpeed.value = speed / this.scbSpeed.max;\n        clearInterval(this.#auto);\n        this.#auto = null;\n        if(!speed) return;\n        this.#auto = setInterval(\n            () => this.onNext(),\n            3000 * (1 - this.prgSpeed.value) + 300\n        );\n    }\n}"
  },
  {
    "path": "src/ui/themes/default/achievement.js",
    "content": "export default class Achievement extends ui.view.DefaultTheme.AchievementUI {\n    constructor() {\n        super();\n        this.btnBack.on(Laya.Event.CLICK, this, () => $ui.switchView(UI.pages.MAIN));\n        this.btnRank.on(Laya.Event.CLICK, this, $$event, ['message', ['M_NoRank']]);\n        this.listAchievements.renderHandler = new Laya.Handler(this, this.onRenderAchievement);\n        this.listAchievements.scrollBar.elasticDistance = 150;\n    }\n\n    init() {\n\n        const {statistics, achievements, PropertyTypes: pt} = core;\n\n        this.listAchievements.array = achievements;\n\n        this.labRemakeTimes.text = $_.format($lang.F_RemakeTimes, statistics[pt.TMS].value);\n        this.labRemakeTimesJudge.text = statistics[pt.TMS].judge;\n        $_.deepMapSet(this.boxRemakeTimes, $ui.common.achievement[statistics[pt.TMS].grade]);\n\n        this.labAchievementCount.text = $_.format($lang.F_AchievementCount, statistics[pt.CACHV].value);\n        this.labAchievementCountJudge.text = statistics[pt.CACHV].judge;\n        $_.deepMapSet(this.boxAchievementCount, $ui.common.achievement[statistics[pt.CACHV].grade]);\n\n        this.labEventRate.text = parseInt(statistics[pt.REVT].value*100)+'%';\n        this.prgEventRate.scaleX = statistics[pt.REVT].value;\n        $_.deepMapSet(this.boxEventRate, $ui.common.achievement[statistics[pt.REVT].grade]);\n\n        this.labTalentRate.text = parseInt(statistics[pt.RTLT].value*100)+'%';\n        this.prgTalentRate.scaleX = statistics[pt.RTLT].value;\n        $_.deepMapSet(this.boxTalentRate, $ui.common.achievement[statistics[pt.RTLT].grade]);\n    }\n\n    onRenderAchievement(box) {\n        const dataSource = box.dataSource;\n\n        const name = box.getChildByName('name');\n        const description = box.getChildByName('description');\n        const boxMask = box.getChildByName('boxMask');\n\n        $_.deepMapSet(box, $ui.common.achievement[dataSource.grade]);\n        name.color = description.color = $ui.common.defaultFontColor;\n\n        if(dataSource.isAchieved) {\n            name.text = dataSource.name;\n            description.text = dataSource.description;\n            boxMask.visible = false;\n        } else {\n            name.text = dataSource.hide? '???': dataSource.name;\n            description.text = dataSource.hide? '???': dataSource.description;\n            boxMask.visible = true;\n        }\n    }\n}"
  },
  {
    "path": "src/ui/themes/default/celebrity.js",
    "content": "export default class Celebrity extends ui.view.DefaultTheme.CelebrityUI {\n    constructor() {\n        super();\n        this.btnRetry.on(Laya.Event.CLICK, this, ()=>this.random());\n        this.btnNext.on(Laya.Event.CLICK, this, this.next);\n        this.panelCharacter.vScrollBar.elasticDistance = 150;\n    }\n\n    #selected;\n    static #createComponent = Laya.plugin.extractComponents(Celebrity.uiView, ['boxCharacter','boxTalent','boxUniqueUnGenerate']);\n    #createCharacterItem(dataSource, click) {\n        const {name, property, talent} = dataSource;\n        const style = $ui.common.characterItem;\n        const item = Celebrity.#createComponent('boxCharacter');\n        const vboxStates = item.getChildByName('vboxStates');\n        const boxName = item.getChildByName('boxName');\n        boxName.label = name;\n\n        const p = $_.clone(property);\n        for(const k in p)\n            if(Math.abs(p[k] - Math.PI) < 0.0000001)\n                p[k] = 'π';\n\n        vboxStates.label = $_.format($lang.F_PropertyStr, p);\n        $_.deepMapSet(boxName, style.name);\n        $_.deepMapSet(vboxStates, style.state);\n        for(const t of talent) {\n            const i = Celebrity.#createComponent('boxTalent');\n            i.label = $_.format($lang.F_TalentSelection, t);\n            i.y = vboxStates.height+vboxStates.space;\n            $_.deepMapSet(i, $ui.common.card[t.grade].normal);\n            vboxStates.addChild(i);\n        }\n        const box = new Laya.Box();\n        box.height = vboxStates.space;\n        box.y = vboxStates.height;\n        vboxStates.addChild(box);\n        vboxStates.scaleY = 0;\n\n        item.dataSource = dataSource;\n        item.switch = showDetails => vboxStates.scaleY = !!showDetails?1:0;\n        item.click = (cb, caller) => {\n            boxName.offAll(Laya.Event.CLICK);\n            boxName.on(Laya.Event.CLICK, caller || this, cb);\n        }\n        if(click) item.click(click);\n        return item;\n    }\n    #createUniqueUnGenerateItem(generate) {\n        const style = $ui.common.characterItem;\n        const item = Celebrity.#createComponent('boxUniqueUnGenerate');\n        const boxName = item.getChildByName('boxName');\n        const vboxStates = item.getChildByName('vboxStates');\n        const label = vboxStates.getChildByName('label');\n        const boxBtn = vboxStates.getChildByName('boxBtn');\n        const btn = boxBtn.getChildByName('btn');\n\n        $_.deepMapSet(boxName, style.name);\n        $_.deepMapSet(vboxStates, style.state);\n        $_.deepMapSet(btn, style.name);\n\n        boxBtn.y = label.height + vboxStates.space;\n        label.event(Laya.Event.RESIZE);\n        vboxStates.scaleY = 0;\n        item.dataSource = false;\n        item.switch = showDetails => vboxStates.scaleY = !!showDetails?1:0;\n        item.click = (cb, caller) => {\n            boxName.offAll(Laya.Event.CLICK);\n            boxName.on(Laya.Event.CLICK, caller || this, cb);\n        }\n        item.generate = (cb, caller) => {\n            btn.offAll(Laya.Event.CLICK);\n            btn.on(Laya.Event.CLICK, caller || this, cb);\n        }\n        if(generate) item.generate(generate);\n        return item;\n    }\n\n    init() {\n        this.random();\n    }\n\n    close() {\n        this.#selected = null;\n        this.vboxCharacter.destroyChildren(true);\n    }\n\n    random(g) {\n        this.#selected = null;\n        this.vboxCharacter.destroyChildren(true);\n        const {unique, normal} = core.characterRandom();\n        const items = [];\n        const uniqueItem = this.generateUnique(unique, ()=>{\n            core.generateUnique();\n            this.random(normal);\n\n        });\n        if(uniqueItem) items.push(uniqueItem);\n        (g||normal).forEach(character => items.push(this.#createCharacterItem(character)));\n\n        items.forEach((item, i) => {\n            item.y = i;\n            this.vboxCharacter.addChild(item);\n            item.click(()=>{\n                if(this.#selected) this.#selected.switch(false);\n                this.#selected = item;\n                item.switch(true);\n                item.event(Laya.Event.RESIZE);\n            })\n        });\n        if(g&&uniqueItem) {\n            this.#selected = uniqueItem;\n            uniqueItem.switch(true);\n            uniqueItem.event(Laya.Event.RESIZE);\n        }\n    }\n\n    generateUnique(data, generate) {\n        if(!data) return null;\n        if(!data.generate) return this.#createUniqueUnGenerateItem(generate);\n        data.name = $lang.UI_UniqueWaTaShi;\n        return this.#createCharacterItem(data);\n    }\n\n    next() {\n        if(!this.#selected) return $$event('message', ['M_PleaseSelectOne']);\n        if(!this.#selected.dataSource) return $$event('message', ['M_UnGenerate']);\n\n        const {property: propertyAllocate, talent: talents} = this.#selected.dataSource;\n        const replace = core.remake(talents.map(talent => talent.id));\n        if(replace.length > 0) {\n            $$event('message', [replace.map(v => ['F_TalentReplace', v])]);\n        }\n        $ui.switchView(\n            UI.pages.TRAJECTORY,\n            {\n                propertyAllocate, talents,\n                enableExtend: false,\n            }\n        );\n    }\n\n}"
  },
  {
    "path": "src/ui/themes/default/main.js",
    "content": "export default class Main extends ui.view.DefaultTheme.MainUI {\n    constructor() {\n        super();\n        this.btnRemake.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.MODE));\n        this.btnAchievement.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.ACHIEVEMENT));\n        this.btnThanks.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.THANKS));\n        this.btnGithub.on(Laya.Event.CLICK, this, goto, ['github']);\n        this.btnDiscord.on(Laya.Event.CLICK, this, goto, ['discord']);\n        this.btnThemes.on(Laya.Event.CLICK, this, ()=>$ui.showDialog(UI.pages.THEMES));\n        this.btnSaveLoad.on(Laya.Event.CLICK, this, ()=>$ui.showDialog(UI.pages.SAVELOAD));\n    }\n\n    static load() {\n        return [\n            \"images/atlas/images/icons.atlas\",\n        ]\n    }\n\n    init() {\n        this.banner.visible =\n        this.btnDiscord.visible =\n        this.btnAchievement.visible =\n        this.btnThanks.visible = !!core.times;\n        const text = this.labSubTitle.text;\n        this.labSubTitle.text = ' ';\n        this.labSubTitle.text = text;\n    }\n}"
  },
  {
    "path": "src/ui/themes/default/mode.js",
    "content": "export default class Mode extends ui.view.DefaultTheme.ModeUI {\n    constructor() {\n        super();\n        this.btnCustom.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.TALENT));\n        this.btnCelebrity.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.CELEBRITY));\n    }\n}"
  },
  {
    "path": "src/ui/themes/default/popup/achievementPopup.js",
    "content": "export default class achievementPopup extends ui.view.DefaultTheme.AchievementPopupUI {\n    constructor() {\n        super();\n    }\n\n    async popup({achievement}, parent) {\n        Laya.Tween.clearAll(this);\n        Laya.Tween.clearAll(this.boxBg);\n        this.alpha = 0.8;\n        this.labName.text = achievement.name;\n        this.labName.color = $ui.common.grade[achievement.grade];\n        this.x = - this.width;\n        this.boxBg.x = this.boxBg.width;\n        await Promise.all([\n            Laya.promises.Tween.to(this, {x: 0}, 300, Laya.Ease.strongOut),\n            Laya.promises.Tween.to(this.boxBg, {x: 0}, 300, Laya.Ease.strongOut, 50),\n        ])\n        await Laya.promises.Tween.to(this, {alpha: 0}, 3000, Laya.Ease.strongIn);\n    }\n}\n"
  },
  {
    "path": "src/ui/themes/default/property.js",
    "content": "export default class Property extends ui.view.DefaultTheme.PropertyUI {\n    constructor() {\n        super();\n\n        const types =\n        this.#types = core.PropertyTypes;\n\n        this.btnCharmIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.CHR, 1]);\n        this.btnCharmReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.CHR, -1]);\n\n        this.btnIntelligenceIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.INT, 1]);\n        this.btnIntelligenceReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.INT, -1]);\n\n        this.btnStrengthIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.STR, 1]);\n        this.btnStrengthReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.STR, -1]);\n\n        this.btnMoneyIncrease.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.MNY, 1]);\n        this.btnMoneyReduce.on(Laya.Event.CLICK, this, this.onPropertyAllocate, [types.MNY, -1]);\n\n        this.inputCharm.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.CHR]);\n        this.inputIntelligence.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.INT]);\n        this.inputStrength.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.STR]);\n        this.inputMoney.on(Laya.Event.INPUT, this, this.onPropertyAllocateInput, [types.MNY]);\n\n        const selectAll = ({currentTarget: item}) => { item.text=''; };\n        this.inputCharm.on(Laya.Event.MOUSE_DOWN, this, selectAll);\n        this.inputIntelligence.on(Laya.Event.MOUSE_DOWN, this, selectAll);\n        this.inputStrength.on(Laya.Event.MOUSE_DOWN, this, selectAll);\n        this.inputMoney.on(Laya.Event.MOUSE_DOWN, this, selectAll);\n\n        this.btnRandomAllocate.on(Laya.Event.CLICK, this, this.random);\n        this.btnNext.on(Laya.Event.CLICK, this, this.next);\n\n        this.listSelectedTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);\n    }\n\n    #types;\n    #propertyPoints;\n    #propertyAllocate;\n    #propertyAllocateLimit;\n\n    init({talents}) {\n        this.listSelectedTalents.array = talents;\n        const replace = core.remake(talents.map(talent => talent.id));\n        if(replace.length > 0) {\n            $$event('message', [replace.map(v => ['F_TalentReplace', v])]);\n        }\n        this.#propertyPoints = core.getPropertyPoints();\n        this.#propertyAllocateLimit = core.propertyAllocateLimit;\n        this.labLeftPropertyPoint.text = this.#propertyPoints;\n        this.#propertyAllocate = {\n            [this.#types.CHR]: 0,\n            [this.#types.INT]: 0,\n            [this.#types.STR]: 0,\n            [this.#types.MNY]: 0,\n        }\n        this.updateAllocate();\n    }\n\n    next() {\n        const left = this.#propertyPoints - this.total;\n        if (left > 0) {\n            return $$event('message', ['F_PropertyPointLeft', left]);\n        }\n        $ui.switchView(\n            UI.pages.TRAJECTORY,\n            {\n                propertyAllocate: this.#propertyAllocate,\n                talents: this.listSelectedTalents.array,\n                enableExtend: true,\n            }\n        );\n    }\n\n    get total() {\n        return this.#propertyAllocate[this.#types.CHR]\n            +  this.#propertyAllocate[this.#types.INT]\n            +  this.#propertyAllocate[this.#types.STR]\n            +  this.#propertyAllocate[this.#types.MNY];\n    }\n\n    updateAllocate() {\n        const charm = this.#propertyAllocate[this.#types.CHR];\n        const intelligence = this.#propertyAllocate[this.#types.INT];\n        const strength = this.#propertyAllocate[this.#types.STR];\n        const money = this.#propertyAllocate[this.#types.MNY];\n\n        this.inputCharm.text = ''+charm;\n        this.inputIntelligence.text = ''+intelligence;\n        this.inputStrength.text = ''+strength;\n        this.inputMoney.text = ''+money;\n\n        this.labLeftPropertyPoint.text = this.#propertyPoints - this.total;\n\n        this.btnCharmIncrease.disabled = this.btnCharmIncrease.gray = false;\n        this.btnCharmReduce.disabled = this.btnCharmReduce.gray = false;\n        this.btnIntelligenceIncrease.disabled = this.btnIntelligenceIncrease.gray = false;\n        this.btnIntelligenceReduce.disabled = this.btnIntelligenceReduce.gray = false;\n        this.btnStrengthIncrease.disabled = this.btnStrengthIncrease.gray = false;\n        this.btnStrengthReduce.disabled = this.btnStrengthReduce.gray = false;\n        this.btnMoneyIncrease.disabled = this.btnMoneyIncrease.gray = false;\n        this.btnMoneyReduce.disabled = this.btnMoneyReduce.gray = false;\n    }\n\n    check(left, right, value) {\n        if (value < left) return false;\n        if (value > right) return false;\n        return true;\n    }\n\n    random() {\n        let t = this.#propertyPoints;\n        const arr = new Array(4).fill(this.#propertyAllocateLimit[1]);\n\n        while (t > 0) {\n            const sub = Math.round(Math.random() * (Math.min(t, this.#propertyAllocateLimit[1]) - 1)) + 1;\n            while(true) {\n                const select = Math.floor(Math.random() * 4) % 4;\n                if(arr[select] - sub <0) continue;\n                arr[select] -= sub;\n                t -= sub;\n                break;\n            }\n        }\n        this.#propertyAllocate[this.#types.CHR] = this.#propertyAllocateLimit[1] - arr[0];\n        this.#propertyAllocate[this.#types.INT] = this.#propertyAllocateLimit[1] - arr[1];\n        this.#propertyAllocate[this.#types.STR] = this.#propertyAllocateLimit[1] - arr[2];\n        this.#propertyAllocate[this.#types.MNY] = this.#propertyAllocateLimit[1] - arr[3];\n\n        this.updateAllocate();\n    }\n\n    onPropertyAllocate(type, value) {\n        if (!this.check(\n                this.#propertyAllocateLimit[0],\n                this.#propertyAllocateLimit[1],\n                this.#propertyAllocate[type] + value\n        )) {\n            return;\n        }\n        if (!this.check(\n            0,\n            this.#propertyPoints,\n            this.total + value\n        )) {\n            return;\n        }\n        this.#propertyAllocate[type] += value;\n        this.updateAllocate();\n    }\n\n    onPropertyAllocateInput(type, inputItem) {\n        let value = parseInt(inputItem.text) || 0;\n        const total = this.total;\n        if (total + value < 0) {\n            value = this.#propertyAllocateLimit[0] * 4 - total;\n        } else if (total + value > this.#propertyPoints) {\n            value = this.#propertyPoints - total;\n        }\n\n        if (value < this.#propertyAllocateLimit[0]) {\n            value = this.#propertyAllocateLimit[0];\n        } else if (value > this.#propertyAllocateLimit[1]) {\n            value = this.#propertyAllocateLimit[1];\n        }\n\n\n        const alter = value - this.#propertyAllocate[type];\n        if (alter) {\n            this.onPropertyAllocate(type, alter);\n        } else {\n            this.updateAllocate();\n        }\n    }\n\n    renderTalent(box) {\n        const dataSource = box.dataSource;\n\n        box.label = $_.format($lang.F_TalentSelection, dataSource);\n        const style = $ui.common.card[dataSource.grade].normal;\n\n        $_.deepMapSet(box, style);\n    }\n}"
  },
  {
    "path": "src/ui/themes/default/summary.js",
    "content": "export default class Summary extends ui.view.DefaultTheme.SummaryUI {\n    constructor() {\n        super();\n        this.listSummary.renderHandler = Laya.Handler.create(this, this.renderSummary, null, false);\n        this.listSelectedTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);\n        this.btnAgain.on(Laya.Event.CLICK, this, this.onAgain);\n    }\n\n    #selectedTalent;\n    #enableExtend;\n\n    onAgain() {\n        core.talentExtend(this.#selectedTalent);\n        core.times ++;\n        $ui.switchView(UI.pages.MAIN);\n    }\n\n    init({talents, enableExtend}) {\n        const {summary, lastExtendTalent} = core;\n        this.#enableExtend = enableExtend;\n\n        this.listSummary.array = [\n            [core.PropertyTypes.HCHR, $lang.UI_Property_Charm],\n            [core.PropertyTypes.HINT, $lang.UI_Property_Intelligence],\n            [core.PropertyTypes.HSTR, $lang.UI_Property_Strength],\n            [core.PropertyTypes.HMNY, $lang.UI_Property_Money],\n            [core.PropertyTypes.HSPR, $lang.UI_Property_Spirit],\n            [core.PropertyTypes.HAGE, $lang.UI_Final_Age],\n            [core.PropertyTypes.SUM, $lang.UI_Total_Judge],\n        ].map(([type, key]) => {\n            const data = summary[type];\n            return {\n                label: `${key}${$lang.UI_Colon} ${data.value} ${$lang[data.judge]}`,\n                grade: data.grade,\n            }\n        });\n\n        talents.sort(({id:a, grade:ag}, {id:b, grade:bg},)=>{\n            if(a == lastExtendTalent) return -1;\n            if(b == lastExtendTalent) return 1;\n            return bg - ag;\n        });\n        if(this.#enableExtend) {\n            this.#selectedTalent = talents[0].id;\n        } else {\n            this.#selectedTalent = lastExtendTalent;\n        }\n        this.listSelectedTalents.array = talents;\n    }\n    renderSummary(box) {\n        const {label, grade} = box.dataSource;\n        box.label = label;\n        $_.deepMapSet(box, $ui.common.summary[grade]);\n    }\n    renderTalent(box) {\n        const dataSource = box.dataSource;\n        box.label = $_.format($lang.F_TalentSelection, dataSource);\n        const style = $ui.common.card[dataSource.grade];\n        $_.deepMapSet(box, dataSource.id == this.#selectedTalent? style.selected: style.normal);\n        box.getChildByName('blank').pause = dataSource.id != this.#selectedTalent;\n        box.off(Laya.Event.CLICK, this, this.onSelectTalent);\n        box.on(Laya.Event.CLICK, this, this.onSelectTalent, [dataSource.id]);\n    }\n\n    onSelectTalent(talentId) {\n        if(!this.#enableExtend) {\n            return $$event('message', ['M_DisableExtendTalent']);\n        }\n        if(talentId == this.#selectedTalent) {\n            this.#selectedTalent = null;\n        } else {\n            this.#selectedTalent = talentId;\n        }\n\n        this.listSelectedTalents.refresh();\n    }\n}"
  },
  {
    "path": "src/ui/themes/default/talent.js",
    "content": "export default class Talent extends ui.view.DefaultTheme.TalentUI {\n    constructor() {\n        super();\n        this.btnDrawCard.on(Laya.Event.CLICK, this, this.onClickDrawCard);\n        this.btnNext.on(Laya.Event.CLICK, this, this.onClickNext);\n        this.listTalents.renderHandler = Laya.Handler.create(this, this.renderTalent, null, false);\n        this.listTalents.scrollBar.elasticDistance = 150;\n    }\n\n    #selected = new Set();\n    init() {\n        this.pageDrawCard.visible = true;\n        this.pageResult.visible = false;\n        this.btnNext.label = 'UI_Talent_Select_Uncomplete';\n        this.#selected.clear();\n    }\n\n    close() {}\n\n    onClickDrawCard() {\n        this.pageDrawCard.visible = false;\n        this.pageResult.visible = true;\n        this.listTalents.array = core.talentRandom();\n    }\n\n    onClickNext() {\n        if(this.#selected.size < core.talentSelectLimit) {\n            return $$event('message', ['F_TalentSelectNotComplect', core.talentSelectLimit]);\n        }\n\n        const talents = [...this.#selected].map(index => this.listTalents.array[index]);\n        $ui.switchView(UI.pages.PROPERTY, { talents, enableExtend: true });\n    }\n\n    renderTalent(box, index) {\n        const dataSource = box.dataSource;\n\n        const blank = box.getChildByName('blank');\n        box.label = $_.format($lang.F_TalentSelection, dataSource);\n\n        const style = $ui.common.card[dataSource.grade];\n        const changeStyle = () => {\n            const selected = this.#selected.has(index);\n            blank.pause = !selected;\n            $_.deepMapSet(box, selected? style.selected: style.normal);\n        }\n        changeStyle();\n\n        box.offAll(Laya.Event.CLICK);\n        box.on(Laya.Event.CLICK, this, () => {\n            if(this.#selected.has(index)) {\n                this.#selected.delete(index);\n            } else {\n                if(this.#selected.size >= core.talentSelectLimit) {\n                    return $$event('message', ['F_TalentSelectLimit', core.talentSelectLimit]);\n                }\n                const exclusive = core.exclude(\n                    [...this.#selected].map(index => this.listTalents.array[index].id),\n                    this.listTalents.array[index].id\n                );\n                if(exclusive != null) {\n                    for(const {name, id} of this.listTalents.array)\n                        if(exclusive == id)\n                            return $$event('message', ['F_TalentConflict', name]);\n                    return;\n                }\n                this.#selected.add(index);\n            }\n\n            this.btnNext.label = this.#selected.size === core.talentSelectLimit\n                ? 'UI_Next'\n                : 'UI_Talent_Select_Uncomplete';\n\n            changeStyle();\n        });\n    }\n}"
  },
  {
    "path": "src/ui/themes/default/thanks.js",
    "content": "export default class Thanks extends ui.view.DefaultTheme.ThanksUI {\n    constructor() {\n        super();\n        this.btnBack.on(Laya.Event.CLICK, this, ()=>$ui.switchView(UI.pages.MAIN));\n        this.listSupports.renderHandler = Laya.Handler.create(this, this.renderSupport, null, false);\n        this.panelTopSupports.vScrollBar.elasticDistance = 150;\n        this.listSupports.scrollBar.elasticDistance = 150;\n        this.btnAFD.on(Laya.Event.CLICK, this, goto, ['sponsor_afd']);\n        this.btnDDF.on(Laya.Event.CLICK, this, goto, ['sponsor_ddf']);\n    }\n\n    static #createComponent = Laya.plugin.extractComponents(Thanks.uiView, ['boxTopSupport']);\n    #createTopSupportItem() {\n        const item = Thanks.#createComponent('boxTopSupport');\n        item.name = item.getChildByName('name');\n        item.comment = item.getChildByName('comment');\n        $_.deepMapSet(item, $ui.common.topSupportItem);\n        return item;\n    }\n\n    #topSupports;\n\n    init() {\n        const supports = [];\n        this.#topSupports = [];\n        core.specialThanks\n            .sort(()=>0.5-Math.random())\n            .forEach(({group, name, comment, color})=>\n                group == 2\n                    ? supports.push({name, color})\n                    : this.renderTopSupport(name, comment, color)\n            );\n        this.listSupports.array = supports;\n    }\n\n    renderTopSupport(name, comment, color) {\n        const item = this.#createTopSupportItem();\n        item.name.text = name;\n        item.comment.text = comment;\n        item.name.color = color || '#000000';\n        this.vboxTopSupports.addChild(item);\n        this.#topSupports.push(item);\n        this.#topSupports.forEach((item, index) => item.y = index);\n    }\n\n    renderSupport(label) {\n        const {name, color} = label.dataSource;\n        label.text = name;\n        label.color = color || $ui.common.defaultFontColor;\n    }\n\n    close() {\n        this.#topSupports.forEach(item => {\n            item.removeSelf();\n            item.destroy();\n        });\n        this.#topSupports = null;\n    }\n}"
  },
  {
    "path": "src/ui/themes/default/trajectory.js",
    "content": "export default class Trajectory extends ui.view.DefaultTheme.TrajectoryUI {\n    constructor() {\n        super();\n        let pos1 = [0, 0];\n        this.panelTrajectory.on(Laya.Event.MOUSE_DOWN, this, e => pos1 = [e.stageX, e.stageY]);\n        this.panelTrajectory.on(Laya.Event.MOUSE_UP, this, e => {\n            const distanceX = e.stageX - pos1[0];\n            const distanceY = e.stageY - pos1[1];\n            if(Math.sqrt(Math.abs(distanceX) + Math.abs(distanceY)) > 10) {\n                return;\n            }\n            this.onNext();\n        });\n        this.btnSummary.on(Laya.Event.CLICK, this, this.onSummary);\n\n        this.panelTrajectory.vScrollBar.elasticDistance = 150;\n        this.scbSpeed.on(Laya.Event.CHANGE, this, () => this.speed = this.scbSpeed.value);\n        this.scbSpeed.on(Laya.Event.MOUSE_UP, this, () => this.onNext());\n    }\n\n    #speed;\n    #auto;\n\n    static load() {\n        return [\n            \"images/atlas/images/progress.atlas\",\n            'images/atlas/images/slider.atlas',\n        ];\n    }\n\n    static #createComponent = Laya.plugin.extractComponents(Trajectory.uiView, ['boxTrajectoryItem']);\n    #createTrajectoryItem() {\n        const item = Trajectory.#createComponent('boxTrajectoryItem');\n        item.labContent = item.getChildByName('labContent');\n        item.labAge = item.getChildByName('hboxAge').getChildByName('labAge');\n        const config = $ui.common.trajectoryItem;\n        $_.deepMapSet(item, config.box);\n        item.grade = grade => {\n            $_.deepMapSet(item, config.grade[grade || 0]);\n        }\n        item.getChildByName('hboxAge')._childs.forEach(child => child.color = config.ageColor);\n        item.labContent.color = config.contentColor;\n        return item;\n    }\n    #isEnd;\n    #trajectoryItems;\n    #talents;\n    #enableExtend;\n\n    init({propertyAllocate, talents, enableExtend}) {\n        this.#enableExtend = enableExtend;\n        this.boxParticle.visible = false;\n        this.boxSpeed.visible = true;\n        this.btnSummary.visible = false;\n        this.#trajectoryItems = [];\n        this.#isEnd = false;\n        this.#talents = talents;\n        core.start(propertyAllocate);\n        this.updateProperty();\n        this.onNext();\n    }\n\n    close() {\n        this.scbSpeed.value = 0;\n        this.speed = 0;\n        this.#trajectoryItems.forEach(item => {\n            item.removeSelf();\n            item.destroy();\n        });\n        this.#trajectoryItems = null;\n    }\n\n    updateProperty() {\n        const types = core.PropertyTypes;\n        const propertys = core.propertys;\n\n        this.labCharm.text = propertys[types.CHR];\n        this.labIntelligence.text = propertys[types.INT];\n        this.labStrength.text = propertys[types.STR];\n        this.labMoney.text = propertys[types.MNY];\n        this.labSpirit.text = propertys[types.SPR];\n    }\n\n    onNext() {\n        if(this.#isEnd) return;\n\n        const { age, content, isEnd } = core.next();\n        this.#isEnd = isEnd;\n\n        if(isEnd) {\n            this.boxSpeed.visible = false;\n            this.btnSummary.visible = true;\n            Laya.timer.frameOnce(1,this,()=>{\n                this.panelTrajectory.scrollTo(0, this.panelTrajectory.contentHeight);\n            });\n        }\n        this.panelTrajectory.scrollTo(0, this.panelTrajectory.contentHeight);\n        this.renderTrajectory(age, content);\n\n        if(age >= 100) {\n            this.boxParticle.visible = true;\n        }\n        this.updateProperty();\n    }\n\n    renderTrajectory(age, content) {\n        const item = this.#createTrajectoryItem();\n        item.labAge.text = ''+age;\n        item.labContent.text = content.map(\n            ({type, description, grade, name, postEvent}) => {\n                switch(type) {\n                    case 'TLT':\n                        return `天赋【${name}】发动：${description}`;\n                    case 'EVT':\n                        return description + (postEvent?`\\n${postEvent}`:'');\n                }\n            }\n        ).join('\\n');\n        item.grade(content[content.length - 1].grade);\n        this.vboxTrajectory.addChild(item);\n        this.#trajectoryItems.push(item);\n        item.y = this.vboxTrajectory.height;\n    }\n\n    onSummary() {\n        const talents = this.#talents;\n        $ui.switchView(UI.pages.SUMMARY, {talents, enableExtend: this.#enableExtend});\n    }\n\n    get speed() {\n        return this.#speed;\n    }\n\n    set speed(speed) {\n        this.#speed = speed;\n        this.prgSpeed.value = speed / this.scbSpeed.max;\n        clearInterval(this.#auto);\n        this.#auto = null;\n        if(!speed) return;\n        this.#auto = setInterval(\n            () => this.onNext(),\n            3000 * (1 - this.prgSpeed.value) + 300\n        );\n    }\n}"
  },
  {
    "path": "src/ui/themes/loading.js",
    "content": "export default class Loading extends ui.view.LoadingUI {\n    constructor() {\n        super();\n    }\n\n    static load() {\n        return [\n            \"images/atlas/images/resource.atlas\"\n        ]\n    }\n\n    show() {}\n\n    onProgress(progress) {}\n}"
  },
  {
    "path": "src/ui/themes/message.js",
    "content": "export default class MessagePopup extends ui.view.MessagePopupUI {\n    constructor() {\n        super();\n        this.left = this.right = 0;\n        this.boxBg.defaultColor = \"#000000\";\n        this.boxBg.hoverColor = \"#000000\";\n        this.boxBg.radius = 20;\n    }\n\n    async popup({message}, parent) {\n        this.message.text = message;\n        this.message.commitMeasure();\n        this.height = this.message.height + this.boxBg.radius * 2 + this.message.fontSize;\n        Laya.Tween.clearAll(this);\n        this.alpha = 0;\n        this.y = - 2 * this.height;\n        await Laya.promises.Tween.to(this, { y: 0, alpha: 1 }, 300, Laya.Ease.backOut);\n        await Laya.promises.Tween.to(this, { alpha: 0}, 300, Laya.Ease.strongIn, 3000);\n    }\n}"
  },
  {
    "path": "src/ui/themes/saveload.js",
    "content": "export default class SaveLoad extends ui.view.SaveLoadUI {\n    constructor() {\n        super();\n        this.btnClose.on(Laya.Event.CLICK, this, async ()=>{\n            await this.close();\n            $ui.switchView(UI.pages.MAIN);\n        });\n        this.btnRead.on(Laya.Event.CLICK, this, async ()=>{\n            const result = await $$copy(this.input.text = this.data);\n            $$event('message', [result? 'UI_CopySuccess': 'UI_CopyFailed']);\n        });\n        this.btnWrite.on(Laya.Event.CLICK, this, async ()=>{\n            const text = await $$read();\n            if(text == false) {\n                this.data = [\n                    this.input.text,\n                    'UI_PasteFailedDecodeSuccess',\n                    'UI_PasteFailedDecodeFailed'\n                ];\n            } else {\n                this.input.text = text;\n                this.data = [\n                    text,\n                    'UI_PasteSuccessDecodeSuccess',\n                    'UI_PasteSuccessDecodeFailed'\n                ];\n            }\n        });\n\n        this.btnSave.on(Laya.Event.CLICK, this, ()=>{\n            let blob = new Blob([this.data], { type: 'application/json' });\n            const slice = blob.slice || blob.webkitSlice || blob.mozSlice;\n            blob = slice.call(blob, 0, blob.size, 'application/octet-stream');\n            const a = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');\n            a.href = URL.createObjectURL(blob);\n            a.download = `Remake_save_${new Date().toISOString().replace(':','.')}.json`;\n\n            document.body.appendChild(a);\n            a.click();\n            document.body.removeChild(a);\n            URL.revokeObjectURL(a.href);\n        });\n        this.btnLoad.on(Laya.Event.CLICK, this, ()=>{\n            const file = document.createElement('input');\n            file.setAttribute('type', 'file');\n            file.setAttribute('name', 'file');\n            file.setAttribute('accept', 'application/json');\n            file.setAttribute('style', 'display: none;');\n            document.body.appendChild(file);\n            file.click();\n            file.onchange = (e)=>{\n                const file = e.target.files[0];\n                if(!file) return;\n                const reader = new FileReader();\n                reader.onload = () => this.data = [reader.result];\n                reader.readAsText(file);\n                document.body.removeChild(file);\n            };\n        });\n        this.input.on(Laya.Event.MOUSE_DOWN, this, ()=>{\n            this.input.setSelection(0, this.input.text.length);\n        })\n\n        this.btnBackup.on(Laya.Event.CLICK, this, ()=>{\n            const board = document.createElement(\"div\");\n            document.body.appendChild(board);\n            board.style = `\n                position: fixed;\n                top: 0;\n                left: 0;\n                right: 0;\n                bottom: 0;\n                opacity: 0.95`;\n\n            const bg = document.createElement(\"div\");\n            bg.style = `\n                position: absolute;\n                top: 0;\n                left: 0;\n                right: 0;\n                bottom: 0;\n                background: #fff;\n                opacity: 0.95`;\n            document.body.appendChild(board);\n            board.appendChild(bg);\n            const textarea = document.createElement(\"textarea\");\n            textarea.style = `position: absolute; width: ${window.innerWidth}px; height: ${window.innerHeight}px;`\n            textarea.value = JSON.stringify(\n                JSON.parse(this.data),\n                null,\n                4\n            );\n            board.appendChild(textarea);\n            const close = document.createElement(\"div\");\n            close.style = `\n                position: absolute;\n                top: 0;\n                right: 0;\n                width: 100px;\n                height: 100px;\n                background: red;\n                font-size:100px;\n                padding: 0;\n                line-height: 100px;\n                color: white;\n                opacity: 0.7`;\n            close.innerHTML = '×';\n            board.appendChild(close);\n            close.onclick = ()=>board.remove();\n\n            const load = document.createElement(\"div\");\n            load.style = `\n                position: absolute;\n                bottom: 0;\n                right: 0;\n                width: 100px;\n                height: 100px;\n                background: limegreen;\n                font-size: 35px;\n                padding: 0;\n                line-height: 50px;\n                color: white;\n                opacity: 0.7`;\n            load.innerHTML = 'LOAD<br>读取';\n            board.appendChild(load);\n            load.onclick = ()=>this.data = [textarea.value, '成功/success', '失败/failed', true];\n        });\n    }\n\n    static load() {\n        return [\"images/atlas/images/radio.atlas\"];\n    }\n\n    init() {\n        this.input.text = this.data;\n    }\n\n    get data() {\n        const data = {};\n        Object\n            .keys(localStorage)\n            .filter(v=>v.substr(0,4)!='goog')\n            .forEach(key=>data[key] = localStorage[key]);\n        return JSON.stringify(data);\n    }\n\n    set data([v, success = 'UI_LoadSuccess', failed = 'UI_LoadFailed', altMsg]) {\n        try {\n            const data = JSON.parse(v);\n            for(const key in data)\n                localStorage.setItem(key, data[key]);\n            if(altMsg) alert(success);\n            else $$event('message', [success]);\n            $ui.theme = $ui.theme;\n            this.btnClose.event(Laya.Event.CLICK);\n        } catch (e) {\n            console.error(e);\n            if(altMsg) alert(`${failed}\\n${e}`);\n            else $$event('message', [failed]);\n        }\n    }\n}"
  },
  {
    "path": "src/ui/themes/themes.js",
    "content": "export default class Themes extends ui.view.ThemesUI {\n    constructor() {\n        super();\n        this.btnClose.on(Laya.Event.CLICK, this, ()=>this.close());\n        this.btnOK.on(Laya.Event.CLICK, this, async ()=>{\n            const selected = this.selected;\n            if(!selected == $ui.theme) return this.close();\n            $ui.theme = selected;\n            await this.close();\n            $ui.switchView(UI.pages.MAIN);\n        });\n    }\n\n    static load() {\n        return [\"images/atlas/images/radio.atlas\"];\n    }\n\n    init() {\n        this.selected = localStorage.getItem('theme');\n    }\n\n    get selected() {\n        switch(this.radioTheme.selectedIndex) {\n            case 0: return 'cyber';\n            case 1: return 'dark';\n            case 2: return 'light';\n            default: return 'default';\n        }\n    }\n    set selected(v) {\n        let index;\n        switch(v) {\n            case 'cyber': index = 0; break;\n            case 'dark': index = 1; break;\n            case 'light': index = 2; break;\n            default: index = -1; break;\n        }\n        this.radioTheme.selectedIndex = index;\n    }\n}"
  },
  {
    "path": "src/ui/uiManager.js",
    "content": "import Views from './views.js'\nexport default class UIManager {\n    constructor(stage) {\n        UIManager.#views = Views\n\n        if (!stage) {\n            stage = Laya.stage\n        }\n        this.#stage = stage\n\n        stage.addChild(this.#viewLayer)\n        this.#viewLayer.zOrder = 1\n        stage.addChild(this.#dialogLayer)\n        this.#dialogLayer.zOrder = 2\n        stage.addChild(this.#popupLayer)\n        this.#popupLayer.zOrder = 3\n        this.#viewLayer.top =\n            this.#viewLayer.bottom =\n            this.#viewLayer.left =\n            this.#viewLayer.right =\n            this.#dialogLayer.top =\n            this.#dialogLayer.bottom =\n            this.#dialogLayer.left =\n            this.#dialogLayer.right =\n            this.#popupLayer.top =\n            this.#popupLayer.bottom =\n            this.#popupLayer.left =\n            this.#popupLayer.right =\n            this.#dialogMask.top =\n            this.#dialogMask.bottom =\n            this.#dialogMask.left =\n            this.#dialogMask.right =\n                0\n        this.#dialogMask.graphics.drawRect(0, 0, 5000, 5000, '#000000')\n        this.#dialogMask.alpha = 0.4\n        this.#dialogMask.on(Laya.Event.CLICK, this, () => {\n            this.#dialogStack[this.#dialogStack.length - 1]?.close?.()\n        })\n    }\n\n    static #instance = {}\n    static #views\n    #stage\n    #loading\n    #currentView\n    #viewLayer = new Laya.Panel()\n    #dialogLayer = new Laya.Panel()\n    #popupLayer = new Laya.Panel()\n    #dialogMask = new Laya.Sprite()\n    #viewMap = new Map()\n    #class = new Map()\n    #dialogStack = []\n\n    static get inst() {\n        return this.getInstance()\n    }\n    static getInstance(name = 'default') {\n        return this.#instance[name] || (this.#instance[name] = new UIManager())\n    }\n\n    static get pages() {\n        return this.#views.pages\n    }\n\n    static get popups() {\n        return this.#views.popups\n    }\n\n    static theme(theme, prop) {\n        return this.#views.themes[theme][prop]\n    }\n\n    async setLoading(loading) {\n        const className = this.#pages[loading]\n        const view = await this.getView(className, null, null, loading)\n        view.top = view.bottom = view.left = view.right = 0\n        view.zOrder = 4\n        this.#loading = view\n    }\n\n    async switchView(viewName, args, actions) {\n        const className = this.#pages[viewName]\n        // get view instance\n        const view = await this.getView(\n            className,\n            args,\n            actions?.load,\n            viewName,\n            'pages'\n        )\n\n        view.top = view.bottom = view.left = view.right = 0\n        // close current view\n        this.clearAllDialog()\n        await this.#currentView?.__close?.(view)\n        await this.#currentView?.close?.(view)\n        this.#viewLayer.removeChildren()\n\n        // open new view\n        await view.init?.(args)\n\n        this.#currentView = view\n        this.#viewLayer.addChild(view)\n\n        view.__close = actions?.close\n        await actions?.open?.(view)\n        await view.show?.()\n    }\n\n    async getView(className, args, preload, viewName, type) {\n        // check if view is already loaded\n        let view = await this.#viewMap.get(className)\n\n        let timeout\n        if (this.#loading) {\n            timeout = setTimeout(\n                () => this.#stage.addChild(this.#loading),\n                3000\n            )\n        }\n        const onProgress = this.#loading?.onProgress\n\n        if (!view) {\n            // load view\n            const ViewClass = await this.loadView(className)\n            const resourceList = await ViewClass.load?.(args)\n            const scanedResourceList = this.#loading\n                ? this.scanResource(ViewClass.uiView)\n                : []\n            if (preload) {\n                preload = [].concat(preload).concat(scanedResourceList)\n            } else {\n                preload = scanedResourceList\n            }\n            await this.loadRes(resourceList, preload, onProgress)\n\n            // create view\n            view = new ViewClass()\n            // add view to map\n            this.#viewMap.set(className, view)\n        } else {\n            // load resource\n            const resourceList = await view.constructor.load?.(args)\n            await this.loadRes(resourceList, preload, onProgress)\n        }\n        if (timeout) clearTimeout(timeout)\n        this.#loading?.removeSelf()\n\n        this.#config(view, viewName, type)\n        // return view\n        return view\n    }\n\n    async loadView(className) {\n        // load view\n        if (this.#class.has(className)) return this.#class.get(className)\n        const views = import.meta.glob('./themes/**/*.js')\n        const view = (await views[`./themes/${className}.js`]()).default\n        this.#class.set(className, view)\n        return view\n    }\n\n    async loadRes(resourceList, preload, onProgress) {\n        const cnt = (resourceList?.length || 0) + (preload?.length || 0)\n        if (resourceList && resourceList.length) {\n            const s = resourceList.length / cnt\n            await Laya.promises.loader.load(\n                resourceList,\n                Laya.Handler.create(null, prg => onProgress?.(prg * s))\n            )\n        }\n        if (preload && preload.length) {\n            const s = 1 - preload.length / cnt\n            const l = preload.length / cnt\n            await Laya.promises.loader.load(\n                preload,\n                Laya.Handler.create(null, prg => onProgress?.(prg * l + s))\n            )\n        }\n    }\n\n    #showDialogStack() {\n        if (this.#dialogStack.length == 0) {\n            this.#dialogLayer.visible = false\n            return\n        }\n        this.#dialogLayer.visible = true\n        this.#dialogStack.forEach((dialog, i) => {\n            this.#dialogLayer.addChild(dialog)\n            dialog.zOrder = i\n        })\n        this.#dialogLayer.addChild(this.#dialogMask)\n        const l = this.#dialogStack.length\n        this.#dialogMask.zOrder = l - 1\n        this.#dialogStack[l - 1].zOrder = l\n    }\n\n    async showDialog(dialogName, args, actions) {\n        const className = this.#pages[dialogName]\n        const dialog = await this.getView(\n            className,\n            args,\n            actions?.load,\n            dialogName,\n            'pages'\n        )\n\n        const index = this.#dialogStack.indexOf(dialog)\n        if (index != -1) {\n            this.#dialogStack.splice(index, 1)\n        }\n        this.#dialogStack.push(dialog)\n        dialog.init?.(args)\n        dialog.centerX = dialog.centerY = 0\n        this.#showDialogStack()\n\n        const open =\n            actions?.open ||\n            (async () => {\n                dialog.scaleX = 0\n                dialog.scaleY = 0\n                await Laya.promises.Tween.to(\n                    dialog,\n                    { scaleX: 1, scaleY: 1 },\n                    300,\n                    Laya.Ease.backOut\n                )\n            })\n        await open(dialog)\n        dialog.mouseThrough = true\n        dialog.mouseEnabled = true\n        dialog.close = async () => {\n            if (actions?.close) {\n                await actions.close()\n            } else {\n                await Laya.promises.Tween.to(\n                    dialog,\n                    { scaleX: 0, scaleY: 0 },\n                    300,\n                    Laya.Ease.strongIn\n                )\n            }\n            const index = this.#dialogStack.indexOf(dialog)\n            if (index != -1) {\n                this.#dialogStack.splice(index, 1)\n            }\n            this.#showDialogStack()\n        }\n\n        this.#dialogLayer.addChild(dialog)\n    }\n\n    async popup(type, args) {\n        const className = this.#popups[type]\n        const popup = await this.getView(className, args, null, type, 'popups')\n        this.#popupLayer.addChild(popup)\n        await popup.popup(args, this.#popupLayer)\n        this.#popupLayer.removeChild(popup)\n    }\n\n    clearAllDialog() {\n        this.#dialogStack = []\n        this.#showDialogStack()\n    }\n\n    #config(view, key, type) {\n        const config = this.#configs?.[type]?.[key]\n        if (!config) return\n        if (view.config && view.config(config)) return\n        const applyConfig = (target, config) => {\n            if (!target) return\n            if (typeof config == 'string') {\n                config = this.#configs?.class?.[config]\n            }\n            $_.deepMapSet(target, config)\n        }\n\n        if (config.names)\n            for (const name in config.names)\n                this.#deepGetChildsByName(view, name).forEach(child =>\n                    applyConfig(child, config.names[name])\n                )\n\n        if (config.vars)\n            for (const key in config.vars)\n                applyConfig(view[key], config.vars[key])\n    }\n\n    #deepGetChildsByName(parent, name) {\n        const list = []\n        if (!parent || !parent._childs) return list\n\n        for (const child of parent._childs) {\n            if (child.name == name) list.push(child)\n            if (child._childs)\n                list.push(...this.#deepGetChildsByName(child, name))\n        }\n        return list\n    }\n\n    #cutPath(path) {\n        path = '' + path\n        let index = path.length\n        do {\n            index--\n            if (path[index] == '.') {\n                break\n            }\n        } while (index > 0)\n        return [path.substring(0, index), path.substring(index, path.length)]\n    }\n\n    #subSkin(skin, type) {\n        if (!skin || !skin.replace(/\\s/g, '')) return []\n        switch (type) {\n            case 'ProgressBar':\n                return [skin, ...this.#progressBarSkin(skin)]\n            case 'ScrollBar':\n                return [skin, ...this.#scrollBarSkin(skin)]\n            default:\n                return [skin]\n        }\n    }\n\n    #progressBarSkin(skin) {\n        if (!skin.replace(/\\s/g, '')) return []\n        let p = this.#cutPath(skin)\n        return [`${p[0]}$bar${p[1]}`]\n    }\n\n    #scrollBarSkin(skin) {\n        if (!skin.replace(/\\s/g, '')) return []\n        let p = this.#cutPath(skin)\n        return [\n            `${p[0]}$bar${p[1]}`,\n            `${p[0]}$up${p[1]}`,\n            `${p[0]}$down${p[1]}`,\n        ]\n    }\n\n    scanResource(uiView) {\n        if (!uiView) return []\n        const resourceList = []\n\n        resourceList.push(...this.#subSkin(uiView.props?.skin, uiView.type))\n        resourceList.push(\n            ...this.#subSkin(uiView.props?.hScrollBarSkin, 'ScrollBar')\n        )\n        resourceList.push(\n            ...this.#subSkin(uiView.props?.vScrollBarSkin, 'ScrollBar')\n        )\n\n        uiView.child?.forEach(child => {\n            resourceList.push(...this.scanResource(child))\n        })\n\n        return resourceList\n    }\n\n    get currentView() {\n        return this.#currentView\n    }\n\n    get currentDialog() {\n        return this.#dialogStack[this.#dialogStack.length - 1]\n    }\n\n    get theme() {\n        return localStorage.getItem('theme')\n    }\n    set theme(value) {\n        localStorage.setItem('theme', value)\n        this.#stage.bgColor = this.#configs.bgColor\n        document\n            ?.querySelector?.('meta[name=\"theme-color\"]')\n            ?.setAttribute?.('content', this.#configs.bgColor)\n    }\n\n    get #pages() {\n        return UIManager.theme(this.theme, 'pages')\n    }\n    get #popups() {\n        return UIManager.theme(this.theme, 'popups')\n    }\n    get #configs() {\n        return UIManager.theme(this.theme, 'configs')\n    }\n    get common() {\n        return this.#configs.common\n    }\n    gradeColor(grade) {\n        return this.common.grade[grade]\n    }\n    gradeFilter(grade) {\n        return this.common.filter[grade]\n    }\n}\n"
  },
  {
    "path": "src/ui/views.js",
    "content": "const pages = {\n    LOADING: 'LOADING',\n    MAIN: 'MAIN',\n    TALENT: 'TALENT',\n    PROPERTY: 'PROPERTY',\n    TRAJECTORY: 'TRAJECTORY',\n    SUMMARY: 'SUMMARY',\n    ACHIEVEMENT: 'ACHIEVEMENT',\n    THANKS: 'THANKS',\n    THEMES: 'THEMES',\n    SAVELOAD: 'SAVELOAD',\n    MODE: 'MODE',\n    CELEBRITY: 'CELEBRITY',\n}\n\nconst popups = {\n    ACHIEVEMENT: 'POPUP_ACHIEVEMENT',\n    MESSAGE: 'POPUP_MESSAGE',\n}\n\nconst cyber = {\n    pages: {\n        [pages.LOADING]: 'loading',\n        [pages.MAIN]: 'cyber/main',\n        [pages.TALENT]: 'cyber/talent',\n        [pages.PROPERTY]: 'cyber/property',\n        [pages.TRAJECTORY]: 'cyber/trajectory',\n        [pages.SUMMARY]: 'cyber/summary',\n        [pages.ACHIEVEMENT]: 'cyber/achievement',\n        [pages.THANKS]: 'default/thanks',\n        [pages.THEMES]: 'themes',\n        [pages.SAVELOAD]: 'saveload',\n        [pages.MODE]: 'cyber/mode',\n        [pages.CELEBRITY]: 'cyber/celebrity',\n    },\n    popups: {\n        [popups.ACHIEVEMENT]: 'cyber/popup/achievementPopup',\n        [popups.MESSAGE]: 'message',\n    },\n    configs: {\n        bgColor: '#04131f',\n        common: {\n            topSupportItem: {\n                defaultColor: '#ffa500',\n                defaultStroke: '#ffa500',\n                hoverColor: '#ffc500',\n                hoverStroke: '#ffa500',\n            },\n            defaultFontColor: '#cccccc',\n            grade: ['#cccccc', '#55fffe', '#b17cff', '#ffce45'],\n            filter: ['#ccccccff', '#55fffeff', '#b17cffff', '#ffce45ff'],\n            gradeBlk: [\n                {\n                    visible: false,\n                },\n                {\n                    defaultColor: '#55fffe',\n                    hoverColor: '#55fffe',\n                    visible: true,\n                },\n                {\n                    defaultColor: '#b17cff',\n                    hoverColor: '#b17cff',\n                    visible: true,\n                },\n                {\n                    defaultColor: '#ffce45',\n                    hoverColor: '#ffce45',\n                    visible: true,\n                },\n            ],\n        },\n        pages: {\n            [pages.MAIN]: {\n                vars: {\n                    btnThemes: {\n                        defaultColor: '#cccccc',\n                        radius: 100,\n                    },\n                    btnSaveLoad: {\n                        defaultColor: '#5865f2',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#1160b0',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#eeeeee',\n                        lineWidth: 0,\n                        radius: 100,\n                    },\n                },\n            },\n            [pages.THANKS]: {\n                vars: {\n                    btnBack: {\n                        defaultColor: '#5865f2',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#1160b0',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#eeeeee',\n                        lineWidth: 0,\n                        radius: 4,\n                    },\n                    btnAFD: {\n                        defaultColor: '#8764de',\n                        defaultStroke: '#8764de',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#9774ee',\n                        hoverStroke: '#9774ee',\n                        hoverLabel: '#ffffff',\n                        radius: 4,\n                    },\n                    btnDDF: {\n                        defaultColor: '#cc6699',\n                        defaultStroke: '#cc6699',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#dc76a9',\n                        hoverStroke: '#dc76a9',\n                        hoverLabel: '#ffffff',\n                        radius: 4,\n                    },\n                },\n            },\n            [pages.THEMES]: {\n                vars: {\n                    btnOK: {\n                        defaultColor: '#28b070',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#00ff00',\n                        hoverLabel: '#ffffff',\n                        radius: 80,\n                    },\n                    btnClose: {\n                        defaultColor: '#eb3941',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#ff0000',\n                        hoverLabel: '#ffffff',\n                        radius: 80,\n                    },\n                },\n            },\n            [pages.SAVELOAD]: {\n                vars: {\n                    btnClose: {\n                        defaultColor: '#eb3941',\n                        hoverColor: '#ff0000',\n                    },\n                    btnSave: {\n                        defaultColor: '#007046',\n                        hoverColor: '#76f190',\n                    },\n                    btnRead: {\n                        defaultColor: '#007046',\n                        hoverColor: '#76f190',\n                    },\n                    btnLoad: {\n                        defaultColor: '#fc5531',\n                        hoverColor: '#f28b54',\n                    },\n                    btnWrite: {\n                        defaultColor: '#fc5531',\n                        hoverColor: '#f28b54',\n                    },\n                    btnBackup: {\n                        defaultColor: '#9c30cd',\n                        hoverColor: '#bf50fd',\n                        radius: 8,\n                        defaultLabel: '#ffffff',\n                        hoverLabel: '#ffffff',\n                    },\n                },\n                names: {\n                    btnSmall: {\n                        radius: 80,\n                        defaultLabel: '#ffffff',\n                        hoverLabel: '#ffffff',\n                    },\n                },\n            },\n        },\n    },\n}\n\nconst dark = {\n    pages: {\n        [pages.LOADING]: 'loading',\n        [pages.MAIN]: 'default/main',\n        [pages.TALENT]: 'default/talent',\n        [pages.PROPERTY]: 'default/property',\n        [pages.TRAJECTORY]: 'default/trajectory',\n        [pages.SUMMARY]: 'default/summary',\n        [pages.ACHIEVEMENT]: 'default/achievement',\n        [pages.THANKS]: 'default/thanks',\n        [pages.THEMES]: 'themes',\n        [pages.SAVELOAD]: 'saveload',\n        [pages.MODE]: 'default/mode',\n        [pages.CELEBRITY]: 'default/celebrity',\n    },\n    popups: {\n        [popups.ACHIEVEMENT]: 'default/popup/achievementPopup',\n        [popups.MESSAGE]: 'message',\n    },\n    configs: {\n        bgColor: '#222831',\n        common: {\n            defaultFontColor: '#eeeeee',\n            trajectoryItem: {\n                box: {\n                    // filters: ()=>[new Laya.GlowFilter(\"#eeeeee\", 8, 0, 0)],\n                    defaultStroke: '#eeeeee',\n                    hoverStroke: '#eeeeee',\n                    lineWidth: 2,\n                },\n                grade: [\n                    {\n                        defaultColor: '#464646',\n                        hoverColor: '#4a5361',\n                    },\n                    {\n                        defaultColor: '#6495ed',\n                        hoverColor: '#87cefa',\n                    },\n                    {\n                        defaultColor: '#e2a7ff',\n                        hoverColor: '#e7beff',\n                    },\n                    {\n                        defaultColor: '#ffa07a',\n                        hoverColor: '#f7a989',\n                    },\n                ],\n                ageColor: '#ffffee',\n                contentColor: '#eeeeee',\n            },\n            topSupportItem: {\n                defaultColor: '#ffa500',\n                defaultStroke: '#ffa500',\n                hoverColor: '#ffc500',\n                hoverStroke: '#ffa500',\n            },\n            grade: ['#cccccc', '#55fffe', '#b17cff', '#ffce45'],\n            filter: ['#ccccccff', '#55fffeff', '#b17cffff', '#ffce45ff'],\n            card: [\n                {\n                    normal: {\n                        defaultColor: '#464646',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#c0c0c0',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#3b3b3b',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                    selected: {\n                        defaultColor: '#c0c0c0',\n                        defaultStroke: '#a5ff88',\n                        defaultLabel: '#3b3b3b',\n                        hoverColor: '#c0c0c0',\n                        hoverStroke: '#a5ff88',\n                        hoverLabel: '#3b3b3b',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                },\n                {\n                    normal: {\n                        defaultColor: '#6495ed',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#87cefa',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#3b3b3b',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                    selected: {\n                        defaultColor: '#87cefa',\n                        defaultStroke: '#a5ff88',\n                        defaultLabel: '#3b3b3b',\n                        hoverColor: '#87cefa',\n                        hoverStroke: '#a5ff88',\n                        hoverLabel: '#3b3b3b',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                },\n                {\n                    normal: {\n                        defaultColor: '#e2a7ff',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#e7beff',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#3b3b3b',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                    selected: {\n                        defaultColor: '#e7beff',\n                        defaultStroke: '#a5ff88',\n                        defaultLabel: '#3b3b3b',\n                        hoverColor: '#e7beff',\n                        hoverStroke: '#a5ff88',\n                        hoverLabel: '#3b3b3b',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                },\n                {\n                    normal: {\n                        defaultColor: '#ffa07a',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#f7a989',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#3b3b3b',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                    selected: {\n                        defaultColor: '#f7a989',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#3b3b3b',\n                        hoverColor: '#f7a989',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#3b3b3b',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                },\n            ],\n            summary: [\n                {\n                    defaultColor: '#464646',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#c0c0c0',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 2,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#6495ed',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#87cefa',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 2,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#e2a7ff',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#e7beff',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 2,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#ffa07a',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#f7a989',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 2,\n                    radius: 0,\n                },\n            ],\n            achievement: [\n                {\n                    defaultColor: '#464646',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#c0c0c0',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 4,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#6495ed',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#87cefa',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 4,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#e2a7ff',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#e7beff',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 4,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#ffa07a',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#f7a989',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 4,\n                    radius: 0,\n                },\n            ],\n            characterItem: {\n                name: {\n                    defaultColor: '#393e46',\n                    defaultStroke: '#eeeeee',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#ff7878',\n                    hoverStroke: '#eeeeee',\n                    hoverLabel: '#eeeeee',\n                    lineWidth: 2,\n                },\n                state: {\n                    defaultColor: '#393e46',\n                    defaultStroke: '#eeeeee',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#393e46',\n                    hoverStroke: '#eeeeee',\n                    hoverLabel: '#eeeeee',\n                    lineWidth: 2,\n                },\n                propertyColor: '#000000',\n            },\n        },\n        class: {\n            btn_main: {\n                defaultColor: '#393e46',\n                defaultStroke: '#eeeeee',\n                defaultLabel: '#eeeeee',\n                hoverColor: '#ff7878',\n                hoverStroke: '#eeeeee',\n                hoverLabel: '#eeeeee',\n                lineWidth: 2,\n                radius: 4,\n            },\n            btn_main2: {\n                defaultColor: '#ffa07a',\n                defaultStroke: '#f8f8f8',\n                defaultLabel: '#3b3b3b',\n                hoverColor: '#ff7878',\n                hoverStroke: '#f8f8f8',\n                hoverLabel: '#eeeeee',\n                lineWidth: 2,\n                radius: 4,\n            },\n            btn_small: {\n                defaultColor: '#5865f2',\n                defaultStroke: '#eeeeee',\n                defaultLabel: '#eeeeee',\n                hoverColor: '#1160b0',\n                hoverStroke: '#eeeeee',\n                hoverLabel: '#eeeeee',\n                lineWidth: 0,\n                radius: 4,\n            },\n            title: {\n                color: '#ffffff',\n            },\n            font_default: {\n                color: '#eeeeee',\n            },\n        },\n        pages: {\n            [pages.MAIN]: {\n                vars: {\n                    btnRemake: 'btn_main',\n                    btnThemes: {\n                        defaultColor: '#cccccc',\n                        radius: 100,\n                    },\n                    btnSaveLoad: {\n                        defaultColor: '#5865f2',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#1160b0',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#eeeeee',\n                        lineWidth: 0,\n                        radius: 100,\n                    },\n                },\n                names: {\n                    title: 'title',\n                    btnSmall: 'btn_small',\n                },\n            },\n            [pages.TALENT]: {\n                vars: {\n                    btnDrawCard: 'btn_main',\n                    btnNext: 'btn_main',\n                    title: 'title',\n                },\n            },\n            [pages.PROPERTY]: {\n                vars: {\n                    btnRandomAllocate: 'btn_main',\n                    btnNext: 'btn_main2',\n                    title: 'title',\n                },\n                names: {\n                    font_default: 'font_default',\n                    property: {\n                        colorFilter: '#eeeeeeff',\n                    },\n                },\n            },\n            [pages.TRAJECTORY]: {\n                vars: {\n                    btnSummary: 'btn_main',\n                    boxTrajectory: {\n                        defaultColor: '#393e46',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#393e46',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#eeeeee',\n                        lineWidth: 2,\n                        radius: 4,\n                    },\n                    boxSpeed: {\n                        colorFilter: '#ffffffff',\n                    },\n                },\n                names: {\n                    propertyBox: {\n                        defaultColor: '#222831',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#222831',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#eeeeee',\n                        lineWidth: 2,\n                        radius: 4,\n                    },\n                    propertyValue: {\n                        defaultColor: '#eeeeee',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#222831',\n                        hoverColor: '#eeeeee',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#222831',\n                        lineWidth: 0,\n                        radius: 4,\n                    },\n                },\n            },\n            [pages.SUMMARY]: {\n                vars: {\n                    btnAgain: 'btn_main',\n                    title: 'title',\n                },\n                names: {\n                    font_default: 'font_default',\n                },\n            },\n            [pages.ACHIEVEMENT]: {\n                vars: {\n                    btnBack: 'btn_small',\n                    btnRank: 'btn_small',\n                },\n                names: {\n                    font_default: 'font_default',\n                    title: 'title',\n                },\n            },\n            [pages.THANKS]: {\n                vars: {\n                    btnBack: 'btn_small',\n                    btnAFD: {\n                        defaultColor: '#8764de',\n                        defaultStroke: '#8764de',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#9774ee',\n                        hoverStroke: '#9774ee',\n                        hoverLabel: '#ffffff',\n                        radius: 4,\n                    },\n                    btnDDF: {\n                        defaultColor: '#cc6699',\n                        defaultStroke: '#cc6699',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#dc76a9',\n                        hoverStroke: '#dc76a9',\n                        hoverLabel: '#ffffff',\n                        radius: 4,\n                    },\n                },\n            },\n            [pages.THEMES]: {\n                vars: {\n                    btnOK: {\n                        defaultColor: '#28b070',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#00ff00',\n                        hoverLabel: '#ffffff',\n                        radius: 80,\n                    },\n                    btnClose: {\n                        defaultColor: '#eb3941',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#ff0000',\n                        hoverLabel: '#ffffff',\n                        radius: 80,\n                    },\n                },\n            },\n            [pages.SAVELOAD]: {\n                vars: {\n                    btnClose: {\n                        defaultColor: '#eb3941',\n                        hoverColor: '#ff0000',\n                    },\n                    btnSave: {\n                        defaultColor: '#007046',\n                        hoverColor: '#76f190',\n                    },\n                    btnRead: {\n                        defaultColor: '#007046',\n                        hoverColor: '#76f190',\n                    },\n                    btnLoad: {\n                        defaultColor: '#fc5531',\n                        hoverColor: '#f28b54',\n                    },\n                    btnWrite: {\n                        defaultColor: '#fc5531',\n                        hoverColor: '#f28b54',\n                    },\n                    btnBackup: {\n                        defaultColor: '#9c30cd',\n                        hoverColor: '#bf50fd',\n                        radius: 8,\n                        defaultLabel: '#ffffff',\n                        hoverLabel: '#ffffff',\n                    },\n                },\n                names: {\n                    btnSmall: {\n                        radius: 80,\n                        defaultLabel: '#ffffff',\n                        hoverLabel: '#ffffff',\n                    },\n                },\n            },\n            [pages.MODE]: {\n                names: {\n                    font_default: 'font_default',\n                    btn: 'btn_main',\n                },\n            },\n            [pages.CELEBRITY]: {\n                vars: {\n                    btnRetry: 'btn_main',\n                    btnNext: 'btn_main2',\n                },\n            },\n        },\n        popups: {\n            [popups.ACHIEVEMENT]: {\n                vars: {\n                    bg1: {\n                        defaultColor: '#292a28',\n                        defaultStroke: '#84ff55',\n                        hoverColor: '#292a28',\n                        hoverStroke: '#84ff55',\n                    },\n                },\n            },\n        },\n    },\n}\n\nconst light = {\n    pages: {\n        [pages.LOADING]: 'loading',\n        [pages.MAIN]: 'default/main',\n        [pages.TALENT]: 'default/talent',\n        [pages.PROPERTY]: 'default/property',\n        [pages.TRAJECTORY]: 'default/trajectory',\n        [pages.SUMMARY]: 'default/summary',\n        [pages.ACHIEVEMENT]: 'default/achievement',\n        [pages.THANKS]: 'default/thanks',\n        [pages.THEMES]: 'themes',\n        [pages.SAVELOAD]: 'saveload',\n        [pages.MODE]: 'default/mode',\n        [pages.CELEBRITY]: 'default/celebrity',\n    },\n    popups: {\n        [popups.ACHIEVEMENT]: 'default/popup/achievementPopup',\n        [popups.MESSAGE]: 'message',\n    },\n    configs: {\n        bgColor: '#ffffff',\n        common: {\n            defaultFontColor: '#000000',\n            trajectoryItem: {\n                box: {\n                    // filters: ()=>[new Laya.GlowFilter(\"#b1b1b1\", 8, 0, 0)],\n                    defaultStroke: '#b1b1b1',\n                    hoverStroke: '#b1b1b1',\n                    lineWidth: 2,\n                },\n                grade: [\n                    {\n                        defaultColor: '#ffffff',\n                        hoverColor: '#ededed',\n                    },\n                    {\n                        defaultColor: '#87cefa',\n                        hoverColor: '#6495ed',\n                    },\n                    {\n                        defaultColor: '#e7beff',\n                        hoverColor: '#e2a7ff',\n                    },\n                    {\n                        defaultColor: '#f7a989',\n                        hoverColor: '#ffa07a',\n                    },\n                ],\n                ageColor: '#000000',\n                contentColor: '#000000',\n            },\n            topSupportItem: {\n                defaultColor: '#ffa500',\n                defaultStroke: '#ffa500',\n                hoverColor: '#ffc500',\n                hoverStroke: '#ffa500',\n            },\n            grade: ['#000000', '#55fffe', '#b17cff', '#ffce45'],\n            filter: ['#000000ff', '#55fffeff', '#b17cffff', '#ffce45ff'],\n            card: [\n                {\n                    normal: {\n                        defaultColor: '#ededed',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#666666',\n                        hoverColor: '#666666',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                    selected: {\n                        defaultColor: '#666666',\n                        defaultStroke: '#a5ff88',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#666666',\n                        hoverStroke: '#a5ff88',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                },\n                {\n                    normal: {\n                        defaultColor: '#87cefa',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#666666',\n                        hoverColor: '#6495ed',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                    selected: {\n                        defaultColor: '#6495ed',\n                        defaultStroke: '#a5ff88',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#6495ed',\n                        hoverStroke: '#a5ff88',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                },\n                {\n                    normal: {\n                        defaultColor: '#e7beff',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#666666',\n                        hoverColor: '#e2a7ff',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                    selected: {\n                        defaultColor: '#e2a7ff',\n                        defaultStroke: '#a5ff88',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#e2a7ff',\n                        hoverStroke: '#a5ff88',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                },\n                {\n                    normal: {\n                        defaultColor: '#f7a989',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#666666',\n                        hoverColor: '#ffa07a',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                    selected: {\n                        defaultColor: '#ffa07a',\n                        defaultStroke: '#f8f8f8',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#ffa07a',\n                        hoverStroke: '#f8f8f8',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 4,\n                        radius: 4,\n                    },\n                },\n            ],\n            summary: [\n                {\n                    defaultColor: '#ededed',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#666666',\n                    hoverColor: '#666666',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#ffffff',\n                    lineWidth: 4,\n                    radius: 4,\n                },\n                {\n                    defaultColor: '#6495ed',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#ffffff',\n                    hoverColor: '#87cefa',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#666666',\n                    lineWidth: 4,\n                    radius: 4,\n                },\n                {\n                    defaultColor: '#e2a7ff',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#ffffff',\n                    hoverColor: '#e7beff',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#666666',\n                    lineWidth: 4,\n                    radius: 4,\n                },\n                {\n                    defaultColor: '#ffa07a',\n                    defaultStroke: '#f8f8f8',\n                    defaultLabel: '#ffffff',\n                    hoverColor: '#f7a989',\n                    hoverStroke: '#f8f8f8',\n                    hoverLabel: '#666666',\n                    lineWidth: 4,\n                    radius: 4,\n                },\n            ],\n            achievement: [\n                {\n                    defaultColor: '#ededed',\n                    defaultStroke: '#cccccc',\n                    defaultLabel: '#000000',\n                    hoverColor: '#eeeeee',\n                    hoverStroke: '#cccccc',\n                    hoverLabel: '#efefef',\n                    lineWidth: 4,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#6495ed',\n                    defaultStroke: '#cccccc',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#87cefa',\n                    hoverStroke: '#cccccc',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 4,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#e2a7ff',\n                    defaultStroke: '#cccccc',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#e7beff',\n                    hoverStroke: '#cccccc',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 4,\n                    radius: 0,\n                },\n                {\n                    defaultColor: '#ffa07a',\n                    defaultStroke: '#cccccc',\n                    defaultLabel: '#eeeeee',\n                    hoverColor: '#f7a989',\n                    hoverStroke: '#cccccc',\n                    hoverLabel: '#3b3b3b',\n                    lineWidth: 4,\n                    radius: 0,\n                },\n            ],\n            characterItem: {\n                name: {\n                    defaultColor: '#ffffff',\n                    defaultStroke: '#cccccc',\n                    defaultLabel: '#000000',\n                    hoverColor: '#ff7878',\n                    hoverStroke: '#cccccc',\n                    hoverLabel: '#ffffff',\n                    lineWidth: 2,\n                },\n                state: {\n                    defaultColor: '#ffffff',\n                    defaultStroke: '#cccccc',\n                    defaultLabel: '#000000',\n                    hoverColor: '#ffffff',\n                    hoverStroke: '#cccccc',\n                    hoverLabel: '#000000',\n                    lineWidth: 2,\n                },\n                propertyColor: '#000000',\n            },\n        },\n        class: {\n            btn_main: {\n                defaultColor: '#ffffff',\n                defaultStroke: '#cccccc',\n                defaultLabel: '#000000',\n                hoverColor: '#ff7878',\n                hoverStroke: '#cccccc',\n                hoverLabel: '#ffffff',\n                lineWidth: 2,\n                radius: 4,\n            },\n            btn_main2: {\n                defaultColor: '#f7a989',\n                defaultStroke: '#f8f8f8',\n                defaultLabel: '#ffffff',\n                hoverColor: '#ff7878',\n                hoverStroke: '#f8f8f8',\n                hoverLabel: '#ffffff',\n                lineWidth: 2,\n                radius: 4,\n            },\n            btn_small: {\n                defaultColor: '#5865f2',\n                defaultStroke: '#eeeeee',\n                defaultLabel: '#eeeeee',\n                hoverColor: '#1160b0',\n                hoverStroke: '#eeeeee',\n                hoverLabel: '#eeeeee',\n                lineWidth: 0,\n                radius: 4,\n            },\n            title: {\n                color: '#000000',\n            },\n            font_default: {\n                color: '#000000',\n            },\n        },\n        pages: {\n            [pages.MAIN]: {\n                vars: {\n                    btnRemake: 'btn_main',\n                    btnThemes: {\n                        defaultColor: '#cccccc',\n                        radius: 100,\n                    },\n                    btnSaveLoad: {\n                        defaultColor: '#5865f2',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#1160b0',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#eeeeee',\n                        lineWidth: 0,\n                        radius: 100,\n                    },\n                },\n                names: {\n                    title: 'title',\n                    btnSmall: 'btn_small',\n                },\n            },\n            [pages.TALENT]: {\n                vars: {\n                    btnDrawCard: 'btn_main',\n                    btnNext: 'btn_main',\n                    title: 'title',\n                },\n            },\n            [pages.PROPERTY]: {\n                vars: {\n                    btnRandomAllocate: 'btn_main',\n                    btnNext: 'btn_main2',\n                    title: 'title',\n                },\n                names: {\n                    font_default: 'font_default',\n                    property: {\n                        colorFilter: '#000000ff',\n                    },\n                },\n            },\n            [pages.TRAJECTORY]: {\n                vars: {\n                    btnSummary: 'btn_main',\n                    boxTrajectory: {\n                        defaultColor: '#ffffff',\n                        defaultStroke: '#9b9b9b',\n                        defaultLabel: '#eeeeee',\n                        hoverColor: '#ffffff',\n                        hoverStroke: '#9b9b9b',\n                        hoverLabel: '#eeeeee',\n                        lineWidth: 1,\n                        radius: 4,\n                    },\n                    boxSpeed: {\n                        colorFilter: '#666666ff',\n                    },\n                },\n                names: {\n                    propertyBox: {\n                        defaultColor: '#8d8d8d',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#8d8d8d',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#ffffff',\n                        lineWidth: 2,\n                        radius: 4,\n                    },\n                    propertyValue: {\n                        defaultColor: '#ffffff',\n                        defaultStroke: '#eeeeee',\n                        defaultLabel: '#222831',\n                        hoverColor: '#ffffff',\n                        hoverStroke: '#eeeeee',\n                        hoverLabel: '#222831',\n                        lineWidth: 0,\n                        radius: 4,\n                    },\n                },\n            },\n            [pages.SUMMARY]: {\n                vars: {\n                    btnAgain: 'btn_main',\n                    title: 'title',\n                },\n                names: {\n                    font_default: 'font_default',\n                },\n            },\n            [pages.ACHIEVEMENT]: {\n                vars: {\n                    btnBack: 'btn_small',\n                    btnRank: 'btn_small',\n                },\n                names: {\n                    font_default: 'font_default',\n                    title: 'title',\n                },\n            },\n            [pages.THANKS]: {\n                vars: {\n                    btnBack: 'btn_small',\n                    btnAFD: {\n                        defaultColor: '#8764de',\n                        defaultStroke: '#8764de',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#9774ee',\n                        hoverStroke: '#9774ee',\n                        hoverLabel: '#ffffff',\n                        radius: 4,\n                    },\n                    btnDDF: {\n                        defaultColor: '#cc6699',\n                        defaultStroke: '#cc6699',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#dc76a9',\n                        hoverStroke: '#dc76a9',\n                        hoverLabel: '#ffffff',\n                        radius: 4,\n                    },\n                },\n            },\n            [pages.THEMES]: {\n                vars: {\n                    btnOK: {\n                        defaultColor: '#28b070',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#00ff00',\n                        hoverLabel: '#ffffff',\n                        radius: 80,\n                    },\n                    btnClose: {\n                        defaultColor: '#eb3941',\n                        defaultLabel: '#ffffff',\n                        hoverColor: '#ff0000',\n                        hoverLabel: '#ffffff',\n                        radius: 80,\n                    },\n                },\n            },\n            [pages.SAVELOAD]: {\n                vars: {\n                    btnClose: {\n                        defaultColor: '#eb3941',\n                        hoverColor: '#ff0000',\n                    },\n                    btnSave: {\n                        defaultColor: '#007046',\n                        hoverColor: '#76f190',\n                    },\n                    btnRead: {\n                        defaultColor: '#007046',\n                        hoverColor: '#76f190',\n                    },\n                    btnLoad: {\n                        defaultColor: '#fc5531',\n                        hoverColor: '#f28b54',\n                    },\n                    btnWrite: {\n                        defaultColor: '#fc5531',\n                        hoverColor: '#f28b54',\n                    },\n                    btnBackup: {\n                        defaultColor: '#9c30cd',\n                        hoverColor: '#bf50fd',\n                        radius: 8,\n                        defaultLabel: '#ffffff',\n                        hoverLabel: '#ffffff',\n                    },\n                },\n                names: {\n                    btnSmall: {\n                        radius: 80,\n                        defaultLabel: '#ffffff',\n                        hoverLabel: '#ffffff',\n                    },\n                },\n            },\n            [pages.MODE]: {\n                names: {\n                    font_default: 'font_default',\n                    btn: 'btn_main',\n                },\n            },\n            [pages.CELEBRITY]: {\n                vars: {\n                    btnRetry: 'btn_main',\n                    btnNext: 'btn_main2',\n                },\n            },\n        },\n        popups: {\n            [popups.ACHIEVEMENT]: {\n                vars: {\n                    bg1: {\n                        defaultColor: '#ffffff',\n                        defaultStroke: '#84ff55',\n                        hoverColor: '#ffffff',\n                        hoverStroke: '#84ff55',\n                        lineWidth: 1,\n                    },\n                },\n            },\n        },\n    },\n}\n\nconst themes = { default: dark, cyber, dark, light }\n\nexport default { themes, pages, popups }\n"
  },
  {
    "path": "template/_config.yml",
    "content": "theme: jekyll-theme-cayman"
  },
  {
    "path": "template/_layouts/default.html",
    "content": "<!DOCTYPE html>\n<html lang=\"{{ site.lang | default: \"en-US\" }}\">\n  <head>\n    <meta charset=\"UTF-8\">\n{% seo %}\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <meta name=\"theme-color\" content=\"#157878\">\n    <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">\n    <link rel=\"stylesheet\" href=\"{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}\">\n    {% include head-custom.html %}\n  </head>\n  <body>\n    <a id=\"skip-to-content\" href=\"#content\">Skip to the content.</a>\n\n    <header class=\"page-header\" role=\"banner\">\n      <h1 class=\"project-name\">{{ page.title | default: site.title | default: site.github.repository_name }}</h1>\n      <h2 class=\"project-tagline\">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>\n      <a href=\"/public/\" class=\"btn\">RESTART</a>\n      {% if site.github.is_project_page %}\n        <a href=\"{{ site.github.repository_url }}\" class=\"btn\">View on GitHub</a>\n      {% endif %}\n      {% if site.show_downloads %}\n        <a href=\"{{ site.github.zip_url }}\" class=\"btn\">Download .zip</a>\n        <a href=\"{{ site.github.tar_url }}\" class=\"btn\">Download .tar.gz</a>\n      {% endif %}\n    </header>\n\n    <main id=\"content\" class=\"main-content\" role=\"main\">\n      {{ content }}\n\n      <footer class=\"site-footer\">\n        {% if site.github.is_project_page %}\n          <span class=\"site-footer-owner\"><a href=\"{{ site.github.repository_url }}\">{{ site.github.repository_name }}</a> is maintained by <a href=\"{{ site.github.owner_url }}\">{{ site.github.owner_name }}</a>.</span>\n        {% endif %}\n        <span class=\"site-footer-credits\">This page was generated by <a href=\"https://pages.github.com\">GitHub Pages</a>.</span>\n      </footer>\n    </main>\n  </body>\n</html>"
  },
  {
    "path": "template/index.md",
    "content": "# Life Restart\n\nやり直すんだ。そして、次はうまくやる。[RESTART](view/index.html)\n\n<iframe src=\"https://discord.com/widget?id=883382868427014255&theme=dark\" width=\"350\" height=\"500\" allowtransparency=\"true\" frameborder=\"0\" sandbox=\"allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts\"></iframe>"
  },
  {
    "path": "template/view/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n    <head>\n        <meta charset=\"UTF-8\">\n        <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n        <meta name=\"description\" content=\"やり直すんだ。そして、次はうまくやる。\"/>\n        <meta name=\"keywords\" content=\"人生重开模拟器 liferestart life restart remake 人生重来\"/>\n        <title>Life Restart</title>\n        <script language=\"javascript\" type=\"text/javascript\">\n            window.location.href=\"/public/index.html\";\n        </script>\n    </head>\n</html>"
  },
  {
    "path": "vite.config.js",
    "content": "/** @type {import('vite').UserConfig} */\nexport default {\n    base: './',\n    build: {\n        outDir: 'template/public',\n    },\n}\n"
  }
]