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.
- package/AGENTS.md +236 -0
- package/CHANGELOG.md +431 -0
- package/LICENSE +41 -0
- package/README.md +247 -2
- package/assets/branding/layaair-tribute-mark.svg +5 -0
- package/assets/branding/zhuda-layaair-mark.svg +34 -0
- package/assets/prefabs/CoinFountainVfx.lh +197 -0
- package/assets/prefabs/ConfirmActionButton.lh +87 -0
- package/assets/prefabs/LevelUpAuraVfx.lh +136 -0
- package/assets/prefabs/MineExplosionParticle.lh +352 -0
- package/assets/prefabs/NineSliceDialogFrame.lh +171 -0
- package/assets/prefabs/SwordSlashTrailVfx.lh +117 -0
- package/assets/prefabs/TacticalHudBar.lh +134 -0
- package/assets/prefabs/TelemetryDashboard.lh +87 -0
- package/assets/prefabs/UnityCrystalGuardian.lh +144 -0
- package/assets/prefabs/ZhudaSpine42Mascot.lh +183 -0
- package/assets/scenes/MinesweeperStage.ls +1180 -0
- package/dist/asset-calibration-report.json +969 -0
- package/dist/build-manifest.json +254 -0
- package/dist/sdk/zhuda-laya-csg.cjs +710 -0
- package/dist/sdk/zhuda-laya-csg.esm.js +683 -0
- package/dist/sdk/zhuda-laya-csg.min.cjs +7 -0
- package/dist/sdk/zhuda-laya-csg.min.esm.js +7 -0
- package/dist/sdk/zhuda-laya-demo.cjs +5990 -0
- package/dist/sdk/zhuda-laya-demo.esm.js +5956 -0
- package/dist/sdk/zhuda-laya-demo.min.cjs +12 -0
- package/dist/sdk/zhuda-laya-demo.min.esm.js +12 -0
- package/dist/sdk/zhuda-laya-engine.cjs +52628 -0
- package/dist/sdk/zhuda-laya-engine.esm.js +51848 -0
- package/dist/sdk/zhuda-laya-engine.min.cjs +2710 -0
- package/dist/sdk/zhuda-laya-engine.min.esm.js +2710 -0
- package/docs/3d-acceptance.md +47 -0
- package/docs/3d-integration.md +190 -0
- package/docs/README.md +112 -0
- package/docs/SUPPORT.md +21 -0
- package/docs/agent-development.md +219 -0
- package/docs/animation-control.md +213 -0
- package/docs/asset-loading.md +97 -0
- package/docs/assets/reference-games.jpg +0 -0
- package/docs/assets/solana-qr.png +0 -0
- package/docs/assets/sponsor-pass.svg +32 -0
- package/docs/audio.md +319 -0
- package/docs/backend-delivery.md +218 -0
- package/docs/basis-textures.md +94 -0
- package/docs/browser-sdk-releases.json +204 -0
- package/docs/browser-sdk.md +187 -0
- package/docs/cinematics.md +267 -0
- package/docs/cloth.md +280 -0
- package/docs/combat-runtime.md +82 -0
- package/docs/consumer-route.md +169 -0
- package/docs/consumer-tooling.md +518 -0
- package/docs/crowd-runtime.md +195 -0
- package/docs/developer-tooling.md +191 -0
- package/docs/film-scenes.md +1504 -0
- package/docs/filmic-rendering.md +743 -0
- package/docs/flythrough.md +89 -0
- package/docs/gpu-depth.md +207 -0
- package/docs/grass.md +127 -0
- package/docs/hdr-environment.md +76 -0
- package/docs/instanced-meshes.md +137 -0
- package/docs/layout-and-media.md +37 -0
- package/docs/layout-wireframe.md +80 -0
- package/docs/lighting-depth.md +185 -0
- package/docs/minigame-packaging.md +79 -0
- package/docs/model-editor.md +66 -0
- package/docs/model-lod.md +122 -0
- package/docs/model-pipeline.md +74 -0
- package/docs/model-showcase.md +365 -0
- package/docs/overview.md +183 -0
- package/docs/plans/README.md +133 -0
- package/docs/plans/TASK-TEMPLATE.md +64 -0
- package/docs/plans/TASK-spine38-isolated-topology-20261106.md +89 -0
- package/docs/plans/TEMPLATE.md +44 -0
- package/docs/plans/VERIFICATION-TEMPLATE.md +45 -0
- package/docs/plans/asset-packaging.md +140 -0
- package/docs/plans/cinematic-production/task.md +97 -0
- package/docs/plans/cinematic-production/verification.md +49 -0
- package/docs/plans/consumer-delivery-followups.md +129 -0
- package/docs/plans/desktop-and-agent-gates/hardening-task.md +85 -0
- package/docs/plans/desktop-and-agent-gates/hardening-verification.md +109 -0
- package/docs/plans/desktop-and-agent-gates/task.md +94 -0
- package/docs/plans/desktop-and-agent-gates/verification.md +60 -0
- package/docs/plans/prefab-toolchain.md +73 -0
- package/docs/plans/preview-runtime-hardening.md +68 -0
- package/docs/platform-adapters.md +113 -0
- package/docs/post-quality.md +242 -0
- package/docs/prefab-editor.md +194 -0
- package/docs/prefab-library.md +94 -0
- package/docs/prefab-workflow.md +75 -0
- package/docs/procedural-assets.md +463 -0
- package/docs/procedural-prefabs.md +133 -0
- package/docs/quality-route.md +386 -0
- package/docs/release-policy.md +79 -0
- package/docs/routes/README.md +180 -0
- package/docs/routes/TEMPLATE.md +54 -0
- package/docs/routes/action-adventure-3d-minigame.md +238 -0
- package/docs/routes/apocalypse-survival-3d.md +219 -0
- package/docs/routes/aqua-freeze-2d-minigame.md +183 -0
- package/docs/routes/astral-minimal-film-look.md +141 -0
- package/docs/routes/cascade-slot.md +93 -0
- package/docs/routes/clip-free-garments.md +229 -0
- package/docs/routes/drop-merge-2d-minigame.md +200 -0
- package/docs/routes/dungeon-line-slot.md +87 -0
- package/docs/routes/film-as-data.md +131 -0
- package/docs/routes/film-fight-that-lands.md +198 -0
- package/docs/routes/film-ink-lines.md +120 -0
- package/docs/routes/floating-island.md +229 -0
- package/docs/routes/game-2d.md +168 -0
- package/docs/routes/game-rules-first.md +89 -0
- package/docs/routes/game-to-prefabs.md +249 -0
- package/docs/routes/go-game-server.md +95 -0
- package/docs/routes/good-looking-3d-scene.md +99 -0
- package/docs/routes/high-quality-character.md +263 -0
- package/docs/routes/humanoid-from-shapes.md +97 -0
- package/docs/routes/hunting-action-3d.md +76 -0
- package/docs/routes/idle-gacha-2d.md +67 -0
- package/docs/routes/interactive-film-viewer.md +141 -0
- package/docs/routes/isometric-mystery-2d.md +217 -0
- package/docs/routes/key-art-to-animated-title.md +132 -0
- package/docs/routes/laya-ide-project-cli-web.md +125 -0
- package/docs/routes/layered-cloth-on-body.md +240 -0
- package/docs/routes/low-poly-character-from-shapes.md +475 -0
- package/docs/routes/match-three-2d.md +64 -0
- package/docs/routes/merge-2d.md +59 -0
- package/docs/routes/mini-game-build.md +80 -0
- package/docs/routes/mobile-always-landscape.md +149 -0
- package/docs/routes/mobile-web-fullscreen.md +255 -0
- package/docs/routes/model-from-dcc.md +106 -0
- package/docs/routes/new-game-project.md +100 -0
- package/docs/routes/onboarding-tutorial-2d.md +54 -0
- package/docs/routes/online-lockstep-match.md +473 -0
- package/docs/routes/outdoor-landscape.md +134 -0
- package/docs/routes/outfit-swap-3d.md +144 -0
- package/docs/routes/papercraft-diorama.md +186 -0
- package/docs/routes/platform-fighter-2d.md +235 -0
- package/docs/routes/platformer-2d.md +69 -0
- package/docs/routes/pole-rescue-arcade-3d.md +198 -0
- package/docs/routes/pose-atlas-motion.md +188 -0
- package/docs/routes/prototype-to-center.md +162 -0
- package/docs/routes/raft-brawl-3d-minigame.md +205 -0
- package/docs/routes/rhythm-2d.md +82 -0
- package/docs/routes/rigged-phone-character.md +120 -0
- package/docs/routes/screen-fit-game-box.md +127 -0
- package/docs/routes/shared-islands.md +195 -0
- package/docs/routes/side-view-duel.md +266 -0
- package/docs/routes/single-html-page.md +83 -0
- package/docs/routes/smooth-character-motion.md +162 -0
- package/docs/routes/spine-character.md +175 -0
- package/docs/routes/story-counting-2d.md +219 -0
- package/docs/routes/survivors-2d.md +60 -0
- package/docs/routes/third-person-town-3d.md +240 -0
- package/docs/routes/tower-defence-3d.md +67 -0
- package/docs/routes/ui-test-by-probe.md +219 -0
- package/docs/routes/underwater.md +138 -0
- package/docs/routes/visual-content-prefab.md +101 -0
- package/docs/runtime-hardening.md +108 -0
- package/docs/shader-warm-up.md +125 -0
- package/docs/spring-bones.md +79 -0
- package/docs/stylized-shading.md +171 -0
- package/docs/terrain-shader.md +130 -0
- package/docs/vrm.md +128 -0
- package/docs/walking.md +97 -0
- package/docs/webgpu.md +225 -0
- package/docs/white-label-themes.md +212 -0
- package/docs/zh-CN/README.md +130 -0
- package/examples/browser-sdk/2d-webgpu.html +46 -0
- package/examples/browser-sdk/2d.html +46 -0
- package/examples/browser-sdk/3d-gltf-webgpu.html +50 -0
- package/examples/browser-sdk/3d-gltf.html +50 -0
- package/examples/browser-sdk/3d-webgpu.html +46 -0
- package/examples/browser-sdk/3d.html +46 -0
- package/examples/cinematic-capture/Main.ts +294 -0
- package/examples/cinematic-capture/README.md +27 -0
- package/examples/model-inspector/README.md +15 -0
- package/examples/model-inspector/asset.gltf +158 -0
- package/examples/windows-webgpu/README.md +57 -0
- package/examples/windows-webgpu/bundle.mjs +122 -0
- package/examples/windows-webgpu/main.mjs +302 -0
- package/examples/windows-webgpu/package-lock.json +2353 -0
- package/examples/windows-webgpu/package.json +40 -0
- package/examples/windows-webgpu/squirrel.mjs +66 -0
- package/package.json +259 -4
- package/packages/ci-gate/export-film.mjs +347 -0
- package/packages/ci-gate/verify-sequence.mjs +285 -0
- package/packages/compiler/agent-contract.mjs +545 -0
- package/packages/compiler/ast-scanner.mjs +254 -0
- package/packages/compiler/backend-loader.mjs +62 -0
- package/packages/compiler/branding-assets.mjs +32 -0
- package/packages/compiler/branding.mjs +324 -0
- package/packages/compiler/browser-auto-example.mjs +31 -0
- package/packages/compiler/browser-model-example.mjs +53 -0
- package/packages/compiler/browser-process.mjs +344 -0
- package/packages/compiler/browser-sdk-example.mjs +50 -0
- package/packages/compiler/browser-sdk.mjs +342 -0
- package/packages/compiler/chrome-host.mjs +196 -0
- package/packages/compiler/cli.mjs +22 -0
- package/packages/compiler/compiler-runtime.mjs +41 -0
- package/packages/compiler/consumer-accept.mjs +89 -0
- package/packages/compiler/consumer-build.mjs +641 -0
- package/packages/compiler/consumer-guards.mjs +422 -0
- package/packages/compiler/consumer-publication.mjs +56 -0
- package/packages/compiler/consumer-scripts.mjs +134 -0
- package/packages/compiler/consumer-starter-2d.mjs +54 -0
- package/packages/compiler/consumer-starter-minigame.mjs +30 -0
- package/packages/compiler/editor-http.mjs +210 -0
- package/packages/compiler/editor-request.ts +12 -0
- package/packages/compiler/film-host-client.ts +249 -0
- package/packages/compiler/flythrough-file.mjs +144 -0
- package/packages/compiler/json-locate.mjs +85 -0
- package/packages/compiler/layout-contract.mjs +472 -0
- package/packages/compiler/minigame-bootstrap.mjs +24 -0
- package/packages/compiler/minigame-bridge.mjs +66 -0
- package/packages/compiler/minigame-guards.mjs +107 -0
- package/packages/compiler/minigame-toolchain.mjs +241 -0
- package/packages/compiler/model-crown.mjs +173 -0
- package/packages/compiler/model-editor-client.ts +809 -0
- package/packages/compiler/model-editor.mjs +242 -0
- package/packages/compiler/model-lod.mjs +547 -0
- package/packages/compiler/prefab-check.mjs +288 -0
- package/packages/compiler/prefab-checks.mjs +74 -0
- package/packages/compiler/prefab-dependencies.mjs +102 -0
- package/packages/compiler/prefab-editor-client.ts +950 -0
- package/packages/compiler/prefab-editor-preview.ts +89 -0
- package/packages/compiler/prefab-editor-server.mjs +585 -0
- package/packages/compiler/prefab-editor.mjs +43 -0
- package/packages/compiler/prefab-environment.mjs +107 -0
- package/packages/compiler/prefab-lifecycle.mjs +60 -0
- package/packages/compiler/prefab-preview.mjs +159 -0
- package/packages/compiler/prefab-watch.mjs +459 -0
- package/packages/compiler/runtime3d-types.mjs +91 -0
- package/packages/compiler/stage-probe.mjs +557 -0
- package/packages/compiler/visual-asset-audit.mjs +609 -0
- package/packages/compiler/visual-contract-audit.mjs +173 -0
- package/packages/compiler/webgpu-loader.mjs +153 -0
- package/packages/compiler/zhuda-build.mjs +714 -0
- package/packages/compiler/zhuda-doctor.mjs +186 -0
- package/packages/compiler/zhuda-init.mjs +353 -0
- package/packages/compiler/zhuda-layout.mjs +163 -0
- package/packages/compiler/zhuda-minigame.mjs +636 -0
- package/packages/core/BenchmarkEngine.ts +2 -0
- package/packages/core/BitmapFontContract.ts +159 -0
- package/packages/core/DeclarativeSDK.ts +686 -0
- package/packages/core/IframeSoundAdapter.ts +1824 -0
- package/packages/core/NoSleepAdapter.ts +302 -0
- package/packages/core/PixelCalibrationEngine.ts +602 -0
- package/packages/core/Prefab.ts +314 -0
- package/packages/core/RealmGuards.ts +111 -0
- package/packages/core/ResponsiveLayout.ts +149 -0
- package/packages/core/RuntimeGuards.ts +261 -0
- package/packages/core/SpineCharacter.ts +243 -0
- package/packages/core/SpineVisualContract.ts +238 -0
- package/packages/core/SplashSignal.ts +72 -0
- package/packages/core/StaticAssetPipeline.ts +3 -0
- package/packages/core/TopologyGraph.ts +693 -0
- package/packages/core/UnityBridgePipeline.ts +2 -0
- package/packages/core/VideoSurface.ts +75 -0
- package/packages/core/ViewportMatrixEngine.ts +237 -0
- package/packages/core/VisualFocusContract.ts +76 -0
- package/packages/core/VisualMigrationPipeline.ts +245 -0
- package/packages/core/WebViewSurface.ts +116 -0
- package/packages/core/audio/OfflineMix.ts +186 -0
- package/packages/core/audio/Spatial.ts +312 -0
- package/packages/core/audio/StreamVoice.ts +161 -0
- package/packages/core/csg/Bsp.ts +310 -0
- package/packages/core/csg/index.ts +589 -0
- package/packages/core/effects/Effect2D.ts +286 -0
- package/packages/core/effects/Effect3D.ts +213 -0
- package/packages/core/effects/EffectBudget.ts +695 -0
- package/packages/core/effects/EffectDirector.ts +254 -0
- package/packages/core/effects/EffectPresets.ts +843 -0
- package/packages/core/effects/EffectPresets2D.ts +1011 -0
- package/packages/core/effects/EffectSprites.ts +143 -0
- package/packages/core/effects/ParticleEventLink.ts +53 -0
- package/packages/core/effects/README.md +108 -0
- package/packages/core/effects/VfxMaterial.ts +253 -0
- package/packages/core/film/BakeKey.ts +21 -0
- package/packages/core/film/ColorValues.ts +44 -0
- package/packages/core/film/FilmLint.ts +353 -0
- package/packages/core/film/FilmPrefab.ts +82 -0
- package/packages/core/film/FilmReview.ts +84 -0
- package/packages/core/film/FilmScene.ts +3442 -0
- package/packages/core/film/FilmStage.ts +2148 -0
- package/packages/core/film/Flythrough.ts +169 -0
- package/packages/core/film/FlythroughReport.ts +326 -0
- package/packages/core/film/FrameMetrics.ts +167 -0
- package/packages/core/film/LiveLook.ts +242 -0
- package/packages/core/film/LookQuality.ts +94 -0
- package/packages/core/film/Projection.ts +74 -0
- package/packages/core/film/SceneLook.ts +363 -0
- package/packages/core/film/index.ts +12 -0
- package/packages/core/index.ts +48 -0
- package/packages/core/particles/EffectEnvelope.ts +52 -0
- package/packages/core/particles/LayaParticleRenderer.ts +182 -0
- package/packages/core/particles/LayaParticleRenderer3D.ts +218 -0
- package/packages/core/particles/ParticleExtras.ts +163 -0
- package/packages/core/particles/ParticleMesh3D.ts +156 -0
- package/packages/core/particles/ParticleSystem.ts +324 -0
- package/packages/core/particles/ParticleSystem3D.ts +411 -0
- package/packages/core/particles/ParticleTypes.ts +230 -0
- package/packages/core/particles/ParticleTypes3D.ts +115 -0
- package/packages/core/particles/README.md +181 -0
- package/packages/core/particles/RibbonPath3D.ts +234 -0
- package/packages/core/particles/RibbonTrail.ts +145 -0
- package/packages/core/particles/RibbonTrail3D.ts +166 -0
- package/packages/core/particles/index.ts +12 -0
- package/packages/core/prefabs/PrefabLibrary.ts +692 -0
- package/packages/core/prefabs/PrefabTree3D.ts +291 -0
- package/packages/core/prefabs/index.ts +10 -0
- package/packages/core/procedural/Geometry.ts +1871 -0
- package/packages/core/procedural/Hand.ts +1510 -0
- package/packages/core/procedural/Isosurface.ts +1035 -0
- package/packages/core/procedural/ModuleHarness.ts +180 -0
- package/packages/core/procedural/Noise.ts +123 -0
- package/packages/core/procedural/PhotoMaterial.ts +283 -0
- package/packages/core/procedural/ProceduralAssetProvider.ts +105 -0
- package/packages/core/procedural/ProceduralMaterial.ts +184 -0
- package/packages/core/procedural/PropFactory.ts +307 -0
- package/packages/core/procedural/Random.ts +70 -0
- package/packages/core/procedural/SynthAudio.ts +221 -0
- package/packages/core/procedural/TerrainMesh.ts +207 -0
- package/packages/core/procedural/TextureRecipe.ts +464 -0
- package/packages/core/procedural/TriplanarMaterial.ts +169 -0
- package/packages/core/procedural/Variation.ts +94 -0
- package/packages/core/procedural/index.ts +15 -0
- package/packages/core/runtime3d/ActionFrames.ts +245 -0
- package/packages/core/runtime3d/AnimationBlend.ts +282 -0
- package/packages/core/runtime3d/AnimationBlendMath.ts +98 -0
- package/packages/core/runtime3d/AssetProvider.ts +775 -0
- package/packages/core/runtime3d/AssetShowcase.ts +190 -0
- package/packages/core/runtime3d/Assets.ts +801 -0
- package/packages/core/runtime3d/AsyncDeadline.ts +53 -0
- package/packages/core/runtime3d/AsyncOperation.ts +39 -0
- package/packages/core/runtime3d/BackendChoice.ts +359 -0
- package/packages/core/runtime3d/BakedCrowd.ts +575 -0
- package/packages/core/runtime3d/BasisTexture.ts +657 -0
- package/packages/core/runtime3d/CameraCollision.ts +69 -0
- package/packages/core/runtime3d/CameraEffects.ts +752 -0
- package/packages/core/runtime3d/CameraRig.ts +70 -0
- package/packages/core/runtime3d/CharacterController.ts +272 -0
- package/packages/core/runtime3d/CinematicCapture.ts +457 -0
- package/packages/core/runtime3d/Clocks.ts +724 -0
- package/packages/core/runtime3d/Cloth.ts +183 -0
- package/packages/core/runtime3d/Clouds.ts +462 -0
- package/packages/core/runtime3d/ColorLut.ts +351 -0
- package/packages/core/runtime3d/CombatQueries.ts +240 -0
- package/packages/core/runtime3d/ComputePass.ts +582 -0
- package/packages/core/runtime3d/CrowdPresentation.ts +368 -0
- package/packages/core/runtime3d/DebugDraw.ts +567 -0
- package/packages/core/runtime3d/DebugStats.ts +35 -0
- package/packages/core/runtime3d/Decals.ts +309 -0
- package/packages/core/runtime3d/DensityVolume.ts +238 -0
- package/packages/core/runtime3d/DistanceBricks.ts +349 -0
- package/packages/core/runtime3d/Dither.ts +199 -0
- package/packages/core/runtime3d/DrawWarmUp.ts +217 -0
- package/packages/core/runtime3d/EdgeSmoothing.ts +108 -0
- package/packages/core/runtime3d/EnvironmentProbe.ts +656 -0
- package/packages/core/runtime3d/Filmic.ts +973 -0
- package/packages/core/runtime3d/Foliage.ts +367 -0
- package/packages/core/runtime3d/GltfIntake.ts +914 -0
- package/packages/core/runtime3d/GltfSecondUv.ts +153 -0
- package/packages/core/runtime3d/GraphicsGuard.ts +171 -0
- package/packages/core/runtime3d/Grass.ts +1080 -0
- package/packages/core/runtime3d/GroundTruthAO.ts +360 -0
- package/packages/core/runtime3d/HalfFloat.ts +44 -0
- package/packages/core/runtime3d/HdrEnvironment.ts +588 -0
- package/packages/core/runtime3d/Ik.ts +392 -0
- package/packages/core/runtime3d/InputBuffer.ts +165 -0
- package/packages/core/runtime3d/InstancedMesh.ts +460 -0
- package/packages/core/runtime3d/Laya342Adapters.ts +1095 -0
- package/packages/core/runtime3d/Laya342GltfAdapter.ts +751 -0
- package/packages/core/runtime3d/LensFinish.ts +153 -0
- package/packages/core/runtime3d/LensFlare.ts +490 -0
- package/packages/core/runtime3d/LightFog.ts +1008 -0
- package/packages/core/runtime3d/LightingDepth.ts +544 -0
- package/packages/core/runtime3d/Lightmap.ts +238 -0
- package/packages/core/runtime3d/Math3D.ts +84 -0
- package/packages/core/runtime3d/MeshQuery.ts +547 -0
- package/packages/core/runtime3d/MeshoptModelDecoder.ts +354 -0
- package/packages/core/runtime3d/MiniGameSplash.ts +70 -0
- package/packages/core/runtime3d/ModelAnimationSampler.ts +97 -0
- package/packages/core/runtime3d/ModelCompatibility.ts +890 -0
- package/packages/core/runtime3d/ModelDecoder.ts +294 -0
- package/packages/core/runtime3d/ModelInspector.ts +226 -0
- package/packages/core/runtime3d/ModelLod.ts +163 -0
- package/packages/core/runtime3d/ModelPlacements.ts +426 -0
- package/packages/core/runtime3d/ObjectMotion.ts +217 -0
- package/packages/core/runtime3d/PhysicalCamera.ts +190 -0
- package/packages/core/runtime3d/PointShadow.ts +500 -0
- package/packages/core/runtime3d/PointShadowSchedule.ts +201 -0
- package/packages/core/runtime3d/Pool.ts +120 -0
- package/packages/core/runtime3d/ProbeVolume.ts +695 -0
- package/packages/core/runtime3d/QualityGovernor.ts +385 -0
- package/packages/core/runtime3d/QualityMemory.ts +200 -0
- package/packages/core/runtime3d/RenderScale.ts +356 -0
- package/packages/core/runtime3d/RenderSpaces.ts +105 -0
- package/packages/core/runtime3d/Renderer.ts +377 -0
- package/packages/core/runtime3d/ResultPlayback.ts +239 -0
- package/packages/core/runtime3d/Runtime.ts +507 -0
- package/packages/core/runtime3d/RuntimeDriver.ts +127 -0
- package/packages/core/runtime3d/SceneLifecycle.ts +211 -0
- package/packages/core/runtime3d/SceneMutation.ts +107 -0
- package/packages/core/runtime3d/SceneQueries.ts +191 -0
- package/packages/core/runtime3d/ScreenReflections.ts +595 -0
- package/packages/core/runtime3d/SelectionOutline.ts +389 -0
- package/packages/core/runtime3d/ShaderErrors.ts +104 -0
- package/packages/core/runtime3d/ShaderRegistry.ts +34 -0
- package/packages/core/runtime3d/ShaderWarmUp.ts +473 -0
- package/packages/core/runtime3d/ShadowUpdates.ts +287 -0
- package/packages/core/runtime3d/SkinBinding.ts +235 -0
- package/packages/core/runtime3d/Smaa.ts +386 -0
- package/packages/core/runtime3d/SmaaTables.ts +244 -0
- package/packages/core/runtime3d/SpringBones.ts +184 -0
- package/packages/core/runtime3d/SurfaceBuffer.ts +76 -0
- package/packages/core/runtime3d/Surfaces.ts +1105 -0
- package/packages/core/runtime3d/Themes.ts +344 -0
- package/packages/core/runtime3d/Timeline.ts +362 -0
- package/packages/core/runtime3d/ToneCurves.ts +292 -0
- package/packages/core/runtime3d/TransformGizmo.ts +539 -0
- package/packages/core/runtime3d/TriangleMask.ts +250 -0
- package/packages/core/runtime3d/Underwater.ts +778 -0
- package/packages/core/runtime3d/Utf8.ts +87 -0
- package/packages/core/runtime3d/Vrm.ts +773 -0
- package/packages/core/runtime3d/VrmDocument.ts +1830 -0
- package/packages/core/runtime3d/WalkGrid.ts +471 -0
- package/packages/core/runtime3d/WebGPU342Adapters.ts +280 -0
- package/packages/core/runtime3d/index.ts +147 -0
- package/packages/core/shaders/Laya342ShaderTemplates.ts +6 -0
- package/packages/core/shaders/LitSurfaceMaterial.ts +1076 -0
- package/packages/core/shaders/LitSurfaceTemplates.ts +13 -0
- package/packages/core/shaders/ReflectiveSurface.ts +285 -0
- package/packages/core/shaders/ShaderMaterials.ts +387 -0
- package/packages/core/shaders/ToonMaterial.ts +559 -0
- package/packages/core/shaders/WaterRipples.ts +170 -0
- package/packages/core/shaders/WaterSurface.ts +480 -0
- package/packages/core/shaders/ZhudaCommon.ts +109 -0
- package/packages/core/shaders/index.ts +6 -0
- package/packages/core/simulation/Cloth.ts +1541 -0
- package/packages/core/simulation/ParticleCore.ts +498 -0
- package/packages/core/simulation/SpringBones.ts +553 -0
- package/packages/core/simulation/index.ts +3 -0
- package/packages/core/terrain/Heightfield.ts +385 -0
- package/packages/core/terrain/Terrain2D.ts +324 -0
- package/packages/core/terrain/Terrain3D.ts +452 -0
- package/packages/core/terrain/TerrainShell.ts +94 -0
- package/packages/core/terrain/index.ts +3 -0
- package/packages/demo/BenchmarkEngine.ts +184 -0
- package/packages/demo/PixelCalibrationEngine.ts +36 -0
- package/packages/demo/ProceduralStarter.ts +312 -0
- package/packages/demo/StaticAssetPipeline.ts +1631 -0
- package/packages/demo/UnityBridgePipeline.ts +485 -0
- package/packages/demo/index.ts +6 -0
- package/packages/mcp-server/arguments.mjs +81 -0
- package/packages/mcp-server/corpus.mjs +627 -0
- package/packages/mcp-server/film-host.mjs +627 -0
- package/packages/mcp-server/film-session.mjs +95 -0
- package/packages/mcp-server/film-tools.mjs +460 -0
- package/packages/mcp-server/index.mjs +931 -0
- package/packages/mcp-server/quality-route.mjs +332 -0
- package/packages/mcp-server/roots.mjs +72 -0
- package/packages/mcp-server/runtime.mjs +81 -0
- package/packages/types/BitmapFontContract.d.ts +19 -0
- package/packages/types/DeclarativeSDK.d.ts +137 -0
- package/packages/types/IframeSoundAdapter.d.ts +173 -0
- package/packages/types/NoSleepAdapter.d.ts +50 -0
- package/packages/types/PixelCalibrationEngine.d.ts +83 -0
- package/packages/types/Prefab.d.ts +11 -0
- package/packages/types/RealmGuards.d.ts +26 -0
- package/packages/types/ResponsiveLayout.d.ts +10 -0
- package/packages/types/RuntimeGuards.d.ts +55 -0
- package/packages/types/SpineCharacter.d.ts +94 -0
- package/packages/types/SpineVisualContract.d.ts +50 -0
- package/packages/types/SplashSignal.d.ts +27 -0
- package/packages/types/TopologyGraph.d.ts +76 -0
- package/packages/types/VideoSurface.d.ts +21 -0
- package/packages/types/ViewportMatrixEngine.d.ts +27 -0
- package/packages/types/VisualFocusContract.d.ts +32 -0
- package/packages/types/VisualMigrationPipeline.d.ts +53 -0
- package/packages/types/WebViewSurface.d.ts +26 -0
- package/packages/types/audio/OfflineMix.d.ts +10 -0
- package/packages/types/audio/Spatial.d.ts +63 -0
- package/packages/types/audio/StreamVoice.d.ts +31 -0
- package/packages/types/browser.d.ts +44 -0
- package/packages/types/csg/Bsp.d.ts +85 -0
- package/packages/types/csg/index.d.ts +81 -0
- package/packages/types/demo/BenchmarkEngine.d.ts +61 -0
- package/packages/types/demo/PixelCalibrationEngine.d.ts +13 -0
- package/packages/types/demo/ProceduralStarter.d.ts +11 -0
- package/packages/types/demo/StaticAssetPipeline.d.ts +87 -0
- package/packages/types/demo/UnityBridgePipeline.d.ts +49 -0
- package/packages/types/demo/index.d.ts +7 -0
- package/packages/types/editor-preview.d.ts +27 -0
- package/packages/types/effects/Effect2D.d.ts +65 -0
- package/packages/types/effects/Effect3D.d.ts +42 -0
- package/packages/types/effects/EffectBudget.d.ts +179 -0
- package/packages/types/effects/EffectDirector.d.ts +68 -0
- package/packages/types/effects/EffectPresets.d.ts +27 -0
- package/packages/types/effects/EffectPresets2D.d.ts +32 -0
- package/packages/types/effects/EffectSprites.d.ts +23 -0
- package/packages/types/effects/ParticleEventLink.d.ts +16 -0
- package/packages/types/effects/VfxMaterial.d.ts +52 -0
- package/packages/types/film/BakeKey.d.ts +9 -0
- package/packages/types/film/ColorValues.d.ts +25 -0
- package/packages/types/film/FilmLint.d.ts +40 -0
- package/packages/types/film/FilmPrefab.d.ts +22 -0
- package/packages/types/film/FilmReview.d.ts +27 -0
- package/packages/types/film/FilmScene.d.ts +1214 -0
- package/packages/types/film/FilmStage.d.ts +237 -0
- package/packages/types/film/Flythrough.d.ts +44 -0
- package/packages/types/film/FlythroughReport.d.ts +132 -0
- package/packages/types/film/FrameMetrics.d.ts +49 -0
- package/packages/types/film/LiveLook.d.ts +60 -0
- package/packages/types/film/LookQuality.d.ts +24 -0
- package/packages/types/film/Projection.d.ts +20 -0
- package/packages/types/film/SceneLook.d.ts +122 -0
- package/packages/types/film/index.d.ts +13 -0
- package/packages/types/index.d.ts +49 -0
- package/packages/types/particles/EffectEnvelope.d.ts +18 -0
- package/packages/types/particles/LayaParticleRenderer.d.ts +30 -0
- package/packages/types/particles/LayaParticleRenderer3D.d.ts +29 -0
- package/packages/types/particles/ParticleExtras.d.ts +50 -0
- package/packages/types/particles/ParticleMesh3D.d.ts +24 -0
- package/packages/types/particles/ParticleSystem.d.ts +52 -0
- package/packages/types/particles/ParticleSystem3D.d.ts +69 -0
- package/packages/types/particles/ParticleTypes.d.ts +89 -0
- package/packages/types/particles/ParticleTypes3D.d.ts +56 -0
- package/packages/types/particles/RibbonPath3D.d.ts +32 -0
- package/packages/types/particles/RibbonTrail.d.ts +38 -0
- package/packages/types/particles/RibbonTrail3D.d.ts +22 -0
- package/packages/types/particles/index.d.ts +13 -0
- package/packages/types/prefabs/PrefabLibrary.d.ts +176 -0
- package/packages/types/prefabs/PrefabTree3D.d.ts +59 -0
- package/packages/types/prefabs/index.d.ts +4 -0
- package/packages/types/procedural/Geometry.d.ts +252 -0
- package/packages/types/procedural/Hand.d.ts +150 -0
- package/packages/types/procedural/Isosurface.d.ts +181 -0
- package/packages/types/procedural/ModuleHarness.d.ts +90 -0
- package/packages/types/procedural/Noise.d.ts +15 -0
- package/packages/types/procedural/PhotoMaterial.d.ts +49 -0
- package/packages/types/procedural/ProceduralAssetProvider.d.ts +31 -0
- package/packages/types/procedural/ProceduralMaterial.d.ts +63 -0
- package/packages/types/procedural/PropFactory.d.ts +94 -0
- package/packages/types/procedural/Random.d.ts +26 -0
- package/packages/types/procedural/SynthAudio.d.ts +49 -0
- package/packages/types/procedural/TerrainMesh.d.ts +55 -0
- package/packages/types/procedural/TextureRecipe.d.ts +125 -0
- package/packages/types/procedural/TriplanarMaterial.d.ts +27 -0
- package/packages/types/procedural/Variation.d.ts +23 -0
- package/packages/types/procedural/index.d.ts +16 -0
- package/packages/types/runtime3d/ActionFrames.d.ts +62 -0
- package/packages/types/runtime3d/AnimationBlend.d.ts +57 -0
- package/packages/types/runtime3d/AnimationBlendMath.d.ts +27 -0
- package/packages/types/runtime3d/AssetProvider.d.ts +167 -0
- package/packages/types/runtime3d/AssetShowcase.d.ts +44 -0
- package/packages/types/runtime3d/Assets.d.ts +166 -0
- package/packages/types/runtime3d/AsyncDeadline.d.ts +6 -0
- package/packages/types/runtime3d/AsyncOperation.d.ts +3 -0
- package/packages/types/runtime3d/BackendChoice.d.ts +130 -0
- package/packages/types/runtime3d/BakedCrowd.d.ts +156 -0
- package/packages/types/runtime3d/BasisTexture.d.ts +169 -0
- package/packages/types/runtime3d/CameraCollision.d.ts +20 -0
- package/packages/types/runtime3d/CameraEffects.d.ts +134 -0
- package/packages/types/runtime3d/CameraRig.d.ts +27 -0
- package/packages/types/runtime3d/CharacterController.d.ts +71 -0
- package/packages/types/runtime3d/CinematicCapture.d.ts +103 -0
- package/packages/types/runtime3d/Clocks.d.ts +200 -0
- package/packages/types/runtime3d/Cloth.d.ts +57 -0
- package/packages/types/runtime3d/Clouds.d.ts +69 -0
- package/packages/types/runtime3d/ColorLut.d.ts +73 -0
- package/packages/types/runtime3d/CombatQueries.d.ts +50 -0
- package/packages/types/runtime3d/ComputePass.d.ts +134 -0
- package/packages/types/runtime3d/CrowdPresentation.d.ts +104 -0
- package/packages/types/runtime3d/DebugDraw.d.ts +161 -0
- package/packages/types/runtime3d/DebugStats.d.ts +24 -0
- package/packages/types/runtime3d/Decals.d.ts +65 -0
- package/packages/types/runtime3d/DensityVolume.d.ts +39 -0
- package/packages/types/runtime3d/DistanceBricks.d.ts +97 -0
- package/packages/types/runtime3d/Dither.d.ts +78 -0
- package/packages/types/runtime3d/DrawWarmUp.d.ts +93 -0
- package/packages/types/runtime3d/EdgeSmoothing.d.ts +10 -0
- package/packages/types/runtime3d/EnvironmentProbe.d.ts +139 -0
- package/packages/types/runtime3d/Filmic.d.ts +243 -0
- package/packages/types/runtime3d/Foliage.d.ts +95 -0
- package/packages/types/runtime3d/GltfIntake.d.ts +236 -0
- package/packages/types/runtime3d/GltfSecondUv.d.ts +54 -0
- package/packages/types/runtime3d/GraphicsGuard.d.ts +18 -0
- package/packages/types/runtime3d/Grass.d.ts +226 -0
- package/packages/types/runtime3d/GroundTruthAO.d.ts +64 -0
- package/packages/types/runtime3d/HalfFloat.d.ts +13 -0
- package/packages/types/runtime3d/HdrEnvironment.d.ts +144 -0
- package/packages/types/runtime3d/Ik.d.ts +123 -0
- package/packages/types/runtime3d/InputBuffer.d.ts +49 -0
- package/packages/types/runtime3d/InstancedMesh.d.ts +116 -0
- package/packages/types/runtime3d/Laya342Adapters.d.ts +306 -0
- package/packages/types/runtime3d/Laya342GltfAdapter.d.ts +105 -0
- package/packages/types/runtime3d/LensFinish.d.ts +38 -0
- package/packages/types/runtime3d/LensFlare.d.ts +114 -0
- package/packages/types/runtime3d/LightFog.d.ts +190 -0
- package/packages/types/runtime3d/LightingDepth.d.ts +128 -0
- package/packages/types/runtime3d/Lightmap.d.ts +55 -0
- package/packages/types/runtime3d/Math3D.d.ts +19 -0
- package/packages/types/runtime3d/MeshQuery.d.ts +107 -0
- package/packages/types/runtime3d/MeshoptModelDecoder.d.ts +34 -0
- package/packages/types/runtime3d/MiniGameSplash.d.ts +4 -0
- package/packages/types/runtime3d/ModelAnimationSampler.d.ts +26 -0
- package/packages/types/runtime3d/ModelCompatibility.d.ts +169 -0
- package/packages/types/runtime3d/ModelDecoder.d.ts +66 -0
- package/packages/types/runtime3d/ModelInspector.d.ts +77 -0
- package/packages/types/runtime3d/ModelLod.d.ts +61 -0
- package/packages/types/runtime3d/ModelPlacements.d.ts +77 -0
- package/packages/types/runtime3d/ObjectMotion.d.ts +43 -0
- package/packages/types/runtime3d/PhysicalCamera.d.ts +51 -0
- package/packages/types/runtime3d/PointShadow.d.ts +71 -0
- package/packages/types/runtime3d/PointShadowSchedule.d.ts +74 -0
- package/packages/types/runtime3d/Pool.d.ts +33 -0
- package/packages/types/runtime3d/ProbeVolume.d.ts +123 -0
- package/packages/types/runtime3d/QualityGovernor.d.ts +201 -0
- package/packages/types/runtime3d/QualityMemory.d.ts +83 -0
- package/packages/types/runtime3d/RenderScale.d.ts +69 -0
- package/packages/types/runtime3d/RenderSpaces.d.ts +44 -0
- package/packages/types/runtime3d/Renderer.d.ts +62 -0
- package/packages/types/runtime3d/ResultPlayback.d.ts +70 -0
- package/packages/types/runtime3d/Runtime.d.ts +136 -0
- package/packages/types/runtime3d/RuntimeDriver.d.ts +42 -0
- package/packages/types/runtime3d/SceneLifecycle.d.ts +84 -0
- package/packages/types/runtime3d/SceneMutation.d.ts +34 -0
- package/packages/types/runtime3d/SceneQueries.d.ts +71 -0
- package/packages/types/runtime3d/ScreenReflections.d.ts +78 -0
- package/packages/types/runtime3d/SelectionOutline.d.ts +68 -0
- package/packages/types/runtime3d/ShaderErrors.d.ts +27 -0
- package/packages/types/runtime3d/ShaderRegistry.d.ts +10 -0
- package/packages/types/runtime3d/ShaderWarmUp.d.ts +162 -0
- package/packages/types/runtime3d/ShadowUpdates.d.ts +125 -0
- package/packages/types/runtime3d/SkinBinding.d.ts +53 -0
- package/packages/types/runtime3d/Smaa.d.ts +60 -0
- package/packages/types/runtime3d/SmaaTables.d.ts +12 -0
- package/packages/types/runtime3d/SpringBones.d.ts +69 -0
- package/packages/types/runtime3d/SurfaceBuffer.d.ts +28 -0
- package/packages/types/runtime3d/Surfaces.d.ts +326 -0
- package/packages/types/runtime3d/Themes.d.ts +70 -0
- package/packages/types/runtime3d/Timeline.d.ts +88 -0
- package/packages/types/runtime3d/ToneCurves.d.ts +59 -0
- package/packages/types/runtime3d/TransformGizmo.d.ts +139 -0
- package/packages/types/runtime3d/TriangleMask.d.ts +84 -0
- package/packages/types/runtime3d/Underwater.d.ts +120 -0
- package/packages/types/runtime3d/Utf8.d.ts +12 -0
- package/packages/types/runtime3d/Vrm.d.ts +120 -0
- package/packages/types/runtime3d/VrmDocument.d.ts +381 -0
- package/packages/types/runtime3d/WalkGrid.d.ts +94 -0
- package/packages/types/runtime3d/WebGPU342Adapters.d.ts +27 -0
- package/packages/types/runtime3d/index.d.ts +102 -0
- package/packages/types/shaders/Laya342ShaderTemplates.d.ts +3 -0
- package/packages/types/shaders/LitSurfaceMaterial.d.ts +257 -0
- package/packages/types/shaders/LitSurfaceTemplates.d.ts +7 -0
- package/packages/types/shaders/ReflectiveSurface.d.ts +58 -0
- package/packages/types/shaders/ShaderMaterials.d.ts +60 -0
- package/packages/types/shaders/ToonMaterial.d.ts +176 -0
- package/packages/types/shaders/WaterRipples.d.ts +48 -0
- package/packages/types/shaders/WaterSurface.d.ts +110 -0
- package/packages/types/shaders/ZhudaCommon.d.ts +31 -0
- package/packages/types/shaders/index.d.ts +7 -0
- package/packages/types/simulation/Cloth.d.ts +381 -0
- package/packages/types/simulation/ParticleCore.d.ts +125 -0
- package/packages/types/simulation/SpringBones.d.ts +107 -0
- package/packages/types/simulation/index.d.ts +4 -0
- package/packages/types/terrain/Heightfield.d.ts +67 -0
- package/packages/types/terrain/Terrain2D.d.ts +81 -0
- package/packages/types/terrain/Terrain3D.d.ts +80 -0
- package/packages/types/terrain/TerrainShell.d.ts +8 -0
- package/packages/types/terrain/index.d.ts +4 -0
- package/packages/types/vendor/LayaAir.runtime.d.ts +97440 -0
- package/packages/types/vendor/REPAIRS.md +30 -0
- package/packages/types/vendor/restored-3.4.2.json +142 -0
- package/packages/types/vendor/spine.runtime.d.ts +1507 -0
- package/packages/types/vendor/wechat-media.d.ts +877 -0
- package/packages/types/zhuda-2d-ui.d.ts +244 -0
- package/packages/types/zhuda-3d-physics.d.ts +34 -0
- package/packages/types/zhuda-audio.d.ts +128 -0
- package/packages/types/zhuda-bootstrap.d.ts +100 -0
- package/packages/types/zhuda-branding.d.ts +6 -0
- package/packages/types/zhuda-core.d.ts +46 -0
- package/packages/types/zhuda-declarative.d.ts +81 -0
- package/packages/types/zhuda-effects.d.ts +302 -0
- package/packages/types/zhuda-layout.d.ts +96 -0
- package/packages/types/zhuda-particles.d.ts +477 -0
- package/packages/types/zhuda-spine42.d.ts +23 -0
- package/packages/types/zhuda-static-assets.d.ts +389 -0
- package/packages/types/zhuda-video.d.ts +24 -0
- package/packages/types/zhuda-visual-contract.d.ts +52 -0
- package/packages/types/zhuda-webview.d.ts +43 -0
- package/vendor/basis/LICENSE.txt +55 -0
- package/vendor/basis/README.md +25 -0
- package/vendor/basis/basis_transcoder.js +19 -0
- package/vendor/basis/basis_transcoder.wasm +0 -0
- package/vendor/laya-3.4.2/WEBGPU-LICENSES.txt +1259 -0
- package/vendor/laya-3.4.2/libs/laya.ani.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.box2D.js +1209 -0
- package/vendor/laya-3.4.2/libs/laya.bridge.js +2273 -0
- package/vendor/laya-3.4.2/libs/laya.bullet.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.core.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.d3.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.device.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.gltf.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.ik.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.light2D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.line2D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.native-spine42.js +7672 -0
- package/vendor/laya-3.4.2/libs/laya.navMesh2d.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.navMesh3d.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.navMeshCommon.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.particle.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.particle3D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.particleCommon.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.physics2D.js +3774 -0
- package/vendor/laya-3.4.2/libs/laya.physics3D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.postProcess.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.spine.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.spine3D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.tilemap.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.trail2D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.trail3D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.trailCommon.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.ui.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.ui2.js +9904 -0
- package/vendor/laya-3.4.2/libs/laya.vfx.js +6754 -0
- package/vendor/laya-3.4.2/libs/laya.webgl_2D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.webgl_3D.js +1 -0
- package/vendor/laya-3.4.2/libs/laya.webgpu_2D.js +18576 -0
- package/vendor/laya-3.4.2/libs/laya.webgpu_3D.js +6729 -0
- package/vendor/laya-3.4.2/libs/nagabind.js +395 -0
- package/vendor/laya-3.4.2/libs/nagabind_bg.wasm +0 -0
- package/vendor/laya-3.4.2/libs/shader_compiler_web.js +22 -0
- package/vendor/laya-3.4.2/libs/shader_compiler_web.wasm +0 -0
- package/vendor/laya-3.4.2/libs/spine-core-3.8.js +1 -0
- package/vendor/laya-3.4.2/libs/spine-core-4.2.js +10216 -0
- package/vendor/laya-3.4.2/webgpu-provenance.json +41 -0
- package/vendor/meshoptimizer/LICENSE.txt +21 -0
- package/vendor/meshoptimizer/README.md +13 -0
- package/vendor/threejs-post/LICENSE.txt +53 -0
- package/vendor/threejs-post/README.md +54 -0
- package/zhuda.config.json +22 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# 3D 接入補強接收矩陣
|
|
2
|
+
|
|
3
|
+
2026-10-30。對應《深潮求生》移植評估;這是引擎補強與獨立可執行切片的證據,完整遊戲 P0/P1 接收仍須遊戲方實際操作通過。
|
|
4
|
+
|
|
5
|
+
| 評估項 | 本次交付 | 驗證與待辦 |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| P0.1 外部建置/runtime | 獨立 HTML/CSS、無來源寫入、相對資源、ZIP/解壓上限、依賴雜湊、container/DPR/AA/FPS、pause、realm context loss 重建 | source hash/ZIP/錯誤路徑自動測試;真實 WebGL 的 root/subpath/opaque sandbox/狀態重建。正式遊戲站 iframe/CORS 仍需部署後驗收 |
|
|
8
|
+
| P0.2 網格/材質 | PBR/Unlit/custom shader、MR 貼圖轉換、動態 buffer/bounds、穩定 ID instance、深度/opaque pass 預算 | 真實海面/斜坡島/浮體/屋頂;256 個 GPU 波浪採樣,最大高度差 0.000011753 m;受擊、晴雨與擋雨。完整原場景視覺對照及風動植被仍在遊戲方 |
|
|
9
|
+
| P0.2a 2D/3D terrain + shader | `ZhudaTerrain2D` tile palette/atlas/blocked metadata;`ZhudaHeightfield`/`ZhudaTerrain3D` chunk streaming、局部 patch、LOD 1/2/4、可選封閉側壁/底面、相機boom避障、精確三角形 query、stable cell ID;`ZhudaShaderMaterial` 2D/3D templates 與 typed uniforms | Node terrain/shader tests 8 項;消費端 18 項真實 WebGL 檢查,含 2D atlas UV/tint/alpha/clipping、3D textured/fog/dissolve、edit seam、負 origin、region unload、旋轉+非均勻縮放 ray distance、錯誤 GLSL diagnostic;契約與限制見 [terrain-shader.md](terrain-shader.md) |
|
|
10
|
+
| P0.3 模型/生命週期 | 去重/retry/abort/lease、`.bin` GLB/relative JPG、獨立材質、命名節點、隔離預覽、過期結果丟棄 | 三款真實模型;30 次完整小場景建立/拆除保持有界;共享 JPG 存活。模型無 animation,含動畫/骨骼資產仍需另驗 |
|
|
11
|
+
| P0.4 查詢/座標/輸入 | 最近 hit/layer/instance ID、可注入 ray/sweep/surface、CSS projection/ray、相機 rig、多指角色/capture/cancel | AABB 最近遮擋測試;DPR1/2/3 × 桌面/直橫屏回投;雙指移動/轉向/放開;DOM 控制保留。完整魚鉤/建造判定仍沿用 shared gameplay |
|
|
12
|
+
| P0.5 時間/掛點 | fixed clock、snapshot interpolation/bounded extrapolation、epoch/sequence、TTL event gate、3D matrix/quaternion anchor | 10Hz snapshot 的 30/60/120FPS 自動測試;重複/亂序/新局/抑制 replay;旋轉與非均勻縮放掛點。真實斷線重連、天氣存檔與音訊仍由遊戲測試接收 |
|
|
13
|
+
| P1.6 大場景/品質 | region ownership、instance group、LOD hysteresis、DPR/shadow/pass 品質預算、資源清單與容量估算 | 小場景有界拆除及可切畫質已驗;兩模式的完整生成、密集建築/戰鬥/決勝與長距航行尚未驗收 |
|
|
14
|
+
| P1.7 消費端/手機 | 獨立固定版 SDK 消費專案、公開型別測試、真實 WebGL/CDP/CI、裝置原始報告 | iPhone14 ≥10分鐘通過本切片門檻;本輪 iPhone terrain 2D 與 vivo V40 terrain 3D 已實機載入並目視驗證;Android 十分鐘長壓、263項遊戲測試分類尚未執行 |
|
|
15
|
+
|
|
16
|
+
## 實際修正
|
|
17
|
+
|
|
18
|
+
1. `createMaterial` 忽略 PBR/Unlit 選項,現在回傳正確材質並保留 BlinnPhong 預設型別相容性。
|
|
19
|
+
2. 外部 build 會注入示範資產和固定 HTML,現在有獨立 read-only consumer pipeline。
|
|
20
|
+
3. DPR 被 design-size 與 retinal 重複乘入,iPhone 原本吃到 DPR3,現在 cap 真正生效。
|
|
21
|
+
4. Safari 整數 16/17ms frame timestamps 被過窄 tolerance 誤跳幀,更新 pacing 已修正。
|
|
22
|
+
5. Laya342 每個 WebRender3DProcess 的 fallback shadow texture 未釋放,版本 adapter 補釋放;連續30次拆除不再逐次增長。
|
|
23
|
+
6. glTF renderer 掛在 component 時舊材質複製路徑未涵蓋,現在正確複製並避免同皮膚角色一起變色。
|
|
24
|
+
7. custom shader 的 comma-separated uniform 與 Laya 自動注入重複,已整理宣告並通過實際編譯。
|
|
25
|
+
8. opaque-origin storage 存取讓初始化拋錯,現在提供 realm 內 memory fallback,持久資料由 parent 管理。
|
|
26
|
+
|
|
27
|
+
## 手機證據範圍
|
|
28
|
+
|
|
29
|
+
獨立消費專案 `evidence/iphone14-10min.json`:Safari27.0.1/iPhone14,low、DPR1,有效採樣614.525秒、36,545幀,P50=17ms/P95=20ms/P99=24ms,>50ms長幀0,interruption0。每45秒晴雨切換;4角色、1木筏、1船、1屋頂、48物資、0..160雨滴。原始 viewport/UA/draws/triangles 也在報告。此報告在後續純 API/型別/opaque storage 收尾之前擷取,low 的渲染預算一致;消費端最終版另跑桌面回歸。
|
|
30
|
+
|
|
31
|
+
不能由這個負載推導百人伺服器或全地圖幀率。GPU時間不可用,保持null;記憶體數字明確是估算。
|
|
32
|
+
|
|
33
|
+
本輪地形/shader 路線另外在 iPhone14/vivo V40 各保存最近72,000筆 frame interval,約1,203/1,214秒樣本,low/DPR1,每30個 active 秒交替2D/3D與動態dissolve。P50/P95/P99 分別為17/22/23ms、16.7/19.6/21.6ms;>50ms長幀4/85。原始與截圖在消費端 `evidence/terrain-mobile-acceptance.json`、`iphone14-terrain-sample.json`、`vivo40-terrain-sample.json`。超過5秒的長中斷未納入統計,不能宣稱不中斷壓測;modeFrames是整個session累計,與rolling window不同。手機採樣在最後的ray-distance整理前執行,最終固定SDK另通過桌面回歸。iPhone實際觸控LOD按鈕後由1切到2。
|
|
34
|
+
|
|
35
|
+
## 正式遊戲切換之前
|
|
36
|
+
|
|
37
|
+
保留既有20個shared模組的移動/傷害/建造/存檔與網路權威,做出包含走路、游泳、上下船、建造、擋鉤、勾物資與扣血的可玩切片,再接收P0。之後才擴完整兩模式並完成P1。引擎沒有改寫這些規則,也沒有把本驗收頁當成完整遊戲。
|
|
38
|
+
|
|
39
|
+
API與使用方式:[3D接入契約](3d-integration.md)。
|
|
40
|
+
|
|
41
|
+
## 地下視角補強
|
|
42
|
+
|
|
43
|
+
已新增逐chunk封閉網格、側面/底面最近命中、編輯/LOD同步及相機boom九射線避障。消費端新增實際地下視角截圖、側/底命中、相機地表安全距離及sky shader關閉fog的像素檢查。這不是洞穴生成器或連續球體掃掠;focus必須位於實體外。詳見terrain-shader.md。
|
|
44
|
+
|
|
45
|
+
## 1.8.0 群體呈現補強
|
|
46
|
+
|
|
47
|
+
上述舊切片的「模型無 animation」只描述當時資產。新版本另加入有真實骨骼動畫的 25/50/100 角色測試、粒子預算、100/300/500 網格合批及 30 次模型重載。來源、硬體、有效採樣、原始量測與未驗項見 [群體驗證紀錄](plans/records/crowd-runtime-hardening/verification.md);接入方式見 [群體呈現契約](crowd-runtime.md)。舊手機紀錄不會自動升級為百人手機或 Windows/Steam 通過。
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# 3D 消費專案接入與驗收契約
|
|
2
|
+
|
|
3
|
+
2026-10-30。基於 LayaAir 3.4.2;本次補強從 `2edc93d` 開始。
|
|
4
|
+
|
|
5
|
+
引擎提供通用呈現、載入、座標、時鐘與資源介面。遊戲保留波浪公式、採樣器、島嶼生成、移動/傷害/建造/網路權威規則。遊戲資產不放入引擎。
|
|
6
|
+
|
|
7
|
+
## 外部建置與啟動
|
|
8
|
+
|
|
9
|
+
新專案先看[完整 consumer 路線](consumer-route.md)。下列能力的範圍與新版
|
|
10
|
+
證據格式見[consumer build 與驗收工具](consumer-tooling.md)。
|
|
11
|
+
|
|
12
|
+
Node.js 24+。固定引擎 Git SHA 安裝,不依賴工作目錄旁的引擎原始碼。
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
import { runConsumerBuild } from 'zhuda-laya-engine/compiler/consumer';
|
|
16
|
+
await runConsumerBuild({
|
|
17
|
+
projectRoot: process.cwd(),
|
|
18
|
+
config: { features: ['core', '3d', 'gltf'] },
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
消費端 `public/index.html` 必須有 `<!-- ZHUDA_LIBS -->` 與 `<!-- ZHUDA_ENTRY -->`。保留原有 HTML、CSS、DOM;預設來源為 `src/Main.ts`,輸出為 `dist/web`。可設定 `entry`、`publicDir`、`htmlTemplate`、`outDir`、`features` 或既有 `profile`,並會把消費端 `assets/` 複製到輸出供 Provider/Prefab 使用;可用 `assetExclude`(相對 `assets/` 的目錄前綴陣列)排除原始影片、設計檔等不應部署的來源資料。讀取反射資料後直接 bundle,不產生消費端 `.generated`,不寫入來源、不複製內建示範。現有 `zhuda-laya-build` 外部建置也走此路徑;`demoAssets: true` 才啟用舊示範流程。若有畫面契約 manifest,仍執行原有檢查。
|
|
23
|
+
|
|
24
|
+
`dist/game.zip` 為可解壓的 ZIP,`consumer-build.json` 記錄實際 ZIP/解壓大小,預設各不得超過 50,000,000 bytes。`payload-manifest.json` 列出引擎庫與每個 payload 的 bytes/SHA256。資源與 script 均使用相對路徑;消費端自行管理資產版本目錄。iframe opaque-origin 載入 GLB/JPG 需要資產伺服器回傳 CORS 許可。
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
const context = await ZhudaEngine.boot({
|
|
28
|
+
container: document.querySelector('#game')!,
|
|
29
|
+
features: ['core', '3d', 'gltf'],
|
|
30
|
+
dprCap: 1.5,
|
|
31
|
+
targetFPS: 60,
|
|
32
|
+
antialias: false,
|
|
33
|
+
preserveDrawingBuffer: false,
|
|
34
|
+
clearInput: () => input?.clear(),
|
|
35
|
+
onContextLost: () => notifyHostWithSnapshot(),
|
|
36
|
+
});
|
|
37
|
+
context.runtime.start((dt) => present(dt));
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
選項在 `beforeInit` 之前設定,callback 可覆寫。DPR cap 控制 backing 尺寸,CSS 大小由容器決定;不再重複套用 retinal DPR。30/60 FPS 分別配置引擎與消費端更新節奏。初始化 resize callback 失敗會清掉監聽器和已建根場景。
|
|
41
|
+
|
|
42
|
+
`context.dispose()` 釋放本 session 的更新、監聽器與根場景。Laya 是 realm singleton,沒有承諾完整卸載 vendor 全域引擎;需要完全拆除/預覽隔離/context loss 恢復時,使用 `ZhudaRuntimeHost` 擁有的 iframe。host 只接受目前 frame 的訊息來源,儲存 `zhuda:snapshot`;收到 `zhuda:context-lost` 便替換整個 realm,ready 後傳送 `zhuda:restore`。**不是宣稱 Laya 原生 GPU 資源可無損恢復。** 遊戲須序列化所有必要狀態並在重建時還原;同時清空輸入。
|
|
43
|
+
|
|
44
|
+
Boot now fails closed with `ZHUDA_FOREIGN_LAYA_REALM` when the page already
|
|
45
|
+
contains an initialized Laya stage or canvas without the Zhuda realm marker.
|
|
46
|
+
This protects existing Laya objects from a second global stage/config/prototype
|
|
47
|
+
owner. Use a separate page or `ZhudaRuntimeHost` iframe for the editor; an
|
|
48
|
+
uninitialized `window.Laya` namespace is still allowed so the pinned vendor
|
|
49
|
+
scripts can initialize normally.
|
|
50
|
+
|
|
51
|
+
opaque-origin 無法讀取 storage 時,boot 安裝 realm 內記憶體替代。這只供引擎初始化,持久進度須由可信 parent 保存。visibility/blur 暫停 presentation 並清輸入;UI deadline 應由權威時鐘重算。
|
|
52
|
+
|
|
53
|
+
## 材質、shader 與網格
|
|
54
|
+
|
|
55
|
+
完整的 agent-friendly 2D/3D terrain schema、chunk/LOD/query contract 與 shader 範例見 [terrain-shader.md](terrain-shader.md)。地形 renderer 是引擎通用能力;波浪、島嶼生成、碰撞與遊戲規則仍由消費端提供。
|
|
56
|
+
|
|
57
|
+
`createSurfaceMaterial` 支援 PBR/Unlit、金屬度/粗糙度/發光、opaque/alpha/additive/cutout、深度寫入與雙面。`Zhuda3D.createMaterial` 也會依 `type` 建立正確類別;未指定時維持 BlinnPhong。
|
|
58
|
+
|
|
59
|
+
`createSurfaceMaterial({type:'physical'})` 使用 LayaAir glTF 模組的 `glTFPBR` shader(需 `gltf` feature),提供 sheen、iridescence、ior/specular、transmission+volume、clear-coat 貼圖與任意角度的 `anisotropyRotationDeg`;貼圖依 glTF 配置,顏色與 `pbr` 一樣為顯示色。transmission 需 camera opaque pass:`configureSurfacePasses(camera,[surfaceMaterialPasses(spec)],budget)`。一個 physical 表面最多填 6 個貼圖槽(`physicalSurfaceTextureLimit()`;有 lightmap 時 5、方向性 lightmap 時 4):每個 shader stage 只有 16 個 sampler,場景的光影與環境在 WebGPU 上固定佔 10 個,超過時表面完全不會被畫出來,所以第 7 張貼圖會被拒絕。細節與量測見 [filmic-rendering.md](filmic-rendering.md#physical-surfaces)。
|
|
60
|
+
|
|
61
|
+
`createSurfaceTexture` 的 color/emission 使用 sRGB,normal/data 使用線性。輸入像素方向保持來源約定;法線使用 Laya/glTF 的切線空間,不自動猜測 DirectX 綠色通道。glTF MR 貼圖的 G=roughness、B=metallic;`packMetallicRoughness` 轉為 Laya 的 R=metallic、A=smoothness。GLB loader 自行處理 glTF 材質,不能再轉一次。
|
|
62
|
+
|
|
63
|
+
材質借用貼圖;`disposeSurfaceMaterial` 先脫離貼圖再銷毀材質,貼圖由其 owner 釋放。不要對共享材質做受擊變色。
|
|
64
|
+
|
|
65
|
+
`createCustomSurfaceMaterial({name,vertex,fragment,uniforms,attributes?,instancing?})` 透過 Laya SubShader 接入。相同 shader 名稱及契約可重用;同名不同內容拒絕。uniform map 的型別使用 `Laya.ShaderDataType`;Laya 會注入宣告,adapter 會移除 map 內重複的 scalar/vector uniform。陣列及 struct 等進階宣告依 vendor shader 規範處理。
|
|
66
|
+
|
|
67
|
+
可執行的水面 shader 在消費端 `src/OceanShader.js`:頂點使用 `Scene.glsl`、`Camera.glsl`、`Sprite3DVertex.glsl`/`VertexCommon.glsl` 的頂點與世界矩陣;clip position 經 `remapPositionZ`。霧使用 `SceneFogInput.glsl`/`SceneFog.glsl`。片段在線性空間計算並用 Laya 的輸出色彩函式。自訂 shader 必須自行實作需要的照明與陰影接收,不能假設加入一段 Three.js shader 就會自動擁有 PBR。
|
|
68
|
+
|
|
69
|
+
`configureSurfacePasses(camera,[{depth:true,opaqueColor:true}],budget)` 統一該 camera 的深度 prepass/不透明色 copy 請求,回報請求數、啟用數及 budget/depth-unsupported。budget 不足會關閉兩者,消費端必須切換不依賴這些輸入的材質。成本為額外 prepass/copy 的名目計數,實際 draws 仍受陰影/後處理與場景影響。此 API 擁有該 camera 的這兩項設定,避免同時另設 competing owner。shader 使用 vendor 的 camera uniforms 讀取結果。
|
|
70
|
+
|
|
71
|
+
`ZhudaDynamicMesh` 接收 position/normal/UV/index,另可帶 `tangents` 與每頂點四個數的 `colors`(`setColor(i,r,g,b,a)` 修改、`updateRange` 上傳;`offsets`/`stride` 說明每個頂點在 `vertices` 中的排列;lit surface 的 hook 以 `s.vertexColor` 讀取:rgb 以光量到達,alpha 原值到達)。會動的布料(`ZhudaCloth`:釘點、碰撞體、抓取,時間取自 `ZhudaLayeredClock`)見 [cloth](cloth.md)。每 chunk 限 3..65,535 頂點,使用 UInt16 indices;大型水面自行切塊。`setPosition` 修改 CPU staging,`updateRange` 局部上傳並重算 bounds。`ZhudaInstanceGroup` 使用共享 mesh/material 交給 Laya instancing;`set(id,worldMatrix)` 的穩定 ID 由應用提供,不能使用合批順序當 entity ID。`dispose()` 清除本組節點,mesh/material 的 owner 仍須釋放。
|
|
72
|
+
|
|
73
|
+
### 樹葉:風與遠處的覆蓋(Foliage)
|
|
74
|
+
|
|
75
|
+
用 LayaAir PBR/glTF shader 畫的模型(Poly Haven 樹、灌木、蕨類)可以標成植物,`ZhudaEngine.boot` 已在 `Laya.init` 前裝好 shader 修補:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
const marks = zhudaMarkFoliage(treeNode); // 這棵樹的材質:隨風擺動;鏤空的葉子保留遠處覆蓋
|
|
79
|
+
const wind = new ZhudaFoliageWind(scene, { direction: [1, 0.3], strength: 0.8 });
|
|
80
|
+
// 每幀:wind.update(seconds)(遊戲自己的時鐘)
|
|
81
|
+
// 收尾:marks.dispose(); wind.dispose();
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- **風**(材質 define `ZHUDA_WIND`):
|
|
85
|
+
- 整株植物隨陣風傾斜、擺回,離底部越高擺得越多(以高度平方計,強度 1 時 10 m 高的樹頂約 16 cm);鏤空的葉子另外各自顫動約 2 cm。
|
|
86
|
+
- 位移加在 LayaAir 算世界座標的地方,可見畫面與陰影、深度一起動。
|
|
87
|
+
- `zhudaWindOffset` 是同一條公式的 TypeScript 版。
|
|
88
|
+
- **遠處覆蓋**(`ZHUDA_KEEP_COVERAGE`,只用在 glTF shader 的鏤空材質):
|
|
89
|
+
- 葉子貼圖縮小時,透明度被平均掉,葉子會變稀,遠處樹冠成了一點一點的天空。
|
|
90
|
+
- 修補依貼圖被讀取的 mip 等級把透明度提高(每級四分之一),可見、陰影、深度三個 pass 都一樣。
|
|
91
|
+
- 材質由一個模型的所有複本共用,所以標一次,每一棵都會動;`dispose` 只拿掉這次標上去的 define。
|
|
92
|
+
- 沒有標的材質,編譯出來就是 LayaAir 原本的程式碼。
|
|
93
|
+
- 驗證:`npm run verify:foliage`(`FOLIAGE_RENDERER=webgpu` 跑 WebGPU)。
|
|
94
|
+
- 樹冠裡面的暗部是建置時的事,用 [`zhuda-laya-crown`](model-lod.md#shading-a-trees-crown)。
|
|
95
|
+
|
|
96
|
+
## 模型與非同步生命週期
|
|
97
|
+
|
|
98
|
+
`ZhudaModelLibrary.instantiate(url,{signal,retries,independentMaterials})` 使用 `ZhudaAssetCache` 去重、引用 lease、最多三次重試、獨立取消與有界 idle cache。辨識 GLB magic,因此 `.bin` 也可載入,外部 JPG 以模型 URL 為基底。3.4.2 的 `_parseglb/_parse` 是版本綁定介面,升級 vendor 時需回歸。
|
|
99
|
+
|
|
100
|
+
download/parse/ready 與 GPU 已顯示分開:report 的 `gpuReady: requires-first-draw` 明確表示仍需第一次實際 draw。回傳 instance 擁有獨立節點;`independentMaterials:true` 另外複製材質,可 `setTint`。`find(name)` 找節點/骨骼掛點,動畫姿態交由每 instance 的 Animator 管理。驗收的三個模型沒有 animation clips,**未據此驗證骨骼動畫相容性**。 `instance.setShadows({ cast, receive })` 一次設定這份拷貝所有網格是否投影、是否接受陰影。
|
|
101
|
+
|
|
102
|
+
依序釋放 instance,再 dispose library;共享 mesh/texture 在其他 lease 存活時保持有效。`ZhudaRequestSlot.replace(load,commit,discard)` 適合面板,cancel 或新請求後的舊結果只會 discard。`ZhudaResourceScope` 以反向順序釋放,個別錯誤仍繼續清理;`ZhudaSceneRegions` 在區域離開時取消載入並丟棄過期結果。
|
|
103
|
+
|
|
104
|
+
3.4.2 原本 `WebRender3DProcess.destroy` 漏掉 `_defaultShadowMap`。隔離的 `installLaya342LifecycleFix` 在 boot 後安裝,僅補釋放該 process 擁有的 fallback texture,具冪等性。
|
|
105
|
+
|
|
106
|
+
模型的 `COLOR_0` 頂點色會乘上底色(glTF 規格):可用來放烘焙好的遮蔽陰影、濕痕或色調變化,執行期零成本。LayaAir 3.4.2 原本不會套用,也讀不對 16 位元或三分量的顏色,引擎在載入時補上(`enableLaya342VertexColors`、`prepareLaya342GltfResource`)。模型若帶有非預期的 `COLOR_0` 會因此變色,請在來源檔移除。`COLOR_0` 照 glTF 規格讀成線性值(0.2 就是把底色乘以 0.2);在這之前它被當成顯示值(0.2 畫成約 0.03),為舊行為調過的烘焙陰影現在會比較亮,請在來源檔重烘或把數值取 2.2 次方([紀錄](plans/records/outside-review-patches/task.md))。骨頭超過 24 根的蒙皮模型,LayaAir 3.4.2 會照三角形的順序切成好幾段,每段在每個繪製遍各畫一次(順序不巧時,36 根骨頭的模型被切成 1,065 段);引擎在載入時先把三角形排成切得最少的順序,並且不計入頂點列出但權重為 0 的骨頭,畫面不變(`orderLaya342SkinTriangles`)。要保證一次繪製,骨架請做在 24 根以內。同一個 mesh 裡屬性不同的 primitive(例如身體有頂點色、眼睛沒有)會先補齊成同樣的屬性再交給 LayaAir,補上的值不改變外觀。
|
|
107
|
+
|
|
108
|
+
## 查詢、輸入、時鐘與掛點
|
|
109
|
+
|
|
110
|
+
`ZhudaCameraCoordinates` 採 column-major projection×view 與 inverse,screen input/output 都是 CSS pixels,支援 camera normalizedViewport。供給真實 canvas rect 與 backing 尺寸,不自行再乘 DPR。`worldToScreen` 的 visible 供 DOM 血條/名字判斷。
|
|
111
|
+
|
|
112
|
+
`ZhudaSceneQueries` 從註冊 provider 取得最近命中的 entity/instance ID、法線、位置、距離及 layer。`rayBox` 是 AABB fixture;精確碰撞與 sweep 由遊戲幾何或物理 adapter 注入,不產生新的傷害規則。`ZhudaTriangleBvh` 以三角形 BVH 在網格自身空間做精確射線拾取(不需物理引擎),回傳距離、世界座標點、三角形索引、重心座標與正反面;`setMatrix` 移動網格不必重建。`createZhudaMeshQueryProvider` 把它註冊為 `ZhudaSceneQueries` provider,`readZhudaLayaMeshTriangles` 讀出可讀(readable)LayaAir Mesh 的頂點與索引。蒙皮與變形網格不在範圍內。`ZhudaSurfaceQuery` 接入既有高度/法線採樣器,水面 CPU/GPU 共享座標和外部 time。
|
|
113
|
+
|
|
114
|
+
`ZhudaPointerInput` 以 pointer ID 分配互斥 role,支援 capture、取消、blur/hidden 清理。DOM overlay 由遊戲排除並攔截,canvas 應 `touch-action:none`。`ZhudaCameraRig` 提供 orbit/follow 及 firstPerson 呈現;pointer lock 不可用時可直接使用拖曳 dx/dy。safe-area CSS 與橫豎版型由消費端管理,沒有固定棋盤版型依賴。
|
|
115
|
+
|
|
116
|
+
`ZhudaSimulationClock` 是有界固定 tick;`ZhudaSnapshotBuffer` 由外部提供 epoch/sequence/sample time,以插值、有界外插呈現,拒絕重複/倒序快照。遊戲負責 server time offset、render delay、UI deadline 及新局 reset;sample 可以顯式 seek。不要把瀏覽器 arrival time 當網路權威時間。
|
|
117
|
+
|
|
118
|
+
`ZhudaEventGate` 以 epoch、TTL、capacity 去重,`replay:true` 預設抑制副作用。用它包住遊戲既有 WebAudio 的攻擊/技能事件,保留遊戲的手勢解鎖、背景靜音與釋放規則;引擎不建立第二個音訊權威。
|
|
119
|
+
|
|
120
|
+
`ZhudaEffectDirector` anchor 可提供 `worldMatrix` 或 quaternion+scale,offset 經完整父矩陣,支援傾斜、旋轉及非均勻縮放。source resolveAnchor 回傳 null 時停止 target;舊版 XY anchor 繼續有效。骨骼世界矩陣由模型 adapter 提供。
|
|
121
|
+
|
|
122
|
+
## 場景預算與證據
|
|
123
|
+
|
|
124
|
+
`sceneQuality`/`applySceneQuality` 配置 DPR、陰影距離/解析度、禁用 MSAA;extraPasses 交給 `configureSurfacePasses`,LOD 使用 `ZhudaDistanceLOD` hysteresis。靜態世界可使用 Laya 原有靜態合批;動態物資使用 instance group。區域切分與可見性不得更改遊戲碰撞、傷害或霧內視野規則。
|
|
125
|
+
|
|
126
|
+
`ZhudaSceneBudget` 是顯式登記的預算;`inspectSceneResources` 是目前資源的邏輯清單。mesh 借用 vendor accounting,texture 依 RGBA8/mip/cube 估算,render target 假設 color+depth,均不包含 driver overhead。標示 `memoryMeasurement: estimate`,不能當精準 GPU 記憶體。GPU timer 不可用時維持 null/unavailable。
|
|
127
|
+
|
|
128
|
+
獨立消費端的 browser test 使用真實 WebGL,測水面 CPU/GPU 採樣、三款 `.bin`+JPG、材質獨立、30 次場景拆除、動態 buffer、擋雨、DPR/橫豎屏對齊、雙指輸入、隔離預覽、context loss 及 opaque sandbox。完整結果/裝置負載見 [接收矩陣](3d-acceptance.md)。
|
|
129
|
+
|
|
130
|
+
## 群體角色接入(1.8.0)
|
|
131
|
+
|
|
132
|
+
模型 provider/共享動畫、呈現排程、遠端快照、native 動畫降頻、特效降級與長視窗 profiler,見 [群體呈現契約](crowd-runtime.md)。獨立壓測與各平台未驗項分開紀錄;普通網格合批不能替代骨骼角色驗收。
|
|
133
|
+
|
|
134
|
+
## Model seller / inspector integration (1.9.0)
|
|
135
|
+
|
|
136
|
+
Use the [model showcase contract](model-showcase.md) for glTF compatibility reports,
|
|
137
|
+
Morph repairs, typed inspection and same-instance Raw/Gameplay/Cinematic modes.
|
|
138
|
+
Required unsupported extensions reject; implemented handlers are not a visual
|
|
139
|
+
conformance certificate. Browser HTML needs the `3d-gltf` profile.
|
|
140
|
+
|
|
141
|
+
## Making a 3D scene look good
|
|
142
|
+
|
|
143
|
+
Follow the [quality route](quality-route.md): the steps, in order, from an
|
|
144
|
+
empty scene to a frame that reads as lit, grounded and deep, with the check
|
|
145
|
+
for each step and the list of what is not built yet. The MCP tool
|
|
146
|
+
`get_quality_route` returns the same route as data; the `film_*` tools return
|
|
147
|
+
`advice` for a scene and `metrics` for a preview.
|
|
148
|
+
|
|
149
|
+
For ground a player walks on, [`ZhudaGrassField`](grass.md) grows grass round
|
|
150
|
+
the eye: the game says where the ground is and where nothing grows.
|
|
151
|
+
|
|
152
|
+
A scene without surroundings of its own is lit by an [HDR panorama or the
|
|
153
|
+
studio room](hdr-environment.md): reflections, ambient light and the sky from
|
|
154
|
+
one photograph, turned together.
|
|
155
|
+
|
|
156
|
+
A surface that is drawn rather than photographed has its own materials: a
|
|
157
|
+
[toon material](stylized-shading.md) banded by LayaAir's lights and shadows,
|
|
158
|
+
with an outline; a matcap and a normal view as shader recipes; and a line
|
|
159
|
+
round what is selected, in another colour where it is behind something.
|
|
160
|
+
|
|
161
|
+
A [VRM 1.0 avatar](vrm.md) loads through the model library like any GLB and
|
|
162
|
+
`ZhudaVrm` gives it its humanoid bones, expressions, gaze, node constraints,
|
|
163
|
+
spring bones and MToon materials (as toon materials with a shade colour).
|
|
164
|
+
|
|
165
|
+
Thousands of one prop, or hundreds of one animated character, are drawn
|
|
166
|
+
[in groups without a node for each](instanced-meshes.md): `instanced: true`
|
|
167
|
+
on a model's placements, `ZhudaInstancedMesh`, and `ZhudaBakedCrowd`.
|
|
168
|
+
|
|
169
|
+
A character's clips are [mixed by weight and its bones bent to reach a
|
|
170
|
+
point](animation-control.md): a walk into a run, a wave over a walk, a foot
|
|
171
|
+
on sloping ground.
|
|
172
|
+
|
|
173
|
+
A scene's lamps can [fall off with the square of the distance, a spot have
|
|
174
|
+
its own penumbra, and the sun's shadow be wider, blended from cascade to
|
|
175
|
+
cascade and carried into the last centimetres by contact
|
|
176
|
+
shadows](lighting-depth.md); point-light shadows are kept up to date by a
|
|
177
|
+
schedule.
|
|
178
|
+
|
|
179
|
+
The HDR chain takes [other tone curves, a colour table from a grading tool,
|
|
180
|
+
edge smoothing by the shape of an edge, ambient occlusion by horizons and a
|
|
181
|
+
lens flare that a wall hides](post-quality.md): `toneMapping`, `grade.lut`,
|
|
182
|
+
`antialias: 'smaa'`, `aoMethod: 'gtao'`, `lensFlare`.
|
|
183
|
+
|
|
184
|
+
A model's pictures can be [KTX 2 / Basis textures](basis-textures.md), which
|
|
185
|
+
stay compressed on the graphics card: a quarter or an eighth of the memory
|
|
186
|
+
of a PNG, with the file's own mip levels.
|
|
187
|
+
|
|
188
|
+
The frame that first draws a shader compiles it. [Shader warm-up](shader-warm-up.md)
|
|
189
|
+
lists what a game compiles and compiles it behind the loading screen, so the
|
|
190
|
+
first frame of a scene and a change of look level compile nothing.
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Documentation
|
|
2
|
+
|
|
3
|
+
Three kinds of page, for three questions.
|
|
4
|
+
|
|
5
|
+
| You want to | Read |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| Build something: a game, a scene, a film, a model, a release | A **route**: [`routes/`](routes/README.md). One page per kind of thing, all in one format, each checked by building it. Start here. |
|
|
8
|
+
| Know how one subsystem works and what its API promises | A **guide**: the list below. |
|
|
9
|
+
| See what the engine adds to LayaAir at a glance | The [overview](overview.md); what each release added is in the [changelog](../CHANGELOG.md). |
|
|
10
|
+
| Change the engine | [`AGENTS.md`](../AGENTS.md), then [`HANDOFF.md`](../HANDOFF.md) and the [plans](plans/README.md). |
|
|
11
|
+
|
|
12
|
+
The reference games under [`games/`](../games/README.md) are the routes' worked examples: real
|
|
13
|
+
consumers of the engine in this checkout, rebuilt and tested by `npm run verify:games`.
|
|
14
|
+
The [prefab library](prefab-library.md) under [`zhuda-engine-prefabs/`](https://github.com/zhudaandzhuer/zhuda-engine-prefabs/blob/main/README.md) holds the modules
|
|
15
|
+
several games share; `npm run verify:library` checks it against this checkout.
|
|
16
|
+
|
|
17
|
+
## Guides
|
|
18
|
+
|
|
19
|
+
### Building with the engine
|
|
20
|
+
|
|
21
|
+
- [Canonical consumer route](consumer-route.md)
|
|
22
|
+
- [Consumer build and browser evidence](consumer-tooling.md)
|
|
23
|
+
- [單一 HTML 的 Browser SDK 路線](browser-sdk.md)
|
|
24
|
+
- [Backend delivery: one page for WebGPU and WebGL](backend-delivery.md)
|
|
25
|
+
- [Official mini-game packaging without the IDE](minigame-packaging.md)
|
|
26
|
+
- [White-label, themes and presentation recovery](white-label-themes.md)
|
|
27
|
+
- [Developer tooling: what is in a scene, what it costs, what went wrong](developer-tooling.md)
|
|
28
|
+
- [Agent development guide](agent-development.md)
|
|
29
|
+
- [Release and version policy](release-policy.md)
|
|
30
|
+
|
|
31
|
+
### 2D, layout and prefabs
|
|
32
|
+
|
|
33
|
+
- [Layout, art text and video contracts](layout-and-media.md)
|
|
34
|
+
- [SVG layout wireframes](layout-wireframe.md)
|
|
35
|
+
- [遊戲視覺開發規則:先驗 Prefab,再組 Scene](prefab-workflow.md)
|
|
36
|
+
- [Zhuda Web Static Asset Editor](prefab-editor.md)
|
|
37
|
+
- [Primitive 3D Prefabs](procedural-prefabs.md)
|
|
38
|
+
- [The prefab library: shared modules a game copies in](prefab-library.md)
|
|
39
|
+
|
|
40
|
+
### 3D scenes and how they look
|
|
41
|
+
|
|
42
|
+
- [Quality route: a 3D scene that looks good](quality-route.md)
|
|
43
|
+
- [3D 消費專案接入與驗收契約](3d-integration.md)
|
|
44
|
+
- [3D 接入補強接收矩陣](3d-acceptance.md)
|
|
45
|
+
- [Film scenes for agents](film-scenes.md)
|
|
46
|
+
- [Filmic surfaces and HDR rendering](filmic-rendering.md)
|
|
47
|
+
- [Post quality: curves, colour tables, edges, occlusion, flare](post-quality.md)
|
|
48
|
+
- [Lighting depth: falloff, penumbra, shadow width, cascades, contact shadows](lighting-depth.md)
|
|
49
|
+
- [GPU depth: compute passes, wider shaders, surface pictures, object motion](gpu-depth.md)
|
|
50
|
+
- [HDR panoramas and the studio room](hdr-environment.md)
|
|
51
|
+
- [Stylized shading and the selection outline](stylized-shading.md)
|
|
52
|
+
- [Agent-friendly 2D/3D 地形與 Shader 契約](terrain-shader.md)
|
|
53
|
+
- [Grass](grass.md)
|
|
54
|
+
- [Many copies: instanced meshes and baked crowds](instanced-meshes.md)
|
|
55
|
+
- [Shader warm-up](shader-warm-up.md)
|
|
56
|
+
- [WebGPU delivery (1.11.0)](webgpu.md)
|
|
57
|
+
|
|
58
|
+
### Films and cameras
|
|
59
|
+
|
|
60
|
+
- [Deterministic presentation timelines](cinematics.md)
|
|
61
|
+
- [Fly-through benchmark and blind critic](flythrough.md)
|
|
62
|
+
|
|
63
|
+
### Models and characters
|
|
64
|
+
|
|
65
|
+
- [Blender / glTF / Laya model pipeline](model-pipeline.md)
|
|
66
|
+
- [Model compatibility, inspection and presentation (1.9.0)](model-showcase.md)
|
|
67
|
+
- [3D Model Editor](model-editor.md)
|
|
68
|
+
- [Model levels of detail](model-lod.md)
|
|
69
|
+
- [Animation control: mixing clips and bending bones](animation-control.md)
|
|
70
|
+
- [Spring bones](spring-bones.md)
|
|
71
|
+
- [Cloth](cloth.md)
|
|
72
|
+
- [VRM 1.0 avatars](vrm.md)
|
|
73
|
+
- [群體角色、特效預算與效能驗收(1.8.0)](crowd-runtime.md)
|
|
74
|
+
|
|
75
|
+
### Assets
|
|
76
|
+
|
|
77
|
+
- [Asset loading boundary](asset-loading.md)
|
|
78
|
+
- [KTX 2 / Basis textures](basis-textures.md)
|
|
79
|
+
- [Procedural assets](procedural-assets.md)
|
|
80
|
+
|
|
81
|
+
### Runtime
|
|
82
|
+
|
|
83
|
+
- [Combat runtime contracts](combat-runtime.md)
|
|
84
|
+
- [Walking: a walk grid, path finding and a character controller](walking.md)
|
|
85
|
+
- [Runtime hardening contracts](runtime-hardening.md)
|
|
86
|
+
- [Platform adapters](platform-adapters.md)
|
|
87
|
+
- [Audio contract](audio.md)
|
|
88
|
+
|
|
89
|
+
## Where the code is
|
|
90
|
+
|
|
91
|
+
| Path | What it holds |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| `packages/core/` | The SDK. `index.ts` is the public entry; `runtime3d/` is the runtime session, time layers, input, actions, models, cameras, look and most 3D features; `film/` is scenes as data; `procedural/` textures, props and synthesised sound; `particles/`, `effects/`, `terrain/`, `shaders/`, `audio/`, `csg/`, `simulation/`, `zhuda-engine-prefabs/` are what their names say. Files directly under `core/` are the 2D, layout, Spine, platform and audio adapters. |
|
|
94
|
+
| `packages/types/` | Public declarations, generated from `packages/core` by `npm run build`. Read these before using a helper. |
|
|
95
|
+
| `packages/compiler/` | Every command-line tool: build, init, Doctor, prefab and model editors, level-of-detail, mini-game packaging, the audits. |
|
|
96
|
+
| `packages/mcp-server/` | The MCP server and the film host: routes, guardrails, examples and validators for agents. |
|
|
97
|
+
| `packages/ci-gate/` | Sequence and film export checks. |
|
|
98
|
+
| `packages/demo/` | Legacy samples behind `zhuda-laya-engine/demo`. |
|
|
99
|
+
| `vendor/` | LayaAir 3.4.2 runtime libraries and the pinned third-party pieces, with their licences. |
|
|
100
|
+
| `src/`, `assets/` | The engine's own workbench app and its fixtures (`npm start`). Not a place for a game. |
|
|
101
|
+
| `examples/` | Small runnable hosts: browser SDK, model inspector, film capture, Windows WebGPU, a prefab workbench. |
|
|
102
|
+
| `games/` | The reference games and their recording tools. |
|
|
103
|
+
| `scripts/` | One `verify-*.mjs` per browser check, each behind an `npm run verify:<name>`; `lib/` is what they share. |
|
|
104
|
+
| `tests/` | Node tests: `npm test`. |
|
|
105
|
+
|
|
106
|
+
## Process records
|
|
107
|
+
|
|
108
|
+
[`plans/`](plans/README.md) holds the plan index, the task and verification templates every engine
|
|
109
|
+
change fills in, and under `plans/records/` one folder per finished task with what was done and how
|
|
110
|
+
it was checked. They are evidence for maintainers, not reading for someone building a game.
|
|
111
|
+
|
|
112
|
+
[Supporting the engine](SUPPORT.md).
|
package/docs/SUPPORT.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Support Zhuda's open-source work
|
|
2
|
+
|
|
3
|
+
[Back to the engine](../README.md) · [简体中文](zh-CN/README.md#支持这个引擎)
|
|
4
|
+
|
|
5
|
+
Contributions support Zhuda's work on **zhuda-laya-engine**: agent tooling, engine integration, documentation and testing on real devices.
|
|
6
|
+
|
|
7
|
+
## SOL / USDC on Solana
|
|
8
|
+
|
|
9
|
+
<img src="assets/solana-qr.png" width="246" alt="Solana wallet QR code for Zhuda" />
|
|
10
|
+
|
|
11
|
+
Scan this QR code with a Solana-compatible wallet, or copy the address below. The QR contains this exact public address, with no preset amount.
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
E4ZEhFCYy4b5pYXJUbMC9KjRitkypyqtZvpSRerLWHCb
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Network: Solana.** Send SOL or USDC using the Solana network.
|
|
18
|
+
|
|
19
|
+
[View this wallet on Solscan](https://solscan.io/account/E4ZEhFCYy4b5pYXJUbMC9KjRitkypyqtZvpSRerLWHCb)
|
|
20
|
+
|
|
21
|
+
This is voluntary support for the independent maintainer of this fork. LayaAir's upstream work remains credited to Layabox.
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Agent development guide
|
|
2
|
+
|
|
3
|
+
This guide is the operational companion to the repository contract in
|
|
4
|
+
[`../AGENTS.md`](../AGENTS.md). It is written for an agent that has to change a
|
|
5
|
+
large engine without losing track of scope, lifecycle or evidence.
|
|
6
|
+
|
|
7
|
+
For an external game, read the [canonical consumer route](consumer-route.md)
|
|
8
|
+
before writing `src/Main.ts`. The engine workbench quick start and a consumer
|
|
9
|
+
project use different build roots; do not copy the workbench into a game.
|
|
10
|
+
|
|
11
|
+
## Start from a route
|
|
12
|
+
|
|
13
|
+
Before researching how to build anything, look in [implementation routes](routes/README.md)
|
|
14
|
+
(docs/routes), or call `list_routes` and `get_route` on the MCP server. A route is one
|
|
15
|
+
page in one format: a workflow every project of its kind takes, or a scene already
|
|
16
|
+
built end to end on this engine and checked on devices, with its steps, pitfalls and
|
|
17
|
+
limits. When you finish a new kind of thing, add a route from
|
|
18
|
+
[its template](routes/TEMPLATE.md).
|
|
19
|
+
|
|
20
|
+
## Start with a bounded task
|
|
21
|
+
|
|
22
|
+
Copy [`plans/TASK-TEMPLATE.md`](plans/TASK-TEMPLATE.md) into the task record
|
|
23
|
+
and fill every required section before coding. The source requirement can be a
|
|
24
|
+
user request, issue, design note or migration report; quote the relevant file
|
|
25
|
+
or URL and keep the original wording available. Separate:
|
|
26
|
+
|
|
27
|
+
- **invariants** — behavior that must not change, such as consumer-owned
|
|
28
|
+
damage rules or the `AssetProvider` release contract;
|
|
29
|
+
- **scope** — exact engine packages, public types and fixtures that may change;
|
|
30
|
+
- **non-goals** — adjacent work that must stay out of this patch;
|
|
31
|
+
- **acceptance** — observable checks with a command, input and expected result;
|
|
32
|
+
- **evidence** — the artifact produced by each check;
|
|
33
|
+
- **unverified limits** — what still needs a browser, device or consumer.
|
|
34
|
+
|
|
35
|
+
The MCP server exposes the same checklist:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
node packages/mcp-server/index.mjs --tool get_agent_contract
|
|
39
|
+
node packages/mcp-server/index.mjs --tool validate_task_spec \
|
|
40
|
+
--args '{"task":{"id":"asset-provider-retry","source":"docs/asset-loading.md","goal":"...","invariants":["logical IDs remain stable"],"dependencies":[],"scope":{"engine":["packages/core/runtime3d/AssetProvider.ts"],"consumer":[]},"nonGoals":["packed WASM"],"acceptance":["npm test"],"evidence":[],"unverifiedLimits":["real iPhone"]}}'
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Before choosing a Laya API, call `search_api_guardrails` or retrieve a golden
|
|
44
|
+
example. Before changing a topology or migration, call the matching audit
|
|
45
|
+
tool. A tool result is evidence for its stated scope only.
|
|
46
|
+
|
|
47
|
+
## Understand the layers
|
|
48
|
+
|
|
49
|
+
The engine is organized as a set of public seams:
|
|
50
|
+
|
|
51
|
+
1. **Compiler and topology** — `packages/compiler/` turns a consumer entry
|
|
52
|
+
point into an ordered, pruned build and reports errors.
|
|
53
|
+
2. **Public runtime** — `packages/core/` and `packages/types/` expose the
|
|
54
|
+
stable API. Version-specific Laya repairs stay in adapters.
|
|
55
|
+
3. **Resource lifecycle** — `AssetProvider`, shared cache leases and scene
|
|
56
|
+
lifecycle own loading, cancellation, decoding and destruction.
|
|
57
|
+
4. **Presentation contracts** — terrain, surfaces/shaders, particles, Spine,
|
|
58
|
+
camera, queries and clocks describe rendering inputs and outputs. The
|
|
59
|
+
consumer remains authoritative for gameplay.
|
|
60
|
+
5. **MCP and Doctor** — `packages/mcp-server/` provides machine-readable
|
|
61
|
+
guidance; `packages/compiler/zhuda-doctor.mjs` blocks known mistakes.
|
|
62
|
+
|
|
63
|
+
When a request spans layers, make the boundary explicit. For example, a
|
|
64
|
+
height sampler can be provided by a game to the terrain renderer, but a new
|
|
65
|
+
engine heightfield must not quietly decide where a player's raft can move.
|
|
66
|
+
|
|
67
|
+
## Safe implementation loop
|
|
68
|
+
|
|
69
|
+
1. Read the relevant plan and public declarations.
|
|
70
|
+
2. Find a nearest existing implementation and test. Prefer extending a
|
|
71
|
+
contract over adding a parallel helper.
|
|
72
|
+
3. Add a failing fixture for the new invariant or failure mode.
|
|
73
|
+
4. Implement the smallest change. Keep serialization deterministic and avoid
|
|
74
|
+
hidden globals.
|
|
75
|
+
5. Test cancellation, timeout, stale async results, disposal and context
|
|
76
|
+
loss whenever a resource or browser API is involved.
|
|
77
|
+
6. Add or update the public `.d.ts` and strict consumer fixture.
|
|
78
|
+
7. Run focused tests, then `npm run verify` from a clean working tree view.
|
|
79
|
+
8. Write the verification record and state what a real browser/device still
|
|
80
|
+
has to prove.
|
|
81
|
+
|
|
82
|
+
For asynchronous resources, the expected state sequence is
|
|
83
|
+
`requested → downloading → verifying → ready` or a bounded error. An owner
|
|
84
|
+
that is disposed during any step must reject or cancel the request and ignore
|
|
85
|
+
the late completion. Do not leave an endless spinner, an unhandled rejection,
|
|
86
|
+
or a duplicate canvas/listener behind.
|
|
87
|
+
|
|
88
|
+
## Visual and 3D work
|
|
89
|
+
|
|
90
|
+
Follow the [prefab authoring and isolated acceptance gates](prefab-workflow.md)
|
|
91
|
+
for visual work. Fill the prefab section of the task and verification records.
|
|
92
|
+
Resolve missing or stale node evidence before scene assembly. After integration
|
|
93
|
+
the same prefab ID and child path must still open in the independent preview.
|
|
94
|
+
|
|
95
|
+
Asset migration precedes gameplay wiring. Inventory model/texture/atlas/Spine
|
|
96
|
+
versions and presentation states first, then validate shader and terrain data,
|
|
97
|
+
then connect the existing consumer rules. Use the visual migration and visual
|
|
98
|
+
contract audits before claiming parity. A validator, screenshot byte match or
|
|
99
|
+
synthetic frame benchmark cannot establish device performance or visual parity
|
|
100
|
+
by itself.
|
|
101
|
+
|
|
102
|
+
For terrain, compare CPU and GPU height/normal samples at fixed coordinates and
|
|
103
|
+
time; test top, side and underside queries, bounds, parent transforms and
|
|
104
|
+
camera collision. A heightfield cannot represent caves or overhangs. For
|
|
105
|
+
shaders, document color space, normal/metallic channels, blend/depth passes,
|
|
106
|
+
fog, instancing and fallback quality. For particles and Spine, test target
|
|
107
|
+
scope, event deduplication, mask restoration and repeated disposal.
|
|
108
|
+
|
|
109
|
+
For cinematic or visual-sequence evidence, use
|
|
110
|
+
`node packages/ci-gate/verify-sequence.mjs` with fixed timestamps, the actual
|
|
111
|
+
renderer report and bounded metric assertions. `get_model_capabilities` and
|
|
112
|
+
`validate_timeline_spec` expose the current contracts through MCP. The sequence
|
|
113
|
+
gate checks evidence integrity; `--reference` additionally compares PNG pixels
|
|
114
|
+
against separately reviewed references. Capture does not approve a reference.
|
|
115
|
+
A first-frame screenshot or a synthetic report does not prove a timeline,
|
|
116
|
+
device or performance contract. See [cinematics](cinematics.md) for limits.
|
|
117
|
+
|
|
118
|
+
A scripted press or drag sent right after the page loads is lost: the start
|
|
119
|
+
splash takes pointer input until it is gone (at least 2.2 seconds, longer
|
|
120
|
+
while the page is still loading; WebGL is ready sooner than that). Wait for `window.__ZHUDA_SPLASH__.completed` before
|
|
121
|
+
the first input, as `tests/fixtures/stylized-shading.ts` does.
|
|
122
|
+
`completed` means the splash is leaving, not that it is off the picture: it
|
|
123
|
+
fades over the page for another 420 ms and `#zhudaLogoSplash` is removed at
|
|
124
|
+
460 ms. A check that screenshots the page waits until that node is gone, as
|
|
125
|
+
`scripts/verify-procedural-draw.mjs` does; reading the canvas's own pixels
|
|
126
|
+
does not need to.
|
|
127
|
+
`window.__ZHUDA_SPLASH__.gone` is true once the node is out, the page sends
|
|
128
|
+
`zhuda:splash-gone` on `window` once, and `await whenZhudaSplashGone()` waits for
|
|
129
|
+
exactly that (at once where there is no splash; it rejects after 30 seconds on a
|
|
130
|
+
page that never finishes loading).
|
|
131
|
+
|
|
132
|
+
## Evidence and handoff
|
|
133
|
+
|
|
134
|
+
Use [`plans/VERIFICATION-TEMPLATE.md`](plans/VERIFICATION-TEMPLATE.md) for the
|
|
135
|
+
final record. Each row must include the exact command, commit SHA, runtime
|
|
136
|
+
environment, pass/fail/unavailable result and an artifact path. Include:
|
|
137
|
+
|
|
138
|
+
- unit and strict type checks;
|
|
139
|
+
- compiler/MCP/Doctor output;
|
|
140
|
+
- browser/WebGL result when rendering changed;
|
|
141
|
+
- device, DPR, browser and duration for mobile checks;
|
|
142
|
+
- resource counts before/after repeated load and unload;
|
|
143
|
+
- known limits, fallback path and rollback point.
|
|
144
|
+
|
|
145
|
+
An acceptance report that says “looks good” is incomplete. If a check could not
|
|
146
|
+
run, write `UNAVAILABLE` with the reason and keep the capability unaccepted.
|
|
147
|
+
The next agent should be able to reproduce the result from the report without
|
|
148
|
+
reconstructing conversation context.
|
|
149
|
+
|
|
150
|
+
### A draw check on a phone
|
|
151
|
+
|
|
152
|
+
Every `verify-*.mjs` draw check starts a headless Chrome on this machine. The
|
|
153
|
+
same check, unchanged, runs with the Chrome on an Android phone as its
|
|
154
|
+
browser when `ZHUDA_PHONE_CHROME` names where the phone's debugging port was
|
|
155
|
+
forwarded to:
|
|
156
|
+
|
|
157
|
+
```sh
|
|
158
|
+
adb forward tcp:9333 localabstract:chrome_devtools_remote
|
|
159
|
+
# on the phone: Chrome open, a tab at about:blank, the screen on
|
|
160
|
+
ZHUDA_PHONE_CHROME=http://127.0.0.1:9333 npm run verify:lit-surface
|
|
161
|
+
ZHUDA_PHONE_CHROME=http://127.0.0.1:9333 LIT_SURFACE_RENDERER=webgpu npm run verify:lit-surface
|
|
162
|
+
adb forward --remove tcp:9333
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
- The check serves its page on this machine's loopback; the phone reaches it
|
|
166
|
+
through `adb reverse`, made when the check navigates there and taken away
|
|
167
|
+
when it closes. `ZHUDA_PHONE_ADB` names the `adb` to use when it is not on
|
|
168
|
+
the path.
|
|
169
|
+
- Only a blank tab, or one already at a page of this machine's loopback, is
|
|
170
|
+
used. It is brought to the front (a tab that is not shown draws no frames)
|
|
171
|
+
and left at about:blank. The phone's other tabs are not read, and no
|
|
172
|
+
setting of the phone is changed: keep the screen from sleeping yourself.
|
|
173
|
+
- On WebGPU, LayaAir asks for thirteen features it can do without and used
|
|
174
|
+
to warn about each one the adapter lacks ("WebGPU: float32-filterable is
|
|
175
|
+
not supported by the adapter."), which a check takes for a GPU warning.
|
|
176
|
+
The engine now asks only for what the adapter has and reports the rest
|
|
177
|
+
in the renderer's `optionalFeatures` (GFX-01), so such lines no longer
|
|
178
|
+
appear. For a build from before that, `ZHUDA_PHONE_NOTICES=<file>` still
|
|
179
|
+
appends them to the file and keeps them from the check; record the file
|
|
180
|
+
with the result.
|
|
181
|
+
- The check's verdict is the phone's: the GPU it names is the phone's, and a
|
|
182
|
+
check that fails there has failed there. Do not widen a tolerance to make
|
|
183
|
+
a phone pass; record the number.
|
|
184
|
+
- Times a check prints are the phone's. Its waits are the desktop's: a slow
|
|
185
|
+
page may run out of them, which is a result too.
|
|
186
|
+
|
|
187
|
+
## Windows hardware runs
|
|
188
|
+
|
|
189
|
+
Hosted CI runs Windows with a software renderer (`windows` job in
|
|
190
|
+
`.github/workflows/verify.yml`): it proves the scripts start, link, import
|
|
191
|
+
and clean up there, not what a GPU draws. A Windows hardware result comes
|
|
192
|
+
from a machine with the GPU, and only from its signed-in desktop session:
|
|
193
|
+
|
|
194
|
+
- In a service or SSH session (session 0, no desktop) Chrome draws WebGL but
|
|
195
|
+
WebGPU frames come out white and some pages get no context, at any
|
|
196
|
+
commit. Run the checks as the signed-in user, for example through a
|
|
197
|
+
scheduled task with an interactive logon (`New-ScheduledTaskPrincipal
|
|
198
|
+
-LogonType Interactive -RunLevel Limited`, which is also a standard,
|
|
199
|
+
non-administrator token), with the window hidden.
|
|
200
|
+
- Use Node 24 or later; run npm-based checks through `npm run` (the scripts
|
|
201
|
+
find npm's own CLI; `ZHUDA_NPM_CLI` names it otherwise).
|
|
202
|
+
- Chrome picks the integrated GPU by default on a laptop-style dual-GPU
|
|
203
|
+
machine; record which adapter ran (each check prints it) and do not
|
|
204
|
+
call a run on one GPU a result for the other.
|
|
205
|
+
- After each check, no `chrome.exe`/`msedge.exe` whose command line names a
|
|
206
|
+
`zhuda-*-browser-` profile should remain, and no such folder in `%TEMP%`
|
|
207
|
+
should be added.
|
|
208
|
+
|
|
209
|
+
The checks and the order used for the Windows acceptance plan are in
|
|
210
|
+
`docs/plans/records/windows-acceptance/` (each item's verification record
|
|
211
|
+
names the command, the session and the result).
|
|
212
|
+
|
|
213
|
+
## Making a 3D scene look good
|
|
214
|
+
|
|
215
|
+
Follow the [quality route](quality-route.md): the steps, in order, from an
|
|
216
|
+
empty scene to a frame that reads as lit, grounded and deep, with the check
|
|
217
|
+
for each step and the list of what is not built yet. The MCP tool
|
|
218
|
+
`get_quality_route` returns the same route as data; the `film_*` tools return
|
|
219
|
+
`advice` for a scene and `metrics` for a preview.
|