@wildshard/engine 0.0.0 → 0.1.15
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/CHANGELOG.md +128 -0
- package/budgets/calibration/m5-2026-10-01T08-07-18-573Z.json +3985 -0
- package/budgets/calibration/m5-2026-10-01T22-02-53-510Z.json +4473 -0
- package/budgets/calibration-reports/README.md +25 -0
- package/budgets/calibration-reports/_template.desktop.json +1994 -0
- package/budgets/calibration-reports/_template.phone.json +2069 -0
- package/budgets/calibration-reports/assessment.json +571 -0
- package/budgets/calibration-reports/driftwood-isle.phone.json +72 -0
- package/budgets/calibration-reports/far-reach.desktop.json +73158 -0
- package/budgets/calibration-reports/far-reach.phone.json +73086 -0
- package/budgets/calibration-reports/nalati-grasslands-x22.desktop.json +19525 -0
- package/budgets/calibration-reports/nalati-grasslands.phone.json +72 -0
- package/budgets/calibration-reports/nine-dragon-stack-g224.desktop.json +146 -0
- package/budgets/calibration-reports/nine-dragon-stack.phone.json +89 -0
- package/budgets/calibration-reports/pine-hollow.desktop.json +54949 -0
- package/budgets/calibration-reports/pine-hollow.phone.json +72 -0
- package/budgets/calibration-reports/sunscar-dunes.desktop.json +7788 -0
- package/budgets/calibration-reports/sunscar-dunes.phone.json +9378 -0
- package/budgets/calibration.json +4473 -0
- package/budgets/ceiling-re-records.json +71 -0
- package/budgets/ceiling-sources.json +5985 -0
- package/budgets/desktop-reference.json +7 -0
- package/budgets/g224-ceiling-re-record.json +15 -0
- package/budgets/grid-strip-room.json +9 -0
- package/budgets/nalati-ceiling-sources.json +44 -0
- package/budgets/shard-size-baseline.json +552 -0
- package/budgets/x22-ceiling-re-record.json +15 -0
- package/budgets/x7-ceiling-sources.json +41 -0
- package/index.html +622 -0
- package/lint/api-undocumented.json +7 -0
- package/lint/authored-html.d.mts +4 -0
- package/lint/authored-html.mjs +313 -0
- package/lint/base64-debt.json +18 -0
- package/lint/class-moves.json +4 -0
- package/lint/client-plan-boundary.d.mts +2 -0
- package/lint/client-plan-boundary.mjs +102 -0
- package/lint/debug-flags.d.mts +5 -0
- package/lint/debug-flags.mjs +190 -0
- package/lint/declaration-config.d.mts +2 -0
- package/lint/declaration-config.mjs +19 -0
- package/lint/edge-exemptions.json +6 -0
- package/lint/engine-internal.json +26 -0
- package/lint/engine-side-edges.json +5 -0
- package/lint/engine-sides.d.mts +30 -0
- package/lint/engine-sides.json +1794 -0
- package/lint/engine-sides.mjs +269 -0
- package/lint/engine-words.json +7 -0
- package/lint/exec-max-buffer.mjs +88 -0
- package/lint/generated-import-debt.json +117 -0
- package/lint/generated-source-debt.json +1029 -0
- package/lint/host-callback-syntax.d.mts +4 -0
- package/lint/host-callback-syntax.mjs +62 -0
- package/lint/host-callbacks.d.mts +6 -0
- package/lint/host-callbacks.mjs +123 -0
- package/lint/host-files.d.mts +1 -0
- package/lint/host-files.mjs +7 -0
- package/lint/host-reviews.json +14 -0
- package/lint/layer-edges.json +15 -0
- package/lint/layer-exports.d.mts +2 -0
- package/lint/layer-exports.mjs +23 -0
- package/lint/legacy-line-basis.json +995 -0
- package/lint/listed-view-code.json +13 -0
- package/lint/manifest-closure-budget.json +6 -0
- package/lint/nine-tiling-baseline.json +35 -0
- package/lint/no-base64.d.mts +19 -0
- package/lint/no-base64.mjs +112 -0
- package/lint/no-binary-json.json +174 -0
- package/lint/no-generated-import.d.mts +22 -0
- package/lint/no-generated-import.mjs +114 -0
- package/lint/page-events.json +895 -0
- package/lint/platform-pending-users.json +2520 -0
- package/lint/platform-pending-users.md +18 -0
- package/lint/ratchet-files.d.mts +2 -0
- package/lint/ratchet-files.mjs +45 -0
- package/lint/ratchet.json +230 -0
- package/lint/ratchet.mjs +212 -0
- package/lint/recorded-debt.mjs +24 -0
- package/lint/row-functions.json +173 -0
- package/lint/runtime-files.d.mts +12 -0
- package/lint/runtime-files.json +16 -0
- package/lint/runtime-files.mjs +69 -0
- package/lint/runtime-performance.d.mts +6 -0
- package/lint/runtime-performance.json +14 -0
- package/lint/runtime-performance.mjs +184 -0
- package/lint/schema-types.d.mts +9 -0
- package/lint/schema-types.mjs +114 -0
- package/lint/shard-coupling.json +333 -0
- package/lint/shard-imports.d.mts +5 -0
- package/lint/shard-imports.mjs +43 -0
- package/lint/shard-layout.json +64 -0
- package/lint/shard-platform.json +24 -0
- package/lint/shard-words.pin.json +421 -0
- package/lint/shardfile-boundaries.d.mts +10 -0
- package/lint/shardfile-boundaries.mjs +122 -0
- package/lint/sim-closure.d.mts +3 -0
- package/lint/sim-closure.json +3 -0
- package/lint/sim-closure.mjs +112 -0
- package/lint/sim-players.json +17 -0
- package/lint/sim-schema-leaves.json +1 -0
- package/lint/source-stamps.mjs +12 -0
- package/lint/syntax-values.mjs +299 -0
- package/lint/tile-bake-debt.json +556 -0
- package/lint/url-params.json +48 -0
- package/lint/weapon-subclasses.json +4 -0
- package/lint/wildshard-plugin.d.ts +13 -0
- package/lint/wildshard-plugin.js +1196 -0
- package/package.json +1304 -4
- package/scripts/agent-parity.mjs +1524 -0
- package/scripts/agent-sync.mjs +518 -0
- package/scripts/agent-time.py +475 -0
- package/scripts/apfs-clone.mjs +67 -0
- package/scripts/api-origin.d.mts +3 -0
- package/scripts/api-origin.mjs +38 -0
- package/scripts/app-build/appCook.ts +19 -0
- package/scripts/app-build/assetHashes.ts +57 -0
- package/scripts/app-build/assetLimits.d.mts +15 -0
- package/scripts/app-build/assetLimits.mjs +61 -0
- package/scripts/app-build/assetTables.d.mts +19 -0
- package/scripts/app-build/assetTables.mjs +68 -0
- package/scripts/app-build/audioPacks.ts +41 -0
- package/scripts/app-build/bakedTextures.d.mts +2 -0
- package/scripts/app-build/bakedTextures.mjs +59 -0
- package/scripts/app-build/basis.ts +25 -0
- package/scripts/app-build/bootExtras.ts +127 -0
- package/scripts/app-build/bootModules.ts +271 -0
- package/scripts/app-build/bootProductTiers.ts +48 -0
- package/scripts/app-build/bootProducts.ts +67 -0
- package/scripts/app-build/buildIdentity.d.mts +16 -0
- package/scripts/app-build/buildIdentity.mjs +89 -0
- package/scripts/app-build/catalogue.ts +216 -0
- package/scripts/app-build/chunkReport.d.mts +3 -0
- package/scripts/app-build/chunkReport.mjs +29 -0
- package/scripts/app-build/contentBase.d.mts +2 -0
- package/scripts/app-build/contentBase.mjs +34 -0
- package/scripts/app-build/controlChunks.ts +106 -0
- package/scripts/app-build/crossroadsRig.ts +17 -0
- package/scripts/app-build/doctorOutput.mjs +19 -0
- package/scripts/app-build/finalChunkNames.d.mts +3 -0
- package/scripts/app-build/finalChunkNames.mjs +94 -0
- package/scripts/app-build/gen.ts +100 -0
- package/scripts/app-build/gridSeams.d.mts +16 -0
- package/scripts/app-build/gridSeams.mjs +95 -0
- package/scripts/app-build/homeIcons.d.mts +20 -0
- package/scripts/app-build/homeIcons.mjs +64 -0
- package/scripts/app-build/importMap.d.mts +7 -0
- package/scripts/app-build/importMap.mjs +102 -0
- package/scripts/app-build/noTopLevelAwait.d.mts +4 -0
- package/scripts/app-build/noTopLevelAwait.mjs +36 -0
- package/scripts/app-build/outputProducts.d.mts +10 -0
- package/scripts/app-build/outputProducts.mjs +114 -0
- package/scripts/app-build/previousDeploy.d.mts +24 -0
- package/scripts/app-build/previousDeploy.mjs +245 -0
- package/scripts/app-build/serviceWorker.ts +145 -0
- package/scripts/app-build/splitOutput.d.mts +6 -0
- package/scripts/app-build/splitOutput.mjs +98 -0
- package/scripts/app-build/standaloneOutput.d.mts +4 -0
- package/scripts/app-build/standaloneOutput.mjs +31 -0
- package/scripts/app-build/validationReceipts.d.mts +2 -0
- package/scripts/app-build/validationReceipts.mjs +25 -0
- package/scripts/app-build/versionFiles.ts +20 -0
- package/scripts/app-build/worldMapAtlas.ts +62 -0
- package/scripts/app-build/writtenBundle.ts +51 -0
- package/scripts/app-build-pipeline-proof.mjs +67 -0
- package/scripts/app-build-pipeline.mjs +274 -0
- package/scripts/assert-store-layout.mjs +17 -0
- package/scripts/author-bundle-cache.d.mts +1 -0
- package/scripts/author-bundle-cache.mjs +137 -0
- package/scripts/author-bundle-usage.d.mts +3 -0
- package/scripts/author-bundle-usage.mjs +20 -0
- package/scripts/authored-manifest.d.mts +7 -0
- package/scripts/authored-manifest.mjs +217 -0
- package/scripts/authoring-inputs.d.mts +8 -0
- package/scripts/authoring-inputs.mjs +104 -0
- package/scripts/bake-grid-seams.mjs +110 -0
- package/scripts/bake-input-hashes.d.mts +6 -0
- package/scripts/bake-input-hashes.mjs +59 -0
- package/scripts/bake-loader.mjs +105 -0
- package/scripts/bake-output.d.mts +29 -0
- package/scripts/bake-output.mjs +84 -0
- package/scripts/bench-load.mjs +391 -0
- package/scripts/boot-dist-plan.mjs +47 -0
- package/scripts/boot-dist.py +251 -0
- package/scripts/boot-pack-parts.d.mts +2 -0
- package/scripts/boot-pack-parts.mjs +51 -0
- package/scripts/boot-publication-proof.d.mts +2 -0
- package/scripts/boot-publication-proof.mjs +64 -0
- package/scripts/boot-publication.d.mts +19 -0
- package/scripts/boot-publication.generated.json +3684 -0
- package/scripts/boot-publication.mjs +100 -0
- package/scripts/boot-temp-warn.sh +70 -0
- package/scripts/boot-timing-proof.mjs +264 -0
- package/scripts/browser-lane.sh +288 -0
- package/scripts/browser-slot-lock.py +49 -0
- package/scripts/budget-ceilings.mjs +88 -0
- package/scripts/budget-ratchet.d.mts +1 -0
- package/scripts/budget-ratchet.mjs +8 -0
- package/scripts/build-app.mjs +49 -0
- package/scripts/build-cache-report.d.mts +20 -0
- package/scripts/build-cache-report.mjs +104 -0
- package/scripts/build-mirror.d.mts +24 -0
- package/scripts/build-mirror.mjs +387 -0
- package/scripts/build-server.mjs +47 -0
- package/scripts/build-without-browser.mjs +14 -0
- package/scripts/built-product.d.mts +22 -0
- package/scripts/built-product.mjs +187 -0
- package/scripts/calibrate.mjs +43 -0
- package/scripts/capture-main-menu-hero.mjs +457 -0
- package/scripts/catalogue-all-heads.ts +35 -0
- package/scripts/changelog.d.mts +18 -0
- package/scripts/changelog.mjs +129 -0
- package/scripts/chaos-proxy-core.mjs +978 -0
- package/scripts/chaos-proxy-proof.mjs +1130 -0
- package/scripts/chaos-proxy.mjs +68 -0
- package/scripts/chaos-router.mjs +107 -0
- package/scripts/chaos-rules.mjs +197 -0
- package/scripts/check-chunks.d.mts +8 -0
- package/scripts/check-chunks.mjs +143 -0
- package/scripts/check-closed-components.d.mts +7 -0
- package/scripts/check-closed-components.mjs +87 -0
- package/scripts/check-css.mjs +235 -0
- package/scripts/check-custom-sections-zero.d.mts +2 -0
- package/scripts/check-custom-sections-zero.mjs +43 -0
- package/scripts/check-devserver.d.mts +2 -0
- package/scripts/check-devserver.mjs +29 -0
- package/scripts/check-engine-sides.mjs +85 -0
- package/scripts/check-graph.d.mts +9 -0
- package/scripts/check-graph.mjs +217 -0
- package/scripts/check-listeners.mjs +122 -0
- package/scripts/check-model-sources.mjs +106 -0
- package/scripts/check-models.d.mts +22 -0
- package/scripts/check-models.mjs +367 -0
- package/scripts/check-page-events.mjs +386 -0
- package/scripts/check-paths.allow.json +1282 -0
- package/scripts/check-paths.mjs +97 -0
- package/scripts/check-platform-ratchets.d.mts +7 -0
- package/scripts/check-platform-ratchets.mjs +297 -0
- package/scripts/check-shards.d.mts +5 -0
- package/scripts/check-shards.mjs +101 -0
- package/scripts/check-sim-players.mjs +82 -0
- package/scripts/check-spelled-paths.d.mts +1 -0
- package/scripts/check-spelled-paths.mjs +34 -0
- package/scripts/chromium-keychain-check.mjs +140 -0
- package/scripts/chromium-keychain.d.mts +1 -0
- package/scripts/chromium-keychain.mjs +5 -0
- package/scripts/chromium-memory-browser.d.mts +4 -0
- package/scripts/chromium-memory-browser.mjs +52 -0
- package/scripts/ci-bisect.py +91 -0
- package/scripts/ci-browser.sh +45 -0
- package/scripts/ci-checks.d.mts +2 -0
- package/scripts/ci-checks.mjs +94 -0
- package/scripts/ci-disk-census.py +58 -0
- package/scripts/ci-docs-proof.mjs +84 -0
- package/scripts/ci-exact-reuse.d.mts +3 -0
- package/scripts/ci-exact-reuse.mjs +73 -0
- package/scripts/ci-generated-manifest.sh +18 -0
- package/scripts/ci-native-fixtures.mjs +36 -0
- package/scripts/ci-pack.d.mts +14 -0
- package/scripts/ci-pack.mjs +231 -0
- package/scripts/ci-playwright-install.sh +11 -0
- package/scripts/ci-product-cache.d.mts +2 -0
- package/scripts/ci-product-cache.mjs +57 -0
- package/scripts/ci-products.py +285 -0
- package/scripts/ci-proof-jobs.d.mts +3 -0
- package/scripts/ci-proof-jobs.mjs +34 -0
- package/scripts/ci-selection.mjs +63 -0
- package/scripts/ci-shard-wall-proof.mjs +26 -0
- package/scripts/ci-shard-wall.mjs +35 -0
- package/scripts/ci-static.sh +63 -0
- package/scripts/commit.sh +305 -0
- package/scripts/commit_lane.py +42 -0
- package/scripts/committed-fast-checks.mjs +262 -0
- package/scripts/committed-source-tables.mjs +47 -0
- package/scripts/compare-platform-steps.mjs +15 -0
- package/scripts/compiler-code.d.mts +3 -0
- package/scripts/compiler-code.mjs +69 -0
- package/scripts/complete-at-control-snapshot.mjs +297 -0
- package/scripts/complete-at-control.mjs +580 -0
- package/scripts/content-base-proof.mjs +158 -0
- package/scripts/content-sw-proof.mjs +215 -0
- package/scripts/cook-admission-proof.mjs +42 -0
- package/scripts/cook-audit.ts +57 -0
- package/scripts/cook-job.mjs +32 -0
- package/scripts/cook-parts-report.mjs +34 -0
- package/scripts/cook-revision.ts +60 -0
- package/scripts/cook-to-play.mjs +96 -0
- package/scripts/cook-worker.mjs +78 -0
- package/scripts/cook-worker.service +5 -0
- package/scripts/cook.mjs +19 -0
- package/scripts/core-heap-diagnostic.d.mts +21 -0
- package/scripts/core-heap-diagnostic.mjs +52 -0
- package/scripts/cpu-admission-proof.mjs +55 -0
- package/scripts/cpu-admission.mjs +32 -0
- package/scripts/cpu-admission.py +243 -0
- package/scripts/cpu-broker-proof.mjs +96 -0
- package/scripts/cpu-broker.mjs +56 -0
- package/scripts/cpu-broker.py +119 -0
- package/scripts/cpu-census-proof.py +193 -0
- package/scripts/cpu-census.py +374 -0
- package/scripts/crossroads-proof.mjs +32 -0
- package/scripts/crossroads-rig/core.d.ts +16 -0
- package/scripts/crossroads-rig/core.js +417 -0
- package/scripts/crossroads-rig/desktop-probe.mjs +163 -0
- package/scripts/crossroads-rig/index.html +21 -0
- package/scripts/crossroads-rig/phone.js +74 -0
- package/scripts/crossroads-rig/production-probe.mjs +160 -0
- package/scripts/crossroads-rig/production.html +23 -0
- package/scripts/crossroads-rig/production.md +28 -0
- package/scripts/crossroads-rig/rig.js +36 -0
- package/scripts/crossroads-rig/sim-probe.mjs +217 -0
- package/scripts/crossroads-rig/stage.sh +11 -0
- package/scripts/crossroads-smoke.mjs +83 -0
- package/scripts/debug-settings.d.mts +24 -0
- package/scripts/debug-settings.mjs +80 -0
- package/scripts/decision-legacy-lines.d.mts +4 -0
- package/scripts/decision-legacy-lines.mjs +30 -0
- package/scripts/deck-skip-proof.mjs +63 -0
- package/scripts/deny-browser.mjs +11 -0
- package/scripts/docs-inputs-proof.mjs +31 -0
- package/scripts/doctor-proof.mjs +186 -0
- package/scripts/dome-cameras.d.mts +27 -0
- package/scripts/dome-cameras.mjs +77 -0
- package/scripts/download-bench/link.mjs +101 -0
- package/scripts/e2e-client.mjs +153 -0
- package/scripts/e2e-offline.sh +9 -0
- package/scripts/e2e-paths.mjs +31 -0
- package/scripts/e2e-watcher.mjs +191 -0
- package/scripts/e7-doctor-proof.mjs +61 -0
- package/scripts/e7-doctor-request-proof.mjs +179 -0
- package/scripts/e7-doctor-worker-proof.mjs +221 -0
- package/scripts/e7-live-staging-proof.mjs +72 -0
- package/scripts/e7-playtest-table.mjs +67 -0
- package/scripts/e7-records-proof.mjs +17 -0
- package/scripts/e7-voice-staging-proof.mjs +94 -0
- package/scripts/engine-ci-budget.ts +39 -0
- package/scripts/engine-ci-membership-proof.ts +26 -0
- package/scripts/engine-ci-plan.ts +120 -0
- package/scripts/engine-ci-proof.mjs +41 -0
- package/scripts/engine-ci-sequencer.ts +18 -0
- package/scripts/engine-ci-shard.mjs +28 -0
- package/scripts/engine-ci.config.ts +17 -0
- package/scripts/engine-order-proof.mjs +41 -0
- package/scripts/environment-boundary-proof.mjs +28 -0
- package/scripts/fetch-assets.mjs +76 -0
- package/scripts/format-hook.mjs +20 -0
- package/scripts/format-lock.d.mts +6 -0
- package/scripts/format-lock.mjs +120 -0
- package/scripts/format-package.d.mts +4 -0
- package/scripts/format-package.mjs +12 -0
- package/scripts/frame-cost-report.ts +85 -0
- package/scripts/frame-floor-args.d.mts +14 -0
- package/scripts/frame-floor-args.mjs +156 -0
- package/scripts/frame-floor-buffer-pressure.d.mts +3 -0
- package/scripts/frame-floor-buffer-pressure.mjs +91 -0
- package/scripts/frame-floor-draw-report.d.mts +38 -0
- package/scripts/frame-floor-draw-report.mjs +112 -0
- package/scripts/frame-floor-gl-time.d.mts +4 -0
- package/scripts/frame-floor-gl-time.mjs +104 -0
- package/scripts/frame-floor-gpu-bisect.mjs +120 -0
- package/scripts/frame-floor-grid.d.mts +67 -0
- package/scripts/frame-floor-grid.mjs +552 -0
- package/scripts/frame-floor-inventory.d.mts +2 -0
- package/scripts/frame-floor-inventory.mjs +10 -0
- package/scripts/frame-floor-jsc-gc.d.mts +15 -0
- package/scripts/frame-floor-jsc-gc.mjs +122 -0
- package/scripts/frame-floor-native-pressure.d.mts +4 -0
- package/scripts/frame-floor-native-pressure.mjs +78 -0
- package/scripts/frame-floor-native.mjs +108 -0
- package/scripts/frame-floor-navigation.d.mts +12 -0
- package/scripts/frame-floor-navigation.mjs +41 -0
- package/scripts/frame-floor-pause-ablation.d.mts +15 -0
- package/scripts/frame-floor-pause-ablation.mjs +90 -0
- package/scripts/frame-floor-pending.d.mts +16 -0
- package/scripts/frame-floor-pending.mjs +29 -0
- package/scripts/frame-floor-programs.mjs +39 -0
- package/scripts/frame-floor-report-phase.d.mts +10 -0
- package/scripts/frame-floor-report-phase.mjs +41 -0
- package/scripts/frame-floor-script-profile.d.mts +20 -0
- package/scripts/frame-floor-script-profile.mjs +159 -0
- package/scripts/frame-floor-settings.d.mts +6 -0
- package/scripts/frame-floor-settings.mjs +118 -0
- package/scripts/frame-floor-standing.d.mts +4 -0
- package/scripts/frame-floor-standing.mjs +20 -0
- package/scripts/frame-floor-task-clock.d.mts +4 -0
- package/scripts/frame-floor-task-clock.mjs +284 -0
- package/scripts/frame-floor-timeline-session.ts +76 -0
- package/scripts/frame-floor-wasm-constructors.d.mts +6 -0
- package/scripts/frame-floor-wasm-constructors.mjs +37 -0
- package/scripts/frame-floor-wasm-probe.d.mts +2 -0
- package/scripts/frame-floor-wasm-probe.mjs +51 -0
- package/scripts/frame-floor-webkit-timeline.d.mts +26 -0
- package/scripts/frame-floor-webkit-timeline.mjs +285 -0
- package/scripts/frame-floor.mjs +1290 -0
- package/scripts/full-test-log-proof.py +191 -0
- package/scripts/full-test-report.py +154 -0
- package/scripts/function-source.d.mts +3 -0
- package/scripts/function-source.mjs +48 -0
- package/scripts/g571-hosts.d.mts +3 -0
- package/scripts/g571-hosts.mjs +54 -0
- package/scripts/game-plugins.d.mts +22 -0
- package/scripts/gate-related-tests.d.mts +7 -0
- package/scripts/gate-related-tests.mjs +178 -0
- package/scripts/gen-api.d.mts +10 -0
- package/scripts/gen-api.mjs +134 -0
- package/scripts/gen-boot-cache.d.mts +2 -0
- package/scripts/gen-boot-cache.mjs +146 -0
- package/scripts/gen-budget-derivations.d.mts +1 -0
- package/scripts/gen-budget-derivations.mjs +43 -0
- package/scripts/gen-programs.d.mts +8 -0
- package/scripts/gen-programs.mjs +82 -0
- package/scripts/gen-shard-words.d.mts +4 -0
- package/scripts/gen-shard-words.mjs +188 -0
- package/scripts/gen-source.d.mts +4 -0
- package/scripts/gen-source.mjs +73 -0
- package/scripts/gen-starter-arm-clips.d.mts +4 -0
- package/scripts/gen-starter-arm-clips.mjs +17 -0
- package/scripts/gen-starter-bag.d.mts +4 -0
- package/scripts/gen-starter-bag.mjs +16 -0
- package/scripts/gen-starter-effects.d.mts +4 -0
- package/scripts/gen-starter-effects.mjs +16 -0
- package/scripts/gen-starter-weapons.d.mts +4 -0
- package/scripts/gen-starter-weapons.mjs +16 -0
- package/scripts/gen.mjs +6 -0
- package/scripts/generate-title-launch.mjs +55 -0
- package/scripts/generated-files.d.mts +6 -0
- package/scripts/generated-files.mjs +86 -0
- package/scripts/generated-input-reading.d.mts +3 -0
- package/scripts/generated-input-reading.mjs +89 -0
- package/scripts/generated-policy.d.mts +13 -0
- package/scripts/generated-policy.mjs +113 -0
- package/scripts/generated-source.d.mts +11 -0
- package/scripts/generated-source.mjs +214 -0
- package/scripts/generation-cache-prune.d.mts +10 -0
- package/scripts/generation-cache-prune.mjs +128 -0
- package/scripts/gfx-toggle/compare.mjs +133 -0
- package/scripts/git-common.d.mts +1 -0
- package/scripts/git-common.mjs +13 -0
- package/scripts/git-rule-counts.mjs +16 -0
- package/scripts/git-source-view.mjs +225 -0
- package/scripts/goldens/board.py +176 -0
- package/scripts/goldens/capture-inputs.d.mts +4 -0
- package/scripts/goldens/capture-inputs.mjs +35 -0
- package/scripts/goldens/capture.mjs +214 -0
- package/scripts/goldens/colour_shift.py +27 -0
- package/scripts/goldens/native-residency.d.mts +10 -0
- package/scripts/goldens/native-residency.mjs +104 -0
- package/scripts/goldens/plot-inputs.d.mts +12 -0
- package/scripts/goldens/plot-inputs.mjs +46 -0
- package/scripts/gpu-gate/matrix.d.mts +3 -0
- package/scripts/gpu-gate/matrix.mjs +48 -0
- package/scripts/gpu-gate/probe.mjs +30 -0
- package/scripts/gpu-gate/status.d.mts +4 -0
- package/scripts/gpu-gate/status.mjs +112 -0
- package/scripts/gpu-perf/com.wildshard.gpu-perf.plist +11 -0
- package/scripts/gpu-perf/install.sh +31 -0
- package/scripts/gpu-perf/nightly.mjs +216 -0
- package/scripts/gpu-perf/nightly.sh +7 -0
- package/scripts/gpu-perf/report.d.mts +18 -0
- package/scripts/gpu-perf/report.mjs +109 -0
- package/scripts/gpu-perf/timing.sh +17 -0
- package/scripts/gpu-trace-frames.mjs +113 -0
- package/scripts/grid-crossing-walk-proof.mjs +172 -0
- package/scripts/grid-gate-proof.mjs +126 -0
- package/scripts/grid-ready-latches.d.mts +7 -0
- package/scripts/grid-ready-latches.mjs +44 -0
- package/scripts/grid-ready-memory.d.mts +3 -0
- package/scripts/grid-ready-memory.mjs +86 -0
- package/scripts/grid-runtime-evidence.d.mts +4 -0
- package/scripts/grid-runtime-evidence.mjs +107 -0
- package/scripts/grid-spawn-proof.mjs +317 -0
- package/scripts/guard-counts.d.mts +8 -0
- package/scripts/guard-counts.mjs +136 -0
- package/scripts/guard-index-tree.d.mts +2 -0
- package/scripts/guard-index-tree.mjs +19 -0
- package/scripts/heavy-lane-lease.d.mts +2 -0
- package/scripts/heavy-lane-lease.mjs +33 -0
- package/scripts/heavy-lane.py +652 -0
- package/scripts/herdr-prompt.sh +13 -0
- package/scripts/herdr-question-open.sh +22 -0
- package/scripts/hero-shots.mjs +168 -0
- package/scripts/home-icons.mjs +27 -0
- package/scripts/host-activity.ts +41 -0
- package/scripts/hud-worst/chat.ts +33 -0
- package/scripts/hud-worst.mjs +344 -0
- package/scripts/inbox-pull.mjs +129 -0
- package/scripts/inline-shell-css.mjs +30 -0
- package/scripts/input-hash-memo.d.mts +16 -0
- package/scripts/input-hash-memo.mjs +109 -0
- package/scripts/input-snapshot.d.mts +2 -0
- package/scripts/input-snapshot.mjs +45 -0
- package/scripts/ios-memory-watchdog.py +339 -0
- package/scripts/iphone-mem-reading.sh +40 -0
- package/scripts/js-entry-census.mjs +54 -0
- package/scripts/js-payload-heap.mjs +23 -0
- package/scripts/json-declarations.d.mts +3 -0
- package/scripts/json-declarations.mjs +101 -0
- package/scripts/json-output-guard.d.mts +6 -0
- package/scripts/json-output-guard.mjs +50 -0
- package/scripts/ktx2-engine-map.json +156 -0
- package/scripts/ktx2-tables.d.mts +5 -0
- package/scripts/ktx2-tables.mjs +103 -0
- package/scripts/land.d.mts +17 -0
- package/scripts/land.mjs +888 -0
- package/scripts/lane-watchdog.d.mts +11 -0
- package/scripts/lane-watchdog.mjs +256 -0
- package/scripts/latch-grid-evidence.d.mts +1 -0
- package/scripts/latch-grid-evidence.mjs +68 -0
- package/scripts/lift-pending-batches-proof.mjs +135 -0
- package/scripts/lift-pending-batches.mjs +124 -0
- package/scripts/lift-pending-history-proof.mjs +41 -0
- package/scripts/lift-pending-proof.mjs +27 -0
- package/scripts/lift-pending-schedule.mjs +23 -0
- package/scripts/lift-pending.d.mts +1 -0
- package/scripts/lift-pending.mjs +78 -0
- package/scripts/link-node-modules.d.mts +1 -0
- package/scripts/link-node-modules.mjs +291 -0
- package/scripts/lint-all.mjs +50 -0
- package/scripts/lint-cli.mjs +10 -0
- package/scripts/lint-fast.mjs +30 -0
- package/scripts/lint-game-selection-proof.mjs +27 -0
- package/scripts/lint-game.mjs +26 -0
- package/scripts/lint-tools.d.mts +4 -0
- package/scripts/lint-tools.mjs +28 -0
- package/scripts/listed-view-code.d.mts +7 -0
- package/scripts/listed-view-code.mjs +93 -0
- package/scripts/live-prepush.py +352 -0
- package/scripts/load-mem-probe.mjs +248 -0
- package/scripts/loading-bar-rule.mjs +107 -0
- package/scripts/loading-benchmark/accuracy-data.d.mts +12 -0
- package/scripts/loading-benchmark/accuracy-data.mjs +92 -0
- package/scripts/loading-benchmark/cache-bodies.d.mts +14 -0
- package/scripts/loading-benchmark/cache-bodies.mjs +103 -0
- package/scripts/loading-benchmark/catalogue.d.mts +8 -0
- package/scripts/loading-benchmark/catalogue.mjs +41 -0
- package/scripts/loading-benchmark/sim-shard.d.mts +60 -0
- package/scripts/loading-benchmark/sim-shard.mjs +289 -0
- package/scripts/loading-benchmark/transport.d.mts +9 -0
- package/scripts/loading-benchmark/transport.mjs +109 -0
- package/scripts/loading-card-proof.mjs +298 -0
- package/scripts/loading-fence-proof.mjs +67 -0
- package/scripts/loading-flow/analyse.mjs +280 -0
- package/scripts/loading-flow/benchmax.mjs +179 -0
- package/scripts/loading-flow/board.py +104 -0
- package/scripts/loading-flow/drive.mjs +283 -0
- package/scripts/loading-flow/layer-parity-proof.mjs +69 -0
- package/scripts/loading-flow/link-probe.mjs +99 -0
- package/scripts/loading-flow/profile.mjs +54 -0
- package/scripts/loading-flow/run.sh +51 -0
- package/scripts/loading-flow/source-maps-proof.mjs +86 -0
- package/scripts/loading-flow/source-maps.mjs +73 -0
- package/scripts/loading-flow/stalls.d.mts +39 -0
- package/scripts/loading-flow/stalls.mjs +141 -0
- package/scripts/loading-flow/sweep-input-proof.mjs +127 -0
- package/scripts/loading-flow/sweep-input.mjs +70 -0
- package/scripts/loading-flow/sweep-report.mjs +112 -0
- package/scripts/loading-flow/sweep.sh +101 -0
- package/scripts/loading-flow/target-proof.mjs +56 -0
- package/scripts/loading-flow/target.mjs +39 -0
- package/scripts/loading-time-left-proof.mjs +121 -0
- package/scripts/loading-time-left-rule.mjs +49 -0
- package/scripts/look-loop/cameras.d.mts +18 -0
- package/scripts/look-loop/cameras.mjs +109 -0
- package/scripts/look-loop/fit-lut.py +142 -0
- package/scripts/look-loop/palette-delta.py +183 -0
- package/scripts/look-loop/regions/driftwood-isle.json +25 -0
- package/scripts/look-loop/regions/far-reach.json +225 -0
- package/scripts/look-loop/regions/open-plot-night-market.json +855 -0
- package/scripts/look-loop/regions/pine-hollow.json +22 -0
- package/scripts/look-loop/regions/sunscar-dunes.json +281 -0
- package/scripts/look-loop/targets.py +229 -0
- package/scripts/look-loop/test_look_loop.py +133 -0
- package/scripts/look-loop/views.mjs +176 -0
- package/scripts/main-menu-aerial-plan.mjs +8 -0
- package/scripts/main-menu-aerial-poses.ts +292 -0
- package/scripts/main-pull.mjs +84 -0
- package/scripts/main-watch.d.mts +19 -0
- package/scripts/main-watch.mjs +248 -0
- package/scripts/manifest-art-inputs.json +4 -0
- package/scripts/manifest-budget.mjs +44 -0
- package/scripts/manifest-declaration.d.mts +3 -0
- package/scripts/manifest-declaration.mjs +40 -0
- package/scripts/manifest-spawns.mjs +38 -0
- package/scripts/manifest-static-imports.d.mts +2 -0
- package/scripts/manifest-static-imports.mjs +83 -0
- package/scripts/map-hash.d.mts +20 -0
- package/scripts/map-hash.mjs +155 -0
- package/scripts/map-painter.d.mts +13 -0
- package/scripts/map-painter.mjs +97 -0
- package/scripts/map-stylize.py +241 -0
- package/scripts/memory/cpuOwners.d.mts +4 -0
- package/scripts/memory/cpuOwners.mjs +51 -0
- package/scripts/memory/heapReader.d.mts +3 -0
- package/scripts/memory/heapReader.mjs +59 -0
- package/scripts/memory/js-heap-ratchet.json +17 -0
- package/scripts/memory/jsHeap.d.mts +6 -0
- package/scripts/memory/jsHeap.mjs +52 -0
- package/scripts/memory-report-blocks.d.mts +28 -0
- package/scripts/memory-report-blocks.mjs +60 -0
- package/scripts/memory-report-data.d.mts +25 -0
- package/scripts/memory-report-data.mjs +222 -0
- package/scripts/memory-report-graphic.d.mts +5 -0
- package/scripts/memory-report-graphic.mjs +90 -0
- package/scripts/memory-report-snapshot.d.mts +4 -0
- package/scripts/memory-report-snapshot.mjs +13 -0
- package/scripts/memory-report.d.mts +5 -0
- package/scripts/memory-report.mjs +94 -0
- package/scripts/mmo-bots.mjs +241 -0
- package/scripts/mobile-graphics-proof.mjs +120 -0
- package/scripts/model-spin-recording.d.mts +4 -0
- package/scripts/model-spin-recording.mjs +25 -0
- package/scripts/model-spin.mjs +327 -0
- package/scripts/module-cache-proof.mjs +43 -0
- package/scripts/name-prompt-proof.mjs +136 -0
- package/scripts/native-recorder-cache.d.mts +33 -0
- package/scripts/native-recorder-cache.mjs +287 -0
- package/scripts/native-retention-proof.mjs +79 -0
- package/scripts/night-market-kit-budget.d.mts +12 -0
- package/scripts/night-market-kit-budget.mjs +80 -0
- package/scripts/nightly-heads.ts +176 -0
- package/scripts/nightly-model.ts +127 -0
- package/scripts/nightly-tag.d.mts +1 -0
- package/scripts/nightly-tag.mjs +32 -0
- package/scripts/nightly.proof.ts +105 -0
- package/scripts/nightly.ts +43 -0
- package/scripts/nine-sim-memory.mjs +353 -0
- package/scripts/no-binary-json.d.mts +12 -0
- package/scripts/no-binary-json.mjs +270 -0
- package/scripts/non-engine-admission-proof.mjs +27 -0
- package/scripts/number-path-probe.d.mts +7 -0
- package/scripts/number-path-probe.mjs +57 -0
- package/scripts/offline-proof-rules.d.mts +23 -0
- package/scripts/offline-proof-rules.mjs +123 -0
- package/scripts/offline-proof.mjs +498 -0
- package/scripts/online-phone-proof.mjs +330 -0
- package/scripts/online-proof.mjs +150 -0
- package/scripts/online-ride-proof.mjs +74 -0
- package/scripts/online-rig.mjs +114 -0
- package/scripts/page-parity.mjs +99 -0
- package/scripts/page-release/content.d.mts +30 -0
- package/scripts/page-release/content.mjs +299 -0
- package/scripts/page-release/flow.d.mts +60 -0
- package/scripts/page-release/flow.mjs +365 -0
- package/scripts/page-release/hosts/workers.d.mts +8 -0
- package/scripts/page-release/hosts/workers.mjs +160 -0
- package/scripts/page-release/packs.mjs +108 -0
- package/scripts/page-release/redact.d.mts +1 -0
- package/scripts/page-release/redact.mjs +19 -0
- package/scripts/page-release.mjs +101 -0
- package/scripts/page-size.d.mts +13 -0
- package/scripts/page-size.mjs +198 -0
- package/scripts/parallel-fast-lint.d.mts +1 -0
- package/scripts/parallel-fast-lint.mjs +54 -0
- package/scripts/parity/audio-diagnostics.d.mts +5 -0
- package/scripts/parity/audio-diagnostics.mjs +63 -0
- package/scripts/parity/audio-settle.mjs +111 -0
- package/scripts/parity/black-frame.d.mts +11 -0
- package/scripts/parity/black-frame.mjs +58 -0
- package/scripts/parity/boot-smoke.d.mts +47 -0
- package/scripts/parity/boot-smoke.mjs +585 -0
- package/scripts/parity/boot-timing-delay.mjs +54 -0
- package/scripts/parity/browser-escape.d.mts +2 -0
- package/scripts/parity/browser-escape.mjs +50 -0
- package/scripts/parity/budgetCeilings.d.mts +3 -0
- package/scripts/parity/budgetCeilings.mjs +30 -0
- package/scripts/parity/budgets.d.mts +7 -0
- package/scripts/parity/budgets.mjs +73 -0
- package/scripts/parity/cache.d.mts +1 -0
- package/scripts/parity/cache.mjs +40 -0
- package/scripts/parity/canvas-bytes.d.mts +13 -0
- package/scripts/parity/canvas-bytes.mjs +96 -0
- package/scripts/parity/capture-rpc.d.mts +2 -0
- package/scripts/parity/capture-rpc.mjs +41 -0
- package/scripts/parity/capture-trace.d.mts +6 -0
- package/scripts/parity/capture-trace.mjs +63 -0
- package/scripts/parity/clock.d.mts +1 -0
- package/scripts/parity/clock.mjs +89 -0
- package/scripts/parity/combat.d.mts +14 -0
- package/scripts/parity/combat.mjs +81 -0
- package/scripts/parity/compare.d.mts +10 -0
- package/scripts/parity/compare.mjs +177 -0
- package/scripts/parity/explorer-smoke.d.mts +21 -0
- package/scripts/parity/explorer-smoke.mjs +310 -0
- package/scripts/parity/fast-png.d.mts +18 -0
- package/scripts/parity/fast-png.mjs +68 -0
- package/scripts/parity/fingerprint.mjs +8 -0
- package/scripts/parity/fixed-render.d.mts +11 -0
- package/scripts/parity/fixed-render.mjs +79 -0
- package/scripts/parity/frame-budget.d.mts +3 -0
- package/scripts/parity/frame-budget.mjs +39 -0
- package/scripts/parity/frame-bytes.d.mts +8 -0
- package/scripts/parity/frame-bytes.mjs +45 -0
- package/scripts/parity/frames.mjs +8 -0
- package/scripts/parity/glbytes.d.mts +8 -0
- package/scripts/parity/glbytes.mjs +148 -0
- package/scripts/parity/grid-boot-waits.d.mts +13 -0
- package/scripts/parity/grid-boot-waits.mjs +43 -0
- package/scripts/parity/heat-bytes.d.mts +5 -0
- package/scripts/parity/heat-bytes.mjs +32 -0
- package/scripts/parity/hover-touch.mjs +153 -0
- package/scripts/parity/hud.d.mts +4 -0
- package/scripts/parity/hud.mjs +17 -0
- package/scripts/parity/image-routes.d.mts +5 -0
- package/scripts/parity/image-routes.mjs +29 -0
- package/scripts/parity/init.d.mts +15 -0
- package/scripts/parity/init.mjs +63 -0
- package/scripts/parity/lane-browser.mjs +14 -0
- package/scripts/parity/offline.d.mts +5 -0
- package/scripts/parity/offline.mjs +24 -0
- package/scripts/parity/phone-route-browser.d.mts +20 -0
- package/scripts/parity/phone-route-browser.mjs +241 -0
- package/scripts/parity/phone-route-page.d.mts +10 -0
- package/scripts/parity/phone-route-page.mjs +245 -0
- package/scripts/parity/phone-route-runner.d.mts +2 -0
- package/scripts/parity/phone-route-runner.mjs +39 -0
- package/scripts/parity/phone-route.d.mts +43 -0
- package/scripts/parity/phone-route.mjs +212 -0
- package/scripts/parity/pool.d.mts +4 -0
- package/scripts/parity/pool.mjs +74 -0
- package/scripts/parity/poses.d.mts +6 -0
- package/scripts/parity/poses.mjs +57 -0
- package/scripts/parity/probe.d.mts +2 -0
- package/scripts/parity/probe.mjs +13 -0
- package/scripts/parity/profile.d.mts +2 -0
- package/scripts/parity/profile.mjs +52 -0
- package/scripts/parity/record.d.mts +8 -0
- package/scripts/parity/record.mjs +102 -0
- package/scripts/parity/resources.mjs +58 -0
- package/scripts/parity/saves.d.mts +1 -0
- package/scripts/parity/saves.mjs +14 -0
- package/scripts/parity/serve.d.mts +9 -0
- package/scripts/parity/serve.mjs +125 -0
- package/scripts/parity/shader-code.d.mts +2 -0
- package/scripts/parity/shader-code.mjs +10 -0
- package/scripts/parity/ssim.d.mts +4 -0
- package/scripts/parity/ssim.mjs +44 -0
- package/scripts/parity/telemetry.d.mts +1 -0
- package/scripts/parity/telemetry.mjs +19 -0
- package/scripts/parity/timeout.mjs +7 -0
- package/scripts/parity/title-trace.d.mts +13 -0
- package/scripts/parity/title-trace.mjs +59 -0
- package/scripts/parity/value.d.mts +11 -0
- package/scripts/parity/value.mjs +50 -0
- package/scripts/parity/walk.d.mts +10 -0
- package/scripts/parity/walk.mjs +109 -0
- package/scripts/parity.mjs +310 -0
- package/scripts/perf/README.md +47 -0
- package/scripts/perf/cameras24.json +2963 -0
- package/scripts/perf/draw-census-page.d.mts +10 -0
- package/scripts/perf/draw-census-page.mjs +162 -0
- package/scripts/perf/draw-census-poses.d.mts +14 -0
- package/scripts/perf/draw-census-poses.mjs +44 -0
- package/scripts/perf/draw-census-report.d.mts +24 -0
- package/scripts/perf/draw-census-report.mjs +86 -0
- package/scripts/perf/draw-census.mjs +156 -0
- package/scripts/perf/exact-world-capture.mjs +167 -0
- package/scripts/perf/gpu-census-coverage.d.mts +6 -0
- package/scripts/perf/gpu-census-coverage.mjs +47 -0
- package/scripts/perf/gpu-census-overdraw.mjs +105 -0
- package/scripts/perf/gpu-census-page.d.mts +11 -0
- package/scripts/perf/gpu-census-page.mjs +53 -0
- package/scripts/perf/gpu-census-report.d.mts +3 -0
- package/scripts/perf/gpu-census-report.mjs +15 -0
- package/scripts/perf/gpu-census.d.mts +6 -0
- package/scripts/perf/gpu-census.mjs +95 -0
- package/scripts/perf/material-program-loan.d.mts +18 -0
- package/scripts/perf/material-program-loan.mjs +88 -0
- package/scripts/perf/world-pixel-difference.d.mts +5 -0
- package/scripts/perf/world-pixel-difference.mjs +22 -0
- package/scripts/phone-loading/chromium.ts +113 -0
- package/scripts/phone-loading/cpu-profile.ts +47 -0
- package/scripts/phone-loading/fixtures.ts +18 -0
- package/scripts/phone-loading/instrument.ts +219 -0
- package/scripts/phone-loading/link.ts +115 -0
- package/scripts/phone-loading/main.ts +261 -0
- package/scripts/phone-loading/model.ts +123 -0
- package/scripts/phone-loading/native-body.ts +40 -0
- package/scripts/phone-loading/native-sizes.ts +194 -0
- package/scripts/phone-loading/network.ts +167 -0
- package/scripts/phone-loading/play.ts +132 -0
- package/scripts/phone-loading/post-control.ts +22 -0
- package/scripts/phone-loading/recording.ts +28 -0
- package/scripts/phone-loading/shaped-preview.ts +37 -0
- package/scripts/phone-loading/tsconfig.json +11 -0
- package/scripts/physics-baseline.mjs +433 -0
- package/scripts/physics-grid-entry.d.mts +15 -0
- package/scripts/physics-grid-entry.mjs +62 -0
- package/scripts/physics-grid.d.mts +10 -0
- package/scripts/physics-grid.mjs +102 -0
- package/scripts/physics-native.d.mts +6 -0
- package/scripts/physics-native.mjs +81 -0
- package/scripts/physics-route.json +4400 -0
- package/scripts/physics-walk.d.mts +16 -0
- package/scripts/physics-walk.mjs +79 -0
- package/scripts/pid-lock.d.mts +1 -0
- package/scripts/pid-lock.mjs +63 -0
- package/scripts/pin-assets.ts +94 -0
- package/scripts/pin-format.ts +43 -0
- package/scripts/pin-packs.ts +17 -0
- package/scripts/pins-exclude.d.mts +3 -0
- package/scripts/pins-exclude.mjs +54 -0
- package/scripts/pins-reuse.d.mts +27 -0
- package/scripts/pins-reuse.mjs +321 -0
- package/scripts/pins.ts +468 -0
- package/scripts/platform-chargebacks.d.mts +9 -0
- package/scripts/platform-chargebacks.mjs +135 -0
- package/scripts/playground-grapple.mjs +154 -0
- package/scripts/playground-harness.mjs +137 -0
- package/scripts/playground-horse.mjs +106 -0
- package/scripts/prebuilt-output.py +322 -0
- package/scripts/precommit-checks.d.mts +3 -0
- package/scripts/precommit-checks.mjs +115 -0
- package/scripts/precommit-inputs.d.mts +5 -0
- package/scripts/precommit-inputs.mjs +73 -0
- package/scripts/precommit-jobs.d.mts +5 -0
- package/scripts/precommit-jobs.mjs +85 -0
- package/scripts/precommit-source.py +493 -0
- package/scripts/preparation-cache-key.d.mts +2 -0
- package/scripts/preparation-cache-key.mjs +70 -0
- package/scripts/prepush-proof.mjs +36 -0
- package/scripts/preview-encoded-cache.d.mts +7 -0
- package/scripts/preview-encoded-cache.mjs +64 -0
- package/scripts/preview-lag.mjs +80 -0
- package/scripts/preview-server.mjs +256 -0
- package/scripts/preview-telemetry.d.mts +4 -0
- package/scripts/preview-telemetry.mjs +56 -0
- package/scripts/product-build-times.d.mts +3 -0
- package/scripts/product-build-times.mjs +42 -0
- package/scripts/program-discovery.d.mts +5 -0
- package/scripts/program-discovery.mjs +42 -0
- package/scripts/progress-recording.d.mts +6 -0
- package/scripts/progress-recording.mjs +26 -0
- package/scripts/progress-video.sh +27 -0
- package/scripts/proof-run.sh +69 -0
- package/scripts/prune-local-caches.mjs +10 -0
- package/scripts/public-grid.d.mts +11 -0
- package/scripts/public-grid.mjs +56 -0
- package/scripts/push-budget.d.mts +3 -0
- package/scripts/push-budget.mjs +5 -0
- package/scripts/push-cache-git-proof.mjs +32 -0
- package/scripts/push-cache-lease-proof.mjs +22 -0
- package/scripts/push-cache-proof.mjs +29 -0
- package/scripts/push-checks.d.mts +2 -0
- package/scripts/push-checks.mjs +116 -0
- package/scripts/push-cohort-proof.mjs +15 -0
- package/scripts/push-dependencies.mjs +97 -0
- package/scripts/push-dependency-proof.mjs +53 -0
- package/scripts/push-duration-sequencer.ts +26 -0
- package/scripts/push-environment.mjs +21 -0
- package/scripts/push-exclusion-proof.mjs +81 -0
- package/scripts/push-gate-copy.mjs +168 -0
- package/scripts/push-inputs.d.mts +4 -0
- package/scripts/push-inputs.mjs +99 -0
- package/scripts/push-lint-config.d.mts +4 -0
- package/scripts/push-lint-config.mjs +26 -0
- package/scripts/push-local-split.d.mts +15 -0
- package/scripts/push-local-split.mjs +116 -0
- package/scripts/push-loop.py +317 -0
- package/scripts/push-proof-cache.mjs +131 -0
- package/scripts/push-ref-tree-proof.mjs +63 -0
- package/scripts/push-related.mjs +29 -0
- package/scripts/push-selection-dev-proof.mjs +57 -0
- package/scripts/push-selection-proof.mjs +45 -0
- package/scripts/push-selection.d.mts +2 -0
- package/scripts/push-selection.mjs +65 -0
- package/scripts/push-vitest.config.ts +20 -0
- package/scripts/push_input_cache.py +306 -0
- package/scripts/quarantine-placement-proof.mjs +28 -0
- package/scripts/quarantine-renewal-proof.mjs +34 -0
- package/scripts/quarantine-window-proof.mjs +26 -0
- package/scripts/quest-complete-proof.mjs +78 -0
- package/scripts/quiet-cli.mjs +13 -0
- package/scripts/quiet_logs.py +79 -0
- package/scripts/ratchet-approval.d.mts +3 -0
- package/scripts/ratchet-approval.mjs +70 -0
- package/scripts/record-fence-reads.mjs +115 -0
- package/scripts/release-check.mjs +22 -0
- package/scripts/release-proof-proof.mjs +71 -0
- package/scripts/reload-title-proof.mjs +100 -0
- package/scripts/remote-air-proof.mjs +137 -0
- package/scripts/remote-bar-proof.mjs +75 -0
- package/scripts/remote-board-proof.mjs +129 -0
- package/scripts/remote-body-proof.mjs +101 -0
- package/scripts/remote-death-proof.mjs +134 -0
- package/scripts/remote-gait-proof.mjs +139 -0
- package/scripts/remote-held-proof.mjs +155 -0
- package/scripts/remote-hurt-proof.mjs +121 -0
- package/scripts/remote-map-proof.mjs +103 -0
- package/scripts/remote-name-proof.mjs +123 -0
- package/scripts/remote-players-proof.mjs +214 -0
- package/scripts/remote-room.mjs +75 -0
- package/scripts/remote-strike-proof.mjs +148 -0
- package/scripts/renderer-revision-replay.mjs +49 -0
- package/scripts/renderer-revision.d.mts +12 -0
- package/scripts/renderer-revision.mjs +101 -0
- package/scripts/renderer-revision.proof.mjs +71 -0
- package/scripts/repo-size.d.mts +43 -0
- package/scripts/repo-size.mjs +540 -0
- package/scripts/ring-cook.mjs +51 -0
- package/scripts/ring-step.ts +112 -0
- package/scripts/ring1.sh +79 -0
- package/scripts/room-deploy.mjs +130 -0
- package/scripts/room-soak.mjs +40 -0
- package/scripts/runtime_input_copies.py +49 -0
- package/scripts/scorecard.mjs +1156 -0
- package/scripts/script-scenario-metrics.d.mts +10 -0
- package/scripts/script-scenario-metrics.mjs +75 -0
- package/scripts/section-types.d.mts +3 -0
- package/scripts/section-types.mjs +35 -0
- package/scripts/sentry-maps.d.mts +9 -0
- package/scripts/sentry-maps.mjs +94 -0
- package/scripts/serialize-asset-tables.mjs +13 -0
- package/scripts/serve-build.sh +392 -0
- package/scripts/serve-port-lease.py +100 -0
- package/scripts/serve-shared-preview.py +295 -0
- package/scripts/server-origin.mjs +10 -0
- package/scripts/server-release/github.mjs +142 -0
- package/scripts/server-release/publish.d.mts +19 -0
- package/scripts/server-release/publish.mjs +143 -0
- package/scripts/server-release/sign.d.mts +10 -0
- package/scripts/server-release/sign.mjs +75 -0
- package/scripts/shard-component-spans.d.mts +15 -0
- package/scripts/shard-component-spans.mjs +18 -0
- package/scripts/shard-components.d.mts +16 -0
- package/scripts/shard-components.mjs +365 -0
- package/scripts/shard-coupling.d.mts +11 -0
- package/scripts/shard-coupling.mjs +238 -0
- package/scripts/shard-folders.mjs +14 -0
- package/scripts/shard-net-lines.d.mts +13 -0
- package/scripts/shard-net-lines.mjs +62 -0
- package/scripts/shard-output-content.d.mts +4 -0
- package/scripts/shard-output-content.mjs +27 -0
- package/scripts/shard-outputs.d.mts +12 -0
- package/scripts/shard-outputs.mjs +64 -0
- package/scripts/shard-phone-memory.d.mts +37 -0
- package/scripts/shard-phone-memory.mjs +556 -0
- package/scripts/shard-platform-format.d.mts +10 -0
- package/scripts/shard-platform-format.mjs +7 -0
- package/scripts/shard-platform-hosts.d.mts +2 -0
- package/scripts/shard-platform-hosts.mjs +93 -0
- package/scripts/shard-platform-output.d.mts +12 -0
- package/scripts/shard-platform-output.mjs +74 -0
- package/scripts/shard-platform-sections.d.mts +2 -0
- package/scripts/shard-platform-sections.mjs +9 -0
- package/scripts/shard-platform.d.mts +76 -0
- package/scripts/shard-platform.mjs +1072 -0
- package/scripts/shard-public.d.mts +3 -0
- package/scripts/shard-public.mjs +36 -0
- package/scripts/shard-runtime-closure.d.mts +3 -0
- package/scripts/shard-runtime-closure.mjs +30 -0
- package/scripts/shard-size-gate.d.mts +13 -0
- package/scripts/shard-size-gate.mjs +135 -0
- package/scripts/shard-size-watch.d.mts +7 -0
- package/scripts/shard-size-watch.mjs +70 -0
- package/scripts/shard-wire-meter.mjs +107 -0
- package/scripts/shardfile-cache.d.mts +17 -0
- package/scripts/shardfile-cache.mjs +268 -0
- package/scripts/shardfile-inputs.d.mts +19 -0
- package/scripts/shardfile-inputs.mjs +452 -0
- package/scripts/shardfile-validation-revision.d.mts +1 -0
- package/scripts/shardfile-validation-revision.mjs +30 -0
- package/scripts/shards.d.mts +7 -0
- package/scripts/shards.mjs +16 -0
- package/scripts/side-parity.d.mts +8 -0
- package/scripts/side-parity.mjs +220 -0
- package/scripts/sim-boost-lap.mjs +198 -0
- package/scripts/sim-grid-entry.mjs +534 -0
- package/scripts/sim-in-runtime.d.mts +6 -0
- package/scripts/sim-in-runtime.mjs +146 -0
- package/scripts/sim-lane.sh +351 -0
- package/scripts/sim-mem-phases.py +195 -0
- package/scripts/sim-memory.mjs +414 -0
- package/scripts/sim-node-loader.mjs +37 -0
- package/scripts/sim-presentation-proof.py +37 -0
- package/scripts/sim-quiet.py +160 -0
- package/scripts/sim-safari-ready.py +896 -0
- package/scripts/sim-transport.c +93 -0
- package/scripts/slice-inputs.ts +31 -0
- package/scripts/smoke-timings.py +34 -0
- package/scripts/snapshot-admission-proof.mjs +55 -0
- package/scripts/soak/boundary.mjs +110 -0
- package/scripts/soak/inspector.d.mts +18 -0
- package/scripts/soak/inspector.mjs +74 -0
- package/scripts/soak/memory-categories.d.mts +12 -0
- package/scripts/soak/memory-categories.mjs +28 -0
- package/scripts/socket-smoke.mjs +20 -0
- package/scripts/sort-sides.d.mts +33 -0
- package/scripts/sort-sides.mjs +919 -0
- package/scripts/source-generation-outputs.json +11 -0
- package/scripts/source-generators.d.mts +11 -0
- package/scripts/source-generators.mjs +59 -0
- package/scripts/source-input-proof.d.mts +12 -0
- package/scripts/source-input-proof.mjs +106 -0
- package/scripts/source-table-cache.d.mts +2 -0
- package/scripts/source-table-cache.mjs +102 -0
- package/scripts/sp-tools.py +150 -0
- package/scripts/sp-tools.sh +6 -0
- package/scripts/split-repair-data-shard.mjs +98 -0
- package/scripts/split-repair-guardian.mjs +26 -0
- package/scripts/split-repair-hare.mjs +54 -0
- package/scripts/split-repair-held-melee.mjs +41 -0
- package/scripts/split-repair-horse-panic.mjs +45 -0
- package/scripts/split-repair-movers.mjs +92 -0
- package/scripts/split-repair-nalati-signals.mjs +94 -0
- package/scripts/split-repair-perks.mjs +73 -0
- package/scripts/split-repair-pine-writes.mjs +76 -0
- package/scripts/split-repair-proof.mjs +24 -0
- package/scripts/split-repair-sky-trails.mjs +110 -0
- package/scripts/split-repair-stun.mjs +37 -0
- package/scripts/split-repair-wake-loss.mjs +35 -0
- package/scripts/split-repair-whip.mjs +44 -0
- package/scripts/staging-proof-lines.d.mts +8 -0
- package/scripts/staging-proof-lines.mjs +85 -0
- package/scripts/standalone-smoke.mjs +116 -0
- package/scripts/storage-policy.json +89 -0
- package/scripts/temp-janitor.d.mts +6 -0
- package/scripts/temp-janitor.mjs +40 -0
- package/scripts/template-format-proof.mjs +44 -0
- package/scripts/test-amber.d.mts +11 -0
- package/scripts/test-amber.mjs +90 -0
- package/scripts/test-build-tools.ts +24 -0
- package/scripts/test-facade-instancing.mjs +53 -0
- package/scripts/test-ios-memory-watchdog.py +107 -0
- package/scripts/test-products.json +389 -0
- package/scripts/test-quarantine.d.mts +6 -0
- package/scripts/test-quarantine.mjs +132 -0
- package/scripts/test-shard-plan.ts +66 -0
- package/scripts/test-timings.d.mts +14 -0
- package/scripts/test-timings.mjs +174 -0
- package/scripts/test_agent_time.py +155 -0
- package/scripts/test_browser_lane.py +239 -0
- package/scripts/test_lease_order.py +142 -0
- package/scripts/test_partition.py +23 -0
- package/scripts/test_prebuilt_output.py +258 -0
- package/scripts/test_products.py +20 -0
- package/scripts/test_serve_ports.py +645 -0
- package/scripts/test_sim_lane.py +1661 -0
- package/scripts/test_sim_quiet.py +140 -0
- package/scripts/texture-inputs.d.mts +4 -0
- package/scripts/texture-inputs.mjs +16 -0
- package/scripts/tile-bake-policy.d.mts +4 -0
- package/scripts/tile-bake-policy.mjs +43 -0
- package/scripts/tile-bake-report.d.mts +17 -0
- package/scripts/tile-bake-report.mjs +161 -0
- package/scripts/tile-bakes.d.mts +13 -0
- package/scripts/tile-bakes.mjs +100 -0
- package/scripts/timelapse.sh +44 -0
- package/scripts/title-assets.d.mts +6 -0
- package/scripts/title-assets.generated.json +9 -0
- package/scripts/title-assets.mjs +46 -0
- package/scripts/title-exit-proof.mjs +132 -0
- package/scripts/tsconfig.json +576 -0
- package/scripts/typecheck-lint.sh +21 -0
- package/scripts/typecheck-root.d.mts +2 -0
- package/scripts/typecheck-root.mjs +18 -0
- package/scripts/types/wildshard-probe.d.ts +29 -0
- package/scripts/types/worker-page.d.ts +55 -0
- package/scripts/uncatalogued-shard-proof.mjs +48 -0
- package/scripts/vite-tmp.d.mts +23 -0
- package/scripts/vite-tmp.mjs +157 -0
- package/scripts/vitest-bench.py +800 -0
- package/scripts/vitest-ci-files.ts +90 -0
- package/scripts/vitest-ci.config.ts +15 -0
- package/scripts/vitest-cpu.ts +46 -0
- package/scripts/vitest-environments.ts +41 -0
- package/scripts/vitest-fixture-snapshots.config.ts +8 -0
- package/scripts/vitest-lane.ts +53 -0
- package/scripts/vitest-module-cache.ts +49 -0
- package/scripts/vitest-native-escape.config.ts +9 -0
- package/scripts/vitest-plan.ts +94 -0
- package/scripts/vitest-push-guards.config.ts +13 -0
- package/scripts/vitest-push.config.ts +19 -0
- package/scripts/vitest-shard.ts +109 -0
- package/scripts/vitest-timings.ts +32 -0
- package/scripts/vitest-tmp.ts +83 -0
- package/scripts/vitest.sh +5 -0
- package/scripts/vps/dump.sh +50 -0
- package/scripts/vps/harden-apply.sh +490 -0
- package/scripts/vps/harden-caddy.sh +215 -0
- package/scripts/vps/harden.sh +358 -0
- package/scripts/vps/health-stub.mjs +11 -0
- package/scripts/vps/pull.mjs +156 -0
- package/scripts/vps/rebuild.sh +531 -0
- package/scripts/vps/restore-check.sh +35 -0
- package/scripts/vps/setup-state.mjs +121 -0
- package/scripts/vps/setup.sh +442 -0
- package/scripts/vps/uptime.sh +26 -0
- package/scripts/vps/wildshard-agent.pub +1 -0
- package/scripts/vps/wildshard-apply.mjs +127 -0
- package/scripts/vps/wildshard-config +211 -0
- package/scripts/vps-harden-proof.sh +117 -0
- package/scripts/vps-rebuild-proof.sh +170 -0
- package/scripts/warm-native-chrome.d.mts +6 -0
- package/scripts/warm-native-chrome.mjs +75 -0
- package/scripts/webkit-mem-reading.mjs +157 -0
- package/scripts/webkit-render-smoke.mjs +145 -0
- package/scripts/worker-bootstrap-proof.mjs +79 -0
- package/scripts/worker-client-death-return.mjs +97 -0
- package/scripts/worker-client-death.mjs +67 -0
- package/scripts/worker-client-fights.mjs +1438 -0
- package/scripts/worker-client-grid-entry.mjs +239 -0
- package/scripts/worker-client-hurt.mjs +92 -0
- package/scripts/worker-client-moments.mjs +340 -0
- package/scripts/worker-client-partner.mjs +93 -0
- package/scripts/worker-client-pine-durable.mjs +102 -0
- package/scripts/worker-client-pine-grid.mjs +77 -0
- package/scripts/worker-client-pine-import.mjs +93 -0
- package/scripts/worker-client-pine.mjs +114 -0
- package/scripts/worker-client-play.mjs +572 -0
- package/scripts/worker-client-proof.mjs +201 -0
- package/scripts/worker-client-repairs.mjs +108 -0
- package/scripts/worker-client-returns.mjs +51 -0
- package/scripts/worker-client-saves.mjs +146 -0
- package/scripts/worker-client-windup.mjs +50 -0
- package/scripts/worktree-ignore.d.mts +4 -0
- package/scripts/worktree-ignore.mjs +36 -0
- package/scripts/worktree-reap.mjs +214 -0
- package/scripts/worktree.mjs +339 -0
- package/src/.oxfmtrc.json +48 -0
- package/src/.oxlintrc.json +190 -0
- package/src/cli/main.ts +112 -0
- package/src/cli/version.ts +13 -0
- package/src/client/app/assetTables.ts +68 -0
- package/src/client/app/bootDownloads.ts +43 -0
- package/src/client/app/bootRoute.ts +27 -0
- package/src/client/app/calibrate.ts +9 -0
- package/src/client/app/dropModal.ts +99 -0
- package/src/client/app/entry.ts +439 -0
- package/src/client/app/failScreens.ts +561 -0
- package/src/client/app/identity.ts +10 -0
- package/src/client/app/main.ts +3 -0
- package/src/client/app/pageServices.ts +20 -0
- package/src/client/app/selectedManifests.ts +31 -0
- package/src/client/app/shardSelection.ts +46 -0
- package/src/client/app/titleSettings.ts +15 -0
- package/src/client/app.tsx +53 -0
- package/src/client/engine/ai/view/eliteController.ts +148 -0
- package/src/client/engine/ai/view/eliteEntry.ts +464 -0
- package/src/client/engine/aliasFixture.webp +0 -0
- package/src/client/engine/anim/channel.ts +58 -0
- package/src/client/engine/anim/machine.ts +77 -0
- package/src/client/engine/anim/rig.ts +150 -0
- package/src/client/engine/anim/rigAtlas.ts +73 -0
- package/src/client/engine/anim/rigParser.ts +59 -0
- package/src/client/engine/app/app.ts +262 -0
- package/src/client/engine/app/assets.ts +122 -0
- package/src/client/engine/app/cachedAssets.ts +116 -0
- package/src/client/engine/app/disposalCache.ts +30 -0
- package/src/client/engine/app/runtime.ts +16 -0
- package/src/client/engine/app/sceneOwnership.ts +317 -0
- package/src/client/engine/app/services.ts +20 -0
- package/src/client/engine/app/systems.ts +71 -0
- package/src/client/engine/app/ui.ts +33 -0
- package/src/client/engine/app/view/frameScheduler.ts +65 -0
- package/src/client/engine/app/view/pageActivity.ts +12 -0
- package/src/client/engine/app/view/presentation.ts +41 -0
- package/src/client/engine/app/view/presentationLoop.ts +56 -0
- package/src/client/engine/app/view/scopeEnvironment.ts +39 -0
- package/src/client/engine/app/workerScope.js +20 -0
- package/src/client/engine/audio/AmbienceBeds.ts +197 -0
- package/src/client/engine/audio/Audio.ts +634 -0
- package/src/client/engine/audio/Cues.ts +153 -0
- package/src/client/engine/audio/Music.ts +958 -0
- package/src/client/engine/audio/SetScore.ts +297 -0
- package/src/client/engine/audio/Stems.ts +277 -0
- package/src/client/engine/audio/Voices.ts +299 -0
- package/src/client/engine/audio/aacNative.ts +46 -0
- package/src/client/engine/audio/aacPull.ts +166 -0
- package/src/client/engine/audio/aacSource.ts +122 -0
- package/src/client/engine/audio/aacTrack.ts +115 -0
- package/src/client/engine/audio/aacWindows.ts +66 -0
- package/src/client/engine/audio/activity.ts +70 -0
- package/src/client/engine/audio/activityTimers.ts +37 -0
- package/src/client/engine/audio/ambience.ts +549 -0
- package/src/client/engine/audio/audioLog.ts +22 -0
- package/src/client/engine/audio/codecs.merge.d.ts +9 -0
- package/src/client/engine/audio/credits.ts +48 -0
- package/src/client/engine/audio/cueRouting.ts +93 -0
- package/src/client/engine/audio/declared.ts +95 -0
- package/src/client/engine/audio/declaredAmbience.ts +113 -0
- package/src/client/engine/audio/declaredBank.ts +104 -0
- package/src/client/engine/audio/declaredGameplay.ts +82 -0
- package/src/client/engine/audio/dsp.ts +164 -0
- package/src/client/engine/audio/gen.ts +538 -0
- package/src/client/engine/audio/interactSfx.ts +95 -0
- package/src/client/engine/audio/levelAudio.ts +131 -0
- package/src/client/engine/audio/loopWindow.ts +24 -0
- package/src/client/engine/audio/ownership.ts +16 -0
- package/src/client/engine/audio/playerVoices.ts +278 -0
- package/src/client/engine/audio/preload.ts +166 -0
- package/src/client/engine/audio/score/score.ts +60 -0
- package/src/client/engine/audio/scoreSelection.ts +19 -0
- package/src/client/engine/audio/surface.ts +71 -0
- package/src/client/engine/audio/synth.ts +301 -0
- package/src/client/engine/audio/unlock.ts +104 -0
- package/src/client/engine/audio/util.ts +95 -0
- package/src/client/engine/blocks.ts +6 -0
- package/src/client/engine/boot/audioFiles.ts +9 -0
- package/src/client/engine/boot/audioInventory.ts +34 -0
- package/src/client/engine/boot/audioPack.ts +54 -0
- package/src/client/engine/boot/bakedApi.ts +46 -0
- package/src/client/engine/boot/bakedTextures.ts +114 -0
- package/src/client/engine/boot/bootCache.ts +16 -0
- package/src/client/engine/boot/bootTrace.ts +362 -0
- package/src/client/engine/boot/browserChunkRecovery.ts +136 -0
- package/src/client/engine/boot/bytes.ts +272 -0
- package/src/client/engine/boot/catalog.ts +35 -0
- package/src/client/engine/boot/chunkRecovery.ts +41 -0
- package/src/client/engine/boot/clearDownloads.ts +128 -0
- package/src/client/engine/boot/contentBase.ts +77 -0
- package/src/client/engine/boot/contentRead.ts +151 -0
- package/src/client/engine/boot/diagnostics.ts +195 -0
- package/src/client/engine/boot/download.ts +112 -0
- package/src/client/engine/boot/dropNotice.ts +260 -0
- package/src/client/engine/boot/earlyPrograms.ts +123 -0
- package/src/client/engine/boot/extras.ts +324 -0
- package/src/client/engine/boot/filePolicy.ts +126 -0
- package/src/client/engine/boot/firstPlayMark.ts +43 -0
- package/src/client/engine/boot/gpuFiles.ts +176 -0
- package/src/client/engine/boot/gpuTrace.ts +42 -0
- package/src/client/engine/boot/idle.ts +52 -0
- package/src/client/engine/boot/imageDecode.ts +95 -0
- package/src/client/engine/boot/imageDecode.worker.ts +69 -0
- package/src/client/engine/boot/ktx2.generated.ts +157 -0
- package/src/client/engine/boot/lastEnd.ts +312 -0
- package/src/client/engine/boot/leaveAfterPaint.ts +16 -0
- package/src/client/engine/boot/liveJsonParser.ts +124 -0
- package/src/client/engine/boot/liveJsonParser.worker.ts +22 -0
- package/src/client/engine/boot/loadingDownloadText.ts +54 -0
- package/src/client/engine/boot/loadingPacks.ts +18 -0
- package/src/client/engine/boot/lowPower.ts +96 -0
- package/src/client/engine/boot/manifest.ts +12 -0
- package/src/client/engine/boot/pack.ts +180 -0
- package/src/client/engine/boot/parsedPages.ts +115 -0
- package/src/client/engine/boot/perflog.ts +15 -0
- package/src/client/engine/boot/plan.ts +256 -0
- package/src/client/engine/boot/prefetch.ts +188 -0
- package/src/client/engine/boot/prefetchQuota.ts +84 -0
- package/src/client/engine/boot/readContentResponse.ts +17 -0
- package/src/client/engine/boot/retry.ts +14 -0
- package/src/client/engine/boot/runtime.ts +21 -0
- package/src/client/engine/boot/shardPrefetch.ts +278 -0
- package/src/client/engine/boot/shell.ts +135 -0
- package/src/client/engine/boot/stuck.ts +106 -0
- package/src/client/engine/boot/stuckStep.ts +99 -0
- package/src/client/engine/boot/sw.ts +385 -0
- package/src/client/engine/boot/swGlobal.d.ts +9 -0
- package/src/client/engine/boot/texturePack.ts +182 -0
- package/src/client/engine/boot/timeLeft.ts +106 -0
- package/src/client/engine/boot/titleArrival.ts +101 -0
- package/src/client/engine/boot/weights.ts +21 -0
- package/src/client/engine/boot.ts +51 -0
- package/src/client/engine/build.d.ts +2 -0
- package/src/client/engine/calibrate/entry.ts +29 -0
- package/src/client/engine/calibrate/js.ts +39 -0
- package/src/client/engine/calibrate/math.ts +23 -0
- package/src/client/engine/calibrate/run.ts +93 -0
- package/src/client/engine/calibrate/wasm.ts +154 -0
- package/src/client/engine/combat/EquipmentService.ts +412 -0
- package/src/client/engine/combat/cues.ts +46 -0
- package/src/client/engine/combat/types.ts +21 -0
- package/src/client/engine/combat/view/Bow.ts +462 -0
- package/src/client/engine/combat/view/DropArc.ts +64 -0
- package/src/client/engine/combat/view/EquipmentHost.ts +15 -0
- package/src/client/engine/combat/view/SweptMelee.ts +691 -0
- package/src/client/engine/combat/view/bowProfile.ts +182 -0
- package/src/client/engine/combat/view/brass.ts +65 -0
- package/src/client/engine/combat/view/firearmFx.ts +25 -0
- package/src/client/engine/combat/view/hitscan.ts +29 -0
- package/src/client/engine/combat/view/melee.ts +67 -0
- package/src/client/engine/combat/view/projectedTrail.ts +42 -0
- package/src/client/engine/combat/view/projectile.ts +315 -0
- package/src/client/engine/combat/view/ranged.ts +460 -0
- package/src/client/engine/combat/view/rangedFeel.ts +39 -0
- package/src/client/engine/combat/view/slashTrail.ts +151 -0
- package/src/client/engine/core/Game.ts +1833 -0
- package/src/client/engine/core/GpuRecovery.ts +200 -0
- package/src/client/engine/core/Grade.ts +109 -0
- package/src/client/engine/core/KeepAlive.ts +32 -0
- package/src/client/engine/core/Tour.ts +46 -0
- package/src/client/engine/core/Volumetrics.ts +260 -0
- package/src/client/engine/core/apiOrigin.ts +12 -0
- package/src/client/engine/core/assets.ts +292 -0
- package/src/client/engine/core/bootstrap.ts +175 -0
- package/src/client/engine/core/crashFlag.ts +32 -0
- package/src/client/engine/core/crossroads.ts +4 -0
- package/src/client/engine/core/deflate.ts +110 -0
- package/src/client/engine/core/devMode.ts +49 -0
- package/src/client/engine/core/devPixels.ts +62 -0
- package/src/client/engine/core/drawBudget.ts +48 -0
- package/src/client/engine/core/errorReport.ts +248 -0
- package/src/client/engine/core/gpuOnly.ts +139 -0
- package/src/client/engine/core/graphicsMode.ts +62 -0
- package/src/client/engine/core/graphicsQuality.ts +117 -0
- package/src/client/engine/core/heldTiming.ts +24 -0
- package/src/client/engine/core/ktx2.ts +511 -0
- package/src/client/engine/core/ktx2Sources.ts +22 -0
- package/src/client/engine/core/ktx2Zstd.ts +151 -0
- package/src/client/engine/core/ktx2Zstd.worker.ts +31 -0
- package/src/client/engine/core/practiceRoom.ts +16 -0
- package/src/client/engine/core/reloadGuard.ts +21 -0
- package/src/client/engine/core/scopedCpu.ts +49 -0
- package/src/client/engine/core/scopedWorkerPool.ts +55 -0
- package/src/client/engine/core/shadowLayer.ts +8 -0
- package/src/client/engine/core/slowGpuPacing.ts +118 -0
- package/src/client/engine/core/sustainedFrames.ts +73 -0
- package/src/client/engine/core/tier.ts +126 -0
- package/src/client/engine/core/viewport.ts +130 -0
- package/src/client/engine/core/webglStartup.ts +50 -0
- package/src/client/engine/core/worldDepth.ts +183 -0
- package/src/client/engine/core/zstdFrame.ts +38 -0
- package/src/client/engine/debug/probe.ts +560 -0
- package/src/client/engine/debug/timerBaseline.ts +14 -0
- package/src/client/engine/entities/AnimalFactory.ts +766 -0
- package/src/client/engine/entities/AnimalHerdView.ts +413 -0
- package/src/client/engine/entities/AnimalView.ts +583 -0
- package/src/client/engine/entities/RowBodies.ts +276 -0
- package/src/client/engine/entities/animalMatrices.ts +179 -0
- package/src/client/engine/entities/animalShadow.ts +58 -0
- package/src/client/engine/entities/animalShells.ts +14 -0
- package/src/client/engine/entities/farHerd.ts +469 -0
- package/src/client/engine/entities/lowpoly.ts +155 -0
- package/src/client/engine/entities/species/loft.ts +253 -0
- package/src/client/engine/entities/species/look.ts +122 -0
- package/src/client/engine/events/maps.ts +58 -0
- package/src/client/engine/explore/Compare.ts +126 -0
- package/src/client/engine/explore/Explore.ts +648 -0
- package/src/client/engine/explore/FreeCam.ts +280 -0
- package/src/client/engine/explore/MiniMap.ts +283 -0
- package/src/client/engine/explore/ModelExplorer.ts +1155 -0
- package/src/client/engine/explore/Select.ts +176 -0
- package/src/client/engine/explore/SetExplorer.ts +553 -0
- package/src/client/engine/explore/TouchFly.ts +236 -0
- package/src/client/engine/explore/catalog.ts +159 -0
- package/src/client/engine/explore/diorama.ts +245 -0
- package/src/client/engine/explore/fatLines.ts +47 -0
- package/src/client/engine/explore/img/mockups/nalati-camp-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-camp-target.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-gully-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-gully-target.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-rail-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nalati-rail-target.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nine-gate-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nine-gate-target.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nine-stair-live.jpg +0 -0
- package/src/client/engine/explore/img/mockups/nine-stair-target.jpg +0 -0
- package/src/client/engine/explore/pick.ts +120 -0
- package/src/client/engine/explore/registry.ts +16 -0
- package/src/client/engine/explore/setView.ts +222 -0
- package/src/client/engine/explore/tiers.ts +27 -0
- package/src/client/engine/explore/viewPoint.ts +100 -0
- package/src/client/engine/fx/Impacts.ts +154 -0
- package/src/client/engine/fx/LightPool.ts +188 -0
- package/src/client/engine/fx/ParticlePool.ts +76 -0
- package/src/client/engine/fx/SiteLights.ts +119 -0
- package/src/client/engine/fx/effectField.ts +91 -0
- package/src/client/engine/fx/groundFx.ts +144 -0
- package/src/client/engine/fx/groundTell.ts +101 -0
- package/src/client/engine/fx/lightEmitters.ts +35 -0
- package/src/client/engine/input/ControlsPanel.ts +108 -0
- package/src/client/engine/input/InputService.ts +394 -0
- package/src/client/engine/input/bindingTable.ts +124 -0
- package/src/client/engine/input/bindings.ts +101 -0
- package/src/client/engine/input/dom.ts +62 -0
- package/src/client/engine/input/equipmentInput.ts +4 -0
- package/src/client/engine/input/gameplay.ts +36 -0
- package/src/client/engine/input/keycap.ts +25 -0
- package/src/client/engine/input/menuInput.ts +7 -0
- package/src/client/engine/input/platform.ts +36 -0
- package/src/client/engine/input/weaponActions.ts +8 -0
- package/src/client/engine/level/frame.ts +95 -0
- package/src/client/engine/level/installation.ts +107 -0
- package/src/client/engine/level/load.ts +97 -0
- package/src/client/engine/level/registrations.ts +59 -0
- package/src/client/engine/math/color.ts +6 -0
- package/src/client/engine/models/animalGeometry.ts +29 -0
- package/src/client/engine/models/castawayBody.ts +257 -0
- package/src/client/engine/models/colliders.ts +186 -0
- package/src/client/engine/models/creature.ts +66 -0
- package/src/client/engine/models/cull.ts +953 -0
- package/src/client/engine/models/gear.ts +87 -0
- package/src/client/engine/models/geometryPack.ts +14 -0
- package/src/client/engine/models/hoverboard.ts +29 -0
- package/src/client/engine/models/instancedBatch.ts +324 -0
- package/src/client/engine/models/interact.ts +26 -0
- package/src/client/engine/models/live.ts +174 -0
- package/src/client/engine/models/model.ts +449 -0
- package/src/client/engine/models/modelPose.ts +14 -0
- package/src/client/engine/models/nativeGeometry.ts +114 -0
- package/src/client/engine/models/ownedGeometry.ts +294 -0
- package/src/client/engine/models/place.ts +1476 -0
- package/src/client/engine/models/roster.ts +44 -0
- package/src/client/engine/models/sets.ts +74 -0
- package/src/client/engine/models/slots.ts +69 -0
- package/src/client/engine/models/staticSets.ts +119 -0
- package/src/client/engine/models/swimHands.ts +44 -0
- package/src/client/engine/models/trainingDummy.ts +46 -0
- package/src/client/engine/models/trainingDummyFigure.ts +16 -0
- package/src/client/engine/models/weld.ts +260 -0
- package/src/client/engine/net/attackPrediction.ts +38 -0
- package/src/client/engine/net/client.ts +314 -0
- package/src/client/engine/net/heldOnOthers.ts +167 -0
- package/src/client/engine/net/hurtOther.ts +12 -0
- package/src/client/engine/net/interpolator.ts +179 -0
- package/src/client/engine/net/nameTag.ts +88 -0
- package/src/client/engine/net/netClock.ts +90 -0
- package/src/client/engine/net/netPlayer.ts +265 -0
- package/src/client/engine/net/netRecord.ts +43 -0
- package/src/client/engine/net/onRep.ts +75 -0
- package/src/client/engine/net/otherPlayers.ts +239 -0
- package/src/client/engine/net/othersOnMap.ts +80 -0
- package/src/client/engine/net/predictionWorld.ts +100 -0
- package/src/client/engine/net/predictor.ts +233 -0
- package/src/client/engine/net/redial.ts +179 -0
- package/src/client/engine/net/remoteAir.ts +134 -0
- package/src/client/engine/net/remoteBoard.ts +128 -0
- package/src/client/engine/net/remoteDeath.ts +140 -0
- package/src/client/engine/net/remoteGait.ts +114 -0
- package/src/client/engine/net/remoteHurt.ts +123 -0
- package/src/client/engine/net/remoteStrike.ts +160 -0
- package/src/client/engine/net/voiceNear.ts +55 -0
- package/src/client/engine/net/webSocketTransport.ts +91 -0
- package/src/client/engine/physics/active.ts +15 -0
- package/src/client/engine/physics/boxFrame.ts +15 -0
- package/src/client/engine/physics/calibration.ts +31 -0
- package/src/client/engine/physics/debug.ts +68 -0
- package/src/client/engine/physics/navmeshLoad.ts +86 -0
- package/src/client/engine/physics/ragdoll.ts +513 -0
- package/src/client/engine/physics/ropeDeck.ts +112 -0
- package/src/client/engine/player/AimAssist.ts +183 -0
- package/src/client/engine/player/AimTargets.ts +55 -0
- package/src/client/engine/player/CameraFX.ts +89 -0
- package/src/client/engine/player/Hands.ts +216 -0
- package/src/client/engine/player/LockOnTarget.ts +395 -0
- package/src/client/engine/player/Player.ts +678 -0
- package/src/client/engine/player/Skins.ts +109 -0
- package/src/client/engine/player/TouchControls.ts +564 -0
- package/src/client/engine/player/WaterLine.ts +94 -0
- package/src/client/engine/player/WeaponPickup.ts +465 -0
- package/src/client/engine/player/bladeGlow.ts +120 -0
- package/src/client/engine/player/firstPersonArms.ts +384 -0
- package/src/client/engine/player/heldHandParts.ts +91 -0
- package/src/client/engine/player/viewmodelSources.ts +25 -0
- package/src/client/engine/player/viewmodelTextures.ts +261 -0
- package/src/client/engine/player/viewmodelTextures.worker.ts +28 -0
- package/src/client/engine/practice/DummyClips.ts +100 -0
- package/src/client/engine/practice/DummyMotion.ts +287 -0
- package/src/client/engine/practice/DummyStudio.ts +137 -0
- package/src/client/engine/practice/TrainingArena.ts +463 -0
- package/src/client/engine/practice/TrainingDummy.ts +160 -0
- package/src/client/engine/practice/TrainingDummyAssets.ts +80 -0
- package/src/client/engine/practice/arena.css +20 -0
- package/src/client/engine/practice/dummyMetadata.ts +12 -0
- package/src/client/engine/practice/lineup.ts +17 -0
- package/src/client/engine/practice/playground/Playground.ts +52 -0
- package/src/client/engine/practice/playground/catalog.ts +44 -0
- package/src/client/engine/practice/playground/devGrid.ts +173 -0
- package/src/client/engine/practice/playground/hud.ts +80 -0
- package/src/client/engine/practice/playground/load.ts +24 -0
- package/src/client/engine/practice/practiceLoan.ts +52 -0
- package/src/client/engine/practice/targets.ts +15 -0
- package/src/client/engine/pwa/cacheNames.ts +2 -0
- package/src/client/engine/pwa/sw.js +401 -0
- package/src/client/engine/quest/view/replica.ts +88 -0
- package/src/client/engine/quest/view/ui.ts +221 -0
- package/src/client/engine/quest/view.ts +209 -0
- package/src/client/engine/render/allocationBytes.ts +16 -0
- package/src/client/engine/render/allocationJournal.ts +125 -0
- package/src/client/engine/render/aoTransparency.ts +225 -0
- package/src/client/engine/render/budgetReport.ts +53 -0
- package/src/client/engine/render/budgets.ts +72 -0
- package/src/client/engine/render/calibration.ts +32 -0
- package/src/client/engine/render/calibrationGpu.ts +84 -0
- package/src/client/engine/render/changedTextureUploads.ts +118 -0
- package/src/client/engine/render/compileLights.ts +75 -0
- package/src/client/engine/render/compileShadows.ts +29 -0
- package/src/client/engine/render/composerDepth.ts +26 -0
- package/src/client/engine/render/compressedMipmaps.ts +59 -0
- package/src/client/engine/render/compressedTextureRetirement.ts +71 -0
- package/src/client/engine/render/compressedUpload.ts +107 -0
- package/src/client/engine/render/contextErrors.ts +14 -0
- package/src/client/engine/render/dataLook.ts +691 -0
- package/src/client/engine/render/desktopReference.ts +5 -0
- package/src/client/engine/render/diagnosticJournal.ts +23 -0
- package/src/client/engine/render/displayColour.ts +55 -0
- package/src/client/engine/render/doubleElements.ts +33 -0
- package/src/client/engine/render/drawGuards.ts +47 -0
- package/src/client/engine/render/drawHooks.ts +265 -0
- package/src/client/engine/render/drawNeutral.ts +19 -0
- package/src/client/engine/render/drawnEnvironment.ts +35 -0
- package/src/client/engine/render/entryWarmupBound.ts +19 -0
- package/src/client/engine/render/families/emissive.ts +224 -0
- package/src/client/engine/render/families/ground.ts +291 -0
- package/src/client/engine/render/families/measure.ts +191 -0
- package/src/client/engine/render/families/paintedTerrain.ts +388 -0
- package/src/client/engine/render/families/painterly.ts +288 -0
- package/src/client/engine/render/families/pbr.ts +67 -0
- package/src/client/engine/render/families/registry.ts +140 -0
- package/src/client/engine/render/families/toon.ts +193 -0
- package/src/client/engine/render/fencedUnits.ts +115 -0
- package/src/client/engine/render/firstFrameParts.ts +95 -0
- package/src/client/engine/render/fogPatches.ts +56 -0
- package/src/client/engine/render/frameCounter.ts +47 -0
- package/src/client/engine/render/frameDrawRange.ts +120 -0
- package/src/client/engine/render/gltfMaterialOrder.ts +83 -0
- package/src/client/engine/render/gpuClasses.ts +29 -0
- package/src/client/engine/render/gpuLabels.ts +437 -0
- package/src/client/engine/render/graph/colourFunction.ts +83 -0
- package/src/client/engine/render/graph/glsl.ts +1056 -0
- package/src/client/engine/render/graph/glslCodec.ts +48 -0
- package/src/client/engine/render/graph/glslMaterial.ts +463 -0
- package/src/client/engine/render/graph/glslPost.ts +79 -0
- package/src/client/engine/render/graph/glslProgram.ts +698 -0
- package/src/client/engine/render/graph/presets.ts +812 -0
- package/src/client/engine/render/graph/viewRay.ts +28 -0
- package/src/client/engine/render/graphBackend.ts +176 -0
- package/src/client/engine/render/hoverboardGeometry.ts +54 -0
- package/src/client/engine/render/instancedGeometry.ts +28 -0
- package/src/client/engine/render/instancedTwin.ts +40 -0
- package/src/client/engine/render/ktx2Probe.ts +299 -0
- package/src/client/engine/render/layeredMaps.ts +64 -0
- package/src/client/engine/render/lightUniforms.ts +22 -0
- package/src/client/engine/render/lighterTargets.ts +47 -0
- package/src/client/engine/render/lightmaps.ts +36 -0
- package/src/client/engine/render/look.ts +406 -0
- package/src/client/engine/render/lookLight.ts +107 -0
- package/src/client/engine/render/lut.ts +23 -0
- package/src/client/engine/render/memoryImages.ts +31 -0
- package/src/client/engine/render/memorySaver.ts +262 -0
- package/src/client/engine/render/offscreenBuild.ts +184 -0
- package/src/client/engine/render/offscreenPreparation.ts +41 -0
- package/src/client/engine/render/parkedDraws.ts +920 -0
- package/src/client/engine/render/pmremSize.ts +21 -0
- package/src/client/engine/render/postPreparation.ts +67 -0
- package/src/client/engine/render/precompile.ts +1833 -0
- package/src/client/engine/render/programRetention.ts +125 -0
- package/src/client/engine/render/readbackPreparation.ts +23 -0
- package/src/client/engine/render/regionCinematic.ts +212 -0
- package/src/client/engine/render/regionLook.ts +301 -0
- package/src/client/engine/render/releasedArrays.ts +13 -0
- package/src/client/engine/render/renderer.ts +68 -0
- package/src/client/engine/render/scatterInstances.ts +139 -0
- package/src/client/engine/render/scenePreparation.ts +27 -0
- package/src/client/engine/render/shaderPatches.ts +303 -0
- package/src/client/engine/render/shaderText.ts +95 -0
- package/src/client/engine/render/shadowDepthVariants.ts +35 -0
- package/src/client/engine/render/shadowMaterialOwnership.ts +120 -0
- package/src/client/engine/render/skinnedSpheres.ts +30 -0
- package/src/client/engine/render/skyEnvironment.ts +222 -0
- package/src/client/engine/render/staticMatrices.ts +88 -0
- package/src/client/engine/render/streamedInstances.ts +184 -0
- package/src/client/engine/render/textureBytes.ts +185 -0
- package/src/client/engine/render/textureUploadEvents.ts +60 -0
- package/src/client/engine/render/tierBenchmark.ts +54 -0
- package/src/client/engine/render/tierBoot.ts +50 -0
- package/src/client/engine/render/tierSelect.ts +27 -0
- package/src/client/engine/render/tiers.ts +78 -0
- package/src/client/engine/render/uniformCaches.ts +143 -0
- package/src/client/engine/render/uploadOwnership.ts +335 -0
- package/src/client/engine/render/viewmodel.ts +114 -0
- package/src/client/engine/render/viewmodelFeel.ts +374 -0
- package/src/client/engine/saves/indexed.ts +250 -0
- package/src/client/engine/saves/slots.ts +42 -0
- package/src/client/engine/saves/view/storage.ts +11 -0
- package/src/client/engine/script/client.ts +240 -0
- package/src/client/engine/telemetry/bootInbox.ts +18 -0
- package/src/client/engine/telemetry/browserErrors.ts +173 -0
- package/src/client/engine/telemetry/crossroads.ts +26 -0
- package/src/client/engine/telemetry/health.ts +40 -0
- package/src/client/engine/telemetry/model.ts +36 -0
- package/src/client/engine/telemetry/runtime.ts +62 -0
- package/src/client/engine/types/meshopt-simplifier.d.ts +10 -0
- package/src/client/engine/types/n8ao.d.ts +52 -0
- package/src/client/engine/ui/BootSettings.ts +97 -0
- package/src/client/engine/ui/BossBar.ts +141 -0
- package/src/client/engine/ui/Combat.ts +299 -0
- package/src/client/engine/ui/DeathFade.ts +104 -0
- package/src/client/engine/ui/DebugMenu.ts +199 -0
- package/src/client/engine/ui/EliteBar.ts +219 -0
- package/src/client/engine/ui/ErrorModal.ts +309 -0
- package/src/client/engine/ui/Feedback.ts +346 -0
- package/src/client/engine/ui/FirstHints.ts +279 -0
- package/src/client/engine/ui/HUD.ts +714 -0
- package/src/client/engine/ui/HurtArc.ts +102 -0
- package/src/client/engine/ui/ItemCard.ts +95 -0
- package/src/client/engine/ui/KeyHelp.ts +59 -0
- package/src/client/engine/ui/Loading.ts +851 -0
- package/src/client/engine/ui/LockOn.ts +131 -0
- package/src/client/engine/ui/Map.ts +280 -0
- package/src/client/engine/ui/Menu.ts +438 -0
- package/src/client/engine/ui/Minimap.ts +840 -0
- package/src/client/engine/ui/Perf.ts +356 -0
- package/src/client/engine/ui/ReloadPrompt.ts +42 -0
- package/src/client/engine/ui/RotateGate.ts +40 -0
- package/src/client/engine/ui/SavePanel.ts +62 -0
- package/src/client/engine/ui/Settings.ts +277 -0
- package/src/client/engine/ui/SpeedLines.ts +46 -0
- package/src/client/engine/ui/StartTitle.ts +39 -0
- package/src/client/engine/ui/ToastStack.ts +90 -0
- package/src/client/engine/ui/Update.ts +116 -0
- package/src/client/engine/ui/WeaponStrip.ts +272 -0
- package/src/client/engine/ui/WindupWarn.ts +116 -0
- package/src/client/engine/ui/authoredDebugRows.ts +3 -0
- package/src/client/engine/ui/buildCheck.ts +72 -0
- package/src/client/engine/ui/buildRow.ts +71 -0
- package/src/client/engine/ui/cards.ts +41 -0
- package/src/client/engine/ui/debugOptions.ts +230 -0
- package/src/client/engine/ui/declared.ts +89 -0
- package/src/client/engine/ui/devSwitch.ts +48 -0
- package/src/client/engine/ui/developerBanner.ts +32 -0
- package/src/client/engine/ui/diagnosticsCopy.ts +20 -0
- package/src/client/engine/ui/drawBudgetCounter.ts +10 -0
- package/src/client/engine/ui/errorScreen.ts +109 -0
- package/src/client/engine/ui/frameWindow.ts +50 -0
- package/src/client/engine/ui/graphicsBlock.ts +156 -0
- package/src/client/engine/ui/graphicsControls.ts +47 -0
- package/src/client/engine/ui/haptics.ts +28 -0
- package/src/client/engine/ui/hoverBoost.ts +61 -0
- package/src/client/engine/ui/hudAdapters.ts +61 -0
- package/src/client/engine/ui/hudSlots.ts +130 -0
- package/src/client/engine/ui/icons.ts +62 -0
- package/src/client/engine/ui/layers.ts +134 -0
- package/src/client/engine/ui/leaveGuard.ts +64 -0
- package/src/client/engine/ui/loadProgress.ts +67 -0
- package/src/client/engine/ui/loading.css +125 -0
- package/src/client/engine/ui/lookLightOption.ts +22 -0
- package/src/client/engine/ui/mapLabel.ts +18 -0
- package/src/client/engine/ui/mapPainter.ts +395 -0
- package/src/client/engine/ui/menuSettings.ts +188 -0
- package/src/client/engine/ui/namePrompt.ts +138 -0
- package/src/client/engine/ui/offlineDownload.ts +83 -0
- package/src/client/engine/ui/ownership.ts +14 -0
- package/src/client/engine/ui/panel.ts +166 -0
- package/src/client/engine/ui/perf.css +93 -0
- package/src/client/engine/ui/perfDock.ts +61 -0
- package/src/client/engine/ui/perfHud.ts +332 -0
- package/src/client/engine/ui/perfLap.ts +206 -0
- package/src/client/engine/ui/perfLapSummary.ts +92 -0
- package/src/client/engine/ui/perfProbe.ts +280 -0
- package/src/client/engine/ui/pinKeepOut.ts +59 -0
- package/src/client/engine/ui/playerDeath.ts +16 -0
- package/src/client/engine/ui/playerHurt.ts +70 -0
- package/src/client/engine/ui/playerReload.ts +55 -0
- package/src/client/engine/ui/reloadChip.ts +24 -0
- package/src/client/engine/ui/reloadCover.ts +110 -0
- package/src/client/engine/ui/review.ts +158 -0
- package/src/client/engine/ui/roomMap.ts +109 -0
- package/src/client/engine/ui/saveStrings.ts +9 -0
- package/src/client/engine/ui/settingsTabs.ts +249 -0
- package/src/client/engine/ui/styles/base.css +92 -0
- package/src/client/engine/ui/styles/boss.css +97 -0
- package/src/client/engine/ui/styles/combat.css +100 -0
- package/src/client/engine/ui/styles/debug.css +22 -0
- package/src/client/engine/ui/styles/elite.css +87 -0
- package/src/client/engine/ui/styles/explore.css +435 -0
- package/src/client/engine/ui/styles/feedback.css +63 -0
- package/src/client/engine/ui/styles/game.css +290 -0
- package/src/client/engine/ui/styles/gmenu.css +407 -0
- package/src/client/engine/ui/styles/hints.css +26 -0
- package/src/client/engine/ui/styles/itemcard.css +38 -0
- package/src/client/engine/ui/styles/menu.css +129 -0
- package/src/client/engine/ui/styles/minimap.css +87 -0
- package/src/client/engine/ui/styles/namePrompt.css +27 -0
- package/src/client/engine/ui/styles/playgrounds.css +18 -0
- package/src/client/engine/ui/styles/quest.css +65 -0
- package/src/client/engine/ui/styles/rotate.css +55 -0
- package/src/client/engine/ui/styles/touch.css +303 -0
- package/src/client/engine/ui/styles/update.css +27 -0
- package/src/client/engine/ui/tabs.ts +27 -0
- package/src/client/engine/ui/unstuck.ts +38 -0
- package/src/client/engine/ui/voiceSettings.ts +135 -0
- package/src/client/engine/world/Atmosphere.ts +333 -0
- package/src/client/engine/world/BakedSky.ts +155 -0
- package/src/client/engine/world/Boundary.ts +234 -0
- package/src/client/engine/world/Grass.ts +664 -0
- package/src/client/engine/world/Horizon.ts +237 -0
- package/src/client/engine/world/HorizonMatte.ts +399 -0
- package/src/client/engine/world/Terrain.ts +560 -0
- package/src/client/engine/world/TreeFactory.ts +128 -0
- package/src/client/engine/world/backdropLayer.ts +580 -0
- package/src/client/engine/world/blenderArea.ts +23 -0
- package/src/client/engine/world/bounds.ts +57 -0
- package/src/client/engine/world/cascadeCull.ts +251 -0
- package/src/client/engine/world/cascadeLights.ts +29 -0
- package/src/client/engine/world/cloudField.ts +29 -0
- package/src/client/engine/world/coarseTileMask.ts +100 -0
- package/src/client/engine/world/csmLightBlock.ts +23 -0
- package/src/client/engine/world/declaredProps.ts +226 -0
- package/src/client/engine/world/forest/Forest.ts +378 -0
- package/src/client/engine/world/forest/treeSet.ts +140 -0
- package/src/client/engine/world/forest/treeSpecies.ts +17 -0
- package/src/client/engine/world/frameCamera.ts +58 -0
- package/src/client/engine/world/geometryBake.ts +272 -0
- package/src/client/engine/world/geometryBounds.ts +77 -0
- package/src/client/engine/world/geometryKit.ts +163 -0
- package/src/client/engine/world/hiddenFaces.ts +153 -0
- package/src/client/engine/world/interact/Interactables.ts +690 -0
- package/src/client/engine/world/interact/kit.ts +6 -0
- package/src/client/engine/world/lookFlags.ts +15 -0
- package/src/client/engine/world/lowpolyKit.ts +270 -0
- package/src/client/engine/world/lut.ts +45 -0
- package/src/client/engine/world/painterly.ts +109 -0
- package/src/client/engine/world/pointLightSkip.ts +31 -0
- package/src/client/engine/world/pond.ts +184 -0
- package/src/client/engine/world/pondGrid.ts +5 -0
- package/src/client/engine/world/registry.ts +348 -0
- package/src/client/engine/world/shadowCadence.ts +14 -0
- package/src/client/engine/world/shadowChunks.ts +193 -0
- package/src/client/engine/world/shadowFade.ts +190 -0
- package/src/client/engine/world/shadowFilter.ts +117 -0
- package/src/client/engine/world/shadowVariants.ts +115 -0
- package/src/client/engine/world/skyBackdrop.ts +526 -0
- package/src/client/engine/world/skyRig.ts +577 -0
- package/src/client/engine/world/skyTextures.ts +103 -0
- package/src/client/engine/world/terrainTileView.ts +164 -0
- package/src/client/engine/world/tileStreamer.ts +823 -0
- package/src/client/engine/world/voxelAO.ts +338 -0
- package/src/client/engine/world/water/ripplePixels.ts +51 -0
- package/src/client/engine/world/water/ripples.ts +102 -0
- package/src/client/engine/world/weakShaderMap.ts +58 -0
- package/src/client/engine/world/wind.ts +112 -0
- package/src/client/game/Boss.ts +354 -0
- package/src/client/game/Elite.ts +529 -0
- package/src/client/game/Inventory.ts +123 -0
- package/src/client/game/Progress.ts +166 -0
- package/src/client/game/ambient/ambientFlock.ts +71 -0
- package/src/client/game/ambient/crowdDraw.ts +85 -0
- package/src/client/game/ambient/foragerDraw.ts +56 -0
- package/src/client/game/ambient/pageCrowds.ts +81 -0
- package/src/client/game/ambient/wingField.ts +46 -0
- package/src/client/game/animation/limbCollision.ts +46 -0
- package/src/client/game/animation/limbQueryPose.ts +141 -0
- package/src/client/game/animation/limbQueryView.ts +53 -0
- package/src/client/game/animation/limbView.ts +28 -0
- package/src/client/game/audio/cueDirector.ts +157 -0
- package/src/client/game/audio/forestPage.ts +30 -0
- package/src/client/game/audio/sceneDirector.ts +239 -0
- package/src/client/game/audio/sceneEvents.merge.d.ts +9 -0
- package/src/client/game/audio/theme.ts +229 -0
- package/src/client/game/audio/voicePatches.ts +108 -0
- package/src/client/game/bag/BagButton.ts +85 -0
- package/src/client/game/bag/bag.ts +239 -0
- package/src/client/game/bag/equipment.ts +18 -0
- package/src/client/game/bag/tabs.ts +194 -0
- package/src/client/game/boot/audio.generated.ts +9258 -0
- package/src/client/game/boot/bytes.generated.ts +1643 -0
- package/src/client/game/boot/loadingPaths.ts +121 -0
- package/src/client/game/boot/packs.generated.ts +5 -0
- package/src/client/game/boot/spawnDownload.ts +999 -0
- package/src/client/game/boot/versions.generated.ts +868 -0
- package/src/client/game/boss/arenaFire.ts +135 -0
- package/src/client/game/boss/arenaRoom.ts +715 -0
- package/src/client/game/boss/arenaRoomView.ts +530 -0
- package/src/client/game/boss/barFeed.ts +253 -0
- package/src/client/game/boss/encounterView.ts +463 -0
- package/src/client/game/boss/presentation.ts +18 -0
- package/src/client/game/boss/roamingProjection.ts +255 -0
- package/src/client/game/boss/slotRowsView.ts +95 -0
- package/src/client/game/boss/socketRig.ts +129 -0
- package/src/client/game/boss/timedEncounters.ts +83 -0
- package/src/client/game/combat/roamingSession.ts +107 -0
- package/src/client/game/compendium/Journal.ts +85 -0
- package/src/client/game/compendium/compendium.css +135 -0
- package/src/client/game/compendium/install.ts +181 -0
- package/src/client/game/compendium/journalView.ts +224 -0
- package/src/client/game/compendium/keepsakes.ts +169 -0
- package/src/client/game/compendium/keepsakesView.ts +70 -0
- package/src/client/game/complete/ShardComplete.ts +148 -0
- package/src/client/game/complete/complete.css +71 -0
- package/src/client/game/complete/declared.ts +111 -0
- package/src/client/game/cosmetics/bodyShadow.ts +148 -0
- package/src/client/game/cosmetics/cosmetics.ts +119 -0
- package/src/client/game/cosmetics/locker.ts +88 -0
- package/src/client/game/data/pickupCatalogue.json +1008 -0
- package/src/client/game/debug/browser.d.ts +10 -0
- package/src/client/game/draftTitles.ts +26 -0
- package/src/client/game/eliteView.ts +246 -0
- package/src/client/game/engineStrings.ts +12 -0
- package/src/client/game/equipmentTypes.merge.d.ts +10 -0
- package/src/client/game/firstPlay.css +18 -0
- package/src/client/game/firstPlay.ts +94 -0
- package/src/client/game/generators/pickups.ts +92 -0
- package/src/client/game/grapple/fontPreparation.ts +31 -0
- package/src/client/game/grapple/netClaw.ts +61 -0
- package/src/client/game/grapple/ribbon.ts +159 -0
- package/src/client/game/grapple/tool.ts +478 -0
- package/src/client/game/grid/admissionPriority.ts +41 -0
- package/src/client/game/grid/admissionYield.ts +37 -0
- package/src/client/game/grid/approachProductInputs.ts +72 -0
- package/src/client/game/grid/assetResidency.ts +188 -0
- package/src/client/game/grid/borderShimmer.ts +185 -0
- package/src/client/game/grid/budgetOverlay.css +40 -0
- package/src/client/game/grid/budgetOverlay.ts +238 -0
- package/src/client/game/grid/budgetPoints.ts +184 -0
- package/src/client/game/grid/cellChanges.ts +106 -0
- package/src/client/game/grid/cellClip.ts +611 -0
- package/src/client/game/grid/cellCover.ts +58 -0
- package/src/client/game/grid/cellLoading.ts +89 -0
- package/src/client/game/grid/cellPresence.ts +28 -0
- package/src/client/game/grid/cellScreens.ts +83 -0
- package/src/client/game/grid/copyIdentity.ts +98 -0
- package/src/client/game/grid/copyLayout.ts +153 -0
- package/src/client/game/grid/copyPrompts.ts +31 -0
- package/src/client/game/grid/edgeSources.ts +120 -0
- package/src/client/game/grid/enteredEquipment.ts +65 -0
- package/src/client/game/grid/enteredInteract.ts +43 -0
- package/src/client/game/grid/entryDownloads.ts +45 -0
- package/src/client/game/grid/entryReadPrefetch.ts +64 -0
- package/src/client/game/grid/farImpostorDecodeWorker.ts +32 -0
- package/src/client/game/grid/farImpostorPack.ts +18 -0
- package/src/client/game/grid/farImpostorView.ts +130 -0
- package/src/client/game/grid/farView.ts +235 -0
- package/src/client/game/grid/frame.ts +845 -0
- package/src/client/game/grid/frameLook.ts +215 -0
- package/src/client/game/grid/frameModel.ts +126 -0
- package/src/client/game/grid/gridHud.css +47 -0
- package/src/client/game/grid/gridHud.ts +126 -0
- package/src/client/game/grid/hazeBand.ts +77 -0
- package/src/client/game/grid/homeCheckpoint.ts +11 -0
- package/src/client/game/grid/homeMetadata.ts +40 -0
- package/src/client/game/grid/intent.ts +65 -0
- package/src/client/game/grid/live.ts +787 -0
- package/src/client/game/grid/liveSession.ts +969 -0
- package/src/client/game/grid/loadingRings.ts +49 -0
- package/src/client/game/grid/mapAtlas.build.d.ts +4 -0
- package/src/client/game/grid/mapAtlas.ts +33 -0
- package/src/client/game/grid/mapFrame.ts +81 -0
- package/src/client/game/grid/memoryRows.ts +32 -0
- package/src/client/game/grid/memoryWarning.css +11 -0
- package/src/client/game/grid/memoryWarning.ts +81 -0
- package/src/client/game/grid/menu.ts +49 -0
- package/src/client/game/grid/minimapBlend.ts +185 -0
- package/src/client/game/grid/nearGrain.ts +40 -0
- package/src/client/game/grid/nearPlaceholderPlan.ts +60 -0
- package/src/client/game/grid/nearPlaceholderView.ts +182 -0
- package/src/client/game/grid/neighbourLife.ts +151 -0
- package/src/client/game/grid/neighbourPanels.ts +84 -0
- package/src/client/game/grid/neighbourRows.ts +32 -0
- package/src/client/game/grid/oneWayIn.ts +114 -0
- package/src/client/game/grid/pageEntry.ts +234 -0
- package/src/client/game/grid/pageResidency.ts +216 -0
- package/src/client/game/grid/pageShell.ts +67 -0
- package/src/client/game/grid/prefetch.ts +344 -0
- package/src/client/game/grid/prefetchIndex.ts +28 -0
- package/src/client/game/grid/prefetchIndexCore.ts +41 -0
- package/src/client/game/grid/prelinkViews.ts +31 -0
- package/src/client/game/grid/preparationAdmission.ts +34 -0
- package/src/client/game/grid/productInputs.ts +98 -0
- package/src/client/game/grid/productLeases.ts +76 -0
- package/src/client/game/grid/products.ts +350 -0
- package/src/client/game/grid/refusal.ts +73 -0
- package/src/client/game/grid/regionLight.ts +102 -0
- package/src/client/game/grid/regionShell.ts +58 -0
- package/src/client/game/grid/regionSky.ts +104 -0
- package/src/client/game/grid/regionalBuildCheckpoint.ts +19 -0
- package/src/client/game/grid/regionalInputs.ts +34 -0
- package/src/client/game/grid/regionalRuntime.ts +518 -0
- package/src/client/game/grid/regionalView.ts +205 -0
- package/src/client/game/grid/regionalWorld.ts +609 -0
- package/src/client/game/grid/renderResidency.ts +95 -0
- package/src/client/game/grid/reveal.ts +163 -0
- package/src/client/game/grid/roadCull.ts +473 -0
- package/src/client/game/grid/roadGrain.ts +32 -0
- package/src/client/game/grid/roadGrain.worker.ts +20 -0
- package/src/client/game/grid/roadGrainPreparation.ts +45 -0
- package/src/client/game/grid/roadLook.ts +487 -0
- package/src/client/game/grid/roadLookPlatform.ts +196 -0
- package/src/client/game/grid/roadResources.ts +15 -0
- package/src/client/game/grid/roadSign.worker.ts +30 -0
- package/src/client/game/grid/roadSignPaint.ts +38 -0
- package/src/client/game/grid/roadSignPixels.ts +22 -0
- package/src/client/game/grid/roadSignPreparation.ts +45 -0
- package/src/client/game/grid/roadSky.ts +219 -0
- package/src/client/game/grid/roadSolid.ts +227 -0
- package/src/client/game/grid/roadTileArchive.ts +239 -0
- package/src/client/game/grid/roadTileBacking.ts +327 -0
- package/src/client/game/grid/roadTileCapture.worker.ts +14 -0
- package/src/client/game/grid/roadTileCaptureJob.ts +37 -0
- package/src/client/game/grid/roadTileCaptureWorker.ts +104 -0
- package/src/client/game/grid/roadTileCoarse.ts +28 -0
- package/src/client/game/grid/roadTileGeometry.ts +77 -0
- package/src/client/game/grid/roadTilePool.ts +157 -0
- package/src/client/game/grid/roadTileStream.ts +69 -0
- package/src/client/game/grid/roadTileWrite.worker.ts +24 -0
- package/src/client/game/grid/roadTileWriter.ts +67 -0
- package/src/client/game/grid/runtimeCost.ts +44 -0
- package/src/client/game/grid/seamLook.ts +177 -0
- package/src/client/game/grid/session.ts +1235 -0
- package/src/client/game/grid/shardfileFar.ts +88 -0
- package/src/client/game/grid/skinEnvelope.ts +135 -0
- package/src/client/game/grid/softWallLook.ts +116 -0
- package/src/client/game/grid/tileDecodeWorker.ts +24 -0
- package/src/client/game/grid/tileDecoder.ts +102 -0
- package/src/client/game/grid/titleOrder.ts +8 -0
- package/src/client/game/grid/titlePrefetchChoice.ts +35 -0
- package/src/client/game/grid/viewAdmissions.ts +36 -0
- package/src/client/game/grid/voidLook.ts +181 -0
- package/src/client/game/icons.merge.d.ts +49 -0
- package/src/client/game/icons.ts +240 -0
- package/src/client/game/identity.ts +28 -0
- package/src/client/game/inputContexts.ts +33 -0
- package/src/client/game/keyBindings.ts +37 -0
- package/src/client/game/loadout/actors.ts +15 -0
- package/src/client/game/loadout/claims.ts +728 -0
- package/src/client/game/loadout/cosmeticFinishes.ts +217 -0
- package/src/client/game/loadout/effects.ts +97 -0
- package/src/client/game/loadout/finishes.ts +60 -0
- package/src/client/game/loadout/held.ts +207 -0
- package/src/client/game/loadout/rangedPage.ts +142 -0
- package/src/client/game/looks/coverAppearance.ts +101 -0
- package/src/client/game/looks/daySky.ts +110 -0
- package/src/client/game/looks/forestGround.ts +49 -0
- package/src/client/game/looks/forestGroundInputs.ts +27 -0
- package/src/client/game/looks/forestRoofMask.ts +15 -0
- package/src/client/game/looks/forestWeather.ts +26 -0
- package/src/client/game/looks/graphDaySky.ts +245 -0
- package/src/client/game/looks/grassPresentation.ts +334 -0
- package/src/client/game/looks/keyedSky.ts +500 -0
- package/src/client/game/looks/lettering.ts +14 -0
- package/src/client/game/looks/overcast.ts +61 -0
- package/src/client/game/looks/paintedGroundMerge.ts +12 -0
- package/src/client/game/looks/paintedLook.ts +197 -0
- package/src/client/game/looks/painterlyLook.ts +259 -0
- package/src/client/game/looks/posedBufferPool.ts +67 -0
- package/src/client/game/looks/posedInstances.ts +199 -0
- package/src/client/game/looks/postGraphLook.ts +455 -0
- package/src/client/game/looks/riggedHulls.ts +451 -0
- package/src/client/game/looks/scaledPost.ts +236 -0
- package/src/client/game/looks/speciesBook.ts +224 -0
- package/src/client/game/looks/staticCapture.ts +225 -0
- package/src/client/game/looks/streamedCover.ts +330 -0
- package/src/client/game/looks/toonLighting.ts +28 -0
- package/src/client/game/looks/toonLook.ts +69 -0
- package/src/client/game/looks/toonSky.ts +60 -0
- package/src/client/game/looks/vertexWear.ts +49 -0
- package/src/client/game/loot/CoinBurst.ts +19 -0
- package/src/client/game/loot/CoinMotion.ts +169 -0
- package/src/client/game/loot/coinModel.ts +11 -0
- package/src/client/game/loot/coins.ts +21 -0
- package/src/client/game/loot/feed.ts +23 -0
- package/src/client/game/loot/loot.css +19 -0
- package/src/client/game/loot/runtime.ts +243 -0
- package/src/client/game/loot/tables.ts +30 -0
- package/src/client/game/loot/ui/CoinChip.ts +70 -0
- package/src/client/game/loot/ui/ShopPanel.ts +211 -0
- package/src/client/game/loot/ui/shop.css +42 -0
- package/src/client/game/mainMenu.css +177 -0
- package/src/client/game/mainMenu.ts +268 -0
- package/src/client/game/models/binarySource.ts +78 -0
- package/src/client/game/models/collectionDisplay.ts +133 -0
- package/src/client/game/models/collectionWall.ts +236 -0
- package/src/client/game/models/explorerCatalogue.ts +176 -0
- package/src/client/game/models/figureCatalogue.ts +172 -0
- package/src/client/game/models/fixedDraws.ts +178 -0
- package/src/client/game/models/heldGear.ts +76 -0
- package/src/client/game/models/interact.ts +107 -0
- package/src/client/game/models/islandLibrary.ts +179 -0
- package/src/client/game/models/kitFigureCard.ts +77 -0
- package/src/client/game/models/libraryModel.ts +67 -0
- package/src/client/game/models/mountedSpecimen.ts +45 -0
- package/src/client/game/models/pickupRows.ts +12 -0
- package/src/client/game/models/ropeDeckSite.ts +114 -0
- package/src/client/game/models/scenePartSpecimen.ts +102 -0
- package/src/client/game/models/sceneSpecimens.ts +103 -0
- package/src/client/game/models/socketRigCreature.ts +65 -0
- package/src/client/game/models/specimenCatalogue.ts +540 -0
- package/src/client/game/models/treeSet.ts +149 -0
- package/src/client/game/models/worldSceneCatalogue.ts +310 -0
- package/src/client/game/nativeItems.merge.d.ts +6 -0
- package/src/client/game/pageSaveKeys.ts +13 -0
- package/src/client/game/plugin/audio.ts +277 -0
- package/src/client/game/plugin/bakedGeometry.ts +103 -0
- package/src/client/game/plugin/bladeMoves.ts +117 -0
- package/src/client/game/plugin/bossStorm.ts +40 -0
- package/src/client/game/plugin/clientChannelView.ts +135 -0
- package/src/client/game/plugin/context.ts +198 -0
- package/src/client/game/plugin/followedMovers.ts +184 -0
- package/src/client/game/plugin/geometry.ts +2083 -0
- package/src/client/game/plugin/headless.ts +127 -0
- package/src/client/game/plugin/heldEquipment.ts +208 -0
- package/src/client/game/plugin/heldFirearm.ts +395 -0
- package/src/client/game/plugin/heldRecipe.ts +43 -0
- package/src/client/game/plugin/heldTool.ts +166 -0
- package/src/client/game/plugin/moverEvents.merge.d.ts +6 -0
- package/src/client/game/plugin/moverViews.ts +114 -0
- package/src/client/game/plugin/placeholderGeometry.ts +40 -0
- package/src/client/game/plugin/scene.ts +290 -0
- package/src/client/game/plugin/shaderFamily.ts +225 -0
- package/src/client/game/plugin/ui.ts +1511 -0
- package/src/client/game/plugin/weaponFamily.ts +779 -0
- package/src/client/game/population/netCounts.ts +12 -0
- package/src/client/game/population/pageAir.ts +37 -0
- package/src/client/game/population/pageLife.ts +289 -0
- package/src/client/game/population/pageReturns.ts +17 -0
- package/src/client/game/population/productCreatures.ts +71 -0
- package/src/client/game/population/projection.ts +227 -0
- package/src/client/game/population/rowSpecies.ts +15 -0
- package/src/client/game/population/signals.ts +24 -0
- package/src/client/game/population/speciesViewSlots.ts +55 -0
- package/src/client/game/population/wildlifeFeature.ts +208 -0
- package/src/client/game/population.merge.d.ts +9 -0
- package/src/client/game/practice/course.ts +154 -0
- package/src/client/game/practice/numericCourse.ts +35 -0
- package/src/client/game/practice/registration.ts +17 -0
- package/src/client/game/practice/scene.ts +47 -0
- package/src/client/game/quest/carriedProp.ts +113 -0
- package/src/client/game/quest/chapter.ts +355 -0
- package/src/client/game/quest/chapterDirector.ts +255 -0
- package/src/client/game/quest/chapterView.ts +165 -0
- package/src/client/game/quest/continuation.ts +53 -0
- package/src/client/game/quest/contractBoardPage.ts +85 -0
- package/src/client/game/quest/declaredPage.ts +199 -0
- package/src/client/game/quest/elitePage.ts +115 -0
- package/src/client/game/quest/figureOrbit.ts +32 -0
- package/src/client/game/quest/figures.ts +259 -0
- package/src/client/game/quest/finishedAfterSeen.ts +20 -0
- package/src/client/game/quest/hints.ts +90 -0
- package/src/client/game/quest/pageComposition.ts +331 -0
- package/src/client/game/quest/pageDoors.ts +25 -0
- package/src/client/game/quest/pageFacets.ts +76 -0
- package/src/client/game/quest/pageReference.ts +17 -0
- package/src/client/game/quest/presentation.css +4 -0
- package/src/client/game/quest/questPageViews.ts +168 -0
- package/src/client/game/quest/reward.ts +48 -0
- package/src/client/game/quest/story.ts +161 -0
- package/src/client/game/quest/trader.ts +176 -0
- package/src/client/game/riding/client.ts +373 -0
- package/src/client/game/riding/hud.ts +255 -0
- package/src/client/game/riding/mount.ts +317 -0
- package/src/client/game/riding/reins.ts +177 -0
- package/src/client/game/riding/ride.css +70 -0
- package/src/client/game/riding/seatedFigure.ts +78 -0
- package/src/client/game/saves.css +34 -0
- package/src/client/game/savesSettings.ts +189 -0
- package/src/client/game/session/clockSettings.ts +66 -0
- package/src/client/game/session/context.ts +61 -0
- package/src/client/game/session/crashResume.ts +36 -0
- package/src/client/game/session/data.ts +101 -0
- package/src/client/game/session/entryReadiness.ts +13 -0
- package/src/client/game/session/exitToTitle.ts +19 -0
- package/src/client/game/session/finish.ts +414 -0
- package/src/client/game/session/hudAccent.ts +30 -0
- package/src/client/game/session/loadout.ts +176 -0
- package/src/client/game/session/play.ts +824 -0
- package/src/client/game/session/positions.ts +8 -0
- package/src/client/game/session/readyFrame.ts +10 -0
- package/src/client/game/session/session.ts +193 -0
- package/src/client/game/session/settlePrograms.ts +29 -0
- package/src/client/game/session/titlePreparation.ts +43 -0
- package/src/client/game/session/world.ts +168 -0
- package/src/client/game/shard/declaredEntry.ts +44 -0
- package/src/client/game/shard/declaredPlumbing.ts +80 -0
- package/src/client/game/shard/declaredTargets.ts +64 -0
- package/src/client/game/shard/declaredUi.ts +23 -0
- package/src/client/game/shard/discovery.ts +80 -0
- package/src/client/game/shard/list.ts +26 -0
- package/src/client/game/shard/load.ts +94 -0
- package/src/client/game/shard/manifest.ts +910 -0
- package/src/client/game/shard/pageBoot.ts +52 -0
- package/src/client/game/shard/pagePolicy.ts +17 -0
- package/src/client/game/shard/registry.ts +74 -0
- package/src/client/game/shard/retainedHooks.ts +204 -0
- package/src/client/game/shard/scopedRuntime.ts +68 -0
- package/src/client/game/shard/spec.ts +69 -0
- package/src/client/game/shard/titleList.ts +86 -0
- package/src/client/game/shardfile/accent.ts +5 -0
- package/src/client/game/shardfile/assetCache.ts +46 -0
- package/src/client/game/shardfile/audioCatalogue.ts +16 -0
- package/src/client/game/shardfile/bakedKinds.ts +313 -0
- package/src/client/game/shardfile/bakedTiles.ts +253 -0
- package/src/client/game/shardfile/buildingCloud.ts +27 -0
- package/src/client/game/shardfile/calibrationScripts.ts +30 -0
- package/src/client/game/shardfile/caveInterior.ts +162 -0
- package/src/client/game/shardfile/client.ts +671 -0
- package/src/client/game/shardfile/clientAmbientLife.ts +31 -0
- package/src/client/game/shardfile/clientAssets.ts +163 -0
- package/src/client/game/shardfile/clientBossFight.ts +39 -0
- package/src/client/game/shardfile/clientBossTelegraph.ts +43 -0
- package/src/client/game/shardfile/clientCatalogue.ts +44 -0
- package/src/client/game/shardfile/clientCosmeticFinishes.ts +37 -0
- package/src/client/game/shardfile/clientCues.ts +22 -0
- package/src/client/game/shardfile/clientEliteConstruction.ts +44 -0
- package/src/client/game/shardfile/clientEliteEntry.ts +33 -0
- package/src/client/game/shardfile/clientEntryBinds.ts +32 -0
- package/src/client/game/shardfile/clientFinds.ts +20 -0
- package/src/client/game/shardfile/clientForestPage.ts +144 -0
- package/src/client/game/shardfile/clientGraphs.ts +319 -0
- package/src/client/game/shardfile/clientHeldMelee.ts +82 -0
- package/src/client/game/shardfile/clientItems.ts +25 -0
- package/src/client/game/shardfile/clientLibrary.ts +71 -0
- package/src/client/game/shardfile/clientMaterials.ts +296 -0
- package/src/client/game/shardfile/clientMeadow.ts +30 -0
- package/src/client/game/shardfile/clientModules.ts +24 -0
- package/src/client/game/shardfile/clientMoverOwners.ts +80 -0
- package/src/client/game/shardfile/clientNativeBook.ts +38 -0
- package/src/client/game/shardfile/clientPlaceSets.ts +74 -0
- package/src/client/game/shardfile/clientPlan.ts +529 -0
- package/src/client/game/shardfile/clientPlayerEnter.ts +22 -0
- package/src/client/game/shardfile/clientPopulation.ts +49 -0
- package/src/client/game/shardfile/clientPopulationProjection.ts +28 -0
- package/src/client/game/shardfile/clientPost.ts +94 -0
- package/src/client/game/shardfile/clientPropMaterials.ts +100 -0
- package/src/client/game/shardfile/clientQuestComposition.ts +87 -0
- package/src/client/game/shardfile/clientQuestPage.ts +98 -0
- package/src/client/game/shardfile/clientRecipes.ts +76 -0
- package/src/client/game/shardfile/clientResidency.ts +29 -0
- package/src/client/game/shardfile/clientReturnModules.ts +25 -0
- package/src/client/game/shardfile/clientRuntimeHooks.ts +66 -0
- package/src/client/game/shardfile/clientSceneHandles.ts +19 -0
- package/src/client/game/shardfile/clientScripts.ts +100 -0
- package/src/client/game/shardfile/clientSkins.ts +183 -0
- package/src/client/game/shardfile/clientSource.ts +221 -0
- package/src/client/game/shardfile/clientSpeciesProgram.ts +45 -0
- package/src/client/game/shardfile/clientSplatTerrain.ts +99 -0
- package/src/client/game/shardfile/clientStealthEntry.ts +72 -0
- package/src/client/game/shardfile/clientTargets.ts +73 -0
- package/src/client/game/shardfile/clientTimedEncounters.ts +42 -0
- package/src/client/game/shardfile/clientTrails.ts +42 -0
- package/src/client/game/shardfile/clientViewProgram.ts +101 -0
- package/src/client/game/shardfile/clientViews.ts +211 -0
- package/src/client/game/shardfile/clientWater.ts +108 -0
- package/src/client/game/shardfile/clientWaterSurfaces.ts +88 -0
- package/src/client/game/shardfile/clientWorker.ts +621 -0
- package/src/client/game/shardfile/clientWorldAssembly.ts +129 -0
- package/src/client/game/shardfile/constructionCheckpoint.ts +31 -0
- package/src/client/game/shardfile/controlFiles.ts +41 -0
- package/src/client/game/shardfile/controlRefinement.ts +229 -0
- package/src/client/game/shardfile/declaredTalks.ts +114 -0
- package/src/client/game/shardfile/emptyEquipment.ts +19 -0
- package/src/client/game/shardfile/emptyLook.ts +26 -0
- package/src/client/game/shardfile/enteredTileReadout.ts +27 -0
- package/src/client/game/shardfile/entryTransport.ts +222 -0
- package/src/client/game/shardfile/farStandIn.ts +79 -0
- package/src/client/game/shardfile/forestPage.ts +289 -0
- package/src/client/game/shardfile/groundMerge.ts +232 -0
- package/src/client/game/shardfile/heldClaimsEntry.ts +34 -0
- package/src/client/game/shardfile/homeBuildCache.ts +114 -0
- package/src/client/game/shardfile/homeGeometrySnapshot.ts +92 -0
- package/src/client/game/shardfile/hybrid.ts +537 -0
- package/src/client/game/shardfile/hybridPresentation.ts +16 -0
- package/src/client/game/shardfile/islandBook.ts +87 -0
- package/src/client/game/shardfile/itemModels.ts +78 -0
- package/src/client/game/shardfile/legacyAsset.ts +30 -0
- package/src/client/game/shardfile/lentLooks.ts +210 -0
- package/src/client/game/shardfile/lightEmitters.ts +100 -0
- package/src/client/game/shardfile/livingBuildings.ts +202 -0
- package/src/client/game/shardfile/look.ts +23 -0
- package/src/client/game/shardfile/mapImage.ts +49 -0
- package/src/client/game/shardfile/pageItems.ts +57 -0
- package/src/client/game/shardfile/pagePreparation.ts +40 -0
- package/src/client/game/shardfile/pageWater.ts +29 -0
- package/src/client/game/shardfile/paintedWorldStages.ts +132 -0
- package/src/client/game/shardfile/portalRideBinding.ts +62 -0
- package/src/client/game/shardfile/preparationReads.ts +61 -0
- package/src/client/game/shardfile/preparationTiming.ts +115 -0
- package/src/client/game/shardfile/presentation.ts +36 -0
- package/src/client/game/shardfile/product.ts +718 -0
- package/src/client/game/shardfile/productCacheCompletion.ts +53 -0
- package/src/client/game/shardfile/productChecks.ts +40 -0
- package/src/client/game/shardfile/productCost.ts +422 -0
- package/src/client/game/shardfile/productGround.ts +60 -0
- package/src/client/game/shardfile/productNavigation.ts +18 -0
- package/src/client/game/shardfile/productPreflight.ts +12 -0
- package/src/client/game/shardfile/questWorld.ts +17 -0
- package/src/client/game/shardfile/readAsset.ts +44 -0
- package/src/client/game/shardfile/reusableWholeLibrary.ts +102 -0
- package/src/client/game/shardfile/runtimeProduct.ts +396 -0
- package/src/client/game/shardfile/sceneBakeFiles.ts +22 -0
- package/src/client/game/shardfile/sceneBuffers.ts +207 -0
- package/src/client/game/shardfile/sceneDraws.ts +90 -0
- package/src/client/game/shardfile/sceneDressing.ts +456 -0
- package/src/client/game/shardfile/sceneHandles.ts +170 -0
- package/src/client/game/shardfile/sceneInputs.ts +21 -0
- package/src/client/game/shardfile/sceneInstances.ts +67 -0
- package/src/client/game/shardfile/sceneMotion.ts +161 -0
- package/src/client/game/shardfile/scenePools.ts +40 -0
- package/src/client/game/shardfile/sceneProfile.ts +12 -0
- package/src/client/game/shardfile/sceneRigFiles.ts +30 -0
- package/src/client/game/shardfile/sceneScatterPages.ts +47 -0
- package/src/client/game/shardfile/sceneSources.ts +153 -0
- package/src/client/game/shardfile/serverRoute.ts +38 -0
- package/src/client/game/shardfile/skinLayerPlayback.ts +67 -0
- package/src/client/game/shardfile/skinPlayback.ts +138 -0
- package/src/client/game/shardfile/slabLibrary.ts +203 -0
- package/src/client/game/shardfile/stillImage.ts +19 -0
- package/src/client/game/shardfile/streamingView.ts +78 -0
- package/src/client/game/shardfile/tileBufferedDraws.ts +49 -0
- package/src/client/game/shardfile/tileContent.ts +564 -0
- package/src/client/game/shardfile/tileDriver.ts +462 -0
- package/src/client/game/shardfile/tileEntry.ts +18 -0
- package/src/client/game/shardfile/tiledMesh.ts +146 -0
- package/src/client/game/shardfile/water.ts +8 -0
- package/src/client/game/shardfile/weatherFields.ts +31 -0
- package/src/client/game/shardfile/wholeGeometryPieces.ts +101 -0
- package/src/client/game/shardfile/wholeLibrary.ts +47 -0
- package/src/client/game/shardfile/wholeRefinementCover.ts +78 -0
- package/src/client/game/shardfile/wirePage.ts +260 -0
- package/src/client/game/shardfile/worldAssembly.ts +531 -0
- package/src/client/game/shardfile/worldBuildYield.ts +10 -0
- package/src/client/game/shardfile/worldEntry.ts +117 -0
- package/src/client/game/shardfile/worldSceneBatch.ts +105 -0
- package/src/client/game/shardfile/worldSceneGeometry.ts +171 -0
- package/src/client/game/shardfile/worldSceneMaterials.ts +90 -0
- package/src/client/game/shardfile/worldScenePlacement.ts +364 -0
- package/src/client/game/shardfile/worldScenePlacementPages.ts +61 -0
- package/src/client/game/shardfile/worldSceneReads.ts +83 -0
- package/src/client/game/shardfile/worldSceneStepSources.ts +69 -0
- package/src/client/game/shardfile/worldSceneSurface.ts +108 -0
- package/src/client/game/shardfile/worldSceneTextures.ts +134 -0
- package/src/client/game/shardfile/worldSceneUniforms.ts +17 -0
- package/src/client/game/shardfile/worldSceneWeld.ts +339 -0
- package/src/client/game/shardfile/worldScenes.ts +760 -0
- package/src/client/game/shardfile/worldUpdates.ts +149 -0
- package/src/client/game/stealth/controller.ts +115 -0
- package/src/client/game/stealth/stealth.css +70 -0
- package/src/client/game/summary.css +8 -0
- package/src/client/game/summary.ts +67 -0
- package/src/client/game/systems/audio/crossbowSounds.ts +71 -0
- package/src/client/game/systems/audio/firearmSounds.ts +43 -0
- package/src/client/game/systems/audio/meleeSounds.ts +40 -0
- package/src/client/game/systems/audio/silentScore.ts +6 -0
- package/src/client/game/systems/effects/starter.generated.ts +2 -0
- package/src/client/game/systems/effects/status.css +3 -0
- package/src/client/game/systems/effects/view.ts +35 -0
- package/src/client/game/systems/items/declaredSword.ts +149 -0
- package/src/client/game/systems/looks/fogProgram.ts +18 -0
- package/src/client/game/systems/looks/particles.ts +407 -0
- package/src/client/game/systems/looks/rainCurtain.ts +50 -0
- package/src/client/game/systems/looks/surfaceLooks.ts +138 -0
- package/src/client/game/systems/looks/trample.ts +139 -0
- package/src/client/game/systems/looks/waterSurface.ts +179 -0
- package/src/client/game/systems/npc/figureRows.ts +169 -0
- package/src/client/game/systems/npc/figureSkins.ts +130 -0
- package/src/client/game/systems/npc/kitFigure.ts +127 -0
- package/src/client/game/systems/npc/npcRig.ts +217 -0
- package/src/client/game/systems/npc/standingFigure.ts +111 -0
- package/src/client/game/systems/props/interact.ts +236 -0
- package/src/client/game/systems/species/bear.ts +30 -0
- package/src/client/game/systems/species/boar.ts +28 -0
- package/src/client/game/systems/species/install.ts +18 -0
- package/src/client/game/systems/species/view/bear.ts +246 -0
- package/src/client/game/systems/species/view/boar.ts +249 -0
- package/src/client/game/systems/tools/hoverboard.ts +107 -0
- package/src/client/game/systems/viewmodel/armAliases.json +24 -0
- package/src/client/game/systems/viewmodel/armClips.ts +8 -0
- package/src/client/game/systems/viewmodel/armRig.ts +293 -0
- package/src/client/game/systems/viewmodel/clips.generated.ts +2 -0
- package/src/client/game/systems/viewmodel/heldView.ts +458 -0
- package/src/client/game/systems/viewmodel/rigArms.ts +280 -0
- package/src/client/game/titleAssets.ts +9 -0
- package/src/client/game/titleDeck.ts +381 -0
- package/src/client/game/travel/travel.ts +99 -0
- package/src/client/game/ui/dataPanels.ts +95 -0
- package/src/client/game/ui/panelTemplates.ts +71 -0
- package/src/client/game/ui/panels.ts +109 -0
- package/src/client/game/upgrade.css +12 -0
- package/src/client/game/weapons/Bow.ts +14 -0
- package/src/client/game/weapons/Sword.ts +30 -0
- package/src/client/game/weapons/arcPower.ts +203 -0
- package/src/client/game/weapons/heldLauncher.ts +452 -0
- package/src/client/game/weapons/heldPolearm.ts +491 -0
- package/src/client/game/weapons/mountedBlade.ts +122 -0
- package/src/client/game/weather/forest.ts +281 -0
- package/src/client/game/weather/netClimate.ts +88 -0
- package/src/client/game/weather/pageSky.ts +31 -0
- package/src/client/game/weather/rainPresentation.ts +246 -0
- package/src/client/game/weather/weatherEvents.merge.d.ts +8 -0
- package/src/client/game/whatsNew.ts +31 -0
- package/src/client/game/whatsNewBanner.ts +125 -0
- package/src/client/host/online/chatCorner.ts +46 -0
- package/src/client/host/online/chatLines.ts +213 -0
- package/src/client/host/online/doctor.ts +321 -0
- package/src/client/host/online/doctorPage.ts +26 -0
- package/src/client/host/online/doctorView.ts +144 -0
- package/src/client/host/online/linkScreens.ts +300 -0
- package/src/client/host/online/reconnectStrip.ts +26 -0
- package/src/client/host/online/release.ts +28 -0
- package/src/client/host/online/shell.ts +312 -0
- package/src/client/host/online/voice.ts +468 -0
- package/src/client/host/online/voiceUi.ts +186 -0
- package/src/client/host/standalone/shell.ts +169 -0
- package/src/client/index.html +12 -0
- package/src/client/main.tsx +10 -0
- package/src/client/side.ts +2 -0
- package/src/client/tsconfig.json +13 -0
- package/src/cook/game/brotliSizeCache.d.mts +5 -0
- package/src/cook/game/brotliSizeCache.mjs +59 -0
- package/src/cook/game/contentNamed.ts +6 -0
- package/src/cook/game/cookJob.ts +103 -0
- package/src/cook/game/cookWorker.ts +413 -0
- package/src/cook/game/encodedBytes.ts +51 -0
- package/src/cook/game/engineHalf.ts +47 -0
- package/src/cook/game/entryDownloads.ts +36 -0
- package/src/cook/game/entryReadSet.ts +67 -0
- package/src/cook/game/entryTotals.ts +320 -0
- package/src/cook/game/fenceReads.ts +218 -0
- package/src/cook/game/gridCollision.ts +53 -0
- package/src/cook/game/gridEntryDownloads.ts +33 -0
- package/src/cook/game/gridStripPages.ts +239 -0
- package/src/cook/game/installedRuntimeReads.ts +48 -0
- package/src/cook/game/packStore.ts +120 -0
- package/src/cook/game/portableEncode.ts +7 -0
- package/src/cook/game/productTarball.ts +18 -0
- package/src/cook/game/shardCook.ts +350 -0
- package/src/cook/game/spawnParts.ts +294 -0
- package/src/cook/game/stripPack.ts +31 -0
- package/src/cook/side.ts +2 -0
- package/src/e2e/playwright.config.ts +60 -0
- package/src/e2e/smoke/game.ts +217 -0
- package/src/e2e/smoke/page-globals.d.ts +37 -0
- package/src/e2e/smoke/template2.spec.ts +146 -0
- package/src/e2e/status.spec.ts +13 -0
- package/src/scripts/ask-new.sh +29 -0
- package/src/scripts/asks.mjs +142 -0
- package/src/scripts/check-sides.mjs +70 -0
- package/src/scripts/herdr-prompt.sh +34 -0
- package/src/scripts/herdr-question-open.sh +67 -0
- package/src/scripts/md-wrap.mjs +229 -0
- package/src/server/app.ts +19 -0
- package/src/server/engine/ai/CreatureBrain.ts +23 -0
- package/src/server/engine/ai/bossContenders.ts +101 -0
- package/src/server/engine/ai/burstFlyer.ts +31 -0
- package/src/server/engine/ai/challengeGrazer.ts +31 -0
- package/src/server/engine/ai/eliteContinuation.ts +141 -0
- package/src/server/engine/ai/eliteKernels.ts +187 -0
- package/src/server/engine/ai/eliteLifecycle.ts +126 -0
- package/src/server/engine/ai/eliteRoster.ts +357 -0
- package/src/server/engine/ai/grazer.ts +1360 -0
- package/src/server/engine/ai/guardian.ts +20 -0
- package/src/server/engine/ai/guardianPolicy.ts +264 -0
- package/src/server/engine/ai/herd.ts +17 -0
- package/src/server/engine/ai/hunt.ts +46 -0
- package/src/server/engine/ai/moves.ts +202 -0
- package/src/server/engine/ai/orbitDiver.ts +33 -0
- package/src/server/engine/ai/pack.ts +29 -0
- package/src/server/engine/ai/patrolDiver.ts +31 -0
- package/src/server/engine/ai/perchHunter.ts +20 -0
- package/src/server/engine/ai/phases.ts +121 -0
- package/src/server/engine/ai/platform.ts +140 -0
- package/src/server/engine/ai/ramGrazer.ts +31 -0
- package/src/server/engine/ai/scriptBrain.ts +147 -0
- package/src/server/engine/ai/skirmisher.ts +20 -0
- package/src/server/engine/ai/species.ts +33 -0
- package/src/server/engine/combat/EquipmentPickup.ts +28 -0
- package/src/server/engine/combat/contactWeapon.ts +251 -0
- package/src/server/engine/combat/damageBook.ts +45 -0
- package/src/server/engine/combat/rewind.ts +7 -0
- package/src/server/engine/entities/AnimalManager.ts +752 -0
- package/src/server/engine/entities/bodyClear.ts +47 -0
- package/src/server/engine/entities/creatureRefill.ts +119 -0
- package/src/server/engine/entities/killHeight.ts +18 -0
- package/src/server/engine/level/context.ts +111 -0
- package/src/server/engine/net/chat.ts +97 -0
- package/src/server/engine/net/combatWire.ts +49 -0
- package/src/server/engine/net/commandQueue.ts +95 -0
- package/src/server/engine/net/handles.ts +74 -0
- package/src/server/engine/net/hitHistory.ts +114 -0
- package/src/server/engine/net/ledgerBook.ts +65 -0
- package/src/server/engine/net/room.ts +560 -0
- package/src/server/engine/net/serverClock.ts +43 -0
- package/src/server/engine/net/simWorld.ts +131 -0
- package/src/server/engine/net/tiers.ts +14 -0
- package/src/server/engine/physics/edgeEntries.ts +40 -0
- package/src/server/engine/physics/rapierBindings.ts +4 -0
- package/src/server/engine/saves/forwardedStorage.ts +43 -0
- package/src/server/engine/script/composition.ts +219 -0
- package/src/server/engine/script/decision.ts +573 -0
- package/src/server/engine/script/inputInboxV2.ts +116 -0
- package/src/server/engine/script/lane.ts +185 -0
- package/src/server/engine/script/ownedSimBatchV2.ts +205 -0
- package/src/server/engine/script/queries.ts +37 -0
- package/src/server/engine/script/queriesV2.ts +149 -0
- package/src/server/engine/script/simBatchV2.ts +125 -0
- package/src/server/engine/sim/playerSim.ts +443 -0
- package/src/server/engine/sim/respawn.ts +74 -0
- package/src/server/engine/sim/restore.ts +37 -0
- package/src/server/engine/sim.ts +711 -0
- package/src/server/game/animation/limbPopulation.ts +138 -0
- package/src/server/game/bake/entryways.ts +186 -0
- package/src/server/game/boss/arenaRoomEntry.ts +97 -0
- package/src/server/game/boss/arenaRoomFight.ts +103 -0
- package/src/server/game/boss/arenaRoomNative.ts +142 -0
- package/src/server/game/boss/arenaWords.ts +46 -0
- package/src/server/game/boss/bounty.ts +37 -0
- package/src/server/game/boss/captainNative.ts +122 -0
- package/src/server/game/boss/continuation.ts +37 -0
- package/src/server/game/boss/headlessArenaPose.ts +40 -0
- package/src/server/game/boss/headlessArenaViews.ts +54 -0
- package/src/server/game/boss/headlessCloudBody.ts +93 -0
- package/src/server/game/boss/native.ts +220 -0
- package/src/server/game/boss/nativeArenaSand.ts +93 -0
- package/src/server/game/boss/nativeArenaSeal.ts +26 -0
- package/src/server/game/boss/nativeWake.ts +50 -0
- package/src/server/game/boss/openArenaNative.ts +200 -0
- package/src/server/game/boss/openArenaRoom.ts +69 -0
- package/src/server/game/boss/openArenaState.ts +25 -0
- package/src/server/game/boss/patrolNative.ts +286 -0
- package/src/server/game/boss/roaming.ts +77 -0
- package/src/server/game/boss/slotHeights.ts +103 -0
- package/src/server/game/boss/slotsNative.ts +175 -0
- package/src/server/game/boss/windEliteNative.ts +139 -0
- package/src/server/game/grapple/native.ts +181 -0
- package/src/server/game/grid/durability.ts +166 -0
- package/src/server/game/grid/room.ts +53 -0
- package/src/server/game/grid/roomNet.ts +85 -0
- package/src/server/game/grid/simulation.ts +345 -0
- package/src/server/game/items.merge.d.ts +7 -0
- package/src/server/game/loadout/nativeAmmunition.ts +139 -0
- package/src/server/game/loadout/ownedEffects.ts +68 -0
- package/src/server/game/loot/harvest.ts +43 -0
- package/src/server/game/loot/personal.ts +70 -0
- package/src/server/game/loot/playerOwned.ts +235 -0
- package/src/server/game/plugin/bossPhase.ts +904 -0
- package/src/server/game/plugin/brain.ts +1325 -0
- package/src/server/game/plugin/mover.ts +601 -0
- package/src/server/game/plugin/nativeItems.ts +437 -0
- package/src/server/game/plugin/nativeRewind.ts +37 -0
- package/src/server/game/plugin/nativeSwept.ts +249 -0
- package/src/server/game/plugin/playerSeats.ts +62 -0
- package/src/server/game/plugin/scriptSeats.ts +89 -0
- package/src/server/game/plugin/simulation.ts +1623 -0
- package/src/server/game/population/actorProjectionV2.ts +276 -0
- package/src/server/game/population/actors.ts +136 -0
- package/src/server/game/population/directedLaw.ts +69 -0
- package/src/server/game/population/encounterBook.ts +78 -0
- package/src/server/game/population/encounterIntake.ts +78 -0
- package/src/server/game/population/environment.ts +86 -0
- package/src/server/game/population/mixedRoster.ts +353 -0
- package/src/server/game/population/nativeBake.ts +202 -0
- package/src/server/game/population/nativeManager.ts +426 -0
- package/src/server/game/population/nativeReturns.ts +99 -0
- package/src/server/game/population/perchBody.ts +97 -0
- package/src/server/game/population/projectedSites.ts +41 -0
- package/src/server/game/population/relations.ts +45 -0
- package/src/server/game/population/roster.ts +259 -0
- package/src/server/game/population/scriptStrikes.ts +67 -0
- package/src/server/game/population/shelter.ts +193 -0
- package/src/server/game/population/signals.ts +9 -0
- package/src/server/game/population/spawnScript.ts +797 -0
- package/src/server/game/population/specCatalogue.ts +11 -0
- package/src/server/game/quest/bodyOps.ts +253 -0
- package/src/server/game/quest/chapterRecords.ts +97 -0
- package/src/server/game/quest/eliteDrops.ts +36 -0
- package/src/server/game/quest/eliteFeature.ts +141 -0
- package/src/server/game/quest/killSteps.ts +34 -0
- package/src/server/game/quest/nativeBodyScripts.ts +29 -0
- package/src/server/game/quest/nativeChapter.ts +80 -0
- package/src/server/game/quest/nativeComposition.ts +548 -0
- package/src/server/game/quest/nativeEntry.ts +128 -0
- package/src/server/game/quest/nativeInputs.ts +29 -0
- package/src/server/game/quest/nativeSecret.ts +80 -0
- package/src/server/game/quest/serverChapters.ts +192 -0
- package/src/server/game/quest/serverDoors.ts +89 -0
- package/src/server/game/quest/serverPlaces.ts +32 -0
- package/src/server/game/riding/native.ts +362 -0
- package/src/server/game/riding/nativePopulation.ts +384 -0
- package/src/server/game/riding/nativeTaming.ts +331 -0
- package/src/server/game/riding/pastureController.ts +131 -0
- package/src/server/game/riding/roster.ts +108 -0
- package/src/server/game/riding/wildRefill.ts +37 -0
- package/src/server/game/roomRespawn.ts +60 -0
- package/src/server/game/shard/declaredEncounters.ts +22 -0
- package/src/server/game/shard/manifest-closure.generated.json +683 -0
- package/src/server/game/shard/portShares.generated.ts +2 -0
- package/src/server/game/shard/world.ts +5 -0
- package/src/server/game/shardfile/borrowedDecisions.ts +281 -0
- package/src/server/game/shardfile/bossRow.ts +236 -0
- package/src/server/game/shardfile/brainRuntime.ts +162 -0
- package/src/server/game/shardfile/decisions.ts +597 -0
- package/src/server/game/shardfile/declaredClimate.ts +22 -0
- package/src/server/game/shardfile/declaredKitItems.ts +243 -0
- package/src/server/game/shardfile/declaredTalks.ts +52 -0
- package/src/server/game/shardfile/groupRuntime.ts +302 -0
- package/src/server/game/shardfile/homeKeeper.ts +565 -0
- package/src/server/game/shardfile/nativeAssembly.ts +102 -0
- package/src/server/game/shardfile/nativeAssemblyHosts.ts +301 -0
- package/src/server/game/shardfile/nativeAssemblyInput.ts +68 -0
- package/src/server/game/shardfile/nativePlan.ts +28 -0
- package/src/server/game/shardfile/nativeRuntimeLoans.ts +52 -0
- package/src/server/game/shardfile/phasedBossRoaming.ts +427 -0
- package/src/server/game/shardfile/portalLinkProof.ts +66 -0
- package/src/server/game/shardfile/scriptComposition.ts +57 -0
- package/src/server/game/shardfile/scripts.ts +56 -0
- package/src/server/game/shardfile/statusEffects.ts +68 -0
- package/src/server/game/stealth/nativeStealth.ts +74 -0
- package/src/server/game/weapons/nativeHeld.ts +333 -0
- package/src/server/game/weather/continuation.ts +97 -0
- package/src/server/game/weather/reactions.ts +219 -0
- package/src/server/game/weather/wire.ts +42 -0
- package/src/server/host/bake/headlessWorker.ts +132 -0
- package/src/server/host/dedicated/cellHost.ts +171 -0
- package/src/server/host/dedicated/cellProtocol.ts +64 -0
- package/src/server/host/dedicated/cellWorker.ts +33 -0
- package/src/server/host/dedicated/crossing.ts +44 -0
- package/src/server/host/dedicated/dedicatedRoom.ts +419 -0
- package/src/server/host/dedicated/doorTrust.ts +55 -0
- package/src/server/host/dedicated/gridCells.ts +53 -0
- package/src/server/host/dedicated/main.ts +134 -0
- package/src/server/host/dedicated/packReader.ts +68 -0
- package/src/server/host/dedicated/playerDoc.ts +96 -0
- package/src/server/host/dedicated/playerSaves.ts +62 -0
- package/src/server/host/dedicated/playerStore.ts +82 -0
- package/src/server/host/dedicated/playtest.ts +41 -0
- package/src/server/host/dedicated/releaseFile.ts +71 -0
- package/src/server/host/dedicated/roadRoom.ts +151 -0
- package/src/server/host/dedicated/saves/database.ts +15 -0
- package/src/server/host/dedicated/saves/migrate.ts +26 -0
- package/src/server/host/dedicated/saves/migrations/0001-saves.sql +48 -0
- package/src/server/host/dedicated/saves/migrations/0002-report-delivery.sql +3 -0
- package/src/server/host/dedicated/saves/migrations/0003-place.sql +11 -0
- package/src/server/host/dedicated/saves/migrations/0004-names.sql +4 -0
- package/src/server/host/dedicated/saves/migrations/0005-profile.sql +41 -0
- package/src/server/host/dedicated/saves/names.ts +56 -0
- package/src/server/host/dedicated/saves/pgDatabase.ts +43 -0
- package/src/server/host/dedicated/saves/profile.ts +44 -0
- package/src/server/host/dedicated/saves/reportQueue.ts +49 -0
- package/src/server/host/dedicated/saves/saveStore.ts +117 -0
- package/src/server/host/dedicated/saves/writeQueue.ts +94 -0
- package/src/server/host/dedicated/seats.ts +12 -0
- package/src/server/host/dedicated/serverReports.ts +81 -0
- package/src/server/host/dedicated/serverSentry.ts +124 -0
- package/src/server/host/dedicated/shopGate.ts +36 -0
- package/src/server/host/dedicated/socketPump.ts +74 -0
- package/src/server/host/dedicated/socketTransport.ts +123 -0
- package/src/server/host/dedicated/voiceRelay.ts +138 -0
- package/src/server/host/dedicated/workerTable.ts +29 -0
- package/src/server/host/dedicated/world.ts +428 -0
- package/src/server/host/headless.ts +280 -0
- package/src/server/host/headlessProduct.ts +52 -0
- package/src/server/host/headlessRuntime.ts +354 -0
- package/src/server/host/ropeDecks.ts +69 -0
- package/src/server/host/standalone/cellWorld.ts +188 -0
- package/src/server/host/standalone/continuation.ts +58 -0
- package/src/server/host/standalone/fallFloor.ts +83 -0
- package/src/server/host/standalone/gridServer.ts +282 -0
- package/src/server/host/standalone/ledgerFilings.ts +33 -0
- package/src/server/host/standalone/progressWatch.ts +90 -0
- package/src/server/host/standalone/roadWorld.ts +49 -0
- package/src/server/host/standalone/serverHost.ts +132 -0
- package/src/server/host/standalone/serverProduct.ts +149 -0
- package/src/server/host/standalone/serverRuntime.ts +43 -0
- package/src/server/host/standalone/serverWorker.ts +22 -0
- package/src/server/host/tickWorkerHost.ts +250 -0
- package/src/server/host/tickWorkerLoop.ts +123 -0
- package/src/server/serve.ts +49 -0
- package/src/server/side.ts +2 -0
- package/src/shared/engine/ai/BossBrain.ts +287 -0
- package/src/shared/engine/ai/GroupBrain.ts +152 -0
- package/src/shared/engine/ai/ambientFlight.ts +60 -0
- package/src/shared/engine/ai/ambientFlock.ts +297 -0
- package/src/shared/engine/ai/ambientForager.ts +289 -0
- package/src/shared/engine/ai/bossScale.ts +8 -0
- package/src/shared/engine/ai/director.ts +94 -0
- package/src/shared/engine/ai/diver.ts +540 -0
- package/src/shared/engine/ai/eliteScript.ts +85 -0
- package/src/shared/engine/ai/encounters.ts +124 -0
- package/src/shared/engine/ai/flight.ts +69 -0
- package/src/shared/engine/ai/flock.ts +334 -0
- package/src/shared/engine/ai/hfsm.ts +51 -0
- package/src/shared/engine/ai/huntPattern.ts +987 -0
- package/src/shared/engine/ai/inspect.ts +6 -0
- package/src/shared/engine/ai/pinning.ts +13 -0
- package/src/shared/engine/ai/reach.ts +19 -0
- package/src/shared/engine/ai/stalker.ts +1502 -0
- package/src/shared/engine/ai/strikeRows.ts +17 -0
- package/src/shared/engine/ai/strikeState.ts +19 -0
- package/src/shared/engine/ai/strikes.ts +199 -0
- package/src/shared/engine/ai/weighted.ts +27 -0
- package/src/shared/engine/app/identity.ts +66 -0
- package/src/shared/engine/app/ownership.ts +155 -0
- package/src/shared/engine/app/pageSeat.ts +12 -0
- package/src/shared/engine/app/resources.ts +7 -0
- package/src/shared/engine/app/scheduler.ts +162 -0
- package/src/shared/engine/app/scope.ts +557 -0
- package/src/shared/engine/app/scopeEnvironment.ts +27 -0
- package/src/shared/engine/app/scopedProperty.ts +38 -0
- package/src/shared/engine/audio/audioProfiles.ts +161 -0
- package/src/shared/engine/audio/bootAudio.ts +316 -0
- package/src/shared/engine/boot/loadingWaits.ts +62 -0
- package/src/shared/engine/boot/serverProgress.ts +27 -0
- package/src/shared/engine/boot/steps.ts +63 -0
- package/src/shared/engine/boot/tables.ts +48 -0
- package/src/shared/engine/boot/timeline.ts +189 -0
- package/src/shared/engine/boot/timing.ts +96 -0
- package/src/shared/engine/boot/waits.ts +114 -0
- package/src/shared/engine/boot/workerTiming.ts +74 -0
- package/src/shared/engine/combat/Equipment.ts +66 -0
- package/src/shared/engine/combat/Firearm.ts +200 -0
- package/src/shared/engine/combat/Melee.ts +46 -0
- package/src/shared/engine/combat/Tool.ts +8 -0
- package/src/shared/engine/combat/Weapon.ts +133 -0
- package/src/shared/engine/combat/ammo.ts +17 -0
- package/src/shared/engine/combat/blocks/ads.ts +5 -0
- package/src/shared/engine/combat/blocks/melee.ts +19 -0
- package/src/shared/engine/combat/bowDraw.ts +140 -0
- package/src/shared/engine/combat/bowLaw.ts +54 -0
- package/src/shared/engine/combat/effects/EffectService.ts +216 -0
- package/src/shared/engine/combat/effects/types.ts +47 -0
- package/src/shared/engine/combat/health.ts +92 -0
- package/src/shared/engine/combat/impact.ts +8 -0
- package/src/shared/engine/combat/itemFamilies.ts +34 -0
- package/src/shared/engine/combat/items.ts +147 -0
- package/src/shared/engine/combat/lungeTarget.ts +42 -0
- package/src/shared/engine/combat/meleeProfile.ts +48 -0
- package/src/shared/engine/combat/pipeline.ts +157 -0
- package/src/shared/engine/combat/projectileContact.ts +275 -0
- package/src/shared/engine/combat/projectileFlight.ts +89 -0
- package/src/shared/engine/combat/projectileLaw.ts +148 -0
- package/src/shared/engine/combat/shotSpread.ts +38 -0
- package/src/shared/engine/combat/sweptBasePose.ts +75 -0
- package/src/shared/engine/combat/sweptBlade.ts +108 -0
- package/src/shared/engine/combat/sweptMeleeCore.ts +223 -0
- package/src/shared/engine/combat/targets.ts +20 -0
- package/src/shared/engine/core/clock.ts +57 -0
- package/src/shared/engine/core/config.ts +66 -0
- package/src/shared/engine/core/faults.ts +129 -0
- package/src/shared/engine/core/fixedStep.ts +5 -0
- package/src/shared/engine/core/frameCost.ts +227 -0
- package/src/shared/engine/core/framePacing.ts +179 -0
- package/src/shared/engine/core/harnessTap.ts +15 -0
- package/src/shared/engine/core/memoryAttribution.ts +137 -0
- package/src/shared/engine/core/memoryResources.ts +20 -0
- package/src/shared/engine/core/noise.ts +53 -0
- package/src/shared/engine/core/perfLap.ts +37 -0
- package/src/shared/engine/core/portableMath.ts +204 -0
- package/src/shared/engine/core/portableMathFirst.ts +4 -0
- package/src/shared/engine/core/practiceRoomState.ts +3 -0
- package/src/shared/engine/core/rng.ts +101 -0
- package/src/shared/engine/core/time.ts +8 -0
- package/src/shared/engine/core/workSlice.ts +111 -0
- package/src/shared/engine/entities/AnimalSim.ts +390 -0
- package/src/shared/engine/entities/animalPose.ts +401 -0
- package/src/shared/engine/entities/animalRig.ts +76 -0
- package/src/shared/engine/entities/animalStates.ts +2 -0
- package/src/shared/engine/entities/creatureFloor.ts +13 -0
- package/src/shared/engine/entities/eliteBrain.ts +36 -0
- package/src/shared/engine/entities/fightRules.ts +80 -0
- package/src/shared/engine/entities/ids.ts +18 -0
- package/src/shared/engine/entities/poseCadence.ts +9 -0
- package/src/shared/engine/entities/species/registry.ts +382 -0
- package/src/shared/engine/entities/species/rigs.ts +53 -0
- package/src/shared/engine/events/events.ts +107 -0
- package/src/shared/engine/input/commands.ts +34 -0
- package/src/shared/engine/input/netButtons.ts +4 -0
- package/src/shared/engine/level/data.ts +163 -0
- package/src/shared/engine/level/selection.ts +44 -0
- package/src/shared/engine/level/spec.ts +132 -0
- package/src/shared/engine/net/acts.ts +48 -0
- package/src/shared/engine/net/animalNet.ts +43 -0
- package/src/shared/engine/net/bits.ts +104 -0
- package/src/shared/engine/net/chatFilter.ts +40 -0
- package/src/shared/engine/net/chatWire.ts +18 -0
- package/src/shared/engine/net/chatWords.ts +7 -0
- package/src/shared/engine/net/command.ts +96 -0
- package/src/shared/engine/net/encounterNet.ts +32 -0
- package/src/shared/engine/net/frame.ts +159 -0
- package/src/shared/engine/net/identity.ts +40 -0
- package/src/shared/engine/net/ledgerWire.ts +24 -0
- package/src/shared/engine/net/measurements.ts +14 -0
- package/src/shared/engine/net/messages.ts +213 -0
- package/src/shared/engine/net/netSchemas.ts +38 -0
- package/src/shared/engine/net/playerNet.ts +80 -0
- package/src/shared/engine/net/schema.ts +157 -0
- package/src/shared/engine/net/shardNet.ts +25 -0
- package/src/shared/engine/net/socketFrames.ts +84 -0
- package/src/shared/engine/net/transport.ts +19 -0
- package/src/shared/engine/net/wireFrames.ts +123 -0
- package/src/shared/engine/net/wireMessages.ts +115 -0
- package/src/shared/engine/net/wireValues.ts +142 -0
- package/src/shared/engine/physics/CharacterMotor.ts +429 -0
- package/src/shared/engine/physics/Physics.ts +211 -0
- package/src/shared/engine/physics/bodies.ts +600 -0
- package/src/shared/engine/physics/box.ts +42 -0
- package/src/shared/engine/physics/creatures.ts +188 -0
- package/src/shared/engine/physics/declaredProps.ts +26 -0
- package/src/shared/engine/physics/entrySockets.ts +44 -0
- package/src/shared/engine/physics/frame.ts +39 -0
- package/src/shared/engine/physics/gridBorders.ts +38 -0
- package/src/shared/engine/physics/groups.ts +64 -0
- package/src/shared/engine/physics/heightPatch.ts +49 -0
- package/src/shared/engine/physics/meshCollision.ts +84 -0
- package/src/shared/engine/physics/mover.ts +60 -0
- package/src/shared/engine/physics/navmesh.ts +206 -0
- package/src/shared/engine/physics/navmeshUrl.ts +8 -0
- package/src/shared/engine/physics/nearColliders.ts +55 -0
- package/src/shared/engine/physics/overlap.ts +26 -0
- package/src/shared/engine/physics/paths.ts +135 -0
- package/src/shared/engine/physics/pieces.ts +139 -0
- package/src/shared/engine/physics/query.ts +161 -0
- package/src/shared/engine/physics/queryBatchV2.ts +118 -0
- package/src/shared/engine/physics/rapier-bg.d.ts +5 -0
- package/src/shared/engine/physics/rapier.ts +34 -0
- package/src/shared/engine/physics/readinessWalls.ts +49 -0
- package/src/shared/engine/physics/ropeChain.ts +128 -0
- package/src/shared/engine/physics/stripColliders.ts +21 -0
- package/src/shared/engine/physics/surface.ts +31 -0
- package/src/shared/engine/physics/terrain.ts +155 -0
- package/src/shared/engine/physics/terrainTiles.ts +20 -0
- package/src/shared/engine/physics/trainingTargets.ts +51 -0
- package/src/shared/engine/physics/transferWalls.ts +84 -0
- package/src/shared/engine/physics/wasmUrl.ts +3 -0
- package/src/shared/engine/player/MeleeSweep.ts +50 -0
- package/src/shared/engine/player/board.ts +129 -0
- package/src/shared/engine/player/combatMotion.ts +5 -0
- package/src/shared/engine/player/dash.ts +60 -0
- package/src/shared/engine/player/dodge.ts +14 -0
- package/src/shared/engine/player/fall.ts +29 -0
- package/src/shared/engine/player/hoverSpeed.ts +22 -0
- package/src/shared/engine/player/impulse.ts +30 -0
- package/src/shared/engine/player/jump.ts +30 -0
- package/src/shared/engine/player/lockOrbit.ts +72 -0
- package/src/shared/engine/player/modes.ts +239 -0
- package/src/shared/engine/player/motion.ts +391 -0
- package/src/shared/engine/player/motionState.ts +84 -0
- package/src/shared/engine/player/shove.ts +27 -0
- package/src/shared/engine/player/swim.ts +196 -0
- package/src/shared/engine/player/walk.ts +25 -0
- package/src/shared/engine/quest/core.ts +174 -0
- package/src/shared/engine/quest/dialogueClock.ts +191 -0
- package/src/shared/engine/quest/discovery.ts +42 -0
- package/src/shared/engine/quest/lastPlace.ts +80 -0
- package/src/shared/engine/quest/players.ts +162 -0
- package/src/shared/engine/quest/progress.ts +25 -0
- package/src/shared/engine/quest/viewPort.ts +22 -0
- package/src/shared/engine/saves/environment.ts +13 -0
- package/src/shared/engine/saves/legacy.ts +65 -0
- package/src/shared/engine/saves/runtime.ts +28 -0
- package/src/shared/engine/saves/saves.lock.json +551 -0
- package/src/shared/engine/saves/shape.ts +157 -0
- package/src/shared/engine/saves/store.ts +423 -0
- package/src/shared/engine/script/checkpointBytes.ts +18 -0
- package/src/shared/engine/script/decisionModule.ts +158 -0
- package/src/shared/engine/script/effects.ts +111 -0
- package/src/shared/engine/script/fixedMemory.ts +92 -0
- package/src/shared/engine/script/groupBankV2.ts +376 -0
- package/src/shared/engine/script/groupStepV2.ts +987 -0
- package/src/shared/engine/script/host.ts +443 -0
- package/src/shared/engine/script/moduleV2.ts +160 -0
- package/src/shared/engine/script/observationColumnsV2.ts +431 -0
- package/src/shared/engine/script/observationsV2.ts +139 -0
- package/src/shared/engine/script/state.ts +183 -0
- package/src/shared/engine/script/strings.ts +5 -0
- package/src/shared/engine/script/viewLane.ts +335 -0
- package/src/shared/engine/script/viewProgram.ts +315 -0
- package/src/shared/engine/sim/actRoutes.ts +72 -0
- package/src/shared/engine/sim/apiVersion.ts +2 -0
- package/src/shared/engine/sim/bands.ts +174 -0
- package/src/shared/engine/sim/cableTraversal.ts +356 -0
- package/src/shared/engine/sim/dayClock.ts +76 -0
- package/src/shared/engine/sim/edgeProfiles.ts +123 -0
- package/src/shared/engine/sim/encounterRows.ts +49 -0
- package/src/shared/engine/sim/leadPlayer.ts +16 -0
- package/src/shared/engine/sim/moverLifecycle.ts +80 -0
- package/src/shared/engine/sim/moverMotion.ts +130 -0
- package/src/shared/engine/sim/nearPlayer.ts +21 -0
- package/src/shared/engine/sim/netMotion.ts +17 -0
- package/src/shared/engine/sim/readiness.ts +77 -0
- package/src/shared/engine/sim/seamError.ts +100 -0
- package/src/shared/engine/sim/seamGeometry.ts +365 -0
- package/src/shared/engine/sim/seamLattice.ts +127 -0
- package/src/shared/engine/sim/shardRows.ts +106 -0
- package/src/shared/engine/sim/shore.ts +14 -0
- package/src/shared/engine/sim/snapshot.ts +482 -0
- package/src/shared/engine/sim/snapshotBase64.ts +25 -0
- package/src/shared/engine/sim/snapshotData.ts +460 -0
- package/src/shared/engine/sim/snapshotPhysics.ts +163 -0
- package/src/shared/engine/sim/snapshotReferenceMemo.ts +271 -0
- package/src/shared/engine/sim/strips.ts +134 -0
- package/src/shared/engine/strings.ts +751 -0
- package/src/shared/engine/world/BakedTerrain.ts +131 -0
- package/src/shared/engine/world/Heightfield.ts +129 -0
- package/src/shared/engine/world/bakedTerrainField.ts +85 -0
- package/src/shared/engine/world/dayCycle.ts +198 -0
- package/src/shared/engine/world/easedFields.ts +32 -0
- package/src/shared/engine/world/forest/placement.ts +391 -0
- package/src/shared/engine/world/forest/treeSpec.ts +15 -0
- package/src/shared/engine/world/groundField.ts +21 -0
- package/src/shared/engine/world/interact/barrel.ts +114 -0
- package/src/shared/engine/world/interact/flags.ts +229 -0
- package/src/shared/engine/world/interact/pickup.ts +22 -0
- package/src/shared/engine/world/interact/prompts.ts +47 -0
- package/src/shared/engine/world/interact/types.ts +327 -0
- package/src/shared/engine/world/interact/validate.ts +67 -0
- package/src/shared/engine/world/scalarChannel.ts +146 -0
- package/src/shared/engine/world/steppeWind.ts +193 -0
- package/src/shared/engine/world/terrainField.ts +217 -0
- package/src/shared/engine/world/terrainHeight.ts +19 -0
- package/src/shared/engine/world/water/body.ts +88 -0
- package/src/shared/engine/world/water/declared.ts +106 -0
- package/src/shared/engine/world/waves.ts +57 -0
- package/src/shared/engine/world/weather.ts +166 -0
- package/src/shared/engine/world/weatherContinuation.ts +121 -0
- package/src/shared/engine/world/windField.ts +49 -0
- package/src/shared/engine/world/windStrength.ts +6 -0
- package/src/shared/engine/world/yawFrame.ts +38 -0
- package/src/shared/game/achievements.ts +140 -0
- package/src/shared/game/ambient/flock.ts +374 -0
- package/src/shared/game/animation/limbBlend.ts +70 -0
- package/src/shared/game/animation/limbRig.ts +208 -0
- package/src/shared/game/bag/findsCatalogue.ts +58 -0
- package/src/shared/game/bag/itemCatalog.ts +18 -0
- package/src/shared/game/bag/items.ts +5 -0
- package/src/shared/game/bag/starter.generated.ts +3 -0
- package/src/shared/game/bag/starterItems.json +62 -0
- package/src/shared/game/boss/arenaAnswers.ts +49 -0
- package/src/shared/game/boss/arenaCollision.ts +16 -0
- package/src/shared/game/boss/arenaGround.ts +121 -0
- package/src/shared/game/boss/arenaPortal.ts +63 -0
- package/src/shared/game/boss/arenaRoomRows.ts +403 -0
- package/src/shared/game/boss/arenaWhirls.ts +88 -0
- package/src/shared/game/boss/jointTargets.ts +41 -0
- package/src/shared/game/boss/lane.ts +62 -0
- package/src/shared/game/boss/openArenaFight.ts +644 -0
- package/src/shared/game/boss/patrolLaw.ts +136 -0
- package/src/shared/game/boss/slotLaw.ts +173 -0
- package/src/shared/game/boss/wake.ts +60 -0
- package/src/shared/game/compendium/finds.ts +49 -0
- package/src/shared/game/compendium/registry.ts +28 -0
- package/src/shared/game/compendium/rules.ts +136 -0
- package/src/shared/game/compendium/state.ts +23 -0
- package/src/shared/game/compendium/tracker.ts +138 -0
- package/src/shared/game/compendium/types.ts +115 -0
- package/src/shared/game/eliteSystem.ts +349 -0
- package/src/shared/game/grapple/course.ts +14 -0
- package/src/shared/game/grapple/feed.ts +27 -0
- package/src/shared/game/grapple/sim.ts +352 -0
- package/src/shared/game/grid/allocator.ts +479 -0
- package/src/shared/game/grid/assembly.ts +73 -0
- package/src/shared/game/grid/catalogue.ts +197 -0
- package/src/shared/game/grid/catalogueDocument.ts +6 -0
- package/src/shared/game/grid/catalogueSlot.ts +53 -0
- package/src/shared/game/grid/cellEvents.ts +37 -0
- package/src/shared/game/grid/collisionStrips.ts +18 -0
- package/src/shared/game/grid/compiledStrips.ts +282 -0
- package/src/shared/game/grid/continuations.ts +43 -0
- package/src/shared/game/grid/crossing.ts +143 -0
- package/src/shared/game/grid/edgeProfiles.ts +31 -0
- package/src/shared/game/grid/farProxy.ts +302 -0
- package/src/shared/game/grid/ghosts.ts +42 -0
- package/src/shared/game/grid/gridAssetBytes.ts +59 -0
- package/src/shared/game/grid/gridCollision.ts +37 -0
- package/src/shared/game/grid/instances.ts +9 -0
- package/src/shared/game/grid/pageMode.ts +32 -0
- package/src/shared/game/grid/platformInputs.ts +11 -0
- package/src/shared/game/grid/postPairs.ts +40 -0
- package/src/shared/game/grid/readinessEdges.ts +13 -0
- package/src/shared/game/grid/recovery.ts +221 -0
- package/src/shared/game/grid/roadLayout.ts +169 -0
- package/src/shared/game/grid/roadRecovery.ts +99 -0
- package/src/shared/game/grid/rules.ts +45 -0
- package/src/shared/game/grid/runtimeCheckpoint.ts +58 -0
- package/src/shared/game/grid/seamData.ts +74 -0
- package/src/shared/game/grid/seamGeometry.ts +219 -0
- package/src/shared/game/grid/singleplayer.json +701 -0
- package/src/shared/game/grid/travellerCombat.ts +34 -0
- package/src/shared/game/grid/wallet.ts +104 -0
- package/src/shared/game/harvest.ts +16 -0
- package/src/shared/game/instanceSaves.ts +14 -0
- package/src/shared/game/inventoryLaw.ts +131 -0
- package/src/shared/game/ledger.ts +188 -0
- package/src/shared/game/loadout/itemCatalogue.ts +44 -0
- package/src/shared/game/loadout/persistence.ts +20 -0
- package/src/shared/game/loadout/pouch.ts +46 -0
- package/src/shared/game/localSaveKeys.ts +9 -0
- package/src/shared/game/looks/dayClock.ts +112 -0
- package/src/shared/game/looks/dayLookPresets.ts +75 -0
- package/src/shared/game/looks/keyedSkyClock.ts +15 -0
- package/src/shared/game/loot/Bounty.ts +49 -0
- package/src/shared/game/loot/Owned.ts +112 -0
- package/src/shared/game/loot/Purse.ts +94 -0
- package/src/shared/game/loot/coinAmounts.ts +17 -0
- package/src/shared/game/loot/coinBurstState.ts +23 -0
- package/src/shared/game/loot/deaths.ts +14 -0
- package/src/shared/game/loot/exchange.ts +71 -0
- package/src/shared/game/loot/ownedRows.ts +24 -0
- package/src/shared/game/loot/tableRows.ts +11 -0
- package/src/shared/game/newGame.ts +56 -0
- package/src/shared/game/plugin/animation.ts +618 -0
- package/src/shared/game/plugin/bodyBoss.ts +119 -0
- package/src/shared/game/plugin/borrowed.ts +62 -0
- package/src/shared/game/plugin/bossRecord.ts +28 -0
- package/src/shared/game/plugin/channelPrograms.ts +307 -0
- package/src/shared/game/plugin/channels.ts +355 -0
- package/src/shared/game/plugin/creatureFrame.ts +46 -0
- package/src/shared/game/plugin/director.ts +435 -0
- package/src/shared/game/plugin/moduleHash.ts +49 -0
- package/src/shared/game/plugin/quests.ts +450 -0
- package/src/shared/game/plugin/runtimeRows.ts +288 -0
- package/src/shared/game/population/census.ts +67 -0
- package/src/shared/game/population/groupNotices.ts +34 -0
- package/src/shared/game/population/pageHomes.ts +125 -0
- package/src/shared/game/population/pageRows.ts +20 -0
- package/src/shared/game/population/perchRoot.ts +17 -0
- package/src/shared/game/population/respawn.ts +89 -0
- package/src/shared/game/population/returnProgram.ts +448 -0
- package/src/shared/game/population/returnProjectionV2.ts +203 -0
- package/src/shared/game/population/wildlifeOwner.ts +20 -0
- package/src/shared/game/quest/boundState.ts +55 -0
- package/src/shared/game/quest/carriedRound.ts +59 -0
- package/src/shared/game/quest/chapterBindings.ts +64 -0
- package/src/shared/game/quest/chapterClock.ts +56 -0
- package/src/shared/game/quest/chapterDecision.ts +31 -0
- package/src/shared/game/quest/chapterFlow.ts +54 -0
- package/src/shared/game/quest/chapterLeads.ts +10 -0
- package/src/shared/game/quest/contractBoard.ts +108 -0
- package/src/shared/game/quest/contracts.ts +145 -0
- package/src/shared/game/quest/declared.ts +152 -0
- package/src/shared/game/quest/effectPresentation.ts +23 -0
- package/src/shared/game/quest/effects.ts +61 -0
- package/src/shared/game/quest/eliteDecisions.ts +123 -0
- package/src/shared/game/quest/eliteStreams.ts +7 -0
- package/src/shared/game/quest/featCounters.ts +41 -0
- package/src/shared/game/quest/flagGates.ts +103 -0
- package/src/shared/game/quest/interactionRows.ts +214 -0
- package/src/shared/game/quest/ledger.ts +23 -0
- package/src/shared/game/quest/legacyRecords.ts +17 -0
- package/src/shared/game/quest/nativeProps.ts +117 -0
- package/src/shared/game/quest/pagePersistence.ts +91 -0
- package/src/shared/game/quest/pageReads.ts +39 -0
- package/src/shared/game/quest/pageResources.ts +19 -0
- package/src/shared/game/quest/pageState.ts +66 -0
- package/src/shared/game/quest/persistence.ts +110 -0
- package/src/shared/game/quest/questObservation.ts +50 -0
- package/src/shared/game/quest/steps.ts +116 -0
- package/src/shared/game/quest/storyLaw.ts +17 -0
- package/src/shared/game/riding/bindingTypes.ts +43 -0
- package/src/shared/game/riding/companions.ts +135 -0
- package/src/shared/game/riding/entered.ts +21 -0
- package/src/shared/game/riding/pagePopulation.ts +28 -0
- package/src/shared/game/riding/pastureCues.ts +24 -0
- package/src/shared/game/riding/physics.ts +691 -0
- package/src/shared/game/riding/presentation.ts +27 -0
- package/src/shared/game/riding/taming.ts +164 -0
- package/src/shared/game/rng.merge.d.ts +10 -0
- package/src/shared/game/saves.ts +90 -0
- package/src/shared/game/shard/api.ts +2 -0
- package/src/shared/game/shard/declaredRows.ts +121 -0
- package/src/shared/game/shard/enteredServices.ts +14 -0
- package/src/shared/game/shard/runtime.ts +90 -0
- package/src/shared/game/shard/slug.ts +9 -0
- package/src/shared/game/shard/terrainBake.ts +12 -0
- package/src/shared/game/shardfile/aimTargetFilter.ts +12 -0
- package/src/shared/game/shardfile/bakedPlacementPoses.ts +25 -0
- package/src/shared/game/shardfile/buildingDoor.ts +52 -0
- package/src/shared/game/shardfile/clientGround.ts +86 -0
- package/src/shared/game/shardfile/clientState.ts +133 -0
- package/src/shared/game/shardfile/collisionBindings.ts +31 -0
- package/src/shared/game/shardfile/contentHash.ts +7 -0
- package/src/shared/game/shardfile/crowdRuntime.ts +254 -0
- package/src/shared/game/shardfile/customSchema.ts +57 -0
- package/src/shared/game/shardfile/dataCreaturePorts.ts +239 -0
- package/src/shared/game/shardfile/entryOwners.ts +153 -0
- package/src/shared/game/shardfile/fileInputs.ts +21 -0
- package/src/shared/game/shardfile/identity.ts +18 -0
- package/src/shared/game/shardfile/items.ts +180 -0
- package/src/shared/game/shardfile/ktx2Targets.ts +62 -0
- package/src/shared/game/shardfile/ladder.ts +137 -0
- package/src/shared/game/shardfile/liftRider.ts +62 -0
- package/src/shared/game/shardfile/logicalState.ts +57 -0
- package/src/shared/game/shardfile/movers.ts +14 -0
- package/src/shared/game/shardfile/namedJsonChecks.ts +12 -0
- package/src/shared/game/shardfile/outputChecksNode.ts +11 -0
- package/src/shared/game/shardfile/outputDescriptor.ts +317 -0
- package/src/shared/game/shardfile/outputIndexChecks.ts +8 -0
- package/src/shared/game/shardfile/packReads.ts +93 -0
- package/src/shared/game/shardfile/playArea.ts +42 -0
- package/src/shared/game/shardfile/portalRide.ts +170 -0
- package/src/shared/game/shardfile/portalTraversal.ts +49 -0
- package/src/shared/game/shardfile/productData.ts +22 -0
- package/src/shared/game/shardfile/props.ts +11 -0
- package/src/shared/game/shardfile/resourceRole.ts +14 -0
- package/src/shared/game/shardfile/runtimeState.ts +69 -0
- package/src/shared/game/shardfile/schemaReferences.ts +33 -0
- package/src/shared/game/shardfile/scriptNotice.ts +38 -0
- package/src/shared/game/shardfile/serverPack.ts +23 -0
- package/src/shared/game/shardfile/shardProduct.ts +206 -0
- package/src/shared/game/shardfile/spawnManifest.ts +126 -0
- package/src/shared/game/shardfile/talks.ts +22 -0
- package/src/shared/game/shardfile/targets.ts +11 -0
- package/src/shared/game/shardfile/tileOrder.ts +64 -0
- package/src/shared/game/shardfile/walkInPortalRide.ts +160 -0
- package/src/shared/game/shardfile/wholeInputs.ts +18 -0
- package/src/shared/game/shardfile/wirePrompts.ts +35 -0
- package/src/shared/game/shardfile/worldActionsV2.ts +113 -0
- package/src/shared/game/shardfile/worldTargets.ts +71 -0
- package/src/shared/game/stealth/stealthLaw.ts +120 -0
- package/src/shared/game/strings.ts +88 -0
- package/src/shared/game/systems/cellField.ts +144 -0
- package/src/shared/game/systems/effects/starterEffects.ts +20 -0
- package/src/shared/game/systems/effects/starterRows.json +98 -0
- package/src/shared/game/systems/looks/grassField.ts +249 -0
- package/src/shared/game/systems/looks/trampleField.ts +263 -0
- package/src/shared/game/weapons/heldBowBase.ts +15 -0
- package/src/shared/game/weapons/heldDecision.ts +20 -0
- package/src/shared/game/weapons/javelinFlight.ts +139 -0
- package/src/shared/game/weapons/launcherSpring.ts +11 -0
- package/src/shared/game/weapons/mountedPass.ts +70 -0
- package/src/shared/game/weapons/polearmContact.ts +73 -0
- package/src/shared/game/weapons/polearmDecision.ts +152 -0
- package/src/shared/game/weapons/starter.generated.ts +2 -0
- package/src/shared/game/weapons/starterBow.json +21 -0
- package/src/shared/game/weapons/starterBowProfile.ts +17 -0
- package/src/shared/game/weapons/starterCombat.ts +19 -0
- package/src/shared/game/weapons/starterGlyphs.ts +9 -0
- package/src/shared/game/weapons/starterMeleeProfile.ts +67 -0
- package/src/shared/game/weapons/starterMoves.ts +101 -0
- package/src/shared/game/weather/feed.ts +57 -0
- package/src/shared/health.ts +10 -0
- package/src/shared/host/author.ts +14 -0
- package/src/shared/host/formatJsonSchema.ts +1114 -0
- package/src/shared/host/headlessJourney.ts +152 -0
- package/src/shared/host/headlessObservation.ts +16 -0
- package/src/shared/host/headlessSections.ts +18 -0
- package/src/shared/host/headlessTape.ts +99 -0
- package/src/shared/host/headlessTapeParts.ts +35 -0
- package/src/shared/host/immutable.ts +14 -0
- package/src/shared/host/releaseRows.ts +23 -0
- package/src/shared/host/shardfile.ts +23 -0
- package/src/shared/host/standalone/harnessPlace.ts +23 -0
- package/src/shared/host/standalone/heldReads.ts +45 -0
- package/src/shared/host/standalone/netInput.ts +112 -0
- package/src/shared/host/standalone/workerLoopback.ts +51 -0
- package/src/shared/host/tickProtocol.ts +246 -0
- package/src/shared/side.ts +2 -0
- package/src/test/engine/FakeGame.ts +123 -0
- package/src/test/engine/creatureStride.ts +29 -0
- package/src/test/engine/declarationConsumer.ts +24 -0
- package/src/test/engine/linkedGl.ts +7 -0
- package/src/test/engine/manager.ts +58 -0
- package/src/test/engine/nativeBytes.ts +5 -0
- package/src/test/engine/netLoopback.ts +64 -0
- package/src/test/engine/realGc.ts +34 -0
- package/src/test/engine/terrain.ts +32 -0
- package/src/test/engine/textureUploadRenderer.ts +34 -0
- package/src/test/engine/weaponParity.ts +119 -0
- package/src/test/engine/world.ts +48 -0
- package/src/test/game/creatureRecipe.ts +11 -0
- package/src/test/helpers/git.ts +94 -0
- package/src/test/tsconfig.app.json +28 -0
- package/src/test/tsconfig.engine.json +27 -0
- package/src/test/tsconfig.game.json +28 -0
- package/src/test/tsconfig.host.json +27 -0
- package/src/tools/build-web.ts +58 -0
- package/src/tsconfig.json +39 -0
- package/tsconfig.app.json +32 -0
- package/tsconfig.engine.json +22 -0
- package/tsconfig.game.json +34 -0
- package/tsconfig.host.json +33 -0
- package/tsconfig.json +54 -0
- package/tsconfig.layers.json +35 -0
- package/types/format-standards.d.ts +19 -0
- package/vite/rapier.ts +35 -0
- package/README.md +0 -6
|
@@ -0,0 +1,1235 @@
|
|
|
1
|
+
import { prelinkGridViews } from './prelinkViews';
|
|
2
|
+
import { cellPresence } from './cellPresence';
|
|
3
|
+
import type { RoadTileBacking } from './roadTileBacking';
|
|
4
|
+
import { roadTileWriter } from './roadTileWriter';
|
|
5
|
+
import { bootWaits, waitFor, type BootWait } from '@wildshard/engine/boot/waits';
|
|
6
|
+
/**
|
|
7
|
+
* The grid session (SHARD-PLATFORM SF17b / SF18a / SF18b / SF21a, the grid client): what turns EXPERIMENTAL Wildshard's
|
|
8
|
+
* home-cell boot into a 5 × 5 grid inside the one page. The home cell boots through the normal shard flow (its own
|
|
9
|
+
* player, camera, HUD and the page's one fixed step); this session adds, around it, in the home cell's frame:
|
|
10
|
+
*
|
|
11
|
+
* - **the highway deck and strips**: `generatePlatform` (the pure SF17b generator) over the assembly, drawn as one mesh
|
|
12
|
+
* and installed as platform-owned trimesh colliders in the home world (the same vertices; `installStripCollider`).
|
|
13
|
+
* Every cell's edge rows come from its shard's own data (`edgeSources.ts` through `loadGridEdgeProfiles`, loaded once in
|
|
14
|
+
* `create`); the seams wear their materials by feature range (`seamLook.ts`).
|
|
15
|
+
* - **render origin per cell** (C39): the home cell is the render origin; every other cell's root sits at its origin
|
|
16
|
+
* minus the home origin, and the rings get world positions (local + home origin).
|
|
17
|
+
* - **neighbours as their declared fallback** (§3.3): no neighbour is a resident shardfile sim in the page yet, so each
|
|
18
|
+
* shows its baked far proxy (SF23) through the render rings (SF18b) and one residency allocator; its edge holds as a
|
|
19
|
+
* soft wall at the 6 m re-frame line (SF18d `ReadinessWalls`, closed while its sim is not ready). Step 2
|
|
20
|
+
* (`attach`, `liveSession.ts`) admits shardfile neighbours (the template copies) into regional hosts, opens their walls
|
|
21
|
+
* when ready and crosses the one page traveller at the fixed boundary; the rest stay closed until M3.
|
|
22
|
+
* The grid's outer rim is the outer road's shoulder: a glowing rail and closed walls, the VR void past it (G77 / G89).
|
|
23
|
+
* - **cell events**: `gridCells.enter` while the player's feet are in the home cell's interior, `leave` on the deck
|
|
24
|
+
* (SF46's hybrid runtime runs only inside its cell).
|
|
25
|
+
* - **legacy bounds yield** (SF17a): the session asks the level to leave out its chunk-edge walls and hide the edge
|
|
26
|
+
* veil (`gridLevel`), the bounds' horizontal check reads `grid`; fall recovery stays.
|
|
27
|
+
*/
|
|
28
|
+
import { LightPool } from '@wildshard/engine/fx/LightPool';
|
|
29
|
+
import { platformInputs } from '../../../shared/game/grid/platformInputs';
|
|
30
|
+
import { gridLevel as levelForGrid } from '../../../shared/game/grid/pageMode';
|
|
31
|
+
import { cellClip } from './cellClip';
|
|
32
|
+
import { BufferGeometry, Group, Mesh, Scene, Vector3, type Material, type Object3D } from 'three';
|
|
33
|
+
import { prepareRigLoader } from '@wildshard/engine/anim/rig';
|
|
34
|
+
import * as v from 'valibot';
|
|
35
|
+
import { CHUNK_HALF } from '@wildshard/engine/core/config';
|
|
36
|
+
import { onPageEnvironment } from '@wildshard/engine/render/drawnEnvironment';
|
|
37
|
+
import { versionedUrl } from '@wildshard/engine/boot/bytes';
|
|
38
|
+
import { browserLiveJsonParser } from '@wildshard/engine/boot/liveJsonParser';
|
|
39
|
+
import { publicBytes } from '@wildshard/engine/boot/tables';
|
|
40
|
+
import type { LevelSpec } from '@wildshard/engine/level/spec';
|
|
41
|
+
import type { Scope } from '@wildshard/engine/app/scope';
|
|
42
|
+
import type { StepProgress } from '@wildshard/engine/boot/plan';
|
|
43
|
+
import { WORK_SLICE_MS, workSlice } from '@wildshard/engine/core/workSlice';
|
|
44
|
+
import { app } from '@wildshard/engine/app/runtime';
|
|
45
|
+
import { diagnosticNow } from '@wildshard/engine/core/clock';
|
|
46
|
+
import type { Physics } from '@wildshard/engine/physics/Physics';
|
|
47
|
+
import { installEntrySockets } from '@wildshard/engine/physics/entrySockets';
|
|
48
|
+
import { installStripCollider } from '@wildshard/engine/physics/stripColliders';
|
|
49
|
+
import { ReadinessWalls, type ReadinessEdge } from '@wildshard/engine/physics/readinessWalls';
|
|
50
|
+
import { WATER_UNBOUNDED, waterExtent } from '@wildshard/engine/world/waves';
|
|
51
|
+
import type { Renderer } from '@wildshard/engine/render/renderer';
|
|
52
|
+
import { generatePlatform, generatePlatformSliced, type GeneratedStrip, type PlatformCell, type StripProfile } from '@wildshard/engine/sim/strips';
|
|
53
|
+
import { GridAssembly, type GridCell } from '../../../shared/game/grid/assembly';
|
|
54
|
+
import { neighbourEdges } from '../../../shared/game/grid/readinessEdges';
|
|
55
|
+
import { DEVSERVER, gridMode } from './menu';
|
|
56
|
+
import { gridCells, pageGridInstance } from '../plugin/context';
|
|
57
|
+
import { prepareHomeMetadata, withInitialHomeMetadata } from './homeMetadata';
|
|
58
|
+
import { bootSteppedTiles } from './loadingRings';
|
|
59
|
+
import type { ResidencyAllocator } from '../../../shared/game/grid/allocator';
|
|
60
|
+
import type { PageResidency } from './pageResidency';
|
|
61
|
+
import { PlatformRenderResidency } from './renderResidency';
|
|
62
|
+
import { TileStreamer, levelPorts, type FarPlan, type LevelPrepared, type RingPorts, type RingTile, type RingWait } from '@wildshard/engine/world/tileStreamer';
|
|
63
|
+
import { GhostWorlds, type GhostRegion } from '../../../shared/game/grid/ghosts';
|
|
64
|
+
import { farRingPorts, type FarPreparationWait, type FarPrepared, type FarProxyView } from './farView';
|
|
65
|
+
import { decodeFarImpostor, farBandShare } from './farImpostorView';
|
|
66
|
+
import { FarImpostorSchema, type FarImpostor } from '@wildshard/format/shardSections';
|
|
67
|
+
import { bindCellCover, cellCoverPort } from './cellCover';
|
|
68
|
+
import { FAR_RING, type FarLookRuntime } from '../../../shared/game/grid/farProxy';
|
|
69
|
+
import { bakedNearFiles, NearPlaceholders, type NearPlaceholderState } from './nearPlaceholderView';
|
|
70
|
+
import { PHONE_NEAR_CELLS, placeholderBlocksTiles } from './nearPlaceholderPlan';
|
|
71
|
+
import { TIER } from '@wildshard/engine/core/tier';
|
|
72
|
+
import { GridFrame, type GridFrameHost, type GridFrameState } from './frame';
|
|
73
|
+
import { installHazeBand } from './hazeBand';
|
|
74
|
+
import { LiveGridSession, type LiveGridPage, type LiveGridSessionState } from './liveSession';
|
|
75
|
+
import { gridShardfileEdges, gridShardfileFarBytes, gridShardfileProduct, readGridShardfileFar, readGridShardfileNear } from './products';
|
|
76
|
+
import { ApproachInputsDeferredError } from './productInputs';
|
|
77
|
+
import { GridViewAdmissions } from './viewAdmissions';
|
|
78
|
+
import { loadShardfileFar, loadShardfileNear } from './shardfileFar';
|
|
79
|
+
import { jsonResidentBytes } from '../shardfile/productCost';
|
|
80
|
+
import { RAIL_OFFSET, roadLayout } from '../../../shared/game/grid/roadLayout';
|
|
81
|
+
import type { RoadLookState } from './roadLook';
|
|
82
|
+
import { combinePlatformRoads, installPlatformRoad, installPlatformRoadSliced, type PlatformRoad } from './roadLookPlatform';
|
|
83
|
+
import { collisionStrips, type CollisionStrip } from '../../../shared/game/grid/collisionStrips';
|
|
84
|
+
import { installSoftWallLook, type SoftWallState } from './softWallLook';
|
|
85
|
+
import type { SeamLookState } from '../../../shared/game/grid/seamGeometry';
|
|
86
|
+
import { roadResident, roadViewCost, type CullPlan, type RoadResident, type RoadViewCost } from './roadCull';
|
|
87
|
+
import { loadGridEdgeProfiles } from '../../../shared/game/grid/edgeProfiles';
|
|
88
|
+
import { readGridEdges } from './edgeSources';
|
|
89
|
+
import { findShard } from '../shard/registry';
|
|
90
|
+
import { TileDecoder } from './tileDecoder';
|
|
91
|
+
import { clientTileRegistration, type ClientTileRegistration, clientRingCatalogue, clientRingPorts, type ClientRingInstance, type PreparedRingTile } from '../shardfile/tileContent';
|
|
92
|
+
import type { ClientAssets } from '../shardfile/clientAssets';
|
|
93
|
+
import { admittedGraphAuthority, clientMaterials } from '../shardfile/clientMaterials';
|
|
94
|
+
import { clientTileViews, type ClientTileViews } from '../shardfile/clientViews';
|
|
95
|
+
import type { ClientSkin } from '../shardfile/clientSkins';
|
|
96
|
+
import { setParkedMatricesFrozen, setWarmUpHeld } from '@wildshard/engine/render/precompile';
|
|
97
|
+
import { setBuildHeldTimed } from '@wildshard/engine/core/heldTiming';
|
|
98
|
+
import { NeighbourLife, type NeighbourLifeCell } from './neighbourLife';
|
|
99
|
+
import { NeighbourPanels } from './neighbourPanels';
|
|
100
|
+
import { copyMarks } from './copyIdentity';
|
|
101
|
+
import { CellMinimaps } from './minimapBlend';
|
|
102
|
+
import { leaseMapImage } from '../shardfile/mapImage';
|
|
103
|
+
import { crossingSaveStatus, installBorderShimmer, type BorderShimmerState, type CrossingSaveStatus } from './borderShimmer';
|
|
104
|
+
import { GAME_STRINGS } from '../../../shared/game/strings';
|
|
105
|
+
import { GridCellWaitingError, classifyRefusal, pageShardRefusals, refusalReason, type ShardRefusal } from './refusal';
|
|
106
|
+
import { tileRing } from '../shardfile/tileDriver';
|
|
107
|
+
import { CellLoading, type CellLoadingInput } from './cellLoading';
|
|
108
|
+
import { CellScreen, facingEdge } from './cellScreens';
|
|
109
|
+
import { readGridSeamData, type GridSeamAddress } from '../../../shared/game/grid/seamData';
|
|
110
|
+
import { readCompiledGridStrips } from '../../../shared/game/grid/compiledStrips';
|
|
111
|
+
import { startRoadGrain } from './roadGrainPreparation';
|
|
112
|
+
import { startRoadSigns } from './roadSignPreparation';
|
|
113
|
+
import { clientPreparationBatch } from '../shardfile/preparationTiming';
|
|
114
|
+
|
|
115
|
+
import { admittedRuntimeProduct } from '../shardfile/runtimeProduct';
|
|
116
|
+
|
|
117
|
+
/** D12: the A1 outer ring's share of a drawn frame (ms). On the phone tier its strips, colliders and road stop 4 ms after
|
|
118
|
+
* the last drawn frame (every other build keeps WORK_SLICE_MS): streamed at the shared 8 ms it held the grid's spawn
|
|
119
|
+
* window at a p95 of 45 ms on the iOS Simulator, which passes once the ring has landed. */
|
|
120
|
+
const OUTER_RING_SLICE_MS = TIER === 'phone' ? 4 : WORK_SLICE_MS;
|
|
121
|
+
/** a stretch between its slice checks, so a stretch that starts late in the share cannot run far past it */
|
|
122
|
+
const OUTER_RING_STRETCH_MS = TIER === 'phone' ? 2 : 4;
|
|
123
|
+
|
|
124
|
+
/** The page lights kept for the grid's region lights (LightPool.reserve): the most one region shows at once, Pine Hollow's
|
|
125
|
+
* five cabin lights. A point light costs every lit fragment a loop step, so this is the grid's real maximum, not more;
|
|
126
|
+
* a region that shows more warns once and leaves the rest dark. */
|
|
127
|
+
export const GRID_REGION_POINT_LIGHTS = 5;
|
|
128
|
+
/** free page lights for home content that lights itself after the first render (the population projection's) */
|
|
129
|
+
export const GRID_HOME_SPARE_POINT_LIGHTS = 1;
|
|
130
|
+
const isScene = (node: Object3D): node is Scene => node instanceof Scene;
|
|
131
|
+
|
|
132
|
+
declare const __GRID_SEAM_ASSET__: GridSeamAddress;
|
|
133
|
+
|
|
134
|
+
declare const __BUILD_ID__: string; // vite.config.ts define; absent under Node
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* In grid mode the level's own chunk-edge walls and veil yield to the platform, and so does its own horizon (G99: every
|
|
138
|
+
* shard is a 500 m cube; a level's horizon rings and cloud sea stand past it, over the road and the neighbours, whose
|
|
139
|
+
* far views are the grid's horizon now). The engine has no default horizon (G552); a level's painted strips at
|
|
140
|
+
* infinity stay. The standalone path is unchanged.
|
|
141
|
+
*/
|
|
142
|
+
export function gridLevel(spec: LevelSpec): LevelSpec {
|
|
143
|
+
return levelForGrid(spec);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** What the session reads from the page: the player's feet in the home frame, the scene, the world, the fixed step. */
|
|
147
|
+
export interface GridSessionHost {
|
|
148
|
+
/** The owner's allocator already includes the home before this late play-stage session constructs the platform. */
|
|
149
|
+
readonly residency?: PageResidency;
|
|
150
|
+
readonly scene: Object3D;
|
|
151
|
+
readonly physics: Physics;
|
|
152
|
+
readonly scope: Scope;
|
|
153
|
+
readonly feet: () => { readonly x: number; readonly y: number; readonly z: number };
|
|
154
|
+
/** Home/far coverage can load before controls; neighbour products and near views start after this boundary. */
|
|
155
|
+
readonly backgroundReady?: () => boolean;
|
|
156
|
+
/** Presentation-only short range while an actual crossing waits at its
|
|
157
|
+
* in-world screen. Disabled in the same frame the crossing settles. */
|
|
158
|
+
readonly heldFrame?: { enabled: boolean };
|
|
159
|
+
/** Register once per fixed step (the page's one fixed step; never a second loop). */
|
|
160
|
+
readonly onFixed: (fn: (dt: number) => void) => void;
|
|
161
|
+
/** SF19a's one frame: the camera, composer and grade effects, and the page's late phase (absent: never built) */
|
|
162
|
+
readonly frame?: GridFrameHost & { readonly onLate: (fn: (dt: number) => void) => void };
|
|
163
|
+
/** the page's renderer: shardfile neighbours' ring tiles compile their materials on it (absent: neighbours stay far proxies) */
|
|
164
|
+
readonly renderer?: Renderer;
|
|
165
|
+
/** Prepare a streamed view while hidden; its current fence cancels work before retirement. */
|
|
166
|
+
readonly prepareView?: (root: Object3D, current: () => boolean) => Promise<void>;
|
|
167
|
+
/** D12: keep a prepared far / near view's programs for the page, so a view that retires and returns links nothing again. */
|
|
168
|
+
readonly keepViewPrograms?: (view: Object3D) => void;
|
|
169
|
+
/** Refresh stable page-owned views as one complete material/object inventory. */
|
|
170
|
+
readonly prepareViews?: (roots: readonly Object3D[], current: () => boolean) => Promise<void>;
|
|
171
|
+
/** Prepare every attached sky layer's domes under the page's lights now (`Game.warmSkyLayers`). */
|
|
172
|
+
readonly prepareSkyLayers?: () => Promise<void>;
|
|
173
|
+
/** Prepare an admitted, detached ring tile before its budgeted visible upload. */
|
|
174
|
+
readonly prepareTile?: (tile: PreparedRingTile) => Promise<void>;
|
|
175
|
+
/** G371: the drawn camera's horizontal offset from the feet, in the feet's frame (absent: the eye at the feet). The near
|
|
176
|
+
* tier plans from the eye, so a lifted or free camera gets the cells it is over; a play camera is a few metres off */
|
|
177
|
+
readonly eye?: () => { readonly x: number; readonly z: number };
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* What each cell draws now, for the readout and the captures: `playing` (the entered runtime), `frozen` (the home's
|
|
181
|
+
* runtime, not stepping, when no placeholder layer draws it), `near` (its near placeholder, its far proxy hidden), `far proxy`, `tiles` (only its L1 / L0
|
|
182
|
+
* ring tiles: the far proxy wholly refined away), `loading` (nothing yet).
|
|
183
|
+
*/
|
|
184
|
+
export type GridCellShows = 'playing' | 'frozen' | 'near' | 'far proxy' | 'tiles' | 'loading';
|
|
185
|
+
/** Which of a cell's presentation layers draw now (meshes visible), for the readout and the captures. */
|
|
186
|
+
export interface GridCellDrawn { readonly far: boolean; readonly near: boolean; readonly l1: number; readonly l0: number }
|
|
187
|
+
/** The session's readout (tests, harness, the board). */
|
|
188
|
+
export interface GridSessionState {
|
|
189
|
+
/** Actual world-space placement pitch; diagnostic routes must use the served build's lattice. */
|
|
190
|
+
readonly pitch: number;
|
|
191
|
+
readonly home: string; readonly inside: string | null; readonly feet: { x: number; z: number };
|
|
192
|
+
readonly cells: readonly { readonly instance: string; readonly slug: string; readonly cell: readonly [number, number]; readonly shows: GridCellShows; readonly drawn: GridCellDrawn }[];
|
|
193
|
+
readonly strips: number; readonly ringsReady: boolean;
|
|
194
|
+
/** what `ringsReady` still waits on: the visible cells not yet drawn, and the far ring's plan (budget, charges, left out) */
|
|
195
|
+
readonly ringsWait: { readonly cells: readonly RingWait[]; readonly far: FarPlan; readonly preparation: readonly FarPreparationWait[]; readonly waits: { readonly count: number; readonly oldest: readonly Pick<BootWait, 'label' | 'kind' | 'ageMs'>[] } };
|
|
196
|
+
/** SF17b's boulevard look: segments, junctions, roundabouts, signs, lights and draws */
|
|
197
|
+
readonly road: RoadLookState;
|
|
198
|
+
/** the seams' materials: triangles and draws per material (phase 2, G90 / G91 / G101) */
|
|
199
|
+
readonly seams: SeamLookState;
|
|
200
|
+
/** G85's soft walls: how many edges are closed */
|
|
201
|
+
readonly softWalls: SoftWallState;
|
|
202
|
+
/** G78's border shimmer and G119's save panel (status null: no panel up) */
|
|
203
|
+
readonly shimmer: BorderShimmerState;
|
|
204
|
+
/** G555: the cell whose step-by-step loading screen is open (its entry or re-entry waits), or null */
|
|
205
|
+
readonly cellLoading: string | null;
|
|
206
|
+
/** the allocator's grid content (MB) and the §3.2 playing total with the engine base (MB, the 1.0 GB envelope, G65) */
|
|
207
|
+
readonly residentMB: number; readonly playingMB: number;
|
|
208
|
+
/** Exact category sum before engine base, overlap allowance or calibration factor; used by the soak harness. */
|
|
209
|
+
readonly accountedBytes: number;
|
|
210
|
+
readonly rings: { readonly frame?: number; readonly far: number; readonly l1: number; readonly l0: number; readonly refused: number; readonly inFlight: number; readonly queued: number;
|
|
211
|
+
readonly ghosts: { readonly count: number; readonly tiles: readonly GhostRegion[] } };
|
|
212
|
+
/** SF19a's one frame (null for a host with no frame: no camera / composer) */
|
|
213
|
+
readonly frame: GridFrameState | null;
|
|
214
|
+
/** step 2's live crossing (null until the page attaches its player) */
|
|
215
|
+
readonly live: LiveGridSessionState | null;
|
|
216
|
+
/** SF25 / G66: each shardfile neighbour's client-script life (frozen cells breathe and graze) */
|
|
217
|
+
readonly life: readonly NeighbourLifeCell[];
|
|
218
|
+
/** G342 / G385: the near-placeholder tier's cells and resident bytes */
|
|
219
|
+
readonly near: NearPlaceholderState;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** The shardfile neighbours' L1 / L0 tiles (sources load late: until then the catalogue has no tile and the far proxy draws). */
|
|
223
|
+
function neighbourTiles(scope: Scope, prepare: (tile: PreparedRingTile) => Promise<void>, retired: (tile: RingTile, roots: readonly object[]) => void,
|
|
224
|
+
frame: ((step: () => void) => void) | undefined): { instances: Map<string, ClientRingInstance>; ports: RingPorts<PreparedRingTile> } {
|
|
225
|
+
const instances = new Map<string, ClientRingInstance>(), decoder = new TileDecoder();
|
|
226
|
+
scope.onDispose(() => { decoder.dispose(); });
|
|
227
|
+
// DL17 (G872): the neighbours decode and parse in play; their workers start in loading and stay, so no worker script is
|
|
228
|
+
// fetched after control (the live parser's page owner keeps it to the page's end)
|
|
229
|
+
decoder.hold(); browserLiveJsonParser().hold();
|
|
230
|
+
return { instances, ports: clientRingPorts(instances, { scope, decoder, prepare, retired, ...(frame === undefined ? {} : { frame }) }) };
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** The far proxy and its row, fetched from the shard's baked folder (`public/assets/baked/<slug>/far.*`). */
|
|
234
|
+
async function loadFar(slug: string): Promise<{ prepared: FarPrepared; bytes: number }> {
|
|
235
|
+
// Pure authored projects have no repo bake: their proxy comes from their product's sections and far files (O26: read
|
|
236
|
+
// hash-verified on their own, not after admitting the whole product), instead of a nonexistent far.json
|
|
237
|
+
const shardfile = await readGridShardfileFar(slug);
|
|
238
|
+
if (shardfile !== null) return loadShardfileFar(shardfile.rows, shardfile.read);
|
|
239
|
+
const response = await fetch(versionedUrl(`/assets/baked/${slug}/far.json`));
|
|
240
|
+
if (!response.ok) throw new Error(`far.json ${slug}: ${String(response.status)}`);
|
|
241
|
+
const row: unknown = await response.json();
|
|
242
|
+
const look = farLook(row), bytes = farBytes(row), impostorRow = farImpostorRow(row);
|
|
243
|
+
// G539: its camera-facing impostor beside it (a far row baked before G539 has none: the proxy draws at every distance)
|
|
244
|
+
const impostor = impostorRow === undefined ? null : await (async () => {
|
|
245
|
+
const image = await fetch(versionedUrl(`/assets/baked/${slug}/far-impostor.png`));
|
|
246
|
+
if (!image.ok) throw new Error(`far-impostor.png ${slug}: ${String(image.status)}`);
|
|
247
|
+
return decodeFarImpostor(impostorRow, new Uint8Array(await image.arrayBuffer()));
|
|
248
|
+
})();
|
|
249
|
+
const gltf = await (await prepareRigLoader()).createRigLoader().loadAsync(versionedUrl(`/assets/baked/${slug}/far.glb`));
|
|
250
|
+
const meshes: BufferGeometry[] = [];
|
|
251
|
+
gltf.scene.traverse((node) => { if (!(node instanceof Mesh)) return; const found: unknown = node.geometry; if (found instanceof BufferGeometry) meshes.push(found as BufferGeometry); });
|
|
252
|
+
const geometry = meshes[0];
|
|
253
|
+
if (geometry === undefined) throw new Error(`far.glb ${slug}: no mesh`);
|
|
254
|
+
return { prepared: { geometry, look, impostor }, bytes };
|
|
255
|
+
}
|
|
256
|
+
const num = v.pipe(v.number(), v.finite());
|
|
257
|
+
/** The part of `far.json` the client reads: the resident cost and the look (the bake writes more). */
|
|
258
|
+
const FarRow = v.object({ far: v.object({ gpu: num, decoded: num, impostor: v.optional(FarImpostorSchema) }),
|
|
259
|
+
look: v.object({ family: v.picklist(['toon', 'painterly', 'pbr']), haze: v.object({ colour: v.tuple([num, num, num]) }),
|
|
260
|
+
grade: v.optional(v.object({ exposure: num, saturation: num, contrast: num, tint: v.optional(v.tuple([num, num, num])) })),
|
|
261
|
+
band: v.optional(v.object({ colour: v.tuple([num, num, num]), height: num, opacity: num, own: num })) }) });
|
|
262
|
+
/** The part of `near.json` the client reads. */
|
|
263
|
+
const NearRow = v.object({ near: v.object({ gpu: num, decoded: num, content: v.optional(num), tiles: v.optional(v.literal(true)) }), look: FarRow.entries.look });
|
|
264
|
+
/**
|
|
265
|
+
* G342 / G348: a shard's near placeholder. Its shardfile's own `near` row first (`wildshard build` bakes one for any terrain
|
|
266
|
+
* shardfile, so an unknown uploaded shard draws its own), read from its sections and near files without admitting the
|
|
267
|
+
* product (G608, as O26's far proxy); else its baked folder like the far proxy
|
|
268
|
+
* (`scripts/bake/near-placeholder.mjs`, the first-party shards until their shardfiles carry the row). A baked view whose
|
|
269
|
+
* world carries the shard's own props owns its cell; one built from the shard's own coarse tiles (`near.tiles`) never does,
|
|
270
|
+
* as a shardfile's own near row never does: those tiles keep refining over it.
|
|
271
|
+
*/
|
|
272
|
+
async function loadNear(slug: string): Promise<{ prepared: FarPrepared; bytes: number; owns: boolean }> {
|
|
273
|
+
const own = await readGridShardfileNear(slug);
|
|
274
|
+
if (own !== null) return loadShardfileNear(own.rows, own.read);
|
|
275
|
+
const baked = bakedNearFiles(slug, publicBytes());
|
|
276
|
+
if (baked === null) throw new Error('No declared near placeholder; retain far proxy');
|
|
277
|
+
const response = await fetch(versionedUrl(baked.row));
|
|
278
|
+
if (!response.ok) throw new Error(`near.json ${slug}: ${String(response.status)}`);
|
|
279
|
+
const row = v.parse(NearRow, await response.json());
|
|
280
|
+
const gltf = await (await prepareRigLoader()).createRigLoader().loadAsync(versionedUrl(baked.mesh));
|
|
281
|
+
let geometry: BufferGeometry | undefined;
|
|
282
|
+
gltf.scene.traverse((node) => { if (geometry === undefined && node instanceof Mesh) { const found: unknown = node.geometry; if (found instanceof BufferGeometry) geometry = found as BufferGeometry; } });
|
|
283
|
+
if (geometry === undefined) throw new Error(`near.glb ${slug}: no mesh`);
|
|
284
|
+
return { prepared: { geometry, look: row.look }, bytes: Math.round(row.near.gpu + row.near.decoded), owns: (row.near.content ?? 0) > 0 && row.near.tiles !== true };
|
|
285
|
+
}
|
|
286
|
+
function farLook(row: unknown): FarLookRuntime { return v.parse(FarRow, row).look; }
|
|
287
|
+
function farImpostorRow(row: unknown): FarImpostor | undefined { return v.parse(FarRow, row).far.impostor; }
|
|
288
|
+
function farBytes(row: unknown): number { const { far } = v.parse(FarRow, row); return Math.round(far.gpu + far.decoded); }
|
|
289
|
+
|
|
290
|
+
/** The closed outer rim on the outer road's shoulder: the void's rail (G89; the empty neighbour has no sim to wait for). */
|
|
291
|
+
function rimEdges(assembly: GridAssembly, home: Readonly<{ origin: Readonly<{ x: number; z: number }> }>): ReadinessEdge[] {
|
|
292
|
+
const xs = assembly.cells.map((c) => c.cell[0]), zs = assembly.cells.map((c) => c.cell[1]), p = assembly.pitch;
|
|
293
|
+
const minX = Math.min(...xs) * p - p / 2 - RAIL_OFFSET, maxX = Math.max(...xs) * p + p / 2 + RAIL_OFFSET, minZ = Math.min(...zs) * p - p / 2 - RAIL_OFFSET, maxZ = Math.max(...zs) * p + p / 2 + RAIL_OFFSET;
|
|
294
|
+
const cx = (minX + maxX) / 2 - home.origin.x, cz = (minZ + maxZ) / 2 - home.origin.z, hx = (maxX - minX) / 2, hz = (maxZ - minZ) / 2;
|
|
295
|
+
return [
|
|
296
|
+
{ instance: null, x: minX - home.origin.x, z: cz, axis: 'x', halfLength: hz, floor: 0 }, { instance: null, x: maxX - home.origin.x, z: cz, axis: 'x', halfLength: hz, floor: 0 },
|
|
297
|
+
{ instance: null, x: cx, z: minZ - home.origin.z, axis: 'z', halfLength: hx, floor: 0 }, { instance: null, x: cx, z: maxZ - home.origin.z, axis: 'z', halfLength: hx, floor: 0 },
|
|
298
|
+
];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
type ConstructorPhase = 'fields' | 'lights' | 'home' | 'frame' | 'road' | 'presentation' | 'physics' | 'roots' | 'streaming';
|
|
302
|
+
/** Report wall intervals only; diagnostic failures cannot change construction. */
|
|
303
|
+
function constructorPreparation(): ((phase: ConstructorPhase) => void) | undefined {
|
|
304
|
+
try {
|
|
305
|
+
const timing = clientPreparationBatch<ConstructorPhase>('grid', 'session.constructor',
|
|
306
|
+
['fields', 'lights', 'home', 'frame', 'road', 'presentation', 'physics', 'roots', 'streaming']);
|
|
307
|
+
if (timing === undefined) return undefined;
|
|
308
|
+
return phase => {
|
|
309
|
+
try { timing.mark(phase); if (phase === 'streaming') timing.finish(); }
|
|
310
|
+
catch { /* Timing is never a construction or readiness barrier. */ }
|
|
311
|
+
};
|
|
312
|
+
} catch { return undefined; }
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/** The live grid session. Installed only in grid page mode; disposed with the level scope. */
|
|
316
|
+
export class GridSession {
|
|
317
|
+
readonly assembly: GridAssembly;
|
|
318
|
+
readonly home: GridCell;
|
|
319
|
+
readonly allocator: ResidencyAllocator;
|
|
320
|
+
private readonly rings: TileStreamer<LevelPrepared<FarPrepared, PreparedRingTile>>;
|
|
321
|
+
// Start before the original initialized fields, not only the constructor body.
|
|
322
|
+
private readonly constructorTiming = constructorPreparation();
|
|
323
|
+
private readonly tileGhosts = new GhostWorlds();
|
|
324
|
+
private readonly neighbours: readonly GridCell[];
|
|
325
|
+
private readonly clientTiles: ClientTileRegistration;
|
|
326
|
+
private refreshCellCover: () => void = () => undefined;
|
|
327
|
+
private readonly costs = new Map<string, number>();
|
|
328
|
+
/** each neighbour cell's view root (its far proxy and ring tiles hang here) */
|
|
329
|
+
private readonly viewRoots = new Map<string, Group>();
|
|
330
|
+
/** each shardfile neighbour's declared far bytes, read at start: its far ring charge until the proxy loads (then `costs`) */
|
|
331
|
+
private readonly declaredFar = new Map<string, number>();
|
|
332
|
+
/** G107 / SF66: each shard's baked map, downscaled once and shared by all its copies. */
|
|
333
|
+
private readonly mapImages: CellMinimaps;
|
|
334
|
+
private readonly strips: CollisionStrip[];
|
|
335
|
+
private readonly initialStripBytes: number;
|
|
336
|
+
private outerStripBuild: ((scope: Scope) => Promise<readonly GeneratedStrip[]>) | undefined;
|
|
337
|
+
private publishOuterStrips: ((strips: readonly GeneratedStrip[]) => void) | undefined;
|
|
338
|
+
private outerStripsReady: Promise<void> | undefined;
|
|
339
|
+
private readonly host: GridSessionHost;
|
|
340
|
+
private initialHomeMetadata: Promise<void> | null = null;
|
|
341
|
+
private last: { x: number; z: number } | null = null;
|
|
342
|
+
private velocity = { x: 0, z: 0 };
|
|
343
|
+
private readonly frame: GridFrame | null;
|
|
344
|
+
private readonly walls: ReadinessWalls;
|
|
345
|
+
private live: LiveGridSession | null = null;
|
|
346
|
+
/** the road system's readouts: empty until its install (`create` runs it beside the next loading steps) lands */
|
|
347
|
+
private road: RoadLookState = { segments: 0, junctions: 0, roundabouts: 0, signs: 0, lights: 0, draws: 0 };
|
|
348
|
+
private seams: SeamLookState = { triangles: 0, draws: 0, buckets: {} };
|
|
349
|
+
private roadRoots: readonly Object3D[] = [];
|
|
350
|
+
/** whether the road install has landed (or failed: the reveal never waits on a road that cannot come) */
|
|
351
|
+
private roadSettled = false;
|
|
352
|
+
private roadLanding: Promise<void> = Promise.resolve();
|
|
353
|
+
/** loading-speed A1: builds the outer ring's road once (null: none to build, or started) */
|
|
354
|
+
private startOuterRoad: (() => void) | null = null;
|
|
355
|
+
private startOuterFar: (() => void) | null = null;
|
|
356
|
+
/** Initial visible fallbacks precede optional near/model decoding. Once ready,
|
|
357
|
+
* ordinary distance streaming and explicit crossings keep their own fences. */
|
|
358
|
+
private initialFarReady = false;
|
|
359
|
+
private readonly roadPlans: Map<Mesh, CullPlan>;
|
|
360
|
+
private roadTiles: RoadTileBacking | null = null;
|
|
361
|
+
private readonly roadBudget: { readonly view: () => RoadViewCost | null; readonly resident: () => RoadResident };
|
|
362
|
+
private readonly life: NeighbourLife;
|
|
363
|
+
/** Late frames the page loop has run; `stepRingsUntil` steps the rings only while it has not. */
|
|
364
|
+
private lateFrames = 0;
|
|
365
|
+
private readonly admitNeighbour: ((cell: GridCell, required?: boolean) => Promise<void>) | undefined;
|
|
366
|
+
private readonly admitNeighbourRender: ((cell: GridCell) => Promise<boolean>) | undefined;
|
|
367
|
+
/** G222 playtest #7: each neighbour's declared doors and gates, shown exactly when its region has them standing */
|
|
368
|
+
private readonly panels: NeighbourPanels;
|
|
369
|
+
private readonly softWalls: { readonly step: () => void; readonly state: () => SoftWallState };
|
|
370
|
+
/** G342 / G385: the near-placeholder tier, shipped for everyone: the four nearest cells draw their near view */
|
|
371
|
+
private readonly near: NearPlaceholders;
|
|
372
|
+
private readonly shimmer: { readonly step: () => void; readonly state: () => BorderShimmerState };
|
|
373
|
+
/** G167: why a neighbour's shard can't load (its product refused, with the admission's message) and its far view's status */
|
|
374
|
+
private readonly refusals = new Map<string, ShardRefusal>();
|
|
375
|
+
private readonly issues = new Map<string, string>();
|
|
376
|
+
private readonly farViews = new Set<string>();
|
|
377
|
+
private readonly farPreparation: () => readonly FarPreparationWait[];
|
|
378
|
+
/** each uploaded far view, for the readout's `drawn.far` (its mesh's own visibility) */
|
|
379
|
+
private readonly farMeshes = new Map<string, FarProxyView>();
|
|
380
|
+
private readonly farMissing = new Set<string>();
|
|
381
|
+
/** each slug's shown name */
|
|
382
|
+
private readonly names = new Map<string, string>();
|
|
383
|
+
/** G555: the one step-by-step loading screen over a cell entry or re-entry that waits */
|
|
384
|
+
private readonly cellLoading: CellLoading;
|
|
385
|
+
private cellLoadingPolled = 0;
|
|
386
|
+
/** when each cell's current wait began, so its screen counts only the hooks of this load */
|
|
387
|
+
private readonly loadingSince = new Map<string, number>();
|
|
388
|
+
|
|
389
|
+
/** Overlap only this page's actual initial-home metadata with remaining page setup. */
|
|
390
|
+
startInitialHomeMetadata(): void {
|
|
391
|
+
if (this.initialHomeMetadata !== null) return;
|
|
392
|
+
this.initialHomeMetadata = prepareHomeMetadata(this.host.scope, () =>
|
|
393
|
+
gridShardfileProduct(this.home.slug, { allocator: this.allocator, scope: this.host.scope }, 'metadata'));
|
|
394
|
+
}
|
|
395
|
+
/** Preserve the original Home failure barrier; construction is never started here. */
|
|
396
|
+
waitInitialHomeMetadata(): Promise<void> { return this.initialHomeMetadata ?? Promise.resolve(); }
|
|
397
|
+
|
|
398
|
+
/** Load every cell's edge rows (`loadGridEdgeProfiles` over the shards' own data, baked by the build: a grid entry read
|
|
399
|
+
* 20 products' index and edge section through the serial content cache, 3.5 s on Jake's phone), then build the session. */
|
|
400
|
+
static async create(host: GridSessionHost, progress?: StepProgress, initialHomeMetadata = false): Promise<GridSession> {
|
|
401
|
+
if (host.residency === undefined) throw new Error('Grid session requires the early page residency owner');
|
|
402
|
+
const timing = clientPreparationBatch('grid', 'assembly', ['setup', 'seam-source', 'edge-admission', 'compiled-page', 'worker-wait', 'road-start', 'collider-join', 'session', 'final-yield']);
|
|
403
|
+
const allocator = host.residency.allocator;
|
|
404
|
+
const assembly = new GridAssembly(gridMode(DEVSERVER)), empty = assembly.emptyNeighbour.edge;
|
|
405
|
+
const instance = pageGridInstance();
|
|
406
|
+
if (instance === null) throw new Error('A grid session needs a grid page');
|
|
407
|
+
const home = assembly.cell(instance);
|
|
408
|
+
const create = async (metadata?: Promise<void>): Promise<GridSession> => {
|
|
409
|
+
const reach = 1.5 * assembly.pitch + 1;
|
|
410
|
+
const ring = (x: number, z: number): boolean => Math.abs(x - home.origin.x) <= reach && Math.abs(z - home.origin.z) <= reach;
|
|
411
|
+
const layout = roadLayout(assembly, slug => findShard(slug)?.name ?? slug);
|
|
412
|
+
const grain = startRoadGrain(host.scope, allocator, instance);
|
|
413
|
+
let signs: ReturnType<typeof startRoadSigns>;
|
|
414
|
+
try {
|
|
415
|
+
signs = startRoadSigns(host.scope, allocator, instance, layout.signs.filter(sign => ring(sign.at.x, sign.at.z)));
|
|
416
|
+
timing?.mark('setup');
|
|
417
|
+
let prepared = 0;
|
|
418
|
+
progress?.set(0, 3, 'Grid seam data · 0 / 1 files');
|
|
419
|
+
const address = __GRID_SEAM_ASSET__, abort = new AbortController();
|
|
420
|
+
|
|
421
|
+
const forget = host.scope.capture('disposers', () => { abort.abort(); });
|
|
422
|
+
const data = await readGridSeamData(address, url => fetch(url, { signal: abort.signal })).finally(forget);
|
|
423
|
+
timing?.mark('seam-source');
|
|
424
|
+
if (host.scope.disposed) throw new Error('Grid session left during seam preparation');
|
|
425
|
+
const baked = new Map(data.edges), edgeCosts = data.edgeCosts;
|
|
426
|
+
progress?.set(0, 3, `Cell edges · 0 / ${assembly.cells.length}`);
|
|
427
|
+
const edges = await loadGridEdgeProfiles(assembly.cells, async (cell) => {
|
|
428
|
+
try {
|
|
429
|
+
const bakedEdge = baked.get(cell.slug), edge = bakedEdge ?? await readGridEdges(cell, { edges: slug => gridShardfileEdges(slug, { allocator, scope: host.scope }), fetch: url => fetch(url) });
|
|
430
|
+
const bytes = (bakedEdge === undefined ? undefined : edgeCosts?.get(cell.slug)) ?? jsonResidentBytes(edge);
|
|
431
|
+
const claim = allocator.reserve({ id: `product:grid:edge:${cell.instance}`, category: 'product', owner: cell.instance, bytes, distance: 0, needed: true });
|
|
432
|
+
if (claim === null) throw new Error('Grid edge metadata residency deferred');
|
|
433
|
+
host.scope.onDispose(claim.release); return edge;
|
|
434
|
+
} catch (error) {
|
|
435
|
+
console.warn(`[grid] ${cell.instance} edges stay at road level:`, error);
|
|
436
|
+
const closed = { entryWidth: 0 };
|
|
437
|
+
return { kind: 'declared', profiles: { north: empty, east: empty, south: empty, west: empty }, observations: { north: closed, east: closed, south: closed, west: closed } };
|
|
438
|
+
} finally {
|
|
439
|
+
prepared++; progress?.detail(`Cell edges · ${prepared} / ${assembly.cells.length}`);
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
timing?.mark('edge-admission');
|
|
443
|
+
if (host.scope.disposed) throw new Error('Grid session left during cell preparation');
|
|
444
|
+
// Loading has no game frames to wait for. Share the usual 30 ms loading budget across cheap generator batches;
|
|
445
|
+
// workSlice still observes the drawn-frame budget if this is called while the game is presenting.
|
|
446
|
+
const construction = workSlice(30, host.scope);
|
|
447
|
+
let batches = 0;
|
|
448
|
+
progress?.set(1, 3, 'Terrain seams · 0 batches');
|
|
449
|
+
const nativePlanReader = data.readPlans, inlinePlans = data.plans;
|
|
450
|
+
let nativePlans: Promise<Map<string, readonly number[][]>> | undefined;
|
|
451
|
+
const seamPlans = (): Promise<Map<string, readonly number[][]>> => {
|
|
452
|
+
nativePlans ??= (async () => {
|
|
453
|
+
if (nativePlanReader === undefined) return new Map(inlinePlans);
|
|
454
|
+
|
|
455
|
+
const abortPlans = new AbortController(), forgetPlans = host.scope.capture('disposers', () => { abortPlans.abort(); });
|
|
456
|
+
try {
|
|
457
|
+
const rows = await nativePlanReader(url => fetch(url, { signal: abortPlans.signal }));
|
|
458
|
+
if (host.scope.disposed || host.scope.disposing) throw new Error('Grid session left during native plan preparation');
|
|
459
|
+
return new Map(rows);
|
|
460
|
+
} finally { forgetPlans(); }
|
|
461
|
+
})();
|
|
462
|
+
return nativePlans;
|
|
463
|
+
};
|
|
464
|
+
const original = platformInputs(assembly, edges);
|
|
465
|
+
const compiled = await readCompiledGridStrips(address.geometry, original, instance, { scope: host.scope, allocator },
|
|
466
|
+
(url, signal) => fetch(url, { signal }), async () => {
|
|
467
|
+
progress?.detail(`Terrain seams · ${++batches} verified shapes`); await construction.check();
|
|
468
|
+
});
|
|
469
|
+
const fallbackPlans = compiled === null ? await seamPlans() : undefined;
|
|
470
|
+
let flatPlatform = false;
|
|
471
|
+
const preparedOuter = compiled?.readOuter;
|
|
472
|
+
const strips = [...(compiled?.strips ?? await platformStrips(assembly, edges, (platform, edge) => generatePlatformSliced(platform, edge, async () => {
|
|
473
|
+
progress?.detail(`Terrain seams · ${++batches} batches`); await construction.check();
|
|
474
|
+
}, 12, fallbackPlans, ring), () => {
|
|
475
|
+
if (host.scope.disposed || host.scope.disposing) throw new Error('Grid admission scope disposed');
|
|
476
|
+
flatPlatform = true;
|
|
477
|
+
}))];
|
|
478
|
+
timing?.mark('compiled-page');
|
|
479
|
+
if (grain !== undefined) await waitFor('Grid road grain', grain.ready, 'worker');
|
|
480
|
+
if (signs !== undefined) await waitFor('Grid road signs', signs.ready, 'worker');
|
|
481
|
+
timing?.mark('worker-wait');
|
|
482
|
+
if (host.scope.disposed || host.scope.disposing) throw new Error('Grid session left during seam preparation');
|
|
483
|
+
const roadScope = host.scope.child('grid-road-construction');
|
|
484
|
+
progress?.set(2, 3, `Road geometry · ${strips.length} initial seams`);
|
|
485
|
+
const admission = new PlatformRenderResidency(allocator, roadScope), plans = new Map<Mesh, CullPlan>();
|
|
486
|
+
const tileScope = roadScope.child('road-tiles');
|
|
487
|
+
const tileBacking = new (await import('./roadTileBacking')).RoadTileBacking(
|
|
488
|
+
tileScope, roadTileWriter(tileScope, caches, location.origin), { pitch: assembly.pitch, plans, camera: () => host.frame?.camera }, location.origin);
|
|
489
|
+
// Use the same source set for both halves if initial certification selected
|
|
490
|
+
// the existing flat fallback. Outer failures never substitute different edges.
|
|
491
|
+
const outerStrips = async (owner: Scope): Promise<readonly GeneratedStrip[]> => {
|
|
492
|
+
const source = platformInputs(assembly, flatPlatform ? undefined : edges);
|
|
493
|
+
const background = workSlice(OUTER_RING_SLICE_MS, owner);
|
|
494
|
+
const pause = async (): Promise<void> => {
|
|
495
|
+
if (owner.disposed || owner.disposing || host.scope.disposed || host.scope.disposing) throw new Error('Grid session left during outer seam preparation');
|
|
496
|
+
await background.check();
|
|
497
|
+
};
|
|
498
|
+
if (preparedOuter !== undefined) return preparedOuter(owner, pause);
|
|
499
|
+
const compiledOuter = await readCompiledGridStrips(address.geometry, source, instance, { scope: owner, allocator },
|
|
500
|
+
(url, signal) => fetch(url, { signal }), pause, 'outer');
|
|
501
|
+
return compiledOuter?.strips ?? generatePlatformSliced(source.cells, source.empty, pause, OUTER_RING_STRETCH_MS, await seamPlans(), (x, z) => !ring(x, z)); // T10: built in play after controls, short stretches beside the frame
|
|
502
|
+
};
|
|
503
|
+
const roadInput = { strips, home, pitch: assembly.pitch, layout, scene: host.scene,
|
|
504
|
+
scope: roadScope, camera: () => host.frame?.camera, plans, admission, tileBacking,
|
|
505
|
+
...(grain === undefined ? {} : { grain: grain.get }), ...(signs === undefined ? {} : { signs: signs.get }) };
|
|
506
|
+
const pause = async (): Promise<void> => { await construction.check(); };
|
|
507
|
+
// Spawn heap (T10): no closure here may capture `compiled`. Every closure of this scope shares one context, and the
|
|
508
|
+
// session's cleanups keep some of them, so a captured read kept its decoded strips and seam look (~14 MB at the
|
|
509
|
+
// Driftwood spawn, 10 MB of it look normals) for the page's life. The inner road gets the look and lets it go.
|
|
510
|
+
let seamChannels = compiled?.look;
|
|
511
|
+
const road = (async () => {
|
|
512
|
+
try { return await installPlatformRoadSliced({ ...roadInput, allocationKey: 'road.inner', within: ring,
|
|
513
|
+
...(seamChannels === undefined ? {} : { seamChannels }) }, pause); }
|
|
514
|
+
finally { signs?.release(); seamChannels = undefined; }
|
|
515
|
+
})();
|
|
516
|
+
const outer = async (): Promise<PlatformRoad> => {
|
|
517
|
+
let outerSigns: ReturnType<typeof startRoadSigns>;
|
|
518
|
+
try {
|
|
519
|
+
outerSigns = startRoadSigns(roadScope, allocator, instance, layout.signs.filter(sign => !ring(sign.at.x, sign.at.z)), 'outer');
|
|
520
|
+
if (outerSigns !== undefined) await waitFor('Grid outer road signs', outerSigns.ready, 'worker');
|
|
521
|
+
if (roadScope.disposed || roadScope.disposing) throw new Error('Grid session left during outer road preparation');
|
|
522
|
+
const outerSlice = workSlice(OUTER_RING_SLICE_MS, roadScope);
|
|
523
|
+
return await installPlatformRoadSliced({ ...roadInput, ...(outerSigns === undefined ? {} : { signs: outerSigns.get }),
|
|
524
|
+
allocationKey: 'road.outer', within: (x, z) => !ring(x, z), voidFloor: false }, async () => { await outerSlice.check(); }, { budgetMs: OUTER_RING_STRETCH_MS });
|
|
525
|
+
} finally { outerSigns?.release(); grain?.release(); strips.length = 0; } // Collision views retain positions/indices, never render-only colours.
|
|
526
|
+
};
|
|
527
|
+
road.catch(() => { grain?.release(); roadScope.dispose(); });
|
|
528
|
+
timing?.mark('road-start');
|
|
529
|
+
try {
|
|
530
|
+
await construction.yield();
|
|
531
|
+
// H4: Rapier's strip constructors must not accumulate into one loading task.
|
|
532
|
+
// Complete the exact same collision set before publishing the session.
|
|
533
|
+
for (const { mesh } of strips) {
|
|
534
|
+
if (host.scope.disposed || host.scope.disposing) throw new Error('Grid session left during collider preparation');
|
|
535
|
+
installStripCollider(host.physics, mesh, host.scope);
|
|
536
|
+
await construction.check();
|
|
537
|
+
}
|
|
538
|
+
if (host.scope.disposed || host.scope.disposing) throw new Error('Grid session left during collider preparation');
|
|
539
|
+
timing?.mark('collider-join');
|
|
540
|
+
const session = new GridSession(host, edges, allocator, strips, { road, outer, outerStrips, publishStrips: added => { strips.push(...added); }, plans, collidersInstalled: true });
|
|
541
|
+
session.initialHomeMetadata = metadata ?? null;
|
|
542
|
+
timing?.mark('session');
|
|
543
|
+
progress?.set(3, 3, `${assembly.cells.length} cells · ${strips.length} seams`);
|
|
544
|
+
await construction.yield();
|
|
545
|
+
timing?.mark('final-yield');
|
|
546
|
+
return session;
|
|
547
|
+
} catch (error) { roadScope.dispose(); throw error; }
|
|
548
|
+
} catch (error) { signs?.release(); grain?.release(); throw error; }
|
|
549
|
+
finally { timing?.finish(); }
|
|
550
|
+
};
|
|
551
|
+
const completed = await (initialHomeMetadata ? withInitialHomeMetadata(host.scope,
|
|
552
|
+
() => gridShardfileProduct(home.slug, { allocator, scope: host.scope }, 'metadata'), create) : create());
|
|
553
|
+
return completed;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
constructor(host: GridSessionHost, edges?: readonly PlatformCell[], allocator?: ResidencyAllocator, prebuilt?: readonly GeneratedStrip[], preparedRoad?: { readonly road: PlatformRoad | Promise<PlatformRoad>; readonly outer?: () => Promise<PlatformRoad>; readonly outerStrips?: (scope: Scope) => Promise<readonly GeneratedStrip[]>; readonly publishStrips?: (strips: readonly GeneratedStrip[]) => void; readonly plans: Map<Mesh, CullPlan>; readonly collidersInstalled?: true }) {
|
|
557
|
+
this.constructorTiming?.('fields');
|
|
558
|
+
this.host = host;
|
|
559
|
+
this.roadPlans = preparedRoad?.plans ?? new Map<Mesh, CullPlan>();
|
|
560
|
+
// before the page's first render: the lights a region's own pool shows through (regionalWorld `mirrorInto`)
|
|
561
|
+
if (isScene(host.scene)) {
|
|
562
|
+
LightPool.for(host.scene).reserve(GRID_REGION_POINT_LIGHTS);
|
|
563
|
+
// T7 / T10: the home population's projection light (game/population/projection.ts) asks after the first render;
|
|
564
|
+
// growing the sealed pool then moved the count 5 -> 6 and rebuilt every lit program the boot had built (the 63
|
|
565
|
+
// unused 5-light programs of a Driftwood visit, linked again after control)
|
|
566
|
+
LightPool.for(host.scene).spare(GRID_HOME_SPARE_POINT_LIGHTS);
|
|
567
|
+
}
|
|
568
|
+
this.constructorTiming?.('lights');
|
|
569
|
+
const mapReads = new AbortController(); host.scope.onDispose(() => { mapReads.abort(); });
|
|
570
|
+
this.mapImages = new CellMinimaps(host.scope, async slug => {
|
|
571
|
+
const owner = { allocator: this.allocator, scope: host.scope };
|
|
572
|
+
const metadata = await gridShardfileProduct(slug, owner, 'optional-metadata');
|
|
573
|
+
if (metadata === null) return undefined;
|
|
574
|
+
try {
|
|
575
|
+
const map = metadata.admitted.source.map; if (map === undefined) return undefined;
|
|
576
|
+
const product = await gridShardfileProduct(slug, owner, { signal: mapReads.signal, files: [map.image] });
|
|
577
|
+
if (product === null) return undefined;
|
|
578
|
+
try { return leaseMapImage(product.admitted.source, product.admitted.assets, this.allocator, host.scope, true); }
|
|
579
|
+
finally { try { await product.releaseInputs(); } finally { product.release(); } }
|
|
580
|
+
} finally { metadata.release(); }
|
|
581
|
+
}, identity => { const { slug: homeIdentity } = this.home; return identity === homeIdentity; },
|
|
582
|
+
{ revision: () => this.allocator.revision, deferred: error => error instanceof ApproachInputsDeferredError });
|
|
583
|
+
const residency = host.residency;
|
|
584
|
+
if (residency === undefined) throw new Error('Grid session requires the early page residency owner');
|
|
585
|
+
if (allocator !== undefined && allocator !== residency.allocator) throw new Error('Grid session must share the page allocator');
|
|
586
|
+
this.allocator = residency.allocator;
|
|
587
|
+
const instance = pageGridInstance();
|
|
588
|
+
this.assembly = new GridAssembly(gridMode(DEVSERVER));
|
|
589
|
+
if (instance === null) throw new Error('A grid session needs a grid page');
|
|
590
|
+
this.home = this.assembly.cell(instance);
|
|
591
|
+
const home = this.home;
|
|
592
|
+
// the root world is neutral highway physics and the home an owned region like every cell, so every cell is a neighbour
|
|
593
|
+
this.neighbours = [...this.assembly.cells];
|
|
594
|
+
const initialRing = new Set(this.neighbours.filter(cell => Math.abs(cell.cell[0] - home.cell[0]) <= 1
|
|
595
|
+
&& Math.abs(cell.cell[1] - home.cell[1]) <= 1).map(cell => cell.instance));
|
|
596
|
+
const backgroundReady = (): boolean => host.backgroundReady?.() !== false;
|
|
597
|
+
// ringsReady: the far ring charges each proxy its declared bytes before it loads, not the 1.6 MB cap, so placeholder
|
|
598
|
+
// charges never leave a visible cell out of the ring (12 visible proxies of 0.4-1.6 MB fit its 14.4 MB)
|
|
599
|
+
const declare = async (cell: GridCell): Promise<void> => {
|
|
600
|
+
try { const bytes = await gridShardfileFarBytes(cell.slug); if (bytes !== null) this.declaredFar.set(cell.instance, bytes); }
|
|
601
|
+
catch { /* the proxy's own load charges it */ }
|
|
602
|
+
};
|
|
603
|
+
for (const cell of this.neighbours) if (backgroundReady() || initialRing.has(cell.instance)) void declare(cell);
|
|
604
|
+
if (!backgroundReady()) this.startOuterFar = () => {
|
|
605
|
+
for (const cell of this.neighbours) if (!initialRing.has(cell.instance)) void declare(cell);
|
|
606
|
+
};
|
|
607
|
+
for (const cell of this.assembly.cells) { const manifest = findShard(cell.slug); this.names.set(cell.slug, manifest?.name ?? cell.slug); }
|
|
608
|
+
this.constructorTiming?.('home');
|
|
609
|
+
// the deck: one generator run (`create` runs it sliced and hands it over), one draw, the same vertices as the platform colliders
|
|
610
|
+
const strips = prebuilt ?? platformStripsNow(this.assembly, edges);
|
|
611
|
+
// SF19a / G158 (on for everyone since Jake's G175 pick, E450): the shard the player stands in owns the whole frame, the
|
|
612
|
+
// road look owns the road, blended over 16 m at the cell edge; a host with no camera / composer builds none
|
|
613
|
+
const frameHost = host.frame;
|
|
614
|
+
this.frame = frameHost !== undefined ? new GridFrame({ host: frameHost, scope: host.scope, home, homeIsFrame: false, half: CHUNK_HALF, feet: () => this.world(),
|
|
615
|
+
cells: this.assembly.cells.map((cell) => ({ instance: cell.instance, origin: { x: cell.origin.x, z: cell.origin.z } })) }) : null;
|
|
616
|
+
const frame = this.frame;
|
|
617
|
+
this.constructorTiming?.('frame');
|
|
618
|
+
// SF17b look: the boulevard over the deck's road band (G80 / G81 / G93) and the VR void past the outer road (G89)
|
|
619
|
+
const layout = roadLayout(this.assembly, (slug) => findShard(slug)?.name ?? slug);
|
|
620
|
+
// G112: every grid admits exact CPU/GPU byte plans on its early home/region/ring allocator.
|
|
621
|
+
const admission = new PlatformRenderResidency(this.allocator, host.scope);
|
|
622
|
+
// the road system: `create`'s install as it lands (its frame hooks keep their latest values for it), else built now
|
|
623
|
+
let platformRoad: PlatformRoad | null = null, horizon: number | undefined, weight: number | undefined;
|
|
624
|
+
const take = (road: PlatformRoad, final = false): void => {
|
|
625
|
+
platformRoad = platformRoad === null ? road : combinePlatformRoads(platformRoad, road);
|
|
626
|
+
this.road = platformRoad.road; this.seams = platformRoad.seams; this.roadRoots = platformRoad.roots; this.roadSettled = true;
|
|
627
|
+
if (horizon !== undefined) road.horizon(horizon);
|
|
628
|
+
if (weight !== undefined) road.overlayLight(weight);
|
|
629
|
+
this.roadTiles = platformRoad.tileBacking ?? null;
|
|
630
|
+
if (this.roadTiles !== null && !this.roadTiles.started() && (final || preparedRoad?.outer === undefined)) {
|
|
631
|
+
this.roadTiles.start(home.origin, layout, this.allocator, home.instance);
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
// A1: the outer ring's road, started by `step` once play has begun and the inner ring has landed
|
|
635
|
+
const outer = preparedRoad?.outer;
|
|
636
|
+
if (outer !== undefined) this.startOuterRoad = () => {
|
|
637
|
+
const landOuter = async (): Promise<void> => {
|
|
638
|
+
const timing = clientPreparationBatch('grid', 'outer-ring', ['strips', 'road']);
|
|
639
|
+
try { await this.prepareOuterStrips(); timing?.mark('strips'); const road = await outer(); timing?.mark('road'); if (!host.scope.disposed) take(road, true); }
|
|
640
|
+
catch (error: unknown) {
|
|
641
|
+
this.issues.set('road.outer', error instanceof Error ? error.message : String(error));
|
|
642
|
+
console.warn('[grid] the outer road did not install:', error);
|
|
643
|
+
} finally { timing?.finish(); }
|
|
644
|
+
};
|
|
645
|
+
void landOuter();
|
|
646
|
+
};
|
|
647
|
+
const given = preparedRoad?.road;
|
|
648
|
+
if (given instanceof Promise) {
|
|
649
|
+
const landing = async (): Promise<void> => {
|
|
650
|
+
try { const road = await given; if (!host.scope.disposed) take(road); }
|
|
651
|
+
catch (error: unknown) {
|
|
652
|
+
this.roadSettled = true; this.issues.set('road', error instanceof Error ? error.message : String(error));
|
|
653
|
+
console.warn('[grid] the road system did not install:', error);
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
this.roadLanding = landing();
|
|
657
|
+
} else take(given ?? installPlatformRoad({ strips, home, pitch: this.assembly.pitch, layout,
|
|
658
|
+
scene: host.scene, scope: host.scope, camera: () => host.frame?.camera, plans: this.roadPlans, admission }));
|
|
659
|
+
this.strips = [...collisionStrips(strips)];
|
|
660
|
+
this.initialStripBytes = this.strips.reduce((bytes, strip) => bytes + strip.mesh.positions.byteLength + strip.mesh.indices.byteLength, 0);
|
|
661
|
+
this.outerStripBuild = preparedRoad?.outerStrips;
|
|
662
|
+
this.publishOuterStrips = preparedRoad?.publishStrips;
|
|
663
|
+
// G321: inside a cell whose shard draws its own sky, its backdrop owns the horizon: the road's void floor fades by it
|
|
664
|
+
if (frame !== null) host.scope.onDispose(frame.horizon(owned => { horizon = owned; platformRoad?.horizon(owned); }));
|
|
665
|
+
// G103: the asphalt forced 15 m into each cell keeps the road's light under that cell's own (the road's frame weight)
|
|
666
|
+
if (frame !== null) host.scope.onDispose(frame.stack(null, { weight: roadWeight => { weight = roadWeight; platformRoad?.overlayLight(roadWeight); } }));
|
|
667
|
+
// G588: what stands outside that cell (the road's far reaches, the neighbours' near and far views, haze bands and ring
|
|
668
|
+
// tiles) stays drawn from inside it: the neighbours are the grid's horizon (G321 part 4's fade beyond the cell is gone)
|
|
669
|
+
// SF17b's per-view road budget (§3.2, G101): what the view camera draws of the road system, and what stays resident
|
|
670
|
+
this.roadBudget = { view: () => { const camera = host.frame?.camera; return camera === undefined ? null : roadViewCost(this.roadRoots, camera, this.roadPlans); }, resident: () => roadResident(this.roadRoots, this.roadPlans) };
|
|
671
|
+
// G85: a closed neighbour edge shows as a cyan hex shimmer
|
|
672
|
+
this.constructorTiming?.('road');
|
|
673
|
+
this.softWalls = installSoftWallLook({ scene: host.scene, scope: host.scope, time: () => app.clock.now,
|
|
674
|
+
edges: this.neighbours.flatMap((cell) => neighbourEdges(cell, home).map((edge) => {
|
|
675
|
+
const look = { instance: cell.instance, x: edge.x, z: edge.z, axis: edge.axis, halfLength: edge.halfLength };
|
|
676
|
+
return cell.edgeLook === undefined ? look : Object.assign(look, { height: cell.edgeLook.height });
|
|
677
|
+
})),
|
|
678
|
+
ports: { closed: (id) => this.live === null || !this.live.live.ready(id) } });
|
|
679
|
+
// G578: a waiting cell's loading steps on an in-world screen at the edge the traveller faces; the world stays live
|
|
680
|
+
const screen = new CellScreen(host.scene, host.scope);
|
|
681
|
+
this.cellLoading = new CellLoading(screen, (waiting) => {
|
|
682
|
+
const cell = this.neighbours.find(row => row.instance === waiting); if (cell === undefined) return null;
|
|
683
|
+
const centre = { x: cell.origin.x - home.origin.x, z: cell.origin.z - home.origin.z }, world = this.world();
|
|
684
|
+
const edge = facingEdge(neighbourEdges(cell, home), centre, world.x - cell.origin.x, world.z - cell.origin.z);
|
|
685
|
+
return edge === undefined ? null : { edge: { instance: waiting, x: edge.x, z: edge.z, axis: edge.axis, halfLength: edge.halfLength }, cell: centre, ground: edge.floor };
|
|
686
|
+
});
|
|
687
|
+
setParkedMatricesFrozen(true); // G580 T2: a hidden parked world skips matrix updates during its warm-up
|
|
688
|
+
host.scope.onDispose(() => { this.cellLoading.close(); if (host.heldFrame !== undefined) host.heldFrame.enabled = false; setWarmUpHeld(false); setParkedMatricesFrozen(false); setBuildHeldTimed(false); });
|
|
689
|
+
// G78: a shimmer line at every shard border on its real ground; G119: SAVING… / SAVE FAILED, RETRY while a crossing waits
|
|
690
|
+
const rows = new Map((edges ?? []).map((cell) => [cell.instance, cell.edges]));
|
|
691
|
+
let status: CrossingSaveStatus = null, polled = 0;
|
|
692
|
+
this.shimmer = installBorderShimmer({ scene: host.scene, scope: host.scope, time: () => app.clock.now,
|
|
693
|
+
cells: this.assembly.cells.map((cell) => ({ x: cell.origin.x - home.origin.x, z: cell.origin.z - home.origin.z, edges: rows.get(cell.instance) ?? null })),
|
|
694
|
+
ports: { feet: () => { const at = this.world(); return { x: at.x - home.origin.x, z: at.z - home.origin.z }; },
|
|
695
|
+
status: () => { if (++polled % 4 === 0) status = crossingSaveStatus(this.live?.state().crossing); return status; },
|
|
696
|
+
text: (shown) => (shown === 'saving' ? GAME_STRINGS.grid.saving : GAME_STRINGS.grid.saveFailed) } });
|
|
697
|
+
this.constructorTiming?.('presentation');
|
|
698
|
+
const nativeOrigin = { origin: { x: 0, z: 0 } };
|
|
699
|
+
if (preparedRoad?.collidersInstalled !== true) for (const { mesh } of this.strips) installStripCollider(host.physics, mesh, host.scope);
|
|
700
|
+
// The normal world stage owns the home's sockets; this scope adds only rebased neighbours.
|
|
701
|
+
installEntrySockets(host.physics, host.scope, this.neighbours.map((cell) => ({ x: cell.origin.x - nativeOrigin.origin.x, z: cell.origin.z - nativeOrigin.origin.z })));
|
|
702
|
+
this.walls = new ReadinessWalls(host.physics, [...this.neighbours.flatMap((cell) => neighbourEdges(cell, nativeOrigin)), ...rimEdges(this.assembly, nativeOrigin)], host.scope);
|
|
703
|
+
// a cell's PMREM of a new cube height fading in (drawnEnvironment.ts): the road's views take its variants before it lights
|
|
704
|
+
// them (G639 desktop: Pine's 1024 and Nalati's 512 ring / road variants linked on the first road frame beside each)
|
|
705
|
+
host.scope.onDispose(onPageEnvironment(() => { this.prelinkViews(); }));
|
|
706
|
+
// G72, one landmass: the home level's open water stays inside its own cell (its sea surface and its swell body)
|
|
707
|
+
waterExtent.uWaterHalf.value = CHUNK_HALF;
|
|
708
|
+
host.scope.onDispose(() => { waterExtent.uWaterHalf.value = WATER_UNBOUNDED; });
|
|
709
|
+
// neighbours: the far ring through the one allocator; each cell's root sits at its render origin
|
|
710
|
+
this.constructorTiming?.('physics');
|
|
711
|
+
const roots = this.viewRoots;
|
|
712
|
+
for (const cell of this.neighbours) {
|
|
713
|
+
// G164: a shard whose whole world is shifted vertically at runtime (its terrain field's `datum`, Driftwood's hybrid row)
|
|
714
|
+
// shows its baked far proxy shifted by the same amount, as its own bake installs; absent, the root sits at road height
|
|
715
|
+
const root = new Group(); root.name = `grid-cell:${cell.instance}`; root.position.set(cell.origin.x - home.origin.x, findShard(cell.slug)?.ground.terrain?.datum ?? 0, cell.origin.z - home.origin.z);
|
|
716
|
+
const prepareView = host.prepareView;
|
|
717
|
+
const containment = cellClip(root, CHUNK_HALF, host.scope, prepareView === undefined ? {} : { prepare: (node) => prepareView(node, () => !host.scope.disposed && node.parent !== null) });
|
|
718
|
+
containment.sweep();
|
|
719
|
+
root.updateMatrixWorld(); host.scene.add(root); roots.set(cell.instance, root);
|
|
720
|
+
// playtest 1: a shared product's copy wears its own number panels (copyIdentity.ts)
|
|
721
|
+
const marks = copyMarks(cell.instance, cell.identity);
|
|
722
|
+
if (marks !== null) { root.add(marks.object); marks.object.updateMatrixWorld(true); host.scope.onDispose(marks.dispose); }
|
|
723
|
+
}
|
|
724
|
+
this.constructorTiming?.('roots');
|
|
725
|
+
// G223: an entered regional runtime draws its own cell; its coarse root (far proxy, tiles) hides until it leaves, once
|
|
726
|
+
// its coarse replacement is ready (H3.2). A world outside the tile registration keeps its root (Pine's ground is those
|
|
727
|
+
// tiles, D189) unless its manifest says it draws its whole ground itself (`cellGround: 'world'`: Nalati, G784)
|
|
728
|
+
const cover = cellCoverPort(id => roots.get(id), id => this.clientTiles.coverageReady?.(id) ?? true);
|
|
729
|
+
this.refreshCellCover = cover.refresh;
|
|
730
|
+
host.scope.onDispose(bindCellCover(host.scene, cover));
|
|
731
|
+
const preparedBands = new WeakMap<FarProxyView, Object3D>();
|
|
732
|
+
// G630: a shard's haze band stands in the strip outside its cell (BAND_OUTSET), so it hangs on a holder of its own beside
|
|
733
|
+
// the cell root: under the root, the G550 containment fence discarded every fragment past the cell edge, the whole band
|
|
734
|
+
// (Sunscar's orange dusk wall drew nothing). The holder follows the root's visibility (hidden while the cell is entered,
|
|
735
|
+
// G223) in the late step below.
|
|
736
|
+
const bandHolders = new Map<Object3D, Group>();
|
|
737
|
+
const bandHolder = (root: Object3D): Group => {
|
|
738
|
+
const held = bandHolders.get(root); if (held !== undefined) return held;
|
|
739
|
+
const holder = new Group(); holder.name = `grid-band:${root.name}`; holder.position.copy(root.position); holder.updateMatrixWorld();
|
|
740
|
+
host.scene.add(holder); bandHolders.set(root, holder);
|
|
741
|
+
host.scope.onDispose(() => { holder.removeFromParent(); });
|
|
742
|
+
return holder;
|
|
743
|
+
};
|
|
744
|
+
const far = farRingPorts({
|
|
745
|
+
...(host.prepareView === undefined ? {} : { prepare: async (view: FarProxyView, data: FarPrepared) => {
|
|
746
|
+
const root = view.mesh.parent;
|
|
747
|
+
if (root === null) throw new Error('Far view left before preparation');
|
|
748
|
+
if (frame !== null && data.look.band !== undefined) {
|
|
749
|
+
const holder = bandHolder(root), unband = installHazeBand(holder, data.look.band, CHUNK_HALF), dispose = view.dispose;
|
|
750
|
+
view.dispose = () => { unband(); dispose(); };
|
|
751
|
+
const haze = holder.getObjectByName('haze-band');
|
|
752
|
+
if (haze === undefined) throw new Error('Far haze band was not installed');
|
|
753
|
+
haze.visible = false; preparedBands.set(view, haze);
|
|
754
|
+
await host.prepareView?.(holder, () => !host.scope.disposed && haze.parent === holder);
|
|
755
|
+
}
|
|
756
|
+
await host.prepareView?.(root, () => !host.scope.disposed && view.mesh.parent === root);
|
|
757
|
+
if (view.mesh.parent === root) host.keepViewPrograms?.(view.mesh);
|
|
758
|
+
} }),
|
|
759
|
+
root: (id) => { const root = roots.get(id); if (root === undefined) throw new Error(`No grid cell root ${id}`); return root; },
|
|
760
|
+
load: async (id) => {
|
|
761
|
+
let loaded: Awaited<ReturnType<typeof loadFar>>;
|
|
762
|
+
try { loaded = await loadFar(this.assembly.cell(id).slug); } catch (error) { this.farMissing.add(id); throw error; } // G167: no far view, A's fallback
|
|
763
|
+
this.farMissing.delete(id);
|
|
764
|
+
const { prepared, bytes } = loaded; this.costs.set(id, bytes); frame?.declare(id, prepared.look);
|
|
765
|
+
return prepared;
|
|
766
|
+
},
|
|
767
|
+
});
|
|
768
|
+
this.farPreparation = far.waiting;
|
|
769
|
+
const framedPorts = frame === null ? far : { ...far, upload: (tile: { instance: string }, data: FarPrepared) => {
|
|
770
|
+
const band = data.look.band, view = far.upload(tile, data), dispose = view.dispose;
|
|
771
|
+
// SF19b (G94 / G95): a shard that declares a band shows its mood at its border from the road; inside its cell it owns the frame (G158)
|
|
772
|
+
const prepared = preparedBands.get(view);
|
|
773
|
+
const root = roots.get(tile.instance), unband = prepared !== undefined || band === undefined || root === undefined ? () => undefined : installHazeBand(bandHolder(root), band, CHUNK_HALF);
|
|
774
|
+
if (prepared !== undefined) prepared.visible = true;
|
|
775
|
+
view.dispose = () => { unband(); dispose(); };
|
|
776
|
+
return view;
|
|
777
|
+
} };
|
|
778
|
+
// the drawn far views, for the cell screen's far-view row; G342: each one's mask is mirrored onto its near view
|
|
779
|
+
const drawnFar = new Map<string, { view: FarProxyView; excluded: ReadonlySet<number> }>();
|
|
780
|
+
// G607 (Jake's round-36 D): every neighbour draws its near view, whatever its distance; round 39: the phone tier only
|
|
781
|
+
// its nearest PHONE_NEAR_CELLS (the rest on their far proxies, still unhazed)
|
|
782
|
+
const near = new NearPlaceholders({
|
|
783
|
+
allocator: this.allocator, cells: this.assembly.cells, pitch: this.assembly.pitch, root: (id) => roots.get(id),
|
|
784
|
+
readyToRefine: () => this.initialFarReady,
|
|
785
|
+
...(TIER === 'phone' ? { limit: PHONE_NEAR_CELLS } : {}),
|
|
786
|
+
load: (id) => loadNear(this.assembly.cell(id).slug),
|
|
787
|
+
cover: (id, covered) => { const drawn = drawnFar.get(id); if (drawn !== undefined) drawn.view.mesh.visible = !covered && drawn.excluded.size < 16; },
|
|
788
|
+
mask: (id) => drawnFar.get(id)?.excluded ?? new Set<number>(),
|
|
789
|
+
...(host.prepareView === undefined ? {} : { prepare: async (view: FarProxyView, current: () => boolean) => {
|
|
790
|
+
await host.prepareView?.(view.mesh, current);
|
|
791
|
+
if (current()) host.keepViewPrograms?.(view.mesh);
|
|
792
|
+
} }) });
|
|
793
|
+
this.near = near;
|
|
794
|
+
host.scope.onDispose(() => { near.dispose(); });
|
|
795
|
+
const farPorts = { ...framedPorts, upload: (tile: RingTile, data: FarPrepared) => {
|
|
796
|
+
const view: FarProxyView = framedPorts.upload(tile, data), dispose = view.dispose;
|
|
797
|
+
let retired = false;
|
|
798
|
+
this.farViews.add(tile.instance); this.farMeshes.set(tile.instance, view);
|
|
799
|
+
view.dispose = () => {
|
|
800
|
+
this.farViews.delete(tile.instance); if (this.farMeshes.get(tile.instance) === view) this.farMeshes.delete(tile.instance);
|
|
801
|
+
try { dispose(); }
|
|
802
|
+
finally { if (!retired) { retired = true; this.tileGhosts.retired(tile.key, [view.mesh]); } }
|
|
803
|
+
};
|
|
804
|
+
const id = tile.instance, entry = { view, excluded: new Set<number>() as ReadonlySet<number> }, mask = view.mask, gone = view.dispose;
|
|
805
|
+
drawnFar.set(id, entry);
|
|
806
|
+
view.mask = (excluded) => { entry.excluded = excluded; mask(excluded); if (near.shows(id)) view.mesh.visible = false; near.remask(id); };
|
|
807
|
+
view.dispose = () => { if (drawnFar.get(id) === entry) drawnFar.delete(id); gone(); };
|
|
808
|
+
if (near.shows(id)) view.mesh.visible = false;
|
|
809
|
+
return view;
|
|
810
|
+
} };
|
|
811
|
+
// SF25 / G66: frozen neighbours look alive (presentation-only client scripts; their sims never step here)
|
|
812
|
+
this.life = new NeighbourLife({ scope: host.scope, simulation: (id) => this.live?.lifeRegion(id), active: (id) => (this.live === null ? this.home.instance : this.live.live.current()) === id });
|
|
813
|
+
// one late system for the grid (the page's onLate takes one label): the alive neighbours, then the one frame's weights
|
|
814
|
+
const prepareView = host.prepareView;
|
|
815
|
+
this.panels = new NeighbourPanels({ scope: host.scope, region: (id) => this.live?.panelRegion(id), ...(prepareView === undefined ? {} : { prepare: prepareView }) });
|
|
816
|
+
// G539: each drawn far view's band (proxy, impostor or the dithered fade between) by the camera's distance to its cell
|
|
817
|
+
const eye = new Vector3();
|
|
818
|
+
const bands = (): void => {
|
|
819
|
+
const camera = host.frame?.camera; if (camera === undefined) return;
|
|
820
|
+
camera.getWorldPosition(eye);
|
|
821
|
+
for (const [id, { view }] of drawnFar) {
|
|
822
|
+
const root = roots.get(id); if (root === undefined || view.band === undefined) continue;
|
|
823
|
+
view.band(farBandShare(Math.hypot(Math.max(0, Math.abs(eye.x - root.position.x) - CHUNK_HALF), Math.max(0, Math.abs(eye.z - root.position.z) - CHUNK_HALF))));
|
|
824
|
+
}
|
|
825
|
+
for (const [root, holder] of bandHolders) holder.visible = root.visible;
|
|
826
|
+
};
|
|
827
|
+
// the one late system (play.ts binds every onLate to game.grid.frame): the ring tiles' static-matrix checks run in it too
|
|
828
|
+
let ringStep: (() => void) | undefined;
|
|
829
|
+
host.frame?.onLate((dt) => { this.lateFrames++; this.viewStep(); this.life.late(dt); this.panels.late(); bands(); frame?.frame(); ringStep?.(); });
|
|
830
|
+
const tiles = neighbourTiles(host.scope, async (tile) => { await host.prepareTile?.(tile); },
|
|
831
|
+
(tile, retiredRoots) => { this.tileGhosts.retired(tile.key, retiredRoots); }, host.frame === undefined ? undefined : step => { ringStep = step; }),
|
|
832
|
+
tileCost = clientRingCatalogue(tiles.instances);
|
|
833
|
+
// G342 round 3: a cell whose near view draws and carries its own world owns it whole (its dense
|
|
834
|
+
// ground over the cell), so the rings stop refining it to its own L1 / L0 tiles, which would mask the near view near
|
|
835
|
+
// the road (round 3's first A = B); a terrain-only near view (the template, its world in its tiles) keeps them; a cell
|
|
836
|
+
// with no near view keeps its far proxy until entered (only the entered world lights its tiles)
|
|
837
|
+
const farCosts = new Map<string, number>(), blocked = new Map<string, boolean>();
|
|
838
|
+
let catalogueRevision = 0, tileRevision = -1, backgroundWasReady = backgroundReady();
|
|
839
|
+
const catalogue = Object.assign((id: string, level: RingTile['level'], x: number, z: number): number | null => {
|
|
840
|
+
if (!backgroundReady() && !initialRing.has(id)) return null;
|
|
841
|
+
return level === 'far' ? this.costs.get(id) ?? this.declaredFar.get(id) ?? 1_600_000
|
|
842
|
+
: this.placeholderBlocksTiles(id) ? null : tileCost(id, level, x, z);
|
|
843
|
+
}, {
|
|
844
|
+
revision: (): number => {
|
|
845
|
+
const background = backgroundReady();
|
|
846
|
+
if (background !== backgroundWasReady) { backgroundWasReady = background; catalogueRevision++; }
|
|
847
|
+
const current = tileCost.revision?.() ?? -1;
|
|
848
|
+
if (current !== tileRevision) { tileRevision = current; catalogueRevision++; }
|
|
849
|
+
for (const cell of this.neighbours) {
|
|
850
|
+
const bytes = this.costs.get(cell.instance) ?? this.declaredFar.get(cell.instance) ?? 1_600_000;
|
|
851
|
+
const hidden = this.placeholderBlocksTiles(cell.instance);
|
|
852
|
+
if (farCosts.get(cell.instance) !== bytes || blocked.get(cell.instance) !== hidden) {
|
|
853
|
+
farCosts.set(cell.instance, bytes); blocked.set(cell.instance, hidden); catalogueRevision++;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
return catalogueRevision;
|
|
857
|
+
},
|
|
858
|
+
});
|
|
859
|
+
this.rings = new TileStreamer(this.neighbours, this.allocator, catalogue,
|
|
860
|
+
levelPorts<FarPrepared, PreparedRingTile>(farPorts, tiles.ports), { farRadius: FAR_RING.reach, uploadsPerFrame: 1, uploadBytesPerFrame: 4_000_000 });
|
|
861
|
+
this.clientTiles = clientTileRegistration(tiles.instances, this.rings, tileRing, id => this.farMeshes.has(id));
|
|
862
|
+
const neighbourAdmission = host.renderer === undefined ? undefined : this.tileAdmission(host.renderer, roots);
|
|
863
|
+
this.admitNeighbour = neighbourAdmission?.complete;
|
|
864
|
+
this.admitNeighbourRender = neighbourAdmission?.render;
|
|
865
|
+
host.scope.onDispose(() => {
|
|
866
|
+
this.clientTiles.dispose(); this.rings.dispose();
|
|
867
|
+
for (const root of roots.values()) root.removeFromParent();
|
|
868
|
+
});
|
|
869
|
+
// O15: with a drawn frame, what only draws (rings, screens, shimmer, near view) steps once a frame in the late
|
|
870
|
+
// system above, not on every 60 Hz fixed step: at the phone's 30 fps cap the second step of each frame redid it
|
|
871
|
+
// (rings.step's tile choice and its per-frame upload budget twice a frame, on Driftwood's road entry ~1.6k Simulator
|
|
872
|
+
// samples); headless hosts keep it in the fixed step
|
|
873
|
+
host.onFixed((dt) => { this.step(dt, host.frame === undefined); this.life.fixed(); });
|
|
874
|
+
// read at call time: a desktop images-first home settles its claim's bytes at the handoff (GC21 row 53)
|
|
875
|
+
const homeClaim = residency.home(), homeResidency = (): { instance: string; bytes: number } => ({ instance: homeClaim.instance, bytes: homeClaim.bytes });
|
|
876
|
+
host.scope.onDispose(app.debug.scopedExpose('grid', { state: () => this.state(), roadView: () => this.roadBudget.view(), roadResident: () => this.roadBudget.resident(),
|
|
877
|
+
roadTileResidency: () => this.roadTiles?.state() ?? null,
|
|
878
|
+
// G144 admission receipts read the same allocator, without reserving or changing any claim.
|
|
879
|
+
residency: () => ({ cost: this.allocator.cost(), claims: this.allocator.entries(), home: homeResidency() }),
|
|
880
|
+
// Per-frame travel needs the same fresh live/crossing facts, without the
|
|
881
|
+
// full debug view's cells, ring accounting, skies, grades and post rows.
|
|
882
|
+
travelState: (): { inside: string | null; live: ReturnType<LiveGridSession['travelState']> | null } => ({
|
|
883
|
+
inside: gridCells.cell?.instance ?? null, live: this.live?.travelState() ?? null,
|
|
884
|
+
}),
|
|
885
|
+
// the live cell alone, for a sampler that must not build the whole readout four times a second (state() allocates it)
|
|
886
|
+
current: () => (this.live === null ? null : this.live.live.current()),
|
|
887
|
+
}));
|
|
888
|
+
this.constructorTiming?.('streaming');
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* The shardfile neighbours' ground through their own ring tiles (SF18b's `clientRingPorts`): one admitted product, asset
|
|
893
|
+
* reader, material set and view set per slug (the template copies share them), each cell its own root. A neighbour that
|
|
894
|
+
* fails to admit keeps its far proxy.
|
|
895
|
+
*/
|
|
896
|
+
private tileAdmission(renderer: Renderer, roots: ReadonlyMap<string, Group>): {
|
|
897
|
+
complete: (cell: GridCell, required?: boolean) => Promise<void>; render: (cell: GridCell) => Promise<boolean>;
|
|
898
|
+
} {
|
|
899
|
+
const scope = this.host.scope, skins = new Map<string, Promise<ReadonlyMap<string, ClientSkin>>>();
|
|
900
|
+
const shared = new Map<string, Promise<{ source: ClientRingInstance['source']; assets: ClientAssets; views: ClientTileViews; compile: (entry: unknown) => Material }>>();
|
|
901
|
+
const optional = new AbortController(); scope.onDispose(() => { optional.abort(); });
|
|
902
|
+
const admit = async (cell: GridCell, required: boolean, offered: () => void): Promise<void> => {
|
|
903
|
+
const root = roots.get(cell.instance); if (root === undefined) return;
|
|
904
|
+
try {
|
|
905
|
+
const owner = { allocator: this.allocator, scope };
|
|
906
|
+
const product = required ? gridShardfileProduct(cell.slug, owner) : gridShardfileProduct(cell.slug, owner, { signal: optional.signal });
|
|
907
|
+
if (product === null) { if (!required) throw new ApproachInputsDeferredError(); return; }
|
|
908
|
+
const retained = await product; let pageOwned = false;
|
|
909
|
+
try {
|
|
910
|
+
let loading = shared.get(cell.slug);
|
|
911
|
+
if (loading === undefined) {
|
|
912
|
+
pageOwned = true; scope.onDispose(retained.release);
|
|
913
|
+
loading = (async () => {
|
|
914
|
+
const { admitted } = retained, source = admitted.source;
|
|
915
|
+
try {
|
|
916
|
+
if (scope.disposed) throw new Error('Grid product view disposed during admission');
|
|
917
|
+
// A neighbour's tiles hold the authority its entered page holds, or Nine's look graphs are refused by whichever walk reaches it first.
|
|
918
|
+
const presentation = await clientMaterials(source, admitted.assets, renderer, scope, { trustedGraphs: admittedGraphAuthority(source) });
|
|
919
|
+
return { source, assets: retained.reader, views: clientTileViews({ terrain: source.terrain, terrainShadow: source.terrain?.shadow, terrainOrder: source.terrain?.order, ...presentation }), compile: presentation.compile };
|
|
920
|
+
} catch (error) { retained.release(); throw error; }
|
|
921
|
+
})();
|
|
922
|
+
shared.set(cell.slug, loading);
|
|
923
|
+
}
|
|
924
|
+
const { source, assets, views, compile } = await loading;
|
|
925
|
+
if (scope.disposed) return;
|
|
926
|
+
this.clientTiles.offer(cell.instance, { source, assets, root, views });
|
|
927
|
+
offered(); // Render-only pins need no life-script or panel construction.
|
|
928
|
+
const bytes = retained.admitted.assets;
|
|
929
|
+
try { await this.life.admit(cell, root, source, bytes, compile, skins); } catch (error) { console.warn(`[grid] ${cell.instance} stays still (client scripts):`, error); }
|
|
930
|
+
try { await this.panels.admit(cell, root, source, bytes, views); } catch (error) { console.warn(`[grid] ${cell.instance} draws no doors (declared panels):`, error); }
|
|
931
|
+
} finally {
|
|
932
|
+
try { await retained.releaseInputs(); } finally { if (!pageOwned) retained.release(); }
|
|
933
|
+
}
|
|
934
|
+
} catch (error) { if (!(error instanceof ApproachInputsDeferredError)) this.refuse(cell, error); throw error; } // Required entry retains the original refusal.
|
|
935
|
+
};
|
|
936
|
+
const requests = new GridViewAdmissions(async (cell: GridCell, required, offered) => {
|
|
937
|
+
if (scope.disposed || scope.disposing) throw new Error('Grid tile owner left');
|
|
938
|
+
await admit(cell, required, offered);
|
|
939
|
+
}, () => this.allocator.revision);
|
|
940
|
+
return {
|
|
941
|
+
complete: (cell, required) => scope.disposed || scope.disposing ? Promise.reject(new Error('Grid tile owner left')) : requests.complete(cell, required),
|
|
942
|
+
render: async cell => {
|
|
943
|
+
if (scope.disposed || scope.disposing) throw new Error('Grid tile owner left');
|
|
944
|
+
try { await requests.render(cell); return true; }
|
|
945
|
+
catch (error) { if (error instanceof ApproachInputsDeferredError) return false; throw error; }
|
|
946
|
+
},
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
/** G167: note a neighbour whose shard can't load (an M3 wait or a closing page is not a refusal), for its cell and SHARD SELECT. */
|
|
951
|
+
private refuse(cell: GridCell, error: unknown): void {
|
|
952
|
+
const refusal = classifyRefusal(error);
|
|
953
|
+
if (refusal === null || this.host.scope.disposed) return;
|
|
954
|
+
console.warn(`[grid] ${cell.instance} can't load (${refusal}):`, error);
|
|
955
|
+
this.refusals.set(cell.instance, refusal); this.issues.set(cell.instance, error instanceof Error ? error.message : String(error)); pageShardRefusals().note(cell.slug, refusal);
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* G555's read-only port: the cell whose entry waits (the one the traveller is in before its gameplay is ready, else the
|
|
959
|
+
* nearest unready cell within 12 m of its edge), with its readiness fences, its claims, its entered hooks since this wait
|
|
960
|
+
* began and its refusal; null when none waits.
|
|
961
|
+
*/
|
|
962
|
+
private cellLoadingInput(): CellLoadingInput | null {
|
|
963
|
+
const live = this.live; if (live === null) return null;
|
|
964
|
+
const current = live.live.current(), ready = (id: string): boolean => live.live.ready(id) && (current !== id || live.gameplayReady());
|
|
965
|
+
let target: GridCell | undefined = current !== null && !ready(current) ? this.assembly.cell(current) : undefined;
|
|
966
|
+
if (target === undefined) {
|
|
967
|
+
const at = this.world();
|
|
968
|
+
let best = 12;
|
|
969
|
+
for (const cell of this.assembly.cells) {
|
|
970
|
+
if (ready(cell.instance)) continue;
|
|
971
|
+
const d = Math.hypot(Math.max(0, Math.abs(at.x - cell.origin.x) - CHUNK_HALF), Math.max(0, Math.abs(at.z - cell.origin.z) - CHUNK_HALF));
|
|
972
|
+
if (d <= best) { best = d; target = cell; }
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
if (target === undefined) { this.loadingSince.clear(); return null; }
|
|
976
|
+
const id = target.instance, since = this.loadingSince.get(id) ?? diagnosticNow(); this.loadingSince.set(id, since);
|
|
977
|
+
const raw = live.refusal(id), refusal = this.refusal(id);
|
|
978
|
+
const reason = refusal !== null ? refusalReason(refusal)
|
|
979
|
+
: raw instanceof GridCellWaitingError ? GAME_STRINGS.grid.waiting(this.shardName(id)) : null;
|
|
980
|
+
let claimed = 0, product = false;
|
|
981
|
+
for (const entry of this.allocator.claims()) {
|
|
982
|
+
if (entry.owner === id) claimed += entry.bytes;
|
|
983
|
+
if (entry.owner === 'grid' && entry.id === `product:grid:${target.slug}`) { claimed += entry.bytes; product = true; }
|
|
984
|
+
}
|
|
985
|
+
// its entered hooks of this run: from its latest beforeWorld (a road-prepared world ran some before the screen opened)
|
|
986
|
+
const stages = live.live.readiness.status(id), timings = live.hookTimings(), own = timings.completed.filter(row => row.instance === id);
|
|
987
|
+
let run = -1; own.forEach((row, index) => { if (row.hook === 'beforeWorld') run = index; });
|
|
988
|
+
const hooks = new Set((run === -1 ? own.filter(row => row.start >= since) : own.slice(run)).map(row => row.hook));
|
|
989
|
+
const hook = timings.current?.instance === id ? timings.current.hook : null;
|
|
990
|
+
return { instance: id, slug: target.slug, name: this.shardName(id), refusal: reason, product: product || stages.runtime || stages.ready,
|
|
991
|
+
claimedMB: claimed / 1e6, requested: stages.requested, runtime: stages.runtime, colliders: stages.colliders, sim: stages.sim,
|
|
992
|
+
hooks, hook, hybrid: hooks.size > 0 || hook !== null, entered: current === id, gameplayReady: current === id && live.gameplayReady(),
|
|
993
|
+
warm: live.warmPreparation(id) };
|
|
994
|
+
}
|
|
995
|
+
/** At most four times a second: the loading screen reads the allocator and the live session. */
|
|
996
|
+
private stepCellLoading(): void {
|
|
997
|
+
const now = diagnosticNow(); if (now - this.cellLoadingPolled < 250) return;
|
|
998
|
+
this.cellLoadingPolled = now; this.cellLoading.step(this.cellLoadingInput());
|
|
999
|
+
// G580 T2 (Developer): the traveller waits at the wall while its screen shows, so its warm-up may issue more a frame
|
|
1000
|
+
// G580 T2 / T5: a held traveller's warm-up issues more programs a frame and its builds run a bigger budget
|
|
1001
|
+
setWarmUpHeld(this.cellLoading.open !== null);
|
|
1002
|
+
setBuildHeldTimed(this.cellLoading.open !== null);
|
|
1003
|
+
}
|
|
1004
|
+
private refusal(instance: string): ShardRefusal | null {
|
|
1005
|
+
const live = this.live?.refusal(instance);
|
|
1006
|
+
return this.refusals.get(instance) ?? (live === undefined ? null : classifyRefusal(live));
|
|
1007
|
+
}
|
|
1008
|
+
private shardName(instance: string): string { const slug = this.assembly.cell(instance).slug; return this.names.get(slug) ?? slug; }
|
|
1009
|
+
|
|
1010
|
+
/** Complete deferred native seams before a distant entry or road recovery. One page promise, no second scheduler. */
|
|
1011
|
+
prepareOuterStrips(): Promise<void> {
|
|
1012
|
+
if (this.outerStripsReady !== undefined) return this.outerStripsReady;
|
|
1013
|
+
const build = this.outerStripBuild;
|
|
1014
|
+
if (build === undefined) return Promise.resolve();
|
|
1015
|
+
this.outerStripBuild = undefined;
|
|
1016
|
+
const owner = this.host.scope.child('grid.outer-platform');
|
|
1017
|
+
const active = (): void => { if (owner.disposed || owner.disposing || this.host.scope.disposed || this.host.scope.disposing) throw new Error('Outer platform owner left'); };
|
|
1018
|
+
const prepare = async (): Promise<void> => {
|
|
1019
|
+
try {
|
|
1020
|
+
active(); const generated = await build(owner); active();
|
|
1021
|
+
const bytes = generated.reduce((sum, strip) => sum + strip.mesh.positions.byteLength + strip.mesh.indices.byteLength, 0);
|
|
1022
|
+
if (bytes > 0) {
|
|
1023
|
+
const claim = this.allocator.reserve({ id: 'sim:platform:outer', category: 'sim', owner: 'platform', bytes, distance: 0, needed: true });
|
|
1024
|
+
if (claim === null) throw new Error('Outer platform native residency deferred');
|
|
1025
|
+
owner.onDispose(claim.release);
|
|
1026
|
+
}
|
|
1027
|
+
const slice = workSlice(OUTER_RING_SLICE_MS, owner);
|
|
1028
|
+
for (const { mesh } of generated) {
|
|
1029
|
+
active(); installStripCollider(this.host.physics, mesh, owner); await slice.check();
|
|
1030
|
+
}
|
|
1031
|
+
active();
|
|
1032
|
+
this.strips.push(...collisionStrips(generated));
|
|
1033
|
+
this.publishOuterStrips?.(generated); this.publishOuterStrips = undefined;
|
|
1034
|
+
this.live?.refreshPlatformEntries();
|
|
1035
|
+
} catch (error) { owner.dispose(); throw error; }
|
|
1036
|
+
};
|
|
1037
|
+
this.outerStripsReady = prepare(); return this.outerStripsReady;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/** Step 2: the live crossing, once the page's player health and equipment exist (play.ts). */
|
|
1041
|
+
attach(page: LiveGridPage): LiveGridSession {
|
|
1042
|
+
if (this.live !== null) throw new Error('The grid session already has its live crossing');
|
|
1043
|
+
if (this.host.residency === undefined) throw new Error('Grid session requires the early page residency owner');
|
|
1044
|
+
// GO7: a home entered before the page loop (Template's data cell, Signal Dunes' client page) waits on its ring tiles
|
|
1045
|
+
// in loading step `home`, and only the loop's late frame steps them: every entry through this steps them until it runs
|
|
1046
|
+
const tiles = bootSteppedTiles(this.clientTiles, { frames: () => this.lateFrames,
|
|
1047
|
+
step: () => { if (!this.host.scope.disposed) { const at = this.world(); this.rings.step({ x: at.x, z: at.z, vx: 0, vz: 0 }); } },
|
|
1048
|
+
// a left page never wakes the wait: its entry's release settles it
|
|
1049
|
+
wait: () => new Promise<void>(resolve => { if (!this.host.scope.disposed) this.host.scope.timeout(16, resolve); }) });
|
|
1050
|
+
this.live = new LiveGridSession({ assembly: this.assembly, home: this.home, physics: this.host.physics, scope: this.host.scope, walls: this.walls, strips: this.strips, initialStripBytes: this.initialStripBytes,
|
|
1051
|
+
prepareStrips: cell => Math.max(Math.abs(cell.cell[0] - this.home.cell[0]), Math.abs(cell.cell[1] - this.home.cell[1])) <= 1 ? Promise.resolve() : this.prepareOuterStrips(), allocator: this.allocator,
|
|
1052
|
+
residency: this.host.residency.home(), tiles, lightingSettled: () => { this.prelinkViews(); }, backgroundReady: () => this.host.backgroundReady?.() !== false,
|
|
1053
|
+
...(this.admitNeighbour === undefined ? {} : { prepareDataTiles: async (cell: GridCell, scope: Scope, start: { readonly x: number; readonly z: number }) => {
|
|
1054
|
+
await this.admitNeighbour?.(cell, true);
|
|
1055
|
+
// GO7: an initial data home (template-2 from Shard select) waits on these tiles in loading step `home`, before the
|
|
1056
|
+
// page loop steps the rings: the boot registration steps them until it does
|
|
1057
|
+
await tiles.enterOffered(cell.instance, scope, start);
|
|
1058
|
+
}, prepareNeighbourTiles: async (cell: GridCell, start: { readonly x: number; readonly z: number }, signal: AbortSignal) => {
|
|
1059
|
+
const owner = this.host.scope.child(`grid.tile-approach.${cell.instance}`);
|
|
1060
|
+
const release = (): void => { owner.dispose(); };
|
|
1061
|
+
owner.listen(signal, 'abort', release, { once: true });
|
|
1062
|
+
try {
|
|
1063
|
+
if (signal.aborted) throw new Error('Tile approach abandoned');
|
|
1064
|
+
if (await this.admitNeighbourRender?.(cell) === false) { owner.dispose(); return; }
|
|
1065
|
+
if (owner.disposed || owner.disposing || signal.aborted) throw new Error('Tile approach abandoned');
|
|
1066
|
+
const prepare = this.clientTiles.prepareOffered;
|
|
1067
|
+
if (prepare === undefined) throw new Error('Tile approach preparation is unavailable');
|
|
1068
|
+
await prepare(cell.instance, owner, start);
|
|
1069
|
+
} catch (error) { owner.dispose(); throw error; }
|
|
1070
|
+
} }),
|
|
1071
|
+
neighbourEdges: (cell, origin) => neighbourEdges(cell, { origin }), rimEdges: (origin) => rimEdges(this.assembly, { origin }) }, page);
|
|
1072
|
+
return this.live;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
/** Ring prelink: once a crossing's lighting is in place, every resident neighbour view (far proxies, L1 / L0 ring tiles)
|
|
1076
|
+
* links the programs that lighting needs through the page's own precompile (`prepareView`), in the background: a tile
|
|
1077
|
+
* first drawn after it never links on its first frame (the 150 ms cove-pools frame), and nothing waits on it. The road's
|
|
1078
|
+
* own roots (deck, boulevard, void) go too: their road-lit variants, compiled with the page's environment, are ready
|
|
1079
|
+
* before the first leave (G639: Driftwood's first road frame linked seven programs, up to 1 s under load). */
|
|
1080
|
+
private prelinkViews(): void {
|
|
1081
|
+
const prepare = this.host.prepareView, scope = this.host.scope;
|
|
1082
|
+
if ((prepare === undefined && this.host.prepareViews === undefined) || scope.disposed || scope.disposing) return;
|
|
1083
|
+
prelinkGridViews(scope, [...this.viewRoots.values(), ...this.roadRoots], prepare, this.host.prepareViews);
|
|
1084
|
+
// the resident cells' sky domes too, under these lights (each layer was prepared under the lights it was built in)
|
|
1085
|
+
const skies = this.host.prepareSkyLayers;
|
|
1086
|
+
if (skies !== undefined) void (async (): Promise<void> => { try { await skies(); } catch (error: unknown) { console.warn('[grid] sky prelink stopped', error); } })();
|
|
1087
|
+
}
|
|
1088
|
+
/** G107 / SF66: a cell's admitted baked map once loaded, retaining the home's full raster size. */
|
|
1089
|
+
mapImage(instance: string): HTMLCanvasElement | ImageBitmap | null { return this.mapImages.image(this.assembly.cell(instance).slug); }
|
|
1090
|
+
/** the neighbours' baked maps held now (bytes), for the memory readouts */
|
|
1091
|
+
get mapImageBytes(): number { return this.mapImages.bytes; }
|
|
1092
|
+
/** The traveller's feet in grid metres, whatever frame it is in. */
|
|
1093
|
+
worldFeet(): { x: number; z: number } { return this.world(); }
|
|
1094
|
+
|
|
1095
|
+
/** World feet (grid metres) from the home-frame feet. */
|
|
1096
|
+
private world(): { x: number; z: number } {
|
|
1097
|
+
if (this.live !== null) { const feet = this.live.worldFeet(); return { x: feet.x, z: feet.z }; }
|
|
1098
|
+
const feet = this.host.feet(); return { x: feet.x + this.home.origin.x, z: feet.z + this.home.origin.z };
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
/** One fixed step: the rings from the player's world pose and velocity, then the cell events. `view` false: the
|
|
1102
|
+
* drawn parts (`viewStep`) wait for the frame's late system. */
|
|
1103
|
+
step(dt: number, view = true): void {
|
|
1104
|
+
const at = this.world();
|
|
1105
|
+
if (this.last !== null && dt > 0) { this.velocity = { x: (at.x - this.last.x) / dt, z: (at.z - this.last.z) / dt }; }
|
|
1106
|
+
this.last = at;
|
|
1107
|
+
const speed = Math.hypot(this.velocity.x, this.velocity.z);
|
|
1108
|
+
if (this.startOuterFar !== null && this.host.backgroundReady?.() !== false) { const start = this.startOuterFar; this.startOuterFar = null; start(); }
|
|
1109
|
+
// Match L1's 400 m reach plus the rings' four-second travel lookahead. Distant
|
|
1110
|
+
// cells keep their baked proxy without admitting their full product at boot.
|
|
1111
|
+
if (this.startOuterRoad !== null && this.roadSettled && this.host.backgroundReady?.() !== false) { const start = this.startOuterRoad; this.startOuterRoad = null; start(); }
|
|
1112
|
+
// DL17 (G872): the cell the player is in, drawn by its regional runtime, admits no second tile copy of itself (the
|
|
1113
|
+
// home re-read ~225 of its files after control for it); leaving starts it while the runtime is still resident
|
|
1114
|
+
const drawn = this.live?.runtimeDrawnCell() ?? null;
|
|
1115
|
+
if (this.initialFarReady && this.host.backgroundReady?.() !== false) for (const cell of this.neighbours) {
|
|
1116
|
+
if (cell.instance === drawn) continue;
|
|
1117
|
+
const distance = Math.hypot(Math.max(0, Math.abs(at.x - cell.origin.x) - CHUNK_HALF), Math.max(0, Math.abs(at.z - cell.origin.z) - CHUNK_HALF));
|
|
1118
|
+
if (this.assembly.approaching(distance, 400 + Math.min(speed, 60) * 4)) void this.admitNeighbour?.(cell).catch(() => undefined);
|
|
1119
|
+
}
|
|
1120
|
+
this.softWalls.step();
|
|
1121
|
+
if (view) this.viewStep();
|
|
1122
|
+
const inside = this.assembly.at(at.x, at.z), active = this.live === null ? this.home.instance : this.live.live.current();
|
|
1123
|
+
// GC2: online, prediction on the rim of a cell the server still walls (C5) is not a departure
|
|
1124
|
+
const held = active !== null && this.live?.serverHolds(active) === true, origin = held ? this.assembly.cell(active).origin : null;
|
|
1125
|
+
const past = origin === null ? Infinity : Math.max(Math.abs(at.x - origin.x), Math.abs(at.z - origin.z)) - CHUNK_HALF;
|
|
1126
|
+
const presence = cellPresence(inside, active, held, past);
|
|
1127
|
+
if (presence.kind === 'leave') gridCells.leave();
|
|
1128
|
+
else if (presence.kind === 'enter') gridCells.enter({ instance: presence.instance, slug: presence.slug });
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
/** Tile streaming T5.3 (G775): the entered cell's resident L0 tiles (key j * 8 + i) and its origin from the home cell,
|
|
1132
|
+
* for the Developer minimap overlay. */
|
|
1133
|
+
private overlayState: { readonly at: number; readonly state: ReturnType<GridSession['tileOverlayState']> } | null = null;
|
|
1134
|
+
/** T5's Developer overlay state, rebuilt at most every 250 ms (T10: rebuilt for every minimap paint it sorted every ring
|
|
1135
|
+
* key, 12-13 ms of a Simulator spawn frame); residency moves slower than that and the overlay is a readout. */
|
|
1136
|
+
tileOverlayState(): { readonly origin: { readonly x: number; readonly z: number }; readonly render: ReadonlySet<number>; readonly bytes: ReadonlyMap<number, number> } {
|
|
1137
|
+
const now = diagnosticNow(), held = this.overlayState;
|
|
1138
|
+
if (held !== null && now - held.at < 250) return held.state;
|
|
1139
|
+
const state = this.readTileOverlayState(); this.overlayState = { at: now, state }; return state;
|
|
1140
|
+
}
|
|
1141
|
+
private readTileOverlayState(): ReturnType<GridSession['tileOverlayState']> {
|
|
1142
|
+
const entered = (this.live === null ? null : this.live.live.current()) ?? this.home.instance, cell = this.assembly.cell(entered), prefix = `${entered}:l0/`;
|
|
1143
|
+
const render = new Set(this.rings.resident().filter(key => key.startsWith(prefix)).map(key => {
|
|
1144
|
+
const [x, z] = key.slice(prefix.length).split('/').map(Number); return (z ?? 0) * 8 + (x ?? 0);
|
|
1145
|
+
}));
|
|
1146
|
+
// T5: each L0 tile's declared resident bytes, from the entered cell's admitted product (none while it is not resident)
|
|
1147
|
+
const bytes = new Map<number, number>();
|
|
1148
|
+
for (const tile of admittedRuntimeProduct(cell.slug)?.source.tiles ?? []) if (tile.lod === 0) bytes.set(tile.z * 8 + tile.x, tile.decoded + tile.gpu);
|
|
1149
|
+
return { origin: { x: cell.origin.x - this.home.origin.x, z: cell.origin.z - this.home.origin.z }, render, bytes };
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
private placeholderBlocksTiles(instance:string):boolean {
|
|
1153
|
+
if (this.clientTiles.preparing?.(instance) === true) return false;
|
|
1154
|
+
const entered=this.live===null?this.home.instance:this.live.live.current();
|
|
1155
|
+
return placeholderBlocksTiles(instance,entered,this.clientTiles.owns(instance),this.near.owns(instance),this.near.absent(instance));
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
/** What only draws, from the last fixed step's pose and velocity: the rings, the screens, the shimmer, the near view. */
|
|
1159
|
+
private viewStep(): void {
|
|
1160
|
+
this.refreshCellCover();
|
|
1161
|
+
const at = this.last ?? this.world(), speed = Math.hypot(this.velocity.x, this.velocity.z), clamp = speed > 60 ? 60 / speed : 1; // a respawn's jump is not a velocity
|
|
1162
|
+
this.rings.step({ x: at.x, z: at.z, vx: this.velocity.x * clamp, vz: this.velocity.z * clamp });
|
|
1163
|
+
// Home readiness alone cannot release optional model work: its parser can
|
|
1164
|
+
// otherwise queue ahead of far files still arriving for the startup barrier.
|
|
1165
|
+
if (!this.initialFarReady && this.host.backgroundReady?.() !== false && this.rings.ready()) this.initialFarReady = true;
|
|
1166
|
+
this.roadTiles?.step({ x: at.x, z: at.z, vx: this.velocity.x * clamp, vz: this.velocity.z * clamp });
|
|
1167
|
+
for (const cell of this.neighbours) if (this.placeholderBlocksTiles(cell.instance)) this.rings.retireRefinement(cell.instance);
|
|
1168
|
+
this.stepCellLoading();
|
|
1169
|
+
if (this.host.heldFrame !== undefined) this.host.heldFrame.enabled = this.cellLoading.open !== null && this.live?.travelState().crossing.phase === 'preparing';
|
|
1170
|
+
this.shimmer.step();
|
|
1171
|
+
const active = this.live === null ? this.home.instance : this.live.live.current();
|
|
1172
|
+
const eye = this.host.eye?.();
|
|
1173
|
+
if (this.host.backgroundReady?.() !== false) this.near.update(eye === undefined || !Number.isFinite(eye.x) || !Number.isFinite(eye.z) ? at : { x: at.x + eye.x, z: at.z + eye.z }, active);
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/** every visible neighbour is drawn now (the entry reveal's readiness, G98) */
|
|
1177
|
+
ringsReady(): boolean { return this.roadSettled && this.rings.ready(); }
|
|
1178
|
+
/** Settles once the road system has landed (or failed): the entry's shader warm-up waits for it, so its programs are warmed. */
|
|
1179
|
+
roadLanded(): Promise<void> { return this.roadLanding; }
|
|
1180
|
+
|
|
1181
|
+
/** Hold the loading screen until every visible neighbour is drawn (or the time limit: the soft walls hold anyway). */
|
|
1182
|
+
async ready(limitMs = 20_000): Promise<boolean> {
|
|
1183
|
+
for (let waited = 0; ; waited += 16) {
|
|
1184
|
+
this.step(1 / 60);
|
|
1185
|
+
if (this.rings.ready()) return true;
|
|
1186
|
+
if (waited > limitMs) return false;
|
|
1187
|
+
await new Promise<void>((resolve) => { this.host.scope.timeout(16, resolve); });
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
/** Publish the current feet's existing sky/grade owners before boot shader preparation.
|
|
1192
|
+
* This runs only the presentation frame; no neighbour tick, input, physics or simulation is advanced. */
|
|
1193
|
+
prepareFrame(): void { this.frame?.frame(); }
|
|
1194
|
+
|
|
1195
|
+
/** The readout: what each cell shows, the rings and the allocator. */
|
|
1196
|
+
state(): GridSessionState {
|
|
1197
|
+
const pending = bootWaits();
|
|
1198
|
+
const stats = this.rings.stats(), residentKeys = this.rings.resident(), resident = new Set(residentKeys.map((key) => key.split(':')[0]));
|
|
1199
|
+
const at = this.world(), cost = this.allocator.cost(), playing = this.live === null ? this.home.instance : this.live.live.current();
|
|
1200
|
+
const tiles = (instance: string, level: 'l1' | 'l0'): number => residentKeys.filter((key) => key.startsWith(`${instance}:${level}/`)).length;
|
|
1201
|
+
const drawn = (instance: string): GridCellDrawn => ({ far: this.farMeshes.get(instance)?.mesh.visible === true, near: this.near.visible(instance), l1: tiles(instance, 'l1'), l0: tiles(instance, 'l0') });
|
|
1202
|
+
// the home off its cell (an owned home on the road) is drawn like any neighbour; `frozen` only when no layer draws it
|
|
1203
|
+
const shows = (instance: string, d: GridCellDrawn): GridCellShows => instance === playing ? 'playing'
|
|
1204
|
+
: d.near ? 'near' : d.far ? 'far proxy' : d.l1 + d.l0 > 0 ? 'tiles' : instance === this.home.instance ? 'frozen' : resident.has(instance) ? 'far proxy' : 'loading';
|
|
1205
|
+
return {
|
|
1206
|
+
pitch: this.assembly.pitch,
|
|
1207
|
+
home: this.home.instance, inside: gridCells.cell?.instance ?? null, feet: { x: Math.round(at.x * 100) / 100, z: Math.round(at.z * 100) / 100 },
|
|
1208
|
+
cells: this.assembly.cells.map((cell) => { const d = drawn(cell.instance); return { instance: cell.instance, slug: cell.slug, cell: cell.cell, shows: shows(cell.instance, d), drawn: d }; }),
|
|
1209
|
+
strips: this.strips.length, road: this.road, seams: this.seams, softWalls: this.softWalls.state(), shimmer: this.shimmer.state(), cellLoading: this.cellLoading.open, ringsReady: this.rings.ready(), ringsWait: { cells: this.rings.waiting(), far: this.rings.farPlan(), preparation: this.farPreparation(), waits: { count: pending.length, oldest: pending.map(({ label, kind, ageMs }) => ({ label, kind, ageMs })).sort((a, b) => b.ageMs - a.ageMs).slice(0, 16) } },
|
|
1210
|
+
residentMB: Math.round(cost.accounted / 1e4) / 100, playingMB: Math.round(cost.playing / 1e4) / 100,
|
|
1211
|
+
accountedBytes: cost.accounted,
|
|
1212
|
+
rings: { frame: stats.frame, far: stats.resident.far, l1: stats.resident.l1, l0: stats.resident.l0, refused: stats.refused, inFlight: stats.inFlight, queued: stats.queued,
|
|
1213
|
+
ghosts: { count: this.tileGhosts.count(), tiles: this.tileGhosts.regions() } },
|
|
1214
|
+
frame: this.frame?.state() ?? null,
|
|
1215
|
+
live: this.live?.state() ?? null,
|
|
1216
|
+
life: this.life.state(),
|
|
1217
|
+
near: this.near.state(),
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/** Generate the platform; a platform the generator refuses (an edge past the cliff envelope, an entry off road height)
|
|
1223
|
+
* falls back to road-level edges. A disposed page stops between slices and builds nothing more. */
|
|
1224
|
+
async function platformStrips(assembly: GridAssembly, edges: readonly PlatformCell[] | undefined,
|
|
1225
|
+
generate: (cells: readonly PlatformCell[], empty: StripProfile) => Promise<readonly GeneratedStrip[]>, onFallback?: () => void): Promise<readonly GeneratedStrip[]> {
|
|
1226
|
+
const { cells, flat, empty } = platformInputs(assembly, edges);
|
|
1227
|
+
try { return await generate(cells, empty); } catch (error) {
|
|
1228
|
+
if (error instanceof Error && error.message === 'Grid admission scope disposed') throw error; // the page left mid-generation
|
|
1229
|
+
onFallback?.(); console.warn('[grid] the platform keeps road-level edges:', error); return generate(flat, empty);
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
function platformStripsNow(assembly: GridAssembly, edges: readonly PlatformCell[] | undefined): readonly GeneratedStrip[] {
|
|
1233
|
+
const { cells, flat, empty } = platformInputs(assembly, edges);
|
|
1234
|
+
try { return generatePlatform(cells, empty); } catch (error) { console.warn('[grid] the platform keeps road-level edges:', error); return generatePlatform(flat, empty); }
|
|
1235
|
+
}
|