zhuda-laya-engine 0.0.0-stage → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (740) hide show
  1. package/AGENTS.md +236 -0
  2. package/CHANGELOG.md +431 -0
  3. package/LICENSE +41 -0
  4. package/README.md +247 -2
  5. package/assets/branding/layaair-tribute-mark.svg +5 -0
  6. package/assets/branding/zhuda-layaair-mark.svg +34 -0
  7. package/assets/prefabs/CoinFountainVfx.lh +197 -0
  8. package/assets/prefabs/ConfirmActionButton.lh +87 -0
  9. package/assets/prefabs/LevelUpAuraVfx.lh +136 -0
  10. package/assets/prefabs/MineExplosionParticle.lh +352 -0
  11. package/assets/prefabs/NineSliceDialogFrame.lh +171 -0
  12. package/assets/prefabs/SwordSlashTrailVfx.lh +117 -0
  13. package/assets/prefabs/TacticalHudBar.lh +134 -0
  14. package/assets/prefabs/TelemetryDashboard.lh +87 -0
  15. package/assets/prefabs/UnityCrystalGuardian.lh +144 -0
  16. package/assets/prefabs/ZhudaSpine42Mascot.lh +183 -0
  17. package/assets/scenes/MinesweeperStage.ls +1180 -0
  18. package/dist/asset-calibration-report.json +969 -0
  19. package/dist/build-manifest.json +254 -0
  20. package/dist/sdk/zhuda-laya-csg.cjs +710 -0
  21. package/dist/sdk/zhuda-laya-csg.esm.js +683 -0
  22. package/dist/sdk/zhuda-laya-csg.min.cjs +7 -0
  23. package/dist/sdk/zhuda-laya-csg.min.esm.js +7 -0
  24. package/dist/sdk/zhuda-laya-demo.cjs +5990 -0
  25. package/dist/sdk/zhuda-laya-demo.esm.js +5956 -0
  26. package/dist/sdk/zhuda-laya-demo.min.cjs +12 -0
  27. package/dist/sdk/zhuda-laya-demo.min.esm.js +12 -0
  28. package/dist/sdk/zhuda-laya-engine.cjs +52628 -0
  29. package/dist/sdk/zhuda-laya-engine.esm.js +51848 -0
  30. package/dist/sdk/zhuda-laya-engine.min.cjs +2710 -0
  31. package/dist/sdk/zhuda-laya-engine.min.esm.js +2710 -0
  32. package/docs/3d-acceptance.md +47 -0
  33. package/docs/3d-integration.md +190 -0
  34. package/docs/README.md +112 -0
  35. package/docs/SUPPORT.md +21 -0
  36. package/docs/agent-development.md +219 -0
  37. package/docs/animation-control.md +213 -0
  38. package/docs/asset-loading.md +97 -0
  39. package/docs/assets/reference-games.jpg +0 -0
  40. package/docs/assets/solana-qr.png +0 -0
  41. package/docs/assets/sponsor-pass.svg +32 -0
  42. package/docs/audio.md +319 -0
  43. package/docs/backend-delivery.md +218 -0
  44. package/docs/basis-textures.md +94 -0
  45. package/docs/browser-sdk-releases.json +204 -0
  46. package/docs/browser-sdk.md +187 -0
  47. package/docs/cinematics.md +267 -0
  48. package/docs/cloth.md +280 -0
  49. package/docs/combat-runtime.md +82 -0
  50. package/docs/consumer-route.md +169 -0
  51. package/docs/consumer-tooling.md +518 -0
  52. package/docs/crowd-runtime.md +195 -0
  53. package/docs/developer-tooling.md +191 -0
  54. package/docs/film-scenes.md +1504 -0
  55. package/docs/filmic-rendering.md +743 -0
  56. package/docs/flythrough.md +89 -0
  57. package/docs/gpu-depth.md +207 -0
  58. package/docs/grass.md +127 -0
  59. package/docs/hdr-environment.md +76 -0
  60. package/docs/instanced-meshes.md +137 -0
  61. package/docs/layout-and-media.md +37 -0
  62. package/docs/layout-wireframe.md +80 -0
  63. package/docs/lighting-depth.md +185 -0
  64. package/docs/minigame-packaging.md +79 -0
  65. package/docs/model-editor.md +66 -0
  66. package/docs/model-lod.md +122 -0
  67. package/docs/model-pipeline.md +74 -0
  68. package/docs/model-showcase.md +365 -0
  69. package/docs/overview.md +183 -0
  70. package/docs/plans/README.md +133 -0
  71. package/docs/plans/TASK-TEMPLATE.md +64 -0
  72. package/docs/plans/TASK-spine38-isolated-topology-20261106.md +89 -0
  73. package/docs/plans/TEMPLATE.md +44 -0
  74. package/docs/plans/VERIFICATION-TEMPLATE.md +45 -0
  75. package/docs/plans/asset-packaging.md +140 -0
  76. package/docs/plans/cinematic-production/task.md +97 -0
  77. package/docs/plans/cinematic-production/verification.md +49 -0
  78. package/docs/plans/consumer-delivery-followups.md +129 -0
  79. package/docs/plans/desktop-and-agent-gates/hardening-task.md +85 -0
  80. package/docs/plans/desktop-and-agent-gates/hardening-verification.md +109 -0
  81. package/docs/plans/desktop-and-agent-gates/task.md +94 -0
  82. package/docs/plans/desktop-and-agent-gates/verification.md +60 -0
  83. package/docs/plans/prefab-toolchain.md +73 -0
  84. package/docs/plans/preview-runtime-hardening.md +68 -0
  85. package/docs/platform-adapters.md +113 -0
  86. package/docs/post-quality.md +242 -0
  87. package/docs/prefab-editor.md +194 -0
  88. package/docs/prefab-library.md +94 -0
  89. package/docs/prefab-workflow.md +75 -0
  90. package/docs/procedural-assets.md +463 -0
  91. package/docs/procedural-prefabs.md +133 -0
  92. package/docs/quality-route.md +386 -0
  93. package/docs/release-policy.md +79 -0
  94. package/docs/routes/README.md +180 -0
  95. package/docs/routes/TEMPLATE.md +54 -0
  96. package/docs/routes/action-adventure-3d-minigame.md +238 -0
  97. package/docs/routes/apocalypse-survival-3d.md +219 -0
  98. package/docs/routes/aqua-freeze-2d-minigame.md +183 -0
  99. package/docs/routes/astral-minimal-film-look.md +141 -0
  100. package/docs/routes/cascade-slot.md +93 -0
  101. package/docs/routes/clip-free-garments.md +229 -0
  102. package/docs/routes/drop-merge-2d-minigame.md +200 -0
  103. package/docs/routes/dungeon-line-slot.md +87 -0
  104. package/docs/routes/film-as-data.md +131 -0
  105. package/docs/routes/film-fight-that-lands.md +198 -0
  106. package/docs/routes/film-ink-lines.md +120 -0
  107. package/docs/routes/floating-island.md +229 -0
  108. package/docs/routes/game-2d.md +168 -0
  109. package/docs/routes/game-rules-first.md +89 -0
  110. package/docs/routes/game-to-prefabs.md +249 -0
  111. package/docs/routes/go-game-server.md +95 -0
  112. package/docs/routes/good-looking-3d-scene.md +99 -0
  113. package/docs/routes/high-quality-character.md +263 -0
  114. package/docs/routes/humanoid-from-shapes.md +97 -0
  115. package/docs/routes/hunting-action-3d.md +76 -0
  116. package/docs/routes/idle-gacha-2d.md +67 -0
  117. package/docs/routes/interactive-film-viewer.md +141 -0
  118. package/docs/routes/isometric-mystery-2d.md +217 -0
  119. package/docs/routes/key-art-to-animated-title.md +132 -0
  120. package/docs/routes/laya-ide-project-cli-web.md +125 -0
  121. package/docs/routes/layered-cloth-on-body.md +240 -0
  122. package/docs/routes/low-poly-character-from-shapes.md +475 -0
  123. package/docs/routes/match-three-2d.md +64 -0
  124. package/docs/routes/merge-2d.md +59 -0
  125. package/docs/routes/mini-game-build.md +80 -0
  126. package/docs/routes/mobile-always-landscape.md +149 -0
  127. package/docs/routes/mobile-web-fullscreen.md +255 -0
  128. package/docs/routes/model-from-dcc.md +106 -0
  129. package/docs/routes/new-game-project.md +100 -0
  130. package/docs/routes/onboarding-tutorial-2d.md +54 -0
  131. package/docs/routes/online-lockstep-match.md +473 -0
  132. package/docs/routes/outdoor-landscape.md +134 -0
  133. package/docs/routes/outfit-swap-3d.md +144 -0
  134. package/docs/routes/papercraft-diorama.md +186 -0
  135. package/docs/routes/platform-fighter-2d.md +235 -0
  136. package/docs/routes/platformer-2d.md +69 -0
  137. package/docs/routes/pole-rescue-arcade-3d.md +198 -0
  138. package/docs/routes/pose-atlas-motion.md +188 -0
  139. package/docs/routes/prototype-to-center.md +162 -0
  140. package/docs/routes/raft-brawl-3d-minigame.md +205 -0
  141. package/docs/routes/rhythm-2d.md +82 -0
  142. package/docs/routes/rigged-phone-character.md +120 -0
  143. package/docs/routes/screen-fit-game-box.md +127 -0
  144. package/docs/routes/shared-islands.md +195 -0
  145. package/docs/routes/side-view-duel.md +266 -0
  146. package/docs/routes/single-html-page.md +83 -0
  147. package/docs/routes/smooth-character-motion.md +162 -0
  148. package/docs/routes/spine-character.md +175 -0
  149. package/docs/routes/story-counting-2d.md +219 -0
  150. package/docs/routes/survivors-2d.md +60 -0
  151. package/docs/routes/third-person-town-3d.md +240 -0
  152. package/docs/routes/tower-defence-3d.md +67 -0
  153. package/docs/routes/ui-test-by-probe.md +219 -0
  154. package/docs/routes/underwater.md +138 -0
  155. package/docs/routes/visual-content-prefab.md +101 -0
  156. package/docs/runtime-hardening.md +108 -0
  157. package/docs/shader-warm-up.md +125 -0
  158. package/docs/spring-bones.md +79 -0
  159. package/docs/stylized-shading.md +171 -0
  160. package/docs/terrain-shader.md +130 -0
  161. package/docs/vrm.md +128 -0
  162. package/docs/walking.md +97 -0
  163. package/docs/webgpu.md +225 -0
  164. package/docs/white-label-themes.md +212 -0
  165. package/docs/zh-CN/README.md +130 -0
  166. package/examples/browser-sdk/2d-webgpu.html +46 -0
  167. package/examples/browser-sdk/2d.html +46 -0
  168. package/examples/browser-sdk/3d-gltf-webgpu.html +50 -0
  169. package/examples/browser-sdk/3d-gltf.html +50 -0
  170. package/examples/browser-sdk/3d-webgpu.html +46 -0
  171. package/examples/browser-sdk/3d.html +46 -0
  172. package/examples/cinematic-capture/Main.ts +294 -0
  173. package/examples/cinematic-capture/README.md +27 -0
  174. package/examples/model-inspector/README.md +15 -0
  175. package/examples/model-inspector/asset.gltf +158 -0
  176. package/examples/windows-webgpu/README.md +57 -0
  177. package/examples/windows-webgpu/bundle.mjs +122 -0
  178. package/examples/windows-webgpu/main.mjs +302 -0
  179. package/examples/windows-webgpu/package-lock.json +2353 -0
  180. package/examples/windows-webgpu/package.json +40 -0
  181. package/examples/windows-webgpu/squirrel.mjs +66 -0
  182. package/package.json +259 -4
  183. package/packages/ci-gate/export-film.mjs +347 -0
  184. package/packages/ci-gate/verify-sequence.mjs +285 -0
  185. package/packages/compiler/agent-contract.mjs +545 -0
  186. package/packages/compiler/ast-scanner.mjs +254 -0
  187. package/packages/compiler/backend-loader.mjs +62 -0
  188. package/packages/compiler/branding-assets.mjs +32 -0
  189. package/packages/compiler/branding.mjs +324 -0
  190. package/packages/compiler/browser-auto-example.mjs +31 -0
  191. package/packages/compiler/browser-model-example.mjs +53 -0
  192. package/packages/compiler/browser-process.mjs +344 -0
  193. package/packages/compiler/browser-sdk-example.mjs +50 -0
  194. package/packages/compiler/browser-sdk.mjs +342 -0
  195. package/packages/compiler/chrome-host.mjs +196 -0
  196. package/packages/compiler/cli.mjs +22 -0
  197. package/packages/compiler/compiler-runtime.mjs +41 -0
  198. package/packages/compiler/consumer-accept.mjs +89 -0
  199. package/packages/compiler/consumer-build.mjs +641 -0
  200. package/packages/compiler/consumer-guards.mjs +422 -0
  201. package/packages/compiler/consumer-publication.mjs +56 -0
  202. package/packages/compiler/consumer-scripts.mjs +134 -0
  203. package/packages/compiler/consumer-starter-2d.mjs +54 -0
  204. package/packages/compiler/consumer-starter-minigame.mjs +30 -0
  205. package/packages/compiler/editor-http.mjs +210 -0
  206. package/packages/compiler/editor-request.ts +12 -0
  207. package/packages/compiler/film-host-client.ts +249 -0
  208. package/packages/compiler/flythrough-file.mjs +144 -0
  209. package/packages/compiler/json-locate.mjs +85 -0
  210. package/packages/compiler/layout-contract.mjs +472 -0
  211. package/packages/compiler/minigame-bootstrap.mjs +24 -0
  212. package/packages/compiler/minigame-bridge.mjs +66 -0
  213. package/packages/compiler/minigame-guards.mjs +107 -0
  214. package/packages/compiler/minigame-toolchain.mjs +241 -0
  215. package/packages/compiler/model-crown.mjs +173 -0
  216. package/packages/compiler/model-editor-client.ts +809 -0
  217. package/packages/compiler/model-editor.mjs +242 -0
  218. package/packages/compiler/model-lod.mjs +547 -0
  219. package/packages/compiler/prefab-check.mjs +288 -0
  220. package/packages/compiler/prefab-checks.mjs +74 -0
  221. package/packages/compiler/prefab-dependencies.mjs +102 -0
  222. package/packages/compiler/prefab-editor-client.ts +950 -0
  223. package/packages/compiler/prefab-editor-preview.ts +89 -0
  224. package/packages/compiler/prefab-editor-server.mjs +585 -0
  225. package/packages/compiler/prefab-editor.mjs +43 -0
  226. package/packages/compiler/prefab-environment.mjs +107 -0
  227. package/packages/compiler/prefab-lifecycle.mjs +60 -0
  228. package/packages/compiler/prefab-preview.mjs +159 -0
  229. package/packages/compiler/prefab-watch.mjs +459 -0
  230. package/packages/compiler/runtime3d-types.mjs +91 -0
  231. package/packages/compiler/stage-probe.mjs +557 -0
  232. package/packages/compiler/visual-asset-audit.mjs +609 -0
  233. package/packages/compiler/visual-contract-audit.mjs +173 -0
  234. package/packages/compiler/webgpu-loader.mjs +153 -0
  235. package/packages/compiler/zhuda-build.mjs +714 -0
  236. package/packages/compiler/zhuda-doctor.mjs +186 -0
  237. package/packages/compiler/zhuda-init.mjs +353 -0
  238. package/packages/compiler/zhuda-layout.mjs +163 -0
  239. package/packages/compiler/zhuda-minigame.mjs +636 -0
  240. package/packages/core/BenchmarkEngine.ts +2 -0
  241. package/packages/core/BitmapFontContract.ts +159 -0
  242. package/packages/core/DeclarativeSDK.ts +686 -0
  243. package/packages/core/IframeSoundAdapter.ts +1824 -0
  244. package/packages/core/NoSleepAdapter.ts +302 -0
  245. package/packages/core/PixelCalibrationEngine.ts +602 -0
  246. package/packages/core/Prefab.ts +314 -0
  247. package/packages/core/RealmGuards.ts +111 -0
  248. package/packages/core/ResponsiveLayout.ts +149 -0
  249. package/packages/core/RuntimeGuards.ts +261 -0
  250. package/packages/core/SpineCharacter.ts +243 -0
  251. package/packages/core/SpineVisualContract.ts +238 -0
  252. package/packages/core/SplashSignal.ts +72 -0
  253. package/packages/core/StaticAssetPipeline.ts +3 -0
  254. package/packages/core/TopologyGraph.ts +693 -0
  255. package/packages/core/UnityBridgePipeline.ts +2 -0
  256. package/packages/core/VideoSurface.ts +75 -0
  257. package/packages/core/ViewportMatrixEngine.ts +237 -0
  258. package/packages/core/VisualFocusContract.ts +76 -0
  259. package/packages/core/VisualMigrationPipeline.ts +245 -0
  260. package/packages/core/WebViewSurface.ts +116 -0
  261. package/packages/core/audio/OfflineMix.ts +186 -0
  262. package/packages/core/audio/Spatial.ts +312 -0
  263. package/packages/core/audio/StreamVoice.ts +161 -0
  264. package/packages/core/csg/Bsp.ts +310 -0
  265. package/packages/core/csg/index.ts +589 -0
  266. package/packages/core/effects/Effect2D.ts +286 -0
  267. package/packages/core/effects/Effect3D.ts +213 -0
  268. package/packages/core/effects/EffectBudget.ts +695 -0
  269. package/packages/core/effects/EffectDirector.ts +254 -0
  270. package/packages/core/effects/EffectPresets.ts +843 -0
  271. package/packages/core/effects/EffectPresets2D.ts +1011 -0
  272. package/packages/core/effects/EffectSprites.ts +143 -0
  273. package/packages/core/effects/ParticleEventLink.ts +53 -0
  274. package/packages/core/effects/README.md +108 -0
  275. package/packages/core/effects/VfxMaterial.ts +253 -0
  276. package/packages/core/film/BakeKey.ts +21 -0
  277. package/packages/core/film/ColorValues.ts +44 -0
  278. package/packages/core/film/FilmLint.ts +353 -0
  279. package/packages/core/film/FilmPrefab.ts +82 -0
  280. package/packages/core/film/FilmReview.ts +84 -0
  281. package/packages/core/film/FilmScene.ts +3442 -0
  282. package/packages/core/film/FilmStage.ts +2148 -0
  283. package/packages/core/film/Flythrough.ts +169 -0
  284. package/packages/core/film/FlythroughReport.ts +326 -0
  285. package/packages/core/film/FrameMetrics.ts +167 -0
  286. package/packages/core/film/LiveLook.ts +242 -0
  287. package/packages/core/film/LookQuality.ts +94 -0
  288. package/packages/core/film/Projection.ts +74 -0
  289. package/packages/core/film/SceneLook.ts +363 -0
  290. package/packages/core/film/index.ts +12 -0
  291. package/packages/core/index.ts +48 -0
  292. package/packages/core/particles/EffectEnvelope.ts +52 -0
  293. package/packages/core/particles/LayaParticleRenderer.ts +182 -0
  294. package/packages/core/particles/LayaParticleRenderer3D.ts +218 -0
  295. package/packages/core/particles/ParticleExtras.ts +163 -0
  296. package/packages/core/particles/ParticleMesh3D.ts +156 -0
  297. package/packages/core/particles/ParticleSystem.ts +324 -0
  298. package/packages/core/particles/ParticleSystem3D.ts +411 -0
  299. package/packages/core/particles/ParticleTypes.ts +230 -0
  300. package/packages/core/particles/ParticleTypes3D.ts +115 -0
  301. package/packages/core/particles/README.md +181 -0
  302. package/packages/core/particles/RibbonPath3D.ts +234 -0
  303. package/packages/core/particles/RibbonTrail.ts +145 -0
  304. package/packages/core/particles/RibbonTrail3D.ts +166 -0
  305. package/packages/core/particles/index.ts +12 -0
  306. package/packages/core/prefabs/PrefabLibrary.ts +692 -0
  307. package/packages/core/prefabs/PrefabTree3D.ts +291 -0
  308. package/packages/core/prefabs/index.ts +10 -0
  309. package/packages/core/procedural/Geometry.ts +1871 -0
  310. package/packages/core/procedural/Hand.ts +1510 -0
  311. package/packages/core/procedural/Isosurface.ts +1035 -0
  312. package/packages/core/procedural/ModuleHarness.ts +180 -0
  313. package/packages/core/procedural/Noise.ts +123 -0
  314. package/packages/core/procedural/PhotoMaterial.ts +283 -0
  315. package/packages/core/procedural/ProceduralAssetProvider.ts +105 -0
  316. package/packages/core/procedural/ProceduralMaterial.ts +184 -0
  317. package/packages/core/procedural/PropFactory.ts +307 -0
  318. package/packages/core/procedural/Random.ts +70 -0
  319. package/packages/core/procedural/SynthAudio.ts +221 -0
  320. package/packages/core/procedural/TerrainMesh.ts +207 -0
  321. package/packages/core/procedural/TextureRecipe.ts +464 -0
  322. package/packages/core/procedural/TriplanarMaterial.ts +169 -0
  323. package/packages/core/procedural/Variation.ts +94 -0
  324. package/packages/core/procedural/index.ts +15 -0
  325. package/packages/core/runtime3d/ActionFrames.ts +245 -0
  326. package/packages/core/runtime3d/AnimationBlend.ts +282 -0
  327. package/packages/core/runtime3d/AnimationBlendMath.ts +98 -0
  328. package/packages/core/runtime3d/AssetProvider.ts +775 -0
  329. package/packages/core/runtime3d/AssetShowcase.ts +190 -0
  330. package/packages/core/runtime3d/Assets.ts +801 -0
  331. package/packages/core/runtime3d/AsyncDeadline.ts +53 -0
  332. package/packages/core/runtime3d/AsyncOperation.ts +39 -0
  333. package/packages/core/runtime3d/BackendChoice.ts +359 -0
  334. package/packages/core/runtime3d/BakedCrowd.ts +575 -0
  335. package/packages/core/runtime3d/BasisTexture.ts +657 -0
  336. package/packages/core/runtime3d/CameraCollision.ts +69 -0
  337. package/packages/core/runtime3d/CameraEffects.ts +752 -0
  338. package/packages/core/runtime3d/CameraRig.ts +70 -0
  339. package/packages/core/runtime3d/CharacterController.ts +272 -0
  340. package/packages/core/runtime3d/CinematicCapture.ts +457 -0
  341. package/packages/core/runtime3d/Clocks.ts +724 -0
  342. package/packages/core/runtime3d/Cloth.ts +183 -0
  343. package/packages/core/runtime3d/Clouds.ts +462 -0
  344. package/packages/core/runtime3d/ColorLut.ts +351 -0
  345. package/packages/core/runtime3d/CombatQueries.ts +240 -0
  346. package/packages/core/runtime3d/ComputePass.ts +582 -0
  347. package/packages/core/runtime3d/CrowdPresentation.ts +368 -0
  348. package/packages/core/runtime3d/DebugDraw.ts +567 -0
  349. package/packages/core/runtime3d/DebugStats.ts +35 -0
  350. package/packages/core/runtime3d/Decals.ts +309 -0
  351. package/packages/core/runtime3d/DensityVolume.ts +238 -0
  352. package/packages/core/runtime3d/DistanceBricks.ts +349 -0
  353. package/packages/core/runtime3d/Dither.ts +199 -0
  354. package/packages/core/runtime3d/DrawWarmUp.ts +217 -0
  355. package/packages/core/runtime3d/EdgeSmoothing.ts +108 -0
  356. package/packages/core/runtime3d/EnvironmentProbe.ts +656 -0
  357. package/packages/core/runtime3d/Filmic.ts +973 -0
  358. package/packages/core/runtime3d/Foliage.ts +367 -0
  359. package/packages/core/runtime3d/GltfIntake.ts +914 -0
  360. package/packages/core/runtime3d/GltfSecondUv.ts +153 -0
  361. package/packages/core/runtime3d/GraphicsGuard.ts +171 -0
  362. package/packages/core/runtime3d/Grass.ts +1080 -0
  363. package/packages/core/runtime3d/GroundTruthAO.ts +360 -0
  364. package/packages/core/runtime3d/HalfFloat.ts +44 -0
  365. package/packages/core/runtime3d/HdrEnvironment.ts +588 -0
  366. package/packages/core/runtime3d/Ik.ts +392 -0
  367. package/packages/core/runtime3d/InputBuffer.ts +165 -0
  368. package/packages/core/runtime3d/InstancedMesh.ts +460 -0
  369. package/packages/core/runtime3d/Laya342Adapters.ts +1095 -0
  370. package/packages/core/runtime3d/Laya342GltfAdapter.ts +751 -0
  371. package/packages/core/runtime3d/LensFinish.ts +153 -0
  372. package/packages/core/runtime3d/LensFlare.ts +490 -0
  373. package/packages/core/runtime3d/LightFog.ts +1008 -0
  374. package/packages/core/runtime3d/LightingDepth.ts +544 -0
  375. package/packages/core/runtime3d/Lightmap.ts +238 -0
  376. package/packages/core/runtime3d/Math3D.ts +84 -0
  377. package/packages/core/runtime3d/MeshQuery.ts +547 -0
  378. package/packages/core/runtime3d/MeshoptModelDecoder.ts +354 -0
  379. package/packages/core/runtime3d/MiniGameSplash.ts +70 -0
  380. package/packages/core/runtime3d/ModelAnimationSampler.ts +97 -0
  381. package/packages/core/runtime3d/ModelCompatibility.ts +890 -0
  382. package/packages/core/runtime3d/ModelDecoder.ts +294 -0
  383. package/packages/core/runtime3d/ModelInspector.ts +226 -0
  384. package/packages/core/runtime3d/ModelLod.ts +163 -0
  385. package/packages/core/runtime3d/ModelPlacements.ts +426 -0
  386. package/packages/core/runtime3d/ObjectMotion.ts +217 -0
  387. package/packages/core/runtime3d/PhysicalCamera.ts +190 -0
  388. package/packages/core/runtime3d/PointShadow.ts +500 -0
  389. package/packages/core/runtime3d/PointShadowSchedule.ts +201 -0
  390. package/packages/core/runtime3d/Pool.ts +120 -0
  391. package/packages/core/runtime3d/ProbeVolume.ts +695 -0
  392. package/packages/core/runtime3d/QualityGovernor.ts +385 -0
  393. package/packages/core/runtime3d/QualityMemory.ts +200 -0
  394. package/packages/core/runtime3d/RenderScale.ts +356 -0
  395. package/packages/core/runtime3d/RenderSpaces.ts +105 -0
  396. package/packages/core/runtime3d/Renderer.ts +377 -0
  397. package/packages/core/runtime3d/ResultPlayback.ts +239 -0
  398. package/packages/core/runtime3d/Runtime.ts +507 -0
  399. package/packages/core/runtime3d/RuntimeDriver.ts +127 -0
  400. package/packages/core/runtime3d/SceneLifecycle.ts +211 -0
  401. package/packages/core/runtime3d/SceneMutation.ts +107 -0
  402. package/packages/core/runtime3d/SceneQueries.ts +191 -0
  403. package/packages/core/runtime3d/ScreenReflections.ts +595 -0
  404. package/packages/core/runtime3d/SelectionOutline.ts +389 -0
  405. package/packages/core/runtime3d/ShaderErrors.ts +104 -0
  406. package/packages/core/runtime3d/ShaderRegistry.ts +34 -0
  407. package/packages/core/runtime3d/ShaderWarmUp.ts +473 -0
  408. package/packages/core/runtime3d/ShadowUpdates.ts +287 -0
  409. package/packages/core/runtime3d/SkinBinding.ts +235 -0
  410. package/packages/core/runtime3d/Smaa.ts +386 -0
  411. package/packages/core/runtime3d/SmaaTables.ts +244 -0
  412. package/packages/core/runtime3d/SpringBones.ts +184 -0
  413. package/packages/core/runtime3d/SurfaceBuffer.ts +76 -0
  414. package/packages/core/runtime3d/Surfaces.ts +1105 -0
  415. package/packages/core/runtime3d/Themes.ts +344 -0
  416. package/packages/core/runtime3d/Timeline.ts +362 -0
  417. package/packages/core/runtime3d/ToneCurves.ts +292 -0
  418. package/packages/core/runtime3d/TransformGizmo.ts +539 -0
  419. package/packages/core/runtime3d/TriangleMask.ts +250 -0
  420. package/packages/core/runtime3d/Underwater.ts +778 -0
  421. package/packages/core/runtime3d/Utf8.ts +87 -0
  422. package/packages/core/runtime3d/Vrm.ts +773 -0
  423. package/packages/core/runtime3d/VrmDocument.ts +1830 -0
  424. package/packages/core/runtime3d/WalkGrid.ts +471 -0
  425. package/packages/core/runtime3d/WebGPU342Adapters.ts +280 -0
  426. package/packages/core/runtime3d/index.ts +147 -0
  427. package/packages/core/shaders/Laya342ShaderTemplates.ts +6 -0
  428. package/packages/core/shaders/LitSurfaceMaterial.ts +1076 -0
  429. package/packages/core/shaders/LitSurfaceTemplates.ts +13 -0
  430. package/packages/core/shaders/ReflectiveSurface.ts +285 -0
  431. package/packages/core/shaders/ShaderMaterials.ts +387 -0
  432. package/packages/core/shaders/ToonMaterial.ts +559 -0
  433. package/packages/core/shaders/WaterRipples.ts +170 -0
  434. package/packages/core/shaders/WaterSurface.ts +480 -0
  435. package/packages/core/shaders/ZhudaCommon.ts +109 -0
  436. package/packages/core/shaders/index.ts +6 -0
  437. package/packages/core/simulation/Cloth.ts +1541 -0
  438. package/packages/core/simulation/ParticleCore.ts +498 -0
  439. package/packages/core/simulation/SpringBones.ts +553 -0
  440. package/packages/core/simulation/index.ts +3 -0
  441. package/packages/core/terrain/Heightfield.ts +385 -0
  442. package/packages/core/terrain/Terrain2D.ts +324 -0
  443. package/packages/core/terrain/Terrain3D.ts +452 -0
  444. package/packages/core/terrain/TerrainShell.ts +94 -0
  445. package/packages/core/terrain/index.ts +3 -0
  446. package/packages/demo/BenchmarkEngine.ts +184 -0
  447. package/packages/demo/PixelCalibrationEngine.ts +36 -0
  448. package/packages/demo/ProceduralStarter.ts +312 -0
  449. package/packages/demo/StaticAssetPipeline.ts +1631 -0
  450. package/packages/demo/UnityBridgePipeline.ts +485 -0
  451. package/packages/demo/index.ts +6 -0
  452. package/packages/mcp-server/arguments.mjs +81 -0
  453. package/packages/mcp-server/corpus.mjs +627 -0
  454. package/packages/mcp-server/film-host.mjs +627 -0
  455. package/packages/mcp-server/film-session.mjs +95 -0
  456. package/packages/mcp-server/film-tools.mjs +460 -0
  457. package/packages/mcp-server/index.mjs +931 -0
  458. package/packages/mcp-server/quality-route.mjs +332 -0
  459. package/packages/mcp-server/roots.mjs +72 -0
  460. package/packages/mcp-server/runtime.mjs +81 -0
  461. package/packages/types/BitmapFontContract.d.ts +19 -0
  462. package/packages/types/DeclarativeSDK.d.ts +137 -0
  463. package/packages/types/IframeSoundAdapter.d.ts +173 -0
  464. package/packages/types/NoSleepAdapter.d.ts +50 -0
  465. package/packages/types/PixelCalibrationEngine.d.ts +83 -0
  466. package/packages/types/Prefab.d.ts +11 -0
  467. package/packages/types/RealmGuards.d.ts +26 -0
  468. package/packages/types/ResponsiveLayout.d.ts +10 -0
  469. package/packages/types/RuntimeGuards.d.ts +55 -0
  470. package/packages/types/SpineCharacter.d.ts +94 -0
  471. package/packages/types/SpineVisualContract.d.ts +50 -0
  472. package/packages/types/SplashSignal.d.ts +27 -0
  473. package/packages/types/TopologyGraph.d.ts +76 -0
  474. package/packages/types/VideoSurface.d.ts +21 -0
  475. package/packages/types/ViewportMatrixEngine.d.ts +27 -0
  476. package/packages/types/VisualFocusContract.d.ts +32 -0
  477. package/packages/types/VisualMigrationPipeline.d.ts +53 -0
  478. package/packages/types/WebViewSurface.d.ts +26 -0
  479. package/packages/types/audio/OfflineMix.d.ts +10 -0
  480. package/packages/types/audio/Spatial.d.ts +63 -0
  481. package/packages/types/audio/StreamVoice.d.ts +31 -0
  482. package/packages/types/browser.d.ts +44 -0
  483. package/packages/types/csg/Bsp.d.ts +85 -0
  484. package/packages/types/csg/index.d.ts +81 -0
  485. package/packages/types/demo/BenchmarkEngine.d.ts +61 -0
  486. package/packages/types/demo/PixelCalibrationEngine.d.ts +13 -0
  487. package/packages/types/demo/ProceduralStarter.d.ts +11 -0
  488. package/packages/types/demo/StaticAssetPipeline.d.ts +87 -0
  489. package/packages/types/demo/UnityBridgePipeline.d.ts +49 -0
  490. package/packages/types/demo/index.d.ts +7 -0
  491. package/packages/types/editor-preview.d.ts +27 -0
  492. package/packages/types/effects/Effect2D.d.ts +65 -0
  493. package/packages/types/effects/Effect3D.d.ts +42 -0
  494. package/packages/types/effects/EffectBudget.d.ts +179 -0
  495. package/packages/types/effects/EffectDirector.d.ts +68 -0
  496. package/packages/types/effects/EffectPresets.d.ts +27 -0
  497. package/packages/types/effects/EffectPresets2D.d.ts +32 -0
  498. package/packages/types/effects/EffectSprites.d.ts +23 -0
  499. package/packages/types/effects/ParticleEventLink.d.ts +16 -0
  500. package/packages/types/effects/VfxMaterial.d.ts +52 -0
  501. package/packages/types/film/BakeKey.d.ts +9 -0
  502. package/packages/types/film/ColorValues.d.ts +25 -0
  503. package/packages/types/film/FilmLint.d.ts +40 -0
  504. package/packages/types/film/FilmPrefab.d.ts +22 -0
  505. package/packages/types/film/FilmReview.d.ts +27 -0
  506. package/packages/types/film/FilmScene.d.ts +1214 -0
  507. package/packages/types/film/FilmStage.d.ts +237 -0
  508. package/packages/types/film/Flythrough.d.ts +44 -0
  509. package/packages/types/film/FlythroughReport.d.ts +132 -0
  510. package/packages/types/film/FrameMetrics.d.ts +49 -0
  511. package/packages/types/film/LiveLook.d.ts +60 -0
  512. package/packages/types/film/LookQuality.d.ts +24 -0
  513. package/packages/types/film/Projection.d.ts +20 -0
  514. package/packages/types/film/SceneLook.d.ts +122 -0
  515. package/packages/types/film/index.d.ts +13 -0
  516. package/packages/types/index.d.ts +49 -0
  517. package/packages/types/particles/EffectEnvelope.d.ts +18 -0
  518. package/packages/types/particles/LayaParticleRenderer.d.ts +30 -0
  519. package/packages/types/particles/LayaParticleRenderer3D.d.ts +29 -0
  520. package/packages/types/particles/ParticleExtras.d.ts +50 -0
  521. package/packages/types/particles/ParticleMesh3D.d.ts +24 -0
  522. package/packages/types/particles/ParticleSystem.d.ts +52 -0
  523. package/packages/types/particles/ParticleSystem3D.d.ts +69 -0
  524. package/packages/types/particles/ParticleTypes.d.ts +89 -0
  525. package/packages/types/particles/ParticleTypes3D.d.ts +56 -0
  526. package/packages/types/particles/RibbonPath3D.d.ts +32 -0
  527. package/packages/types/particles/RibbonTrail.d.ts +38 -0
  528. package/packages/types/particles/RibbonTrail3D.d.ts +22 -0
  529. package/packages/types/particles/index.d.ts +13 -0
  530. package/packages/types/prefabs/PrefabLibrary.d.ts +176 -0
  531. package/packages/types/prefabs/PrefabTree3D.d.ts +59 -0
  532. package/packages/types/prefabs/index.d.ts +4 -0
  533. package/packages/types/procedural/Geometry.d.ts +252 -0
  534. package/packages/types/procedural/Hand.d.ts +150 -0
  535. package/packages/types/procedural/Isosurface.d.ts +181 -0
  536. package/packages/types/procedural/ModuleHarness.d.ts +90 -0
  537. package/packages/types/procedural/Noise.d.ts +15 -0
  538. package/packages/types/procedural/PhotoMaterial.d.ts +49 -0
  539. package/packages/types/procedural/ProceduralAssetProvider.d.ts +31 -0
  540. package/packages/types/procedural/ProceduralMaterial.d.ts +63 -0
  541. package/packages/types/procedural/PropFactory.d.ts +94 -0
  542. package/packages/types/procedural/Random.d.ts +26 -0
  543. package/packages/types/procedural/SynthAudio.d.ts +49 -0
  544. package/packages/types/procedural/TerrainMesh.d.ts +55 -0
  545. package/packages/types/procedural/TextureRecipe.d.ts +125 -0
  546. package/packages/types/procedural/TriplanarMaterial.d.ts +27 -0
  547. package/packages/types/procedural/Variation.d.ts +23 -0
  548. package/packages/types/procedural/index.d.ts +16 -0
  549. package/packages/types/runtime3d/ActionFrames.d.ts +62 -0
  550. package/packages/types/runtime3d/AnimationBlend.d.ts +57 -0
  551. package/packages/types/runtime3d/AnimationBlendMath.d.ts +27 -0
  552. package/packages/types/runtime3d/AssetProvider.d.ts +167 -0
  553. package/packages/types/runtime3d/AssetShowcase.d.ts +44 -0
  554. package/packages/types/runtime3d/Assets.d.ts +166 -0
  555. package/packages/types/runtime3d/AsyncDeadline.d.ts +6 -0
  556. package/packages/types/runtime3d/AsyncOperation.d.ts +3 -0
  557. package/packages/types/runtime3d/BackendChoice.d.ts +130 -0
  558. package/packages/types/runtime3d/BakedCrowd.d.ts +156 -0
  559. package/packages/types/runtime3d/BasisTexture.d.ts +169 -0
  560. package/packages/types/runtime3d/CameraCollision.d.ts +20 -0
  561. package/packages/types/runtime3d/CameraEffects.d.ts +134 -0
  562. package/packages/types/runtime3d/CameraRig.d.ts +27 -0
  563. package/packages/types/runtime3d/CharacterController.d.ts +71 -0
  564. package/packages/types/runtime3d/CinematicCapture.d.ts +103 -0
  565. package/packages/types/runtime3d/Clocks.d.ts +200 -0
  566. package/packages/types/runtime3d/Cloth.d.ts +57 -0
  567. package/packages/types/runtime3d/Clouds.d.ts +69 -0
  568. package/packages/types/runtime3d/ColorLut.d.ts +73 -0
  569. package/packages/types/runtime3d/CombatQueries.d.ts +50 -0
  570. package/packages/types/runtime3d/ComputePass.d.ts +134 -0
  571. package/packages/types/runtime3d/CrowdPresentation.d.ts +104 -0
  572. package/packages/types/runtime3d/DebugDraw.d.ts +161 -0
  573. package/packages/types/runtime3d/DebugStats.d.ts +24 -0
  574. package/packages/types/runtime3d/Decals.d.ts +65 -0
  575. package/packages/types/runtime3d/DensityVolume.d.ts +39 -0
  576. package/packages/types/runtime3d/DistanceBricks.d.ts +97 -0
  577. package/packages/types/runtime3d/Dither.d.ts +78 -0
  578. package/packages/types/runtime3d/DrawWarmUp.d.ts +93 -0
  579. package/packages/types/runtime3d/EdgeSmoothing.d.ts +10 -0
  580. package/packages/types/runtime3d/EnvironmentProbe.d.ts +139 -0
  581. package/packages/types/runtime3d/Filmic.d.ts +243 -0
  582. package/packages/types/runtime3d/Foliage.d.ts +95 -0
  583. package/packages/types/runtime3d/GltfIntake.d.ts +236 -0
  584. package/packages/types/runtime3d/GltfSecondUv.d.ts +54 -0
  585. package/packages/types/runtime3d/GraphicsGuard.d.ts +18 -0
  586. package/packages/types/runtime3d/Grass.d.ts +226 -0
  587. package/packages/types/runtime3d/GroundTruthAO.d.ts +64 -0
  588. package/packages/types/runtime3d/HalfFloat.d.ts +13 -0
  589. package/packages/types/runtime3d/HdrEnvironment.d.ts +144 -0
  590. package/packages/types/runtime3d/Ik.d.ts +123 -0
  591. package/packages/types/runtime3d/InputBuffer.d.ts +49 -0
  592. package/packages/types/runtime3d/InstancedMesh.d.ts +116 -0
  593. package/packages/types/runtime3d/Laya342Adapters.d.ts +306 -0
  594. package/packages/types/runtime3d/Laya342GltfAdapter.d.ts +105 -0
  595. package/packages/types/runtime3d/LensFinish.d.ts +38 -0
  596. package/packages/types/runtime3d/LensFlare.d.ts +114 -0
  597. package/packages/types/runtime3d/LightFog.d.ts +190 -0
  598. package/packages/types/runtime3d/LightingDepth.d.ts +128 -0
  599. package/packages/types/runtime3d/Lightmap.d.ts +55 -0
  600. package/packages/types/runtime3d/Math3D.d.ts +19 -0
  601. package/packages/types/runtime3d/MeshQuery.d.ts +107 -0
  602. package/packages/types/runtime3d/MeshoptModelDecoder.d.ts +34 -0
  603. package/packages/types/runtime3d/MiniGameSplash.d.ts +4 -0
  604. package/packages/types/runtime3d/ModelAnimationSampler.d.ts +26 -0
  605. package/packages/types/runtime3d/ModelCompatibility.d.ts +169 -0
  606. package/packages/types/runtime3d/ModelDecoder.d.ts +66 -0
  607. package/packages/types/runtime3d/ModelInspector.d.ts +77 -0
  608. package/packages/types/runtime3d/ModelLod.d.ts +61 -0
  609. package/packages/types/runtime3d/ModelPlacements.d.ts +77 -0
  610. package/packages/types/runtime3d/ObjectMotion.d.ts +43 -0
  611. package/packages/types/runtime3d/PhysicalCamera.d.ts +51 -0
  612. package/packages/types/runtime3d/PointShadow.d.ts +71 -0
  613. package/packages/types/runtime3d/PointShadowSchedule.d.ts +74 -0
  614. package/packages/types/runtime3d/Pool.d.ts +33 -0
  615. package/packages/types/runtime3d/ProbeVolume.d.ts +123 -0
  616. package/packages/types/runtime3d/QualityGovernor.d.ts +201 -0
  617. package/packages/types/runtime3d/QualityMemory.d.ts +83 -0
  618. package/packages/types/runtime3d/RenderScale.d.ts +69 -0
  619. package/packages/types/runtime3d/RenderSpaces.d.ts +44 -0
  620. package/packages/types/runtime3d/Renderer.d.ts +62 -0
  621. package/packages/types/runtime3d/ResultPlayback.d.ts +70 -0
  622. package/packages/types/runtime3d/Runtime.d.ts +136 -0
  623. package/packages/types/runtime3d/RuntimeDriver.d.ts +42 -0
  624. package/packages/types/runtime3d/SceneLifecycle.d.ts +84 -0
  625. package/packages/types/runtime3d/SceneMutation.d.ts +34 -0
  626. package/packages/types/runtime3d/SceneQueries.d.ts +71 -0
  627. package/packages/types/runtime3d/ScreenReflections.d.ts +78 -0
  628. package/packages/types/runtime3d/SelectionOutline.d.ts +68 -0
  629. package/packages/types/runtime3d/ShaderErrors.d.ts +27 -0
  630. package/packages/types/runtime3d/ShaderRegistry.d.ts +10 -0
  631. package/packages/types/runtime3d/ShaderWarmUp.d.ts +162 -0
  632. package/packages/types/runtime3d/ShadowUpdates.d.ts +125 -0
  633. package/packages/types/runtime3d/SkinBinding.d.ts +53 -0
  634. package/packages/types/runtime3d/Smaa.d.ts +60 -0
  635. package/packages/types/runtime3d/SmaaTables.d.ts +12 -0
  636. package/packages/types/runtime3d/SpringBones.d.ts +69 -0
  637. package/packages/types/runtime3d/SurfaceBuffer.d.ts +28 -0
  638. package/packages/types/runtime3d/Surfaces.d.ts +326 -0
  639. package/packages/types/runtime3d/Themes.d.ts +70 -0
  640. package/packages/types/runtime3d/Timeline.d.ts +88 -0
  641. package/packages/types/runtime3d/ToneCurves.d.ts +59 -0
  642. package/packages/types/runtime3d/TransformGizmo.d.ts +139 -0
  643. package/packages/types/runtime3d/TriangleMask.d.ts +84 -0
  644. package/packages/types/runtime3d/Underwater.d.ts +120 -0
  645. package/packages/types/runtime3d/Utf8.d.ts +12 -0
  646. package/packages/types/runtime3d/Vrm.d.ts +120 -0
  647. package/packages/types/runtime3d/VrmDocument.d.ts +381 -0
  648. package/packages/types/runtime3d/WalkGrid.d.ts +94 -0
  649. package/packages/types/runtime3d/WebGPU342Adapters.d.ts +27 -0
  650. package/packages/types/runtime3d/index.d.ts +102 -0
  651. package/packages/types/shaders/Laya342ShaderTemplates.d.ts +3 -0
  652. package/packages/types/shaders/LitSurfaceMaterial.d.ts +257 -0
  653. package/packages/types/shaders/LitSurfaceTemplates.d.ts +7 -0
  654. package/packages/types/shaders/ReflectiveSurface.d.ts +58 -0
  655. package/packages/types/shaders/ShaderMaterials.d.ts +60 -0
  656. package/packages/types/shaders/ToonMaterial.d.ts +176 -0
  657. package/packages/types/shaders/WaterRipples.d.ts +48 -0
  658. package/packages/types/shaders/WaterSurface.d.ts +110 -0
  659. package/packages/types/shaders/ZhudaCommon.d.ts +31 -0
  660. package/packages/types/shaders/index.d.ts +7 -0
  661. package/packages/types/simulation/Cloth.d.ts +381 -0
  662. package/packages/types/simulation/ParticleCore.d.ts +125 -0
  663. package/packages/types/simulation/SpringBones.d.ts +107 -0
  664. package/packages/types/simulation/index.d.ts +4 -0
  665. package/packages/types/terrain/Heightfield.d.ts +67 -0
  666. package/packages/types/terrain/Terrain2D.d.ts +81 -0
  667. package/packages/types/terrain/Terrain3D.d.ts +80 -0
  668. package/packages/types/terrain/TerrainShell.d.ts +8 -0
  669. package/packages/types/terrain/index.d.ts +4 -0
  670. package/packages/types/vendor/LayaAir.runtime.d.ts +97440 -0
  671. package/packages/types/vendor/REPAIRS.md +30 -0
  672. package/packages/types/vendor/restored-3.4.2.json +142 -0
  673. package/packages/types/vendor/spine.runtime.d.ts +1507 -0
  674. package/packages/types/vendor/wechat-media.d.ts +877 -0
  675. package/packages/types/zhuda-2d-ui.d.ts +244 -0
  676. package/packages/types/zhuda-3d-physics.d.ts +34 -0
  677. package/packages/types/zhuda-audio.d.ts +128 -0
  678. package/packages/types/zhuda-bootstrap.d.ts +100 -0
  679. package/packages/types/zhuda-branding.d.ts +6 -0
  680. package/packages/types/zhuda-core.d.ts +46 -0
  681. package/packages/types/zhuda-declarative.d.ts +81 -0
  682. package/packages/types/zhuda-effects.d.ts +302 -0
  683. package/packages/types/zhuda-layout.d.ts +96 -0
  684. package/packages/types/zhuda-particles.d.ts +477 -0
  685. package/packages/types/zhuda-spine42.d.ts +23 -0
  686. package/packages/types/zhuda-static-assets.d.ts +389 -0
  687. package/packages/types/zhuda-video.d.ts +24 -0
  688. package/packages/types/zhuda-visual-contract.d.ts +52 -0
  689. package/packages/types/zhuda-webview.d.ts +43 -0
  690. package/vendor/basis/LICENSE.txt +55 -0
  691. package/vendor/basis/README.md +25 -0
  692. package/vendor/basis/basis_transcoder.js +19 -0
  693. package/vendor/basis/basis_transcoder.wasm +0 -0
  694. package/vendor/laya-3.4.2/WEBGPU-LICENSES.txt +1259 -0
  695. package/vendor/laya-3.4.2/libs/laya.ani.js +1 -0
  696. package/vendor/laya-3.4.2/libs/laya.box2D.js +1209 -0
  697. package/vendor/laya-3.4.2/libs/laya.bridge.js +2273 -0
  698. package/vendor/laya-3.4.2/libs/laya.bullet.js +1 -0
  699. package/vendor/laya-3.4.2/libs/laya.core.js +1 -0
  700. package/vendor/laya-3.4.2/libs/laya.d3.js +1 -0
  701. package/vendor/laya-3.4.2/libs/laya.device.js +1 -0
  702. package/vendor/laya-3.4.2/libs/laya.gltf.js +1 -0
  703. package/vendor/laya-3.4.2/libs/laya.ik.js +1 -0
  704. package/vendor/laya-3.4.2/libs/laya.light2D.js +1 -0
  705. package/vendor/laya-3.4.2/libs/laya.line2D.js +1 -0
  706. package/vendor/laya-3.4.2/libs/laya.native-spine42.js +7672 -0
  707. package/vendor/laya-3.4.2/libs/laya.navMesh2d.js +1 -0
  708. package/vendor/laya-3.4.2/libs/laya.navMesh3d.js +1 -0
  709. package/vendor/laya-3.4.2/libs/laya.navMeshCommon.js +1 -0
  710. package/vendor/laya-3.4.2/libs/laya.particle.js +1 -0
  711. package/vendor/laya-3.4.2/libs/laya.particle3D.js +1 -0
  712. package/vendor/laya-3.4.2/libs/laya.particleCommon.js +1 -0
  713. package/vendor/laya-3.4.2/libs/laya.physics2D.js +3774 -0
  714. package/vendor/laya-3.4.2/libs/laya.physics3D.js +1 -0
  715. package/vendor/laya-3.4.2/libs/laya.postProcess.js +1 -0
  716. package/vendor/laya-3.4.2/libs/laya.spine.js +1 -0
  717. package/vendor/laya-3.4.2/libs/laya.spine3D.js +1 -0
  718. package/vendor/laya-3.4.2/libs/laya.tilemap.js +1 -0
  719. package/vendor/laya-3.4.2/libs/laya.trail2D.js +1 -0
  720. package/vendor/laya-3.4.2/libs/laya.trail3D.js +1 -0
  721. package/vendor/laya-3.4.2/libs/laya.trailCommon.js +1 -0
  722. package/vendor/laya-3.4.2/libs/laya.ui.js +1 -0
  723. package/vendor/laya-3.4.2/libs/laya.ui2.js +9904 -0
  724. package/vendor/laya-3.4.2/libs/laya.vfx.js +6754 -0
  725. package/vendor/laya-3.4.2/libs/laya.webgl_2D.js +1 -0
  726. package/vendor/laya-3.4.2/libs/laya.webgl_3D.js +1 -0
  727. package/vendor/laya-3.4.2/libs/laya.webgpu_2D.js +18576 -0
  728. package/vendor/laya-3.4.2/libs/laya.webgpu_3D.js +6729 -0
  729. package/vendor/laya-3.4.2/libs/nagabind.js +395 -0
  730. package/vendor/laya-3.4.2/libs/nagabind_bg.wasm +0 -0
  731. package/vendor/laya-3.4.2/libs/shader_compiler_web.js +22 -0
  732. package/vendor/laya-3.4.2/libs/shader_compiler_web.wasm +0 -0
  733. package/vendor/laya-3.4.2/libs/spine-core-3.8.js +1 -0
  734. package/vendor/laya-3.4.2/libs/spine-core-4.2.js +10216 -0
  735. package/vendor/laya-3.4.2/webgpu-provenance.json +41 -0
  736. package/vendor/meshoptimizer/LICENSE.txt +21 -0
  737. package/vendor/meshoptimizer/README.md +13 -0
  738. package/vendor/threejs-post/LICENSE.txt +53 -0
  739. package/vendor/threejs-post/README.md +54 -0
  740. package/zhuda.config.json +22 -0
@@ -0,0 +1 @@
1
+ !function(t,e){"use strict";class i{}i.Skeleton=null,i.AnimationTemplet=null,i.Templet=null;class a{}class r{}class s{}class n{static parse(t,n){var h,l,o,d,u,p,_,c=n.rawBuffer,m=n.readUTFString();t._aniClassName=m;var x,y=n.readUTFString().split("\n"),f=n.readUint8(),M=n.readUint32(),g=n.readUint32();M>0&&(x=c.slice(M,g));var D=new e.Byte(x);for(g>0&&(t._publicExtData=c.slice(g,c.byteLength)),t._useParent=!!n.readUint8(),t._anis.length=f,h=0;h<f;h++){var v=t._anis[h]=new a;v.nodes=[];var I=v.name=y[n.readUint16()];t._aniMap[I]=h,v.bone3DMap={},v.playTime=n.readFloat32();var A=v.nodes.length=n.readUint8();for(v.totalKeyframeDatasLength=0,l=0;l<A;l++){var S=v.nodes[l]=new r;S.childs=[];var b=n.readInt16();b>=0&&(S.name=y[b],v.bone3DMap[S.name]=l),S.keyFrame=[],S.parentIndex=n.readInt16(),-1==S.parentIndex?S.parent=null:S.parent=v.nodes[S.parentIndex],S.lerpType=n.readUint8();var T=n.readUint32();D.pos=T;var F=S.keyframeWidth=D.readUint16();if(v.totalKeyframeDatasLength+=F,0===S.lerpType||1===S.lerpType)for(S.interpolationMethod=[],S.interpolationMethod.length=F,o=0;o<F;o++)S.interpolationMethod[o]=i.AnimationTemplet.interpolation[D.readUint8()];null!=S.parent&&S.parent.childs.push(S);var w=n.readUint16();w>0&&(S.extenData=c.slice(n.pos,n.pos+w),n.pos+=w);var C=n.readUint16();S.keyFrame.length=C;var k,U=0;for(o=0,d=C;o<d;o++){if((k=S.keyFrame[o]=new s).duration=n.readFloat32(),k.startTime=U,2===S.lerpType){k.interpolationData=[];var P,B=n.readUint8();switch(P=n.readFloat32()){case 254:for(k.interpolationData.length=F,_=0;_<F;_++)k.interpolationData[_]=0;break;case 255:for(k.interpolationData.length=F,_=0;_<F;_++)k.interpolationData[_]=5;break;default:for(k.interpolationData.push(P),p=1;p<B;p++)k.interpolationData.push(n.readFloat32())}}for(k.data=new Float32Array(F),k.dData=new Float32Array(F),k.nextData=new Float32Array(F),u=0;u<F;u++)k.data[u]=n.readFloat32(),k.data[u]>-1e-8&&k.data[u]<1e-8&&(k.data[u]=0);U+=k.duration}k.startTime=v.playTime,S.playTime=v.playTime,t._calculateKeyFrame(S,C,F)}}}}class h{static READ_DATA(){h._DATA.offset=h._reader.readUint32(),h._DATA.size=h._reader.readUint32()}static READ_BLOCK(){for(var t=h._BLOCK.count=h._reader.readUint16(),e=h._BLOCK.blockStarts=[],i=h._BLOCK.blockLengths=[],a=0;a<t;a++)e.push(h._reader.readUint32()),i.push(h._reader.readUint32())}static READ_STRINGS(){var t=h._reader.readUint32(),e=h._reader.readUint16(),i=h._reader.pos;h._reader.pos=t+h._DATA.offset;for(var a=0;a<e;a++)h._strings[a]=h._reader.readUTFString();h._reader.pos=i}static parse(t,e){h._templet=t,h._reader=e,h.READ_DATA(),h.READ_BLOCK(),h.READ_STRINGS();for(var i=0,a=h._BLOCK.count;i<a;i++){var r=e.readUint16(),s=h._strings[r],n=h["READ_"+s];if(null==n)throw new Error("model file err,no this function:"+r+" "+s);n.call(null)}}static READ_ANIMATIONS(){var t,e,n,l,o=h._reader,d=o.rawBuffer,u=o.readUint16(),p=[];for(p.length=u,t=0;t<u;t++)p[t]=i.AnimationTemplet.interpolation[o.readByte()];var _=o.readUint8();for(h._templet._anis.length=_,t=0;t<_;t++){var c=h._templet._anis[t]=new a;c.nodes=[];var m=c.name=h._strings[o.readUint16()];h._templet._aniMap[m]=t,c.bone3DMap={},c.playTime=o.readFloat32();var x=c.nodes.length=o.readInt16();for(c.totalKeyframeDatasLength=0,e=0;e<x;e++){var y=c.nodes[e]=new r;y.keyframeWidth=u,y.childs=[];var f=o.readUint16();f>=0&&(y.name=h._strings[f],c.bone3DMap[y.name]=e),y.keyFrame=[],y.parentIndex=o.readInt16(),-1==y.parentIndex?y.parent=null:y.parent=c.nodes[y.parentIndex],c.totalKeyframeDatasLength+=u,y.interpolationMethod=p,null!=y.parent&&y.parent.childs.push(y);var M=o.readUint16();y.keyFrame.length=M;var g=null,D=null;for(n=0,l=M;n<l;n++){(g=y.keyFrame[n]=new s).startTime=o.readFloat32(),D&&(D.duration=g.startTime-D.startTime),g.dData=new Float32Array(u),g.nextData=new Float32Array(u);var v=h._DATA.offset,I=o.readUint32(),A=4*u,S=d.slice(v+I,v+I+A);g.data=new Float32Array(S),D=g}g.duration=0,y.playTime=c.playTime,h._templet._calculateKeyFrame(y,M,u)}}}}h._strings=[],h._BLOCK={count:0},h._DATA={offset:0,size:0};class l{constructor(){}}l.stopped=0,l.paused=1,l.playing=2;class o extends e.EventDispatcher{get templet(){return this._templet}set templet(t){this.state!==l.stopped&&this.stop(!0),this._templet!==t&&(this._templet=t,this._computeFullKeyframeIndices())}get playStart(){return this._playStart}get playEnd(){return this._playEnd}get playDuration(){return this._playDuration}get overallDuration(){return this._overallDuration}get currentAnimationClipIndex(){return this._currentAnimationClipIndex}get currentKeyframeIndex(){return this._currentKeyframeIndex}get currentPlayTime(){return this._currentTime+this._playStart}get currentFrameTime(){return this._currentFrameTime}get cachePlayRate(){return this._cachePlayRate}set cachePlayRate(t){this._cachePlayRate!==t&&(this._cachePlayRate=t,this._templet&&this._computeFullKeyframeIndices())}get cacheFrameRate(){return this._cacheFrameRate}set cacheFrameRate(t){this._cacheFrameRate!==t&&(this._cacheFrameRate=t,this._cacheFrameRateInterval=1e3/this._cacheFrameRate,this._templet&&this._computeFullKeyframeIndices())}set currentTime(t){if(-1!==this._currentAnimationClipIndex&&this._templet){if(t<this._playStart||t>this._playEnd)throw new Error("AnimationPlayer:value must large than playStartTime,small than playEndTime.");this._startUpdateLoopCount=e.Stat.loopCount;var i=this._cacheFrameRateInterval*this._cachePlayRate;this._currentTime=t,this._currentKeyframeIndex=Math.floor(this.currentPlayTime/i),this._currentFrameTime=this._currentKeyframeIndex*i}}get paused(){return this._paused}set paused(t){this._paused=t,t&&this.event(e.Event.PAUSED)}get cacheFrameRateInterval(){return this._cacheFrameRateInterval}get state(){return-1===this._currentAnimationClipIndex?l.stopped:this._paused?l.paused:l.playing}get destroyed(){return this._destroyed}constructor(){super(),this.isCache=!0,this.playbackRate=1,this._destroyed=!1,this._currentAnimationClipIndex=-1,this._currentKeyframeIndex=-1,this._currentTime=0,this._overallDuration=Number.MAX_VALUE,this._stopWhenCircleFinish=!1,this._elapsedPlaybackTime=0,this._startUpdateLoopCount=-1,this._cachePlayRate=1,this.cacheFrameRate=60,this.returnToZeroStopped=!1}_onTempletLoadedComputeFullKeyframeIndices(t,e,i){this._templet===i&&this._cachePlayRate===t&&this._cacheFrameRate===e&&this._computeFullKeyframeIndices()}_computeFullKeyframeIndices(){}_onAnimationTempletLoaded(){this.destroyed||this._calculatePlayDuration()}_calculatePlayDuration(){if(this.state!==l.stopped){var t=this._templet.getAniDuration(this._currentAnimationClipIndex);0===this._playEnd&&(this._playEnd=t),this._playEnd>t&&(this._playEnd=t),this._playDuration=this._playEnd-this._playStart}}_setPlayParams(t,e){this._currentTime=t,this._currentKeyframeIndex=Math.floor(this.currentPlayTime/e+.01),this._currentFrameTime=this._currentKeyframeIndex*e}_setPlayParamsWhenStop(t,e,i=-1){this._currentTime=t;var a=i>0?i:t;this._currentKeyframeIndex=Math.floor(a/e+.01),this._currentKeyframeIndex=Math.floor(t/e+.01),this._currentFrameTime=this._currentKeyframeIndex*e,this._currentAnimationClipIndex=-1}_update(t){if(-1!==this._currentAnimationClipIndex&&!this._paused&&this._templet){var i=this._cacheFrameRateInterval*this._cachePlayRate,a=0;this._startUpdateLoopCount!==e.Stat.loopCount&&(a=t*this.playbackRate,this._elapsedPlaybackTime+=a);var r=this.playDuration;if(a+=this._currentTime,0!==this._overallDuration&&this._elapsedPlaybackTime>=this._overallDuration||0===this._overallDuration&&this._elapsedPlaybackTime>=r||0===this._overallDuration&&a>=this.playEnd)return this._setPlayParamsWhenStop(r,i,this.playEnd),void this.event(e.Event.STOPPED);if(r>0){if(a>=r)return this._stopWhenCircleFinish?(this._setPlayParamsWhenStop(r,i),this._stopWhenCircleFinish=!1,void this.event(e.Event.STOPPED)):(a%=r,this._setPlayParams(a,i),void this.event(e.Event.COMPLETE));this._setPlayParams(a,i)}else{if(this._stopWhenCircleFinish)return this._setPlayParamsWhenStop(r,i),this._stopWhenCircleFinish=!1,void this.event(e.Event.STOPPED);this._currentTime=this._currentFrameTime=this._currentKeyframeIndex=0,this.event(e.Event.COMPLETE)}}}_destroy(){this.offAll(),this._templet=null,this._destroyed=!0}play(t=0,i=1,a=2147483647,r=0,s=0){if(!this._templet)throw new Error("AnimationPlayer:templet must not be null,maybe you need to set url.");if(a<0||r<0||s<0)throw new Error("AnimationPlayer:overallDuration,playStart and playEnd must large than zero.");if(0!==s&&r>s)throw new Error("AnimationPlayer:start must less than end.");this._currentTime=0,this._currentFrameTime=0,this._elapsedPlaybackTime=0,this.playbackRate=i,this._overallDuration=a,this._playStart=r,this._playEnd=s,this._paused=!1,this._currentAnimationClipIndex=t,this._currentKeyframeIndex=0,this._startUpdateLoopCount=e.Stat.loopCount,this.event(e.Event.PLAYED),this._calculatePlayDuration(),this._update(0)}playByFrame(t=0,e=1,i=2147483647,a=0,r=0,s=30){var n=1e3/s;this.play(t,e,i,a*n,r*n)}stop(t=!0){t?(this._currentTime=this._currentFrameTime=this._currentKeyframeIndex=0,this._currentAnimationClipIndex=-1,this.event(e.Event.STOPPED)):this._stopWhenCircleFinish=!0}destroy(){}}class d extends e.Resource{static _LinearInterpolation_0(t,e,i,a,r,s,n,h,l,o=null){return i[a]=r[e]+s*n[e],1}static _QuaternionInterpolation_1(t,i,a,r,s,n,h,l,o,d=null){var u=0===l?0:n/l;return e.MathUtil.slerpQuaternionArray(s,i,o,i,u,a,r),4}static _AngleInterpolation_2(t,e,i,a,r,s,n,h,l,o=null){return 0}static _RadiansInterpolation_3(t,e,i,a,r,s,n,h,l,o=null){return 0}static _Matrix4x4Interpolation_4(t,e,i,a,r,s,n,h,l,o=null){for(let t=0;t<16;t++,e++)i[a+t]=r[e]+s*n[e];return 16}static _NoInterpolation_5(t,e,i,a,r,s,n,h,l,o=null){return i[a]=r[e],1}static _BezierInterpolation_6(t,i,a,r,s,n,h,l,o,d=null,u=0){return a[r]=s[i]+(o[i]-s[i])*e.Bezier.getRate(n/l,d[u],d[u+1],d[u+2],d[u+3]),5}static _BezierInterpolation_7(t,i,a,r,s,n,h,l,o,d=null,u=0){return a[r]=d[u+4]+d[u+5]*e.Bezier.getRate((.001*n+d[u+6])/d[u+7],d[u],d[u+1],d[u+2],d[u+3]),9}constructor(){super(),this._anis=[],this._aniMap={},this.unfixedLastAniIndex=-1,this._fullFrames=null,this._boneCurKeyFrm=[]}_calculateKeyFrame(t,e,i){var a=t.keyFrame;a[e]=a[0];for(var r=0;r<e;r++)for(var s=a[r],n=0;n<i;n++)s.dData[n]=0===s.duration?0:(a[r+1].data[n]-s.data[n])/s.duration,s.nextData[n]=a[r+1].data[n];a.length--}_onAsynLoaded(t,i=null){var a=new e.Byte(t);if(this._aniVersion=a.readUTFString(),"LAYAANIMATION:02"===this._aniVersion)h.parse(this,a);else n.parse(this,a)}getAnimationCount(){return this._anis.length}getAnimation(t){return this._anis[t]}getAniDuration(t){return this._anis[t].playTime}getNodes(t){return this._anis[t].nodes}getNodeIndexWithName(t,e){return this._anis[t].bone3DMap[e]}getNodeCount(t){return this._anis[t].nodes.length}getTotalkeyframesLength(t){return this._anis[t].totalKeyframeDatasLength}getPublicExtData(){return this._publicExtData}getAnimationDataWithCache(t,e,i,a){var r=e[i];if(r){var s=r[t];return s?s[a]:null}return null}setAnimationDataWithCache(t,e,i,a,r){var s=e[i]||(e[i]={});(s[t]||(s[t]=[]))[a]=r}getNodeKeyFrame(t,e,i){var a=this._boneCurKeyFrm[e],r=t.length;(null==a||a>=r)&&(a=this._boneCurKeyFrm[e]=0);var s=t[a],n=i-s.startTime;if(0==n||n>0&&s.duration>n)return a;var h=0;if(n>0){for(i+=.01,h=a+1;h<r;h++)if((s=t[h]).startTime<=i&&s.startTime+s.duration>i)return this._boneCurKeyFrm[e]=h,h;return r-1}for(h=0;h<a;h++)if((s=t[h]).startTime<=i&&s.startTime+s.duration>i)return this._boneCurKeyFrm[e]=h,h;return a}getOriginalData(t,e,i,a,r){var s=this._anis[t].nodes,n=this._boneCurKeyFrm;n.length<s.length&&(n.length=s.length);for(var h=0,l=0,o=s.length,u=0;l<o;l++){var p,_=s[l],c=_.keyFrame;p=c[this.getNodeKeyFrame(c,l,r)],_.dataOffset=u;var m=r-p.startTime,x=_.lerpType;if(x)switch(x){case 0:case 1:for(h=0;h<_.keyframeWidth;)h+=_.interpolationMethod[h](_,h,e,u+h,p.data,m,p.dData,p.duration,p.nextData);break;case 2:var y=p.interpolationData,f=y.length,M=0;for(h=0;h<f;){var g=y[h];switch(g){case 6:case 7:h+=d.interpolation[g](_,M,e,u+M,p.data,m,p.dData,p.duration,p.nextData,y,h+1);break;default:h+=d.interpolation[g](_,M,e,u+M,p.data,m,p.dData,p.duration,p.nextData)}M++}}else for(h=0;h<_.keyframeWidth;)h+=_.interpolationMethod[h](_,h,e,u+h,p.data,m,p.dData,p.duration,p.nextData);u+=_.keyframeWidth}}getNodesCurrentFrameIndex(t,e){var i=this._anis[t].nodes;t!==this.unfixedLastAniIndex&&(this.unfixedCurrentFrameIndexes=new Uint32Array(i.length),this.unfixedCurrentTimes=new Float32Array(i.length),this.unfixedLastAniIndex=t);for(var a=0,r=i.length;a<r;a++){var s=i[a];for(e<this.unfixedCurrentTimes[a]&&(this.unfixedCurrentFrameIndexes[a]=0),this.unfixedCurrentTimes[a]=e;this.unfixedCurrentFrameIndexes[a]<s.keyFrame.length&&!(s.keyFrame[this.unfixedCurrentFrameIndexes[a]].startTime>this.unfixedCurrentTimes[a]);)this.unfixedCurrentFrameIndexes[a]++;this.unfixedCurrentFrameIndexes[a]--}return this.unfixedCurrentFrameIndexes}getOriginalDataUnfixedRate(t,e,i){var a=this._anis[t].nodes;t!==this.unfixedLastAniIndex&&(this.unfixedCurrentFrameIndexes=new Uint32Array(a.length),this.unfixedCurrentTimes=new Float32Array(a.length),this.unfixedKeyframes=[],this.unfixedLastAniIndex=t);for(var r=0,s=0,n=a.length,h=0;s<n;s++){var l=a[s];for(i<this.unfixedCurrentTimes[s]&&(this.unfixedCurrentFrameIndexes[s]=0),this.unfixedCurrentTimes[s]=i;this.unfixedCurrentFrameIndexes[s]<l.keyFrame.length&&!(l.keyFrame[this.unfixedCurrentFrameIndexes[s]].startTime>this.unfixedCurrentTimes[s]);)this.unfixedKeyframes[s]=l.keyFrame[this.unfixedCurrentFrameIndexes[s]],this.unfixedCurrentFrameIndexes[s]++;var o=this.unfixedKeyframes[s];l.dataOffset=h;var u=i-o.startTime;if(l.lerpType)switch(l.lerpType){case 0:case 1:for(r=0;r<l.keyframeWidth;)r+=l.interpolationMethod[r](l,r,e,h+r,o.data,u,o.dData,o.duration,o.nextData);break;case 2:var p=o.interpolationData,_=p.length,c=0;for(r=0;r<_;){var m=p[r];switch(m){case 6:case 7:r+=d.interpolation[m](l,c,e,h+c,o.data,u,o.dData,o.duration,o.nextData,p,r+1);break;default:r+=d.interpolation[m](l,c,e,h+c,o.data,u,o.dData,o.duration,o.nextData)}c++}}else for(r=0;r<l.keyframeWidth;)r+=l.interpolationMethod[r](l,r,e,h+r,o.data,u,o.dData,o.duration,o.nextData);h+=l.keyframeWidth}}}d.interpolation=[d._LinearInterpolation_0,d._QuaternionInterpolation_1,d._AngleInterpolation_2,d._RadiansInterpolation_3,d._Matrix4x4Interpolation_4,d._NoInterpolation_5,d._BezierInterpolation_6,d._BezierInterpolation_7],i.AnimationTemplet=d;class u extends e.Graphics{drawSkin(t,i){this.drawTriangles(t.texture,0,0,t.vertices,t.uvs,t.indexes,t.transform||e.Matrix.EMPTY,i)}static create(){return u._caches.pop()||new u}static recycle(t){t.clear(),u._caches.push(t)}}u._caches=[];class p{constructor(t,e){this.isSpine=!0,this.isDebug=!1,this._targetBone=e[t.targetBoneIndex],this.isSpine=t.isSpine,null==this._bones&&(this._bones=[]),this._bones.length=0;for(var i=0,a=t.boneIndexs.length;i<a;i++)this._bones.push(e[t.boneIndexs[i]]);this.name=t.name,this.mix=t.mix,this.bendDirection=t.bendDirection}apply(){switch(this._bones.length){case 1:this._applyIk1(this._bones[0],this._targetBone.resultMatrix.tx,this._targetBone.resultMatrix.ty,this.mix);break;case 2:this.isSpine?this._applyIk2(this._bones[0],this._bones[1],this._targetBone.resultMatrix.tx,this._targetBone.resultMatrix.ty,this.bendDirection,this.mix):this._applyIk3(this._bones[0],this._bones[1],this._targetBone.resultMatrix.tx,this._targetBone.resultMatrix.ty,this.bendDirection,this.mix)}}_applyIk1(t,e,i,a){var r=t.parentBone,s=1/(r.resultMatrix.a*r.resultMatrix.d-r.resultMatrix.b*r.resultMatrix.c),n=e-r.resultMatrix.tx,h=i-r.resultMatrix.ty,l=(n*r.resultMatrix.d-h*r.resultMatrix.c)*s-t.transform.x,o=(h*r.resultMatrix.a-n*r.resultMatrix.b)*s-t.transform.y,d=Math.atan2(o,l)*p.radDeg-0-t.transform.skX;t.transform.scX<0&&(d+=180),d>180?d-=360:d<-180&&(d+=360),t.transform.skX=t.transform.skY=t.transform.skX+d*a,t.update()}updatePos(t,e){this._sp&&this._sp.pos(t,e)}_applyIk2(t,i,a,r,s,n){if(0!=n){var h,l,o,d=t.resultTransform.x,u=t.resultTransform.y,_=t.transform.scX,c=t.transform.scY,m=i.transform.scX;_<0?(_=-_,h=180,o=-1):(h=0,o=1),c<0&&(c=-c,o=-o),m<0?(m=-m,l=180):l=0;var x,y,f,M=i.resultTransform.x,g=t.resultMatrix.a,D=t.resultMatrix.c,v=t.resultMatrix.b,I=t.resultMatrix.d,A=Math.abs(_-c)<=1e-4;A?(y=g*M+D*(x=i.resultTransform.y)+t.resultMatrix.tx,f=v*M+I*x+t.resultMatrix.ty):(x=0,y=g*M+t.resultMatrix.tx,f=v*M+t.resultMatrix.ty),this.isDebug&&(this._sp||(this._sp=new e.Sprite,e.ILaya.stage.addChild(this._sp)),this._sp.graphics.clear(),this._sp.graphics.drawCircle(a,r,15,"#ffff00"),this._sp.graphics.drawCircle(y,f,15,"#ff00ff")),t.setRotation(Math.atan2(f-t.resultMatrix.ty,y-t.resultMatrix.tx));var S=t.parentBone;g=S.resultMatrix.a,D=S.resultMatrix.c,v=S.resultMatrix.b;var b,T,F=1/(g*(I=S.resultMatrix.d)-D*v),w=a-S.resultMatrix.tx,C=r-S.resultMatrix.ty,k=(w*I-C*D)*F-d,U=(C*g-w*v)*F-u,P=((w=y-S.resultMatrix.tx)*I-(C=f-S.resultMatrix.ty)*D)*F-d,B=(C*g-w*v)*F-u,L=Math.sqrt(P*P+B*B),E=i.length*m;if(A){var N=(k*k+U*U-L*L-(E*=_)*E)/(2*L*E);N<-1?N=-1:N>1&&(N=1),T=Math.acos(N)*s,g=L+E*N,D=E*Math.sin(T),b=Math.atan2(U*g-k*D,k*g+U*D)}else{var R=(g=_*E)*g,V=(D=c*E)*D,O=k*k+U*U,K=Math.atan2(U,k),Y=-2*V*L,X=V-R;if((I=Y*Y-4*X*(v=V*L*L+R*O-R*V))>0){var W=Math.sqrt(I);Y<0&&(W=-W);var G=(W=-(Y+W)/2)/X,q=v/W,z=Math.abs(G)<Math.abs(q)?G:q;z*z<=O&&(C=Math.sqrt(O-z*z)*s,b=K-Math.atan2(C,z),T=Math.atan2(C/c,(z-L)/_))}var H=0,Q=Number.MAX_VALUE,Z=0,j=0,J=0,$=0,tt=0,et=0;(I=(w=L+g)*w)>$&&(J=0,$=I,tt=w),(I=(w=L-g)*w)<Q&&(H=Math.PI,Q=I,Z=w);var it=Math.acos(-g*L/(R-V));(I=(w=g*Math.cos(it)+L)*w+(C=D*Math.sin(it))*C)<Q&&(H=it,Q=I,Z=w,j=C),I>$&&(J=it,$=I,tt=w,et=C),O<=(Q+$)/2?(b=K-Math.atan2(j*s,Z),T=H*s):(b=K-Math.atan2(et*s,tt),T=J*s)}var at=Math.atan2(x,M)*o,rt=t.resultTransform.skX;(b=(b-at)*p.radDeg+h-rt)>180?b-=360:b<-180&&(b+=360),t.resultTransform.x=d,t.resultTransform.y=u,t.resultTransform.skX=t.resultTransform.skY=rt+b*n,rt=i.resultTransform.skX,rt%=360,(T=((T+at)*p.radDeg-0)*o+l-rt)>180?T-=360:T<-180&&(T+=360),i.resultTransform.x=M,i.resultTransform.y=x,i.resultTransform.skX=i.resultTransform.skY=i.resultTransform.skY+T*n,t.update()}}_applyIk3(t,i,a,r,s,n){if(0==n)return;var h,l;const o=i.resultMatrix.a*i.length,d=i.resultMatrix.b*i.length,u=o*o+d*d,p=Math.sqrt(u);var c=t.resultMatrix.tx,m=t.resultMatrix.ty,x=i.resultMatrix.tx,y=i.resultMatrix.ty,f=x-c,M=y-m;const g=f*f+M*M,D=Math.sqrt(g),v=(f=a-t.resultMatrix.tx)*f+(M=r-t.resultMatrix.ty)*M,I=Math.sqrt(v);if(p+D<=I||I+p<=D||I+D<=p){var A;x=c+(A=p+D<=I?1:-1)*(a-c)*D/I,y=m+A*(r-m)*D/I}else{const t=(g-u+v)/(2*v),e=Math.sqrt(g-t*t*v)/I,i=c+f*t,a=m+M*t,r=-M*e,n=f*e;s>0?(x=i-r,y=a-n):(x=i+r,y=a+n)}var S,b,T;h=x,l=y,this.isDebug&&(this._sp||(this._sp=new e.Sprite,e.ILaya.stage.addChild(this._sp)),this._sp.graphics.clear(),this._sp.graphics.drawCircle(c,m,15,"#ff00ff"),this._sp.graphics.drawCircle(a,r,15,"#ffff00"),this._sp.graphics.drawCircle(h,l,15,"#ff00ff")),S=Math.atan2(l-t.resultMatrix.ty,h-t.resultMatrix.tx),t.setRotation(S),_.identity(),_.rotate(S),_.scale(t.resultMatrix.getScaleX(),t.resultMatrix.getScaleY()),_.translate(t.resultMatrix.tx,t.resultMatrix.ty),_.copyTo(t.resultMatrix),t.updateChild(),b=Math.atan2(r-l,a-h),i.setRotation(b),(T=_).identity(),T.rotate(b),T.scale(i.resultMatrix.getScaleX(),i.resultMatrix.getScaleY()),T.translate(h,l),_.copyTo(i.resultMatrix),i.updateChild()}}p.radDeg=180/Math.PI,p.degRad=Math.PI/180;const _=new e.Matrix;class c{constructor(t,e){this._debugKey=!1,this._segments=[],this._curves=[],this.data=t,this.position=t.position,this.spacing=t.spacing,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.bones=[];for(var i=this.data.bones,a=0,r=i.length;a<r;a++)this.bones.push(e[i[a]])}apply(t,e){if(this.target){var i=this.translateMix,a=this.translateMix,r=a>0,s=this.data.spacingMode,n="length"==s,h=this.data.rotateMode,l="tangent"==h,o="chainScale"==h,d=[],u=this.bones.length,p=l?u:u+1,_=[];this._spaces=_,_[0]=this.position;var c=this.spacing;if(o||n)for(var m=0,x=p-1;m<x;){var y=this.bones[m],f=y.length,M=f*y.resultMatrix.a,g=f*y.resultMatrix.b;f=Math.sqrt(M*M+g*g),o&&(d[m]=f),_[++m]=n?Math.max(0,f+c):c}else for(m=1;m<p;m++)_[m]=c;var D=this.computeWorldPositions(this.target,t,e,p,l,"percent"==this.data.positionMode,"percent"==s);if(this._debugKey){for(m=0;m<D.length;m++)e.drawCircle(D[m++],D[m++],5,"#00ff00");var v=[];for(m=0;m<D.length;m++)v.push(D[m++],D[m++]);e.drawLines(0,0,v,"#ff0000")}var I,A=D[0],S=D[1],b=this.data.offsetRotation,T="chain"==h&&0==b;for(m=0,I=3;m<u;m++,I+=3){(y=this.bones[m]).resultMatrix.tx+=(A-y.resultMatrix.tx)*i,y.resultMatrix.ty+=(S-y.resultMatrix.ty)*i;var F=(M=D[I])-A,w=(g=D[I+1])-S;if(o&&0!=(f=d[m])){var C=(Math.sqrt(F*F+w*w)/f-1)*a+1;y.resultMatrix.a*=C,y.resultMatrix.c*=C}if(A=M,S=g,r){var k,U,P,B=y.resultMatrix.a,L=y.resultMatrix.c,E=y.resultMatrix.b,N=y.resultMatrix.d;k=l?D[I-1]:0==_[m+1]?D[I+2]:Math.atan2(w,F),k-=Math.atan2(E,B)-b/180*Math.PI,T&&(U=Math.cos(k),P=Math.sin(k),A+=((f=y.length)*(U*B-P*E)-F)*a,S+=(f*(P*B+U*E)-w)*a),k>Math.PI?k-=2*Math.PI:k<-Math.PI&&(k+=2*Math.PI),k*=a,U=Math.cos(k),P=Math.sin(k),y.resultMatrix.a=U*B-P*E,y.resultMatrix.c=U*L-P*N,y.resultMatrix.b=P*B+U*E,y.resultMatrix.d=P*L+U*N}}}}computeWorldVertices2(t,e,i,a,r,s){var n,h,l,o=t.currDisplayData.bones,d=t.currDisplayData.weights,u=t.currDisplayData.triangles,p=0,_=0,c=0,x=0,y=0,f=0,M=0,g=0,D=0,v=0;if(null!=o){for(p=0;p<i;p+=2)_+=(x=o[_])+1,c+=x;var I=e;for(y=s,f=3*c;y<a;y+=2){for(M=0,g=0,x=o[_++],x+=_;_<x;_++,f+=3){n=I[o[_]].resultMatrix,D=d[f],v=d[f+1];var A=d[f+2];M+=(D*n.a+v*n.c+n.tx)*A,g+=(D*n.b+v*n.d+n.ty)*A}r[y]=M,r[y+1]=g}}else{var S,b;if(u||(u=d),t.deformData&&(u=t.deformData),S=t.parent,e)for(l=e.length,p=0;p<l;p++)if(e[p].name==S){h=e[p];break}h&&(b=h.resultMatrix),b||(b=m);var T=b.tx,F=b.ty,w=b.a,C=b.b,k=b.c,U=b.d;for(h&&(U*=h.d),_=i,y=s;y<a;_+=2,y+=2)D=u[_],v=u[_+1],r[y]=D*w+v*C+T,r[y+1]=-(D*k+v*U+F)}}computeWorldPositions(t,e,i,a,r,s,n){t.currDisplayData.bones,t.currDisplayData.weights,t.currDisplayData.triangles;var h,l,o,d,u,p,_,c,m=[],x=0,y=t.currDisplayData.verLen,f=this.position,M=this._spaces,g=[],D=y/6,v=-1;if(D--,y-=4,this.computeWorldVertices2(t,e,2,y,m,0),this._debugKey)for(x=0;x<m.length;)i.drawCircle(m[x++],m[x++],10,"#ff0000");h=m,this._curves.length=D;var I=this._curves;l=0;var A,S,b,T,F,w,C,k,U,P=h[0],B=h[1],L=0,E=0,N=0,R=0,V=0,O=0;for(x=0,U=2;x<D;x++,U+=6)F=2*(A=.1875*(P-2*(L=h[U])+(N=h[U+2])))+(b=.09375*(3*(L-N)-P+(V=h[U+4]))),w=2*(S=.1875*(B-2*(E=h[U+1])+(R=h[U+3])))+(T=.09375*(3*(E-R)-B+(O=h[U+5]))),C=.75*(L-P)+A+.16666667*b,k=.75*(E-B)+S+.16666667*T,l+=Math.sqrt(C*C+k*k),C+=F,k+=w,F+=b,w+=T,l+=Math.sqrt(C*C+k*k),C+=F,k+=w,l+=Math.sqrt(C*C+k*k),C+=F+b,k+=w+T,l+=Math.sqrt(C*C+k*k),I[x]=l,P=V,B=O;if(s&&(f*=l),n)for(x=0;x<a;x++)M[x]*=l;var K,Y=this._segments,X=0;for(x=0,o=0,d=0,K=0;x<a;x++,o+=3)if((u=f+=p=M[x])<0)this.addBeforePosition(u,h,0,g,o);else if(u>l)this.addAfterPosition(u-l,h,y-4,g,o);else{for(;;d++)if(!(u>(c=I[d]))){0==d?u/=c:u=(u-(_=I[d-1]))/(c-_);break}if(d!=v){v=d;var W=6*d;for(F=2*(A=.03*((P=h[W])-2*(L=h[W+2])+(N=h[W+4])))+(b=.006*(3*(L-N)-P+(V=h[W+6]))),w=2*(S=.03*((B=h[W+1])-2*(E=h[W+3])+(R=h[W+5])))+(T=.006*(3*(E-R)-B+(O=h[W+7]))),C=.3*(L-P)+A+.16666667*b,k=.3*(E-B)+S+.16666667*T,X=Math.sqrt(C*C+k*k),Y[0]=X,W=1;W<8;W++)C+=F,k+=w,F+=b,w+=T,X+=Math.sqrt(C*C+k*k),Y[W]=X;C+=F,k+=w,X+=Math.sqrt(C*C+k*k),Y[8]=X,C+=F+b,k+=w+T,X+=Math.sqrt(C*C+k*k),Y[9]=X,K=0}for(u*=X;;K++)if(!(u>(c=Y[K]))){0==K?u/=c:u=K+(u-(_=Y[K-1]))/(c-_);break}this.addCurvePosition(.1*u,P,B,L,E,N,R,V,O,g,o,r||x>0&&0==p)}return g}addBeforePosition(t,e,i,a,r){var s=e[i],n=e[i+1],h=e[i+2]-s,l=e[i+3]-n,o=Math.atan2(l,h);a[r]=s+t*Math.cos(o),a[r+1]=n+t*Math.sin(o),a[r+2]=o}addAfterPosition(t,e,i,a,r){var s=e[i+2],n=e[i+3],h=s-e[i],l=n-e[i+1],o=Math.atan2(l,h);a[r]=s+t*Math.cos(o),a[r+1]=n+t*Math.sin(o),a[r+2]=o}addCurvePosition(t,e,i,a,r,s,n,h,l,o,d,u){0==t&&(t=1e-4);var p=t*t,_=p*t,c=1-t,m=c*c,x=m*c,y=c*t,f=3*y,M=c*f,g=f*t,D=e*x+a*M+s*g+h*_,v=i*x+r*M+n*g+l*_;o[d]=D,o[d+1]=v,o[d+2]=u?Math.atan2(v-(i*m+r*y*2+n*p),D-(e*m+a*y*2+s*p)):0}}c.BEFORE=-2,c.AFTER=-3;const m=new e.Matrix;class x{constructor(t,e){var i,a;for(this._temp=[],this._data=t,null==this._bones&&(this._bones=[]),this.target=e[t.targetIndex],i=0,a=t.boneIndexs.length;i<a;i++)this._bones.push(e[t.boneIndexs[i]]);this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix}apply(){for(var t,e=this.target.resultMatrix.a,i=this.target.resultMatrix.b,a=this.target.resultMatrix.c,r=this.target.resultMatrix.d,s=0,n=this._bones.length;s<n;s++){if(t=this._bones[s],this.rotateMix>0){var h=t.resultMatrix.a,l=t.resultMatrix.b,o=t.resultMatrix.c,d=t.resultMatrix.d,u=Math.atan2(a,e)-Math.atan2(o,h)+this._data.offsetRotation*Math.PI/180;u>Math.PI?u-=2*Math.PI:u<-Math.PI&&(u+=2*Math.PI),u*=this.rotateMix;var p=Math.cos(u),_=Math.sin(u);t.resultMatrix.a=p*h-_*o,t.resultMatrix.b=p*l-_*d,t.resultMatrix.c=_*h+p*o,t.resultMatrix.d=_*l+p*d}if(this.translateMix&&(this._temp[0]=this._data.offsetX,this._temp[1]=this._data.offsetY,this.target.localToWorld(this._temp),t.resultMatrix.tx+=(this._temp[0]-t.resultMatrix.tx)*this.translateMix,t.resultMatrix.ty+=(this._temp[1]-t.resultMatrix.ty)*this.translateMix,t.updateChild()),this.scaleMix>0){var c=Math.sqrt(t.resultMatrix.a*t.resultMatrix.a+t.resultMatrix.c*t.resultMatrix.c),m=Math.sqrt(e*e+a*a),x=c>1e-5?(c+(m-c+this._data.offsetScaleX)*this.scaleMix)/c:0;t.resultMatrix.a*=x,t.resultMatrix.c*=x,c=Math.sqrt(t.resultMatrix.b*t.resultMatrix.b+t.resultMatrix.d*t.resultMatrix.d),m=Math.sqrt(i*i+r*r),x=c>1e-5?(c+(m-c+this._data.offsetScaleY)*this.scaleMix)/c:0,t.resultMatrix.b*=x,t.resultMatrix.d*=x}if(this.shearMix>0){l=t.resultMatrix.b,d=t.resultMatrix.d;var y=Math.atan2(d,l);(u=Math.atan2(r,i)-Math.atan2(a,e)-(y-Math.atan2(t.resultMatrix.c,t.resultMatrix.a)))>Math.PI?u-=2*Math.PI:u<-Math.PI&&(u+=2*Math.PI),u=y+(u+this._data.offsetShearY*Math.PI/180)*this.shearMix,x=Math.sqrt(l*l+d*d),t.resultMatrix.b=Math.cos(u)*x,t.resultMatrix.d=Math.sin(u)*x}}}}class y extends e.Sprite{constructor(t=0){super(),this._boneMatrixArray=[],this._lastTime=0,this._currAniIndex=-1,this._pause=!0,this._aniClipIndex=-1,this._clipIndex=-1,this._skinIndex=0,this._skinName="default",this._aniMode=0,this._index=-1,this._total=-1,this._indexControl=!1,this._eventIndex=0,this._drawOrderIndex=0,this._drawOrder=null,this._lastAniClipIndex=-1,this._lastUpdateAniClipIndex=-1,this._playAudio=!0,this._soundChannelArr=[],this._animationName="",this._loop=!0,this._aniMode=t}get index(){return this._index}set index(t){this.player&&(this._index=t,this._player.currentTime=1e3*this._index/this._player.cacheFrameRate,this._indexControl=!0,(this._aniClipIndex<0||this._aniClipIndex>=this.getAnimNum())&&(this._aniClipIndex=0,this._currAniIndex=0,this._curOriginalData=new Float32Array(this._templet.getTotalkeyframesLength(this._currAniIndex)),this._drawOrder=null,this._eventIndex=0),this._update(!1))}get total(){return this._templet&&this._player?this._total=Math.floor(this._templet.getAniDuration(this._player.currentAnimationClipIndex)/1e3*this._player.cacheFrameRate):this._total=-1,this._total}get player(){return this._player}get skinName(){return this._skinName}set skinName(t){this._skinName=t,this._templet&&this.showSkinByName(t)}get animationName(){return this._animationName}set animationName(t){this._animationName=t,this._templet&&this.play(t,this._loop,!0)}get loop(){return this._loop}set loop(t){this._loop=t,this._templet&&this.play(this._animationName,this._loop,!0)}get templet(){return this._templet}set templet(t){this.init(t)}get source(){return this._source}set source(t){this._source=t,t?e.ILaya.loader.load(t).then(t=>{!this._source||t&&!t.isCreateFromURL(this._source)||(this.templet=t)}):this.templet=null}get aniMode(){return this._aniMode}set aniMode(t){this._aniMode=t}init(t){if(this._templet&&(this.reset(),this.graphics.clear()),this._templet=t,this._templet){if(1==this._aniMode){this._graphicsCache=[];for(let e=0,i=t.getAnimationCount();e<i;e++)this._graphicsCache.push([])}if(this._yReverseMatrix=t.yReverseMatrix,this._templet._addReference(1),this._player=new o,this._player.templet=t,this._player.play(),this._parseSrcBoneMatrix(),this._boneList=t.mBoneArr,this._rootBone=t.mRootBone,this._aniSectionDic=t.aniSectionDic,t.ikArr.length>0){this._ikArr=[];for(let e=0,i=t.ikArr.length;e<i;e++)this._ikArr.push(new p(t.ikArr[e],this._boneList))}if(t.pathArr.length>0){this._pathDic={};for(let e=0,i=t.pathArr.length;e<i;e++){let i=t.pathArr[e],a=new c(i,this._boneList),r=this._boneSlotDic[i.name];r&&(a=new c(i,this._boneList),a.target=r),this._pathDic[i.name]=a}}if(t.tfArr.length>0){this._tfArr=[];for(let e=0,i=t.tfArr.length;e<i;e++)this._tfArr.push(new x(t.tfArr[e],this._boneList))}t.skinDataArray.length>0&&(this._skinIndex=this._templet.getSkinIndexByName(this._skinName),-1==this._skinIndex&&(this._skinIndex=0)),this._player.on(e.Event.PLAYED,this,this._onPlay),this._player.on(e.Event.STOPPED,this,this._onStop),this._player.on(e.Event.PAUSED,this,this._onPause),e.LayaEnv.isPlaying&&this._animationName&&this.play(this._animationName,this._loop,!0)}}load(t,i){e.ILaya.loader.load(t).then(a=>{null!=a&&a.isCreateFromURL(t)&&(this.init(a),this.play(0,!0),i instanceof e.Handler?i.runWith(this):i&&i())})}_onPlay(){this.event(e.Event.PLAYED)}_onStop(){let t=this._templet.eventAniArr[this._aniClipIndex];if(t&&this._eventIndex<t.length)for(;this._eventIndex<t.length;this._eventIndex++){let i=t[this._eventIndex];i.time>=this._player.playStart&&i.time<=this._player.playEnd&&this.event(e.Event.LABEL,i)}this._drawOrder=null,this.event(e.Event.STOPPED)}_onPause(){this.event(e.Event.PAUSED)}_parseSrcBoneMatrix(){let t=this._templet.srcBoneMatrixArr.length;for(let i=0;i<t;i++)this._boneMatrixArray.push(new e.Matrix);if(0==this._aniMode)this._boneSlotDic=this._templet.boneSlotDic,this._bindBoneBoneSlotDic=this._templet.bindBoneBoneSlotDic,this._boneSlotArray=this._templet.boneSlotArray;else{this._boneSlotDic={},this._bindBoneBoneSlotDic={},this._boneSlotArray=[];let t=this._templet.boneSlotArray;for(let e=0,i=t.length;e<i;e++){let i=t[e],a=this._bindBoneBoneSlotDic[i.parent];null==a&&(this._bindBoneBoneSlotDic[i.parent]=a=[]),this._boneSlotDic[i.name]=i=i.copy(),a.push(i),this._boneSlotArray.push(i)}}}_emitMissedEvents(t,i,a=0){let r=this._templet.eventAniArr[this._player.currentAnimationClipIndex];if(r){let t=r.length;for(let i=a;i<t;i++){let t=r[i];t.time>=this._player.playStart&&t.time<=this._player.playEnd&&this.event(e.Event.LABEL,t)}}}_update(t=!0){if(t&&this._pause)return;if(t&&this._indexControl)return;let i=this.timer.currTimer,a=this._player.currentKeyframeIndex,r=i-this._lastTime;if(t?this._player._update(r):a=-1,this._lastTime=i,this._index=this._clipIndex=this._player.currentKeyframeIndex,this._index<0)return;if(r>0&&this._clipIndex==a&&this._lastUpdateAniClipIndex==this._aniClipIndex)return;this._lastUpdateAniClipIndex=this._aniClipIndex,a>this._clipIndex&&0!=this._eventIndex&&(this._emitMissedEvents(this._player.playStart,this._player.playEnd,this._eventIndex),this._eventIndex=0);let s=this._templet.eventAniArr[this._aniClipIndex];if(s&&this._eventIndex<s.length){let t=s[this._eventIndex];if(t.time>=this._player.playStart&&t.time<=this._player.playEnd){if(this._player.currentPlayTime>=t.time&&(this.event(e.Event.LABEL,t),this._eventIndex++,this._playAudio&&t.audioValue&&"null"!==t.audioValue&&"undefined"!==t.audioValue)){let i=e.SoundManager.playSound(this._player.templet._path+t.audioValue,1,e.Handler.create(this,this._onAniSoundStoped));e.SoundManager.playbackRate=this._player.playbackRate,i&&this._soundChannelArr.push(i)}}else if(t.time<this._player.playStart&&this._playAudio&&t.audioValue&&"null"!==t.audioValue&&"undefined"!==t.audioValue){this._eventIndex++;let i=e.SoundManager.playSound(this._player.templet._path+t.audioValue,1,e.Handler.create(this,this._onAniSoundStoped),null,(this._player.currentPlayTime-t.time)/1e3);e.SoundManager.playbackRate=this._player.playbackRate,i&&this._soundChannelArr.push(i)}else this._eventIndex++}if(0==this._aniMode){let t=this._templet.getGrahicsDataWithCache(this._aniClipIndex,this._clipIndex)||this._createGraphics();t&&this.graphics!=t&&(this.graphics=t)}else if(1==this._aniMode){let t=this._getGrahicsDataWithCache(this._aniClipIndex,this._clipIndex)||this._createGraphics();t&&this.graphics!=t&&(this.graphics=t)}else this._createGraphics()}_onAniSoundStoped(t){for(let e=this._soundChannelArr.length-1;e>=0;e--){let i=this._soundChannelArr[e];(i.isStopped||t)&&(!i.isStopped&&i.stop(),this._soundChannelArr.splice(e,1))}}_createGraphics(t=-1){-1==t&&(t=this._clipIndex);let i=t*this._player.cacheFrameRateInterval,a=this._templet.drawOrderAniArr[this._aniClipIndex];if(a&&a.length>0){this._drawOrderIndex=0;let t=a[this._drawOrderIndex];for(;i>=t.time&&(this._drawOrder=t.drawOrder,this._drawOrderIndex++,!(this._drawOrderIndex>=a.length));)t=a[this._drawOrderIndex]}0==this._aniMode||1==this._aniMode?(this.graphics=u.create(),this.graphics.needCache=!0):this.graphics instanceof u?this.graphics.clear():this.graphics=u.create();let r=this.graphics,s=this._templet.getNodes(this._aniClipIndex),n=0==this._player.state;this._templet.getOriginalData(this._aniClipIndex,this._curOriginalData,null,t,n?i+this._player.cacheFrameRateInterval:i);let h=this._aniSectionDic[this._aniClipIndex],l=0,o=0,d=0,p=0,_=0,c=this._templet.srcBoneMatrixArr.length,m=this._curOriginalData;for(o=0,_=h[0];o<c;o++){let t=this._boneList[o].resultTransform,e=this._templet.srcBoneMatrixArr[o];t.scX=e.scX*m[l++],t.skX=e.skX+m[l++],t.skY=e.skY+m[l++],t.scY=e.scY*m[l++],t.x=e.x+m[l++],t.y=e.y+m[l++],8===this._templet.tMatrixDataLen&&(t.skewX=e.skewX+m[l++],t.skewY=e.skewY+m[l++])}let x={},y={};for(_+=h[1];o<_;o++){let t=s[o];x[t.name]=m[l++],y[t.name]=m[l++],l+=4}let f={},M={};for(_+=h[2];o<_;o++){let t=s[o];f[t.name]=m[l++],M[t.name]=m[l++],l+=4}if(this._pathDic)for(_+=h[3];o<_;o++){let t=s[o],i=this._pathDic[t.name];if(i){switch(new e.Byte(t.extenData).readByte()){case 1:i.position=m[l++];break;case 2:i.spacing=m[l++];break;case 3:i.rotateMix=m[l++],i.translateMix=m[l++]}}}if(this._rootBone.update(this._yReverseMatrix||e.Matrix.TEMP.identity()),this._ikArr){let t;for(o=0,_=this._ikArr.length;o<_;o++)t=this._ikArr[o],t.name in f&&(t.bendDirection=f[t.name]),t.name in M&&(t.mix=M[t.name]),t.apply()}if(this._pathDic)for(let t in this._pathDic){this._pathDic[t].apply(this._boneList,r)}if(this._tfArr)for(o=0,p=this._tfArr.length;o<p;o++){this._tfArr[o].apply()}for(o=0,p=this._boneList.length;o<p;o++){let t=this._boneList[o],e=this._bindBoneBoneSlotDic[t.name];if(t.resultMatrix.copyTo(this._boneMatrixArray[o]),e)for(d=0,_=e.length;d<_;d++){let i=e[d];i&&i.setParentMatrix(t.resultMatrix)}}let g={},D=this._templet.deformAniArr;if(D&&D.length>0){if(this._lastAniClipIndex!=this._aniClipIndex)for(this._lastAniClipIndex=this._aniClipIndex,o=0,_=this._boneSlotArray.length;o<_;o++){this._boneSlotArray[o].deformData=null}let t,e=D[this._aniClipIndex],a=e.default;for(t in this._setDeform(a,g,this._boneSlotArray,i),e)"default"!=t&&t!=this._skinName&&(a=e[t],this._setDeform(a,g,this._boneSlotArray,i));a=e[this._skinName],this._setDeform(a,g,this._boneSlotArray,i)}if(this._drawOrder)for(o=0,_=this._drawOrder.length;o<_;o++){let t=this._boneSlotArray[this._drawOrder[o]],e=x[t.name],i=y[t.name];if(isNaN(e)||-2==e||(this._templet.attachmentNames?t.showDisplayByName(this._templet.attachmentNames[e]):t.showDisplayByIndex(e)),g[this._drawOrder[o]]){let e=g[this._drawOrder[o]];t.currDisplayData&&e[t.currDisplayData.attachmentName]?t.deformData=e[t.currDisplayData.attachmentName]:t.deformData=null}else t.deformData=null;isNaN(i)?t.draw(r,this._boneMatrixArray,2==this._aniMode):t.draw(r,this._boneMatrixArray,2==this._aniMode,i)}else for(o=0,_=this._boneSlotArray.length;o<_;o++){let t=this._boneSlotArray[o],e=x[t.name],i=y[t.name];if(isNaN(e)||-2==e||(this._templet.attachmentNames?t.showDisplayByName(this._templet.attachmentNames[e]):t.showDisplayByIndex(e)),g[o]){let e=g[o];t.currDisplayData&&e[t.currDisplayData.attachmentName]?t.deformData=e[t.currDisplayData.attachmentName]:t.deformData=null}else t.deformData=null;isNaN(i)?t.draw(r,this._boneMatrixArray,2==this._aniMode):t.draw(r,this._boneMatrixArray,2==this._aniMode,i)}return 0==this._aniMode?(this._templet.setGrahicsDataWithCache(this._aniClipIndex,t,r),this._checkIsAllParsed(this._aniClipIndex)):1==this._aniMode&&this._setGrahicsDataWithCache(this._aniClipIndex,t,r),r}_checkIsAllParsed(t){let e=Math.floor(.01+this._templet.getAniDuration(t)/1e3*this._player.cacheFrameRate);for(let i=0;i<e;i++)if(!this._templet.getGrahicsDataWithCache(t,i))return;this._templet.getGrahicsDataWithCache(t,e)?this._templet.deleteAniData(t):this._createGraphics(e)}_setDeform(t,e,i,a){if(!t)return;let r,s,n;if(t)for(let h=0,l=t.deformSlotDataList.length;h<l;h++){r=t.deformSlotDataList[h];for(let t=0;t<r.deformSlotDisplayList.length;t++)s=r.deformSlotDisplayList[t],n=i[s.slotIndex],s.apply(a,n),e[s.slotIndex]||(e[s.slotIndex]={}),e[s.slotIndex][s.attachment]=s.deformData}}getAnimNum(){return this._templet.getAnimationCount()}getAniNameByIndex(t){return this._templet.getAniNameByIndex(t)}getSlotByName(t){return this._boneSlotDic[t]}showSkinByName(t,e=!0){this.showSkinByIndex(this._templet.getSkinIndexByName(t),e)}showSkinByIndex(t,e=!0){for(let t=0;t<this._boneSlotArray.length;t++)this._boneSlotArray[t].showSlotData(null,e);if(this._templet.showSkinByIndex(this._boneSlotDic,t,e)){let e=this._templet.skinDataArray[t];this._skinName=e.name}this._clearCache()}showSlotSkinByIndex(t,e){if(0==this._aniMode)return;let i=this.getSlotByName(t);i&&i.showDisplayByIndex(e),this._clearCache()}showSlotSkinByName(t,e){if(0==this._aniMode)return;let i=this.getSlotByName(t);i&&i.showDisplayByName(e),this._clearCache()}replaceSlotSkinName(t,e,i){if(0==this._aniMode)return;let a=this.getSlotByName(t);a&&a.replaceDisplayByName(e,i),this._clearCache()}replaceSlotSkinByIndex(t,e,i){if(0==this._aniMode)return;let a=this.getSlotByName(t);a&&a.replaceDisplayByIndex(e,i),this._clearCache()}setSlotSkin(t,e){if(0==this._aniMode)return;let i=this.getSlotByName(t);i&&i.replaceSkin(e),this._clearCache()}_clearCache(){if(1==this._aniMode)for(let e=0,i=this._graphicsCache.length;e<i;e++){for(let i=0,a=this._graphicsCache[e].length;i<a;i++){var t=this._graphicsCache[e][i];t&&t!=this.graphics&&(t.needCache=!1,u.recycle(t))}this._graphicsCache[e]=[]}}play(t,e,i=!0,a=0,r=0,s=!0,n=!0){this._playAudio=n,this._indexControl=!1;let h=-1;var l;if(l=e?2147483647:0,"string"==typeof t)for(let e=0,i=this._templet.getAnimationCount();e<i;e++){let i=this._templet.getAnimation(e);if(i&&t==i.name){h=e;break}}else h=t;h>-1&&h<this.getAnimNum()&&(this._aniClipIndex=h,(i||this._pause||this._currAniIndex!=h)&&(this._currAniIndex=h,this._curOriginalData=new Float32Array(this._templet.getTotalkeyframesLength(h)),this._drawOrder=null,this._eventIndex=0,this._player.play(h,this._player.playbackRate,l,a,r),s&&this._templet.showSkinByIndex(this._boneSlotDic,this._skinIndex),this._pause&&(this._pause=!1,this._lastTime=performance.now(),this.timer.frameLoop(1,this,this._update,null,!0)),this._update()))}stop(){this._pause||(this._pause=!0,this._player&&this._player.stop(!0),this._soundChannelArr.length>0&&this._onAniSoundStoped(!0),this.timer.clear(this,this._update))}playbackRate(t){this._player&&(this._player.playbackRate=t)}paused(){if(!this._pause){if(this._pause=!0,this._player&&(this._player.paused=!0),this._soundChannelArr.length>0)for(let t=this._soundChannelArr.length,e=0;e<t;e++){let t=this._soundChannelArr[e];t.isStopped||t.pause()}this.timer.clear(this,this._update)}}resume(){if(this._indexControl=!1,this._pause){if(this._pause=!1,this._player&&(this._player.paused=!1),this._soundChannelArr.length>0)for(let t=this._soundChannelArr.length,e=0;e<t;e++){let t=this._soundChannelArr[e];t.audioBuffer&&t.resume()}this._lastTime=performance.now(),this.timer.frameLoop(1,this,this._update,null,!0)}}_getGrahicsDataWithCache(t,e){return this._graphicsCache[t][e]}_setGrahicsDataWithCache(t,e,i){this._graphicsCache[t][e]=i}reset(){this._templet._removeReference(),this._templet=null,this._player.offAll(),this._player=null,this._curOriginalData=null,this._boneMatrixArray.length=0,this._ikArr=null,this._pathDic=null,this._tfArr=null,this._lastTime=0,this._currAniIndex=-1,this._clipIndex=-1,this._indexControl=!1,this._eventIndex=0,this._drawOrderIndex=0,this._drawOrder=null,this._lastAniClipIndex=-1,this._lastUpdateAniClipIndex=-1,this._pause=!0,this.timer.clear(this,this._update),this._soundChannelArr.length>0&&this._onAniSoundStoped(!0)}destroy(t=!0){super.destroy(t),this._templet&&this.reset()}}i.Skeleton=y;class f{constructor(){this.skX=0,this.skY=0,this.scX=1,this.scY=1,this.x=0,this.y=0,this.skewX=0,this.skewY=0}initData(t){null!=t.x&&(this.x=t.x),null!=t.y&&(this.y=t.y),null!=t.skX&&(this.skX=t.skX),null!=t.skY&&(this.skY=t.skY),null!=t.scX&&(this.scX=t.scX),null!=t.scY&&(this.scY=t.scY)}getMatrix(){var t;return(t=this.mMatrix?this.mMatrix:this.mMatrix=new e.Matrix).identity(),t.scale(this.scX,this.scY),(this.skewX||this.skewY)&&this.skew(t,this.skewX*Math.PI/180,this.skewY*Math.PI/180),t.rotate(this.skX*Math.PI/180),t.translate(this.x,this.y),t}skew(t,e,i){var a=Math.sin(i),r=Math.cos(i),s=Math.sin(e),n=Math.cos(e);return t.setTo(t.a*n-t.b*a,t.a*s+t.b*r,t.c*n-t.d*a,t.c*s+t.d*r,t.tx*n-t.ty*a,t.tx*s+t.ty*r),t}}class M{constructor(){this.length=10,this.resultTransform=new f,this.resultMatrix=new e.Matrix,this.inheritScale=!0,this.inheritRotation=!0,this.d=-1,this._children=[]}setTempMatrix(t){this._tempMatrix=t;var e,i=0;for(i=0,e=this._children.length;i<e;i++)this._children[i].setTempMatrix(this._tempMatrix)}update(t=null){var i;if(this.rotation=this.transform.skX,t)i=this.resultTransform.getMatrix(),e.Matrix.mul(i,t,this.resultMatrix),this.resultRotation=this.rotation;else if(this.resultRotation=this.rotation+this.parentBone.resultRotation,this.parentBone)if(this.inheritRotation&&this.inheritScale)i=this.resultTransform.getMatrix(),e.Matrix.mul(i,this.parentBone.resultMatrix,this.resultMatrix);else{var a,r,s,n=this.parentBone,h=this.parentBone.resultMatrix;i=this.resultTransform.getMatrix();var l=h.a*i.tx+h.c*i.ty+h.tx,o=h.b*i.tx+h.d*i.ty+h.ty,d=new e.Matrix;this.inheritRotation?(a=Math.atan2(n.resultMatrix.b,n.resultMatrix.a),r=Math.cos(a),s=Math.sin(a),d.setTo(r,s,-s,r,0,0),e.Matrix.mul(this._tempMatrix,d,e.Matrix.TEMP),e.Matrix.TEMP.copyTo(d),i=this.resultTransform.getMatrix(),e.Matrix.mul(i,d,this.resultMatrix),this.resultTransform.scX*this.resultTransform.scY<0&&this.resultMatrix.rotate(.5*Math.PI),this.resultMatrix.tx=l,this.resultMatrix.ty=o):(this.inheritScale,i=this.resultTransform.getMatrix(),e.Matrix.TEMP.identity(),e.Matrix.TEMP.d=this.d,e.Matrix.mul(i,e.Matrix.TEMP,this.resultMatrix),this.resultMatrix.tx=l,this.resultMatrix.ty=o)}else(i=this.resultTransform.getMatrix()).copyTo(this.resultMatrix);var u,p=0;for(p=0,u=this._children.length;p<u;p++)this._children[p].update()}updateChild(){var t,e=0;for(e=0,t=this._children.length;e<t;e++)this._children[e].update()}setRotation(t){this._sprite&&(this._sprite.rotation=180*t/Math.PI)}updateDraw(t,i){M.ShowBones&&!M.ShowBones[this.name]||(this._sprite?(this._sprite.x=t+this.resultMatrix.tx,this._sprite.y=i+this.resultMatrix.ty):(this._sprite=new e.Sprite,this._sprite.graphics.drawCircle(0,0,5,"#ff0000"),this._sprite.graphics.drawLine(0,0,this.length,0,"#00ff00"),this._sprite.graphics.fillText(this.name,0,0,"20px Arial","#00ff00","center"),e.ILaya.stage.addChild(this._sprite),this._sprite.x=t+this.resultMatrix.tx,this._sprite.y=i+this.resultMatrix.ty));var a,r=0;for(r=0,a=this._children.length;r<a;r++)this._children[r].updateDraw(t,i)}addChild(t){this._children.push(t),t.parentBone=this}findBone(t){if(this.name==t)return this;var e,i,a;for(e=0,i=this._children.length;e<i;e++)if(a=this._children[e].findBone(t))return a;return null}localToWorld(t){var e=t[0],i=t[1];t[0]=e*this.resultMatrix.a+i*this.resultMatrix.c+this.resultMatrix.tx,t[1]=e*this.resultMatrix.b+i*this.resultMatrix.d+this.resultMatrix.ty}}M.ShowBones={};class g{constructor(){this.boneIndexs=[]}}class D{constructor(){this.bones=[]}}class v{constructor(){this.deformSlotDataList=[]}}class I{constructor(){this.deformSlotDisplayList=[]}}class A{constructor(){this.slotIndex=-1,this.timeList=[],this.vectices=[],this.tweenKeyList=[],this.frameIndex=0}binarySearch1(t,e){var i=0,a=t.length-2;if(0==a)return 1;for(var r=a>>>1;;){if(t[Math.floor(r+1)]<=e?i=r+1:a=r,i==a)return i+1;r=i+a>>>1}return 0}apply(t,e,i=1){if(t+=.05,!(this.timeList.length<=0)){var a=0;if(!(t<this.timeList[0])){var r=this.vectices[0].length,s=[],n=this.binarySearch1(this.timeList,t);if(this.frameIndex=n,t>=this.timeList[this.timeList.length-1]){var h=this.vectices[this.vectices.length-1];if(i<1)for(a=0;a<r;a++)s[a]+=(h[a]-s[a])*i;else for(a=0;a<r;a++)s[a]=h[a];this.deformData=s}else{var l,o=this.vectices[this.frameIndex-1],d=this.vectices[this.frameIndex],u=this.timeList[this.frameIndex-1],p=this.timeList[this.frameIndex];for(i=this.tweenKeyList[n-1]?(t-u)/(p-u):0,a=0;a<r;a++)l=o[a],s[a]=l+(d[a]-l)*i;this.deformData=s}}}}}class S{constructor(){this.drawOrder=[]}}class b{constructor(){}}class T{constructor(){}static getRelativeUV(t,e,i=null){var a,r,s=t[0],n=t[2]-t[0],h=t[1],l=t[5]-t[1];i||(i=[]),i.length=e.length,r=i.length;var o=1/n,d=1/l;for(a=0;a<r;a+=2)i[a]=(e[a]-s)*o,i[a+1]=(e[a+1]-h)*d;return i}static getAbsoluteUV(t,i,a=null){if(0==t[0]&&0==t[1]&&1==t[4]&&1==t[5])return a?(e.Utils.copyArray(a,i),a):i;var r,s,n=t[0],h=t[2]-t[0],l=t[1],o=t[5]-t[1];for(a||(a=[]),a.length=i.length,s=a.length,r=0;r<s;r+=2)a[r]=i[r]*h+n,a[r+1]=i[r+1]*o+l;return a}}class F{constructor(){this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertices=new Float32Array([0,0,100,0,100,100,0,100]),this.indexes=new Uint16Array([0,1,3,3,1,2]),this.useUvTransform=!1,this.canvasPadding=1}getBounds(){return e.Rectangle._getWrapRec(this.vertices)}}class w extends F{constructor(){super()}init2(t,e,i,a){this.transform&&(this.transform=null);var r=e||[0,1,3,3,1,2];this.texture=t,this.indexes=new Uint16Array(r),this.vertices=new Float32Array(i),this.uvs=new Float32Array(a)}}class C{constructor(){this.srcDisplayIndex=-1,this.type="src",this.displayIndex=-1,this.originalIndex=-1,this._replaceDic={}}showSlotData(t,e=!0){this.currSlotData=t,e&&(this.displayIndex=this.srcDisplayIndex),this.currDisplayData=null,this.currTexture=null}showDisplayByName(t){this.currSlotData&&this.showDisplayByIndex(this.currSlotData.getDisplayByName(t))}replaceDisplayByName(t,e){var i,a;this.currSlotData&&(i=this.currSlotData.getDisplayByName(t),a=this.currSlotData.getDisplayByName(e),this.replaceDisplayByIndex(i,a))}replaceDisplayByIndex(t,e){this.currSlotData&&(this._replaceDic[t]=e,this.originalIndex==t&&this.showDisplayByIndex(t))}showDisplayByIndex(t){if(this.originalIndex=t,null!=this._replaceDic[t]&&(t=this._replaceDic[t]),this.currSlotData&&t>-1&&t<this.currSlotData.displayArr.length){if(this.displayIndex=t,this.currDisplayData=this.currSlotData.displayArr[t],this.currDisplayData){var e=this.currDisplayData.name;this.currTexture=this.templet.getTexture(e),this.currTexture&&0==this.currDisplayData.type&&this.currDisplayData.uvs&&(this.currTexture=this.currDisplayData.createTexture(this.currTexture))}}else this.displayIndex=-1,this.currDisplayData=null,this.currTexture=null}replaceSkin(t){this._diyTexture=t,this._curDiyUV&&(this._curDiyUV.length=0),this.currDisplayData&&this._diyTexture==this.currDisplayData.texture&&(this._diyTexture=null)}setParentMatrix(t){this._parentMatrix=t}static createSkinMesh(){return new w}static isSameArr(t,e){if(t.length!=e.length)return!1;var i,a;for(a=t.length,i=0;i<a;i++)if(t[i]!=e[i])return!1;return!0}getSaveVerticle(t){return C.useSameMatrixAndVerticle&&this._preGraphicVerticle&&C.isSameArr(t,this._preGraphicVerticle)?t=this._preGraphicVerticle:(t=e.Utils.copyArray([],t),this._preGraphicVerticle=t),t}static isSameMatrix(t,e){return t.a==e.a&&t.b==e.b&&t.c==e.c&&t.d==e.d&&Math.abs(t.tx-e.tx)<1e-5&&Math.abs(t.ty-e.ty)<1e-5}getSaveMatrix(t){if(C.useSameMatrixAndVerticle&&this._preGraphicMatrix&&C.isSameMatrix(t,this._preGraphicMatrix))t=this._preGraphicMatrix;else{var e=t.clone();t=e,this._preGraphicMatrix=t}return t}draw(t,i,a=!1,r=1){if((null!=this._diyTexture||null!=this.currTexture)&&null!=this.currDisplayData||this.currDisplayData&&3==this.currDisplayData.type){var s,n=this.currTexture;switch(this._diyTexture&&(n=this._diyTexture),this.currDisplayData.type){case 0:if(t){var h=this.getDisplayMatrix();if(this._parentMatrix){var l,o=!1;if(h)e.Matrix.mul(h,this._parentMatrix,e.Matrix.TEMP),a?(null==this._resultMatrix&&(this._resultMatrix=new e.Matrix),l=this._resultMatrix):l=C._tempResultMatrix,this._diyTexture&&this.currDisplayData.uvs?(U.identity(),this.currDisplayData.uvs[1]>this.currDisplayData.uvs[5]&&(U.d=-1),this.currDisplayData.uvs[0]>this.currDisplayData.uvs[4]&&this.currDisplayData.uvs[1]>this.currDisplayData.uvs[5]&&(o=!0,U.rotate(-Math.PI/2)),e.Matrix.mul(U,e.Matrix.TEMP,l)):e.Matrix.TEMP.copyTo(l),a||(l=this.getSaveMatrix(l)),l._checkTransform(),o?t.drawTexture(n,-this.currDisplayData.height/2,-this.currDisplayData.width/2,this.currDisplayData.height,this.currDisplayData.width,l,r):t.drawTexture(n,-this.currDisplayData.width/2,-this.currDisplayData.height/2,this.currDisplayData.width,this.currDisplayData.height,l,r)}}break;case 1:if(a?(null==this._skinSprite&&(this._skinSprite=C.createSkinMesh()),s=this._skinSprite):s=C.createSkinMesh(),null==s)return;var d;if(null==this.currDisplayData.bones){var u,p=this.currDisplayData.weights;this.deformData&&(p=this.deformData),this._diyTexture?(this._curDiyUV||(this._curDiyUV=[]),0==this._curDiyUV.length&&(this._curDiyUV=T.getRelativeUV(this.currTexture.uv,this.currDisplayData.uvs,this._curDiyUV),this._curDiyUV=T.getAbsoluteUV(this._diyTexture.uv,this._curDiyUV,this._curDiyUV)),u=this._curDiyUV):u=this.currDisplayData.uvs,this._mVerticleArr=p,this.currDisplayData.triangles.length,d=this.currDisplayData.triangles,this.deformData&&(a||(this._mVerticleArr=this.getSaveVerticle(this._mVerticleArr))),s.init2(n,d,this._mVerticleArr,u);var _,c=this.getDisplayMatrix();if(this._parentMatrix)if(c)e.Matrix.mul(c,this._parentMatrix,e.Matrix.TEMP),a?(null==this._resultMatrix&&(this._resultMatrix=new e.Matrix),_=this._resultMatrix):_=C._tempResultMatrix,e.Matrix.TEMP.copyTo(_),a||(_=this.getSaveMatrix(_)),s.transform=_}else this.skinMesh(i,s);t.drawSkin(s,r);break;case 2:if(a?(null==this._skinSprite&&(this._skinSprite=C.createSkinMesh()),s=this._skinSprite):s=C.createSkinMesh(),null==s)return;this.skinMesh(i,s),t.drawSkin(s,r)}}}skinMesh(t,e){var i,a=this.currTexture,r=this.currDisplayData.bones;this._diyTexture?(a=this._diyTexture,this._curDiyUV||(this._curDiyUV=[]),0==this._curDiyUV.length&&(this._curDiyUV=T.getRelativeUV(this.currTexture.uv,this.currDisplayData.uvs,this._curDiyUV),this._curDiyUV=T.getAbsoluteUV(this._diyTexture.uv,this._curDiyUV,this._curDiyUV)),i=this._curDiyUV):i=this.currDisplayData.uvs;var s,n,h,l,o,d=this.currDisplayData.weights,u=this.currDisplayData.triangles,p=0,_=0,c=0,m=0,x=0,y=0,f=0;if(k.length=0,o=k,this.deformData&&this.deformData.length>0){var M=0;for(y=0,f=r.length;y<f;){for(c=r[y++]+y,p=0,_=0;y<c;y++)n=t[r[y]],h=d[m]+this.deformData[M++],l=d[m+1]+this.deformData[M++],x=d[m+2],p+=(h*n.a+l*n.c+n.tx)*x,_+=(h*n.b+l*n.d+n.ty)*x,m+=3;o.push(p,_)}}else for(y=0,f=r.length;y<f;){for(c=r[y++]+y,p=0,_=0;y<c;y++)n=t[r[y]],h=d[m],l=d[m+1],x=d[m+2],p+=(h*n.a+l*n.c+n.tx)*x,_+=(h*n.b+l*n.d+n.ty)*x,m+=3;o.push(p,_)}this._mVerticleArr=o,s=u,this._mVerticleArr=this.getSaveVerticle(this._mVerticleArr),e.init2(a,s,this._mVerticleArr,i)}drawBonePoint(t){t&&this._parentMatrix&&t.drawCircle(this._parentMatrix.tx,this._parentMatrix.ty,5,"#ff0000")}getDisplayMatrix(){return this.currDisplayData?this.currDisplayData.transform.getMatrix():null}getMatrix(){return this._resultMatrix}copy(){var t=new C;return t.type="copy",t.name=this.name,t.attachmentName=this.attachmentName,t.srcDisplayIndex=this.srcDisplayIndex,t.parent=this.parent,t.displayIndex=this.displayIndex,t.templet=this.templet,t.currSlotData=this.currSlotData,t.currTexture=this.currTexture,t.currDisplayData=this.currDisplayData,t}}C._tempResultMatrix=new e.Matrix,C.useSameMatrixAndVerticle=!0;const k=[],U=new e.Matrix;class P{constructor(){this.slotArr=[]}}class B{createTexture(t){return this.texture||(this.texture=new e.Texture(t.bitmap,this.uvs),this.uvs[0]>this.uvs[4]&&this.uvs[1]>this.uvs[5]?(this.texture.width=t.height,this.texture.height=t.width,this.texture.offsetX=-t.offsetX,this.texture.offsetY=-t.offsetY,this.texture.sourceWidth=t.sourceHeight,this.texture.sourceHeight=t.sourceWidth):(this.texture.width=t.width,this.texture.height=t.height,this.texture.offsetX=-t.offsetX,this.texture.offsetY=-t.offsetY,this.texture.sourceWidth=t.sourceWidth,this.texture.sourceHeight=t.sourceHeight)),this.texture}destory(){this.texture&&this.texture.destroy()}}class L{constructor(){this.displayArr=[]}getDisplayByName(t){for(var e=0,i=this.displayArr.length;e<i;e++)if(this.displayArr[e].attachmentName==t)return e;return-1}}class E{constructor(){this.boneNames=[],this.bendDirection=1,this.mix=1,this.isSpine=!0,this.targetBoneIndex=-1,this.boneIndexs=[]}}const N="LAYAANIMATION:1.7.0";class R extends d{constructor(){super(...arguments),this.rate=30,this._graphicsCache=[],this.srcBoneMatrixArr=[],this.ikArr=[],this.tfArr=[],this.pathArr=[],this.boneSlotDic={},this.bindBoneBoneSlotDic={},this.boneSlotArray=[],this.skinDataArray=[],this.skinDic={},this.subTextureDic={},this.isParseFail=!1,this.drawOrderAniArr=[],this.eventAniArr=[],this.attachmentNames=null,this.deformAniArr=[],this.skinSlotDisplayDataArr=[],this._isParseAudio=!1,this.aniSectionDic={},this.mBoneArr=[]}buildArmature(t=0){let e=new y(t);return e.templet=this,e}_parse(t,i,a){this._path=i.slice(0,i.lastIndexOf("/"))+"/",t._addReference(),this._mainTexture=t;var r=new e.Byte(a);this._aniVersion=r.readUTFString(),n.parse(this,r),this._aniVersion===N?this._isParseAudio=!0:"LAYAANIMATION:1.6.0"!=this._aniVersion&&console.log("[Error] 版本不一致,请使用IDE版本配套的重新导出"+this._aniVersion+"->"+N);for(let t=0,e=this.getAnimationCount();t<e;t++)this._graphicsCache.push([]);var s,h=new e.Byte(this.getPublicExtData()),l=0,o=0,d=0,u=0,p=0,_=0,c=0,m=0,x=0,y=h.readInt32(),T=h.readUTFString(),F=T.split("\n");for(let t=0;t<y;t++)this._path,F[2*t],T=F[2*t+1],l=h.readFloat32(),o=h.readFloat32(),d=h.readFloat32(),u=h.readFloat32(),x=h.readFloat32(),p=isNaN(x)?0:x,x=h.readFloat32(),_=isNaN(x)?0:x,x=h.readFloat32(),c=isNaN(x)?d:x,x=h.readFloat32(),m=isNaN(x)?u:x,this.subTextureDic[T]=e.Texture.create(this._mainTexture,l,o,d,u,-p,-_,c,m);s="Dragon"!=this._aniClassName;var w,k,U,R,V,O=h.readUint16();for(let t=0;t<O;t++)(w=[]).push(h.readUint16()),w.push(h.readUint16()),w.push(h.readUint16()),w.push(h.readUint16()),this.aniSectionDic[t]=w;var K,Y=h.readInt16(),X={};for(let t=0;t<Y;t++)k=new M,0==t?K=k:k.root=K,k.d=s?-1:1,R=h.readUTFString(),V=h.readUTFString(),k.length=h.readFloat32(),1==h.readByte()&&(k.inheritRotation=!1),1==h.readByte()&&(k.inheritScale=!1),k.name=R,V&&((U=X[V])?U.addChild(k):this.mRootBone=k),X[R]=k,this.mBoneArr.push(k);this.tMatrixDataLen=h.readUint16();var W,G,q=h.readUint16(),z=Math.floor(q/this.tMatrixDataLen),H=this.srcBoneMatrixArr;for(let t=0;t<z;t++)(W=new f).scX=h.readFloat32(),W.skX=h.readFloat32(),W.skY=h.readFloat32(),W.scY=h.readFloat32(),W.x=h.readFloat32(),W.y=h.readFloat32(),8===this.tMatrixDataLen&&(W.skewX=h.readFloat32(),W.skewY=h.readFloat32()),H.push(W),(k=this.mBoneArr[t]).transform=W;var Q,Z,j=h.readUint16();for(let t=0;t<j;t++){G=new E,Q=h.readUint16();for(let t=0;t<Q;t++)G.boneNames.push(h.readUTFString()),G.boneIndexs.push(h.readInt16());G.name=h.readUTFString(),G.targetBoneName=h.readUTFString(),G.targetBoneIndex=h.readInt16(),G.bendDirection=h.readFloat32(),G.mix=h.readFloat32(),G.isSpine=s,this.ikArr.push(G)}var J,$,tt=h.readUint16();for(let t=0;t<tt;t++){Z=new g,J=h.readUint16();for(let t=0;t<J;t++)Z.boneIndexs.push(h.readInt16());Z.name=h.readUTFString(),Z.targetIndex=h.readInt16(),Z.rotateMix=h.readFloat32(),Z.translateMix=h.readFloat32(),Z.scaleMix=h.readFloat32(),Z.shearMix=h.readFloat32(),Z.offsetRotation=h.readFloat32(),Z.offsetX=h.readFloat32(),Z.offsetY=h.readFloat32(),Z.offsetScaleX=h.readFloat32(),Z.offsetScaleY=h.readFloat32(),Z.offsetShearY=h.readFloat32(),this.tfArr.push(Z)}var et,it,at,rt,st,nt,ht,lt,ot,dt,ut=h.readUint16();for(let t=0;t<ut;t++){($=new D).name=h.readUTFString(),et=h.readUint16();for(let t=0;t<et;t++)$.bones.push(h.readInt16());$.target=h.readUTFString(),$.positionMode=h.readUTFString(),$.spacingMode=h.readUTFString(),$.rotateMode=h.readUTFString(),$.offsetRotation=h.readFloat32(),$.position=h.readFloat32(),$.spacing=h.readFloat32(),$.rotateMix=h.readFloat32(),$.translateMix=h.readFloat32(),this.pathArr.push($)}var pt,_t=h.readInt16();for(let t=0;t<_t;t++){var ct=h.readUint8(),mt={};this.deformAniArr.push(mt);for(let t=0;t<ct;t++){(ht=new v).skinName=h.readUTFString(),mt[ht.skinName]=ht,it=h.readInt16();for(let t=0;t<it;t++){lt=new I,ht.deformSlotDataList.push(lt),at=h.readInt16();for(let t=0;t<at;t++){ot=new A,lt.deformSlotDisplayList.push(ot),ot.slotIndex=h.readInt16(),ot.attachment=h.readUTFString(),rt=h.readInt16();for(let t=0;t<rt;t++){1==h.readByte()?ot.tweenKeyList.push(!0):ot.tweenKeyList.push(!1),st=h.readFloat32(),ot.timeList.push(st),dt=[],ot.vectices.push(dt),nt=h.readInt16();for(let t=0;t<nt;t++)dt.push(h.readFloat32())}}}}}var xt,yt,ft,Mt,gt=h.readInt16();for(let t=0;t<gt;t++){xt=h.readInt16(),pt=[];for(let t=0;t<xt;t++){(yt=new S).time=h.readFloat32(),ft=h.readInt16();for(let t=0;t<ft;t++)yt.drawOrder.push(h.readInt16());pt.push(yt)}this.drawOrderAniArr.push(pt)}var Dt,vt,It=h.readInt16();for(let t=0;t<It;t++){Dt=h.readInt16(),Mt=[];for(let t=0;t<Dt;t++)(vt=new b).name=h.readUTFString(),this._isParseAudio&&(vt.audioValue=h.readUTFString()),vt.intValue=h.readInt32(),vt.floatValue=h.readFloat32(),vt.stringValue=h.readUTFString(),vt.time=h.readFloat32(),Mt.push(vt);this.eventAniArr.push(Mt)}var At=h.readInt16();if(At>0){this.attachmentNames=[];for(let t=0;t<At;t++)this.attachmentNames.push(h.readUTFString())}var St,bt,Tt=h.readInt16();for(let t=0;t<Tt;t++)(St=new C).name=h.readUTFString(),St.parent=h.readUTFString(),St.attachmentName=h.readUTFString(),St.srcDisplayIndex=St.displayIndex=h.readInt16(),St.templet=this,this.boneSlotDic[St.name]=St,null==(bt=this.bindBoneBoneSlotDic[St.parent])&&(this.bindBoneBoneSlotDic[St.parent]=bt=[]),bt.push(St),this.boneSlotArray.push(St);var Ft,wt,Ct,kt,Ut,Pt,Bt,Lt,Et,Nt,Rt=h.readUTFString().split("\n"),Vt=0,Ot=h.readUint8();for(let t=0;t<Ot;t++){(Ft=new P).name=Rt[Vt++],kt=h.readUint8();for(let t=0;t<kt;t++){(wt=new L).name=Rt[Vt++],St=this.boneSlotDic[wt.name],Ut=h.readUint8();for(let t=0;t<Ut;t++){if(Ct=new B,this.skinSlotDisplayDataArr.push(Ct),Ct.name=Rt[Vt++],Ct.attachmentName=Rt[Vt++],Ct.transform=new f,Ct.transform.scX=h.readFloat32(),Ct.transform.skX=h.readFloat32(),Ct.transform.skY=h.readFloat32(),Ct.transform.scY=h.readFloat32(),Ct.transform.x=h.readFloat32(),Ct.transform.y=h.readFloat32(),wt.displayArr.push(Ct),Ct.width=h.readFloat32(),Ct.height=h.readFloat32(),Ct.type=h.readUint8(),Ct.verLen=h.readUint16(),(Y=h.readUint16())>0){Ct.bones=[];for(let t=0;t<Y;t++){let t=h.readUint16();Ct.bones.push(t)}}if((Pt=h.readUint16())>0){Ct.uvs=[];for(let t=0;t<Pt;t++)Ct.uvs.push(h.readFloat32())}if((Bt=h.readUint16())>0){Ct.weights=[];for(let t=0;t<Bt;t++)Ct.weights.push(h.readFloat32())}if((Lt=h.readUint16())>0){Ct.triangles=[];for(let t=0;t<Lt;t++)Ct.triangles.push(h.readUint16())}if((Et=h.readUint16())>0){Ct.vertices=[];for(let t=0;t<Et;t++)Ct.vertices.push(h.readFloat32())}if((Nt=h.readUint16())>0){Ct.lengths=[];for(let t=0;t<Nt;t++)Ct.lengths.push(h.readFloat32())}}Ft.slotArr.push(wt)}this.skinDic[Ft.name]=Ft,this.skinDataArray.push(Ft)}1==h.readUint8()?(this.yReverseMatrix=new e.Matrix(1,0,0,-1,0,0),K&&K.setTempMatrix(this.yReverseMatrix)):K&&K.setTempMatrix(new e.Matrix),this.showSkinByIndex(this.boneSlotDic,0)}getTexture(t){let e=this.subTextureDic[t];return e||(e=this.subTextureDic[t.substring(0,t.length-1)]),null==e?this._mainTexture:e}showSkinByIndex(t,e,i=!0){if(e<0&&e>=this.skinDataArray.length)return!1;var a,r,s,n,h=this.skinDataArray[e];if(h){for(a=0,r=h.slotArr.length;a<r;a++)(n=h.slotArr[a])&&(s=t[n.name])&&(s.showSlotData(n,i),i&&"undefined"!=s.attachmentName&&"null"!=s.attachmentName?s.showDisplayByName(s.attachmentName):s.showDisplayByIndex(s.displayIndex));return!0}return!1}getSkinIndexByName(t){for(let e=0,i=this.skinDataArray.length;e<i;e++){if(this.skinDataArray[e].name==t)return e}return-1}getAniNameByIndex(t){var e=this.getAnimation(t);return e?e.name:null}getGrahicsDataWithCache(t,e){return this._graphicsCache[t]&&this._graphicsCache[t][e]?this._graphicsCache[t][e]:null}setGrahicsDataWithCache(t,e,i){this._graphicsCache[t][e]=i}deleteAniData(t){if(this._anis[t]){var e=this._anis[t];e.bone3DMap=null,e.nodes=null}}_disposeResource(){var t;for(let e in this.subTextureDic)null===(t=this.subTextureDic[e])||void 0===t||t.destroy();this._mainTexture._removeReference();for(var e=0,i=this.skinSlotDisplayDataArr.length;e<i;e++)this.skinSlotDisplayDataArr[e].destory();this.skinSlotDisplayDataArr.length=0}}i.Templet=R;e.Loader.registerLoader(["sk"],class{load(t){return Promise.all([t.loader.fetch(t.url,"arraybuffer",t.progress.createCallback(),t.options),t.loader.load(e.Utils.replaceFileExtension(t.url,"png"),null,t.progress.createCallback())]).then(e=>{if(!e[0]||!e[1])return null;let i=new R;return i._parse(e[1],t.url,e[0]),i})}}),(0,e.ClassUtils.regClass)("Skeleton",y);class V extends e.Sprite{constructor(t=null){super(),this._start=0,this._Pos=0,this._ended=!0,this._loadedImage={},this._endFrame=-1,this.interval=30,this._ids={},this._idOfSprite=[],this._reset(),this._playing=!1,this._parentMovieClip=t,t?(this._isRoot=!1,this._movieClipList=t._movieClipList,this._movieClipList.push(this)):(this._movieClipList=[this],this._isRoot=!0,this.on(e.Event.DISPLAY,this,this._onDisplay),this.on(e.Event.UNDISPLAY,this,this._onDisplay))}destroy(t=!0){this._clear(),super.destroy(t)}_onDisplay(){this.displayedInStage?this.timer.loop(this.interval,this,this.updates,null,!0):this.timer.clear(this,this.updates)}updates(){var t,e;if(!this._parentMovieClip)for(e=this._movieClipList.length,t=0;t<e;t++)this._movieClipList[t]&&this._movieClipList[t]._update()}get index(){return this._playIndex}set index(t){this._playIndex=t,this._data&&this._displayFrame(this._playIndex),this._labels&&this._labels[t]&&this.event(e.Event.LABEL,this._labels[t])}addLabel(t,e){this._labels||(this._labels={}),this._labels[e]=t}removeLabel(t){if(t){if(!this._labels)for(var e in this._labels)if(this._labels[e]===t){delete this._labels[e];break}}else this._labels=null}get count(){return this._count}get playing(){return this._playing}_update(){if(this._data&&this._playing){if(this._playIndex++,this._playIndex>=this._count){if(!this.loop)return this._playIndex--,void this.stop();this._playIndex=0}if(this._parseFrame(this._playIndex),this._labels&&this._labels[this._playIndex]&&this.event(e.Event.LABEL,this._labels[this._playIndex]),-1!=this._endFrame&&this._endFrame==this._playIndex){if(this._endFrame=-1,null!=this._completeHandler){var t=this._completeHandler;this._completeHandler=null,t.run()}this.stop()}}}stop(){this._playing=!1}gotoAndStop(t){this.index=t,this.stop()}_clear(){if(this.stop(),this._idOfSprite.length=0,!this._parentMovieClip){var t,i;for(this.timer.clear(this,this.updates),i=this._movieClipList.length,t=0;t<i;t++)this._movieClipList[t]!=this&&this._movieClipList[t]._clear();this._movieClipList.length=0}var a;for(a in this._loadedImage){let t=this._loadedImage[a];t&&(e.ILaya.Loader.clearRes(a,t),this._loadedImage[a]=!1)}this.removeChildren(),this.graphics=null,this._parentMovieClip=null}play(t=0,e=!0){this.loop=e,this._playing=!0,this._data&&this._displayFrame(t)}_displayFrame(t=-1){-1!=t&&(this._curIndex>t&&this._reset(),this._parseFrame(t))}_reset(t=!0){t&&1!=this._curIndex&&this.removeChildren(),this._preIndex=this._curIndex=-1,this._Pos=this._start}_parseFrame(t){var i,a,r,s,n,h,l=!1,o=this._idOfSprite,d=this._data;for(this._ended&&this._reset(),d.pos=this._Pos,this._ended=!1,this._playIndex=t,this._curIndex>t&&t<this._preIndex&&(this._reset(!0),d.pos=this._Pos);this._curIndex<=t&&!this._ended;)switch(d.readUint16()){case 12:if(r=d.readUint16(),s=this._ids[d.readUint16()],this._Pos=d.pos,d.pos=s,0==(n=d.readUint8())){var u=d.readUint16();if(!(a=o[r])){a=o[r]=new e.Sprite;var p=new e.Sprite;p.loadImage(this.basePath+u+".png"),p.name=u+"",this._loadedImage[this.basePath+u+".png"]=!0,a.addChild(p),p.size(d.readFloat32(),d.readFloat32());var _=d._getMatrix();p.transform=_}a.alpha=1}else 1==n&&((i=o[r])||(o[r]=i=new V(this),i.interval=this.interval,i._ids=this._ids,i.basePath=this.basePath,i._setData(d,s),i._initState(),i.play(0)),i.alpha=1);d.pos=this._Pos;break;case 3:var c=o[d.readUint16()];c&&(this.addChild(c),c.zOrder=d.readUint16(),l=!0);break;case 4:(c=o[d.readUint16()])&&c.removeSelf();break;case 5:o[d.readUint16()][V._ValueList[d.readUint16()]]=d.readFloat32();break;case 6:o[d.readUint16()].visible=d.readUint8()>0;break;case 7:var m=(a=o[d.readUint16()]).transform||e.Matrix.create();m.setTo(d.readFloat32(),d.readFloat32(),d.readFloat32(),d.readFloat32(),d.readFloat32(),d.readFloat32()),a.transform=m;break;case 8:o[d.readUint16()].setPos(d.readFloat32(),d.readFloat32());break;case 9:o[d.readUint16()].setSize(d.readFloat32(),d.readFloat32());break;case 10:o[d.readUint16()].alpha=d.readFloat32();break;case 11:o[d.readUint16()].setScale(d.readFloat32(),d.readFloat32());break;case 98:h=d.readString(),this.event(h),"stop"==h&&this.stop();break;case 99:this._curIndex=d.readUint16(),l&&this.updateZOrder();break;case 100:this._count=this._curIndex+1,this._ended=!0,this._playing&&(this.event(e.Event.FRAME),this.event(e.Event.END),this.event(e.Event.COMPLETE)),this._reset(!1)}this._playing&&!this._ended&&this.event(e.Event.FRAME),this._Pos=d.pos}_setData(t,e){this._data=t,this._start=e+3}get source(){return this._source}set source(t){this.load(t)}load(t,i=!1,a=null){this.stop(),this._clear(),this._movieClipList=[this],this._source=t,i&&(a=a||t.split(".swf")[0]+".json"),e.ILaya.loader.load(a?[t,a]:[t],e.Loader.BUFFER).then(a=>{var r;if(!a)return void this.event(e.Event.ERROR,"file not find");let s=i?null===(r=a[1])||void 0===r?void 0:r.dir:t.split(".swf")[0]+"/image/";this._initData(new e.Byte(a[0].data),s)})}_initState(){this._reset(),this._ended=!1;var t=this._playing;for(this._playing=!1,this._curIndex=0;!this._ended;)this._parseFrame(++this._curIndex);this._playing=t}_initData(t,i){this.basePath=i;let a=t.readUint16();for(let e=0;e<a;e++)this._ids[t.readInt16()]=t.readInt32();this.interval=1e3/t.readUint16(),this._setData(t,this._ids[32767]),this._initState(),this.play(0),this.event(e.Event.READY),this._parentMovieClip||this.timer.loop(this.interval,this,this.updates,null,!0)}playTo(t,e,i=null){this._completeHandler=i,this._endFrame=e,this.play(t,!1)}}V._ValueList=["x","y","width","height","scaleX","scaleY","rotation","alpha"],t.AnimationContent=a,t.AnimationNodeContent=r,t.AnimationParser01=n,t.AnimationParser02=h,t.AnimationPlayer=o,t.AnimationState=l,t.AnimationTemplet=d,t.Bone=M,t.BoneSlot=C,t.DeformAniData=v,t.DeformSlotData=I,t.DeformSlotDisplayData=A,t.DrawOrderData=S,t.EventData=b,t.GraphicsAni=u,t.IAniLib=i,t.IkConstraint=p,t.IkConstraintData=E,t.KeyFramesContent=s,t.MeshData=F,t.MovieClip=V,t.PathConstraint=c,t.PathConstraintData=D,t.Skeleton=y,t.SkinData=P,t.SkinMeshForGraphic=w,t.SkinSlotDisplayData=B,t.SlotData=L,t.Templet=R,t.TfConstraint=x,t.TfConstraintData=g,t.Transform=f,t.UVTools=T}(window.Laya=window.Laya||{},Laya);