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,204 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"host": "https://game.qianlongxundao.com",
|
|
4
|
+
"gameId": "zhuda-engine-sdk",
|
|
5
|
+
"launchUrl": "https://game.qianlongxundao.com/play/zhuda-engine-sdk/",
|
|
6
|
+
"releases": [
|
|
7
|
+
{
|
|
8
|
+
"version": "2.1.0",
|
|
9
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/006db04ef9b45b9dea00298c041628e2/",
|
|
10
|
+
"summary": "隨引擎 2.1.0:共用元件庫移到獨立倉庫 zhuda-engine-prefabs,引擎套件不再附帶;執行期和 2.0.1 相同,只少了三行不影響行為的死碼(點陣字量測裡沒用到的驗證、場景預算報告裡沒用到的物件、材質釋放時沒用到的讀取)",
|
|
11
|
+
"zipSha256": "a118535db4afbec30fadba9b8a10de7b55389a3b43f1745da4d86d9486e008cf",
|
|
12
|
+
"files": {
|
|
13
|
+
"zhuda-2d.js": {
|
|
14
|
+
"bytes": 2590558,
|
|
15
|
+
"integrity": "sha384-WDBuJ+z7z1wuqiTQLWHQ0d7EXwkxLqAaFt8JAVFbBi+nIDgxzdohUPCTYa5Pu4d9"
|
|
16
|
+
},
|
|
17
|
+
"zhuda-3d.js": {
|
|
18
|
+
"bytes": 3352192,
|
|
19
|
+
"integrity": "sha384-NTBqkN70K04g0dnVoY2EilpF5+LB8o9KsOISjiNZJQubFzDb7IxzlDL7q5YJvlBv"
|
|
20
|
+
},
|
|
21
|
+
"zhuda-3d-gltf.js": {
|
|
22
|
+
"bytes": 3512040,
|
|
23
|
+
"integrity": "sha384-XYJT6DSZAUT51+3LO9f413GBi1sA6yPEesBsZdisgEHz3AqnZnTPHwXNy/9mJQMB"
|
|
24
|
+
},
|
|
25
|
+
"zhuda-2d-webgpu.js": {
|
|
26
|
+
"bytes": 11170228,
|
|
27
|
+
"integrity": "sha384-gaQdjKZB5O3XpS5WbJMcpKau9+ER5LuWth2E9gbeBJiC9fTliJUeiL/tgCkXb0aQ"
|
|
28
|
+
},
|
|
29
|
+
"zhuda-3d-webgpu.js": {
|
|
30
|
+
"bytes": 12195069,
|
|
31
|
+
"integrity": "sha384-d4FYe0YERIM4N+P8iZyWF256yRBLYsMuRQ9JMHBkT76FBNV1dVBuo08lKVneekSk"
|
|
32
|
+
},
|
|
33
|
+
"zhuda-3d-gltf-webgpu.js": {
|
|
34
|
+
"bytes": 12354917,
|
|
35
|
+
"integrity": "sha384-7fWFpJwf7JMeQPFnb5k3PnU8IKAVp9FDe9le6D4varKza2DXN7CLZb95HDzRtnkg"
|
|
36
|
+
},
|
|
37
|
+
"zhuda-loader.js": {
|
|
38
|
+
"bytes": 5296,
|
|
39
|
+
"integrity": "sha384-FmDNakBoXVPCe7Figek+RpLJFgJLw9Ut/JgewRRqZwKs76/R0Av9HC+gfsLo1avZ"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"version": "2.0.1",
|
|
45
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/85f1c2242618da10dafcbc637e717e34/",
|
|
46
|
+
"summary": "2.0 系列:共用元件庫與路線庫併入引擎、九款參考遊戲;glTF 動作交叉淡化、boot 的 layoutSize、開場畫面結束的訊號;頁面上的 film stage 由 prepare 套用鏡頭,畫質分級保留掛載時固定的反彈光與調色表",
|
|
47
|
+
"zipSha256": "ff4631f851bd8a472eb4a6d2e521f0cb482c007b2602b75e08ba0bf8711e6932",
|
|
48
|
+
"files": {
|
|
49
|
+
"zhuda-2d.js": {
|
|
50
|
+
"bytes": 2590618,
|
|
51
|
+
"integrity": "sha384-Pm7Dwg1hoLE0WYnN6IDfjfQkRv3Gg5GSb4cze8Ao+9f817DVBH4x+R9jDiD7O4b2"
|
|
52
|
+
},
|
|
53
|
+
"zhuda-3d.js": {
|
|
54
|
+
"bytes": 3352252,
|
|
55
|
+
"integrity": "sha384-LrjogBuKLSvnDDCTT2+5P/Yn5CU+u1FoWGpPATNmmUFxAO6+mpTd8JalkdeY0bRz"
|
|
56
|
+
},
|
|
57
|
+
"zhuda-3d-gltf.js": {
|
|
58
|
+
"bytes": 3512100,
|
|
59
|
+
"integrity": "sha384-wG92xJ3S0C544Vlp7vLBh693KJLSzFHhr7o41CEJw9X7036Z3V++Re/kXrkMZyjH"
|
|
60
|
+
},
|
|
61
|
+
"zhuda-2d-webgpu.js": {
|
|
62
|
+
"bytes": 11170288,
|
|
63
|
+
"integrity": "sha384-oB6O1Rm6XbtiT1dwplF+86MYxzcWtyaogEWQt25Irc588agQcq4aRJ8ivgnmijE/"
|
|
64
|
+
},
|
|
65
|
+
"zhuda-3d-webgpu.js": {
|
|
66
|
+
"bytes": 12195129,
|
|
67
|
+
"integrity": "sha384-p6vJSDaf70f7mqhfNporKYhAZHn5MHZehCqYmaksPsh/wSV3xRai17UvaiUqBiHV"
|
|
68
|
+
},
|
|
69
|
+
"zhuda-3d-gltf-webgpu.js": {
|
|
70
|
+
"bytes": 12354977,
|
|
71
|
+
"integrity": "sha384-C548gtNVGy4zvP5Njn1Fe+xGcUT0Hax2iiSJOXjkHkLwMR70tbv07DuoZQjXeGAn"
|
|
72
|
+
},
|
|
73
|
+
"zhuda-loader.js": {
|
|
74
|
+
"bytes": 5296,
|
|
75
|
+
"integrity": "sha384-yrMH4UlhPABtlaUOPRgoIYxhrlU8mAkS3ZAa9C0eFfh1tEvYCEYD/mABk/+N7w3P"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"version": "1.17.0",
|
|
81
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/b7eb3412d6025fb0d2facb448d77c606/",
|
|
82
|
+
"summary": "程序化資產管線(CPU 烘焙無縫 PBR 配方、幾何工具、帶碰撞的道具與依材質合併、合成音效);編輯器預設拒絕遠端綁定",
|
|
83
|
+
"zipSha256": "5746e2e5bb97ae26149ec5af064767ca8af89c9c3e0586d3ef94983e9bc8d0cf",
|
|
84
|
+
"files": {
|
|
85
|
+
"zhuda-2d.js": {
|
|
86
|
+
"bytes": 1693231,
|
|
87
|
+
"integrity": "sha384-BDDbJEVe2HoEzVzFefzvFJz7DbZIbpAG/uU1LTGrQNGjBSsMjdI8e/T0AL6iE+pB"
|
|
88
|
+
},
|
|
89
|
+
"zhuda-3d.js": {
|
|
90
|
+
"bytes": 2454865,
|
|
91
|
+
"integrity": "sha384-e0IgtTwm8STcgMcPmZKPH3TB8tBSQQk15egr3chALF9cj5VybCgbZhHJovpAhUZ3"
|
|
92
|
+
},
|
|
93
|
+
"zhuda-3d-gltf.js": {
|
|
94
|
+
"bytes": 2614713,
|
|
95
|
+
"integrity": "sha384-rvnFKMgm5aNAT5flLhK6QuQbKZXzLn6Qr74DpAU6rEBjl5vXxKjUMYaPDl8/1NQa"
|
|
96
|
+
},
|
|
97
|
+
"zhuda-2d-webgpu.js": {
|
|
98
|
+
"bytes": 10270871,
|
|
99
|
+
"integrity": "sha384-XZDGoNiF8X6nhbAywSmAxzDOduvP7bk/zkc5kNzXjvNH9dKoxg8foEf/71wlzBJ6"
|
|
100
|
+
},
|
|
101
|
+
"zhuda-3d-webgpu.js": {
|
|
102
|
+
"bytes": 11295712,
|
|
103
|
+
"integrity": "sha384-m0cZ1z/Uo15GhaM0XY2FejMTGTyXztiFjyabQRHt8N1ThGujETjjliUE7gA3oNX1"
|
|
104
|
+
},
|
|
105
|
+
"zhuda-3d-gltf-webgpu.js": {
|
|
106
|
+
"bytes": 11455560,
|
|
107
|
+
"integrity": "sha384-Os6zGYStQlfCc6Q7X2MzbQcae4lLMji3FN4pY2EiOSOykZb2uED3qHQCK5DvTZEW"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"version": "1.16.0",
|
|
113
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/b01e6d56ee85df1b0c529760aa80b3c1/",
|
|
114
|
+
"summary": "編輯器請求防護、可安裝的 CLI、由原始碼產生的公開型別(Bundler/Node16/NodeNext)、精簡且可重現的套件;舊示範程式只在 /demo 子路徑",
|
|
115
|
+
"zipSha256": "e47b8ffe98574e52116fd02c653752dd8ed17aeb9cd567c6f3c0c195882b1aab",
|
|
116
|
+
"files": {
|
|
117
|
+
"zhuda-2d.js": {
|
|
118
|
+
"bytes": 1664501,
|
|
119
|
+
"integrity": "sha384-WhmijbLEpaN+O/kkqHCaSCRXZCZWcvzzICLMhs41y5QBGMppHl9Tx8h5GhFUCDNV"
|
|
120
|
+
},
|
|
121
|
+
"zhuda-3d.js": {
|
|
122
|
+
"bytes": 2426135,
|
|
123
|
+
"integrity": "sha384-zmHAcJXhNAKiluI48y5IGB303epH5OTvsuox/gPlssvuuhMszBRqs4ET8m8M6MMo"
|
|
124
|
+
},
|
|
125
|
+
"zhuda-3d-gltf.js": {
|
|
126
|
+
"bytes": 2585983,
|
|
127
|
+
"integrity": "sha384-7rC9jcd68wYFHToQKCjjPb4+xlmBL5ht0BmCNOlucmO0hWc1MFP7rlvJmwcd7e86"
|
|
128
|
+
},
|
|
129
|
+
"zhuda-2d-webgpu.js": {
|
|
130
|
+
"bytes": 10242141,
|
|
131
|
+
"integrity": "sha384-omzaxwTsc/ZJA7d1172b7IF3bYfmbh7092zwGwTgNY6Wu5fD020fvsfoMDkWb6q5"
|
|
132
|
+
},
|
|
133
|
+
"zhuda-3d-webgpu.js": {
|
|
134
|
+
"bytes": 11266982,
|
|
135
|
+
"integrity": "sha384-DrQNptfjUNThQfxmDWHEIRC3k1yjM6jWg9x/Ptt0mQMU8gd38UGEVqPajhO8n7sf"
|
|
136
|
+
},
|
|
137
|
+
"zhuda-3d-gltf-webgpu.js": {
|
|
138
|
+
"bytes": 11426830,
|
|
139
|
+
"integrity": "sha384-THrCfUEZAD1Q0Q3pkijV4X+C0mzaGTmV24c6C6knpRdb5gYZC4nP777OP5oBXeNm"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"version": "1.15.0",
|
|
145
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/9c61e10983b1ba814a16104b4e790f0b/",
|
|
146
|
+
"summary": "設計座標/DPR、文字與 BitmapFont、Laya 內嵌影片/WebView 生命週期契約;保留電影、WebGPU、WebGL 與白牌",
|
|
147
|
+
"zipSha256": "b10b248deb2580c8cea2eafa81a1bfed451a6a2c8be894c9196d5c8e525120ac",
|
|
148
|
+
"files": {
|
|
149
|
+
"zhuda-2d.js": {
|
|
150
|
+
"bytes": 1695399,
|
|
151
|
+
"integrity": "sha384-pjQaJ62vNI0OdKiXKu3yfckWIVuBFKNObpi37KMmCAD8ra03qT/r6x2YbOsD++S8"
|
|
152
|
+
},
|
|
153
|
+
"zhuda-3d.js": {
|
|
154
|
+
"bytes": 2457033,
|
|
155
|
+
"integrity": "sha384-5w1AXjxtR188sgMCZGjHy96UAhjV6kkgk0V3024wCvULx+DiB2MNcBPU2178LlvD"
|
|
156
|
+
},
|
|
157
|
+
"zhuda-3d-gltf.js": {
|
|
158
|
+
"bytes": 2616881,
|
|
159
|
+
"integrity": "sha384-UHsrb0hgk64iX/qp/kYLye706la8vWrJ4w+/CvrcRLPvndaGUajmdDa7ndn7jqm0"
|
|
160
|
+
},
|
|
161
|
+
"zhuda-2d-webgpu.js": {
|
|
162
|
+
"bytes": 10273039,
|
|
163
|
+
"integrity": "sha384-QXFO/MusEyh76qoiZ2gGJ051+V5IlZiy1JVROLVsmcRLbRMaVwInpK6l4NWWe2mi"
|
|
164
|
+
},
|
|
165
|
+
"zhuda-3d-webgpu.js": {
|
|
166
|
+
"bytes": 11297880,
|
|
167
|
+
"integrity": "sha384-9qRpBHu1VyF12uSrWT9JUckn3MSqMDQPSlYhjggfVP3/u+/pWOsjF/DQfEZ9nuhm"
|
|
168
|
+
},
|
|
169
|
+
"zhuda-3d-gltf-webgpu.js": {
|
|
170
|
+
"bytes": 11457728,
|
|
171
|
+
"integrity": "sha384-cZoJASWvT5xHMX0doGKGd6pLCDd8VYgL8KF++zxImby6uX2NRbrfYBHRhW5v+aP7"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"version": "1.13.0",
|
|
177
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/d736a66a3dc72499963c6266914056da/"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"version": "1.11.0",
|
|
181
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/00b72197334c12e756e8c7e812c927fd/"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"version": "1.10.0",
|
|
185
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/5d05c7177ff7fd71fd35114f3a324172/"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"version": "1.9.0",
|
|
189
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/c61d0a83b7094ff5055302d2f8235b8b/"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"version": "1.8.0",
|
|
193
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/02b2dc8ba9dea9d1f1cd43a37226641c/"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"version": "1.7.0",
|
|
197
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/e69ecb8850e43d172389f96ab0a9430e/"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"version": "1.6.0",
|
|
201
|
+
"contentUrl": "https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/02b62daf1d3a8cdac423f35428454ce8/"
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# 單一 HTML 的 Browser SDK 路線
|
|
2
|
+
|
|
3
|
+
1.6.0 起,HTML 可以直接載入真正的 LayaAir runtime 和 Zhuda 公開 SDK,
|
|
4
|
+
不需要在瀏覽器執行 npm、TypeScript 或依賴 IDE。
|
|
5
|
+
[線上入口](https://game.qianlongxundao.com/play/zhuda-engine-sdk/)提供 2D/3D 範例。
|
|
6
|
+
|
|
7
|
+
## 給 agent 的最短指令
|
|
8
|
+
|
|
9
|
+
> 要用單一 HTML 開發時,從 [3D 範本](../examples/browser-sdk/3d.html) 或
|
|
10
|
+
> [2D 範本](../examples/browser-sdk/2d.html) 開始。保留固定版本 script URL、
|
|
11
|
+
> integrity 與 crossorigin,從 `Zhuda` 取得公開 API。不要建立假的 Zhuda 類別、
|
|
12
|
+
> 載入另一套渲染器或自行初始化另一個 Laya。先讀公開宣告再呼叫 API。
|
|
13
|
+
> 遊戲與隔離預覽共用 Prefab 定義,邏輯時間/輸入/音訊/釋放仍遵守引擎契約。
|
|
14
|
+
|
|
15
|
+
上述範本是一份 HTML,script 已使用完整 HTTPS 固定網址,可以複製到其他
|
|
16
|
+
HTTP 站台。這是**HTML 單檔來源+網路 SDK**,不是離線完全自包含檔案。
|
|
17
|
+
外部 Canvas/Artifacts/嵌入沙箱必須允許此來源的腳本;若其 CSP 不允許,
|
|
18
|
+
SDK 無法自行繞過政策,需用允許的附件資源或一般 HTTP 預覽。
|
|
19
|
+
|
|
20
|
+
## 固定版本與載入方式
|
|
21
|
+
|
|
22
|
+
<!-- browser-sdk-release:start (generated by scripts/release-browser-sdk.mjs from docs/browser-sdk-releases.json) -->
|
|
23
|
+
本次固定發行:**2.1.0**(隨引擎 2.1.0:共用元件庫移到獨立倉庫 zhuda-engine-prefabs,引擎套件不再附帶;執行期和 2.0.1 相同,只少了三行不影響行為的死碼(點陣字量測裡沒用到的驗證、場景預算報告裡沒用到的物件、材質釋放時沒用到的讀取))。
|
|
24
|
+
最新版本永遠記錄在 [browser-sdk-releases.json](browser-sdk-releases.json) 的第一筆,
|
|
25
|
+
[SDK 入口](https://game.qianlongxundao.com/play/zhuda-engine-sdk/) 也總是開啟最新版本。
|
|
26
|
+
歷史固定版本仍保留,請依需求固定完整版本網址:
|
|
27
|
+
[2.0.1](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/85f1c2242618da10dafcbc637e717e34/)、
|
|
28
|
+
[1.17.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/b7eb3412d6025fb0d2facb448d77c606/)、
|
|
29
|
+
[1.16.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/b01e6d56ee85df1b0c529760aa80b3c1/)、
|
|
30
|
+
[1.15.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/9c61e10983b1ba814a16104b4e790f0b/)、
|
|
31
|
+
[1.13.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/d736a66a3dc72499963c6266914056da/)、
|
|
32
|
+
[1.11.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/00b72197334c12e756e8c7e812c927fd/)、
|
|
33
|
+
[1.10.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/5d05c7177ff7fd71fd35114f3a324172/)、
|
|
34
|
+
[1.9.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/c61d0a83b7094ff5055302d2f8235b8b/)、
|
|
35
|
+
[1.8.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/02b2dc8ba9dea9d1f1cd43a37226641c/)、
|
|
36
|
+
[1.7.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/e69ecb8850e43d172389f96ab0a9430e/)、
|
|
37
|
+
[1.6.0](https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/02b62daf1d3a8cdac423f35428454ce8/)。
|
|
38
|
+
|
|
39
|
+
`https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/006db04ef9b45b9dea00298c041628e2/`
|
|
40
|
+
|
|
41
|
+
| 檔案 | 包含內容 | 未壓縮 bytes |
|
|
42
|
+
| --- | --- | ---: |
|
|
43
|
+
| `zhuda-2d.js` | core、2D WebGL、UI、公開 Zhuda SDK | 2,590,558 |
|
|
44
|
+
| `zhuda-3d.js` | 上述內容加上 3D、3D WebGL | 3,352,192 |
|
|
45
|
+
| `zhuda-3d-gltf.js` | 3D 加上 glTF、postProcess | 3,512,040 |
|
|
46
|
+
| `zhuda-2d-webgpu.js` | 2D WebGPU、UI、內嵌 Shader WASM | 11,170,228 |
|
|
47
|
+
| `zhuda-3d-webgpu.js` | 2D/3D WebGPU、UI、內嵌 Shader WASM | 12,195,069 |
|
|
48
|
+
| `zhuda-3d-gltf-webgpu.js` | WebGPU 加上 glTF、postProcess、Shader WASM | 12,354,917 |
|
|
49
|
+
| `zhuda-loader.js` | 後端載入器:先問瀏覽器,再載入同名的 WebGPU 或 WebGL bundle | 5,296 |
|
|
50
|
+
<!-- browser-sdk-release:end -->
|
|
51
|
+
|
|
52
|
+
基本 2d/3d profile(含 WebGPU 變體)沒有打入額外的原生 Spine、物理、粒子、glTF 或其他 plugin。模型展示可選新增的 `3d-gltf` profile;
|
|
53
|
+
[可複製的 HTML 模型檢視器](../examples/browser-sdk/3d-gltf.html)
|
|
54
|
+
附帶相容性報告、動畫/Morph、三模式與重載測試。
|
|
55
|
+
WebGPU 用 [3D GPU 範本](../examples/browser-sdk/3d-webgpu.html)、[2D GPU 範本](../examples/browser-sdk/2d-webgpu.html) 或 [GPU 模型檢視器](../examples/browser-sdk/3d-gltf-webgpu.html)。
|
|
56
|
+
`ZhudaEngine.boot({renderer:"webgpu"})` 必須對應 GPU bundle;詳見 [後端/失敗/Windows 驗收契約](webgpu.md)。
|
|
57
|
+
|
|
58
|
+
同一個網址要同時服務有 WebGPU 與沒有 WebGPU 的瀏覽器時,用建置產出的 `zhuda-loader.js`
|
|
59
|
+
(gzip 後 2.2 KB):它先問瀏覽器有沒有硬體 adapter,再只載入 WebGPU 或 WebGL 其中一份 bundle,
|
|
60
|
+
為什麼落在 WebGL 記在 `context.renderer.fallbackReason`。建置同時產出每一對 bundle 的
|
|
61
|
+
`example-<profile>-auto.html`。寫法、判斷表,以及讓 GPU bundle 不內嵌編譯器 WASM、
|
|
62
|
+
改為啟動時抓取並依雜湊快取的 `--wasm external`,見[後端交付](backend-delivery.md)。
|
|
63
|
+
載入器要等下一次 SDK 發行才會出現在託管目錄;在那之前用 `zhuda-laya-browser-sdk --out` 自行建置。
|
|
64
|
+
|
|
65
|
+
電影 API 請用含 glTF/postProcess 的 `3d-gltf` 或 `3d-gltf-webgpu`,依
|
|
66
|
+
[電影工作流](cinematics.md)擷取畫格與音軌。MP4 編碼是 Node CLI,不能在站內
|
|
67
|
+
沙箱直接呼叫 FFmpeg;下載/檔案 IO 也受宿主政策限制。
|
|
68
|
+
|
|
69
|
+
公共函式仍與 package root 同一份;功能若依賴未載入的底層模組,不能只因
|
|
70
|
+
命名空間有函式就宣稱該功能可用。需要其他未打入的模組時走既有 npm consumer pipeline。
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<script
|
|
74
|
+
src="https://game.qianlongxundao.com/apps/zhuda-engine-sdk/releases/006db04ef9b45b9dea00298c041628e2/zhuda-3d.js"
|
|
75
|
+
integrity="sha384-NTBqkN70K04g0dnVoY2EilpF5+LB8o9KsOISjiNZJQubFzDb7IxzlDL7q5YJvlBv"
|
|
76
|
+
crossorigin="anonymous"></script>
|
|
77
|
+
<script>
|
|
78
|
+
const { ZhudaEngine, Zhuda3D } = Zhuda;
|
|
79
|
+
async function main() {
|
|
80
|
+
const context = await ZhudaEngine.boot({
|
|
81
|
+
container: '#game',
|
|
82
|
+
width: 640, height: 480, dprCap: 1.5,
|
|
83
|
+
features: [...ZhudaBundle.features]
|
|
84
|
+
});
|
|
85
|
+
const scene = Zhuda3D.createScene3D(context.rootScene);
|
|
86
|
+
Zhuda3D.createCamera(scene, {position: [0, 2, 6], rotationEuler: [-15, 0, 0]});
|
|
87
|
+
// Author and instantiate your Prefab through ZhudaPrefabLibrary here.
|
|
88
|
+
context.runtime.start(() => {});
|
|
89
|
+
window.addEventListener('pagehide', () => context.dispose(), {once: true});
|
|
90
|
+
}
|
|
91
|
+
main().catch(console.error);
|
|
92
|
+
</script>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
HTML 須先建立具有明確尺寸的 `#game` 容器;完整可畫出內容的例子見上方範本。
|
|
96
|
+
使用普通 script 並維持順序;不要加 async/defer 後立即在下一段 inline script
|
|
97
|
+
使用尚未載入的 `Zhuda`。同頁只載一份 bundle,重複/既有 Laya 會在改寫前明確拒絕。
|
|
98
|
+
|
|
99
|
+
`Zhuda` 的 runtime exports 與公開 ESM 入口相同,並未再寫一套 facade。
|
|
100
|
+
`ZhudaBundle` 回報版本、profile、renderer、模組清單、來源指紋與打包器版本。
|
|
101
|
+
bundle 預設掛載 LayaAir 標誌與「Powered by LayaAir Engine」的啟動畫面(向底層引擎致敬)。1.10.0 可在載入前設定
|
|
102
|
+
`window.ZhudaBranding={mode:"custom",brandId:"client",logo:"./logo.svg"}`,
|
|
103
|
+
或 `{mode:"none"}`;詳見[白牌契約](white-label-themes.md)。不要自行放入同名 splash。
|
|
104
|
+
|
|
105
|
+
## 取得最新版本
|
|
106
|
+
|
|
107
|
+
託管站每次發行都產生新的不可變目錄,沒有會變動的 latest script 網址;
|
|
108
|
+
就算有,SRI 也會在內容更新時讓舊頁面拒絕載入。最新版本的取得方式:
|
|
109
|
+
|
|
110
|
+
- 本 repo 的 [browser-sdk-releases.json](browser-sdk-releases.json) 第一筆就是最新發行,
|
|
111
|
+
範本與上方表格都由它產生,測試保證兩者一致。複製範本即取得最新版本與 integrity。
|
|
112
|
+
- [SDK 入口](https://game.qianlongxundao.com/play/zhuda-engine-sdk/) 永遠開啟最新版本。
|
|
113
|
+
- 伺服器端或工具可讀 `https://game.qianlongxundao.com/api/v1/games`,
|
|
114
|
+
`zhuda-engine-sdk` 的 `version` 就是最新目錄名稱(此 API 不開放瀏覽器跨來源讀取)。
|
|
115
|
+
|
|
116
|
+
升級時把 script 網址與 integrity 換成新版本的值;舊版本目錄不會被刪除。
|
|
117
|
+
|
|
118
|
+
## 引擎商發行流程
|
|
119
|
+
|
|
120
|
+
```sh
|
|
121
|
+
npm version <x.y.z> --no-git-tag-version # 同步 zhuda.config.json 的 version
|
|
122
|
+
npm run verify
|
|
123
|
+
npm run browser:drift # 原始碼若與同版號的已發行版不同就失敗,要先升版號
|
|
124
|
+
GAME_UPLOAD_TOKEN=... npm run release:browser -- --summary "本版重點"
|
|
125
|
+
npm run browser:check
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`release:browser` 會建置六份 bundle、上傳不可變 ZIP、逐檔比對託管內容與跨來源
|
|
129
|
+
標頭,並把新版本寫入 `browser-sdk-releases.json`,再改寫範本與本文件的網址/integrity。
|
|
130
|
+
token 只經 curl 的標準輸入傳遞,不寫入檔案、參數或紀錄。
|
|
131
|
+
|
|
132
|
+
`sdk-manifest.json` 保存每份 bundle 的 SHA-256、SRI SHA-384、大小和來源檔雜湊。
|
|
133
|
+
固定版本不覆寫;不要在正式遊戲使用會變動的 latest/launch URL 作為 script URL。
|
|
134
|
+
SRI 不吻合時瀏覽器拒絕執行,不會悄悄改用另一個引擎。
|
|
135
|
+
|
|
136
|
+
## game.qianlongxundao.com 的兩種情境
|
|
137
|
+
|
|
138
|
+
- 外部 HTML 載入本站 SDK:本次已實測跨來源腳本+SRI、2D/3D WebGL 及 WebGPU。
|
|
139
|
+
JS 回應包含正確 MIME、`Access-Control-Allow-Origin: *`、跨來源資源政策與
|
|
140
|
+
一年 immutable 快取標頭。Cloudflare 邊緣快取是否命中需看實際回應。
|
|
141
|
+
- 站內遊戲沙箱:只允許**自己發行版本目錄**的資源。因此部署遊戲時,將同一份
|
|
142
|
+
bundle 放進遊戲 ZIP 並改為相對 `src`,SRI 保持不變。SDK 入口的同版本 demo
|
|
143
|
+
已在此沙箱實測。此功能沒有放寬平台 CSP、cookie、storage 或後端政策。
|
|
144
|
+
|
|
145
|
+
站台的內容來源仍是既有託管服務,Cloudflare 是 HTTPS/Tunnel 與快取入口,
|
|
146
|
+
不宣稱已改成獨立 Workers/R2 CDN。離線來源、首次下載、快取與可用性受站台環境影響。
|
|
147
|
+
遊戲素材仍走自己的 AssetProvider;引擎版本目錄不是遊戲資產庫。
|
|
148
|
+
|
|
149
|
+
## 建置、型別與正式交付
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
# engine checkout
|
|
153
|
+
npm run build
|
|
154
|
+
npm run build:browser
|
|
155
|
+
# installed public package
|
|
156
|
+
zhuda-laya-browser-sdk --out ./sdk-release
|
|
157
|
+
# optional: --profile 2d, 3d, 3d-gltf, 2d-webgpu, 3d-webgpu, 3d-gltf-webgpu
|
|
158
|
+
# optional: --wasm external(GPU bundle 不內嵌編譯器 WASM,檔案放在 bundle 旁)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
預設輸出 `dist/browser/<version>`。相同內容可以重用;若同目錄已有不同產物,
|
|
162
|
+
指令拒絕覆寫,請換新的輸出目錄。`verify:browser-sdk`、`verify:branding`、
|
|
163
|
+
`verify:webgpu` 不讀這個目錄:未指定 `SDK_BROWSER_DIR`(`verify:webgpu` 是
|
|
164
|
+
`WEBGPU_BROWSER_DIR`)時,各自把目前原始碼建到新的暫存目錄再檢查;要驗收某個
|
|
165
|
+
發行目錄時才指定它。esbuild 固定為 0.27.1,工具版本不一致會拒絕。
|
|
166
|
+
獨立安裝 tarball 的 CLI 與引擎 checkout 生成的完整產物已逐 byte 比對一致。
|
|
167
|
+
|
|
168
|
+
編輯器型別可以使用已安裝套件的
|
|
169
|
+
`/// <reference types="zhuda-laya-engine/browser" />`,或直接 reference 該套件的
|
|
170
|
+
`packages/types/browser.d.ts`。這只是既有 public declarations 的 全域 namespace;
|
|
171
|
+
不需要 `Laya: any`。1.7.0 已通過完整 `skipLibCheck:false` 宣告稽核。
|
|
172
|
+
|
|
173
|
+
**單一 HTML 的啟動成功是 browser runtime 證據,並不等於完成消費專案門禁。**
|
|
174
|
+
既有 Doctor 針對 npm/TS consumer,不把普通 HTML 直接當成完整檢查通過。
|
|
175
|
+
正式遊戲依 [consumer route](consumer-route.md) 保留版本、型別、Prefab 比對、
|
|
176
|
+
Scene/操作及目標裝置證據。Browser 範例的按鈕/計數也不能代替你的遊戲驗收。
|
|
177
|
+
|
|
178
|
+
1.11.0 結果見 [WebGPU 驗收](plans/records/webgpu-delivery/verification.md)。Windows 硬體尚待實機報告。
|
|
179
|
+
1.10.0 結果見[白牌與量產基礎驗收](plans/records/slot-factory-foundation/verification.md)。
|
|
180
|
+
1.9.0 結果見[模型展示與 SDK 驗收](plans/records/asset-showcase-hardening/verification.md)。
|
|
181
|
+
1.8.0 結果見 [群體與 SDK 發行驗收](plans/records/crowd-runtime-hardening/verification.md);
|
|
182
|
+
1.7.0 結果見 [當輪驗收記錄](plans/records/runtime-feedback/verification.md);
|
|
183
|
+
原始 Browser SDK 範圍見 [1.6.0 記錄](plans/records/browser-sdk-delivery/verification.md)。
|
|
184
|
+
|
|
185
|
+
站內沙箱禁止 Worker,因此 `ZhudaWorkerFrameDriver` 必須由 consumer 在支援的
|
|
186
|
+
外部頁面選用,或明確回退到 RAF。Worklet/Blob media 也受各站 CSP 約束;
|
|
187
|
+
此發行不更動伺服器沙箱,不能宣稱所有音訊/背景策略在站內都已驗收。
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Deterministic presentation timelines
|
|
2
|
+
|
|
3
|
+
Agents that author whole scenes as data use [film scenes](film-scenes.md), which render through the capture described below.
|
|
4
|
+
|
|
5
|
+
`ZhudaTimelineSequencer` binds number, boolean, vector and string event tracks to
|
|
6
|
+
consumer presentation. It borrows the existing runtime time source:
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { ZhudaTimelineSequencer } from 'zhuda-laya-engine';
|
|
10
|
+
const timeline = new ZhudaTimelineSequencer(spec, bindings);
|
|
11
|
+
context.runtime.start(() => {
|
|
12
|
+
timeline.update(context.runtime.layers.scaledDeltas.get('presentation') ?? 0);
|
|
13
|
+
});
|
|
14
|
+
timeline.seek(1.5); // Silent seek; does not replay audio cues.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Define the `presentation` layer on the existing layered clock. Track IDs are
|
|
18
|
+
unique, value tracks have unique targets, vector dimensions match, and values
|
|
19
|
+
are finite. Step sampling changes at the exact key time. The sequencer snapshots
|
|
20
|
+
and freezes its specification; editing the authored arrays cannot change a run.
|
|
21
|
+
Event cues are dispatched in declared track order over `(previousTime, time]`;
|
|
22
|
+
`t=0` cues are not automatic. `seek(t,{emitEvents:true})` emits only forward
|
|
23
|
+
crossings. Reset/rewind is silent. Dispose the sequencer with its scene.
|
|
24
|
+
|
|
25
|
+
`ZhudaOfflineFrameRecorder` supplies `advance(frame,signal)` and
|
|
26
|
+
`capture(frame,signal)` callbacks at `t = index / fps`. A 1-second sequence at
|
|
27
|
+
24 FPS contains 25 samples including both endpoints; a video encoder may omit
|
|
28
|
+
the last endpoint. `durationSeconds * fps` must be integral, and `maxFrames`
|
|
29
|
+
bounds retained metadata. Use `frame.deltaSeconds` (zero on the first frame)
|
|
30
|
+
when advancing an existing fixed-step simulation; use `timeline.seek(frame.time)`
|
|
31
|
+
for stateless presentation. Pause live gameplay updates before manual capture.
|
|
32
|
+
|
|
33
|
+
Callbacks are awaited serially and have a `stepTimeoutMs` deadline (15000 ms by
|
|
34
|
+
default). Abort/dispose interrupts waiting even if a callback stalls. A callback
|
|
35
|
+
must honor the supplied signal before mutating its scene or writing files; the
|
|
36
|
+
recorder cannot undo external side effects of noncooperative code. It retains
|
|
37
|
+
metadata only. The caller captures actual pixels, drains GPU work, saves files
|
|
38
|
+
and owns any encoder/audio synchronisation. It provides no temporal accumulation,
|
|
39
|
+
physical camera, motion blur, video encoding or offline 4K quality guarantee.
|
|
40
|
+
|
|
41
|
+
## Sequence evidence
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
zhuda-sequence-check report.json --times 0,0.5,1 --backend webgpu --max frameMs=16.67
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The JSON report has `schemaVersion:1`, `requestedBackend`, `selectedBackend`,
|
|
48
|
+
`status:'ready'`, `errors:[]`, `expectedTimes` and `frames`. WebGPU evidence also
|
|
49
|
+
requires `fallbackReason:null` and `isFallbackAdapter:false`. Every frame has
|
|
50
|
+
`time`, `ready:true`, `imagePath`, `imageSha256` and optional numeric `metrics`.
|
|
51
|
+
Paths resolve below `--root` (by default the report's directory); symlinks cannot
|
|
52
|
+
escape it. Optional `referenceSha256` requests byte equality with that digest.
|
|
53
|
+
Invalid expected times, tolerances, budgets, missing metrics or hashes fail.
|
|
54
|
+
|
|
55
|
+
Without `--reference`, the result explicitly reports `scope:'evidence-integrity'` and
|
|
56
|
+
`visualComparison:'not-performed'`. It verifies file hashes and assertions; it
|
|
57
|
+
cannot prove that a consumer's timestamp, metric or screenshot describes an
|
|
58
|
+
actual draw. Use independent browser capture, reviewed references and the
|
|
59
|
+
[Prefab workflow](prefab-workflow.md) for visual acceptance. Do not substitute
|
|
60
|
+
self-reported metrics for GPU measurements.
|
|
61
|
+
|
|
62
|
+
For PNG regression against an independently reviewed reference:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
zhuda-sequence-check actual.json --times 0,0.5,1 --backend webgpu \
|
|
66
|
+
--reference approved/reference.json --max-diff-pixels 0 --channel-tolerance 2
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The reference uses the same report schema and contains an explicit
|
|
70
|
+
`approval: { reviewedBy: "reviewer identity", reviewedAt: "2026-11-05T00:00:00Z" }`.
|
|
71
|
+
Capture alone is not approval. Keep reference approval outside the capture
|
|
72
|
+
step; this metadata is not authenticated identity or a signature. Relative
|
|
73
|
+
reference paths resolve below the reference report's directory. Both reports
|
|
74
|
+
must pass integrity, timestamp and renderer checks before comparison runs.
|
|
75
|
+
|
|
76
|
+
This mode reports `scope:'png-pixel-regression'` and per-frame dimensions and
|
|
77
|
+
different-pixel counts. It compares all RGBA channels, allowing a difference of
|
|
78
|
+
2 per channel by default; a pixel fails when any channel exceeds that tolerance.
|
|
79
|
+
The default permitted different-pixel count is zero. It checks PNG CRCs and
|
|
80
|
+
rejects dimensions that differ or exceed 16,777,216 pixels; individual image
|
|
81
|
+
files are limited to 64 MiB. Programmatic callers can set `maxPixels` and
|
|
82
|
+
`maxImageBytes`. These limits bound image input and do not represent GPU memory
|
|
83
|
+
budgets. Pixel regression does not establish artistic quality or device parity.
|
|
84
|
+
|
|
85
|
+
The independent [verification runner](../scripts/verify-next-round.mjs) packs
|
|
86
|
+
the SDK, builds a public consumer and captures the same neutral Meshopt model
|
|
87
|
+
and camera track on WebGL and WebGPU. It verifies repeated sequence captures,
|
|
88
|
+
rejects a deliberately substituted camera frame and runs the installed CLI.
|
|
89
|
+
Its reference is an authored neutral engine regression, not approval of consumer
|
|
90
|
+
artwork. Reports distinguish those real draws from metadata-only unit fixtures.
|
|
91
|
+
|
|
92
|
+
## Movie production (1.13.0)
|
|
93
|
+
|
|
94
|
+
The lower-level recorder above remains a callback coordinator. The following
|
|
95
|
+
APIs supply actual scene sampling, pixels, offline audio and movie encoding.
|
|
96
|
+
Use the public packed SDK and a `core,2d,3d,gltf,postProcess` consumer. The
|
|
97
|
+
[runnable neutral fixture](../examples/cinematic-capture/) and
|
|
98
|
+
[verification runner](../scripts/verify-cinematic.mjs) use the same isolated
|
|
99
|
+
model/chart definitions in their final scene. Game/seller assets stay outside
|
|
100
|
+
the engine. Their own Prefab references and target-device checks still apply.
|
|
101
|
+
|
|
102
|
+
### Exact model poses
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
import {ZhudaModelInspector, ZhudaModelAnimationSampler} from 'zhuda-laya-engine';
|
|
106
|
+
const animation = new ZhudaModelInspector(instance).inspect().animations[0];
|
|
107
|
+
const pose = new ZhudaModelAnimationSampler(
|
|
108
|
+
instance, animation.path, animation.name, animation.layer);
|
|
109
|
+
pose.sample(0.5); // Absolute clip-local seconds, synchronous.
|
|
110
|
+
pose.sample(0); // Reverse seek is independent of RAF history.
|
|
111
|
+
pose.sample(2, true); // Explicit loop wraps the endpoint.
|
|
112
|
+
// pose.dispose() before releasing the model instance.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The sampler borrows a model lease and exclusively owns its Animator's speed
|
|
116
|
+
until disposal. Select one named override state per Animator; this is not a
|
|
117
|
+
blend-tree/cross-fade evaluator. LINEAR, STEP and CUBICSPLINE bone/Morph tracks
|
|
118
|
+
use the pinned native evaluator. Times clamp to the clip's end unless `loop`
|
|
119
|
+
is explicitly true. Sampling does not call `play`, tick the state machine,
|
|
120
|
+
dispatch animation events or emit live sound. Native animated property setters
|
|
121
|
+
still run (including Morph dirty callbacks); custom setters must be free of
|
|
122
|
+
gameplay side effects. Disposal restores the original speed; the sampled pose
|
|
123
|
+
remains until the next native tick.
|
|
124
|
+
|
|
125
|
+
### Physical lens and deterministic pixels
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
import {ZhudaPhysicalCameraRig, ZhudaCinematicCapture} from 'zhuda-laya-engine';
|
|
129
|
+
context.runtime.setPaused(true);
|
|
130
|
+
const lens = new ZhudaPhysicalCameraRig(camera, {
|
|
131
|
+
focalLengthMm: 50, sensorHeightMm: 24, fStop: 2.8,
|
|
132
|
+
focusDistanceM: 5, shutterAngle: 180, iso: 100,
|
|
133
|
+
referenceEV100: 10, exposureCompensation: 0
|
|
134
|
+
});
|
|
135
|
+
lens.applyExposure(filmicPipeline, 24); // Optional existing ACES grade.
|
|
136
|
+
const capture = new ZhudaCinematicCapture(scene, lens, context.runtime, {
|
|
137
|
+
width: 3840, height: 2160, maxWorkingBytes: 512 * 1024 * 1024,
|
|
138
|
+
timeoutMs: 30000
|
|
139
|
+
});
|
|
140
|
+
try {
|
|
141
|
+
for (let index = 0; index < 24; index++) {
|
|
142
|
+
const frame = await capture.renderFrame({index, fps: 24, samples: 32,
|
|
143
|
+
signal, sample(seconds) {
|
|
144
|
+
timeline.seek(seconds); // Silent, absolute camera/object values.
|
|
145
|
+
pose.sample(seconds);
|
|
146
|
+
}});
|
|
147
|
+
await saveOpaqueSrgbPng(frame.rgba, frame.width, frame.height, index);
|
|
148
|
+
}
|
|
149
|
+
} finally { capture.dispose(); lens.dispose(); }
|
|
150
|
+
// Restore the consumer's pause policy after its entire export finishes.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`saveOpaqueSrgbPng` is consumer IO, not an SDK function. The example uses
|
|
154
|
+
`ImageData` and a 2D canvas only to encode the rendered bytes, never as the 3D
|
|
155
|
+
renderer. Output is top-left RGBA8, opaque sRGB. Width/height are explicit output
|
|
156
|
+
pixels independent of CSS size or DPR. Inputs are capped at 8192 per axis,
|
|
157
|
+
256 samples/frame and the configured CPU working-set estimate. GPU/driver
|
|
158
|
+
memory is additional. Call serially and drain each returned frame to storage.
|
|
159
|
+
|
|
160
|
+
Laya registers newly added meshes on its next native frame, and a capture
|
|
161
|
+
freezes the scene, so run `ZhudaEngine.flushRenderFrames(2)` after adding
|
|
162
|
+
objects and before the first capture (`ZhudaFilmRenderer` does this);
|
|
163
|
+
otherwise a frame can intermittently contain only the clear colour.
|
|
164
|
+
The mounted target scene's native update/time are frozen until capture disposal;
|
|
165
|
+
its original update, editor-render flag and time are restored. Other scenes and
|
|
166
|
+
Stage-level callbacks are not frozen. The existing RuntimeSession must stay
|
|
167
|
+
paused. Do not drive simulation with wall timers, RAF waits or `Animator.play`
|
|
168
|
+
during capture. The synchronous `sample` callback must completely define the
|
|
169
|
+
pose; async callbacks reject. Load all assets before starting. Native pre/post
|
|
170
|
+
render callbacks must be deterministic and render-only. Particles, physics,
|
|
171
|
+
shader randomness, cuts and external state need explicit consumer sampling;
|
|
172
|
+
the capture cannot infer their history. Keep TAA disabled throughout capture.
|
|
173
|
+
|
|
174
|
+
The camera uses vertical sensor fit, unit world scale and an off-axis thin-lens
|
|
175
|
+
approximation. Aperture samples converge at `focusDistanceM`. Deterministic
|
|
176
|
+
subpixel jitter and lens-disk samples are independent of frame history. For
|
|
177
|
+
multiple samples, the shutter spans `[index/fps, index/fps + shutterAngle/360/fps)`;
|
|
178
|
+
sample centers are evenly spaced within it. One sample always uses frame start,
|
|
179
|
+
with no aperture/jitter. `aperture:false` or `jitter:false` disables that component.
|
|
180
|
+
Choose a zero shutter or clamp samples at cuts to avoid mixing across shots.
|
|
181
|
+
Projection, automatic aspect mode and any active lens offset restore on disposal.
|
|
182
|
+
|
|
183
|
+
`physicalCameraMetrics` exposes vertical FOV, aperture radius, exposure duration,
|
|
184
|
+
EV100 and multiplier. `referenceEV100` calibrates the authored scene; ISO/f-stop
|
|
185
|
+
are not a measured photometric light meter. Exposure uses the existing Filmic
|
|
186
|
+
pipeline's gain. Aperture/shutter samples are averaged in one of two places.
|
|
187
|
+
With `linear: pipeline.linearChain()` in the frame request (film scenes with a
|
|
188
|
+
grade pass it), every sample is drawn scene-linear into a half-float target
|
|
189
|
+
without tone mapping and lens finish, the samples are averaged, and the average
|
|
190
|
+
is drawn through tone mapping and lens finish once: an out-of-focus lamp or a
|
|
191
|
+
moving highlight keeps its light. Without it, the samples are averaged **after
|
|
192
|
+
tone mapping**: sRGB samples are decoded to display-linear values, averaged and
|
|
193
|
+
encoded back, which dims every highlight that depth of field or motion spreads
|
|
194
|
+
out. `accumulation` in the result says which (`scene-linear` or
|
|
195
|
+
`display-linear`). Either way the output is SDR; it is not ACEScg, EXR, path
|
|
196
|
+
tracing or a real-time 4K performance claim. In the display-linear path, highlight
|
|
197
|
+
energy clipped by tone mapping cannot be recovered by adding more samples.
|
|
198
|
+
|
|
199
|
+
Abort/deadline/dispose rejects the caller promptly. Native GPU readback cannot
|
|
200
|
+
always cancel: its target and scene admission remain retained until the pending
|
|
201
|
+
read settles. A cancelled capture rejects another render while draining; dispose
|
|
202
|
+
is idempotent and releases the target after that work finishes. A noncooperative
|
|
203
|
+
native driver cannot be made to free synchronously. Recreate a lost renderer
|
|
204
|
+
through the existing runtime host; do not reuse its targets.
|
|
205
|
+
|
|
206
|
+
### Soundtrack through the same mixer
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
await audio.loadSample('score/music.wav'); // Existing AssetProvider/cache.
|
|
210
|
+
const mix = await audio.renderOffline({durationSec: 1, sampleRate: 48000,
|
|
211
|
+
channels: 2, signal, timeoutMs: 30000,
|
|
212
|
+
cues: [{id: 'opening', sampleId: 'score/music.wav', channel: 'bgm',
|
|
213
|
+
atSec: 0, durationSec: 1, offsetSec: 0, loop: true,
|
|
214
|
+
fadeInSec: 0.05, fadeOutSec: 0.1, peakGain: 0.8}]
|
|
215
|
+
});
|
|
216
|
+
await saveBytes('soundtrack.wav', mix.wav);
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
The adapter snapshots its already decoded sample references, master/channel
|
|
220
|
+
gains, explicit user mute and voice limit. Gain is applied once. Offline export
|
|
221
|
+
ignores browser focus auto-mute (a hidden tab must not silently erase its movie
|
|
222
|
+
score), and emits no live voice/event. It uses one explicit `OfflineAudioContext`
|
|
223
|
+
render job owned by the existing mixer, not another live `AudioContext`.
|
|
224
|
+
|
|
225
|
+
Cues have unique IDs, exact start/duration, optional source offset/loop bounds and
|
|
226
|
+
linear fades. Overlap above the mixer's voice limit fails before rendering;
|
|
227
|
+
offline export never silently steals a score cue. Source samples must be loaded;
|
|
228
|
+
streaming URLs, procedural live tones and custom Worklet processing are not
|
|
229
|
+
implicitly exported. Declare or bake those sounds as samples. `durationSec *
|
|
230
|
+
sampleRate` must be integral, mono/stereo output is bounded by `maxOutputBytes`
|
|
231
|
+
(default 256 MiB; PCM + WAV estimate, excluding borrowed sources/native overhead).
|
|
232
|
+
|
|
233
|
+
Float32 WAV preserves values outside ±1 and reports `peak`/`overRangeSamples`.
|
|
234
|
+
Set authored gains before lossy encoding; no hidden limiter is added. Cancellation
|
|
235
|
+
rejects promptly, but native offline rendering drains before another job is
|
|
236
|
+
admitted. Dispose aborts the caller and releases graph nodes after that drain.
|
|
237
|
+
The CPU encoding is bounded but is not a hard real-time scheduler guarantee.
|
|
238
|
+
|
|
239
|
+
### Verified MP4 export
|
|
240
|
+
|
|
241
|
+
Install FFmpeg and ffprobe on the export host, then run the installed SDK bin:
|
|
242
|
+
|
|
243
|
+
```sh
|
|
244
|
+
zhuda-film-export sequence.json --fps 24 --output movie.mp4 --audio soundtrack.wav
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Use the sequence schema above, with exactly `frameCount` PNGs at `i/fps` for
|
|
248
|
+
`i=0..frameCount-1`. A one-second 24 FPS movie has 24 frames, excluding its end
|
|
249
|
+
sample; the older recorder's 25th endpoint is for comparisons only. Frame images
|
|
250
|
+
must be opaque sRGB, have identical even dimensions, pass CRC/hash/path checks
|
|
251
|
+
and remain within byte/pixel/frame limits. Audio must be mono/stereo PCM16/24/32
|
|
252
|
+
or float32 WAV with duration `frameCount/fps` (one sample tolerance).
|
|
253
|
+
|
|
254
|
+
The CLI stages copies of verified input, calls FFmpeg without a shell, checks
|
|
255
|
+
the encoded result with ffprobe, then atomically replaces `movie.mp4`. Invalid
|
|
256
|
+
input, cancellation, timeout, missing encoder or failed probing leaves the last
|
|
257
|
+
successful file intact. Temporary files are removed. SIGINT/SIGTERM interrupts
|
|
258
|
+
the encoder. Defaults: 5-minute deadline, 86,400 frames, 4 GiB total input and
|
|
259
|
+
16,777,216 pixels/frame. Programmatic `exportFilm` can set those budgets; CLI
|
|
260
|
+
supports `--timeout-ms`, `--ffmpeg` and `--ffprobe`.
|
|
261
|
+
|
|
262
|
+
Output is H.264/AAC, YUV420 limited-range with BT.709 primaries/matrix and an
|
|
263
|
+
explicit sRGB transfer tag, preserving the captured SDR transfer function.
|
|
264
|
+
This is a delivery file, not a lossless/HDR/alpha master. Keep the PNG sequence
|
|
265
|
+
and float soundtrack. FFmpeg is an external optional dependency; no codec
|
|
266
|
+
binary is bundled or silently downloaded. Windows executable paths are accepted,
|
|
267
|
+
but real Windows hardware/packaged capture remains a separate acceptance run.
|